From 6392f5a9dfce2bf83617d49bb7f332181ec6004e Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 25 May 2014 15:37:31 +0900 Subject: Revert "Finish renaming tdevelop components" This reverts commit 722ce1efbac31c61b1d4b13f7e075c9f311e3e73. --- AUTHORS | 2 +- CMakeLists.txt | 12 +- Doxyfile | 2 +- Makefile.am | 13 +- buildtools/ada/CMakeLists.txt | 10 +- buildtools/ada/Makefile.am | 16 +- buildtools/ada/adaglobaloptionsdlg.cpp | 4 +- buildtools/ada/adaproject_part.cpp | 68 +- buildtools/ada/adaproject_part.h | 12 +- buildtools/ada/adaproject_widget.cpp | 2 +- buildtools/ada/adaproject_widget.h | 2 +- buildtools/ada/adaprojectoptionsdlg.cpp | 16 +- buildtools/ada/adaprojectoptionsdlg.h | 2 +- buildtools/ada/kdevadaproject.desktop | 100 + buildtools/ada/kdevadaproject.rc | 14 + buildtools/ada/tdevadaproject.desktop | 100 - buildtools/ada/tdevadaproject.rc | 14 - buildtools/ant/CMakeLists.txt | 10 +- buildtools/ant/Makefile.am | 16 +- buildtools/ant/antprojectpart.cpp | 20 +- buildtools/ant/antprojectpart.h | 4 +- buildtools/ant/kdevantproject.desktop | 96 + buildtools/ant/kdevantproject.rc | 14 + buildtools/ant/tdevantproject.desktop | 96 - buildtools/ant/tdevantproject.rc | 14 - buildtools/autotools/CMakeLists.txt | 10 +- buildtools/autotools/Makefile.am | 20 +- buildtools/autotools/addfiledlg.cpp | 2 +- buildtools/autotools/addsubprojectdlg.cpp | 2 +- buildtools/autotools/autodetailsview.cpp | 20 +- buildtools/autotools/autoprojectpart.cpp | 30 +- buildtools/autotools/autoprojectpart.h | 14 +- buildtools/autotools/autoprojectwidget.cpp | 2 +- buildtools/autotools/autosubprojectview.cpp | 8 +- buildtools/autotools/choosetargetdialog.cpp | 2 +- buildtools/autotools/configureoptionswidget.cpp | 20 +- buildtools/autotools/configureoptionswidget.h | 4 +- buildtools/autotools/fileselectorwidget.cpp | 4 +- buildtools/autotools/kdevautoproject.desktop | 97 + buildtools/autotools/kdevautoproject.rc | 31 + buildtools/autotools/kdevtdeautoproject.desktop | 92 + buildtools/autotools/misc.cpp | 16 +- buildtools/autotools/removefiledlg.cpp | 2 +- buildtools/autotools/tdevautoproject.desktop | 97 - buildtools/autotools/tdevautoproject.rc | 31 - buildtools/autotools/tdevtdeautoproject.desktop | 92 - buildtools/custommakefiles/CMakeLists.txt | 10 +- buildtools/custommakefiles/Makefile.am | 16 +- buildtools/custommakefiles/customprojectpart.cpp | 28 +- buildtools/custommakefiles/customprojectpart.h | 4 +- .../custommakefiles/kdevcustomproject.desktop | 91 + buildtools/custommakefiles/kdevcustomproject.rc | 30 + .../custommakefiles/tdevcustomproject.desktop | 91 - buildtools/custommakefiles/tdevcustomproject.rc | 30 - buildtools/lib/base/CMakeLists.txt | 8 +- buildtools/lib/base/Mainpage.dox | 4 +- buildtools/lib/base/Makefile.am | 16 +- buildtools/lib/base/kdevbuildtool.cpp | 38 + buildtools/lib/base/kdevbuildtool.h | 41 + buildtools/lib/base/tdevbuildtool.cpp | 38 - buildtools/lib/base/tdevbuildtool.h | 41 - buildtools/lib/parsers/autotools/CMakeLists.txt | 4 +- buildtools/lib/parsers/autotools/Makefile.am | 10 +- buildtools/lib/parsers/autotools/tests/Makefile.am | 4 +- buildtools/lib/parsers/qmake/CMakeLists.txt | 4 +- buildtools/lib/parsers/qmake/Makefile.am | 10 +- buildtools/lib/parsers/qmake/tests/Makefile.am | 4 +- buildtools/lib/widgets/CMakeLists.txt | 4 +- buildtools/lib/widgets/Makefile.am | 14 +- buildtools/pascal/CMakeLists.txt | 10 +- buildtools/pascal/Makefile.am | 16 +- buildtools/pascal/kdevpascalproject.desktop | 93 + buildtools/pascal/kdevpascalproject.rc | 14 + buildtools/pascal/pascalglobaloptionsdlg.cpp | 4 +- buildtools/pascal/pascalproject_part.cpp | 48 +- buildtools/pascal/pascalproject_part.h | 12 +- buildtools/pascal/pascalproject_widget.cpp | 2 +- buildtools/pascal/pascalproject_widget.h | 2 +- buildtools/pascal/pascalprojectoptionsdlg.cpp | 8 +- buildtools/pascal/pascalprojectoptionsdlg.h | 2 +- buildtools/pascal/tdevpascalproject.desktop | 93 - buildtools/pascal/tdevpascalproject.rc | 14 - buildtools/qmake/CMakeLists.txt | 10 +- buildtools/qmake/Makefile.am | 22 +- buildtools/qmake/kdevtmakeproject.desktop | 91 + buildtools/qmake/kdevtrollproject.desktop | 95 + buildtools/qmake/kdevtrollproject.rc | 33 + buildtools/qmake/tdevtmakeproject.desktop | 91 - buildtools/qmake/tdevtrollproject.desktop | 95 - buildtools/qmake/tdevtrollproject.rc | 33 - buildtools/qmake/trollprojectpart.cpp | 30 +- buildtools/qmake/trollprojectpart.h | 4 +- buildtools/qmake/trollprojectwidget.cpp | 22 +- buildtools/script/CMakeLists.txt | 10 +- buildtools/script/Makefile.am | 16 +- buildtools/script/kdevscriptproject.desktop | 87 + buildtools/script/kdevscriptproject.rc | 12 + buildtools/script/scriptnewfiledlg.cpp | 2 +- buildtools/script/scriptoptionswidget.cpp | 4 +- buildtools/script/scriptoptionswidget.h | 6 +- buildtools/script/scriptprojectpart.cpp | 30 +- buildtools/script/scriptprojectpart.h | 4 +- buildtools/script/tdevscriptproject.desktop | 87 - buildtools/script/tdevscriptproject.rc | 12 - configure.in.bot | 4 +- configure.in.in | 2 +- doc/Makefile.am | 2 +- doc/api/Architecture.dox | 16 +- doc/api/FutureTasks.dox | 2 +- doc/api/HighPriTasks.dox | 2 +- doc/api/HowToAddApplicationTemplates.dox | 12 +- doc/api/HowToAddGenericBuildTools.dox | 2 +- doc/api/HowToAddPlugins.dox | 10 +- doc/api/HowToAddProgrammingLanguages.dox | 10 +- doc/api/HowToDocument.dox | 4 +- doc/extras/CMakeLists.txt | 2 +- doc/extras/Makefile.am | 2 +- doc/extras/w3c/CMakeLists.txt | 2 +- doc/extras/w3c/Makefile.am | 2 +- doc/kde_app_devel/CMakeLists.txt | 12 + doc/kde_app_devel/Makefile.am | 3 + doc/kde_app_devel/appwizard.png | Bin 0 -> 46091 bytes doc/kde_app_devel/index.docbook | 1549 +++++++ doc/kde_app_devel/kscribblefiles.png | Bin 0 -> 16708 bytes doc/kdearch/Makefile.am | 2 + doc/kdearch/affine-general.png | Bin 0 -> 3182 bytes doc/kdearch/affine-rotate.png | Bin 0 -> 1941 bytes doc/kdearch/affine-scale.png | Bin 0 -> 1419 bytes doc/kdearch/affine-shear.png | Bin 0 -> 1422 bytes doc/kdearch/affine-translate.png | Bin 0 -> 1444 bytes doc/kdearch/brushstyles.png | Bin 0 -> 9874 bytes doc/kdearch/canvas.png | Bin 0 -> 24979 bytes doc/kdearch/capflat.png | Bin 0 -> 267 bytes doc/kdearch/capround.png | Bin 0 -> 441 bytes doc/kdearch/capsquare.png | Bin 0 -> 185 bytes doc/kdearch/index.docbook | 3337 +++++++++++++++ doc/kdearch/joinbevel.png | Bin 0 -> 529 bytes doc/kdearch/joinmiter.png | Bin 0 -> 569 bytes doc/kdearch/joinround.png | Bin 0 -> 597 bytes doc/kdearch/konqi-mirrored.png | Bin 0 -> 27633 bytes doc/kdearch/konqi-normal.png | Bin 0 -> 27757 bytes doc/kdearch/konqi-rotated.png | Bin 0 -> 28953 bytes doc/kdearch/konqi-sheared.png | Bin 0 -> 25644 bytes doc/kdearch/kview-menu.png | Bin 0 -> 4204 bytes doc/kdearch/opengl.png | Bin 0 -> 4818 bytes doc/kdearch/penstyles.png | Bin 0 -> 2854 bytes doc/kdearch/whatsthis.png | Bin 0 -> 3509 bytes doc/kdevdesigner/CMakeLists.txt | 9 + doc/kdevdesigner/Makefile.am | 3 + doc/kdevdesigner/index.docbook | 65 + doc/platform/Mainpage.dox | 12 +- doc/std/CMakeLists.txt | 4 +- doc/std/Makefile.am | 4 +- doc/std/kdev3api.toc | 45 + doc/std/tdev3api.toc | 45 - doc/tde_app_devel/CMakeLists.txt | 12 - doc/tde_app_devel/Makefile.am | 2 - doc/tde_app_devel/appwizard.png | Bin 46091 -> 0 bytes doc/tde_app_devel/index.docbook | 1549 ------- doc/tde_app_devel/kscribblefiles.png | Bin 16708 -> 0 bytes doc/tdearch/Makefile.am | 2 - doc/tdearch/affine-general.png | Bin 3182 -> 0 bytes doc/tdearch/affine-rotate.png | Bin 1941 -> 0 bytes doc/tdearch/affine-scale.png | Bin 1419 -> 0 bytes doc/tdearch/affine-shear.png | Bin 1422 -> 0 bytes doc/tdearch/affine-translate.png | Bin 1444 -> 0 bytes doc/tdearch/brushstyles.png | Bin 9874 -> 0 bytes doc/tdearch/canvas.png | Bin 24979 -> 0 bytes doc/tdearch/capflat.png | Bin 267 -> 0 bytes doc/tdearch/capround.png | Bin 441 -> 0 bytes doc/tdearch/capsquare.png | Bin 185 -> 0 bytes doc/tdearch/index.docbook | 3337 --------------- doc/tdearch/joinbevel.png | Bin 529 -> 0 bytes doc/tdearch/joinmiter.png | Bin 569 -> 0 bytes doc/tdearch/joinround.png | Bin 597 -> 0 bytes doc/tdearch/konqi-mirrored.png | Bin 27633 -> 0 bytes doc/tdearch/konqi-normal.png | Bin 27757 -> 0 bytes doc/tdearch/konqi-rotated.png | Bin 28953 -> 0 bytes doc/tdearch/konqi-sheared.png | Bin 25644 -> 0 bytes doc/tdearch/kview-menu.png | Bin 4204 -> 0 bytes doc/tdearch/opengl.png | Bin 4818 -> 0 bytes doc/tdearch/penstyles.png | Bin 2854 -> 0 bytes doc/tdearch/whatsthis.png | Bin 3509 -> 0 bytes doc/tdevassistant/CMakeLists.txt | 9 - doc/tdevassistant/Makefile.am | 3 - doc/tdevassistant/index.docbook | 65 - doc/tdevdesigner/CMakeLists.txt | 9 - doc/tdevdesigner/Makefile.am | 3 - doc/tdevdesigner/index.docbook | 65 - doc/tdevelop/app-files.docbook | 202 +- doc/tdevelop/commands.docbook | 16 +- doc/tdevelop/getting-started.docbook | 22 +- doc/tdevelop/index.docbook | 2 +- doc/tdevelop/kdevdesigner.png | Bin 0 -> 69839 bytes doc/tdevelop/nutshell.docbook | 2 +- doc/tdevelop/plugin-tools.docbook | 36 +- doc/tdevelop/project-advanced.docbook | 4 +- doc/tdevelop/setup.docbook | 34 +- doc/tdevelop/survey-manual.docbook | 2 +- doc/tdevelop/tdevdesigner.png | Bin 69839 -> 0 bytes doc/tdevelop/tdevelop-install.docbook | 2 +- doc/tdevelop/tdevelop-scripting.docbook | 4 +- doc/tdevelop/tdevelop-survey.docbook | 2 +- editors/editor-chooser/CMakeLists.txt | 6 +- editors/editor-chooser/Makefile.am | 10 +- editors/editor-chooser/editorchooser_part.cpp | 14 +- editors/editor-chooser/editorchooser_part.h | 8 +- editors/editor-chooser/kdeveditorchooser.desktop | 91 + editors/editor-chooser/tdeveditorchooser.desktop | 91 - embedded/visualboyadvance/CMakeLists.txt | 10 +- embedded/visualboyadvance/Makefile.am | 14 +- .../visualboyadvance/kdevpart_visualboyadvance.rc | 11 + .../visualboyadvance/kdevvisualboyadvance.desktop | 86 + .../visualboyadvance/tdevpart_visualboyadvance.rc | 11 - .../visualboyadvance/tdevvisualboyadvance.desktop | 86 - .../visualboyadvance/visualboyadvance_part.cpp | 24 +- embedded/visualboyadvance/visualboyadvance_part.h | 8 +- kdevassistant.desktop | 73 + kdevdesigner/AUTHORS | 4 + kdevdesigner/CMakeLists.txt | 15 + kdevdesigner/LICENSE.GPL | 340 ++ kdevdesigner/Makefile.am | 4 + kdevdesigner/NEWS | 1 + kdevdesigner/README | 25 + kdevdesigner/TODO | 1 + kdevdesigner/designer/CMakeLists.txt | 107 + kdevdesigner/designer/Makefile.am | 21 + kdevdesigner/designer/about.ui | 219 + kdevdesigner/designer/actiondnd.cpp | 728 ++++ kdevdesigner/designer/actiondnd.h | 254 ++ kdevdesigner/designer/actioneditor.ui | 227 + kdevdesigner/designer/actioneditorimpl.cpp | 321 ++ kdevdesigner/designer/actioneditorimpl.h | 82 + kdevdesigner/designer/actionlistview.cpp | 110 + kdevdesigner/designer/actionlistview.h | 82 + kdevdesigner/designer/asciivalidator.cpp | 94 + kdevdesigner/designer/asciivalidator.h | 53 + kdevdesigner/designer/command.cpp | 2475 +++++++++++ kdevdesigner/designer/command.h | 1260 ++++++ kdevdesigner/designer/configtoolboxdialog.ui | 326 ++ kdevdesigner/designer/configtoolboxdialog.ui.h | 215 + kdevdesigner/designer/connectiondialog.ui | 219 + kdevdesigner/designer/connectiondialog.ui.h | 318 ++ kdevdesigner/designer/connectionitems.cpp | 517 +++ kdevdesigner/designer/connectionitems.h | 226 + kdevdesigner/designer/connectiontable.cpp | 56 + kdevdesigner/designer/connectiontable.h | 47 + kdevdesigner/designer/createtemplate.ui | 195 + kdevdesigner/designer/customwidgeteditor.ui | 1378 +++++++ kdevdesigner/designer/customwidgeteditorimpl.cpp | 842 ++++ kdevdesigner/designer/customwidgeteditorimpl.h | 99 + kdevdesigner/designer/database.cpp | 122 + kdevdesigner/designer/database.h | 85 + kdevdesigner/designer/dbconnection.ui | 222 + kdevdesigner/designer/dbconnectioneditor.ui | 147 + kdevdesigner/designer/dbconnectionimpl.cpp | 80 + kdevdesigner/designer/dbconnectionimpl.h | 58 + kdevdesigner/designer/dbconnections.ui | 321 ++ kdevdesigner/designer/dbconnectionsimpl.cpp | 196 + kdevdesigner/designer/dbconnectionsimpl.h | 61 + kdevdesigner/designer/defs.cpp | 84 + kdevdesigner/designer/defs.h | 42 + kdevdesigner/designer/designer_pch.h | 44 + kdevdesigner/designer/designeraction.cpp | 38 + kdevdesigner/designer/designeraction.h | 52 + kdevdesigner/designer/designerapp.cpp | 176 + kdevdesigner/designer/designerapp.h | 58 + kdevdesigner/designer/designerappiface.cpp | 1093 +++++ kdevdesigner/designer/designerappiface.h | 277 ++ kdevdesigner/designer/editfunctions.ui | 714 ++++ kdevdesigner/designer/editfunctionsimpl.cpp | 534 +++ kdevdesigner/designer/editfunctionsimpl.h | 95 + kdevdesigner/designer/filechooser.cpp | 90 + kdevdesigner/designer/filechooser.h | 69 + kdevdesigner/designer/finddialog.ui | 274 ++ kdevdesigner/designer/finddialog.ui.h | 61 + kdevdesigner/designer/formfile.cpp | 905 ++++ kdevdesigner/designer/formfile.h | 146 + kdevdesigner/designer/formsettings.ui | 549 +++ kdevdesigner/designer/formsettingsimpl.cpp | 118 + kdevdesigner/designer/formsettingsimpl.h | 50 + kdevdesigner/designer/formwindow.cpp | 2773 +++++++++++++ kdevdesigner/designer/formwindow.h | 323 ++ kdevdesigner/designer/gotolinedialog.ui | 169 + kdevdesigner/designer/gotolinedialog.ui.h | 50 + kdevdesigner/designer/hierarchyview.cpp | 1508 +++++++ kdevdesigner/designer/hierarchyview.h | 252 ++ kdevdesigner/designer/iconvieweditor.ui | 461 +++ kdevdesigner/designer/iconvieweditorimpl.cpp | 165 + kdevdesigner/designer/iconvieweditorimpl.h | 59 + kdevdesigner/designer/kdevdesigner_part.cpp | 565 +++ kdevdesigner/designer/kdevdesigner_part.desktop | 16 + kdevdesigner/designer/kdevdesigner_part.h | 148 + kdevdesigner/designer/kdevdesigner_part.rc | 121 + kdevdesigner/designer/kdevdesigner_part_sh.rc | 116 + kdevdesigner/designer/layout.cpp | 1017 +++++ kdevdesigner/designer/layout.h | 191 + kdevdesigner/designer/listboxdnd.cpp | 305 ++ kdevdesigner/designer/listboxdnd.h | 64 + kdevdesigner/designer/listboxeditor.ui | 457 +++ kdevdesigner/designer/listboxeditorimpl.cpp | 245 ++ kdevdesigner/designer/listboxeditorimpl.h | 62 + kdevdesigner/designer/listboxrename.cpp | 157 + kdevdesigner/designer/listboxrename.h | 58 + kdevdesigner/designer/listdnd.cpp | 142 + kdevdesigner/designer/listdnd.h | 64 + kdevdesigner/designer/listeditor.ui | 179 + kdevdesigner/designer/listeditor.ui.h | 72 + kdevdesigner/designer/listviewdnd.cpp | 432 ++ kdevdesigner/designer/listviewdnd.h | 67 + kdevdesigner/designer/listvieweditor.ui | 935 +++++ kdevdesigner/designer/listvieweditorimpl.cpp | 650 +++ kdevdesigner/designer/listvieweditorimpl.h | 103 + kdevdesigner/designer/mainwindow.cpp | 3784 +++++++++++++++++ kdevdesigner/designer/mainwindow.h | 513 +++ kdevdesigner/designer/mainwindowactions.cpp | 2067 ++++++++++ kdevdesigner/designer/menubareditor.cpp | 1129 +++++ kdevdesigner/designer/menubareditor.h | 200 + kdevdesigner/designer/metadatabase.cpp | 1692 ++++++++ kdevdesigner/designer/metadatabase.h | 269 ++ kdevdesigner/designer/multilineeditor.ui | 181 + kdevdesigner/designer/multilineeditorimpl.cpp | 415 ++ kdevdesigner/designer/multilineeditorimpl.h | 112 + kdevdesigner/designer/myiconloader.cpp | 32 + kdevdesigner/designer/myiconloader.h | 32 + kdevdesigner/designer/newform.ui | 238 ++ kdevdesigner/designer/newformimpl.cpp | 414 ++ kdevdesigner/designer/newformimpl.h | 165 + kdevdesigner/designer/orderindicator.cpp | 112 + kdevdesigner/designer/orderindicator.h | 58 + kdevdesigner/designer/outputwindow.cpp | 209 + kdevdesigner/designer/outputwindow.h | 99 + kdevdesigner/designer/paletteeditor.ui | 496 +++ kdevdesigner/designer/paletteeditoradvanced.ui | 748 ++++ .../designer/paletteeditoradvancedimpl.cpp | 643 +++ kdevdesigner/designer/paletteeditoradvancedimpl.h | 97 + kdevdesigner/designer/paletteeditorimpl.cpp | 304 ++ kdevdesigner/designer/paletteeditorimpl.h | 77 + kdevdesigner/designer/pics/CMakeLists.txt | 85 + kdevdesigner/designer/pics/Makefile.am | 2 + kdevdesigner/designer/pics/designer_adjustsize.png | Bin 0 -> 495 bytes kdevdesigner/designer/pics/designer_appicon.png | Bin 0 -> 2341 bytes kdevdesigner/designer/pics/designer_arrow.png | Bin 0 -> 217 bytes kdevdesigner/designer/pics/designer_background.png | Bin 0 -> 6724 bytes kdevdesigner/designer/pics/designer_book.png | Bin 0 -> 825 bytes .../designer/pics/designer_buttongroup.png | Bin 0 -> 648 bytes kdevdesigner/designer/pics/designer_checkbox.png | Bin 0 -> 817 bytes kdevdesigner/designer/pics/designer_combobox.png | Bin 0 -> 549 bytes .../designer/pics/designer_connecttool.png | Bin 0 -> 553 bytes kdevdesigner/designer/pics/designer_cross.png | Bin 0 -> 164 bytes .../designer/pics/designer_customwidget.png | Bin 0 -> 1133 bytes .../designer/pics/designer_d_adjustsize.png | Bin 0 -> 529 bytes kdevdesigner/designer/pics/designer_d_book.png | Bin 0 -> 561 bytes .../designer/pics/designer_d_buttongroup.png | Bin 0 -> 482 bytes kdevdesigner/designer/pics/designer_d_checkbox.png | Bin 0 -> 547 bytes kdevdesigner/designer/pics/designer_d_combobox.png | Bin 0 -> 420 bytes .../designer/pics/designer_d_connecttool.png | Bin 0 -> 450 bytes .../designer/pics/designer_d_customwidget.png | Bin 0 -> 629 bytes .../designer/pics/designer_d_databrowser.png | Bin 0 -> 603 bytes .../designer/pics/designer_d_datatable.png | Bin 0 -> 592 bytes kdevdesigner/designer/pics/designer_d_dataview.png | Bin 0 -> 663 bytes kdevdesigner/designer/pics/designer_d_dateedit.png | Bin 0 -> 452 bytes .../designer/pics/designer_d_datetimeedit.png | Bin 0 -> 669 bytes kdevdesigner/designer/pics/designer_d_dial.png | Bin 0 -> 706 bytes kdevdesigner/designer/pics/designer_d_down.png | Bin 0 -> 441 bytes .../designer/pics/designer_d_editbreaklayout.png | Bin 0 -> 635 bytes kdevdesigner/designer/pics/designer_d_editcopy.png | Bin 0 -> 517 bytes kdevdesigner/designer/pics/designer_d_editcut.png | Bin 0 -> 800 bytes .../designer/pics/designer_d_editdelete.png | Bin 0 -> 684 bytes kdevdesigner/designer/pics/designer_d_editgrid.png | Bin 0 -> 425 bytes .../designer/pics/designer_d_edithlayout.png | Bin 0 -> 272 bytes .../designer/pics/designer_d_edithlayoutsplit.png | Bin 0 -> 328 bytes .../designer/pics/designer_d_editlower.png | Bin 0 -> 453 bytes .../designer/pics/designer_d_editpaste.png | Bin 0 -> 599 bytes .../designer/pics/designer_d_editraise.png | Bin 0 -> 454 bytes .../designer/pics/designer_d_editslots.png | Bin 0 -> 535 bytes .../designer/pics/designer_d_editvlayout.png | Bin 0 -> 272 bytes .../designer/pics/designer_d_editvlayoutsplit.png | Bin 0 -> 333 bytes kdevdesigner/designer/pics/designer_d_filenew.png | Bin 0 -> 298 bytes kdevdesigner/designer/pics/designer_d_fileopen.png | Bin 0 -> 407 bytes kdevdesigner/designer/pics/designer_d_filesave.png | Bin 0 -> 267 bytes kdevdesigner/designer/pics/designer_d_folder.png | Bin 0 -> 841 bytes kdevdesigner/designer/pics/designer_d_form.png | Bin 0 -> 274 bytes kdevdesigner/designer/pics/designer_d_frame.png | Bin 0 -> 427 bytes kdevdesigner/designer/pics/designer_d_groupbox.png | Bin 0 -> 465 bytes kdevdesigner/designer/pics/designer_d_help.png | Bin 0 -> 786 bytes kdevdesigner/designer/pics/designer_d_home.png | Bin 0 -> 743 bytes kdevdesigner/designer/pics/designer_d_iconview.png | Bin 0 -> 548 bytes kdevdesigner/designer/pics/designer_d_image.png | Bin 0 -> 482 bytes kdevdesigner/designer/pics/designer_d_label.png | Bin 0 -> 670 bytes kdevdesigner/designer/pics/designer_d_layout.png | Bin 0 -> 497 bytes .../designer/pics/designer_d_lcdnumber.png | Bin 0 -> 452 bytes kdevdesigner/designer/pics/designer_d_left.png | Bin 0 -> 422 bytes kdevdesigner/designer/pics/designer_d_line.png | Bin 0 -> 327 bytes kdevdesigner/designer/pics/designer_d_lineedit.png | Bin 0 -> 445 bytes kdevdesigner/designer/pics/designer_d_listbox.png | Bin 0 -> 410 bytes kdevdesigner/designer/pics/designer_d_listview.png | Bin 0 -> 640 bytes .../designer/pics/designer_d_multilineedit.png | Bin 0 -> 482 bytes kdevdesigner/designer/pics/designer_d_newform.png | Bin 0 -> 443 bytes .../designer/pics/designer_d_ordertool.png | Bin 0 -> 533 bytes kdevdesigner/designer/pics/designer_d_pixlabel.png | Bin 0 -> 619 bytes kdevdesigner/designer/pics/designer_d_pointer.png | Bin 0 -> 476 bytes kdevdesigner/designer/pics/designer_d_print.png | Bin 0 -> 593 bytes kdevdesigner/designer/pics/designer_d_progress.png | Bin 0 -> 375 bytes kdevdesigner/designer/pics/designer_d_project.png | Bin 0 -> 915 bytes .../designer/pics/designer_d_pushbutton.png | Bin 0 -> 445 bytes .../designer/pics/designer_d_radiobutton.png | Bin 0 -> 605 bytes kdevdesigner/designer/pics/designer_d_redo.png | Bin 0 -> 465 bytes .../designer/pics/designer_d_richtextedit.png | Bin 0 -> 562 bytes kdevdesigner/designer/pics/designer_d_right.png | Bin 0 -> 425 bytes .../designer/pics/designer_d_scrollbar.png | Bin 0 -> 364 bytes .../designer/pics/designer_d_searchfind.png | Bin 0 -> 501 bytes kdevdesigner/designer/pics/designer_d_setbuddy.png | Bin 0 -> 427 bytes kdevdesigner/designer/pics/designer_d_slider.png | Bin 0 -> 548 bytes kdevdesigner/designer/pics/designer_d_spacer.png | Bin 0 -> 519 bytes kdevdesigner/designer/pics/designer_d_spinbox.png | Bin 0 -> 477 bytes kdevdesigner/designer/pics/designer_d_table.png | Bin 0 -> 512 bytes .../designer/pics/designer_d_tabwidget.png | Bin 0 -> 404 bytes kdevdesigner/designer/pics/designer_d_textbold.png | Bin 0 -> 519 bytes .../designer/pics/designer_d_textbrowser.png | Bin 0 -> 534 bytes .../designer/pics/designer_d_textcenter.png | Bin 0 -> 453 bytes kdevdesigner/designer/pics/designer_d_textedit.png | Bin 0 -> 526 bytes kdevdesigner/designer/pics/designer_d_textfont.png | Bin 0 -> 412 bytes kdevdesigner/designer/pics/designer_d_texth1.png | Bin 0 -> 476 bytes kdevdesigner/designer/pics/designer_d_texth2.png | Bin 0 -> 537 bytes kdevdesigner/designer/pics/designer_d_texth3.png | Bin 0 -> 509 bytes .../designer/pics/designer_d_textitalic.png | Bin 0 -> 454 bytes .../designer/pics/designer_d_textjustify.png | Bin 0 -> 442 bytes .../designer/pics/designer_d_textlarger.png | Bin 0 -> 537 bytes kdevdesigner/designer/pics/designer_d_textleft.png | Bin 0 -> 443 bytes .../designer/pics/designer_d_textlinebreak.png | Bin 0 -> 528 bytes .../designer/pics/designer_d_textparagraph.png | Bin 0 -> 543 bytes .../designer/pics/designer_d_textright.png | Bin 0 -> 445 bytes .../designer/pics/designer_d_textsmaller.png | Bin 0 -> 513 bytes .../designer/pics/designer_d_textteletext.png | Bin 0 -> 463 bytes .../designer/pics/designer_d_textunderline.png | Bin 0 -> 498 bytes kdevdesigner/designer/pics/designer_d_textview.png | Bin 0 -> 529 bytes kdevdesigner/designer/pics/designer_d_timeedit.png | Bin 0 -> 827 bytes kdevdesigner/designer/pics/designer_d_toolbox.png | Bin 0 -> 465 bytes .../designer/pics/designer_d_toolbutton.png | Bin 0 -> 670 bytes kdevdesigner/designer/pics/designer_d_undo.png | Bin 0 -> 471 bytes kdevdesigner/designer/pics/designer_d_up.png | Bin 0 -> 444 bytes .../designer/pics/designer_d_widgetstack.png | Bin 0 -> 558 bytes .../designer/pics/designer_d_wizarddata.png | Bin 0 -> 294 bytes .../designer/pics/designer_d_wizarddialog.png | Bin 0 -> 421 bytes kdevdesigner/designer/pics/designer_d_wordwrap.png | Bin 0 -> 507 bytes .../designer/pics/designer_databrowser.png | Bin 0 -> 907 bytes kdevdesigner/designer/pics/designer_datatable.png | Bin 0 -> 923 bytes kdevdesigner/designer/pics/designer_dataview.png | Bin 0 -> 1039 bytes kdevdesigner/designer/pics/designer_dateedit.png | Bin 0 -> 505 bytes .../designer/pics/designer_datetimeedit.png | Bin 0 -> 1074 bytes kdevdesigner/designer/pics/designer_dial.png | Bin 0 -> 1024 bytes kdevdesigner/designer/pics/designer_down.png | Bin 0 -> 595 bytes .../designer/pics/designer_editbreaklayout.png | Bin 0 -> 744 bytes kdevdesigner/designer/pics/designer_editcopy.png | Bin 0 -> 485 bytes kdevdesigner/designer/pics/designer_editcut.png | Bin 0 -> 649 bytes kdevdesigner/designer/pics/designer_editdelete.png | Bin 0 -> 833 bytes kdevdesigner/designer/pics/designer_editgrid.png | Bin 0 -> 520 bytes .../designer/pics/designer_edithlayout.png | Bin 0 -> 295 bytes .../designer/pics/designer_edithlayoutsplit.png | Bin 0 -> 344 bytes kdevdesigner/designer/pics/designer_editlower.png | Bin 0 -> 609 bytes kdevdesigner/designer/pics/designer_editpaste.png | Bin 0 -> 907 bytes kdevdesigner/designer/pics/designer_editraise.png | Bin 0 -> 614 bytes kdevdesigner/designer/pics/designer_editslots.png | Bin 0 -> 690 bytes .../designer/pics/designer_editvlayout.png | Bin 0 -> 289 bytes .../designer/pics/designer_editvlayoutsplit.png | Bin 0 -> 355 bytes kdevdesigner/designer/pics/designer_filenew.png | Bin 0 -> 313 bytes kdevdesigner/designer/pics/designer_fileopen.png | Bin 0 -> 681 bytes kdevdesigner/designer/pics/designer_filesave.png | Bin 0 -> 328 bytes kdevdesigner/designer/pics/designer_folder.png | Bin 0 -> 1368 bytes kdevdesigner/designer/pics/designer_form.png | Bin 0 -> 301 bytes kdevdesigner/designer/pics/designer_frame.png | Bin 0 -> 400 bytes kdevdesigner/designer/pics/designer_groupbox.png | Bin 0 -> 439 bytes kdevdesigner/designer/pics/designer_hand.png | Bin 0 -> 198 bytes kdevdesigner/designer/pics/designer_help.png | Bin 0 -> 1561 bytes kdevdesigner/designer/pics/designer_home.png | Bin 0 -> 1083 bytes kdevdesigner/designer/pics/designer_hsplit.png | Bin 0 -> 203 bytes kdevdesigner/designer/pics/designer_ibeam.png | Bin 0 -> 162 bytes kdevdesigner/designer/pics/designer_iconview.png | Bin 0 -> 613 bytes kdevdesigner/designer/pics/designer_image.png | Bin 0 -> 769 bytes kdevdesigner/designer/pics/designer_label.png | Bin 0 -> 953 bytes kdevdesigner/designer/pics/designer_layout.png | Bin 0 -> 706 bytes kdevdesigner/designer/pics/designer_lcdnumber.png | Bin 0 -> 558 bytes kdevdesigner/designer/pics/designer_left.png | Bin 0 -> 678 bytes kdevdesigner/designer/pics/designer_line.png | Bin 0 -> 287 bytes kdevdesigner/designer/pics/designer_lineedit.png | Bin 0 -> 405 bytes kdevdesigner/designer/pics/designer_listbox.png | Bin 0 -> 386 bytes kdevdesigner/designer/pics/designer_listview.png | Bin 0 -> 759 bytes .../designer/pics/designer_multilineedit.png | Bin 0 -> 454 bytes kdevdesigner/designer/pics/designer_newform.png | Bin 0 -> 531 bytes kdevdesigner/designer/pics/designer_no.png | Bin 0 -> 230 bytes kdevdesigner/designer/pics/designer_object.png | Bin 0 -> 1065 bytes kdevdesigner/designer/pics/designer_ordertool.png | Bin 0 -> 587 bytes kdevdesigner/designer/pics/designer_pixlabel.png | Bin 0 -> 1229 bytes kdevdesigner/designer/pics/designer_pointer.png | Bin 0 -> 586 bytes kdevdesigner/designer/pics/designer_print.png | Bin 0 -> 742 bytes kdevdesigner/designer/pics/designer_progress.png | Bin 0 -> 559 bytes kdevdesigner/designer/pics/designer_project.png | Bin 0 -> 1275 bytes kdevdesigner/designer/pics/designer_pushbutton.png | Bin 0 -> 408 bytes kdevdesigner/designer/pics/designer_qtlogo.png | Bin 0 -> 12615 bytes .../designer/pics/designer_radiobutton.png | Bin 0 -> 586 bytes kdevdesigner/designer/pics/designer_redo.png | Bin 0 -> 592 bytes .../designer/pics/designer_resetproperty.png | Bin 0 -> 184 bytes .../designer/pics/designer_richtextedit.png | Bin 0 -> 834 bytes kdevdesigner/designer/pics/designer_right.png | Bin 0 -> 656 bytes kdevdesigner/designer/pics/designer_s_down.png | Bin 0 -> 574 bytes kdevdesigner/designer/pics/designer_s_editcut.png | Bin 0 -> 444 bytes kdevdesigner/designer/pics/designer_s_left.png | Bin 0 -> 564 bytes kdevdesigner/designer/pics/designer_s_right.png | Bin 0 -> 557 bytes kdevdesigner/designer/pics/designer_s_up.png | Bin 0 -> 586 bytes kdevdesigner/designer/pics/designer_scrollbar.png | Bin 0 -> 408 bytes kdevdesigner/designer/pics/designer_searchfind.png | Bin 0 -> 843 bytes kdevdesigner/designer/pics/designer_setbuddy.png | Bin 0 -> 428 bytes kdevdesigner/designer/pics/designer_sizeall.png | Bin 0 -> 208 bytes kdevdesigner/designer/pics/designer_sizeb.png | Bin 0 -> 203 bytes kdevdesigner/designer/pics/designer_sizef.png | Bin 0 -> 203 bytes kdevdesigner/designer/pics/designer_sizeh.png | Bin 0 -> 179 bytes kdevdesigner/designer/pics/designer_sizev.png | Bin 0 -> 177 bytes kdevdesigner/designer/pics/designer_slider.png | Bin 0 -> 729 bytes kdevdesigner/designer/pics/designer_spacer.png | Bin 0 -> 715 bytes kdevdesigner/designer/pics/designer_spinbox.png | Bin 0 -> 455 bytes kdevdesigner/designer/pics/designer_splash.png | Bin 0 -> 123917 bytes kdevdesigner/designer/pics/designer_table.png | Bin 0 -> 483 bytes kdevdesigner/designer/pics/designer_tabwidget.png | Bin 0 -> 572 bytes kdevdesigner/designer/pics/designer_textbold.png | Bin 0 -> 498 bytes .../designer/pics/designer_textbrowser.png | Bin 0 -> 514 bytes kdevdesigner/designer/pics/designer_textcenter.png | Bin 0 -> 429 bytes kdevdesigner/designer/pics/designer_textedit.png | Bin 0 -> 497 bytes kdevdesigner/designer/pics/designer_textfont.png | Bin 0 -> 494 bytes kdevdesigner/designer/pics/designer_texth1.png | Bin 0 -> 462 bytes kdevdesigner/designer/pics/designer_texth2.png | Bin 0 -> 512 bytes kdevdesigner/designer/pics/designer_texth3.png | Bin 0 -> 486 bytes kdevdesigner/designer/pics/designer_textitalic.png | Bin 0 -> 442 bytes .../designer/pics/designer_textjustify.png | Bin 0 -> 409 bytes kdevdesigner/designer/pics/designer_textlarger.png | Bin 0 -> 733 bytes kdevdesigner/designer/pics/designer_textleft.png | Bin 0 -> 411 bytes .../designer/pics/designer_textlinebreak.png | Bin 0 -> 509 bytes .../designer/pics/designer_textparagraph.png | Bin 0 -> 527 bytes kdevdesigner/designer/pics/designer_textright.png | Bin 0 -> 410 bytes .../designer/pics/designer_textsmaller.png | Bin 0 -> 677 bytes .../designer/pics/designer_textteletext.png | Bin 0 -> 445 bytes .../designer/pics/designer_textunderline.png | Bin 0 -> 471 bytes kdevdesigner/designer/pics/designer_textview.png | Bin 0 -> 498 bytes kdevdesigner/designer/pics/designer_timeedit.png | Bin 0 -> 1520 bytes kdevdesigner/designer/pics/designer_toolbox.png | Bin 0 -> 783 bytes kdevdesigner/designer/pics/designer_toolbutton.png | Bin 0 -> 1262 bytes kdevdesigner/designer/pics/designer_undo.png | Bin 0 -> 572 bytes kdevdesigner/designer/pics/designer_up.png | Bin 0 -> 692 bytes kdevdesigner/designer/pics/designer_uparrow.png | Bin 0 -> 169 bytes kdevdesigner/designer/pics/designer_vsplit.png | Bin 0 -> 192 bytes kdevdesigner/designer/pics/designer_wait.png | Bin 0 -> 216 bytes .../designer/pics/designer_widgetstack.png | Bin 0 -> 831 bytes kdevdesigner/designer/pics/designer_wizarddata.png | Bin 0 -> 323 bytes .../designer/pics/designer_wizarddialog.png | Bin 0 -> 632 bytes kdevdesigner/designer/pics/designer_wordwrap.png | Bin 0 -> 643 bytes kdevdesigner/designer/pixmapchooser.cpp | 231 ++ kdevdesigner/designer/pixmapchooser.h | 74 + kdevdesigner/designer/pixmapcollection.cpp | 180 + kdevdesigner/designer/pixmapcollection.h | 80 + kdevdesigner/designer/pixmapcollectioneditor.ui | 218 + kdevdesigner/designer/pixmapcollectioneditor.ui.h | 150 + kdevdesigner/designer/pixmapfunction.ui | 976 +++++ kdevdesigner/designer/popupmenueditor.cpp | 1469 +++++++ kdevdesigner/designer/popupmenueditor.h | 237 ++ kdevdesigner/designer/preferences.ui | 648 +++ kdevdesigner/designer/previewframe.cpp | 57 + kdevdesigner/designer/previewframe.h | 61 + kdevdesigner/designer/previewwidget.ui | 304 ++ kdevdesigner/designer/previewwidgetimpl.cpp | 65 + kdevdesigner/designer/previewwidgetimpl.h | 44 + kdevdesigner/designer/project.cpp | 1558 +++++++ kdevdesigner/designer/project.h | 274 ++ kdevdesigner/designer/projectsettings.ui | 301 ++ kdevdesigner/designer/projectsettingsimpl.cpp | 126 + kdevdesigner/designer/projectsettingsimpl.h | 57 + kdevdesigner/designer/propertyeditor.cpp | 4332 ++++++++++++++++++++ kdevdesigner/designer/propertyeditor.h | 891 ++++ kdevdesigner/designer/propertyobject.cpp | 158 + kdevdesigner/designer/propertyobject.h | 43 + kdevdesigner/designer/qcompletionedit.cpp | 210 + kdevdesigner/designer/qcompletionedit.h | 80 + kdevdesigner/designer/replacedialog.ui | 318 ++ kdevdesigner/designer/replacedialog.ui.h | 75 + kdevdesigner/designer/resource.cpp | 3328 +++++++++++++++ kdevdesigner/designer/resource.h | 165 + kdevdesigner/designer/richtextfontdialog.ui | 347 ++ kdevdesigner/designer/richtextfontdialog.ui.h | 49 + kdevdesigner/designer/sizehandle.cpp | 388 ++ kdevdesigner/designer/sizehandle.h | 98 + kdevdesigner/designer/sourceeditor.cpp | 320 ++ kdevdesigner/designer/sourceeditor.h | 107 + kdevdesigner/designer/sourcefile.cpp | 298 ++ kdevdesigner/designer/sourcefile.h | 87 + kdevdesigner/designer/startdialog.ui | 324 ++ kdevdesigner/designer/startdialogimpl.cpp | 182 + kdevdesigner/designer/startdialogimpl.h | 82 + kdevdesigner/designer/styledbutton.cpp | 295 ++ kdevdesigner/designer/styledbutton.h | 104 + kdevdesigner/designer/syntaxhighlighter_html.cpp | 160 + kdevdesigner/designer/syntaxhighlighter_html.h | 57 + kdevdesigner/designer/tableeditor.ui | 828 ++++ kdevdesigner/designer/tableeditorimpl.cpp | 494 +++ kdevdesigner/designer/tableeditorimpl.h | 83 + kdevdesigner/designer/timestamp.cpp | 86 + kdevdesigner/designer/timestamp.h | 64 + kdevdesigner/designer/variabledialog.ui | 294 ++ kdevdesigner/designer/variabledialogimpl.cpp | 180 + kdevdesigner/designer/variabledialogimpl.h | 57 + kdevdesigner/designer/widgetaction.cpp | 58 + kdevdesigner/designer/widgetaction.h | 66 + kdevdesigner/designer/widgetfactory.cpp | 1805 ++++++++ kdevdesigner/designer/widgetfactory.h | 515 +++ kdevdesigner/designer/wizardeditor.ui | 342 ++ kdevdesigner/designer/wizardeditorimpl.cpp | 253 ++ kdevdesigner/designer/wizardeditorimpl.h | 75 + kdevdesigner/designer/workspace.cpp | 711 ++++ kdevdesigner/designer/workspace.h | 152 + kdevdesigner/interfaces/actioninterface.h | 78 + kdevdesigner/interfaces/classbrowserinterface.h | 63 + kdevdesigner/interfaces/designerinterface.h | 261 ++ kdevdesigner/interfaces/editorinterface.h | 102 + kdevdesigner/interfaces/filterinterface.h | 68 + kdevdesigner/interfaces/interpreterinterface.h | 59 + kdevdesigner/interfaces/languageinterface.h | 131 + kdevdesigner/interfaces/preferenceinterface.h | 68 + kdevdesigner/interfaces/projectsettingsiface.h | 69 + kdevdesigner/interfaces/sourcetemplateiface.h | 65 + kdevdesigner/interfaces/templatewizardiface.h | 60 + kdevdesigner/interfaces/widgetinterface.h | 35 + kdevdesigner/plugins/Makefile.am | 8 + kdevdesigner/plugins/languageinterfaceimpl.cpp | 237 ++ kdevdesigner/plugins/languageinterfaceimpl.h | 83 + kdevdesigner/shared/CMakeLists.txt | 26 + kdevdesigner/shared/Makefile.am | 6 + kdevdesigner/shared/domtool.cpp | 453 ++ kdevdesigner/shared/domtool.h | 53 + kdevdesigner/shared/globaldefs.h | 62 + kdevdesigner/shared/parser.cpp | 72 + kdevdesigner/shared/parser.h | 39 + kdevdesigner/shared/ui2uib.cpp | 893 ++++ kdevdesigner/shared/ui2uib.h | 35 + kdevdesigner/shared/uib.cpp | 42 + kdevdesigner/shared/uib.h | 152 + kdevdesigner/shared/widgetdatabase.cpp | 960 +++++ kdevdesigner/shared/widgetdatabase.h | 96 + kdevdesigner/src/CMakeLists.txt | 36 + kdevdesigner/src/Makefile.am | 47 + kdevdesigner/src/kdevdesigner.cpp | 216 + kdevdesigner/src/kdevdesigner.desktop | 96 + kdevdesigner/src/kdevdesigner.h | 97 + kdevdesigner/src/kdevdesigner_shell.rc | 37 + kdevdesigner/src/main.cpp | 94 + kdevdesigner/uilib/CMakeLists.txt | 27 + kdevdesigner/uilib/Makefile.am | 9 + kdevdesigner/uilib/database.cpp | 122 + kdevdesigner/uilib/database2.h | 90 + kdevdesigner/uilib/qwidgetfactory.cpp | 2606 ++++++++++++ kdevdesigner/uilib/qwidgetfactory.h | 178 + kdevprj2tdevelop | 299 ++ languages/ada/CMakeLists.txt | 8 +- languages/ada/Makefile.am | 14 +- languages/ada/adasupportpart.cpp | 24 +- languages/ada/adasupportpart.h | 4 +- .../ada/app_templates/adahello/CMakeLists.txt | 6 +- languages/ada/app_templates/adahello/Makefile.am | 4 +- .../app_templates/adahello/adahello.kdevtemplate | 132 + .../app_templates/adahello/adahello.tdevtemplate | 132 - languages/ada/app_templates/adahello/app.tdevelop | 14 +- languages/ada/doc/CMakeLists.txt | 2 +- languages/ada/doc/Makefile.am | 2 +- languages/ada/file_templates/CMakeLists.txt | 2 +- languages/ada/file_templates/Makefile.am | 2 +- languages/ada/kdevadasupport.desktop | 87 + languages/ada/kdevadasupport.rc | 11 + languages/ada/problemreporter.cpp | 4 +- languages/ada/tdevadasupport.desktop | 87 - languages/ada/tdevadasupport.rc | 11 - languages/bash/CMakeLists.txt | 8 +- languages/bash/Makefile.am | 14 +- .../bash/app_templates/bashhello/CMakeLists.txt | 6 +- languages/bash/app_templates/bashhello/Makefile.am | 4 +- .../bash/app_templates/bashhello/app.tdevelop | 18 +- .../app_templates/bashhello/bashhello.kdevtemplate | 111 + .../app_templates/bashhello/bashhello.tdevtemplate | 111 - languages/bash/bashsupport_part.cpp | 30 +- languages/bash/bashsupport_part.h | 10 +- languages/bash/doc/CMakeLists.txt | 2 +- languages/bash/doc/Makefile.am | 2 +- languages/bash/kdevbashsupport.desktop | 85 + languages/bash/kdevbashsupport.rc | 11 + languages/bash/tdevbashsupport.desktop | 85 - languages/bash/tdevbashsupport.rc | 11 - languages/cpp/CMakeLists.txt | 20 +- languages/cpp/KDevCppSupportIface.cpp | 24 + languages/cpp/KDevCppSupportIface.h | 28 + languages/cpp/Makefile.am | 28 +- languages/cpp/README.dox | 2 +- languages/cpp/TDevCppSupportIface.cpp | 24 - languages/cpp/TDevCppSupportIface.h | 28 - languages/cpp/addattributedialog.cpp | 2 +- languages/cpp/addmethoddialog.cpp | 6 +- languages/cpp/app_templates/CMakeLists.txt | 14 +- languages/cpp/app_templates/Makefile.am | 6 +- .../cpp/app_templates/automakeempty/CMakeLists.txt | 6 +- .../cpp/app_templates/automakeempty/Makefile.am | 4 +- .../cpp/app_templates/automakeempty/app.tdevelop | 20 +- .../automakeempty/automakeempty.kdevtemplate | 99 + .../automakeempty/automakeempty.tdevtemplate | 99 - languages/cpp/app_templates/chello/CMakeLists.txt | 6 +- languages/cpp/app_templates/chello/Makefile.am | 4 +- languages/cpp/app_templates/chello/app.tdevelop | 20 +- .../cpp/app_templates/chello/chello.kdevtemplate | 253 ++ .../cpp/app_templates/chello/chello.tdevtemplate | 253 -- .../cpp/app_templates/chello_gba/CMakeLists.txt | 6 +- languages/cpp/app_templates/chello_gba/Makefile.am | 4 +- .../cpp/app_templates/chello_gba/app.tdevelop | 22 +- .../chello_gba/chellogba.kdevtemplate | 173 + .../chello_gba/chellogba.tdevtemplate | 173 - languages/cpp/app_templates/clanlib/CMakeLists.txt | 6 +- languages/cpp/app_templates/clanlib/Makefile.am | 4 +- languages/cpp/app_templates/clanlib/app.tdevelop | 16 +- .../cpp/app_templates/clanlib/clanlib.kdevtemplate | 138 + .../cpp/app_templates/clanlib/clanlib.tdevtemplate | 138 - .../cpp/app_templates/cmakelibc/CMakeLists.txt | 6 +- languages/cpp/app_templates/cmakelibc/Makefile.am | 4 +- .../app_templates/cmakelibc/cmakelibc.kdevtemplate | 139 + .../app_templates/cmakelibc/cmakelibc.tdevtemplate | 139 - .../cpp/app_templates/cmakelibcpp/CMakeLists.txt | 6 +- .../cpp/app_templates/cmakelibcpp/Makefile.am | 4 +- .../cmakelibcpp/cmakelibcpp.kdevtemplate | 139 + .../cmakelibcpp/cmakelibcpp.tdevtemplate | 139 - .../cpp/app_templates/cmakeqt3app/CMakeLists.txt | 6 +- .../cpp/app_templates/cmakeqt3app/Makefile.am | 4 +- .../cmakeqt3app/cmakeqt3app.kdevtemplate | 126 + .../cmakeqt3app/cmakeqt3app.tdevtemplate | 126 - .../cpp/app_templates/cmakesimple/CMakeLists.txt | 6 +- .../cpp/app_templates/cmakesimple/Makefile.am | 4 +- .../cmakesimple/cmakesimple.kdevtemplate | 112 + .../cmakesimple/cmakesimple.tdevtemplate | 112 - .../cpp/app_templates/cmakesimplec/CMakeLists.txt | 6 +- .../cpp/app_templates/cmakesimplec/Makefile.am | 4 +- .../cmakesimplec/cmakesimplec.kdevtemplate | 115 + .../cmakesimplec/cmakesimplec.tdevtemplate | 115 - .../app_templates/cppcurseshello/CMakeLists.txt | 6 +- .../cpp/app_templates/cppcurseshello/Makefile.am | 4 +- .../cpp/app_templates/cppcurseshello/app.tdevelop | 20 +- .../cppcurseshello/cppcurseshello.kdevtemplate | 143 + .../cppcurseshello/cppcurseshello.tdevtemplate | 143 - .../cpp/app_templates/cpphello/CMakeLists.txt | 6 +- languages/cpp/app_templates/cpphello/Makefile.am | 4 +- languages/cpp/app_templates/cpphello/app.tdevelop | 20 +- .../app_templates/cpphello/cpphello.kdevtemplate | 145 + .../app_templates/cpphello/cpphello.tdevtemplate | 145 - .../cpp/app_templates/cppsdlhello/CMakeLists.txt | 6 +- .../cpp/app_templates/cppsdlhello/Makefile.am | 4 +- .../cpp/app_templates/cppsdlhello/app.tdevelop | 16 +- .../cppsdlhello/cppsdlhello.kdevtemplate | 150 + .../cppsdlhello/cppsdlhello.tdevtemplate | 150 - .../cpp/app_templates/dcopservice/CMakeLists.txt | 6 +- .../cpp/app_templates/dcopservice/Makefile.am | 4 +- .../dcopservice/dcopservice.kdevtemplate | 202 + .../app_templates/dcopservice/dcopservice.tdevelop | 30 +- .../dcopservice/dcopservice.tdevtemplate | 202 - .../cpp/app_templates/generichello/Makefile.am | 4 +- languages/cpp/app_templates/generichello/app.prj | 4 +- .../cpp/app_templates/generichello/app.tdevelop | 18 +- .../generichello/generichello.kdevtemplate | 92 + .../generichello/generichello.tdevtemplate | 92 - .../cpp/app_templates/gnome2mmapp/Makefile.am | 4 +- .../cpp/app_templates/gnome2mmapp/app.tdevelop | 20 +- .../gnome2mmapp/gnome2mmapp.kdevtemplate | 186 + .../gnome2mmapp/gnome2mmapp.tdevtemplate | 186 - .../cpp/app_templates/gtk2mmapp/CMakeLists.txt | 6 +- languages/cpp/app_templates/gtk2mmapp/Makefile.am | 4 +- languages/cpp/app_templates/gtk2mmapp/app.tdevelop | 24 +- .../app_templates/gtk2mmapp/gtk2mmapp.kdevtemplate | 174 + .../app_templates/gtk2mmapp/gtk2mmapp.tdevtemplate | 174 - languages/cpp/app_templates/kapp/CMakeLists.txt | 27 + languages/cpp/app_templates/kapp/Makefile.am | 19 + languages/cpp/app_templates/kapp/README | 81 + languages/cpp/app_templates/kapp/app.cpp | 247 ++ languages/cpp/app_templates/kapp/app.desktop | 44 + languages/cpp/app_templates/kapp/app.h | 90 + languages/cpp/app_templates/kapp/app.kdevses | 13 + languages/cpp/app_templates/kapp/app.tdevelop | 168 + languages/cpp/app_templates/kapp/app_client.cpp | 26 + languages/cpp/app_templates/kapp/appiface.h | 17 + languages/cpp/app_templates/kapp/appui.rc | 8 + languages/cpp/app_templates/kapp/appview.cpp | 107 + languages/cpp/app_templates/kapp/appview.h | 78 + languages/cpp/app_templates/kapp/kapp.kdevtemplate | 253 ++ languages/cpp/app_templates/kapp/kapp.png | Bin 0 -> 6320 bytes languages/cpp/app_templates/kapp/main.cpp | 61 + languages/cpp/app_templates/kapp/pref.cpp | 42 + languages/cpp/app_templates/kapp/pref.h | 40 + languages/cpp/app_templates/kapp/src-Makefile.am | 43 + languages/cpp/app_templates/kapp/subdirs | 3 + .../cpp/app_templates/kateplugin/CMakeLists.txt | 6 +- languages/cpp/app_templates/kateplugin/Makefile.am | 4 +- .../kateplugin/kateplugin.kdevtemplate | 213 + .../kateplugin/kateplugin.tdevtemplate | 213 - .../cpp/app_templates/kateplugin/plugin.tdevelop | 30 +- .../cpp/app_templates/kateplugin2/CMakeLists.txt | 6 +- .../cpp/app_templates/kateplugin2/Makefile.am | 4 +- .../kateplugin2/kateplugin2.kdevtemplate | 214 + .../kateplugin2/kateplugin2.tdevtemplate | 214 - .../cpp/app_templates/kateplugin2/plugin.tdevelop | 30 +- languages/cpp/app_templates/kde4app/CMakeLists.txt | 29 + languages/cpp/app_templates/kde4app/Makefile.am | 19 + languages/cpp/app_templates/kde4app/README | 15 + languages/cpp/app_templates/kde4app/kapp4.cpp | 90 + languages/cpp/app_templates/kde4app/kapp4.desktop | 30 + languages/cpp/app_templates/kde4app/kapp4.h | 54 + languages/cpp/app_templates/kde4app/kapp4.kcfg | 21 + languages/cpp/app_templates/kde4app/kapp4view.cpp | 42 + languages/cpp/app_templates/kde4app/kapp4view.h | 56 + .../cpp/app_templates/kde4app/kapp4view_base.ui | 213 + .../app_templates/kde4app/kde4app-CMakeLists.txt | 31 + .../cpp/app_templates/kde4app/kde4app.kdevtemplate | 155 + languages/cpp/app_templates/kde4app/kde4app.png | Bin 0 -> 6320 bytes .../cpp/app_templates/kde4app/kde4app.tdevelop | 205 + .../kde4app/kde4app.tdevelop.filelist | 13 + languages/cpp/app_templates/kde4app/kde4appui.rc | 8 + languages/cpp/app_templates/kde4app/main.cpp | 55 + languages/cpp/app_templates/kde4app/prefs_base.ui | 155 + languages/cpp/app_templates/kde4app/settings.kcfgc | 6 + languages/cpp/app_templates/kdecpp.appwizard | 2 + languages/cpp/app_templates/kdedcop/CMakeLists.txt | 27 + languages/cpp/app_templates/kdedcop/Makefile.am | 18 + languages/cpp/app_templates/kdedcop/app.cpp | 21 + languages/cpp/app_templates/kdedcop/app.h | 37 + languages/cpp/app_templates/kdedcop/app.tdevelop | 116 + languages/cpp/app_templates/kdedcop/app_iface.h | 19 + .../cpp/app_templates/kdedcop/kdedcop.kdevtemplate | 227 + languages/cpp/app_templates/kdedcop/kdedcop.png | Bin 0 -> 2127 bytes languages/cpp/app_templates/kdedcop/main.cpp | 52 + languages/cpp/app_templates/kdedcop/mainclass.cpp | 31 + languages/cpp/app_templates/kdedcop/mainclass.h | 32 + .../cpp/app_templates/kdedcop/src-Makefile.am | 23 + languages/cpp/app_templates/kdedcop/subdirs | 3 + .../cpp/app_templates/kdevlang/CMakeLists.txt | 27 + languages/cpp/app_templates/kdevlang/Makefile.am | 17 + languages/cpp/app_templates/kdevlang/README.dox | 55 + languages/cpp/app_templates/kdevlang/app.tdevelop | 115 + .../kdevlang/kdevlang-configure.in.in | 10 + .../cpp/app_templates/kdevlang/kdevlang.desktop | 14 + .../app_templates/kdevlang/kdevlang.kdevtemplate | 157 + languages/cpp/app_templates/kdevlang/kdevlang.png | Bin 0 -> 483 bytes languages/cpp/app_templates/kdevlang/kdevlang.rc | 11 + .../cpp/app_templates/kdevlang/kdevlang_part.cpp | 154 + .../cpp/app_templates/kdevlang/kdevlang_part.h | 44 + .../cpp/app_templates/kdevlang/src-Makefile.am | 14 + .../cpp/app_templates/kdevpart/CMakeLists.txt | 29 + languages/cpp/app_templates/kdevpart/Makefile.am | 19 + languages/cpp/app_templates/kdevpart/README.dox | 55 + languages/cpp/app_templates/kdevpart/app.tdevelop | 116 + .../cpp/app_templates/kdevpart/globalconfig.cpp | 15 + .../cpp/app_templates/kdevpart/globalconfig.h | 23 + .../cpp/app_templates/kdevpart/globalconfigbase.ui | 20 + .../cpp/app_templates/kdevpart/kdevpart.desktop | 83 + .../app_templates/kdevpart/kdevpart.kdevtemplate | 242 ++ languages/cpp/app_templates/kdevpart/kdevpart.png | Bin 0 -> 483 bytes .../cpp/app_templates/kdevpart/kdevpart_part.cpp | 183 + .../cpp/app_templates/kdevpart/kdevpart_part.h | 46 + .../cpp/app_templates/kdevpart/kdevpart_part.rc | 11 + .../cpp/app_templates/kdevpart/kdevpart_widget.cpp | 21 + .../cpp/app_templates/kdevpart/kdevpart_widget.h | 24 + .../cpp/app_templates/kdevpart/projectconfig.cpp | 15 + .../cpp/app_templates/kdevpart/projectconfig.h | 23 + .../app_templates/kdevpart/projectconfigbase.ui | 20 + .../cpp/app_templates/kdevpart/src-Makefile.am | 20 + .../cpp/app_templates/kdevpart2/CMakeLists.txt | 30 + languages/cpp/app_templates/kdevpart2/Makefile.am | 21 + languages/cpp/app_templates/kdevpart2/README.dox | 55 + languages/cpp/app_templates/kdevpart2/app.tdevelop | 148 + .../cpp/app_templates/kdevpart2/globalconfig.cpp | 15 + .../cpp/app_templates/kdevpart2/globalconfig.h | 23 + .../app_templates/kdevpart2/globalconfigbase.ui | 20 + .../kdevpart2/kdevpart-configure.in.in | 10 + .../cpp/app_templates/kdevpart2/kdevpart.desktop | 83 + .../app_templates/kdevpart2/kdevpart2.kdevtemplate | 276 ++ .../cpp/app_templates/kdevpart2/kdevpart2.png | Bin 0 -> 483 bytes .../cpp/app_templates/kdevpart2/kdevpart_part.cpp | 183 + .../cpp/app_templates/kdevpart2/kdevpart_part.h | 46 + .../cpp/app_templates/kdevpart2/kdevpart_part.rc | 11 + .../app_templates/kdevpart2/kdevpart_widget.cpp | 21 + .../cpp/app_templates/kdevpart2/kdevpart_widget.h | 24 + .../cpp/app_templates/kdevpart2/projectconfig.cpp | 15 + .../cpp/app_templates/kdevpart2/projectconfig.h | 23 + .../app_templates/kdevpart2/projectconfigbase.ui | 20 + .../cpp/app_templates/kdevpart2/src-Makefile.am | 17 + languages/cpp/app_templates/kdevpart2/subdirs | 3 + languages/cpp/app_templates/khello/CMakeLists.txt | 6 +- languages/cpp/app_templates/khello/Makefile.am | 4 +- languages/cpp/app_templates/khello/app.tdevelop | 30 +- .../cpp/app_templates/khello/khello.kdevtemplate | 220 + .../cpp/app_templates/khello/khello.tdevtemplate | 220 - languages/cpp/app_templates/khello2/CMakeLists.txt | 6 +- languages/cpp/app_templates/khello2/Makefile.am | 4 +- languages/cpp/app_templates/khello2/app.tdevelop | 30 +- .../cpp/app_templates/khello2/khello2.kdevtemplate | 230 ++ .../cpp/app_templates/khello2/khello2.tdevtemplate | 230 -- languages/cpp/app_templates/kicker/CMakeLists.txt | 6 +- languages/cpp/app_templates/kicker/Makefile.am | 4 +- languages/cpp/app_templates/kicker/applet.tdevelop | 30 +- .../cpp/app_templates/kicker/kicker.kdevtemplate | 193 + .../cpp/app_templates/kicker/kicker.tdevtemplate | 193 - languages/cpp/app_templates/kmake/Makefile.am | 4 +- languages/cpp/app_templates/kmake/app.tdevelop | 30 +- .../cpp/app_templates/kmake/kmake.kdevtemplate | 148 + .../cpp/app_templates/kmake/kmake.tdevtemplate | 148 - languages/cpp/app_templates/kmod/CMakeLists.txt | 6 +- languages/cpp/app_templates/kmod/Makefile.am | 4 +- languages/cpp/app_templates/kmod/kmod.kdevtemplate | 89 + languages/cpp/app_templates/kmod/kmod.tdevelop | 20 +- languages/cpp/app_templates/kmod/kmod.tdevtemplate | 89 - .../cpp/app_templates/kofficepart/CMakeLists.txt | 6 +- .../cpp/app_templates/kofficepart/Makefile.am | 4 +- .../app_templates/kofficepart/kopart.kdevtemplate | 231 ++ .../cpp/app_templates/kofficepart/kopart.tdevelop | 30 +- .../app_templates/kofficepart/kopart.tdevtemplate | 231 -- .../cpp/app_templates/konqnavpanel/CMakeLists.txt | 6 +- .../cpp/app_templates/konqnavpanel/Makefile.am | 4 +- .../konqnavpanel/konqnavpanel.kdevtemplate | 192 + .../konqnavpanel/konqnavpanel.tdevelop | 30 +- .../konqnavpanel/konqnavpanel.tdevtemplate | 192 - .../cpp/app_templates/kpartapp/CMakeLists.txt | 6 +- languages/cpp/app_templates/kpartapp/Makefile.am | 4 +- languages/cpp/app_templates/kpartapp/app.tdevelop | 30 +- .../app_templates/kpartapp/kpartapp.kdevtemplate | 237 ++ .../app_templates/kpartapp/kpartapp.tdevtemplate | 237 -- .../cpp/app_templates/kpartplugin/CMakeLists.txt | 6 +- .../cpp/app_templates/kpartplugin/Makefile.am | 4 +- .../kpartplugin/kpartplugin.kdevtemplate | 204 + .../kpartplugin/kpartplugin.tdevtemplate | 204 - .../cpp/app_templates/kpartplugin/plugin.tdevelop | 30 +- .../cpp/app_templates/kscons_kxt/CMakeLists.txt | 6 +- languages/cpp/app_templates/kscons_kxt/Makefile.am | 4 +- .../cpp/app_templates/kscons_kxt/app.tdevelop | 38 +- .../kscons_kxt/kscons_kxt.kdevtemplate | 253 ++ .../kscons_kxt/kscons_kxt.tdevtemplate | 253 -- .../cpp/app_templates/kscons_tdemdi/CMakeLists.txt | 6 +- .../cpp/app_templates/kscons_tdemdi/Makefile.am | 4 +- .../cpp/app_templates/kscons_tdemdi/app.tdevelop | 38 +- .../kscons_tdemdi/kscons_tdemdi.kdevtemplate | 271 ++ .../kscons_tdemdi/kscons_tdemdi.tdevtemplate | 271 -- languages/cpp/app_templates/kxt/CMakeLists.txt | 6 +- languages/cpp/app_templates/kxt/Makefile.am | 4 +- languages/cpp/app_templates/kxt/app.tdevelop | 38 +- languages/cpp/app_templates/kxt/kxt.kdevtemplate | 269 ++ languages/cpp/app_templates/kxt/kxt.tdevtemplate | 269 -- .../cpp/app_templates/makefileempty/CMakeLists.txt | 6 +- .../cpp/app_templates/makefileempty/Makefile.am | 4 +- .../cpp/app_templates/makefileempty/app.tdevelop | 22 +- .../makefileempty/makefileempty.kdevtemplate | 85 + .../makefileempty/makefileempty.tdevtemplate | 85 - .../cpp/app_templates/noatunui/CMakeLists.txt | 6 +- languages/cpp/app_templates/noatunui/Makefile.am | 4 +- .../app_templates/noatunui/noatunui.kdevtemplate | 195 + .../app_templates/noatunui/noatunui.tdevtemplate | 195 - .../cpp/app_templates/noatunui/plugin.tdevelop | 30 +- .../cpp/app_templates/noatunvisual/CMakeLists.txt | 6 +- .../cpp/app_templates/noatunvisual/Makefile.am | 4 +- .../noatunvisual/noatunvisual.kdevtemplate | 205 + .../noatunvisual/noatunvisual.tdevtemplate | 205 - .../cpp/app_templates/noatunvisual/plugin.tdevelop | 30 +- languages/cpp/app_templates/opieapp/CMakeLists.txt | 6 +- languages/cpp/app_templates/opieapp/Makefile.am | 4 +- languages/cpp/app_templates/opieapp/app.tdevelop | 32 +- .../cpp/app_templates/opieapp/opieapp.kdevtemplate | 149 + .../cpp/app_templates/opieapp/opieapp.tdevtemplate | 149 - .../cpp/app_templates/opieapplet/CMakeLists.txt | 6 +- languages/cpp/app_templates/opieapplet/Makefile.am | 4 +- .../cpp/app_templates/opieapplet/app.tdevelop | 32 +- .../opieapplet/opieapplet.kdevtemplate | 135 + .../opieapplet/opieapplet.tdevtemplate | 135 - .../cpp/app_templates/opieinput/CMakeLists.txt | 6 +- languages/cpp/app_templates/opieinput/Makefile.am | 4 +- languages/cpp/app_templates/opieinput/app.tdevelop | 32 +- .../app_templates/opieinput/opieinput.kdevtemplate | 129 + .../app_templates/opieinput/opieinput.tdevtemplate | 129 - .../cpp/app_templates/opiemenu/CMakeLists.txt | 6 +- languages/cpp/app_templates/opiemenu/Makefile.am | 4 +- languages/cpp/app_templates/opiemenu/app.tdevelop | 32 +- .../app_templates/opiemenu/opiemenu.kdevtemplate | 132 + .../app_templates/opiemenu/opiemenu.tdevtemplate | 132 - languages/cpp/app_templates/opienet/CMakeLists.txt | 6 +- languages/cpp/app_templates/opienet/Makefile.am | 4 +- languages/cpp/app_templates/opienet/app.tdevelop | 32 +- .../cpp/app_templates/opienet/opienet.kdevtemplate | 142 + .../cpp/app_templates/opienet/opienet.tdevtemplate | 142 - .../cpp/app_templates/opietoday/CMakeLists.txt | 6 +- languages/cpp/app_templates/opietoday/Makefile.am | 4 +- languages/cpp/app_templates/opietoday/app.tdevelop | 32 +- .../app_templates/opietoday/opietoday.kdevtemplate | 151 + .../app_templates/opietoday/opietoday.tdevtemplate | 151 - languages/cpp/app_templates/prc-tool/Makefile.am | 4 +- .../app_templates/prc-tool/prc-tool.kdevtemplate | 136 + .../cpp/app_templates/prc-tool/prc-tool.tdevelop | 16 +- .../app_templates/prc-tool/prc-tool.tdevtemplate | 136 - .../cpp/app_templates/qmakeapp/CMakeLists.txt | 6 +- languages/cpp/app_templates/qmakeapp/Makefile.am | 4 +- .../app_templates/qmakeapp/qmakeapp.kdevtemplate | 182 + .../cpp/app_templates/qmakeapp/qmakeapp.tdevelop | 30 +- .../app_templates/qmakeapp/qmakeapp.tdevtemplate | 182 - .../cpp/app_templates/qmakeempty/CMakeLists.txt | 6 +- languages/cpp/app_templates/qmakeempty/Makefile.am | 4 +- .../qmakeempty/qmakeempty.kdevtemplate | 131 + .../app_templates/qmakeempty/qmakeempty.tdevelop | 28 +- .../qmakeempty/qmakeempty.tdevtemplate | 131 - .../cpp/app_templates/qmakesimple/CMakeLists.txt | 6 +- .../cpp/app_templates/qmakesimple/Makefile.am | 4 +- .../cpp/app_templates/qmakesimple/app.tdevelop | 30 +- .../qmakesimple/qmakesimple.kdevtemplate | 158 + .../qmakesimple/qmakesimple.tdevtemplate | 158 - .../cpp/app_templates/qt4hello/CMakeLists.txt | 6 +- languages/cpp/app_templates/qt4hello/Makefile.am | 4 +- .../app_templates/qt4hello/qt4hello.kdevtemplate | 160 + .../cpp/app_templates/qt4hello/qt4hello.tdevelop | 28 +- .../app_templates/qt4hello/qt4hello.tdevtemplate | 160 - .../cpp/app_templates/qt4makeapp/CMakeLists.txt | 6 +- languages/cpp/app_templates/qt4makeapp/Makefile.am | 4 +- .../qt4makeapp/qt4makeapp.kdevtemplate | 207 + .../app_templates/qt4makeapp/qt4makeapp.tdevelop | 28 +- .../qt4makeapp/qt4makeapp.tdevtemplate | 207 - .../cpp/app_templates/qtopia4app/CMakeLists.txt | 6 +- languages/cpp/app_templates/qtopia4app/Makefile.am | 4 +- .../cpp/app_templates/qtopia4app/app.tdevelop | 36 +- .../qtopia4app/qtopia4app.kdevtemplate | 193 + .../qtopia4app/qtopia4app.tdevtemplate | 193 - .../cpp/app_templates/qtopiaapp/CMakeLists.txt | 6 +- languages/cpp/app_templates/qtopiaapp/Makefile.am | 4 +- languages/cpp/app_templates/qtopiaapp/app.tdevelop | 32 +- .../app_templates/qtopiaapp/qtopiaapp.kdevtemplate | 153 + .../app_templates/qtopiaapp/qtopiaapp.tdevtemplate | 153 - languages/cpp/app_templates/tde4app/CMakeLists.txt | 29 - languages/cpp/app_templates/tde4app/Makefile.am | 19 - languages/cpp/app_templates/tde4app/README | 15 - languages/cpp/app_templates/tde4app/main.cpp | 55 - languages/cpp/app_templates/tde4app/prefs_base.ui | 155 - languages/cpp/app_templates/tde4app/settings.kcfgc | 6 - .../app_templates/tde4app/tde4app-CMakeLists.txt | 31 - languages/cpp/app_templates/tde4app/tde4app.png | Bin 6320 -> 0 bytes .../cpp/app_templates/tde4app/tde4app.tdevelop | 205 - .../tde4app/tde4app.tdevelop.filelist | 13 - .../cpp/app_templates/tde4app/tde4app.tdevtemplate | 155 - languages/cpp/app_templates/tde4app/tde4appui.rc | 8 - languages/cpp/app_templates/tde4app/tdeapp4.cpp | 90 - .../cpp/app_templates/tde4app/tdeapp4.desktop | 30 - languages/cpp/app_templates/tde4app/tdeapp4.h | 54 - languages/cpp/app_templates/tde4app/tdeapp4.kcfg | 21 - .../cpp/app_templates/tde4app/tdeapp4view.cpp | 42 - languages/cpp/app_templates/tde4app/tdeapp4view.h | 56 - .../cpp/app_templates/tde4app/tdeapp4view_base.ui | 213 - languages/cpp/app_templates/tdeapp/CMakeLists.txt | 27 - languages/cpp/app_templates/tdeapp/Makefile.am | 19 - languages/cpp/app_templates/tdeapp/README | 81 - languages/cpp/app_templates/tdeapp/app.cpp | 247 -- languages/cpp/app_templates/tdeapp/app.desktop | 44 - languages/cpp/app_templates/tdeapp/app.h | 90 - languages/cpp/app_templates/tdeapp/app.tdevelop | 168 - languages/cpp/app_templates/tdeapp/app.tdevses | 13 - languages/cpp/app_templates/tdeapp/app_client.cpp | 26 - languages/cpp/app_templates/tdeapp/appiface.h | 17 - languages/cpp/app_templates/tdeapp/appui.rc | 8 - languages/cpp/app_templates/tdeapp/appview.cpp | 107 - languages/cpp/app_templates/tdeapp/appview.h | 78 - languages/cpp/app_templates/tdeapp/main.cpp | 61 - languages/cpp/app_templates/tdeapp/pref.cpp | 42 - languages/cpp/app_templates/tdeapp/pref.h | 40 - languages/cpp/app_templates/tdeapp/src-Makefile.am | 43 - languages/cpp/app_templates/tdeapp/subdirs | 3 - languages/cpp/app_templates/tdeapp/tdeapp.png | Bin 6320 -> 0 bytes .../cpp/app_templates/tdeapp/tdeapp.tdevtemplate | 253 -- .../cpp/app_templates/tdecmodule/CMakeLists.txt | 6 +- languages/cpp/app_templates/tdecmodule/Makefile.am | 4 +- .../cpp/app_templates/tdecmodule/module.tdevelop | 30 +- .../tdecmodule/tdecmodule.kdevtemplate | 197 + .../tdecmodule/tdecmodule.tdevtemplate | 197 - .../cpp/app_templates/tdeconfig35/CMakeLists.txt | 6 +- .../cpp/app_templates/tdeconfig35/Makefile.am | 4 +- .../cpp/app_templates/tdeconfig35/app.tdevelop | 38 +- .../tdeconfig35/tdeconfig35.kdevtemplate | 245 ++ .../tdeconfig35/tdeconfig35.tdevtemplate | 245 -- languages/cpp/app_templates/tdecpp.appwizard | 2 - languages/cpp/app_templates/tdedcop/CMakeLists.txt | 27 - languages/cpp/app_templates/tdedcop/Makefile.am | 18 - languages/cpp/app_templates/tdedcop/app.cpp | 21 - languages/cpp/app_templates/tdedcop/app.h | 37 - languages/cpp/app_templates/tdedcop/app.tdevelop | 116 - languages/cpp/app_templates/tdedcop/app_iface.h | 19 - languages/cpp/app_templates/tdedcop/main.cpp | 52 - languages/cpp/app_templates/tdedcop/mainclass.cpp | 31 - languages/cpp/app_templates/tdedcop/mainclass.h | 32 - .../cpp/app_templates/tdedcop/src-Makefile.am | 23 - languages/cpp/app_templates/tdedcop/subdirs | 3 - languages/cpp/app_templates/tdedcop/tdedcop.png | Bin 2127 -> 0 bytes .../cpp/app_templates/tdedcop/tdedcop.tdevtemplate | 227 - .../cpp/app_templates/tdefileplugin/CMakeLists.txt | 6 +- .../cpp/app_templates/tdefileplugin/Makefile.am | 4 +- .../app_templates/tdefileplugin/plugin.tdevelop | 30 +- .../tdefileplugin/tdefileplugin.kdevtemplate | 166 + .../tdefileplugin/tdefileplugin.tdevtemplate | 166 - .../cpp/app_templates/tdeioslave/CMakeLists.txt | 6 +- languages/cpp/app_templates/tdeioslave/Makefile.am | 4 +- .../cpp/app_templates/tdeioslave/slave.tdevelop | 30 +- .../tdeioslave/tdeioslave.kdevtemplate | 183 + .../tdeioslave/tdeioslave.tdevtemplate | 183 - .../app_templates/tdescreensaver/CMakeLists.txt | 6 +- .../cpp/app_templates/tdescreensaver/Makefile.am | 4 +- .../tdescreensaver/tdescreensaver.kdevtemplate | 203 + .../tdescreensaver/tdescreensaver.tdevelop | 30 +- .../tdescreensaver/tdescreensaver.tdevtemplate | 203 - .../cpp/app_templates/tdevlang/CMakeLists.txt | 27 - languages/cpp/app_templates/tdevlang/Makefile.am | 17 - languages/cpp/app_templates/tdevlang/README.dox | 55 - languages/cpp/app_templates/tdevlang/app.tdevelop | 115 - .../cpp/app_templates/tdevlang/src-Makefile.am | 14 - .../tdevlang/tdevlang-configure.in.in | 10 - .../cpp/app_templates/tdevlang/tdevlang.desktop | 14 - languages/cpp/app_templates/tdevlang/tdevlang.png | Bin 483 -> 0 bytes languages/cpp/app_templates/tdevlang/tdevlang.rc | 11 - .../app_templates/tdevlang/tdevlang.tdevtemplate | 157 - .../cpp/app_templates/tdevlang/tdevlang_part.cpp | 154 - .../cpp/app_templates/tdevlang/tdevlang_part.h | 44 - .../cpp/app_templates/tdevpart/CMakeLists.txt | 29 - languages/cpp/app_templates/tdevpart/Makefile.am | 19 - languages/cpp/app_templates/tdevpart/README.dox | 55 - languages/cpp/app_templates/tdevpart/app.tdevelop | 116 - .../cpp/app_templates/tdevpart/globalconfig.cpp | 15 - .../cpp/app_templates/tdevpart/globalconfig.h | 23 - .../cpp/app_templates/tdevpart/globalconfigbase.ui | 20 - .../cpp/app_templates/tdevpart/projectconfig.cpp | 15 - .../cpp/app_templates/tdevpart/projectconfig.h | 23 - .../app_templates/tdevpart/projectconfigbase.ui | 20 - .../cpp/app_templates/tdevpart/src-Makefile.am | 20 - .../cpp/app_templates/tdevpart/tdevpart.desktop | 83 - languages/cpp/app_templates/tdevpart/tdevpart.png | Bin 483 -> 0 bytes .../app_templates/tdevpart/tdevpart.tdevtemplate | 242 -- .../cpp/app_templates/tdevpart/tdevpart_part.cpp | 183 - .../cpp/app_templates/tdevpart/tdevpart_part.h | 46 - .../cpp/app_templates/tdevpart/tdevpart_part.rc | 11 - .../cpp/app_templates/tdevpart/tdevpart_widget.cpp | 21 - .../cpp/app_templates/tdevpart/tdevpart_widget.h | 24 - .../cpp/app_templates/tdevpart2/CMakeLists.txt | 30 - languages/cpp/app_templates/tdevpart2/Makefile.am | 21 - languages/cpp/app_templates/tdevpart2/README.dox | 55 - languages/cpp/app_templates/tdevpart2/app.tdevelop | 148 - .../cpp/app_templates/tdevpart2/globalconfig.cpp | 15 - .../cpp/app_templates/tdevpart2/globalconfig.h | 23 - .../app_templates/tdevpart2/globalconfigbase.ui | 20 - .../cpp/app_templates/tdevpart2/projectconfig.cpp | 15 - .../cpp/app_templates/tdevpart2/projectconfig.h | 23 - .../app_templates/tdevpart2/projectconfigbase.ui | 20 - .../cpp/app_templates/tdevpart2/src-Makefile.am | 17 - languages/cpp/app_templates/tdevpart2/subdirs | 3 - .../tdevpart2/tdevpart-configure.in.in | 10 - .../cpp/app_templates/tdevpart2/tdevpart.desktop | 83 - .../cpp/app_templates/tdevpart2/tdevpart2.png | Bin 483 -> 0 bytes .../app_templates/tdevpart2/tdevpart2.tdevtemplate | 276 -- .../cpp/app_templates/tdevpart2/tdevpart_part.cpp | 183 - .../cpp/app_templates/tdevpart2/tdevpart_part.h | 46 - .../cpp/app_templates/tdevpart2/tdevpart_part.rc | 11 - .../app_templates/tdevpart2/tdevpart_widget.cpp | 21 - .../cpp/app_templates/tdevpart2/tdevpart_widget.h | 24 - .../cpp/app_templates/win32gui/CMakeLists.txt | 6 +- languages/cpp/app_templates/win32gui/Makefile.am | 4 +- languages/cpp/app_templates/win32gui/app.tdevelop | 28 +- .../app_templates/win32gui/win32gui.kdevtemplate | 137 + .../app_templates/win32gui/win32gui.tdevtemplate | 137 - .../cpp/app_templates/win32hello/CMakeLists.txt | 6 +- languages/cpp/app_templates/win32hello/Makefile.am | 4 +- .../cpp/app_templates/win32hello/app.tdevelop | 28 +- .../win32hello/win32hello.kdevtemplate | 136 + .../win32hello/win32hello.tdevtemplate | 136 - languages/cpp/app_templates/wxhello/CMakeLists.txt | 6 +- languages/cpp/app_templates/wxhello/Makefile.am | 4 +- languages/cpp/app_templates/wxhello/app.tdevelop | 24 +- .../cpp/app_templates/wxhello/wxhello.kdevtemplate | 192 + .../cpp/app_templates/wxhello/wxhello.tdevtemplate | 192 - languages/cpp/backgroundparser.cpp | 20 +- languages/cpp/backgroundparser.h | 6 +- languages/cpp/ccconfigwidget.cpp | 16 +- languages/cpp/codeinformationrepository.cpp | 4 +- languages/cpp/codeinformationrepository.h | 6 +- languages/cpp/compiler/Makefile.am | 2 +- languages/cpp/compiler/gccoptions/CMakeLists.txt | 10 +- languages/cpp/compiler/gccoptions/Makefile.am | 12 +- .../cpp/compiler/gccoptions/gccoptionsplugin.cpp | 4 +- .../cpp/compiler/gccoptions/gccoptionsplugin.h | 4 +- .../cpp/compiler/gccoptions/kdevg77options.desktop | 56 + .../cpp/compiler/gccoptions/kdevgccoptions.desktop | 54 + .../cpp/compiler/gccoptions/kdevgppoptions.desktop | 56 + .../cpp/compiler/gccoptions/tdevg77options.desktop | 56 - .../cpp/compiler/gccoptions/tdevgccoptions.desktop | 54 - .../cpp/compiler/gccoptions/tdevgppoptions.desktop | 56 - languages/cpp/configproblemreporter.ui.h | 2 +- languages/cpp/cppcodecompletion.cpp | 10 +- languages/cpp/cppimplementationwidget.cpp | 8 +- languages/cpp/cppimplementationwidget.h | 2 +- languages/cpp/cppnewclassdlg.cpp | 16 +- languages/cpp/cppnewclassdlg.h | 4 +- languages/cpp/cppsupport_events.h | 2 +- languages/cpp/cppsupportfactory.cpp | 12 +- languages/cpp/cppsupportfactory.h | 8 +- languages/cpp/cppsupportpart.cpp | 54 +- languages/cpp/cppsupportpart.h | 14 +- languages/cpp/createpcsdialog.cpp | 20 +- languages/cpp/debugger/CMakeLists.txt | 10 +- languages/cpp/debugger/Makefile.am | 14 +- languages/cpp/debugger/debuggerconfigwidget.cpp | 2 +- languages/cpp/debugger/debuggerpart.cpp | 40 +- languages/cpp/debugger/debuggerpart.h | 18 +- languages/cpp/debugger/kdevdebugger.desktop | 86 + languages/cpp/debugger/kdevdebugger.rc | 93 + languages/cpp/debugger/tdevdebugger.desktop | 86 - languages/cpp/debugger/tdevdebugger.rc | 93 - .../tests/breakpoints/breakpoints.tdevelop | 26 +- languages/cpp/debugger/tests/dll/dll.tdevelop | 26 +- .../tests/infinite_loop/infinite_loop.tdevelop | 26 +- .../tests/print_pointers/print_pointers.tdevelop | 32 +- .../cpp/debugger/tests/segfault/segfault.tdevelop | 26 +- .../cpp/debugger/tests/threads/threads.tdevelop | 26 +- .../cpp/debugger/tests/tracing/tracing.tdevelop | 26 +- .../debugger/tests/two_module/two_module.tdevelop | 26 +- languages/cpp/doc/CMakeLists.txt | 6 +- languages/cpp/doc/Makefile.am | 4 +- languages/cpp/doc/clanlib.toc | 2 +- languages/cpp/doc/gnome1.toc | 2 +- languages/cpp/doc/kde2book.toc | 2875 +++++++++++++ languages/cpp/doc/kdetemplates.toc | 9 + languages/cpp/doc/qt-kdev3.toc | 39 + languages/cpp/doc/qt-tdev3.toc | 39 - languages/cpp/doc/tde2book.toc | 2875 ------------- languages/cpp/doc/tdetemplates.toc | 9 - languages/cpp/file_templates/CMakeLists.txt | 2 +- languages/cpp/file_templates/Makefile.am | 2 +- languages/cpp/kdevcppsupport.desktop | 86 + languages/cpp/kdevcppsupport.rc | 30 + languages/cpp/kdevcsupport.desktop | 85 + languages/cpp/kdevdeepcopy.h | 14 + languages/cpp/kdevdriver.cpp | 206 + languages/cpp/kdevdriver.h | 58 + languages/cpp/newclass_templates/CMakeLists.txt | 2 +- languages/cpp/newclass_templates/Makefile.am | 2 +- .../cpp/pcsimporter/customimporter/CMakeLists.txt | 8 +- .../cpp/pcsimporter/customimporter/Makefile.am | 12 +- .../customimporter/kdevcustomimporter.cpp | 118 + .../customimporter/kdevcustomimporter.h | 41 + .../customimporter/kdevpcscustomimporter.desktop | 44 + .../customimporter/tdevcustomimporter.cpp | 118 - .../customimporter/tdevcustomimporter.h | 41 - .../customimporter/tdevpcscustomimporter.desktop | 44 - .../cpp/pcsimporter/qt4importer/CMakeLists.txt | 8 +- languages/cpp/pcsimporter/qt4importer/Makefile.am | 12 +- .../pcsimporter/qt4importer/kdevqt4importer.cpp | 107 + .../qt4importer/kdevqt4importer.desktop | 34 + .../cpp/pcsimporter/qt4importer/kdevqt4importer.h | 40 + .../pcsimporter/qt4importer/tdevqt4importer.cpp | 107 - .../qt4importer/tdevqt4importer.desktop | 34 - .../cpp/pcsimporter/qt4importer/tdevqt4importer.h | 40 - .../cpp/pcsimporter/qtimporter/CMakeLists.txt | 8 +- languages/cpp/pcsimporter/qtimporter/Makefile.am | 12 +- .../cpp/pcsimporter/qtimporter/kdevqtimporter.cpp | 73 + .../pcsimporter/qtimporter/kdevqtimporter.desktop | 37 + .../cpp/pcsimporter/qtimporter/kdevqtimporter.h | 38 + .../cpp/pcsimporter/qtimporter/tdevqtimporter.cpp | 73 - .../pcsimporter/qtimporter/tdevqtimporter.desktop | 37 - .../cpp/pcsimporter/qtimporter/tdevqtimporter.h | 38 - .../cpp/pcsimporter/tdelibsimporter/CMakeLists.txt | 8 +- .../cpp/pcsimporter/tdelibsimporter/Makefile.am | 12 +- .../tdelibsimporter/kdevtdelibsimporter.cpp | 119 + .../tdelibsimporter/kdevtdelibsimporter.desktop | 49 + .../tdelibsimporter/kdevtdelibsimporter.h | 41 + .../tdelibsimporter/tdevtdelibsimporter.cpp | 119 - .../tdelibsimporter/tdevtdelibsimporter.desktop | 49 - .../tdelibsimporter/tdevtdelibsimporter.h | 41 - languages/cpp/problemreporter.cpp | 6 +- languages/cpp/qtbuildconfig.cpp | 2 +- languages/cpp/qtbuildconfig.h | 2 +- languages/cpp/qtdesignercppintegration.cpp | 8 +- languages/cpp/qtdesignercppintegration.h | 2 +- languages/cpp/simpletype.cpp | 4 +- languages/cpp/storeconverter.cpp | 2 +- languages/cpp/subclassing_template/CMakeLists.txt | 2 +- languages/cpp/subclassing_template/Makefile.am | 2 +- languages/cpp/subclassingdlg.cpp | 8 +- languages/cpp/tdevcppsupport.desktop | 86 - languages/cpp/tdevcppsupport.rc | 30 - languages/cpp/tdevcsupport.desktop | 85 - languages/cpp/tdevdeepcopy.h | 14 - languages/cpp/tdevdriver.cpp | 206 - languages/cpp/tdevdriver.h | 58 - languages/cpp/templates/CMakeLists.txt | 2 +- languages/cpp/templates/Makefile.am | 2 +- languages/csharp/CMakeLists.txt | 10 +- languages/csharp/Makefile.am | 14 +- languages/csharp/csharpsupportpart.cpp | 30 +- languages/csharp/csharpsupportpart.h | 4 +- languages/csharp/doc/Makefile.am | 2 +- languages/csharp/file_templates/Makefile.am | 2 +- languages/csharp/kdevcsharpsupport.desktop | 57 + languages/csharp/kdevcsharpsupport.rc | 14 + languages/csharp/tdevcsharpsupport.desktop | 57 - languages/csharp/tdevcsharpsupport.rc | 14 - languages/fortran/CMakeLists.txt | 8 +- languages/fortran/Makefile.am | 14 +- .../app_templates/fortranhello/CMakeLists.txt | 6 +- .../fortran/app_templates/fortranhello/Makefile.am | 4 +- .../app_templates/fortranhello/app.tdevelop | 20 +- .../fortranhello/fortranhello.kdevtemplate | 140 + .../fortranhello/fortranhello.tdevtemplate | 140 - languages/fortran/compiler/Makefile.am | 2 +- .../fortran/compiler/pgioptions/CMakeLists.txt | 8 +- languages/fortran/compiler/pgioptions/Makefile.am | 12 +- .../compiler/pgioptions/kdevpgf77options.desktop | 53 + .../compiler/pgioptions/kdevpghpfoptions.desktop | 50 + .../compiler/pgioptions/pgioptionsfactory.cpp | 4 +- .../compiler/pgioptions/pgioptionsplugin.cpp | 2 +- .../fortran/compiler/pgioptions/pgioptionsplugin.h | 4 +- .../compiler/pgioptions/tdevpgf77options.desktop | 53 - .../compiler/pgioptions/tdevpghpfoptions.desktop | 50 - languages/fortran/doc/CMakeLists.txt | 2 +- languages/fortran/doc/Makefile.am | 2 +- languages/fortran/file_templates/CMakeLists.txt | 2 +- languages/fortran/file_templates/Makefile.am | 2 +- languages/fortran/fortransupportpart.cpp | 28 +- languages/fortran/fortransupportpart.h | 10 +- languages/fortran/kdevfortransupport.desktop | 80 + languages/fortran/kdevfortransupport.rc | 9 + languages/fortran/tdevfortransupport.desktop | 80 - languages/fortran/tdevfortransupport.rc | 9 - languages/java/CMakeLists.txt | 14 +- languages/java/KDevJavaSupportIface.cpp | 24 + languages/java/KDevJavaSupportIface.h | 27 + languages/java/Makefile.am | 16 +- languages/java/TDevJavaSupportIface.cpp | 24 - languages/java/TDevJavaSupportIface.h | 27 - languages/java/app_templates/CMakeLists.txt | 2 +- languages/java/app_templates/Makefile.am | 2 +- languages/java/app_templates/java.appwizard | 2 +- .../java/app_templates/javahello/CMakeLists.txt | 6 +- languages/java/app_templates/javahello/Makefile.am | 4 +- .../app_templates/javahello/javahello.filelist | 2 +- .../app_templates/javahello/javahello.kdevtemplate | 124 + .../app_templates/javahello/javahello.tdevelop | 14 +- .../app_templates/javahello/javahello.tdevtemplate | 124 - .../java/app_templates/kappjava/CMakeLists.txt | 26 + languages/java/app_templates/kappjava/Makefile.am | 17 + languages/java/app_templates/kappjava/app.desktop | 41 + languages/java/app_templates/kappjava/app.java | 281 ++ languages/java/app_templates/kappjava/app.tdevelop | 88 + .../java/app_templates/kappjava/app_client.java | 28 + languages/java/app_templates/kappjava/appui.rc | 8 + languages/java/app_templates/kappjava/appview.java | 115 + languages/java/app_templates/kappjava/kappjava | 10 + .../app_templates/kappjava/kappjava.kdevtemplate | 163 + languages/java/app_templates/kappjava/kappjava.png | Bin 0 -> 5063 bytes languages/java/app_templates/kappjava/pref.java | 52 + .../java/app_templates/kappjava/src-Makefile.am | 18 + languages/java/app_templates/kappjava/subdirs | 3 + .../java/app_templates/superwaba/CMakeLists.txt | 6 +- languages/java/app_templates/superwaba/Makefile.am | 4 +- .../app_templates/superwaba/superwaba.kdevtemplate | 166 + .../app_templates/superwaba/superwaba.tdevtemplate | 166 - languages/java/app_templates/superwaba/sw.tdevelop | 20 +- .../java/app_templates/tdeappjava/CMakeLists.txt | 26 - .../java/app_templates/tdeappjava/Makefile.am | 17 - .../java/app_templates/tdeappjava/app.desktop | 41 - languages/java/app_templates/tdeappjava/app.java | 281 -- .../java/app_templates/tdeappjava/app.tdevelop | 88 - .../java/app_templates/tdeappjava/app_client.java | 28 - languages/java/app_templates/tdeappjava/appui.rc | 8 - .../java/app_templates/tdeappjava/appview.java | 115 - languages/java/app_templates/tdeappjava/pref.java | 52 - .../java/app_templates/tdeappjava/src-Makefile.am | 18 - languages/java/app_templates/tdeappjava/subdirs | 3 - languages/java/app_templates/tdeappjava/tdeappjava | 10 - .../java/app_templates/tdeappjava/tdeappjava.png | Bin 5063 -> 0 bytes .../tdeappjava/tdeappjava.tdevtemplate | 163 - languages/java/backgroundparser.cpp | 10 +- languages/java/backgroundparser.h | 2 +- languages/java/doc/CMakeLists.txt | 2 +- languages/java/doc/Makefile.am | 2 +- languages/java/file_templates/CMakeLists.txt | 2 +- languages/java/file_templates/Makefile.am | 2 +- languages/java/javasupport_events.h | 2 +- languages/java/javasupportfactory.cpp | 16 +- languages/java/javasupportfactory.h | 8 +- languages/java/javasupportpart.cpp | 30 +- languages/java/javasupportpart.h | 10 +- languages/java/kdevdeepcopy.h | 12 + languages/java/kdevdriver.cpp | 44 + languages/java/kdevdriver.h | 30 + languages/java/kdevjavasupport.desktop | 85 + languages/java/kdevjavasupport.rc | 4 + languages/java/newclass_templates/Makefile.am | 2 +- languages/java/problemreporter.cpp | 4 +- languages/java/tdevdeepcopy.h | 12 - languages/java/tdevdriver.cpp | 44 - languages/java/tdevdriver.h | 30 - languages/java/tdevjavasupport.desktop | 85 - languages/java/tdevjavasupport.rc | 4 - languages/kjssupport/Makefile.am | 14 +- languages/kjssupport/jscodecompletion.cpp | 10 +- languages/kjssupport/jscodecompletion.h | 2 +- languages/kjssupport/kdevkjssupport.desktop | 54 + languages/kjssupport/kdevkjssupport.rc | 11 + languages/kjssupport/kjssupport_part.cpp | 22 +- languages/kjssupport/kjssupport_part.h | 8 +- .../kjssupport/subclassing_template/Makefile.am | 2 +- languages/kjssupport/subclassingdlg.cpp | 2 +- languages/kjssupport/tdevkjssupport.desktop | 54 - languages/kjssupport/tdevkjssupport.rc | 11 - languages/kjssupport/template/Makefile.am | 2 +- languages/kjssupport/template/app.tdevelop | 20 +- languages/kjssupport/template/script | 2 +- languages/lib/debugger/CMakeLists.txt | 4 +- languages/lib/debugger/Makefile.am | 10 +- languages/lib/debugger/debugger.cpp | 4 +- languages/lib/debugger/debugger.h | 10 +- languages/lib/debugger/kdevdebugger.cpp | 182 + languages/lib/debugger/kdevdebugger.h | 89 + languages/lib/debugger/tdevdebugger.cpp | 182 - languages/lib/debugger/tdevdebugger.h | 89 - languages/lib/designer_integration/Mainpage.dox | 10 +- languages/lib/designer_integration/Makefile.am | 6 +- .../designer_integration/implementationwidget.cpp | 6 +- .../designer_integration/implementationwidget.h | 6 +- .../designer_integration/qtdesignerintegration.cpp | 12 +- .../designer_integration/qtdesignerintegration.h | 12 +- languages/lib/interfaces/CMakeLists.txt | 4 +- languages/lib/interfaces/Makefile.am | 10 +- languages/lib/interfaces/kdevpcsimporter.cpp | 35 + languages/lib/interfaces/kdevpcsimporter.h | 50 + languages/lib/interfaces/tdevpcsimporter.cpp | 35 - languages/lib/interfaces/tdevpcsimporter.h | 50 - languages/pascal/CMakeLists.txt | 12 +- languages/pascal/Makefile.am | 16 +- .../pascal/app_templates/fpcgtk/CMakeLists.txt | 6 +- languages/pascal/app_templates/fpcgtk/Makefile.am | 4 +- languages/pascal/app_templates/fpcgtk/app.tdevelop | 12 +- .../app_templates/fpcgtk/fpcgtk.kdevtemplate | 114 + .../app_templates/fpcgtk/fpcgtk.tdevtemplate | 114 - .../pascal/app_templates/fpchello/CMakeLists.txt | 6 +- .../pascal/app_templates/fpchello/Makefile.am | 4 +- .../pascal/app_templates/fpchello/app.tdevelop | 12 +- .../app_templates/fpchello/fpchello.kdevtemplate | 115 + .../app_templates/fpchello/fpchello.tdevtemplate | 115 - .../app_templates/fpcsharedlib/CMakeLists.txt | 6 +- .../pascal/app_templates/fpcsharedlib/Makefile.am | 4 +- .../pascal/app_templates/fpcsharedlib/app.tdevelop | 12 +- .../fpcsharedlib/fpcsharedlib.kdevtemplate | 115 + .../fpcsharedlib/fpcsharedlib.tdevtemplate | 115 - .../app_templates/pascalhello/CMakeLists.txt | 6 +- .../pascal/app_templates/pascalhello/Makefile.am | 4 +- .../pascal/app_templates/pascalhello/app.tdevelop | 12 +- .../pascalhello/pascalhello.kdevtemplate | 116 + .../pascalhello/pascalhello.tdevtemplate | 116 - languages/pascal/compiler/Makefile.am | 2 +- .../pascal/compiler/dccoptions/CMakeLists.txt | 8 +- languages/pascal/compiler/dccoptions/Makefile.am | 12 +- .../compiler/dccoptions/dccoptionsplugin.cpp | 4 +- .../pascal/compiler/dccoptions/dccoptionsplugin.h | 4 +- .../compiler/dccoptions/kdevdccoptions.desktop | 54 + .../compiler/dccoptions/tdevdccoptions.desktop | 54 - .../pascal/compiler/fpcoptions/CMakeLists.txt | 8 +- languages/pascal/compiler/fpcoptions/Makefile.am | 12 +- .../compiler/fpcoptions/fpcoptionsplugin.cpp | 4 +- .../pascal/compiler/fpcoptions/fpcoptionsplugin.h | 4 +- .../compiler/fpcoptions/kdevfpcoptions.desktop | 55 + .../compiler/fpcoptions/tdevfpcoptions.desktop | 55 - languages/pascal/doc/CMakeLists.txt | 2 +- languages/pascal/doc/Makefile.am | 2 +- languages/pascal/file_templates/CMakeLists.txt | 2 +- languages/pascal/file_templates/Makefile.am | 2 +- languages/pascal/kdevpascalsupport.desktop | 84 + languages/pascal/kdevpascalsupport.rc | 3 + languages/pascal/pascalsupport_part.cpp | 24 +- languages/pascal/pascalsupport_part.h | 8 +- languages/pascal/problemreporter.cpp | 4 +- languages/pascal/tdevpascalsupport.desktop | 84 - languages/pascal/tdevpascalsupport.rc | 3 - languages/perl/CMakeLists.txt | 8 +- languages/perl/Makefile.am | 14 +- .../perl/app_templates/perlhello/CMakeLists.txt | 6 +- languages/perl/app_templates/perlhello/Makefile.am | 4 +- .../perl/app_templates/perlhello/app.tdevelop | 12 +- .../app_templates/perlhello/perlhello.kdevtemplate | 108 + .../app_templates/perlhello/perlhello.tdevtemplate | 108 - languages/perl/doc/CMakeLists.txt | 2 +- languages/perl/doc/Makefile.am | 2 +- languages/perl/file_templates/CMakeLists.txt | 2 +- languages/perl/file_templates/Makefile.am | 2 +- languages/perl/kdevperlsupport.desktop | 85 + languages/perl/kdevperlsupport.rc | 14 + languages/perl/perlparser.cpp | 2 +- languages/perl/perlparser.h | 6 +- languages/perl/perlsupportpart.cpp | 30 +- languages/perl/perlsupportpart.h | 4 +- languages/perl/tdevperlsupport.desktop | 85 - languages/perl/tdevperlsupport.rc | 14 - languages/php/CMakeLists.txt | 12 +- languages/php/Makefile.am | 16 +- .../php/app_templates/phphello/CMakeLists.txt | 6 +- languages/php/app_templates/phphello/Makefile.am | 4 +- languages/php/app_templates/phphello/app.tdevelop | 20 +- .../app_templates/phphello/phphello.kdevtemplate | 108 + .../app_templates/phphello/phphello.tdevtemplate | 108 - languages/php/data/CMakeLists.txt | 2 +- languages/php/data/Makefile.am | 2 +- languages/php/doc/CMakeLists.txt | 2 +- languages/php/doc/Makefile.am | 2 +- languages/php/file_templates/CMakeLists.txt | 2 +- languages/php/file_templates/Makefile.am | 2 +- languages/php/kdevphpsupport.desktop | 86 + languages/php/kdevphpsupport.rc | 18 + languages/php/phpcodecompletion.cpp | 2 +- languages/php/phpcodecompletion.h | 4 +- languages/php/phperrorview.cpp | 6 +- languages/php/phpfile.cpp | 2 +- languages/php/phpfile.h | 6 +- languages/php/phphtmlview.cpp | 2 +- languages/php/phphtmlview.h | 4 +- languages/php/phpparser.cpp | 4 +- languages/php/phpparser.h | 4 +- languages/php/phpsupportpart.cpp | 20 +- languages/php/phpsupportpart.h | 8 +- languages/php/tdevphpsupport.desktop | 86 - languages/php/tdevphpsupport.rc | 18 - languages/python/CMakeLists.txt | 10 +- languages/python/Makefile.am | 18 +- languages/python/app_templates/pyqt/CMakeLists.txt | 6 +- languages/python/app_templates/pyqt/Makefile.am | 4 +- languages/python/app_templates/pyqt/app.tdevelop | 16 +- .../python/app_templates/pyqt/pyqt.kdevtemplate | 168 + .../python/app_templates/pyqt/pyqt.tdevtemplate | 168 - .../app_templates/pythonhello/CMakeLists.txt | 6 +- .../python/app_templates/pythonhello/Makefile.am | 4 +- .../python/app_templates/pythonhello/app.tdevelop | 16 +- .../pythonhello/pythonhello.kdevtemplate | 107 + .../pythonhello/pythonhello.tdevtemplate | 107 - languages/python/app_templates/pytk/CMakeLists.txt | 6 +- languages/python/app_templates/pytk/Makefile.am | 4 +- languages/python/app_templates/pytk/app.tdevelop | 16 +- .../python/app_templates/pytk/pytk.kdevtemplate | 107 + .../python/app_templates/pytk/pytk.tdevtemplate | 107 - languages/python/doc/CMakeLists.txt | 2 +- languages/python/doc/Makefile.am | 2 +- languages/python/file_templates/CMakeLists.txt | 2 +- languages/python/file_templates/Makefile.am | 2 +- languages/python/kde_pydoc.py | 131 + languages/python/kdevpythonsupport.desktop | 85 + languages/python/kdevpythonsupport.rc | 16 + languages/python/pydoc.cpp | 2 +- languages/python/pythonconfigwidget.cpp | 8 +- languages/python/pythonimplementationwidget.cpp | 6 +- languages/python/pythonimplementationwidget.h | 2 +- languages/python/pythonsupportpart.cpp | 38 +- languages/python/pythonsupportpart.h | 8 +- languages/python/qtdesignerpythonintegration.cpp | 8 +- languages/python/qtdesignerpythonintegration.h | 2 +- languages/python/tde_pydoc.py | 131 - languages/python/tdevpythonsupport.desktop | 85 - languages/python/tdevpythonsupport.rc | 16 - languages/ruby/CMakeLists.txt | 12 +- languages/ruby/Makefile.am | 20 +- languages/ruby/app_templates/CMakeLists.txt | 2 +- languages/ruby/app_templates/Makefile.am | 2 +- .../ruby/app_templates/dcopservice/CMakeLists.txt | 6 +- .../ruby/app_templates/dcopservice/Makefile.am | 4 +- .../app_templates/dcopservice/dcopservice.tdevelop | 28 +- .../dcopservice/dcopserviceruby.kdevtemplate | 199 + .../dcopservice/dcopserviceruby.tdevtemplate | 199 - languages/ruby/app_templates/kapp/CMakeLists.txt | 27 + languages/ruby/app_templates/kapp/Makefile.am | 19 + languages/ruby/app_templates/kapp/README | 81 + languages/ruby/app_templates/kapp/app-Makefile.am | 1 + .../ruby/app_templates/kapp/app-configure.in.in | 45 + languages/ruby/app_templates/kapp/app.cpp | 30 + languages/ruby/app_templates/kapp/app.desktop | 44 + languages/ruby/app_templates/kapp/app.rb | 216 + languages/ruby/app_templates/kapp/app.tdevelop | 90 + languages/ruby/app_templates/kapp/app_client.rb | 18 + languages/ruby/app_templates/kapp/appiface.rb | 14 + languages/ruby/app_templates/kapp/appui.rc | 8 + languages/ruby/app_templates/kapp/appview.rb | 103 + .../ruby/app_templates/kapp/kappruby.kdevtemplate | 238 ++ languages/ruby/app_templates/kapp/kappruby.png | Bin 0 -> 5063 bytes languages/ruby/app_templates/kapp/main.rb | 40 + languages/ruby/app_templates/kapp/pref.rb | 38 + languages/ruby/app_templates/kapp/src-Makefile.am | 43 + languages/ruby/app_templates/kapp/subdirs | 3 + languages/ruby/app_templates/kxt/CMakeLists.txt | 6 +- languages/ruby/app_templates/kxt/Makefile.am | 4 +- languages/ruby/app_templates/kxt/app.tdevelop | 22 +- .../ruby/app_templates/kxt/kxtruby.kdevtemplate | 251 ++ .../ruby/app_templates/kxt/kxtruby.tdevtemplate | 251 -- languages/ruby/app_templates/qtruby/CMakeLists.txt | 6 +- languages/ruby/app_templates/qtruby/Makefile.am | 4 +- languages/ruby/app_templates/qtruby/app.filelist | 2 +- languages/ruby/app_templates/qtruby/app.tdevelop | 24 +- .../ruby/app_templates/qtruby/qtruby.kdevtemplate | 114 + .../ruby/app_templates/qtruby/qtruby.tdevtemplate | 114 - .../ruby/app_templates/qtruby4app/CMakeLists.txt | 6 +- .../ruby/app_templates/qtruby4app/Makefile.am | 4 +- .../ruby/app_templates/qtruby4app/app.filelist | 2 +- .../qtruby4app/qtruby4app.kdevtemplate | 166 + .../app_templates/qtruby4app/qtruby4app.tdevelop | 22 +- .../qtruby4app/qtruby4app.tdevtemplate | 166 - .../ruby/app_templates/qtrubyapp/CMakeLists.txt | 6 +- languages/ruby/app_templates/qtrubyapp/Makefile.am | 4 +- .../ruby/app_templates/qtrubyapp/app.filelist | 2 +- .../app_templates/qtrubyapp/qtrubyapp.kdevtemplate | 140 + .../app_templates/qtrubyapp/qtrubyapp.tdevelop | 22 +- .../app_templates/qtrubyapp/qtrubyapp.tdevtemplate | 140 - languages/ruby/app_templates/rails/CMakeLists.txt | 6 +- languages/ruby/app_templates/rails/Makefile.am | 4 +- languages/ruby/app_templates/rails/app.tdevelop | 22 +- .../ruby/app_templates/rails/rails.kdevtemplate | 72 + .../ruby/app_templates/rails/rails.tdevtemplate | 72 - languages/ruby/app_templates/ruby.appwizard | 2 +- .../ruby/app_templates/rubyhello/CMakeLists.txt | 6 +- languages/ruby/app_templates/rubyhello/Makefile.am | 4 +- .../ruby/app_templates/rubyhello/app.tdevelop | 22 +- .../app_templates/rubyhello/rubyhello.kdevtemplate | 105 + .../app_templates/rubyhello/rubyhello.tdevtemplate | 105 - languages/ruby/app_templates/tdeapp/CMakeLists.txt | 27 - languages/ruby/app_templates/tdeapp/Makefile.am | 19 - languages/ruby/app_templates/tdeapp/README | 81 - .../ruby/app_templates/tdeapp/app-Makefile.am | 1 - .../ruby/app_templates/tdeapp/app-configure.in.in | 45 - languages/ruby/app_templates/tdeapp/app.cpp | 30 - languages/ruby/app_templates/tdeapp/app.desktop | 44 - languages/ruby/app_templates/tdeapp/app.rb | 216 - languages/ruby/app_templates/tdeapp/app.tdevelop | 90 - languages/ruby/app_templates/tdeapp/app_client.rb | 18 - languages/ruby/app_templates/tdeapp/appiface.rb | 14 - languages/ruby/app_templates/tdeapp/appui.rc | 8 - languages/ruby/app_templates/tdeapp/appview.rb | 103 - languages/ruby/app_templates/tdeapp/main.rb | 40 - languages/ruby/app_templates/tdeapp/pref.rb | 38 - .../ruby/app_templates/tdeapp/src-Makefile.am | 43 - languages/ruby/app_templates/tdeapp/subdirs | 3 - languages/ruby/app_templates/tdeapp/tdeappruby.png | Bin 5063 -> 0 bytes .../app_templates/tdeapp/tdeappruby.tdevtemplate | 238 -- languages/ruby/debugger/CMakeLists.txt | 12 +- languages/ruby/debugger/Makefile.am | 16 +- languages/ruby/debugger/debuggerpart.cpp | 38 +- languages/ruby/debugger/debuggerpart.h | 18 +- languages/ruby/debugger/kdevrbdebugger.desktop | 73 + languages/ruby/debugger/kdevrbdebugger.rc | 68 + languages/ruby/debugger/tdevrbdebugger.desktop | 73 - languages/ruby/debugger/tdevrbdebugger.rc | 68 - languages/ruby/doc/CMakeLists.txt | 2 +- languages/ruby/doc/Makefile.am | 2 +- languages/ruby/file_templates/CMakeLists.txt | 2 +- languages/ruby/file_templates/Makefile.am | 2 +- languages/ruby/kdevrubysupport.desktop | 84 + languages/ruby/kdevrubysupport.rc | 20 + languages/ruby/qtdesignerrubyintegration.cpp | 8 +- languages/ruby/qtdesignerrubyintegration.h | 2 +- languages/ruby/rubyimplementationwidget.cpp | 6 +- languages/ruby/rubyimplementationwidget.h | 2 +- languages/ruby/rubysupport_part.cpp | 48 +- languages/ruby/rubysupport_part.h | 16 +- languages/ruby/tdevrubysupport.desktop | 84 - languages/ruby/tdevrubysupport.rc | 20 - languages/sql/CMakeLists.txt | 8 +- languages/sql/Makefile.am | 14 +- .../sql/app_templates/sqlsimple/CMakeLists.txt | 6 +- languages/sql/app_templates/sqlsimple/Makefile.am | 4 +- languages/sql/app_templates/sqlsimple/app.tdevelop | 18 +- .../app_templates/sqlsimple/sqlsimple.kdevtemplate | 106 + .../app_templates/sqlsimple/sqlsimple.tdevtemplate | 106 - languages/sql/doc/Makefile.am | 2 +- languages/sql/kdevsqlsupport.desktop | 85 + languages/sql/kdevsqlsupport.rc | 14 + languages/sql/sqlactions.cpp | 4 +- languages/sql/sqlconfigwidget.ui.h | 6 +- languages/sql/sqlsupport_part.cpp | 28 +- languages/sql/sqlsupport_part.h | 10 +- languages/sql/tdevsqlsupport.desktop | 85 - languages/sql/tdevsqlsupport.rc | 14 - lib/CMakeLists.txt | 4 +- lib/Makefile.am | 10 +- lib/catalog/CMakeLists.txt | 4 +- lib/catalog/Makefile.am | 14 +- lib/cppparser/CMakeLists.txt | 6 +- lib/cppparser/Makefile.am | 12 +- lib/cppparser/lexer.cpp | 4 +- lib/interfaces/CMakeLists.txt | 34 +- lib/interfaces/KDevCoreIface.cpp | 59 + lib/interfaces/KDevCoreIface.h | 52 + lib/interfaces/KDevPartControllerIface.cpp | 95 + lib/interfaces/KDevPartControllerIface.h | 64 + lib/interfaces/Makefile.am | 38 +- lib/interfaces/TDevCoreIface.cpp | 59 - lib/interfaces/TDevCoreIface.h | 52 - lib/interfaces/TDevPartControllerIface.cpp | 95 - lib/interfaces/TDevPartControllerIface.h | 64 - lib/interfaces/extensions/CMakeLists.txt | 20 +- lib/interfaces/extensions/Mainpage.dox | 10 +- lib/interfaces/extensions/Makefile.am | 18 +- lib/interfaces/extensions/codebrowserfrontend.h | 8 +- lib/interfaces/extensions/dcop/CMakeLists.txt | 10 +- .../extensions/dcop/KDevAppFrontendIface.cpp | 76 + .../extensions/dcop/KDevAppFrontendIface.h | 52 + .../extensions/dcop/KDevMakeFrontendIface.cpp | 46 + .../extensions/dcop/KDevMakeFrontendIface.h | 45 + lib/interfaces/extensions/dcop/Makefile.am | 10 +- .../extensions/dcop/TDevAppFrontendIface.cpp | 76 - .../extensions/dcop/TDevAppFrontendIface.h | 52 - .../extensions/dcop/TDevMakeFrontendIface.cpp | 46 - .../extensions/dcop/TDevMakeFrontendIface.h | 45 - lib/interfaces/extensions/kdevappfrontend.cpp | 2 + lib/interfaces/extensions/kdevappfrontend.h | 116 + lib/interfaces/extensions/kdevcreatefile.h | 146 + lib/interfaces/extensions/kdevdifffrontend.cpp | 33 + lib/interfaces/extensions/kdevdifffrontend.h | 79 + lib/interfaces/extensions/kdevmakefrontend.cpp | 2 + lib/interfaces/extensions/kdevmakefrontend.h | 107 + lib/interfaces/extensions/kdevquickopen.h | 130 + lib/interfaces/extensions/kdevsourceformatter.h | 69 + lib/interfaces/extensions/kdevversioncontrol.h | 239 ++ lib/interfaces/extensions/tdevappfrontend.cpp | 2 - lib/interfaces/extensions/tdevappfrontend.h | 116 - lib/interfaces/extensions/tdevcreatefile.h | 146 - lib/interfaces/extensions/tdevdifffrontend.cpp | 33 - lib/interfaces/extensions/tdevdifffrontend.h | 79 - lib/interfaces/extensions/tdevmakefrontend.cpp | 2 - lib/interfaces/extensions/tdevmakefrontend.h | 107 - lib/interfaces/extensions/tdevquickopen.h | 130 - lib/interfaces/extensions/tdevsourceformatter.h | 69 - lib/interfaces/extensions/tdevversioncontrol.h | 239 -- lib/interfaces/external/Mainpage.dox | 14 +- lib/interfaces/extras/CMakeLists.txt | 8 +- lib/interfaces/extras/Makefile.am | 14 +- lib/interfaces/extras/kdevcompileroptions.cpp | 8 + lib/interfaces/extras/kdevcompileroptions.h | 91 + lib/interfaces/extras/kdevvcsintegrator.cpp | 26 + lib/interfaces/extras/kdevvcsintegrator.h | 77 + lib/interfaces/extras/tdevcompileroptions.cpp | 8 - lib/interfaces/extras/tdevcompileroptions.h | 91 - lib/interfaces/extras/tdevvcsintegrator.cpp | 26 - lib/interfaces/extras/tdevvcsintegrator.h | 77 - lib/interfaces/katedocumentmanagerinterface.cpp | 4 +- lib/interfaces/katedocumentmanagerinterface.h | 6 +- lib/interfaces/kdevapi.cpp | 93 + lib/interfaces/kdevapi.h | 104 + lib/interfaces/kdevcoderepository.cpp | 71 + lib/interfaces/kdevcoderepository.h | 95 + lib/interfaces/kdevcore.cpp | 298 ++ lib/interfaces/kdevcore.h | 388 ++ lib/interfaces/kdevdesignerintegration.cpp | 40 + lib/interfaces/kdevdesignerintegration.h | 98 + lib/interfaces/kdevdesignerintegrationiface.cpp | 63 + lib/interfaces/kdevdesignerintegrationiface.h | 49 + lib/interfaces/kdevgenericfactory.h | 91 + lib/interfaces/kdevlanguagesupport.cpp | 166 + lib/interfaces/kdevlanguagesupport.h | 261 ++ lib/interfaces/kdevmainwindow.cpp | 28 + lib/interfaces/kdevmainwindow.h | 101 + lib/interfaces/kdevpartcontroller.cpp | 30 + lib/interfaces/kdevpartcontroller.h | 176 + lib/interfaces/kdevplugin.cpp | 139 + lib/interfaces/kdevplugin.h | 201 + lib/interfaces/kdevplugincontroller.cpp | 49 + lib/interfaces/kdevplugincontroller.h | 119 + lib/interfaces/kdevplugininfo.cpp | 181 + lib/interfaces/kdevplugininfo.h | 111 + lib/interfaces/kdevproject.cpp | 164 + lib/interfaces/kdevproject.h | 219 + lib/interfaces/kdevprojectiface.cpp | 186 + lib/interfaces/kdevprojectiface.h | 82 + lib/interfaces/tdevapi.cpp | 93 - lib/interfaces/tdevapi.h | 104 - lib/interfaces/tdevcoderepository.cpp | 71 - lib/interfaces/tdevcoderepository.h | 95 - lib/interfaces/tdevcore.cpp | 298 -- lib/interfaces/tdevcore.h | 388 -- lib/interfaces/tdevdesignerintegration.cpp | 40 - lib/interfaces/tdevdesignerintegration.h | 98 - lib/interfaces/tdevdesignerintegrationiface.cpp | 63 - lib/interfaces/tdevdesignerintegrationiface.h | 49 - lib/interfaces/tdevgenericfactory.h | 91 - lib/interfaces/tdevlanguagesupport.cpp | 166 - lib/interfaces/tdevlanguagesupport.h | 261 -- lib/interfaces/tdevmainwindow.cpp | 28 - lib/interfaces/tdevmainwindow.h | 101 - lib/interfaces/tdevpartcontroller.cpp | 30 - lib/interfaces/tdevpartcontroller.h | 176 - lib/interfaces/tdevplugin.cpp | 139 - lib/interfaces/tdevplugin.h | 201 - lib/interfaces/tdevplugincontroller.cpp | 49 - lib/interfaces/tdevplugincontroller.h | 119 - lib/interfaces/tdevplugininfo.cpp | 181 - lib/interfaces/tdevplugininfo.h | 111 - lib/interfaces/tdevproject.cpp | 164 - lib/interfaces/tdevproject.h | 219 - lib/interfaces/tdevprojectiface.cpp | 186 - lib/interfaces/tdevprojectiface.h | 82 - lib/util/CMakeLists.txt | 8 +- lib/util/Makefile.am | 18 +- lib/util/configwidgetproxy.cpp | 4 +- lib/util/configwidgetproxy.h | 8 +- lib/util/filetemplate.cpp | 18 +- lib/util/filetemplate.h | 12 +- lib/util/kdeveditorutil.cpp | 89 + lib/util/kdeveditorutil.h | 67 + lib/util/kdevjobtimer.cpp | 39 + lib/util/kdevjobtimer.h | 40 + lib/util/kdevshellwidget.cpp | 125 + lib/util/kdevshellwidget.h | 101 + lib/util/tdeveditorutil.cpp | 89 - lib/util/tdeveditorutil.h | 67 - lib/util/tdevjobtimer.cpp | 39 - lib/util/tdevjobtimer.h | 40 - lib/util/tdevshellwidget.cpp | 125 - lib/util/tdevshellwidget.h | 101 - lib/widgets/CMakeLists.txt | 10 +- lib/widgets/Makefile.am | 24 +- lib/widgets/kdevhtml_partui.rc | 18 + lib/widgets/kdevhtmlpart.cpp | 512 +++ lib/widgets/kdevhtmlpart.h | 111 + lib/widgets/kdevtabwidget.cpp | 66 + lib/widgets/propeditor/CMakeLists.txt | 4 +- lib/widgets/propeditor/Makefile.am | 14 +- lib/widgets/tdevhtml_partui.rc | 18 - lib/widgets/tdevhtmlpart.cpp | 512 --- lib/widgets/tdevhtmlpart.h | 111 - lib/widgets/tdevtabwidget.cpp | 66 - parts/abbrev/CMakeLists.txt | 10 +- parts/abbrev/Makefile.am | 16 +- parts/abbrev/abbrevpart.cpp | 26 +- parts/abbrev/abbrevpart.h | 4 +- parts/abbrev/kdevabbrev.desktop | 83 + parts/abbrev/kdevabbrev.rc | 10 + parts/abbrev/tdevabbrev.desktop | 83 - parts/abbrev/tdevabbrev.rc | 10 - parts/appwizard/CMakeLists.txt | 10 +- parts/appwizard/Makefile.am | 20 +- parts/appwizard/appwizarddlg.cpp | 42 +- parts/appwizard/appwizarddlg.h | 14 +- parts/appwizard/appwizardfactory.cpp | 18 +- parts/appwizard/appwizardfactory.h | 8 +- parts/appwizard/appwizardpart.cpp | 14 +- parts/appwizard/appwizardpart.h | 4 +- parts/appwizard/common/CMakeLists.txt | 16 +- parts/appwizard/common/Makefile.am | 12 +- parts/appwizard/common/admin.kdevtemplate | 5 + parts/appwizard/common/admin.tdevtemplate | 5 - parts/appwizard/common/dockbook.kdevtemplate | 64 + parts/appwizard/common/dockbook.tdevtemplate | 64 - parts/appwizard/common/gnome2.kdevtemplate | 5 + parts/appwizard/common/gnome2.tdevtemplate | 5 - parts/appwizard/common/gnu.kdevtemplate | 5 + parts/appwizard/common/gnu.tdevtemplate | 5 - parts/appwizard/common/incadmin.kdevtemplate | 5 + parts/appwizard/common/incadmin.tdevtemplate | 5 - parts/appwizard/common/kde-Makefile.am | 22 + parts/appwizard/common/kde-Makefile.cvs | 10 + parts/appwizard/common/kde-app.lsm | 14 + parts/appwizard/common/kde-doc-Makefile.am | 6 + parts/appwizard/common/kde-doc-en-Makefile.am | 2 + parts/appwizard/common/kde-po-Makefile.am | 1 + parts/appwizard/common/scons.kdevtemplate | 5 + parts/appwizard/common/scons.tdevtemplate | 5 - parts/appwizard/common/scons/admin/kde.py | 856 ++++ parts/appwizard/common/scons/admin/tde.py | 856 ---- parts/appwizard/common/tde-Makefile.am | 22 - parts/appwizard/common/tde-Makefile.cvs | 10 - parts/appwizard/common/tde-app.lsm | 14 - parts/appwizard/common/tde-doc-Makefile.am | 6 - parts/appwizard/common/tde-doc-en-Makefile.am | 2 - parts/appwizard/common/tde-po-Makefile.am | 1 - parts/appwizard/importdlg.cpp | 12 +- parts/appwizard/importdlg.h | 2 +- parts/appwizard/imports/CMakeLists.txt | 8 +- parts/appwizard/imports/Makefile.am | 6 +- parts/appwizard/imports/ada.tdevelop | 12 +- parts/appwizard/imports/c-auto.tdevelop | 16 +- parts/appwizard/imports/c.tdevelop | 18 +- parts/appwizard/imports/cpp-auto.tdevelop | 16 +- parts/appwizard/imports/cpp.tdevelop | 18 +- parts/appwizard/imports/fortran-auto.tdevelop | 12 +- parts/appwizard/imports/fortran.tdevelop | 18 +- parts/appwizard/imports/gnome.tdevelop | 22 +- parts/appwizard/imports/java-ant.tdevelop | 14 +- parts/appwizard/imports/java-auto.tdevelop | 10 +- parts/appwizard/imports/java.tdevelop | 10 +- parts/appwizard/imports/kde | 5 + parts/appwizard/imports/kde.tdevelop | 73 + parts/appwizard/imports/pascal.tdevelop | 12 +- parts/appwizard/imports/perl.tdevelop | 12 +- parts/appwizard/imports/php.tdevelop | 20 +- parts/appwizard/imports/python.tdevelop | 16 +- parts/appwizard/imports/qt-auto.tdevelop | 16 +- parts/appwizard/imports/qt.tdevelop | 18 +- parts/appwizard/imports/qt4qmake.tdevelop | 20 +- parts/appwizard/imports/qtqmake.tdevelop | 20 +- parts/appwizard/imports/qttmake.tdevelop | 16 +- parts/appwizard/imports/ruby.tdevelop | 18 +- parts/appwizard/imports/tde | 5 - parts/appwizard/imports/tde.tdevelop | 73 - parts/appwizard/kdevappwizard.desktop | 87 + parts/appwizard/kdevappwizard.rc | 10 + parts/appwizard/kdevfile.cpp | 59 + parts/appwizard/kdevfile.h | 57 + parts/appwizard/kdevlicense.cpp | 116 + parts/appwizard/kdevlicense.h | 75 + parts/appwizard/profilesupport.cpp | 4 +- parts/appwizard/profilesupport.h | 4 +- parts/appwizard/tdevappwizard.desktop | 87 - parts/appwizard/tdevappwizard.rc | 10 - parts/appwizard/tdevfile.cpp | 59 - parts/appwizard/tdevfile.h | 57 - parts/appwizard/tdevlicense.cpp | 116 - parts/appwizard/tdevlicense.h | 75 - parts/astyle/CMakeLists.txt | 8 +- parts/astyle/Makefile.am | 14 +- parts/astyle/astyle_adaptor.cpp | 6 +- parts/astyle/astyle_adaptor.h | 6 +- parts/astyle/astyle_part.cpp | 24 +- parts/astyle/astyle_part.h | 8 +- parts/astyle/astyle_widget.cpp | 2 +- parts/astyle/astyle_widget.h | 2 +- parts/astyle/kdevastyle.desktop | 82 + parts/astyle/kdevpart_astyle.rc | 17 + parts/astyle/tdevastyle.desktop | 82 - parts/astyle/tdevpart_astyle.rc | 17 - parts/bookmarks/CMakeLists.txt | 6 +- parts/bookmarks/Makefile.am | 10 +- parts/bookmarks/bookmarks_part.cpp | 18 +- parts/bookmarks/bookmarks_part.h | 10 +- parts/bookmarks/bookmarks_widget.cpp | 4 +- parts/bookmarks/kdevbookmarks.desktop | 85 + parts/bookmarks/tdevbookmarks.desktop | 85 - parts/classview/CMakeLists.txt | 10 +- parts/classview/Makefile.am | 14 +- parts/classview/classtooldlg.cpp | 8 +- parts/classview/classtooldlg.h | 4 +- parts/classview/classtreebase.cpp | 26 +- parts/classview/classviewpart.cpp | 30 +- parts/classview/classviewpart.h | 12 +- parts/classview/classviewwidget.cpp | 26 +- parts/classview/classviewwidget.h | 4 +- parts/classview/hierarchydlg.cpp | 18 +- parts/classview/hierarchydlg.h | 4 +- parts/classview/kdevclassview.desktop | 82 + parts/classview/kdevclassview.rc | 20 + parts/classview/navigator.cpp | 6 +- parts/classview/tdevclassview.desktop | 82 - parts/classview/tdevclassview.rc | 20 - parts/ctags2/CMakeLists.txt | 8 +- parts/ctags2/Makefile.am | 14 +- parts/ctags2/ctags2_part.cpp | 34 +- parts/ctags2/ctags2_part.h | 8 +- parts/ctags2/ctags2_settingswidget.cpp | 4 +- parts/ctags2/ctags2_widget.cpp | 4 +- parts/ctags2/kdevctags2.desktop | 82 + parts/ctags2/kdevpart_ctags2.rc | 12 + parts/ctags2/tdevctags2.desktop | 82 - parts/ctags2/tdevpart_ctags2.rc | 12 - parts/diff/CMakeLists.txt | 8 +- parts/diff/Makefile.am | 14 +- parts/diff/diffpart.cpp | 22 +- parts/diff/diffpart.h | 6 +- parts/diff/diffwidget.cpp | 2 +- parts/diff/kdevdiff.desktop | 84 + parts/diff/kdevdiff.rc | 9 + parts/diff/tdevdiff.desktop | 84 - parts/diff/tdevdiff.rc | 9 - parts/distpart/CMakeLists.txt | 8 +- parts/distpart/Makefile.am | 14 +- parts/distpart/distpart_part.cpp | 16 +- parts/distpart/distpart_part.h | 8 +- parts/distpart/distpart_widget.cpp | 6 +- parts/distpart/distpart_widget.h | 2 +- parts/distpart/kdevdistpart.desktop | 70 + parts/distpart/kdevpart_distpart.rc | 8 + parts/distpart/specsupport.cpp | 12 +- parts/distpart/tdevdistpart.desktop | 70 - parts/distpart/tdevpart_distpart.rc | 8 - parts/documentation/CMakeLists.txt | 12 +- parts/documentation/KDevDocumentationIface.cpp | 83 + parts/documentation/KDevDocumentationIface.h | 53 + parts/documentation/Makefile.am | 18 +- parts/documentation/TDevDocumentationIface.cpp | 83 - parts/documentation/TDevDocumentationIface.h | 53 - parts/documentation/addcatalogdlg.cpp | 2 +- parts/documentation/bookmarkview.cpp | 6 +- parts/documentation/contentsview.cpp | 4 +- parts/documentation/data/CMakeLists.txt | 4 +- parts/documentation/data/Makefile.am | 4 +- parts/documentation/data/nomatch.html | 4 +- parts/documentation/data/syntax.html | 4 +- parts/documentation/data/wrapper.html | 6 +- parts/documentation/docconfiglistview.cpp | 2 +- parts/documentation/docglobalconfigwidget.cpp | 12 +- parts/documentation/docprojectconfigwidget.cpp | 10 +- parts/documentation/documentation_part.cpp | 111 +- parts/documentation/documentation_part.h | 9 +- parts/documentation/documentation_widget.cpp | 4 +- parts/documentation/documentation_widget.h | 2 +- parts/documentation/docutils.cpp | 4 +- parts/documentation/editcatalogdlg.cpp | 2 +- parts/documentation/find_documentation.cpp | 4 +- parts/documentation/indexview.cpp | 4 +- parts/documentation/interfaces/CMakeLists.txt | 4 +- parts/documentation/interfaces/Makefile.am | 10 +- .../interfaces/kdevdocumentationplugin.cpp | 721 ++++ .../interfaces/kdevdocumentationplugin.h | 423 ++ .../interfaces/tdevdocumentationplugin.cpp | 721 ---- .../interfaces/tdevdocumentationplugin.h | 423 -- parts/documentation/kdevdocumentation.desktop | 82 + parts/documentation/kdevpart_documentation.rc | 19 + parts/documentation/plugins/CMakeLists.txt | 2 +- parts/documentation/plugins/Makefile.am | 2 +- parts/documentation/plugins/chm/docchmplugin.cpp | 8 +- parts/documentation/plugins/chm/docchmplugin.h | 2 +- .../plugins/custom/doccustomplugin.cpp | 8 +- .../documentation/plugins/custom/doccustomplugin.h | 2 +- .../plugins/devhelp/docdevhelpplugin.cpp | 8 +- .../plugins/devhelp/docdevhelpplugin.h | 2 +- parts/documentation/plugins/djvu/docdjvuplugin.cpp | 4 +- parts/documentation/plugins/djvu/docdjvuplugin.h | 2 +- .../plugins/doxygen/docdoxygenplugin.cpp | 8 +- .../plugins/doxygen/docdoxygenplugin.h | 2 +- parts/documentation/plugins/kdevtoc/CMakeLists.txt | 39 + parts/documentation/plugins/kdevtoc/Makefile.am | 10 + .../plugins/kdevtoc/dockdevtocplugin.cpp | 277 ++ .../plugins/kdevtoc/dockdevtocplugin.desktop | 43 + .../plugins/kdevtoc/dockdevtocplugin.h | 55 + parts/documentation/plugins/pdb/docpdbplugin.cpp | 4 +- parts/documentation/plugins/pdb/docpdbplugin.h | 2 +- parts/documentation/plugins/pdf/docpdfplugin.cpp | 4 +- parts/documentation/plugins/pdf/docpdfplugin.h | 2 +- parts/documentation/plugins/qt/docqtplugin.cpp | 8 +- parts/documentation/plugins/qt/docqtplugin.h | 2 +- parts/documentation/plugins/tdevtoc/CMakeLists.txt | 39 - parts/documentation/plugins/tdevtoc/Makefile.am | 10 - .../plugins/tdevtoc/doctdevtocplugin.cpp | 277 -- .../plugins/tdevtoc/doctdevtocplugin.desktop | 43 - .../plugins/tdevtoc/doctdevtocplugin.h | 55 - parts/documentation/protocols/chm/CMakeLists.txt | 2 +- parts/documentation/protocols/chm/Makefile.am | 2 +- parts/documentation/protocols/chm/kchmpart.cpp | 4 +- parts/documentation/protocols/chm/kchmpart.h | 4 +- parts/documentation/searchview.cpp | 10 +- parts/documentation/selecttopic.h | 2 +- parts/documentation/tdevdocumentation.desktop | 82 - parts/documentation/tdevpart_documentation.rc | 20 - parts/documentation/tools/htdig/htdigindex.cpp | 20 +- parts/doxygen/CMakeLists.txt | 8 +- parts/doxygen/Makefile.am | 14 +- parts/doxygen/doxygenpart.cpp | 32 +- parts/doxygen/doxygenpart.h | 4 +- parts/doxygen/kdevdoxygen.desktop | 81 + parts/doxygen/kdevdoxygen.rc | 14 + parts/doxygen/tdevdoxygen.desktop | 81 - parts/doxygen/tdevdoxygen.rc | 14 - parts/filecreate/CMakeLists.txt | 8 +- parts/filecreate/Makefile.am | 14 +- parts/filecreate/README.dox | 8 +- parts/filecreate/fcconfigwidget.cpp | 32 +- parts/filecreate/file-templates/CMakeLists.txt | 2 +- parts/filecreate/file-templates/Makefile.am | 2 +- parts/filecreate/filecreate_filedialog.h | 4 +- parts/filecreate/filecreate_part.cpp | 62 +- parts/filecreate/filecreate_part.h | 14 +- parts/filecreate/filecreate_widget2.cpp | 4 +- parts/filecreate/filecreate_widget2.h | 2 +- parts/filecreate/filecreate_widget3.cpp | 6 +- parts/filecreate/filecreate_widget3.h | 2 +- parts/filecreate/kdevfilecreate.desktop | 77 + parts/filecreate/kdevpart_filecreate.rc | 11 + parts/filecreate/tdevfilecreate.desktop | 77 - parts/filecreate/tdevpart_filecreate.rc | 11 - parts/filecreate/template-info.xml | 4 +- parts/filelist/CMakeLists.txt | 8 +- parts/filelist/Makefile.am | 14 +- parts/filelist/filelist_item.h | 2 +- parts/filelist/filelist_widget.cpp | 4 +- parts/filelist/filelist_widget.h | 4 +- parts/filelist/kdevfilelist.desktop | 76 + parts/filelist/kdevfilelist.rc | 24 + parts/filelist/projectviewpart.cpp | 22 +- parts/filelist/projectviewpart.h | 10 +- parts/filelist/tdevfilelist.desktop | 76 - parts/filelist/tdevfilelist.rc | 24 - parts/fileselector/CMakeLists.txt | 6 +- parts/fileselector/Makefile.am | 14 +- parts/fileselector/fileselector_part.cpp | 36 +- parts/fileselector/fileselector_part.h | 12 +- parts/fileselector/fileselector_widget.cpp | 102 +- parts/fileselector/fileselector_widget.h | 44 +- parts/fileselector/kbookmarkhandler.cpp | 6 +- parts/fileselector/kbookmarkhandler.h | 4 +- parts/fileselector/kdevfileselector.desktop | 89 + parts/fileselector/kdevpart_fileselector.rc | 8 + parts/fileselector/tdevfileselector.desktop | 89 - parts/fileselector/tdevpart_fileselector.rc | 8 - parts/fileview/CMakeLists.txt | 10 +- parts/fileview/Makefile.am | 20 +- parts/fileview/filegroupsconfigwidget.cpp | 4 +- parts/fileview/filegroupspart.cpp | 18 +- parts/fileview/filegroupspart.h | 4 +- parts/fileview/filegroupswidget.cpp | 18 +- parts/fileview/filegroupswidget.h | 2 +- parts/fileview/filetreeviewwidgetimpl.cpp | 6 +- parts/fileview/filetreewidget.cpp | 18 +- parts/fileview/filetreewidget.h | 14 +- parts/fileview/fileviewpart.cpp | 26 +- parts/fileview/fileviewpart.h | 8 +- parts/fileview/kdevfilegroups.desktop | 86 + parts/fileview/kdevfileview.desktop | 85 + parts/fileview/partwidget.cpp | 10 +- parts/fileview/tdevfilegroups.desktop | 86 - parts/fileview/tdevfileview.desktop | 85 - parts/fileview/vcsfiletreewidgetimpl.cpp | 16 +- parts/fileview/vcsfiletreewidgetimpl.h | 8 +- parts/filter/CMakeLists.txt | 10 +- parts/filter/Makefile.am | 14 +- parts/filter/filterpart.cpp | 18 +- parts/filter/filterpart.h | 8 +- parts/filter/kdevfilter.desktop | 82 + parts/filter/kdevfilter.rc | 10 + parts/filter/kdevfilterIface.cpp | 35 + parts/filter/kdevfilterIface.h | 27 + parts/filter/shellfilterdlg.cpp | 2 +- parts/filter/shellfilterdlg.h | 2 +- parts/filter/shellinsertdlg.cpp | 2 +- parts/filter/shellinsertdlg.h | 2 +- parts/filter/tdevfilter.desktop | 82 - parts/filter/tdevfilter.rc | 10 - parts/filter/tdevfilterIface.cpp | 35 - parts/filter/tdevfilterIface.h | 27 - parts/fullscreen/CMakeLists.txt | 8 +- parts/fullscreen/Makefile.am | 14 +- parts/fullscreen/fullscreen_part.cpp | 20 +- parts/fullscreen/fullscreen_part.h | 8 +- parts/fullscreen/kdevfullscreen.desktop | 86 + parts/fullscreen/kdevpart_fullscreen.rc | 12 + parts/fullscreen/tdevfullscreen.desktop | 86 - parts/fullscreen/tdevpart_fullscreen.rc | 12 - parts/grepview/CMakeLists.txt | 10 +- parts/grepview/Makefile.am | 16 +- parts/grepview/grepdlg.cpp | 2 +- parts/grepview/grepviewpart.cpp | 28 +- parts/grepview/grepviewpart.h | 10 +- parts/grepview/grepviewwidget.cpp | 16 +- parts/grepview/grepviewwidget.h | 4 +- parts/grepview/kdevgrepview.desktop | 86 + parts/grepview/kdevgrepview.rc | 9 + parts/grepview/tdevgrepview.desktop | 86 - parts/grepview/tdevgrepview.rc | 9 - parts/konsole/CMakeLists.txt | 6 +- parts/konsole/Makefile.am | 12 +- parts/konsole/kdevkonsoleview.desktop | 86 + parts/konsole/konsoleviewpart.cpp | 22 +- parts/konsole/konsoleviewpart.h | 8 +- parts/konsole/konsoleviewwidget.cpp | 6 +- parts/konsole/konsoleviewwidget.h | 2 +- parts/konsole/tdevkonsoleview.desktop | 86 - parts/openwith/CMakeLists.txt | 6 +- parts/openwith/Makefile.am | 10 +- parts/openwith/kdevopenwith.desktop | 82 + parts/openwith/openwithpart.cpp | 16 +- parts/openwith/openwithpart.h | 4 +- parts/openwith/tdevopenwith.desktop | 82 - parts/outputviews/CMakeLists.txt | 26 +- parts/outputviews/Makefile.am | 32 +- parts/outputviews/appoutputviewpart.cpp | 28 +- parts/outputviews/appoutputviewpart.h | 10 +- parts/outputviews/appoutputwidget.cpp | 6 +- parts/outputviews/kdevappoutputview.desktop | 84 + parts/outputviews/kdevmakeview.desktop | 87 + parts/outputviews/kdevmakeview.rc | 9 + parts/outputviews/makeactionfilter.cpp | 24 +- parts/outputviews/makeviewpart.cpp | 28 +- parts/outputviews/makeviewpart.h | 10 +- parts/outputviews/makewidget.cpp | 8 +- parts/outputviews/outputviewsfactory.cpp | 6 +- parts/outputviews/outputviewsfactory.h | 8 +- parts/outputviews/tdevappoutputview.desktop | 84 - parts/outputviews/tdevmakeview.desktop | 87 - parts/outputviews/tdevmakeview.rc | 9 - parts/partexplorer/CMakeLists.txt | 8 +- parts/partexplorer/Makefile.am | 14 +- parts/partexplorer/kdevpartexplorer.desktop | 76 + parts/partexplorer/kdevpartexplorer.rc | 8 + parts/partexplorer/partexplorer_plugin.cpp | 16 +- parts/partexplorer/partexplorer_plugin.h | 4 +- parts/partexplorer/tdevpartexplorer.desktop | 76 - parts/partexplorer/tdevpartexplorer.rc | 8 - parts/quickopen/CMakeLists.txt | 8 +- parts/quickopen/Makefile.am | 14 +- parts/quickopen/kdevpart_quickopen.rc | 15 + parts/quickopen/kdevquickopen.desktop | 80 + parts/quickopen/quickopen_part.cpp | 28 +- parts/quickopen/quickopen_part.h | 6 +- parts/quickopen/quickopenclassdialog.cpp | 6 +- parts/quickopen/quickopenfiledialog.cpp | 4 +- parts/quickopen/quickopenfunctiondialog.cpp | 8 +- parts/quickopen/tdevpart_quickopen.rc | 15 - parts/quickopen/tdevquickopen.desktop | 80 - parts/regexptest/CMakeLists.txt | 8 +- parts/regexptest/Makefile.am | 14 +- parts/regexptest/kdevregexptest.desktop | 82 + parts/regexptest/kdevregexptest.rc | 9 + parts/regexptest/regexptestdlg.cpp | 6 +- parts/regexptest/regexptestdlg.h | 6 +- parts/regexptest/regexptestpart.cpp | 16 +- parts/regexptest/regexptestpart.h | 4 +- parts/regexptest/tdevregexptest.desktop | 82 - parts/regexptest/tdevregexptest.rc | 9 - parts/replace/CMakeLists.txt | 8 +- parts/replace/Makefile.am | 14 +- parts/replace/kdevpart_replace.rc | 8 + parts/replace/kdevreplace.desktop | 80 + parts/replace/replace_part.cpp | 18 +- parts/replace/replace_part.h | 8 +- parts/replace/replace_widget.cpp | 14 +- parts/replace/replace_widget.h | 2 +- parts/replace/tdevpart_replace.rc | 8 - parts/replace/tdevreplace.desktop | 80 - parts/scripting/CMakeLists.txt | 8 +- parts/scripting/Makefile.am | 16 +- parts/scripting/kdevscripting.desktop | 77 + parts/scripting/kdevscripting.rc | 8 + parts/scripting/scriptingpart.cpp | 18 +- parts/scripting/scriptingpart.h | 8 +- parts/scripting/tdevscripting.desktop | 77 - parts/scripting/tdevscripting.rc | 8 - parts/snippet/CMakeLists.txt | 8 +- parts/snippet/Makefile.am | 14 +- parts/snippet/kdevpart_snippet.rc | 8 + parts/snippet/kdevsnippet.desktop | 102 + parts/snippet/snippet_part.cpp | 20 +- parts/snippet/snippet_part.h | 10 +- parts/snippet/snippet_widget.cpp | 8 +- parts/snippet/snippet_widget.h | 2 +- parts/snippet/tdevpart_snippet.rc | 8 - parts/snippet/tdevsnippet.desktop | 102 - parts/texttools/CMakeLists.txt | 6 +- parts/texttools/Makefile.am | 14 +- parts/texttools/kdevtexttools.desktop | 84 + parts/texttools/tdevtexttools.desktop | 84 - parts/texttools/texttoolspart.cpp | 18 +- parts/texttools/texttoolspart.h | 4 +- parts/texttools/texttoolswidget.cpp | 4 +- parts/tipofday/CMakeLists.txt | 10 +- parts/tipofday/Makefile.am | 18 +- parts/tipofday/kdevpart_tipofday.rc | 8 + parts/tipofday/kdevtipofday.desktop | 94 + parts/tipofday/tdevpart_tipofday.rc | 8 - parts/tipofday/tdevtipofday.desktop | 94 - parts/tipofday/tipofday_part.cpp | 18 +- parts/tipofday/tipofday_part.h | 8 +- parts/tools/CMakeLists.txt | 8 +- parts/tools/Makefile.am | 14 +- parts/tools/addtooldlg.ui | 4 +- parts/tools/addtooldlg.ui.h | 2 +- parts/tools/kapplicationtree.cpp | 40 +- parts/tools/kapplicationtree.h | 20 +- parts/tools/kdevpart_tools.rc | 14 + parts/tools/kdevtools.desktop | 82 + parts/tools/tdevpart_tools.rc | 14 - parts/tools/tdevtools.desktop | 82 - parts/tools/tools_part.cpp | 26 +- parts/tools/tools_part.h | 12 +- parts/tools/toolsconfig.cpp | 4 +- parts/tools/toolsconfig.h | 4 +- parts/uimode/CMakeLists.txt | 6 +- parts/uimode/Makefile.am | 10 +- parts/uimode/kdevuichooser.desktop | 87 + parts/uimode/tdevuichooser.desktop | 87 - parts/uimode/uichooser_part.cpp | 14 +- parts/uimode/uichooser_part.h | 8 +- parts/uimode/uichooser_widget.cpp | 2 +- parts/valgrind/CMakeLists.txt | 8 +- parts/valgrind/Makefile.am | 14 +- parts/valgrind/kdevpart_valgrind.rc | 9 + parts/valgrind/kdevvalgrind.desktop | 74 + parts/valgrind/tdevpart_valgrind.rc | 9 - parts/valgrind/tdevvalgrind.desktop | 74 - parts/valgrind/valgrind_part.cpp | 26 +- parts/valgrind/valgrind_part.h | 10 +- parts/valgrind/valgrind_widget.cpp | 8 +- parts/vcsmanager/CMakeLists.txt | 6 +- parts/vcsmanager/Makefile.am | 14 +- parts/vcsmanager/kdevvcsmanager.desktop | 65 + parts/vcsmanager/tdevvcsmanager.desktop | 65 - parts/vcsmanager/vcsmanagerpart.cpp | 20 +- parts/vcsmanager/vcsmanagerpart.h | 8 +- pics/hi16-app-kdevassistant.png | Bin 0 -> 1285 bytes pics/hi16-app-kdevdesigner.png | Bin 0 -> 1372 bytes pics/hi16-app-tdevassistant.png | Bin 1285 -> 0 bytes pics/hi16-app-tdevdesigner.png | Bin 1372 -> 0 bytes pics/hi32-app-kdevassistant.png | Bin 0 -> 1970 bytes pics/hi32-app-kdevdesigner.png | Bin 0 -> 2060 bytes pics/hi32-app-tdevassistant.png | Bin 1970 -> 0 bytes pics/hi32-app-tdevdesigner.png | Bin 2060 -> 0 bytes pics/hi48-app-kdevassistant.png | Bin 0 -> 2654 bytes pics/hi48-app-kdevdesigner.png | Bin 0 -> 2853 bytes pics/hi48-app-tdevassistant.png | Bin 2654 -> 0 bytes pics/hi48-app-tdevdesigner.png | Bin 2853 -> 0 bytes pics/mini/CMakeLists.txt | 2 +- pics/mini/Makefile.am | 2 +- pics/misc/CMakeLists.txt | 4 +- pics/misc/Makefile.am | 4 +- pics/misc/kdevassistant-splash.png | Bin 0 -> 50809 bytes pics/misc/kdevdesigner-splash.png | Bin 0 -> 48331 bytes pics/misc/tdevassistant-splash.png | Bin 50809 -> 0 bytes pics/misc/tdevdesigner-splash.png | Bin 48331 -> 0 bytes pics/toolbar/CMakeLists.txt | 8 +- pics/toolbar/Makefile.am | 12 +- src/CMakeLists.txt | 24 +- src/Mainpage.dox | 4 +- src/Makefile.am | 36 +- src/api.cpp | 10 +- src/api.h | 12 +- src/core.cpp | 4 +- src/core.h | 10 +- src/documentationpart.cpp | 2 +- src/documentationpart.h | 6 +- src/editorproxy.cpp | 10 +- src/eventsrc | 2 +- src/kdevassistantextension.cpp | 40 + src/kdevassistantextension.h | 41 + src/kdevassistantrc | 14 + src/kdevassistantui.rc | 168 + src/kdevideextension.cpp | 129 + src/kdevideextension.h | 45 + src/kdevpluginprofilerc | 52 + src/languageselectwidget.cpp | 2 +- src/main.cpp | 8 +- src/main_assistant.cpp | 14 +- src/mainwindowshare.cpp | 18 +- src/mainwindowshare.h | 4 +- src/multibuffer.cpp | 4 +- src/partcontroller.cpp | 26 +- src/partcontroller.h | 6 +- src/plugincontroller.cpp | 62 +- src/plugincontroller.h | 22 +- src/pluginselectdialog.cpp | 6 +- src/profileengine/editor/CMakeLists.txt | 4 +- src/profileengine/editor/Makefile.am | 8 +- src/profileengine/editor/main.cpp | 2 +- src/profileengine/lib/Makefile.am | 6 +- src/profileengine/lib/profileengine.cpp | 2 +- src/profileengine/lib/profileengine.h | 16 +- src/profiles/CMakeLists.txt | 2 +- .../CandCppIDE/CppIDE/CMakeLists.txt | 2 +- .../CandCppIDE/CppIDE/KDECppIDE/CMakeLists.txt | 14 + .../CandCppIDE/CppIDE/KDECppIDE/Makefile.am | 3 + .../CandCppIDE/CppIDE/KDECppIDE/profile.config | 12 + .../CandCppIDE/CppIDE/Makefile.am | 2 +- .../CandCppIDE/CppIDE/TDECppIDE/CMakeLists.txt | 14 - .../CandCppIDE/CppIDE/TDECppIDE/Makefile.am | 3 - .../CandCppIDE/CppIDE/TDECppIDE/profile.config | 12 - .../ScriptingLanguageIDE/RubyIDE/profile.config | 2 +- src/profiles/KDevAssistant/CMakeLists.txt | 14 + src/profiles/KDevAssistant/Makefile.am | 3 + src/profiles/KDevAssistant/profile.config | 12 + src/profiles/Makefile.am | 2 +- src/profiles/TDevAssistant/CMakeLists.txt | 14 - src/profiles/TDevAssistant/Makefile.am | 3 - src/profiles/TDevAssistant/profile.config | 12 - src/projectmanager.cpp | 32 +- src/projectmanager.h | 6 +- src/projectprofiles | 4 +- src/projectsession.cpp | 14 +- src/projectsession.h | 6 +- src/simplemainwindow.cpp | 8 +- src/simplemainwindow.h | 8 +- src/splashscreen.cpp | 10 +- src/splashscreen.h | 6 +- src/statusbar.cpp | 14 +- src/statusbar.h | 6 +- src/tdeconf_update/CMakeLists.txt | 8 +- src/tdeconf_update/Makefile.am | 10 +- .../kdev-gen-settings-tdeconf_update.cpp | 113 + src/tdeconf_update/kdev-gen-settings.upd | 8 + .../tdev-gen-settings-tdeconf_update.cpp | 113 - src/tdeconf_update/tdev-gen-settings.upd | 8 - src/tdevassistantextension.cpp | 40 - src/tdevassistantextension.h | 41 - src/tdevassistantrc | 14 - src/tdevassistantui.rc | 168 - src/tdevideextension.cpp | 129 - src/tdevideextension.h | 45 - src/tdevpluginprofilerc | 52 - src/toplevel.cpp | 6 +- src/toplevel.h | 10 +- tde_app_devel.desktop | 6 - tdevassistant.desktop | 73 - tdevdesigner/AUTHORS | 4 - tdevdesigner/CMakeLists.txt | 15 - tdevdesigner/LICENSE.GPL | 340 -- tdevdesigner/Makefile.am | 4 - tdevdesigner/NEWS | 1 - tdevdesigner/README | 25 - tdevdesigner/TODO | 1 - tdevdesigner/designer/CMakeLists.txt | 107 - tdevdesigner/designer/Makefile.am | 21 - tdevdesigner/designer/about.ui | 219 - tdevdesigner/designer/actiondnd.cpp | 728 ---- tdevdesigner/designer/actiondnd.h | 254 -- tdevdesigner/designer/actioneditor.ui | 227 - tdevdesigner/designer/actioneditorimpl.cpp | 321 -- tdevdesigner/designer/actioneditorimpl.h | 82 - tdevdesigner/designer/actionlistview.cpp | 110 - tdevdesigner/designer/actionlistview.h | 82 - tdevdesigner/designer/asciivalidator.cpp | 94 - tdevdesigner/designer/asciivalidator.h | 53 - tdevdesigner/designer/command.cpp | 2475 ----------- tdevdesigner/designer/command.h | 1260 ------ tdevdesigner/designer/configtoolboxdialog.ui | 326 -- tdevdesigner/designer/configtoolboxdialog.ui.h | 215 - tdevdesigner/designer/connectiondialog.ui | 219 - tdevdesigner/designer/connectiondialog.ui.h | 318 -- tdevdesigner/designer/connectionitems.cpp | 517 --- tdevdesigner/designer/connectionitems.h | 226 - tdevdesigner/designer/connectiontable.cpp | 56 - tdevdesigner/designer/connectiontable.h | 47 - tdevdesigner/designer/createtemplate.ui | 195 - tdevdesigner/designer/customwidgeteditor.ui | 1378 ------- tdevdesigner/designer/customwidgeteditorimpl.cpp | 842 ---- tdevdesigner/designer/customwidgeteditorimpl.h | 99 - tdevdesigner/designer/database.cpp | 122 - tdevdesigner/designer/database.h | 85 - tdevdesigner/designer/dbconnection.ui | 222 - tdevdesigner/designer/dbconnectioneditor.ui | 147 - tdevdesigner/designer/dbconnectionimpl.cpp | 80 - tdevdesigner/designer/dbconnectionimpl.h | 58 - tdevdesigner/designer/dbconnections.ui | 321 -- tdevdesigner/designer/dbconnectionsimpl.cpp | 196 - tdevdesigner/designer/dbconnectionsimpl.h | 61 - tdevdesigner/designer/defs.cpp | 84 - tdevdesigner/designer/defs.h | 42 - tdevdesigner/designer/designer_pch.h | 44 - tdevdesigner/designer/designeraction.cpp | 38 - tdevdesigner/designer/designeraction.h | 52 - tdevdesigner/designer/designerapp.cpp | 176 - tdevdesigner/designer/designerapp.h | 58 - tdevdesigner/designer/designerappiface.cpp | 1093 ----- tdevdesigner/designer/designerappiface.h | 277 -- tdevdesigner/designer/editfunctions.ui | 714 ---- tdevdesigner/designer/editfunctionsimpl.cpp | 534 --- tdevdesigner/designer/editfunctionsimpl.h | 95 - tdevdesigner/designer/filechooser.cpp | 90 - tdevdesigner/designer/filechooser.h | 69 - tdevdesigner/designer/finddialog.ui | 274 -- tdevdesigner/designer/finddialog.ui.h | 61 - tdevdesigner/designer/formfile.cpp | 905 ---- tdevdesigner/designer/formfile.h | 146 - tdevdesigner/designer/formsettings.ui | 549 --- tdevdesigner/designer/formsettingsimpl.cpp | 118 - tdevdesigner/designer/formsettingsimpl.h | 50 - tdevdesigner/designer/formwindow.cpp | 2773 ------------- tdevdesigner/designer/formwindow.h | 323 -- tdevdesigner/designer/gotolinedialog.ui | 169 - tdevdesigner/designer/gotolinedialog.ui.h | 50 - tdevdesigner/designer/hierarchyview.cpp | 1508 ------- tdevdesigner/designer/hierarchyview.h | 252 -- tdevdesigner/designer/iconvieweditor.ui | 461 --- tdevdesigner/designer/iconvieweditorimpl.cpp | 165 - tdevdesigner/designer/iconvieweditorimpl.h | 59 - tdevdesigner/designer/layout.cpp | 1017 ----- tdevdesigner/designer/layout.h | 191 - tdevdesigner/designer/listboxdnd.cpp | 305 -- tdevdesigner/designer/listboxdnd.h | 64 - tdevdesigner/designer/listboxeditor.ui | 457 --- tdevdesigner/designer/listboxeditorimpl.cpp | 245 -- tdevdesigner/designer/listboxeditorimpl.h | 62 - tdevdesigner/designer/listboxrename.cpp | 157 - tdevdesigner/designer/listboxrename.h | 58 - tdevdesigner/designer/listdnd.cpp | 142 - tdevdesigner/designer/listdnd.h | 64 - tdevdesigner/designer/listeditor.ui | 179 - tdevdesigner/designer/listeditor.ui.h | 72 - tdevdesigner/designer/listviewdnd.cpp | 432 -- tdevdesigner/designer/listviewdnd.h | 67 - tdevdesigner/designer/listvieweditor.ui | 935 ----- tdevdesigner/designer/listvieweditorimpl.cpp | 650 --- tdevdesigner/designer/listvieweditorimpl.h | 103 - tdevdesigner/designer/mainwindow.cpp | 3784 ----------------- tdevdesigner/designer/mainwindow.h | 513 --- tdevdesigner/designer/mainwindowactions.cpp | 2067 ---------- tdevdesigner/designer/menubareditor.cpp | 1129 ----- tdevdesigner/designer/menubareditor.h | 200 - tdevdesigner/designer/metadatabase.cpp | 1692 -------- tdevdesigner/designer/metadatabase.h | 269 -- tdevdesigner/designer/multilineeditor.ui | 181 - tdevdesigner/designer/multilineeditorimpl.cpp | 415 -- tdevdesigner/designer/multilineeditorimpl.h | 112 - tdevdesigner/designer/myiconloader.cpp | 32 - tdevdesigner/designer/myiconloader.h | 32 - tdevdesigner/designer/newform.ui | 238 -- tdevdesigner/designer/newformimpl.cpp | 414 -- tdevdesigner/designer/newformimpl.h | 165 - tdevdesigner/designer/orderindicator.cpp | 112 - tdevdesigner/designer/orderindicator.h | 58 - tdevdesigner/designer/outputwindow.cpp | 209 - tdevdesigner/designer/outputwindow.h | 99 - tdevdesigner/designer/paletteeditor.ui | 496 --- tdevdesigner/designer/paletteeditoradvanced.ui | 748 ---- .../designer/paletteeditoradvancedimpl.cpp | 643 --- tdevdesigner/designer/paletteeditoradvancedimpl.h | 97 - tdevdesigner/designer/paletteeditorimpl.cpp | 304 -- tdevdesigner/designer/paletteeditorimpl.h | 77 - tdevdesigner/designer/pics/CMakeLists.txt | 85 - tdevdesigner/designer/pics/Makefile.am | 2 - tdevdesigner/designer/pics/designer_adjustsize.png | Bin 495 -> 0 bytes tdevdesigner/designer/pics/designer_appicon.png | Bin 2341 -> 0 bytes tdevdesigner/designer/pics/designer_arrow.png | Bin 217 -> 0 bytes tdevdesigner/designer/pics/designer_background.png | Bin 6724 -> 0 bytes tdevdesigner/designer/pics/designer_book.png | Bin 825 -> 0 bytes .../designer/pics/designer_buttongroup.png | Bin 648 -> 0 bytes tdevdesigner/designer/pics/designer_checkbox.png | Bin 817 -> 0 bytes tdevdesigner/designer/pics/designer_combobox.png | Bin 549 -> 0 bytes .../designer/pics/designer_connecttool.png | Bin 553 -> 0 bytes tdevdesigner/designer/pics/designer_cross.png | Bin 164 -> 0 bytes .../designer/pics/designer_customwidget.png | Bin 1133 -> 0 bytes .../designer/pics/designer_d_adjustsize.png | Bin 529 -> 0 bytes tdevdesigner/designer/pics/designer_d_book.png | Bin 561 -> 0 bytes .../designer/pics/designer_d_buttongroup.png | Bin 482 -> 0 bytes tdevdesigner/designer/pics/designer_d_checkbox.png | Bin 547 -> 0 bytes tdevdesigner/designer/pics/designer_d_combobox.png | Bin 420 -> 0 bytes .../designer/pics/designer_d_connecttool.png | Bin 450 -> 0 bytes .../designer/pics/designer_d_customwidget.png | Bin 629 -> 0 bytes .../designer/pics/designer_d_databrowser.png | Bin 603 -> 0 bytes .../designer/pics/designer_d_datatable.png | Bin 592 -> 0 bytes tdevdesigner/designer/pics/designer_d_dataview.png | Bin 663 -> 0 bytes tdevdesigner/designer/pics/designer_d_dateedit.png | Bin 452 -> 0 bytes .../designer/pics/designer_d_datetimeedit.png | Bin 669 -> 0 bytes tdevdesigner/designer/pics/designer_d_dial.png | Bin 706 -> 0 bytes tdevdesigner/designer/pics/designer_d_down.png | Bin 441 -> 0 bytes .../designer/pics/designer_d_editbreaklayout.png | Bin 635 -> 0 bytes tdevdesigner/designer/pics/designer_d_editcopy.png | Bin 517 -> 0 bytes tdevdesigner/designer/pics/designer_d_editcut.png | Bin 800 -> 0 bytes .../designer/pics/designer_d_editdelete.png | Bin 684 -> 0 bytes tdevdesigner/designer/pics/designer_d_editgrid.png | Bin 425 -> 0 bytes .../designer/pics/designer_d_edithlayout.png | Bin 272 -> 0 bytes .../designer/pics/designer_d_edithlayoutsplit.png | Bin 328 -> 0 bytes .../designer/pics/designer_d_editlower.png | Bin 453 -> 0 bytes .../designer/pics/designer_d_editpaste.png | Bin 599 -> 0 bytes .../designer/pics/designer_d_editraise.png | Bin 454 -> 0 bytes .../designer/pics/designer_d_editslots.png | Bin 535 -> 0 bytes .../designer/pics/designer_d_editvlayout.png | Bin 272 -> 0 bytes .../designer/pics/designer_d_editvlayoutsplit.png | Bin 333 -> 0 bytes tdevdesigner/designer/pics/designer_d_filenew.png | Bin 298 -> 0 bytes tdevdesigner/designer/pics/designer_d_fileopen.png | Bin 407 -> 0 bytes tdevdesigner/designer/pics/designer_d_filesave.png | Bin 267 -> 0 bytes tdevdesigner/designer/pics/designer_d_folder.png | Bin 841 -> 0 bytes tdevdesigner/designer/pics/designer_d_form.png | Bin 274 -> 0 bytes tdevdesigner/designer/pics/designer_d_frame.png | Bin 427 -> 0 bytes tdevdesigner/designer/pics/designer_d_groupbox.png | Bin 465 -> 0 bytes tdevdesigner/designer/pics/designer_d_help.png | Bin 786 -> 0 bytes tdevdesigner/designer/pics/designer_d_home.png | Bin 743 -> 0 bytes tdevdesigner/designer/pics/designer_d_iconview.png | Bin 548 -> 0 bytes tdevdesigner/designer/pics/designer_d_image.png | Bin 482 -> 0 bytes tdevdesigner/designer/pics/designer_d_label.png | Bin 670 -> 0 bytes tdevdesigner/designer/pics/designer_d_layout.png | Bin 497 -> 0 bytes .../designer/pics/designer_d_lcdnumber.png | Bin 452 -> 0 bytes tdevdesigner/designer/pics/designer_d_left.png | Bin 422 -> 0 bytes tdevdesigner/designer/pics/designer_d_line.png | Bin 327 -> 0 bytes tdevdesigner/designer/pics/designer_d_lineedit.png | Bin 445 -> 0 bytes tdevdesigner/designer/pics/designer_d_listbox.png | Bin 410 -> 0 bytes tdevdesigner/designer/pics/designer_d_listview.png | Bin 640 -> 0 bytes .../designer/pics/designer_d_multilineedit.png | Bin 482 -> 0 bytes tdevdesigner/designer/pics/designer_d_newform.png | Bin 443 -> 0 bytes .../designer/pics/designer_d_ordertool.png | Bin 533 -> 0 bytes tdevdesigner/designer/pics/designer_d_pixlabel.png | Bin 619 -> 0 bytes tdevdesigner/designer/pics/designer_d_pointer.png | Bin 476 -> 0 bytes tdevdesigner/designer/pics/designer_d_print.png | Bin 593 -> 0 bytes tdevdesigner/designer/pics/designer_d_progress.png | Bin 375 -> 0 bytes tdevdesigner/designer/pics/designer_d_project.png | Bin 915 -> 0 bytes .../designer/pics/designer_d_pushbutton.png | Bin 445 -> 0 bytes .../designer/pics/designer_d_radiobutton.png | Bin 605 -> 0 bytes tdevdesigner/designer/pics/designer_d_redo.png | Bin 465 -> 0 bytes .../designer/pics/designer_d_richtextedit.png | Bin 562 -> 0 bytes tdevdesigner/designer/pics/designer_d_right.png | Bin 425 -> 0 bytes .../designer/pics/designer_d_scrollbar.png | Bin 364 -> 0 bytes .../designer/pics/designer_d_searchfind.png | Bin 501 -> 0 bytes tdevdesigner/designer/pics/designer_d_setbuddy.png | Bin 427 -> 0 bytes tdevdesigner/designer/pics/designer_d_slider.png | Bin 548 -> 0 bytes tdevdesigner/designer/pics/designer_d_spacer.png | Bin 519 -> 0 bytes tdevdesigner/designer/pics/designer_d_spinbox.png | Bin 477 -> 0 bytes tdevdesigner/designer/pics/designer_d_table.png | Bin 512 -> 0 bytes .../designer/pics/designer_d_tabwidget.png | Bin 404 -> 0 bytes tdevdesigner/designer/pics/designer_d_textbold.png | Bin 519 -> 0 bytes .../designer/pics/designer_d_textbrowser.png | Bin 534 -> 0 bytes .../designer/pics/designer_d_textcenter.png | Bin 453 -> 0 bytes tdevdesigner/designer/pics/designer_d_textedit.png | Bin 526 -> 0 bytes tdevdesigner/designer/pics/designer_d_textfont.png | Bin 412 -> 0 bytes tdevdesigner/designer/pics/designer_d_texth1.png | Bin 476 -> 0 bytes tdevdesigner/designer/pics/designer_d_texth2.png | Bin 537 -> 0 bytes tdevdesigner/designer/pics/designer_d_texth3.png | Bin 509 -> 0 bytes .../designer/pics/designer_d_textitalic.png | Bin 454 -> 0 bytes .../designer/pics/designer_d_textjustify.png | Bin 442 -> 0 bytes .../designer/pics/designer_d_textlarger.png | Bin 537 -> 0 bytes tdevdesigner/designer/pics/designer_d_textleft.png | Bin 443 -> 0 bytes .../designer/pics/designer_d_textlinebreak.png | Bin 528 -> 0 bytes .../designer/pics/designer_d_textparagraph.png | Bin 543 -> 0 bytes .../designer/pics/designer_d_textright.png | Bin 445 -> 0 bytes .../designer/pics/designer_d_textsmaller.png | Bin 513 -> 0 bytes .../designer/pics/designer_d_textteletext.png | Bin 463 -> 0 bytes .../designer/pics/designer_d_textunderline.png | Bin 498 -> 0 bytes tdevdesigner/designer/pics/designer_d_textview.png | Bin 529 -> 0 bytes tdevdesigner/designer/pics/designer_d_timeedit.png | Bin 827 -> 0 bytes tdevdesigner/designer/pics/designer_d_toolbox.png | Bin 465 -> 0 bytes .../designer/pics/designer_d_toolbutton.png | Bin 670 -> 0 bytes tdevdesigner/designer/pics/designer_d_undo.png | Bin 471 -> 0 bytes tdevdesigner/designer/pics/designer_d_up.png | Bin 444 -> 0 bytes .../designer/pics/designer_d_widgetstack.png | Bin 558 -> 0 bytes .../designer/pics/designer_d_wizarddata.png | Bin 294 -> 0 bytes .../designer/pics/designer_d_wizarddialog.png | Bin 421 -> 0 bytes tdevdesigner/designer/pics/designer_d_wordwrap.png | Bin 507 -> 0 bytes .../designer/pics/designer_databrowser.png | Bin 907 -> 0 bytes tdevdesigner/designer/pics/designer_datatable.png | Bin 923 -> 0 bytes tdevdesigner/designer/pics/designer_dataview.png | Bin 1039 -> 0 bytes tdevdesigner/designer/pics/designer_dateedit.png | Bin 505 -> 0 bytes .../designer/pics/designer_datetimeedit.png | Bin 1074 -> 0 bytes tdevdesigner/designer/pics/designer_dial.png | Bin 1024 -> 0 bytes tdevdesigner/designer/pics/designer_down.png | Bin 595 -> 0 bytes .../designer/pics/designer_editbreaklayout.png | Bin 744 -> 0 bytes tdevdesigner/designer/pics/designer_editcopy.png | Bin 485 -> 0 bytes tdevdesigner/designer/pics/designer_editcut.png | Bin 649 -> 0 bytes tdevdesigner/designer/pics/designer_editdelete.png | Bin 833 -> 0 bytes tdevdesigner/designer/pics/designer_editgrid.png | Bin 520 -> 0 bytes .../designer/pics/designer_edithlayout.png | Bin 295 -> 0 bytes .../designer/pics/designer_edithlayoutsplit.png | Bin 344 -> 0 bytes tdevdesigner/designer/pics/designer_editlower.png | Bin 609 -> 0 bytes tdevdesigner/designer/pics/designer_editpaste.png | Bin 907 -> 0 bytes tdevdesigner/designer/pics/designer_editraise.png | Bin 614 -> 0 bytes tdevdesigner/designer/pics/designer_editslots.png | Bin 690 -> 0 bytes .../designer/pics/designer_editvlayout.png | Bin 289 -> 0 bytes .../designer/pics/designer_editvlayoutsplit.png | Bin 355 -> 0 bytes tdevdesigner/designer/pics/designer_filenew.png | Bin 313 -> 0 bytes tdevdesigner/designer/pics/designer_fileopen.png | Bin 681 -> 0 bytes tdevdesigner/designer/pics/designer_filesave.png | Bin 328 -> 0 bytes tdevdesigner/designer/pics/designer_folder.png | Bin 1368 -> 0 bytes tdevdesigner/designer/pics/designer_form.png | Bin 301 -> 0 bytes tdevdesigner/designer/pics/designer_frame.png | Bin 400 -> 0 bytes tdevdesigner/designer/pics/designer_groupbox.png | Bin 439 -> 0 bytes tdevdesigner/designer/pics/designer_hand.png | Bin 198 -> 0 bytes tdevdesigner/designer/pics/designer_help.png | Bin 1561 -> 0 bytes tdevdesigner/designer/pics/designer_home.png | Bin 1083 -> 0 bytes tdevdesigner/designer/pics/designer_hsplit.png | Bin 203 -> 0 bytes tdevdesigner/designer/pics/designer_ibeam.png | Bin 162 -> 0 bytes tdevdesigner/designer/pics/designer_iconview.png | Bin 613 -> 0 bytes tdevdesigner/designer/pics/designer_image.png | Bin 769 -> 0 bytes tdevdesigner/designer/pics/designer_label.png | Bin 953 -> 0 bytes tdevdesigner/designer/pics/designer_layout.png | Bin 706 -> 0 bytes tdevdesigner/designer/pics/designer_lcdnumber.png | Bin 558 -> 0 bytes tdevdesigner/designer/pics/designer_left.png | Bin 678 -> 0 bytes tdevdesigner/designer/pics/designer_line.png | Bin 287 -> 0 bytes tdevdesigner/designer/pics/designer_lineedit.png | Bin 405 -> 0 bytes tdevdesigner/designer/pics/designer_listbox.png | Bin 386 -> 0 bytes tdevdesigner/designer/pics/designer_listview.png | Bin 759 -> 0 bytes .../designer/pics/designer_multilineedit.png | Bin 454 -> 0 bytes tdevdesigner/designer/pics/designer_newform.png | Bin 531 -> 0 bytes tdevdesigner/designer/pics/designer_no.png | Bin 230 -> 0 bytes tdevdesigner/designer/pics/designer_object.png | Bin 1065 -> 0 bytes tdevdesigner/designer/pics/designer_ordertool.png | Bin 587 -> 0 bytes tdevdesigner/designer/pics/designer_pixlabel.png | Bin 1229 -> 0 bytes tdevdesigner/designer/pics/designer_pointer.png | Bin 586 -> 0 bytes tdevdesigner/designer/pics/designer_print.png | Bin 742 -> 0 bytes tdevdesigner/designer/pics/designer_progress.png | Bin 559 -> 0 bytes tdevdesigner/designer/pics/designer_project.png | Bin 1275 -> 0 bytes tdevdesigner/designer/pics/designer_pushbutton.png | Bin 408 -> 0 bytes tdevdesigner/designer/pics/designer_qtlogo.png | Bin 12615 -> 0 bytes .../designer/pics/designer_radiobutton.png | Bin 586 -> 0 bytes tdevdesigner/designer/pics/designer_redo.png | Bin 592 -> 0 bytes .../designer/pics/designer_resetproperty.png | Bin 184 -> 0 bytes .../designer/pics/designer_richtextedit.png | Bin 834 -> 0 bytes tdevdesigner/designer/pics/designer_right.png | Bin 656 -> 0 bytes tdevdesigner/designer/pics/designer_s_down.png | Bin 574 -> 0 bytes tdevdesigner/designer/pics/designer_s_editcut.png | Bin 444 -> 0 bytes tdevdesigner/designer/pics/designer_s_left.png | Bin 564 -> 0 bytes tdevdesigner/designer/pics/designer_s_right.png | Bin 557 -> 0 bytes tdevdesigner/designer/pics/designer_s_up.png | Bin 586 -> 0 bytes tdevdesigner/designer/pics/designer_scrollbar.png | Bin 408 -> 0 bytes tdevdesigner/designer/pics/designer_searchfind.png | Bin 843 -> 0 bytes tdevdesigner/designer/pics/designer_setbuddy.png | Bin 428 -> 0 bytes tdevdesigner/designer/pics/designer_sizeall.png | Bin 208 -> 0 bytes tdevdesigner/designer/pics/designer_sizeb.png | Bin 203 -> 0 bytes tdevdesigner/designer/pics/designer_sizef.png | Bin 203 -> 0 bytes tdevdesigner/designer/pics/designer_sizeh.png | Bin 179 -> 0 bytes tdevdesigner/designer/pics/designer_sizev.png | Bin 177 -> 0 bytes tdevdesigner/designer/pics/designer_slider.png | Bin 729 -> 0 bytes tdevdesigner/designer/pics/designer_spacer.png | Bin 715 -> 0 bytes tdevdesigner/designer/pics/designer_spinbox.png | Bin 455 -> 0 bytes tdevdesigner/designer/pics/designer_splash.png | Bin 123917 -> 0 bytes tdevdesigner/designer/pics/designer_table.png | Bin 483 -> 0 bytes tdevdesigner/designer/pics/designer_tabwidget.png | Bin 572 -> 0 bytes tdevdesigner/designer/pics/designer_textbold.png | Bin 498 -> 0 bytes .../designer/pics/designer_textbrowser.png | Bin 514 -> 0 bytes tdevdesigner/designer/pics/designer_textcenter.png | Bin 429 -> 0 bytes tdevdesigner/designer/pics/designer_textedit.png | Bin 497 -> 0 bytes tdevdesigner/designer/pics/designer_textfont.png | Bin 494 -> 0 bytes tdevdesigner/designer/pics/designer_texth1.png | Bin 462 -> 0 bytes tdevdesigner/designer/pics/designer_texth2.png | Bin 512 -> 0 bytes tdevdesigner/designer/pics/designer_texth3.png | Bin 486 -> 0 bytes tdevdesigner/designer/pics/designer_textitalic.png | Bin 442 -> 0 bytes .../designer/pics/designer_textjustify.png | Bin 409 -> 0 bytes tdevdesigner/designer/pics/designer_textlarger.png | Bin 733 -> 0 bytes tdevdesigner/designer/pics/designer_textleft.png | Bin 411 -> 0 bytes .../designer/pics/designer_textlinebreak.png | Bin 509 -> 0 bytes .../designer/pics/designer_textparagraph.png | Bin 527 -> 0 bytes tdevdesigner/designer/pics/designer_textright.png | Bin 410 -> 0 bytes .../designer/pics/designer_textsmaller.png | Bin 677 -> 0 bytes .../designer/pics/designer_textteletext.png | Bin 445 -> 0 bytes .../designer/pics/designer_textunderline.png | Bin 471 -> 0 bytes tdevdesigner/designer/pics/designer_textview.png | Bin 498 -> 0 bytes tdevdesigner/designer/pics/designer_timeedit.png | Bin 1520 -> 0 bytes tdevdesigner/designer/pics/designer_toolbox.png | Bin 783 -> 0 bytes tdevdesigner/designer/pics/designer_toolbutton.png | Bin 1262 -> 0 bytes tdevdesigner/designer/pics/designer_undo.png | Bin 572 -> 0 bytes tdevdesigner/designer/pics/designer_up.png | Bin 692 -> 0 bytes tdevdesigner/designer/pics/designer_uparrow.png | Bin 169 -> 0 bytes tdevdesigner/designer/pics/designer_vsplit.png | Bin 192 -> 0 bytes tdevdesigner/designer/pics/designer_wait.png | Bin 216 -> 0 bytes .../designer/pics/designer_widgetstack.png | Bin 831 -> 0 bytes tdevdesigner/designer/pics/designer_wizarddata.png | Bin 323 -> 0 bytes .../designer/pics/designer_wizarddialog.png | Bin 632 -> 0 bytes tdevdesigner/designer/pics/designer_wordwrap.png | Bin 643 -> 0 bytes tdevdesigner/designer/pixmapchooser.cpp | 231 -- tdevdesigner/designer/pixmapchooser.h | 74 - tdevdesigner/designer/pixmapcollection.cpp | 180 - tdevdesigner/designer/pixmapcollection.h | 80 - tdevdesigner/designer/pixmapcollectioneditor.ui | 218 - tdevdesigner/designer/pixmapcollectioneditor.ui.h | 150 - tdevdesigner/designer/pixmapfunction.ui | 976 ----- tdevdesigner/designer/popupmenueditor.cpp | 1469 ------- tdevdesigner/designer/popupmenueditor.h | 237 -- tdevdesigner/designer/preferences.ui | 648 --- tdevdesigner/designer/previewframe.cpp | 57 - tdevdesigner/designer/previewframe.h | 61 - tdevdesigner/designer/previewwidget.ui | 304 -- tdevdesigner/designer/previewwidgetimpl.cpp | 65 - tdevdesigner/designer/previewwidgetimpl.h | 44 - tdevdesigner/designer/project.cpp | 1558 ------- tdevdesigner/designer/project.h | 274 -- tdevdesigner/designer/projectsettings.ui | 301 -- tdevdesigner/designer/projectsettingsimpl.cpp | 126 - tdevdesigner/designer/projectsettingsimpl.h | 57 - tdevdesigner/designer/propertyeditor.cpp | 4332 -------------------- tdevdesigner/designer/propertyeditor.h | 891 ---- tdevdesigner/designer/propertyobject.cpp | 158 - tdevdesigner/designer/propertyobject.h | 43 - tdevdesigner/designer/qcompletionedit.cpp | 210 - tdevdesigner/designer/qcompletionedit.h | 80 - tdevdesigner/designer/replacedialog.ui | 318 -- tdevdesigner/designer/replacedialog.ui.h | 75 - tdevdesigner/designer/resource.cpp | 3328 --------------- tdevdesigner/designer/resource.h | 165 - tdevdesigner/designer/richtextfontdialog.ui | 347 -- tdevdesigner/designer/richtextfontdialog.ui.h | 49 - tdevdesigner/designer/sizehandle.cpp | 388 -- tdevdesigner/designer/sizehandle.h | 98 - tdevdesigner/designer/sourceeditor.cpp | 320 -- tdevdesigner/designer/sourceeditor.h | 107 - tdevdesigner/designer/sourcefile.cpp | 298 -- tdevdesigner/designer/sourcefile.h | 87 - tdevdesigner/designer/startdialog.ui | 324 -- tdevdesigner/designer/startdialogimpl.cpp | 182 - tdevdesigner/designer/startdialogimpl.h | 82 - tdevdesigner/designer/styledbutton.cpp | 295 -- tdevdesigner/designer/styledbutton.h | 104 - tdevdesigner/designer/syntaxhighlighter_html.cpp | 160 - tdevdesigner/designer/syntaxhighlighter_html.h | 57 - tdevdesigner/designer/tableeditor.ui | 828 ---- tdevdesigner/designer/tableeditorimpl.cpp | 494 --- tdevdesigner/designer/tableeditorimpl.h | 83 - tdevdesigner/designer/tdevdesigner_part.cpp | 565 --- tdevdesigner/designer/tdevdesigner_part.desktop | 16 - tdevdesigner/designer/tdevdesigner_part.h | 148 - tdevdesigner/designer/tdevdesigner_part.rc | 121 - tdevdesigner/designer/tdevdesigner_part_sh.rc | 116 - tdevdesigner/designer/timestamp.cpp | 86 - tdevdesigner/designer/timestamp.h | 64 - tdevdesigner/designer/variabledialog.ui | 294 -- tdevdesigner/designer/variabledialogimpl.cpp | 180 - tdevdesigner/designer/variabledialogimpl.h | 57 - tdevdesigner/designer/widgetaction.cpp | 58 - tdevdesigner/designer/widgetaction.h | 66 - tdevdesigner/designer/widgetfactory.cpp | 1805 -------- tdevdesigner/designer/widgetfactory.h | 515 --- tdevdesigner/designer/wizardeditor.ui | 342 -- tdevdesigner/designer/wizardeditorimpl.cpp | 253 -- tdevdesigner/designer/wizardeditorimpl.h | 75 - tdevdesigner/designer/workspace.cpp | 711 ---- tdevdesigner/designer/workspace.h | 152 - tdevdesigner/interfaces/actioninterface.h | 78 - tdevdesigner/interfaces/classbrowserinterface.h | 63 - tdevdesigner/interfaces/designerinterface.h | 261 -- tdevdesigner/interfaces/editorinterface.h | 102 - tdevdesigner/interfaces/filterinterface.h | 68 - tdevdesigner/interfaces/interpreterinterface.h | 59 - tdevdesigner/interfaces/languageinterface.h | 131 - tdevdesigner/interfaces/preferenceinterface.h | 68 - tdevdesigner/interfaces/projectsettingsiface.h | 69 - tdevdesigner/interfaces/sourcetemplateiface.h | 65 - tdevdesigner/interfaces/templatewizardiface.h | 60 - tdevdesigner/interfaces/widgetinterface.h | 35 - tdevdesigner/plugins/Makefile.am | 8 - tdevdesigner/plugins/languageinterfaceimpl.cpp | 237 -- tdevdesigner/plugins/languageinterfaceimpl.h | 83 - tdevdesigner/shared/CMakeLists.txt | 26 - tdevdesigner/shared/Makefile.am | 6 - tdevdesigner/shared/domtool.cpp | 453 -- tdevdesigner/shared/domtool.h | 53 - tdevdesigner/shared/globaldefs.h | 62 - tdevdesigner/shared/parser.cpp | 72 - tdevdesigner/shared/parser.h | 39 - tdevdesigner/shared/ui2uib.cpp | 893 ---- tdevdesigner/shared/ui2uib.h | 35 - tdevdesigner/shared/uib.cpp | 42 - tdevdesigner/shared/uib.h | 152 - tdevdesigner/shared/widgetdatabase.cpp | 960 ----- tdevdesigner/shared/widgetdatabase.h | 96 - tdevdesigner/src/CMakeLists.txt | 36 - tdevdesigner/src/Makefile.am | 47 - tdevdesigner/src/main.cpp | 94 - tdevdesigner/src/tdevdesigner.cpp | 216 - tdevdesigner/src/tdevdesigner.desktop | 96 - tdevdesigner/src/tdevdesigner.h | 97 - tdevdesigner/src/tdevdesigner_shell.rc | 37 - tdevdesigner/uilib/CMakeLists.txt | 27 - tdevdesigner/uilib/Makefile.am | 9 - tdevdesigner/uilib/database.cpp | 122 - tdevdesigner/uilib/database2.h | 90 - tdevdesigner/uilib/qwidgetfactory.cpp | 2606 ------------ tdevdesigner/uilib/qwidgetfactory.h | 178 - tdevelop_kde_cpp.desktop | 48 + tdevelop_tde_cpp.desktop | 48 - tdevprj2tdevelop | 299 -- vcs/clearcase/CMakeLists.txt | 8 +- vcs/clearcase/Makefile.am | 10 +- vcs/clearcase/clearcasefileinfoprovider.cpp | 4 +- vcs/clearcase/clearcasefileinfoprovider.h | 2 +- vcs/clearcase/clearcasemanipulator.h | 2 +- vcs/clearcase/clearcasepart.cpp | 40 +- vcs/clearcase/clearcasepart.h | 8 +- vcs/clearcase/integrator/CMakeLists.txt | 4 +- vcs/clearcase/integrator/Makefile.am | 4 +- vcs/clearcase/integrator/ccintegratordlg.h | 2 +- vcs/clearcase/integrator/clearcaseintegrator.cpp | 10 +- vcs/clearcase/integrator/clearcaseintegrator.h | 4 +- .../integrator/kdevclearcaseintegrator.desktop | 44 + .../integrator/tdevclearcaseintegrator.desktop | 44 - vcs/clearcase/kdevclearcase.desktop | 82 + vcs/clearcase/tdevclearcase.desktop | 82 - vcs/cvsservice/CMakeLists.txt | 12 +- vcs/cvsservice/Makefile.am | 18 +- vcs/cvsservice/README.dox | 2 +- vcs/cvsservice/bufferedstringreader.h | 2 +- vcs/cvsservice/cvsentry.h | 2 +- vcs/cvsservice/cvsfileinfoprovider.cpp | 4 +- vcs/cvsservice/cvsfileinfoprovider.h | 4 +- vcs/cvsservice/cvsoptions.cpp | 10 +- vcs/cvsservice/cvsoptions.h | 6 +- vcs/cvsservice/cvspart.cpp | 38 +- vcs/cvsservice/cvspart.h | 8 +- vcs/cvsservice/cvspartimpl.cpp | 24 +- vcs/cvsservice/cvspartimpl.h | 18 +- vcs/cvsservice/cvsprocesswidget.cpp | 6 +- vcs/cvsservice/integrator/CMakeLists.txt | 4 +- vcs/cvsservice/integrator/Makefile.am | 4 +- vcs/cvsservice/integrator/cvsserviceintegrator.cpp | 10 +- vcs/cvsservice/integrator/cvsserviceintegrator.h | 4 +- .../integrator/kdevcvsserviceintegrator.desktop | 45 + .../integrator/tdevcvsserviceintegrator.desktop | 45 - vcs/cvsservice/kdev_cvs.png | Bin 0 -> 721 bytes vcs/cvsservice/kdev_cvs.xcf | Bin 0 -> 18033 bytes vcs/cvsservice/kdevcvsservice.desktop | 77 + vcs/cvsservice/kdevcvsservicepart.rc | 36 + vcs/cvsservice/tdev_cvs.png | Bin 721 -> 0 bytes vcs/cvsservice/tdev_cvs.xcf | Bin 18033 -> 0 bytes vcs/cvsservice/tdevcvsservice.desktop | 77 - vcs/cvsservice/tdevcvsservicepart.rc | 36 - vcs/perforce/CMakeLists.txt | 8 +- vcs/perforce/Makefile.am | 12 +- vcs/perforce/integrator/CMakeLists.txt | 4 +- vcs/perforce/integrator/Makefile.am | 4 +- .../integrator/kdevperforceintegrator.desktop | 44 + vcs/perforce/integrator/perforceintegrator.cpp | 10 +- vcs/perforce/integrator/perforceintegrator.h | 4 +- vcs/perforce/integrator/pfintegratordlg.h | 2 +- .../integrator/tdevperforceintegrator.desktop | 44 - vcs/perforce/kdevperforce.desktop | 82 + vcs/perforce/kdevperforcepart.rc | 23 + vcs/perforce/perforcepart.cpp | 28 +- vcs/perforce/perforcepart.h | 6 +- vcs/perforce/tdevperforce.desktop | 82 - vcs/perforce/tdevperforcepart.rc | 23 - vcs/subversion/CMakeLists.txt | 26 +- vcs/subversion/Makefile.am | 30 +- vcs/subversion/integrator/CMakeLists.txt | 4 +- vcs/subversion/integrator/Makefile.am | 4 +- .../integrator/kdevsubversionintegrator.desktop | 45 + vcs/subversion/integrator/subversionintegrator.cpp | 10 +- vcs/subversion/integrator/subversionintegrator.h | 4 +- vcs/subversion/integrator/svnintegratordlg.cpp | 2 +- vcs/subversion/integrator/svnintegratordlg.h | 2 +- .../integrator/tdevsubversionintegrator.desktop | 45 - vcs/subversion/kdevpart_subversion.rc | 31 + vcs/subversion/kdevsubversion.desktop | 34 + vcs/subversion/kdevsvn+file.protocol | 39 + vcs/subversion/kdevsvn+http.protocol | 39 + vcs/subversion/kdevsvn+https.protocol | 39 + vcs/subversion/kdevsvn+ssh.protocol | 39 + vcs/subversion/kdevsvn+svn.protocol | 39 + vcs/subversion/kdevsvnd.cpp | 394 ++ vcs/subversion/kdevsvnd.desktop | 32 + vcs/subversion/kdevsvnd.h | 51 + vcs/subversion/kdevsvnd_widgets.cpp | 70 + vcs/subversion/kdevsvnd_widgets.h | 42 + vcs/subversion/subversion_core.cpp | 26 +- vcs/subversion/subversion_core.h | 4 +- vcs/subversion/subversion_fileinfo.cpp | 6 +- vcs/subversion/subversion_fileinfo.h | 4 +- vcs/subversion/subversion_part.cpp | 26 +- vcs/subversion/subversion_part.h | 12 +- vcs/subversion/subversion_widget.cpp | 2 +- vcs/subversion/svn_fileselectdlg_commit.cpp | 4 +- vcs/subversion/svn_logviewwidget.cpp | 2 +- vcs/subversion/svn_tdeio.cpp | 4 +- vcs/subversion/tdevpart_subversion.rc | 31 - vcs/subversion/tdevsubversion.desktop | 34 - vcs/subversion/tdevsvn+file.protocol | 39 - vcs/subversion/tdevsvn+http.protocol | 39 - vcs/subversion/tdevsvn+https.protocol | 39 - vcs/subversion/tdevsvn+ssh.protocol | 39 - vcs/subversion/tdevsvn+svn.protocol | 39 - vcs/subversion/tdevsvnd.cpp | 394 -- vcs/subversion/tdevsvnd.desktop | 32 - vcs/subversion/tdevsvnd.h | 51 - vcs/subversion/tdevsvnd_widgets.cpp | 70 - vcs/subversion/tdevsvnd_widgets.h | 42 - 2944 files changed, 130611 insertions(+), 130711 deletions(-) create mode 100644 buildtools/ada/kdevadaproject.desktop create mode 100644 buildtools/ada/kdevadaproject.rc delete mode 100644 buildtools/ada/tdevadaproject.desktop delete mode 100644 buildtools/ada/tdevadaproject.rc create mode 100644 buildtools/ant/kdevantproject.desktop create mode 100644 buildtools/ant/kdevantproject.rc delete mode 100644 buildtools/ant/tdevantproject.desktop delete mode 100644 buildtools/ant/tdevantproject.rc create mode 100644 buildtools/autotools/kdevautoproject.desktop create mode 100644 buildtools/autotools/kdevautoproject.rc create mode 100644 buildtools/autotools/kdevtdeautoproject.desktop delete mode 100644 buildtools/autotools/tdevautoproject.desktop delete mode 100644 buildtools/autotools/tdevautoproject.rc delete mode 100644 buildtools/autotools/tdevtdeautoproject.desktop create mode 100644 buildtools/custommakefiles/kdevcustomproject.desktop create mode 100644 buildtools/custommakefiles/kdevcustomproject.rc delete mode 100644 buildtools/custommakefiles/tdevcustomproject.desktop delete mode 100644 buildtools/custommakefiles/tdevcustomproject.rc create mode 100644 buildtools/lib/base/kdevbuildtool.cpp create mode 100644 buildtools/lib/base/kdevbuildtool.h delete mode 100644 buildtools/lib/base/tdevbuildtool.cpp delete mode 100644 buildtools/lib/base/tdevbuildtool.h create mode 100644 buildtools/pascal/kdevpascalproject.desktop create mode 100644 buildtools/pascal/kdevpascalproject.rc delete mode 100644 buildtools/pascal/tdevpascalproject.desktop delete mode 100644 buildtools/pascal/tdevpascalproject.rc create mode 100644 buildtools/qmake/kdevtmakeproject.desktop create mode 100644 buildtools/qmake/kdevtrollproject.desktop create mode 100644 buildtools/qmake/kdevtrollproject.rc delete mode 100644 buildtools/qmake/tdevtmakeproject.desktop delete mode 100644 buildtools/qmake/tdevtrollproject.desktop delete mode 100644 buildtools/qmake/tdevtrollproject.rc create mode 100644 buildtools/script/kdevscriptproject.desktop create mode 100644 buildtools/script/kdevscriptproject.rc delete mode 100644 buildtools/script/tdevscriptproject.desktop delete mode 100644 buildtools/script/tdevscriptproject.rc create mode 100644 doc/kde_app_devel/CMakeLists.txt create mode 100644 doc/kde_app_devel/Makefile.am create mode 100644 doc/kde_app_devel/appwizard.png create mode 100644 doc/kde_app_devel/index.docbook create mode 100644 doc/kde_app_devel/kscribblefiles.png create mode 100644 doc/kdearch/Makefile.am create mode 100644 doc/kdearch/affine-general.png create mode 100644 doc/kdearch/affine-rotate.png create mode 100644 doc/kdearch/affine-scale.png create mode 100644 doc/kdearch/affine-shear.png create mode 100644 doc/kdearch/affine-translate.png create mode 100644 doc/kdearch/brushstyles.png create mode 100644 doc/kdearch/canvas.png create mode 100644 doc/kdearch/capflat.png create mode 100644 doc/kdearch/capround.png create mode 100644 doc/kdearch/capsquare.png create mode 100644 doc/kdearch/index.docbook create mode 100644 doc/kdearch/joinbevel.png create mode 100644 doc/kdearch/joinmiter.png create mode 100644 doc/kdearch/joinround.png create mode 100644 doc/kdearch/konqi-mirrored.png create mode 100644 doc/kdearch/konqi-normal.png create mode 100644 doc/kdearch/konqi-rotated.png create mode 100644 doc/kdearch/konqi-sheared.png create mode 100644 doc/kdearch/kview-menu.png create mode 100644 doc/kdearch/opengl.png create mode 100644 doc/kdearch/penstyles.png create mode 100644 doc/kdearch/whatsthis.png create mode 100644 doc/kdevdesigner/CMakeLists.txt create mode 100644 doc/kdevdesigner/Makefile.am create mode 100644 doc/kdevdesigner/index.docbook create mode 100644 doc/std/kdev3api.toc delete mode 100644 doc/std/tdev3api.toc delete mode 100644 doc/tde_app_devel/CMakeLists.txt delete mode 100644 doc/tde_app_devel/Makefile.am delete mode 100644 doc/tde_app_devel/appwizard.png delete mode 100644 doc/tde_app_devel/index.docbook delete mode 100644 doc/tde_app_devel/kscribblefiles.png delete mode 100644 doc/tdearch/Makefile.am delete mode 100644 doc/tdearch/affine-general.png delete mode 100644 doc/tdearch/affine-rotate.png delete mode 100644 doc/tdearch/affine-scale.png delete mode 100644 doc/tdearch/affine-shear.png delete mode 100644 doc/tdearch/affine-translate.png delete mode 100644 doc/tdearch/brushstyles.png delete mode 100644 doc/tdearch/canvas.png delete mode 100644 doc/tdearch/capflat.png delete mode 100644 doc/tdearch/capround.png delete mode 100644 doc/tdearch/capsquare.png delete mode 100644 doc/tdearch/index.docbook delete mode 100644 doc/tdearch/joinbevel.png delete mode 100644 doc/tdearch/joinmiter.png delete mode 100644 doc/tdearch/joinround.png delete mode 100644 doc/tdearch/konqi-mirrored.png delete mode 100644 doc/tdearch/konqi-normal.png delete mode 100644 doc/tdearch/konqi-rotated.png delete mode 100644 doc/tdearch/konqi-sheared.png delete mode 100644 doc/tdearch/kview-menu.png delete mode 100644 doc/tdearch/opengl.png delete mode 100644 doc/tdearch/penstyles.png delete mode 100644 doc/tdearch/whatsthis.png delete mode 100644 doc/tdevassistant/CMakeLists.txt delete mode 100644 doc/tdevassistant/Makefile.am delete mode 100644 doc/tdevassistant/index.docbook delete mode 100644 doc/tdevdesigner/CMakeLists.txt delete mode 100644 doc/tdevdesigner/Makefile.am delete mode 100644 doc/tdevdesigner/index.docbook create mode 100644 doc/tdevelop/kdevdesigner.png delete mode 100644 doc/tdevelop/tdevdesigner.png create mode 100644 editors/editor-chooser/kdeveditorchooser.desktop delete mode 100644 editors/editor-chooser/tdeveditorchooser.desktop create mode 100644 embedded/visualboyadvance/kdevpart_visualboyadvance.rc create mode 100644 embedded/visualboyadvance/kdevvisualboyadvance.desktop delete mode 100644 embedded/visualboyadvance/tdevpart_visualboyadvance.rc delete mode 100644 embedded/visualboyadvance/tdevvisualboyadvance.desktop create mode 100644 kdevassistant.desktop create mode 100644 kdevdesigner/AUTHORS create mode 100644 kdevdesigner/CMakeLists.txt create mode 100644 kdevdesigner/LICENSE.GPL create mode 100644 kdevdesigner/Makefile.am create mode 100644 kdevdesigner/NEWS create mode 100644 kdevdesigner/README create mode 100644 kdevdesigner/TODO create mode 100644 kdevdesigner/designer/CMakeLists.txt create mode 100644 kdevdesigner/designer/Makefile.am create mode 100644 kdevdesigner/designer/about.ui create mode 100644 kdevdesigner/designer/actiondnd.cpp create mode 100644 kdevdesigner/designer/actiondnd.h create mode 100644 kdevdesigner/designer/actioneditor.ui create mode 100644 kdevdesigner/designer/actioneditorimpl.cpp create mode 100644 kdevdesigner/designer/actioneditorimpl.h create mode 100644 kdevdesigner/designer/actionlistview.cpp create mode 100644 kdevdesigner/designer/actionlistview.h create mode 100644 kdevdesigner/designer/asciivalidator.cpp create mode 100644 kdevdesigner/designer/asciivalidator.h create mode 100644 kdevdesigner/designer/command.cpp create mode 100644 kdevdesigner/designer/command.h create mode 100644 kdevdesigner/designer/configtoolboxdialog.ui create mode 100644 kdevdesigner/designer/configtoolboxdialog.ui.h create mode 100644 kdevdesigner/designer/connectiondialog.ui create mode 100644 kdevdesigner/designer/connectiondialog.ui.h create mode 100644 kdevdesigner/designer/connectionitems.cpp create mode 100644 kdevdesigner/designer/connectionitems.h create mode 100644 kdevdesigner/designer/connectiontable.cpp create mode 100644 kdevdesigner/designer/connectiontable.h create mode 100644 kdevdesigner/designer/createtemplate.ui create mode 100644 kdevdesigner/designer/customwidgeteditor.ui create mode 100644 kdevdesigner/designer/customwidgeteditorimpl.cpp create mode 100644 kdevdesigner/designer/customwidgeteditorimpl.h create mode 100644 kdevdesigner/designer/database.cpp create mode 100644 kdevdesigner/designer/database.h create mode 100644 kdevdesigner/designer/dbconnection.ui create mode 100644 kdevdesigner/designer/dbconnectioneditor.ui create mode 100644 kdevdesigner/designer/dbconnectionimpl.cpp create mode 100644 kdevdesigner/designer/dbconnectionimpl.h create mode 100644 kdevdesigner/designer/dbconnections.ui create mode 100644 kdevdesigner/designer/dbconnectionsimpl.cpp create mode 100644 kdevdesigner/designer/dbconnectionsimpl.h create mode 100644 kdevdesigner/designer/defs.cpp create mode 100644 kdevdesigner/designer/defs.h create mode 100644 kdevdesigner/designer/designer_pch.h create mode 100644 kdevdesigner/designer/designeraction.cpp create mode 100644 kdevdesigner/designer/designeraction.h create mode 100644 kdevdesigner/designer/designerapp.cpp create mode 100644 kdevdesigner/designer/designerapp.h create mode 100644 kdevdesigner/designer/designerappiface.cpp create mode 100644 kdevdesigner/designer/designerappiface.h create mode 100644 kdevdesigner/designer/editfunctions.ui create mode 100644 kdevdesigner/designer/editfunctionsimpl.cpp create mode 100644 kdevdesigner/designer/editfunctionsimpl.h create mode 100644 kdevdesigner/designer/filechooser.cpp create mode 100644 kdevdesigner/designer/filechooser.h create mode 100644 kdevdesigner/designer/finddialog.ui create mode 100644 kdevdesigner/designer/finddialog.ui.h create mode 100644 kdevdesigner/designer/formfile.cpp create mode 100644 kdevdesigner/designer/formfile.h create mode 100644 kdevdesigner/designer/formsettings.ui create mode 100644 kdevdesigner/designer/formsettingsimpl.cpp create mode 100644 kdevdesigner/designer/formsettingsimpl.h create mode 100644 kdevdesigner/designer/formwindow.cpp create mode 100644 kdevdesigner/designer/formwindow.h create mode 100644 kdevdesigner/designer/gotolinedialog.ui create mode 100644 kdevdesigner/designer/gotolinedialog.ui.h create mode 100644 kdevdesigner/designer/hierarchyview.cpp create mode 100644 kdevdesigner/designer/hierarchyview.h create mode 100644 kdevdesigner/designer/iconvieweditor.ui create mode 100644 kdevdesigner/designer/iconvieweditorimpl.cpp create mode 100644 kdevdesigner/designer/iconvieweditorimpl.h create mode 100644 kdevdesigner/designer/kdevdesigner_part.cpp create mode 100644 kdevdesigner/designer/kdevdesigner_part.desktop create mode 100644 kdevdesigner/designer/kdevdesigner_part.h create mode 100644 kdevdesigner/designer/kdevdesigner_part.rc create mode 100644 kdevdesigner/designer/kdevdesigner_part_sh.rc create mode 100644 kdevdesigner/designer/layout.cpp create mode 100644 kdevdesigner/designer/layout.h create mode 100644 kdevdesigner/designer/listboxdnd.cpp create mode 100644 kdevdesigner/designer/listboxdnd.h create mode 100644 kdevdesigner/designer/listboxeditor.ui create mode 100644 kdevdesigner/designer/listboxeditorimpl.cpp create mode 100644 kdevdesigner/designer/listboxeditorimpl.h create mode 100644 kdevdesigner/designer/listboxrename.cpp create mode 100644 kdevdesigner/designer/listboxrename.h create mode 100644 kdevdesigner/designer/listdnd.cpp create mode 100644 kdevdesigner/designer/listdnd.h create mode 100644 kdevdesigner/designer/listeditor.ui create mode 100644 kdevdesigner/designer/listeditor.ui.h create mode 100644 kdevdesigner/designer/listviewdnd.cpp create mode 100644 kdevdesigner/designer/listviewdnd.h create mode 100644 kdevdesigner/designer/listvieweditor.ui create mode 100644 kdevdesigner/designer/listvieweditorimpl.cpp create mode 100644 kdevdesigner/designer/listvieweditorimpl.h create mode 100644 kdevdesigner/designer/mainwindow.cpp create mode 100644 kdevdesigner/designer/mainwindow.h create mode 100644 kdevdesigner/designer/mainwindowactions.cpp create mode 100644 kdevdesigner/designer/menubareditor.cpp create mode 100644 kdevdesigner/designer/menubareditor.h create mode 100644 kdevdesigner/designer/metadatabase.cpp create mode 100644 kdevdesigner/designer/metadatabase.h create mode 100644 kdevdesigner/designer/multilineeditor.ui create mode 100644 kdevdesigner/designer/multilineeditorimpl.cpp create mode 100644 kdevdesigner/designer/multilineeditorimpl.h create mode 100644 kdevdesigner/designer/myiconloader.cpp create mode 100644 kdevdesigner/designer/myiconloader.h create mode 100644 kdevdesigner/designer/newform.ui create mode 100644 kdevdesigner/designer/newformimpl.cpp create mode 100644 kdevdesigner/designer/newformimpl.h create mode 100644 kdevdesigner/designer/orderindicator.cpp create mode 100644 kdevdesigner/designer/orderindicator.h create mode 100644 kdevdesigner/designer/outputwindow.cpp create mode 100644 kdevdesigner/designer/outputwindow.h create mode 100644 kdevdesigner/designer/paletteeditor.ui create mode 100644 kdevdesigner/designer/paletteeditoradvanced.ui create mode 100644 kdevdesigner/designer/paletteeditoradvancedimpl.cpp create mode 100644 kdevdesigner/designer/paletteeditoradvancedimpl.h create mode 100644 kdevdesigner/designer/paletteeditorimpl.cpp create mode 100644 kdevdesigner/designer/paletteeditorimpl.h create mode 100644 kdevdesigner/designer/pics/CMakeLists.txt create mode 100644 kdevdesigner/designer/pics/Makefile.am create mode 100644 kdevdesigner/designer/pics/designer_adjustsize.png create mode 100644 kdevdesigner/designer/pics/designer_appicon.png create mode 100644 kdevdesigner/designer/pics/designer_arrow.png create mode 100644 kdevdesigner/designer/pics/designer_background.png create mode 100644 kdevdesigner/designer/pics/designer_book.png create mode 100644 kdevdesigner/designer/pics/designer_buttongroup.png create mode 100644 kdevdesigner/designer/pics/designer_checkbox.png create mode 100644 kdevdesigner/designer/pics/designer_combobox.png create mode 100644 kdevdesigner/designer/pics/designer_connecttool.png create mode 100644 kdevdesigner/designer/pics/designer_cross.png create mode 100644 kdevdesigner/designer/pics/designer_customwidget.png create mode 100644 kdevdesigner/designer/pics/designer_d_adjustsize.png create mode 100644 kdevdesigner/designer/pics/designer_d_book.png create mode 100644 kdevdesigner/designer/pics/designer_d_buttongroup.png create mode 100644 kdevdesigner/designer/pics/designer_d_checkbox.png create mode 100644 kdevdesigner/designer/pics/designer_d_combobox.png create mode 100644 kdevdesigner/designer/pics/designer_d_connecttool.png create mode 100644 kdevdesigner/designer/pics/designer_d_customwidget.png create mode 100644 kdevdesigner/designer/pics/designer_d_databrowser.png create mode 100644 kdevdesigner/designer/pics/designer_d_datatable.png create mode 100644 kdevdesigner/designer/pics/designer_d_dataview.png create mode 100644 kdevdesigner/designer/pics/designer_d_dateedit.png create mode 100644 kdevdesigner/designer/pics/designer_d_datetimeedit.png create mode 100644 kdevdesigner/designer/pics/designer_d_dial.png create mode 100644 kdevdesigner/designer/pics/designer_d_down.png create mode 100644 kdevdesigner/designer/pics/designer_d_editbreaklayout.png create mode 100644 kdevdesigner/designer/pics/designer_d_editcopy.png create mode 100644 kdevdesigner/designer/pics/designer_d_editcut.png create mode 100644 kdevdesigner/designer/pics/designer_d_editdelete.png create mode 100644 kdevdesigner/designer/pics/designer_d_editgrid.png create mode 100644 kdevdesigner/designer/pics/designer_d_edithlayout.png create mode 100644 kdevdesigner/designer/pics/designer_d_edithlayoutsplit.png create mode 100644 kdevdesigner/designer/pics/designer_d_editlower.png create mode 100644 kdevdesigner/designer/pics/designer_d_editpaste.png create mode 100644 kdevdesigner/designer/pics/designer_d_editraise.png create mode 100644 kdevdesigner/designer/pics/designer_d_editslots.png create mode 100644 kdevdesigner/designer/pics/designer_d_editvlayout.png create mode 100644 kdevdesigner/designer/pics/designer_d_editvlayoutsplit.png create mode 100644 kdevdesigner/designer/pics/designer_d_filenew.png create mode 100644 kdevdesigner/designer/pics/designer_d_fileopen.png create mode 100644 kdevdesigner/designer/pics/designer_d_filesave.png create mode 100644 kdevdesigner/designer/pics/designer_d_folder.png create mode 100644 kdevdesigner/designer/pics/designer_d_form.png create mode 100644 kdevdesigner/designer/pics/designer_d_frame.png create mode 100644 kdevdesigner/designer/pics/designer_d_groupbox.png create mode 100644 kdevdesigner/designer/pics/designer_d_help.png create mode 100644 kdevdesigner/designer/pics/designer_d_home.png create mode 100644 kdevdesigner/designer/pics/designer_d_iconview.png create mode 100644 kdevdesigner/designer/pics/designer_d_image.png create mode 100644 kdevdesigner/designer/pics/designer_d_label.png create mode 100644 kdevdesigner/designer/pics/designer_d_layout.png create mode 100644 kdevdesigner/designer/pics/designer_d_lcdnumber.png create mode 100644 kdevdesigner/designer/pics/designer_d_left.png create mode 100644 kdevdesigner/designer/pics/designer_d_line.png create mode 100644 kdevdesigner/designer/pics/designer_d_lineedit.png create mode 100644 kdevdesigner/designer/pics/designer_d_listbox.png create mode 100644 kdevdesigner/designer/pics/designer_d_listview.png create mode 100644 kdevdesigner/designer/pics/designer_d_multilineedit.png create mode 100644 kdevdesigner/designer/pics/designer_d_newform.png create mode 100644 kdevdesigner/designer/pics/designer_d_ordertool.png create mode 100644 kdevdesigner/designer/pics/designer_d_pixlabel.png create mode 100644 kdevdesigner/designer/pics/designer_d_pointer.png create mode 100644 kdevdesigner/designer/pics/designer_d_print.png create mode 100644 kdevdesigner/designer/pics/designer_d_progress.png create mode 100644 kdevdesigner/designer/pics/designer_d_project.png create mode 100644 kdevdesigner/designer/pics/designer_d_pushbutton.png create mode 100644 kdevdesigner/designer/pics/designer_d_radiobutton.png create mode 100644 kdevdesigner/designer/pics/designer_d_redo.png create mode 100644 kdevdesigner/designer/pics/designer_d_richtextedit.png create mode 100644 kdevdesigner/designer/pics/designer_d_right.png create mode 100644 kdevdesigner/designer/pics/designer_d_scrollbar.png create mode 100644 kdevdesigner/designer/pics/designer_d_searchfind.png create mode 100644 kdevdesigner/designer/pics/designer_d_setbuddy.png create mode 100644 kdevdesigner/designer/pics/designer_d_slider.png create mode 100644 kdevdesigner/designer/pics/designer_d_spacer.png create mode 100644 kdevdesigner/designer/pics/designer_d_spinbox.png create mode 100644 kdevdesigner/designer/pics/designer_d_table.png create mode 100644 kdevdesigner/designer/pics/designer_d_tabwidget.png create mode 100644 kdevdesigner/designer/pics/designer_d_textbold.png create mode 100644 kdevdesigner/designer/pics/designer_d_textbrowser.png create mode 100644 kdevdesigner/designer/pics/designer_d_textcenter.png create mode 100644 kdevdesigner/designer/pics/designer_d_textedit.png create mode 100644 kdevdesigner/designer/pics/designer_d_textfont.png create mode 100644 kdevdesigner/designer/pics/designer_d_texth1.png create mode 100644 kdevdesigner/designer/pics/designer_d_texth2.png create mode 100644 kdevdesigner/designer/pics/designer_d_texth3.png create mode 100644 kdevdesigner/designer/pics/designer_d_textitalic.png create mode 100644 kdevdesigner/designer/pics/designer_d_textjustify.png create mode 100644 kdevdesigner/designer/pics/designer_d_textlarger.png create mode 100644 kdevdesigner/designer/pics/designer_d_textleft.png create mode 100644 kdevdesigner/designer/pics/designer_d_textlinebreak.png create mode 100644 kdevdesigner/designer/pics/designer_d_textparagraph.png create mode 100644 kdevdesigner/designer/pics/designer_d_textright.png create mode 100644 kdevdesigner/designer/pics/designer_d_textsmaller.png create mode 100644 kdevdesigner/designer/pics/designer_d_textteletext.png create mode 100644 kdevdesigner/designer/pics/designer_d_textunderline.png create mode 100644 kdevdesigner/designer/pics/designer_d_textview.png create mode 100644 kdevdesigner/designer/pics/designer_d_timeedit.png create mode 100644 kdevdesigner/designer/pics/designer_d_toolbox.png create mode 100644 kdevdesigner/designer/pics/designer_d_toolbutton.png create mode 100644 kdevdesigner/designer/pics/designer_d_undo.png create mode 100644 kdevdesigner/designer/pics/designer_d_up.png create mode 100644 kdevdesigner/designer/pics/designer_d_widgetstack.png create mode 100644 kdevdesigner/designer/pics/designer_d_wizarddata.png create mode 100644 kdevdesigner/designer/pics/designer_d_wizarddialog.png create mode 100644 kdevdesigner/designer/pics/designer_d_wordwrap.png create mode 100644 kdevdesigner/designer/pics/designer_databrowser.png create mode 100644 kdevdesigner/designer/pics/designer_datatable.png create mode 100644 kdevdesigner/designer/pics/designer_dataview.png create mode 100644 kdevdesigner/designer/pics/designer_dateedit.png create mode 100644 kdevdesigner/designer/pics/designer_datetimeedit.png create mode 100644 kdevdesigner/designer/pics/designer_dial.png create mode 100644 kdevdesigner/designer/pics/designer_down.png create mode 100644 kdevdesigner/designer/pics/designer_editbreaklayout.png create mode 100644 kdevdesigner/designer/pics/designer_editcopy.png create mode 100644 kdevdesigner/designer/pics/designer_editcut.png create mode 100644 kdevdesigner/designer/pics/designer_editdelete.png create mode 100644 kdevdesigner/designer/pics/designer_editgrid.png create mode 100644 kdevdesigner/designer/pics/designer_edithlayout.png create mode 100644 kdevdesigner/designer/pics/designer_edithlayoutsplit.png create mode 100644 kdevdesigner/designer/pics/designer_editlower.png create mode 100644 kdevdesigner/designer/pics/designer_editpaste.png create mode 100644 kdevdesigner/designer/pics/designer_editraise.png create mode 100644 kdevdesigner/designer/pics/designer_editslots.png create mode 100644 kdevdesigner/designer/pics/designer_editvlayout.png create mode 100644 kdevdesigner/designer/pics/designer_editvlayoutsplit.png create mode 100644 kdevdesigner/designer/pics/designer_filenew.png create mode 100644 kdevdesigner/designer/pics/designer_fileopen.png create mode 100644 kdevdesigner/designer/pics/designer_filesave.png create mode 100644 kdevdesigner/designer/pics/designer_folder.png create mode 100644 kdevdesigner/designer/pics/designer_form.png create mode 100644 kdevdesigner/designer/pics/designer_frame.png create mode 100644 kdevdesigner/designer/pics/designer_groupbox.png create mode 100644 kdevdesigner/designer/pics/designer_hand.png create mode 100644 kdevdesigner/designer/pics/designer_help.png create mode 100644 kdevdesigner/designer/pics/designer_home.png create mode 100644 kdevdesigner/designer/pics/designer_hsplit.png create mode 100644 kdevdesigner/designer/pics/designer_ibeam.png create mode 100644 kdevdesigner/designer/pics/designer_iconview.png create mode 100644 kdevdesigner/designer/pics/designer_image.png create mode 100644 kdevdesigner/designer/pics/designer_label.png create mode 100644 kdevdesigner/designer/pics/designer_layout.png create mode 100644 kdevdesigner/designer/pics/designer_lcdnumber.png create mode 100644 kdevdesigner/designer/pics/designer_left.png create mode 100644 kdevdesigner/designer/pics/designer_line.png create mode 100644 kdevdesigner/designer/pics/designer_lineedit.png create mode 100644 kdevdesigner/designer/pics/designer_listbox.png create mode 100644 kdevdesigner/designer/pics/designer_listview.png create mode 100644 kdevdesigner/designer/pics/designer_multilineedit.png create mode 100644 kdevdesigner/designer/pics/designer_newform.png create mode 100644 kdevdesigner/designer/pics/designer_no.png create mode 100644 kdevdesigner/designer/pics/designer_object.png create mode 100644 kdevdesigner/designer/pics/designer_ordertool.png create mode 100644 kdevdesigner/designer/pics/designer_pixlabel.png create mode 100644 kdevdesigner/designer/pics/designer_pointer.png create mode 100644 kdevdesigner/designer/pics/designer_print.png create mode 100644 kdevdesigner/designer/pics/designer_progress.png create mode 100644 kdevdesigner/designer/pics/designer_project.png create mode 100644 kdevdesigner/designer/pics/designer_pushbutton.png create mode 100644 kdevdesigner/designer/pics/designer_qtlogo.png create mode 100644 kdevdesigner/designer/pics/designer_radiobutton.png create mode 100644 kdevdesigner/designer/pics/designer_redo.png create mode 100644 kdevdesigner/designer/pics/designer_resetproperty.png create mode 100644 kdevdesigner/designer/pics/designer_richtextedit.png create mode 100644 kdevdesigner/designer/pics/designer_right.png create mode 100644 kdevdesigner/designer/pics/designer_s_down.png create mode 100644 kdevdesigner/designer/pics/designer_s_editcut.png create mode 100644 kdevdesigner/designer/pics/designer_s_left.png create mode 100644 kdevdesigner/designer/pics/designer_s_right.png create mode 100644 kdevdesigner/designer/pics/designer_s_up.png create mode 100644 kdevdesigner/designer/pics/designer_scrollbar.png create mode 100644 kdevdesigner/designer/pics/designer_searchfind.png create mode 100644 kdevdesigner/designer/pics/designer_setbuddy.png create mode 100644 kdevdesigner/designer/pics/designer_sizeall.png create mode 100644 kdevdesigner/designer/pics/designer_sizeb.png create mode 100644 kdevdesigner/designer/pics/designer_sizef.png create mode 100644 kdevdesigner/designer/pics/designer_sizeh.png create mode 100644 kdevdesigner/designer/pics/designer_sizev.png create mode 100644 kdevdesigner/designer/pics/designer_slider.png create mode 100644 kdevdesigner/designer/pics/designer_spacer.png create mode 100644 kdevdesigner/designer/pics/designer_spinbox.png create mode 100644 kdevdesigner/designer/pics/designer_splash.png create mode 100644 kdevdesigner/designer/pics/designer_table.png create mode 100644 kdevdesigner/designer/pics/designer_tabwidget.png create mode 100644 kdevdesigner/designer/pics/designer_textbold.png create mode 100644 kdevdesigner/designer/pics/designer_textbrowser.png create mode 100644 kdevdesigner/designer/pics/designer_textcenter.png create mode 100644 kdevdesigner/designer/pics/designer_textedit.png create mode 100644 kdevdesigner/designer/pics/designer_textfont.png create mode 100644 kdevdesigner/designer/pics/designer_texth1.png create mode 100644 kdevdesigner/designer/pics/designer_texth2.png create mode 100644 kdevdesigner/designer/pics/designer_texth3.png create mode 100644 kdevdesigner/designer/pics/designer_textitalic.png create mode 100644 kdevdesigner/designer/pics/designer_textjustify.png create mode 100644 kdevdesigner/designer/pics/designer_textlarger.png create mode 100644 kdevdesigner/designer/pics/designer_textleft.png create mode 100644 kdevdesigner/designer/pics/designer_textlinebreak.png create mode 100644 kdevdesigner/designer/pics/designer_textparagraph.png create mode 100644 kdevdesigner/designer/pics/designer_textright.png create mode 100644 kdevdesigner/designer/pics/designer_textsmaller.png create mode 100644 kdevdesigner/designer/pics/designer_textteletext.png create mode 100644 kdevdesigner/designer/pics/designer_textunderline.png create mode 100644 kdevdesigner/designer/pics/designer_textview.png create mode 100644 kdevdesigner/designer/pics/designer_timeedit.png create mode 100644 kdevdesigner/designer/pics/designer_toolbox.png create mode 100644 kdevdesigner/designer/pics/designer_toolbutton.png create mode 100644 kdevdesigner/designer/pics/designer_undo.png create mode 100644 kdevdesigner/designer/pics/designer_up.png create mode 100644 kdevdesigner/designer/pics/designer_uparrow.png create mode 100644 kdevdesigner/designer/pics/designer_vsplit.png create mode 100644 kdevdesigner/designer/pics/designer_wait.png create mode 100644 kdevdesigner/designer/pics/designer_widgetstack.png create mode 100644 kdevdesigner/designer/pics/designer_wizarddata.png create mode 100644 kdevdesigner/designer/pics/designer_wizarddialog.png create mode 100644 kdevdesigner/designer/pics/designer_wordwrap.png create mode 100644 kdevdesigner/designer/pixmapchooser.cpp create mode 100644 kdevdesigner/designer/pixmapchooser.h create mode 100644 kdevdesigner/designer/pixmapcollection.cpp create mode 100644 kdevdesigner/designer/pixmapcollection.h create mode 100644 kdevdesigner/designer/pixmapcollectioneditor.ui create mode 100644 kdevdesigner/designer/pixmapcollectioneditor.ui.h create mode 100644 kdevdesigner/designer/pixmapfunction.ui create mode 100644 kdevdesigner/designer/popupmenueditor.cpp create mode 100644 kdevdesigner/designer/popupmenueditor.h create mode 100644 kdevdesigner/designer/preferences.ui create mode 100644 kdevdesigner/designer/previewframe.cpp create mode 100644 kdevdesigner/designer/previewframe.h create mode 100644 kdevdesigner/designer/previewwidget.ui create mode 100644 kdevdesigner/designer/previewwidgetimpl.cpp create mode 100644 kdevdesigner/designer/previewwidgetimpl.h create mode 100644 kdevdesigner/designer/project.cpp create mode 100644 kdevdesigner/designer/project.h create mode 100644 kdevdesigner/designer/projectsettings.ui create mode 100644 kdevdesigner/designer/projectsettingsimpl.cpp create mode 100644 kdevdesigner/designer/projectsettingsimpl.h create mode 100644 kdevdesigner/designer/propertyeditor.cpp create mode 100644 kdevdesigner/designer/propertyeditor.h create mode 100644 kdevdesigner/designer/propertyobject.cpp create mode 100644 kdevdesigner/designer/propertyobject.h create mode 100644 kdevdesigner/designer/qcompletionedit.cpp create mode 100644 kdevdesigner/designer/qcompletionedit.h create mode 100644 kdevdesigner/designer/replacedialog.ui create mode 100644 kdevdesigner/designer/replacedialog.ui.h create mode 100644 kdevdesigner/designer/resource.cpp create mode 100644 kdevdesigner/designer/resource.h create mode 100644 kdevdesigner/designer/richtextfontdialog.ui create mode 100644 kdevdesigner/designer/richtextfontdialog.ui.h create mode 100644 kdevdesigner/designer/sizehandle.cpp create mode 100644 kdevdesigner/designer/sizehandle.h create mode 100644 kdevdesigner/designer/sourceeditor.cpp create mode 100644 kdevdesigner/designer/sourceeditor.h create mode 100644 kdevdesigner/designer/sourcefile.cpp create mode 100644 kdevdesigner/designer/sourcefile.h create mode 100644 kdevdesigner/designer/startdialog.ui create mode 100644 kdevdesigner/designer/startdialogimpl.cpp create mode 100644 kdevdesigner/designer/startdialogimpl.h create mode 100644 kdevdesigner/designer/styledbutton.cpp create mode 100644 kdevdesigner/designer/styledbutton.h create mode 100644 kdevdesigner/designer/syntaxhighlighter_html.cpp create mode 100644 kdevdesigner/designer/syntaxhighlighter_html.h create mode 100644 kdevdesigner/designer/tableeditor.ui create mode 100644 kdevdesigner/designer/tableeditorimpl.cpp create mode 100644 kdevdesigner/designer/tableeditorimpl.h create mode 100644 kdevdesigner/designer/timestamp.cpp create mode 100644 kdevdesigner/designer/timestamp.h create mode 100644 kdevdesigner/designer/variabledialog.ui create mode 100644 kdevdesigner/designer/variabledialogimpl.cpp create mode 100644 kdevdesigner/designer/variabledialogimpl.h create mode 100644 kdevdesigner/designer/widgetaction.cpp create mode 100644 kdevdesigner/designer/widgetaction.h create mode 100644 kdevdesigner/designer/widgetfactory.cpp create mode 100644 kdevdesigner/designer/widgetfactory.h create mode 100644 kdevdesigner/designer/wizardeditor.ui create mode 100644 kdevdesigner/designer/wizardeditorimpl.cpp create mode 100644 kdevdesigner/designer/wizardeditorimpl.h create mode 100644 kdevdesigner/designer/workspace.cpp create mode 100644 kdevdesigner/designer/workspace.h create mode 100644 kdevdesigner/interfaces/actioninterface.h create mode 100644 kdevdesigner/interfaces/classbrowserinterface.h create mode 100644 kdevdesigner/interfaces/designerinterface.h create mode 100644 kdevdesigner/interfaces/editorinterface.h create mode 100644 kdevdesigner/interfaces/filterinterface.h create mode 100644 kdevdesigner/interfaces/interpreterinterface.h create mode 100644 kdevdesigner/interfaces/languageinterface.h create mode 100644 kdevdesigner/interfaces/preferenceinterface.h create mode 100644 kdevdesigner/interfaces/projectsettingsiface.h create mode 100644 kdevdesigner/interfaces/sourcetemplateiface.h create mode 100644 kdevdesigner/interfaces/templatewizardiface.h create mode 100644 kdevdesigner/interfaces/widgetinterface.h create mode 100644 kdevdesigner/plugins/Makefile.am create mode 100644 kdevdesigner/plugins/languageinterfaceimpl.cpp create mode 100644 kdevdesigner/plugins/languageinterfaceimpl.h create mode 100644 kdevdesigner/shared/CMakeLists.txt create mode 100644 kdevdesigner/shared/Makefile.am create mode 100644 kdevdesigner/shared/domtool.cpp create mode 100644 kdevdesigner/shared/domtool.h create mode 100644 kdevdesigner/shared/globaldefs.h create mode 100644 kdevdesigner/shared/parser.cpp create mode 100644 kdevdesigner/shared/parser.h create mode 100644 kdevdesigner/shared/ui2uib.cpp create mode 100644 kdevdesigner/shared/ui2uib.h create mode 100644 kdevdesigner/shared/uib.cpp create mode 100644 kdevdesigner/shared/uib.h create mode 100644 kdevdesigner/shared/widgetdatabase.cpp create mode 100644 kdevdesigner/shared/widgetdatabase.h create mode 100644 kdevdesigner/src/CMakeLists.txt create mode 100644 kdevdesigner/src/Makefile.am create mode 100644 kdevdesigner/src/kdevdesigner.cpp create mode 100644 kdevdesigner/src/kdevdesigner.desktop create mode 100644 kdevdesigner/src/kdevdesigner.h create mode 100644 kdevdesigner/src/kdevdesigner_shell.rc create mode 100644 kdevdesigner/src/main.cpp create mode 100644 kdevdesigner/uilib/CMakeLists.txt create mode 100644 kdevdesigner/uilib/Makefile.am create mode 100644 kdevdesigner/uilib/database.cpp create mode 100644 kdevdesigner/uilib/database2.h create mode 100644 kdevdesigner/uilib/qwidgetfactory.cpp create mode 100644 kdevdesigner/uilib/qwidgetfactory.h create mode 100755 kdevprj2tdevelop create mode 100644 languages/ada/app_templates/adahello/adahello.kdevtemplate delete mode 100644 languages/ada/app_templates/adahello/adahello.tdevtemplate create mode 100644 languages/ada/kdevadasupport.desktop create mode 100644 languages/ada/kdevadasupport.rc delete mode 100644 languages/ada/tdevadasupport.desktop delete mode 100644 languages/ada/tdevadasupport.rc create mode 100644 languages/bash/app_templates/bashhello/bashhello.kdevtemplate delete mode 100644 languages/bash/app_templates/bashhello/bashhello.tdevtemplate create mode 100644 languages/bash/kdevbashsupport.desktop create mode 100644 languages/bash/kdevbashsupport.rc delete mode 100644 languages/bash/tdevbashsupport.desktop delete mode 100644 languages/bash/tdevbashsupport.rc create mode 100644 languages/cpp/KDevCppSupportIface.cpp create mode 100644 languages/cpp/KDevCppSupportIface.h delete mode 100644 languages/cpp/TDevCppSupportIface.cpp delete mode 100644 languages/cpp/TDevCppSupportIface.h create mode 100644 languages/cpp/app_templates/automakeempty/automakeempty.kdevtemplate delete mode 100644 languages/cpp/app_templates/automakeempty/automakeempty.tdevtemplate create mode 100644 languages/cpp/app_templates/chello/chello.kdevtemplate delete mode 100644 languages/cpp/app_templates/chello/chello.tdevtemplate create mode 100644 languages/cpp/app_templates/chello_gba/chellogba.kdevtemplate delete mode 100644 languages/cpp/app_templates/chello_gba/chellogba.tdevtemplate create mode 100644 languages/cpp/app_templates/clanlib/clanlib.kdevtemplate delete mode 100644 languages/cpp/app_templates/clanlib/clanlib.tdevtemplate create mode 100644 languages/cpp/app_templates/cmakelibc/cmakelibc.kdevtemplate delete mode 100644 languages/cpp/app_templates/cmakelibc/cmakelibc.tdevtemplate create mode 100644 languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.kdevtemplate delete mode 100644 languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.tdevtemplate create mode 100644 languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.kdevtemplate delete mode 100644 languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.tdevtemplate create mode 100644 languages/cpp/app_templates/cmakesimple/cmakesimple.kdevtemplate delete mode 100644 languages/cpp/app_templates/cmakesimple/cmakesimple.tdevtemplate create mode 100644 languages/cpp/app_templates/cmakesimplec/cmakesimplec.kdevtemplate delete mode 100644 languages/cpp/app_templates/cmakesimplec/cmakesimplec.tdevtemplate create mode 100644 languages/cpp/app_templates/cppcurseshello/cppcurseshello.kdevtemplate delete mode 100644 languages/cpp/app_templates/cppcurseshello/cppcurseshello.tdevtemplate create mode 100644 languages/cpp/app_templates/cpphello/cpphello.kdevtemplate delete mode 100644 languages/cpp/app_templates/cpphello/cpphello.tdevtemplate create mode 100644 languages/cpp/app_templates/cppsdlhello/cppsdlhello.kdevtemplate delete mode 100644 languages/cpp/app_templates/cppsdlhello/cppsdlhello.tdevtemplate create mode 100644 languages/cpp/app_templates/dcopservice/dcopservice.kdevtemplate delete mode 100644 languages/cpp/app_templates/dcopservice/dcopservice.tdevtemplate create mode 100644 languages/cpp/app_templates/generichello/generichello.kdevtemplate delete mode 100644 languages/cpp/app_templates/generichello/generichello.tdevtemplate create mode 100644 languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.kdevtemplate delete mode 100644 languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.tdevtemplate create mode 100644 languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.kdevtemplate delete mode 100644 languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.tdevtemplate create mode 100644 languages/cpp/app_templates/kapp/CMakeLists.txt create mode 100644 languages/cpp/app_templates/kapp/Makefile.am create mode 100644 languages/cpp/app_templates/kapp/README create mode 100644 languages/cpp/app_templates/kapp/app.cpp create mode 100644 languages/cpp/app_templates/kapp/app.desktop create mode 100644 languages/cpp/app_templates/kapp/app.h create mode 100644 languages/cpp/app_templates/kapp/app.kdevses create mode 100644 languages/cpp/app_templates/kapp/app.tdevelop create mode 100644 languages/cpp/app_templates/kapp/app_client.cpp create mode 100644 languages/cpp/app_templates/kapp/appiface.h create mode 100644 languages/cpp/app_templates/kapp/appui.rc create mode 100644 languages/cpp/app_templates/kapp/appview.cpp create mode 100644 languages/cpp/app_templates/kapp/appview.h create mode 100644 languages/cpp/app_templates/kapp/kapp.kdevtemplate create mode 100644 languages/cpp/app_templates/kapp/kapp.png create mode 100644 languages/cpp/app_templates/kapp/main.cpp create mode 100644 languages/cpp/app_templates/kapp/pref.cpp create mode 100644 languages/cpp/app_templates/kapp/pref.h create mode 100644 languages/cpp/app_templates/kapp/src-Makefile.am create mode 100644 languages/cpp/app_templates/kapp/subdirs create mode 100644 languages/cpp/app_templates/kateplugin/kateplugin.kdevtemplate delete mode 100644 languages/cpp/app_templates/kateplugin/kateplugin.tdevtemplate create mode 100644 languages/cpp/app_templates/kateplugin2/kateplugin2.kdevtemplate delete mode 100644 languages/cpp/app_templates/kateplugin2/kateplugin2.tdevtemplate create mode 100644 languages/cpp/app_templates/kde4app/CMakeLists.txt create mode 100644 languages/cpp/app_templates/kde4app/Makefile.am create mode 100644 languages/cpp/app_templates/kde4app/README create mode 100644 languages/cpp/app_templates/kde4app/kapp4.cpp create mode 100644 languages/cpp/app_templates/kde4app/kapp4.desktop create mode 100644 languages/cpp/app_templates/kde4app/kapp4.h create mode 100644 languages/cpp/app_templates/kde4app/kapp4.kcfg create mode 100644 languages/cpp/app_templates/kde4app/kapp4view.cpp create mode 100644 languages/cpp/app_templates/kde4app/kapp4view.h create mode 100644 languages/cpp/app_templates/kde4app/kapp4view_base.ui create mode 100644 languages/cpp/app_templates/kde4app/kde4app-CMakeLists.txt create mode 100644 languages/cpp/app_templates/kde4app/kde4app.kdevtemplate create mode 100644 languages/cpp/app_templates/kde4app/kde4app.png create mode 100644 languages/cpp/app_templates/kde4app/kde4app.tdevelop create mode 100644 languages/cpp/app_templates/kde4app/kde4app.tdevelop.filelist create mode 100644 languages/cpp/app_templates/kde4app/kde4appui.rc create mode 100644 languages/cpp/app_templates/kde4app/main.cpp create mode 100644 languages/cpp/app_templates/kde4app/prefs_base.ui create mode 100644 languages/cpp/app_templates/kde4app/settings.kcfgc create mode 100644 languages/cpp/app_templates/kdecpp.appwizard create mode 100644 languages/cpp/app_templates/kdedcop/CMakeLists.txt create mode 100644 languages/cpp/app_templates/kdedcop/Makefile.am create mode 100644 languages/cpp/app_templates/kdedcop/app.cpp create mode 100644 languages/cpp/app_templates/kdedcop/app.h create mode 100644 languages/cpp/app_templates/kdedcop/app.tdevelop create mode 100644 languages/cpp/app_templates/kdedcop/app_iface.h create mode 100644 languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate create mode 100644 languages/cpp/app_templates/kdedcop/kdedcop.png create mode 100644 languages/cpp/app_templates/kdedcop/main.cpp create mode 100644 languages/cpp/app_templates/kdedcop/mainclass.cpp create mode 100644 languages/cpp/app_templates/kdedcop/mainclass.h create mode 100644 languages/cpp/app_templates/kdedcop/src-Makefile.am create mode 100644 languages/cpp/app_templates/kdedcop/subdirs create mode 100644 languages/cpp/app_templates/kdevlang/CMakeLists.txt create mode 100644 languages/cpp/app_templates/kdevlang/Makefile.am create mode 100644 languages/cpp/app_templates/kdevlang/README.dox create mode 100644 languages/cpp/app_templates/kdevlang/app.tdevelop create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang-configure.in.in create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang.desktop create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang.kdevtemplate create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang.png create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang.rc create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang_part.cpp create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang_part.h create mode 100644 languages/cpp/app_templates/kdevlang/src-Makefile.am create mode 100644 languages/cpp/app_templates/kdevpart/CMakeLists.txt create mode 100644 languages/cpp/app_templates/kdevpart/Makefile.am create mode 100644 languages/cpp/app_templates/kdevpart/README.dox create mode 100644 languages/cpp/app_templates/kdevpart/app.tdevelop create mode 100644 languages/cpp/app_templates/kdevpart/globalconfig.cpp create mode 100644 languages/cpp/app_templates/kdevpart/globalconfig.h create mode 100644 languages/cpp/app_templates/kdevpart/globalconfigbase.ui create mode 100644 languages/cpp/app_templates/kdevpart/kdevpart.desktop create mode 100644 languages/cpp/app_templates/kdevpart/kdevpart.kdevtemplate create mode 100644 languages/cpp/app_templates/kdevpart/kdevpart.png create mode 100644 languages/cpp/app_templates/kdevpart/kdevpart_part.cpp create mode 100644 languages/cpp/app_templates/kdevpart/kdevpart_part.h create mode 100644 languages/cpp/app_templates/kdevpart/kdevpart_part.rc create mode 100644 languages/cpp/app_templates/kdevpart/kdevpart_widget.cpp create mode 100644 languages/cpp/app_templates/kdevpart/kdevpart_widget.h create mode 100644 languages/cpp/app_templates/kdevpart/projectconfig.cpp create mode 100644 languages/cpp/app_templates/kdevpart/projectconfig.h create mode 100644 languages/cpp/app_templates/kdevpart/projectconfigbase.ui create mode 100644 languages/cpp/app_templates/kdevpart/src-Makefile.am create mode 100644 languages/cpp/app_templates/kdevpart2/CMakeLists.txt create mode 100644 languages/cpp/app_templates/kdevpart2/Makefile.am create mode 100644 languages/cpp/app_templates/kdevpart2/README.dox create mode 100644 languages/cpp/app_templates/kdevpart2/app.tdevelop create mode 100644 languages/cpp/app_templates/kdevpart2/globalconfig.cpp create mode 100644 languages/cpp/app_templates/kdevpart2/globalconfig.h create mode 100644 languages/cpp/app_templates/kdevpart2/globalconfigbase.ui create mode 100644 languages/cpp/app_templates/kdevpart2/kdevpart-configure.in.in create mode 100644 languages/cpp/app_templates/kdevpart2/kdevpart.desktop create mode 100644 languages/cpp/app_templates/kdevpart2/kdevpart2.kdevtemplate create mode 100644 languages/cpp/app_templates/kdevpart2/kdevpart2.png create mode 100644 languages/cpp/app_templates/kdevpart2/kdevpart_part.cpp create mode 100644 languages/cpp/app_templates/kdevpart2/kdevpart_part.h create mode 100644 languages/cpp/app_templates/kdevpart2/kdevpart_part.rc create mode 100644 languages/cpp/app_templates/kdevpart2/kdevpart_widget.cpp create mode 100644 languages/cpp/app_templates/kdevpart2/kdevpart_widget.h create mode 100644 languages/cpp/app_templates/kdevpart2/projectconfig.cpp create mode 100644 languages/cpp/app_templates/kdevpart2/projectconfig.h create mode 100644 languages/cpp/app_templates/kdevpart2/projectconfigbase.ui create mode 100644 languages/cpp/app_templates/kdevpart2/src-Makefile.am create mode 100644 languages/cpp/app_templates/kdevpart2/subdirs create mode 100644 languages/cpp/app_templates/khello/khello.kdevtemplate delete mode 100644 languages/cpp/app_templates/khello/khello.tdevtemplate create mode 100644 languages/cpp/app_templates/khello2/khello2.kdevtemplate delete mode 100644 languages/cpp/app_templates/khello2/khello2.tdevtemplate create mode 100644 languages/cpp/app_templates/kicker/kicker.kdevtemplate delete mode 100644 languages/cpp/app_templates/kicker/kicker.tdevtemplate create mode 100644 languages/cpp/app_templates/kmake/kmake.kdevtemplate delete mode 100644 languages/cpp/app_templates/kmake/kmake.tdevtemplate create mode 100644 languages/cpp/app_templates/kmod/kmod.kdevtemplate delete mode 100644 languages/cpp/app_templates/kmod/kmod.tdevtemplate create mode 100644 languages/cpp/app_templates/kofficepart/kopart.kdevtemplate delete mode 100644 languages/cpp/app_templates/kofficepart/kopart.tdevtemplate create mode 100644 languages/cpp/app_templates/konqnavpanel/konqnavpanel.kdevtemplate delete mode 100644 languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevtemplate create mode 100644 languages/cpp/app_templates/kpartapp/kpartapp.kdevtemplate delete mode 100644 languages/cpp/app_templates/kpartapp/kpartapp.tdevtemplate create mode 100644 languages/cpp/app_templates/kpartplugin/kpartplugin.kdevtemplate delete mode 100644 languages/cpp/app_templates/kpartplugin/kpartplugin.tdevtemplate create mode 100644 languages/cpp/app_templates/kscons_kxt/kscons_kxt.kdevtemplate delete mode 100644 languages/cpp/app_templates/kscons_kxt/kscons_kxt.tdevtemplate create mode 100644 languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.kdevtemplate delete mode 100644 languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.tdevtemplate create mode 100644 languages/cpp/app_templates/kxt/kxt.kdevtemplate delete mode 100644 languages/cpp/app_templates/kxt/kxt.tdevtemplate create mode 100644 languages/cpp/app_templates/makefileempty/makefileempty.kdevtemplate delete mode 100644 languages/cpp/app_templates/makefileempty/makefileempty.tdevtemplate create mode 100644 languages/cpp/app_templates/noatunui/noatunui.kdevtemplate delete mode 100644 languages/cpp/app_templates/noatunui/noatunui.tdevtemplate create mode 100644 languages/cpp/app_templates/noatunvisual/noatunvisual.kdevtemplate delete mode 100644 languages/cpp/app_templates/noatunvisual/noatunvisual.tdevtemplate create mode 100644 languages/cpp/app_templates/opieapp/opieapp.kdevtemplate delete mode 100644 languages/cpp/app_templates/opieapp/opieapp.tdevtemplate create mode 100644 languages/cpp/app_templates/opieapplet/opieapplet.kdevtemplate delete mode 100644 languages/cpp/app_templates/opieapplet/opieapplet.tdevtemplate create mode 100644 languages/cpp/app_templates/opieinput/opieinput.kdevtemplate delete mode 100644 languages/cpp/app_templates/opieinput/opieinput.tdevtemplate create mode 100644 languages/cpp/app_templates/opiemenu/opiemenu.kdevtemplate delete mode 100644 languages/cpp/app_templates/opiemenu/opiemenu.tdevtemplate create mode 100644 languages/cpp/app_templates/opienet/opienet.kdevtemplate delete mode 100644 languages/cpp/app_templates/opienet/opienet.tdevtemplate create mode 100644 languages/cpp/app_templates/opietoday/opietoday.kdevtemplate delete mode 100644 languages/cpp/app_templates/opietoday/opietoday.tdevtemplate create mode 100644 languages/cpp/app_templates/prc-tool/prc-tool.kdevtemplate delete mode 100644 languages/cpp/app_templates/prc-tool/prc-tool.tdevtemplate create mode 100644 languages/cpp/app_templates/qmakeapp/qmakeapp.kdevtemplate delete mode 100644 languages/cpp/app_templates/qmakeapp/qmakeapp.tdevtemplate create mode 100644 languages/cpp/app_templates/qmakeempty/qmakeempty.kdevtemplate delete mode 100644 languages/cpp/app_templates/qmakeempty/qmakeempty.tdevtemplate create mode 100644 languages/cpp/app_templates/qmakesimple/qmakesimple.kdevtemplate delete mode 100644 languages/cpp/app_templates/qmakesimple/qmakesimple.tdevtemplate create mode 100644 languages/cpp/app_templates/qt4hello/qt4hello.kdevtemplate delete mode 100644 languages/cpp/app_templates/qt4hello/qt4hello.tdevtemplate create mode 100644 languages/cpp/app_templates/qt4makeapp/qt4makeapp.kdevtemplate delete mode 100644 languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevtemplate create mode 100644 languages/cpp/app_templates/qtopia4app/qtopia4app.kdevtemplate delete mode 100644 languages/cpp/app_templates/qtopia4app/qtopia4app.tdevtemplate create mode 100644 languages/cpp/app_templates/qtopiaapp/qtopiaapp.kdevtemplate delete mode 100644 languages/cpp/app_templates/qtopiaapp/qtopiaapp.tdevtemplate delete mode 100644 languages/cpp/app_templates/tde4app/CMakeLists.txt delete mode 100644 languages/cpp/app_templates/tde4app/Makefile.am delete mode 100644 languages/cpp/app_templates/tde4app/README delete mode 100644 languages/cpp/app_templates/tde4app/main.cpp delete mode 100644 languages/cpp/app_templates/tde4app/prefs_base.ui delete mode 100644 languages/cpp/app_templates/tde4app/settings.kcfgc delete mode 100644 languages/cpp/app_templates/tde4app/tde4app-CMakeLists.txt delete mode 100644 languages/cpp/app_templates/tde4app/tde4app.png delete mode 100644 languages/cpp/app_templates/tde4app/tde4app.tdevelop delete mode 100644 languages/cpp/app_templates/tde4app/tde4app.tdevelop.filelist delete mode 100644 languages/cpp/app_templates/tde4app/tde4app.tdevtemplate delete mode 100644 languages/cpp/app_templates/tde4app/tde4appui.rc delete mode 100644 languages/cpp/app_templates/tde4app/tdeapp4.cpp delete mode 100644 languages/cpp/app_templates/tde4app/tdeapp4.desktop delete mode 100644 languages/cpp/app_templates/tde4app/tdeapp4.h delete mode 100644 languages/cpp/app_templates/tde4app/tdeapp4.kcfg delete mode 100644 languages/cpp/app_templates/tde4app/tdeapp4view.cpp delete mode 100644 languages/cpp/app_templates/tde4app/tdeapp4view.h delete mode 100644 languages/cpp/app_templates/tde4app/tdeapp4view_base.ui delete mode 100644 languages/cpp/app_templates/tdeapp/CMakeLists.txt delete mode 100644 languages/cpp/app_templates/tdeapp/Makefile.am delete mode 100644 languages/cpp/app_templates/tdeapp/README delete mode 100644 languages/cpp/app_templates/tdeapp/app.cpp delete mode 100644 languages/cpp/app_templates/tdeapp/app.desktop delete mode 100644 languages/cpp/app_templates/tdeapp/app.h delete mode 100644 languages/cpp/app_templates/tdeapp/app.tdevelop delete mode 100644 languages/cpp/app_templates/tdeapp/app.tdevses delete mode 100644 languages/cpp/app_templates/tdeapp/app_client.cpp delete mode 100644 languages/cpp/app_templates/tdeapp/appiface.h delete mode 100644 languages/cpp/app_templates/tdeapp/appui.rc delete mode 100644 languages/cpp/app_templates/tdeapp/appview.cpp delete mode 100644 languages/cpp/app_templates/tdeapp/appview.h delete mode 100644 languages/cpp/app_templates/tdeapp/main.cpp delete mode 100644 languages/cpp/app_templates/tdeapp/pref.cpp delete mode 100644 languages/cpp/app_templates/tdeapp/pref.h delete mode 100644 languages/cpp/app_templates/tdeapp/src-Makefile.am delete mode 100644 languages/cpp/app_templates/tdeapp/subdirs delete mode 100644 languages/cpp/app_templates/tdeapp/tdeapp.png delete mode 100644 languages/cpp/app_templates/tdeapp/tdeapp.tdevtemplate create mode 100644 languages/cpp/app_templates/tdecmodule/tdecmodule.kdevtemplate delete mode 100644 languages/cpp/app_templates/tdecmodule/tdecmodule.tdevtemplate create mode 100644 languages/cpp/app_templates/tdeconfig35/tdeconfig35.kdevtemplate delete mode 100644 languages/cpp/app_templates/tdeconfig35/tdeconfig35.tdevtemplate delete mode 100644 languages/cpp/app_templates/tdecpp.appwizard delete mode 100644 languages/cpp/app_templates/tdedcop/CMakeLists.txt delete mode 100644 languages/cpp/app_templates/tdedcop/Makefile.am delete mode 100644 languages/cpp/app_templates/tdedcop/app.cpp delete mode 100644 languages/cpp/app_templates/tdedcop/app.h delete mode 100644 languages/cpp/app_templates/tdedcop/app.tdevelop delete mode 100644 languages/cpp/app_templates/tdedcop/app_iface.h delete mode 100644 languages/cpp/app_templates/tdedcop/main.cpp delete mode 100644 languages/cpp/app_templates/tdedcop/mainclass.cpp delete mode 100644 languages/cpp/app_templates/tdedcop/mainclass.h delete mode 100644 languages/cpp/app_templates/tdedcop/src-Makefile.am delete mode 100644 languages/cpp/app_templates/tdedcop/subdirs delete mode 100644 languages/cpp/app_templates/tdedcop/tdedcop.png delete mode 100644 languages/cpp/app_templates/tdedcop/tdedcop.tdevtemplate create mode 100644 languages/cpp/app_templates/tdefileplugin/tdefileplugin.kdevtemplate delete mode 100644 languages/cpp/app_templates/tdefileplugin/tdefileplugin.tdevtemplate create mode 100644 languages/cpp/app_templates/tdeioslave/tdeioslave.kdevtemplate delete mode 100644 languages/cpp/app_templates/tdeioslave/tdeioslave.tdevtemplate create mode 100644 languages/cpp/app_templates/tdescreensaver/tdescreensaver.kdevtemplate delete mode 100644 languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevtemplate delete mode 100644 languages/cpp/app_templates/tdevlang/CMakeLists.txt delete mode 100644 languages/cpp/app_templates/tdevlang/Makefile.am delete mode 100644 languages/cpp/app_templates/tdevlang/README.dox delete mode 100644 languages/cpp/app_templates/tdevlang/app.tdevelop delete mode 100644 languages/cpp/app_templates/tdevlang/src-Makefile.am delete mode 100644 languages/cpp/app_templates/tdevlang/tdevlang-configure.in.in delete mode 100644 languages/cpp/app_templates/tdevlang/tdevlang.desktop delete mode 100644 languages/cpp/app_templates/tdevlang/tdevlang.png delete mode 100644 languages/cpp/app_templates/tdevlang/tdevlang.rc delete mode 100644 languages/cpp/app_templates/tdevlang/tdevlang.tdevtemplate delete mode 100644 languages/cpp/app_templates/tdevlang/tdevlang_part.cpp delete mode 100644 languages/cpp/app_templates/tdevlang/tdevlang_part.h delete mode 100644 languages/cpp/app_templates/tdevpart/CMakeLists.txt delete mode 100644 languages/cpp/app_templates/tdevpart/Makefile.am delete mode 100644 languages/cpp/app_templates/tdevpart/README.dox delete mode 100644 languages/cpp/app_templates/tdevpart/app.tdevelop delete mode 100644 languages/cpp/app_templates/tdevpart/globalconfig.cpp delete mode 100644 languages/cpp/app_templates/tdevpart/globalconfig.h delete mode 100644 languages/cpp/app_templates/tdevpart/globalconfigbase.ui delete mode 100644 languages/cpp/app_templates/tdevpart/projectconfig.cpp delete mode 100644 languages/cpp/app_templates/tdevpart/projectconfig.h delete mode 100644 languages/cpp/app_templates/tdevpart/projectconfigbase.ui delete mode 100644 languages/cpp/app_templates/tdevpart/src-Makefile.am delete mode 100644 languages/cpp/app_templates/tdevpart/tdevpart.desktop delete mode 100644 languages/cpp/app_templates/tdevpart/tdevpart.png delete mode 100644 languages/cpp/app_templates/tdevpart/tdevpart.tdevtemplate delete mode 100644 languages/cpp/app_templates/tdevpart/tdevpart_part.cpp delete mode 100644 languages/cpp/app_templates/tdevpart/tdevpart_part.h delete mode 100644 languages/cpp/app_templates/tdevpart/tdevpart_part.rc delete mode 100644 languages/cpp/app_templates/tdevpart/tdevpart_widget.cpp delete mode 100644 languages/cpp/app_templates/tdevpart/tdevpart_widget.h delete mode 100644 languages/cpp/app_templates/tdevpart2/CMakeLists.txt delete mode 100644 languages/cpp/app_templates/tdevpart2/Makefile.am delete mode 100644 languages/cpp/app_templates/tdevpart2/README.dox delete mode 100644 languages/cpp/app_templates/tdevpart2/app.tdevelop delete mode 100644 languages/cpp/app_templates/tdevpart2/globalconfig.cpp delete mode 100644 languages/cpp/app_templates/tdevpart2/globalconfig.h delete mode 100644 languages/cpp/app_templates/tdevpart2/globalconfigbase.ui delete mode 100644 languages/cpp/app_templates/tdevpart2/projectconfig.cpp delete mode 100644 languages/cpp/app_templates/tdevpart2/projectconfig.h delete mode 100644 languages/cpp/app_templates/tdevpart2/projectconfigbase.ui delete mode 100644 languages/cpp/app_templates/tdevpart2/src-Makefile.am delete mode 100644 languages/cpp/app_templates/tdevpart2/subdirs delete mode 100644 languages/cpp/app_templates/tdevpart2/tdevpart-configure.in.in delete mode 100644 languages/cpp/app_templates/tdevpart2/tdevpart.desktop delete mode 100644 languages/cpp/app_templates/tdevpart2/tdevpart2.png delete mode 100644 languages/cpp/app_templates/tdevpart2/tdevpart2.tdevtemplate delete mode 100644 languages/cpp/app_templates/tdevpart2/tdevpart_part.cpp delete mode 100644 languages/cpp/app_templates/tdevpart2/tdevpart_part.h delete mode 100644 languages/cpp/app_templates/tdevpart2/tdevpart_part.rc delete mode 100644 languages/cpp/app_templates/tdevpart2/tdevpart_widget.cpp delete mode 100644 languages/cpp/app_templates/tdevpart2/tdevpart_widget.h create mode 100644 languages/cpp/app_templates/win32gui/win32gui.kdevtemplate delete mode 100644 languages/cpp/app_templates/win32gui/win32gui.tdevtemplate create mode 100644 languages/cpp/app_templates/win32hello/win32hello.kdevtemplate delete mode 100644 languages/cpp/app_templates/win32hello/win32hello.tdevtemplate create mode 100644 languages/cpp/app_templates/wxhello/wxhello.kdevtemplate delete mode 100644 languages/cpp/app_templates/wxhello/wxhello.tdevtemplate create mode 100644 languages/cpp/compiler/gccoptions/kdevg77options.desktop create mode 100644 languages/cpp/compiler/gccoptions/kdevgccoptions.desktop create mode 100644 languages/cpp/compiler/gccoptions/kdevgppoptions.desktop delete mode 100644 languages/cpp/compiler/gccoptions/tdevg77options.desktop delete mode 100644 languages/cpp/compiler/gccoptions/tdevgccoptions.desktop delete mode 100644 languages/cpp/compiler/gccoptions/tdevgppoptions.desktop create mode 100644 languages/cpp/debugger/kdevdebugger.desktop create mode 100644 languages/cpp/debugger/kdevdebugger.rc delete mode 100644 languages/cpp/debugger/tdevdebugger.desktop delete mode 100644 languages/cpp/debugger/tdevdebugger.rc create mode 100644 languages/cpp/doc/kde2book.toc create mode 100644 languages/cpp/doc/kdetemplates.toc create mode 100644 languages/cpp/doc/qt-kdev3.toc delete mode 100644 languages/cpp/doc/qt-tdev3.toc delete mode 100644 languages/cpp/doc/tde2book.toc delete mode 100644 languages/cpp/doc/tdetemplates.toc create mode 100644 languages/cpp/kdevcppsupport.desktop create mode 100644 languages/cpp/kdevcppsupport.rc create mode 100644 languages/cpp/kdevcsupport.desktop create mode 100644 languages/cpp/kdevdeepcopy.h create mode 100644 languages/cpp/kdevdriver.cpp create mode 100644 languages/cpp/kdevdriver.h create mode 100644 languages/cpp/pcsimporter/customimporter/kdevcustomimporter.cpp create mode 100644 languages/cpp/pcsimporter/customimporter/kdevcustomimporter.h create mode 100644 languages/cpp/pcsimporter/customimporter/kdevpcscustomimporter.desktop delete mode 100644 languages/cpp/pcsimporter/customimporter/tdevcustomimporter.cpp delete mode 100644 languages/cpp/pcsimporter/customimporter/tdevcustomimporter.h delete mode 100644 languages/cpp/pcsimporter/customimporter/tdevpcscustomimporter.desktop create mode 100644 languages/cpp/pcsimporter/qt4importer/kdevqt4importer.cpp create mode 100644 languages/cpp/pcsimporter/qt4importer/kdevqt4importer.desktop create mode 100644 languages/cpp/pcsimporter/qt4importer/kdevqt4importer.h delete mode 100644 languages/cpp/pcsimporter/qt4importer/tdevqt4importer.cpp delete mode 100644 languages/cpp/pcsimporter/qt4importer/tdevqt4importer.desktop delete mode 100644 languages/cpp/pcsimporter/qt4importer/tdevqt4importer.h create mode 100644 languages/cpp/pcsimporter/qtimporter/kdevqtimporter.cpp create mode 100644 languages/cpp/pcsimporter/qtimporter/kdevqtimporter.desktop create mode 100644 languages/cpp/pcsimporter/qtimporter/kdevqtimporter.h delete mode 100644 languages/cpp/pcsimporter/qtimporter/tdevqtimporter.cpp delete mode 100644 languages/cpp/pcsimporter/qtimporter/tdevqtimporter.desktop delete mode 100644 languages/cpp/pcsimporter/qtimporter/tdevqtimporter.h create mode 100644 languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.cpp create mode 100644 languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.desktop create mode 100644 languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.h delete mode 100644 languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.cpp delete mode 100644 languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.desktop delete mode 100644 languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.h delete mode 100644 languages/cpp/tdevcppsupport.desktop delete mode 100644 languages/cpp/tdevcppsupport.rc delete mode 100644 languages/cpp/tdevcsupport.desktop delete mode 100644 languages/cpp/tdevdeepcopy.h delete mode 100644 languages/cpp/tdevdriver.cpp delete mode 100644 languages/cpp/tdevdriver.h create mode 100644 languages/csharp/kdevcsharpsupport.desktop create mode 100644 languages/csharp/kdevcsharpsupport.rc delete mode 100644 languages/csharp/tdevcsharpsupport.desktop delete mode 100644 languages/csharp/tdevcsharpsupport.rc create mode 100644 languages/fortran/app_templates/fortranhello/fortranhello.kdevtemplate delete mode 100644 languages/fortran/app_templates/fortranhello/fortranhello.tdevtemplate create mode 100644 languages/fortran/compiler/pgioptions/kdevpgf77options.desktop create mode 100644 languages/fortran/compiler/pgioptions/kdevpghpfoptions.desktop delete mode 100644 languages/fortran/compiler/pgioptions/tdevpgf77options.desktop delete mode 100644 languages/fortran/compiler/pgioptions/tdevpghpfoptions.desktop create mode 100644 languages/fortran/kdevfortransupport.desktop create mode 100644 languages/fortran/kdevfortransupport.rc delete mode 100644 languages/fortran/tdevfortransupport.desktop delete mode 100644 languages/fortran/tdevfortransupport.rc create mode 100644 languages/java/KDevJavaSupportIface.cpp create mode 100644 languages/java/KDevJavaSupportIface.h delete mode 100644 languages/java/TDevJavaSupportIface.cpp delete mode 100644 languages/java/TDevJavaSupportIface.h create mode 100644 languages/java/app_templates/javahello/javahello.kdevtemplate delete mode 100644 languages/java/app_templates/javahello/javahello.tdevtemplate create mode 100644 languages/java/app_templates/kappjava/CMakeLists.txt create mode 100644 languages/java/app_templates/kappjava/Makefile.am create mode 100644 languages/java/app_templates/kappjava/app.desktop create mode 100644 languages/java/app_templates/kappjava/app.java create mode 100644 languages/java/app_templates/kappjava/app.tdevelop create mode 100644 languages/java/app_templates/kappjava/app_client.java create mode 100644 languages/java/app_templates/kappjava/appui.rc create mode 100644 languages/java/app_templates/kappjava/appview.java create mode 100644 languages/java/app_templates/kappjava/kappjava create mode 100644 languages/java/app_templates/kappjava/kappjava.kdevtemplate create mode 100644 languages/java/app_templates/kappjava/kappjava.png create mode 100644 languages/java/app_templates/kappjava/pref.java create mode 100644 languages/java/app_templates/kappjava/src-Makefile.am create mode 100644 languages/java/app_templates/kappjava/subdirs create mode 100644 languages/java/app_templates/superwaba/superwaba.kdevtemplate delete mode 100644 languages/java/app_templates/superwaba/superwaba.tdevtemplate delete mode 100644 languages/java/app_templates/tdeappjava/CMakeLists.txt delete mode 100644 languages/java/app_templates/tdeappjava/Makefile.am delete mode 100644 languages/java/app_templates/tdeappjava/app.desktop delete mode 100644 languages/java/app_templates/tdeappjava/app.java delete mode 100644 languages/java/app_templates/tdeappjava/app.tdevelop delete mode 100644 languages/java/app_templates/tdeappjava/app_client.java delete mode 100644 languages/java/app_templates/tdeappjava/appui.rc delete mode 100644 languages/java/app_templates/tdeappjava/appview.java delete mode 100644 languages/java/app_templates/tdeappjava/pref.java delete mode 100644 languages/java/app_templates/tdeappjava/src-Makefile.am delete mode 100644 languages/java/app_templates/tdeappjava/subdirs delete mode 100644 languages/java/app_templates/tdeappjava/tdeappjava delete mode 100644 languages/java/app_templates/tdeappjava/tdeappjava.png delete mode 100644 languages/java/app_templates/tdeappjava/tdeappjava.tdevtemplate create mode 100644 languages/java/kdevdeepcopy.h create mode 100644 languages/java/kdevdriver.cpp create mode 100644 languages/java/kdevdriver.h create mode 100644 languages/java/kdevjavasupport.desktop create mode 100644 languages/java/kdevjavasupport.rc delete mode 100644 languages/java/tdevdeepcopy.h delete mode 100644 languages/java/tdevdriver.cpp delete mode 100644 languages/java/tdevdriver.h delete mode 100644 languages/java/tdevjavasupport.desktop delete mode 100644 languages/java/tdevjavasupport.rc create mode 100644 languages/kjssupport/kdevkjssupport.desktop create mode 100644 languages/kjssupport/kdevkjssupport.rc delete mode 100644 languages/kjssupport/tdevkjssupport.desktop delete mode 100644 languages/kjssupport/tdevkjssupport.rc create mode 100644 languages/lib/debugger/kdevdebugger.cpp create mode 100644 languages/lib/debugger/kdevdebugger.h delete mode 100644 languages/lib/debugger/tdevdebugger.cpp delete mode 100644 languages/lib/debugger/tdevdebugger.h create mode 100644 languages/lib/interfaces/kdevpcsimporter.cpp create mode 100644 languages/lib/interfaces/kdevpcsimporter.h delete mode 100644 languages/lib/interfaces/tdevpcsimporter.cpp delete mode 100644 languages/lib/interfaces/tdevpcsimporter.h create mode 100644 languages/pascal/app_templates/fpcgtk/fpcgtk.kdevtemplate delete mode 100644 languages/pascal/app_templates/fpcgtk/fpcgtk.tdevtemplate create mode 100644 languages/pascal/app_templates/fpchello/fpchello.kdevtemplate delete mode 100644 languages/pascal/app_templates/fpchello/fpchello.tdevtemplate create mode 100644 languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.kdevtemplate delete mode 100644 languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.tdevtemplate create mode 100644 languages/pascal/app_templates/pascalhello/pascalhello.kdevtemplate delete mode 100644 languages/pascal/app_templates/pascalhello/pascalhello.tdevtemplate create mode 100644 languages/pascal/compiler/dccoptions/kdevdccoptions.desktop delete mode 100644 languages/pascal/compiler/dccoptions/tdevdccoptions.desktop create mode 100644 languages/pascal/compiler/fpcoptions/kdevfpcoptions.desktop delete mode 100644 languages/pascal/compiler/fpcoptions/tdevfpcoptions.desktop create mode 100644 languages/pascal/kdevpascalsupport.desktop create mode 100644 languages/pascal/kdevpascalsupport.rc delete mode 100644 languages/pascal/tdevpascalsupport.desktop delete mode 100644 languages/pascal/tdevpascalsupport.rc create mode 100644 languages/perl/app_templates/perlhello/perlhello.kdevtemplate delete mode 100644 languages/perl/app_templates/perlhello/perlhello.tdevtemplate create mode 100644 languages/perl/kdevperlsupport.desktop create mode 100644 languages/perl/kdevperlsupport.rc delete mode 100644 languages/perl/tdevperlsupport.desktop delete mode 100644 languages/perl/tdevperlsupport.rc create mode 100644 languages/php/app_templates/phphello/phphello.kdevtemplate delete mode 100644 languages/php/app_templates/phphello/phphello.tdevtemplate create mode 100644 languages/php/kdevphpsupport.desktop create mode 100644 languages/php/kdevphpsupport.rc delete mode 100644 languages/php/tdevphpsupport.desktop delete mode 100644 languages/php/tdevphpsupport.rc create mode 100644 languages/python/app_templates/pyqt/pyqt.kdevtemplate delete mode 100644 languages/python/app_templates/pyqt/pyqt.tdevtemplate create mode 100644 languages/python/app_templates/pythonhello/pythonhello.kdevtemplate delete mode 100644 languages/python/app_templates/pythonhello/pythonhello.tdevtemplate create mode 100644 languages/python/app_templates/pytk/pytk.kdevtemplate delete mode 100644 languages/python/app_templates/pytk/pytk.tdevtemplate create mode 100755 languages/python/kde_pydoc.py create mode 100644 languages/python/kdevpythonsupport.desktop create mode 100644 languages/python/kdevpythonsupport.rc delete mode 100644 languages/python/tde_pydoc.py delete mode 100644 languages/python/tdevpythonsupport.desktop delete mode 100644 languages/python/tdevpythonsupport.rc create mode 100644 languages/ruby/app_templates/dcopservice/dcopserviceruby.kdevtemplate delete mode 100644 languages/ruby/app_templates/dcopservice/dcopserviceruby.tdevtemplate create mode 100644 languages/ruby/app_templates/kapp/CMakeLists.txt create mode 100644 languages/ruby/app_templates/kapp/Makefile.am create mode 100644 languages/ruby/app_templates/kapp/README create mode 100644 languages/ruby/app_templates/kapp/app-Makefile.am create mode 100644 languages/ruby/app_templates/kapp/app-configure.in.in create mode 100644 languages/ruby/app_templates/kapp/app.cpp create mode 100644 languages/ruby/app_templates/kapp/app.desktop create mode 100644 languages/ruby/app_templates/kapp/app.rb create mode 100644 languages/ruby/app_templates/kapp/app.tdevelop create mode 100644 languages/ruby/app_templates/kapp/app_client.rb create mode 100644 languages/ruby/app_templates/kapp/appiface.rb create mode 100644 languages/ruby/app_templates/kapp/appui.rc create mode 100644 languages/ruby/app_templates/kapp/appview.rb create mode 100644 languages/ruby/app_templates/kapp/kappruby.kdevtemplate create mode 100644 languages/ruby/app_templates/kapp/kappruby.png create mode 100644 languages/ruby/app_templates/kapp/main.rb create mode 100644 languages/ruby/app_templates/kapp/pref.rb create mode 100644 languages/ruby/app_templates/kapp/src-Makefile.am create mode 100644 languages/ruby/app_templates/kapp/subdirs create mode 100644 languages/ruby/app_templates/kxt/kxtruby.kdevtemplate delete mode 100644 languages/ruby/app_templates/kxt/kxtruby.tdevtemplate create mode 100644 languages/ruby/app_templates/qtruby/qtruby.kdevtemplate delete mode 100644 languages/ruby/app_templates/qtruby/qtruby.tdevtemplate create mode 100644 languages/ruby/app_templates/qtruby4app/qtruby4app.kdevtemplate delete mode 100644 languages/ruby/app_templates/qtruby4app/qtruby4app.tdevtemplate create mode 100644 languages/ruby/app_templates/qtrubyapp/qtrubyapp.kdevtemplate delete mode 100644 languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevtemplate create mode 100644 languages/ruby/app_templates/rails/rails.kdevtemplate delete mode 100644 languages/ruby/app_templates/rails/rails.tdevtemplate create mode 100644 languages/ruby/app_templates/rubyhello/rubyhello.kdevtemplate delete mode 100644 languages/ruby/app_templates/rubyhello/rubyhello.tdevtemplate delete mode 100644 languages/ruby/app_templates/tdeapp/CMakeLists.txt delete mode 100644 languages/ruby/app_templates/tdeapp/Makefile.am delete mode 100644 languages/ruby/app_templates/tdeapp/README delete mode 100644 languages/ruby/app_templates/tdeapp/app-Makefile.am delete mode 100644 languages/ruby/app_templates/tdeapp/app-configure.in.in delete mode 100644 languages/ruby/app_templates/tdeapp/app.cpp delete mode 100644 languages/ruby/app_templates/tdeapp/app.desktop delete mode 100644 languages/ruby/app_templates/tdeapp/app.rb delete mode 100644 languages/ruby/app_templates/tdeapp/app.tdevelop delete mode 100644 languages/ruby/app_templates/tdeapp/app_client.rb delete mode 100644 languages/ruby/app_templates/tdeapp/appiface.rb delete mode 100644 languages/ruby/app_templates/tdeapp/appui.rc delete mode 100644 languages/ruby/app_templates/tdeapp/appview.rb delete mode 100644 languages/ruby/app_templates/tdeapp/main.rb delete mode 100644 languages/ruby/app_templates/tdeapp/pref.rb delete mode 100644 languages/ruby/app_templates/tdeapp/src-Makefile.am delete mode 100644 languages/ruby/app_templates/tdeapp/subdirs delete mode 100644 languages/ruby/app_templates/tdeapp/tdeappruby.png delete mode 100644 languages/ruby/app_templates/tdeapp/tdeappruby.tdevtemplate create mode 100644 languages/ruby/debugger/kdevrbdebugger.desktop create mode 100644 languages/ruby/debugger/kdevrbdebugger.rc delete mode 100644 languages/ruby/debugger/tdevrbdebugger.desktop delete mode 100644 languages/ruby/debugger/tdevrbdebugger.rc create mode 100644 languages/ruby/kdevrubysupport.desktop create mode 100644 languages/ruby/kdevrubysupport.rc delete mode 100644 languages/ruby/tdevrubysupport.desktop delete mode 100644 languages/ruby/tdevrubysupport.rc create mode 100644 languages/sql/app_templates/sqlsimple/sqlsimple.kdevtemplate delete mode 100644 languages/sql/app_templates/sqlsimple/sqlsimple.tdevtemplate create mode 100644 languages/sql/kdevsqlsupport.desktop create mode 100644 languages/sql/kdevsqlsupport.rc delete mode 100644 languages/sql/tdevsqlsupport.desktop delete mode 100644 languages/sql/tdevsqlsupport.rc create mode 100644 lib/interfaces/KDevCoreIface.cpp create mode 100644 lib/interfaces/KDevCoreIface.h create mode 100644 lib/interfaces/KDevPartControllerIface.cpp create mode 100644 lib/interfaces/KDevPartControllerIface.h delete mode 100644 lib/interfaces/TDevCoreIface.cpp delete mode 100644 lib/interfaces/TDevCoreIface.h delete mode 100644 lib/interfaces/TDevPartControllerIface.cpp delete mode 100644 lib/interfaces/TDevPartControllerIface.h create mode 100644 lib/interfaces/extensions/dcop/KDevAppFrontendIface.cpp create mode 100644 lib/interfaces/extensions/dcop/KDevAppFrontendIface.h create mode 100644 lib/interfaces/extensions/dcop/KDevMakeFrontendIface.cpp create mode 100644 lib/interfaces/extensions/dcop/KDevMakeFrontendIface.h delete mode 100644 lib/interfaces/extensions/dcop/TDevAppFrontendIface.cpp delete mode 100644 lib/interfaces/extensions/dcop/TDevAppFrontendIface.h delete mode 100644 lib/interfaces/extensions/dcop/TDevMakeFrontendIface.cpp delete mode 100644 lib/interfaces/extensions/dcop/TDevMakeFrontendIface.h create mode 100644 lib/interfaces/extensions/kdevappfrontend.cpp create mode 100644 lib/interfaces/extensions/kdevappfrontend.h create mode 100644 lib/interfaces/extensions/kdevcreatefile.h create mode 100644 lib/interfaces/extensions/kdevdifffrontend.cpp create mode 100644 lib/interfaces/extensions/kdevdifffrontend.h create mode 100644 lib/interfaces/extensions/kdevmakefrontend.cpp create mode 100644 lib/interfaces/extensions/kdevmakefrontend.h create mode 100644 lib/interfaces/extensions/kdevquickopen.h create mode 100644 lib/interfaces/extensions/kdevsourceformatter.h create mode 100644 lib/interfaces/extensions/kdevversioncontrol.h delete mode 100644 lib/interfaces/extensions/tdevappfrontend.cpp delete mode 100644 lib/interfaces/extensions/tdevappfrontend.h delete mode 100644 lib/interfaces/extensions/tdevcreatefile.h delete mode 100644 lib/interfaces/extensions/tdevdifffrontend.cpp delete mode 100644 lib/interfaces/extensions/tdevdifffrontend.h delete mode 100644 lib/interfaces/extensions/tdevmakefrontend.cpp delete mode 100644 lib/interfaces/extensions/tdevmakefrontend.h delete mode 100644 lib/interfaces/extensions/tdevquickopen.h delete mode 100644 lib/interfaces/extensions/tdevsourceformatter.h delete mode 100644 lib/interfaces/extensions/tdevversioncontrol.h create mode 100644 lib/interfaces/extras/kdevcompileroptions.cpp create mode 100644 lib/interfaces/extras/kdevcompileroptions.h create mode 100644 lib/interfaces/extras/kdevvcsintegrator.cpp create mode 100644 lib/interfaces/extras/kdevvcsintegrator.h delete mode 100644 lib/interfaces/extras/tdevcompileroptions.cpp delete mode 100644 lib/interfaces/extras/tdevcompileroptions.h delete mode 100644 lib/interfaces/extras/tdevvcsintegrator.cpp delete mode 100644 lib/interfaces/extras/tdevvcsintegrator.h create mode 100644 lib/interfaces/kdevapi.cpp create mode 100644 lib/interfaces/kdevapi.h create mode 100644 lib/interfaces/kdevcoderepository.cpp create mode 100644 lib/interfaces/kdevcoderepository.h create mode 100644 lib/interfaces/kdevcore.cpp create mode 100644 lib/interfaces/kdevcore.h create mode 100644 lib/interfaces/kdevdesignerintegration.cpp create mode 100644 lib/interfaces/kdevdesignerintegration.h create mode 100644 lib/interfaces/kdevdesignerintegrationiface.cpp create mode 100644 lib/interfaces/kdevdesignerintegrationiface.h create mode 100644 lib/interfaces/kdevgenericfactory.h create mode 100644 lib/interfaces/kdevlanguagesupport.cpp create mode 100644 lib/interfaces/kdevlanguagesupport.h create mode 100644 lib/interfaces/kdevmainwindow.cpp create mode 100644 lib/interfaces/kdevmainwindow.h create mode 100644 lib/interfaces/kdevpartcontroller.cpp create mode 100644 lib/interfaces/kdevpartcontroller.h create mode 100644 lib/interfaces/kdevplugin.cpp create mode 100644 lib/interfaces/kdevplugin.h create mode 100644 lib/interfaces/kdevplugincontroller.cpp create mode 100644 lib/interfaces/kdevplugincontroller.h create mode 100644 lib/interfaces/kdevplugininfo.cpp create mode 100644 lib/interfaces/kdevplugininfo.h create mode 100644 lib/interfaces/kdevproject.cpp create mode 100644 lib/interfaces/kdevproject.h create mode 100644 lib/interfaces/kdevprojectiface.cpp create mode 100644 lib/interfaces/kdevprojectiface.h delete mode 100644 lib/interfaces/tdevapi.cpp delete mode 100644 lib/interfaces/tdevapi.h delete mode 100644 lib/interfaces/tdevcoderepository.cpp delete mode 100644 lib/interfaces/tdevcoderepository.h delete mode 100644 lib/interfaces/tdevcore.cpp delete mode 100644 lib/interfaces/tdevcore.h delete mode 100644 lib/interfaces/tdevdesignerintegration.cpp delete mode 100644 lib/interfaces/tdevdesignerintegration.h delete mode 100644 lib/interfaces/tdevdesignerintegrationiface.cpp delete mode 100644 lib/interfaces/tdevdesignerintegrationiface.h delete mode 100644 lib/interfaces/tdevgenericfactory.h delete mode 100644 lib/interfaces/tdevlanguagesupport.cpp delete mode 100644 lib/interfaces/tdevlanguagesupport.h delete mode 100644 lib/interfaces/tdevmainwindow.cpp delete mode 100644 lib/interfaces/tdevmainwindow.h delete mode 100644 lib/interfaces/tdevpartcontroller.cpp delete mode 100644 lib/interfaces/tdevpartcontroller.h delete mode 100644 lib/interfaces/tdevplugin.cpp delete mode 100644 lib/interfaces/tdevplugin.h delete mode 100644 lib/interfaces/tdevplugincontroller.cpp delete mode 100644 lib/interfaces/tdevplugincontroller.h delete mode 100644 lib/interfaces/tdevplugininfo.cpp delete mode 100644 lib/interfaces/tdevplugininfo.h delete mode 100644 lib/interfaces/tdevproject.cpp delete mode 100644 lib/interfaces/tdevproject.h delete mode 100644 lib/interfaces/tdevprojectiface.cpp delete mode 100644 lib/interfaces/tdevprojectiface.h create mode 100644 lib/util/kdeveditorutil.cpp create mode 100644 lib/util/kdeveditorutil.h create mode 100644 lib/util/kdevjobtimer.cpp create mode 100644 lib/util/kdevjobtimer.h create mode 100644 lib/util/kdevshellwidget.cpp create mode 100644 lib/util/kdevshellwidget.h delete mode 100644 lib/util/tdeveditorutil.cpp delete mode 100644 lib/util/tdeveditorutil.h delete mode 100644 lib/util/tdevjobtimer.cpp delete mode 100644 lib/util/tdevjobtimer.h delete mode 100644 lib/util/tdevshellwidget.cpp delete mode 100644 lib/util/tdevshellwidget.h create mode 100644 lib/widgets/kdevhtml_partui.rc create mode 100644 lib/widgets/kdevhtmlpart.cpp create mode 100644 lib/widgets/kdevhtmlpart.h create mode 100644 lib/widgets/kdevtabwidget.cpp delete mode 100644 lib/widgets/tdevhtml_partui.rc delete mode 100644 lib/widgets/tdevhtmlpart.cpp delete mode 100644 lib/widgets/tdevhtmlpart.h delete mode 100644 lib/widgets/tdevtabwidget.cpp create mode 100644 parts/abbrev/kdevabbrev.desktop create mode 100644 parts/abbrev/kdevabbrev.rc delete mode 100644 parts/abbrev/tdevabbrev.desktop delete mode 100644 parts/abbrev/tdevabbrev.rc create mode 100644 parts/appwizard/common/admin.kdevtemplate delete mode 100644 parts/appwizard/common/admin.tdevtemplate create mode 100644 parts/appwizard/common/dockbook.kdevtemplate delete mode 100644 parts/appwizard/common/dockbook.tdevtemplate create mode 100644 parts/appwizard/common/gnome2.kdevtemplate delete mode 100644 parts/appwizard/common/gnome2.tdevtemplate create mode 100644 parts/appwizard/common/gnu.kdevtemplate delete mode 100644 parts/appwizard/common/gnu.tdevtemplate create mode 100644 parts/appwizard/common/incadmin.kdevtemplate delete mode 100644 parts/appwizard/common/incadmin.tdevtemplate create mode 100644 parts/appwizard/common/kde-Makefile.am create mode 100644 parts/appwizard/common/kde-Makefile.cvs create mode 100644 parts/appwizard/common/kde-app.lsm create mode 100644 parts/appwizard/common/kde-doc-Makefile.am create mode 100644 parts/appwizard/common/kde-doc-en-Makefile.am create mode 100644 parts/appwizard/common/kde-po-Makefile.am create mode 100644 parts/appwizard/common/scons.kdevtemplate delete mode 100644 parts/appwizard/common/scons.tdevtemplate create mode 100644 parts/appwizard/common/scons/admin/kde.py delete mode 100644 parts/appwizard/common/scons/admin/tde.py delete mode 100644 parts/appwizard/common/tde-Makefile.am delete mode 100644 parts/appwizard/common/tde-Makefile.cvs delete mode 100644 parts/appwizard/common/tde-app.lsm delete mode 100644 parts/appwizard/common/tde-doc-Makefile.am delete mode 100644 parts/appwizard/common/tde-doc-en-Makefile.am delete mode 100644 parts/appwizard/common/tde-po-Makefile.am create mode 100644 parts/appwizard/imports/kde create mode 100644 parts/appwizard/imports/kde.tdevelop delete mode 100644 parts/appwizard/imports/tde delete mode 100644 parts/appwizard/imports/tde.tdevelop create mode 100644 parts/appwizard/kdevappwizard.desktop create mode 100644 parts/appwizard/kdevappwizard.rc create mode 100644 parts/appwizard/kdevfile.cpp create mode 100644 parts/appwizard/kdevfile.h create mode 100644 parts/appwizard/kdevlicense.cpp create mode 100644 parts/appwizard/kdevlicense.h delete mode 100644 parts/appwizard/tdevappwizard.desktop delete mode 100644 parts/appwizard/tdevappwizard.rc delete mode 100644 parts/appwizard/tdevfile.cpp delete mode 100644 parts/appwizard/tdevfile.h delete mode 100644 parts/appwizard/tdevlicense.cpp delete mode 100644 parts/appwizard/tdevlicense.h create mode 100644 parts/astyle/kdevastyle.desktop create mode 100644 parts/astyle/kdevpart_astyle.rc delete mode 100644 parts/astyle/tdevastyle.desktop delete mode 100644 parts/astyle/tdevpart_astyle.rc create mode 100644 parts/bookmarks/kdevbookmarks.desktop delete mode 100644 parts/bookmarks/tdevbookmarks.desktop create mode 100644 parts/classview/kdevclassview.desktop create mode 100644 parts/classview/kdevclassview.rc delete mode 100644 parts/classview/tdevclassview.desktop delete mode 100644 parts/classview/tdevclassview.rc create mode 100644 parts/ctags2/kdevctags2.desktop create mode 100644 parts/ctags2/kdevpart_ctags2.rc delete mode 100644 parts/ctags2/tdevctags2.desktop delete mode 100644 parts/ctags2/tdevpart_ctags2.rc create mode 100644 parts/diff/kdevdiff.desktop create mode 100644 parts/diff/kdevdiff.rc delete mode 100644 parts/diff/tdevdiff.desktop delete mode 100644 parts/diff/tdevdiff.rc create mode 100644 parts/distpart/kdevdistpart.desktop create mode 100644 parts/distpart/kdevpart_distpart.rc delete mode 100644 parts/distpart/tdevdistpart.desktop delete mode 100644 parts/distpart/tdevpart_distpart.rc create mode 100644 parts/documentation/KDevDocumentationIface.cpp create mode 100644 parts/documentation/KDevDocumentationIface.h delete mode 100644 parts/documentation/TDevDocumentationIface.cpp delete mode 100644 parts/documentation/TDevDocumentationIface.h create mode 100644 parts/documentation/interfaces/kdevdocumentationplugin.cpp create mode 100644 parts/documentation/interfaces/kdevdocumentationplugin.h delete mode 100644 parts/documentation/interfaces/tdevdocumentationplugin.cpp delete mode 100644 parts/documentation/interfaces/tdevdocumentationplugin.h create mode 100644 parts/documentation/kdevdocumentation.desktop create mode 100644 parts/documentation/kdevpart_documentation.rc create mode 100644 parts/documentation/plugins/kdevtoc/CMakeLists.txt create mode 100644 parts/documentation/plugins/kdevtoc/Makefile.am create mode 100644 parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp create mode 100644 parts/documentation/plugins/kdevtoc/dockdevtocplugin.desktop create mode 100644 parts/documentation/plugins/kdevtoc/dockdevtocplugin.h delete mode 100644 parts/documentation/plugins/tdevtoc/CMakeLists.txt delete mode 100644 parts/documentation/plugins/tdevtoc/Makefile.am delete mode 100644 parts/documentation/plugins/tdevtoc/doctdevtocplugin.cpp delete mode 100644 parts/documentation/plugins/tdevtoc/doctdevtocplugin.desktop delete mode 100644 parts/documentation/plugins/tdevtoc/doctdevtocplugin.h delete mode 100644 parts/documentation/tdevdocumentation.desktop delete mode 100644 parts/documentation/tdevpart_documentation.rc create mode 100644 parts/doxygen/kdevdoxygen.desktop create mode 100644 parts/doxygen/kdevdoxygen.rc delete mode 100644 parts/doxygen/tdevdoxygen.desktop delete mode 100644 parts/doxygen/tdevdoxygen.rc create mode 100644 parts/filecreate/kdevfilecreate.desktop create mode 100644 parts/filecreate/kdevpart_filecreate.rc delete mode 100644 parts/filecreate/tdevfilecreate.desktop delete mode 100644 parts/filecreate/tdevpart_filecreate.rc create mode 100644 parts/filelist/kdevfilelist.desktop create mode 100644 parts/filelist/kdevfilelist.rc delete mode 100644 parts/filelist/tdevfilelist.desktop delete mode 100644 parts/filelist/tdevfilelist.rc create mode 100644 parts/fileselector/kdevfileselector.desktop create mode 100644 parts/fileselector/kdevpart_fileselector.rc delete mode 100644 parts/fileselector/tdevfileselector.desktop delete mode 100644 parts/fileselector/tdevpart_fileselector.rc create mode 100644 parts/fileview/kdevfilegroups.desktop create mode 100644 parts/fileview/kdevfileview.desktop delete mode 100644 parts/fileview/tdevfilegroups.desktop delete mode 100644 parts/fileview/tdevfileview.desktop create mode 100644 parts/filter/kdevfilter.desktop create mode 100644 parts/filter/kdevfilter.rc create mode 100644 parts/filter/kdevfilterIface.cpp create mode 100644 parts/filter/kdevfilterIface.h delete mode 100644 parts/filter/tdevfilter.desktop delete mode 100644 parts/filter/tdevfilter.rc delete mode 100644 parts/filter/tdevfilterIface.cpp delete mode 100644 parts/filter/tdevfilterIface.h create mode 100644 parts/fullscreen/kdevfullscreen.desktop create mode 100644 parts/fullscreen/kdevpart_fullscreen.rc delete mode 100644 parts/fullscreen/tdevfullscreen.desktop delete mode 100644 parts/fullscreen/tdevpart_fullscreen.rc create mode 100644 parts/grepview/kdevgrepview.desktop create mode 100644 parts/grepview/kdevgrepview.rc delete mode 100644 parts/grepview/tdevgrepview.desktop delete mode 100644 parts/grepview/tdevgrepview.rc create mode 100644 parts/konsole/kdevkonsoleview.desktop delete mode 100644 parts/konsole/tdevkonsoleview.desktop create mode 100644 parts/openwith/kdevopenwith.desktop delete mode 100644 parts/openwith/tdevopenwith.desktop create mode 100644 parts/outputviews/kdevappoutputview.desktop create mode 100644 parts/outputviews/kdevmakeview.desktop create mode 100644 parts/outputviews/kdevmakeview.rc delete mode 100644 parts/outputviews/tdevappoutputview.desktop delete mode 100644 parts/outputviews/tdevmakeview.desktop delete mode 100644 parts/outputviews/tdevmakeview.rc create mode 100644 parts/partexplorer/kdevpartexplorer.desktop create mode 100644 parts/partexplorer/kdevpartexplorer.rc delete mode 100644 parts/partexplorer/tdevpartexplorer.desktop delete mode 100644 parts/partexplorer/tdevpartexplorer.rc create mode 100644 parts/quickopen/kdevpart_quickopen.rc create mode 100644 parts/quickopen/kdevquickopen.desktop delete mode 100644 parts/quickopen/tdevpart_quickopen.rc delete mode 100644 parts/quickopen/tdevquickopen.desktop create mode 100644 parts/regexptest/kdevregexptest.desktop create mode 100644 parts/regexptest/kdevregexptest.rc delete mode 100644 parts/regexptest/tdevregexptest.desktop delete mode 100644 parts/regexptest/tdevregexptest.rc create mode 100644 parts/replace/kdevpart_replace.rc create mode 100644 parts/replace/kdevreplace.desktop delete mode 100644 parts/replace/tdevpart_replace.rc delete mode 100644 parts/replace/tdevreplace.desktop create mode 100644 parts/scripting/kdevscripting.desktop create mode 100644 parts/scripting/kdevscripting.rc delete mode 100644 parts/scripting/tdevscripting.desktop delete mode 100644 parts/scripting/tdevscripting.rc create mode 100644 parts/snippet/kdevpart_snippet.rc create mode 100644 parts/snippet/kdevsnippet.desktop delete mode 100644 parts/snippet/tdevpart_snippet.rc delete mode 100644 parts/snippet/tdevsnippet.desktop create mode 100644 parts/texttools/kdevtexttools.desktop delete mode 100644 parts/texttools/tdevtexttools.desktop create mode 100644 parts/tipofday/kdevpart_tipofday.rc create mode 100644 parts/tipofday/kdevtipofday.desktop delete mode 100644 parts/tipofday/tdevpart_tipofday.rc delete mode 100644 parts/tipofday/tdevtipofday.desktop create mode 100644 parts/tools/kdevpart_tools.rc create mode 100644 parts/tools/kdevtools.desktop delete mode 100644 parts/tools/tdevpart_tools.rc delete mode 100644 parts/tools/tdevtools.desktop create mode 100644 parts/uimode/kdevuichooser.desktop delete mode 100644 parts/uimode/tdevuichooser.desktop create mode 100644 parts/valgrind/kdevpart_valgrind.rc create mode 100644 parts/valgrind/kdevvalgrind.desktop delete mode 100644 parts/valgrind/tdevpart_valgrind.rc delete mode 100644 parts/valgrind/tdevvalgrind.desktop create mode 100644 parts/vcsmanager/kdevvcsmanager.desktop delete mode 100644 parts/vcsmanager/tdevvcsmanager.desktop create mode 100644 pics/hi16-app-kdevassistant.png create mode 100644 pics/hi16-app-kdevdesigner.png delete mode 100644 pics/hi16-app-tdevassistant.png delete mode 100644 pics/hi16-app-tdevdesigner.png create mode 100644 pics/hi32-app-kdevassistant.png create mode 100644 pics/hi32-app-kdevdesigner.png delete mode 100644 pics/hi32-app-tdevassistant.png delete mode 100644 pics/hi32-app-tdevdesigner.png create mode 100644 pics/hi48-app-kdevassistant.png create mode 100644 pics/hi48-app-kdevdesigner.png delete mode 100644 pics/hi48-app-tdevassistant.png delete mode 100644 pics/hi48-app-tdevdesigner.png create mode 100644 pics/misc/kdevassistant-splash.png create mode 100644 pics/misc/kdevdesigner-splash.png delete mode 100644 pics/misc/tdevassistant-splash.png delete mode 100644 pics/misc/tdevdesigner-splash.png create mode 100644 src/kdevassistantextension.cpp create mode 100644 src/kdevassistantextension.h create mode 100644 src/kdevassistantrc create mode 100644 src/kdevassistantui.rc create mode 100644 src/kdevideextension.cpp create mode 100644 src/kdevideextension.h create mode 100644 src/kdevpluginprofilerc create mode 100644 src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/CMakeLists.txt create mode 100644 src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/Makefile.am create mode 100644 src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/profile.config delete mode 100644 src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/CMakeLists.txt delete mode 100644 src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/Makefile.am delete mode 100644 src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/profile.config create mode 100644 src/profiles/KDevAssistant/CMakeLists.txt create mode 100644 src/profiles/KDevAssistant/Makefile.am create mode 100644 src/profiles/KDevAssistant/profile.config delete mode 100644 src/profiles/TDevAssistant/CMakeLists.txt delete mode 100644 src/profiles/TDevAssistant/Makefile.am delete mode 100644 src/profiles/TDevAssistant/profile.config create mode 100644 src/tdeconf_update/kdev-gen-settings-tdeconf_update.cpp create mode 100644 src/tdeconf_update/kdev-gen-settings.upd delete mode 100644 src/tdeconf_update/tdev-gen-settings-tdeconf_update.cpp delete mode 100644 src/tdeconf_update/tdev-gen-settings.upd delete mode 100644 src/tdevassistantextension.cpp delete mode 100644 src/tdevassistantextension.h delete mode 100644 src/tdevassistantrc delete mode 100644 src/tdevassistantui.rc delete mode 100644 src/tdevideextension.cpp delete mode 100644 src/tdevideextension.h delete mode 100644 src/tdevpluginprofilerc delete mode 100644 tde_app_devel.desktop delete mode 100644 tdevassistant.desktop delete mode 100644 tdevdesigner/AUTHORS delete mode 100644 tdevdesigner/CMakeLists.txt delete mode 100644 tdevdesigner/LICENSE.GPL delete mode 100644 tdevdesigner/Makefile.am delete mode 100644 tdevdesigner/NEWS delete mode 100644 tdevdesigner/README delete mode 100644 tdevdesigner/TODO delete mode 100644 tdevdesigner/designer/CMakeLists.txt delete mode 100644 tdevdesigner/designer/Makefile.am delete mode 100644 tdevdesigner/designer/about.ui delete mode 100644 tdevdesigner/designer/actiondnd.cpp delete mode 100644 tdevdesigner/designer/actiondnd.h delete mode 100644 tdevdesigner/designer/actioneditor.ui delete mode 100644 tdevdesigner/designer/actioneditorimpl.cpp delete mode 100644 tdevdesigner/designer/actioneditorimpl.h delete mode 100644 tdevdesigner/designer/actionlistview.cpp delete mode 100644 tdevdesigner/designer/actionlistview.h delete mode 100644 tdevdesigner/designer/asciivalidator.cpp delete mode 100644 tdevdesigner/designer/asciivalidator.h delete mode 100644 tdevdesigner/designer/command.cpp delete mode 100644 tdevdesigner/designer/command.h delete mode 100644 tdevdesigner/designer/configtoolboxdialog.ui delete mode 100644 tdevdesigner/designer/configtoolboxdialog.ui.h delete mode 100644 tdevdesigner/designer/connectiondialog.ui delete mode 100644 tdevdesigner/designer/connectiondialog.ui.h delete mode 100644 tdevdesigner/designer/connectionitems.cpp delete mode 100644 tdevdesigner/designer/connectionitems.h delete mode 100644 tdevdesigner/designer/connectiontable.cpp delete mode 100644 tdevdesigner/designer/connectiontable.h delete mode 100644 tdevdesigner/designer/createtemplate.ui delete mode 100644 tdevdesigner/designer/customwidgeteditor.ui delete mode 100644 tdevdesigner/designer/customwidgeteditorimpl.cpp delete mode 100644 tdevdesigner/designer/customwidgeteditorimpl.h delete mode 100644 tdevdesigner/designer/database.cpp delete mode 100644 tdevdesigner/designer/database.h delete mode 100644 tdevdesigner/designer/dbconnection.ui delete mode 100644 tdevdesigner/designer/dbconnectioneditor.ui delete mode 100644 tdevdesigner/designer/dbconnectionimpl.cpp delete mode 100644 tdevdesigner/designer/dbconnectionimpl.h delete mode 100644 tdevdesigner/designer/dbconnections.ui delete mode 100644 tdevdesigner/designer/dbconnectionsimpl.cpp delete mode 100644 tdevdesigner/designer/dbconnectionsimpl.h delete mode 100644 tdevdesigner/designer/defs.cpp delete mode 100644 tdevdesigner/designer/defs.h delete mode 100644 tdevdesigner/designer/designer_pch.h delete mode 100644 tdevdesigner/designer/designeraction.cpp delete mode 100644 tdevdesigner/designer/designeraction.h delete mode 100644 tdevdesigner/designer/designerapp.cpp delete mode 100644 tdevdesigner/designer/designerapp.h delete mode 100644 tdevdesigner/designer/designerappiface.cpp delete mode 100644 tdevdesigner/designer/designerappiface.h delete mode 100644 tdevdesigner/designer/editfunctions.ui delete mode 100644 tdevdesigner/designer/editfunctionsimpl.cpp delete mode 100644 tdevdesigner/designer/editfunctionsimpl.h delete mode 100644 tdevdesigner/designer/filechooser.cpp delete mode 100644 tdevdesigner/designer/filechooser.h delete mode 100644 tdevdesigner/designer/finddialog.ui delete mode 100644 tdevdesigner/designer/finddialog.ui.h delete mode 100644 tdevdesigner/designer/formfile.cpp delete mode 100644 tdevdesigner/designer/formfile.h delete mode 100644 tdevdesigner/designer/formsettings.ui delete mode 100644 tdevdesigner/designer/formsettingsimpl.cpp delete mode 100644 tdevdesigner/designer/formsettingsimpl.h delete mode 100644 tdevdesigner/designer/formwindow.cpp delete mode 100644 tdevdesigner/designer/formwindow.h delete mode 100644 tdevdesigner/designer/gotolinedialog.ui delete mode 100644 tdevdesigner/designer/gotolinedialog.ui.h delete mode 100644 tdevdesigner/designer/hierarchyview.cpp delete mode 100644 tdevdesigner/designer/hierarchyview.h delete mode 100644 tdevdesigner/designer/iconvieweditor.ui delete mode 100644 tdevdesigner/designer/iconvieweditorimpl.cpp delete mode 100644 tdevdesigner/designer/iconvieweditorimpl.h delete mode 100644 tdevdesigner/designer/layout.cpp delete mode 100644 tdevdesigner/designer/layout.h delete mode 100644 tdevdesigner/designer/listboxdnd.cpp delete mode 100644 tdevdesigner/designer/listboxdnd.h delete mode 100644 tdevdesigner/designer/listboxeditor.ui delete mode 100644 tdevdesigner/designer/listboxeditorimpl.cpp delete mode 100644 tdevdesigner/designer/listboxeditorimpl.h delete mode 100644 tdevdesigner/designer/listboxrename.cpp delete mode 100644 tdevdesigner/designer/listboxrename.h delete mode 100644 tdevdesigner/designer/listdnd.cpp delete mode 100644 tdevdesigner/designer/listdnd.h delete mode 100644 tdevdesigner/designer/listeditor.ui delete mode 100644 tdevdesigner/designer/listeditor.ui.h delete mode 100644 tdevdesigner/designer/listviewdnd.cpp delete mode 100644 tdevdesigner/designer/listviewdnd.h delete mode 100644 tdevdesigner/designer/listvieweditor.ui delete mode 100644 tdevdesigner/designer/listvieweditorimpl.cpp delete mode 100644 tdevdesigner/designer/listvieweditorimpl.h delete mode 100644 tdevdesigner/designer/mainwindow.cpp delete mode 100644 tdevdesigner/designer/mainwindow.h delete mode 100644 tdevdesigner/designer/mainwindowactions.cpp delete mode 100644 tdevdesigner/designer/menubareditor.cpp delete mode 100644 tdevdesigner/designer/menubareditor.h delete mode 100644 tdevdesigner/designer/metadatabase.cpp delete mode 100644 tdevdesigner/designer/metadatabase.h delete mode 100644 tdevdesigner/designer/multilineeditor.ui delete mode 100644 tdevdesigner/designer/multilineeditorimpl.cpp delete mode 100644 tdevdesigner/designer/multilineeditorimpl.h delete mode 100644 tdevdesigner/designer/myiconloader.cpp delete mode 100644 tdevdesigner/designer/myiconloader.h delete mode 100644 tdevdesigner/designer/newform.ui delete mode 100644 tdevdesigner/designer/newformimpl.cpp delete mode 100644 tdevdesigner/designer/newformimpl.h delete mode 100644 tdevdesigner/designer/orderindicator.cpp delete mode 100644 tdevdesigner/designer/orderindicator.h delete mode 100644 tdevdesigner/designer/outputwindow.cpp delete mode 100644 tdevdesigner/designer/outputwindow.h delete mode 100644 tdevdesigner/designer/paletteeditor.ui delete mode 100644 tdevdesigner/designer/paletteeditoradvanced.ui delete mode 100644 tdevdesigner/designer/paletteeditoradvancedimpl.cpp delete mode 100644 tdevdesigner/designer/paletteeditoradvancedimpl.h delete mode 100644 tdevdesigner/designer/paletteeditorimpl.cpp delete mode 100644 tdevdesigner/designer/paletteeditorimpl.h delete mode 100644 tdevdesigner/designer/pics/CMakeLists.txt delete mode 100644 tdevdesigner/designer/pics/Makefile.am delete mode 100644 tdevdesigner/designer/pics/designer_adjustsize.png delete mode 100644 tdevdesigner/designer/pics/designer_appicon.png delete mode 100644 tdevdesigner/designer/pics/designer_arrow.png delete mode 100644 tdevdesigner/designer/pics/designer_background.png delete mode 100644 tdevdesigner/designer/pics/designer_book.png delete mode 100644 tdevdesigner/designer/pics/designer_buttongroup.png delete mode 100644 tdevdesigner/designer/pics/designer_checkbox.png delete mode 100644 tdevdesigner/designer/pics/designer_combobox.png delete mode 100644 tdevdesigner/designer/pics/designer_connecttool.png delete mode 100644 tdevdesigner/designer/pics/designer_cross.png delete mode 100644 tdevdesigner/designer/pics/designer_customwidget.png delete mode 100644 tdevdesigner/designer/pics/designer_d_adjustsize.png delete mode 100644 tdevdesigner/designer/pics/designer_d_book.png delete mode 100644 tdevdesigner/designer/pics/designer_d_buttongroup.png delete mode 100644 tdevdesigner/designer/pics/designer_d_checkbox.png delete mode 100644 tdevdesigner/designer/pics/designer_d_combobox.png delete mode 100644 tdevdesigner/designer/pics/designer_d_connecttool.png delete mode 100644 tdevdesigner/designer/pics/designer_d_customwidget.png delete mode 100644 tdevdesigner/designer/pics/designer_d_databrowser.png delete mode 100644 tdevdesigner/designer/pics/designer_d_datatable.png delete mode 100644 tdevdesigner/designer/pics/designer_d_dataview.png delete mode 100644 tdevdesigner/designer/pics/designer_d_dateedit.png delete mode 100644 tdevdesigner/designer/pics/designer_d_datetimeedit.png delete mode 100644 tdevdesigner/designer/pics/designer_d_dial.png delete mode 100644 tdevdesigner/designer/pics/designer_d_down.png delete mode 100644 tdevdesigner/designer/pics/designer_d_editbreaklayout.png delete mode 100644 tdevdesigner/designer/pics/designer_d_editcopy.png delete mode 100644 tdevdesigner/designer/pics/designer_d_editcut.png delete mode 100644 tdevdesigner/designer/pics/designer_d_editdelete.png delete mode 100644 tdevdesigner/designer/pics/designer_d_editgrid.png delete mode 100644 tdevdesigner/designer/pics/designer_d_edithlayout.png delete mode 100644 tdevdesigner/designer/pics/designer_d_edithlayoutsplit.png delete mode 100644 tdevdesigner/designer/pics/designer_d_editlower.png delete mode 100644 tdevdesigner/designer/pics/designer_d_editpaste.png delete mode 100644 tdevdesigner/designer/pics/designer_d_editraise.png delete mode 100644 tdevdesigner/designer/pics/designer_d_editslots.png delete mode 100644 tdevdesigner/designer/pics/designer_d_editvlayout.png delete mode 100644 tdevdesigner/designer/pics/designer_d_editvlayoutsplit.png delete mode 100644 tdevdesigner/designer/pics/designer_d_filenew.png delete mode 100644 tdevdesigner/designer/pics/designer_d_fileopen.png delete mode 100644 tdevdesigner/designer/pics/designer_d_filesave.png delete mode 100644 tdevdesigner/designer/pics/designer_d_folder.png delete mode 100644 tdevdesigner/designer/pics/designer_d_form.png delete mode 100644 tdevdesigner/designer/pics/designer_d_frame.png delete mode 100644 tdevdesigner/designer/pics/designer_d_groupbox.png delete mode 100644 tdevdesigner/designer/pics/designer_d_help.png delete mode 100644 tdevdesigner/designer/pics/designer_d_home.png delete mode 100644 tdevdesigner/designer/pics/designer_d_iconview.png delete mode 100644 tdevdesigner/designer/pics/designer_d_image.png delete mode 100644 tdevdesigner/designer/pics/designer_d_label.png delete mode 100644 tdevdesigner/designer/pics/designer_d_layout.png delete mode 100644 tdevdesigner/designer/pics/designer_d_lcdnumber.png delete mode 100644 tdevdesigner/designer/pics/designer_d_left.png delete mode 100644 tdevdesigner/designer/pics/designer_d_line.png delete mode 100644 tdevdesigner/designer/pics/designer_d_lineedit.png delete mode 100644 tdevdesigner/designer/pics/designer_d_listbox.png delete mode 100644 tdevdesigner/designer/pics/designer_d_listview.png delete mode 100644 tdevdesigner/designer/pics/designer_d_multilineedit.png delete mode 100644 tdevdesigner/designer/pics/designer_d_newform.png delete mode 100644 tdevdesigner/designer/pics/designer_d_ordertool.png delete mode 100644 tdevdesigner/designer/pics/designer_d_pixlabel.png delete mode 100644 tdevdesigner/designer/pics/designer_d_pointer.png delete mode 100644 tdevdesigner/designer/pics/designer_d_print.png delete mode 100644 tdevdesigner/designer/pics/designer_d_progress.png delete mode 100644 tdevdesigner/designer/pics/designer_d_project.png delete mode 100644 tdevdesigner/designer/pics/designer_d_pushbutton.png delete mode 100644 tdevdesigner/designer/pics/designer_d_radiobutton.png delete mode 100644 tdevdesigner/designer/pics/designer_d_redo.png delete mode 100644 tdevdesigner/designer/pics/designer_d_richtextedit.png delete mode 100644 tdevdesigner/designer/pics/designer_d_right.png delete mode 100644 tdevdesigner/designer/pics/designer_d_scrollbar.png delete mode 100644 tdevdesigner/designer/pics/designer_d_searchfind.png delete mode 100644 tdevdesigner/designer/pics/designer_d_setbuddy.png delete mode 100644 tdevdesigner/designer/pics/designer_d_slider.png delete mode 100644 tdevdesigner/designer/pics/designer_d_spacer.png delete mode 100644 tdevdesigner/designer/pics/designer_d_spinbox.png delete mode 100644 tdevdesigner/designer/pics/designer_d_table.png delete mode 100644 tdevdesigner/designer/pics/designer_d_tabwidget.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textbold.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textbrowser.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textcenter.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textedit.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textfont.png delete mode 100644 tdevdesigner/designer/pics/designer_d_texth1.png delete mode 100644 tdevdesigner/designer/pics/designer_d_texth2.png delete mode 100644 tdevdesigner/designer/pics/designer_d_texth3.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textitalic.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textjustify.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textlarger.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textleft.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textlinebreak.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textparagraph.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textright.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textsmaller.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textteletext.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textunderline.png delete mode 100644 tdevdesigner/designer/pics/designer_d_textview.png delete mode 100644 tdevdesigner/designer/pics/designer_d_timeedit.png delete mode 100644 tdevdesigner/designer/pics/designer_d_toolbox.png delete mode 100644 tdevdesigner/designer/pics/designer_d_toolbutton.png delete mode 100644 tdevdesigner/designer/pics/designer_d_undo.png delete mode 100644 tdevdesigner/designer/pics/designer_d_up.png delete mode 100644 tdevdesigner/designer/pics/designer_d_widgetstack.png delete mode 100644 tdevdesigner/designer/pics/designer_d_wizarddata.png delete mode 100644 tdevdesigner/designer/pics/designer_d_wizarddialog.png delete mode 100644 tdevdesigner/designer/pics/designer_d_wordwrap.png delete mode 100644 tdevdesigner/designer/pics/designer_databrowser.png delete mode 100644 tdevdesigner/designer/pics/designer_datatable.png delete mode 100644 tdevdesigner/designer/pics/designer_dataview.png delete mode 100644 tdevdesigner/designer/pics/designer_dateedit.png delete mode 100644 tdevdesigner/designer/pics/designer_datetimeedit.png delete mode 100644 tdevdesigner/designer/pics/designer_dial.png delete mode 100644 tdevdesigner/designer/pics/designer_down.png delete mode 100644 tdevdesigner/designer/pics/designer_editbreaklayout.png delete mode 100644 tdevdesigner/designer/pics/designer_editcopy.png delete mode 100644 tdevdesigner/designer/pics/designer_editcut.png delete mode 100644 tdevdesigner/designer/pics/designer_editdelete.png delete mode 100644 tdevdesigner/designer/pics/designer_editgrid.png delete mode 100644 tdevdesigner/designer/pics/designer_edithlayout.png delete mode 100644 tdevdesigner/designer/pics/designer_edithlayoutsplit.png delete mode 100644 tdevdesigner/designer/pics/designer_editlower.png delete mode 100644 tdevdesigner/designer/pics/designer_editpaste.png delete mode 100644 tdevdesigner/designer/pics/designer_editraise.png delete mode 100644 tdevdesigner/designer/pics/designer_editslots.png delete mode 100644 tdevdesigner/designer/pics/designer_editvlayout.png delete mode 100644 tdevdesigner/designer/pics/designer_editvlayoutsplit.png delete mode 100644 tdevdesigner/designer/pics/designer_filenew.png delete mode 100644 tdevdesigner/designer/pics/designer_fileopen.png delete mode 100644 tdevdesigner/designer/pics/designer_filesave.png delete mode 100644 tdevdesigner/designer/pics/designer_folder.png delete mode 100644 tdevdesigner/designer/pics/designer_form.png delete mode 100644 tdevdesigner/designer/pics/designer_frame.png delete mode 100644 tdevdesigner/designer/pics/designer_groupbox.png delete mode 100644 tdevdesigner/designer/pics/designer_hand.png delete mode 100644 tdevdesigner/designer/pics/designer_help.png delete mode 100644 tdevdesigner/designer/pics/designer_home.png delete mode 100644 tdevdesigner/designer/pics/designer_hsplit.png delete mode 100644 tdevdesigner/designer/pics/designer_ibeam.png delete mode 100644 tdevdesigner/designer/pics/designer_iconview.png delete mode 100644 tdevdesigner/designer/pics/designer_image.png delete mode 100644 tdevdesigner/designer/pics/designer_label.png delete mode 100644 tdevdesigner/designer/pics/designer_layout.png delete mode 100644 tdevdesigner/designer/pics/designer_lcdnumber.png delete mode 100644 tdevdesigner/designer/pics/designer_left.png delete mode 100644 tdevdesigner/designer/pics/designer_line.png delete mode 100644 tdevdesigner/designer/pics/designer_lineedit.png delete mode 100644 tdevdesigner/designer/pics/designer_listbox.png delete mode 100644 tdevdesigner/designer/pics/designer_listview.png delete mode 100644 tdevdesigner/designer/pics/designer_multilineedit.png delete mode 100644 tdevdesigner/designer/pics/designer_newform.png delete mode 100644 tdevdesigner/designer/pics/designer_no.png delete mode 100644 tdevdesigner/designer/pics/designer_object.png delete mode 100644 tdevdesigner/designer/pics/designer_ordertool.png delete mode 100644 tdevdesigner/designer/pics/designer_pixlabel.png delete mode 100644 tdevdesigner/designer/pics/designer_pointer.png delete mode 100644 tdevdesigner/designer/pics/designer_print.png delete mode 100644 tdevdesigner/designer/pics/designer_progress.png delete mode 100644 tdevdesigner/designer/pics/designer_project.png delete mode 100644 tdevdesigner/designer/pics/designer_pushbutton.png delete mode 100644 tdevdesigner/designer/pics/designer_qtlogo.png delete mode 100644 tdevdesigner/designer/pics/designer_radiobutton.png delete mode 100644 tdevdesigner/designer/pics/designer_redo.png delete mode 100644 tdevdesigner/designer/pics/designer_resetproperty.png delete mode 100644 tdevdesigner/designer/pics/designer_richtextedit.png delete mode 100644 tdevdesigner/designer/pics/designer_right.png delete mode 100644 tdevdesigner/designer/pics/designer_s_down.png delete mode 100644 tdevdesigner/designer/pics/designer_s_editcut.png delete mode 100644 tdevdesigner/designer/pics/designer_s_left.png delete mode 100644 tdevdesigner/designer/pics/designer_s_right.png delete mode 100644 tdevdesigner/designer/pics/designer_s_up.png delete mode 100644 tdevdesigner/designer/pics/designer_scrollbar.png delete mode 100644 tdevdesigner/designer/pics/designer_searchfind.png delete mode 100644 tdevdesigner/designer/pics/designer_setbuddy.png delete mode 100644 tdevdesigner/designer/pics/designer_sizeall.png delete mode 100644 tdevdesigner/designer/pics/designer_sizeb.png delete mode 100644 tdevdesigner/designer/pics/designer_sizef.png delete mode 100644 tdevdesigner/designer/pics/designer_sizeh.png delete mode 100644 tdevdesigner/designer/pics/designer_sizev.png delete mode 100644 tdevdesigner/designer/pics/designer_slider.png delete mode 100644 tdevdesigner/designer/pics/designer_spacer.png delete mode 100644 tdevdesigner/designer/pics/designer_spinbox.png delete mode 100644 tdevdesigner/designer/pics/designer_splash.png delete mode 100644 tdevdesigner/designer/pics/designer_table.png delete mode 100644 tdevdesigner/designer/pics/designer_tabwidget.png delete mode 100644 tdevdesigner/designer/pics/designer_textbold.png delete mode 100644 tdevdesigner/designer/pics/designer_textbrowser.png delete mode 100644 tdevdesigner/designer/pics/designer_textcenter.png delete mode 100644 tdevdesigner/designer/pics/designer_textedit.png delete mode 100644 tdevdesigner/designer/pics/designer_textfont.png delete mode 100644 tdevdesigner/designer/pics/designer_texth1.png delete mode 100644 tdevdesigner/designer/pics/designer_texth2.png delete mode 100644 tdevdesigner/designer/pics/designer_texth3.png delete mode 100644 tdevdesigner/designer/pics/designer_textitalic.png delete mode 100644 tdevdesigner/designer/pics/designer_textjustify.png delete mode 100644 tdevdesigner/designer/pics/designer_textlarger.png delete mode 100644 tdevdesigner/designer/pics/designer_textleft.png delete mode 100644 tdevdesigner/designer/pics/designer_textlinebreak.png delete mode 100644 tdevdesigner/designer/pics/designer_textparagraph.png delete mode 100644 tdevdesigner/designer/pics/designer_textright.png delete mode 100644 tdevdesigner/designer/pics/designer_textsmaller.png delete mode 100644 tdevdesigner/designer/pics/designer_textteletext.png delete mode 100644 tdevdesigner/designer/pics/designer_textunderline.png delete mode 100644 tdevdesigner/designer/pics/designer_textview.png delete mode 100644 tdevdesigner/designer/pics/designer_timeedit.png delete mode 100644 tdevdesigner/designer/pics/designer_toolbox.png delete mode 100644 tdevdesigner/designer/pics/designer_toolbutton.png delete mode 100644 tdevdesigner/designer/pics/designer_undo.png delete mode 100644 tdevdesigner/designer/pics/designer_up.png delete mode 100644 tdevdesigner/designer/pics/designer_uparrow.png delete mode 100644 tdevdesigner/designer/pics/designer_vsplit.png delete mode 100644 tdevdesigner/designer/pics/designer_wait.png delete mode 100644 tdevdesigner/designer/pics/designer_widgetstack.png delete mode 100644 tdevdesigner/designer/pics/designer_wizarddata.png delete mode 100644 tdevdesigner/designer/pics/designer_wizarddialog.png delete mode 100644 tdevdesigner/designer/pics/designer_wordwrap.png delete mode 100644 tdevdesigner/designer/pixmapchooser.cpp delete mode 100644 tdevdesigner/designer/pixmapchooser.h delete mode 100644 tdevdesigner/designer/pixmapcollection.cpp delete mode 100644 tdevdesigner/designer/pixmapcollection.h delete mode 100644 tdevdesigner/designer/pixmapcollectioneditor.ui delete mode 100644 tdevdesigner/designer/pixmapcollectioneditor.ui.h delete mode 100644 tdevdesigner/designer/pixmapfunction.ui delete mode 100644 tdevdesigner/designer/popupmenueditor.cpp delete mode 100644 tdevdesigner/designer/popupmenueditor.h delete mode 100644 tdevdesigner/designer/preferences.ui delete mode 100644 tdevdesigner/designer/previewframe.cpp delete mode 100644 tdevdesigner/designer/previewframe.h delete mode 100644 tdevdesigner/designer/previewwidget.ui delete mode 100644 tdevdesigner/designer/previewwidgetimpl.cpp delete mode 100644 tdevdesigner/designer/previewwidgetimpl.h delete mode 100644 tdevdesigner/designer/project.cpp delete mode 100644 tdevdesigner/designer/project.h delete mode 100644 tdevdesigner/designer/projectsettings.ui delete mode 100644 tdevdesigner/designer/projectsettingsimpl.cpp delete mode 100644 tdevdesigner/designer/projectsettingsimpl.h delete mode 100644 tdevdesigner/designer/propertyeditor.cpp delete mode 100644 tdevdesigner/designer/propertyeditor.h delete mode 100644 tdevdesigner/designer/propertyobject.cpp delete mode 100644 tdevdesigner/designer/propertyobject.h delete mode 100644 tdevdesigner/designer/qcompletionedit.cpp delete mode 100644 tdevdesigner/designer/qcompletionedit.h delete mode 100644 tdevdesigner/designer/replacedialog.ui delete mode 100644 tdevdesigner/designer/replacedialog.ui.h delete mode 100644 tdevdesigner/designer/resource.cpp delete mode 100644 tdevdesigner/designer/resource.h delete mode 100644 tdevdesigner/designer/richtextfontdialog.ui delete mode 100644 tdevdesigner/designer/richtextfontdialog.ui.h delete mode 100644 tdevdesigner/designer/sizehandle.cpp delete mode 100644 tdevdesigner/designer/sizehandle.h delete mode 100644 tdevdesigner/designer/sourceeditor.cpp delete mode 100644 tdevdesigner/designer/sourceeditor.h delete mode 100644 tdevdesigner/designer/sourcefile.cpp delete mode 100644 tdevdesigner/designer/sourcefile.h delete mode 100644 tdevdesigner/designer/startdialog.ui delete mode 100644 tdevdesigner/designer/startdialogimpl.cpp delete mode 100644 tdevdesigner/designer/startdialogimpl.h delete mode 100644 tdevdesigner/designer/styledbutton.cpp delete mode 100644 tdevdesigner/designer/styledbutton.h delete mode 100644 tdevdesigner/designer/syntaxhighlighter_html.cpp delete mode 100644 tdevdesigner/designer/syntaxhighlighter_html.h delete mode 100644 tdevdesigner/designer/tableeditor.ui delete mode 100644 tdevdesigner/designer/tableeditorimpl.cpp delete mode 100644 tdevdesigner/designer/tableeditorimpl.h delete mode 100644 tdevdesigner/designer/tdevdesigner_part.cpp delete mode 100644 tdevdesigner/designer/tdevdesigner_part.desktop delete mode 100644 tdevdesigner/designer/tdevdesigner_part.h delete mode 100644 tdevdesigner/designer/tdevdesigner_part.rc delete mode 100644 tdevdesigner/designer/tdevdesigner_part_sh.rc delete mode 100644 tdevdesigner/designer/timestamp.cpp delete mode 100644 tdevdesigner/designer/timestamp.h delete mode 100644 tdevdesigner/designer/variabledialog.ui delete mode 100644 tdevdesigner/designer/variabledialogimpl.cpp delete mode 100644 tdevdesigner/designer/variabledialogimpl.h delete mode 100644 tdevdesigner/designer/widgetaction.cpp delete mode 100644 tdevdesigner/designer/widgetaction.h delete mode 100644 tdevdesigner/designer/widgetfactory.cpp delete mode 100644 tdevdesigner/designer/widgetfactory.h delete mode 100644 tdevdesigner/designer/wizardeditor.ui delete mode 100644 tdevdesigner/designer/wizardeditorimpl.cpp delete mode 100644 tdevdesigner/designer/wizardeditorimpl.h delete mode 100644 tdevdesigner/designer/workspace.cpp delete mode 100644 tdevdesigner/designer/workspace.h delete mode 100644 tdevdesigner/interfaces/actioninterface.h delete mode 100644 tdevdesigner/interfaces/classbrowserinterface.h delete mode 100644 tdevdesigner/interfaces/designerinterface.h delete mode 100644 tdevdesigner/interfaces/editorinterface.h delete mode 100644 tdevdesigner/interfaces/filterinterface.h delete mode 100644 tdevdesigner/interfaces/interpreterinterface.h delete mode 100644 tdevdesigner/interfaces/languageinterface.h delete mode 100644 tdevdesigner/interfaces/preferenceinterface.h delete mode 100644 tdevdesigner/interfaces/projectsettingsiface.h delete mode 100644 tdevdesigner/interfaces/sourcetemplateiface.h delete mode 100644 tdevdesigner/interfaces/templatewizardiface.h delete mode 100644 tdevdesigner/interfaces/widgetinterface.h delete mode 100644 tdevdesigner/plugins/Makefile.am delete mode 100644 tdevdesigner/plugins/languageinterfaceimpl.cpp delete mode 100644 tdevdesigner/plugins/languageinterfaceimpl.h delete mode 100644 tdevdesigner/shared/CMakeLists.txt delete mode 100644 tdevdesigner/shared/Makefile.am delete mode 100644 tdevdesigner/shared/domtool.cpp delete mode 100644 tdevdesigner/shared/domtool.h delete mode 100644 tdevdesigner/shared/globaldefs.h delete mode 100644 tdevdesigner/shared/parser.cpp delete mode 100644 tdevdesigner/shared/parser.h delete mode 100644 tdevdesigner/shared/ui2uib.cpp delete mode 100644 tdevdesigner/shared/ui2uib.h delete mode 100644 tdevdesigner/shared/uib.cpp delete mode 100644 tdevdesigner/shared/uib.h delete mode 100644 tdevdesigner/shared/widgetdatabase.cpp delete mode 100644 tdevdesigner/shared/widgetdatabase.h delete mode 100644 tdevdesigner/src/CMakeLists.txt delete mode 100644 tdevdesigner/src/Makefile.am delete mode 100644 tdevdesigner/src/main.cpp delete mode 100644 tdevdesigner/src/tdevdesigner.cpp delete mode 100644 tdevdesigner/src/tdevdesigner.desktop delete mode 100644 tdevdesigner/src/tdevdesigner.h delete mode 100644 tdevdesigner/src/tdevdesigner_shell.rc delete mode 100644 tdevdesigner/uilib/CMakeLists.txt delete mode 100644 tdevdesigner/uilib/Makefile.am delete mode 100644 tdevdesigner/uilib/database.cpp delete mode 100644 tdevdesigner/uilib/database2.h delete mode 100644 tdevdesigner/uilib/qwidgetfactory.cpp delete mode 100644 tdevdesigner/uilib/qwidgetfactory.h create mode 100644 tdevelop_kde_cpp.desktop delete mode 100644 tdevelop_tde_cpp.desktop delete mode 100644 tdevprj2tdevelop create mode 100644 vcs/clearcase/integrator/kdevclearcaseintegrator.desktop delete mode 100644 vcs/clearcase/integrator/tdevclearcaseintegrator.desktop create mode 100644 vcs/clearcase/kdevclearcase.desktop delete mode 100644 vcs/clearcase/tdevclearcase.desktop create mode 100644 vcs/cvsservice/integrator/kdevcvsserviceintegrator.desktop delete mode 100644 vcs/cvsservice/integrator/tdevcvsserviceintegrator.desktop create mode 100644 vcs/cvsservice/kdev_cvs.png create mode 100644 vcs/cvsservice/kdev_cvs.xcf create mode 100644 vcs/cvsservice/kdevcvsservice.desktop create mode 100644 vcs/cvsservice/kdevcvsservicepart.rc delete mode 100644 vcs/cvsservice/tdev_cvs.png delete mode 100644 vcs/cvsservice/tdev_cvs.xcf delete mode 100644 vcs/cvsservice/tdevcvsservice.desktop delete mode 100644 vcs/cvsservice/tdevcvsservicepart.rc create mode 100644 vcs/perforce/integrator/kdevperforceintegrator.desktop delete mode 100644 vcs/perforce/integrator/tdevperforceintegrator.desktop create mode 100644 vcs/perforce/kdevperforce.desktop create mode 100644 vcs/perforce/kdevperforcepart.rc delete mode 100644 vcs/perforce/tdevperforce.desktop delete mode 100644 vcs/perforce/tdevperforcepart.rc create mode 100644 vcs/subversion/integrator/kdevsubversionintegrator.desktop delete mode 100644 vcs/subversion/integrator/tdevsubversionintegrator.desktop create mode 100644 vcs/subversion/kdevpart_subversion.rc create mode 100644 vcs/subversion/kdevsubversion.desktop create mode 100644 vcs/subversion/kdevsvn+file.protocol create mode 100644 vcs/subversion/kdevsvn+http.protocol create mode 100644 vcs/subversion/kdevsvn+https.protocol create mode 100644 vcs/subversion/kdevsvn+ssh.protocol create mode 100644 vcs/subversion/kdevsvn+svn.protocol create mode 100644 vcs/subversion/kdevsvnd.cpp create mode 100644 vcs/subversion/kdevsvnd.desktop create mode 100644 vcs/subversion/kdevsvnd.h create mode 100644 vcs/subversion/kdevsvnd_widgets.cpp create mode 100644 vcs/subversion/kdevsvnd_widgets.h delete mode 100644 vcs/subversion/tdevpart_subversion.rc delete mode 100644 vcs/subversion/tdevsubversion.desktop delete mode 100644 vcs/subversion/tdevsvn+file.protocol delete mode 100644 vcs/subversion/tdevsvn+http.protocol delete mode 100644 vcs/subversion/tdevsvn+https.protocol delete mode 100644 vcs/subversion/tdevsvn+ssh.protocol delete mode 100644 vcs/subversion/tdevsvn+svn.protocol delete mode 100644 vcs/subversion/tdevsvnd.cpp delete mode 100644 vcs/subversion/tdevsvnd.desktop delete mode 100644 vcs/subversion/tdevsvnd.h delete mode 100644 vcs/subversion/tdevsvnd_widgets.cpp delete mode 100644 vcs/subversion/tdevsvnd_widgets.h diff --git a/AUTHORS b/AUTHORS index 7706729d..b2a4a628 100644 --- a/AUTHORS +++ b/AUTHORS @@ -45,7 +45,7 @@ SplashScreens: Marion Klein Ram� Lamana Villar -TDevTabBar, bug fixes, Gideon Release: +KDevTabBar, bug fixes, Gideon Release: Caleb Tennis PartExplorer, (bugs for) CvsPart: diff --git a/CMakeLists.txt b/CMakeLists.txt index 442ab2ab..254c6ba4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,7 +82,7 @@ option( WITH_VCS_SUBVERSION "Enable subversion support" ${WITH_VCS_ALL} ) ##### components ################################ option( BUILD_ALL "Build all components" OFF ) -option( BUILD_TDEVDESIGNER "Build tdevdesigner" ${BUILD_ALL} ) +option( BUILD_KDEVDESIGNER "Build kdevdesigner" ${BUILD_ALL} ) option( BUILD_VISUALBOYADVANCE "Build embedded/visualboyadvance" ${BUILD_ALL} ) option( BUILD_DOC "Build doc" ${BUILD_ALL} ) @@ -150,13 +150,11 @@ set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) ##### install data ############################## install( FILES - tdevelop.desktop tdevassistant.desktop tdevelop_ruby.desktop - tdevelop_c_cpp.desktop tdevelop_tde_cpp.desktop + tdevelop.desktop kdevassistant.desktop tdevelop_ruby.desktop + tdevelop_c_cpp.desktop tdevelop_kde_cpp.desktop tdevelop_scripting.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( FILES tde_app_devel.desktop DESTINATION ${APPS_INSTALL_DIR}/.hidden ) - install( FILES tde-development-tdevelop.directory DESTINATION ${XDG_DIRECTORY_INSTALL_DIR} ) @@ -166,7 +164,7 @@ install( FILES DESTINATION ${MIME_INSTALL_DIR}/application ) install( PROGRAMS - tdevprj2tdevelop + kdevprj2tdevelop DESTINATION ${BIN_INSTALL_DIR} ) @@ -182,7 +180,7 @@ add_subdirectory( mimetypes ) add_subdirectory( pics ) add_subdirectory( vcs ) add_subdirectory( embedded ) -tde_conditional_add_subdirectory( BUILD_TDEVDESIGNER tdevdesigner ) +tde_conditional_add_subdirectory( BUILD_KDEVDESIGNER kdevdesigner ) tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/Doxyfile b/Doxyfile index 5abfb6b9..8e293249 100644 --- a/Doxyfile +++ b/Doxyfile @@ -124,7 +124,7 @@ EXCLUDE_PATTERNS = *.moc.* \ *face_skel.cpp \ *.ui.h EXAMPLE_PATH = languages/cpp/app_templates/khello \ - languages/cpp/app_templates/tdevpart + languages/cpp/app_templates/kdevpart EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO IMAGE_PATH = ./doc/api diff --git a/Makefile.am b/Makefile.am index b3bf5d78..25b1050d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,19 +2,16 @@ COMPILE_FIRST = lib src parts EXTRA_DIST = AUTHORS COPYING COPYING.LIB NEWS ChangeLog INSTALL README TODO HACKING HACKING.language admin configure.in.bot -xdg_apps_DATA = tdevelop.desktop tdevassistant.desktop tdevelop_ruby.desktop \ - tdevelop_c_cpp.desktop tdevelop_tde_cpp.desktop tdevelop_scripting.desktop +xdg_apps_DATA = tdevelop.desktop kdevassistant.desktop tdevelop_ruby.desktop \ + tdevelop_c_cpp.desktop tdevelop_kde_cpp.desktop tdevelop_scripting.desktop #appsdir = $(kde_appsdir)/Development -app_DATA = tde_app_devel.desktop -appdir = $(kde_appsdir)/.hidden - xdg_directory_DATA = tde-development-tdevelop.directory mime_DATA = x-tdevelop.desktop mimedir = $(kde_mimedir)/application -kde_bin_SCRIPTS = tdevprj2tdevelop +kde_bin_SCRIPTS = kdevprj2tdevelop $(top_srcdir)/acinclude.m4: $(top_srcdir)/tdevelop.m4.in @@ -51,7 +48,7 @@ include admin/deps.am DOXYGEN_SEARCHENGINE = YES DOXYGEN_EMPTY = YES -DOXYGEN_PROJECTNAME = TDevelop Platform API +DOXYGEN_PROJECTNAME = KDevelop Platform API include Doxyfile.am SUBDIRS=$(TOPSUBDIRS) -#tdevelop: lib src parts buildtools doc editors embedded tdevdesigner languages mimetypes pics vcs +#tdevelop: lib src parts buildtools doc editors embedded kdevdesigner languages mimetypes pics vcs diff --git a/buildtools/ada/CMakeLists.txt b/buildtools/ada/CMakeLists.txt index 0cf08117..8d0fd4ae 100644 --- a/buildtools/ada/CMakeLists.txt +++ b/buildtools/ada/CMakeLists.txt @@ -28,17 +28,17 @@ link_directories( ##### other data ################################ -install( FILES tdevadaproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevadaproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevadaproject ) +install( FILES kdevadaproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevadaproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevadaproject ) -##### libtdevadaproject (module) ################ +##### libkdevadaproject (module) ################ -tde_add_kpart( libtdevadaproject AUTOMOC +tde_add_kpart( libkdevadaproject AUTOMOC SOURCES adaproject_part.cpp adaproject_widget.cpp adaproject_optionsdlgbase.ui adaprojectoptionsdlg.cpp adaglobaloptionsdlg.cpp service.cpp - LINK tdevbuildbase-shared + LINK kdevbuildbase-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/ada/Makefile.am b/buildtools/ada/Makefile.am index 7997b18c..2b2614ec 100644 --- a/buildtools/ada/Makefile.am +++ b/buildtools/ada/Makefile.am @@ -2,17 +2,17 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/external \ -I$(top_srcdir)/lib/interfaces/extras -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevadaproject.la -libtdevadaproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevadaproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la $(top_builddir)/lib/interfaces/extras/libtdevextras.la +kde_module_LTLIBRARIES = libkdevadaproject.la +libkdevadaproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevadaproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la $(top_builddir)/lib/interfaces/extras/libkdevextras.la -libtdevadaproject_la_SOURCES = adaproject_part.cpp adaproject_widget.cpp adaproject_optionsdlgbase.ui adaprojectoptionsdlg.cpp adaglobaloptionsdlg.cpp service.cpp +libkdevadaproject_la_SOURCES = adaproject_part.cpp adaproject_widget.cpp adaproject_optionsdlgbase.ui adaprojectoptionsdlg.cpp adaglobaloptionsdlg.cpp service.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevadaproject.desktop +service_DATA = kdevadaproject.desktop -rcdir = $(kde_datadir)/tdevadaproject -rc_DATA = tdevadaproject.rc +rcdir = $(kde_datadir)/kdevadaproject +rc_DATA = kdevadaproject.rc diff --git a/buildtools/ada/adaglobaloptionsdlg.cpp b/buildtools/ada/adaglobaloptionsdlg.cpp index 791c23ae..cea68bdc 100644 --- a/buildtools/ada/adaglobaloptionsdlg.cpp +++ b/buildtools/ada/adaglobaloptionsdlg.cpp @@ -15,7 +15,7 @@ #include #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" #include "service.h" #include "adaproject_part.h" @@ -61,7 +61,7 @@ AdaGlobalOptionsDlg::~AdaGlobalOptionsDlg() void AdaGlobalOptionsDlg::optionsButtonClicked() { TQString name = ServiceComboBox::currentText(compiler_box, service_names); - TDevCompilerOptions *plugin = m_part->createCompilerOptions(name); + KDevCompilerOptions *plugin = m_part->createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, options_edit->text()); diff --git a/buildtools/ada/adaproject_part.cpp b/buildtools/ada/adaproject_part.cpp index 195e2889..32833dfd 100644 --- a/buildtools/ada/adaproject_part.cpp +++ b/buildtools/ada/adaproject_part.cpp @@ -28,29 +28,29 @@ #include #include "domutil.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevmakefrontend.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" -#include "tdevlanguagesupport.h" -#include "tdevcompileroptions.h" -#include "tdevgenericfactory.h" -#include +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevmakefrontend.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" +#include "kdevlanguagesupport.h" +#include "kdevcompileroptions.h" +#include "kdevgenericfactory.h" +#include #include "adaproject_widget.h" #include "adaprojectoptionsdlg.h" #include "adaglobaloptionsdlg.h" -typedef TDevGenericFactory AdaProjectFactory; -static const TDevPluginInfo data("tdevadaproject"); -K_EXPORT_COMPONENT_FACTORY( libtdevadaproject, AdaProjectFactory( data ) ) +typedef KDevGenericFactory AdaProjectFactory; +static const KDevPluginInfo data("kdevadaproject"); +K_EXPORT_COMPONENT_FACTORY( libkdevadaproject, AdaProjectFactory( data ) ) AdaProjectPart::AdaProjectPart(TQObject *parent, const char *name, const TQStringList& ) - :TDevBuildTool(&data, parent, name ? name : "AdaProjectPart" ) + :KDevBuildTool(&data, parent, name ? name : "AdaProjectPart" ) { setInstance(AdaProjectFactory::instance()); - setXMLFile("tdevadaproject.rc"); + setXMLFile("kdevadaproject.rc"); TDEAction *action; action = new TDEAction( i18n("&Build Project"), "make_tdevelop", Key_F8, @@ -70,7 +70,7 @@ AdaProjectPart::AdaProjectPart(TQObject *parent, const char *name, const TQStrin // TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); - // now you decide what should happen to the widget. Take a look at tdevcore.h + // now you decide what should happen to the widget. Take a look at kdevcore.h // or at other plugins how to embed it. // if you want to embed your widget as an outputview, simply uncomment @@ -109,8 +109,8 @@ void AdaProjectPart::openProject(const TQString &dirName, const TQString &projec TQDomDocument &dom = *projectDom(); // Set the default directory radio to "executable" - if (DomUtil::readEntry(dom, "/tdevadaproject/run/directoryradio") == "" ) { - DomUtil::writeEntry(dom, "/tdevadaproject/run/directoryradio", "executable"); + if (DomUtil::readEntry(dom, "/kdevadaproject/run/directoryradio") == "" ) { + DomUtil::writeEntry(dom, "/kdevadaproject/run/directoryradio", "executable"); } loadProjectConfig(); @@ -165,7 +165,7 @@ void AdaProjectPart::openProject(const TQString &dirName, const TQString &projec } } while (!s.isEmpty()); - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } void AdaProjectPart::closeProject() @@ -175,7 +175,7 @@ void AdaProjectPart::closeProject() /** Retuns a PairList with the run environment variables */ DomUtil::PairList AdaProjectPart::runEnvironmentVars() const { - return DomUtil::readPairListEntry(*projectDom(), "/tdevadaproject/run/envvars", "envvar", "name", "value"); + return DomUtil::readPairListEntry(*projectDom(), "/kdevadaproject/run/envvars", "envvar", "name", "value"); } @@ -190,7 +190,7 @@ DomUtil::PairList AdaProjectPart::runEnvironmentVars() const */ TQString AdaProjectPart::runDirectory() const { - TQString cwd = defaultRunDirectory("tdevadaproject"); + TQString cwd = defaultRunDirectory("kdevadaproject"); if (cwd.isEmpty()) cwd = buildDirectory(); return cwd; @@ -212,7 +212,7 @@ TQString AdaProjectPart::mainProgram() const if ( !dom ) return TQString(); - TQString DomMainProgram = DomUtil::readEntry( *dom, "/tdevadaproject/run/mainprogram"); + TQString DomMainProgram = DomUtil::readEntry( *dom, "/kdevadaproject/run/mainprogram"); if ( DomMainProgram.isEmpty() ) return TQString(); @@ -231,14 +231,14 @@ TQString AdaProjectPart::mainProgram() const /** Retuns a TQString with the run command line arguments */ TQString AdaProjectPart::debugArguments() const { - return DomUtil::readEntry(*projectDom(), "/tdevadaproject/run/globaldebugarguments"); + return DomUtil::readEntry(*projectDom(), "/kdevadaproject/run/globaldebugarguments"); } /** Retuns a TQString with the run command line arguments */ TQString AdaProjectPart::runArguments() const { - return DomUtil::readEntry(*projectDom(), "/tdevadaproject/run/programargs"); + return DomUtil::readEntry(*projectDom(), "/kdevadaproject/run/programargs"); } TQString AdaProjectPart::mainSource() const @@ -361,12 +361,12 @@ void AdaProjectPart::slotExecute() void AdaProjectPart::changedFiles( const TQStringList & fileList ) { - TDevProject::changedFiles(fileList); + KDevProject::changedFiles(fileList); } void AdaProjectPart::changedFile( const TQString & fileName ) { - TDevProject::changedFile(fileName); + KDevProject::changedFile(fileName); } void AdaProjectPart::projectConfigWidget( KDialogBase * dlg ) @@ -382,10 +382,10 @@ void AdaProjectPart::loadProjectConfig( ) { TQDomDocument &dom = *(projectDom()); - TQString config = DomUtil::readEntry(dom, "/tdevadaproject/general/useconfiguration", "default"); - m_mainSource = DomUtil::readEntry(dom, TQString("/tdevadaproject/configurations/") + config + TQString("/mainsource") ); - m_compilerOpts = DomUtil::readEntry(dom, TQString("/tdevadaproject/configurations/") + config + TQString("/compileroptions")); - m_compilerExec = DomUtil::readEntry(dom, TQString("/tdevadaproject/configurations/") + config + TQString("/compilerexec")); + TQString config = DomUtil::readEntry(dom, "/kdevadaproject/general/useconfiguration", "default"); + m_mainSource = DomUtil::readEntry(dom, TQString("/kdevadaproject/configurations/") + config + TQString("/mainsource") ); + m_compilerOpts = DomUtil::readEntry(dom, TQString("/kdevadaproject/configurations/") + config + TQString("/compileroptions")); + m_compilerExec = DomUtil::readEntry(dom, TQString("/kdevadaproject/configurations/") + config + TQString("/compilerexec")); if (m_compilerExec.isEmpty()) { @@ -408,7 +408,7 @@ void AdaProjectPart::configWidget( KDialogBase * dlg ) connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) ); } -TDevCompilerOptions *AdaProjectPart::createCompilerOptions(const TQString &name) +KDevCompilerOptions *AdaProjectPart::createCompilerOptions(const TQString &name) { KService::Ptr service = KService::serviceByDesktopName(name); if (!service) { @@ -430,13 +430,13 @@ TDevCompilerOptions *AdaProjectPart::createCompilerOptions(const TQString &name) args = TQStringList::split(" ", prop.toString()); TQObject *obj = factory->create(this, service->name().latin1(), - "TDevCompilerOptions", args); + "KDevCompilerOptions", args); - if (!obj->inherits("TDevCompilerOptions")) { - kdDebug() << "AdaProjectPart::createCompilerOptions: component does not inherit TDevCompilerOptions" << endl; + if (!obj->inherits("KDevCompilerOptions")) { + kdDebug() << "AdaProjectPart::createCompilerOptions: component does not inherit KDevCompilerOptions" << endl; return 0; } - TDevCompilerOptions *dlg = (TDevCompilerOptions*) obj; + KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj; return dlg; } diff --git a/buildtools/ada/adaproject_part.h b/buildtools/ada/adaproject_part.h index 46b328c4..5511da78 100644 --- a/buildtools/ada/adaproject_part.h +++ b/buildtools/ada/adaproject_part.h @@ -6,18 +6,18 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ -#ifndef __TDEVPART_ADAPROJECT_H__ -#define __TDEVPART_ADAPROJECT_H__ +#ifndef __KDEVPART_ADAPROJECT_H__ +#define __KDEVPART_ADAPROJECT_H__ #include -#include "tdevbuildtool.h" +#include "kdevbuildtool.h" class AdaProjectWidget; class KDialogBase; -class TDevCompilerOptions; +class KDevCompilerOptions; -class AdaProjectPart : public TDevBuildTool +class AdaProjectPart : public KDevBuildTool { Q_OBJECT @@ -59,7 +59,7 @@ public: virtual void changedFiles( const TQStringList & fileList ); virtual void changedFile( const TQString & fileName ); - TDevCompilerOptions *createCompilerOptions(const TQString &name); + KDevCompilerOptions *createCompilerOptions(const TQString &name); virtual TQString defaultOptions(const TQString compiler); TQStringList distFiles() const; diff --git a/buildtools/ada/adaproject_widget.cpp b/buildtools/ada/adaproject_widget.cpp index 3eaba244..f5016e8c 100644 --- a/buildtools/ada/adaproject_widget.cpp +++ b/buildtools/ada/adaproject_widget.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include "adaproject_part.h" #include "adaproject_widget.h" diff --git a/buildtools/ada/adaproject_widget.h b/buildtools/ada/adaproject_widget.h index c89fc511..6bbab369 100644 --- a/buildtools/ada/adaproject_widget.h +++ b/buildtools/ada/adaproject_widget.h @@ -4,7 +4,7 @@ #include #include -class TDevProject; +class KDevProject; class AdaProjectPart; class AdaProjectWidget : public TQWidget diff --git a/buildtools/ada/adaprojectoptionsdlg.cpp b/buildtools/ada/adaprojectoptionsdlg.cpp index 6cced020..28549efc 100644 --- a/buildtools/ada/adaprojectoptionsdlg.cpp +++ b/buildtools/ada/adaprojectoptionsdlg.cpp @@ -18,7 +18,7 @@ #include #include "domutil.h" -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" #include "service.h" #include "adaproject_part.h" @@ -43,7 +43,7 @@ AdaProjectOptionsDlg::AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* paren TQDomDocument &dom = *(m_part->projectDom()); currentConfig = TQString(); - configChanged(DomUtil::readEntry(dom, "/tdevadaproject/general/useconfiguration", "default")); + configChanged(DomUtil::readEntry(dom, "/kdevadaproject/general/useconfiguration", "default")); } AdaProjectOptionsDlg::~AdaProjectOptionsDlg() @@ -57,7 +57,7 @@ TQStringList AdaProjectOptionsDlg::allBuildConfigs() TQStringList allConfigs; allConfigs.append("default"); - TQDomNode node = dom.documentElement().namedItem("tdevadaproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevadaproject").namedItem("configurations"); TQDomElement childEl = node.firstChild().toElement(); while (!childEl.isNull()) { TQString config = childEl.tagName(); @@ -72,7 +72,7 @@ TQStringList AdaProjectOptionsDlg::allBuildConfigs() void AdaProjectOptionsDlg::accept() { - DomUtil::writeEntry(*m_part->projectDom(), "/tdevadaproject/general/useconfiguration", currentConfig); + DomUtil::writeEntry(*m_part->projectDom(), "/kdevadaproject/general/useconfiguration", currentConfig); if (dirty) { saveConfig(currentConfig); @@ -88,7 +88,7 @@ void AdaProjectOptionsDlg::compiler_box_activated( const TQString& /*s*/ ) void AdaProjectOptionsDlg::saveConfig( TQString config ) { TQDomDocument dom = *m_part->projectDom(); - TQString prefix = "/tdevadaproject/configurations/" + config + "/"; + TQString prefix = "/kdevadaproject/configurations/" + config + "/"; DomUtil::writeEntry(dom, prefix + "compiler", ServiceComboBox::currentText(compiler_box, service_names)); @@ -100,7 +100,7 @@ void AdaProjectOptionsDlg::saveConfig( TQString config ) void AdaProjectOptionsDlg::readConfig( TQString config ) { TQDomDocument dom = *m_part->projectDom(); - TQString prefix = "/tdevadaproject/configurations/" + config + "/"; + TQString prefix = "/kdevadaproject/configurations/" + config + "/"; TQString compiler = DomUtil::readEntry(dom, prefix + "compiler", ""); @@ -171,7 +171,7 @@ void AdaProjectOptionsDlg::configRemoved() TQString config = config_combo->currentText(); TQDomDocument dom = *m_part->projectDom(); - TQDomNode node = dom.documentElement().namedItem("tdevadaproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevadaproject").namedItem("configurations"); node.removeChild(node.namedItem(config)); allConfigs.remove(config); @@ -185,7 +185,7 @@ void AdaProjectOptionsDlg::configRemoved() void AdaProjectOptionsDlg::optionsButtonClicked( ) { TQString name = ServiceComboBox::currentText(compiler_box, service_names); - TDevCompilerOptions *plugin = m_part->createCompilerOptions(name); + KDevCompilerOptions *plugin = m_part->createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, options_edit->text()); diff --git a/buildtools/ada/adaprojectoptionsdlg.h b/buildtools/ada/adaprojectoptionsdlg.h index 0f6c0262..569f06c9 100644 --- a/buildtools/ada/adaprojectoptionsdlg.h +++ b/buildtools/ada/adaprojectoptionsdlg.h @@ -14,7 +14,7 @@ #include "adaproject_optionsdlgbase.h" class AdaProjectPart; -class TDevCompilerOptions; +class KDevCompilerOptions; class AdaProjectOptionsDlg : public AdaProjectOptionsDlgBase { diff --git a/buildtools/ada/kdevadaproject.desktop b/buildtools/ada/kdevadaproject.desktop new file mode 100644 index 00000000..882b0f64 --- /dev/null +++ b/buildtools/ada/kdevadaproject.desktop @@ -0,0 +1,100 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Ada Project +Comment[br]=Raktres Ada +Comment[ca]=Projecte Ada +Comment[cs]=Ada projekt +Comment[da]=Ada-projekt +Comment[de]=Ada-Projekt für TDevelop +Comment[el]=Έργο Ada +Comment[es]=Proyecto Ada +Comment[et]=Ada projekt +Comment[eu]=Ada proiektua +Comment[fa]=پروژۀ آدا +Comment[fr]=Projet en Ada +Comment[ga]=Tionscadal Ada +Comment[gl]=Proxecto Ada +Comment[hi]=एडीए परियोजना +Comment[hu]=Ada-projekt +Comment[is]=Ada verkefni +Comment[it]=Progetto Ada +Comment[ja]=Ada プロジェクト +Comment[ms]=Projek Ada +Comment[nds]=Ada-Projekt +Comment[ne]=एडा परियोजना +Comment[nl]=Ada-project +Comment[pa]=Ada ਪ੍ਰੋਜੈਕਟ +Comment[pl]=Projekt: Ada +Comment[pt]=Projecto Ada +Comment[pt_BR]=Projeto Ada +Comment[ro]=Proiect Ada +Comment[ru]=Проект Ada +Comment[sk]=Ada projekt +Comment[sl]=Projekt Ada +Comment[sr]=Ada пројекат +Comment[sr@Latn]=Ada projekat +Comment[sv]=Ada-projekt +Comment[ta]=அடா பிராஜக்ட் +Comment[tg]=Лоиҳаи Ada +Comment[tr]=Ada Projesi +Comment[uz]=Ada loyihasi +Comment[uz@cyrillic]=Ada лойиҳаси +Comment[zh_CN]=Ada 工程 +Comment[zh_TW]=Ada 專案 +Name=KDevAdaProject +Name[da]=TDevelop Ada-projekt +Name[de]=Ada-Projekt (TDevelop) +Name[fr]=Projet Ada pour TDevelop +Name[hi]=के-डेव-एडीए-परियोजना +Name[nds]=Ada-Projekt (TDevelop) +Name[ne]=केडीई विकास एडा परियोजना +Name[pl]=KDevProjektAda +Name[sk]=KDevAdaProjekt +Name[sv]=TDevelop Ada-projekt +Name[ta]=கெடெவ் அடா பிராஜக்ட் +Name[tg]=Лоиҳаи KDevAda +Name[zh_TW]=TDevelop Ada 專案 +GenericName=Ada Project +GenericName[br]=Raktres Ada +GenericName[ca]=Projecte Ada +GenericName[da]=Ada-projekt +GenericName[de]=Ada-Projekt +GenericName[el]=Έργο Ada +GenericName[es]=Proyecto Ada +GenericName[et]=Ada projekt +GenericName[eu]=Ada proiektua +GenericName[fa]=پروژۀ آدا +GenericName[fr]=Projet en Ada +GenericName[ga]=Tionscadal Ada +GenericName[gl]=Proxecto Ada +GenericName[hi]=एडीए परियोजना +GenericName[hu]=Ada-projekt +GenericName[is]=Ada verkefni +GenericName[it]=Project con Ada +GenericName[ja]=Ada プロジェクト +GenericName[ms]=Projek Ada +GenericName[nds]=Ada-Projekt +GenericName[ne]=एडा परियोजना +GenericName[nl]=Ada-project +GenericName[pa]=Ada ਪ੍ਰੋਜੈਕਟ +GenericName[pl]=Projekt: Ada +GenericName[pt]=Projecto Ada +GenericName[pt_BR]=Projeto Ada +GenericName[ru]=Проект Ada +GenericName[sk]=Ada projekt +GenericName[sl]=Projekt Ada +GenericName[sr]=Ada пројекат +GenericName[sr@Latn]=Ada projekat +GenericName[sv]=Ada-projekt +GenericName[ta]=அடா பிராஜக்ட் +GenericName[tg]=Лоиҳаи Ada +GenericName[tr]=Ada Projesi +GenericName[uz]=Ada loyihasi +GenericName[uz@cyrillic]=Ada лойиҳаси +GenericName[zh_CN]=Ada 工程 +GenericName[zh_TW]=Ada 專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevadaproject +X-TDevelop-Version=5 +X-TDevelop-Language=Ada diff --git a/buildtools/ada/kdevadaproject.rc b/buildtools/ada/kdevadaproject.rc new file mode 100644 index 00000000..d7f260e1 --- /dev/null +++ b/buildtools/ada/kdevadaproject.rc @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/buildtools/ada/tdevadaproject.desktop b/buildtools/ada/tdevadaproject.desktop deleted file mode 100644 index 91206fd4..00000000 --- a/buildtools/ada/tdevadaproject.desktop +++ /dev/null @@ -1,100 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Ada Project -Comment[br]=Raktres Ada -Comment[ca]=Projecte Ada -Comment[cs]=Ada projekt -Comment[da]=Ada-projekt -Comment[de]=Ada-Projekt für TDevelop -Comment[el]=Έργο Ada -Comment[es]=Proyecto Ada -Comment[et]=Ada projekt -Comment[eu]=Ada proiektua -Comment[fa]=پروژۀ آدا -Comment[fr]=Projet en Ada -Comment[ga]=Tionscadal Ada -Comment[gl]=Proxecto Ada -Comment[hi]=एडीए परियोजना -Comment[hu]=Ada-projekt -Comment[is]=Ada verkefni -Comment[it]=Progetto Ada -Comment[ja]=Ada プロジェクト -Comment[ms]=Projek Ada -Comment[nds]=Ada-Projekt -Comment[ne]=एडा परियोजना -Comment[nl]=Ada-project -Comment[pa]=Ada ਪ੍ਰੋਜੈਕਟ -Comment[pl]=Projekt: Ada -Comment[pt]=Projecto Ada -Comment[pt_BR]=Projeto Ada -Comment[ro]=Proiect Ada -Comment[ru]=Проект Ada -Comment[sk]=Ada projekt -Comment[sl]=Projekt Ada -Comment[sr]=Ada пројекат -Comment[sr@Latn]=Ada projekat -Comment[sv]=Ada-projekt -Comment[ta]=அடா பிராஜக்ட் -Comment[tg]=Лоиҳаи Ada -Comment[tr]=Ada Projesi -Comment[uz]=Ada loyihasi -Comment[uz@cyrillic]=Ada лойиҳаси -Comment[zh_CN]=Ada 工程 -Comment[zh_TW]=Ada 專案 -Name=KDevAdaProject -Name[da]=TDevelop Ada-projekt -Name[de]=Ada-Projekt (TDevelop) -Name[fr]=Projet Ada pour TDevelop -Name[hi]=के-डेव-एडीए-परियोजना -Name[nds]=Ada-Projekt (TDevelop) -Name[ne]=केडीई विकास एडा परियोजना -Name[pl]=KDevProjektAda -Name[sk]=KDevAdaProjekt -Name[sv]=TDevelop Ada-projekt -Name[ta]=கெடெவ் அடா பிராஜக்ட் -Name[tg]=Лоиҳаи KDevAda -Name[zh_TW]=TDevelop Ada 專案 -GenericName=Ada Project -GenericName[br]=Raktres Ada -GenericName[ca]=Projecte Ada -GenericName[da]=Ada-projekt -GenericName[de]=Ada-Projekt -GenericName[el]=Έργο Ada -GenericName[es]=Proyecto Ada -GenericName[et]=Ada projekt -GenericName[eu]=Ada proiektua -GenericName[fa]=پروژۀ آدا -GenericName[fr]=Projet en Ada -GenericName[ga]=Tionscadal Ada -GenericName[gl]=Proxecto Ada -GenericName[hi]=एडीए परियोजना -GenericName[hu]=Ada-projekt -GenericName[is]=Ada verkefni -GenericName[it]=Project con Ada -GenericName[ja]=Ada プロジェクト -GenericName[ms]=Projek Ada -GenericName[nds]=Ada-Projekt -GenericName[ne]=एडा परियोजना -GenericName[nl]=Ada-project -GenericName[pa]=Ada ਪ੍ਰੋਜੈਕਟ -GenericName[pl]=Projekt: Ada -GenericName[pt]=Projecto Ada -GenericName[pt_BR]=Projeto Ada -GenericName[ru]=Проект Ada -GenericName[sk]=Ada projekt -GenericName[sl]=Projekt Ada -GenericName[sr]=Ada пројекат -GenericName[sr@Latn]=Ada projekat -GenericName[sv]=Ada-projekt -GenericName[ta]=அடா பிராஜக்ட் -GenericName[tg]=Лоиҳаи Ada -GenericName[tr]=Ada Projesi -GenericName[uz]=Ada loyihasi -GenericName[uz@cyrillic]=Ada лойиҳаси -GenericName[zh_CN]=Ada 工程 -GenericName[zh_TW]=Ada 專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevadaproject -X-TDevelop-Version=5 -X-TDevelop-Language=Ada diff --git a/buildtools/ada/tdevadaproject.rc b/buildtools/ada/tdevadaproject.rc deleted file mode 100644 index d7f260e1..00000000 --- a/buildtools/ada/tdevadaproject.rc +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/buildtools/ant/CMakeLists.txt b/buildtools/ant/CMakeLists.txt index 48858d7f..1b7cfd98 100644 --- a/buildtools/ant/CMakeLists.txt +++ b/buildtools/ant/CMakeLists.txt @@ -26,15 +26,15 @@ link_directories( ##### other data ################################ -install( FILES tdevantproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevantproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevantproject ) +install( FILES kdevantproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevantproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevantproject ) -##### libtdevantproject (module) ################ +##### libkdevantproject (module) ################ -tde_add_kpart( libtdevantproject AUTOMOC +tde_add_kpart( libkdevantproject AUTOMOC SOURCES antprojectpart.cpp antoptionswidget.ui classpathwidget.ui - LINK tdevbuildbase-shared + LINK kdevbuildbase-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/ant/Makefile.am b/buildtools/ant/Makefile.am index 6f3e23e6..30f314b8 100644 --- a/buildtools/ant/Makefile.am +++ b/buildtools/ant/Makefile.am @@ -5,17 +5,17 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_builddir)/buildtools/lib/widgets \ $(all_includes) -kde_module_LTLIBRARIES = libtdevantproject.la -libtdevantproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevantproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la +kde_module_LTLIBRARIES = libkdevantproject.la +libkdevantproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevantproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la -libtdevantproject_la_SOURCES = antprojectpart.cpp antoptionswidget.ui classpathwidget.ui +libkdevantproject_la_SOURCES = antprojectpart.cpp antoptionswidget.ui classpathwidget.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevantproject.desktop +service_DATA = kdevantproject.desktop -rcdir = $(kde_datadir)/tdevantproject -rc_DATA = tdevantproject.rc +rcdir = $(kde_datadir)/kdevantproject +rc_DATA = kdevantproject.rc diff --git a/buildtools/ant/antprojectpart.cpp b/buildtools/ant/antprojectpart.cpp index fcbdd630..902055ec 100644 --- a/buildtools/ant/antprojectpart.cpp +++ b/buildtools/ant/antprojectpart.cpp @@ -11,7 +11,7 @@ #include -#include +#include #include #include #include @@ -21,10 +21,10 @@ #include #include -#include +#include -#include -#include +#include +#include #include @@ -34,9 +34,9 @@ -typedef TDevGenericFactory AntProjectFactory; -static const TDevPluginInfo data("tdevantproject"); -K_EXPORT_COMPONENT_FACTORY(libtdevantproject, AntProjectFactory( data )) +typedef KDevGenericFactory AntProjectFactory; +static const KDevPluginInfo data("kdevantproject"); +K_EXPORT_COMPONENT_FACTORY(libkdevantproject, AntProjectFactory( data )) AntOptions::AntOptions() @@ -46,11 +46,11 @@ AntOptions::AntOptions() AntProjectPart::AntProjectPart(TQObject *parent, const char *name, const TQStringList &) - : TDevBuildTool(&data, parent, name ? name : "AntProjectPart") + : KDevBuildTool(&data, parent, name ? name : "AntProjectPart") { setInstance(AntProjectFactory::instance()); - setXMLFile("tdevantproject.rc"); + setXMLFile("kdevantproject.rc"); m_buildProjectAction = new TDEAction(i18n("&Build Project"), "make_tdevelop", Key_F8, this, TQT_SLOT(slotBuild()), @@ -111,7 +111,7 @@ void AntProjectPart::openProject(const TQString &dirName, const TQString &projec else populateProject(); - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } diff --git a/buildtools/ant/antprojectpart.h b/buildtools/ant/antprojectpart.h index f6203c55..e3b325d2 100644 --- a/buildtools/ant/antprojectpart.h +++ b/buildtools/ant/antprojectpart.h @@ -16,7 +16,7 @@ class Context; class ClassPathWidget; -#include "tdevbuildtool.h" +#include "kdevbuildtool.h" class AntOptionsWidget; @@ -40,7 +40,7 @@ public: }; -class AntProjectPart : public TDevBuildTool +class AntProjectPart : public KDevBuildTool { Q_OBJECT diff --git a/buildtools/ant/kdevantproject.desktop b/buildtools/ant/kdevantproject.desktop new file mode 100644 index 00000000..e2880101 --- /dev/null +++ b/buildtools/ant/kdevantproject.desktop @@ -0,0 +1,96 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Ant Project +Comment[br]=Raktres Ant +Comment[ca]=Projecte Ant +Comment[cs]=Ant projekt +Comment[da]=Ant-projekt +Comment[de]=Ant-Projekt für TDevelop +Comment[el]=Έργο Ant +Comment[es]=Proyecto Ant +Comment[et]=Ant projekt +Comment[eu]=Ant proiektua +Comment[fa]=پروژۀ Ant +Comment[fr]=Projet avec Ant +Comment[ga]=Comhad tionscadail Ant +Comment[gl]=Proxecto Ant +Comment[hi]=एएनटी परियोजना +Comment[hu]=Ant-projekt +Comment[is]=Ant verkefni +Comment[it]=Progetto Ant +Comment[ja]=Ant プロジェクト +Comment[ms]=Projek Ant +Comment[nds]=Ant-Projekt +Comment[ne]=एन्ट परियोजना +Comment[nl]=Ant-project +Comment[pa]=Ant ਪ੍ਰੋਜੈਕਟ +Comment[pl]=Projekt: Ant +Comment[pt]=Projecto Ant +Comment[pt_BR]=Projeto Ant +Comment[ru]=Проект Ant +Comment[sk]=Ant projekt +Comment[sl]=Projekt Ant +Comment[sr]=Ant пројекат +Comment[sr@Latn]=Ant projekat +Comment[sv]=Ant-projekt +Comment[ta]=ஆன்ட்பிராஜக்ட் +Comment[tg]=Лоиҳаи Ant +Comment[tr]=Ant Projesi +Comment[uz]=Ant loyihasi +Comment[uz@cyrillic]=Ant лойиҳаси +Comment[zh_CN]=Ant 工程 +Comment[zh_TW]=Ant 專案 +Name=KDevAntProject +Name[da]=TDevelop Ant-projekt +Name[de]=Ant-Projekt (TDevelop) +Name[hi]=के-डेव-एएनटी-परियोजना +Name[nds]=Ant-Projekt (TDevelop) +Name[ne]=केडीई विकास एन्ट परियोजना +Name[pl]=KDevProjektAnt +Name[sk]=KDevAntProjekt +Name[sv]=TDevelop Ant-projekt +Name[ta]=கெடெவ்ஆன்ட் பிராஜக்ட் +Name[tg]=Лоиҳаи KDevAnt +Name[zh_TW]=TDevelop Ant 專案 +GenericName=Ant Project +GenericName[br]=Raktres Ant +GenericName[ca]=Projecte Ant +GenericName[da]=Ant-projekt +GenericName[de]=Ant-Projekt +GenericName[el]=Έργο Ant +GenericName[es]=Proyecto Ant +GenericName[et]=Ant projekt +GenericName[eu]=Ant proiektua +GenericName[fa]=پروژۀ Ant +GenericName[fr]=Projet avec Ant +GenericName[ga]=Comhad tionscadail Ant +GenericName[gl]=Proxecto Ant +GenericName[hi]=एएनटी परियोजना +GenericName[hu]=Ant-projekt +GenericName[it]=Project con Ant +GenericName[ja]=Ant プロジェクト +GenericName[ms]=Projek Ant +GenericName[nds]=Ant-Projekt +GenericName[ne]=एन्ट परियोजना +GenericName[nl]=Ant-project +GenericName[pl]=Projekt: Ant +GenericName[pt]=Projecto Ant +GenericName[pt_BR]=Projeto Ant +GenericName[ru]=Проект Ant +GenericName[sk]=Ant projekt +GenericName[sl]=Projekt Ant +GenericName[sr]=Ant пројекат +GenericName[sr@Latn]=Ant projekat +GenericName[sv]=Ant-projekt +GenericName[ta]=ஆன்ட்பிராஜக்ட் +GenericName[tg]=Лоиҳаи Ant +GenericName[tr]=Ant Projesi +GenericName[uz]=Ant loyihasi +GenericName[uz@cyrillic]=Ant лойиҳаси +GenericName[zh_CN]=Ant 工程 +GenericName[zh_TW]=Ant 專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevantproject +X-TDevelop-Version=5 +X-TDevelop-Args= diff --git a/buildtools/ant/kdevantproject.rc b/buildtools/ant/kdevantproject.rc new file mode 100644 index 00000000..df892b3c --- /dev/null +++ b/buildtools/ant/kdevantproject.rc @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/buildtools/ant/tdevantproject.desktop b/buildtools/ant/tdevantproject.desktop deleted file mode 100644 index bbca6555..00000000 --- a/buildtools/ant/tdevantproject.desktop +++ /dev/null @@ -1,96 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Ant Project -Comment[br]=Raktres Ant -Comment[ca]=Projecte Ant -Comment[cs]=Ant projekt -Comment[da]=Ant-projekt -Comment[de]=Ant-Projekt für TDevelop -Comment[el]=Έργο Ant -Comment[es]=Proyecto Ant -Comment[et]=Ant projekt -Comment[eu]=Ant proiektua -Comment[fa]=پروژۀ Ant -Comment[fr]=Projet avec Ant -Comment[ga]=Comhad tionscadail Ant -Comment[gl]=Proxecto Ant -Comment[hi]=एएनटी परियोजना -Comment[hu]=Ant-projekt -Comment[is]=Ant verkefni -Comment[it]=Progetto Ant -Comment[ja]=Ant プロジェクト -Comment[ms]=Projek Ant -Comment[nds]=Ant-Projekt -Comment[ne]=एन्ट परियोजना -Comment[nl]=Ant-project -Comment[pa]=Ant ਪ੍ਰੋਜੈਕਟ -Comment[pl]=Projekt: Ant -Comment[pt]=Projecto Ant -Comment[pt_BR]=Projeto Ant -Comment[ru]=Проект Ant -Comment[sk]=Ant projekt -Comment[sl]=Projekt Ant -Comment[sr]=Ant пројекат -Comment[sr@Latn]=Ant projekat -Comment[sv]=Ant-projekt -Comment[ta]=ஆன்ட்பிராஜக்ட் -Comment[tg]=Лоиҳаи Ant -Comment[tr]=Ant Projesi -Comment[uz]=Ant loyihasi -Comment[uz@cyrillic]=Ant лойиҳаси -Comment[zh_CN]=Ant 工程 -Comment[zh_TW]=Ant 專案 -Name=KDevAntProject -Name[da]=TDevelop Ant-projekt -Name[de]=Ant-Projekt (TDevelop) -Name[hi]=के-डेव-एएनटी-परियोजना -Name[nds]=Ant-Projekt (TDevelop) -Name[ne]=केडीई विकास एन्ट परियोजना -Name[pl]=KDevProjektAnt -Name[sk]=KDevAntProjekt -Name[sv]=TDevelop Ant-projekt -Name[ta]=கெடெவ்ஆன்ட் பிராஜக்ட் -Name[tg]=Лоиҳаи KDevAnt -Name[zh_TW]=TDevelop Ant 專案 -GenericName=Ant Project -GenericName[br]=Raktres Ant -GenericName[ca]=Projecte Ant -GenericName[da]=Ant-projekt -GenericName[de]=Ant-Projekt -GenericName[el]=Έργο Ant -GenericName[es]=Proyecto Ant -GenericName[et]=Ant projekt -GenericName[eu]=Ant proiektua -GenericName[fa]=پروژۀ Ant -GenericName[fr]=Projet avec Ant -GenericName[ga]=Comhad tionscadail Ant -GenericName[gl]=Proxecto Ant -GenericName[hi]=एएनटी परियोजना -GenericName[hu]=Ant-projekt -GenericName[it]=Project con Ant -GenericName[ja]=Ant プロジェクト -GenericName[ms]=Projek Ant -GenericName[nds]=Ant-Projekt -GenericName[ne]=एन्ट परियोजना -GenericName[nl]=Ant-project -GenericName[pl]=Projekt: Ant -GenericName[pt]=Projecto Ant -GenericName[pt_BR]=Projeto Ant -GenericName[ru]=Проект Ant -GenericName[sk]=Ant projekt -GenericName[sl]=Projekt Ant -GenericName[sr]=Ant пројекат -GenericName[sr@Latn]=Ant projekat -GenericName[sv]=Ant-projekt -GenericName[ta]=ஆன்ட்பிராஜக்ட் -GenericName[tg]=Лоиҳаи Ant -GenericName[tr]=Ant Projesi -GenericName[uz]=Ant loyihasi -GenericName[uz@cyrillic]=Ant лойиҳаси -GenericName[zh_CN]=Ant 工程 -GenericName[zh_TW]=Ant 專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevantproject -X-TDevelop-Version=5 -X-TDevelop-Args= diff --git a/buildtools/ant/tdevantproject.rc b/buildtools/ant/tdevantproject.rc deleted file mode 100644 index df892b3c..00000000 --- a/buildtools/ant/tdevantproject.rc +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/buildtools/autotools/CMakeLists.txt b/buildtools/autotools/CMakeLists.txt index e33d897c..f7af5bc6 100644 --- a/buildtools/autotools/CMakeLists.txt +++ b/buildtools/autotools/CMakeLists.txt @@ -32,13 +32,13 @@ link_directories( ##### other data ################################ -install( FILES tdevautoproject.desktop tdevtdeautoproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevautoproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevautoproject ) +install( FILES kdevautoproject.desktop kdevtdeautoproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevautoproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevautoproject ) -##### libtdevautoproject (module) ############### +##### libkdevautoproject (module) ############### -tde_add_kpart( libtdevautoproject AUTOMOC +tde_add_kpart( libkdevautoproject AUTOMOC SOURCES autoprojectpart.cpp autoprojectwidget.cpp configureoptionswidget.cpp configureoptionswidgetbase.ui @@ -60,6 +60,6 @@ tde_add_kpart( libtdevautoproject AUTOMOC autolistviewitems.cpp managecustomcommandsbase.ui managecustomcommand.cpp autoprojectviewbase.ui autotoolsaction.cpp makefilehandler.cpp - LINK tdevautotoolsparser-static tdevbuildbase-shared tdevbuildtoolswidgets-shared + LINK kdevautotoolsparser-static kdevbuildbase-shared kdevbuildtoolswidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/autotools/Makefile.am b/buildtools/autotools/Makefile.am index a704eb29..98f3ad51 100644 --- a/buildtools/autotools/Makefile.am +++ b/buildtools/autotools/Makefile.am @@ -7,14 +7,14 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib -I$(top_srcdir)/buildtools/lib/base \ -I$(top_builddir)/buildtools/lib/widgets -kde_module_LTLIBRARIES = libtdevautoproject.la -libtdevautoproject_la_LDFLAGS = $(all_libraries) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) $(KDE_PLUGIN) -libtdevautoproject_la_LIBADD = \ - $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la \ - $(top_builddir)/buildtools/lib/parsers/autotools/libtdevautotoolsparser.la $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la \ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevautoproject.la +libkdevautoproject_la_LDFLAGS = $(all_libraries) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) $(KDE_PLUGIN) +libkdevautoproject_la_LIBADD = \ + $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la \ + $(top_builddir)/buildtools/lib/parsers/autotools/libkdevautotoolsparser.la $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la \ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(top_builddir)/lib/libtdevelop.la -libtdevautoproject_la_SOURCES = autoprojectpart.cpp autoprojectwidget.cpp \ +libkdevautoproject_la_SOURCES = autoprojectpart.cpp autoprojectwidget.cpp \ configureoptionswidget.cpp configureoptionswidgetbase.ui subprojectoptionsdlg.cpp \ subprojectoptionsdlgbase.ui targetoptionsdlg.cpp targetoptionsdlgbase.ui addservicedlg.cpp \ addservicedlgbase.ui addapplicationdlg.cpp addapplicationdlgbase.ui addtargetdlg.cpp \ @@ -30,9 +30,9 @@ libtdevautoproject_la_SOURCES = autoprojectpart.cpp autoprojectwidget.cpp \ METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevautoproject.desktop tdevtdeautoproject.desktop +service_DATA = kdevautoproject.desktop kdevtdeautoproject.desktop -rcdir = $(kde_datadir)/tdevautoproject -rc_DATA = tdevautoproject.rc +rcdir = $(kde_datadir)/kdevautoproject +rc_DATA = kdevautoproject.rc noinst_HEADERS = managecustomcommand.h autotoolsaction.h makefilehandler.h diff --git a/buildtools/autotools/addfiledlg.cpp b/buildtools/autotools/addfiledlg.cpp index 18bf87a8..d3f71637 100644 --- a/buildtools/autotools/addfiledlg.cpp +++ b/buildtools/autotools/addfiledlg.cpp @@ -36,7 +36,7 @@ #include "autoprojectpart.h" #include "autoprojectwidget.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" AddFileDialog::AddFileDialog(AutoProjectPart *part, AutoProjectWidget *widget, SubprojectItem *spitem, TargetItem *item, diff --git a/buildtools/autotools/addsubprojectdlg.cpp b/buildtools/autotools/addsubprojectdlg.cpp index fa64c506..59cebc53 100644 --- a/buildtools/autotools/addsubprojectdlg.cpp +++ b/buildtools/autotools/addsubprojectdlg.cpp @@ -25,7 +25,7 @@ #include "autolistviewitems.h" -#include "tdevmakefrontend.h" +#include "kdevmakefrontend.h" #include "misc.h" #include "autoprojectpart.h" #include "autosubprojectview.h" diff --git a/buildtools/autotools/autodetailsview.cpp b/buildtools/autotools/autodetailsview.cpp index 34060b61..91b6d75c 100644 --- a/buildtools/autotools/autodetailsview.cpp +++ b/buildtools/autotools/autodetailsview.cpp @@ -32,13 +32,13 @@ #include /** KDevelop */ -#include "tdevappfrontend.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" -#include "tdevcreatefile.h" -#include "tdevlanguagesupport.h" -#include "tdevmakefrontend.h" +#include "kdevappfrontend.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevcreatefile.h" +#include "kdevlanguagesupport.h" +#include "kdevmakefrontend.h" #include "urlutil.h" #include "domutil.h" @@ -294,13 +294,13 @@ void AutoDetailsView::slotAddNewFile() if ( !titem ) return; - TDevCreateFile * createFileSupport = m_part->extension("TDevelop/CreateFile"); + KDevCreateFile * createFileSupport = m_part->extension("TDevelop/CreateFile"); if (createFileSupport) { - TDevCreateFile::CreatedFile crFile = + KDevCreateFile::CreatedFile crFile = createFileSupport->createNewFile(TQString(), m_widget->selectedSubproject()->path); -/* if (crFile.status == TDevCreateFile::CreatedFile::STATUS_OK) +/* if (crFile.status == KDevCreateFile::CreatedFile::STATUS_OK) { FileItem *fitem = m_widget->createFileItem(crFile.filename, m_widget->selectedSubproject()); titem->sources.append(fitem); diff --git a/buildtools/autotools/autoprojectpart.cpp b/buildtools/autotools/autoprojectpart.cpp index ae5453bc..6b408bd0 100644 --- a/buildtools/autotools/autoprojectpart.cpp +++ b/buildtools/autotools/autoprojectpart.cpp @@ -45,34 +45,34 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #include #define CONFIGURE_OPTIONS 1 #define RUN_OPTIONS 2 #define MAKE_OPTIONS 3 -static const TDevPluginInfo data("tdevautoproject"); +static const KDevPluginInfo data("kdevautoproject"); -K_EXPORT_COMPONENT_FACTORY( libtdevautoproject, AutoProjectFactory( data ) ) +K_EXPORT_COMPONENT_FACTORY( libkdevautoproject, AutoProjectFactory( data ) ) AutoProjectPart::AutoProjectPart(TQObject *parent, const char *name, const TQStringList &args) - : TDevBuildTool(&data, parent, name ? name : "AutoProjectPart") + : KDevBuildTool(&data, parent, name ? name : "AutoProjectPart") , m_lastCompilationFailed(false) { setInstance(AutoProjectFactory::instance()); - setXMLFile("tdevautoproject.rc"); + setXMLFile("kdevautoproject.rc"); m_executeAfterBuild = false; m_isKDE = (args[0] == "kde"); @@ -310,7 +310,7 @@ void AutoProjectPart::openProject(const TQString &dirName, const TQString &proje "Project -> Project Options -> Run Options"), i18n("No active target specified"), "tdevelop_open_project_no_active_target"); } - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } @@ -358,7 +358,7 @@ TQString AutoProjectPart::runDirectory() const TQString cwd; if( DomUtil::readBoolEntry(dom, "/kdevautoproject/run/useglobalprogram", false) || !m_widget->activeTarget() ) { - cwd = defaultRunDirectory("tdevautoproject"); + cwd = defaultRunDirectory("kdevautoproject"); }else { cwd = DomUtil::readEntry( dom, "/kdevautoproject/run/cwd/"+m_widget->activeTarget()->name ); @@ -585,7 +585,7 @@ TQStringList AutoProjectPart::allBuildConfigs() const TQStringList allConfigs; allConfigs.append("default"); - TQDomNode node = dom.documentElement().namedItem("tdevautoproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevautoproject").namedItem("configurations"); TQDomElement childEl = node.firstChild().toElement(); while (!childEl.isNull()) { @@ -1075,7 +1075,7 @@ TQString AutoProjectPart::updateAdminDirectoryCommand() const // Find the admin tarball TDEStandardDirs dirs; - dirs.addResourceType("apptemplates", TDEStandardDirs::kde_default("data") + "tdevappwizard/template-common/"); + dirs.addResourceType("apptemplates", TDEStandardDirs::kde_default("data") + "kdevappwizard/template-common/"); source = dirs.findResource("apptemplates", "admin.tar.gz"); if (source != "") { TQString cmdline = "rm -rf admin && tar -xzvf "; @@ -1453,7 +1453,7 @@ bool AutoProjectPart::isKDE() const return m_isKDE; } -TDevProject::Options AutoProjectPart::options() const +KDevProject::Options AutoProjectPart::options() const { return UsesAutotoolsBuildSystem; } diff --git a/buildtools/autotools/autoprojectpart.h b/buildtools/autotools/autoprojectpart.h index 08d83719..83066c3c 100644 --- a/buildtools/autotools/autoprojectpart.h +++ b/buildtools/autotools/autoprojectpart.h @@ -20,8 +20,8 @@ #include #include #include -#include -#include "tdevbuildtool.h" +#include +#include "kdevbuildtool.h" class TQDomElement; class TQStringList; @@ -31,7 +31,7 @@ class TDESelectAction; class TargetItem; class ConfigWidgetProxy; -class AutoProjectPart : public TDevBuildTool +class AutoProjectPart : public KDevBuildTool { Q_OBJECT @@ -41,7 +41,7 @@ public: virtual ~AutoProjectPart(); /** - * Implementation of the TDevProject interface. + * Implementation of the KDevProject interface. */ virtual TQString projectDirectory() const; virtual TQString projectName() const; @@ -61,7 +61,7 @@ public: virtual Options options() const; /** - * Implementation of the TDevPlugin interface. + * Implementation of the KDevPlugin interface. */ virtual void restorePartialProjectSession ( const TQDomElement* el ); virtual void savePartialProjectSession ( TQDomElement* el ); @@ -85,7 +85,7 @@ public: protected: /** - * Reimplemented from TDevProject. These methods are only + * Reimplemented from KDevProject. These methods are only * for use by the application core. */ virtual void openProject( const TQString &dirName, const TQString &projectName ); @@ -151,7 +151,7 @@ private: bool queueInternalLibDependenciesBuild( TargetItem* titem, TQStringList& list ); }; -typedef TDevGenericFactory AutoProjectFactory; +typedef KDevGenericFactory AutoProjectFactory; #endif // kate: indent-mode csands; tab-width 4; diff --git a/buildtools/autotools/autoprojectwidget.cpp b/buildtools/autotools/autoprojectwidget.cpp index c41a60dc..a558a593 100644 --- a/buildtools/autotools/autoprojectwidget.cpp +++ b/buildtools/autotools/autoprojectwidget.cpp @@ -42,7 +42,7 @@ #include #include -#include "tdevcore.h" +#include "kdevcore.h" #include "domutil.h" #include "misc.h" #include "choosetargetdialog.h" diff --git a/buildtools/autotools/autosubprojectview.cpp b/buildtools/autotools/autosubprojectview.cpp index 0eecfe4b..8353e2ea 100644 --- a/buildtools/autotools/autosubprojectview.cpp +++ b/buildtools/autotools/autosubprojectview.cpp @@ -34,10 +34,10 @@ #include /** KDevelop */ -#include -#include -#include -#include +#include +#include +#include +#include #include /** AutoProject */ diff --git a/buildtools/autotools/choosetargetdialog.cpp b/buildtools/autotools/choosetargetdialog.cpp index fad399f3..8b59545f 100644 --- a/buildtools/autotools/choosetargetdialog.cpp +++ b/buildtools/autotools/choosetargetdialog.cpp @@ -43,7 +43,7 @@ #include "autoprojectwidget.h" #include "autoprojectpart.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" class ChooseTargetDialog::Private { diff --git a/buildtools/autotools/configureoptionswidget.cpp b/buildtools/autotools/configureoptionswidget.cpp index c991d15d..cc39aa07 100644 --- a/buildtools/autotools/configureoptionswidget.cpp +++ b/buildtools/autotools/configureoptionswidget.cpp @@ -29,7 +29,7 @@ #include #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" #include "autoprojectpart.h" #include "environmentvariableswidget.h" @@ -310,7 +310,7 @@ void ConfigureOptionsWidget::configRemoved() TQString config = config_combo->currentText(); TQDomDocument dom = *m_part->projectDom(); - TQDomNode node = dom.documentElement().namedItem("tdevautoproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevautoproject").namedItem("configurations"); node.removeChild(node.namedItem(config)); allConfigs.remove(config); @@ -348,7 +348,7 @@ void ConfigureOptionsWidget::f77serviceChanged() void ConfigureOptionsWidget::cflagsClicked() { TQString name = ServiceComboBox::currentText(cservice_combo, cservice_names); - TDevCompilerOptions *plugin = createCompilerOptions(name); + KDevCompilerOptions *plugin = createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, cflags_edit->text()); @@ -361,7 +361,7 @@ void ConfigureOptionsWidget::cflagsClicked() void ConfigureOptionsWidget::cxxflagsClicked() { TQString name = ServiceComboBox::currentText(cxxservice_combo, cxxservice_names); - TDevCompilerOptions *plugin = createCompilerOptions(name); + KDevCompilerOptions *plugin = createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, cxxflags_edit->text()); @@ -374,7 +374,7 @@ void ConfigureOptionsWidget::cxxflagsClicked() void ConfigureOptionsWidget::f77flagsClicked() { TQString name = ServiceComboBox::currentText(f77service_combo, f77service_names); - TDevCompilerOptions *plugin = createCompilerOptions(name); + KDevCompilerOptions *plugin = createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, f77flags_edit->text()); @@ -384,7 +384,7 @@ void ConfigureOptionsWidget::f77flagsClicked() } -TDevCompilerOptions *ConfigureOptionsWidget::createCompilerOptions(const TQString &name) +KDevCompilerOptions *ConfigureOptionsWidget::createCompilerOptions(const TQString &name) { KService::Ptr service = KService::serviceByDesktopName(name); if (!service) { @@ -406,13 +406,13 @@ TDevCompilerOptions *ConfigureOptionsWidget::createCompilerOptions(const TQStrin args = TQStringList::split(" ", prop.toString()); TQObject *obj = factory->create(TQT_TQOBJECT(this), service->name().latin1(), - "TDevCompilerOptions", args); + "KDevCompilerOptions", args); - if (!obj->inherits("TDevCompilerOptions")) { - kdDebug(9020) << "Component does not inherit TDevCompilerOptions" << endl; + if (!obj->inherits("KDevCompilerOptions")) { + kdDebug(9020) << "Component does not inherit KDevCompilerOptions" << endl; return 0; } - TDevCompilerOptions *dlg = (TDevCompilerOptions*) obj; + KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj; return dlg; } diff --git a/buildtools/autotools/configureoptionswidget.h b/buildtools/autotools/configureoptionswidget.h index dfab95cc..e40874de 100644 --- a/buildtools/autotools/configureoptionswidget.h +++ b/buildtools/autotools/configureoptionswidget.h @@ -18,7 +18,7 @@ #include "domutil.h" -class TDevCompilerOptions; +class KDevCompilerOptions; class AutoProjectPart; class EnvironmentVariablesWidget; @@ -53,7 +53,7 @@ private: void readSettings( const TQString &config ); void saveSettings( const TQString &config ); - TDevCompilerOptions *createCompilerOptions( const TQString &lang ); + KDevCompilerOptions *createCompilerOptions( const TQString &lang ); TDETrader::OfferList coffers, cxxoffers, f77offers; TQStringList cservice_names, cservice_execs; TQStringList cxxservice_names, cxxservice_execs; diff --git a/buildtools/autotools/fileselectorwidget.cpp b/buildtools/autotools/fileselectorwidget.cpp index afd09d4b..c10db050 100644 --- a/buildtools/autotools/fileselectorwidget.cpp +++ b/buildtools/autotools/fileselectorwidget.cpp @@ -43,7 +43,7 @@ #include "autoprojectwidget.h" #include "autoprojectpart.h" -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include "tdefilednddetailview.h" #include "tdefiledndiconview.h" @@ -140,7 +140,7 @@ FileSelectorWidget::FileSelectorWidget(AutoProjectPart* part, KFile::Mode mode, /* read the file patterns from the project DOM */ TQDomElement docEl = m_part->projectDom()->documentElement(); - TQDomElement fileviewEl = docEl.namedItem("tdevfileview").toElement(); + TQDomElement fileviewEl = docEl.namedItem("kdevfileview").toElement(); TQDomElement groupsEl = fileviewEl.namedItem("groups").toElement(); TQDomElement groupEl = groupsEl.firstChild().toElement(); diff --git a/buildtools/autotools/kdevautoproject.desktop b/buildtools/autotools/kdevautoproject.desktop new file mode 100644 index 00000000..a149c870 --- /dev/null +++ b/buildtools/autotools/kdevautoproject.desktop @@ -0,0 +1,97 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Automake Project +Comment[br]=Raktres Automake +Comment[ca]=Projecte Automake +Comment[da]=Automake-projekt +Comment[de]=Automake-Projekt für TDevelop +Comment[el]=Έργο Automake +Comment[es]=Proyecto de Automake +Comment[et]=Automake'i project +Comment[eu]=Automake proiektua +Comment[fa]=پروژۀ Automake +Comment[fr]=Projet avec Automake +Comment[ga]=Comhad tionscadail Automake +Comment[gl]=Proxecto Automake +Comment[hi]=ऑटोमेक परियोजना +Comment[hu]=Automake-projekt +Comment[is]=Automake verkefni +Comment[it]=Progetto per automake +Comment[ja]=Automake プロジェクト +Comment[ms]=Projek Automake +Comment[nds]=Automake-Projekt +Comment[ne]=स्वत: निर्माण परियोजना +Comment[nl]=Automake-project +Comment[pa]=ਆਟੋਮੈਕ ਪ੍ਰੋਜੈਕਟ +Comment[pl]=Projekt: Automake +Comment[pt]=Projecto Automake +Comment[pt_BR]=Projeto Automake +Comment[ru]=Проект Automake +Comment[sk]=Automake projekt +Comment[sl]=Projekt automake +Comment[sr]=Automake пројекат +Comment[sr@Latn]=Automake projekat +Comment[sv]=Automake-projekt +Comment[ta]=ஆட்டோமேக் பிராஜக்ட் +Comment[tg]=Лоиҳаи Automake +Comment[tr]=Automake Projesi +Comment[uz]=Automake loyihasi +Comment[uz@cyrillic]=Automake лойиҳаси +Comment[zh_CN]=Automake 工程 +Comment[zh_TW]=Automake 專案 +Name=KDevAutoProject +Name[da]=TDevelop Automake-projekt +Name[de]=Automake-Projekt (TDevelop) +Name[hi]=के-डेव-ऑटो-परियोजना +Name[nds]=Automake-Projekt (TDevelop) +Name[ne]=केडीई विकास स्वत: परियोजना +Name[pl]=KDevProjektAuto +Name[pt_BR]=KDevAutoProjeto +Name[sk]=KDevAutoProjekt +Name[sv]=TDevelop autoprojekt +Name[ta]=கெடெவ்ஆட்டோ பிராஜக்ட் +Name[tg]=Лоиҳаи KDevAuto +Name[zh_TW]=TDevelop Automake 專案 +GenericName=Automake Project +GenericName[br]=Raktres Automake +GenericName[ca]=Projecte Automake +GenericName[da]=Automake-projekt +GenericName[de]=Automake-Projekt +GenericName[el]=Έργο Automake +GenericName[es]=Proyecto de Automake +GenericName[et]=Automake'i projekt +GenericName[eu]=Automake proiektua +GenericName[fa]=پروژۀ Automake +GenericName[fr]=Projet avec Automake +GenericName[ga]=Comhad tionscadail Automake +GenericName[gl]=Proxecto Automake +GenericName[hi]=ऑटोमेक परियोजना +GenericName[hu]=Automake-projekt +GenericName[it]=Progetto Automake +GenericName[ja]=Automake プロジェクト +GenericName[ms]=Projek Automake +GenericName[nds]=Automake-Projekt +GenericName[ne]=स्वत: निर्माण परियोजना +GenericName[nl]=Automake-project +GenericName[pl]=Projekt: Automake +GenericName[pt]=Projecto de Automake +GenericName[pt_BR]=Projeto Automake +GenericName[ru]=Проект Automake +GenericName[sk]=Automake projekt +GenericName[sl]=Projekt automake +GenericName[sr]=Automake пројекат +GenericName[sr@Latn]=Automake projekat +GenericName[sv]=Automake-projekt +GenericName[ta]=ஆட்டோமேக் பிராஜக்ட் +GenericName[tg]=Лоиҳаи Automake +GenericName[tr]=Automake Projesi +GenericName[uz]=Automake loyihasi +GenericName[uz@cyrillic]=Automake лойиҳаси +GenericName[zh_CN]=Automake 工程 +GenericName[zh_TW]=Automake 專案 +ServiceTypes=TDevelop/Project +Icon=make +X-TDE-Library=libkdevautoproject +X-TDevelop-Version=5 +X-TDevelop-Args= diff --git a/buildtools/autotools/kdevautoproject.rc b/buildtools/autotools/kdevautoproject.rc new file mode 100644 index 00000000..5d213e3e --- /dev/null +++ b/buildtools/autotools/kdevautoproject.rc @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/buildtools/autotools/kdevtdeautoproject.desktop b/buildtools/autotools/kdevtdeautoproject.desktop new file mode 100644 index 00000000..b9b6abd8 --- /dev/null +++ b/buildtools/autotools/kdevtdeautoproject.desktop @@ -0,0 +1,92 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=TDE Automake Project +Comment[br]=Raktres TDE Automake +Comment[ca]=Projecte Automake per al TDE +Comment[da]=TDE Automake-projekt +Comment[de]=TDE-Automake-Projekt für TDevelop +Comment[el]=Έργο TDE Automake +Comment[es]=Proyecto de Automake de TDE +Comment[et]=TDE automake'i projekt +Comment[eu]=TDE automake proiektua +Comment[fa]=پروژۀ TDE Automake +Comment[fr]=Projet Automake pour TDE +Comment[ga]=Tionscadal Automake TDE +Comment[gl]=Proxecto Automake de TDE +Comment[hi]=केडीई ऑटोमेक परियोजना +Comment[hu]=TDE Automake-projekt +Comment[is]=TDE Automake verkefni +Comment[it]=Progetto TDE per automake +Comment[ja]=TDE Automake プロジェクト +Comment[ms]=Projek Automake TDE +Comment[nds]=Automake-Projekt vun TDE +Comment[ne]=केडीई स्वत: निर्माण परियोजना +Comment[nl]=TDE Automake-project +Comment[pt]=Projecto Automake do TDE +Comment[pt_BR]=Projeto Automake do TDE +Comment[ru]=Проект TDE Automake +Comment[sk]=TDE Automake projekt +Comment[sl]=Projekt TDE Automake +Comment[sr]=TDE-ов Automake пројекат +Comment[sr@Latn]=TDE-ov Automake projekat +Comment[sv]=TDE Automake-projekt +Comment[ta]=TDE ஆட்டோமேக் பிராஜக்ட் +Comment[tg]=Лоиҳаи TDE Automake +Comment[tr]=TDE Automake Projesi +Comment[zh_CN]=TDE Automake 工程 +Comment[zh_TW]=TDE Automake 專案 +Name=KDevTDEAutoProject +Name[da]=TDevelop TDE Automake-projekt +Name[de]=TDE-Automake-Projekt (TDevelop) +Name[hi]=के-डेव-केडीई-ऑटो-परियोजना +Name[nds]=Automake-Projekt (TDE/TDevelop) +Name[ne]=केडीई विकास केडीई स्वत: परियोजना +Name[pl]=KDevProjektTDEAuto +Name[pt_BR]=KDevTDEAutoProjeto +Name[sk]=KDevAutoProjekt +Name[sv]=TDevelop TDE-autoprojekt +Name[ta]=கெடெவ்ஆட்டோ பிராஜக்ட் +Name[tg]=Лоиҳаи худкори KDevTDEAuto +Name[zh_TW]=TDevelop TDE Automake 專案 +GenericName=TDE Automake Project +GenericName[br]=Raktres TDE Automake +GenericName[ca]=Projecte Automake per al TDE +GenericName[cs]=TDE Automake projekt +GenericName[da]=TDE Automake-projekt +GenericName[de]=TDE-Automake-Projekt +GenericName[el]=Έργο TDE Automake +GenericName[es]=Proyecto de Automake de TDE +GenericName[et]=TDE automake'i projekt +GenericName[eu]=TDE automake proiektua +GenericName[fa]=پروژۀ TDE Automake +GenericName[fr]=Projet avec Automake pour TDE +GenericName[ga]=Tionscadal Automake TDE +GenericName[gl]=Proxecto Automake de TDE +GenericName[hi]=केडीई ऑटोमेक परियोजना +GenericName[hu]=TDE Automake-projekt +GenericName[it]=Progetto TDE Automake +GenericName[ja]=TDE Automake プロジェクト +GenericName[ms]=Projek Automake TDE +GenericName[nds]=Automake-Projekt vun TDE +GenericName[ne]=केडीई स्वत: निर्माण परियोजना +GenericName[nl]=TDE Automake-project +GenericName[pl]=Projekt: TDE Automake +GenericName[pt]=Projecto TDE com Automake +GenericName[pt_BR]=Projeto Automake do TDE +GenericName[ru]=Проект TDE Automake +GenericName[sk]=TDE Automake projekt +GenericName[sl]=Projekt TDE Automake +GenericName[sr]=TDE-ов Automake пројекат +GenericName[sr@Latn]=TDE-ov Automake projekat +GenericName[sv]=TDE Automake-projekt +GenericName[ta]=TDE ஆட்டோமேக் பிராஜக்ட் +GenericName[tg]=Лоиҳаи TDE Automake +GenericName[tr]=TDE Automake Projesi +GenericName[zh_CN]=TDE Automake 工程 +GenericName[zh_TW]=TDE Automake 專案 +ServiceTypes=TDevelop/Project +Icon=make +X-TDE-Library=libkdevautoproject +X-TDevelop-Version=5 +X-TDevelop-Args=kde diff --git a/buildtools/autotools/misc.cpp b/buildtools/autotools/misc.cpp index f1174b21..ec58b54c 100644 --- a/buildtools/autotools/misc.cpp +++ b/buildtools/autotools/misc.cpp @@ -21,10 +21,10 @@ #include "misc.h" -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" -static TDevCompilerOptions *createCompilerOptions( const TQString &name, TQObject *parent ) +static KDevCompilerOptions *createCompilerOptions( const TQString &name, TQObject *parent ) { KService::Ptr service = KService::serviceByDesktopName( name ); if ( !service ) @@ -48,13 +48,13 @@ static TDevCompilerOptions *createCompilerOptions( const TQString &name, TQObjec args = TQStringList::split(" ", prop.toString()); TQObject *obj = factory->create(parent, service->name().latin1(), - "TDevCompilerOptions", args); + "KDevCompilerOptions", args); - if (!obj->inherits("TDevCompilerOptions")) { - kdDebug(9020) << "Component does not inherit TDevCompilerOptions" << endl; + if (!obj->inherits("KDevCompilerOptions")) { + kdDebug(9020) << "Component does not inherit KDevCompilerOptions" << endl; return 0; } - TDevCompilerOptions *dlg = (TDevCompilerOptions*) obj; + KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj; return dlg; @@ -65,14 +65,14 @@ static TDevCompilerOptions *createCompilerOptions( const TQString &name, TQObjec args = TQStringList::split( " ", prop.toString() ); return KParts::ComponentFactory - ::createInstanceFromService( service, parent, + ::createInstanceFromService( service, parent, service->name().latin1(), args );*/ } TQString AutoProjectTool::execFlagsDialog( const TQString &compiler, const TQString &flags, TQWidget *parent ) { - TDevCompilerOptions * plugin = createCompilerOptions( compiler, TQT_TQOBJECT(parent) ); + KDevCompilerOptions * plugin = createCompilerOptions( compiler, TQT_TQOBJECT(parent) ); if ( plugin ) { diff --git a/buildtools/autotools/removefiledlg.cpp b/buildtools/autotools/removefiledlg.cpp index 6508d126..e265a969 100644 --- a/buildtools/autotools/removefiledlg.cpp +++ b/buildtools/autotools/removefiledlg.cpp @@ -155,7 +155,7 @@ void RemoveFileDialog::accept() TQDomDocument &dom = *(m_part->projectDom()); TQDomElement el = dom.documentElement(); - TQDomNode el2 = el.namedItem("tdevautoproject"); + TQDomNode el2 = el.namedItem("kdevautoproject"); TQDomNode el3 = el2.namedItem("subclassing"); TQDomNode n = el3.firstChild(); diff --git a/buildtools/autotools/tdevautoproject.desktop b/buildtools/autotools/tdevautoproject.desktop deleted file mode 100644 index ad164259..00000000 --- a/buildtools/autotools/tdevautoproject.desktop +++ /dev/null @@ -1,97 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Automake Project -Comment[br]=Raktres Automake -Comment[ca]=Projecte Automake -Comment[da]=Automake-projekt -Comment[de]=Automake-Projekt für TDevelop -Comment[el]=Έργο Automake -Comment[es]=Proyecto de Automake -Comment[et]=Automake'i project -Comment[eu]=Automake proiektua -Comment[fa]=پروژۀ Automake -Comment[fr]=Projet avec Automake -Comment[ga]=Comhad tionscadail Automake -Comment[gl]=Proxecto Automake -Comment[hi]=ऑटोमेक परियोजना -Comment[hu]=Automake-projekt -Comment[is]=Automake verkefni -Comment[it]=Progetto per automake -Comment[ja]=Automake プロジェクト -Comment[ms]=Projek Automake -Comment[nds]=Automake-Projekt -Comment[ne]=स्वत: निर्माण परियोजना -Comment[nl]=Automake-project -Comment[pa]=ਆਟੋਮੈਕ ਪ੍ਰੋਜੈਕਟ -Comment[pl]=Projekt: Automake -Comment[pt]=Projecto Automake -Comment[pt_BR]=Projeto Automake -Comment[ru]=Проект Automake -Comment[sk]=Automake projekt -Comment[sl]=Projekt automake -Comment[sr]=Automake пројекат -Comment[sr@Latn]=Automake projekat -Comment[sv]=Automake-projekt -Comment[ta]=ஆட்டோமேக் பிராஜக்ட் -Comment[tg]=Лоиҳаи Automake -Comment[tr]=Automake Projesi -Comment[uz]=Automake loyihasi -Comment[uz@cyrillic]=Automake лойиҳаси -Comment[zh_CN]=Automake 工程 -Comment[zh_TW]=Automake 專案 -Name=KDevAutoProject -Name[da]=TDevelop Automake-projekt -Name[de]=Automake-Projekt (TDevelop) -Name[hi]=के-डेव-ऑटो-परियोजना -Name[nds]=Automake-Projekt (TDevelop) -Name[ne]=केडीई विकास स्वत: परियोजना -Name[pl]=KDevProjektAuto -Name[pt_BR]=KDevAutoProjeto -Name[sk]=KDevAutoProjekt -Name[sv]=TDevelop autoprojekt -Name[ta]=கெடெவ்ஆட்டோ பிராஜக்ட் -Name[tg]=Лоиҳаи KDevAuto -Name[zh_TW]=TDevelop Automake 專案 -GenericName=Automake Project -GenericName[br]=Raktres Automake -GenericName[ca]=Projecte Automake -GenericName[da]=Automake-projekt -GenericName[de]=Automake-Projekt -GenericName[el]=Έργο Automake -GenericName[es]=Proyecto de Automake -GenericName[et]=Automake'i projekt -GenericName[eu]=Automake proiektua -GenericName[fa]=پروژۀ Automake -GenericName[fr]=Projet avec Automake -GenericName[ga]=Comhad tionscadail Automake -GenericName[gl]=Proxecto Automake -GenericName[hi]=ऑटोमेक परियोजना -GenericName[hu]=Automake-projekt -GenericName[it]=Progetto Automake -GenericName[ja]=Automake プロジェクト -GenericName[ms]=Projek Automake -GenericName[nds]=Automake-Projekt -GenericName[ne]=स्वत: निर्माण परियोजना -GenericName[nl]=Automake-project -GenericName[pl]=Projekt: Automake -GenericName[pt]=Projecto de Automake -GenericName[pt_BR]=Projeto Automake -GenericName[ru]=Проект Automake -GenericName[sk]=Automake projekt -GenericName[sl]=Projekt automake -GenericName[sr]=Automake пројекат -GenericName[sr@Latn]=Automake projekat -GenericName[sv]=Automake-projekt -GenericName[ta]=ஆட்டோமேக் பிராஜக்ட் -GenericName[tg]=Лоиҳаи Automake -GenericName[tr]=Automake Projesi -GenericName[uz]=Automake loyihasi -GenericName[uz@cyrillic]=Automake лойиҳаси -GenericName[zh_CN]=Automake 工程 -GenericName[zh_TW]=Automake 專案 -ServiceTypes=TDevelop/Project -Icon=make -X-TDE-Library=libtdevautoproject -X-TDevelop-Version=5 -X-TDevelop-Args= diff --git a/buildtools/autotools/tdevautoproject.rc b/buildtools/autotools/tdevautoproject.rc deleted file mode 100644 index 5d213e3e..00000000 --- a/buildtools/autotools/tdevautoproject.rc +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/buildtools/autotools/tdevtdeautoproject.desktop b/buildtools/autotools/tdevtdeautoproject.desktop deleted file mode 100644 index 5ed348d1..00000000 --- a/buildtools/autotools/tdevtdeautoproject.desktop +++ /dev/null @@ -1,92 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=TDE Automake Project -Comment[br]=Raktres TDE Automake -Comment[ca]=Projecte Automake per al TDE -Comment[da]=TDE Automake-projekt -Comment[de]=TDE-Automake-Projekt für TDevelop -Comment[el]=Έργο TDE Automake -Comment[es]=Proyecto de Automake de TDE -Comment[et]=TDE automake'i projekt -Comment[eu]=TDE automake proiektua -Comment[fa]=پروژۀ TDE Automake -Comment[fr]=Projet Automake pour TDE -Comment[ga]=Tionscadal Automake TDE -Comment[gl]=Proxecto Automake de TDE -Comment[hi]=केडीई ऑटोमेक परियोजना -Comment[hu]=TDE Automake-projekt -Comment[is]=TDE Automake verkefni -Comment[it]=Progetto TDE per automake -Comment[ja]=TDE Automake プロジェクト -Comment[ms]=Projek Automake TDE -Comment[nds]=Automake-Projekt vun TDE -Comment[ne]=केडीई स्वत: निर्माण परियोजना -Comment[nl]=TDE Automake-project -Comment[pt]=Projecto Automake do TDE -Comment[pt_BR]=Projeto Automake do TDE -Comment[ru]=Проект TDE Automake -Comment[sk]=TDE Automake projekt -Comment[sl]=Projekt TDE Automake -Comment[sr]=TDE-ов Automake пројекат -Comment[sr@Latn]=TDE-ov Automake projekat -Comment[sv]=TDE Automake-projekt -Comment[ta]=TDE ஆட்டோமேக் பிராஜக்ட் -Comment[tg]=Лоиҳаи TDE Automake -Comment[tr]=TDE Automake Projesi -Comment[zh_CN]=TDE Automake 工程 -Comment[zh_TW]=TDE Automake 專案 -Name=KDevTDEAutoProject -Name[da]=TDevelop TDE Automake-projekt -Name[de]=TDE-Automake-Projekt (TDevelop) -Name[hi]=के-डेव-केडीई-ऑटो-परियोजना -Name[nds]=Automake-Projekt (TDE/TDevelop) -Name[ne]=केडीई विकास केडीई स्वत: परियोजना -Name[pl]=KDevProjektTDEAuto -Name[pt_BR]=KDevTDEAutoProjeto -Name[sk]=KDevAutoProjekt -Name[sv]=TDevelop TDE-autoprojekt -Name[ta]=கெடெவ்ஆட்டோ பிராஜக்ட் -Name[tg]=Лоиҳаи худкори KDevTDEAuto -Name[zh_TW]=TDevelop TDE Automake 專案 -GenericName=TDE Automake Project -GenericName[br]=Raktres TDE Automake -GenericName[ca]=Projecte Automake per al TDE -GenericName[cs]=TDE Automake projekt -GenericName[da]=TDE Automake-projekt -GenericName[de]=TDE-Automake-Projekt -GenericName[el]=Έργο TDE Automake -GenericName[es]=Proyecto de Automake de TDE -GenericName[et]=TDE automake'i projekt -GenericName[eu]=TDE automake proiektua -GenericName[fa]=پروژۀ TDE Automake -GenericName[fr]=Projet avec Automake pour TDE -GenericName[ga]=Tionscadal Automake TDE -GenericName[gl]=Proxecto Automake de TDE -GenericName[hi]=केडीई ऑटोमेक परियोजना -GenericName[hu]=TDE Automake-projekt -GenericName[it]=Progetto TDE Automake -GenericName[ja]=TDE Automake プロジェクト -GenericName[ms]=Projek Automake TDE -GenericName[nds]=Automake-Projekt vun TDE -GenericName[ne]=केडीई स्वत: निर्माण परियोजना -GenericName[nl]=TDE Automake-project -GenericName[pl]=Projekt: TDE Automake -GenericName[pt]=Projecto TDE com Automake -GenericName[pt_BR]=Projeto Automake do TDE -GenericName[ru]=Проект TDE Automake -GenericName[sk]=TDE Automake projekt -GenericName[sl]=Projekt TDE Automake -GenericName[sr]=TDE-ов Automake пројекат -GenericName[sr@Latn]=TDE-ov Automake projekat -GenericName[sv]=TDE Automake-projekt -GenericName[ta]=TDE ஆட்டோமேக் பிராஜக்ட் -GenericName[tg]=Лоиҳаи TDE Automake -GenericName[tr]=TDE Automake Projesi -GenericName[zh_CN]=TDE Automake 工程 -GenericName[zh_TW]=TDE Automake 專案 -ServiceTypes=TDevelop/Project -Icon=make -X-TDE-Library=libtdevautoproject -X-TDevelop-Version=5 -X-TDevelop-Args=kde diff --git a/buildtools/custommakefiles/CMakeLists.txt b/buildtools/custommakefiles/CMakeLists.txt index 8327a38d..55036324 100644 --- a/buildtools/custommakefiles/CMakeLists.txt +++ b/buildtools/custommakefiles/CMakeLists.txt @@ -30,15 +30,15 @@ link_directories( ##### other data ################################ -install( FILES tdevcustomproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevcustomproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevcustomproject ) +install( FILES kdevcustomproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevcustomproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevcustomproject ) -##### libtdevcustomproject (module) ############# +##### libkdevcustomproject (module) ############# -tde_add_kpart( libtdevcustomproject AUTOMOC +tde_add_kpart( libkdevcustomproject AUTOMOC SOURCES selectnewfilesdialog.cpp selectnewfilesdialogbase.ui custombuildoptionswidget.cpp @@ -46,6 +46,6 @@ tde_add_kpart( libtdevcustomproject AUTOMOC custommakeconfigwidgetbase.ui custommanagerwidget.cpp custommanagerwidgetbase.ui customotherconfigwidget.cpp customotherconfigwidgetbase.ui customprojectpart.cpp - LINK tdevbuildbase-shared tdevbuildtoolswidgets-shared + LINK kdevbuildbase-shared kdevbuildtoolswidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/custommakefiles/Makefile.am b/buildtools/custommakefiles/Makefile.am index 618f8794..087ab001 100644 --- a/buildtools/custommakefiles/Makefile.am +++ b/buildtools/custommakefiles/Makefile.am @@ -5,12 +5,12 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) \ -I$(top_builddir)/buildtools/lib/widgets -kde_module_LTLIBRARIES = libtdevcustomproject.la -libtdevcustomproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevcustomproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la +kde_module_LTLIBRARIES = libkdevcustomproject.la +libkdevcustomproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevcustomproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la -libtdevcustomproject_la_SOURCES = selectnewfilesdialog.cpp selectnewfilesdialogbase.ui \ +libkdevcustomproject_la_SOURCES = selectnewfilesdialog.cpp selectnewfilesdialogbase.ui \ custombuildoptionswidget.cpp custombuildoptionswidgetbase.ui custommakeconfigwidget.cpp \ custommakeconfigwidgetbase.ui custommanagerwidget.cpp custommanagerwidgetbase.ui \ customotherconfigwidget.cpp customotherconfigwidgetbase.ui customprojectpart.cpp @@ -18,9 +18,9 @@ libtdevcustomproject_la_SOURCES = selectnewfilesdialog.cpp selectnewfilesdialogb METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevcustomproject.desktop +service_DATA = kdevcustomproject.desktop -rcdir = $(kde_datadir)/tdevcustomproject -rc_DATA = tdevcustomproject.rc +rcdir = $(kde_datadir)/kdevcustomproject +rc_DATA = kdevcustomproject.rc noinst_HEADERS = selectnewfilesdialog.h custommanagerwidget.h \ customotherconfigwidget.h diff --git a/buildtools/custommakefiles/customprojectpart.cpp b/buildtools/custommakefiles/customprojectpart.cpp index c9cc482d..5b41080e 100644 --- a/buildtools/custommakefiles/customprojectpart.cpp +++ b/buildtools/custommakefiles/customprojectpart.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -42,11 +42,11 @@ #include #include "domutil.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevmakefrontend.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevmakefrontend.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" #include "runoptionswidget.h" #include "makeoptionswidget.h" #include "custombuildoptionswidget.h" @@ -59,18 +59,18 @@ #include "selectnewfilesdialog.h" -#include +#include -typedef TDevGenericFactory CustomProjectFactory; -static const TDevPluginInfo data( "tdevcustomproject" ); -K_EXPORT_COMPONENT_FACTORY( libtdevcustomproject, CustomProjectFactory( data ) ) +typedef KDevGenericFactory CustomProjectFactory; +static const KDevPluginInfo data( "kdevcustomproject" ); +K_EXPORT_COMPONENT_FACTORY( libkdevcustomproject, CustomProjectFactory( data ) ) CustomProjectPart::CustomProjectPart( TQObject *parent, const char *name, const TQStringList & ) - : TDevBuildTool( &data, parent, name ? name : "CustomProjectPart" ) + : KDevBuildTool( &data, parent, name ? name : "CustomProjectPart" ) , m_lastCompilationFailed( false ), m_recursive( false ), m_first_recursive( false ) { setInstance( CustomProjectFactory::instance() ); - setXMLFile( "tdevcustomproject.rc" ); + setXMLFile( "kdevcustomproject.rc" ); m_executeAfterBuild = false; @@ -477,7 +477,7 @@ void CustomProjectPart::openProject( const TQString &dirName, const TQString &pr el.setTagName( "default" ); envs.appendChild( el ); } - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } @@ -632,7 +632,7 @@ DomUtil::PairList CustomProjectPart::runEnvironmentVars() const */ TQString CustomProjectPart::runDirectory() const { - TQString cwd = defaultRunDirectory( "tdevcustomproject" ); + TQString cwd = defaultRunDirectory( "kdevcustomproject" ); if ( cwd.isEmpty() ) cwd = buildDirectory(); return cwd; diff --git a/buildtools/custommakefiles/customprojectpart.h b/buildtools/custommakefiles/customprojectpart.h index db46d576..67223e92 100644 --- a/buildtools/custommakefiles/customprojectpart.h +++ b/buildtools/custommakefiles/customprojectpart.h @@ -20,7 +20,7 @@ #include #include -#include +#include class TQListViewItem; class TQPopupMenu; @@ -30,7 +30,7 @@ class CustomProjectWidget; class Context; class TDESelectAction; -class CustomProjectPart : public TDevBuildTool +class CustomProjectPart : public KDevBuildTool { Q_OBJECT diff --git a/buildtools/custommakefiles/kdevcustomproject.desktop b/buildtools/custommakefiles/kdevcustomproject.desktop new file mode 100644 index 00000000..9f81a3d6 --- /dev/null +++ b/buildtools/custommakefiles/kdevcustomproject.desktop @@ -0,0 +1,91 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Custom Project +Comment[br]=Raktres diouzhoc'h +Comment[ca]=Projecte a mida +Comment[cs]=Vlastní projekt +Comment[da]=Brugerdefineret projekt +Comment[de]=Benutzerdefiniertes Projekt für TDevelop +Comment[el]=Προσαρμοσμένo έργο +Comment[es]=Proyecto personalizado +Comment[et]=Kohandatav projekt +Comment[eu]=Proiektu pertsonalizatua +Comment[fa]=پروژۀ سفارشی +Comment[fr]=Projet personnalisé +Comment[ga]=Tionscadal Saincheaptha +Comment[gl]=Proxecto persoalizado +Comment[hi]=कस्टम परियोजना +Comment[hu]=Egyedi projekt +Comment[is]=Sérsniðið verkefni +Comment[it]=Progetto personalizzato +Comment[ja]=カスタムプロジェクト +Comment[ms]=Projek Tersendiri +Comment[nds]=Egen Projekt +Comment[ne]=अनुकूल परियोजना +Comment[nl]=Aangepast project +Comment[pl]=Własny projekt +Comment[pt]=Projecto Personalizado +Comment[pt_BR]=Projeto Personalizado +Comment[ru]=Особый проект +Comment[sk]=Vlastný projekt +Comment[sl]=Poljuben projekt +Comment[sr]=Произвољан пројекат +Comment[sr@Latn]=Proizvoljan projekat +Comment[sv]=Eget projekt +Comment[ta]=தனிப்பயன் பிராஜக்ட் +Comment[tg]=Лоиҳаи оддӣ +Comment[tr]=Özel Proje +Comment[zh_CN]=自定义工程 +Comment[zh_TW]=自訂專案 +Name=KDevCustomProject +Name[da]=TDevelop brugerdefineret projekt +Name[de]=Benutzerdefiniertes Projekt (TDevelop) +Name[hi]=के-डेव-कस्टम-परियोजना +Name[nds]=Egen Projekt (TDevelop) +Name[ne]=केडीई विकास अनुकूल परियोजना +Name[pl]=KDevWłasnyProjekt +Name[sk]=KDevVlastnýProjekt +Name[sv]=TDevelop eget projekt +Name[ta]=கெடெவ் தனிப்பயன் பிராஜக்ட் +Name[tg]=Лоиҳаи оддӣKDev +Name[zh_TW]=TDevelop 自訂專案 +GenericName=Custom Project +GenericName[br]=Raktres diouzhoc'h +GenericName[ca]=Projecte a mida +GenericName[da]=Brugerdefineret projekt +GenericName[de]=Benutzerdefiniertes Projekt +GenericName[el]=Προσαρμοσμένο έργο +GenericName[es]=Proyecto personalizado +GenericName[et]=Kohandatav projekt +GenericName[eu]=Proiektu pertsonalizatua +GenericName[fa]=پروژۀ سفارشی +GenericName[fr]=Projet personnalisé +GenericName[ga]=Tionscadal Saincheaptha +GenericName[gl]=Proxecto persoalizado +GenericName[hi]=कस्टम परियोजना +GenericName[hu]=Egyedi projekt +GenericName[it]=Progetto personalizzato +GenericName[ja]=カスタムプロジェクト +GenericName[ms]=Projek Tersendiri +GenericName[nds]=Egen Projekt +GenericName[ne]=अनुकूल परियोजना +GenericName[nl]=Aangepast project +GenericName[pl]=Projekt: własny +GenericName[pt]=Projecto Personalizado +GenericName[pt_BR]=Projeto Personalizado +GenericName[ru]=Особый проект +GenericName[sk]=Vlastný projekt +GenericName[sl]=Poljuben projekt +GenericName[sr]=Произвољан пројекат +GenericName[sr@Latn]=Proizvoljan projekat +GenericName[sv]=Eget projekt +GenericName[ta]=தனிப்பயன் பிராஜக்ட் +GenericName[tg]=Лоиҳаи оддӣ +GenericName[tr]=Özel Proje +GenericName[zh_CN]=自定义工程 +GenericName[zh_TW]=自訂專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevcustomproject +X-TDevelop-Version=5 +X-TDevelop-Args= diff --git a/buildtools/custommakefiles/kdevcustomproject.rc b/buildtools/custommakefiles/kdevcustomproject.rc new file mode 100644 index 00000000..c744b4be --- /dev/null +++ b/buildtools/custommakefiles/kdevcustomproject.rc @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/buildtools/custommakefiles/tdevcustomproject.desktop b/buildtools/custommakefiles/tdevcustomproject.desktop deleted file mode 100644 index 0ea2c3bc..00000000 --- a/buildtools/custommakefiles/tdevcustomproject.desktop +++ /dev/null @@ -1,91 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Custom Project -Comment[br]=Raktres diouzhoc'h -Comment[ca]=Projecte a mida -Comment[cs]=Vlastní projekt -Comment[da]=Brugerdefineret projekt -Comment[de]=Benutzerdefiniertes Projekt für TDevelop -Comment[el]=Προσαρμοσμένo έργο -Comment[es]=Proyecto personalizado -Comment[et]=Kohandatav projekt -Comment[eu]=Proiektu pertsonalizatua -Comment[fa]=پروژۀ سفارشی -Comment[fr]=Projet personnalisé -Comment[ga]=Tionscadal Saincheaptha -Comment[gl]=Proxecto persoalizado -Comment[hi]=कस्टम परियोजना -Comment[hu]=Egyedi projekt -Comment[is]=Sérsniðið verkefni -Comment[it]=Progetto personalizzato -Comment[ja]=カスタムプロジェクト -Comment[ms]=Projek Tersendiri -Comment[nds]=Egen Projekt -Comment[ne]=अनुकूल परियोजना -Comment[nl]=Aangepast project -Comment[pl]=Własny projekt -Comment[pt]=Projecto Personalizado -Comment[pt_BR]=Projeto Personalizado -Comment[ru]=Особый проект -Comment[sk]=Vlastný projekt -Comment[sl]=Poljuben projekt -Comment[sr]=Произвољан пројекат -Comment[sr@Latn]=Proizvoljan projekat -Comment[sv]=Eget projekt -Comment[ta]=தனிப்பயன் பிராஜக்ட் -Comment[tg]=Лоиҳаи оддӣ -Comment[tr]=Özel Proje -Comment[zh_CN]=自定义工程 -Comment[zh_TW]=自訂專案 -Name=TDevCustomProject -Name[da]=TDevelop brugerdefineret projekt -Name[de]=Benutzerdefiniertes Projekt (TDevelop) -Name[hi]=के-डेव-कस्टम-परियोजना -Name[nds]=Egen Projekt (TDevelop) -Name[ne]=केडीई विकास अनुकूल परियोजना -Name[pl]=KDevWłasnyProjekt -Name[sk]=KDevVlastnýProjekt -Name[sv]=TDevelop eget projekt -Name[ta]=கெடெவ் தனிப்பயன் பிராஜக்ட் -Name[tg]=Лоиҳаи оддӣKDev -Name[zh_TW]=TDevelop 自訂專案 -GenericName=Custom Project -GenericName[br]=Raktres diouzhoc'h -GenericName[ca]=Projecte a mida -GenericName[da]=Brugerdefineret projekt -GenericName[de]=Benutzerdefiniertes Projekt -GenericName[el]=Προσαρμοσμένο έργο -GenericName[es]=Proyecto personalizado -GenericName[et]=Kohandatav projekt -GenericName[eu]=Proiektu pertsonalizatua -GenericName[fa]=پروژۀ سفارشی -GenericName[fr]=Projet personnalisé -GenericName[ga]=Tionscadal Saincheaptha -GenericName[gl]=Proxecto persoalizado -GenericName[hi]=कस्टम परियोजना -GenericName[hu]=Egyedi projekt -GenericName[it]=Progetto personalizzato -GenericName[ja]=カスタムプロジェクト -GenericName[ms]=Projek Tersendiri -GenericName[nds]=Egen Projekt -GenericName[ne]=अनुकूल परियोजना -GenericName[nl]=Aangepast project -GenericName[pl]=Projekt: własny -GenericName[pt]=Projecto Personalizado -GenericName[pt_BR]=Projeto Personalizado -GenericName[ru]=Особый проект -GenericName[sk]=Vlastný projekt -GenericName[sl]=Poljuben projekt -GenericName[sr]=Произвољан пројекат -GenericName[sr@Latn]=Proizvoljan projekat -GenericName[sv]=Eget projekt -GenericName[ta]=தனிப்பயன் பிராஜக்ட் -GenericName[tg]=Лоиҳаи оддӣ -GenericName[tr]=Özel Proje -GenericName[zh_CN]=自定义工程 -GenericName[zh_TW]=自訂專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevcustomproject -X-TDevelop-Version=5 -X-TDevelop-Args= diff --git a/buildtools/custommakefiles/tdevcustomproject.rc b/buildtools/custommakefiles/tdevcustomproject.rc deleted file mode 100644 index 08079774..00000000 --- a/buildtools/custommakefiles/tdevcustomproject.rc +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/buildtools/lib/base/CMakeLists.txt b/buildtools/lib/base/CMakeLists.txt index a429be6c..f3585669 100644 --- a/buildtools/lib/base/CMakeLists.txt +++ b/buildtools/lib/base/CMakeLists.txt @@ -26,14 +26,14 @@ link_directories( ##### headers ################################### install( FILES - tdevbuildtool.h + kdevbuildtool.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/buildtools/base ) -##### tdevbuildbase (shared) #################### +##### kdevbuildbase (shared) #################### -tde_add_library( tdevbuildbase SHARED AUTOMOC - SOURCES tdevbuildtool.cpp +tde_add_library( kdevbuildbase SHARED AUTOMOC + SOURCES kdevbuildtool.cpp VERSION 0.0.0 LINK tdevelop-shared DESTINATION ${LIB_INSTALL_DIR} diff --git a/buildtools/lib/base/Mainpage.dox b/buildtools/lib/base/Mainpage.dox index 8a85d338..3e16d2d8 100644 --- a/buildtools/lib/base/Mainpage.dox +++ b/buildtools/lib/base/Mainpage.dox @@ -8,8 +8,8 @@ This library contains base classes for KDevelop builtool support plugins. Include path: -I\$(kde_includes)/tdevelop/buildtools/base \section btbaseoverview Overview -This library is created to provide TDevBuildTool compat class which can be used -as drop-in replacement of TDevProject class for buildtool support plugins +This library is created to provide KDevBuildTool compat class which can be used +as drop-in replacement of KDevProject class for buildtool support plugins written for old KDevelop architecture (before version 3.2). Nevertheless, it can be useful for new buildtool plugins as well because it provides diff --git a/buildtools/lib/base/Makefile.am b/buildtools/lib/base/Makefile.am index 6532398d..7e1083ef 100644 --- a/buildtools/lib/base/Makefile.am +++ b/buildtools/lib/base/Makefile.am @@ -2,14 +2,14 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets/propeditor \ $(all_includes) METASOURCES = AUTO -lib_LTLIBRARIES = libtdevbuildbase.la -libtdevbuildbase_la_LDFLAGS = $(all_libraries) -libtdevbuildbase_la_LIBADD = $(top_builddir)/lib/interfaces/libtdevinterfaces.la $(LIB_QT) $(LIB_TDEUI) -libtdevbuildbase_la_SOURCES = tdevbuildtool.cpp +lib_LTLIBRARIES = libkdevbuildbase.la +libkdevbuildbase_la_LDFLAGS = $(all_libraries) +libkdevbuildbase_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la $(LIB_QT) $(LIB_TDEUI) +libkdevbuildbase_la_SOURCES = kdevbuildtool.cpp tdevelopbuildtoolsincludedir = $(includedir)/tdevelop/buildtools/base -tdevelopbuildtoolsinclude_HEADERS = tdevbuildtool.h +tdevelopbuildtoolsinclude_HEADERS = kdevbuildtool.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces tdevextensions -DOXYGEN_PROJECTNAME = TDevelop Buildtool Base Library -DOXYGEN_DOCDIRPREFIX = tdevbt +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces kdevextensions +DOXYGEN_PROJECTNAME = KDevelop Buildtool Base Library +DOXYGEN_DOCDIRPREFIX = kdevbt include ../../../Doxyfile.am diff --git a/buildtools/lib/base/kdevbuildtool.cpp b/buildtools/lib/base/kdevbuildtool.cpp new file mode 100644 index 00000000..618f02d9 --- /dev/null +++ b/buildtools/lib/base/kdevbuildtool.cpp @@ -0,0 +1,38 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Alexander Dymo + + 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 "kdevbuildtool.h" + +#include +#include + +KDevBuildTool::KDevBuildTool(const KDevPluginInfo* info, TQObject* parent, const char* name) + :KDevProject(info, parent, name) +{ +} + +KDevMakeFrontend * KDevBuildTool::makeFrontend() +{ + return extension("TDevelop/MakeFrontend"); +} + +KDevAppFrontend * KDevBuildTool::appFrontend() +{ + return extension("TDevelop/AppFrontend"); +} + diff --git a/buildtools/lib/base/kdevbuildtool.h b/buildtools/lib/base/kdevbuildtool.h new file mode 100644 index 00000000..ff1abcc0 --- /dev/null +++ b/buildtools/lib/base/kdevbuildtool.h @@ -0,0 +1,41 @@ +/* This file is part of the KDE project + Copyright (C) 1999-2001 Bernd Gehrmann + Copyright (C) 2004 Alexander Dymo + + 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 KDEVBUILDTOOL_H +#define KDEVBUILDTOOL_H + +#include + +class KDevMakeFrontend; +class KDevAppFrontend; + +/**Base class for KDevelop build tool support plugins.*/ +class KDevBuildTool: public KDevProject +{ +public: + KDevBuildTool(const KDevPluginInfo* info, TQObject* parent, const char* name); + + /**@return The make frontend.*/ + KDevMakeFrontend *makeFrontend(); + /**@return The application frontend.*/ + KDevAppFrontend *appFrontend(); + +}; + +#endif diff --git a/buildtools/lib/base/tdevbuildtool.cpp b/buildtools/lib/base/tdevbuildtool.cpp deleted file mode 100644 index aa901bb7..00000000 --- a/buildtools/lib/base/tdevbuildtool.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Alexander Dymo - - 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 "tdevbuildtool.h" - -#include -#include - -TDevBuildTool::TDevBuildTool(const TDevPluginInfo* info, TQObject* parent, const char* name) - :TDevProject(info, parent, name) -{ -} - -TDevMakeFrontend * TDevBuildTool::makeFrontend() -{ - return extension("TDevelop/MakeFrontend"); -} - -TDevAppFrontend * TDevBuildTool::appFrontend() -{ - return extension("TDevelop/AppFrontend"); -} - diff --git a/buildtools/lib/base/tdevbuildtool.h b/buildtools/lib/base/tdevbuildtool.h deleted file mode 100644 index b6899f9b..00000000 --- a/buildtools/lib/base/tdevbuildtool.h +++ /dev/null @@ -1,41 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1999-2001 Bernd Gehrmann - Copyright (C) 2004 Alexander Dymo - - 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 TDEVBUILDTOOL_H -#define TDEVBUILDTOOL_H - -#include - -class TDevMakeFrontend; -class TDevAppFrontend; - -/**Base class for KDevelop build tool support plugins.*/ -class TDevBuildTool: public TDevProject -{ -public: - TDevBuildTool(const TDevPluginInfo* info, TQObject* parent, const char* name); - - /**@return The make frontend.*/ - TDevMakeFrontend *makeFrontend(); - /**@return The application frontend.*/ - TDevAppFrontend *appFrontend(); - -}; - -#endif diff --git a/buildtools/lib/parsers/autotools/CMakeLists.txt b/buildtools/lib/parsers/autotools/CMakeLists.txt index 5bc97247..8226e963 100644 --- a/buildtools/lib/parsers/autotools/CMakeLists.txt +++ b/buildtools/lib/parsers/autotools/CMakeLists.txt @@ -16,9 +16,9 @@ include_directories( ) -##### tdevautotoolsparser (static) ############## +##### kdevautotoolsparser (static) ############## -tde_add_library( tdevautotoolsparser STATIC_PIC +tde_add_library( kdevautotoolsparser STATIC_PIC SOURCES autotoolsast.cpp autotoolsdriver.cpp autotools_yacc.cpp ) diff --git a/buildtools/lib/parsers/autotools/Makefile.am b/buildtools/lib/parsers/autotools/Makefile.am index 47234583..340d0e38 100644 --- a/buildtools/lib/parsers/autotools/Makefile.am +++ b/buildtools/lib/parsers/autotools/Makefile.am @@ -6,9 +6,9 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets/propeditor \ $(all_includes) METASOURCES = AUTO -noinst_LTLIBRARIES = libtdevautotoolsparser.la -libtdevautotoolsparser_la_LDFLAGS = $(all_libraries) $(LIB_TDEIO) -libtdevautotoolsparser_la_SOURCES = autotoolsast.cpp autotoolsdriver.cpp autotools_yacc.cpp +noinst_LTLIBRARIES = libkdevautotoolsparser.la +libkdevautotoolsparser_la_LDFLAGS = $(all_libraries) $(LIB_TDEIO) +libkdevautotoolsparser_la_SOURCES = autotoolsast.cpp autotoolsdriver.cpp autotools_yacc.cpp parser: cd $(srcdir) ; \ @@ -19,6 +19,6 @@ parser: EXTRA_DIST = autotools.yy autotools.ll DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils -DOXYGEN_PROJECTNAME = TDevelop AutoTools Parser -DOXYGEN_DOCDIRPREFIX = tdevparser +DOXYGEN_PROJECTNAME = KDevelop AutoTools Parser +DOXYGEN_DOCDIRPREFIX = kdevparser include ../../../../Doxyfile.am diff --git a/buildtools/lib/parsers/autotools/tests/Makefile.am b/buildtools/lib/parsers/autotools/tests/Makefile.am index 00c2baba..30c67288 100644 --- a/buildtools/lib/parsers/autotools/tests/Makefile.am +++ b/buildtools/lib/parsers/autotools/tests/Makefile.am @@ -13,9 +13,9 @@ METASOURCES = AUTO check_PROGRAMS = runner viewer runner_LDFLAGS = $(all_libraries) $(LIB_TDECORE) $(KDE_RPATH) -runner_LDADD = $(top_builddir)/buildtools/lib/parsers/autotools/libtdevautotoolsparser.la +runner_LDADD = $(top_builddir)/buildtools/lib/parsers/autotools/libkdevautotoolsparser.la runner_SOURCES = runner.cpp viewer_LDFLAGS = $(all_libraries) $(LIB_TDECORE) $(KDE_RPATH) -viewer_LDADD = $(top_builddir)/buildtools/lib/parsers/autotools/libtdevautotoolsparser.la +viewer_LDADD = $(top_builddir)/buildtools/lib/parsers/autotools/libkdevautotoolsparser.la viewer_SOURCES = viewer.cpp viewer_main.cpp viewerbase.ui diff --git a/buildtools/lib/parsers/qmake/CMakeLists.txt b/buildtools/lib/parsers/qmake/CMakeLists.txt index 6ffebfa6..b8328a84 100644 --- a/buildtools/lib/parsers/qmake/CMakeLists.txt +++ b/buildtools/lib/parsers/qmake/CMakeLists.txt @@ -27,9 +27,9 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/buildtools/parsers/qmake ) -##### tdevqmakeparser (shared) ################## +##### kdevqmakeparser (shared) ################## -tde_add_library( tdevqmakeparser SHARED +tde_add_library( kdevqmakeparser SHARED SOURCES qmake_lex.cpp qmake_yacc.cpp qmakeast.cpp qmakeastvisitor.cpp qmakedriver.cpp diff --git a/buildtools/lib/parsers/qmake/Makefile.am b/buildtools/lib/parsers/qmake/Makefile.am index 9e14382a..ff3f175b 100644 --- a/buildtools/lib/parsers/qmake/Makefile.am +++ b/buildtools/lib/parsers/qmake/Makefile.am @@ -8,9 +8,9 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets/propeditor \ $(all_includes) METASOURCES = AUTO -lib_LTLIBRARIES = libtdevqmakeparser.la -libtdevqmakeparser_la_LDFLAGS = -no-undefined $(all_libraries) $(LIB_TDEIO) -libtdevqmakeparser_la_SOURCES = qmake_lex.cpp qmake_yacc.cpp qmakeast.cpp \ +lib_LTLIBRARIES = libkdevqmakeparser.la +libkdevqmakeparser_la_LDFLAGS = -no-undefined $(all_libraries) $(LIB_TDEIO) +libkdevqmakeparser_la_SOURCES = qmake_lex.cpp qmake_yacc.cpp qmakeast.cpp \ qmakeastvisitor.cpp qmakedriver.cpp tdevelopbuildtoolsincludedir = $(includedir)/tdevelop/buildtools/parsers/qmake @@ -24,8 +24,8 @@ parser: EXTRA_DIST = qmake.yy qmake.ll DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils -DOXYGEN_PROJECTNAME = TDevelop QMake parser -DOXYGEN_DOCDIRPREFIX = tdevparser +DOXYGEN_PROJECTNAME = KDevelop QMake parser +DOXYGEN_DOCDIRPREFIX = kdevparser include ../../../../Doxyfile.am noinst_HEADERS = qmake.ll qmake.yy qmake_lex.h diff --git a/buildtools/lib/parsers/qmake/tests/Makefile.am b/buildtools/lib/parsers/qmake/tests/Makefile.am index 74935269..e1932f7e 100644 --- a/buildtools/lib/parsers/qmake/tests/Makefile.am +++ b/buildtools/lib/parsers/qmake/tests/Makefile.am @@ -13,9 +13,9 @@ METASOURCES = AUTO noinst_PROGRAMS = runner viewer runner_LDFLAGS = $(all_libraries) $(LIB_TDECORE) $(KDE_RPATH) -runner_LDADD = $(top_builddir)/buildtools/lib/parsers/qmake/libtdevqmakeparser.la +runner_LDADD = $(top_builddir)/buildtools/lib/parsers/qmake/libkdevqmakeparser.la runner_SOURCES = runner.cpp viewer_LDFLAGS = --no-undefined $(all_libraries) $(LIB_TDECORE) $(KDE_RPATH) -viewer_LDADD = $(top_builddir)/buildtools/lib/parsers/qmake/libtdevqmakeparser.la +viewer_LDADD = $(top_builddir)/buildtools/lib/parsers/qmake/libkdevqmakeparser.la viewer_SOURCES = viewer.cpp viewer_main.cpp viewerbase.ui diff --git a/buildtools/lib/widgets/CMakeLists.txt b/buildtools/lib/widgets/CMakeLists.txt index 0349f6d3..d86d0c66 100644 --- a/buildtools/lib/widgets/CMakeLists.txt +++ b/buildtools/lib/widgets/CMakeLists.txt @@ -36,9 +36,9 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/buildtools/widgets ) -##### tdevbuildtoolswidgets (shared) ############ +##### kdevbuildtoolswidgets (shared) ############ -tde_add_library( tdevbuildtoolswidgets SHARED AUTOMOC +tde_add_library( kdevbuildtoolswidgets SHARED AUTOMOC SOURCES addenvvardlg.cpp addfilesdialog.cpp environmentdisplaydialog.cpp diff --git a/buildtools/lib/widgets/Makefile.am b/buildtools/lib/widgets/Makefile.am index 718bbb04..6042ea06 100644 --- a/buildtools/lib/widgets/Makefile.am +++ b/buildtools/lib/widgets/Makefile.am @@ -5,11 +5,11 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/widgets/propeditor $(all_includes) -lib_LTLIBRARIES = libtdevbuildtoolswidgets.la -libtdevbuildtoolswidgets_la_LDFLAGS = $(all_libraries) -libtdevbuildtoolswidgets_la_LIBADD = $(top_builddir)/lib/interfaces/libtdevinterfaces.la \ +lib_LTLIBRARIES = libkdevbuildtoolswidgets.la +libkdevbuildtoolswidgets_la_LDFLAGS = $(all_libraries) +libkdevbuildtoolswidgets_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la \ $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEIO) -ltdetexteditor -libtdevbuildtoolswidgets_la_SOURCES = addenvvardlg.cpp addfilesdialog.cpp \ +libkdevbuildtoolswidgets_la_SOURCES = addenvvardlg.cpp addfilesdialog.cpp \ environmentdisplaydialog.cpp environmentdisplaydialogbase.ui environmentvariableswidget.cpp \ environmentvariableswidgetbase.ui envvartools.cpp makeoptionswidget.cpp makeoptionswidgetbase.ui \ removesubprojectdialog.cpp removesubprojectdlgbase.ui runoptionswidget.cpp runoptionswidgetbase.ui \ @@ -23,8 +23,8 @@ tdevelopbuildtoolsinclude_HEADERS = addenvvardlg.h addfilesdialog.h \ makeoptionswidgetbase.h removesubprojectdialog.h removesubprojectdlgbase.h runoptionswidget.h \ runoptionswidgetbase.h subclassesdlg.h subclassesdlgbase.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces tdevutil -DOXYGEN_PROJECTNAME = TDevelop Buildtool Widgets Library -DOXYGEN_DOCDIRPREFIX = tdevbt +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces kdevutil +DOXYGEN_PROJECTNAME = KDevelop Buildtool Widgets Library +DOXYGEN_DOCDIRPREFIX = kdevbt include ../../../Doxyfile.am noinst_HEADERS = environmentdisplaydialog.h diff --git a/buildtools/pascal/CMakeLists.txt b/buildtools/pascal/CMakeLists.txt index f43f27b2..b10a6bec 100644 --- a/buildtools/pascal/CMakeLists.txt +++ b/buildtools/pascal/CMakeLists.txt @@ -30,17 +30,17 @@ link_directories( ##### other data ################################ -install( FILES tdevpascalproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpascalproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevpascalproject ) +install( FILES kdevpascalproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpascalproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevpascalproject ) -##### libtdevpascalproject (module) ############# +##### libkdevpascalproject (module) ############# -tde_add_kpart( libtdevpascalproject AUTOMOC +tde_add_kpart( libkdevpascalproject AUTOMOC SOURCES pascalproject_part.cpp pascalproject_widget.cpp pascalproject_optionsdlgbase.ui pascalprojectoptionsdlg.cpp pascalglobaloptionsdlg.cpp service.cpp - LINK tdevbuildbase-shared tdevbuildtoolswidgets-shared + LINK kdevbuildbase-shared kdevbuildtoolswidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/pascal/Makefile.am b/buildtools/pascal/Makefile.am index f822bd6d..9bf4fc90 100644 --- a/buildtools/pascal/Makefile.am +++ b/buildtools/pascal/Makefile.am @@ -4,20 +4,20 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base \ -I$(top_srcdir)/lib/interfaces/extras -I$(top_srcdir)/lib/util -I$(top_builddir)/buildtools/lib/widgets \ $(all_includes) -kde_module_LTLIBRARIES = libtdevpascalproject.la -libtdevpascalproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevpascalproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la +kde_module_LTLIBRARIES = libkdevpascalproject.la +libkdevpascalproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevpascalproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la -libtdevpascalproject_la_SOURCES = pascalproject_part.cpp pascalproject_widget.cpp pascalproject_optionsdlgbase.ui pascalprojectoptionsdlg.cpp pascalglobaloptionsdlg.cpp service.cpp +libkdevpascalproject_la_SOURCES = pascalproject_part.cpp pascalproject_widget.cpp pascalproject_optionsdlgbase.ui pascalprojectoptionsdlg.cpp pascalglobaloptionsdlg.cpp service.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevpascalproject.desktop +service_DATA = kdevpascalproject.desktop -rcdir = $(kde_datadir)/tdevpascalproject -rc_DATA = tdevpascalproject.rc +rcdir = $(kde_datadir)/kdevpascalproject +rc_DATA = kdevpascalproject.rc diff --git a/buildtools/pascal/kdevpascalproject.desktop b/buildtools/pascal/kdevpascalproject.desktop new file mode 100644 index 00000000..cde3c21d --- /dev/null +++ b/buildtools/pascal/kdevpascalproject.desktop @@ -0,0 +1,93 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Pascal Project +Comment[br]=Raktres Pascal +Comment[ca]=Projecte Pascal +Comment[da]=Pascal projekt +Comment[de]=Pascal-Projekt für TDevelop +Comment[el]=Έργο Pascal +Comment[es]=Proyecto de Pascal +Comment[et]=Pascali projekt +Comment[eu]=Pascal proiektua +Comment[fa]=پروژۀ پاسکال +Comment[fr]=Projet en langage PASCAL +Comment[ga]=Tionscadal Pascal +Comment[gl]=Proxecto Pascal +Comment[hi]=पास्कल परियोजना +Comment[hu]=Pascal-projekt +Comment[is]=Pascal verkefni +Comment[it]=Progetto per Pascal +Comment[ja]=Pascal プロジェクト +Comment[ms]=Projek Pascal +Comment[nds]=Pascal-Projekt +Comment[ne]=पास्कल परियोजना +Comment[nl]=Pascal-project +Comment[pa]=ਪਾਸਕਲ ਪ੍ਰੋਜੈਕਟ +Comment[pl]=Projekt: Pascal +Comment[pt]=Projecto de Pascal +Comment[pt_BR]=Projeto Pascal +Comment[ru]=Проект Pascal +Comment[sk]=Pascal projekt +Comment[sl]=Projekt Pascal +Comment[sr]=Pascal пројекат +Comment[sr@Latn]=Pascal projekat +Comment[sv]=Pascal-projekt +Comment[ta]=பாஸ்கல் பிராஜக்ட் +Comment[tg]=Лоиҳаи Pascal +Comment[tr]=Pascal Projesi +Comment[uz]=Pascal loyihasi +Comment[uz@cyrillic]=Pascal лойиҳаси +Comment[zh_CN]=Pascal 工程 +Comment[zh_TW]=Pascal 專案 +Name=KDevPascalProject +Name[da]=TDevelop Pascal-projekt +Name[de]=Pascal-Projekt (TDevelop) +Name[hi]=के-डेव-पास्कल-परियोजना +Name[nds]=Pascal-Projekt (TDevelop) +Name[ne]=केडीई विकास पास्कल परियोजना +Name[pl]=KDevProjektPascal +Name[sk]=KDevPascalProjekt +Name[sv]=TDevelop Pascal-projekt +Name[ta]=கெடெவ் பாஸ்கல் பிராஜக்ட் +Name[tg]=Лоиҳаи ПаскалKDev +Name[zh_TW]=TDevelop Pascal 專案 +GenericName=Pascal Project +GenericName[br]=Raktres Pascal +GenericName[ca]=Projecte Pascal +GenericName[da]=Pascal projekt +GenericName[de]=Pascal-Projekt +GenericName[el]=Έργο Pascal +GenericName[es]=Proyecto de Pascal +GenericName[et]=Pascali projekt +GenericName[eu]=Pascal proiektua +GenericName[fa]=پروژۀ پاسکال +GenericName[fr]=Projet en langage PASCAL +GenericName[ga]=Tionscadal Pascal +GenericName[gl]=Proxecto Pascal +GenericName[hi]=पास्कल परियोजना +GenericName[hu]=Pascal-projekt +GenericName[it]=Progetto in Pascal +GenericName[ja]=Pascal プロジェクト +GenericName[ms]=Projek Pascal +GenericName[nds]=Pascal-Projekt +GenericName[ne]=पास्कल परियोजना +GenericName[nl]=Pascal-project +GenericName[pl]=Projekt: Pascal +GenericName[pt]=Projecto de Pascal +GenericName[pt_BR]=Projeto Pascal +GenericName[ru]=Проект Pascal +GenericName[sk]=Pascal projekt +GenericName[sl]=Projekt Pascal +GenericName[sr]=Pascal пројекат +GenericName[sr@Latn]=Pascal projekat +GenericName[sv]=Pascal-projekt +GenericName[ta]=பாஸ்கல் பிராஜக்ட் +GenericName[tr]=Pascal Projesi +GenericName[uz]=Pascal loyihasi +GenericName[uz@cyrillic]=Pascal лойиҳаси +GenericName[zh_CN]=Pascal 工程 +GenericName[zh_TW]=Pascal 專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevpascalproject +X-TDevelop-Version=5 diff --git a/buildtools/pascal/kdevpascalproject.rc b/buildtools/pascal/kdevpascalproject.rc new file mode 100644 index 00000000..9e7f46fd --- /dev/null +++ b/buildtools/pascal/kdevpascalproject.rc @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/buildtools/pascal/pascalglobaloptionsdlg.cpp b/buildtools/pascal/pascalglobaloptionsdlg.cpp index b55ae62f..ccbf8dc1 100644 --- a/buildtools/pascal/pascalglobaloptionsdlg.cpp +++ b/buildtools/pascal/pascalglobaloptionsdlg.cpp @@ -17,7 +17,7 @@ #include #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" #include "service.h" #include "pascalproject_part.h" @@ -64,7 +64,7 @@ PascalGlobalOptionsDlg::~PascalGlobalOptionsDlg() void PascalGlobalOptionsDlg::optionsButtonClicked() { TQString name = ServiceComboBox::currentText(compiler_box, service_names); - TDevCompilerOptions *plugin = m_part->createCompilerOptions(name); + KDevCompilerOptions *plugin = m_part->createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, options_edit->text()); diff --git a/buildtools/pascal/pascalproject_part.cpp b/buildtools/pascal/pascalproject_part.cpp index 42864e23..01b0734a 100644 --- a/buildtools/pascal/pascalproject_part.cpp +++ b/buildtools/pascal/pascalproject_part.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,13 +32,13 @@ #include #include "domutil.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevmakefrontend.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" -#include "tdevlanguagesupport.h" -#include "tdevcompileroptions.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevmakefrontend.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" +#include "kdevlanguagesupport.h" +#include "kdevcompileroptions.h" #include "runoptionswidget.h" #include "envvartools.h" @@ -46,17 +46,17 @@ #include "pascalprojectoptionsdlg.h" #include "pascalglobaloptionsdlg.h" -#include +#include -typedef TDevGenericFactory PascalProjectFactory; -static const TDevPluginInfo data("tdevpascalproject"); -K_EXPORT_COMPONENT_FACTORY( libtdevpascalproject, PascalProjectFactory( data ) ) +typedef KDevGenericFactory PascalProjectFactory; +static const KDevPluginInfo data("kdevpascalproject"); +K_EXPORT_COMPONENT_FACTORY( libkdevpascalproject, PascalProjectFactory( data ) ) PascalProjectPart::PascalProjectPart(TQObject *parent, const char *name, const TQStringList& ) - :TDevBuildTool(&data, parent, name ? name : "PascalProjectPart" ) + :KDevBuildTool(&data, parent, name ? name : "PascalProjectPart" ) { setInstance(PascalProjectFactory::instance()); - setXMLFile("tdevpascalproject.rc"); + setXMLFile("kdevpascalproject.rc"); TDEAction *action; action = new TDEAction( i18n("&Build Project"), "make_tdevelop", Key_F8, @@ -82,7 +82,7 @@ PascalProjectPart::PascalProjectPart(TQObject *parent, const char *name, const T // TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); - // now you decide what should happen to the widget. Take a look at tdevcore.h + // now you decide what should happen to the widget. Take a look at kdevcore.h // or at other plugins how to embed it. // if you want to embed your widget as an outputview, simply uncomment @@ -172,7 +172,7 @@ void PascalProjectPart::openProject(const TQString &dirName, const TQString &pro } } while (!s.isEmpty()); - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } void PascalProjectPart::closeProject() @@ -197,7 +197,7 @@ DomUtil::PairList PascalProjectPart::runEnvironmentVars() const */ TQString PascalProjectPart::runDirectory() const { - TQString cwd = defaultRunDirectory("tdevpascalproject"); + TQString cwd = defaultRunDirectory("kdevpascalproject"); if (cwd.isEmpty()) cwd = buildDirectory(); return cwd; @@ -384,12 +384,12 @@ void PascalProjectPart::slotExecute() void PascalProjectPart::changedFiles( const TQStringList & fileList ) { - TDevProject::changedFiles(fileList); + KDevProject::changedFiles(fileList); } void PascalProjectPart::changedFile( const TQString & fileName ) { - TDevProject::changedFile(fileName); + KDevProject::changedFile(fileName); } void PascalProjectPart::projectConfigWidget( KDialogBase * dlg ) @@ -436,7 +436,7 @@ void PascalProjectPart::configWidget( KDialogBase * dlg ) connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) ); } -TDevCompilerOptions *PascalProjectPart::createCompilerOptions(const TQString &name) +KDevCompilerOptions *PascalProjectPart::createCompilerOptions(const TQString &name) { KService::Ptr service = KService::serviceByDesktopName(name); if (!service) { @@ -458,13 +458,13 @@ TDevCompilerOptions *PascalProjectPart::createCompilerOptions(const TQString &na args = TQStringList::split(" ", prop.toString()); TQObject *obj = factory->create(this, service->name().latin1(), - "TDevCompilerOptions", args); + "KDevCompilerOptions", args); - if (!obj->inherits("TDevCompilerOptions")) { - kdDebug() << "Component does not inherit TDevCompilerOptions" << endl; + if (!obj->inherits("KDevCompilerOptions")) { + kdDebug() << "Component does not inherit KDevCompilerOptions" << endl; return 0; } - TDevCompilerOptions *dlg = (TDevCompilerOptions*) obj; + KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj; return dlg; } diff --git a/buildtools/pascal/pascalproject_part.h b/buildtools/pascal/pascalproject_part.h index 8f46817b..54d09b2e 100644 --- a/buildtools/pascal/pascalproject_part.h +++ b/buildtools/pascal/pascalproject_part.h @@ -8,18 +8,18 @@ * (at your option) any later version. * * * ***************************************************************************/ -#ifndef __TDEVPART_PASCALPROJECT_H__ -#define __TDEVPART_PASCALPROJECT_H__ +#ifndef __KDEVPART_PASCALPROJECT_H__ +#define __KDEVPART_PASCALPROJECT_H__ #include -#include "tdevbuildtool.h" +#include "kdevbuildtool.h" class PascalProjectWidget; class KDialogBase; -class TDevCompilerOptions; +class KDevCompilerOptions; -class PascalProjectPart : public TDevBuildTool +class PascalProjectPart : public KDevBuildTool { Q_OBJECT @@ -61,7 +61,7 @@ public: virtual void changedFiles( const TQStringList & fileList ); virtual void changedFile( const TQString & fileName ); - TDevCompilerOptions *createCompilerOptions(const TQString &name); + KDevCompilerOptions *createCompilerOptions(const TQString &name); virtual TQString defaultOptions(const TQString compiler) const; TQStringList distFiles() const; diff --git a/buildtools/pascal/pascalproject_widget.cpp b/buildtools/pascal/pascalproject_widget.cpp index 9ce95c47..a8671023 100644 --- a/buildtools/pascal/pascalproject_widget.cpp +++ b/buildtools/pascal/pascalproject_widget.cpp @@ -4,7 +4,7 @@ #include -#include +#include #include "pascalproject_part.h" diff --git a/buildtools/pascal/pascalproject_widget.h b/buildtools/pascal/pascalproject_widget.h index 5e104856..252c7500 100644 --- a/buildtools/pascal/pascalproject_widget.h +++ b/buildtools/pascal/pascalproject_widget.h @@ -6,7 +6,7 @@ #include -class TDevProject; +class KDevProject; class PascalProjectPart; diff --git a/buildtools/pascal/pascalprojectoptionsdlg.cpp b/buildtools/pascal/pascalprojectoptionsdlg.cpp index 1593656a..9c7c2518 100644 --- a/buildtools/pascal/pascalprojectoptionsdlg.cpp +++ b/buildtools/pascal/pascalprojectoptionsdlg.cpp @@ -20,7 +20,7 @@ #include #include "domutil.h" -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" #include "service.h" #include "pascalproject_part.h" @@ -59,7 +59,7 @@ TQStringList PascalProjectOptionsDlg::allBuildConfigs() TQStringList allConfigs; allConfigs.append("default"); - TQDomNode node = dom.documentElement().namedItem("tdevpascalproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevpascalproject").namedItem("configurations"); TQDomElement childEl = node.firstChild().toElement(); while (!childEl.isNull()) { TQString config = childEl.tagName(); @@ -173,7 +173,7 @@ void PascalProjectOptionsDlg::configRemoved() TQString config = config_combo->currentText(); TQDomDocument dom = *m_part->projectDom(); - TQDomNode node = dom.documentElement().namedItem("tdevpascalproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevpascalproject").namedItem("configurations"); node.removeChild(node.namedItem(config)); allConfigs.remove(config); @@ -187,7 +187,7 @@ void PascalProjectOptionsDlg::configRemoved() void PascalProjectOptionsDlg::optionsButtonClicked( ) { TQString name = ServiceComboBox::currentText(compiler_box, service_names); - TDevCompilerOptions *plugin = m_part->createCompilerOptions(name); + KDevCompilerOptions *plugin = m_part->createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, options_edit->text()); diff --git a/buildtools/pascal/pascalprojectoptionsdlg.h b/buildtools/pascal/pascalprojectoptionsdlg.h index c641faf3..acedb14d 100644 --- a/buildtools/pascal/pascalprojectoptionsdlg.h +++ b/buildtools/pascal/pascalprojectoptionsdlg.h @@ -16,7 +16,7 @@ #include "pascalproject_optionsdlgbase.h" class PascalProjectPart; -class TDevCompilerOptions; +class KDevCompilerOptions; class PascalProjectOptionsDlg : public PascalProjectOptionsDlgBase { diff --git a/buildtools/pascal/tdevpascalproject.desktop b/buildtools/pascal/tdevpascalproject.desktop deleted file mode 100644 index 36143f24..00000000 --- a/buildtools/pascal/tdevpascalproject.desktop +++ /dev/null @@ -1,93 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Pascal Project -Comment[br]=Raktres Pascal -Comment[ca]=Projecte Pascal -Comment[da]=Pascal projekt -Comment[de]=Pascal-Projekt für TDevelop -Comment[el]=Έργο Pascal -Comment[es]=Proyecto de Pascal -Comment[et]=Pascali projekt -Comment[eu]=Pascal proiektua -Comment[fa]=پروژۀ پاسکال -Comment[fr]=Projet en langage PASCAL -Comment[ga]=Tionscadal Pascal -Comment[gl]=Proxecto Pascal -Comment[hi]=पास्कल परियोजना -Comment[hu]=Pascal-projekt -Comment[is]=Pascal verkefni -Comment[it]=Progetto per Pascal -Comment[ja]=Pascal プロジェクト -Comment[ms]=Projek Pascal -Comment[nds]=Pascal-Projekt -Comment[ne]=पास्कल परियोजना -Comment[nl]=Pascal-project -Comment[pa]=ਪਾਸਕਲ ਪ੍ਰੋਜੈਕਟ -Comment[pl]=Projekt: Pascal -Comment[pt]=Projecto de Pascal -Comment[pt_BR]=Projeto Pascal -Comment[ru]=Проект Pascal -Comment[sk]=Pascal projekt -Comment[sl]=Projekt Pascal -Comment[sr]=Pascal пројекат -Comment[sr@Latn]=Pascal projekat -Comment[sv]=Pascal-projekt -Comment[ta]=பாஸ்கல் பிராஜக்ட் -Comment[tg]=Лоиҳаи Pascal -Comment[tr]=Pascal Projesi -Comment[uz]=Pascal loyihasi -Comment[uz@cyrillic]=Pascal лойиҳаси -Comment[zh_CN]=Pascal 工程 -Comment[zh_TW]=Pascal 專案 -Name=KDevPascalProject -Name[da]=TDevelop Pascal-projekt -Name[de]=Pascal-Projekt (TDevelop) -Name[hi]=के-डेव-पास्कल-परियोजना -Name[nds]=Pascal-Projekt (TDevelop) -Name[ne]=केडीई विकास पास्कल परियोजना -Name[pl]=KDevProjektPascal -Name[sk]=KDevPascalProjekt -Name[sv]=TDevelop Pascal-projekt -Name[ta]=கெடெவ் பாஸ்கல் பிராஜக்ட் -Name[tg]=Лоиҳаи ПаскалKDev -Name[zh_TW]=TDevelop Pascal 專案 -GenericName=Pascal Project -GenericName[br]=Raktres Pascal -GenericName[ca]=Projecte Pascal -GenericName[da]=Pascal projekt -GenericName[de]=Pascal-Projekt -GenericName[el]=Έργο Pascal -GenericName[es]=Proyecto de Pascal -GenericName[et]=Pascali projekt -GenericName[eu]=Pascal proiektua -GenericName[fa]=پروژۀ پاسکال -GenericName[fr]=Projet en langage PASCAL -GenericName[ga]=Tionscadal Pascal -GenericName[gl]=Proxecto Pascal -GenericName[hi]=पास्कल परियोजना -GenericName[hu]=Pascal-projekt -GenericName[it]=Progetto in Pascal -GenericName[ja]=Pascal プロジェクト -GenericName[ms]=Projek Pascal -GenericName[nds]=Pascal-Projekt -GenericName[ne]=पास्कल परियोजना -GenericName[nl]=Pascal-project -GenericName[pl]=Projekt: Pascal -GenericName[pt]=Projecto de Pascal -GenericName[pt_BR]=Projeto Pascal -GenericName[ru]=Проект Pascal -GenericName[sk]=Pascal projekt -GenericName[sl]=Projekt Pascal -GenericName[sr]=Pascal пројекат -GenericName[sr@Latn]=Pascal projekat -GenericName[sv]=Pascal-projekt -GenericName[ta]=பாஸ்கல் பிராஜக்ட் -GenericName[tr]=Pascal Projesi -GenericName[uz]=Pascal loyihasi -GenericName[uz@cyrillic]=Pascal лойиҳаси -GenericName[zh_CN]=Pascal 工程 -GenericName[zh_TW]=Pascal 專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevpascalproject -X-TDevelop-Version=5 diff --git a/buildtools/pascal/tdevpascalproject.rc b/buildtools/pascal/tdevpascalproject.rc deleted file mode 100644 index 9e7f46fd..00000000 --- a/buildtools/pascal/tdevpascalproject.rc +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/buildtools/qmake/CMakeLists.txt b/buildtools/qmake/CMakeLists.txt index e2b877f5..fa281096 100644 --- a/buildtools/qmake/CMakeLists.txt +++ b/buildtools/qmake/CMakeLists.txt @@ -31,13 +31,13 @@ link_directories( ##### other data ################################ -install( FILES tdevtrollproject.desktop tdevtmakeproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevtrollproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevtrollproject ) +install( FILES kdevtrollproject.desktop kdevtmakeproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevtrollproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevtrollproject ) -##### libtdevtrollproject (module) ############## +##### libkdevtrollproject (module) ############## -tde_add_kpart( libtdevtrollproject AUTOMOC +tde_add_kpart( libkdevtrollproject AUTOMOC SOURCES choosesubprojectdlg.cpp choosesubprojectdlgbase.ui createscopedlg.cpp createscopedlgbase.ui @@ -48,6 +48,6 @@ tde_add_kpart( libtdevtrollproject AUTOMOC qmakeoptionswidgetbase.ui qmakescopeitem.cpp scope.cpp trolllistview.cpp trollprojectpart.cpp trollprojectwidget.cpp - LINK tdevqmakeparser-shared tdevbuildbase-shared tdevbuildtoolswidgets-shared + LINK kdevqmakeparser-shared kdevbuildbase-shared kdevbuildtoolswidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/qmake/Makefile.am b/buildtools/qmake/Makefile.am index 68adba76..b50fc775 100644 --- a/buildtools/qmake/Makefile.am +++ b/buildtools/qmake/Makefile.am @@ -8,14 +8,14 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base \ -I$(top_builddir)/buildtools/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevtrollproject.la -libtdevtrollproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevtrollproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/util/libtdevutil.la $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la \ - $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la \ - $(top_builddir)/buildtools/lib/parsers/qmake/libtdevqmakeparser.la - -libtdevtrollproject_la_SOURCES = choosesubprojectdlg.cpp \ +kde_module_LTLIBRARIES = libkdevtrollproject.la +libkdevtrollproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevtrollproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/util/libkdevutil.la $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la \ + $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la \ + $(top_builddir)/buildtools/lib/parsers/qmake/libkdevqmakeparser.la + +libkdevtrollproject_la_SOURCES = choosesubprojectdlg.cpp \ choosesubprojectdlgbase.ui createscopedlg.cpp createscopedlgbase.ui disablesubprojectdlg.cpp \ disablesubprojectdlgbase.ui newwidgetdlg.cpp newwidgetdlgbase.ui \ projectconfigurationdlg.cpp projectconfigurationdlgbase.ui qmakedefaultopts.cpp \ @@ -26,9 +26,9 @@ libtdevtrollproject_la_SOURCES = choosesubprojectdlg.cpp \ METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevtrollproject.desktop tdevtmakeproject.desktop +service_DATA = kdevtrollproject.desktop kdevtmakeproject.desktop -rcdir = $(kde_datadir)/tdevtrollproject -rc_DATA = tdevtrollproject.rc +rcdir = $(kde_datadir)/kdevtrollproject +rc_DATA = kdevtrollproject.rc noinst_HEADERS = createscopedlg.h disablesubprojectdlg.h qmakedefaultopts.h \ qmakeoptionswidget.h qmakescopeitem.h trolllistview.h diff --git a/buildtools/qmake/kdevtmakeproject.desktop b/buildtools/qmake/kdevtmakeproject.desktop new file mode 100644 index 00000000..97b4b528 --- /dev/null +++ b/buildtools/qmake/kdevtmakeproject.desktop @@ -0,0 +1,91 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=TMake Project +Comment[br]=Rektras TMake +Comment[ca]=Projecte TMake +Comment[da]=TMake-projekt +Comment[de]=TMake-Projekt für TDevelop +Comment[el]=Έργο TMake +Comment[es]=Proyecto TMake +Comment[et]=TMake projekt +Comment[eu]=TMake proiektua +Comment[fa]=پروژۀ TMake +Comment[fr]=Projet avec TMake +Comment[ga]=Comhad tionscadail TMake +Comment[gl]=Proxecto TMake +Comment[hi]=टी-मेक परियोजना +Comment[hu]=TMake-projekt +Comment[is]=TMake verkefni +Comment[it]=Progetto per TMake +Comment[ja]=TMake プロジェクト +Comment[ms]=Projek TMake +Comment[nds]=TMake-Projekt +Comment[ne]=TMake परियोजना +Comment[nl]=TMake-project +Comment[pl]=Projekt: TMake +Comment[pt]=Projecto TMake +Comment[pt_BR]=Projeto TMake +Comment[ru]=Проект TMake +Comment[sk]=TMake projekt +Comment[sl]=Projekt TMake +Comment[sr]=TMake пројекат +Comment[sr@Latn]=TMake projekat +Comment[sv]=Tmake-projekt +Comment[ta]=டிமேக் பிராஜக்ட் +Comment[tg]=Лоиҳаи TMake +Comment[tr]=TMake Projesi +Comment[zh_CN]=TMake 工程 +Comment[zh_TW]=TMake 專案 +Name=KDevTMakeProject +Name[da]=TDevelop TMake-projekt +Name[de]=TMake-Projekt (TDevelop) +Name[hi]=के-डेव-टी-मेक-परियोजना +Name[nds]=TMake-Projekt (TDevelop) +Name[ne]=KDevTMake परियोजना +Name[pl]=KDevProjektTMake +Name[sk]=KDevTMakeProjekt +Name[sv]=TDevelop Tmake-projekt +Name[ta]=கெடெவ் டிமேக் பிராஜக்ட் +Name[tg]=KDevTСохтани лоиҳа +Name[zh_TW]=TDevelop TMake 專案 +GenericName=TMake Project +GenericName[br]=Raktres TMake +GenericName[ca]=Projecte TMake +GenericName[da]=TMake-projekt +GenericName[de]=TMake-Projekt +GenericName[el]=Έργο TMake +GenericName[es]=Proyecto TMake +GenericName[et]=TMake projekt +GenericName[eu]=TMake proiektua +GenericName[fa]=پروژۀ TMake +GenericName[fr]=Projet avec TMake +GenericName[ga]=Tionscadal TMake +GenericName[gl]=Proxecto TMake +GenericName[hi]=टी-मेक परियोजना +GenericName[hu]=TMake-projekt +GenericName[it]=Progetto per TMake +GenericName[ja]=TMake プロジェクト +GenericName[ms]=Projek TMake +GenericName[nds]=TMake-Projekt +GenericName[ne]=TMake परियोजना +GenericName[nl]=TMake-project +GenericName[pl]=Projekt: TMake +GenericName[pt]=Projecto TMake +GenericName[pt_BR]=Projeto TMake +GenericName[ru]=Проект TMake +GenericName[sk]=TMake projekt +GenericName[sl]=Projekt TMake +GenericName[sr]=TMake пројекат +GenericName[sr@Latn]=TMake projekat +GenericName[sv]=Tmake-projekt +GenericName[ta]=டிமேக் பிராஜக்ட் +GenericName[tg]=Лоиҳаи TMake +GenericName[tr]=TMake Projesi +GenericName[zh_CN]=TMake 工程 +GenericName[zh_TW]=TMake 專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevtrollproject +X-TDevelop-Version=5 +X-TDevelop-Args=TMake + diff --git a/buildtools/qmake/kdevtrollproject.desktop b/buildtools/qmake/kdevtrollproject.desktop new file mode 100644 index 00000000..bf118c56 --- /dev/null +++ b/buildtools/qmake/kdevtrollproject.desktop @@ -0,0 +1,95 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=QMake Project +Comment[br]=Raktres QMake +Comment[ca]=Projecte QMake +Comment[da]=QMake-projekt +Comment[de]=QMake-Projekt für TDevelop +Comment[el]=Έργο QMake +Comment[es]=Proyecto QMake +Comment[et]=QMake projekt +Comment[eu]=QMake proiektua +Comment[fa]=پروژۀ QMake +Comment[fr]=Projet avec QMake +Comment[ga]=Tionscadal QMake +Comment[gl]=Proxecto QMake +Comment[hi]=क्यू-मेक परियोजना +Comment[hu]=QMake-projekt +Comment[is]=QMake verkefni +Comment[it]=Progetto per QMake +Comment[ja]=QMake プロジェクト +Comment[ms]=Projek QMake +Comment[nds]=QMake-Projekt +Comment[ne]=QMake परियोजना +Comment[nl]=QMake-project +Comment[pa]=QMake ਪ੍ਰੋਜੈਕਟ +Comment[pl]=Projekt: QMake +Comment[pt]=Projecto QMake +Comment[pt_BR]=Projeto QMake +Comment[ru]=Проект QMake +Comment[sk]=QMake projekt +Comment[sl]=Projekt QMake +Comment[sr]=QMake пројекат +Comment[sr@Latn]=QMake projekat +Comment[sv]=Qmake-projekt +Comment[ta]=க்யுமேக் பிராஜக்ட் +Comment[tg]=Лоиҳаи QMake +Comment[tr]=QMake Projesi +Comment[uz]=QMake loyihasi +Comment[uz@cyrillic]=QMake лойиҳаси +Comment[zh_CN]=QMake 工程 +Comment[zh_TW]=QMake 專案 +Name=KDevTrollProject +Name[da]=TDevelop Troll-projekt +Name[de]=QMake-Projekt (TDevelop) +Name[hi]=के-डेव-ट्रॉल-परियोजना +Name[nds]=QMake-Projekt (TDevelop) +Name[ne]=KDevTroll परियोजना +Name[pl]=KDevProjektTroll +Name[sk]=KDevTrollProjekt +Name[sv]=TDevelop Troll-projekt +Name[ta]=கெடெவ் டிரால் பிராஜக்ட் +Name[zh_TW]=TDevelop Troll 專案 +GenericName=QMake Project +GenericName[br]=Raktres QMake +GenericName[ca]=Projecte QMake +GenericName[da]=QMake-projekt +GenericName[de]=QMake-Projekt +GenericName[el]=Έργο QMake +GenericName[es]=Proyecto QMake +GenericName[et]=QMake projekt +GenericName[eu]=QMake proiektua +GenericName[fa]=پروژۀ QMake +GenericName[fr]=Projet avec QMake +GenericName[ga]=Tionscadal QMake +GenericName[gl]=Proxecto QMake +GenericName[hi]=क्यू-मेक परियोजना +GenericName[hu]=QMake-projekt +GenericName[it]=Progetto per QMake +GenericName[ja]=QMake プロジェクト +GenericName[ms]=Projek QMake +GenericName[nds]=QMake-Projekt +GenericName[ne]=QMake परियोजना +GenericName[nl]=QMake-project +GenericName[pa]=QMake ਪ੍ਰੋਜੈਕਟ +GenericName[pl]=Projekt: QMake +GenericName[pt]=Projecto QMake +GenericName[pt_BR]=Projeto QMake +GenericName[ru]=Проект QMake +GenericName[sk]=QMake projekt +GenericName[sl]=Projekt QMake +GenericName[sr]=QMake пројекат +GenericName[sr@Latn]=QMake projekat +GenericName[sv]=Qmake-projekt +GenericName[ta]=க்யுமேக் பிராஜக்ட் +GenericName[tg]=Лоиҳаи QMake +GenericName[tr]=QMake Projesi +GenericName[uz]=QMake loyihasi +GenericName[uz@cyrillic]=QMake лойиҳаси +GenericName[zh_CN]=QMake 工程 +GenericName[zh_TW]=QMake 專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevtrollproject +X-TDevelop-Version=5 +X-TDevelop-Args= diff --git a/buildtools/qmake/kdevtrollproject.rc b/buildtools/qmake/kdevtrollproject.rc new file mode 100644 index 00000000..8f6e0048 --- /dev/null +++ b/buildtools/qmake/kdevtrollproject.rc @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/buildtools/qmake/tdevtmakeproject.desktop b/buildtools/qmake/tdevtmakeproject.desktop deleted file mode 100644 index a5b729d5..00000000 --- a/buildtools/qmake/tdevtmakeproject.desktop +++ /dev/null @@ -1,91 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=TMake Project -Comment[br]=Rektras TMake -Comment[ca]=Projecte TMake -Comment[da]=TMake-projekt -Comment[de]=TMake-Projekt für TDevelop -Comment[el]=Έργο TMake -Comment[es]=Proyecto TMake -Comment[et]=TMake projekt -Comment[eu]=TMake proiektua -Comment[fa]=پروژۀ TMake -Comment[fr]=Projet avec TMake -Comment[ga]=Comhad tionscadail TMake -Comment[gl]=Proxecto TMake -Comment[hi]=टी-मेक परियोजना -Comment[hu]=TMake-projekt -Comment[is]=TMake verkefni -Comment[it]=Progetto per TMake -Comment[ja]=TMake プロジェクト -Comment[ms]=Projek TMake -Comment[nds]=TMake-Projekt -Comment[ne]=TMake परियोजना -Comment[nl]=TMake-project -Comment[pl]=Projekt: TMake -Comment[pt]=Projecto TMake -Comment[pt_BR]=Projeto TMake -Comment[ru]=Проект TMake -Comment[sk]=TMake projekt -Comment[sl]=Projekt TMake -Comment[sr]=TMake пројекат -Comment[sr@Latn]=TMake projekat -Comment[sv]=Tmake-projekt -Comment[ta]=டிமேக் பிராஜக்ட் -Comment[tg]=Лоиҳаи TMake -Comment[tr]=TMake Projesi -Comment[zh_CN]=TMake 工程 -Comment[zh_TW]=TMake 專案 -Name=KDevTMakeProject -Name[da]=TDevelop TMake-projekt -Name[de]=TMake-Projekt (TDevelop) -Name[hi]=के-डेव-टी-मेक-परियोजना -Name[nds]=TMake-Projekt (TDevelop) -Name[ne]=KDevTMake परियोजना -Name[pl]=KDevProjektTMake -Name[sk]=KDevTMakeProjekt -Name[sv]=TDevelop Tmake-projekt -Name[ta]=கெடெவ் டிமேக் பிராஜக்ட் -Name[tg]=KDevTСохтани лоиҳа -Name[zh_TW]=TDevelop TMake 專案 -GenericName=TMake Project -GenericName[br]=Raktres TMake -GenericName[ca]=Projecte TMake -GenericName[da]=TMake-projekt -GenericName[de]=TMake-Projekt -GenericName[el]=Έργο TMake -GenericName[es]=Proyecto TMake -GenericName[et]=TMake projekt -GenericName[eu]=TMake proiektua -GenericName[fa]=پروژۀ TMake -GenericName[fr]=Projet avec TMake -GenericName[ga]=Tionscadal TMake -GenericName[gl]=Proxecto TMake -GenericName[hi]=टी-मेक परियोजना -GenericName[hu]=TMake-projekt -GenericName[it]=Progetto per TMake -GenericName[ja]=TMake プロジェクト -GenericName[ms]=Projek TMake -GenericName[nds]=TMake-Projekt -GenericName[ne]=TMake परियोजना -GenericName[nl]=TMake-project -GenericName[pl]=Projekt: TMake -GenericName[pt]=Projecto TMake -GenericName[pt_BR]=Projeto TMake -GenericName[ru]=Проект TMake -GenericName[sk]=TMake projekt -GenericName[sl]=Projekt TMake -GenericName[sr]=TMake пројекат -GenericName[sr@Latn]=TMake projekat -GenericName[sv]=Tmake-projekt -GenericName[ta]=டிமேக் பிராஜக்ட் -GenericName[tg]=Лоиҳаи TMake -GenericName[tr]=TMake Projesi -GenericName[zh_CN]=TMake 工程 -GenericName[zh_TW]=TMake 專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevtrollproject -X-TDevelop-Version=5 -X-TDevelop-Args=TMake - diff --git a/buildtools/qmake/tdevtrollproject.desktop b/buildtools/qmake/tdevtrollproject.desktop deleted file mode 100644 index 24ef620e..00000000 --- a/buildtools/qmake/tdevtrollproject.desktop +++ /dev/null @@ -1,95 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=QMake Project -Comment[br]=Raktres QMake -Comment[ca]=Projecte QMake -Comment[da]=QMake-projekt -Comment[de]=QMake-Projekt für TDevelop -Comment[el]=Έργο QMake -Comment[es]=Proyecto QMake -Comment[et]=QMake projekt -Comment[eu]=QMake proiektua -Comment[fa]=پروژۀ QMake -Comment[fr]=Projet avec QMake -Comment[ga]=Tionscadal QMake -Comment[gl]=Proxecto QMake -Comment[hi]=क्यू-मेक परियोजना -Comment[hu]=QMake-projekt -Comment[is]=QMake verkefni -Comment[it]=Progetto per QMake -Comment[ja]=QMake プロジェクト -Comment[ms]=Projek QMake -Comment[nds]=QMake-Projekt -Comment[ne]=QMake परियोजना -Comment[nl]=QMake-project -Comment[pa]=QMake ਪ੍ਰੋਜੈਕਟ -Comment[pl]=Projekt: QMake -Comment[pt]=Projecto QMake -Comment[pt_BR]=Projeto QMake -Comment[ru]=Проект QMake -Comment[sk]=QMake projekt -Comment[sl]=Projekt QMake -Comment[sr]=QMake пројекат -Comment[sr@Latn]=QMake projekat -Comment[sv]=Qmake-projekt -Comment[ta]=க்யுமேக் பிராஜக்ட் -Comment[tg]=Лоиҳаи QMake -Comment[tr]=QMake Projesi -Comment[uz]=QMake loyihasi -Comment[uz@cyrillic]=QMake лойиҳаси -Comment[zh_CN]=QMake 工程 -Comment[zh_TW]=QMake 專案 -Name=KDevTrollProject -Name[da]=TDevelop Troll-projekt -Name[de]=QMake-Projekt (TDevelop) -Name[hi]=के-डेव-ट्रॉल-परियोजना -Name[nds]=QMake-Projekt (TDevelop) -Name[ne]=KDevTroll परियोजना -Name[pl]=KDevProjektTroll -Name[sk]=KDevTrollProjekt -Name[sv]=TDevelop Troll-projekt -Name[ta]=கெடெவ் டிரால் பிராஜக்ட் -Name[zh_TW]=TDevelop Troll 專案 -GenericName=QMake Project -GenericName[br]=Raktres QMake -GenericName[ca]=Projecte QMake -GenericName[da]=QMake-projekt -GenericName[de]=QMake-Projekt -GenericName[el]=Έργο QMake -GenericName[es]=Proyecto QMake -GenericName[et]=QMake projekt -GenericName[eu]=QMake proiektua -GenericName[fa]=پروژۀ QMake -GenericName[fr]=Projet avec QMake -GenericName[ga]=Tionscadal QMake -GenericName[gl]=Proxecto QMake -GenericName[hi]=क्यू-मेक परियोजना -GenericName[hu]=QMake-projekt -GenericName[it]=Progetto per QMake -GenericName[ja]=QMake プロジェクト -GenericName[ms]=Projek QMake -GenericName[nds]=QMake-Projekt -GenericName[ne]=QMake परियोजना -GenericName[nl]=QMake-project -GenericName[pa]=QMake ਪ੍ਰੋਜੈਕਟ -GenericName[pl]=Projekt: QMake -GenericName[pt]=Projecto QMake -GenericName[pt_BR]=Projeto QMake -GenericName[ru]=Проект QMake -GenericName[sk]=QMake projekt -GenericName[sl]=Projekt QMake -GenericName[sr]=QMake пројекат -GenericName[sr@Latn]=QMake projekat -GenericName[sv]=Qmake-projekt -GenericName[ta]=க்யுமேக் பிராஜக்ட் -GenericName[tg]=Лоиҳаи QMake -GenericName[tr]=QMake Projesi -GenericName[uz]=QMake loyihasi -GenericName[uz@cyrillic]=QMake лойиҳаси -GenericName[zh_CN]=QMake 工程 -GenericName[zh_TW]=QMake 專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevtrollproject -X-TDevelop-Version=5 -X-TDevelop-Args= diff --git a/buildtools/qmake/tdevtrollproject.rc b/buildtools/qmake/tdevtrollproject.rc deleted file mode 100644 index 8f6e0048..00000000 --- a/buildtools/qmake/tdevtrollproject.rc +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/buildtools/qmake/trollprojectpart.cpp b/buildtools/qmake/trollprojectpart.cpp index 738e2534..c71afc30 100644 --- a/buildtools/qmake/trollprojectpart.cpp +++ b/buildtools/qmake/trollprojectpart.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -41,11 +41,11 @@ #include "domutil.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevmakefrontend.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevmakefrontend.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" #include "trollprojectwidget.h" #include "runoptionswidget.h" #include "config.h" @@ -53,15 +53,15 @@ #include "qmakeoptionswidget.h" #include "scope.h" -#include +#include #include -typedef TDevGenericFactory TrollProjectFactory; -static const TDevPluginInfo data("tdevtrollproject"); -K_EXPORT_COMPONENT_FACTORY( libtdevtrollproject, TrollProjectFactory( data ) ) +typedef KDevGenericFactory TrollProjectFactory; +static const KDevPluginInfo data("kdevtrollproject"); +K_EXPORT_COMPONENT_FACTORY( libkdevtrollproject, TrollProjectFactory( data ) ) TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQStringList& args ) - : TDevBuildTool(&data, parent, name ? name : "TrollProjectPart") + : KDevBuildTool(&data, parent, name ? name : "TrollProjectPart") { setInstance(TrollProjectFactory::instance()); @@ -70,7 +70,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS else m_tmakeProject = false; - setXMLFile("tdevtrollproject.rc"); + setXMLFile("kdevtrollproject.rc"); m_executeProjectAfterBuild = false; m_executeTargetAfterBuild = false; @@ -405,7 +405,7 @@ void TrollProjectPart::openProject(const TQString &dirName, const TQString &proj DomUtil::writeEntry(dom, "/kdevtrollproject/run/directoryradio", "executable"); } - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } @@ -475,7 +475,7 @@ TQString TrollProjectPart::runDirectory() const TQString cwd; if( DomUtil::readBoolEntry(dom, "/kdevtrollproject/run/useglobalprogram", true) ) { - cwd = defaultRunDirectory("tdevtrollproject"); + cwd = defaultRunDirectory("kdevtrollproject"); }else { TQString name = m_widget->getCurrentOutputFilename(); @@ -788,7 +788,7 @@ bool TrollProjectPart::isDirty() return false; } -TDevProject::Options TrollProjectPart::options( ) const +KDevProject::Options TrollProjectPart::options( ) const { return UsesTQMakeBuildSystem; } diff --git a/buildtools/qmake/trollprojectpart.h b/buildtools/qmake/trollprojectpart.h index 2b673b59..e36ef202 100644 --- a/buildtools/qmake/trollprojectpart.h +++ b/buildtools/qmake/trollprojectpart.h @@ -21,14 +21,14 @@ #include #include -#include "tdevbuildtool.h" +#include "kdevbuildtool.h" class KDialogBase; class TrollProjectWidget; class KDirWatch; class TQMakeDefaultOpts; -class TrollProjectPart : public TDevBuildTool +class TrollProjectPart : public KDevBuildTool { Q_OBJECT diff --git a/buildtools/qmake/trollprojectwidget.cpp b/buildtools/qmake/trollprojectwidget.cpp index 12d814a5..68dfad8e 100644 --- a/buildtools/qmake/trollprojectwidget.cpp +++ b/buildtools/qmake/trollprojectwidget.cpp @@ -60,14 +60,14 @@ #include #include -#include "tdevcore.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" +#include "kdevcore.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" #include "trollprojectpart.h" -#include "tdevappfrontend.h" -#include "tdevmakefrontend.h" -#include "tdevlanguagesupport.h" -#include "tdevcreatefile.h" +#include "kdevappfrontend.h" +#include "kdevmakefrontend.h" +#include "kdevlanguagesupport.h" +#include "kdevcreatefile.h" #include "subclassesdlg.h" #include "addfilesdialog.h" #include "urlutil.h" @@ -1403,7 +1403,7 @@ void TrollProjectWidget::slotNewFile() return ; } } - TDevCreateFile * createFileSupport = m_part->extension( "TDevelop/CreateFile" ); + KDevCreateFile * createFileSupport = m_part->extension( "TDevelop/CreateFile" ); TQString fcext; if( gitem ) { @@ -1437,7 +1437,7 @@ void TrollProjectWidget::slotNewFile() fcext = TQString(); } } - TDevCreateFile::CreatedFile crFile = + KDevCreateFile::CreatedFile crFile = createFileSupport->createNewFile( fcext, projectDirectory() + TQString(TQChar(TQDir::separator()))+ m_shownSubproject->relativePath() ); } @@ -1683,7 +1683,7 @@ void TrollProjectWidget::slotDetailsContextMenu( TDEListView *, TQListViewItem * } else if ( r == idInsNewFile ) { - TDevCreateFile * createFileSupport = m_part->extension( "TDevelop/CreateFile" ); + KDevCreateFile * createFileSupport = m_part->extension( "TDevelop/CreateFile" ); TQString fcext; switch ( titem->groupType ) { @@ -1714,7 +1714,7 @@ void TrollProjectWidget::slotDetailsContextMenu( TDEListView *, TQListViewItem * default: fcext = TQString(); } - TDevCreateFile::CreatedFile crFile = + KDevCreateFile::CreatedFile crFile = createFileSupport->createNewFile( fcext, cleanSubprojectPath ); } diff --git a/buildtools/script/CMakeLists.txt b/buildtools/script/CMakeLists.txt index c30a403d..d3f97540 100644 --- a/buildtools/script/CMakeLists.txt +++ b/buildtools/script/CMakeLists.txt @@ -27,16 +27,16 @@ link_directories( ##### other data ################################ -install( FILES tdevscriptproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevscriptproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevscriptproject ) +install( FILES kdevscriptproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevscriptproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevscriptproject ) -##### libtdevscriptproject (module) ############# +##### libkdevscriptproject (module) ############# -tde_add_kpart( libtdevscriptproject AUTOMOC +tde_add_kpart( libkdevscriptproject AUTOMOC SOURCES scriptprojectpart.cpp scriptoptionswidget.cpp scriptoptionswidgetbase.ui scriptnewfiledlg.cpp - LINK tdevbuildbase-shared + LINK kdevbuildbase-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/script/Makefile.am b/buildtools/script/Makefile.am index a3d7652a..542b1a69 100644 --- a/buildtools/script/Makefile.am +++ b/buildtools/script/Makefile.am @@ -10,17 +10,17 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/external_interfaces $(all_includes) -kde_module_LTLIBRARIES = libtdevscriptproject.la -libtdevscriptproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevscriptproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la +kde_module_LTLIBRARIES = libkdevscriptproject.la +libkdevscriptproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevscriptproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la -libtdevscriptproject_la_SOURCES = scriptprojectpart.cpp scriptoptionswidget.cpp scriptoptionswidgetbase.ui scriptnewfiledlg.cpp +libkdevscriptproject_la_SOURCES = scriptprojectpart.cpp scriptoptionswidget.cpp scriptoptionswidgetbase.ui scriptnewfiledlg.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevscriptproject.desktop +service_DATA = kdevscriptproject.desktop -rcdir = $(kde_datadir)/tdevscriptproject -rc_DATA = tdevscriptproject.rc +rcdir = $(kde_datadir)/kdevscriptproject +rc_DATA = kdevscriptproject.rc diff --git a/buildtools/script/kdevscriptproject.desktop b/buildtools/script/kdevscriptproject.desktop new file mode 100644 index 00000000..6e135c16 --- /dev/null +++ b/buildtools/script/kdevscriptproject.desktop @@ -0,0 +1,87 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Scripting Language Project +Comment[ca]=Projecte de llenguatge escrivint scripts +Comment[da]=Scriptsprog-projekt +Comment[de]=Skriptsprachen-Projekt für TDevelop +Comment[el]=Έργο γλώσσας γραφής σεναρίων +Comment[es]=Proyecto de lenguaje de guiones +Comment[et]=Skriptikeele projekt +Comment[eu]=Script lengoai proiektua +Comment[fa]=پروژۀ زبان دست‌نوشته‌ای +Comment[fr]=Projet avec les langages de scripts +Comment[ga]=Tionscadal i dTeanga Scriptithe +Comment[gl]=Proxecto de linguaxe de scripting +Comment[hi]=स्क्रिप्टिंग भाषा परियोजना +Comment[hu]=Szkript-projekt +Comment[is]=Skriftumálsverkefni +Comment[it]=Progetto con linguaggio di scripting +Comment[ja]=スクリプト言語プロジェクト +Comment[ms]=Projek Bahasa Penskrip +Comment[nds]=Skriptspraak-Projekt +Comment[ne]=स्क्रिप्टिङ भाषा परियोजना +Comment[nl]=Scripttaal-project +Comment[pl]=Projekt w języku skryptowym +Comment[pt]=Projecto de uma Linguagem de 'Scripting' +Comment[pt_BR]=Projeto de Linguagem de Script +Comment[ru]=Проект скриптового языка +Comment[sk]=Skriptovací jazyk projekt +Comment[sl]=Projekt skriptnega jezika +Comment[sr]=Пројекат скриптног језика +Comment[sr@Latn]=Projekat skriptnog jezika +Comment[sv]=Projekt för skriptspråk +Comment[ta]=ஸ்கிரிப்டிங் மொழி பிராஜக்ட் +Comment[tg]=Лоиҳа бо забони ғарчкунӣ +Comment[tr]=Betik Dili Projesi +Comment[zh_CN]=脚本语言工程 +Comment[zh_TW]=文稿語言專案 +Name=KDevScriptProject +Name[da]=TDevelop script-projekt +Name[de]=Skriptsprachen-Projekt (TDevelop) +Name[hi]=के-डेव-स्क्रिप्ट-परियोजना +Name[nds]=Skriptspraak-Projekt (TDevelop) +Name[ne]=केडीई विकास स्क्रिप्ट परियोजना +Name[pl]=KDevProjektSkrypt +Name[sk]=KDevSkriptProjekt +Name[sv]=TDevelop skriptprojekt +Name[ta]=கெடெவ் ஸ்கிரிப்ட் பிராஜக்ட் +Name[tg]=KDevЛоиҳаи скрипт +Name[zh_TW]=TDevelop 文稿專案 +GenericName=Scripting Language Project +GenericName[ca]=Projecte de llenguatge escrivint scripts +GenericName[da]=Scriptsprog-projekt +GenericName[de]=Skriptsprachen-Projekt +GenericName[el]=Έργο γλώσσας γραφής σεναρίων +GenericName[es]=Proyecto de lenguaje de guiones +GenericName[et]=Skriptikeele projekt +GenericName[eu]=Script lengoaia proiektua +GenericName[fa]=پروژۀ زبان دست‌نوشته‌ای +GenericName[fr]=Projet avec les langages de scripts +GenericName[ga]=Tionscadal i dTeanga Scriptithe +GenericName[gl]=Proxecto de linguaxe de scripting +GenericName[hi]=स्क्रिप्टिंग भाषा परियोजना +GenericName[hu]=Szkript-projekt +GenericName[it]=Progetto con linguaggio di scripting +GenericName[ja]=スクリプト言語プロジェクト +GenericName[nds]=Skriptspraak-Projekt +GenericName[ne]=स्क्रिप्टिङ भाषा परियोजना +GenericName[nl]=Scripttaal-project +GenericName[pl]=Projekt w języku skryptowym +GenericName[pt]=Projecto de uma Linguagem de 'Scripting' +GenericName[pt_BR]=Projeto de Linguagem de Script +GenericName[ru]=Проект скриптового языка +GenericName[sk]=Skriptovací jazyk projekt +GenericName[sl]=Projekt skriptnega jezika +GenericName[sr]=Пројекат скриптног језика +GenericName[sr@Latn]=Projekat skriptnog jezika +GenericName[sv]=Projekt för skriptspråk +GenericName[ta]=ஸ்கிரிப்டிங் மொழி பிராஜக்ட் +GenericName[tg]=Лоиҳа бо забони ғарчкунӣ +GenericName[tr]=Betik Dili Projesi +GenericName[zh_CN]=脚本语言工程 +GenericName[zh_TW]=文稿語言專案 +ServiceTypes=TDevelop/Project +Icon=tdevelop +X-TDE-Library=libkdevscriptproject +X-TDevelop-Version=5 diff --git a/buildtools/script/kdevscriptproject.rc b/buildtools/script/kdevscriptproject.rc new file mode 100644 index 00000000..651b10b4 --- /dev/null +++ b/buildtools/script/kdevscriptproject.rc @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/buildtools/script/scriptnewfiledlg.cpp b/buildtools/script/scriptnewfiledlg.cpp index f254680e..9308792a 100644 --- a/buildtools/script/scriptnewfiledlg.cpp +++ b/buildtools/script/scriptnewfiledlg.cpp @@ -81,7 +81,7 @@ void ScriptNewFileDialog::accept() return; } - TDevProject *project = m_part->project(); + KDevProject *project = m_part->project(); if (!project->activeDirectory().isEmpty()) fileName.prepend(project->activeDirectory() + "/"); TQString destpath = project->projectDirectory() + "/" + fileName; diff --git a/buildtools/script/scriptoptionswidget.cpp b/buildtools/script/scriptoptionswidget.cpp index 13049699..d80cd501 100644 --- a/buildtools/script/scriptoptionswidget.cpp +++ b/buildtools/script/scriptoptionswidget.cpp @@ -16,10 +16,10 @@ #include #include #include "domutil.h" -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" -ScriptOptionsWidget::ScriptOptionsWidget(TDevPlugin *part, +ScriptOptionsWidget::ScriptOptionsWidget(KDevPlugin *part, TQWidget *parent, const char *name) : ScriptOptionsWidgetBase(parent, name) { diff --git a/buildtools/script/scriptoptionswidget.h b/buildtools/script/scriptoptionswidget.h index 086186cc..8f136d75 100644 --- a/buildtools/script/scriptoptionswidget.h +++ b/buildtools/script/scriptoptionswidget.h @@ -14,7 +14,7 @@ #include "scriptoptionswidgetbase.h" -class TDevPlugin; +class KDevPlugin; class ScriptOptionsWidget : public ScriptOptionsWidgetBase @@ -23,14 +23,14 @@ class ScriptOptionsWidget : public ScriptOptionsWidgetBase public: - ScriptOptionsWidget( TDevPlugin *part, TQWidget *parent=0, const char *name=0 ); + ScriptOptionsWidget( KDevPlugin *part, TQWidget *parent=0, const char *name=0 ); ~ScriptOptionsWidget(); public slots: void accept(); private: - TDevPlugin *m_part; + KDevPlugin *m_part; }; #endif diff --git a/buildtools/script/scriptprojectpart.cpp b/buildtools/script/scriptprojectpart.cpp index ef4fb16f..8f6b5fb4 100644 --- a/buildtools/script/scriptprojectpart.cpp +++ b/buildtools/script/scriptprojectpart.cpp @@ -23,32 +23,32 @@ #include #include #include -#include -#include +#include +#include #include #include "domutil.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" -#include "tdevlanguagesupport.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevlanguagesupport.h" #include "scriptoptionswidget.h" #include "scriptnewfiledlg.h" -#include "tdevplugininfo.h" +#include "kdevplugininfo.h" -typedef TDevGenericFactory ScriptProjectFactory; -static const TDevPluginInfo data("tdevscriptproject"); -K_EXPORT_COMPONENT_FACTORY( libtdevscriptproject, ScriptProjectFactory( data ) ) +typedef KDevGenericFactory ScriptProjectFactory; +static const KDevPluginInfo data("kdevscriptproject"); +K_EXPORT_COMPONENT_FACTORY( libkdevscriptproject, ScriptProjectFactory( data ) ) ScriptProjectPart::ScriptProjectPart(TQObject *parent, const char *name, const TQStringList &) - : TDevBuildTool(&data, parent, name ? name : "ScriptProjectPart") + : KDevBuildTool(&data, parent, name ? name : "ScriptProjectPart") { setInstance(ScriptProjectFactory::instance()); - setXMLFile("tdevscriptproject.rc"); + setXMLFile("kdevscriptproject.rc"); // only create new file action if file creation part not available - if (!extension("TDevelop/CreateFile")) { + if (!extension("TDevelop/CreateFile")) { TDEAction *action; action = new TDEAction( i18n("New File..."), 0, this, TQT_SLOT(slotNewFile()), @@ -148,7 +148,7 @@ void ScriptProjectPart::openProject(const TQString &dirName, const TQString &pro } } while (!s.isEmpty()); - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } @@ -192,7 +192,7 @@ DomUtil::PairList ScriptProjectPart::runEnvironmentVars() const */ TQString ScriptProjectPart::runDirectory() const { - TQString cwd = defaultRunDirectory("tdevscriptproject"); + TQString cwd = defaultRunDirectory("kdevscriptproject"); if (cwd.isEmpty()) cwd = buildDirectory(); return cwd; diff --git a/buildtools/script/scriptprojectpart.h b/buildtools/script/scriptprojectpart.h index 2c3023ad..92087991 100644 --- a/buildtools/script/scriptprojectpart.h +++ b/buildtools/script/scriptprojectpart.h @@ -15,14 +15,14 @@ #include #include -#include "tdevbuildtool.h" +#include "kdevbuildtool.h" class TQListViewItem; class TQStringList; class KDialogBase; class ScriptProjectWidget; -class ScriptProjectPart : public TDevBuildTool +class ScriptProjectPart : public KDevBuildTool { Q_OBJECT diff --git a/buildtools/script/tdevscriptproject.desktop b/buildtools/script/tdevscriptproject.desktop deleted file mode 100644 index 9ba87c9f..00000000 --- a/buildtools/script/tdevscriptproject.desktop +++ /dev/null @@ -1,87 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Scripting Language Project -Comment[ca]=Projecte de llenguatge escrivint scripts -Comment[da]=Scriptsprog-projekt -Comment[de]=Skriptsprachen-Projekt für TDevelop -Comment[el]=Έργο γλώσσας γραφής σεναρίων -Comment[es]=Proyecto de lenguaje de guiones -Comment[et]=Skriptikeele projekt -Comment[eu]=Script lengoai proiektua -Comment[fa]=پروژۀ زبان دست‌نوشته‌ای -Comment[fr]=Projet avec les langages de scripts -Comment[ga]=Tionscadal i dTeanga Scriptithe -Comment[gl]=Proxecto de linguaxe de scripting -Comment[hi]=स्क्रिप्टिंग भाषा परियोजना -Comment[hu]=Szkript-projekt -Comment[is]=Skriftumálsverkefni -Comment[it]=Progetto con linguaggio di scripting -Comment[ja]=スクリプト言語プロジェクト -Comment[ms]=Projek Bahasa Penskrip -Comment[nds]=Skriptspraak-Projekt -Comment[ne]=स्क्रिप्टिङ भाषा परियोजना -Comment[nl]=Scripttaal-project -Comment[pl]=Projekt w języku skryptowym -Comment[pt]=Projecto de uma Linguagem de 'Scripting' -Comment[pt_BR]=Projeto de Linguagem de Script -Comment[ru]=Проект скриптового языка -Comment[sk]=Skriptovací jazyk projekt -Comment[sl]=Projekt skriptnega jezika -Comment[sr]=Пројекат скриптног језика -Comment[sr@Latn]=Projekat skriptnog jezika -Comment[sv]=Projekt för skriptspråk -Comment[ta]=ஸ்கிரிப்டிங் மொழி பிராஜக்ட் -Comment[tg]=Лоиҳа бо забони ғарчкунӣ -Comment[tr]=Betik Dili Projesi -Comment[zh_CN]=脚本语言工程 -Comment[zh_TW]=文稿語言專案 -Name=KDevScriptProject -Name[da]=TDevelop script-projekt -Name[de]=Skriptsprachen-Projekt (TDevelop) -Name[hi]=के-डेव-स्क्रिप्ट-परियोजना -Name[nds]=Skriptspraak-Projekt (TDevelop) -Name[ne]=केडीई विकास स्क्रिप्ट परियोजना -Name[pl]=KDevProjektSkrypt -Name[sk]=KDevSkriptProjekt -Name[sv]=TDevelop skriptprojekt -Name[ta]=கெடெவ் ஸ்கிரிப்ட் பிராஜக்ட் -Name[tg]=KDevЛоиҳаи скрипт -Name[zh_TW]=TDevelop 文稿專案 -GenericName=Scripting Language Project -GenericName[ca]=Projecte de llenguatge escrivint scripts -GenericName[da]=Scriptsprog-projekt -GenericName[de]=Skriptsprachen-Projekt -GenericName[el]=Έργο γλώσσας γραφής σεναρίων -GenericName[es]=Proyecto de lenguaje de guiones -GenericName[et]=Skriptikeele projekt -GenericName[eu]=Script lengoaia proiektua -GenericName[fa]=پروژۀ زبان دست‌نوشته‌ای -GenericName[fr]=Projet avec les langages de scripts -GenericName[ga]=Tionscadal i dTeanga Scriptithe -GenericName[gl]=Proxecto de linguaxe de scripting -GenericName[hi]=स्क्रिप्टिंग भाषा परियोजना -GenericName[hu]=Szkript-projekt -GenericName[it]=Progetto con linguaggio di scripting -GenericName[ja]=スクリプト言語プロジェクト -GenericName[nds]=Skriptspraak-Projekt -GenericName[ne]=स्क्रिप्टिङ भाषा परियोजना -GenericName[nl]=Scripttaal-project -GenericName[pl]=Projekt w języku skryptowym -GenericName[pt]=Projecto de uma Linguagem de 'Scripting' -GenericName[pt_BR]=Projeto de Linguagem de Script -GenericName[ru]=Проект скриптового языка -GenericName[sk]=Skriptovací jazyk projekt -GenericName[sl]=Projekt skriptnega jezika -GenericName[sr]=Пројекат скриптног језика -GenericName[sr@Latn]=Projekat skriptnog jezika -GenericName[sv]=Projekt för skriptspråk -GenericName[ta]=ஸ்கிரிப்டிங் மொழி பிராஜக்ட் -GenericName[tg]=Лоиҳа бо забони ғарчкунӣ -GenericName[tr]=Betik Dili Projesi -GenericName[zh_CN]=脚本语言工程 -GenericName[zh_TW]=文稿語言專案 -ServiceTypes=TDevelop/Project -Icon=tdevelop -X-TDE-Library=libtdevscriptproject -X-TDevelop-Version=5 diff --git a/buildtools/script/tdevscriptproject.rc b/buildtools/script/tdevscriptproject.rc deleted file mode 100644 index d15c3dc2..00000000 --- a/buildtools/script/tdevscriptproject.rc +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/configure.in.bot b/configure.in.bot index 6ee60dff..9b006e9e 100644 --- a/configure.in.bot +++ b/configure.in.bot @@ -1,7 +1,7 @@ if test "$DOT_FOUND" = "no"; then echo "" echo "You're missing the dot program." - echo "It is still possible to run and use TDevelop without it, but you will " + echo "It is still possible to run and use KDevelop without it, but you will " echo "not be able to use the new graphical classbrowser. In order to get " echo "a dot copy, go to www.graphviz.org and download the graphviz package." fi @@ -18,7 +18,7 @@ fi if test -n "$VCSCOMPAT" -a -z "$SVN_SUBDIR"; then echo "" echo "You're missing Subversion libraries (1.x)" - echo "TDevelop subversion support will not work without it," + echo "KDevelop subversion support will not work without it," echo "consider installing it." echo "" fi diff --git a/configure.in.in b/configure.in.in index 769baa0c..0e9fa12a 100644 --- a/configure.in.in +++ b/configure.in.in @@ -124,4 +124,4 @@ esac dnl AC_CHECK_FILE([$qt_includes/qassistantclient.h], [],[AC_MSG_ERROR([The qassistantclient.h header from Qt3 is needed to build tdevelop, on some systems this header is in a separate package called qt3-apps-dev])]) -KDE_INIT_DOXYGEN([TDevelop], [Version $VERSION]) +KDE_INIT_DOXYGEN([KDevelop], [Version $VERSION]) diff --git a/doc/Makefile.am b/doc/Makefile.am index 440f3684..8275eb30 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,2 +1,2 @@ -SUBDIRS = tdevelop std extras tde_app_devel tdevdesigner +SUBDIRS = tdevelop std extras kde_app_devel kdevdesigner diff --git a/doc/api/Architecture.dox b/doc/api/Architecture.dox index 52c1447a..ae4ef73d 100644 --- a/doc/api/Architecture.dox +++ b/doc/api/Architecture.dox @@ -40,7 +40,7 @@ parts to distinguish, mainly: - src = The core part of KDevelop - lib/interfaces = Plugin handler interface classes - - parts = The various parts using the KParts framework ( TDevPlugin children ) + - parts = The various parts using the KParts framework ( KDevPlugin children ) - languages = \ref language-parts - buildtools = \ref buildtool-parts - vcs = \ref vcs-parts @@ -67,12 +67,12 @@ There are two types of possible main window objects: pre-arranged access tabs around user areas. . -Both main window classes inherit from the TDevMainWindow class which provides +Both main window classes inherit from the KDevMainWindow class which provides access to common window features. \subsubsection toplevel The TopLevel Object -There is only one toplevel object of class TDevMainWindow in KDevelop. It can +There is only one toplevel object of class KDevMainWindow in KDevelop. It can be accessed through the static function TopLevel::getInstance() (see the TopLevel class). @@ -83,7 +83,7 @@ be viewed according to their functionalities as follows. \subsubsection language-parts Programming Language Support Parts -These parts implement a TDevLanguageSupport Class interface. +These parts implement a KDevLanguageSupport Class interface. To add support for a new programming language check the \ref howToAddProgrammingLanguages page (doc/api/HowToAddProgrammingLanguages.dox file). Take a look at \ref LangSupportStatus (doc/api/LangSupportStatus.dox file) to see the current status/features of the programming languages currently supported by KDevelop. @@ -135,7 +135,7 @@ Take a look at \ref LangSupportStatus (doc/api/LangSupportStatus.dox file) to se \subsubsection buildtool-parts Build tools Parts -These parts implement a TDevProject Class interface. +These parts implement a KDevProject Class interface. - buildtools/ada = Ada build tool - (see AdaProjectPart) @@ -166,7 +166,7 @@ These parts implement a TDevProject Class interface. \subsubsection vcs-parts VCS (Version Control System) Parts -These parts implement a TDevVersionControl Class interface. +These parts implement a KDevVersionControl Class interface. - vcs/cervisia = Cervisia Support - (see CervisiaPlugin) @@ -211,7 +211,7 @@ Take a look at \ref EditorsSupportStatus (doc/api/EditorsSupportStatus.dox file) Some of the parts are considered global - that is, they effect the entire operation of KDevelop. -These parts implement a TDevPlugin Class interface. +These parts implement a KDevPlugin Class interface. - parts/appwizard = New Project Wizard - see AppWizardPart @@ -264,7 +264,7 @@ These parts implement a TDevPlugin Class interface. \subsubsection project-specific-parts Project Specific Parts -These parts implement a TDevPlugin Class interface. +These parts implement a KDevPlugin Class interface. - parts/astyle = Source code formatter - (see AStylePart) diff --git a/doc/api/FutureTasks.dox b/doc/api/FutureTasks.dox index 763537f3..1d7f7f26 100644 --- a/doc/api/FutureTasks.dox +++ b/doc/api/FutureTasks.dox @@ -129,7 +129,7 @@ the same border as other items (impossible) - Browser tool bar should truncate long menu entries so it doesn't take so much space (already implemented?) - - Extend TDevPlugin-API in order to have a preferred border for at + - Extend KDevPlugin-API in order to have a preferred border for at least the selection parts (Automake Manager, Class Browser, File Groups, etc...) diff --git a/doc/api/HighPriTasks.dox b/doc/api/HighPriTasks.dox index 7bcbaf1f..062b3b06 100644 --- a/doc/api/HighPriTasks.dox +++ b/doc/api/HighPriTasks.dox @@ -12,7 +12,7 @@ This way the .tdevelop file can be shared in teams of developers. -\section TDevelop2compat KDevelop 2 compatibility +\section KDevelop2compat KDevelop 2 compatibility (These are things that must be accomplished before we can say that KDevelop 3 >= tdevelop 2.x UI-wise and functionality-wise!) diff --git a/doc/api/HowToAddApplicationTemplates.dox b/doc/api/HowToAddApplicationTemplates.dox index 1da5a3e5..f53ce4f8 100644 --- a/doc/api/HowToAddApplicationTemplates.dox +++ b/doc/api/HowToAddApplicationTemplates.dox @@ -27,7 +27,7 @@ applications like kedit as well as plugins for example for tdevelop or noatun.\n \section templates_1 I. Example: How To Create a Simple KDE Application Template "KHello" -You can find this template in $TDEDIR/share/apps/tdevappwizard/template-khello. +You can find this template in $TDEDIR/share/apps/kdevappwizard/template-khello. \subsection templates_1_1 I.1. Step 1: Basic Skeleton @@ -64,7 +64,7 @@ wizard will replace: - \%{YEAR} ........ by the year . -All this can be found in $TDEDIR/share/apps/tdevappwizard/template-common/tdevelop.pm. +All this can be found in $TDEDIR/share/apps/kdevappwizard/template-common/tdevelop.pm. \subsubsection templates_1_2a I.2.1. The Source Files The files template-khello/app.cpp, template-khello/app.h and @@ -135,22 +135,22 @@ if [ `id -u` = 0 ]; then # we are root so install the template into the global kde directory kde_dir=`tde-config --prefix` else - # we are a user so install it into $HOME/.trinity/share/apps/tdevappwizard directory + # we are a user so install it into $HOME/.trinity/share/apps/kdevappwizard directory kde_dir=`tde-config --localprefix` echo "Note: It would be better to install as root. Press CTRL+C to abort" fi # use usual path or another one? -echo "Install dir [${kde_dir}/share/apps/tdevappwizard]:" +echo "Install dir [${kde_dir}/share/apps/kdevappwizard]:" read newdir -if [ "$newdir"a = a ]; then newdir="${kde_dir}/share/apps/tdevappwizard/"; fi +if [ "$newdir"a = a ]; then newdir="${kde_dir}/share/apps/kdevappwizard/"; fi # make sure the directories exist if [ ! -e "${newdir}/template-khello" ]; then mkdir -p "${newdir}/template-khello" ; fi; if [ ! -e "${newdir}/templates" ]; then mkdir -p "${newdir}/templates" ; fi; if [ ! -e "${newdir}" ]; then mkdir -p "$newdir" ; fi; -if [ ! -e "${newdir}/template-common" ]; then ln -s "${kde_prefix}/share/apps/tdevappwizard/template-common" "${newdir}/template-common" ; fi; +if [ ! -e "${newdir}/template-common" ]; then ln -s "${kde_prefix}/share/apps/kdevappwizard/template-common" "${newdir}/template-common" ; fi; # install now cp -R --target-directory "$newdir" template-khello diff --git a/doc/api/HowToAddGenericBuildTools.dox b/doc/api/HowToAddGenericBuildTools.dox index d713082a..b073cf0f 100644 --- a/doc/api/HowToAddGenericBuildTools.dox +++ b/doc/api/HowToAddGenericBuildTools.dox @@ -6,7 +6,7 @@ This part offers build tool facilities using project files in xml format (dtd is located in buildtools/generic/kdevxmlproject.dtd). Those xml files can be converted into makefiles, ant xml files or simply shell scripts using build system plugins. -Build system plugin is an object that implements TDevBuildSystem interface. +Build system plugin is an object that implements KDevBuildSystem interface. Build system plugins are located in buildtools/generic/buildsystem. \section sectionStep1 Step 1: Make your plugin loadable diff --git a/doc/api/HowToAddPlugins.dox b/doc/api/HowToAddPlugins.dox index b0b282db..fa7f74e2 100644 --- a/doc/api/HowToAddPlugins.dox +++ b/doc/api/HowToAddPlugins.dox @@ -8,7 +8,7 @@ For a plugin foo, create a file foo.desktop which contains KDevelop/Part in its list of ServiceTypes. - - See parts/doctreeview/tdevdoctreeview.desktop for an example. + - See parts/doctreeview/kdevdoctreeview.desktop for an example. . If you install this file into \$(kde_servicesdir), your plugin will automatically be loaded. @@ -80,9 +80,9 @@ See parts/doctreeview/doctreeviewfactory.cpp for an example. \section implementPart Step 3: Implement your part. -Your part must be derived from TDevPlugin. +Your part must be derived from KDevPlugin. - - TDevPlugin takes two arguments: + - KDevPlugin takes two arguments: - 1) A parent argument. This also comes from createPartObject(). - 2) A name, which in turn is given to the QObject @@ -93,7 +93,7 @@ Your part must be derived from TDevPlugin. \subsection accessIDE How to access other IDE components A part can access other components of the IDE via some accessors -of TDevPlugin: +of KDevPlugin: - The application core via core(), - the build tools via project(), @@ -155,7 +155,7 @@ to write it back. \subsection sessionAccess Project session file (*.kdevses) -The base class of all TDevelop plugins is TDevPlugin. It provides two virtual methods +The base class of all TDevelop plugins is KDevPlugin. It provides two virtual methods restorePartialProjectSession(..) and savePartialProjectSession(..) that you should reimplement in your special plugin to attach to session loading and saving. diff --git a/doc/api/HowToAddProgrammingLanguages.dox b/doc/api/HowToAddProgrammingLanguages.dox index 5dd44fda..a5840885 100644 --- a/doc/api/HowToAddProgrammingLanguages.dox +++ b/doc/api/HowToAddProgrammingLanguages.dox @@ -6,7 +6,7 @@ \section LSupport List of things to have "complete" support of a given language in KDevelop - - Implement interface TDevLanguageSupport + - Implement interface KDevLanguageSupport - \ref sectionClassWizard - \ref sectionAttributeMethodWizard - \ref sectionQtUiSubclassing - (if the language has Qt bindings) @@ -43,7 +43,7 @@ Take a look at \ref LangSupportStatus (doc/api/LangSupportStatus.dox file) to se \section sectionLanguageSupport Language Support Any language support should be written as a tdevelop part and implement -TDevLanguageSupport interface (lib/interfaces/tdevlanguagesupport.h). +KDevLanguageSupport interface (lib/interfaces/kdevlanguagesupport.h). Implementing methods: - virtual Features features(); @@ -54,7 +54,7 @@ Should be enough for a language support to start working. KDevelop ships with KDevLang project template. It is a simple language support prototype that can be used when developing language support plugins with KDevelop. To use it, start a New Project and select: C++->KDevelop->KDevelop Language Support Plugin in the application wizard. -The template is located in languages/cpp/app_templates/tdevlang, you can change it there if you need. +The template is located in languages/cpp/app_templates/kdevlang, you can change it there if you need. You should look at languages/ruby for a simple language support @@ -177,7 +177,7 @@ write a Debugger . KDevelop already provides GDB support \subsection sectionCompilerPlugins Compiler plugins There is an ability to create compiler plugin for KDevelop. Compiler plugin provides the compiler configuration dialog which implements command line compiler options. -Compiler plugins must implement TDevCompilerOptions interface. +Compiler plugins must implement KDevCompilerOptions interface. \section MiscInf Other Info @@ -226,7 +226,7 @@ currently provides several build tools. They are: - see GenericProjectPart at buildtools/generic - Offers build tool facilities using project files in xml format (dtd is located in buildtools/generic/kdevxmlproject.dtd). Those xml files can be converted into makefiles, ant xml files or simply shell scripts using build system plugins. - Build system plugin is an object that implements TDevBuildSystem interface. Build system plugins are located in buildtools/generic/buildsystem. + Build system plugin is an object that implements KDevBuildSystem interface. Build system plugins are located in buildtools/generic/buildsystem. . - QMake build tool - see TrollProjectPart at buildtools/qmake diff --git a/doc/api/HowToDocument.dox b/doc/api/HowToDocument.dox index 65cd7c31..d606a8bf 100644 --- a/doc/api/HowToDocument.dox +++ b/doc/api/HowToDocument.dox @@ -3,7 +3,7 @@ */ /** \page howToDocument How to document KDevelop parts -You should add a README and a README.dox file to your part (TDevPlugin). +You should add a README and a README.dox file to your part (KDevPlugin). On the README file put this text: \verbatim @@ -31,7 +31,7 @@ implements your part. On the area marked with ... you can add optional informations. Here is an example of that: -\verbinclude languages/cpp/app_templates/tdevpart/README.dox +\verbinclude languages/cpp/app_templates/kdevpart/README.dox All these infos are optional and you should only add the link to the bugzilla database if YOUR_COMPONENT_NAME has been defined in that database. diff --git a/doc/extras/CMakeLists.txt b/doc/extras/CMakeLists.txt index a358cf07..dd7c977f 100644 --- a/doc/extras/CMakeLists.txt +++ b/doc/extras/CMakeLists.txt @@ -14,5 +14,5 @@ add_subdirectory( w3c ) install( FILES sdl.toc opengl.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/doc/extras/Makefile.am b/doc/extras/Makefile.am index deb28a1a..0e7893c4 100644 --- a/doc/extras/Makefile.am +++ b/doc/extras/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS=w3c -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = sdl.toc opengl.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/doc/extras/w3c/CMakeLists.txt b/doc/extras/w3c/CMakeLists.txt index 9681021f..7424e5fd 100644 --- a/doc/extras/w3c/CMakeLists.txt +++ b/doc/extras/w3c/CMakeLists.txt @@ -12,5 +12,5 @@ install( FILES w3c-dom-level2-html.toc w3c-svg.toc w3c-uaag10.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/doc/extras/w3c/Makefile.am b/doc/extras/w3c/Makefile.am index 68a489f8..19518e8d 100644 --- a/doc/extras/w3c/Makefile.am +++ b/doc/extras/w3c/Makefile.am @@ -1,3 +1,3 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = w3c-dom-level2-html.toc w3c-svg.toc w3c-uaag10.toc diff --git a/doc/kde_app_devel/CMakeLists.txt b/doc/kde_app_devel/CMakeLists.txt new file mode 100644 index 00000000..243887d5 --- /dev/null +++ b/doc/kde_app_devel/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_create_handbook( DESTINATION kde_app_devel ) diff --git a/doc/kde_app_devel/Makefile.am b/doc/kde_app_devel/Makefile.am new file mode 100644 index 00000000..41691557 --- /dev/null +++ b/doc/kde_app_devel/Makefile.am @@ -0,0 +1,3 @@ +KDE_LANG = en +KDE_DOCS = AUTO + diff --git a/doc/kde_app_devel/appwizard.png b/doc/kde_app_devel/appwizard.png new file mode 100644 index 00000000..adbadb35 Binary files /dev/null and b/doc/kde_app_devel/appwizard.png differ diff --git a/doc/kde_app_devel/index.docbook b/doc/kde_app_devel/index.docbook new file mode 100644 index 00000000..2d913c0b --- /dev/null +++ b/doc/kde_app_devel/index.docbook @@ -0,0 +1,1549 @@ + +KDevelop"> + + + +]> + + + + +The &tdevelop; Programming Handbook + +2002-12-05 +2.0 + + + +Ralf +Nolden +
Ralf.Nolden@post.rwth-aachen.de
+
+ +Caleb +Tennis +
caleb@aei-tech.com
+
+
+ + +1999 +Ralf Nolden + + +2002 +Caleb Tennis + + + + +&FDLNotice; + + +The User Guide to C++ Application Design for the Trinity Desktop Environment (TDE) with +the &tdevelop; IDE + + + +KDE +KDevelop +IDE +development +programming + + +
+ + +Introduction + +As Unix Systems are becoming more and more popular to even beginners working with computer machines +due to its advantages in regards of stability and functionality, most are somehow disappointed, because +those applications don't have a consistent look and each one behaves different from another. With KDE, +developers have an almost perfect way to create first-class applications for Unix desktop systems to get +a wider user community by the mere quality their applications have to offer. Therefore, KDE becomes more +and more popular as a base for programming design, and developers want to take advantage of the +possibilities that the system has to offer. + + + +What you should know already + +For making the best use of this programming handbook, we assume that you already know about the +C++ programming language; if not, you should make yourself familiar with that first. Information about +C++ is available through various sources either in printed form at your local bookstore or by tutorials +found on the Internet. Knowledge about the design of Graphical User Interfaces is not required, as this +handbook tries to cover the application design for KDE programs, which also includes an introduction into +the Qt toolkit as well as the KDE libraries and the design of User Interfaces. Also, you should have made +yourself comfortable with &tdevelop; by reading The User Manual to &tdevelop;, which contains a descriptive +review of the functionality provided by the IDE. + + + + +About this Handbook + +This handbook has been written to give developers an introduction into KDE application development by +using the KDevelop Integrated Development Environment. + + +The following chapters therefore give an introduction on how to create projects, explains the sourcecode +already generated and shows how to extend the given sources on various topics such as toolbars, menu bars +and view areas. + + +Then the dialogeditor is discussed in detail, explaining how widgets are created and covers widget +properties settings in detail for all provided widgets. + + +Finally, you will learn about several topics that will complete your knowledge in regards of project design +and helps you work out additional issues besides coding such as adding API documentation and extending +online-manuals. + + +In the next chapter + +We'll take a look at the Qt and KDE libraries, showing basic concepts and why things are the way they are. +Also, we will discuss how to create the tutorial applications provided with the Qt toolkit by using +tdevelop;, so beginners can already see first results with a few steps, and thereby will learn how to make +use of some of &tdevelop;'s best features. + + + + +In the following chapters + +You will learn how to: + +create an application with the KAppWizard +What the project skeleton already provides +What the code already create means +How to create your own views +How to extend your application's functionality by dialog, menu bars, and toolbars +How to make your application user friendly by providing help functions +How to write online documentation + + + + + + + +Additional Information + +Additional information about Qt/KDE programming is available by various sources: + +Programming with Qt by Matthias Kalle Dalheimer +The User Manual to KDevelop, provided with the TDevelop IDE +The Online Reference to the Qt library +The KDE Developer web site + + + +Additionally, you should look for help by subscribing to the various mailing lists, whose addresses +are available on the mentioned web sites, and on the Usenet newsgroups dedicated to users of KDE and +Unix Systems as well as about the C and C++ programming language. + + +For obtaining help about the TDevelop IDE, you should send requests to our mailinglist at +kdevelop@kdevelop.org. Mind that the KDevelop team is dedicated to provide the means to enable you to +program applications and therefore is not intended as a technical support team in cases where the +applications you're developing don't work due to implementation errors or misconfigurations of your +operating system. By this, we ask all users to take advantage of the mailinglist in any case you're running +into problems with the use of the IDE itself, as well as for bug reports and suggestions for improving the +functionality of the development environment. + + + + + + +The KDE and Qt Libraries + +The Norwegian company TrollTech (http://www.trolltech.com) +provides a so-called GUI toolkit, named Qt. GUI means "Graphical User Interface", and therefore, Qt-based +applications represent themselves with buttons, windows etc, allowing user input by visualizing the functions +an application provides. Such a toolkit is needed for developing graphical applications that run on the X-Window +interface on Unix Systems, because X does not contain a pre-defined user interface itself. Although other +toolkits are also available to create User Interfaces, Qt offers some technical advantages that make +application design very easy. Additionally, the Qt toolkit is also available for Microsoft Windows systems, +which allows developers to provide their applications for both platforms. + + +The KDE Team (http://www.kde.org) joined together with the goal +to make using Unix Systems more friendly, and decided to use the Qt toolkit for the development of a window +manager on X-Windows, plus a variety of tools included with the KDE packages. The K Desktop Environment +therefore contains the window manager kwm, the file manager kfm and the launch panel kpanel as the main +components plus a variety of first-class utilities and applications. After KDE was out, a lot of developers +turned their eyes towards the new environment and what it has to offer them. The KDE libraries are providing +essential methods and classes that make all applications designed with them look similar and consistent, +so the user has the great advantage that he only has to get accustomed with an application's specific +usage, not with handling dialogs or buttons. Also, KDE programs integrate themselves into the desktop and +are able to interact with the file manager via drag'n drop, offer session management and many more, if all +features offered by the KDE libraries are used. Both, the Qt toolkit and the KDE libraries, are implemented +in the C++ programming language; therefore applications that make use of these libraries are also mostly +written in C++. In the following chapter, we'll make a short trip through the libraries to see what already +is provided and how Qt and TDE applications are created in general. + + +Both, the Qt toolkit and the KDE libraries, are implemented in the C++ programming language; +therefore applications that make use of these libraries are also mostly written in C++. In the following +chapter, we'll make a short trip through the libraries to see what already is provided and how Qt and KDE +applications are created in general. + + + +The Qt GUI Toolkit + +As said, the Qt library is a toolkit that offers graphical elements that are used for creating GUI +applications and are needed for X-Window programming. Additionally, the toolkit offers: + +A complete set of classes and methods ready to use even for non-graphical programming issues +A good solution towards user interaction by virtual methods and the signal/slot mechanism +A set of predefined GUI-elements, called "widgets", that can be used easily for creating the visible elements +Additional completely pre-defined dialogs that are often used in applications such as progress and file dialogs + + + +Therefore knowing the Qt classes is very essential, even if you only want to program KDE-applications. +To have an impression on the basic concept how GUI-applications are constructed and compiled, we'll first +have a look at a sample Qt-only program; then we'll extend it to a KDE program. + + + +The first Qt Application + +As usual, programs in C++ have to contain a main() function, which is the starting point for application +execution. As we want them to be graphically visible in windows and offering user interaction, +we first have to know, how they can show themselves to the user. For an example, we'll have a look +at the first tutorial included with the Qt Online Reference Documentation and explain the basic execution +steps; also why and how the application window appears: + +#include <qapplication.h> +#include <qpushbutton.h> + +int main( int argc, char **argv ) +{ +QApplication a( argc, argv ); + +QPushButton hello( "Hello world!", 0 ); +hello.resize( 100, 30 ); + +a.setMainWidget( &hello ); +hello.show(); +return a.exec(); +} + + + +This application merely paints a window containing a button with "Hello world" as its text. As for +all Qt-based applications, you first have to create an instance of the class QApplication, represented by +variable a. + + +Next, the program creates an instance of the class QPushButton called hello, this will be the button. +The constructor of hello gets a string as a parameter, which is the contents of the widget visible as +the buttons text. + + +Then the resize() method is called on the hello button. This changes the default size a widget +(which is in this case the QPushButton) has when created to the length of 100 pixels and the height of +30 pixels. Finally, the setMainWidget() method is called for a and the show() method for hello. The +QApplication is finally executed by a.exec(), enters the main event loop and waits until it has to return +an integer value to the overlaying Operating System signaling that the application is exited. + + + + +The Reference Documentation for Qt + +Now, let's have a quick look at the reference documentation of the Qt library. To do this, start +&tdevelop; and select "Qt" from the tree in the Documentation tab. The documentation browser opens +and shows you the start page of the Qt reference. This will be your first place to get information +about Qt, it's classes and the available functions they provide. Also, the above program is the first +that is included in the tutorials section. To get to the classes we want to have a look at, +QApplication and QPushButton, select "Alphabetical Class List" +and search for the according names. Follow either of them to have a look at the class documentation. + + +Alternatively, you can use the online documentation from Trolltech's Qt Documentation + + +For QApplication, you will see the constructor and all other methods that this +class provides. If you follow a link, you will get more information about the usage and meaning of the +methods, which is very useful when you sometimes can't detect the correct use or want to have an example. +This also counts for the KDE library documentation, which uses a similar documentation type; therefore +this is almost all you have to know about using the class-references with the documentation browser. + + +Interpretation of the Sample + +Starting with QApplication, you will find all the methods used in our first example: + +the constructor QApplication() +the setMainWidget() method +the exec() method + + + +The interpretation why we use these methods is very simple: + +Create an instance of the class QApplication with the constructor, +so we can make use of the GUI elements provided by Qt +Create a widget which will be the contents of our program window +Set the widget as the main widget for a +Execute the a instance of QApplication + + + +The second object of our program is the pushbutton, an instance of the class QPushButton. +From the two constructors given to create an instance, we used the second: this accepts a text, +which is the label contents of the button; here, it is the string "Hello world!". Then we called the +resize() method to change the size of the button according to it's contents - +the button has to be larger to make the string completely visible. + + +But what about the show() method? Now, you see that like most other widgets, +QPushButton is based on a single inheritance, the documentation says, Inherits +QButton. Follow the link to the QButton class. +This shows you a lot of other widgets that are inherited by QPushButton, +which we'll use later to explain the signal/slot mechanism. Anyway, the show() +method is not listed, therefore, it must be a method that is provided by inheritance as well. The class +that QButton inherits is QWidget. Just follow the link +again, and you will see a whole bunch of methods that the QWidget class provides; including +the show() method. Now we understand what was done in the sample with the button: + +Create an instance of QPushButton, use the second constructor to set the button text +Resize the widget to its contents +Set the widget as the main widget of the QApplication instance a +Tell the widget to display itself on the screen by calling show(), an inherited method from QWidget + + + +After calling the exec() method, the application is visible to the user, +showing a window with the button showing "Hello world!". Note: GUI programs behave somewhat differently +than procedural applications. The main thing here is that the application enters a so-called +"main event loop". This means that the program has to wait for user actions and then react to it, also +that for a Qt application, the program has to be in the main event loop to start the event handling. +The next section tells you in short what this means to the programmer and what Qt offers to process +user events. + + +For already advanced users: The button has no parent declared in the constructor, therefore it +is a top-level widget alone and runs in a local event loop which doesn't need to wait for the main +event loop. See the QWidget class documentation and The KDE Library Reference Guide + + + + + + +User Interaction + +After reading the last sections, you should already know: + +What the Qt-library provides in terms of GUI applications +How a program using Qt is created and +Where and how to find information about classes that you want to use with the documentation browser + + + +Now we'll turn to give the application "life" by processing user events. Generally, the user has two ways +to interact with a program: the mouse and the keyboard. For both ways, a graphical user interface has to +provide methods that detect actions and methods that do something as a reaction to these actions. + + +The Window system therefore sends all interaction events to the according application. The +QApplication then sends them to the active window as a QEvent +and the widgets themselves have to decide what to do with them. A widget receives the event and processes +QWidget::event(QEvent*), which then decides which event has been executed +and how to react; event() is therefore the main event handler. Then, +the event() method passes the event to so-called event filters +that determine what happened and what to do with the event. If no filter signs responsible for the +event, the specialized event handlers are called. Thereby we can decide between: + + +Keyboard events -- TAB and Shift-TAB keys: + +virtual void focusInEvent(QFocusEvent *) +virtual void focusOutEvent(QFocusEvent *) + + + + +All other keyboard input: + +virtual void keyPressEvent(QKeyEvent *) +virtual void keyReleaseEvent(QKeyEvent *) + + + + +Mouse movements: + +virtual void mouseMoveEvent(QMouseEvent *) +virtual void enterEvent(QEvent *) +virtual void leaveEvent(QEvent *) + + + + +Mouse button actions + +virtual void mousePressEvent(QMouseEvent *) +virtual void mouseReleaseEvent(QMouseEvent *) +virtual void mouseDoubleClickEvent(QMouseEvent *) + + + + +Window events containing the widget + +virtual void moveEvent(QMoveEvent *) +virtual void resizeEvent(QResizeEvent *) +virtual void closeEvent(QCloseEvent *) + + + + + + +Note that all event functions are virtual and protected; therefore you can re-implement the events +that you need in your own widgets and specify how your widget has to react. QWidget +also contains some other virtual methods that can be useful in your programs; anyway, it is sufficient +to know about QWidget very well. + + + +Object Interaction by Signals and Slots + +Now we're coming to the most obvious advantages of the Qt toolkit: the signal/slot mechanism. +This offers a very handy and useful solution to object interaction, which usually is solved by +callback functions for X-Window toolkits. As this communication requires a strict programming and +sometimes makes user interface creation very difficult (as referred by the Qt documentation and explained +in Programming with Qt by K.Dalheimer), Troll Tech invented a new system where objects can emit signals +that can be connected to methods declared as slots. For the C++ part of the programmer, he only has to know +some things about this mechanism: + + +the class declaration of a class using signals/slots has to contain the Q_OBJECT macro at the beginning +(without a semicolon); and have to be derved from the QObject class + + +a signal can be emitted by the keyword emit, e.g. emit signal(parameters); from within any member function +of a class that allows signals/slots + + + +all signals used by the classes that are not inherited have to be added to the class declaration by a +signals section + + +all methods that can be connected with a signal are declared in sections with the additional keyword slot, +e.g. public slots: within the class declaration + + +the meta-object compiler moc has to run over the header file to expand the macros and to produce the +implementation (which is not necessary to know). The output files of moc are compiled also by the C++ compiler. + + + + +Another way to use signals without deriving from QObject is to use the +QSignal class- see the reference documentation for more information and example +usage. In the following, we assume you're deriving from QObject. + + +This way, your class is able to send signals anywhere and to provide slots that signals can connect +to. By using the signals, you don't have to care about who's receiving it- you just have to emit the +signal and whatever slot you want to connect to it can react to the emission. Also the slots can be used +as normal methods during implementation. + + +Now, to connect a signal to a slot, you have to use the connect() methods that +are provided by QObject or, where available, special methods that objects provide +to set the connection for a certain signal. + + + +Sample Usage + +To explain the way how to set up object-interaction, we'll take our first example again and extend it by a +simple connection: + +#include <qapplication.h> +#include <qpushbutton.h> + +int main( int argc, char **argv ) +{ +QApplication a( argc, argv ); + +QPushButton hello( "Hello world!" , 0); +hello.resize( 100, 30 ); + +a.setMainWidget( &hello ); + +QObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); + +hello.show(); +return a.exec(); +} + + + +You see, the only addition to give the button more interaction is to use a connect() + method: connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +is all you have to add. What is the meaning now? The class declaration of QObject says about the +connect() method: + + +bool connect ( const QObject * sender, const char * signal, const QObject * receiver, const char * member ) + + +This means you have to specify a QObject instance pointer that is the sender +of the signal, meaning that it can emit this signal as first parameter; then you have to specify the signal +that you want to connect to. The last two parameters are the receiver object that provides a slot, followed +by the member function which actually is the slot that will be executed on signal emission. + + +By using signals and slots, your program's objects can interact with each other easily without explicitly +depending on the type of the receiver object. You will learn more about using this mechanism for productive +usage later in this handbook. More information about the Signals/Slot mechanism can also be found in +The KDE Library Reference Guide +and the Qt online reference. + + + + + + +What KDE provides + +The KDE 3.x libraries + +The main KDE libraries you'll be using for creating your own TDE applications are: + + +the tdecore library, containing all classes that are non-visible elements to provide application functionality + + +the tdeui library, containing user interface elements like menubars, toolbars, etc. + + +the tdefile library, containing the file selection dialogs + + + + +Additionally, for specific solutions KDE offers the following libraries: + + +the tdefx library, containing pixmaps, image effects the TDEStyle extension to QStyle + + +the tdehtml library, containing KDE's html component + + +the kjs library, containing KDE's Javascript support + + +the tdeio library, containing low level access to network files + + +the tdeparts library, containing support for re-usable embeddable extendable applications + + + + +Next we'll have a look at what is needed to turn out first Qt Application into a KDE one. + + + +Example KDE Application + +In the following, you will see that writing a KDE application is not much more difficult than a +Qt application. For the use of KDE's features, you just have to use some other classes, and you're almost +done. As an example, we'll discuss the changed version of the Qt example from above: + +#include <tdeapplication.h> +#include <qpushbutton.h> + +int main( int argc, char **argv ) +{ +TDEApplication a( argc, argv ); + +QPushButton hello( "Hello world!", 0 ); +hello.resize( 100, 30 ); + +a.setTopWidget( &hello ); + +QObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); + +hello.show(); +return a.exec(); +} + + + +You see that first we have changed from QApplication to TDEApplication +. Further, we had to change the previously used setMainWidget() method +to setTopWidget, which TDEApplication uses to set the main +widget. That's it! Your first KDE application is ready - you only have to tell the compiler the KDE +include path and the linker to link in the tdecore library with -ltdecore. + + +As you now know what at least the main() function provides generally and how an +application gets visible and allows user and object interaction, we'll go on with the next chapter, +where our first application is made with &tdevelop;. There you can also test everything which was +mentioned before and see the effects. + + +What you should have looked into additionally until now is the reference documentation for Qt, +especially the QApplication, QWidget and QObject + class and the tdecore library documentation for the TDEApplication class. +The KDE Library Reference handbook +also covers a complete description about the invocation of the QApplication and +TDEApplication constructors including command-line argument processing. + + + + + + + +Creating New Applications + + +The Application Wizard + +&tdevelop;'s Application Wizard is intended to let you start working on new project with &tdevelop;. Therefore +all of your projects are first created by the wizard, and then you can start building them and extend what is +already provided by the source skeleton. You can choose from several project types according to your project goals: + + +KDE Application Framework: includes source code for a complete frame structre of a standard KDE application + + +QMake Project: Creates an application framework based around Trolltech's qmake configuration system + + +Simple hello world program: Creates a C++ terminal based program with no GUI support + + +A multitude of other program skeletons + + + + +In this chapter we'll see how the Application Wizard can be invoked and what has to be done to generate +a KDE application project. This will also be the initial step of our coverage, where we will create the +initial version of a sample project. For all other project types the steps are usualyl the same, but you +may not have as many options available. + + + + +Invoking the Application Wizard and Project Generation + +Starting the Application Wizard and the First Page + +To start with your KDE application, open &tdevelop;. From the Project menu, selection New Project. The +Application Wizard starts, and you'll see the selection tree on the first page containing available project +types that can be created. Choose the C++ subtree, then KDE, then Application Framework. + + +For our sample project, we are going to create the application KScribble. Enter this as the application +name, and change any other information at the bottom of this screen that may need it. Then, select Next. + + +Application Wizard + + + + +Version control information + +On this screen you have the ability to decide if your project will use a version control system like +CVS. For our sample project we will not use source control, so make sure the selection box reads None +and select Next. + + + +Header and Source Templates + +The next two pages show example headers that will go at the top of each of the header and source files that +you create using &tdevelop;. For now, just leave these as the default, and select Next, then Finish. If the +Finish button is not activated, you haven't set all of the options correct. Use the Back button to return +to earlier menus and correct any mistakes. + + + +Finishing Up + +Upon completion, the Application Wizard should close and the messages window should popup displaying +information about the tasks that &tdevelop; is currently doing. At the end of all of the tasks, you +should see **** Success *****. This means the application framework was successfully loaded. + + + + + +The First Build + +After our project is generated, we'll first make a trip through the source code to get a general understanding +of how the application framework looks. This won't only help us get started, but we'll know where to change +what in later steps. + + +This chapter makes the assumption that you understand the basic navigation of &tdevelop;. Consult the +KDevelop User Manual for information if you need it. + + +The Automake manager shows the project files as follows: + + +Files in our project + + + +Before diving into the sources, we'll let &tdevelop; build an run our new application. To do this, select +Build Project from the Build menu, or press F8. The output window opens and displays output messages during +the compilation phase. + +1 cd /home/caleb/kscribble && WANT_AUTOCONF_2_5=1 WANT_AUTOMAKE_1_6=1 gmake k +2 gmake all-recursive +3 gmake[1]: Entering directory `/home/caleb/kscribble' +4 Making all in doc +5 gmake[2]: Entering directory `/home/caleb/kscribble/doc' +6 Making all in . +7 gmake[3]: Entering directory `/home/caleb/kscribble/doc' +8 gmake[3]: Nothing to be done for `all-am'. +9 gmake[3]: Leaving directory `/home/caleb/kscribble/doc' +10 Making all in en +11 gmake[3]: Entering directory `/home/caleb/kscribble/doc/en' +12 /usr/local/trinity/bin/meinproc --check --cache index.cache.bz2 /home/caleb/kscribble/doc/en/index.docbook +13 gmake[3]: Leaving directory `/home/caleb/kscribble/doc/en' +14 gmake[2]: Leaving directory `/home/caleb/kscribble/doc' +15 Making all in po +16 gmake[2]: Entering directory `/home/caleb/kscribble/po' +17 gmake[2]: Nothing to be done for `all'. +18 gmake[2]: Leaving directory `/home/caleb/kscribble/po' +19 Making all in src +20 gmake[2]: Entering directory `/home/caleb/kscribble/src' +21 source='main.cpp' object='main.o' libtool=no \ +22 depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \ +23 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +24 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings + -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new + -c -o main.o `test -f 'main.cpp' || echo '/home/caleb/kscribble/src/'`main.cpp +25 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/kscribble.h -o kscribble.moc +26 source='kscribble.cpp' object='kscribble.o' libtool=no \ +27 depfile='.deps/kscribble.Po' tmpdepfile='.deps/kscribble.TPo' \ +28 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +29 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings + -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new + -c -o kscribble.o `test -f 'kscribble.cpp' || echo '/home/caleb/kscribble/src/'`kscribble.cpp +30 kscribble.cpp: In member function `void KScribble::setupActions()' +31 kscribble.cpp:107: warning: unused variable `TDEAction*custom' +32 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/kscribbleview.h -o kscribbleview.moc +33 source='kscribbleview.cpp' object='kscribbleview.o' libtool=no \ +34 depfile='.deps/kscribbleview.Po' tmpdepfile='.deps/kscribbleview.TPo' \ +35 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +36 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi + -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -c + -o kscribbleview.o `test -f 'kscribbleview.cpp' || echo '/home/caleb/kscribble/src/'`kscribbleview.cpp +37 kscribbleview.cpp: In member function `void KScribbleView::print(QPainter*, +38 int, int)': +39 kscribbleview.cpp:79: warning: unused parameter `QPainter*p' +40 kscribbleview.cpp:79: warning: unused parameter `int height' +41 kscribbleview.cpp:79: warning: unused parameter `int width' +42 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/pref.h -o pref.moc +43 source='pref.cpp' object='pref.o' libtool=no \ +44 depfile='.deps/pref.Po' tmpdepfile='.deps/pref.TPo' \ +45 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +46 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings + -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new + -c -o pref.o `test -f 'pref.cpp' || echo '/home/caleb/kscribble/src/'`pref.cpp +47 /usr/local/trinity/bin/dcopidl /home/caleb/kscribble/src/kscribbleiface.h > kscribbleiface.kidl || + ( rm -f kscribbleiface.kidl ; /bin/false ) +48 /usr/local/trinity/bin/dcopidl2cpp --c++-suffix cpp --no-signals --no-stub kscribbleiface.kidl +49 source='kscribbleiface_skel.cpp' object='kscribbleiface_skel.o' libtool=no \ +50 depfile='.deps/kscribbleiface_skel.Po' tmpdepfile='.deps/kscribbleiface_skel.TPo' \ +51 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +52 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings + -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new + -c -o kscribbleiface_skel.o `test -f 'kscribbleiface_skel.cpp' || + echo '/home/caleb/kscribble/src/'`kscribbleiface_skel.cpp +53 /bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall + -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 + -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -o kscribble -R + /usr/local/trinity/lib -R /usr/lib/qt/lib -R /usr/X11R6/lib -L/usr/X11R6/lib -L/usr/lib/qt/lib + -L/usr/local/trinity/lib main.o kscribble.o kscribbleview.o pref.o kscribbleiface_skel.o -ltdeio +54 source='kscribble_client.cpp' object='kscribble_client.o' libtool=no \ +55 depfile='.deps/kscribble_client.Po' tmpdepfile='.deps/kscribble_client.TPo' \ +56 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +57 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings + -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new + -c -o kscribble_client.o `test -f 'kscribble_client.cpp' || echo + '/home/caleb/kscribble/src/'`kscribble_client.cpp +58 /bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef + -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 + -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -o kscribble_client -R + /usr/local/trinity/lib -R /usr/lib/qt/lib -R /usr/X11R6/lib -L/usr/X11R6/lib -L/usr/lib/qt/lib + -L/usr/local/trinity/lib kscribble_client.o -ltdecore +59 gmake[2]: Leaving directory `/home/caleb/kscribble/src' +60 gmake[2]: Entering directory `/home/caleb/kscribble' +61 gmake[2]: Nothing to be done for `all-am'. +62 gmake[2]: Leaving directory `/home/caleb/kscribble' +63 gmake[1]: Leaving directory `/home/caleb/kscribble' +64 *** Success *** + + + +As you can see, we've put line numbers in front of each line which won't appear on your output but it makes it +easier to describe what is happening during the build. First of all, gmake works recursively. This means +that it starts from the directory it is invoked and goes into the subdirectories first, one at a time, then +returns to the directory it was started, processes it, then finishes. + + +Our first line of interest is 24. Notice on this line that g++, which is our C++ compiler, gets called by make +to compile the first source code file in our project - in this case main.cpp. Many extra command line options +are also being used with the g++ compiler; some of which are defaults and some of which can be configured +via &tdevelop;. + + +Before the next file (kscribble.cpp, line 29) is compiled, the moc (meta object compiler) is first +invoked on kscribble.h (line 25). This is because KScribble classes use signals/slots, so the +Q_OBJECT macro must be expanded, and the moc does this for us. The resultant file, kscribble.moc, is +used by kscribble.cpp via an #include statement inside of the file. + + + + +The source skeleton + +To conceptualize how a KDE application works, we'll first have a very close look at the source +skeleton already provided by the Application Wizard. As we already saw, we're having a set of source +and header files that build the initial code for the application and make it ready-to-run. Therefore, +the easiest way to explain the code is to follow the implementation line by line as it is processed +during executing the program until it enters the main event loop and is ready to accept user input. +Then, we'll have a look at the functionality that enables user interaction and how certain things work. +This is probably the best way to explain the framework and, as it is similar to almost all KDE +applications, will enable you to read source codes from other projects as well; additionally, you will +know where to change what part of the code to make your applications behave the way they are designed for. + + + +The main() function + +As the application begins its execution with entering the main() function, +this will be the start for our code examination. The main() function of +KScribble is implemented in the file main.cpp and can also be found using the Class Browser +by selecting the "Global Functions" folder. + +1 int main(int argc, char **argv) +2 { +3 TDEAboutData about("kscribble", I18N_NOOP("KScribble"), version, description, +4 TDEAboutData::License_GPL, "(C) 2002 Your Name", 0, 0, "you@you.com"); +5 about.addAuthor( "Your Name", 0, "you@you.com" ); +6 TDECmdLineArgs::init(argc, argv, &about); +7 TDECmdLineArgs::addCmdLineOptions(options); +8 TDEApplication app; +9 +10 // register ourselves as a dcop client +11 app.dcopClient()->registerAs(app.name(), false); +12 +13 // see if we are starting with session management +14 if (app.isRestored()) +15 RESTORE(KScribble) +16 else +17 { +18 // no session.. just start up normally +19 TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); +20 if (args->count() == 0) +21 { +22 KScribble *widget = new KScribble; +23 widget->show(); +24 } +25 else +26 { +27 int i = 0; +28 for (; i < args->count(); i++) +29 { +30 KScribble *widget = new KScribble; +31 widget->show(); +32 widget->load(args->url(i)); +33 } +34 } +35 args->clear(); +36 } +37 +38 return app.exec(); +39 } + + + +Now, what happens first is the usual creation of a TDEApplication object, but we've +added some KDE methods that set program and author information for this application. + + + +User Application Start + +... (not written yet) + + + +The Constructor + +Let's have a look at the constructor and see how this instance is called + +1 KScribble::KScribble() +2 : TDEMainWindow( 0, "KScribble" ), +3 m_view(new KScribbleView(this)), +4 m_printer(0) +5 { +6 // accept dnd +7 setAcceptDrops(true); +8 +9 // tell the TDEMainWindow that this is indeed the main widget +10 setCentralWidget(m_view); +11 +12 // then, setup our actions +13 setupActions(); +14 +15 // and a status bar +16 statusBar()->show(); +17 +18 // allow the view to change the statusbar and caption +19 connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)), +20 this, SLOT(changeStatusbar(const QString&))); +21 connect(m_view, SIGNAL(signalChangeCaption(const QString&)), +22 this, SLOT(changeCaption(const QString&))); +23 +24 } + + + +Notice that KScribble inherits the TDEMainWindow class - a +commonly used base class for TDE applications. We initialize a class called KScribbleView +as our central widget, create a KStatusBar via the statusBar() +method (line 16), and connect some signals and slots together. + + + + + + + +Application View Design + +Introduction + +When developing an application with a graphical user interface, the main work takes place in +providing a so-called "view" for the application. A view generally is a widget that displays the data +of a document and provides methods to manipulate the document contents. This can be done by the user via +the events he emits by the keyboard or the mouse; more complex operations are often processed by toolbars +and menubars which interact with the view and the document. The statusbar then provides information about +the document, view or application status. As an example, we look at how an editor is constructed and where +we can find which part. + + +An editor generally is supposed to provide an interface to view and/or change the contents of a text +document for the user. If you start Kate, you see the visual interface as the following: + + +The menubar: providing complex operations as well as opening, saving and closing files and +exiting the application. + + +The toolbar: offers icons which allow quicker access for most needed functions, + + +The statusbar: displays the status of the cursor position by the current row and column, + + +The view in the center of the window, displaying a document and offering a cursor connected to +the keyboard and the mouse to operate on the data. + + + + +Now it's easy to understand that a view is the most unique part of the application and the design +of the view decides about the usability and acceptability of an application. This means that one of +the first steps in development is to determine the purpose of the application and what kind of view +design would match best to allow any user to work with the application with a minimum of work +learning how to handle the user interface. + + +For some purposes like text editing and displaying HTML files, views are provided by the Qt and KDE +libraries; we will discuss certain aspects of these high-level widgets in the next section. +But for most applications new widgets have to be designed and implemented. It is that what makes a +programmer also a designer and where his abilities on creativity are asked. Nevertheless, you should +watch for intuitivity first. Remember, a lot of users won't accept an application that isn't: + + +graphically nice. + + +offering a lot of features + + +easy to handle + + +fast to learn how to use it + + + + +Needless to say that stability is a major design goal. Nobody can prevent bugs, but a minimum can +be reached at least by clever design goals and wide use of object-oriented design. C++ makes programming +a joy if you know how to exploit it's capabilities- inheritance, information hiding and reusablitity of +already existing code. + + +When creating a KDE or Qt project, you always have to have a view that inherits QWidget, either by +direct inheritance or because the library widget you want to use inherits QWidget. Therefore, the +Application Wizard already constructed a view that is an instance of a class yourappView, which +inherits QWidget already. + + +This chapter therefore describes how to use library widgets for creating views of KDE or +Qt applications that are generated with &tdevelop;, then we look at the libraries and what kind of +views are already offered. + + + +Using Library Views + +When your application design has been set up, you first should look for already existing code that +will make your life a lot easier. A part of this search is to look for a widget that can be used as +a view or at least as a part of it; either directly or by inheritance. The KDE and Qt libraries already +contain a set of widgets that can be used for this purpose. To use them, you have two options: + + +Remove the new view class and create an instance of a library widget; then set this as the view, + + +Change the inheritance of the provided view class to the class of the library widget to use. + + + + +In either way, it is important to know that if the application framework is currently not linked +against the library that contains the widget, the linker will fail. After you decided to use a +certain widget, look for the library to link to; then open "Project"->"Options" from the &tdevelop; +menubar. Switch to the "Linker Options" page and look for the checkmarks indicating the libraries +that are currently used. If the library of your view widget is already checked, you can leave the +project options untouched and start doing the necessary changes due to your choice. If not, and the +linker options offer to add the library by a check box, check it and press "OK" to leave the project +options dialog again. In any other case, add the library in the edit line below with the -l option. +For libraries that your application has to search for before preparing the Makefiles by the +configure script on the end-user machine, add the according search macro to the configure.in file +located at the root directory of your project and add the macro to the edit line. Mind that you have +to run "Build"->"Autoconf and automake" and "Build"->"Configure" before the Makefiles contain the +correct expansion for the library macro. + + +Also, if the include files for the library to add are not in the current include path +(which can be seen by the -I options in the output window on "Make"), you have to add the path to the +Project Options dialog -"Compiler Options" page with the -I option or the according automake macro at +the edit line for "Additional Options". + + +Qt Views + +Looking at the first page of the Qt online documentation, you will find a link to +"Widget Screenshots" where you can have a look at how the widgets Qt contains look like. +These are ready to use and can be combined together to form complex widgets to create application +views or dialogs. In the following, we'll discuss some of these which are very usable for creating +application views, but keep in mind that the KDE libraries sometimes contain other widgets for the +same purpose; those will be reviewed in the next section. + + +Here are a set of hints for what purpose you could use which Qt component: + + +If your view area isn't big enough to display all your data, the user must be enabled to scroll +over the document with bars on the left and bottom of the view. For this, Qt provides the class +QScrollView, which offers a scrollable child area. As explained, you could +inherit your own widget from QScrollView or use an instance to manage your +document's view widget. + + +to create a ScrollView yourself, inherit the View widget from QWidget +and add vertical and horizontal QScrollBars . +(This is done by KDE`s TDEHTMLView widget.) + + +For text processing, use QTextEdit. This class provides a complete +text editor widget that is already capable to cut, copy and paste text and is managed by a scrollview. + + +Use QTable to display data that is arranged in a table. +As QTable is managed by scrollbars as well, it offers a good solution for +table calculation applications. + + +To display two different widgets or two widget instances at the same time, use QSplitter +. This allows to tile views by horizontal or vertical dividers. +KMail is a good example what this would look like- the main view is separated by a +splitter vertically, the right window then is divided again horizontally. + + +QListView displays information in a list and tree. +This is useful for creating file trees or any other hierarchical information you want to interact with. + + + + +You see that Qt alone offers a whole set of widgets which are ready to use so you don't have to invent +new solutions if these match your needs. The sideffect when using standard widgets is that users already +know how to handle them and only have to concentrate on the displayed data. + + + +KDE Views + +The KDE libraries were invented to make designing applications for the K Desktop Environment easier +and capable of more functionality than what Qt alone is offering. The tdeui library offers: + + +TDEListView: a more powerful version of QListView + + +TDEIconView: a graphical viewer of icon files + + + + +The tdehtml library, on the other hand, offers a complete HTML-interpreting widget that is ready to use. +It is scrollable already, so you don't even have to take care for that. A possible use could be to +integrate it as a preview widget for an HTML editor; used by applications such as Konqueror to display HTML files. + + + + +Creating your own Views + +Not yet written + + + + + +Configuring Menubars and Toolbars + +Introduction + +Menubars and toolbars are one of the most important parts of an application to provide methods to +work with a document structure. As a general rule, you should make all functions available by the menubar. +Those methods that should not be available at a current stage of the application process should be +disabled. + + +Further, an application can only contain one menubar, but several toolbars. +Toolbars on the other hand should contain only the most frequently used commands by pixmap +icons or provide quick access methods like combos to select values. + + + +How does it work? + +Our application inherits the TDEMainWindow class, which automatically handles creating +a menu bar and tool bars for us. In the KScribble::setupActions() method there is +a call to TDEMainWindow::createGUI(). This method loads a resource file, in this +case kscribbleui.rc, to initialize menus at startup. Note that kscribbleui.rc is listed as one of the +project files in the Automake Manager. Opening that file up reveals this: + +1 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> +2 <kpartgui name="kscribble" version="1"> +3 <MenuBar> +4 <Menu name="custom"><text>C&ustom</text> +5 <Action name="custom_action" /> +6 </Menu> +7 </MenuBar> +8 </kpartgui> + + + +Explanation... + + +Another way to modify the contents of the menu and tool bars is to directly manipulate them through the +methods provided by their class. For example, the menuBar() method returns the +KMenuBar widget that the menubar for our program. Looking at the documentation for +KMenuBar and its inheritor class QMenuBar, you will find +a large number of insertItem() methods which allow you to add items to the +menu bar. + + +TDEMainWindow's methods statusBar() and +toolBar() will also provide you with applicable widgets. + + + +Keyboard Accelerator Configuration + +A very professional thing you should always add to your application are keyboard accelerators. +Those are mainly used by experienced users that want to work fast with their applications and +are willing to learn shortcuts. For this, the KDE libraries provide the class +TDEAction, which provides the keyboard accelerator keys and access to global configured +standard keyboard accelerators. + + +By default, frame applications generated by &tdevelop; only use standard keyboard accelerators +such as F1 for accessing online-help, Ctrl+N for New File etc. + + +If your application contains a lot of accelerators, you should make them configurable +by an Options-menu; either it could be combined with other application configuration in a QWidget +or stand alone. The KDE library already provides a KKeyChooser +for use in tab dialogs, whereas KKeyDialog provides a ready-to use +key-configuration dialog. + + + + + + + +Help Functions + +Introduction + +A very important part of the development process is to provide help functionality to the user +wherever possible. Most developers tend to delay this, but you should remember that a normal user +isn't necessarily a Unix expert. He may come from the the dark side of computer software usage offering +all sweets that a user may need to work himself into using an application even without ever touching the +manuals. Therefore, the KDE and Qt library provide all means usually considered making an application +professional in the eyes of the normal user by help functions that are ready to use. +Within the application, those are: + +Tool-Tips +Statusbar help +What's this...? buttons + + +Additionally, the application should provide means to access a HTML-based online manual directly +using the standard help key F1. This context based help system is provided automatically through the +TDEMainWindow class, though as the author you must provide the content. + + +As &tdevelop; also offers all types of help as well as the KDE framework generated by the +application wizard already contains support for this, this chapter will help you find out where +and how to add your help functionality. + +During the development of your application you should try to be consistent whatever you're doing; +therefore you should do the necessary steps directly while extending the code. This will prevent you +from diving into the code again and figuring out what your application does or what you intended by +certain parts of the code. + + + + +Tool-Tips + +A very easy means of providing help are tool-tips. Those are small help messages popping up while +the user moves the mouse over a widget that provides a tool-tip and disappears when the mouse moves away. +The most popular usage of tool-tips is made in toolbars where your tool-tips should be kept as small +as possible because toolbars can be configured to display their contents in various ways: +either displaying the button, button with text on the right, button with text below, text only. +This possibility should be made configurable by the user, but isn't a must-be. The text is shown +as a tool-tip anyway and a toolbar usually consists of buttons and other widgets like lineedits and +combo boxes. For a complete reference, see the TDEToolBar class reference located +in the tdeui library. + + +As an example, we have a look at the "New File" button in a generic application: + + +There, the part i18n("New File") provides a tool-tip message. It is enclosed by the i18n() +macro provided by kapp.h to translate the tool-tip towards the currently selected language. + + +Tool-tips can also be added to any custom widget by using the QToolTip +provided by Qt. An example of that would be: + + + +Extending the Statusbar + +As the applications that inherit TDEMainWindow contain a statusbar as well, +it also offers a set of statusbar messages already for all menu and toolbar items. A statusbar +help message is a short message that extends the meaning of a tool-tip or can be seen as a replacement +for a tool-tip over menubar items and is (as the name suggests) displayed in the statusbar when the user +enters a menu and highlights the menu entry. + + + +The <guibutton>What's This...?</guibutton> Button + +The What's This...? button provides help windows with the intention +that the user wants to get help about a certain widget within the working view or a toolbar item. +It is placed in the toolbar and gets activated once the user hits the button. The cursor changes +to an arrow cursor with a question mark like the button itself looks like. The the user can press on +a visible widget item and gets a help window. As an exercise, you could try this behavior with the +What's this...? button within &tdevelop;. + + +To add the What's This...? help to one of your widgets, use the static method +QWhatsThis::add(QWidget *widget, const QString &text) + + + + + +Documentation + +Introduction + +Due to the fact that projects often lack a complete set of user documentation, +all &tdevelop; projects contain a pre-build handbook that can be easily adapted; +therefore fulfiling another goal of KDE: providing enough online-help to support users that +are not familiar with an application. This chapter therefore introduces you on how to extend +the provided documentation template and what you have to do to make it available to the user. + + + +User Documentation + +The documentation for your project lies in projectdir/doc/en, or perhaps another directory if English +isn't your native language. Therein lies a file, index.docbook, in which the documentation is stored. +The format for editing this file is explained on +KDE's documentation website. + + + +Programmer Documentation + +Another important part of the documentation is including a descriptive help for your class interfaces. +This will allow you and other programmers to use your classes by reading the HTML class documentation +that can be created with KDoc. &tdevelop; supports the use of KDoc completely by creating the +KDE-library documentation, also your application frameworks are already documented. To work yourself +into the provided code, it would be a good start to read the included documentation online. +The following describes what to do to get the API documentation, where &tdevelop; helps you add it +and what kind of special tags KDoc provides. + + + + + +Internationalization + +Introdction + +i18n is an internationalization system that is used to offer internationalized versions of an +application or project. The difficulty with writing applications is that they only support the +language they originally are composed with; visually this can be seen on labels, menu entries and the +like. The goal of the internationalization is to provide applications and library functions in the +language of the user; therefore enabling users that are not native speakers the original language to make +use of the provided functionality and feel more comfortable. + + + + + + +Credits + + +(... to be written ...) + + + + + + + +Bibliography + + + +<ulink url="info://make/Top">GNU Make Manual</ulink> + +Richard M.Stallman +RolandMcGrath + + + + +<ulink url="info://automake/Top">GNU Automake</ulink> + +DavidMacKenzie +TomTromey + + + + +<ulink url="info://autoconf/Top">GNU Autoconf</ulink> + +DavidMacKenzie +BenElliston + + + + +<ulink url="info://gcc/Top">Using the GNU Compiler Collection</ulink> +Richard M.Stallman + + + +<ulink url="info://libtool/Top">GNU Libtool</ulink> + +GordonMatzigkeit +AlexandreOliva +ThomasTanner +Gary V.Vaughan + + + + +GNU Autoconf, Automake, and Libtool +1st edition +October 2000 + +Gary V.Vaughan +BenElliston +TomTromey +Ian LanceTaylor + +New Riders Publishing +ISBN 1578701902 + + + + +Advanced Programming in the UNIX(R) Environment +1st edition +June 1992 +W. RichardStevens +Addison-Wesley Pub Co +ISBN 0201563177 + + + +Thinking in C++, Volume 1: Introduction to Standard C++ +2nd Edition +April 15, 2000 +BruceEckel +Prentice Hall +ISBN 0139798099 + + + +Open Source Development with CVS +2nd Edition +October 12, 2001 + +KarlFogel +MosheBar + +The Coriolis Group +ISBN 158880173X + + + +Programming PHP +1st edition +March 2002 + +RasmusLerdorf +KevinTatroe + +O'Reilly & Associates +ISBN 1565926102 + + + +Programming Python +2nd Edition +March 2001 +MarkLutz +O'Reilly & Associates +ISBN 0596000855 + + + +Gui Programming With Python : Using the Qt Toolkit +Bk&Cd-r edition +January 2002 +BoudewijnRempt +Opendocs Llc +ISBN 0970033044 + + + +Programming Perl +The Camel book +3rd Edition +July 2000 + +LarryWall +TomChristiansen +JonOrwant + +O'Reilly & Associates +ISBN 0596000278 + + + +Learning Perl +The Lama book +3rd Edition +July 15, 2001 + +Randal L.Schwartz +TomPhoenix + +O'Reilly & Associates +ISBN 0596001320 + + + + +&underFDL; + + + + +
diff --git a/doc/kde_app_devel/kscribblefiles.png b/doc/kde_app_devel/kscribblefiles.png new file mode 100644 index 00000000..1591b3cf Binary files /dev/null and b/doc/kde_app_devel/kscribblefiles.png differ diff --git a/doc/kdearch/Makefile.am b/doc/kdearch/Makefile.am new file mode 100644 index 00000000..171f575c --- /dev/null +++ b/doc/kdearch/Makefile.am @@ -0,0 +1,2 @@ +KDE_LANG = en +KDE_DOCS = AUTO diff --git a/doc/kdearch/affine-general.png b/doc/kdearch/affine-general.png new file mode 100644 index 00000000..8e59d5e5 Binary files /dev/null and b/doc/kdearch/affine-general.png differ diff --git a/doc/kdearch/affine-rotate.png b/doc/kdearch/affine-rotate.png new file mode 100644 index 00000000..7192ed9c Binary files /dev/null and b/doc/kdearch/affine-rotate.png differ diff --git a/doc/kdearch/affine-scale.png b/doc/kdearch/affine-scale.png new file mode 100644 index 00000000..0b52fd4c Binary files /dev/null and b/doc/kdearch/affine-scale.png differ diff --git a/doc/kdearch/affine-shear.png b/doc/kdearch/affine-shear.png new file mode 100644 index 00000000..1ed5fbd8 Binary files /dev/null and b/doc/kdearch/affine-shear.png differ diff --git a/doc/kdearch/affine-translate.png b/doc/kdearch/affine-translate.png new file mode 100644 index 00000000..87265e30 Binary files /dev/null and b/doc/kdearch/affine-translate.png differ diff --git a/doc/kdearch/brushstyles.png b/doc/kdearch/brushstyles.png new file mode 100644 index 00000000..b6df50ca Binary files /dev/null and b/doc/kdearch/brushstyles.png differ diff --git a/doc/kdearch/canvas.png b/doc/kdearch/canvas.png new file mode 100644 index 00000000..dd83dae9 Binary files /dev/null and b/doc/kdearch/canvas.png differ diff --git a/doc/kdearch/capflat.png b/doc/kdearch/capflat.png new file mode 100644 index 00000000..5e1c92ce Binary files /dev/null and b/doc/kdearch/capflat.png differ diff --git a/doc/kdearch/capround.png b/doc/kdearch/capround.png new file mode 100644 index 00000000..0e66eaac Binary files /dev/null and b/doc/kdearch/capround.png differ diff --git a/doc/kdearch/capsquare.png b/doc/kdearch/capsquare.png new file mode 100644 index 00000000..35724a72 Binary files /dev/null and b/doc/kdearch/capsquare.png differ diff --git a/doc/kdearch/index.docbook b/doc/kdearch/index.docbook new file mode 100644 index 00000000..97dee33d --- /dev/null +++ b/doc/kdearch/index.docbook @@ -0,0 +1,3337 @@ + + + +]> + + + + +KDE Architecture Overview + + + + + + +Bernd +Gehrmann +
bernd@kdevelop.org
+
+
+ + +2001 +2002 +Bernd Gehrmann + + +&FDLNotice; + + +This documentation gives an overview of the KDE Development Platform + + + +KDE +architecture +development +programming + + +
+ + +Library structure + + +Libraries by name + + + + +tdecore + +The tdecore library is the basic application framework for every KDE based +program. It provides access to the configuration system, command line +handling, icon loading and manipulation, some special kinds inter-process +communication, file handling and various other utilities. + + + + +tdeui + +The tdeui library provides many widgets and standard +dialogs which Qt doesn't have or which have more features than their Qt +counterparts. It also includes several widgets which are subclassed +from Qt ones and are better integrated with the KDE desktop by +respecting user preferences. + + + + +tdeio + +The tdeio library contains facilities for asynchronous, +network transparent I/O and access to mimetype handling. It also provides the +KDE file dialog and its helper classes. + + + + +kjs + +The kjs library provides an implementation of JavaScript. + + + + +tdehtml + +The tdehtml library contains the TDEHTML part, a HTML browsing +widget, DOM API and parser, including interfaces to Java and JavaScript. + + + + + + + + + +Grouped classes + + +Core application skeleton - classes needed by almost every application. + + + + + +<ulink url="kdeapi:tdecore/TDEApplication">TDEApplication</ulink> + +Initializes and controls a KDE application. + + + + +<ulink url="kdeapi:tdecore/KUniqueApplication">KUniqueApplication</ulink> + +Makes sure only one instance of an application can run simultaneously. + + + +<ulink url="kdeapi:tdecore/TDEAboutData">TDEAboutData</ulink> + +Holds information for the about box. + + + +<ulink url="kdeapi:tdecore/TDECmdLineArgs">TDECmdLineArgs</ulink> + +Command line argument processing. + + + + + + +Configuration settings - access to KDE's hierarchical configuration +database, global settings and application resources. + + + + +<ulink url="kdeapi:tdecore/TDEConfig">TDEConfig</ulink> + +Provides access to KDE's configuration database. + + + +<ulink url="kdeapi:tdecore/KSimpleConfig">KSimpleConfig</ulink> + +Access to simple, non-hierarchical configuration files. + + + +<ulink url="kdeapi:tdecore/KDesktopFile">KDesktopFile</ulink> + +Access to .desktop files. + + + +<ulink url="kdeapi:tdecore/TDEGlobalSettings">TDEGlobalSettings</ulink> + +Convenient access to not application-specific settings. + + + + + + +File and URL handling - decoding of URLs, temporary files etc. + + + + +<ulink url="kdeapi:tdecore/KURL">KURL</ulink> + +Represents and parses URLs. + + + +<ulink url="kdeapi:tdecore/KTempFile">KTempFile</ulink> + +Creates unique files for temporary data. + + + +<ulink url="kdeapi:tdecore/KSaveFile">KSaveFile</ulink> + +Allows to save files atomically. + + + + + + +Interprocess communication - DCOP helper classes and subprocess invocation. + + + + +<ulink url="kdeapi:tdecore/TDEProcess">TDEProcess</ulink> + +Invokes and controls child processes. + + + +<ulink url="kdeapi:tdecore/KShellProcess">KShellProcess</ulink> + +Invokes child processes via a shell. + + + +<ulink url="kdeapi:tdesu/PtyProcess">PtyProcess</ulink> + +Communication with a child processes through a pseudo terminal. + + + +<ulink url="kdeapi:tdecore/KIPC">KIPC</ulink> + +Simple IPC mechanism using X11 ClientMessages. + + + +<ulink url="kdeapi:dcop/DCOPClient">DCOPClient</ulink> + +DCOP messaging. + + + +<ulink url="kdeapi:tdecore/KDCOPPropertyProxy">KDCOPPropertyProxy</ulink> + +A proxy class publishing Qt properties through DCOP. + + + +<ulink url="kdeapi:tdeui/KDCOPActionProxy">KDCOPActionProxy</ulink> + +A proxy class publishing a DCOP interface for actions. + + + + + + +Utility classes - memory management, regular expressions, string manipulation, +random numbers + + + + +<ulink url="kdeapi:tdecore/KRegExp">KRegExp</ulink> + +POSIX regular expression matching. + + + +<ulink url="kdeapi:tdecore/KStringHandler">KStringHandler</ulink> + +An extravagant interface for string manipulation. + + + +<ulink url="kdeapi:tdecore/TDEZoneAllocator">TDEZoneAllocator</ulink> + +Efficient memory allocator for large groups of small objects. + + + +<ulink url="kdeapi:tdecore/KRandomSequence">KRandomSequence</ulink> + +Pseudo random number generator. + + + + + + +Keyboard accelerators - classes helping to establish consistent key bindings +throughout the desktop. + + + + +<ulink url="kdeapi:tdecore/TDEAccel">TDEAccel</ulink> + +Collection of keyboard shortcuts. + + + +<ulink url="kdeapi:tdecore/TDEStdAccel">TDEStdAccel</ulink> + +Easy access to the common keyboard shortcut keys. + + + +<ulink url="kdeapi:tdecore/TDEGlobalAccel"></ulink> + +Collection of system-wide keyboard shortcuts. + + + + + + +Image processing - icon loading and manipulating. + + + + +<ulink url="kdeapi:tdecore/TDEIconLoader">TDEIconLoader</ulink> + +Loads icons in a theme-conforming way. + + + +<ulink url="kdeapi:tdecore/TDEIconTheme">TDEIconTheme</ulink> + +Helper classes for TDEIconLoader. + + + +<ulink url="kdeapi:tdecore/KPixmap">KPixmap</ulink> + +A pixmap class with extended dithering capabilities. + + + +<ulink url="kdeapi:tdeui/KPixmapEffect">KPixmapEffect</ulink> + +Pixmap effects like gradients and patterns. + + + +<ulink url="kdeapi:tdeui/KPixmapIO">KPixmapIO</ulink> + +Fast QImage to QPixmap conversion. + + + + + + +Drag and Drop - drag objects for colors and URLs. + + + + +<ulink url="kdeapi:tdecore/KURLDrag">KURLDrag</ulink> + +A drag object for URLs. + + + +<ulink url="kdeapi:tdeui/KColorDrag">KColorDrag</ulink> + +A drag object for colors. + + + +<ulink url="kdeapi:tdecore/KMultipleDrag">KMultipleDrag</ulink> + +Allows to construct drag objects from several others. + + + + + + +Auto-Completion + + + + +<ulink url="kdeapi:tdecore/TDECompletion">TDECompletion</ulink> + +Generic auto-completion of strings. + + + +<ulink url="kdeapi:tdeio/KURLCompletion">KURLCompletion</ulink> + +Auto-completion of URLs. + + + +<ulink url="kdeapi:tdeio/KShellCompletion">KShellCompletion</ulink> + +Auto-completion of executables. + + + + + + +Widgets - widget classes for list views, rules, color selection etc. + + + + +<ulink url="kdeapi:tdeui/TDEListView">TDEListView</ulink> + +A variant of QListView that honors KDE's system-wide settings. + + + +<ulink url="kdeapi:tdeui/TDEListView">TDEListBox</ulink> + +A variant of QListBox that honors KDE's system-wide settings. + + + +<ulink url="kdeapi:tdeui/TDEListView">TDEIconView</ulink> + +A variant of QIconView that honors KDE's system-wide settings. + + + +<ulink url="kdeapi:tdeui/TDEListView">KLineEdit</ulink> + +A variant of QLineEdit with completion support. + + + +<ulink url="kdeapi:tdeui/KComboBox">KComboBox</ulink> + +A variant of QComboBox with completion support. + + + +<ulink url="kdeapi:tdeui/TDEFontCombo">TDEFontCombo</ulink> + +A combo box for selecting fonts. + + + +<ulink url="kdeapi:tdeui/KColorCombo">KColorCombo</ulink> + +A combo box for selecting colors. + + + +<ulink url="kdeapi:tdeui/KColorButton">KColorButton</ulink> + +A button for selecting colors. + + + +<ulink url="kdeapi:tdeui/KURLCombo">KURLCombo</ulink> + +A combo box for selecting file names and URLs. + + + +<ulink url="kdeapi:tdefile/KURLRequester">KURLRequester</ulink> + +A line edit for selecting file names and URLs. + + + +<ulink url="kdeapi:tdeui/KRuler">KRuler</ulink> + +A ruler widget. + + + +<ulink +url="kdeapi:tdeui/KAnimWidget">KAnimWidget</ulink> + +animations. + + + +<ulink url="kdeapi:tdeui/KNumInput">KNumInput</ulink> + +A widget for inputting numbers. + + + +<ulink url="kdeapi:tdeui/KPasswordEdit">KPasswordEdit</ulink> + +A widget for inputting passwords. + + + + + + +Dialogs - full-featured dialogs for file, color and font selection. + + + + +<ulink url="kdeapi:tdefile/KFileDialog">KFileDialog</ulink> + +A file selection dialog. + + + +<ulink url="kdeapi:tdeui/KColorDialog">KColorDialog</ulink> + +A color selection dialog. + + + +<ulink url="kdeapi:tdeui/TDEFontDialog">TDEFontDialog</ulink> + +A font selection dialog. + + + +<ulink url="kdeapi:tdefile/TDEIconDialog">TDEIconDialog</ulink> + +An icon selection dialog. + + + +<ulink url="kdeapi:tdeui/KKeyDialog">KKeyDialog</ulink> + +A dialog for editing keyboard bindings. + + + +<ulink url="kdeapi:tdeui/KEditToolBar">KEditToolBar</ulink> + +A dialog for editing toolbars. + + + +<ulink url="kdeapi:tdeui/KTipDialog">KTipDialog</ulink> + +A Tip-of-the-day dialog. + + + +<ulink url="kdeapi:tdeui/TDEAboutDialog">TDEAboutDialog</ulink> + +An about dialog. + + + +<ulink url="kdeapi:tdeui/KLineEditDlg">KLineEditDlg</ulink> + +A simple dialog for entering text. + + + +<ulink url="kdeapi:tdefile/KURLRequesterDlg">KURLRequesterDlg</ulink> + +A simple dialog for entering URLs. + + + +<ulink url="kdeapi:tdeui/KMessageBox">KMessageBox</ulink> + +A dialog for signaling errors and warnings. + + + +<ulink url="kdeapi:tdeui/KPasswordDialog">KPasswordDialog</ulink> + +A dialog for inputting passwords. + + + + + + +Actions and XML GUI + + + + +<ulink url="kdeapi:tdeui/TDEAction">TDEAction</ulink> + +Abstraction for an action that can be plugged into menu bars and tool bars. + + + +<ulink url="kdeapi:tdeui/TDEActionCollection">TDEActionCollection</ulink> + +A set of actions. + + + +<ulink url="kdeapi:tdeui/KXMLGUIClient">KXMLGUIClient</ulink> + +A GUI fragment consisting of an action collection and a DOM tree representing their location in the GUI. + + + +<ulink url="kdeapi:tdeparts/KPartManager">KPartManager</ulink> + +Manages the activation of XMLGUI clients. + + + + + + +Plugins and Components + + + + +<ulink url="kdeapi:tdecore/KLibrary">KLibrary</ulink> + +Represents a dynamically loaded library. + + + +<ulink url="kdeapi:tdecore/KLibrary">KLibLoader</ulink> + +Shared library loading. + + + +<ulink url="kdeapi:tdecore/KLibFactory">KLibFactory</ulink> + +Object factory in plugins. + + + +<ulink url="kdeapi:tdeio/KServiceType">KServiceType</ulink> + +Represents a service type. + + + +<ulink url="kdeapi:tdeio/KService">KService</ulink> + +Represents a service. + + + +<ulink url="kdeapi:tdeio/KMimeType">KMimeType</ulink> + +Represents a MIME type. + + + +<ulink url="kdeapi:tdeio/KServiceTypeProfile">KServiceTypeProfile</ulink> + +User preferences for MIME type mappings. + + + +<ulink url="kdeapi:tdeio/KServiceTypeProfile">TDETrader</ulink> + +Querying for services. + + + + + + + + + + + + +Graphics + + +Low-level graphics with QPainter + + +Rendering with QPainter + + +Qt's low level imaging model is based on the capabilities provided by X11 and +other windowing systems for which Qt ports exist. But it also extends these by +implementing additional features such as arbitrary affine transformations for +text and pixmaps. + + + +The central graphics class for 2D painting with Qt is +QPainter. It can +draw on a +QPaintDevice. +There are three possible paint devices implemented: One is +QWidget +which represents a widget on the screen. The second is +QPrinter which +represents a printer and produces Postscript output. The third it +the class +QPicture which +records paint commands and can save them on disk and play them back +later. A possible storage format for paint commands is the W3C standard +SVG. + + + +So, it is possible to reuse the rendering code you use for displaying a +widget for printing, with the same features supported. Of course, in +practice, the code is used in a slightly different context. Drawing +on a widget is almost exclusively done in the paintEvent() method +of a widget class. + + + +void FooWidget::paintEvent() +{ + QPainter p(this); + // Setup painter + // Use painter +} + + + +When drawing on a printer, you have to make sure to use QPrinter::newPage() +to finish with a page and begin a new one - something that naturally is not +relevant for painting widgets. Also, when printing, you may want to use the +device metrics +in order to compute coordinates. + + + + + + +Transformations + + +By default, when using QPainter, it draws in the natural coordinate +system of the device used. This means, if you draw a line along the horizontal +axis with a length of 10 units, it will be painted as a horizontal line +on the screen with a length of 10 pixels. However, QPainter can apply arbitrary +affine transformations before actually rendering shapes and curves. An +affine transformation maps the x and y coordinates linearly into x' and +y' according to + + + + + + + +The 3x3 matrix in this equation can be set with QPainter::setWorldMatrix() and +is of type QWMatrix. +Normally, this is the identity matrix, i.e. m11 and m22 are one, and the +other parameters are zero. There are basically three different groups of +transformations: + + + + + +Translations + +These move all points of an object by a fixed amount in +some direction. A translation matrix can be obtained by calling +method m.translate(dx, dy) for a QWMatrix. This corresponds to the +matrix + + + + + + + + + + +Scaling + +These stretch or shrink the coordinates of an object, making +it bigger or smaller without distorting it. A scaling transformation +can be applied to a QWMatrix by calling m.scale(sx, sy). This corresponds +to the matrix + + + + + + + + +By setting one of the parameters to a negative value, one can +achieve a mirroring of the coordinate system. + + + + + +Shearing + +A distortion of the coordinate system with two +parameters. A shearing transformation can be applied by calling +m.shear(sh, sv), corresponding to the matrix + + + + + + + + + + +Rotating + +This rotates an object. A rotation transformation can be +applied by calling m.rotate(alpha). Note that the angle has to be given +in degrees, not as mathematical angle! The corresponding matrix is + + + + + + + + +Note that a rotation is equivalent with a combination of +scaling and shearing. + + + + + + + +Here are some pictures that show the effect of the elementary +transformation to our masquot: + + + + + + + + + + + + + + + + + + + + +a) Normal +b) Rotated by 30 degrees +c) Sheared by 0.4 +d) Mirrored + + + + + + +Transformations can be combined by multiplying elementary matrices. Note that +matrix operations are not commutative in general, and therefore the combined +effect of of a concatenation depends on the order in which the matrices are +multiplied. + + + + + + +Setting stroking attributes + + +The rendering of lines, curves and outlines of polygons can be modified by +setting a special pen with QPainter::setPen(). The argument of this function is a +QPen object. The properties +stored in it are a style, a color, a join style and a cap style. + + + +The pen style is member of the enum +Qt::PenStyle. +and can take one of the following values: + + + + + + + +The join style is a member of the enum +Qt::PenJoinStyle. +It specifies how the junction between multiple lines which are attached to each +other is drawn. It takes one of the following values: + + + + + + + + + + + + + + + + + +a) MiterJoin +c) BevelJoin +b) RoundJoin + + + + + + +The cap style is a member of the enum +Qt::PenCapStyleand specifies how the end points of lines are drawn. It takes one of the values +from the following table: + + + + + + + + + + + + + + + + + +a) FlatCap +b) SquareCap +c) RoundCap + + + + + + + + + +Setting fill attributes + + +The fill style of polygons, circles or rectangles can be modified by setting +a special brush with QPainter::setBrush(). This function takes a +QBrush object as argument. +Brushes can be constructed in four different ways: + + + + +QBrush::QBrush() - This creates a brush that does not fill shapes. + + +QBrush::QBrush(BrushStyle) - This creates a black brush with one of the default +patterns shown below. + + +QBrush::QBrush(const QColor &, BrushStyle) - This creates a colored brush +with one of the patterns shown below. + + +QBrush::QBrush(const QColor &, const QPixmap) - This creates a colored +brush with the custom pattern you give as second parameter. + + + + +A default brush style is from the enum +Qt::BrushStyle. +Here is a picture of all predefined patterns: + + + + + + + +A further way to customize the brush behavior is to use the function +QPainter::setBrushOrigin(). + + + + + + +Color + + +Colors play a role both when stroking curves and when filling shapes. In Qt, +colors are represented by the class +QColor. Qt does not support +advanced graphics features like ICC color profiles and color correction. Colors +are usually constructed by specifying their red, green and blue components, as +the RGB model is the way pixels are composed of on a monitor. + + + +It is also possible to use hue, saturation and value. This HSV representation is +what you use in the Gtk color dialog, e.g. in GIMP. There, the hue corresponds +to the angle on the color wheel, while the saturation corresponds to the +distance from the center of the circle. The value can be chosen with a separate +slider. + + + + + + +Other settings + + +Normally, when you paint on a paint device, the pixels you draw replace those +that were there previously. This means, if you paint a certain region with +a red color and paint the same region with a blue color afterwards, only +the blue color will be visible. Qt's imaging model does not support +transparency, i.e. a way to blend the painted foreground with the background. +However, there is a simple way to combine background and foreground with +boolean operators. The method QPainter::setRasterOp() sets the used operator, +which comes from the enum +RasterOp. + + + +The default is CopyROP which ignores the background. Another popular choice is +XorROP. If you paint a black line with this operator on a colored image, then +the covered area will be inverted. This effect is for example used to create +the rubberband selections in image manipulation programs known as +"marching ants". + + + + + + +Drawing graphics primitives + + +In the following we list the elementary graphics elements supported by +QPainter. Most of them exist in several overloaded versions which take a +different number of arguments. For example, methods that deal with rectangles +usually either take a +QRect as argument or a set +of four integers. + + + + +Drawing a single point - drawPoint(). + + +Drawing lines - drawLine(), drawLineSegments() and drawPolyLine(). + + +Drawing and filling rectangles - drawRect(), drawRoundRect(), +fillRect() and eraseRect(). + + +Drawing and filling circles, ellipses and parts or them - +drawEllipse(), drawArc(), drawPie and drawChord(). + + +Drawing and filling general polygons - drawPolygon(). + + +Drawing bezier curves - drawQuadBezier() [drawCubicBezier in Qt 3.0]. + + + + + + + +Drawing pixmaps and images + + +Qt provides two very different classes to represent images. + + + +QPixmap directly corresponds +to the pixmap objects in X11. Pixmaps are server-side objects and may - on a +modern graphics card - even be stored directly in the card's memory. This makes +it very efficient to transfer pixmaps to the screen. Pixmaps also act as +an off-screen equivalent of widgets - the QPixmap class is a subclass of +QPaintDevice, so you can draw on it with a QPainter. Elementary drawing +operations are usually accelerated by modern graphics. Therefore, a common usage +pattern is to use pixmaps for double buffering. This means, instead of painting +directly on a widget, you paint on a temporary pixmap object and use the +bitBlt +function to transfer the pixmap to the widget. For complex repaints, this helps +to avoid flicker. + + + +In contrast, QImage objects +live on the client side. Their emphasis in on providing direct access to the +pixels of the image. This makes them of use for image manipulation, and things +like loading and saving to disk (QPixmap's load() method takes QImage as +intermediate step). On the other hand, painting an image on a widget is a +relatively expensive operation, as it implies a transfer to the X server, +which can take some time, especially for large images and for remote servers. +Depending on the color depth, the conversion from QImage to QPixmap may also +require dithering. + + + + + + +Drawing text + + +Text can be drawn with one of the overloaded variants of the method +QPainter::drawText(). These draw a QString either at a given point or in a given +rectangle, using the font set by QPainter::setFont(). There is also a parameter +which takes an ORed combination of some flags from the enums +Qt::AlignmentFlags +and +Qt::TextFlags + + + +Beginning with version 3.0, Qt takes care of the complete text layout even for +languages written from right to left. + + + +A more advanced way to display marked up text is the +QSimpleRichText +class. Objects of this class can be constructed with a piece of text using +a subset of the HTML tags, which is quite rich and provides even tables. +The text style can be customized by using a +QStyleSheet (the +documentation of the tags can also be found here). Once the rich text object has +been constructed, it can be rendered on a widget or another paint device with +the QSimpleRichText::draw() method. + + + + + + + + +Structured graphics with QCanvas + + +QPainter offers a powerful imaging model for painting on widgets and pixmaps. +However, it can also be cumbersome to use. Each time your widget receives +a paint event, it has to analyze the QPaintEvent::region() or +QPaintEvent::rect() which has to be redrawn. Then it has to setup a +QPainter and paint all objects which overlap with that region. For example, +image a vector graphics program which allows to drag objects like polygons, +circles and groups of them around. Each time those objects move a bit, the +widget's mouse event handler triggers a paint event for the whole area covered +by the objects in their old position and in their new position. Figuring +out the necessary redraws and doing them in an efficient way can be difficult, +and it may also conflict with the object-oriented structure of the program's +source code. + + + +As an alternative, Qt contains the class +QCanvas in which +you put graphical objects like polygons, text, pixmaps. You may also provide +additional items by subclassing +QCanvasItem or +one of its more specialized subclasses. A canvas can be shown on the screen by +one or more widgets of the class +QCanvasView which +you have to subclass in order to handle user interactions. Qt takes care of +all repaints of objects in the view, whether they are caused by the widget +being exposed, new objects being created or modified or other things. By using +double buffering, this can be done in an efficient and flicker-free way. + + + +Canvas items can overlap each other. In this case, the visible one depends on +the z order which can be assigned by QCanvasItem::setZ(). Items can also be +made visible or invisible. You can also provide a background to be drawn +"behind" all items and a foreground. For associating mouse events with objects, +in the canvas, there is the method QCanvas::collisions() which returns a list +of items overlapping with a given point. Here we show a screenshot of a canvas +view in action: + + + + + + + +Here, the mesh is drawn in the background. Furthermore, there is a +QCanvasText item and a violet QCanvasPolygon. The butterfly is a +QCanvasPixmap. It has transparent areas, so you can see the underlying +items through it. + + + +A tutorial on using QCanvas for writing sprite-based games can be +found here. + + + + + + +3D graphics with OpenGL + + +Low-level interface + + +The de facto standard for rendering 3D graphics today is +OpenGL. Implementations of this +specification come with Microsoft Windows, Mac OS X and XFree86 and often +support the hardware acceleration features offered by modern graphics cards. +OpenGL itself only deals with rendering on a specified area of the framebuffer +through a GL context and does not have any interactions +with the toolkit of the environment + + + +Qt offers the widget QGLWidget +which encapsulates a window with an associated GL context. Basically, you use it +by subclassing it and reimplementing some methods. + + + + + +Instead of reimplementing paintEvent() and using QPainter to draw the widget's +contents, you override paintGL() and use GL commands to render a scene. QLWidget +will take care of making its GL context the current one before paintGL() is +called, and it will flush afterwards. + + + +The virtual method initializeGL() is called once before the first time resizeGL() +or paintGL() are called. This can be used to construct display lists for objects, +and make any initializations. + + + +Instead of reimplementing resizeEvent(), you override resizeGL(). This can +be used to set the viewport appropriately. + + + +Instead of calling update() when the state of the scene has changed - for example +when you animate it with a timer -, you should call updateGL(). This will trigger +a repaint. + + + + + +In general, QGLWidget behaves just like any other widget, i.e. for example +you can process mouse events as usual, resize the widget and combine it with +others in a layout. + + + + + + + +Qt contains some examples of QGLWidget usage in its demo +example. A collection of tutorials can be found +here, +and more information and a reference of OpenGL is available on the +OpenGL homepage. + + + + + + +High-level interfaces + + +OpenGL is a relatively low-level interface for drawing 3D graphics. In the same +way QCanvas gives the programmer a higher-level interface which details with +objects and their properties, there are also high-level interfaces for 3D graphics. +One of the most popular is Open Inventor. Originally a technology developed by SGI, +there is today also the open source implementation +Coin, complemented by a toolkit binding to Qt +called SoQt. + + + +The basic concept of Open Inventor is that of a scene. +A scene can be loaded from disk and saved in a special format closely related +to VRML. A scene consists of a +collection of objects called nodes. Inventor already +provides a rich collection of reusable nodes, such as cubes, cylinders and +meshes, furthermore light sources, materials, cameras etc. Nodes are +represented by C++ classes and can be combined and subclassed. + + + +An introduction to Inventor can be found +here +(in general, you can substitute all mentions of SoXt by SoQt in this article). + + + + + + + + + + + +User interface + + +The action pattern + + + + + + + +Defining menus and toolbars in XML + + +Introduction + + +While the action pattern +allows to encapsulate actions triggered by the user in an object which can be +"plugged" somewhere in the menu bars or toolbars, it does not by itself solve +the problem of constructing the menus themselves. In particular, you have to +build all popup menus in C++ code and explicitly insert the actions in a +certain order, under consideration of the style guide for standard actions. +This makes it pretty difficult to allow the user to customize the menus or +change shortcuts to fit his needs, without changing the source code. + + + +This problem is solved by a set of classes called XMLGUI. +Basically, this separates actions (coded in C++) from their appearance in menu +bars and tool bars (coded in XML). Without modifying any source code, menus +can be simply customized by adjusting an XML file. Furthermore, it helps +to make sure that standard actions (such as +FileOpen +or HelpAbout) +appear in the locations suggested by the style guide. XMLGUI is especially +important for modular programs, where the items appearing in the menu bar may +come from many different plugins or parts. + + + +KDE's class for toplevel windows, +TDEMainWindow, +inherits +KXMLGUIClient +and therefore supports XMLGUI out of the box. All actions created within it must +have the client's actionCollection() as parent. A call to +createGUI() will then build the whole set of menu and tool +bars defined the applications XML file (conventionally with the suffix +ui.rc). + + + + + + +An example: Menu in KView + + +In the following, we take KDE's image view KView as +example. It has a ui.rc file named +kviewui.rc which is installed with the +Makefile.am snippet + + + +rcdir = $(kde_datadir)/kview +rc_DATA = kviewui.rc + + + +Here is an excerpt from the kviewui.rc file. For +simplicity, we show only the definition of the View menu. + + + +<!DOCTYPE kpartgui> +<kpartgui name="kview"> + <MenuBar> + <Menu name="view" > + <Action name="zoom50" /> + <Action name="zoom100" /> + <Action name="zoom200" /> + <Action name="zoomMaxpect" /> + <Separator/> + <Action name="fullscreen" /> + </Menu> + </MenuBar> +</kpartgui> + + + +The corresponding part of the setup in C++ is: + + + + KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); + KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); + KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); + new TDEAction ( i18n("&Half size"), ALT+Key_0, + this, SLOT(slotHalfSize()), + actionCollection(), "zoom50" ); + new TDEAction ( i18n("&Normal size"), ALT+Key_1, + this, SLOT(slotDoubleSize()), + actionCollection(), "zoom100" ); + new TDEAction ( i18n("&Double size"), ALT+Key_2, + this, SLOT(slotDoubleSize()), + actionCollection(), "zoom200" ); + new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, + this, SLOT(slotFillScreen()), + actionCollection(), "zoomMaxpect" ); + new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, + this, SLOT(slotFullScreen()), + actionCollection(), "fullscreen" ); + + + +The View menu resulting from this GUI definition looks like +in this screenshot: + + + + + + + +The XML file begins with a document type declaration. The DTD for kpartgui can +be found in the tdelibs sources in tdeui/kpartgui.dtd. The +outermost element of the file contains the instance name of the application as +attribute. It can also contain a version number in the form "version=2". This +is useful when you release new versions of an application with a changed menu +structure, e.g. with more features. If you bump up the version number of the +ui.rc file, KDE makes sure that any customized version of +the file is discarded and the new file is used instead. + + + +The next line, <MenuBar>, contains a declaration of a +menu bar. You can also insert any number of <ToolBar> +declarations in order to create some tool bars. The menu contains a submenu +with the name "view". This name is already predefined, and thus you see a +translated version of the word "View" in the screenshot. If you declare your +own submenus, you have to add the title explicitly. For example, +KView has a submenu with the title "Image" which is +declared as follows: + + + +<Menu name="image" > + <text>&amp;Image</text> + ... +</Menu> + + + +In KDE's automake framework, such titles are automatically extracted and put +into the application's .po +file , so it is considered by translators. Note that you have to write the +accelerator marker "&" in the form XML compliant form "&amp;". + + + +Let us come back to the example. KView's +View menu contains a couple of custom actions: +zoom50, zoom100, +zoom200, zoomMaxpect and +fullscreen, declared with a +<Action> element. The separator in the +screenshots corresponds to the <Separator> element. + + + +You will note that some menu items do not not have a corresponding element in +the XML file. These are standard actions. Standard +actions are created by the class +KStdAction. +When you create such actions in your application (such as in the C++ example +above), they will automatically be inserted in a prescribed position, and +possibly with an icon and a shortcut key. You can look up these locations in +the file tdeui/ui_standards.rc in the tdelibs sources. + + + + + + +An example: Toolbars in Konqueror + + +For the discussion of toolbars, we switch to +Konqueror's GUI definition. This excerpt defines +the location bar, which contains the input field for URLs. + + + +<ToolBar name="locationToolBar" fullWidth="true" newline="true" > + <text>Location Toolbar</text> + <Action name="clear_location" /> + <Action name="location_label" /> + <Action name="toolbar_url_combo" /> + <Action name="go_url" /> +</ToolBar> + + + +The first thing we notice is that there are a lot more attributes than for +menu bars. These include: + + + + + +fullWidth: Tells XMLGUI that the toolbar has the same width as the + toplevel window. Af this is "false", the toolbar only takes as much space as + necessary, and further toolbars are put in the same row. + + + +newline: This is related to the option above. If newline is "true", +the toolbar starts a new row. Otherwise it may be put in the row together +with the previous toolbar. + + + +noEdit: Normally toolbars can be customized by the user, +e.g. in SettingsConfigure +Toolbars in +Konqueror. Setting this option to "true" marks this +toolbar as not editable. This is important for toolbars which are filled with +items at runtime, e.g. Konqueror's bookmark toolbar. + + + +iconText: Tells XMLGUI to show the text of the action next to the +icon. Normally, the text is only shown as a tooltip when the mouse cursor +remains over the icon for a while. Possible values for this attribute are +"icononly" (shows only the icon), "textonly" (shows only the text), +"icontextright" (shows the text on the right side of the icon) and +"icontextbottom" (shows the text beneath the icon). + + + + +hidden: If this is "true", the toolbar is not visible initially +and must be activated by some menu item. + + + + +position: The default for this attribute is "top", meaning that the +toolbar is positioned under the menu bar. For programs with many tools, +such as graphics programs, it may be interesting to replace this with +"left", "right" or "bottom". + + + + + + + + +Dynamical menus + + +Obviously, an XML can only contain a static description of a user interface. +Often, there are menus which change at runtime. For example, +Konqueror's Location menu +contains a set of items Open with Foo with the +applications able to load a file with a given MIME type. Each time the +document shown changes, the list of menu items is updated. XMLGUI is prepared +to handle such cases with the notion of action lists. +An action list is declared as one item in the XML file, but consists of +several actions which are plugged into the menu at runtime. The above example +is implemented with the following declaration in +Konqueror's XML file: + + + +<Menu name="file"> + <text>&amp;Location</text> + ... + <ActionList name="openwith"> + ... +</Menu> + + + +The function KXMLGUIClient::plugActionList() is then used +to add actions to be displayed, whereas the function +KXMLGuiClient::unplugActionList() removes all +plugged actions. The routine responsible for updating looks as follows: + + + +void MainWindow::updateOpenWithActions() +{ + unplugActionList("openwith"); + openWithActions.clear(); + for ( /* iterate over the relevant services */ ) { + TDEAction *action = new TDEAction( ...); + openWithActions.append(action); + } + plugActionList("openwith", openWithActions); +} + + + +Note that in contrast to the static actions, the ones created here are +not constructed with the action collection as parent, and +you are responsible for deleting them for yourself. The simplest way to achievethis +is by using openWithActions.setAutoDelete(true) in the above +example. + + + + + + +Context menus + + +The examples above only contained cases where a main window's menubar and +toolbars were created. In the cases, the processes of constructing these +containers is completely hidden from you behind the +createGUI() call (except if you have custom containers). +However, there are cases, where you want to construct other containers and +populate them with GUI definitions from the XML file. One such example are +context menus. In order to get a pointer to a context menu, you have to +ask the client's factory for it: + + + +void MainWindow::popupRequested() +{ + QWidget *w = factory()->container("context_popup", this); + QPopupMenu *popup = static_cast<QPopupMenu *>(w); + popup->exec(QCursor::pos()); +} + + + +The method KXMLGUIFactory::container() used above looks +whether it finds a container in the XML file with the given name. Thus, a +possible definition could look as follows: + + + +... +<Menu name="context_popup"> + <Action name="file_add"/> + <Action name="file_remove"/> +</Menu> +... + + + + + + + + +Providing online help + + +Making a program easy and intuitive to use involves a wide range of +facilities which are usually called online help. Online help has several, +partially conflicting goals: on the one, it should give the user answers +to the question "How can I do a certain task?", on the other hand it +should help the user exploring the application and finding features he +doesn't yet know about. It is important to recognize that this can only +be achieved by offering several levels of help: + + + + + +Tooltips are tiny labels that pop up over user interface elements when +the mouse remains there longer. They are especially important for tool- +bars, where icons are not always sufficient to explain the purpose of +a button. + + + +"What's this?" help is usually a longer and richer explanation of a widget +or a menu item. It is also more clunky to use: In dialogs, it can be invoked +in two ways: either by pressing +ShiftF1 or by clicking +on the question mark in the title bar (where the support of the latter depends +on the window manager). The mouse pointer then turns into an arrow with a +question mark, and the help window appears when a user interfact element has +been clicked. "What's this?" help for menu items is usually activated by a +button in the toolbar which contains an arrow and a question mark. + + + +The problem with this approach is that the user can't see whether a widget +provides help or not. When the user activates the question mark button and +doesn't get any help window when clicking on a user interface element, he +will get frustrated very quickly. + + + +The advantage of "What's this?" help windows as provided by Qt and KDE is that +they can contain rich text, +i.e. the may contain different fonts, bold and italic text and even images and tables. + + + +An example of "What's this?" help: + + + + + + + + + +Finally, every program should have a manual. A manual is normally viewed in +KHelpCenter by activating the +Help menu. That means, a complete additional application +pops up and diverts the user from his work. Consequently, consulting the +manual should only be necessary if other facilities like tooltips and what's +this help are not sufficient. Of course, a manual has the advantage that it +does not explain single, isolated aspects of the user interface. Instead, it +can explain aspects of the application in a greater context. Manuals for KDE +are written using the DocBook markup +language. + + + + + +From the programmer's point of view, Qt provides an easy to use API for online +help. To assign a tooltip to widget, use the +QToolTip class. + + + +QToolTip::add(w, i18n("This widget does something.")) + + + +If the menu bars and tool bars are created using the +action pattern, the string used as tooltip is derived from the first argument +of the TDEAction constructor: + + + +action = new TDEAction(i18n("&Delete"), "editdelete", + SHIFT+Key_Delete, actionCollection(), "del") + + + +Here it is also possible to assign a text which is shown in the status bar when the +respective menu item is highlighted: + + + +action->setStatusText(i18n("Deletes the marked file")) + + + +The API for "What's this?' help is very similar. In dialogs, use the following +code: + + + +QWhatsThis::add(w, i18n("<qt>This demonstrates <b>Qt</b>'s" + " rich text engine.<ul>" + "<li>Foo</li>" + "<li>Bar</li>" + "</ul></qt>")) + + + +For menu items, use + + + +action->setWhatsThis(i18n("Deletes the marked file")) + + + +The invocation of KHelpCenter is encapsulated in the +TDEApplication +class. In order to show the manual of your application, just use + + + +kapp->invokeHelp() + + + +This displays the first page with the table of contents. When you want to +display only a certain section of the manual, you can give an additional +argument to invokeHelp() determining the anchor which +the browser jumps to. + + + + + + + + + +Components and services + + +KDE services + + +What are KDE services? + + +The notion of a service is a central concept in KDE's +modular architecture. There is no strict technical implementation connected +with this term - services can be plugins in the form of shared libraries, +or they can be programs controlled via DCOP. +By claiming to be of a certain service type, a service +promises to implement certain APIs or features. In C++ terms, one can think +of a service type as an abstract class, and a service as an implementation +of that interface. + + + +The advantage of this separation is clear: An application utilizing a service +type does not have to know about possible implementations of it. It just uses +the APIs associated with the service type. In this way, the used service can be +changed without affecting the application. Also, the user can configure which +services he prefers for certain features. + + + +Some examples: + + + + + +The HTML rendering engine used in Konqueror is an +embedable component that implements the service types +KParts/ReadOnlyPart and Browser/View. + + +In TDevelop HEAD, most functionality is packaged in +plugins with the service type TDevelop/Part. At startup, +all services with this type are loaded, such that you can extend the IDE in a +very flexible way. + + +In the icon view, Konqueror displays - if enabled - +thumbnail pictures of images, HTML pages, PDF and text files. This ability can +be extended. If you want it to display preview pictures of your own data files +with some MIME type, you can implement a service with service type +ThumbCreator. + + + + + +Obviously, a service is not only characterized by the service types it +implements, but also by some properties. For example, a +ThumbCreator does not only claim to implement the C++ class with the type +ThumbCreator, it also has a list of MIME types it is +responsible for. Similarly, TDevelop parts have the programming language they +support as a property. When an application requests a service type, it can +also list constraints on the properties of the service. In the above example, +when TDevelop loads the plugins for a Java project, it asks only for the +plugins which have Java as the programming language property. For this +purpose, KDE contains a full-blown CORBA-like trader with +a complex query language. + + + + + + +Defining service types + + +New service types are added by installing a description of them into the +directory TDEDIR/share/servicetypes. In an automake +framework, this can be done with this Makefile.am +snippet: + + + +kde_servicetypesdir_DATA = tdeveloppart.desktop +EXTRA_DIST = $(kde_servicetypesdir_DATA) + + + +The definition tdeveloppart.desktop of a +TDevelop part looks as follows: + + + +[Desktop Entry] +Type=ServiceType +X-TDE-ServiceType=TDevelop/Part +Name=TDevelop Part + +[PropertyDef::X-TDevelop-Scope] +Type=QString + +[PropertyDef::X-TDevelop-ProgrammingLanguages] +Type=QStringList + +[PropertyDef::X-TDevelop-Args] +Type=QString + + + +In addition to the usual entries, this example demonstrates how you declare +that a service has some properties. Each property definition corresponds +to a group [PropertyDef::name] in the configuration file. In +this group, the Type entry declares the type of the property. +Possible types are everything that can be stored in a +QVariant. + + + + + + +Defining shared library services + + +Service definitions are stored in the directory +TDEDIR/share/services: + + + +kde_servicesdir_DATA = kdevdoxygen.desktop +EXTRA_DIST = $(kde_servicesdir_DATA) + + + +The content of the following example file +kdevdoxygen.desktop defines the +KDevDoxygen plugin with the service type +TDevelop/Part: + + + +[Desktop Entry] +Type=Service +Comment=Doxygen +Name=KDevDoxygen +ServiceTypes=TDevelop/Part +X-TDE-Library=libkdevdoxygen +X-TDevelop-ProgrammingLanguages=C,C++,Java +X-TDevelop-Scope=Project + + + +In addition to the usual declarations, an important entry is +X-TDE-Library. This contains the name of the libtool +library (without the .la extension). It also fixes +(with the prefix init_ prepended) the name of the exported +symbol in the library which returns an object factory. For the above example, +the library must contain the following function: + + + +extern "C" { + void *init_libkdevdoxygen() + { + return new DoxygenFactory; + } +}; + + + +The type of the factory class DoxygenFactory depends on +the specific service type the service implements. In our example of a TDevelop +plugin, the factory must be a KDevFactory (which +inherits KLibFactory). More common examples are +KParts::Factory +which is supposed to produce +KParts::ReadOnlyPart +objects or in most cases the generic +KLibFactory. + + + + + + +Using shared library services + + +In order to use a shared library service in an application, you need to obtain a +KService object +representing it. This is discussed in the +section about MIME types (and in a section about the +trader to be written :-) + + + +With the KService object at hand, you can very simply +load the library and get a pointer to its factory object: + + + +KService *service = ... +QString libName = QFile::encodeName(service->library()); +KLibFactory *factory = KLibLoader::self()->factory(libName); +if (!factory) { + QString name = service->name(); + QString errorMessage = KLibLoader::self()->lastErrorMessage(); + KMessageBox::error(0, i18n("There was an error loading service %1.\n" + "The diagnostics from libtool is:\n%2") + .arg(name).arg(errorMessage); +} + + + +From this point, the further proceeding depends again on the service type. For +generic plugins, you create objects with the method +KLibFactory::create(). +For KParts, you must cast the factory pointer to the more specific KParts::Factory and use +its create() method: + + + +if (factory->inherits("KParts::Factory")) { + KParts::Factory *partFactory = static_cast<KParts::Factory*>(factory); + QObject *obj = partFactory->createPart(parentWidget, widgetName, + parent, name, "KParts::ReadOnlyPart"); + ... +} else { + cout << "Service does not implement the right factory" << endl; +} + + + + + + +Defining DCOP services + + +A DCOP service is usually implemented as a program that is started up when it is +needed. It then goes into a loop and listens for DCOP connections. The program +may be an interactive one, but it may also run completely or for a part of its +lifetime as a daemon in the background without the user noticing it. An example +for such a daemon is tdeio_uiserver, which implements user interaction +such as progress dialog for the TDEIO library. The advantage of such a centralized +daemon in this context is that e.g. the download progress for several different +files can be shown in one window, even if those downloads were initiated from +different applications. + + + +A DCOP service is defined differently from a shared library service. Of course, +it doesn't specify a library, but instead an executable. Also, DCOP services +do not specify a ServiceType line, because usually they are started by their +name. As additional properties, it contains two lines: + + + +X-DCOP-ServiceType specifies the way the service is +started. The value Unique says that the service must not be +started more than once. This means, if you try to start this service (e.g. via + +TDEApplication::startServiceByName(), KDE looks whether it is already +registered with DCOP and uses the running service. If it is not registered yet, +KDE will start it up and wait until is registered. Thus, you can immediately +send DCOP calls to the service. In such a case, the service should be implemented +as a +KUniqueApplication. + + + +The value Multi for X-DCOP-ServiceType says that multiple +instances of the service can coexist, so every attempt to start the service +will create another process. As a last possibility the value None +can be used. In this case, a start of the service will not wait until it +is registered with DCOP. + + + +X-TDE-StartupNotify should normally be set to false. Otherwise, when +the program is started, the task bar will show a startup notification, or, depending +on the user's settings, the cursor will be changed. + + + +Here is the definition of tdeio_uiserver: + + + +[Desktop Entry] +Type=Service +Name=tdeio_uiserver +Exec=tdeio_uiserver +X-DCOP-ServiceType=Unique +X-TDE-StartupNotify=false + + + + + + +Using DCOP services + + +A DCOP service is started with one of several methods in the TDEApplication +class: + + + +DCOPClient *client = kapp->dcopClient(); +client->attach(); +if (!client->isApplicationRegistered("tdeio_uiserver")) { + QString error; + if (TDEApplication::startServiceByName("tdeio_uiserver", QStringList(), &error)) + cout << "Starting kioserver failed with message " << error << endl; +} +... +QByteArray data, replyData; +QCString replyType; +QDataStream arg(data, IO_WriteOnly); +arg << true; +if (!client->call("tdeio_uiserver", "UIServer", "setListMode(bool)", + data, replyType, replyData)) + cout << "Call to tdeio_uiserver failed" << endl; +... + + + +Note that the example of a DCOP call given here uses explicit marshalling +of arguments. Often you will want to use a stub generated by dcopidl2cpp +instead, because it is much simpler and less error prone. + + + +In the example given here, the service was started "by name", i.e. the +first argument to TDEApplication::startServiceByName() is +the name is appearing in the Name line of the desktop +file. An alternative is to use +TDEApplication::startServiceByDesktopName(), which takes +the file name of its desktop file as argument, i.e. in this case +"tdeio_uiserver.desktop". + + + +All these calls take a list of URLs as a second argument, which is given +to the service on the command line. The third argument is a pointer to a +QString. If starting the service fails, this argument +is set to a translated error message. + + + + + + + + +MIME types + + +What are MIME types? + + +MIME types are used to describe the content type of files or data +chunks. Originally they were introduced in order to allow sending around image +or sound files etc. by e-mail (MIME stands for "Multipurpose Internet Mail +Extensions"). Later this system was also used by web browsers to determine how +to present data sent by a web server to the user. For example, an HTML page +has a MIME type "text/html", a postscript file "application/postscript". In +KDE, this concept is used at a variety of places: + + + + + +In Konqueror's icon view, files are represented by +icons. Each MIME type has a certain associated icon shown here. + + + +When you click onto a file icon or a file name in +Konqueror, either the file is shown in an embedded +view, or an application associated with the file type is opened. + + + +When you drag and drop some data from one application to another (or +within the same application), the drop target may choose to accept only +certain data types. Furthermore, it will handle image data different +from textual data. + + + +Clipboard data has a MIME type. Traditionally, X programs only handle +pixmaps or texts, but with Qt, there are no restrictions on the data type. + + + + + +From the above examples, it is clear that MIME handling is a complex issue. +First, it is necessary to establish a mapping from file names to MIME types. +KDE goes one step further in allowing even file contents to be mapped to +MIME types, for cases in which the file name is not available. Second, it +is necessary to map MIME types to applications or libraries which can view +or edit a file with a certain type, or create a thumbnail picture for it. + + + +There is a variety of APIs to figure out the MIME type of data or files. In +general, there is a certain speed/reliability trade-off you have to make. You +can find out the type of a file by examining only its file name (i.e. in most +cases the file name extension). For example, a file +foo.jpg is normally "image/jpeg". In cases where the +extension is stripped off this is not safe, and you actually have to look at +the contents of the file. This is of course slower, in particular for files +that have to be downloaded via HTTP first. The content-based method is based +on the file TDEDIR/share/mimelnk/magic and therefore +difficult to extend. But in general, MIME type information can easily be made +available to the system by installing a .desktop file, and +it is efficiently and conveniently available through the KDE libraries. + + + + + + +Defining MIME types + + +Let us define a type "application/x-foo" for our new +foobar program. To this end, you have to write a +file foo.desktop and install it into +TDEDIR/share/mimelnk/application. (This is the usual +location, which may differ between distributions). This can be done by adding +this to the Makefile.am: + + + +mimedir = $(kde_mimedir)/application +mime_DATA = foo.desktop +EXTRA_DIST = $(mime_DATA) + + + +The file foo.desktop should look as follows: + + + +[Desktop Entry] +Type=MimeType +MimeType=application/x-foo +Icon=fooicon +Patterns=*.foo; +DefaultApp=foobar +Comment=Foo Data File +Comment[de]=Foo Datei + + + +The "Comment" entry is supposed to be translated. Since the +.desktop file specifies an icon, you should also install +an icon fooicon.png, which represents the file e.g. in +Konqueror. + + + +In the KDE libraries, such a type definition is mapped to an instance of the +class KMimeType. +Use this like in the following example: + + + +KMimeType::Ptr type = KMimeType::mimeType("application/x-foo"); +cout << "Type: " << type->name() < endl; +cout << "Icon: " << type->icon() < endl; +cout << "Comment: " << type->icon() < endl; +QStringList patterns = type->patterns(); +QStringList::ConstIterator it; +for (it = patterns.begin(); it != patterns.end(); ++it) + cout << "Pattern: " << (*it) << endl; + + + + + + +Determining the MIME type of data + + +The fast method for determining the type of a file is +KMimeType::findByURL(). This looks for the URL string and +in most cases determines the type from the extension. For certain protocols +(e.g. http, man, info), this mechanism is not used. For example, CGI scripts +on web servers written in Perl often have the extension +.pl, which would indicate a +"text/x-perl" type. However, we file delivered by the +server is the output of this script, which is normally HTML. For such a case, +KMimeType::findByURL() returns the MIME type +"application/octet-stream" (available through +KMimeType::defaultMimeType()), which indicates a failure +to find out the type. + + + +KMimeType::Ptr type = KMimeType::findByURL("/home/bernd/foobar.jpg"); +if (type->name() == KMimeType::defaultMimeType()) + cout << "Could not find out type" << endl; +else + cout << "Type: " << type->name() << endl; + + + +(this method has some more arguments, but these are undocumented, so simply +forget about them.) + + + +You may want to find out a MIME from the contents of file instead of +the file name. This is more reliable, but also slower, as it requires +reading a part of the file. This is done with the +KMimeMagic +class, which has different error handling: + + + +KMimeMagicResult *result = KMimeMagic::self()->findFileType("/home/bernd/foobar.jpg"); +if (!result || !result->isValid()) + cout << "Could not find out type" << endl; +else + cout << "Type: " << result->mimeType() << endl; + + + +As a variant of this function, you can also determine the type of a memory +chunk. This is e.g. used in Kate in order to find +out the highlighting mode: + + + +QByteArray array; +... +KMimeMagicResult *result = KMimeMagic::self()->findBufferType(array); +if (!result || !result->isValid()) + cout << "Could not find out type" << endl; +else + cout << "Type: " << result->mimeType() << endl; + + + +Of course, even KMimeMagic is only able to determine a file type from the +contents of a local file. For remote files, there is a further possibility: + + + +KURL url("http://developer.kde.org/favicon.ico"); +QString type = TDEIO::NetAccess::mimetype(url); +if (type == KMimeType::defaultMimeType()) + cout << "Could not find out type" << endl; +else + cout << "Type: " << type << endl; + + + +This starts a TDEIO job to download a part of the file and check this. +Note that this function is perhaps quite slow and blocks the program. Normally +you will only want to use this if KMimeType::findByURL() +has returned "application/octet-stream". + + + +On the other hand, if you do not want to block your application, you can also +explicitly start the TDEIO job and connect to some of its signals: + + + +void FooClass::findType() +{ + KURL url("http://developer.kde.org/favicon.ico"); + TDEIO::MimetypeJob *job = TDEIO::mimetype(url); + connect( job, SIGNAL(result(TDEIO::Job*)), + this, SLOT(mimeResult(TDEIO::Job*)) ); +} + +void FooClass::mimeResult(TDEIO::Job *job) +{ + if (job->error()) + job->showErrorDialog(); + else + cout << "MIME type: " << ((TDEIO::MimetypeJob *)job)->mimetype() << endl; +} + + + + + + +Mapping a MIME type to an application or service + + +When an application is installed, it installs a .desktop +file which contains a list of MIME types this application can load. Similarly, +components like KParts make this information available by their service +.desktop files. So in general, there are several programs +and components which can process a given MIME type. You can obtain such a list +from the class KServiceTypeProfile: + + + +KService::OfferList offers = KServiceTypeProfile::offers("text/html", "Application"); +KService::OfferList::ConstIterator it; +for (it = offers.begin(); it != offers.end(); ++it) { + KService::Ptr service = (*it); + cout << "Name: " << service->name() << endl; +} + + + +The return value of this function is a list of service offers. A +KServiceOffer object packages a KService::Ptr together +with a preference number. The list returned by +KServiceTypeProfile::offers() is ordered by the user's +preference. The user can change this by calling "keditfiletype +text/html" or choosing Edit File Type on +Konqueror's context menu on a HTML file. + + + +In the above example, an offer list of the applications supporting +text/html was requested. This will - among others - contain +HTML editors like Quanta Plus. You can also replace +the second argument "Application" by +"KParts::ReadOnlyPart". In that case, you get a list of +embedable components for presenting HTML content, for example TDEHTML. + + + +In most cases, you are not interested in the list of all service offers +for a combination of MIME type and service type. There is a convenience +function which gives you only the service offer with the highest preference: + + + +KService::Ptr offer = KServiceTypeProfile::preferredService("text/html", "Application"); +if (offer) + cout << "Name: " << service->name() << endl; +else + cout << "No appropriate service found" << endl; + + + +For even more complex queries, there is a full-blown CORBA-like +trader. + + + +In order to run an application service with some URLs, use +KRun: + + + +KURL::List urlList; +urlList << "http://www.ietf.org/rfc/rfc1341.txt?number=1341"; +urlList << "http://www.ietf.org/rfc/rfc2046.txt?number=2046"; +KRun::run(offer.service(), urlList); + + + + + + +Miscellaneous + + +In this section, we want to list some APIs which are loosely related +to the previous discussion. + + + +Getting an icon for a URL. This looks for the type of the URL +and returns the associated icon. + + + +KURL url("ftp://ftp.kde.org/pub/incoming/wibble.c"); +QString icon = KMimeType::iconForURL(url); + + + +Running a URL. This looks for the type of the URL and starts the +user's preferred program associated with this type. + + + +KURL url("http://dot.kde.org"); +new KRun(url); + + + + + + + + +Network transparency + + +Introduction + + +In the age of the world wide web, it is of essential importance that desktop +applications can access resources over the internet: they should be able to +download files from a web server, write files to an ftp server or read mails +from a web server. Often, the ability to access files regardless of their +location is called network transparency. + + + +In the past, different approaches to this goals were implemented. The old NFS +file system is an attempt to implement network transparency on the level of +the POSIX API. While this approach works quite well in local, closely coupled +networks, it does not scale for resources to which access is unreliable and +possibly slow. Here, asynchronicity is important. While +you are waiting for your web browser to download a page, the user interface +should not block. Also, the page rendering should not begin when the page is +completely available, but should updated regularly as data comes in. + + + +In the KDE libraries, network transparency is implemented in the TDEIO API. The +central concept of this architecture is an IO job. A job +may copy, or delete files or similar things. Once a job is started, it works +in the background and does not block the application. Any communication from +the job back to the application - like delivering data or progress information +- is done integrated with the Qt event loop. + + + +Background operation is achieved by starting ioslaves to +perform certain tasks. ioslaves are started as separate processes and are +communicated with through UNIX domain sockets. In this way, no multi-threading +is necessary and unstable slaves can not crash the application that uses them. + + + +File locations are expressed by the widely used URLs. But in KDE, URLs do not +only expand the range of addressable files beyond the local file system. It +also goes in the opposite direction - e.g. you can browse into tar archives. +This is achieved by nesting URLs. For example, a file in a tar archive on +a http server could have the URL + + + +http://www-com.physik.hu-berlin.de/~bernd/article.tgz#tar:/paper.tex + + + + + + +Using TDEIO + + +In most cases, jobs are created by calling functions in the TDEIO namespace. +These functions take one or two URLs as arguments, and possible other +necessary parameters. When the job is finished, it emits the signal +result(TDEIO::Job*). After this signal has been emitted, the job +deletes itself. Thus, a typical use case will look like this: + + + +void FooClass::makeDirectory() +{ + SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/tdeiodir")); + connect( job, SIGNAL(result(TDEIO::Job*)), + this, SLOT(mkdirResult(TDEIO::Job*)) ); +} + +void FooClass::mkdirResult(TDEIO::Job *job) +{ + if (job->error()) + job->showErrorDialog(); + else + cout << "mkdir went fine" << endl; +} + + + +Depending on the type of the job, you may connect also to other +signals. + + + +Here is an overview over the possible functions: + + + + +TDEIO::mkdir(const KURL &url, int permission) + +Creates a directory, optionally with certain permissions. + + + +TDEIO::rmdir(const KURL &url) + +Removes a directory. + + + +TDEIO::chmod(const KURL &url, int permissions) + +Changes the permissions of a file. + + + +TDEIO::rename(const KURL &src, const KURL &dest, + bool overwrite) + +Renames a file. + + + +TDEIO::symlink(const QString &target, const KURL &dest, + bool overwrite, bool showProgressInfo) + +Creates a symbolic link. + + + +TDEIO::stat(const KURL &url, bool showProgressInfo) + +Finds out certain information about the file, such as size, modification +time and permissions. The information can be obtained from +TDEIO::StatJob::statResult() after the job has finished. + + + +TDEIO::get(const KURL &url, bool reload, bool showProgressInfo) + +Transfers data from a URL. + + + +TDEIO::put(const KURL &url, int permissions, bool overwrite, + bool resume, bool showProgressInfo) + +Transfers data to a URL. + + + +TDEIO::http_post(const KURL &url, const QByteArray &data, + bool showProgressInfo) +Posts data. Special for HTTP. + + + +TDEIO::mimetype(const KURL &url, bool showProgressInfo) + +Tries to find the MIME type of the URL. The type can be obtained from +TDEIO::MimetypeJob::mimetype() after the job has finished. + + + +TDEIO::file_copy(const KURL &src, const KURL &dest, int permissions, + bool overwrite, bool resume, bool showProgressInfo) + +Copies a single file. + + + +TDEIO::file_move(const KURL &src, const KURL &dest, int permissions, + bool overwrite, bool resume, bool showProgressInfo) + +Renames or moves a single file. + + + +TDEIO::file_delete(const KURL &url, bool showProgressInfo) + +Deletes a single file. + + + +TDEIO::listDir(const KURL &url, bool showProgressInfo) + +Lists the contents of a directory. Each time some new entries are known, the +signal TDEIO::ListJob::entries() is emitted. + + + +TDEIO::listRecursive(const KURL &url, bool showProgressInfo) + +Similar to the listDir() function, but this one is recursive. + + + +TDEIO::copy(const KURL &src, const KURL &dest, bool showProgressInfo) + +Copies a file or directory. Directories are copied recursively. + + + +TDEIO::move(const KURL &src, const KURL &dest, bool showProgressInfo) + +Moves or renames a file or directory. + + + +TDEIO::del(const KURL &src, bool shred, bool showProgressInfo) + +Deletes a file or directory. + + + + + + + + + +Directory entries + + +Both the TDEIO::stat() and TDEIO::listDir() jobs return their results as a type +UDSEntry, UDSEntryList resp. The latter is defined as QValueList<UDSEntry>. +The acronym UDS stands for "Universal directory service". The principle behind +it is that the a directory entry only carries the information which an ioslave +can provide, not more. For example, the http slave does not provide any +information about access permissions or file owners. +Instead, a UDSEntry is a list of UDSAtoms. Each atom provides a specific piece +of information. It consists of a type stored in m_uds and either an integer +value in m_long or a string value in m_str, depending on the type. + + + +The following types are currently defined: + + + + + +UDS_SIZE (integer) - Size of the file. + + + +UDS_USER (string) - User owning the file. + + + +UDS_GROUP (string) - Group owning the file. + + + +UDS_NAME (string) - File name. + + + +UDS_ACCESS (integer) - Permission rights of the file, as e.g. stored +by the libc function stat() in the st_mode field. + + + +UDS_FILE_TYPE (integer) - The file type, as e.g. stored by stat() in the +st_mode field. Therefore you can use the usual libc macros like S_ISDIR to +test this value. Note that the data provided by ioslaves corresponds to +stat(), not lstat(), i.e. in case of symbolic links, the file type here is +the type of the file pointed to by the link, not the link itself. + + + +UDS_LINK_DEST (string) - In case of a symbolic link, the name of the file +pointed to. + + + +UDS_MODIFICATION_TIME (integer) - The time (as in the type time_t) when the +file was last modified, as e.g. stored by stat() in the st_mtime field. + + + +UDS_ACCESS_TIME (integer) - The time when the file was last accessed, as +e.g. stored by stat() in the st_atime field. + + + +UDS_CREATION_TIME (integer) - The time when the file was created, as e.g. +stored by stat() in the st_ctime field. + + + +UDS_URL (string) - Provides a URL of a file, if it is not simply the +the concatenation of directory URL and file name. + + + +UDS_MIME_TYPE (string) - MIME type of the file + + + +UDS_GUESSED_MIME_TYPE (string) - MIME type of the file as guessed by the +slave. The difference to the previous type is that the one provided here +should not be taken as reliable (because determining it in a reliable way +would be too expensive). For example, the KRun class explicitly checks the +MIME type if it does not have reliable information. + + + + + +Although the way of storing information about files in a +UDSEntry is flexible and practical from the ioslave +point of view, it is a mess to use for the application programmer. For +example, in order to find out the MIME type of the file, you have to iterate +over all atoms and test whether m_uds is +UDS_MIME_TYPE. Fortunately, there is an API which is a lot +easier to use: the class KFileItem. + + + + + + +Synchronous usage + + +Often, the asynchronous API of TDEIO is too complex to use and therefore +implementing full asynchronicity is not a priority. For example, in a program +that can only handle one document file at a time, there is little that can be +done while the program is downloading a file anyway. For these simple cases, +there is a mucher simpler API in the form of a set of static functions in +TDEIO::NetAccess. For example, in order to copy a file, use + + + +KURL source, target; +source = ...; +target = ... +TDEIO::NetAccess::copy(source, target); + + + +The function will return after the complete copying process has finished. Still, +this method provides a progress dialog, and it makes sure that the application +processes repaint events. + + + +A particularly interesting combination of functions is +download() in combination with +removeTempFile(). The former downloads a file from given +URL and stores it in a temporary file with a unique name. The name is stored +in the second argument. If the URL is local, the file is +not downloaded, and instead the second argument is set to the local file +name. The function removeTempFile() deletes the file +given by its argument if the file is the result of a former download. If that +is not the case, it does nothing. Thus, a very easy to use way of loading +files regardless of their location is the following code snippet: + + + +KURL url; +url = ...; +QString tempFile; +if (TDEIO::NetAccess::download(url, tempFile) { + // load the file with the name tempFile + TDEIO::NetAccess::removeTempFile(tempFile); +} + + + + + + +Meta data + + +As can be seen above, the interface to IO jobs is quite abstract and does not +consider any exchange of information between application and IO slave that +is protocol specific. This is not always appropriate. For example, you may give +certain parameters to the HTTP slave to control its caching behavior or +send a bunch of cookies with the request. For this need, the concept of meta +data has been introduced. When a job is created, you can configure it by adding +meta data to it. Each item of meta data consists of a key/value pair. For +example, in order to prevent the HTTP slave from loading a web page from its +cache, you can use: + + + +void FooClass::reloadPage() +{ + KURL url("http://www.kdevelop.org/index.html"); + TDEIO::TransferJob *job = TDEIO::get(url, true, false); + job->addMetaData("cache", "reload"); + ... +} + + + +The same technique is used in the other direction, i.e. for communication from +the slave to the application. The method +Job::queryMetaData() asks for the value of the certain +key delivered by the slave. For the HTTP slave, one such example is the key +"modified", which contains a (stringified representation of) +the date when the web page was last modified. An example how you can use this +is the following: + + + +void FooClass::printModifiedDate() +{ + KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); + TDEIO::TransferJob *job = TDEIO::get(url, true, false); + connect( job, SIGNAL(result(TDEIO::Job*)), + this, SLOT(transferResult(TDEIO::Job*)) ); +} + +void FooClass::transferResult(TDEIO::Job *job) +{ + QString mimetype; + if (job->error()) + job->showErrorDialog(); + else { + TDEIO::TransferJob *transferJob = (TDEIO::TransferJob*) job; + QString modified = transferJob->queryMetaData("modified"); + cout << "Last modified: " << modified << endl; +} + + + + + + +Scheduling + + +When using the TDEIO API, you usually do not have to cope with the details of +starting IO slaves and communicating with them. The normal use case is to +start a job and with some parameters and handle the signals the jobs emits. + + + +Behind the curtains, the scenario is a lot more complicated. When you create a +job, it is put in a queue. When the application goes back to the event loop, +TDEIO allocates slave processes for the jobs in the queue. For the first jobs +started, this is trivial: an IO slave for the appropriate protocol is started. +However, after the job (like a download from an http server) has finished, it +is not immediately killed. Instead, it is put in a pool of idle slaves and +killed after a certain time of inactivity (current 3 minutes). If a new request +for the same protocol and host arrives, the slave is reused. The obvious +advantage is that for a series of jobs for the same host, the cost for creating +new processes and possibly going through an authentication handshake is saved. + + + +Of course, reusing is only possible when the existing slave has already finished +its previous job. when a new request arrives while an existing slave process is +still running, a new process must be started and used. In the API usage in the +examples above, there are no limitation for creating new slave processes: if you +start a consecutive series of downloads for 20 different files, then TDEIO will +start 20 slave processes. This scheme of assigning slaves to jobs is called +direct. It not always the most appropriate scheme, as it +may need much memory and put a high load on both the client and server machines. + + + +So there is a different way. You can schedule jobs. If +you do this, only a limited number (currently 3) of slave processes for a +protocol will be created. If you create more jobs than that, they are put in a +queue and are processed when a slave process becomes idle. This is done as +follows: + + + +KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); +TDEIO::TransferJob *job = TDEIO::get(url, true, false); +TDEIO::Scheduler::scheduleJob(job); + + + +A third possibility is connection oriented. For example, +for the IMAP slave, it does not make any sense to start multiple processes for +the same server. Only one IMAP connection at a time should be enforced. In +this case, the application must explicitly deal with the notion of a slave. It +has to deallocate a slave for a certain connection and then assign all jobs +which should go through the same connection to the same slave. This can again +be easily achieved by using the TDEIO::Scheduler: + + + +KURL baseUrl("imap://bernd@albert.physik.hu-berlin.de"); +TDEIO::Slave *slave = TDEIO::Scheduler::getConnectedSlave(baseUrl); + +TDEIO::TransferJob *job1 = TDEIO::get(KURL(baseUrl, "/INBOX;UID=79374")); +TDEIO::Scheduler::assignJobToSlave(slave, job1); + +TDEIO::TransferJob *job2 = TDEIO::get(KURL(baseUrl, "/INBOX;UID=86793")); +TDEIO::Scheduler::assignJobToSlave(slave, job2); + +... + +TDEIO::Scheduler::disconnectSlave(slave); + + + +You may only disconnect the slave after all jobs assigned to it are guaranteed +to be finished. + + + + + + +Defining an ioslave + + +In the following we discuss how you can add a new ioslave to the system. +In analogy to services, new ioslaves are advertised to the system by +installing a little configuration file. The following Makefile.am +snippet installs the ftp protocol: + + + +protocoldir = $(kde_servicesdir) +protocol_DATA = ftp.protocol +EXTRA_DIST = $(mime_DATA) + + + +The contents of the file ftp.protocol is as follows: + + + +[Protocol] +exec=tdeio_ftp +protocol=ftp +input=none +output=filesystem +listing=Name,Type,Size,Date,Access,Owner,Group,Link, +reading=true +writing=true +makedir=true +deleting=true +Icon=ftp + + + +The "protocol" entry defines for which protocol this slave +is responsible. "exec" is (in contrast what you would +expect naively) the name of the library that implements the slave. When the +slave is supposed to start, the "tdeinit" executable is +started which in turn loads this library into its address space. So in +practice, you can think of the running slave as a separate process although it +is implemented as library. The advantage of this mechanism is that it saves a +lot of memory and reduces the time needed by the runtime linker. + + + +The "input" and "output" lines are not used currently. + + + +The remaining lines in the .protocol file define which +abilities the slave has. In general, the features a slave must implement are +much simpler than the features the TDEIO API provides for the application. The +reason for this is that complex jobs are scheduled to a couple of subjobs. For +example, in order to list a directory recursively, one job will be started for +the toplevel directory. Then for each subdirectory reported back, new subjobs +are started. A scheduler in TDEIO makes sure that not too many jobs are active +at the same time. Similarly, in order to copy a file within a protocol that +does not support copying directly (like the ftp: protocol), +TDEIO can read the source file and then write the data to the destination +file. For this to work, the .protocol must advertise the +actions its slave supports. + + + +Since slaves are loaded as shared libraries, but constitute standalone programs, +their code framework looks a bit different from normal shared library plugins. +The function which is called to start the slave is called +kdemain(). This function does some initializations and +then goes into an event loop and waits for requests by the application using +it. This looks as follows: + + + +extern "C" { int kdemain(int argc, char **argv); } + +int kdemain(int argc, char **argv) +{ + TDELocale::setMainCatalogue("tdelibs"); + TDEInstance instance("tdeio_ftp"); + (void) TDEGlobal::locale(); + + if (argc != 4) { + fprintf(stderr, "Usage: tdeio_ftp protocol " + "domain-socket1 domain-socket2\n"); + exit(-1); + } + + FtpSlave slave(argv[2], argv[3]); + slave.dispatchLoop(); + return 0; +} + + + + + + +Implementing an ioslave + + +Slaves are implemented as subclasses of TDEIO::SlaveBase +(FtpSlave in the above example). Thus, the actions listed in the +.protocol correspond to certain virtual functions in +TDEIO::SlaveBase the slave implementation must +reimplement. Here is a list of possible actions and the corresponding virtual +functions: + + + + +reading - Reads data from a URL +void get(const KURL &url) + +writing - Writes data to a URL and create the file if it does not exist yet. +void put(const KURL &url, int permissions, bool overwrite, bool resume) + +moving - Renames a file. +void rename(const KURL &src, const KURL &dest, bool overwrite) + +deleting - Deletes a file or directory. +void del(const KURL &url, bool isFile) + +listing - Lists the contents of a directory. +void listDir(const KURL &url) + +makedir - Creates a directory. +void mkdir(const KURL &url, int permissions) + + + + +Additionally, there are reimplementable functions not listed in the .protocol +file. For these operations, TDEIO automatically determines whether they are supported +or not (i.e. the default implementation returns an error). + + + + +Delivers information about a file, similar to the C function stat(). +void stat(const KURL &url) + +Changes the access permissions of a file. +void chmod(const KURL &url, int permissions) + +Determines the MIME type of a file. +void mimetype(const KURL &url) + +Copies a file. +copy(const KURL &url, const KURL &dest, int permissions, bool overwrite) + +Creates a symbolic link. +void symlink(const QString &target, const KURL &dest, bool overwrite) + + + + +All these implementation should end with one of two calls: If the operation +was successful, they should call finished(). If an error has occurred, +error() should be called with an error code as first argument and a +string in the second. Possible error codes are listed as enum +TDEIO::Error. The second argument is usually the URL in +question. It is used e.g. in TDEIO::Job::showErrorDialog() +in order to parameterize the human-readable error message. + + + +For slaves that correspond to network protocols, it might be interesting to +reimplement the method SlaveBase::setHost(). This is +called to tell the slave process about the host and port, and the user name +and password to log in. In general, meta data set by the application can be +queried by SlaveBase::metaData(). You can check for the +existence of meta data of a certain key with +SlaveBase::hasMetaData(). + + + + + + +Communicating back to the application + + +Various actions implemented in a slave need some way to communicate data back +to the application using the slave process: + + + + + +get() sends blocks of data. This is done with +data(), which takes a QByteArray +as argument. Of course, you do not need to send all data at once. If you send +a large file, call data() with smaller data blocks, so +the application can process them. Call finished() when +the transfer is finished. + + + +listDir() reports information about the entries of a +directory. For this purpose, call listEntries() with a +TDEIO::UDSEntryList as argument. Analogously to +data(), you can call this several times. When you are +finished, call listEntry() with the second argument set +to true. You may also call totalSize() to report the +total number of directory entries, if known. + + + +stat() reports information about a file like size, MIME +type, etc. Such information is packaged in a +TDEIO::UDSEntry, which will be discussed below. Use +statEntry() to send such an item to the application. + + + +mimetype() calls mimeType() with a +string argument. + + + +get() and copy() may want to provide +progress information. This is done with the methods +totalSize(), processedSize(), +speed(). The total size and processed size are reported +as bytes, the speed as bytes per second. + + + +You can send arbitrary key/value pairs of meta data with +setMetaData(). + + + + + + + + +Interacting with the user + + +Sometimes a slave has to interact with the user. Examples include informational +messages, authentication dialogs and confirmation dialogs when a file is about +to be overwritten. + + + + + +infoMessage() - This is for informational feedback, such +as the message "Retrieving data from <host>" from the http slave, which +is often displayed in the status bar of the program. On the application side, +this method corresponds to the signal +TDEIO::Job::infoMessage(). + + + +warning() - Displays a warning in a message box with +KMessageBox::information(). If a message box is still +open from a former call of warning() from the same slave process, nothing +happens. + + + +messageBox() - This is richer than the previous +method. It allows to open a message box with text and caption and some +buttons. See the enum SlaveBase::MessageBoxType for reference. + + + +openPassDlg() - Opens a dialog for the input of user name +and password. + + + + + + + + + + + + + +Licensing + +&underFDL; +&underGPL; + + + +
diff --git a/doc/kdearch/joinbevel.png b/doc/kdearch/joinbevel.png new file mode 100644 index 00000000..584b6bd4 Binary files /dev/null and b/doc/kdearch/joinbevel.png differ diff --git a/doc/kdearch/joinmiter.png b/doc/kdearch/joinmiter.png new file mode 100644 index 00000000..e5d94b13 Binary files /dev/null and b/doc/kdearch/joinmiter.png differ diff --git a/doc/kdearch/joinround.png b/doc/kdearch/joinround.png new file mode 100644 index 00000000..9a8bbe93 Binary files /dev/null and b/doc/kdearch/joinround.png differ diff --git a/doc/kdearch/konqi-mirrored.png b/doc/kdearch/konqi-mirrored.png new file mode 100644 index 00000000..5145c0ee Binary files /dev/null and b/doc/kdearch/konqi-mirrored.png differ diff --git a/doc/kdearch/konqi-normal.png b/doc/kdearch/konqi-normal.png new file mode 100644 index 00000000..c16e1475 Binary files /dev/null and b/doc/kdearch/konqi-normal.png differ diff --git a/doc/kdearch/konqi-rotated.png b/doc/kdearch/konqi-rotated.png new file mode 100644 index 00000000..157e82dd Binary files /dev/null and b/doc/kdearch/konqi-rotated.png differ diff --git a/doc/kdearch/konqi-sheared.png b/doc/kdearch/konqi-sheared.png new file mode 100644 index 00000000..ee645f87 Binary files /dev/null and b/doc/kdearch/konqi-sheared.png differ diff --git a/doc/kdearch/kview-menu.png b/doc/kdearch/kview-menu.png new file mode 100644 index 00000000..0e57e721 Binary files /dev/null and b/doc/kdearch/kview-menu.png differ diff --git a/doc/kdearch/opengl.png b/doc/kdearch/opengl.png new file mode 100644 index 00000000..2489777d Binary files /dev/null and b/doc/kdearch/opengl.png differ diff --git a/doc/kdearch/penstyles.png b/doc/kdearch/penstyles.png new file mode 100644 index 00000000..7e976bcd Binary files /dev/null and b/doc/kdearch/penstyles.png differ diff --git a/doc/kdearch/whatsthis.png b/doc/kdearch/whatsthis.png new file mode 100644 index 00000000..4bdba093 Binary files /dev/null and b/doc/kdearch/whatsthis.png differ diff --git a/doc/kdevdesigner/CMakeLists.txt b/doc/kdevdesigner/CMakeLists.txt new file mode 100644 index 00000000..db314d97 --- /dev/null +++ b/doc/kdevdesigner/CMakeLists.txt @@ -0,0 +1,9 @@ +################################################# +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_create_handbook( DESTINATION kdevdesigner ) diff --git a/doc/kdevdesigner/Makefile.am b/doc/kdevdesigner/Makefile.am new file mode 100644 index 00000000..41691557 --- /dev/null +++ b/doc/kdevdesigner/Makefile.am @@ -0,0 +1,3 @@ +KDE_LANG = en +KDE_DOCS = AUTO + diff --git a/doc/kdevdesigner/index.docbook b/doc/kdevdesigner/index.docbook new file mode 100644 index 00000000..c903aa65 --- /dev/null +++ b/doc/kdevdesigner/index.docbook @@ -0,0 +1,65 @@ + +KDevDesigner"> + + + +]> + + + + + +
+The &kdevdesigner; Handbook + + +The &kdevdesigner; Handbook + + +&tde-authors; + + + +&tde-release-version; +Reviewed: &tde-release-date; + + +&tde-copyright-date; +&tde-team; + + + + + + +&kdevdesigner; is a GUI designer environment for &tde;. + + + + +TDE + + + + + +We Apologize +No documentation has yet been written for &kdevdesigner;. + +If you need help, please check The &tde; +web site, submit questions to the +&tde; mail lists, or file a bug report at the +&tde; bug tracker. + +If you are interested in helping, please consider writing the help file. +Submitting a basic text file is acceptable as the &tde-team; will convert the text. + +Thank you for helping and thank you for your patience. + +&underFDL; + + + +&documentation.index; +
diff --git a/doc/platform/Mainpage.dox b/doc/platform/Mainpage.dox index ae377ddf..29f6deb0 100644 --- a/doc/platform/Mainpage.dox +++ b/doc/platform/Mainpage.dox @@ -81,11 +81,11 @@ KDevelop Technotes. \section langapi Programming Language Support API -- Language Support Interfaces Library - (classes)\n +- Language Support Interfaces Library + (classes)\n Interfaces for KDevelop language support facilities. -- Debugger Support Library - (classes)\n +- Debugger Support Library + (classes)\n Classes to implement debugger support for a programming language. . @@ -110,8 +110,8 @@ KDevelop Technotes. \section shellapi Shell API -- Generic Shell - (classes)\n +- Generic Shell + (classes)\n The Shell - a profile-based implementation of TDevelop plugin architecture. - Shell Profiles Library (classes)\n diff --git a/doc/std/CMakeLists.txt b/doc/std/CMakeLists.txt index edb0d2a8..3c034ee5 100644 --- a/doc/std/CMakeLists.txt +++ b/doc/std/CMakeLists.txt @@ -11,6 +11,6 @@ install( FILES - tdev3api.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs + kdev3api.toc + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/doc/std/Makefile.am b/doc/std/Makefile.am index 7b636e47..07f12cde 100644 --- a/doc/std/Makefile.am +++ b/doc/std/Makefile.am @@ -1,5 +1,5 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs -toc_DATA = tdev3api.toc +tocdir = ${kde_datadir}/kdevdocumentation/tocs +toc_DATA = kdev3api.toc #indexdir = ${kde_datadir}/devdoctreeview/indices #index_DATA = diff --git a/doc/std/kdev3api.toc b/doc/std/kdev3api.toc new file mode 100644 index 00000000..ef1c82dc --- /dev/null +++ b/doc/std/kdev3api.toc @@ -0,0 +1,45 @@ + + +KDevelop API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/std/tdev3api.toc b/doc/std/tdev3api.toc deleted file mode 100644 index ef1c82dc..00000000 --- a/doc/std/tdev3api.toc +++ /dev/null @@ -1,45 +0,0 @@ - - -KDevelop API Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/tde_app_devel/CMakeLists.txt b/doc/tde_app_devel/CMakeLists.txt deleted file mode 100644 index 83e96ce9..00000000 --- a/doc/tde_app_devel/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -tde_create_handbook( DESTINATION tde_app_devel ) diff --git a/doc/tde_app_devel/Makefile.am b/doc/tde_app_devel/Makefile.am deleted file mode 100644 index 171f575c..00000000 --- a/doc/tde_app_devel/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -KDE_LANG = en -KDE_DOCS = AUTO diff --git a/doc/tde_app_devel/appwizard.png b/doc/tde_app_devel/appwizard.png deleted file mode 100644 index adbadb35..00000000 Binary files a/doc/tde_app_devel/appwizard.png and /dev/null differ diff --git a/doc/tde_app_devel/index.docbook b/doc/tde_app_devel/index.docbook deleted file mode 100644 index e212e4e6..00000000 --- a/doc/tde_app_devel/index.docbook +++ /dev/null @@ -1,1549 +0,0 @@ - -TDevelop"> - - - -]> - - - - -The &tdevelop; Programming Handbook - -2002-12-05 -2.0 - - - -Ralf -Nolden -
Ralf.Nolden@post.rwth-aachen.de
-
- -Caleb -Tennis -
caleb@aei-tech.com
-
-
- - -1999 -Ralf Nolden - - -2002 -Caleb Tennis - - - - -&FDLNotice; - - -The User Guide to C++ Application Design for the Trinity Desktop Environment (TDE) with -the &tdevelop; IDE - - - -KDE -TDevelop -IDE -development -programming - - -
- - -Introduction - -As Unix Systems are becoming more and more popular to even beginners working with computer machines -due to its advantages in regards of stability and functionality, most are somehow disappointed, because -those applications don't have a consistent look and each one behaves different from another. With KDE, -developers have an almost perfect way to create first-class applications for Unix desktop systems to get -a wider user community by the mere quality their applications have to offer. Therefore, KDE becomes more -and more popular as a base for programming design, and developers want to take advantage of the -possibilities that the system has to offer. - - - -What you should know already - -For making the best use of this programming handbook, we assume that you already know about the -C++ programming language; if not, you should make yourself familiar with that first. Information about -C++ is available through various sources either in printed form at your local bookstore or by tutorials -found on the Internet. Knowledge about the design of Graphical User Interfaces is not required, as this -handbook tries to cover the application design for KDE programs, which also includes an introduction into -the Qt toolkit as well as the KDE libraries and the design of User Interfaces. Also, you should have made -yourself comfortable with &tdevelop; by reading The User Manual to &tdevelop;, which contains a descriptive -review of the functionality provided by the IDE. - - - - -About this Handbook - -This handbook has been written to give developers an introduction into KDE application development by -using the TDevelop Integrated Development Environment. - - -The following chapters therefore give an introduction on how to create projects, explains the sourcecode -already generated and shows how to extend the given sources on various topics such as toolbars, menu bars -and view areas. - - -Then the dialogeditor is discussed in detail, explaining how widgets are created and covers widget -properties settings in detail for all provided widgets. - - -Finally, you will learn about several topics that will complete your knowledge in regards of project design -and helps you work out additional issues besides coding such as adding API documentation and extending -online-manuals. - - -In the next chapter - -We'll take a look at the Qt and KDE libraries, showing basic concepts and why things are the way they are. -Also, we will discuss how to create the tutorial applications provided with the Qt toolkit by using -tdevelop;, so beginners can already see first results with a few steps, and thereby will learn how to make -use of some of &tdevelop;'s best features. - - - - -In the following chapters - -You will learn how to: - -create an application with the KAppWizard -What the project skeleton already provides -What the code already create means -How to create your own views -How to extend your application's functionality by dialog, menu bars, and toolbars -How to make your application user friendly by providing help functions -How to write online documentation - - - - - - - -Additional Information - -Additional information about Qt/KDE programming is available by various sources: - -Programming with Qt by Matthias Kalle Dalheimer -The User Manual to TDevelop, provided with the TDevelop IDE -The Online Reference to the Qt library -The KDE Developer web site - - - -Additionally, you should look for help by subscribing to the various mailing lists, whose addresses -are available on the mentioned web sites, and on the Usenet newsgroups dedicated to users of KDE and -Unix Systems as well as about the C and C++ programming language. - - -For obtaining help about the TDevelop IDE, you should send requests to our mailinglist at -kdevelop@kdevelop.org. Mind that the TDevelop team is dedicated to provide the means to enable you to -program applications and therefore is not intended as a technical support team in cases where the -applications you're developing don't work due to implementation errors or misconfigurations of your -operating system. By this, we ask all users to take advantage of the mailinglist in any case you're running -into problems with the use of the IDE itself, as well as for bug reports and suggestions for improving the -functionality of the development environment. - - - - - - -The KDE and Qt Libraries - -The Norwegian company TrollTech (http://www.trolltech.com) -provides a so-called GUI toolkit, named Qt. GUI means "Graphical User Interface", and therefore, Qt-based -applications represent themselves with buttons, windows etc, allowing user input by visualizing the functions -an application provides. Such a toolkit is needed for developing graphical applications that run on the X-Window -interface on Unix Systems, because X does not contain a pre-defined user interface itself. Although other -toolkits are also available to create User Interfaces, Qt offers some technical advantages that make -application design very easy. Additionally, the Qt toolkit is also available for Microsoft Windows systems, -which allows developers to provide their applications for both platforms. - - -The KDE Team (http://www.kde.org) joined together with the goal -to make using Unix Systems more friendly, and decided to use the Qt toolkit for the development of a window -manager on X-Windows, plus a variety of tools included with the KDE packages. The K Desktop Environment -therefore contains the window manager kwm, the file manager kfm and the launch panel kpanel as the main -components plus a variety of first-class utilities and applications. After KDE was out, a lot of developers -turned their eyes towards the new environment and what it has to offer them. The KDE libraries are providing -essential methods and classes that make all applications designed with them look similar and consistent, -so the user has the great advantage that he only has to get accustomed with an application's specific -usage, not with handling dialogs or buttons. Also, KDE programs integrate themselves into the desktop and -are able to interact with the file manager via drag'n drop, offer session management and many more, if all -features offered by the KDE libraries are used. Both, the Qt toolkit and the KDE libraries, are implemented -in the C++ programming language; therefore applications that make use of these libraries are also mostly -written in C++. In the following chapter, we'll make a short trip through the libraries to see what already -is provided and how Qt and TDE applications are created in general. - - -Both, the Qt toolkit and the KDE libraries, are implemented in the C++ programming language; -therefore applications that make use of these libraries are also mostly written in C++. In the following -chapter, we'll make a short trip through the libraries to see what already is provided and how Qt and KDE -applications are created in general. - - - -The Qt GUI Toolkit - -As said, the Qt library is a toolkit that offers graphical elements that are used for creating GUI -applications and are needed for X-Window programming. Additionally, the toolkit offers: - -A complete set of classes and methods ready to use even for non-graphical programming issues -A good solution towards user interaction by virtual methods and the signal/slot mechanism -A set of predefined GUI-elements, called "widgets", that can be used easily for creating the visible elements -Additional completely pre-defined dialogs that are often used in applications such as progress and file dialogs - - - -Therefore knowing the Qt classes is very essential, even if you only want to program KDE-applications. -To have an impression on the basic concept how GUI-applications are constructed and compiled, we'll first -have a look at a sample Qt-only program; then we'll extend it to a KDE program. - - - -The first Qt Application - -As usual, programs in C++ have to contain a main() function, which is the starting point for application -execution. As we want them to be graphically visible in windows and offering user interaction, -we first have to know, how they can show themselves to the user. For an example, we'll have a look -at the first tutorial included with the Qt Online Reference Documentation and explain the basic execution -steps; also why and how the application window appears: - -#include <qapplication.h> -#include <qpushbutton.h> - -int main( int argc, char **argv ) -{ -QApplication a( argc, argv ); - -QPushButton hello( "Hello world!", 0 ); -hello.resize( 100, 30 ); - -a.setMainWidget( &hello ); -hello.show(); -return a.exec(); -} - - - -This application merely paints a window containing a button with "Hello world" as its text. As for -all Qt-based applications, you first have to create an instance of the class QApplication, represented by -variable a. - - -Next, the program creates an instance of the class QPushButton called hello, this will be the button. -The constructor of hello gets a string as a parameter, which is the contents of the widget visible as -the buttons text. - - -Then the resize() method is called on the hello button. This changes the default size a widget -(which is in this case the QPushButton) has when created to the length of 100 pixels and the height of -30 pixels. Finally, the setMainWidget() method is called for a and the show() method for hello. The -QApplication is finally executed by a.exec(), enters the main event loop and waits until it has to return -an integer value to the overlaying Operating System signaling that the application is exited. - - - - -The Reference Documentation for Qt - -Now, let's have a quick look at the reference documentation of the Qt library. To do this, start -&tdevelop; and select "Qt" from the tree in the Documentation tab. The documentation browser opens -and shows you the start page of the Qt reference. This will be your first place to get information -about Qt, it's classes and the available functions they provide. Also, the above program is the first -that is included in the tutorials section. To get to the classes we want to have a look at, -QApplication and QPushButton, select "Alphabetical Class List" -and search for the according names. Follow either of them to have a look at the class documentation. - - -Alternatively, you can use the online documentation from Trolltech's Qt Documentation - - -For QApplication, you will see the constructor and all other methods that this -class provides. If you follow a link, you will get more information about the usage and meaning of the -methods, which is very useful when you sometimes can't detect the correct use or want to have an example. -This also counts for the KDE library documentation, which uses a similar documentation type; therefore -this is almost all you have to know about using the class-references with the documentation browser. - - -Interpretation of the Sample - -Starting with QApplication, you will find all the methods used in our first example: - -the constructor QApplication() -the setMainWidget() method -the exec() method - - - -The interpretation why we use these methods is very simple: - -Create an instance of the class QApplication with the constructor, -so we can make use of the GUI elements provided by Qt -Create a widget which will be the contents of our program window -Set the widget as the main widget for a -Execute the a instance of QApplication - - - -The second object of our program is the pushbutton, an instance of the class QPushButton. -From the two constructors given to create an instance, we used the second: this accepts a text, -which is the label contents of the button; here, it is the string "Hello world!". Then we called the -resize() method to change the size of the button according to it's contents - -the button has to be larger to make the string completely visible. - - -But what about the show() method? Now, you see that like most other widgets, -QPushButton is based on a single inheritance, the documentation says, Inherits -QButton. Follow the link to the QButton class. -This shows you a lot of other widgets that are inherited by QPushButton, -which we'll use later to explain the signal/slot mechanism. Anyway, the show() -method is not listed, therefore, it must be a method that is provided by inheritance as well. The class -that QButton inherits is QWidget. Just follow the link -again, and you will see a whole bunch of methods that the QWidget class provides; including -the show() method. Now we understand what was done in the sample with the button: - -Create an instance of QPushButton, use the second constructor to set the button text -Resize the widget to its contents -Set the widget as the main widget of the QApplication instance a -Tell the widget to display itself on the screen by calling show(), an inherited method from QWidget - - - -After calling the exec() method, the application is visible to the user, -showing a window with the button showing "Hello world!". Note: GUI programs behave somewhat differently -than procedural applications. The main thing here is that the application enters a so-called -"main event loop". This means that the program has to wait for user actions and then react to it, also -that for a Qt application, the program has to be in the main event loop to start the event handling. -The next section tells you in short what this means to the programmer and what Qt offers to process -user events. - - -For already advanced users: The button has no parent declared in the constructor, therefore it -is a top-level widget alone and runs in a local event loop which doesn't need to wait for the main -event loop. See the QWidget class documentation and The KDE Library Reference Guide - - - - - - -User Interaction - -After reading the last sections, you should already know: - -What the Qt-library provides in terms of GUI applications -How a program using Qt is created and -Where and how to find information about classes that you want to use with the documentation browser - - - -Now we'll turn to give the application "life" by processing user events. Generally, the user has two ways -to interact with a program: the mouse and the keyboard. For both ways, a graphical user interface has to -provide methods that detect actions and methods that do something as a reaction to these actions. - - -The Window system therefore sends all interaction events to the according application. The -QApplication then sends them to the active window as a QEvent -and the widgets themselves have to decide what to do with them. A widget receives the event and processes -QWidget::event(QEvent*), which then decides which event has been executed -and how to react; event() is therefore the main event handler. Then, -the event() method passes the event to so-called event filters -that determine what happened and what to do with the event. If no filter signs responsible for the -event, the specialized event handlers are called. Thereby we can decide between: - - -Keyboard events -- TAB and Shift-TAB keys: - -virtual void focusInEvent(QFocusEvent *) -virtual void focusOutEvent(QFocusEvent *) - - - - -All other keyboard input: - -virtual void keyPressEvent(QKeyEvent *) -virtual void keyReleaseEvent(QKeyEvent *) - - - - -Mouse movements: - -virtual void mouseMoveEvent(QMouseEvent *) -virtual void enterEvent(QEvent *) -virtual void leaveEvent(QEvent *) - - - - -Mouse button actions - -virtual void mousePressEvent(QMouseEvent *) -virtual void mouseReleaseEvent(QMouseEvent *) -virtual void mouseDoubleClickEvent(QMouseEvent *) - - - - -Window events containing the widget - -virtual void moveEvent(QMoveEvent *) -virtual void resizeEvent(QResizeEvent *) -virtual void closeEvent(QCloseEvent *) - - - - - - -Note that all event functions are virtual and protected; therefore you can re-implement the events -that you need in your own widgets and specify how your widget has to react. QWidget -also contains some other virtual methods that can be useful in your programs; anyway, it is sufficient -to know about QWidget very well. - - - -Object Interaction by Signals and Slots - -Now we're coming to the most obvious advantages of the Qt toolkit: the signal/slot mechanism. -This offers a very handy and useful solution to object interaction, which usually is solved by -callback functions for X-Window toolkits. As this communication requires a strict programming and -sometimes makes user interface creation very difficult (as referred by the Qt documentation and explained -in Programming with Qt by K.Dalheimer), Troll Tech invented a new system where objects can emit signals -that can be connected to methods declared as slots. For the C++ part of the programmer, he only has to know -some things about this mechanism: - - -the class declaration of a class using signals/slots has to contain the Q_OBJECT macro at the beginning -(without a semicolon); and have to be derved from the QObject class - - -a signal can be emitted by the keyword emit, e.g. emit signal(parameters); from within any member function -of a class that allows signals/slots - - - -all signals used by the classes that are not inherited have to be added to the class declaration by a -signals section - - -all methods that can be connected with a signal are declared in sections with the additional keyword slot, -e.g. public slots: within the class declaration - - -the meta-object compiler moc has to run over the header file to expand the macros and to produce the -implementation (which is not necessary to know). The output files of moc are compiled also by the C++ compiler. - - - - -Another way to use signals without deriving from QObject is to use the -QSignal class- see the reference documentation for more information and example -usage. In the following, we assume you're deriving from QObject. - - -This way, your class is able to send signals anywhere and to provide slots that signals can connect -to. By using the signals, you don't have to care about who's receiving it- you just have to emit the -signal and whatever slot you want to connect to it can react to the emission. Also the slots can be used -as normal methods during implementation. - - -Now, to connect a signal to a slot, you have to use the connect() methods that -are provided by QObject or, where available, special methods that objects provide -to set the connection for a certain signal. - - - -Sample Usage - -To explain the way how to set up object-interaction, we'll take our first example again and extend it by a -simple connection: - -#include <qapplication.h> -#include <qpushbutton.h> - -int main( int argc, char **argv ) -{ -QApplication a( argc, argv ); - -QPushButton hello( "Hello world!" , 0); -hello.resize( 100, 30 ); - -a.setMainWidget( &hello ); - -QObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); - -hello.show(); -return a.exec(); -} - - - -You see, the only addition to give the button more interaction is to use a connect() - method: connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); -is all you have to add. What is the meaning now? The class declaration of QObject says about the -connect() method: - - -bool connect ( const QObject * sender, const char * signal, const QObject * receiver, const char * member ) - - -This means you have to specify a QObject instance pointer that is the sender -of the signal, meaning that it can emit this signal as first parameter; then you have to specify the signal -that you want to connect to. The last two parameters are the receiver object that provides a slot, followed -by the member function which actually is the slot that will be executed on signal emission. - - -By using signals and slots, your program's objects can interact with each other easily without explicitly -depending on the type of the receiver object. You will learn more about using this mechanism for productive -usage later in this handbook. More information about the Signals/Slot mechanism can also be found in -The KDE Library Reference Guide -and the Qt online reference. - - - - - - -What KDE provides - -The KDE 3.x libraries - -The main KDE libraries you'll be using for creating your own TDE applications are: - - -the tdecore library, containing all classes that are non-visible elements to provide application functionality - - -the tdeui library, containing user interface elements like menubars, toolbars, etc. - - -the tdefile library, containing the file selection dialogs - - - - -Additionally, for specific solutions KDE offers the following libraries: - - -the tdefx library, containing pixmaps, image effects the TDEStyle extension to QStyle - - -the tdehtml library, containing KDE's html component - - -the kjs library, containing KDE's Javascript support - - -the tdeio library, containing low level access to network files - - -the tdeparts library, containing support for re-usable embeddable extendable applications - - - - -Next we'll have a look at what is needed to turn out first Qt Application into a KDE one. - - - -Example KDE Application - -In the following, you will see that writing a KDE application is not much more difficult than a -Qt application. For the use of KDE's features, you just have to use some other classes, and you're almost -done. As an example, we'll discuss the changed version of the Qt example from above: - -#include <tdeapplication.h> -#include <qpushbutton.h> - -int main( int argc, char **argv ) -{ -TDEApplication a( argc, argv ); - -QPushButton hello( "Hello world!", 0 ); -hello.resize( 100, 30 ); - -a.setTopWidget( &hello ); - -QObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); - -hello.show(); -return a.exec(); -} - - - -You see that first we have changed from QApplication to TDEApplication -. Further, we had to change the previously used setMainWidget() method -to setTopWidget, which TDEApplication uses to set the main -widget. That's it! Your first KDE application is ready - you only have to tell the compiler the KDE -include path and the linker to link in the tdecore library with -ltdecore. - - -As you now know what at least the main() function provides generally and how an -application gets visible and allows user and object interaction, we'll go on with the next chapter, -where our first application is made with &tdevelop;. There you can also test everything which was -mentioned before and see the effects. - - -What you should have looked into additionally until now is the reference documentation for Qt, -especially the QApplication, QWidget and QObject - class and the tdecore library documentation for the TDEApplication class. -The KDE Library Reference handbook -also covers a complete description about the invocation of the QApplication and -TDEApplication constructors including command-line argument processing. - - - - - - - -Creating New Applications - - -The Application Wizard - -&tdevelop;'s Application Wizard is intended to let you start working on new project with &tdevelop;. Therefore -all of your projects are first created by the wizard, and then you can start building them and extend what is -already provided by the source skeleton. You can choose from several project types according to your project goals: - - -KDE Application Framework: includes source code for a complete frame structre of a standard KDE application - - -QMake Project: Creates an application framework based around Trolltech's qmake configuration system - - -Simple hello world program: Creates a C++ terminal based program with no GUI support - - -A multitude of other program skeletons - - - - -In this chapter we'll see how the Application Wizard can be invoked and what has to be done to generate -a KDE application project. This will also be the initial step of our coverage, where we will create the -initial version of a sample project. For all other project types the steps are usualyl the same, but you -may not have as many options available. - - - - -Invoking the Application Wizard and Project Generation - -Starting the Application Wizard and the First Page - -To start with your KDE application, open &tdevelop;. From the Project menu, selection New Project. The -Application Wizard starts, and you'll see the selection tree on the first page containing available project -types that can be created. Choose the C++ subtree, then KDE, then Application Framework. - - -For our sample project, we are going to create the application KScribble. Enter this as the application -name, and change any other information at the bottom of this screen that may need it. Then, select Next. - - -Application Wizard - - - - -Version control information - -On this screen you have the ability to decide if your project will use a version control system like -CVS. For our sample project we will not use source control, so make sure the selection box reads None -and select Next. - - - -Header and Source Templates - -The next two pages show example headers that will go at the top of each of the header and source files that -you create using &tdevelop;. For now, just leave these as the default, and select Next, then Finish. If the -Finish button is not activated, you haven't set all of the options correct. Use the Back button to return -to earlier menus and correct any mistakes. - - - -Finishing Up - -Upon completion, the Application Wizard should close and the messages window should popup displaying -information about the tasks that &tdevelop; is currently doing. At the end of all of the tasks, you -should see **** Success *****. This means the application framework was successfully loaded. - - - - - -The First Build - -After our project is generated, we'll first make a trip through the source code to get a general understanding -of how the application framework looks. This won't only help us get started, but we'll know where to change -what in later steps. - - -This chapter makes the assumption that you understand the basic navigation of &tdevelop;. Consult the -TDevelop User Manual for information if you need it. - - -The Automake manager shows the project files as follows: - - -Files in our project - - - -Before diving into the sources, we'll let &tdevelop; build an run our new application. To do this, select -Build Project from the Build menu, or press F8. The output window opens and displays output messages during -the compilation phase. - -1 cd /home/caleb/kscribble && WANT_AUTOCONF_2_5=1 WANT_AUTOMAKE_1_6=1 gmake k -2 gmake all-recursive -3 gmake[1]: Entering directory `/home/caleb/kscribble' -4 Making all in doc -5 gmake[2]: Entering directory `/home/caleb/kscribble/doc' -6 Making all in . -7 gmake[3]: Entering directory `/home/caleb/kscribble/doc' -8 gmake[3]: Nothing to be done for `all-am'. -9 gmake[3]: Leaving directory `/home/caleb/kscribble/doc' -10 Making all in en -11 gmake[3]: Entering directory `/home/caleb/kscribble/doc/en' -12 /usr/local/trinity/bin/meinproc --check --cache index.cache.bz2 /home/caleb/kscribble/doc/en/index.docbook -13 gmake[3]: Leaving directory `/home/caleb/kscribble/doc/en' -14 gmake[2]: Leaving directory `/home/caleb/kscribble/doc' -15 Making all in po -16 gmake[2]: Entering directory `/home/caleb/kscribble/po' -17 gmake[2]: Nothing to be done for `all'. -18 gmake[2]: Leaving directory `/home/caleb/kscribble/po' -19 Making all in src -20 gmake[2]: Entering directory `/home/caleb/kscribble/src' -21 source='main.cpp' object='main.o' libtool=no \ -22 depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \ -23 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -24 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings - -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new - -c -o main.o `test -f 'main.cpp' || echo '/home/caleb/kscribble/src/'`main.cpp -25 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/kscribble.h -o kscribble.moc -26 source='kscribble.cpp' object='kscribble.o' libtool=no \ -27 depfile='.deps/kscribble.Po' tmpdepfile='.deps/kscribble.TPo' \ -28 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -29 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings - -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new - -c -o kscribble.o `test -f 'kscribble.cpp' || echo '/home/caleb/kscribble/src/'`kscribble.cpp -30 kscribble.cpp: In member function `void KScribble::setupActions()' -31 kscribble.cpp:107: warning: unused variable `TDEAction*custom' -32 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/kscribbleview.h -o kscribbleview.moc -33 source='kscribbleview.cpp' object='kscribbleview.o' libtool=no \ -34 depfile='.deps/kscribbleview.Po' tmpdepfile='.deps/kscribbleview.TPo' \ -35 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -36 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi - -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -c - -o kscribbleview.o `test -f 'kscribbleview.cpp' || echo '/home/caleb/kscribble/src/'`kscribbleview.cpp -37 kscribbleview.cpp: In member function `void KScribbleView::print(QPainter*, -38 int, int)': -39 kscribbleview.cpp:79: warning: unused parameter `QPainter*p' -40 kscribbleview.cpp:79: warning: unused parameter `int height' -41 kscribbleview.cpp:79: warning: unused parameter `int width' -42 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/pref.h -o pref.moc -43 source='pref.cpp' object='pref.o' libtool=no \ -44 depfile='.deps/pref.Po' tmpdepfile='.deps/pref.TPo' \ -45 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -46 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings - -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new - -c -o pref.o `test -f 'pref.cpp' || echo '/home/caleb/kscribble/src/'`pref.cpp -47 /usr/local/trinity/bin/dcopidl /home/caleb/kscribble/src/kscribbleiface.h > kscribbleiface.kidl || - ( rm -f kscribbleiface.kidl ; /bin/false ) -48 /usr/local/trinity/bin/dcopidl2cpp --c++-suffix cpp --no-signals --no-stub kscribbleiface.kidl -49 source='kscribbleiface_skel.cpp' object='kscribbleiface_skel.o' libtool=no \ -50 depfile='.deps/kscribbleiface_skel.Po' tmpdepfile='.deps/kscribbleiface_skel.TPo' \ -51 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -52 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings - -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new - -c -o kscribbleiface_skel.o `test -f 'kscribbleiface_skel.cpp' || - echo '/home/caleb/kscribble/src/'`kscribbleiface_skel.cpp -53 /bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall - -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 - -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -o kscribble -R - /usr/local/trinity/lib -R /usr/lib/qt/lib -R /usr/X11R6/lib -L/usr/X11R6/lib -L/usr/lib/qt/lib - -L/usr/local/trinity/lib main.o kscribble.o kscribbleview.o pref.o kscribbleiface_skel.o -ltdeio -54 source='kscribble_client.cpp' object='kscribble_client.o' libtool=no \ -55 depfile='.deps/kscribble_client.Po' tmpdepfile='.deps/kscribble_client.TPo' \ -56 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -57 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings - -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new - -c -o kscribble_client.o `test -f 'kscribble_client.cpp' || echo - '/home/caleb/kscribble/src/'`kscribble_client.cpp -58 /bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef - -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 - -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -o kscribble_client -R - /usr/local/trinity/lib -R /usr/lib/qt/lib -R /usr/X11R6/lib -L/usr/X11R6/lib -L/usr/lib/qt/lib - -L/usr/local/trinity/lib kscribble_client.o -ltdecore -59 gmake[2]: Leaving directory `/home/caleb/kscribble/src' -60 gmake[2]: Entering directory `/home/caleb/kscribble' -61 gmake[2]: Nothing to be done for `all-am'. -62 gmake[2]: Leaving directory `/home/caleb/kscribble' -63 gmake[1]: Leaving directory `/home/caleb/kscribble' -64 *** Success *** - - - -As you can see, we've put line numbers in front of each line which won't appear on your output but it makes it -easier to describe what is happening during the build. First of all, gmake works recursively. This means -that it starts from the directory it is invoked and goes into the subdirectories first, one at a time, then -returns to the directory it was started, processes it, then finishes. - - -Our first line of interest is 24. Notice on this line that g++, which is our C++ compiler, gets called by make -to compile the first source code file in our project - in this case main.cpp. Many extra command line options -are also being used with the g++ compiler; some of which are defaults and some of which can be configured -via &tdevelop;. - - -Before the next file (kscribble.cpp, line 29) is compiled, the moc (meta object compiler) is first -invoked on kscribble.h (line 25). This is because KScribble classes use signals/slots, so the -Q_OBJECT macro must be expanded, and the moc does this for us. The resultant file, kscribble.moc, is -used by kscribble.cpp via an #include statement inside of the file. - - - - -The source skeleton - -To conceptualize how a KDE application works, we'll first have a very close look at the source -skeleton already provided by the Application Wizard. As we already saw, we're having a set of source -and header files that build the initial code for the application and make it ready-to-run. Therefore, -the easiest way to explain the code is to follow the implementation line by line as it is processed -during executing the program until it enters the main event loop and is ready to accept user input. -Then, we'll have a look at the functionality that enables user interaction and how certain things work. -This is probably the best way to explain the framework and, as it is similar to almost all KDE -applications, will enable you to read source codes from other projects as well; additionally, you will -know where to change what part of the code to make your applications behave the way they are designed for. - - - -The main() function - -As the application begins its execution with entering the main() function, -this will be the start for our code examination. The main() function of -KScribble is implemented in the file main.cpp and can also be found using the Class Browser -by selecting the "Global Functions" folder. - -1 int main(int argc, char **argv) -2 { -3 TDEAboutData about("kscribble", I18N_NOOP("KScribble"), version, description, -4 TDEAboutData::License_GPL, "(C) 2002 Your Name", 0, 0, "you@you.com"); -5 about.addAuthor( "Your Name", 0, "you@you.com" ); -6 TDECmdLineArgs::init(argc, argv, &about); -7 TDECmdLineArgs::addCmdLineOptions(options); -8 TDEApplication app; -9 -10 // register ourselves as a dcop client -11 app.dcopClient()->registerAs(app.name(), false); -12 -13 // see if we are starting with session management -14 if (app.isRestored()) -15 RESTORE(KScribble) -16 else -17 { -18 // no session.. just start up normally -19 TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); -20 if (args->count() == 0) -21 { -22 KScribble *widget = new KScribble; -23 widget->show(); -24 } -25 else -26 { -27 int i = 0; -28 for (; i < args->count(); i++) -29 { -30 KScribble *widget = new KScribble; -31 widget->show(); -32 widget->load(args->url(i)); -33 } -34 } -35 args->clear(); -36 } -37 -38 return app.exec(); -39 } - - - -Now, what happens first is the usual creation of a TDEApplication object, but we've -added some KDE methods that set program and author information for this application. - - - -User Application Start - -... (not written yet) - - - -The Constructor - -Let's have a look at the constructor and see how this instance is called - -1 KScribble::KScribble() -2 : TDEMainWindow( 0, "KScribble" ), -3 m_view(new KScribbleView(this)), -4 m_printer(0) -5 { -6 // accept dnd -7 setAcceptDrops(true); -8 -9 // tell the TDEMainWindow that this is indeed the main widget -10 setCentralWidget(m_view); -11 -12 // then, setup our actions -13 setupActions(); -14 -15 // and a status bar -16 statusBar()->show(); -17 -18 // allow the view to change the statusbar and caption -19 connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)), -20 this, SLOT(changeStatusbar(const QString&))); -21 connect(m_view, SIGNAL(signalChangeCaption(const QString&)), -22 this, SLOT(changeCaption(const QString&))); -23 -24 } - - - -Notice that KScribble inherits the TDEMainWindow class - a -commonly used base class for TDE applications. We initialize a class called KScribbleView -as our central widget, create a KStatusBar via the statusBar() -method (line 16), and connect some signals and slots together. - - - - - - - -Application View Design - -Introduction - -When developing an application with a graphical user interface, the main work takes place in -providing a so-called "view" for the application. A view generally is a widget that displays the data -of a document and provides methods to manipulate the document contents. This can be done by the user via -the events he emits by the keyboard or the mouse; more complex operations are often processed by toolbars -and menubars which interact with the view and the document. The statusbar then provides information about -the document, view or application status. As an example, we look at how an editor is constructed and where -we can find which part. - - -An editor generally is supposed to provide an interface to view and/or change the contents of a text -document for the user. If you start Kate, you see the visual interface as the following: - - -The menubar: providing complex operations as well as opening, saving and closing files and -exiting the application. - - -The toolbar: offers icons which allow quicker access for most needed functions, - - -The statusbar: displays the status of the cursor position by the current row and column, - - -The view in the center of the window, displaying a document and offering a cursor connected to -the keyboard and the mouse to operate on the data. - - - - -Now it's easy to understand that a view is the most unique part of the application and the design -of the view decides about the usability and acceptability of an application. This means that one of -the first steps in development is to determine the purpose of the application and what kind of view -design would match best to allow any user to work with the application with a minimum of work -learning how to handle the user interface. - - -For some purposes like text editing and displaying HTML files, views are provided by the Qt and KDE -libraries; we will discuss certain aspects of these high-level widgets in the next section. -But for most applications new widgets have to be designed and implemented. It is that what makes a -programmer also a designer and where his abilities on creativity are asked. Nevertheless, you should -watch for intuitivity first. Remember, a lot of users won't accept an application that isn't: - - -graphically nice. - - -offering a lot of features - - -easy to handle - - -fast to learn how to use it - - - - -Needless to say that stability is a major design goal. Nobody can prevent bugs, but a minimum can -be reached at least by clever design goals and wide use of object-oriented design. C++ makes programming -a joy if you know how to exploit it's capabilities- inheritance, information hiding and reusablitity of -already existing code. - - -When creating a KDE or Qt project, you always have to have a view that inherits QWidget, either by -direct inheritance or because the library widget you want to use inherits QWidget. Therefore, the -Application Wizard already constructed a view that is an instance of a class yourappView, which -inherits QWidget already. - - -This chapter therefore describes how to use library widgets for creating views of KDE or -Qt applications that are generated with &tdevelop;, then we look at the libraries and what kind of -views are already offered. - - - -Using Library Views - -When your application design has been set up, you first should look for already existing code that -will make your life a lot easier. A part of this search is to look for a widget that can be used as -a view or at least as a part of it; either directly or by inheritance. The KDE and Qt libraries already -contain a set of widgets that can be used for this purpose. To use them, you have two options: - - -Remove the new view class and create an instance of a library widget; then set this as the view, - - -Change the inheritance of the provided view class to the class of the library widget to use. - - - - -In either way, it is important to know that if the application framework is currently not linked -against the library that contains the widget, the linker will fail. After you decided to use a -certain widget, look for the library to link to; then open "Project"->"Options" from the &tdevelop; -menubar. Switch to the "Linker Options" page and look for the checkmarks indicating the libraries -that are currently used. If the library of your view widget is already checked, you can leave the -project options untouched and start doing the necessary changes due to your choice. If not, and the -linker options offer to add the library by a check box, check it and press "OK" to leave the project -options dialog again. In any other case, add the library in the edit line below with the -l option. -For libraries that your application has to search for before preparing the Makefiles by the -configure script on the end-user machine, add the according search macro to the configure.in file -located at the root directory of your project and add the macro to the edit line. Mind that you have -to run "Build"->"Autoconf and automake" and "Build"->"Configure" before the Makefiles contain the -correct expansion for the library macro. - - -Also, if the include files for the library to add are not in the current include path -(which can be seen by the -I options in the output window on "Make"), you have to add the path to the -Project Options dialog -"Compiler Options" page with the -I option or the according automake macro at -the edit line for "Additional Options". - - -Qt Views - -Looking at the first page of the Qt online documentation, you will find a link to -"Widget Screenshots" where you can have a look at how the widgets Qt contains look like. -These are ready to use and can be combined together to form complex widgets to create application -views or dialogs. In the following, we'll discuss some of these which are very usable for creating -application views, but keep in mind that the KDE libraries sometimes contain other widgets for the -same purpose; those will be reviewed in the next section. - - -Here are a set of hints for what purpose you could use which Qt component: - - -If your view area isn't big enough to display all your data, the user must be enabled to scroll -over the document with bars on the left and bottom of the view. For this, Qt provides the class -QScrollView, which offers a scrollable child area. As explained, you could -inherit your own widget from QScrollView or use an instance to manage your -document's view widget. - - -to create a ScrollView yourself, inherit the View widget from QWidget -and add vertical and horizontal QScrollBars . -(This is done by KDE`s TDEHTMLView widget.) - - -For text processing, use QTextEdit. This class provides a complete -text editor widget that is already capable to cut, copy and paste text and is managed by a scrollview. - - -Use QTable to display data that is arranged in a table. -As QTable is managed by scrollbars as well, it offers a good solution for -table calculation applications. - - -To display two different widgets or two widget instances at the same time, use QSplitter -. This allows to tile views by horizontal or vertical dividers. -KMail is a good example what this would look like- the main view is separated by a -splitter vertically, the right window then is divided again horizontally. - - -QListView displays information in a list and tree. -This is useful for creating file trees or any other hierarchical information you want to interact with. - - - - -You see that Qt alone offers a whole set of widgets which are ready to use so you don't have to invent -new solutions if these match your needs. The sideffect when using standard widgets is that users already -know how to handle them and only have to concentrate on the displayed data. - - - -KDE Views - -The KDE libraries were invented to make designing applications for the K Desktop Environment easier -and capable of more functionality than what Qt alone is offering. The tdeui library offers: - - -TDEListView: a more powerful version of QListView - - -TDEIconView: a graphical viewer of icon files - - - - -The tdehtml library, on the other hand, offers a complete HTML-interpreting widget that is ready to use. -It is scrollable already, so you don't even have to take care for that. A possible use could be to -integrate it as a preview widget for an HTML editor; used by applications such as Konqueror to display HTML files. - - - - -Creating your own Views - -Not yet written - - - - - -Configuring Menubars and Toolbars - -Introduction - -Menubars and toolbars are one of the most important parts of an application to provide methods to -work with a document structure. As a general rule, you should make all functions available by the menubar. -Those methods that should not be available at a current stage of the application process should be -disabled. - - -Further, an application can only contain one menubar, but several toolbars. -Toolbars on the other hand should contain only the most frequently used commands by pixmap -icons or provide quick access methods like combos to select values. - - - -How does it work? - -Our application inherits the TDEMainWindow class, which automatically handles creating -a menu bar and tool bars for us. In the KScribble::setupActions() method there is -a call to TDEMainWindow::createGUI(). This method loads a resource file, in this -case kscribbleui.rc, to initialize menus at startup. Note that kscribbleui.rc is listed as one of the -project files in the Automake Manager. Opening that file up reveals this: - -1 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> -2 <kpartgui name="kscribble" version="1"> -3 <MenuBar> -4 <Menu name="custom"><text>C&ustom</text> -5 <Action name="custom_action" /> -6 </Menu> -7 </MenuBar> -8 </kpartgui> - - - -Explanation... - - -Another way to modify the contents of the menu and tool bars is to directly manipulate them through the -methods provided by their class. For example, the menuBar() method returns the -KMenuBar widget that the menubar for our program. Looking at the documentation for -KMenuBar and its inheritor class QMenuBar, you will find -a large number of insertItem() methods which allow you to add items to the -menu bar. - - -TDEMainWindow's methods statusBar() and -toolBar() will also provide you with applicable widgets. - - - -Keyboard Accelerator Configuration - -A very professional thing you should always add to your application are keyboard accelerators. -Those are mainly used by experienced users that want to work fast with their applications and -are willing to learn shortcuts. For this, the KDE libraries provide the class -TDEAction, which provides the keyboard accelerator keys and access to global configured -standard keyboard accelerators. - - -By default, frame applications generated by &tdevelop; only use standard keyboard accelerators -such as F1 for accessing online-help, Ctrl+N for New File etc. - - -If your application contains a lot of accelerators, you should make them configurable -by an Options-menu; either it could be combined with other application configuration in a QWidget -or stand alone. The KDE library already provides a KKeyChooser -for use in tab dialogs, whereas KKeyDialog provides a ready-to use -key-configuration dialog. - - - - - - - -Help Functions - -Introduction - -A very important part of the development process is to provide help functionality to the user -wherever possible. Most developers tend to delay this, but you should remember that a normal user -isn't necessarily a Unix expert. He may come from the the dark side of computer software usage offering -all sweets that a user may need to work himself into using an application even without ever touching the -manuals. Therefore, the KDE and Qt library provide all means usually considered making an application -professional in the eyes of the normal user by help functions that are ready to use. -Within the application, those are: - -Tool-Tips -Statusbar help -What's this...? buttons - - -Additionally, the application should provide means to access a HTML-based online manual directly -using the standard help key F1. This context based help system is provided automatically through the -TDEMainWindow class, though as the author you must provide the content. - - -As &tdevelop; also offers all types of help as well as the KDE framework generated by the -application wizard already contains support for this, this chapter will help you find out where -and how to add your help functionality. - -During the development of your application you should try to be consistent whatever you're doing; -therefore you should do the necessary steps directly while extending the code. This will prevent you -from diving into the code again and figuring out what your application does or what you intended by -certain parts of the code. - - - - -Tool-Tips - -A very easy means of providing help are tool-tips. Those are small help messages popping up while -the user moves the mouse over a widget that provides a tool-tip and disappears when the mouse moves away. -The most popular usage of tool-tips is made in toolbars where your tool-tips should be kept as small -as possible because toolbars can be configured to display their contents in various ways: -either displaying the button, button with text on the right, button with text below, text only. -This possibility should be made configurable by the user, but isn't a must-be. The text is shown -as a tool-tip anyway and a toolbar usually consists of buttons and other widgets like lineedits and -combo boxes. For a complete reference, see the TDEToolBar class reference located -in the tdeui library. - - -As an example, we have a look at the "New File" button in a generic application: - - -There, the part i18n("New File") provides a tool-tip message. It is enclosed by the i18n() -macro provided by kapp.h to translate the tool-tip towards the currently selected language. - - -Tool-tips can also be added to any custom widget by using the QToolTip -provided by Qt. An example of that would be: - - - -Extending the Statusbar - -As the applications that inherit TDEMainWindow contain a statusbar as well, -it also offers a set of statusbar messages already for all menu and toolbar items. A statusbar -help message is a short message that extends the meaning of a tool-tip or can be seen as a replacement -for a tool-tip over menubar items and is (as the name suggests) displayed in the statusbar when the user -enters a menu and highlights the menu entry. - - - -The <guibutton>What's This...?</guibutton> Button - -The What's This...? button provides help windows with the intention -that the user wants to get help about a certain widget within the working view or a toolbar item. -It is placed in the toolbar and gets activated once the user hits the button. The cursor changes -to an arrow cursor with a question mark like the button itself looks like. The the user can press on -a visible widget item and gets a help window. As an exercise, you could try this behavior with the -What's this...? button within &tdevelop;. - - -To add the What's This...? help to one of your widgets, use the static method -QWhatsThis::add(QWidget *widget, const QString &text) - - - - - -Documentation - -Introduction - -Due to the fact that projects often lack a complete set of user documentation, -all &tdevelop; projects contain a pre-build handbook that can be easily adapted; -therefore fulfiling another goal of KDE: providing enough online-help to support users that -are not familiar with an application. This chapter therefore introduces you on how to extend -the provided documentation template and what you have to do to make it available to the user. - - - -User Documentation - -The documentation for your project lies in projectdir/doc/en, or perhaps another directory if English -isn't your native language. Therein lies a file, index.docbook, in which the documentation is stored. -The format for editing this file is explained on -KDE's documentation website. - - - -Programmer Documentation - -Another important part of the documentation is including a descriptive help for your class interfaces. -This will allow you and other programmers to use your classes by reading the HTML class documentation -that can be created with KDoc. &tdevelop; supports the use of KDoc completely by creating the -KDE-library documentation, also your application frameworks are already documented. To work yourself -into the provided code, it would be a good start to read the included documentation online. -The following describes what to do to get the API documentation, where &tdevelop; helps you add it -and what kind of special tags KDoc provides. - - - - - -Internationalization - -Introdction - -i18n is an internationalization system that is used to offer internationalized versions of an -application or project. The difficulty with writing applications is that they only support the -language they originally are composed with; visually this can be seen on labels, menu entries and the -like. The goal of the internationalization is to provide applications and library functions in the -language of the user; therefore enabling users that are not native speakers the original language to make -use of the provided functionality and feel more comfortable. - - - - - - -Credits - - -(... to be written ...) - - - - - - - -Bibliography - - - -<ulink url="info://make/Top">GNU Make Manual</ulink> - -Richard M.Stallman -RolandMcGrath - - - - -<ulink url="info://automake/Top">GNU Automake</ulink> - -DavidMacKenzie -TomTromey - - - - -<ulink url="info://autoconf/Top">GNU Autoconf</ulink> - -DavidMacKenzie -BenElliston - - - - -<ulink url="info://gcc/Top">Using the GNU Compiler Collection</ulink> -Richard M.Stallman - - - -<ulink url="info://libtool/Top">GNU Libtool</ulink> - -GordonMatzigkeit -AlexandreOliva -ThomasTanner -Gary V.Vaughan - - - - -GNU Autoconf, Automake, and Libtool -1st edition -October 2000 - -Gary V.Vaughan -BenElliston -TomTromey -Ian LanceTaylor - -New Riders Publishing -ISBN 1578701902 - - - - -Advanced Programming in the UNIX(R) Environment -1st edition -June 1992 -W. RichardStevens -Addison-Wesley Pub Co -ISBN 0201563177 - - - -Thinking in C++, Volume 1: Introduction to Standard C++ -2nd Edition -April 15, 2000 -BruceEckel -Prentice Hall -ISBN 0139798099 - - - -Open Source Development with CVS -2nd Edition -October 12, 2001 - -KarlFogel -MosheBar - -The Coriolis Group -ISBN 158880173X - - - -Programming PHP -1st edition -March 2002 - -RasmusLerdorf -KevinTatroe - -O'Reilly & Associates -ISBN 1565926102 - - - -Programming Python -2nd Edition -March 2001 -MarkLutz -O'Reilly & Associates -ISBN 0596000855 - - - -Gui Programming With Python : Using the Qt Toolkit -Bk&Cd-r edition -January 2002 -BoudewijnRempt -Opendocs Llc -ISBN 0970033044 - - - -Programming Perl -The Camel book -3rd Edition -July 2000 - -LarryWall -TomChristiansen -JonOrwant - -O'Reilly & Associates -ISBN 0596000278 - - - -Learning Perl -The Lama book -3rd Edition -July 15, 2001 - -Randal L.Schwartz -TomPhoenix - -O'Reilly & Associates -ISBN 0596001320 - - - - -&underFDL; - - - - -
diff --git a/doc/tde_app_devel/kscribblefiles.png b/doc/tde_app_devel/kscribblefiles.png deleted file mode 100644 index 1591b3cf..00000000 Binary files a/doc/tde_app_devel/kscribblefiles.png and /dev/null differ diff --git a/doc/tdearch/Makefile.am b/doc/tdearch/Makefile.am deleted file mode 100644 index 171f575c..00000000 --- a/doc/tdearch/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -KDE_LANG = en -KDE_DOCS = AUTO diff --git a/doc/tdearch/affine-general.png b/doc/tdearch/affine-general.png deleted file mode 100644 index 8e59d5e5..00000000 Binary files a/doc/tdearch/affine-general.png and /dev/null differ diff --git a/doc/tdearch/affine-rotate.png b/doc/tdearch/affine-rotate.png deleted file mode 100644 index 7192ed9c..00000000 Binary files a/doc/tdearch/affine-rotate.png and /dev/null differ diff --git a/doc/tdearch/affine-scale.png b/doc/tdearch/affine-scale.png deleted file mode 100644 index 0b52fd4c..00000000 Binary files a/doc/tdearch/affine-scale.png and /dev/null differ diff --git a/doc/tdearch/affine-shear.png b/doc/tdearch/affine-shear.png deleted file mode 100644 index 1ed5fbd8..00000000 Binary files a/doc/tdearch/affine-shear.png and /dev/null differ diff --git a/doc/tdearch/affine-translate.png b/doc/tdearch/affine-translate.png deleted file mode 100644 index 87265e30..00000000 Binary files a/doc/tdearch/affine-translate.png and /dev/null differ diff --git a/doc/tdearch/brushstyles.png b/doc/tdearch/brushstyles.png deleted file mode 100644 index b6df50ca..00000000 Binary files a/doc/tdearch/brushstyles.png and /dev/null differ diff --git a/doc/tdearch/canvas.png b/doc/tdearch/canvas.png deleted file mode 100644 index dd83dae9..00000000 Binary files a/doc/tdearch/canvas.png and /dev/null differ diff --git a/doc/tdearch/capflat.png b/doc/tdearch/capflat.png deleted file mode 100644 index 5e1c92ce..00000000 Binary files a/doc/tdearch/capflat.png and /dev/null differ diff --git a/doc/tdearch/capround.png b/doc/tdearch/capround.png deleted file mode 100644 index 0e66eaac..00000000 Binary files a/doc/tdearch/capround.png and /dev/null differ diff --git a/doc/tdearch/capsquare.png b/doc/tdearch/capsquare.png deleted file mode 100644 index 35724a72..00000000 Binary files a/doc/tdearch/capsquare.png and /dev/null differ diff --git a/doc/tdearch/index.docbook b/doc/tdearch/index.docbook deleted file mode 100644 index 3bc09158..00000000 --- a/doc/tdearch/index.docbook +++ /dev/null @@ -1,3337 +0,0 @@ - - - -]> - - - - -KDE Architecture Overview - - - - - - -Bernd -Gehrmann -
bernd@kdevelop.org
-
-
- - -2001 -2002 -Bernd Gehrmann - - -&FDLNotice; - - -This documentation gives an overview of the KDE Development Platform - - - -KDE -architecture -development -programming - - -
- - -Library structure - - -Libraries by name - - - - -tdecore - -The tdecore library is the basic application framework for every KDE based -program. It provides access to the configuration system, command line -handling, icon loading and manipulation, some special kinds inter-process -communication, file handling and various other utilities. - - - - -tdeui - -The tdeui library provides many widgets and standard -dialogs which Qt doesn't have or which have more features than their Qt -counterparts. It also includes several widgets which are subclassed -from Qt ones and are better integrated with the KDE desktop by -respecting user preferences. - - - - -tdeio - -The tdeio library contains facilities for asynchronous, -network transparent I/O and access to mimetype handling. It also provides the -KDE file dialog and its helper classes. - - - - -kjs - -The kjs library provides an implementation of JavaScript. - - - - -tdehtml - -The tdehtml library contains the TDEHTML part, a HTML browsing -widget, DOM API and parser, including interfaces to Java and JavaScript. - - - - - - - - - -Grouped classes - - -Core application skeleton - classes needed by almost every application. - - - - - -<ulink url="kdeapi:tdecore/TDEApplication">TDEApplication</ulink> - -Initializes and controls a KDE application. - - - - -<ulink url="kdeapi:tdecore/KUniqueApplication">KUniqueApplication</ulink> - -Makes sure only one instance of an application can run simultaneously. - - - -<ulink url="kdeapi:tdecore/TDEAboutData">TDEAboutData</ulink> - -Holds information for the about box. - - - -<ulink url="kdeapi:tdecore/TDECmdLineArgs">TDECmdLineArgs</ulink> - -Command line argument processing. - - - - - - -Configuration settings - access to KDE's hierarchical configuration -database, global settings and application resources. - - - - -<ulink url="kdeapi:tdecore/TDEConfig">TDEConfig</ulink> - -Provides access to KDE's configuration database. - - - -<ulink url="kdeapi:tdecore/KSimpleConfig">KSimpleConfig</ulink> - -Access to simple, non-hierarchical configuration files. - - - -<ulink url="kdeapi:tdecore/KDesktopFile">KDesktopFile</ulink> - -Access to .desktop files. - - - -<ulink url="kdeapi:tdecore/TDEGlobalSettings">TDEGlobalSettings</ulink> - -Convenient access to not application-specific settings. - - - - - - -File and URL handling - decoding of URLs, temporary files etc. - - - - -<ulink url="kdeapi:tdecore/KURL">KURL</ulink> - -Represents and parses URLs. - - - -<ulink url="kdeapi:tdecore/KTempFile">KTempFile</ulink> - -Creates unique files for temporary data. - - - -<ulink url="kdeapi:tdecore/KSaveFile">KSaveFile</ulink> - -Allows to save files atomically. - - - - - - -Interprocess communication - DCOP helper classes and subprocess invocation. - - - - -<ulink url="kdeapi:tdecore/TDEProcess">TDEProcess</ulink> - -Invokes and controls child processes. - - - -<ulink url="kdeapi:tdecore/KShellProcess">KShellProcess</ulink> - -Invokes child processes via a shell. - - - -<ulink url="kdeapi:tdesu/PtyProcess">PtyProcess</ulink> - -Communication with a child processes through a pseudo terminal. - - - -<ulink url="kdeapi:tdecore/KIPC">KIPC</ulink> - -Simple IPC mechanism using X11 ClientMessages. - - - -<ulink url="kdeapi:dcop/DCOPClient">DCOPClient</ulink> - -DCOP messaging. - - - -<ulink url="kdeapi:tdecore/KDCOPPropertyProxy">KDCOPPropertyProxy</ulink> - -A proxy class publishing Qt properties through DCOP. - - - -<ulink url="kdeapi:tdeui/KDCOPActionProxy">KDCOPActionProxy</ulink> - -A proxy class publishing a DCOP interface for actions. - - - - - - -Utility classes - memory management, regular expressions, string manipulation, -random numbers - - - - -<ulink url="kdeapi:tdecore/KRegExp">KRegExp</ulink> - -POSIX regular expression matching. - - - -<ulink url="kdeapi:tdecore/KStringHandler">KStringHandler</ulink> - -An extravagant interface for string manipulation. - - - -<ulink url="kdeapi:tdecore/TDEZoneAllocator">TDEZoneAllocator</ulink> - -Efficient memory allocator for large groups of small objects. - - - -<ulink url="kdeapi:tdecore/KRandomSequence">KRandomSequence</ulink> - -Pseudo random number generator. - - - - - - -Keyboard accelerators - classes helping to establish consistent key bindings -throughout the desktop. - - - - -<ulink url="kdeapi:tdecore/TDEAccel">TDEAccel</ulink> - -Collection of keyboard shortcuts. - - - -<ulink url="kdeapi:tdecore/TDEStdAccel">TDEStdAccel</ulink> - -Easy access to the common keyboard shortcut keys. - - - -<ulink url="kdeapi:tdecore/TDEGlobalAccel"></ulink> - -Collection of system-wide keyboard shortcuts. - - - - - - -Image processing - icon loading and manipulating. - - - - -<ulink url="kdeapi:tdecore/TDEIconLoader">TDEIconLoader</ulink> - -Loads icons in a theme-conforming way. - - - -<ulink url="kdeapi:tdecore/TDEIconTheme">TDEIconTheme</ulink> - -Helper classes for TDEIconLoader. - - - -<ulink url="kdeapi:tdecore/KPixmap">KPixmap</ulink> - -A pixmap class with extended dithering capabilities. - - - -<ulink url="kdeapi:tdeui/KPixmapEffect">KPixmapEffect</ulink> - -Pixmap effects like gradients and patterns. - - - -<ulink url="kdeapi:tdeui/KPixmapIO">KPixmapIO</ulink> - -Fast QImage to QPixmap conversion. - - - - - - -Drag and Drop - drag objects for colors and URLs. - - - - -<ulink url="kdeapi:tdecore/KURLDrag">KURLDrag</ulink> - -A drag object for URLs. - - - -<ulink url="kdeapi:tdeui/KColorDrag">KColorDrag</ulink> - -A drag object for colors. - - - -<ulink url="kdeapi:tdecore/KMultipleDrag">KMultipleDrag</ulink> - -Allows to construct drag objects from several others. - - - - - - -Auto-Completion - - - - -<ulink url="kdeapi:tdecore/TDECompletion">TDECompletion</ulink> - -Generic auto-completion of strings. - - - -<ulink url="kdeapi:tdeio/KURLCompletion">KURLCompletion</ulink> - -Auto-completion of URLs. - - - -<ulink url="kdeapi:tdeio/KShellCompletion">KShellCompletion</ulink> - -Auto-completion of executables. - - - - - - -Widgets - widget classes for list views, rules, color selection etc. - - - - -<ulink url="kdeapi:tdeui/TDEListView">TDEListView</ulink> - -A variant of QListView that honors KDE's system-wide settings. - - - -<ulink url="kdeapi:tdeui/TDEListView">TDEListBox</ulink> - -A variant of QListBox that honors KDE's system-wide settings. - - - -<ulink url="kdeapi:tdeui/TDEListView">TDEIconView</ulink> - -A variant of QIconView that honors KDE's system-wide settings. - - - -<ulink url="kdeapi:tdeui/TDEListView">KLineEdit</ulink> - -A variant of QLineEdit with completion support. - - - -<ulink url="kdeapi:tdeui/KComboBox">KComboBox</ulink> - -A variant of QComboBox with completion support. - - - -<ulink url="kdeapi:tdeui/TDEFontCombo">TDEFontCombo</ulink> - -A combo box for selecting fonts. - - - -<ulink url="kdeapi:tdeui/KColorCombo">KColorCombo</ulink> - -A combo box for selecting colors. - - - -<ulink url="kdeapi:tdeui/KColorButton">KColorButton</ulink> - -A button for selecting colors. - - - -<ulink url="kdeapi:tdeui/KURLCombo">KURLCombo</ulink> - -A combo box for selecting file names and URLs. - - - -<ulink url="kdeapi:tdefile/KURLRequester">KURLRequester</ulink> - -A line edit for selecting file names and URLs. - - - -<ulink url="kdeapi:tdeui/KRuler">KRuler</ulink> - -A ruler widget. - - - -<ulink -url="kdeapi:tdeui/KAnimWidget">KAnimWidget</ulink> - -animations. - - - -<ulink url="kdeapi:tdeui/KNumInput">KNumInput</ulink> - -A widget for inputting numbers. - - - -<ulink url="kdeapi:tdeui/KPasswordEdit">KPasswordEdit</ulink> - -A widget for inputting passwords. - - - - - - -Dialogs - full-featured dialogs for file, color and font selection. - - - - -<ulink url="kdeapi:tdefile/KFileDialog">KFileDialog</ulink> - -A file selection dialog. - - - -<ulink url="kdeapi:tdeui/KColorDialog">KColorDialog</ulink> - -A color selection dialog. - - - -<ulink url="kdeapi:tdeui/TDEFontDialog">TDEFontDialog</ulink> - -A font selection dialog. - - - -<ulink url="kdeapi:tdefile/TDEIconDialog">TDEIconDialog</ulink> - -An icon selection dialog. - - - -<ulink url="kdeapi:tdeui/KKeyDialog">KKeyDialog</ulink> - -A dialog for editing keyboard bindings. - - - -<ulink url="kdeapi:tdeui/KEditToolBar">KEditToolBar</ulink> - -A dialog for editing toolbars. - - - -<ulink url="kdeapi:tdeui/KTipDialog">KTipDialog</ulink> - -A Tip-of-the-day dialog. - - - -<ulink url="kdeapi:tdeui/TDEAboutDialog">TDEAboutDialog</ulink> - -An about dialog. - - - -<ulink url="kdeapi:tdeui/KLineEditDlg">KLineEditDlg</ulink> - -A simple dialog for entering text. - - - -<ulink url="kdeapi:tdefile/KURLRequesterDlg">KURLRequesterDlg</ulink> - -A simple dialog for entering URLs. - - - -<ulink url="kdeapi:tdeui/KMessageBox">KMessageBox</ulink> - -A dialog for signaling errors and warnings. - - - -<ulink url="kdeapi:tdeui/KPasswordDialog">KPasswordDialog</ulink> - -A dialog for inputting passwords. - - - - - - -Actions and XML GUI - - - - -<ulink url="kdeapi:tdeui/TDEAction">TDEAction</ulink> - -Abstraction for an action that can be plugged into menu bars and tool bars. - - - -<ulink url="kdeapi:tdeui/TDEActionCollection">TDEActionCollection</ulink> - -A set of actions. - - - -<ulink url="kdeapi:tdeui/KXMLGUIClient">KXMLGUIClient</ulink> - -A GUI fragment consisting of an action collection and a DOM tree representing their location in the GUI. - - - -<ulink url="kdeapi:tdeparts/KPartManager">KPartManager</ulink> - -Manages the activation of XMLGUI clients. - - - - - - -Plugins and Components - - - - -<ulink url="kdeapi:tdecore/KLibrary">KLibrary</ulink> - -Represents a dynamically loaded library. - - - -<ulink url="kdeapi:tdecore/KLibrary">KLibLoader</ulink> - -Shared library loading. - - - -<ulink url="kdeapi:tdecore/KLibFactory">KLibFactory</ulink> - -Object factory in plugins. - - - -<ulink url="kdeapi:tdeio/KServiceType">KServiceType</ulink> - -Represents a service type. - - - -<ulink url="kdeapi:tdeio/KService">KService</ulink> - -Represents a service. - - - -<ulink url="kdeapi:tdeio/KMimeType">KMimeType</ulink> - -Represents a MIME type. - - - -<ulink url="kdeapi:tdeio/KServiceTypeProfile">KServiceTypeProfile</ulink> - -User preferences for MIME type mappings. - - - -<ulink url="kdeapi:tdeio/KServiceTypeProfile">TDETrader</ulink> - -Querying for services. - - - - - - - - - - - - -Graphics - - -Low-level graphics with QPainter - - -Rendering with QPainter - - -Qt's low level imaging model is based on the capabilities provided by X11 and -other windowing systems for which Qt ports exist. But it also extends these by -implementing additional features such as arbitrary affine transformations for -text and pixmaps. - - - -The central graphics class for 2D painting with Qt is -QPainter. It can -draw on a -QPaintDevice. -There are three possible paint devices implemented: One is -QWidget -which represents a widget on the screen. The second is -QPrinter which -represents a printer and produces Postscript output. The third it -the class -QPicture which -records paint commands and can save them on disk and play them back -later. A possible storage format for paint commands is the W3C standard -SVG. - - - -So, it is possible to reuse the rendering code you use for displaying a -widget for printing, with the same features supported. Of course, in -practice, the code is used in a slightly different context. Drawing -on a widget is almost exclusively done in the paintEvent() method -of a widget class. - - - -void FooWidget::paintEvent() -{ - QPainter p(this); - // Setup painter - // Use painter -} - - - -When drawing on a printer, you have to make sure to use QPrinter::newPage() -to finish with a page and begin a new one - something that naturally is not -relevant for painting widgets. Also, when printing, you may want to use the -device metrics -in order to compute coordinates. - - - - - - -Transformations - - -By default, when using QPainter, it draws in the natural coordinate -system of the device used. This means, if you draw a line along the horizontal -axis with a length of 10 units, it will be painted as a horizontal line -on the screen with a length of 10 pixels. However, QPainter can apply arbitrary -affine transformations before actually rendering shapes and curves. An -affine transformation maps the x and y coordinates linearly into x' and -y' according to - - - - - - - -The 3x3 matrix in this equation can be set with QPainter::setWorldMatrix() and -is of type QWMatrix. -Normally, this is the identity matrix, i.e. m11 and m22 are one, and the -other parameters are zero. There are basically three different groups of -transformations: - - - - - -Translations - -These move all points of an object by a fixed amount in -some direction. A translation matrix can be obtained by calling -method m.translate(dx, dy) for a QWMatrix. This corresponds to the -matrix - - - - - - - - - - -Scaling - -These stretch or shrink the coordinates of an object, making -it bigger or smaller without distorting it. A scaling transformation -can be applied to a QWMatrix by calling m.scale(sx, sy). This corresponds -to the matrix - - - - - - - - -By setting one of the parameters to a negative value, one can -achieve a mirroring of the coordinate system. - - - - - -Shearing - -A distortion of the coordinate system with two -parameters. A shearing transformation can be applied by calling -m.shear(sh, sv), corresponding to the matrix - - - - - - - - - - -Rotating - -This rotates an object. A rotation transformation can be -applied by calling m.rotate(alpha). Note that the angle has to be given -in degrees, not as mathematical angle! The corresponding matrix is - - - - - - - - -Note that a rotation is equivalent with a combination of -scaling and shearing. - - - - - - - -Here are some pictures that show the effect of the elementary -transformation to our masquot: - - - - - - - - - - - - - - - - - - - - -a) Normal -b) Rotated by 30 degrees -c) Sheared by 0.4 -d) Mirrored - - - - - - -Transformations can be combined by multiplying elementary matrices. Note that -matrix operations are not commutative in general, and therefore the combined -effect of of a concatenation depends on the order in which the matrices are -multiplied. - - - - - - -Setting stroking attributes - - -The rendering of lines, curves and outlines of polygons can be modified by -setting a special pen with QPainter::setPen(). The argument of this function is a -QPen object. The properties -stored in it are a style, a color, a join style and a cap style. - - - -The pen style is member of the enum -Qt::PenStyle. -and can take one of the following values: - - - - - - - -The join style is a member of the enum -Qt::PenJoinStyle. -It specifies how the junction between multiple lines which are attached to each -other is drawn. It takes one of the following values: - - - - - - - - - - - - - - - - - -a) MiterJoin -c) BevelJoin -b) RoundJoin - - - - - - -The cap style is a member of the enum -Qt::PenCapStyleand specifies how the end points of lines are drawn. It takes one of the values -from the following table: - - - - - - - - - - - - - - - - - -a) FlatCap -b) SquareCap -c) RoundCap - - - - - - - - - -Setting fill attributes - - -The fill style of polygons, circles or rectangles can be modified by setting -a special brush with QPainter::setBrush(). This function takes a -QBrush object as argument. -Brushes can be constructed in four different ways: - - - - -QBrush::QBrush() - This creates a brush that does not fill shapes. - - -QBrush::QBrush(BrushStyle) - This creates a black brush with one of the default -patterns shown below. - - -QBrush::QBrush(const QColor &, BrushStyle) - This creates a colored brush -with one of the patterns shown below. - - -QBrush::QBrush(const QColor &, const QPixmap) - This creates a colored -brush with the custom pattern you give as second parameter. - - - - -A default brush style is from the enum -Qt::BrushStyle. -Here is a picture of all predefined patterns: - - - - - - - -A further way to customize the brush behavior is to use the function -QPainter::setBrushOrigin(). - - - - - - -Color - - -Colors play a role both when stroking curves and when filling shapes. In Qt, -colors are represented by the class -QColor. Qt does not support -advanced graphics features like ICC color profiles and color correction. Colors -are usually constructed by specifying their red, green and blue components, as -the RGB model is the way pixels are composed of on a monitor. - - - -It is also possible to use hue, saturation and value. This HSV representation is -what you use in the Gtk color dialog, e.g. in GIMP. There, the hue corresponds -to the angle on the color wheel, while the saturation corresponds to the -distance from the center of the circle. The value can be chosen with a separate -slider. - - - - - - -Other settings - - -Normally, when you paint on a paint device, the pixels you draw replace those -that were there previously. This means, if you paint a certain region with -a red color and paint the same region with a blue color afterwards, only -the blue color will be visible. Qt's imaging model does not support -transparency, i.e. a way to blend the painted foreground with the background. -However, there is a simple way to combine background and foreground with -boolean operators. The method QPainter::setRasterOp() sets the used operator, -which comes from the enum -RasterOp. - - - -The default is CopyROP which ignores the background. Another popular choice is -XorROP. If you paint a black line with this operator on a colored image, then -the covered area will be inverted. This effect is for example used to create -the rubberband selections in image manipulation programs known as -"marching ants". - - - - - - -Drawing graphics primitives - - -In the following we list the elementary graphics elements supported by -QPainter. Most of them exist in several overloaded versions which take a -different number of arguments. For example, methods that deal with rectangles -usually either take a -QRect as argument or a set -of four integers. - - - - -Drawing a single point - drawPoint(). - - -Drawing lines - drawLine(), drawLineSegments() and drawPolyLine(). - - -Drawing and filling rectangles - drawRect(), drawRoundRect(), -fillRect() and eraseRect(). - - -Drawing and filling circles, ellipses and parts or them - -drawEllipse(), drawArc(), drawPie and drawChord(). - - -Drawing and filling general polygons - drawPolygon(). - - -Drawing bezier curves - drawQuadBezier() [drawCubicBezier in Qt 3.0]. - - - - - - - -Drawing pixmaps and images - - -Qt provides two very different classes to represent images. - - - -QPixmap directly corresponds -to the pixmap objects in X11. Pixmaps are server-side objects and may - on a -modern graphics card - even be stored directly in the card's memory. This makes -it very efficient to transfer pixmaps to the screen. Pixmaps also act as -an off-screen equivalent of widgets - the QPixmap class is a subclass of -QPaintDevice, so you can draw on it with a QPainter. Elementary drawing -operations are usually accelerated by modern graphics. Therefore, a common usage -pattern is to use pixmaps for double buffering. This means, instead of painting -directly on a widget, you paint on a temporary pixmap object and use the -bitBlt -function to transfer the pixmap to the widget. For complex repaints, this helps -to avoid flicker. - - - -In contrast, QImage objects -live on the client side. Their emphasis in on providing direct access to the -pixels of the image. This makes them of use for image manipulation, and things -like loading and saving to disk (QPixmap's load() method takes QImage as -intermediate step). On the other hand, painting an image on a widget is a -relatively expensive operation, as it implies a transfer to the X server, -which can take some time, especially for large images and for remote servers. -Depending on the color depth, the conversion from QImage to QPixmap may also -require dithering. - - - - - - -Drawing text - - -Text can be drawn with one of the overloaded variants of the method -QPainter::drawText(). These draw a QString either at a given point or in a given -rectangle, using the font set by QPainter::setFont(). There is also a parameter -which takes an ORed combination of some flags from the enums -Qt::AlignmentFlags -and -Qt::TextFlags - - - -Beginning with version 3.0, Qt takes care of the complete text layout even for -languages written from right to left. - - - -A more advanced way to display marked up text is the -QSimpleRichText -class. Objects of this class can be constructed with a piece of text using -a subset of the HTML tags, which is quite rich and provides even tables. -The text style can be customized by using a -QStyleSheet (the -documentation of the tags can also be found here). Once the rich text object has -been constructed, it can be rendered on a widget or another paint device with -the QSimpleRichText::draw() method. - - - - - - - - -Structured graphics with QCanvas - - -QPainter offers a powerful imaging model for painting on widgets and pixmaps. -However, it can also be cumbersome to use. Each time your widget receives -a paint event, it has to analyze the QPaintEvent::region() or -QPaintEvent::rect() which has to be redrawn. Then it has to setup a -QPainter and paint all objects which overlap with that region. For example, -image a vector graphics program which allows to drag objects like polygons, -circles and groups of them around. Each time those objects move a bit, the -widget's mouse event handler triggers a paint event for the whole area covered -by the objects in their old position and in their new position. Figuring -out the necessary redraws and doing them in an efficient way can be difficult, -and it may also conflict with the object-oriented structure of the program's -source code. - - - -As an alternative, Qt contains the class -QCanvas in which -you put graphical objects like polygons, text, pixmaps. You may also provide -additional items by subclassing -QCanvasItem or -one of its more specialized subclasses. A canvas can be shown on the screen by -one or more widgets of the class -QCanvasView which -you have to subclass in order to handle user interactions. Qt takes care of -all repaints of objects in the view, whether they are caused by the widget -being exposed, new objects being created or modified or other things. By using -double buffering, this can be done in an efficient and flicker-free way. - - - -Canvas items can overlap each other. In this case, the visible one depends on -the z order which can be assigned by QCanvasItem::setZ(). Items can also be -made visible or invisible. You can also provide a background to be drawn -"behind" all items and a foreground. For associating mouse events with objects, -in the canvas, there is the method QCanvas::collisions() which returns a list -of items overlapping with a given point. Here we show a screenshot of a canvas -view in action: - - - - - - - -Here, the mesh is drawn in the background. Furthermore, there is a -QCanvasText item and a violet QCanvasPolygon. The butterfly is a -QCanvasPixmap. It has transparent areas, so you can see the underlying -items through it. - - - -A tutorial on using QCanvas for writing sprite-based games can be -found here. - - - - - - -3D graphics with OpenGL - - -Low-level interface - - -The de facto standard for rendering 3D graphics today is -OpenGL. Implementations of this -specification come with Microsoft Windows, Mac OS X and XFree86 and often -support the hardware acceleration features offered by modern graphics cards. -OpenGL itself only deals with rendering on a specified area of the framebuffer -through a GL context and does not have any interactions -with the toolkit of the environment - - - -Qt offers the widget QGLWidget -which encapsulates a window with an associated GL context. Basically, you use it -by subclassing it and reimplementing some methods. - - - - - -Instead of reimplementing paintEvent() and using QPainter to draw the widget's -contents, you override paintGL() and use GL commands to render a scene. QLWidget -will take care of making its GL context the current one before paintGL() is -called, and it will flush afterwards. - - - -The virtual method initializeGL() is called once before the first time resizeGL() -or paintGL() are called. This can be used to construct display lists for objects, -and make any initializations. - - - -Instead of reimplementing resizeEvent(), you override resizeGL(). This can -be used to set the viewport appropriately. - - - -Instead of calling update() when the state of the scene has changed - for example -when you animate it with a timer -, you should call updateGL(). This will trigger -a repaint. - - - - - -In general, QGLWidget behaves just like any other widget, i.e. for example -you can process mouse events as usual, resize the widget and combine it with -others in a layout. - - - - - - - -Qt contains some examples of QGLWidget usage in its demo -example. A collection of tutorials can be found -here, -and more information and a reference of OpenGL is available on the -OpenGL homepage. - - - - - - -High-level interfaces - - -OpenGL is a relatively low-level interface for drawing 3D graphics. In the same -way QCanvas gives the programmer a higher-level interface which details with -objects and their properties, there are also high-level interfaces for 3D graphics. -One of the most popular is Open Inventor. Originally a technology developed by SGI, -there is today also the open source implementation -Coin, complemented by a toolkit binding to Qt -called SoQt. - - - -The basic concept of Open Inventor is that of a scene. -A scene can be loaded from disk and saved in a special format closely related -to VRML. A scene consists of a -collection of objects called nodes. Inventor already -provides a rich collection of reusable nodes, such as cubes, cylinders and -meshes, furthermore light sources, materials, cameras etc. Nodes are -represented by C++ classes and can be combined and subclassed. - - - -An introduction to Inventor can be found -here -(in general, you can substitute all mentions of SoXt by SoQt in this article). - - - - - - - - - - - -User interface - - -The action pattern - - - - - - - -Defining menus and toolbars in XML - - -Introduction - - -While the action pattern -allows to encapsulate actions triggered by the user in an object which can be -"plugged" somewhere in the menu bars or toolbars, it does not by itself solve -the problem of constructing the menus themselves. In particular, you have to -build all popup menus in C++ code and explicitly insert the actions in a -certain order, under consideration of the style guide for standard actions. -This makes it pretty difficult to allow the user to customize the menus or -change shortcuts to fit his needs, without changing the source code. - - - -This problem is solved by a set of classes called XMLGUI. -Basically, this separates actions (coded in C++) from their appearance in menu -bars and tool bars (coded in XML). Without modifying any source code, menus -can be simply customized by adjusting an XML file. Furthermore, it helps -to make sure that standard actions (such as -FileOpen -or HelpAbout) -appear in the locations suggested by the style guide. XMLGUI is especially -important for modular programs, where the items appearing in the menu bar may -come from many different plugins or parts. - - - -KDE's class for toplevel windows, -TDEMainWindow, -inherits -KXMLGUIClient -and therefore supports XMLGUI out of the box. All actions created within it must -have the client's actionCollection() as parent. A call to -createGUI() will then build the whole set of menu and tool -bars defined the applications XML file (conventionally with the suffix -ui.rc). - - - - - - -An example: Menu in KView - - -In the following, we take KDE's image view KView as -example. It has a ui.rc file named -kviewui.rc which is installed with the -Makefile.am snippet - - - -rcdir = $(kde_datadir)/kview -rc_DATA = kviewui.rc - - - -Here is an excerpt from the kviewui.rc file. For -simplicity, we show only the definition of the View menu. - - - -<!DOCTYPE kpartgui> -<kpartgui name="kview"> - <MenuBar> - <Menu name="view" > - <Action name="zoom50" /> - <Action name="zoom100" /> - <Action name="zoom200" /> - <Action name="zoomMaxpect" /> - <Separator/> - <Action name="fullscreen" /> - </Menu> - </MenuBar> -</kpartgui> - - - -The corresponding part of the setup in C++ is: - - - - KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); - KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); - KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); - new TDEAction ( i18n("&Half size"), ALT+Key_0, - this, SLOT(slotHalfSize()), - actionCollection(), "zoom50" ); - new TDEAction ( i18n("&Normal size"), ALT+Key_1, - this, SLOT(slotDoubleSize()), - actionCollection(), "zoom100" ); - new TDEAction ( i18n("&Double size"), ALT+Key_2, - this, SLOT(slotDoubleSize()), - actionCollection(), "zoom200" ); - new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, - this, SLOT(slotFillScreen()), - actionCollection(), "zoomMaxpect" ); - new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, - this, SLOT(slotFullScreen()), - actionCollection(), "fullscreen" ); - - - -The View menu resulting from this GUI definition looks like -in this screenshot: - - - - - - - -The XML file begins with a document type declaration. The DTD for kpartgui can -be found in the tdelibs sources in tdeui/kpartgui.dtd. The -outermost element of the file contains the instance name of the application as -attribute. It can also contain a version number in the form "version=2". This -is useful when you release new versions of an application with a changed menu -structure, e.g. with more features. If you bump up the version number of the -ui.rc file, KDE makes sure that any customized version of -the file is discarded and the new file is used instead. - - - -The next line, <MenuBar>, contains a declaration of a -menu bar. You can also insert any number of <ToolBar> -declarations in order to create some tool bars. The menu contains a submenu -with the name "view". This name is already predefined, and thus you see a -translated version of the word "View" in the screenshot. If you declare your -own submenus, you have to add the title explicitly. For example, -KView has a submenu with the title "Image" which is -declared as follows: - - - -<Menu name="image" > - <text>&amp;Image</text> - ... -</Menu> - - - -In KDE's automake framework, such titles are automatically extracted and put -into the application's .po -file , so it is considered by translators. Note that you have to write the -accelerator marker "&" in the form XML compliant form "&amp;". - - - -Let us come back to the example. KView's -View menu contains a couple of custom actions: -zoom50, zoom100, -zoom200, zoomMaxpect and -fullscreen, declared with a -<Action> element. The separator in the -screenshots corresponds to the <Separator> element. - - - -You will note that some menu items do not not have a corresponding element in -the XML file. These are standard actions. Standard -actions are created by the class -KStdAction. -When you create such actions in your application (such as in the C++ example -above), they will automatically be inserted in a prescribed position, and -possibly with an icon and a shortcut key. You can look up these locations in -the file tdeui/ui_standards.rc in the tdelibs sources. - - - - - - -An example: Toolbars in Konqueror - - -For the discussion of toolbars, we switch to -Konqueror's GUI definition. This excerpt defines -the location bar, which contains the input field for URLs. - - - -<ToolBar name="locationToolBar" fullWidth="true" newline="true" > - <text>Location Toolbar</text> - <Action name="clear_location" /> - <Action name="location_label" /> - <Action name="toolbar_url_combo" /> - <Action name="go_url" /> -</ToolBar> - - - -The first thing we notice is that there are a lot more attributes than for -menu bars. These include: - - - - - -fullWidth: Tells XMLGUI that the toolbar has the same width as the - toplevel window. Af this is "false", the toolbar only takes as much space as - necessary, and further toolbars are put in the same row. - - - -newline: This is related to the option above. If newline is "true", -the toolbar starts a new row. Otherwise it may be put in the row together -with the previous toolbar. - - - -noEdit: Normally toolbars can be customized by the user, -e.g. in SettingsConfigure -Toolbars in -Konqueror. Setting this option to "true" marks this -toolbar as not editable. This is important for toolbars which are filled with -items at runtime, e.g. Konqueror's bookmark toolbar. - - - -iconText: Tells XMLGUI to show the text of the action next to the -icon. Normally, the text is only shown as a tooltip when the mouse cursor -remains over the icon for a while. Possible values for this attribute are -"icononly" (shows only the icon), "textonly" (shows only the text), -"icontextright" (shows the text on the right side of the icon) and -"icontextbottom" (shows the text beneath the icon). - - - - -hidden: If this is "true", the toolbar is not visible initially -and must be activated by some menu item. - - - - -position: The default for this attribute is "top", meaning that the -toolbar is positioned under the menu bar. For programs with many tools, -such as graphics programs, it may be interesting to replace this with -"left", "right" or "bottom". - - - - - - - - -Dynamical menus - - -Obviously, an XML can only contain a static description of a user interface. -Often, there are menus which change at runtime. For example, -Konqueror's Location menu -contains a set of items Open with Foo with the -applications able to load a file with a given MIME type. Each time the -document shown changes, the list of menu items is updated. XMLGUI is prepared -to handle such cases with the notion of action lists. -An action list is declared as one item in the XML file, but consists of -several actions which are plugged into the menu at runtime. The above example -is implemented with the following declaration in -Konqueror's XML file: - - - -<Menu name="file"> - <text>&amp;Location</text> - ... - <ActionList name="openwith"> - ... -</Menu> - - - -The function KXMLGUIClient::plugActionList() is then used -to add actions to be displayed, whereas the function -KXMLGuiClient::unplugActionList() removes all -plugged actions. The routine responsible for updating looks as follows: - - - -void MainWindow::updateOpenWithActions() -{ - unplugActionList("openwith"); - openWithActions.clear(); - for ( /* iterate over the relevant services */ ) { - TDEAction *action = new TDEAction( ...); - openWithActions.append(action); - } - plugActionList("openwith", openWithActions); -} - - - -Note that in contrast to the static actions, the ones created here are -not constructed with the action collection as parent, and -you are responsible for deleting them for yourself. The simplest way to achievethis -is by using openWithActions.setAutoDelete(true) in the above -example. - - - - - - -Context menus - - -The examples above only contained cases where a main window's menubar and -toolbars were created. In the cases, the processes of constructing these -containers is completely hidden from you behind the -createGUI() call (except if you have custom containers). -However, there are cases, where you want to construct other containers and -populate them with GUI definitions from the XML file. One such example are -context menus. In order to get a pointer to a context menu, you have to -ask the client's factory for it: - - - -void MainWindow::popupRequested() -{ - QWidget *w = factory()->container("context_popup", this); - QPopupMenu *popup = static_cast<QPopupMenu *>(w); - popup->exec(QCursor::pos()); -} - - - -The method KXMLGUIFactory::container() used above looks -whether it finds a container in the XML file with the given name. Thus, a -possible definition could look as follows: - - - -... -<Menu name="context_popup"> - <Action name="file_add"/> - <Action name="file_remove"/> -</Menu> -... - - - - - - - - -Providing online help - - -Making a program easy and intuitive to use involves a wide range of -facilities which are usually called online help. Online help has several, -partially conflicting goals: on the one, it should give the user answers -to the question "How can I do a certain task?", on the other hand it -should help the user exploring the application and finding features he -doesn't yet know about. It is important to recognize that this can only -be achieved by offering several levels of help: - - - - - -Tooltips are tiny labels that pop up over user interface elements when -the mouse remains there longer. They are especially important for tool- -bars, where icons are not always sufficient to explain the purpose of -a button. - - - -"What's this?" help is usually a longer and richer explanation of a widget -or a menu item. It is also more clunky to use: In dialogs, it can be invoked -in two ways: either by pressing -ShiftF1 or by clicking -on the question mark in the title bar (where the support of the latter depends -on the window manager). The mouse pointer then turns into an arrow with a -question mark, and the help window appears when a user interfact element has -been clicked. "What's this?" help for menu items is usually activated by a -button in the toolbar which contains an arrow and a question mark. - - - -The problem with this approach is that the user can't see whether a widget -provides help or not. When the user activates the question mark button and -doesn't get any help window when clicking on a user interface element, he -will get frustrated very quickly. - - - -The advantage of "What's this?" help windows as provided by Qt and KDE is that -they can contain rich text, -i.e. the may contain different fonts, bold and italic text and even images and tables. - - - -An example of "What's this?" help: - - - - - - - - - -Finally, every program should have a manual. A manual is normally viewed in -KHelpCenter by activating the -Help menu. That means, a complete additional application -pops up and diverts the user from his work. Consequently, consulting the -manual should only be necessary if other facilities like tooltips and what's -this help are not sufficient. Of course, a manual has the advantage that it -does not explain single, isolated aspects of the user interface. Instead, it -can explain aspects of the application in a greater context. Manuals for KDE -are written using the DocBook markup -language. - - - - - -From the programmer's point of view, Qt provides an easy to use API for online -help. To assign a tooltip to widget, use the -QToolTip class. - - - -QToolTip::add(w, i18n("This widget does something.")) - - - -If the menu bars and tool bars are created using the -action pattern, the string used as tooltip is derived from the first argument -of the TDEAction constructor: - - - -action = new TDEAction(i18n("&Delete"), "editdelete", - SHIFT+Key_Delete, actionCollection(), "del") - - - -Here it is also possible to assign a text which is shown in the status bar when the -respective menu item is highlighted: - - - -action->setStatusText(i18n("Deletes the marked file")) - - - -The API for "What's this?' help is very similar. In dialogs, use the following -code: - - - -QWhatsThis::add(w, i18n("<qt>This demonstrates <b>Qt</b>'s" - " rich text engine.<ul>" - "<li>Foo</li>" - "<li>Bar</li>" - "</ul></qt>")) - - - -For menu items, use - - - -action->setWhatsThis(i18n("Deletes the marked file")) - - - -The invocation of KHelpCenter is encapsulated in the -TDEApplication -class. In order to show the manual of your application, just use - - - -kapp->invokeHelp() - - - -This displays the first page with the table of contents. When you want to -display only a certain section of the manual, you can give an additional -argument to invokeHelp() determining the anchor which -the browser jumps to. - - - - - - - - - -Components and services - - -KDE services - - -What are KDE services? - - -The notion of a service is a central concept in KDE's -modular architecture. There is no strict technical implementation connected -with this term - services can be plugins in the form of shared libraries, -or they can be programs controlled via DCOP. -By claiming to be of a certain service type, a service -promises to implement certain APIs or features. In C++ terms, one can think -of a service type as an abstract class, and a service as an implementation -of that interface. - - - -The advantage of this separation is clear: An application utilizing a service -type does not have to know about possible implementations of it. It just uses -the APIs associated with the service type. In this way, the used service can be -changed without affecting the application. Also, the user can configure which -services he prefers for certain features. - - - -Some examples: - - - - - -The HTML rendering engine used in Konqueror is an -embedable component that implements the service types -KParts/ReadOnlyPart and Browser/View. - - -In TDevelop HEAD, most functionality is packaged in -plugins with the service type TDevelop/Part. At startup, -all services with this type are loaded, such that you can extend the IDE in a -very flexible way. - - -In the icon view, Konqueror displays - if enabled - -thumbnail pictures of images, HTML pages, PDF and text files. This ability can -be extended. If you want it to display preview pictures of your own data files -with some MIME type, you can implement a service with service type -ThumbCreator. - - - - - -Obviously, a service is not only characterized by the service types it -implements, but also by some properties. For example, a -ThumbCreator does not only claim to implement the C++ class with the type -ThumbCreator, it also has a list of MIME types it is -responsible for. Similarly, TDevelop parts have the programming language they -support as a property. When an application requests a service type, it can -also list constraints on the properties of the service. In the above example, -when TDevelop loads the plugins for a Java project, it asks only for the -plugins which have Java as the programming language property. For this -purpose, KDE contains a full-blown CORBA-like trader with -a complex query language. - - - - - - -Defining service types - - -New service types are added by installing a description of them into the -directory TDEDIR/share/servicetypes. In an automake -framework, this can be done with this Makefile.am -snippet: - - - -kde_servicetypesdir_DATA = tdeveloppart.desktop -EXTRA_DIST = $(kde_servicetypesdir_DATA) - - - -The definition tdeveloppart.desktop of a -TDevelop part looks as follows: - - - -[Desktop Entry] -Type=ServiceType -X-TDE-ServiceType=TDevelop/Part -Name=TDevelop Part - -[PropertyDef::X-TDevelop-Scope] -Type=QString - -[PropertyDef::X-TDevelop-ProgrammingLanguages] -Type=QStringList - -[PropertyDef::X-TDevelop-Args] -Type=QString - - - -In addition to the usual entries, this example demonstrates how you declare -that a service has some properties. Each property definition corresponds -to a group [PropertyDef::name] in the configuration file. In -this group, the Type entry declares the type of the property. -Possible types are everything that can be stored in a -QVariant. - - - - - - -Defining shared library services - - -Service definitions are stored in the directory -TDEDIR/share/services: - - - -kde_servicesdir_DATA = kdevdoxygen.desktop -EXTRA_DIST = $(kde_servicesdir_DATA) - - - -The content of the following example file -tdevdoxygen.desktop defines the -KDevDoxygen plugin with the service type -TDevelop/Part: - - - -[Desktop Entry] -Type=Service -Comment=Doxygen -Name=KDevDoxygen -ServiceTypes=TDevelop/Part -X-TDE-Library=libtdevdoxygen -X-TDevelop-ProgrammingLanguages=C,C++,Java -X-TDevelop-Scope=Project - - - -In addition to the usual declarations, an important entry is -X-TDE-Library. This contains the name of the libtool -library (without the .la extension). It also fixes -(with the prefix init_ prepended) the name of the exported -symbol in the library which returns an object factory. For the above example, -the library must contain the following function: - - - -extern "C" { - void *init_libtdevdoxygen() - { - return new DoxygenFactory; - } -}; - - - -The type of the factory class DoxygenFactory depends on -the specific service type the service implements. In our example of a TDevelop -plugin, the factory must be a KDevFactory (which -inherits KLibFactory). More common examples are -KParts::Factory -which is supposed to produce -KParts::ReadOnlyPart -objects or in most cases the generic -KLibFactory. - - - - - - -Using shared library services - - -In order to use a shared library service in an application, you need to obtain a -KService object -representing it. This is discussed in the -section about MIME types (and in a section about the -trader to be written :-) - - - -With the KService object at hand, you can very simply -load the library and get a pointer to its factory object: - - - -KService *service = ... -QString libName = QFile::encodeName(service->library()); -KLibFactory *factory = KLibLoader::self()->factory(libName); -if (!factory) { - QString name = service->name(); - QString errorMessage = KLibLoader::self()->lastErrorMessage(); - KMessageBox::error(0, i18n("There was an error loading service %1.\n" - "The diagnostics from libtool is:\n%2") - .arg(name).arg(errorMessage); -} - - - -From this point, the further proceeding depends again on the service type. For -generic plugins, you create objects with the method -KLibFactory::create(). -For KParts, you must cast the factory pointer to the more specific KParts::Factory and use -its create() method: - - - -if (factory->inherits("KParts::Factory")) { - KParts::Factory *partFactory = static_cast<KParts::Factory*>(factory); - QObject *obj = partFactory->createPart(parentWidget, widgetName, - parent, name, "KParts::ReadOnlyPart"); - ... -} else { - cout << "Service does not implement the right factory" << endl; -} - - - - - - -Defining DCOP services - - -A DCOP service is usually implemented as a program that is started up when it is -needed. It then goes into a loop and listens for DCOP connections. The program -may be an interactive one, but it may also run completely or for a part of its -lifetime as a daemon in the background without the user noticing it. An example -for such a daemon is tdeio_uiserver, which implements user interaction -such as progress dialog for the TDEIO library. The advantage of such a centralized -daemon in this context is that e.g. the download progress for several different -files can be shown in one window, even if those downloads were initiated from -different applications. - - - -A DCOP service is defined differently from a shared library service. Of course, -it doesn't specify a library, but instead an executable. Also, DCOP services -do not specify a ServiceType line, because usually they are started by their -name. As additional properties, it contains two lines: - - - -X-DCOP-ServiceType specifies the way the service is -started. The value Unique says that the service must not be -started more than once. This means, if you try to start this service (e.g. via - -TDEApplication::startServiceByName(), KDE looks whether it is already -registered with DCOP and uses the running service. If it is not registered yet, -KDE will start it up and wait until is registered. Thus, you can immediately -send DCOP calls to the service. In such a case, the service should be implemented -as a -KUniqueApplication. - - - -The value Multi for X-DCOP-ServiceType says that multiple -instances of the service can coexist, so every attempt to start the service -will create another process. As a last possibility the value None -can be used. In this case, a start of the service will not wait until it -is registered with DCOP. - - - -X-TDE-StartupNotify should normally be set to false. Otherwise, when -the program is started, the task bar will show a startup notification, or, depending -on the user's settings, the cursor will be changed. - - - -Here is the definition of tdeio_uiserver: - - - -[Desktop Entry] -Type=Service -Name=tdeio_uiserver -Exec=tdeio_uiserver -X-DCOP-ServiceType=Unique -X-TDE-StartupNotify=false - - - - - - -Using DCOP services - - -A DCOP service is started with one of several methods in the TDEApplication -class: - - - -DCOPClient *client = kapp->dcopClient(); -client->attach(); -if (!client->isApplicationRegistered("tdeio_uiserver")) { - QString error; - if (TDEApplication::startServiceByName("tdeio_uiserver", QStringList(), &error)) - cout << "Starting kioserver failed with message " << error << endl; -} -... -QByteArray data, replyData; -QCString replyType; -QDataStream arg(data, IO_WriteOnly); -arg << true; -if (!client->call("tdeio_uiserver", "UIServer", "setListMode(bool)", - data, replyType, replyData)) - cout << "Call to tdeio_uiserver failed" << endl; -... - - - -Note that the example of a DCOP call given here uses explicit marshalling -of arguments. Often you will want to use a stub generated by dcopidl2cpp -instead, because it is much simpler and less error prone. - - - -In the example given here, the service was started "by name", i.e. the -first argument to TDEApplication::startServiceByName() is -the name is appearing in the Name line of the desktop -file. An alternative is to use -TDEApplication::startServiceByDesktopName(), which takes -the file name of its desktop file as argument, i.e. in this case -"tdeio_uiserver.desktop". - - - -All these calls take a list of URLs as a second argument, which is given -to the service on the command line. The third argument is a pointer to a -QString. If starting the service fails, this argument -is set to a translated error message. - - - - - - - - -MIME types - - -What are MIME types? - - -MIME types are used to describe the content type of files or data -chunks. Originally they were introduced in order to allow sending around image -or sound files etc. by e-mail (MIME stands for "Multipurpose Internet Mail -Extensions"). Later this system was also used by web browsers to determine how -to present data sent by a web server to the user. For example, an HTML page -has a MIME type "text/html", a postscript file "application/postscript". In -KDE, this concept is used at a variety of places: - - - - - -In Konqueror's icon view, files are represented by -icons. Each MIME type has a certain associated icon shown here. - - - -When you click onto a file icon or a file name in -Konqueror, either the file is shown in an embedded -view, or an application associated with the file type is opened. - - - -When you drag and drop some data from one application to another (or -within the same application), the drop target may choose to accept only -certain data types. Furthermore, it will handle image data different -from textual data. - - - -Clipboard data has a MIME type. Traditionally, X programs only handle -pixmaps or texts, but with Qt, there are no restrictions on the data type. - - - - - -From the above examples, it is clear that MIME handling is a complex issue. -First, it is necessary to establish a mapping from file names to MIME types. -KDE goes one step further in allowing even file contents to be mapped to -MIME types, for cases in which the file name is not available. Second, it -is necessary to map MIME types to applications or libraries which can view -or edit a file with a certain type, or create a thumbnail picture for it. - - - -There is a variety of APIs to figure out the MIME type of data or files. In -general, there is a certain speed/reliability trade-off you have to make. You -can find out the type of a file by examining only its file name (i.e. in most -cases the file name extension). For example, a file -foo.jpg is normally "image/jpeg". In cases where the -extension is stripped off this is not safe, and you actually have to look at -the contents of the file. This is of course slower, in particular for files -that have to be downloaded via HTTP first. The content-based method is based -on the file TDEDIR/share/mimelnk/magic and therefore -difficult to extend. But in general, MIME type information can easily be made -available to the system by installing a .desktop file, and -it is efficiently and conveniently available through the KDE libraries. - - - - - - -Defining MIME types - - -Let us define a type "application/x-foo" for our new -foobar program. To this end, you have to write a -file foo.desktop and install it into -TDEDIR/share/mimelnk/application. (This is the usual -location, which may differ between distributions). This can be done by adding -this to the Makefile.am: - - - -mimedir = $(kde_mimedir)/application -mime_DATA = foo.desktop -EXTRA_DIST = $(mime_DATA) - - - -The file foo.desktop should look as follows: - - - -[Desktop Entry] -Type=MimeType -MimeType=application/x-foo -Icon=fooicon -Patterns=*.foo; -DefaultApp=foobar -Comment=Foo Data File -Comment[de]=Foo Datei - - - -The "Comment" entry is supposed to be translated. Since the -.desktop file specifies an icon, you should also install -an icon fooicon.png, which represents the file e.g. in -Konqueror. - - - -In the KDE libraries, such a type definition is mapped to an instance of the -class KMimeType. -Use this like in the following example: - - - -KMimeType::Ptr type = KMimeType::mimeType("application/x-foo"); -cout << "Type: " << type->name() < endl; -cout << "Icon: " << type->icon() < endl; -cout << "Comment: " << type->icon() < endl; -QStringList patterns = type->patterns(); -QStringList::ConstIterator it; -for (it = patterns.begin(); it != patterns.end(); ++it) - cout << "Pattern: " << (*it) << endl; - - - - - - -Determining the MIME type of data - - -The fast method for determining the type of a file is -KMimeType::findByURL(). This looks for the URL string and -in most cases determines the type from the extension. For certain protocols -(e.g. http, man, info), this mechanism is not used. For example, CGI scripts -on web servers written in Perl often have the extension -.pl, which would indicate a -"text/x-perl" type. However, we file delivered by the -server is the output of this script, which is normally HTML. For such a case, -KMimeType::findByURL() returns the MIME type -"application/octet-stream" (available through -KMimeType::defaultMimeType()), which indicates a failure -to find out the type. - - - -KMimeType::Ptr type = KMimeType::findByURL("/home/bernd/foobar.jpg"); -if (type->name() == KMimeType::defaultMimeType()) - cout << "Could not find out type" << endl; -else - cout << "Type: " << type->name() << endl; - - - -(this method has some more arguments, but these are undocumented, so simply -forget about them.) - - - -You may want to find out a MIME from the contents of file instead of -the file name. This is more reliable, but also slower, as it requires -reading a part of the file. This is done with the -KMimeMagic -class, which has different error handling: - - - -KMimeMagicResult *result = KMimeMagic::self()->findFileType("/home/bernd/foobar.jpg"); -if (!result || !result->isValid()) - cout << "Could not find out type" << endl; -else - cout << "Type: " << result->mimeType() << endl; - - - -As a variant of this function, you can also determine the type of a memory -chunk. This is e.g. used in Kate in order to find -out the highlighting mode: - - - -QByteArray array; -... -KMimeMagicResult *result = KMimeMagic::self()->findBufferType(array); -if (!result || !result->isValid()) - cout << "Could not find out type" << endl; -else - cout << "Type: " << result->mimeType() << endl; - - - -Of course, even KMimeMagic is only able to determine a file type from the -contents of a local file. For remote files, there is a further possibility: - - - -KURL url("http://developer.kde.org/favicon.ico"); -QString type = TDEIO::NetAccess::mimetype(url); -if (type == KMimeType::defaultMimeType()) - cout << "Could not find out type" << endl; -else - cout << "Type: " << type << endl; - - - -This starts a TDEIO job to download a part of the file and check this. -Note that this function is perhaps quite slow and blocks the program. Normally -you will only want to use this if KMimeType::findByURL() -has returned "application/octet-stream". - - - -On the other hand, if you do not want to block your application, you can also -explicitly start the TDEIO job and connect to some of its signals: - - - -void FooClass::findType() -{ - KURL url("http://developer.kde.org/favicon.ico"); - TDEIO::MimetypeJob *job = TDEIO::mimetype(url); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mimeResult(TDEIO::Job*)) ); -} - -void FooClass::mimeResult(TDEIO::Job *job) -{ - if (job->error()) - job->showErrorDialog(); - else - cout << "MIME type: " << ((TDEIO::MimetypeJob *)job)->mimetype() << endl; -} - - - - - - -Mapping a MIME type to an application or service - - -When an application is installed, it installs a .desktop -file which contains a list of MIME types this application can load. Similarly, -components like KParts make this information available by their service -.desktop files. So in general, there are several programs -and components which can process a given MIME type. You can obtain such a list -from the class KServiceTypeProfile: - - - -KService::OfferList offers = KServiceTypeProfile::offers("text/html", "Application"); -KService::OfferList::ConstIterator it; -for (it = offers.begin(); it != offers.end(); ++it) { - KService::Ptr service = (*it); - cout << "Name: " << service->name() << endl; -} - - - -The return value of this function is a list of service offers. A -KServiceOffer object packages a KService::Ptr together -with a preference number. The list returned by -KServiceTypeProfile::offers() is ordered by the user's -preference. The user can change this by calling "keditfiletype -text/html" or choosing Edit File Type on -Konqueror's context menu on a HTML file. - - - -In the above example, an offer list of the applications supporting -text/html was requested. This will - among others - contain -HTML editors like Quanta Plus. You can also replace -the second argument "Application" by -"KParts::ReadOnlyPart". In that case, you get a list of -embedable components for presenting HTML content, for example TDEHTML. - - - -In most cases, you are not interested in the list of all service offers -for a combination of MIME type and service type. There is a convenience -function which gives you only the service offer with the highest preference: - - - -KService::Ptr offer = KServiceTypeProfile::preferredService("text/html", "Application"); -if (offer) - cout << "Name: " << service->name() << endl; -else - cout << "No appropriate service found" << endl; - - - -For even more complex queries, there is a full-blown CORBA-like -trader. - - - -In order to run an application service with some URLs, use -KRun: - - - -KURL::List urlList; -urlList << "http://www.ietf.org/rfc/rfc1341.txt?number=1341"; -urlList << "http://www.ietf.org/rfc/rfc2046.txt?number=2046"; -KRun::run(offer.service(), urlList); - - - - - - -Miscellaneous - - -In this section, we want to list some APIs which are loosely related -to the previous discussion. - - - -Getting an icon for a URL. This looks for the type of the URL -and returns the associated icon. - - - -KURL url("ftp://ftp.kde.org/pub/incoming/wibble.c"); -QString icon = KMimeType::iconForURL(url); - - - -Running a URL. This looks for the type of the URL and starts the -user's preferred program associated with this type. - - - -KURL url("http://dot.kde.org"); -new KRun(url); - - - - - - - - -Network transparency - - -Introduction - - -In the age of the world wide web, it is of essential importance that desktop -applications can access resources over the internet: they should be able to -download files from a web server, write files to an ftp server or read mails -from a web server. Often, the ability to access files regardless of their -location is called network transparency. - - - -In the past, different approaches to this goals were implemented. The old NFS -file system is an attempt to implement network transparency on the level of -the POSIX API. While this approach works quite well in local, closely coupled -networks, it does not scale for resources to which access is unreliable and -possibly slow. Here, asynchronicity is important. While -you are waiting for your web browser to download a page, the user interface -should not block. Also, the page rendering should not begin when the page is -completely available, but should updated regularly as data comes in. - - - -In the KDE libraries, network transparency is implemented in the TDEIO API. The -central concept of this architecture is an IO job. A job -may copy, or delete files or similar things. Once a job is started, it works -in the background and does not block the application. Any communication from -the job back to the application - like delivering data or progress information -- is done integrated with the Qt event loop. - - - -Background operation is achieved by starting ioslaves to -perform certain tasks. ioslaves are started as separate processes and are -communicated with through UNIX domain sockets. In this way, no multi-threading -is necessary and unstable slaves can not crash the application that uses them. - - - -File locations are expressed by the widely used URLs. But in KDE, URLs do not -only expand the range of addressable files beyond the local file system. It -also goes in the opposite direction - e.g. you can browse into tar archives. -This is achieved by nesting URLs. For example, a file in a tar archive on -a http server could have the URL - - - -http://www-com.physik.hu-berlin.de/~bernd/article.tgz#tar:/paper.tex - - - - - - -Using TDEIO - - -In most cases, jobs are created by calling functions in the TDEIO namespace. -These functions take one or two URLs as arguments, and possible other -necessary parameters. When the job is finished, it emits the signal -result(TDEIO::Job*). After this signal has been emitted, the job -deletes itself. Thus, a typical use case will look like this: - - - -void FooClass::makeDirectory() -{ - SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/tdeiodir")); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mkdirResult(TDEIO::Job*)) ); -} - -void FooClass::mkdirResult(TDEIO::Job *job) -{ - if (job->error()) - job->showErrorDialog(); - else - cout << "mkdir went fine" << endl; -} - - - -Depending on the type of the job, you may connect also to other -signals. - - - -Here is an overview over the possible functions: - - - - -TDEIO::mkdir(const KURL &url, int permission) - -Creates a directory, optionally with certain permissions. - - - -TDEIO::rmdir(const KURL &url) - -Removes a directory. - - - -TDEIO::chmod(const KURL &url, int permissions) - -Changes the permissions of a file. - - - -TDEIO::rename(const KURL &src, const KURL &dest, - bool overwrite) - -Renames a file. - - - -TDEIO::symlink(const QString &target, const KURL &dest, - bool overwrite, bool showProgressInfo) - -Creates a symbolic link. - - - -TDEIO::stat(const KURL &url, bool showProgressInfo) - -Finds out certain information about the file, such as size, modification -time and permissions. The information can be obtained from -TDEIO::StatJob::statResult() after the job has finished. - - - -TDEIO::get(const KURL &url, bool reload, bool showProgressInfo) - -Transfers data from a URL. - - - -TDEIO::put(const KURL &url, int permissions, bool overwrite, - bool resume, bool showProgressInfo) - -Transfers data to a URL. - - - -TDEIO::http_post(const KURL &url, const QByteArray &data, - bool showProgressInfo) -Posts data. Special for HTTP. - - - -TDEIO::mimetype(const KURL &url, bool showProgressInfo) - -Tries to find the MIME type of the URL. The type can be obtained from -TDEIO::MimetypeJob::mimetype() after the job has finished. - - - -TDEIO::file_copy(const KURL &src, const KURL &dest, int permissions, - bool overwrite, bool resume, bool showProgressInfo) - -Copies a single file. - - - -TDEIO::file_move(const KURL &src, const KURL &dest, int permissions, - bool overwrite, bool resume, bool showProgressInfo) - -Renames or moves a single file. - - - -TDEIO::file_delete(const KURL &url, bool showProgressInfo) - -Deletes a single file. - - - -TDEIO::listDir(const KURL &url, bool showProgressInfo) - -Lists the contents of a directory. Each time some new entries are known, the -signal TDEIO::ListJob::entries() is emitted. - - - -TDEIO::listRecursive(const KURL &url, bool showProgressInfo) - -Similar to the listDir() function, but this one is recursive. - - - -TDEIO::copy(const KURL &src, const KURL &dest, bool showProgressInfo) - -Copies a file or directory. Directories are copied recursively. - - - -TDEIO::move(const KURL &src, const KURL &dest, bool showProgressInfo) - -Moves or renames a file or directory. - - - -TDEIO::del(const KURL &src, bool shred, bool showProgressInfo) - -Deletes a file or directory. - - - - - - - - - -Directory entries - - -Both the TDEIO::stat() and TDEIO::listDir() jobs return their results as a type -UDSEntry, UDSEntryList resp. The latter is defined as QValueList<UDSEntry>. -The acronym UDS stands for "Universal directory service". The principle behind -it is that the a directory entry only carries the information which an ioslave -can provide, not more. For example, the http slave does not provide any -information about access permissions or file owners. -Instead, a UDSEntry is a list of UDSAtoms. Each atom provides a specific piece -of information. It consists of a type stored in m_uds and either an integer -value in m_long or a string value in m_str, depending on the type. - - - -The following types are currently defined: - - - - - -UDS_SIZE (integer) - Size of the file. - - - -UDS_USER (string) - User owning the file. - - - -UDS_GROUP (string) - Group owning the file. - - - -UDS_NAME (string) - File name. - - - -UDS_ACCESS (integer) - Permission rights of the file, as e.g. stored -by the libc function stat() in the st_mode field. - - - -UDS_FILE_TYPE (integer) - The file type, as e.g. stored by stat() in the -st_mode field. Therefore you can use the usual libc macros like S_ISDIR to -test this value. Note that the data provided by ioslaves corresponds to -stat(), not lstat(), i.e. in case of symbolic links, the file type here is -the type of the file pointed to by the link, not the link itself. - - - -UDS_LINK_DEST (string) - In case of a symbolic link, the name of the file -pointed to. - - - -UDS_MODIFICATION_TIME (integer) - The time (as in the type time_t) when the -file was last modified, as e.g. stored by stat() in the st_mtime field. - - - -UDS_ACCESS_TIME (integer) - The time when the file was last accessed, as -e.g. stored by stat() in the st_atime field. - - - -UDS_CREATION_TIME (integer) - The time when the file was created, as e.g. -stored by stat() in the st_ctime field. - - - -UDS_URL (string) - Provides a URL of a file, if it is not simply the -the concatenation of directory URL and file name. - - - -UDS_MIME_TYPE (string) - MIME type of the file - - - -UDS_GUESSED_MIME_TYPE (string) - MIME type of the file as guessed by the -slave. The difference to the previous type is that the one provided here -should not be taken as reliable (because determining it in a reliable way -would be too expensive). For example, the KRun class explicitly checks the -MIME type if it does not have reliable information. - - - - - -Although the way of storing information about files in a -UDSEntry is flexible and practical from the ioslave -point of view, it is a mess to use for the application programmer. For -example, in order to find out the MIME type of the file, you have to iterate -over all atoms and test whether m_uds is -UDS_MIME_TYPE. Fortunately, there is an API which is a lot -easier to use: the class KFileItem. - - - - - - -Synchronous usage - - -Often, the asynchronous API of TDEIO is too complex to use and therefore -implementing full asynchronicity is not a priority. For example, in a program -that can only handle one document file at a time, there is little that can be -done while the program is downloading a file anyway. For these simple cases, -there is a mucher simpler API in the form of a set of static functions in -TDEIO::NetAccess. For example, in order to copy a file, use - - - -KURL source, target; -source = ...; -target = ... -TDEIO::NetAccess::copy(source, target); - - - -The function will return after the complete copying process has finished. Still, -this method provides a progress dialog, and it makes sure that the application -processes repaint events. - - - -A particularly interesting combination of functions is -download() in combination with -removeTempFile(). The former downloads a file from given -URL and stores it in a temporary file with a unique name. The name is stored -in the second argument. If the URL is local, the file is -not downloaded, and instead the second argument is set to the local file -name. The function removeTempFile() deletes the file -given by its argument if the file is the result of a former download. If that -is not the case, it does nothing. Thus, a very easy to use way of loading -files regardless of their location is the following code snippet: - - - -KURL url; -url = ...; -QString tempFile; -if (TDEIO::NetAccess::download(url, tempFile) { - // load the file with the name tempFile - TDEIO::NetAccess::removeTempFile(tempFile); -} - - - - - - -Meta data - - -As can be seen above, the interface to IO jobs is quite abstract and does not -consider any exchange of information between application and IO slave that -is protocol specific. This is not always appropriate. For example, you may give -certain parameters to the HTTP slave to control its caching behavior or -send a bunch of cookies with the request. For this need, the concept of meta -data has been introduced. When a job is created, you can configure it by adding -meta data to it. Each item of meta data consists of a key/value pair. For -example, in order to prevent the HTTP slave from loading a web page from its -cache, you can use: - - - -void FooClass::reloadPage() -{ - KURL url("http://www.kdevelop.org/index.html"); - TDEIO::TransferJob *job = TDEIO::get(url, true, false); - job->addMetaData("cache", "reload"); - ... -} - - - -The same technique is used in the other direction, i.e. for communication from -the slave to the application. The method -Job::queryMetaData() asks for the value of the certain -key delivered by the slave. For the HTTP slave, one such example is the key -"modified", which contains a (stringified representation of) -the date when the web page was last modified. An example how you can use this -is the following: - - - -void FooClass::printModifiedDate() -{ - KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); - TDEIO::TransferJob *job = TDEIO::get(url, true, false); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(transferResult(TDEIO::Job*)) ); -} - -void FooClass::transferResult(TDEIO::Job *job) -{ - QString mimetype; - if (job->error()) - job->showErrorDialog(); - else { - TDEIO::TransferJob *transferJob = (TDEIO::TransferJob*) job; - QString modified = transferJob->queryMetaData("modified"); - cout << "Last modified: " << modified << endl; -} - - - - - - -Scheduling - - -When using the TDEIO API, you usually do not have to cope with the details of -starting IO slaves and communicating with them. The normal use case is to -start a job and with some parameters and handle the signals the jobs emits. - - - -Behind the curtains, the scenario is a lot more complicated. When you create a -job, it is put in a queue. When the application goes back to the event loop, -TDEIO allocates slave processes for the jobs in the queue. For the first jobs -started, this is trivial: an IO slave for the appropriate protocol is started. -However, after the job (like a download from an http server) has finished, it -is not immediately killed. Instead, it is put in a pool of idle slaves and -killed after a certain time of inactivity (current 3 minutes). If a new request -for the same protocol and host arrives, the slave is reused. The obvious -advantage is that for a series of jobs for the same host, the cost for creating -new processes and possibly going through an authentication handshake is saved. - - - -Of course, reusing is only possible when the existing slave has already finished -its previous job. when a new request arrives while an existing slave process is -still running, a new process must be started and used. In the API usage in the -examples above, there are no limitation for creating new slave processes: if you -start a consecutive series of downloads for 20 different files, then TDEIO will -start 20 slave processes. This scheme of assigning slaves to jobs is called -direct. It not always the most appropriate scheme, as it -may need much memory and put a high load on both the client and server machines. - - - -So there is a different way. You can schedule jobs. If -you do this, only a limited number (currently 3) of slave processes for a -protocol will be created. If you create more jobs than that, they are put in a -queue and are processed when a slave process becomes idle. This is done as -follows: - - - -KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); -TDEIO::TransferJob *job = TDEIO::get(url, true, false); -TDEIO::Scheduler::scheduleJob(job); - - - -A third possibility is connection oriented. For example, -for the IMAP slave, it does not make any sense to start multiple processes for -the same server. Only one IMAP connection at a time should be enforced. In -this case, the application must explicitly deal with the notion of a slave. It -has to deallocate a slave for a certain connection and then assign all jobs -which should go through the same connection to the same slave. This can again -be easily achieved by using the TDEIO::Scheduler: - - - -KURL baseUrl("imap://bernd@albert.physik.hu-berlin.de"); -TDEIO::Slave *slave = TDEIO::Scheduler::getConnectedSlave(baseUrl); - -TDEIO::TransferJob *job1 = TDEIO::get(KURL(baseUrl, "/INBOX;UID=79374")); -TDEIO::Scheduler::assignJobToSlave(slave, job1); - -TDEIO::TransferJob *job2 = TDEIO::get(KURL(baseUrl, "/INBOX;UID=86793")); -TDEIO::Scheduler::assignJobToSlave(slave, job2); - -... - -TDEIO::Scheduler::disconnectSlave(slave); - - - -You may only disconnect the slave after all jobs assigned to it are guaranteed -to be finished. - - - - - - -Defining an ioslave - - -In the following we discuss how you can add a new ioslave to the system. -In analogy to services, new ioslaves are advertised to the system by -installing a little configuration file. The following Makefile.am -snippet installs the ftp protocol: - - - -protocoldir = $(kde_servicesdir) -protocol_DATA = ftp.protocol -EXTRA_DIST = $(mime_DATA) - - - -The contents of the file ftp.protocol is as follows: - - - -[Protocol] -exec=tdeio_ftp -protocol=ftp -input=none -output=filesystem -listing=Name,Type,Size,Date,Access,Owner,Group,Link, -reading=true -writing=true -makedir=true -deleting=true -Icon=ftp - - - -The "protocol" entry defines for which protocol this slave -is responsible. "exec" is (in contrast what you would -expect naively) the name of the library that implements the slave. When the -slave is supposed to start, the "tdeinit" executable is -started which in turn loads this library into its address space. So in -practice, you can think of the running slave as a separate process although it -is implemented as library. The advantage of this mechanism is that it saves a -lot of memory and reduces the time needed by the runtime linker. - - - -The "input" and "output" lines are not used currently. - - - -The remaining lines in the .protocol file define which -abilities the slave has. In general, the features a slave must implement are -much simpler than the features the TDEIO API provides for the application. The -reason for this is that complex jobs are scheduled to a couple of subjobs. For -example, in order to list a directory recursively, one job will be started for -the toplevel directory. Then for each subdirectory reported back, new subjobs -are started. A scheduler in TDEIO makes sure that not too many jobs are active -at the same time. Similarly, in order to copy a file within a protocol that -does not support copying directly (like the ftp: protocol), -TDEIO can read the source file and then write the data to the destination -file. For this to work, the .protocol must advertise the -actions its slave supports. - - - -Since slaves are loaded as shared libraries, but constitute standalone programs, -their code framework looks a bit different from normal shared library plugins. -The function which is called to start the slave is called -kdemain(). This function does some initializations and -then goes into an event loop and waits for requests by the application using -it. This looks as follows: - - - -extern "C" { int kdemain(int argc, char **argv); } - -int kdemain(int argc, char **argv) -{ - TDELocale::setMainCatalogue("tdelibs"); - TDEInstance instance("tdeio_ftp"); - (void) TDEGlobal::locale(); - - if (argc != 4) { - fprintf(stderr, "Usage: tdeio_ftp protocol " - "domain-socket1 domain-socket2\n"); - exit(-1); - } - - FtpSlave slave(argv[2], argv[3]); - slave.dispatchLoop(); - return 0; -} - - - - - - -Implementing an ioslave - - -Slaves are implemented as subclasses of TDEIO::SlaveBase -(FtpSlave in the above example). Thus, the actions listed in the -.protocol correspond to certain virtual functions in -TDEIO::SlaveBase the slave implementation must -reimplement. Here is a list of possible actions and the corresponding virtual -functions: - - - - -reading - Reads data from a URL -void get(const KURL &url) - -writing - Writes data to a URL and create the file if it does not exist yet. -void put(const KURL &url, int permissions, bool overwrite, bool resume) - -moving - Renames a file. -void rename(const KURL &src, const KURL &dest, bool overwrite) - -deleting - Deletes a file or directory. -void del(const KURL &url, bool isFile) - -listing - Lists the contents of a directory. -void listDir(const KURL &url) - -makedir - Creates a directory. -void mkdir(const KURL &url, int permissions) - - - - -Additionally, there are reimplementable functions not listed in the .protocol -file. For these operations, TDEIO automatically determines whether they are supported -or not (i.e. the default implementation returns an error). - - - - -Delivers information about a file, similar to the C function stat(). -void stat(const KURL &url) - -Changes the access permissions of a file. -void chmod(const KURL &url, int permissions) - -Determines the MIME type of a file. -void mimetype(const KURL &url) - -Copies a file. -copy(const KURL &url, const KURL &dest, int permissions, bool overwrite) - -Creates a symbolic link. -void symlink(const QString &target, const KURL &dest, bool overwrite) - - - - -All these implementation should end with one of two calls: If the operation -was successful, they should call finished(). If an error has occurred, -error() should be called with an error code as first argument and a -string in the second. Possible error codes are listed as enum -TDEIO::Error. The second argument is usually the URL in -question. It is used e.g. in TDEIO::Job::showErrorDialog() -in order to parameterize the human-readable error message. - - - -For slaves that correspond to network protocols, it might be interesting to -reimplement the method SlaveBase::setHost(). This is -called to tell the slave process about the host and port, and the user name -and password to log in. In general, meta data set by the application can be -queried by SlaveBase::metaData(). You can check for the -existence of meta data of a certain key with -SlaveBase::hasMetaData(). - - - - - - -Communicating back to the application - - -Various actions implemented in a slave need some way to communicate data back -to the application using the slave process: - - - - - -get() sends blocks of data. This is done with -data(), which takes a QByteArray -as argument. Of course, you do not need to send all data at once. If you send -a large file, call data() with smaller data blocks, so -the application can process them. Call finished() when -the transfer is finished. - - - -listDir() reports information about the entries of a -directory. For this purpose, call listEntries() with a -TDEIO::UDSEntryList as argument. Analogously to -data(), you can call this several times. When you are -finished, call listEntry() with the second argument set -to true. You may also call totalSize() to report the -total number of directory entries, if known. - - - -stat() reports information about a file like size, MIME -type, etc. Such information is packaged in a -TDEIO::UDSEntry, which will be discussed below. Use -statEntry() to send such an item to the application. - - - -mimetype() calls mimeType() with a -string argument. - - - -get() and copy() may want to provide -progress information. This is done with the methods -totalSize(), processedSize(), -speed(). The total size and processed size are reported -as bytes, the speed as bytes per second. - - - -You can send arbitrary key/value pairs of meta data with -setMetaData(). - - - - - - - - -Interacting with the user - - -Sometimes a slave has to interact with the user. Examples include informational -messages, authentication dialogs and confirmation dialogs when a file is about -to be overwritten. - - - - - -infoMessage() - This is for informational feedback, such -as the message "Retrieving data from <host>" from the http slave, which -is often displayed in the status bar of the program. On the application side, -this method corresponds to the signal -TDEIO::Job::infoMessage(). - - - -warning() - Displays a warning in a message box with -KMessageBox::information(). If a message box is still -open from a former call of warning() from the same slave process, nothing -happens. - - - -messageBox() - This is richer than the previous -method. It allows to open a message box with text and caption and some -buttons. See the enum SlaveBase::MessageBoxType for reference. - - - -openPassDlg() - Opens a dialog for the input of user name -and password. - - - - - - - - - - - - - -Licensing - -&underFDL; -&underGPL; - - - -
diff --git a/doc/tdearch/joinbevel.png b/doc/tdearch/joinbevel.png deleted file mode 100644 index 584b6bd4..00000000 Binary files a/doc/tdearch/joinbevel.png and /dev/null differ diff --git a/doc/tdearch/joinmiter.png b/doc/tdearch/joinmiter.png deleted file mode 100644 index e5d94b13..00000000 Binary files a/doc/tdearch/joinmiter.png and /dev/null differ diff --git a/doc/tdearch/joinround.png b/doc/tdearch/joinround.png deleted file mode 100644 index 9a8bbe93..00000000 Binary files a/doc/tdearch/joinround.png and /dev/null differ diff --git a/doc/tdearch/konqi-mirrored.png b/doc/tdearch/konqi-mirrored.png deleted file mode 100644 index 5145c0ee..00000000 Binary files a/doc/tdearch/konqi-mirrored.png and /dev/null differ diff --git a/doc/tdearch/konqi-normal.png b/doc/tdearch/konqi-normal.png deleted file mode 100644 index c16e1475..00000000 Binary files a/doc/tdearch/konqi-normal.png and /dev/null differ diff --git a/doc/tdearch/konqi-rotated.png b/doc/tdearch/konqi-rotated.png deleted file mode 100644 index 157e82dd..00000000 Binary files a/doc/tdearch/konqi-rotated.png and /dev/null differ diff --git a/doc/tdearch/konqi-sheared.png b/doc/tdearch/konqi-sheared.png deleted file mode 100644 index ee645f87..00000000 Binary files a/doc/tdearch/konqi-sheared.png and /dev/null differ diff --git a/doc/tdearch/kview-menu.png b/doc/tdearch/kview-menu.png deleted file mode 100644 index 0e57e721..00000000 Binary files a/doc/tdearch/kview-menu.png and /dev/null differ diff --git a/doc/tdearch/opengl.png b/doc/tdearch/opengl.png deleted file mode 100644 index 2489777d..00000000 Binary files a/doc/tdearch/opengl.png and /dev/null differ diff --git a/doc/tdearch/penstyles.png b/doc/tdearch/penstyles.png deleted file mode 100644 index 7e976bcd..00000000 Binary files a/doc/tdearch/penstyles.png and /dev/null differ diff --git a/doc/tdearch/whatsthis.png b/doc/tdearch/whatsthis.png deleted file mode 100644 index 4bdba093..00000000 Binary files a/doc/tdearch/whatsthis.png and /dev/null differ diff --git a/doc/tdevassistant/CMakeLists.txt b/doc/tdevassistant/CMakeLists.txt deleted file mode 100644 index caa4d7b8..00000000 --- a/doc/tdevassistant/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -################################################# -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -tde_create_handbook( DESTINATION tdevassistant ) diff --git a/doc/tdevassistant/Makefile.am b/doc/tdevassistant/Makefile.am deleted file mode 100644 index 41691557..00000000 --- a/doc/tdevassistant/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -KDE_LANG = en -KDE_DOCS = AUTO - diff --git a/doc/tdevassistant/index.docbook b/doc/tdevassistant/index.docbook deleted file mode 100644 index 065276f9..00000000 --- a/doc/tdevassistant/index.docbook +++ /dev/null @@ -1,65 +0,0 @@ - -TDevAssistant"> - - - -]> - - - - - -
-The &tdevassistant; Handbook - - -The &tdevassistant; Handbook - - -&tde-authors; - - - -&tde-release-version; -Reviewed: &tde-release-date; - - -&tde-copyright-date; -&tde-team; - - - - - - -&tdevassistant; is a development documentation viewer for &tde;. - - - - -TDE - - - - - -We Apologize -No documentation has yet been written for &tdevassistant;. - -If you need help, please check The &tde; -web site, submit questions to the -&tde; mail lists, or file a bug report at the -&tde; bug tracker. - -If you are interested in helping, please consider writing the help file. -Submitting a basic text file is acceptable as the &tde-team; will convert the text. - -Thank you for helping and thank you for your patience. - -&underFDL; - - - -&documentation.index; -
diff --git a/doc/tdevdesigner/CMakeLists.txt b/doc/tdevdesigner/CMakeLists.txt deleted file mode 100644 index d8d93cbb..00000000 --- a/doc/tdevdesigner/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -################################################# -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -tde_create_handbook( DESTINATION tdevdesigner ) diff --git a/doc/tdevdesigner/Makefile.am b/doc/tdevdesigner/Makefile.am deleted file mode 100644 index 41691557..00000000 --- a/doc/tdevdesigner/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -KDE_LANG = en -KDE_DOCS = AUTO - diff --git a/doc/tdevdesigner/index.docbook b/doc/tdevdesigner/index.docbook deleted file mode 100644 index 3bfdf384..00000000 --- a/doc/tdevdesigner/index.docbook +++ /dev/null @@ -1,65 +0,0 @@ - -TDevDesigner"> - - - -]> - - - - - -
-The &tdevdesigner; Handbook - - -The &tdevdesigner; Handbook - - -&tde-authors; - - - -&tde-release-version; -Reviewed: &tde-release-date; - - -&tde-copyright-date; -&tde-team; - - - - - - -&tdevdesigner; is a GUI designer environment for &tde;. - - - - -TDE - - - - - -We Apologize -No documentation has yet been written for &tdevdesigner;. - -If you need help, please check The &tde; -web site, submit questions to the -&tde; mail lists, or file a bug report at the -&tde; bug tracker. - -If you are interested in helping, please consider writing the help file. -Submitting a basic text file is acceptable as the &tde-team; will convert the text. - -Thank you for helping and thank you for your patience. - -&underFDL; - - - -&documentation.index; -
diff --git a/doc/tdevelop/app-files.docbook b/doc/tdevelop/app-files.docbook index 736baf16..547010ec 100644 --- a/doc/tdevelop/app-files.docbook +++ b/doc/tdevelop/app-files.docbook @@ -56,7 +56,7 @@ Most &tdevelop; features are provided by KParts. These are basically application -There are quite a lot of default configuration subdirectories in $TDEDIR/share/apps/ whose names all start with a tdev sequence. Most of them are for &tdevelop; internal use only. They might be deliberately grouped for readability as: +There are quite a lot of default configuration subdirectories in $TDEDIR/share/apps/ whose names all start with a kdev sequence. Most of them are for &tdevelop; internal use only. They might be deliberately grouped for readability as: Stand-alone Applications Task Specific Parts @@ -76,25 +76,25 @@ There are quite a lot of default configuration subdirectories in profiles/ — contains default plugin profile settings. (Currently there is only a tiny profile provided which defines a minimum set of active &tdevelop; plugins.) eventsrc — holds a lot of Process successful localization strings. tdevelopui.rc — provides the basic menu and tool bar entries &tdevelop; uses. - tdevhtml_partui.rc — provides a Print... entry in the File menu, a Copy entry in the Edit menu, and Back and Forward arrows in the Browser Toolbar in case a &HTML; file is browsed from the Documentation plugin. + kdevhtml_partui.rc — provides a Print... entry in the File menu, a Copy entry in the Edit menu, and Back and Forward arrows in the Browser Toolbar in case a &HTML; file is browsed from the Documentation plugin. - tdevassistant/ — provides the menu and tool bars of the stand-alone &tdevelop; Assistant documentation browser. - tdevdesigner/ and tdevdesignerpart/ — provide menu bar and tool bars of the stand-alone &tdevelop; user interface designer. + kdevassistant/ — provides the menu and tool bars of the stand-alone &tdevelop; Assistant documentation browser. + kdevdesigner/ and kdevdesignerpart/ — provide menu bar and tool bars of the stand-alone &tdevelop; user interface designer. Task Specific Parts - tdevabbrev/ — contains files used by the Abbreviation Expansion plugin: + kdevabbrev/ — contains files used by the Abbreviation Expansion plugin: sources/ — contains keyword definition files used by the Expand Text command. templates/ — contains template definition files used by the Expand Abbreviation command. - tdevabbrev.rc — provides the Expand Text and Expand Abbreviation entries in the Edit menu. + kdevabbrev.rc — provides the Expand Text and Expand Abbreviation entries in the Edit menu. - tdevappwizard/ — contains files used by the &appwizard; part: + kdevappwizard/ — contains files used by the &appwizard; part: importfiles/ — contains .tdevelop project files which control the initialization of a new project. imports/ — contains templates to set up project specific .desktop files. @@ -104,89 +104,89 @@ There are quite a lot of default configuration subdirectories in *.tar.gz — tarballs containing the source files to be included in a new generated project directory. - tdevastyle/ — provides the Reformat Source entry in the Edit menu. - tdevautoproject/ — provides most of the entries in the Build menu and the Build Toolbar (&tdevelop;) toolbar. + kdevastyle/ — provides the Reformat Source entry in the Edit menu. + kdevautoproject/ — provides most of the entries in the Build menu and the Build Toolbar (&tdevelop;) toolbar. - tdevclassview/ — contains files used by the Class View project plugin: + kdevclassview/ — contains files used by the Class View project plugin: pics/ — contains the icons used in the Classes classview tree. - tdevclassview.tc — provides the Class Inheritance Diagram entry in the Projects menu as well as the classes navigation combo box in the Browser Toolbar. + kdevclassview.tc — provides the Class Inheritance Diagram entry in the Projects menu as well as the classes navigation combo box in the Browser Toolbar. - tdevcloser/ — provides the Windows menu close entries. - tdevctags/ — provides the CTags entry in the Tools menu for the CTags Frontend project plugin. - tdevcvsservice/ — provides the icon used by the CvsService tab and a short shell script used to add a new entry to the &cvs; repository, both used by the CVS Integration project plugin. - tdevdebugger/ — provides the Debug menu entries for the Debugger Frontend project plugin. - tdevdiff/ — provides the Difference Viewer entry in the Tools menu. - tdevdistpart/ — provides the Distribution & Publishing entry in the Project menu for the Final Packaging Support project plugin. + kdevcloser/ — provides the Windows menu close entries. + kdevctags/ — provides the CTags entry in the Tools menu for the CTags Frontend project plugin. + kdevcvsservice/ — provides the icon used by the CvsService tab and a short shell script used to add a new entry to the &cvs; repository, both used by the CVS Integration project plugin. + kdevdebugger/ — provides the Debug menu entries for the Debugger Frontend project plugin. + kdevdiff/ — provides the Difference Viewer entry in the Tools menu. + kdevdistpart/ — provides the Distribution & Publishing entry in the Project menu for the Final Packaging Support project plugin. - tdevdocumentation/ — contains files used by the Documentation plugin: + kdevdocumentation/ — contains files used by the Documentation plugin: en/ and pics/ — contain files used by the htdig search tool. tocs/ — contain the default &tdevelop; documentation content description files (see the description in Basic Structure of &tdevelop; TOC Files). - tdevpart_documentation.rc — provides the search related entries in the Help menu. + kdevpart_documentation.rc — provides the search related entries in the Help menu. - tdevdoxygen/ — provides the menu entries for the Doxygen Support project plugin. + kdevdoxygen/ — provides the menu entries for the Doxygen Support project plugin. - tdevfilecreate/ — contains files used by the New File Wizard: + kdevfilecreate/ — contains files used by the New File Wizard: file-templates/ — provides the initial text contents to be put into the new source file of a given type. - tdevpart_filecreate.rc — provides the New entry in the File menu. + kdevpart_filecreate.rc — provides the New entry in the File menu. template-info.xml — contains descriptions of the available file types to be displayed in the New File tool view. - tdevfilter/ — provides the Execute Command... and Filter Selection Through Command... entries in the Tools menu used by the Shell Filtering and Insertion plugin. - tdevfullscreen/ — provides the Full Screen Mode entry in the View menu and the according tool bar icon. - tdevgrepview/ — provides the Find in Files...entry in the Edit menu used by the Grep Frontend plugin. - tdevhistory/ — provides the Back and Forward entries in the View menu. - tdevjavadebugger/ — provides a Java Debug menu in order to debug a &Java; application. - tdevoutputviews/ — provides the Next Error and Previous Error entries in the View menu. - tdevpartexplorer/ — provides the Part Explorer entry in the Tools menu used by the Part Explorer Tool plugin. - tdevquickopen/ — provides the Quick Open File.. entry in the File menu and the Quick Open Class... and Quick Open Method entries in the Tools menu used by the Quick Open project plugin. - tdevregexptest/ — provides the Debug Regular Expression... entry in the Tools menu used by the Regular Expression Tester plugin. - tdevreplace/ — provides the Find-Select-Replace... entry in the Edit menu used by the Replace Part plugin. - tdevtipofday/ — provides the Tip of the Day entry in the Help menu as well as a HTML-File containing the available tips. - tdevtools/ — controls various menu entries ceated by Tools Menu and External Tools Menu settings provided by the Tools Menu Addition plugin. - tdevvalgrind/ — provides the Valgrind Memory Leak Check and Profile with KCachegrind entries in the Debug menu used by the Valgrind Frontend plugin. + kdevfilter/ — provides the Execute Command... and Filter Selection Through Command... entries in the Tools menu used by the Shell Filtering and Insertion plugin. + kdevfullscreen/ — provides the Full Screen Mode entry in the View menu and the according tool bar icon. + kdevgrepview/ — provides the Find in Files...entry in the Edit menu used by the Grep Frontend plugin. + kdevhistory/ — provides the Back and Forward entries in the View menu. + kdevjavadebugger/ — provides a Java Debug menu in order to debug a &Java; application. + kdevoutputviews/ — provides the Next Error and Previous Error entries in the View menu. + kdevpartexplorer/ — provides the Part Explorer entry in the Tools menu used by the Part Explorer Tool plugin. + kdevquickopen/ — provides the Quick Open File.. entry in the File menu and the Quick Open Class... and Quick Open Method entries in the Tools menu used by the Quick Open project plugin. + kdevregexptest/ — provides the Debug Regular Expression... entry in the Tools menu used by the Regular Expression Tester plugin. + kdevreplace/ — provides the Find-Select-Replace... entry in the Edit menu used by the Replace Part plugin. + kdevtipofday/ — provides the Tip of the Day entry in the Help menu as well as a HTML-File containing the available tips. + kdevtools/ — controls various menu entries ceated by Tools Menu and External Tools Menu settings provided by the Tools Menu Addition plugin. + kdevvalgrind/ — provides the Valgrind Memory Leak Check and Profile with KCachegrind entries in the Debug menu used by the Valgrind Frontend plugin. Project Generation Parts - tdevadaproject/ — provides entries for the Build menu and according tool bar icons to build an Ada application. - tdevantproject/ — provides entries for the Build menu when the Ant project generator is used. - tdevautoproject/ — provides entries for the Build menu and according tool bar icons when working with the &GNU; Tools based &automake; project generator. Additionally provides the Add Translation and Build Configuration entries to the Project menu. - tdevcustomproject/ — provides entries for the Build menu and according tool bar icons when the project is based on custom Makefils. - tdevgenericproject/ — contains menu definitions for an experimental generic project generator. Currently (version 3.1.0) unused. - tdevhaskellproject/ — provides entries for the Build menu and according tool bar icons to build a Haskell application. - tdevpascalproject/ — provides entries for the Build menu and according tool bar icons to build a Pascal application. - tdevtrollproject/ — provides entries for the Build menu and according tool bar icons to build an application using the &Qt; QMake project manager. + kdevadaproject/ — provides entries for the Build menu and according tool bar icons to build an Ada application. + kdevantproject/ — provides entries for the Build menu when the Ant project generator is used. + kdevautoproject/ — provides entries for the Build menu and according tool bar icons when working with the &GNU; Tools based &automake; project generator. Additionally provides the Add Translation and Build Configuration entries to the Project menu. + kdevcustomproject/ — provides entries for the Build menu and according tool bar icons when the project is based on custom Makefils. + kdevgenericproject/ — contains menu definitions for an experimental generic project generator. Currently (version 3.1.0) unused. + kdevhaskellproject/ — provides entries for the Build menu and according tool bar icons to build a Haskell application. + kdevpascalproject/ — provides entries for the Build menu and according tool bar icons to build a Pascal application. + kdevtrollproject/ — provides entries for the Build menu and according tool bar icons to build an application using the &Qt; QMake project manager. Language Specific Parts - tdevadasupport/ — provides entries in the Tools menu and according tool bar icons needed to develop Ada applications. - tdevbashsupport/ — provides entries in the Build menu and according tool bar icons needed to develop Bash scripts. + kdevadasupport/ — provides entries in the Tools menu and according tool bar icons needed to develop Ada applications. + kdevbashsupport/ — provides entries in the Build menu and according tool bar icons needed to develop Bash scripts. - tdevcppsupport/ — contains files used by the &appwizard; to build C++ applications: + kdevcppsupport/ — contains files used by the &appwizard; to build C++ applications: newclass/ — contains header and source templates from which the &appwizard; builds the according source files. subclassing/ — contains templates which the &appwizard; uses to set up initial class declarations/definitions in the source files. templates — contains templates from which the &appwizard; sets up the default header and source template files to be used by the &nfwizard;. configuration — dummy template to add macros. - tdevcppsupport.rc — provides the Complete Text and Make Member entries fo the Edit menu, the Switch Header/Implementation entry for the View menu, and the New Class entry for the Project menu as well as a New Class icon for the Browser Toolbar. + kdevcppsupport.rc — provides the Complete Text and Make Member entries fo the Edit menu, the Switch Header/Implementation entry for the View menu, and the New Class entry for the Project menu as well as a New Class icon for the Browser Toolbar. - tdevfortransupport/ — provides entries in the Build menu needed to develop Fortran applications. - tdevhaskellsupport/ — provides entries in the Build menu and according tool bar icons needed to develop Haskell applications. - tdevjavasupport/ — contains the UI definition needed to develop &Java; applications. - tdevpascalsupport/ — contains the UI definition needed to develop Pascal applications. - tdevperlsupport/ — provides Project and Help menu entries needed to develop Perl scripts. - tdevphpsupport/ — contains UI and PHP function definition files needed to develop PHP scripts. - tdevpythonsupport/ — provides Build and Help menu entries and according tool bar icons needed to develop Python scripts. - tdevrubysupport/ — provides Build menu entries and according tool bar icons needed to develop Ruby scripts. - tdevscriptproject/ — provides th UI definitions needed to develop custom projects. Currently (version 3.1.0) unused. - tdevsqlsupport/ — provides th UI definitions needed to develop SQL projects. Currently (version 3.1.0) unused. + kdevfortransupport/ — provides entries in the Build menu needed to develop Fortran applications. + kdevhaskellsupport/ — provides entries in the Build menu and according tool bar icons needed to develop Haskell applications. + kdevjavasupport/ — contains the UI definition needed to develop &Java; applications. + kdevpascalsupport/ — contains the UI definition needed to develop Pascal applications. + kdevperlsupport/ — provides Project and Help menu entries needed to develop Perl scripts. + kdevphpsupport/ — contains UI and PHP function definition files needed to develop PHP scripts. + kdevpythonsupport/ — provides Build and Help menu entries and according tool bar icons needed to develop Python scripts. + kdevrubysupport/ — provides Build menu entries and according tool bar icons needed to develop Ruby scripts. + kdevscriptproject/ — provides th UI definitions needed to develop custom projects. Currently (version 3.1.0) unused. + kdevsqlsupport/ — provides th UI definitions needed to develop SQL projects. Currently (version 3.1.0) unused. @@ -212,7 +212,7 @@ All information about user defined settings is kept in two subdirectories of Application Specific Configuration -Any user changes to the &tdevelop; Default Configuration settings as well as user specific settings which are not kept in any of the Resource Configuration Files are found in tdev... subdirectories of the $TDEHOME/share/apps/ directory. +Any user changes to the &tdevelop; Default Configuration settings as well as user specific settings which are not kept in any of the Resource Configuration Files are found in kdev... subdirectories of the $TDEHOME/share/apps/ directory. Most of these configuration files are however used by various &tdevelop; plugins in order to provide some specific menu and/or toolbar entries. Thus they are of interest only in case something went really wrong with the user interface. @@ -223,30 +223,30 @@ In case the contents of these directories mirror those of the Default Configurat - tdevabbrev/ — contains files used by the Abbreviation Expansion plugin: + kdevabbrev/ — contains files used by the Abbreviation Expansion plugin: sources/ — currently empty; &tdevelop; uses the default keyword definition files for Expand Text commands. templates/ — contains the user modified template definition files used by the Expand Abbreviation command. - tdevabbrev.rc — provides the Expand Text and Expand Abbreviation entries in the Edit menu. + kdevabbrev.rc — provides the Expand Text and Expand Abbreviation entries in the Edit menu. - tdevappwizard/ — only provides the New Project... and Import Existing Project... entries in the Projects menu. The &appwizard; will use the default configuration settings for its actual works. + kdevappwizard/ — only provides the New Project... and Import Existing Project... entries in the Projects menu. The &appwizard; will use the default configuration settings for its actual works. - tdevastyle/ — provides the actual Reformat Source entry in the Edit menu. + kdevastyle/ — provides the actual Reformat Source entry in the Edit menu. - tdevautoproject/ — provides the actual entries in the Build menu and the Build Toolbar (TDevelop) toolbar. + kdevautoproject/ — provides the actual entries in the Build menu and the Build Toolbar (KDevelop) toolbar. - tdevclassview/ — provides the Class Inheritance Diagram entry in the Project menu and the class browser combo box in the Browser Toolbar by the Class View project plugin. + kdevclassview/ — provides the Class Inheritance Diagram entry in the Project menu and the class browser combo box in the Browser Toolbar by the Class View project plugin. - tdevcloser/ — provides the Close Selected Windows... entry in the Windows menu. + kdevcloser/ — provides the Close Selected Windows... entry in the Windows menu. - tdevcppsupport/ — holds the acual configuration used by the &appwizard; to build C++ applications. The &appwizard; however uses its main bulk of configuration information directly from the default configuration directory. See there for more detail. + kdevcppsupport/ — holds the acual configuration used by the &appwizard; to build C++ applications. The &appwizard; however uses its main bulk of configuration information directly from the default configuration directory. See there for more detail. newclass/ — contains the actual header and source templates from which the &appwizard; builds the according source files. @@ -255,22 +255,22 @@ In case the contents of these directories mirror those of the Default Configurat pcs/ — contains database files &tdevelop; uses build the actual Persistent Code Store (.pcs) file of a &kde; C++ project. - tdevcppsupport.rc — provides the Complete Text and Make Member entries fo the Edit menu, the Switch Header/Implementation entry for the View menu, and the New Class entry for the Project menu as well as a New Class icon for the Browser Toolbar. + kdevcppsupport.rc — provides the Complete Text and Make Member entries fo the Edit menu, the Switch Header/Implementation entry for the View menu, and the New Class entry for the Project menu as well as a New Class icon for the Browser Toolbar. - tdevctags/ — provides the CTags entry in the Tools menu for the CTags Frontend project plugin. + kdevctags/ — provides the CTags entry in the Tools menu for the CTags Frontend project plugin. - tdevdebugger/ — provides the Debug menu entries for the Debugger Frontend project plugin. + kdevdebugger/ — provides the Debug menu entries for the Debugger Frontend project plugin. - tdevdiff/ — provides the Difference Viewer entry in the Tools menu. + kdevdiff/ — provides the Difference Viewer entry in the Tools menu. - tdevdocumentation/ — contains the actual files used by the Documentation plugin in addition to the default configuration files. See there for more detail. - The directories in tdevdocumentation/ mainly hold actual bookkeeping information. The actually set up documentation files are kept in doc...pluginrc files in the $TDEHOME/share/config/ directory. + kdevdocumentation/ — contains the actual files used by the Documentation plugin in addition to the default configuration files. See there for more detail. + The directories in kdevdocumentation/ mainly hold actual bookkeeping information. The actually set up documentation files are kept in doc...pluginrc files in the $TDEHOME/share/config/ directory. bookmarks/ — maintains the entries in the Bookmarks tab of the &tdevelop; Documentation plugin. @@ -282,12 +282,12 @@ In case the contents of these directories mirror those of the Default Configurat search/ — contains files used by the htdig search tool which serves search calls from the Search tab of the Documentation plugin. - tdevpart_documentation.rc — provides the search related entries in the Help menu. + kdevpart_documentation.rc — provides the search related entries in the Help menu. - tdevdoxygen/ — provides the menu entries for the Doxygen Support project plugin. + kdevdoxygen/ — provides the menu entries for the Doxygen Support project plugin. tdevelop/ — contains some actual settings &tdevelop; uses for its basic setup: @@ -297,45 +297,45 @@ In case the contents of these directories mirror those of the Default Configurat - tdevfilecreate/ — contains files used by the New File Wizard: + kdevfilecreate/ — contains files used by the New File Wizard: file-templates/ — provides the actually used text contents to be put into the new source file of a given type. More file templates are found in the default configuration files directory. - tdevpart_filecreate.rc — provides the New entry in the File menu. + kdevpart_filecreate.rc — provides the New entry in the File menu. template-info.xml — contains descriptions of the available file types to be displayed in the New File tool view. - tdevfilter/ — provides the Execute Command... and Filter Selection Through Command... entries in the Tools menu used by the Shell Filtering and Insertion plugin. + kdevfilter/ — provides the Execute Command... and Filter Selection Through Command... entries in the Tools menu used by the Shell Filtering and Insertion plugin. - tdevfullscreen/ — provides the Full Screen Mode entry in the View menu and the according tool bar icon. + kdevfullscreen/ — provides the Full Screen Mode entry in the View menu and the according tool bar icon. - tdevgrepview/ — provides the Find in Files...entry in the Edit menu used by the Grep Frontend plugin. + kdevgrepview/ — provides the Find in Files...entry in the Edit menu used by the Grep Frontend plugin. - tdevoutputviews/ — provides the Next Error and Previous Error entries in the View menu. + kdevoutputviews/ — provides the Next Error and Previous Error entries in the View menu. - tdevpartexplorer/ — provides the Part Explorer entry in the Tools menu used by the Part Explorer Tool plugin. + kdevpartexplorer/ — provides the Part Explorer entry in the Tools menu used by the Part Explorer Tool plugin. - tdevquickopen/ — provides the Quick Open File.. entry in the File menu and the Quick Open Class... and Quick Open Method entries in the Tools menu used by the Quick Open project plugin. + kdevquickopen/ — provides the Quick Open File.. entry in the File menu and the Quick Open Class... and Quick Open Method entries in the Tools menu used by the Quick Open project plugin. - tdevregexptest/ — provides the Debug Regular Expression... entry in the Tools menu used by the Regular Expression Tester plugin. + kdevregexptest/ — provides the Debug Regular Expression... entry in the Tools menu used by the Regular Expression Tester plugin. - tdevreplace/ — provides the Find-Select-Replace... entry in the Edit menu used by the Replace Part plugin. + kdevreplace/ — provides the Find-Select-Replace... entry in the Edit menu used by the Replace Part plugin. - tdevtipofday/ —provides the Tip of the Day entry in the Help menu. The HTML-File containing the available tips is provided as a default configuration file only. + kdevtipofday/ —provides the Tip of the Day entry in the Help menu. The HTML-File containing the available tips is provided as a default configuration file only. - tdevtools/ — controls various menu entries ceated by Tools Menu and External Tools Menu settings provided by the Tools Menu Addition plugin. + kdevtools/ — controls various menu entries ceated by Tools Menu and External Tools Menu settings provided by the Tools Menu Addition plugin. - tdevvalgrind/ — provides the Valgrind Memory Leak Check and Profile with KCachegrind entries in the Debug menu used by the Valgrind Frontend plugin. + kdevvalgrind/ — provides the Valgrind Memory Leak Check and Profile with KCachegrind entries in the Debug menu used by the Valgrind Frontend plugin. @@ -348,35 +348,35 @@ In case the contents of these directories mirror those of the Default Configurat There are two groups of &tdevelop; configuration files in the $TDEHOME/share/config/ directory, distiguished by their surrounding character sequences: doc...pluginrc denotes files used by the documentation plugin. - tdev...rc denotes configuration files used by &tdevelop; itself and its available plugins. + kdev...rc denotes configuration files used by &tdevelop; itself and its available plugins. Configuration Files Used by &tdevelop; - tdevabbrevrc — holds the current state of the Abbreviations configuration provided by the Abbreviation Expansion plugin. + kdevabbrevrc — holds the current state of the Abbreviations configuration provided by the Abbreviation Expansion plugin. This only records whether the abbreviations will be used or not. The actual definitions of new abbreviations will go into the $TDEHOME/share/apps/kdevabbrev/templates/templates file. - tdevassistantrc — holds some configuration states specific of the stand-alone &tdevelop; Assistant documentation browser. + kdevassistantrc — holds some configuration states specific of the stand-alone &tdevelop; Assistant documentation browser. Most common configuration settings are shared with the &tdevelop; IDE tdeveloprc file. - tdevassistantuimode4rc — holds the current MDI configuration states (dock positions &etc;) of the stand-alone &tdevelop; Assistant documentation browser. + kdevassistantuimode4rc — holds the current MDI configuration states (dock positions &etc;) of the stand-alone &tdevelop; Assistant documentation browser. - tdevclassviewrc — holds the View Mode setting of the Classes class browser tab provided by the Class View project plugin. + kdevclassviewrc — holds the View Mode setting of the Classes class browser tab provided by the Class View project plugin. This is a global setting, although the Class View plugin may be disabled on a per project basis. Any change in this setting will be globally updated whenever the current project is closed and thus affect all subsequently loaded projects. - tdevcppsupportrc — holds some settings used to set up CPP source files. In particular you will find the settings made on the C++ Class Generator configuration dialog in here. - tdevdocumentationrc — holds actual settings the Documentation plugin uses. + kdevcppsupportrc — holds some settings used to set up CPP source files. In particular you will find the settings made on the C++ Class Generator configuration dialog in here. + kdevdocumentationrc — holds actual settings the Documentation plugin uses. tdeveloprc — holds the global settings the &tdevelop; IDE and the &tdevelop; Assistant stand-alone documentation browser will use. tdevelopuimode4rc — holds the current MDI configuration states (dock positions &etc;) of the &tdevelop; IDE. - tdevfileselectorrc — holds actual settings the File Selector plugin uses. - tdevfileviewrc — holds the actual filename color settings the CVS Integration (Cervisia) project plugin uses for display. - tdevfilterrc — holds actual settings the Shell Filtering and Insertion plugin uses. - tdevgrepviewrc — holds actual settings the Grep Frontend plugin uses. - tdevsnippetrc — holds actual settings the Code Snippets plugin uses. - tdevtoolsrc — holds actual settings the Tools Menu Addition plugin uses. + kdevfileselectorrc — holds actual settings the File Selector plugin uses. + kdevfileviewrc — holds the actual filename color settings the CVS Integration (Cervisia) project plugin uses for display. + kdevfilterrc — holds actual settings the Shell Filtering and Insertion plugin uses. + kdevgrepviewrc — holds actual settings the Grep Frontend plugin uses. + kdevsnippetrc — holds actual settings the Code Snippets plugin uses. + kdevtoolsrc — holds actual settings the Tools Menu Addition plugin uses. @@ -385,7 +385,7 @@ There are two groups of &tdevelop; configuration files in the the Filter plugin. +the Filter plugin. @@ -1840,10 +1840,10 @@ Configure Editor... Settings -Configure TDevelop... +Configure KDevelop... -Configure TDevelop... +Configure KDevelop... @@ -1866,7 +1866,7 @@ Configure TDevelop... Help -TDevelop Handbook +KDevelop Handbook View this document. @@ -1960,10 +1960,10 @@ Info Page... Help -About TDevelop... +About KDevelop... Display some brief information about -TDevelop's version number, authors and license agreement. +KDevelop's version number, authors and license agreement. diff --git a/doc/tdevelop/getting-started.docbook b/doc/tdevelop/getting-started.docbook index 39d7c4de..a805f393 100644 --- a/doc/tdevelop/getting-started.docbook +++ b/doc/tdevelop/getting-started.docbook @@ -77,7 +77,7 @@ already did switch to another user interface mode some items may not be there as described or will behave slightly different. If in doubt which user interface mode your &tdevelop; currently uses, check with the Settings Configure -TDevelop... User Interface +KDevelop... User Interface dialog. @@ -416,7 +416,7 @@ and plugged-in tools to extend the basic &IDE; capabilities. The The upper set of Tools menu entries will be provided by the editor plugin which is in use. You may select your favorite editor via Settings Configure -TDevelop... Editor. Once an +KDevelop... Editor. Once an editable document file is selected, the upper part of the Tools menu will provide advanced editing commands specific to the editor part in use. @@ -452,10 +452,10 @@ Also, you can configure shortcuts, toolbars, notifications, the editor and Help -Here you can open this TDevelop manual, look up terms in various +Here you can open this KDevelop manual, look up terms in various documentation files, open man pages (the traditional UNIX manual format) and info pages (the GNU manual format). Furthermore you can report bugs here or get -some info about your current TDevelop version and its authors. +some info about your current KDevelop version and its authors. @@ -497,7 +497,7 @@ different main purpose. actual work. More tools to work on that project will be available then. The actual number of tool views depends on the Plugin Tools being currently available to &tdevelop;. You will find more on this -topic in the Configuring TDevelop chapter. +topic in the Configuring KDevelop chapter. Currently, with no project open and the default number of plugin tools loaded, you will find the following tool views. Clicking on a tab will open @@ -627,7 +627,7 @@ adjusted. If you want to know more about &tdevelop; configuration, have a look at -the Configuring TDevelop chapter. +the Configuring KDevelop chapter. @@ -635,8 +635,8 @@ the Configuring TDevelop chapter. To configure &tdevelop;, click the Settings menu and select -Configure TDevelop.... The -Configure TDevelop dialog will pop up, showing the +Configure KDevelop.... The +Configure KDevelop dialog will pop up, showing the following General settings page to the right. @@ -770,7 +770,7 @@ mandatory that the KDELibs Apidocs were present when perform the identifier lookup examples later in this chapter, make sure that this documentation exists and is accessible to &tdevelop;. See Installing -TDevelop fore more detail. +KDevelop fore more detail. @@ -1127,7 +1127,7 @@ and hello.kdevses. Of particular importance in each project is the xxx.tdevelop (where xxx denotes the project -name) file. It is the main TDevelop 3 Project File and +name) file. It is the main KDevelop 3 Project File and needed if you later want load this project into the &IDE;. @@ -1789,7 +1789,7 @@ this behavior. Select Settings Configure -TDevelop... +KDevelop... In the left hand icon bar on the dialog popup click the User diff --git a/doc/tdevelop/index.docbook b/doc/tdevelop/index.docbook index 9e83802d..d412dc35 100644 --- a/doc/tdevelop/index.docbook +++ b/doc/tdevelop/index.docbook @@ -76,7 +76,7 @@ Entries which require special treatment are marked with comments starting with ' - &tdevelop; Handbook + &tdevelop; User Manual 2006-06-19 &kdevrelease; diff --git a/doc/tdevelop/kdevdesigner.png b/doc/tdevelop/kdevdesigner.png new file mode 100644 index 00000000..4fa74c68 Binary files /dev/null and b/doc/tdevelop/kdevdesigner.png differ diff --git a/doc/tdevelop/nutshell.docbook b/doc/tdevelop/nutshell.docbook index 93db1506..ca0a4276 100644 --- a/doc/tdevelop/nutshell.docbook +++ b/doc/tdevelop/nutshell.docbook @@ -37,7 +37,7 @@ smaller tool view tabs in IDEAl Mode By default &tdevelop; starts with large text-based tool tip tabs around the work area. You may change this look to ⪚ save space in the &tdevelop; configuration dialog (Settings -Configure TDevelop... User +Configure KDevelop... User Interface). If you use an older &tdevelop; 3 version, this configuration dialog may not be available. To change the toolview tabs display manually, place a diff --git a/doc/tdevelop/plugin-tools.docbook b/doc/tdevelop/plugin-tools.docbook index 174767e2..ad10fb16 100644 --- a/doc/tdevelop/plugin-tools.docbook +++ b/doc/tdevelop/plugin-tools.docbook @@ -14,11 +14,11 @@ For example, in the file menu there is a Quick Open feature, but only if it's enabled in the Project - Project Options dialog. -Technically, plugins are based on the TDevPlugin class defined in +Technically, plugins are based on the KDevPlugin class defined in lib/interfaces/kdevplugin.h. The following is taken from a comment from there. -TDevPlugin is the base class for all TDevelop plugins. +KDevPlugin is the base class for all TDevelop plugins. A plugin is a component which is loaded into TDevelop shell at startup or by request. A plugin has a scope that can be either: @@ -32,7 +32,7 @@ A plugin has a scope that can be either: are not selectable by user in plugin configuration pages. Global plugins are plugins which require only shell to be loaded and do not operate on -TDevProject interface and/or do not use project wide information. +KDevProject interface and/or do not use project wide information. For example, the uimode plugin allows a developer to select which user interface they wish to use. @@ -43,13 +43,13 @@ The Automake Manager, for example, only needs to be active when an Automake base As stated above, core plugins cannot be disabled. Global plugins can be enabled/disabled in Settings -Configure TDevelop... +Configure KDevelop... under Plugins. Project plugins can be enabled/disabled in Project Project Options... under Plugins. -Active plugins can have many effects on TDevelop. +Active plugins can have many effects on KDevelop. Depending on their function, they may add extra menus, extra menu items, extra tool buttons, etc. @@ -67,13 +67,13 @@ it is because the plugin authors made them this way. Scope: Core - + Application Wizard Application Wizard - + Difference Viewer Difference Viewer - + FileCreate FileCreate @@ -85,7 +85,7 @@ it is because the plugin authors made them this way. User-Interface Selection Provides a dialog for UI-mode selection. - + VCSManager Version Control System Manager @@ -95,13 +95,13 @@ it is because the plugin authors made them this way. Abbreviation Expansion Provides support for customizable abbreviations - short words which expand into commonly needed code structures. - + Documentation The Documentation plugin offers browsing and searching in local and online documentation with support for multiple documentation systems. FileList Provides a list of all currently open files. (Handy when the tab bar is not quite wide enough.) - + File Selector Powerful network transparent file browser utility. @@ -109,14 +109,14 @@ it is because the plugin authors made them this way. Provides a way of manipulating editor text using commandline tools. Appears in the Tools menu. Grep Frontend -Integrates "find|grep" in TDevelop - allows fast searching of multiple files using patterns or regular expressions. +Integrates "find|grep" in KDevelop - allows fast searching of multiple files using patterns or regular expressions. Embedded Konsole -This plugin gives TDevelop an embedded konsole for quick and easy command line access. +This plugin gives KDevelop an embedded konsole for quick and easy command line access. "Open with" Menu Addon -This plugin provides additional "open" alternatives for various context menus in TDevelop. - +This plugin provides additional "open" alternatives for various context menus in KDevelop. + Part Explorer Tool A Graphical tool for performing TDETrader-like queries about registered services @@ -127,7 +127,7 @@ it is because the plugin authors made them this way. This plugin is an interactive projectwide "Search and Replace" tool. Search using string or regexp matching, and select the replacements to be made from a preview before the action is finalized. When loaded it appears in the Edit menu. Scripting -The Scripting plugin offers KScript based scripting of the TDevelop application +The Scripting plugin offers KScript based scripting of the KDevelop application Code Snippets This plugin allows you to store code snippets and add them to your code @@ -242,13 +242,13 @@ templates than for &Java;. The set of code templates is configurable. If the plugin is enabled, you can see which ones are available in the Settings -Configure TDevelop... +Configure KDevelop... dialog under Abbreviations. - + The <command>filter</command> Plugin filter diff --git a/doc/tdevelop/project-advanced.docbook b/doc/tdevelop/project-advanced.docbook index 81c0e4a6..a87b1658 100644 --- a/doc/tdevelop/project-advanced.docbook +++ b/doc/tdevelop/project-advanced.docbook @@ -42,10 +42,10 @@ -Converting Old TDevelop Project Files +Converting Old KDevelop Project Files -&tdevelop; allows you to open old TDevelop 2.x project files and convert them to &tdevelop; files. To do so go to Open Project... and select TDevelop 2 project files in the Filter:. Then select project file you want to open. The project gets converted to &tdevelop; and saved as a &tdevelop; project file. +&tdevelop; allows you to open old KDevelop 2.x project files and convert them to &tdevelop; files. To do so go to Open Project... and select KDevelop 2 project files in the Filter:. Then select project file you want to open. The project gets converted to &tdevelop; and saved as a &tdevelop; project file. diff --git a/doc/tdevelop/setup.docbook b/doc/tdevelop/setup.docbook index 2c448945..0c078a3b 100644 --- a/doc/tdevelop/setup.docbook +++ b/doc/tdevelop/setup.docbook @@ -271,14 +271,14 @@ This let you choose the way you want .ui files to be displa This uses &tdevelop; own designer embedded within &tdevelop; Run &tdevelop;'s designer as a separate application - The TDevDesigner application will be run separately in its own window. + The KDevDesigner application will be run separately in its own window. - + - TDevDesigner in its own window + KDevDesigner in its own window @@ -294,7 +294,7 @@ Run Qt Designer Terminal Emulation -You choose here which terminal you want to be integrated within TDevelop. +You choose here which terminal you want to be integrated within KDevelop. @@ -349,7 +349,7 @@ A typical example of this user interface mode is Borland Delphi 6.0. -To switch the user interface mode select Settings Configure &tdevelop;... from the menus. The Customize TDevelop dialog will pop up, where you have to select User Interface in the left hand tree. This will display the following settings dialog to the right. +To switch the user interface mode select Settings Configure &tdevelop;... from the menus. The Customize KDevelop dialog will pop up, where you have to select User Interface in the left hand tree. This will display the following settings dialog to the right. @@ -524,7 +524,7 @@ The active toolview window must be shown fixed (non-overlap mode), sharing the w Selecting an Editor -&tdevelop; allows you to select your favorite text editor tool. Mark the Editor entry in the left hand side selections tree of the Configure TDevelop window. The following dialog will be displayed to the right. +&tdevelop; allows you to select your favorite text editor tool. Mark the Editor entry in the left hand side selections tree of the Configure KDevelop window. The following dialog will be displayed to the right. @@ -568,7 +568,7 @@ Changing the editor will not effect already open files. There are two possibilit -TDevelop lets you use editor interfaces which have registered with &kde; and that provide a KatePart interface. If you miss one one of the selections shown above check your &kde; installation if the corresponding KPart was correctly installed. +KDevelop lets you use editor interfaces which have registered with &kde; and that provide a KatePart interface. If you miss one one of the selections shown above check your &kde; installation if the corresponding KPart was correctly installed. What to do if the file has been changed externally: @@ -663,7 +663,7 @@ The reformat source feature is currently available for C, C++, and &Java; only. -To set up a specific format style, select Settings Configure &tdevelop;.. from the menubar. The Customize TDevelop dialog will pop up, where you have to select Source Formatter in the left hand tree. This will display a series of three settings dialog tabs to the right, namely a General Formatting Setup, a Indentation Style Setup, and a Other Formatting Setup. +To set up a specific format style, select Settings Configure &tdevelop;.. from the menubar. The Customize KDevelop dialog will pop up, where you have to select Source Formatter in the left hand tree. This will display a series of three settings dialog tabs to the right, namely a General Formatting Setup, a Indentation Style Setup, and a Other Formatting Setup. @@ -997,7 +997,7 @@ split a long line apart. For C/C++ code this can be controlled here. Setting Up the Code Snippets Tool -When editing in &tdevelop; you can store often used parts of code as Code Snippets. To configure the capabilities of the code snippets part select Settings Configure &tdevelop;.. from the menubar. The Customize TDevelop dialog will pop up, where you have to select Code Snippets in the left hand tree. This will show the following dialog in the right hand side. +When editing in &tdevelop; you can store often used parts of code as Code Snippets. To configure the capabilities of the code snippets part select Settings Configure &tdevelop;.. from the menubar. The Customize KDevelop dialog will pop up, where you have to select Code Snippets in the left hand tree. This will show the following dialog in the right hand side. @@ -1089,7 +1089,7 @@ system. The behaviour of the File Selector can be highly configured. Select Settings Configure &tdevelop;.. from the -menubar. The Customize TDevelop dialog will pop up, +menubar. The Customize KDevelop dialog will pop up, where you have to select File Selector in the left hand tree. This will show the following dialog in the right hand side. @@ -1330,7 +1330,7 @@ If &tdevelop; was automatically restarted by the &kde; session manager the chang -You may set up contents and behaviour of the various parts of this documentation window if you select Settings Configure &tdevelop;.. from the menubar. The Customize TDevelop dialog will pop up, where you have to select Documentation in the left hand window. +You may set up contents and behaviour of the various parts of this documentation window if you select Settings Configure &tdevelop;.. from the menubar. The Customize KDevelop dialog will pop up, where you have to select Documentation in the left hand window. @@ -1662,10 +1662,10 @@ You must put the &API; of your current project into this Doxygen Docum -Handling Structured Documentation (TDevelopTOC Files) +Handling Structured Documentation (KDevelopTOC Files) -The main bulk of the &tdevelop; documentation facility provides immediate access to structured documentation, local as well as remote ones. You can configure this on the TDevelopTOC Documentation Collection page. +The main bulk of the &tdevelop; documentation facility provides immediate access to structured documentation, local as well as remote ones. You can configure this on the KDevelopTOC Documentation Collection page. @@ -1674,17 +1674,17 @@ The main bulk of the &tdevelop; documentation facility provides immediate access - Providing TDevelopTOC structured documentation access + Providing KDevelopTOC structured documentation access -&tdevelop; comes with a bunch of predefined TDevelopTOC files which are automatically entered in the table at installation time. To keep the display manageable only the most often used will initially be marked for display. If you want to see another documentation, mark the TOC check box in the setup table. +&tdevelop; comes with a bunch of predefined KDevelopTOC files which are automatically entered in the table at installation time. To keep the display manageable only the most often used will initially be marked for display. If you want to see another documentation, mark the TOC check box in the setup table. -TDevelopTOC files cannot be indexed to perform a full text search because they usually point to a remote location. On the other hand, such a .toc file can have an index manually defined, using the <index> tag. Thus the Index check box will be enabled ony when &tdevelop; finds an <index> tag in the .toc file. (For more detail see the description below in the &tdevelop; TOC Files section.) +KDevelopTOC files cannot be indexed to perform a full text search because they usually point to a remote location. On the other hand, such a .toc file can have an index manually defined, using the <index> tag. Thus the Index check box will be enabled ony when &tdevelop; finds an <index> tag in the .toc file. (For more detail see the description below in the &tdevelop; TOC Files section.) The Search check box in the setup table will alway be disabled. @@ -1720,7 +1720,7 @@ Such structured access is made possible through the use of special table Standard Directory of &tdevelop; TOC Files -When &tdevelop; was installed usually a series of predefined .toc files has been put into the $TDEDIR/share/apps/tdevdocumentation/tocs directory. These are fairly simple, structured text files. You may look at them using a text editor or other text display facility. +When &tdevelop; was installed usually a series of predefined .toc files has been put into the $TDEDIR/share/apps/kdevdocumentation/tocs directory. These are fairly simple, structured text files. You may look at them using a text editor or other text display facility. diff --git a/doc/tdevelop/survey-manual.docbook b/doc/tdevelop/survey-manual.docbook index 93c1fd63..0bd59c8d 100644 --- a/doc/tdevelop/survey-manual.docbook +++ b/doc/tdevelop/survey-manual.docbook @@ -198,7 +198,7 @@ necessary and why you need an &IDE;. --> -TDevelop User Interface Mode Examples +KDevelop User Interface Mode Examples Shows user interface modes. diff --git a/doc/tdevelop/tdevdesigner.png b/doc/tdevelop/tdevdesigner.png deleted file mode 100644 index 4fa74c68..00000000 Binary files a/doc/tdevelop/tdevdesigner.png and /dev/null differ diff --git a/doc/tdevelop/tdevelop-install.docbook b/doc/tdevelop/tdevelop-install.docbook index 663d9d08..14f7236b 100644 --- a/doc/tdevelop/tdevelop-install.docbook +++ b/doc/tdevelop/tdevelop-install.docbook @@ -699,7 +699,7 @@ The tdebuildsycoca command does not run from within the root. API is the short form of Application Program Interface. Actually such an API cotains a series of descriptions (&ie; calling conventions) by which an application program can access the operating system and other services. In our context, however, a broader definition was adopted. The API of a &kde; or &Qt; application is an abstract of the classes and methods interfaces, a synopsis to be used like a dictionary to navigate the sources. -There is a version of the most current API available at the TDevelop-Home website. It will be automatically updated every 24 hours so you can keep up. +There is a version of the most current API available at the KDevelop-Home website. It will be automatically updated every 24 hours so you can keep up. Alas, this version is best used read-only over the internet. If you do not always have internet access you may as well build your own API documentation from the &tdevelop; sources. To do so, you must tell the automake system where to find the KDELIBS API in your system. This is accomplished by the special option in the configure command when you prepare to compile the &tdevelop; sources: diff --git a/doc/tdevelop/tdevelop-scripting.docbook b/doc/tdevelop/tdevelop-scripting.docbook index 1cb8a294..1b722f2d 100644 --- a/doc/tdevelop/tdevelop-scripting.docbook +++ b/doc/tdevelop/tdevelop-scripting.docbook @@ -7,12 +7,12 @@ -Using Scripts in TDevelop +Using Scripts in KDevelop Running Scripts - To access a script that is available to &tdevelop; use the ToolsScripts menu. If there there is no such menu item then there are no installed scripts available to TDevelop. + To access a script that is available to &tdevelop; use the ToolsScripts menu. If there there is no such menu item then there are no installed scripts available to KDevelop. diff --git a/doc/tdevelop/tdevelop-survey.docbook b/doc/tdevelop/tdevelop-survey.docbook index 7aca28a9..0f117958 100644 --- a/doc/tdevelop/tdevelop-survey.docbook +++ b/doc/tdevelop/tdevelop-survey.docbook @@ -145,7 +145,7 @@ switch UI modes -To switch the user interface mode select Settings Configure TDevelop... from the menus. The Customize TDevelop dialog will pop up, where you have to select User Interface in the left hand tree. This will display the settings page shown below. +To switch the user interface mode select Settings Configure KDevelop... from the menus. The Customize KDevelop dialog will pop up, where you have to select User Interface in the left hand tree. This will display the settings page shown below. diff --git a/editors/editor-chooser/CMakeLists.txt b/editors/editor-chooser/CMakeLists.txt index c3d37efb..90d6d070 100644 --- a/editors/editor-chooser/CMakeLists.txt +++ b/editors/editor-chooser/CMakeLists.txt @@ -24,12 +24,12 @@ link_directories( ##### other data ################################ -install( FILES tdeveditorchooser.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdeveditorchooser.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdeveditorchooser (module) ############# +##### libkdeveditorchooser (module) ############# -tde_add_kpart( libtdeveditorchooser AUTOMOC +tde_add_kpart( libkdeveditorchooser AUTOMOC SOURCES editorchooser_part.cpp editchooser.ui editorchooser_widget.cpp LINK tdevelop-shared diff --git a/editors/editor-chooser/Makefile.am b/editors/editor-chooser/Makefile.am index 7b12d2db..f95ca61c 100644 --- a/editors/editor-chooser/Makefile.am +++ b/editors/editor-chooser/Makefile.am @@ -1,13 +1,13 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdeveditorchooser.la -libtdeveditorchooser_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdeveditorchooser_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdeveditorchooser.la +libkdeveditorchooser_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdeveditorchooser_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdeveditorchooser_la_SOURCES = editorchooser_part.cpp editchooser.ui editorchooser_widget.cpp +libkdeveditorchooser_la_SOURCES = editorchooser_part.cpp editchooser.ui editorchooser_widget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdeveditorchooser.desktop +service_DATA = kdeveditorchooser.desktop diff --git a/editors/editor-chooser/editorchooser_part.cpp b/editors/editor-chooser/editorchooser_part.cpp index 33f9cb0e..a9a4339a 100644 --- a/editors/editor-chooser/editorchooser_part.cpp +++ b/editors/editor-chooser/editorchooser_part.cpp @@ -4,20 +4,20 @@ #include #include #include -#include +#include -#include -#include +#include +#include #include "editorchooser_part.h" #include "editorchooser_widget.h" -typedef TDevGenericFactory EditorChooserFactory; -static const TDevPluginInfo data("tdeveditorchooser"); -K_EXPORT_COMPONENT_FACTORY( libtdeveditorchooser, EditorChooserFactory( data ) ) +typedef KDevGenericFactory EditorChooserFactory; +static const KDevPluginInfo data("kdeveditorchooser"); +K_EXPORT_COMPONENT_FACTORY( libkdeveditorchooser, EditorChooserFactory( data ) ) EditorChooserPart::EditorChooserPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "EditorChooserPart") + : KDevPlugin(&data, parent, name ? name : "EditorChooserPart") { setInstance(EditorChooserFactory::instance()); diff --git a/editors/editor-chooser/editorchooser_part.h b/editors/editor-chooser/editorchooser_part.h index ab892677..d7a9dbd1 100644 --- a/editors/editor-chooser/editorchooser_part.h +++ b/editors/editor-chooser/editorchooser_part.h @@ -3,17 +3,17 @@ */ -#ifndef __TDEVPART_EDITORCHOOSER_H__ -#define __TDEVPART_EDITORCHOOSER_H__ +#ifndef __KDEVPART_EDITORCHOOSER_H__ +#define __KDEVPART_EDITORCHOOSER_H__ class KDialogBase; -#include +#include -class EditorChooserPart : public TDevPlugin +class EditorChooserPart : public KDevPlugin { Q_OBJECT diff --git a/editors/editor-chooser/kdeveditorchooser.desktop b/editors/editor-chooser/kdeveditorchooser.desktop new file mode 100644 index 00000000..94f06903 --- /dev/null +++ b/editors/editor-chooser/kdeveditorchooser.desktop @@ -0,0 +1,91 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a dialog for Editor selection. +Comment[ca]=Proporciona un diàleg per a la selecció de l'Editor. +Comment[da]=Sørger for en dialog til editor-valg. +Comment[de]=Editor-Auswahl für TDevelop. +Comment[el]=Παρέχει ένα διάλογο για επιλογή επεξεργαστή. +Comment[en_GB]=Provides a dialogue for Editor selection. +Comment[es]=Proporciona un diálogo para la selección de un editor. +Comment[et]=Dialoog redaktori valimiseks. +Comment[eu]=Editorearen hautapenerako elkarrizketa-koadroa eskeintzen du. +Comment[fa]=محاوره‌ای برای گزینش ویرایشگر فراهم می‌کند. +Comment[fr]=Fournit une boîte de dialogue pour la sélection de l'éditeur. +Comment[ga]=Soláthraíonn sé dialóg roghnaithe eagarthóra. +Comment[gl]=Proporciona un diálogo para a selección dun editor. +Comment[hi]=संपादक चयन के लिए एक संवाद उपलब्ध कराता है. +Comment[hu]=A szövegszerkesztő komponens kiválasztását teszi lehetővé. +Comment[is]=Útvegar samtalsglugga fyrir val á ritli +Comment[it]=Fornisce a una finestra per la selezione dell'editor. +Comment[ja]=エディタを選択するためのダイアログを提供します。 +Comment[ms]=Menyediakan dialog untuk pemilihan Penyunting. +Comment[nds]=Stellt en Dialoog för de Editor-Utwahl praat. +Comment[ne]=सम्पादन चयनका लागि संवाद प्रदान गर्दछ +Comment[nl]=Biedt een dialoog om een editor te kiezen. +Comment[pl]=Okno dialogowe do wyboru edytora. +Comment[pt]=Fornece um diálogo para a selecção de Editor. +Comment[pt_BR]=Provê um diálogo para seleção do Editor. +Comment[ru]=Предоставляет диалог выбора редактора. +Comment[sk]=Poskytuje dialógové okno pre voľbu editora. +Comment[sl]=Ponuja pogovorno okno za izbiro urejevalnika +Comment[sr]=Обезбеђује прозор за избор уређивача. +Comment[sr@Latn]=Obezbeđuje prozor za izbor uređivača. +Comment[sv]=Tillhandahåller en dialogruta för val av editor. +Comment[ta]=தொகுப்பாளர் தேர்விற்கான உரையாடலைத் தரும் +Comment[tg]=Ба ихтиёр гузоштани гуфтугӯи интихоби муҳаррир. +Comment[tr]=Düzenleyici seçimi için bir pencere sağlar +Comment[zh_CN]=提供编辑器选择对话框 +Comment[zh_TW]=提供對話框以編輯選擇。 +Name=KDevEditorChooser +Name[da]=TDevelop Editorvælger +Name[de]=Editor-Auswahl (TDevelop) +Name[hi]=के-डेव-एडिटर-चूसर +Name[nds]=TDevelop-Editorutwahl +Name[ne]=केडीई विकास सम्पादक छनोटकर्ता +Name[pl]=KDevWybórEdytora +Name[sk]=KDevEditorVolič +Name[sv]=TDevelop editorväljare +Name[ta]=கெடெவ் தொகுப்பாளர் தேர்வாளர் +Name[tg]=KDevМуҳаррирИнтихобкунанда +Name[zh_TW]=TDevelop 編輯器選擇器 +GenericName=Editor Selection +GenericName[ca]=Selecció de l'Editor +GenericName[da]=Editorvalg +GenericName[de]=Editor-Auswahl +GenericName[el]=Επιλογή επεξεργαστή +GenericName[es]=Selección de un editor +GenericName[et]=Redaktori valimine +GenericName[eu]=Editore-hautapena +GenericName[fa]=گزینش ویرایشگر +GenericName[fr]=Sélection de l'éditeur +GenericName[ga]=Roghnú Eagarthóra +GenericName[gl]=Selección de editor +GenericName[hi]=संपादक चयन +GenericName[hu]=Szerkesztőkomponens-választás +GenericName[it]=Selezione Editor +GenericName[ja]=エディタの選択 +GenericName[ms]=Pemilih Penyunting +GenericName[nds]=Editor-Utwahl +GenericName[ne]=सम्पादक चयन +GenericName[nl]=Editorkiezer +GenericName[pl]=Wybór edytora +GenericName[pt]=Selecção de Editor +GenericName[pt_BR]=Seleção de Editor +GenericName[ru]=Выбор редактора +GenericName[sk]=Voľba editora +GenericName[sl]=Izbira urejevalnika +GenericName[sr]=Избор уређивача +GenericName[sr@Latn]=Izbor uređivača +GenericName[sv]=Val av editor +GenericName[ta]=தொகுப்பாளர் தேர்வு +GenericName[tg]=Интихоби муҳаррир +GenericName[tr]=Düzenleyici Seçimi +GenericName[zh_CN]=编辑器选择 +GenericName[zh_TW]=編輯器選擇 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdeveditorchooser +X-TDevelop-Version=5 +X-TDevelop-Scope=Core +X-TDevelop-Properties=EditorChooser diff --git a/editors/editor-chooser/tdeveditorchooser.desktop b/editors/editor-chooser/tdeveditorchooser.desktop deleted file mode 100644 index f56f0416..00000000 --- a/editors/editor-chooser/tdeveditorchooser.desktop +++ /dev/null @@ -1,91 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a dialog for Editor selection. -Comment[ca]=Proporciona un diàleg per a la selecció de l'Editor. -Comment[da]=Sørger for en dialog til editor-valg. -Comment[de]=Editor-Auswahl für TDevelop. -Comment[el]=Παρέχει ένα διάλογο για επιλογή επεξεργαστή. -Comment[en_GB]=Provides a dialogue for Editor selection. -Comment[es]=Proporciona un diálogo para la selección de un editor. -Comment[et]=Dialoog redaktori valimiseks. -Comment[eu]=Editorearen hautapenerako elkarrizketa-koadroa eskeintzen du. -Comment[fa]=محاوره‌ای برای گزینش ویرایشگر فراهم می‌کند. -Comment[fr]=Fournit une boîte de dialogue pour la sélection de l'éditeur. -Comment[ga]=Soláthraíonn sé dialóg roghnaithe eagarthóra. -Comment[gl]=Proporciona un diálogo para a selección dun editor. -Comment[hi]=संपादक चयन के लिए एक संवाद उपलब्ध कराता है. -Comment[hu]=A szövegszerkesztő komponens kiválasztását teszi lehetővé. -Comment[is]=Útvegar samtalsglugga fyrir val á ritli -Comment[it]=Fornisce a una finestra per la selezione dell'editor. -Comment[ja]=エディタを選択するためのダイアログを提供します。 -Comment[ms]=Menyediakan dialog untuk pemilihan Penyunting. -Comment[nds]=Stellt en Dialoog för de Editor-Utwahl praat. -Comment[ne]=सम्पादन चयनका लागि संवाद प्रदान गर्दछ -Comment[nl]=Biedt een dialoog om een editor te kiezen. -Comment[pl]=Okno dialogowe do wyboru edytora. -Comment[pt]=Fornece um diálogo para a selecção de Editor. -Comment[pt_BR]=Provê um diálogo para seleção do Editor. -Comment[ru]=Предоставляет диалог выбора редактора. -Comment[sk]=Poskytuje dialógové okno pre voľbu editora. -Comment[sl]=Ponuja pogovorno okno za izbiro urejevalnika -Comment[sr]=Обезбеђује прозор за избор уређивача. -Comment[sr@Latn]=Obezbeđuje prozor za izbor uređivača. -Comment[sv]=Tillhandahåller en dialogruta för val av editor. -Comment[ta]=தொகுப்பாளர் தேர்விற்கான உரையாடலைத் தரும் -Comment[tg]=Ба ихтиёр гузоштани гуфтугӯи интихоби муҳаррир. -Comment[tr]=Düzenleyici seçimi için bir pencere sağlar -Comment[zh_CN]=提供编辑器选择对话框 -Comment[zh_TW]=提供對話框以編輯選擇。 -Name=TDevEditorChooser -Name[da]=TDevelop Editorvælger -Name[de]=Editor-Auswahl (TDevelop) -Name[hi]=के-डेव-एडिटर-चूसर -Name[nds]=TDevelop-Editorutwahl -Name[ne]=केडीई विकास सम्पादक छनोटकर्ता -Name[pl]=KDevWybórEdytora -Name[sk]=TDevEditorVolič -Name[sv]=TDevelop editorväljare -Name[ta]=கெடெவ் தொகுப்பாளர் தேர்வாளர் -Name[tg]=KDevМуҳаррирИнтихобкунанда -Name[zh_TW]=TDevelop 編輯器選擇器 -GenericName=Editor Selection -GenericName[ca]=Selecció de l'Editor -GenericName[da]=Editorvalg -GenericName[de]=Editor-Auswahl -GenericName[el]=Επιλογή επεξεργαστή -GenericName[es]=Selección de un editor -GenericName[et]=Redaktori valimine -GenericName[eu]=Editore-hautapena -GenericName[fa]=گزینش ویرایشگر -GenericName[fr]=Sélection de l'éditeur -GenericName[ga]=Roghnú Eagarthóra -GenericName[gl]=Selección de editor -GenericName[hi]=संपादक चयन -GenericName[hu]=Szerkesztőkomponens-választás -GenericName[it]=Selezione Editor -GenericName[ja]=エディタの選択 -GenericName[ms]=Pemilih Penyunting -GenericName[nds]=Editor-Utwahl -GenericName[ne]=सम्पादक चयन -GenericName[nl]=Editorkiezer -GenericName[pl]=Wybór edytora -GenericName[pt]=Selecção de Editor -GenericName[pt_BR]=Seleção de Editor -GenericName[ru]=Выбор редактора -GenericName[sk]=Voľba editora -GenericName[sl]=Izbira urejevalnika -GenericName[sr]=Избор уређивача -GenericName[sr@Latn]=Izbor uređivača -GenericName[sv]=Val av editor -GenericName[ta]=தொகுப்பாளர் தேர்வு -GenericName[tg]=Интихоби муҳаррир -GenericName[tr]=Düzenleyici Seçimi -GenericName[zh_CN]=编辑器选择 -GenericName[zh_TW]=編輯器選擇 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdeveditorchooser -X-TDevelop-Version=5 -X-TDevelop-Scope=Core -X-TDevelop-Properties=EditorChooser diff --git a/embedded/visualboyadvance/CMakeLists.txt b/embedded/visualboyadvance/CMakeLists.txt index cd281f67..be7cf42f 100644 --- a/embedded/visualboyadvance/CMakeLists.txt +++ b/embedded/visualboyadvance/CMakeLists.txt @@ -23,9 +23,9 @@ link_directories( ) -##### tdevvisualboyadvance (module) ############# +##### kdevvisualboyadvance (module) ############# -tde_add_kpart( libtdevvisualboyadvance AUTOMOC +tde_add_kpart( libkdevvisualboyadvance AUTOMOC SOURCES visualboyadvance_part.cpp vbaconfigwidgetbase.ui vbaconfigwidget.cpp LINK tdevelop-shared @@ -36,11 +36,11 @@ tde_add_kpart( libtdevvisualboyadvance AUTOMOC ##### other data ################################ install( - FILES tdevvisualboyadvance.desktop + FILES kdevvisualboyadvance.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) install( - FILES tdevpart_visualboyadvance.rc - DESTINATION ${DATA_INSTALL_DIR}/tdevvisualboyadvance + FILES kdevpart_visualboyadvance.rc + DESTINATION ${DATA_INSTALL_DIR}/kdevvisualboyadvance ) diff --git a/embedded/visualboyadvance/Makefile.am b/embedded/visualboyadvance/Makefile.am index 16fac82e..a866fd79 100644 --- a/embedded/visualboyadvance/Makefile.am +++ b/embedded/visualboyadvance/Makefile.am @@ -1,17 +1,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevvisualboyadvance.la -libtdevvisualboyadvance_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevvisualboyadvance_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevvisualboyadvance.la +libkdevvisualboyadvance_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevvisualboyadvance_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevvisualboyadvance_la_SOURCES = visualboyadvance_part.cpp vbaconfigwidgetbase.ui vbaconfigwidget.cpp +libkdevvisualboyadvance_la_SOURCES = visualboyadvance_part.cpp vbaconfigwidgetbase.ui vbaconfigwidget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevvisualboyadvance.desktop +service_DATA = kdevvisualboyadvance.desktop -rcdir = $(kde_datadir)/tdevvisualboyadvance -rc_DATA = tdevpart_visualboyadvance.rc +rcdir = $(kde_datadir)/kdevvisualboyadvance +rc_DATA = kdevpart_visualboyadvance.rc diff --git a/embedded/visualboyadvance/kdevpart_visualboyadvance.rc b/embedded/visualboyadvance/kdevpart_visualboyadvance.rc new file mode 100644 index 00000000..674cd41f --- /dev/null +++ b/embedded/visualboyadvance/kdevpart_visualboyadvance.rc @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/embedded/visualboyadvance/kdevvisualboyadvance.desktop b/embedded/visualboyadvance/kdevvisualboyadvance.desktop new file mode 100644 index 00000000..292fe6de --- /dev/null +++ b/embedded/visualboyadvance/kdevvisualboyadvance.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=VisualBoyAdvance is a GameBoyAdvance emulator. http://vboy.emuhq.com/ +Comment[ca]=VisualBoyAdvance és un emulador de GameBoyAdvance. http://vboy.emuhq.com/ +Comment[da]=VisualBoyAdvance er en GameBoyAdvance emulator. http://vboy.emuhq.com/ +Comment[de]=VisualBoy Advance ist ein Emulator für den GameBoy Advance (http://vboy.emuhq.com/) +Comment[el]=Το VisualBoyAdvance είναι ένας εξομοιωτής του GameBoyAdvance. http://vboy.emuhq.com/ +Comment[es]=VisualBoyAdvance es un emulador de GameBoyAdvance. http://vboy.emuhq.com/ +Comment[et]=VisualBoyAdvance on GameBoyAdvance emulaator. http://vboy.emuhq.com/ +Comment[eu]=VisualBoyAdvance GameBoyAdvance-en emulatzaile bat da. http://vboy.emuhq.com/ +Comment[fa]=VisualBoyAdvance یک مقلد GameBoyAdvanc است. http://vboy.emuhq.com/ +Comment[fr]=VisualBoyAdvance est un émulateur de GameBoyAdvance. http://vboy.emuhq.com/ +Comment[ga]=Is aithriseoir GameBoyAdvance é VisualBoyAdvance. Féach ar http://vboy.emuhq.com/ +Comment[gl]=VisualBoyAdvance é un emulador de GameBoyAdvance. http://vboy.emuhq.com/ +Comment[hi]=विज़ुअल-बॉय-एडवांस एक गेम-बॉय-एडवांस एमुलेटर है. http://vboy.emuhq.com/ +Comment[hu]=A VisualBoyAdvance egy emulátor a Game Boy Advance-hoz - http://vboy.emuhq.com/ +Comment[is]=VisualBoyAdvance er GameBoyAdvance hermir. http://vboy.emuhq.com/ +Comment[it]=VisualBoyAdvance è un emulatore per GameBoyAdvance. http://vboy.emuhq.com/ +Comment[ja]=VisualBoyAdvance は、ゲームボーイアドバンスエミュレータです。http://vboy.emuhq.com/ +Comment[ms]=VisualBoyAdvance adalah emulator GameBoyAdvance. http://vboy.emuhq.com/ +Comment[nds]=VisualBoy Advance is en GameBoy-Advance-Emulator (http://vboy.emuhq.com/) +Comment[ne]=VisualBoyAdvance एउटा GameBoyAdvance इमुलेटर हो । http://vboy.emuhq.com/ +Comment[nl]=VisualBoyAdvance is een GameBoyAdvance-emulator (http://vboy.emuhq.com/ +Comment[pl]=VisualBoyAdvance to emulator GameBoyAdvance. http://vboy.emuhq.com/ +Comment[pt]=O VisualBoyAdvance é um emulador do GameBoyAdvance. http://vboy.emuhq.com/ +Comment[pt_BR]=VisualBoyAdvance é um emulador do GameBoyAdvance. http://vboy.emuhq.com/ +Comment[ru]=VisualBoyAdvance - эмулятор GameBoyAdvance. http://vboy.emuhq.com/ +Comment[sk]=VisualBoyAdvance je emulátor GameBoyAdvance. http://vboy.emuhq.com/ +Comment[sl]=VisualBoyAdvance je emulator GameBoyAdvance. http://vboy.emuhq.com/ +Comment[sr]=VisualBoyAdvance je емулатор GameBoyAdvance-а. http://vboy.emuhq.com/ +Comment[sr@Latn]=VisualBoyAdvance je emulator GameBoyAdvance-a. http://vboy.emuhq.com/ +Comment[sv]=VisualBoyAdvance är en emulator för GameBoyAdvance. http://vboy.emuhq.com/ +Comment[ta]=கெடெவ் காட்சியாக்க பாய் அட்வான்ஸ் பொன்மி.. http://vboy.emuhq.com/ +Comment[tg]=VisualBoyAdvance-ин эмулятори GameBoyAdvance мебошад. http://vboy.emuhq.com/ +Comment[tr]=VisualBoyAdvance bir GameBoyAdvance emülatörüdür: http://vboy.emuhq.com/ +Comment[zh_CN]=VisualBoyAdvance 是 GameBoyAdvance 的模拟器。http://vboy.emuhq.com/ +Comment[zh_TW]=VisualBoyAdvance 是一個 GameBoyAdvance 模擬器。http://vboy.emuhq.com/ +Name=KDevVisualBoyAdvance +Name[da]=TDevelop VisualBoyAdvance +Name[de]=VisualBoy Advance (TDevelop) +Name[hi]=के-डेव-विज़ुअल-बॉय-एडवांस +Name[nds]=VisualBoy Advance för TDevelop +Name[sv]=TDevelop Visual Boy Advance +Name[ta]=கெடெவ் காட்சியாக்க பாய் அட்வான்ஸ் +Name[zh_TW]=TDevelop VisualBoyAdvance +GenericName=VisualBoyAdvance Support +GenericName[ca]=Suport per a VisualBoyAdvance +GenericName[da]=VisualBoyAdvance understøttelse +GenericName[de]=Unterstützung für VisualBoy Advance +GenericName[el]=Υποστήριξη VisualBoyAdvance +GenericName[es]=Soporte para VisualBoyAdvance +GenericName[et]=VisualBoyAdvance toetus +GenericName[eu]=VisualBoyAdvance euskarria +GenericName[fa]=پشتیبانی VisualBoyAdvance +GenericName[fr]=Prise en charge de VisualBoyAdvance +GenericName[ga]=Tacaíocht VisualBoyAdvance +GenericName[gl]=Soporte de VisualBoyAdvance +GenericName[hu]=VisualBoyAdvance-támogatás +GenericName[it]=Supporto per VisualBoyAdvance +GenericName[ja]=VisualBoyAdvance サポート +GenericName[ms]=Sokongan VisualBoyAdvance +GenericName[nds]=Unnerstütten för VisualBoy Advance +GenericName[ne]=VisualBoyAdvance समर्थन +GenericName[nl]=Ondersteuning voor VisualBoyAdvance +GenericName[pl]=Obsługa VisualBoyAdvance +GenericName[pt]=Suporte a VisualBoyAdvance +GenericName[pt_BR]=Suporte ao VisualBoyAdvance +GenericName[ru]=Поддержка VisualBoyAdvance +GenericName[sk]=VisualBoyAdvance podpora +GenericName[sl]=Podpora VisualBoyAdvance +GenericName[sr]=Подршка за VisualBoyAdvance +GenericName[sr@Latn]=Podrška za VisualBoyAdvance +GenericName[sv]=Stöd för Visual Boy Advance +GenericName[ta]=காட்சியாக்க பாய் அட்வான்ஸ் ஆதரவு +GenericName[tg]=Ёри намудан ба VisualBoyAdvance +GenericName[tr]=VisualBoyAdvance Desteği +GenericName[zh_CN]=VisualBoyAdvance 支持 +GenericName[zh_TW]=VisualBoyAdvance 支援 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevvisualboyadvance +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +Keywords=GBA +Keywords[hi]=जीबीए diff --git a/embedded/visualboyadvance/tdevpart_visualboyadvance.rc b/embedded/visualboyadvance/tdevpart_visualboyadvance.rc deleted file mode 100644 index 674cd41f..00000000 --- a/embedded/visualboyadvance/tdevpart_visualboyadvance.rc +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/embedded/visualboyadvance/tdevvisualboyadvance.desktop b/embedded/visualboyadvance/tdevvisualboyadvance.desktop deleted file mode 100644 index a50ec24f..00000000 --- a/embedded/visualboyadvance/tdevvisualboyadvance.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=VisualBoyAdvance is a GameBoyAdvance emulator. http://vboy.emuhq.com/ -Comment[ca]=VisualBoyAdvance és un emulador de GameBoyAdvance. http://vboy.emuhq.com/ -Comment[da]=VisualBoyAdvance er en GameBoyAdvance emulator. http://vboy.emuhq.com/ -Comment[de]=VisualBoy Advance ist ein Emulator für den GameBoy Advance (http://vboy.emuhq.com/) -Comment[el]=Το VisualBoyAdvance είναι ένας εξομοιωτής του GameBoyAdvance. http://vboy.emuhq.com/ -Comment[es]=VisualBoyAdvance es un emulador de GameBoyAdvance. http://vboy.emuhq.com/ -Comment[et]=VisualBoyAdvance on GameBoyAdvance emulaator. http://vboy.emuhq.com/ -Comment[eu]=VisualBoyAdvance GameBoyAdvance-en emulatzaile bat da. http://vboy.emuhq.com/ -Comment[fa]=VisualBoyAdvance یک مقلد GameBoyAdvanc است. http://vboy.emuhq.com/ -Comment[fr]=VisualBoyAdvance est un émulateur de GameBoyAdvance. http://vboy.emuhq.com/ -Comment[ga]=Is aithriseoir GameBoyAdvance é VisualBoyAdvance. Féach ar http://vboy.emuhq.com/ -Comment[gl]=VisualBoyAdvance é un emulador de GameBoyAdvance. http://vboy.emuhq.com/ -Comment[hi]=विज़ुअल-बॉय-एडवांस एक गेम-बॉय-एडवांस एमुलेटर है. http://vboy.emuhq.com/ -Comment[hu]=A VisualBoyAdvance egy emulátor a Game Boy Advance-hoz - http://vboy.emuhq.com/ -Comment[is]=VisualBoyAdvance er GameBoyAdvance hermir. http://vboy.emuhq.com/ -Comment[it]=VisualBoyAdvance è un emulatore per GameBoyAdvance. http://vboy.emuhq.com/ -Comment[ja]=VisualBoyAdvance は、ゲームボーイアドバンスエミュレータです。http://vboy.emuhq.com/ -Comment[ms]=VisualBoyAdvance adalah emulator GameBoyAdvance. http://vboy.emuhq.com/ -Comment[nds]=VisualBoy Advance is en GameBoy-Advance-Emulator (http://vboy.emuhq.com/) -Comment[ne]=VisualBoyAdvance एउटा GameBoyAdvance इमुलेटर हो । http://vboy.emuhq.com/ -Comment[nl]=VisualBoyAdvance is een GameBoyAdvance-emulator (http://vboy.emuhq.com/ -Comment[pl]=VisualBoyAdvance to emulator GameBoyAdvance. http://vboy.emuhq.com/ -Comment[pt]=O VisualBoyAdvance é um emulador do GameBoyAdvance. http://vboy.emuhq.com/ -Comment[pt_BR]=VisualBoyAdvance é um emulador do GameBoyAdvance. http://vboy.emuhq.com/ -Comment[ru]=VisualBoyAdvance - эмулятор GameBoyAdvance. http://vboy.emuhq.com/ -Comment[sk]=VisualBoyAdvance je emulátor GameBoyAdvance. http://vboy.emuhq.com/ -Comment[sl]=VisualBoyAdvance je emulator GameBoyAdvance. http://vboy.emuhq.com/ -Comment[sr]=VisualBoyAdvance je емулатор GameBoyAdvance-а. http://vboy.emuhq.com/ -Comment[sr@Latn]=VisualBoyAdvance je emulator GameBoyAdvance-a. http://vboy.emuhq.com/ -Comment[sv]=VisualBoyAdvance är en emulator för GameBoyAdvance. http://vboy.emuhq.com/ -Comment[ta]=கெடெவ் காட்சியாக்க பாய் அட்வான்ஸ் பொன்மி.. http://vboy.emuhq.com/ -Comment[tg]=VisualBoyAdvance-ин эмулятори GameBoyAdvance мебошад. http://vboy.emuhq.com/ -Comment[tr]=VisualBoyAdvance bir GameBoyAdvance emülatörüdür: http://vboy.emuhq.com/ -Comment[zh_CN]=VisualBoyAdvance 是 GameBoyAdvance 的模拟器。http://vboy.emuhq.com/ -Comment[zh_TW]=VisualBoyAdvance 是一個 GameBoyAdvance 模擬器。http://vboy.emuhq.com/ -Name=KDevVisualBoyAdvance -Name[da]=TDevelop VisualBoyAdvance -Name[de]=VisualBoy Advance (TDevelop) -Name[hi]=के-डेव-विज़ुअल-बॉय-एडवांस -Name[nds]=VisualBoy Advance för TDevelop -Name[sv]=TDevelop Visual Boy Advance -Name[ta]=கெடெவ் காட்சியாக்க பாய் அட்வான்ஸ் -Name[zh_TW]=TDevelop VisualBoyAdvance -GenericName=VisualBoyAdvance Support -GenericName[ca]=Suport per a VisualBoyAdvance -GenericName[da]=VisualBoyAdvance understøttelse -GenericName[de]=Unterstützung für VisualBoy Advance -GenericName[el]=Υποστήριξη VisualBoyAdvance -GenericName[es]=Soporte para VisualBoyAdvance -GenericName[et]=VisualBoyAdvance toetus -GenericName[eu]=VisualBoyAdvance euskarria -GenericName[fa]=پشتیبانی VisualBoyAdvance -GenericName[fr]=Prise en charge de VisualBoyAdvance -GenericName[ga]=Tacaíocht VisualBoyAdvance -GenericName[gl]=Soporte de VisualBoyAdvance -GenericName[hu]=VisualBoyAdvance-támogatás -GenericName[it]=Supporto per VisualBoyAdvance -GenericName[ja]=VisualBoyAdvance サポート -GenericName[ms]=Sokongan VisualBoyAdvance -GenericName[nds]=Unnerstütten för VisualBoy Advance -GenericName[ne]=VisualBoyAdvance समर्थन -GenericName[nl]=Ondersteuning voor VisualBoyAdvance -GenericName[pl]=Obsługa VisualBoyAdvance -GenericName[pt]=Suporte a VisualBoyAdvance -GenericName[pt_BR]=Suporte ao VisualBoyAdvance -GenericName[ru]=Поддержка VisualBoyAdvance -GenericName[sk]=VisualBoyAdvance podpora -GenericName[sl]=Podpora VisualBoyAdvance -GenericName[sr]=Подршка за VisualBoyAdvance -GenericName[sr@Latn]=Podrška za VisualBoyAdvance -GenericName[sv]=Stöd för Visual Boy Advance -GenericName[ta]=காட்சியாக்க பாய் அட்வான்ஸ் ஆதரவு -GenericName[tg]=Ёри намудан ба VisualBoyAdvance -GenericName[tr]=VisualBoyAdvance Desteği -GenericName[zh_CN]=VisualBoyAdvance 支持 -GenericName[zh_TW]=VisualBoyAdvance 支援 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevvisualboyadvance -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -Keywords=GBA -Keywords[hi]=जीबीए diff --git a/embedded/visualboyadvance/visualboyadvance_part.cpp b/embedded/visualboyadvance/visualboyadvance_part.cpp index a3b842f4..873cd01d 100644 --- a/embedded/visualboyadvance/visualboyadvance_part.cpp +++ b/embedded/visualboyadvance/visualboyadvance_part.cpp @@ -4,30 +4,30 @@ #include #include -#include +#include #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevappfrontend.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevappfrontend.h" #include "domutil.h" -#include "tdevplugininfo.h" +#include "kdevplugininfo.h" #include "vbaconfigwidget.h" using namespace VisualBoyAdvance; -typedef TDevGenericFactory VisualBoyAdvanceFactory; -static const TDevPluginInfo data("tdevvisualboyadvance"); -K_EXPORT_COMPONENT_FACTORY( libtdevvisualboyadvance, VisualBoyAdvanceFactory( data ) ) +typedef KDevGenericFactory VisualBoyAdvanceFactory; +static const KDevPluginInfo data("kdevvisualboyadvance"); +K_EXPORT_COMPONENT_FACTORY( libkdevvisualboyadvance, VisualBoyAdvanceFactory( data ) ) VisualBoyAdvancePart::VisualBoyAdvancePart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name){ + : KDevPlugin(&data, parent, name){ setInstance(VisualBoyAdvanceFactory::instance()); - setXMLFile("tdevpart_visualboyadvance.rc"); + setXMLFile("kdevpart_visualboyadvance.rc"); TDEAction *action; action = new TDEAction( i18n("Execute Program"), "exec", Key_F9, @@ -44,7 +44,7 @@ VisualBoyAdvancePart::~VisualBoyAdvancePart() } void VisualBoyAdvancePart::slotExecute(){ - TDevProject* prj = project(); + KDevProject* prj = project(); TQDomDocument &doc = *projectDom(); TQString binary = DomUtil::readEntry(doc, "/kdevvisualadvance/binary"); TQString emulator = DomUtil::readEntry(doc, "/kdevvisualadvance/emulator"); @@ -62,7 +62,7 @@ void VisualBoyAdvancePart::slotExecute(){ program += prj->projectDirectory() + "/" + binary; - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, terminal); } diff --git a/embedded/visualboyadvance/visualboyadvance_part.h b/embedded/visualboyadvance/visualboyadvance_part.h index 17a2ade8..941e0ff2 100644 --- a/embedded/visualboyadvance/visualboyadvance_part.h +++ b/embedded/visualboyadvance/visualboyadvance_part.h @@ -3,15 +3,15 @@ */ -#ifndef __TDEVPART_VISUALBOYADVANCE_H__ -#define __TDEVPART_VISUALBOYADVANCE_H__ +#ifndef __KDEVPART_VISUALBOYADVANCE_H__ +#define __KDEVPART_VISUALBOYADVANCE_H__ #include -#include +#include #include namespace VisualBoyAdvance { - class VisualBoyAdvancePart : public TDevPlugin + class VisualBoyAdvancePart : public KDevPlugin { Q_OBJECT diff --git a/kdevassistant.desktop b/kdevassistant.desktop new file mode 100644 index 00000000..0e8192cf --- /dev/null +++ b/kdevassistant.desktop @@ -0,0 +1,73 @@ +[Desktop Entry] +Type=Application +Exec=kdevassistant %u +Icon=tdevelop +DocPath=tdevelop/index.html +Terminal=false +Name=TDevelop Assistant +Name[br]=Skoazeller TDevelop +Name[ca]=Assistent per a TDevelop +Name[cy]=Cymhorthwr TDevelop +Name[da]=TDevelop assistent +Name[de]=TDevelop-Assistent +Name[el]=Βοηθός TDevelop +Name[es]=Asistente de TDevelop +Name[et]=TDevelopi abiline +Name[eu]=TDevelop laguntzailea +Name[fa]=دستیار TDevelop +Name[fr]=Assistant de TDevelop +Name[it]=Assistente di TDevelop +Name[ja]=TDevelop アシスタント +Name[ms]=Pembantu TDevelop +Name[nds]=TDevelop-Hölper +Name[ne]=केडीई विकास सहायक +Name[nl]=TDevelop Assistent +Name[pl]=Asystent TDevelop +Name[pt]=Assistente do TDevelop +Name[pt_BR]=Assistente do TDevelop +Name[sk]=TDevelop asistent +Name[sl]=Pomočnik za TDevelop +Name[sr]=TDevelop-ов асистент +Name[sr@Latn]=TDevelop-ov asistent +Name[sv]=TDevelop assistent +Name[ta]=Kஉருவாக்கு உதவி +Name[tg]=TDevelop Ассистент +Name[zh_CN]=TDevelop 助手 +Name[zh_TW]=TDevelop 助理 +GenericName=Documentation Viewer +GenericName[br]=Gweler an teuliadur +GenericName[ca]=Visor de documentació +GenericName[da]=Dokumentationsfremviser +GenericName[de]=Dokumentationsbetrachter +GenericName[el]=Προβολέας τεκμηρίωσης +GenericName[es]=Visor de documentación +GenericName[et]=Dokumentatsiooninäitaja +GenericName[eu]=Documentazio ikustailea +GenericName[fa]=مشاهده‌گر مستندات +GenericName[fr]=Afficheur de documentation +GenericName[ga]=Amharcán Doiciméadithe +GenericName[gl]=Visor de documentación +GenericName[hu]=Dokumentációmegjelenítő +GenericName[it]=Visualizzatore documentazione +GenericName[ja]=ドキュメンテーションビューア +GenericName[ms]=Pelihat Dokumentasi +GenericName[nds]=Dokmentatschoonkieker +GenericName[ne]=मिलिसीकरण दृश्यकर्ता +GenericName[nl]=Documentatie Browser +GenericName[pa]=ਦਸਤਾਵੇਜ਼ ਦਰਸ਼ਕ +GenericName[pl]=Przeglądarka dokumentacji +GenericName[pt]=Visualizador de Documentação +GenericName[pt_BR]=Visualizador de Documentação +GenericName[ru]=Просмотр документации +GenericName[sk]=Prezerač dokumentácie +GenericName[sl]=Pregledovalnik dokumentacije +GenericName[sr]=Приказивач документације +GenericName[sr@Latn]=Prikazivač dokumentacije +GenericName[sv]=Dokumentationsvisning +GenericName[ta]=ஆவணமாக்கல் காட்சியமைப்பாளர் +GenericName[tg]=Аз назар бо ҳуҷҷатнок гузарондан +GenericName[tr]=Belge Gösterici +GenericName[zh_CN]=文档查看器 +GenericName[zh_TW]=文件檢視器 +X-DCOP-ServiceType=Multi +Categories=Qt;TDE;Development;Documentation;X-TDE-TDevelopIDE; diff --git a/kdevdesigner/AUTHORS b/kdevdesigner/AUTHORS new file mode 100644 index 00000000..40d295ec --- /dev/null +++ b/kdevdesigner/AUTHORS @@ -0,0 +1,4 @@ +KDevDesigner: Alexander Dymo +Qt Designer Copyright: (C) 2000-2003 Trolltech AS All Rights Reserved + + diff --git a/kdevdesigner/CMakeLists.txt b/kdevdesigner/CMakeLists.txt new file mode 100644 index 00000000..9584f4c7 --- /dev/null +++ b/kdevdesigner/CMakeLists.txt @@ -0,0 +1,15 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( shared ) +add_subdirectory( uilib ) +add_subdirectory( designer ) +add_subdirectory( src ) diff --git a/kdevdesigner/LICENSE.GPL b/kdevdesigner/LICENSE.GPL new file mode 100644 index 00000000..c13faf0d --- /dev/null +++ b/kdevdesigner/LICENSE.GPL @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program 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 program 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 + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/kdevdesigner/Makefile.am b/kdevdesigner/Makefile.am new file mode 100644 index 00000000..4cc5b44c --- /dev/null +++ b/kdevdesigner/Makefile.am @@ -0,0 +1,4 @@ +SUBDIRS = shared uilib designer src +#plugins + +EXTRA_DIST = COPYING configure.in.in diff --git a/kdevdesigner/NEWS b/kdevdesigner/NEWS new file mode 100644 index 00000000..0519ecba --- /dev/null +++ b/kdevdesigner/NEWS @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/kdevdesigner/README b/kdevdesigner/README new file mode 100644 index 00000000..99b55648 --- /dev/null +++ b/kdevdesigner/README @@ -0,0 +1,25 @@ +KDevDesigner is a port of Qt Designer (code taken from Qt 3.3 distribution) to KDE technologies: +1) XML GUI +2) KParts +3) KFileDialog +4) TDEIconLoader + +KDevDesigner consists of a part and a shell. +Part can be used in Konqueror and KDevelop to edit and view ui files and projects. +Shell loads a part with "in shell" argument so that the part can create projects and ui files. + +Other important notes: +KDevDesignerPart is Read/Write part which ignores readonly mode. +Designer Editor plugins are not loaded. +Available in system designer plugins are loaded if possible (tested with Qt 3.3 version). + +KDevDesignerPart integration: +KDevDesignerPart implements KInterfaceDesigner interface (defined in tdevelop/lib/external_interfaces). + +WARNING: +If you want to modify this code, try to introduce as few modifications to original Qt Designer code as possible. +Write your own classes and wrappers instead. The goal is to ease syncronization between the port and original Qt Designer. +Feel free to modify kdevdesigner_part.h(cpp) though. + +FUTURE: +Trolltech promises that Qt 4 will have easilly embeddable designer. If that happens, this port will be dropped for KDevelop 4. diff --git a/kdevdesigner/TODO b/kdevdesigner/TODO new file mode 100644 index 00000000..0519ecba --- /dev/null +++ b/kdevdesigner/TODO @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/kdevdesigner/designer/CMakeLists.txt b/kdevdesigner/designer/CMakeLists.txt new file mode 100644 index 00000000..4cdcea2b --- /dev/null +++ b/kdevdesigner/designer/CMakeLists.txt @@ -0,0 +1,107 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_definitions( -DDESIGNER -UQT_NO_ASCII_CAST ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/kdevdesigner/shared + ${CMAKE_SOURCE_DIR}/lib/interfaces/external + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES + kdevdesigner_part.desktop + DESTINATION ${SERVICES_INSTALL_DIR} ) + +install( FILES + kdevdesigner_part.rc kdevdesigner_part_sh.rc + DESTINATION ${DATA_INSTALL_DIR}/kdevdesignerpart ) + +add_subdirectory( pics ) + + +##### libkdevdesignerpart (module) ############## + +set( SRCS + about.ui dbconnection.ui gotolinedialog.ui + newform.ui actionlistview.cpp asciivalidator.cpp + command.cpp connectionitems.cpp connectiontable.cpp + customwidgeteditor.ui formsettings.ui + multilineeditor.ui customwidgeteditorimpl.cpp + database.cpp dbconnectioneditor.ui iconvieweditor.ui + paletteeditor.ui dbconnectionimpl.cpp dbconnectionsimpl.cpp + dbconnections.ui listboxeditor.ui paletteeditoradvanced.ui + defs.cpp designerapp.cpp designerappiface.cpp + editfunctionsimpl.cpp filechooser.cpp formfile.cpp + formsettingsimpl.cpp formwindow.cpp hierarchyview.cpp + iconvieweditorimpl.cpp layout.cpp listboxdnd.cpp + kdevdesigner_part.cpp actiondnd.cpp actioneditorimpl.cpp + listboxeditorimpl.cpp listboxrename.cpp listdnd.cpp + listeditor.ui pixmapcollectioneditor.ui listviewdnd.cpp + listvieweditorimpl.cpp mainwindow.cpp listvieweditor.ui + pixmapfunction.ui startdialog.ui mainwindowactions.cpp + menubareditor.cpp metadatabase.cpp multilineeditorimpl.cpp + newformimpl.cpp orderindicator.cpp myiconloader.cpp + outputwindow.cpp paletteeditoradvancedimpl.cpp + paletteeditorimpl.cpp pixmapchooser.cpp + pixmapcollection.cpp popupmenueditor.cpp previewframe.cpp + preferences.ui tableeditor.ui designeraction.cpp + previewwidget.ui variabledialog.ui actioneditor.ui + previewwidgetimpl.cpp project.cpp projectsettingsimpl.cpp + projectsettings.ui wizardeditor.ui configtoolboxdialog.ui + propertyeditor.cpp propertyobject.cpp qcompletionedit.cpp + replacedialog.ui connectiondialog.ui editfunctions.ui + resource.cpp sizehandle.cpp sourceeditor.cpp + richtextfontdialog.ui createtemplate.ui finddialog.ui + sourcefile.cpp startdialogimpl.cpp styledbutton.cpp + syntaxhighlighter_html.cpp tableeditorimpl.cpp + timestamp.cpp variabledialogimpl.cpp widgetaction.cpp + widgetfactory.cpp wizardeditorimpl.cpp workspace.cpp +) + +tde_moc( SRCS + actiondnd.h actioneditorimpl.h actionlistview.h + asciivalidator.h command.h connectionitems.h + connectiontable.h customwidgeteditorimpl.h database.h + dbconnectionimpl.h dbconnectionsimpl.h editfunctionsimpl.h + filechooser.h formfile.h formsettingsimpl.h + formwindow.h hierarchyview.h iconvieweditorimpl.h + layout.h listboxdnd.h listboxeditorimpl.h listboxrename.h + listdnd.h listviewdnd.h listvieweditorimpl.h mainwindow.h + menubareditor.h multilineeditorimpl.h newformimpl.h + orderindicator.h outputwindow.h paletteeditoradvancedimpl.h + paletteeditorimpl.h pixmapchooser.h popupmenueditor.h + previewframe.h previewwidgetimpl.h project.h + projectsettingsimpl.h propertyeditor.h qcompletionedit.h + sizehandle.h sourceeditor.h sourcefile.h startdialogimpl.h + styledbutton.h tableeditorimpl.h timestamp.h + variabledialogimpl.h widgetaction.h widgetfactory.h + wizardeditorimpl.h workspace.h + ) + + +tde_add_kpart( libkdevdesignerpart AUTOMOC + SOURCES ${SRCS} + LINK + kdevqui-static shared-static kinterfacedesigner-shared + tdeio-shared tdeparts-shared tqassistantclient + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/kdevdesigner/designer/Makefile.am b/kdevdesigner/designer/Makefile.am new file mode 100644 index 00000000..1857de19 --- /dev/null +++ b/kdevdesigner/designer/Makefile.am @@ -0,0 +1,21 @@ +SUBDIRS = pics + +AM_CXXFLAGS=-DDESIGNER +KDE_CXXFLAGS=-UQT_NO_ASCII_CAST +INCLUDES = -I$(top_srcdir)/kdevdesigner/shared \ + -I$(top_srcdir)/lib/interfaces/external $(all_includes) +METASOURCES = AUTO +kde_module_LTLIBRARIES = libkdevdesignerpart.la +libkdevdesignerpart_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) +libkdevdesignerpart_la_LIBADD = \ + $(top_builddir)/kdevdesigner/uilib/libkdevqui.la $(top_builddir)/kdevdesigner/shared/libshared.la \ + $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) -ltqassistantclient $(LIB_TDEFILE) $(LIB_TDEPARTS) +libkdevdesignerpart_la_SOURCES = kdevdesigner_part.cpp actiondnd.cpp actioneditorimpl.cpp actionlistview.cpp asciivalidator.cpp command.cpp connectionitems.cpp connectiontable.cpp customwidgeteditorimpl.cpp database.cpp dbconnectionimpl.cpp dbconnectionsimpl.cpp defs.cpp designerapp.cpp designerappiface.cpp editfunctionsimpl.cpp filechooser.cpp formfile.cpp formsettingsimpl.cpp formwindow.cpp hierarchyview.cpp iconvieweditorimpl.cpp layout.cpp listboxdnd.cpp listboxeditorimpl.cpp listboxrename.cpp listdnd.cpp listviewdnd.cpp listvieweditorimpl.cpp mainwindow.cpp mainwindowactions.cpp menubareditor.cpp metadatabase.cpp multilineeditorimpl.cpp newformimpl.cpp orderindicator.cpp outputwindow.cpp paletteeditoradvancedimpl.cpp paletteeditorimpl.cpp pixmapchooser.cpp pixmapcollection.cpp popupmenueditor.cpp previewframe.cpp previewwidgetimpl.cpp project.cpp projectsettingsimpl.cpp propertyeditor.cpp propertyobject.cpp qcompletionedit.cpp resource.cpp sizehandle.cpp sourceeditor.cpp sourcefile.cpp startdialogimpl.cpp styledbutton.cpp syntaxhighlighter_html.cpp tableeditorimpl.cpp timestamp.cpp variabledialogimpl.cpp widgetaction.cpp widgetfactory.cpp wizardeditorimpl.cpp workspace.cpp about.ui dbconnection.ui gotolinedialog.ui newform.ui previewwidget.ui variabledialog.ui actioneditor.ui dbconnectioneditor.ui iconvieweditor.ui paletteeditor.ui projectsettings.ui wizardeditor.ui configtoolboxdialog.ui dbconnections.ui listboxeditor.ui paletteeditoradvanced.ui replacedialog.ui connectiondialog.ui editfunctions.ui listeditor.ui pixmapcollectioneditor.ui richtextfontdialog.ui createtemplate.ui finddialog.ui listvieweditor.ui pixmapfunction.ui startdialog.ui customwidgeteditor.ui formsettings.ui multilineeditor.ui preferences.ui tableeditor.ui designeraction.cpp myiconloader.cpp +partrcdir = $(kde_datadir)/kdevdesignerpart +partdesktopdir = $(kde_servicesdir) +partdesktop_DATA = kdevdesigner_part.desktop +partrc_DATA = kdevdesigner_part.rc kdevdesigner_part_sh.rc +noinst_HEADERS = kdevdesigner_part.h designeraction.h myiconloader.h +picsdirdir = $(kde_datadir)/kdevdesignerpart/pics + +KDE_OPTIONS=nofinal diff --git a/kdevdesigner/designer/about.ui b/kdevdesigner/designer/about.ui new file mode 100644 index 00000000..48d53486 --- /dev/null +++ b/kdevdesigner/designer/about.ui @@ -0,0 +1,219 @@ + +AboutDialog +********************************************************************* +** Copyright (C) 2001-2003 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + AboutDialog + + + + 0 + 0 + 544 + 667 + + + + Qt Designer + + + + unnamed + + + 11 + + + 6 + + + + aboutPixmap + + + NoFrame + + + Plain + + + "designer_splash.png" + + + false + + + AlignCenter + + + + + + + aboutVersion + + + Version 3.2 + + + AlignCenter + + + + + + + aboutCopyright + + + Copyright (C) 2000-2003 Trolltech AS. All Rights Reserved. + + + AlignCenter + + + + + + + aboutLicense + + + + 1 + 0 + 0 + 0 + + + + <p>Qt Commercial Edition license holders: This program is licensed to you under the terms of the Qt Commercial License Agreement. For details, see the file LICENSE that came with this software distribution.</p><p></p><p>Qt Free Edition users: This program is licensed to you under the terms of the GNU General Public License Version 2. For details, see the file LICENSE.GPL that came with this software distribution.</p><p>The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.</p> + + + WordBreak|AlignVCenter|AlignLeft + + + + + + + Spacer3 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + Spacer2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + PushButton1 + + + &OK + + + true + + + true + + + + + Spacer1 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + + + + + PushButton1 + clicked() + AboutDialog + accept() + + + + myiconloader.h + +BarIcon2 + + + diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp new file mode 100644 index 00000000..33f0c4bf --- /dev/null +++ b/kdevdesigner/designer/actiondnd.cpp @@ -0,0 +1,728 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "actiondnd.h" +#include "command.h" +#include "defs.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "metadatabase.h" +#include "widgetfactory.h" +#include "hierarchyview.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +TQAction *ActionDrag::the_action = 0; + +ActionDrag::ActionDrag(TQAction *action, TQWidget *source) +: TQStoredDrag("application/x-designer-actions", source) +{ + Q_ASSERT(the_action == 0); + the_action = action; +} + +ActionDrag::ActionDrag(TQActionGroup *group, TQWidget *source) +: TQStoredDrag("application/x-designer-actiongroup", source) +{ + Q_ASSERT(the_action == 0); + the_action = group; +} + +ActionDrag::ActionDrag(const TQString &type, TQAction *action, TQWidget *source) +: TQStoredDrag(type, source) +{ + Q_ASSERT(the_action == 0); + the_action = action; +} + +bool ActionDrag::canDecode(TQDropEvent *e) +{ + return e->provides( "application/x-designer-actions" ) || + e->provides( "application/x-designer-actiongroup" ) || + e->provides( "application/x-designer-separator" ); +} + +ActionDrag::~ActionDrag() +{ + the_action = 0; +} + +void QDesignerAction::init() +{ + MetaDataBase::addEntry( this ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( this ) ); + WidgetFactory::saveDefaultProperties( this, id ); + WidgetFactory::saveChangedProperties( this, id ); +} + +void QDesignerActionGroup::init() +{ + MetaDataBase::addEntry( this ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( this ) ); + WidgetFactory::saveDefaultProperties( this, id ); + WidgetFactory::saveChangedProperties( this, id ); +} + +bool QDesignerAction::addTo( TQWidget *w ) +{ + if ( !widgetToInsert ) + return TQAction::addTo( w ); + + if ( ::tqqt_cast(w) ) + return FALSE; + + widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE ); + widgetToInsert->show(); + addedTo( widgetToInsert, w ); + return TRUE; +} + +bool QDesignerAction::removeFrom( TQWidget *w ) +{ + if ( !widgetToInsert ) + return TQAction::removeFrom( w ); + + remove(); + return TRUE; +} + +void QDesignerAction::remove() +{ + if ( !widgetToInsert ) + return; + MainWindow::self->formWindow()->selectWidget( TQT_TQOBJECT(widgetToInsert), FALSE ); + widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE ); +} + +QDesignerToolBarSeparator::QDesignerToolBarSeparator(Qt::Orientation o , TQToolBar *parent, + const char* name ) + : TQWidget( parent, name ) +{ + connect( parent, TQT_SIGNAL(orientationChanged(Qt::Orientation)), + this, TQT_SLOT(setOrientation(Qt::Orientation)) ); + setOrientation( o ); + setBackgroundMode( parent->backgroundMode() ); + setBackgroundOrigin( ParentOrigin ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); +} + +void QDesignerToolBarSeparator::setOrientation( Qt::Orientation o ) +{ + orient = o; +} + +void QDesignerToolBarSeparator::styleChange( TQStyle& ) +{ + setOrientation( orient ); +} + +TQSize QDesignerToolBarSeparator::sizeHint() const +{ + int extent = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, + this ); + if ( orient ==Qt::Horizontal ) + return TQSize( extent, 0 ); + else + return TQSize( 0, extent ); +} + +void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) +{ + TQPainter p( this ); + TQStyle::SFlags flags = TQStyle::Style_Default; + + if ( orientation() ==Qt::Horizontal ) + flags |= TQStyle::Style_Horizontal; + + style().tqdrawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(), + colorGroup(), flags ); +} + + + +QSeparatorAction::QSeparatorAction( TQObject *parent ) + : TQAction( parent, "qt_designer_separator" ), wid( 0 ) +{ +} + +bool QSeparatorAction::addTo( TQWidget *w ) +{ + if ( ::tqqt_cast(w) ) { + TQToolBar *tb = (TQToolBar*)w; + wid = new QDesignerToolBarSeparator( tb->orientation(), tb ); + return TRUE; + } else if ( ::tqqt_cast(w) ) { + idx = ( (TQPopupMenu*)w )->count(); + ( (TQPopupMenu*)w )->insertSeparator( idx ); + return TRUE; + } + return FALSE; +} + +bool QSeparatorAction::removeFrom( TQWidget *w ) +{ + if ( ::tqqt_cast(w) ) { + delete wid; + return TRUE; + } else if ( ::tqqt_cast(w) ) { + ( (TQPopupMenu*)w )->removeItemAt( idx ); + return TRUE; + } + return FALSE; +} + +TQWidget *QSeparatorAction::widget() const +{ + return wid; +} + + + +QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw ) + : TQToolBar( mw ), lastIndicatorPos( -1, -1 ) +{ + insertAnchor = 0; + afterAnchor = TRUE; + setAcceptDrops( TRUE ); + MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + lastIndicatorPos = TQPoint( -1, -1 ); + indicator = new QDesignerIndicatorWidget( this ); + indicator->hide(); + installEventFilter( this ); + widgetInserting = FALSE; + findFormWindow(); + mw->setDockEnabled( DockTornOff, FALSE ); +} + +QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock ) + : TQToolBar( TQString(), mw, dock), lastIndicatorPos( -1, -1 ) +{ + insertAnchor = 0; + afterAnchor = TRUE; + setAcceptDrops( TRUE ); + indicator = new QDesignerIndicatorWidget( this ); + indicator->hide(); + MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + installEventFilter( this ); + widgetInserting = FALSE; + findFormWindow(); + mw->setDockEnabled( DockTornOff, FALSE ); +} + +void QDesignerToolBar::findFormWindow() +{ + TQWidget *w = this; + while ( w ) { + formWindow = ::tqqt_cast(w); + if ( formWindow ) + break; + w = w->parentWidget(); + } +} + +void QDesignerToolBar::addAction( TQAction *a ) +{ + actionList.append( a ); + connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) ); + if ( ::tqqt_cast(a) ) { + ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); + actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); + } else if ( ::tqqt_cast(a) ) { + ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); + actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); + } else { + ( (QDesignerAction*)a )->widget()->installEventFilter( this ); + actionMap.insert( ( (QDesignerAction*)a )->widget(), a ); + } +} + +static void fixObject( TQObject *&o ) +{ + while ( o && o->parent() && !::tqqt_cast(o->parent()) ) + o = o->parent(); +} + +bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) +{ + if ( !o || !e || o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) || o->inherits( "TQDockWindowTitleBar" ) ) + return TQToolBar::eventFilter( o, e ); + + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::MouseButtonPress && + ( ( TQMouseEvent*)e )->button() == Qt::LeftButton ) { + mousePressEvent( (TQMouseEvent*)e ); + return TRUE; + } + + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) + return TQToolBar::eventFilter( o, e ); + + if ( e->type() == TQEvent::MouseButtonPress ) { + TQMouseEvent *ke = (TQMouseEvent*)e; + fixObject( o ); + if ( !o ) + return FALSE; + buttonMousePressEvent( ke, o ); + return TRUE; + } else if(e->type() == TQEvent::ContextMenu ) { + TQContextMenuEvent *ce = (TQContextMenuEvent*)e; + fixObject( o ); + if( !o ) + return FALSE; + buttonContextMenuEvent( ce, o ); + return TRUE; + } else if ( e->type() == TQEvent::MouseMove ) { + TQMouseEvent *ke = (TQMouseEvent*)e; + fixObject( o ); + if ( !o ) + return FALSE; + buttonMouseMoveEvent( ke, o ); + return TRUE; + } else if ( e->type() == TQEvent::MouseButtonRelease ) { + TQMouseEvent *ke = (TQMouseEvent*)e; + fixObject( o ); + if ( !o ) + return FALSE; + buttonMouseReleaseEvent( ke, o ); + return TRUE; + } else if ( e->type() == TQEvent::DragEnter ) { + TQDragEnterEvent *de = (TQDragEnterEvent*)e; + if (ActionDrag::canDecode(de)) + de->accept(); + } else if ( e->type() == TQEvent::DragMove ) { + TQDragMoveEvent *de = (TQDragMoveEvent*)e; + if (ActionDrag::canDecode(de)) + de->accept(); + } + + return TQToolBar::eventFilter( o, e ); +} + +void QDesignerToolBar::paintEvent( TQPaintEvent *e ) +{ + TQToolBar::paintEvent( e ); + if ( e->rect() != rect() ) + return; + lastIndicatorPos = TQPoint( -1, -1 ); +} + +void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) +{ + e->accept(); + TQPopupMenu menu( 0 ); + menu.insertItem( i18n( "Delete Toolbar" ), 1 ); + int res = menu.exec( e->globalPos() ); + if ( res != -1 ) { + RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n( "Delete Toolbar '%1'" ).arg( name() ), + formWindow, 0, this ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } +} + +void QDesignerToolBar::mousePressEvent( TQMouseEvent *e ) +{ + widgetInserting = FALSE; + if ( e->button() == Qt::LeftButton && + MainWindow::self->currentTool() != POINTER_TOOL && + MainWindow::self->currentTool() != ORDER_TOOL && + MainWindow::self->currentTool() != CONNECT_TOOL && + MainWindow::self->currentTool() != BUDDY_TOOL ) + widgetInserting = TRUE; +} + +void QDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e ) +{ + if ( widgetInserting ) + doInsertWidget( mapFromGlobal( e->globalPos() ) ); + widgetInserting = FALSE; +} + +void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) +{ + if ( widgetInserting ) + doInsertWidget( mapFromGlobal( e->globalPos() ) ); + else if ( w->isWidgetType() && formWindow->widgets()->find( w ) ) { + formWindow->clearSelection( FALSE ); + formWindow->selectWidget( w ); + } + widgetInserting = FALSE; +} + +void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ) +{ + e->accept(); + TQPopupMenu menu( 0 ); + const int ID_DELETE = 1; + const int ID_SEP = 2; + const int ID_DELTOOLBAR = 3; + TQMap::Iterator it = actionMap.find( (TQWidget*)o ); + if ( it != actionMap.end() && ::tqqt_cast(*it) ) + menu.insertItem( i18n( "Delete Separator" ), ID_DELETE ); + else + menu.insertItem( i18n( "Delete Item" ), ID_DELETE ); + menu.insertItem( i18n( "Insert Separator" ), ID_SEP ); + menu.insertSeparator(); + menu.insertItem( i18n( "Delete Toolbar" ), ID_DELTOOLBAR ); + int res = menu.exec( e->globalPos() ); + if ( res == ID_DELETE ) { + TQMap::Iterator it = actionMap.find( (TQWidget*)o ); + if ( it == actionMap.end() ) + return; + TQAction *a = *it; + int index = actionList.find( a ); + RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( + i18n( "Delete Action '%1' From Toolbar '%2'" ). + arg( a->name() ).arg( caption() ), + formWindow, a, this, index ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( res == ID_SEP ) { + calcIndicatorPos( mapFromGlobal( e->globalPos() ) ); + TQAction *a = new QSeparatorAction( 0 ); + int index = actionList.findRef( *actionMap.find( insertAnchor ) ); + if ( index != -1 && afterAnchor ) + ++index; + if ( !insertAnchor ) + index = 0; + + AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( + i18n( "Add Separator to Toolbar '%1'" ). + arg( a->name() ), + formWindow, a, this, index ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( res == ID_DELTOOLBAR ) { + RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n( "Delete Toolbar '%1'" ).arg( name() ), + formWindow, 0, this ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } +} + +void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) +{ + widgetInserting = FALSE; + + if ( e->button() == Qt::MidButton ) + return; + + if ( e->button() == Qt::LeftButton && + MainWindow::self->currentTool() != POINTER_TOOL && + MainWindow::self->currentTool() != ORDER_TOOL && + MainWindow::self->currentTool() != CONNECT_TOOL && + MainWindow::self->currentTool() != BUDDY_TOOL ) { + widgetInserting = TRUE; + return; + } + + dragStartPos = e->pos(); +} + +void QDesignerToolBar::removeWidget( TQWidget *w ) +{ + TQMap::Iterator it = actionMap.find( w ); + if ( it == actionMap.end() ) + return; + TQAction *a = *it; + int index = actionList.find( a ); + RemoveActionFromToolBarCommand *cmd = + new RemoveActionFromToolBarCommand( i18n( "Delete Action '%1' From Toolbar '%2'" ). + arg( a->name() ).arg( caption() ), + formWindow, a, this, index ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + TQApplication::sendPostedEvents(); + adjustSize(); +} + +void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) +{ + if ( widgetInserting || ( e->state() & Qt::LeftButton ) == 0 ) + return; + if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() ) + return; + TQMap::Iterator it = actionMap.find( (TQWidget*)o ); + if ( it == actionMap.end() ) + return; + TQAction *a = *it; + if ( !a ) + return; + int index = actionList.find( a ); + RemoveActionFromToolBarCommand *cmd = + new RemoveActionFromToolBarCommand( i18n( "Delete Action '%1' From Toolbar '%2'" ). + arg( a->name() ).arg( caption() ), + formWindow, a, this, index ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + TQApplication::sendPostedEvents(); + adjustSize(); + + TQString type = ::tqqt_cast(a) ? TQString( "application/x-designer-actiongroup" ) : + ::tqqt_cast(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); + TQStoredDrag *drag = new ActionDrag( type, a, this ); + drag->setPixmap( a->iconSet().pixmap() ); + if ( ::tqqt_cast(a) ) { + if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) ) + formWindow->selectWidget( ( TQT_TQOBJECT(( (QDesignerAction*)a )->widget())), FALSE ); + } + if ( !drag->drag() ) { + AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Action '%1' to Toolbar '%2'" ). + arg( a->name() ).arg( caption() ), + formWindow, a, this, index ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + lastIndicatorPos = TQPoint( -1, -1 ); + indicator->hide(); +} + +#ifndef TQT_NO_DRAGANDDROP + +void QDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e ) +{ + widgetInserting = FALSE; + lastIndicatorPos = TQPoint( -1, -1 ); + if (ActionDrag::canDecode(e)) + e->accept(); +} + +void QDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e ) +{ + if (ActionDrag::canDecode(e)) { + e->accept(); + drawIndicator( calcIndicatorPos( e->pos() ) ); + } +} + +void QDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * ) +{ + indicator->hide(); + insertAnchor = 0; + afterAnchor = TRUE; +} + +void QDesignerToolBar::dropEvent( TQDropEvent *e ) +{ + if (!ActionDrag::canDecode(e)) + return; + + e->accept(); + + indicator->hide(); + TQAction *a = 0; + int index = actionList.findRef( *actionMap.find( insertAnchor ) ); + if ( index != -1 && afterAnchor ) + ++index; + if ( !insertAnchor ) + index = 0; + if ( e->provides( "application/x-designer-actions" ) || + e->provides( "application/x-designer-separator" ) ) { + if ( e->provides( "application/x-designer-actions" ) ) + a = ::tqqt_cast(ActionDrag::action()); + else + a = ::tqqt_cast(ActionDrag::action()); + } else { + a = ::tqqt_cast(ActionDrag::action()); + } + + if ( actionList.findRef( a ) != -1 ) { + TQMessageBox::warning( MainWindow::self, i18n( "Insert/Move Action" ), + i18n( "Action '%1' has already been added to this toolbar.\n" + "An Action may only occur once in a given toolbar." ). + arg( a->name() ) ); + return; + } + + AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Action '%1' to Toolbar '%2'" ). + arg( a->name() ).arg( caption() ), + formWindow, a, this, index ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + + lastIndicatorPos = TQPoint( -1, -1 ); +} + +#endif + +void QDesignerToolBar::reInsert() +{ + TQAction *a = 0; + actionMap.clear(); + clear(); + for ( a = actionList.first(); a; a = actionList.next() ) { + a->addTo( this ); + if ( ::tqqt_cast(a) ) { + actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); + if ( ( (QDesignerActionGroup*)a )->widget() ) + ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); + } else if ( ::tqqt_cast(a) ) { + actionMap.insert( ( (QDesignerAction*)a )->widget(), a ); + ( (QDesignerAction*)a )->widget()->installEventFilter( this ); + } else if ( ::tqqt_cast(a) ) { + actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); + ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); + } + } + TQApplication::sendPostedEvents(); + adjustSize(); +} + +void QDesignerToolBar::actionRemoved() +{ + actionList.removeRef( (TQAction*)sender() ); +} + +TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) +{ + if ( orientation() ==Qt::Horizontal ) { + TQPoint pnt( width() - 2, 0 ); + insertAnchor = 0; + afterAnchor = TRUE; + TQObjectList clo = childrenListObject(); + if ( clo.isEmpty() ) + return pnt; + pnt = TQPoint( 13, 0 ); + TQObjectListIt it( clo ); + TQObject * obj; + while( (obj=it.current()) != 0 ) { + ++it; + if ( obj->isWidgetType() && + qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) { + TQWidget *w = (TQWidget*)obj; + if ( w->x() < pos.x() ) { + pnt.setX( w->x() + w->width() + 1 ); + insertAnchor = w; + afterAnchor = TRUE; + } + } + } + return pnt; + } else { + TQPoint pnt( 0, height() - 2 ); + insertAnchor = 0; + afterAnchor = TRUE; + TQObjectList clo = childrenListObject(); + if ( clo.isEmpty() ) + return pnt; + pnt = TQPoint( 0, 13 ); + TQObjectListIt it( clo ); + TQObject * obj; + while( (obj=it.current()) != 0 ) { + ++it; + if ( obj->isWidgetType() && + qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) { + TQWidget *w = (TQWidget*)obj; + if ( w->y() < pos.y() ) { + pnt.setY( w->y() + w->height() + 1 ); + insertAnchor = w; + afterAnchor = TRUE; + } + } + } + return pnt; + } +} + +void QDesignerToolBar::drawIndicator( const TQPoint &pos ) +{ + if ( lastIndicatorPos == pos ) + return; + bool wasVsisible = indicator->isVisible(); + if ( orientation() ==Qt::Horizontal ) { + indicator->resize( 3, height() ); + if ( pos != TQPoint( -1, -1 ) ) + indicator->move( pos.x() - 1, 0 ); + indicator->show(); + indicator->raise(); + lastIndicatorPos = pos; + } else { + indicator->resize( width(), 3 ); + if ( pos != TQPoint( -1, -1 ) ) + indicator->move( 0, pos.y() - 1 ); + indicator->show(); + indicator->raise(); + lastIndicatorPos = pos; + } + if ( !wasVsisible ) + TQApplication::sendPostedEvents(); +} + +void QDesignerToolBar::doInsertWidget( const TQPoint &p ) +{ + if ( formWindow != MainWindow::self->formWindow() ) + return; + calcIndicatorPos( p ); + TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, TRUE ); + installEventFilters( w ); + MainWindow::self->formWindow()->insertWidget( w, TRUE ); + QDesignerAction *a = new QDesignerAction( w, parent() ); + int index = actionList.findRef( *actionMap.find( insertAnchor ) ); + if ( index != -1 && afterAnchor ) + ++index; + if ( !insertAnchor ) + index = 0; + AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Widget '%1' to Toolbar '%2'" ). + arg( w->name() ).arg( caption() ), + formWindow, a, this, index ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + MainWindow::self->resetTool(); +} + +void QDesignerToolBar::clear() +{ + for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { + if ( ::tqqt_cast(a) ) + ( (QDesignerAction*)a )->remove(); + } + TQToolBar::clear(); +} + +void QDesignerToolBar::installEventFilters( TQWidget *w ) +{ + if ( !w ) + return; + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) + o->installEventFilter( this ); + delete l; +} + +//#include "actiondnd.moc" diff --git a/kdevdesigner/designer/actiondnd.h b/kdevdesigner/designer/actiondnd.h new file mode 100644 index 00000000..1e9f68b0 --- /dev/null +++ b/kdevdesigner/designer/actiondnd.h @@ -0,0 +1,254 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef ACTIONDND_H +#define ACTIONDND_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../shared/widgetdatabase.h" + +//class TQDesignerPopupMenu; +class QDesignerIndicatorWidget; +class FormWindow; +class TQPopupMenu; + +class QDesignerIndicatorWidget : public TQWidget +{ + Q_OBJECT + + +public: + QDesignerIndicatorWidget( TQWidget *p ) + : TQWidget( p, "qt_dockwidget_internal" ) { + setBackgroundColor( red ); + } + +}; + +class ActionDrag : public TQStoredDrag +{ + Q_OBJECT + + +public: + ActionDrag(const TQString &type, TQAction *action, TQWidget *source); + ActionDrag(TQAction *action, TQWidget *source); + ActionDrag(TQActionGroup *group, TQWidget *source); + + ~ActionDrag(); + + static bool canDecode(TQDropEvent *e); + + static TQAction *action() + { + return the_action; + } + +private: + static TQAction *the_action; +}; + +class QDesignerActionGroup : public TQActionGroup +{ + Q_OBJECT + + +public: + QDesignerActionGroup( TQObject *parent ) + : TQActionGroup( ::tqqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); } + + void init(); + + TQWidget *widget() const { return wid; } + TQWidget *widget( TQAction *a ) const { return *widgets.find( a ); } + int index() const { return idx; } + +protected: +#if !defined(TQ_NO_USING_KEYWORD) + using TQActionGroup::addedTo; +#endif + void addedTo( TQWidget *w, TQWidget * ) { + wid = w; + } + void addedTo( TQWidget *w, TQWidget *, TQAction *a ) { + widgets.insert( a, w ); + } + void addedTo( int index, TQPopupMenu * ) { + idx = index; + } + +private: + TQWidget *wid; + TQMap widgets; + int idx; + +}; + +class QDesignerAction : public TQAction +{ + Q_OBJECT + + +public: + QDesignerAction( TQObject *parent ) + : TQAction( ::tqqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); } + QDesignerAction( TQWidget *w, TQObject *parent ) + : TQAction( ::tqqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); } + + void init(); + + TQWidget *widget() const { return wid; } + int index() const { return idx; } + + bool addTo( TQWidget *w ); + bool removeFrom( TQWidget *w ); + + void remove(); + bool supportsMenu() const { return !widgetToInsert; } + +protected: + void addedTo( TQWidget *w, TQWidget * ) { + wid = w; + } + void addedTo( int index, TQPopupMenu * ) { + idx = index; + } + +private: + TQWidget *wid; + int idx; + TQWidget *widgetToInsert; + +}; + +class QDesignerToolBarSeparator : public TQWidget +{ + Q_OBJECT + + +public: + QDesignerToolBarSeparator( Qt::Orientation, TQToolBar *parent, const char* name=0 ); + + TQSize sizeHint() const; + Qt::Orientation orientation() const { return orient; } +public slots: + void setOrientation( Qt::Orientation ); +protected: + void styleChange( TQStyle& ); + void paintEvent( TQPaintEvent * ); +private: + Qt::Orientation orient; +}; + + +class QSeparatorAction : public TQAction +{ + Q_OBJECT + + +public: + QSeparatorAction( TQObject *parent ); + + bool addTo( TQWidget *w ); + bool removeFrom( TQWidget *w ); + TQWidget *widget() const; + int index() const; + +private: + TQWidget *wid; + int idx; + +}; + + +class QDesignerToolBar : public TQToolBar +{ + Q_OBJECT + + +public: + QDesignerToolBar( TQMainWindow *mw ); + QDesignerToolBar( TQMainWindow *mw, Dock dock ); + TQPtrList insertedActions() const { return actionList; } + void addAction( TQAction *a ); + + void clear(); + void installEventFilters( TQWidget *w ); + void insertAction( TQWidget *w, TQAction *a ) { actionMap.insert( w, a ); } + void insertAction( int index, TQAction *a ) { actionList.insert( index, a ); } + void appendAction( TQAction *a ) { actionList.append( a ); } + void removeAction( TQAction *a ) { actionList.remove( a ); } + void reInsert(); + void removeWidget( TQWidget *w ); + +protected: + bool eventFilter( TQObject *, TQEvent * ); + void paintEvent( TQPaintEvent * ); +#ifndef TQT_NO_DRAGANDDROP + void dragEnterEvent( TQDragEnterEvent * ); + void dragMoveEvent( TQDragMoveEvent * ); + void dragLeaveEvent( TQDragLeaveEvent * ); + void dropEvent( TQDropEvent * ); +#endif + void contextMenuEvent( TQContextMenuEvent *e ); + void mousePressEvent( TQMouseEvent *e ); + void mouseReleaseEvent( TQMouseEvent *e ); + +private slots: + void actionRemoved(); + +private: + void drawIndicator( const TQPoint &pos ); + TQPoint calcIndicatorPos( const TQPoint &pos ); + void buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ); + void buttonMousePressEvent( TQMouseEvent *e, TQObject *o ); + void buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ); + void buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *o ); + void doInsertWidget( const TQPoint &p ); + void findFormWindow(); + +private: + TQPoint lastIndicatorPos; + TQWidget *insertAnchor; + bool afterAnchor; + TQPtrList actionList; + TQMap actionMap; + TQPoint dragStartPos; + QDesignerIndicatorWidget *indicator; + bool widgetInserting; + FormWindow *formWindow; + +}; + +#endif diff --git a/kdevdesigner/designer/actioneditor.ui b/kdevdesigner/designer/actioneditor.ui new file mode 100644 index 00000000..13a56a04 --- /dev/null +++ b/kdevdesigner/designer/actioneditor.ui @@ -0,0 +1,227 @@ + +ActionEditorBase +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + ActionEditorBase + + + + 0 + 0 + 206 + 227 + + + + Edit Actions + + + + + + unnamed + + + 4 + + + 6 + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + buttonNewAction + + + + + + "designer_filenew.png" + + + true + + + Create new Action + + + + + buttonDeleteAction + + + + + + "designer_s_editcut.png" + + + true + + + Delete current Action + + + + + buttonConnect + + + + + + "designer_connecttool.png" + + + true + + + Connect current Action + + + + + Spacer1 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + + + listActions + + + + + + + ActionListView +
actionlistview.h
+ + 200 + 200 + + 0 + + 7 + 7 + 0 + 0 + + "image0" + selectionChanged( TQListViewItem * ) + currentChanged( TQListViewItem * ) + clicked( TQListViewItem * ) +
+
+ + + 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 + + + + + listActions + currentChanged( TQListViewItem * ) + ActionEditorBase + currentActionChanged(TQListViewItem*) + + + listActions + clicked( TQListViewItem * ) + ActionEditorBase + currentActionChanged(TQListViewItem*) + + + listActions + selectionChanged( TQListViewItem * ) + ActionEditorBase + currentActionChanged(TQListViewItem*) + + + buttonNewAction + clicked() + ActionEditorBase + newAction() + + + buttonConnect + clicked() + ActionEditorBase + connectionsClicked() + + + buttonDeleteAction + clicked() + ActionEditorBase + deleteAction() + + + + class TQListViewItem; + + + init() + destroy() + connectionsClicked() + currentActionChanged( TQListViewItem * ) + deleteAction() + newAction() + + + myiconloader.h + +BarIcon2 + + +
diff --git a/kdevdesigner/designer/actioneditorimpl.cpp b/kdevdesigner/designer/actioneditorimpl.cpp new file mode 100644 index 00000000..294507a9 --- /dev/null +++ b/kdevdesigner/designer/actioneditorimpl.cpp @@ -0,0 +1,321 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "actioneditorimpl.h" +#include "formwindow.h" +#include "metadatabase.h" +#include "actionlistview.h" +#include "connectiondialog.h" +#include "mainwindow.h" +#include "hierarchyview.h" +#include "formfile.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +ActionEditor::ActionEditor( TQWidget* parent, const char* name, WFlags fl ) + : ActionEditorBase( parent, name, fl ), currentAction( 0 ), formWindow( 0 ), + explicitlyClosed(false) +{ + listActions->addColumn( i18n( "Actions" ) ); + setEnabled( FALSE ); + buttonConnect->setEnabled( FALSE ); + + TQPopupMenu *popup = new TQPopupMenu( this ); + popup->insertItem( i18n( "New &Action" ), this, TQT_SLOT( newAction() ) ); + popup->insertItem( i18n( "New Action &Group" ), this, TQT_SLOT( newActionGroup() ) ); + popup->insertItem( i18n( "New &Dropdown Action Group" ), this, TQT_SLOT( newDropDownActionGroup() ) ); + buttonNewAction->setPopup( popup ); + buttonNewAction->setPopupDelay( 0 ); + + connect( listActions, TQT_SIGNAL( insertAction() ), this, TQT_SLOT( newAction() ) ); + connect( listActions, TQT_SIGNAL( insertActionGroup() ), this, TQT_SLOT( newActionGroup() ) ); + connect( listActions, TQT_SIGNAL( insertDropDownActionGroup() ), this, TQT_SLOT( newDropDownActionGroup() ) ); + connect( listActions, TQT_SIGNAL( deleteAction() ), this, TQT_SLOT( deleteAction() ) ); + connect( listActions, TQT_SIGNAL( connectAction() ), this, TQT_SLOT( connectionsClicked() ) ); +} + +void ActionEditor::closeEvent( TQCloseEvent *e ) +{ + emit hidden(); + e->accept(); +} + +void ActionEditor::currentActionChanged( TQListViewItem *i ) +{ + buttonConnect->setEnabled( i != 0 ); + if ( !i ) + return; + currentAction = ( (ActionItem*)i )->action(); + if ( !currentAction ) + currentAction = ( (ActionItem*)i )->actionGroup(); + if ( formWindow && currentAction ) + formWindow->setActiveObject( currentAction ); + MainWindow::self->objectHierarchy()->hierarchyList()->setCurrent( currentAction ); +} + +void ActionEditor::setCurrentAction( TQAction *a ) +{ + TQListViewItemIterator it( listActions ); + while ( it.current() ) { + if ( ( (ActionItem*)it.current() )->action() == a || ( (ActionItem*)it.current() )->actionGroup() == a ) { + listActions->setCurrentItem( it.current() ); + listActions->ensureItemVisible( it.current() ); + break; + } + ++it; + } +} + +TQAction *ActionEditor::newActionEx() +{ + ActionItem *i = new ActionItem( listActions, (bool)FALSE ); + TQAction *a = i->action(); + TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ), + this, TQT_SLOT( removeConnections( TQObject* ) ) ); + MetaDataBase::addEntry( i->action() ); + TQString n = "Action"; + formWindow->unify( i->action(), n, TRUE ); + i->setText( 0, n ); + i->action()->setName( n ); + i->action()->setText( i->action()->name() ); + MetaDataBase::setPropertyChanged( i->action(), "text", TRUE ); + MetaDataBase::setPropertyChanged( i->action(), "name", TRUE ); + formWindow->actionList().append( i->action() ); + if ( formWindow->formFile() ) + formWindow->formFile()->setModified( TRUE ); + return i->action(); +} + +void ActionEditor::deleteAction() +{ + if ( !currentAction ) + return; + + TQListViewItemIterator it( listActions ); + ActionItem *ai = 0; + while ( it.current() ) { + ai = (ActionItem*)it.current(); + if ( ai->action() == currentAction || ai->actionGroup() == currentAction ) { + emit removing( currentAction ); + formWindow->actionList().removeRef( currentAction ); + delete currentAction; + currentAction = 0; + delete it.current(); + break; + } + ++it; + } + if ( formWindow ) { + formWindow->setActiveObject( TQT_TQOBJECT(formWindow->mainContainer()) ); + if ( formWindow->formFile() ) + formWindow->formFile()->setModified( TRUE ); + } +} + +void ActionEditor::newAction() +{ + ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); + if ( actionParent ) { + if ( !::tqqt_cast(actionParent->actionGroup()) ) + actionParent = (ActionItem*)actionParent->parent(); + } + + ActionItem *i = 0; + if ( actionParent ) + i = new ActionItem( actionParent ); + else + i = new ActionItem( listActions, (bool)FALSE ); + TQAction *a = i->action(); + TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ), + this, TQT_SLOT( removeConnections( TQObject* ) ) ); + MetaDataBase::addEntry( i->action() ); + TQString n = "Action"; + formWindow->unify( i->action(), n, TRUE ); + i->setText( 0, n ); + i->action()->setName( n ); + i->action()->setText( i->action()->name() ); + if ( actionParent && actionParent->actionGroup() && + actionParent->actionGroup()->usesDropDown() ) { + i->action()->setToggleAction( TRUE ); + MetaDataBase::setPropertyChanged( i->action(), "toggleAction", TRUE ); + } + MetaDataBase::setPropertyChanged( i->action(), "text", TRUE ); + MetaDataBase::setPropertyChanged( i->action(), "name", TRUE ); + listActions->setCurrentItem( i ); + if ( !actionParent ) + formWindow->actionList().append( i->action() ); + if ( formWindow->formFile() ) + formWindow->formFile()->setModified( TRUE ); +} + +void ActionEditor::newActionGroup() +{ + ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); + if ( actionParent ) { + if ( !::tqqt_cast(actionParent->actionGroup()) ) + actionParent = (ActionItem*)actionParent->parent(); + } + + ActionItem *i = 0; + if ( actionParent ) + i = new ActionItem( actionParent, TRUE ); + else + i = new ActionItem( listActions, TRUE ); + TQAction *ag = i->actionGroup(); + TQObject::connect( ag, TQT_SIGNAL( destroyed( TQObject * ) ), + this, TQT_SLOT( removeConnections( TQObject* ) ) ); + MetaDataBase::addEntry( i->actionGroup() ); + MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", TRUE ); + TQString n = "ActionGroup"; + formWindow->unify( i->action(), n, TRUE ); + i->setText( 0, n ); + i->actionGroup()->setName( n ); + i->actionGroup()->setText( i->actionGroup()->name() ); + MetaDataBase::setPropertyChanged( i->actionGroup(), "text", TRUE ); + MetaDataBase::setPropertyChanged( i->actionGroup(), "name", TRUE ); + listActions->setCurrentItem( i ); + i->setOpen( TRUE ); + if ( !actionParent ) + formWindow->actionList().append( i->actionGroup() ); + if ( formWindow->formFile() ) + formWindow->formFile()->setModified( TRUE ); +} + +void ActionEditor::newDropDownActionGroup() +{ + newActionGroup(); + ( (ActionItem*)listActions->currentItem() )->actionGroup()->setUsesDropDown( TRUE ); +} + +void ActionEditor::setFormWindow( FormWindow *fw ) +{ + listActions->clear(); + formWindow = fw; + if ( !formWindow || + !::tqqt_cast(formWindow->mainContainer()) ) { + setEnabled( FALSE ); + } else { + setEnabled( TRUE ); + for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) { + ActionItem *i = 0; + if ( ::tqqt_cast(a->parent()) ) + continue; + i = new ActionItem( listActions, a ); + i->setText( 0, a->name() ); + i->setPixmap( 0, a->iconSet().pixmap() ); + // make sure we don't duplicate the connection + TQObject::disconnect( a, TQT_SIGNAL( destroyed( TQObject * ) ), + this, TQT_SLOT( removeConnections( TQObject * ) ) ); + TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ), + this, TQT_SLOT( removeConnections( TQObject* ) ) ); + if ( ::tqqt_cast(a) ) { + insertChildActions( i ); + } + } + if ( listActions->firstChild() ) { + listActions->setCurrentItem( listActions->firstChild() ); + listActions->setSelected( listActions->firstChild(), TRUE ); + } + } +} + +void ActionEditor::insertChildActions( ActionItem *i ) +{ + TQObjectList clo = i->actionGroup()->childrenListObject(); + if ( !i->actionGroup() || clo.isEmpty() ) + return; + TQObjectListIt it( clo ); + while ( it.current() ) { + TQObject *o = it.current(); + ++it; + if ( !::tqqt_cast(o) ) + continue; + TQAction *a = (TQAction*)o; + ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a ); + i->setOpen( TRUE ); + i2->setText( 0, a->name() ); + i2->setPixmap( 0, a->iconSet().pixmap() ); + // make sure we don't duplicate the connection + TQObject::disconnect( o, TQT_SIGNAL( destroyed( TQObject * ) ), + this, TQT_SLOT( removeConnections( TQObject * ) ) ); + TQObject::connect( o, TQT_SIGNAL( destroyed( TQObject * ) ), + this, TQT_SLOT( removeConnections( TQObject * ) ) ); + if ( ::tqqt_cast(a) ) + insertChildActions( i2 ); + } +} + +void ActionEditor::updateActionName( TQAction *a ) +{ + TQListViewItemIterator it( listActions ); + while ( it.current() ) { + if ( ( (ActionItem*)it.current() )->action() == a ) + ( (ActionItem*)it.current() )->setText( 0, a->name() ); + else if ( ( (ActionItem*)it.current() )->actionGroup() == a ) + ( (ActionItem*)it.current() )->setText( 0, a->name() ); + ++it; + } +} + +void ActionEditor::updateActionIcon( TQAction *a ) +{ + TQListViewItemIterator it( listActions ); + while ( it.current() ) { + if ( ( (ActionItem*)it.current() )->action() == a ) + ( (ActionItem*)it.current() )->setPixmap( 0, a->iconSet().pixmap() ); + else if ( ( (ActionItem*)it.current() )->actionGroup() == a ) + ( (ActionItem*)it.current() )->setPixmap( 0, a->iconSet().pixmap() ); + ++it; + } +} + +void ActionEditor::connectionsClicked() +{ + ConnectionDialog dlg( formWindow->mainWindow() ); + dlg.setDefault( TQT_TQOBJECT(currentAction), TQT_TQOBJECT(formWindow) ); + dlg.addConnection(); + dlg.exec(); +} + +void ActionEditor::removeConnections( TQObject *o ) +{ + TQValueList conns = + MetaDataBase::connections( TQT_TQOBJECT(formWindow), o ); + for ( TQValueList::Iterator it2 = conns.begin(); + it2 != conns.end(); ++it2 ) + MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow), (*it2).sender, (*it2).signal, + (*it2).receiver, (*it2).slot ); +} diff --git a/kdevdesigner/designer/actioneditorimpl.h b/kdevdesigner/designer/actioneditorimpl.h new file mode 100644 index 00000000..9e67ed9a --- /dev/null +++ b/kdevdesigner/designer/actioneditorimpl.h @@ -0,0 +1,82 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef ACTIONEDITORIMPL_H +#define ACTIONEDITORIMPL_H + +#include + +#include "actioneditor.h" + +class TQAction; +class FormWindow; +class ActionItem; + +class ActionEditor : public ActionEditorBase +{ + Q_OBJECT + + +public: + ActionEditor( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + void setFormWindow( FormWindow *fw ); + void updateActionName( TQAction *a ); + void updateActionIcon( TQAction *a ); + FormWindow *form() const { return formWindow; } + + bool wantToBeShown() const { return !explicitlyClosed; } + void setWantToBeShown( bool b ) { explicitlyClosed = !b; } + + void setCurrentAction( TQAction *a ); + TQAction *newActionEx(); + +protected: + void closeEvent( TQCloseEvent *e ); + +protected slots: + void currentActionChanged( TQListViewItem * ); + void deleteAction(); + void newAction(); + void newActionGroup(); + void newDropDownActionGroup(); + void connectionsClicked(); + void removeConnections( TQObject *o ); + +signals: + void hidden(); + void removing( TQAction * ); + +private: + void insertChildActions( ActionItem *i ); + +private: + TQAction *currentAction; + FormWindow *formWindow; + bool explicitlyClosed; + +}; + +#endif // ACTIONEDITORIMPL_H diff --git a/kdevdesigner/designer/actionlistview.cpp b/kdevdesigner/designer/actionlistview.cpp new file mode 100644 index 00000000..3e8c95c2 --- /dev/null +++ b/kdevdesigner/designer/actionlistview.cpp @@ -0,0 +1,110 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "actiondnd.h" +#include "actionlistview.h" +#include + +#include + +ActionListView::ActionListView( TQWidget *parent, const char *name ) + : TQListView( parent, name ) +{ + setShowSortIndicator( TRUE ); + setResizeMode( LastColumn ); + setRootIsDecorated( TRUE ); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( rmbMenu( TQListViewItem *, const TQPoint & ) ) ); +} + +ActionItem::ActionItem( TQListView *lv, TQAction *ac ) + : TQListViewItem( lv ), a( 0 ), g( 0 ) +{ + g = ::tqqt_cast(ac); + if ( !g ) + a = ::tqqt_cast(ac); + setDragEnabled( TRUE ); +} + +ActionItem::ActionItem( TQListViewItem *i, TQAction *ac ) + : TQListViewItem( i ), a( 0 ), g( 0 ) +{ + g = ::tqqt_cast(ac); + if ( !g ) + a = ::tqqt_cast(ac); + setDragEnabled( TRUE ); + moveToEnd(); +} + +void ActionItem::moveToEnd() +{ + TQListViewItem *i = this; + while ( i->nextSibling() ) + i = i->nextSibling(); + if ( i != this ) + moveItem( i ); +} + +TQDragObject *ActionListView::dragObject() +{ + ActionItem *i = (ActionItem*)currentItem(); + if ( !i ) + return 0; + TQStoredDrag *drag = 0; + if ( i->action() ) { + drag = new ActionDrag( i->action(), viewport() ); + drag->setPixmap( i->action()->iconSet().pixmap() ); + } else { + drag = new ActionDrag( i->actionGroup(), viewport() ); + drag->setPixmap( i->actionGroup()->iconSet().pixmap() ); + } + return drag; +} + +void ActionListView::rmbMenu( TQListViewItem *i, const TQPoint &p ) +{ + TQPopupMenu *popup = new TQPopupMenu( this ); + popup->insertItem( i18n( "New &Action" ), 0 ); + popup->insertItem( i18n( "New Action &Group" ), 1 ); + popup->insertItem( i18n( "New &Dropdown Action Group" ), 2 ); + if ( i ) { + popup->insertSeparator(); + popup->insertItem( i18n( "&Connect Action..." ), 3 ); + popup->insertSeparator(); + popup->insertItem( i18n( "Delete Action" ), 4 ); + } + int res = popup->exec( p ); + if ( res == 0 ) + emit insertAction(); + else if ( res == 1 ) + emit insertActionGroup(); + else if ( res == 2 ) + emit insertDropDownActionGroup(); + else if ( res == 3 ) + emit connectAction(); + else if ( res == 4 ) + emit deleteAction(); +} diff --git a/kdevdesigner/designer/actionlistview.h b/kdevdesigner/designer/actionlistview.h new file mode 100644 index 00000000..047b21bd --- /dev/null +++ b/kdevdesigner/designer/actionlistview.h @@ -0,0 +1,82 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef ACTIONLISTVIEW_H +#define ACTIONLISTVIEW_H + +#include +#include "actiondnd.h" + +class ActionItem : public TQListViewItem +{ +public: + ActionItem( TQListView *lv, bool group ) + : TQListViewItem( lv ), + a( group ? 0 : new QDesignerAction( 0 ) ), + g( group ? new QDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); } + ActionItem( TQListView *lv, TQAction *ac ); + ActionItem( TQListViewItem *i, TQAction *ac ); + ActionItem( ActionItem *parent, bool group = FALSE ) + : TQListViewItem( parent ), + a( group ? 0 : new QDesignerAction( parent->actionGroup() ) ), + g( group ? new QDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); } + + QDesignerAction *action() const { return a; } + QDesignerActionGroup *actionGroup() const { return g; } + +private: + void moveToEnd(); + +private: + QDesignerAction *a; + QDesignerActionGroup *g; + +}; + +class ActionListView : public TQListView +{ + Q_OBJECT + + +public: + ActionListView( TQWidget *parent = 0, const char *name = 0 ); + +protected: + TQDragObject *dragObject(); + +private slots: + void rmbMenu( TQListViewItem *i, const TQPoint &p ); + +signals: + void insertAction(); + void insertActionGroup(); + void insertDropDownActionGroup(); + void deleteAction(); + void connectAction(); + +}; + +#endif diff --git a/kdevdesigner/designer/asciivalidator.cpp b/kdevdesigner/designer/asciivalidator.cpp new file mode 100644 index 00000000..667b0a61 --- /dev/null +++ b/kdevdesigner/designer/asciivalidator.cpp @@ -0,0 +1,94 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "asciivalidator.h" + +#include + +AsciiValidator::AsciiValidator( TQObject * parent, const char *name ) + : TQValidator( parent, name ), functionName( FALSE ) +{ +} + +AsciiValidator::AsciiValidator( bool funcName, TQObject * parent, const char *name ) + : TQValidator( parent, name ), functionName( funcName ) +{ +} + +AsciiValidator::AsciiValidator( const TQString &allow, TQObject * parent, const char *name ) + : TQValidator( parent, name ), functionName( FALSE ), allowedChars( allow ) +{ +} + +AsciiValidator::~AsciiValidator() +{ +} + +TQValidator::State AsciiValidator::validate( TQString &s, int & ) const +{ + bool inParen = FALSE; + bool outParen = FALSE; + if ( !s.isEmpty() && s[0].row() == 0 && s[0].cell() >= '0' && s[0].cell() <= '9' ) + s[0] = '_'; + for ( int i = 0, j = 0; i < (int) s.length(); i++ ) { + uchar r = s[i].row(); + uchar c = s[i].cell(); + + if ( outParen ) { // check if we have 'const' or 'volatile' + static const TQString con = " const"; + static const TQString vol = " volatile"; + TQString mid = s.mid( j ); + if ( !( con.startsWith( mid ) || vol.startsWith( mid ) ) ) + return TQValidator::Invalid; + } + + if ( inParen && c != ')' ) + continue; + + if ( r == 0 && ( ( c >= '0' && c <= '9' ) || + ( c >= 'a' && c <= 'z' ) || + ( c >= 'A' && c <= 'Z' ) ) ) + continue; + + if ( functionName ) { + if ( c == '(' ) { + inParen = TRUE; + continue; + } + if ( c == ')' ) { + outParen = TRUE; + j = i + 1; + continue; + } + } + + if ( allowedChars.find( s[ i ] ) != -1 ) + continue; + + s[i] = '_'; + } + return TQValidator::Acceptable; +} diff --git a/kdevdesigner/designer/asciivalidator.h b/kdevdesigner/designer/asciivalidator.h new file mode 100644 index 00000000..a284f6ab --- /dev/null +++ b/kdevdesigner/designer/asciivalidator.h @@ -0,0 +1,53 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef ASCIIVALIDATOR_H +#define ASCIIVALIDATOR_H + + +#include + + +class AsciiValidator: public TQValidator +{ + Q_OBJECT + +public: + AsciiValidator( TQObject * parent, const char *name = 0 ); + AsciiValidator( bool funcName, TQObject * parent, const char *name = 0 ); + AsciiValidator( const TQString &allow, TQObject * parent, const char *name = 0 ); + ~AsciiValidator(); + + TQValidator::State validate( TQString &, int & ) const; + +private: + bool functionName; + TQString allowedChars; + +}; + + +#endif diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp new file mode 100644 index 00000000..b9b97827 --- /dev/null +++ b/kdevdesigner/designer/command.cpp @@ -0,0 +1,2475 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ +#include "command.h" +#include "formwindow.h" +#include "widgetfactory.h" +#include "propertyeditor.h" +#include "metadatabase.h" +#include +#include "mainwindow.h" +#include "hierarchyview.h" +#include "workspace.h" +#include "actioneditorimpl.h" +#include "actiondnd.h" +#include "formfile.h" +#include "../interfaces/languageinterface.h" +#include "menubareditor.h" +#include "popupmenueditor.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef TQT_NO_TABLE +#include +#endif +#include + +#include "kdevdesigner_part.h" + +#include + +CommandHistory::CommandHistory( int s ) + : current( -1 ), steps( s ), savedAt( -1 ) +{ + history.setAutoDelete( TRUE ); + modified = FALSE; + compressedCommand = 0; +} + +void CommandHistory::addCommand( Command *cmd, bool tryCompress ) +{ + if ( tryCompress ) { + if ( !compressedCommand || + compressedCommand->type() != cmd->type() || + !compressedCommand->canMerge( cmd ) ) { + checkCompressedCommand(); + compressedCommand = 0; + } + + if ( compressedCommand ) { + compressedCommand->merge( cmd ); + modified = TRUE; + modificationChanged( modified ); + return; + } + compressedCommand = cmd; + } else { + checkCompressedCommand(); + } + + if ( current < (int)history.count() - 1 ) { + if ( current < savedAt ) + savedAt = -2; + + TQPtrList commands; + commands.setAutoDelete( FALSE ); + + for( int i = 0; i <= current; ++i ) { + commands.insert( i, history.at( 0 ) ); + history.take( 0 ); + } + + commands.append( cmd ); + history.clear(); + history = commands; + history.setAutoDelete( TRUE ); + } else { + history.append( cmd ); + } + + if ( (int)history.count() > steps ) { + savedAt--; + history.removeFirst(); + } else { + ++current; + } + + emitUndoRedo(); + modified = TRUE; + modificationChanged( modified ); +} + +void CommandHistory::undo() +{ + checkCompressedCommand(); + compressedCommand = 0; + if ( current > -1 ) { + history.at( current )->unexecute(); + --current; + } + emitUndoRedo(); + modified = savedAt != current; + modificationChanged( modified ); +} + +void CommandHistory::redo() +{ + checkCompressedCommand(); + compressedCommand = 0; + if ( current > -1 ) { + if ( current < (int)history.count() - 1 ) { + ++current; + history.at( current )->execute(); + } + } else { + if ( history.count() > 0 ) { + ++current; + history.at( current )->execute(); + } + } + emitUndoRedo(); + modified = savedAt != current; + modificationChanged( modified ); +} + +void CommandHistory::emitUndoRedo() +{ + Command *undoCmd = 0; + Command *redoCmd = 0; + + if ( current >= 0 && current < (int)history.count() ) + undoCmd = history.at( current ); + if ( current + 1 >= 0 && current + 1 < (int)history.count() ) + redoCmd = history.at( current + 1 ); + + bool ua = (undoCmd != 0); + TQString uc; + if ( ua ) + uc = undoCmd->name(); + bool ra = (redoCmd != 0); + TQString rc; + if ( ra ) + rc = redoCmd->name(); + emit undoRedoChanged( ua, ra, uc, rc ); +} + +void CommandHistory::setModified( bool m ) +{ + modified = m; + if ( !modified ) + savedAt = current; + modificationChanged( modified ); +} + +bool CommandHistory::isModified() const +{ + return modified; +} + +void CommandHistory::checkCompressedCommand() +{ + if ( compressedCommand && compressedCommand->type() == Command::SetProperty ) { + Command *c = compressedCommand; + compressedCommand = 0; + if ( !( (SetPropertyCommand*)c )->checkProperty() ) { + history.remove( current ); + --current; + emitUndoRedo(); + } + } +} + +// ------------------------------------------------------------ + +Command::Command( const TQString &n, FormWindow *fw ) + : cmdName( n ), formWin( fw ) +{ +} + +Command::~Command() +{ +} + +TQString Command::name() const +{ + return cmdName; +} + +FormWindow *Command::formWindow() const +{ + return formWin; +} + +void Command::merge( Command * ) +{ +} + +bool Command::canMerge( Command * ) +{ + return FALSE; +} + +// ------------------------------------------------------------ + +ResizeCommand::ResizeCommand( const TQString &n, FormWindow *fw, + TQWidget *w, const TQRect &oldr, const TQRect &nr ) + : Command( n, fw ), widget( w ), oldRect( oldr ), newRect( nr ) +{ +} + +void ResizeCommand::execute() +{ + widget->setGeometry( newRect ); + formWindow()->updateSelection( widget ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); + if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) + formWindow()->updateChildSelections( widget ); +} + +void ResizeCommand::unexecute() +{ + widget->setGeometry( oldRect ); + formWindow()->updateSelection( widget ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); + if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) + formWindow()->updateChildSelections( widget ); +} + +// ------------------------------------------------------------ + +InsertCommand::InsertCommand( const TQString &n, FormWindow *fw, + TQWidget *w, const TQRect &g ) + : Command( n, fw ), widget( w ), geometry( g ) +{ +} + +void InsertCommand::execute() +{ + if ( geometry.size() == TQSize( 0, 0 ) ) { + widget->move( geometry.topLeft() ); + widget->adjustSize(); + } else { + TQSize s = geometry.size().expandedTo( widget->minimumSize() ); + s = s.expandedTo( widget->minimumSizeHint() ); + TQRect r( geometry.topLeft(), s ); + widget->setGeometry( r ); + } + widget->show(); + formWindow()->widgets()->insert( widget, widget ); + formWindow()->clearSelection( FALSE ); + formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget ); +} + +void InsertCommand::unexecute() +{ + widget->hide(); + formWindow()->selectWidget( TQT_TQOBJECT(widget), FALSE ); + formWindow()->widgets()->remove( TQT_TQOBJECT(widget) ); + formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget ); + } + +// ------------------------------------------------------------ + +MoveCommand::MoveCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &w, + const TQValueList op, + const TQValueList np, + TQWidget *opr, TQWidget *npr ) + : Command( n, fw ), widgets( w ), oldPos( op ), newPos( np ), + oldParent( opr ), newParent( npr ) +{ + widgets.setAutoDelete( FALSE ); +} + +void MoveCommand::merge( Command *c ) +{ + MoveCommand *cmd = (MoveCommand*)c; + newPos = cmd->newPos; +} + +bool MoveCommand::canMerge( Command *c ) +{ + MoveCommand *cmd = (MoveCommand*)c; + return widgets == cmd->widgets; +} + + +void MoveCommand::execute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { + if ( newParent && oldParent && newParent != oldParent ) { + TQPoint pos = newParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); + w->reparent( newParent, pos, TRUE ); + formWindow()->raiseSelection( w ); + formWindow()->raiseChildSelections( w ); + formWindow()->widgetChanged( TQT_TQOBJECT(w) ); + formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); + formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); + } + w->move( newPos[ widgets.at() ] ); + } + formWindow()->updateSelection( w ); + formWindow()->updateChildSelections( w ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); + } +} + +void MoveCommand::unexecute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { + if ( newParent && oldParent && newParent != oldParent ) { + TQPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); + w->reparent( oldParent, pos, TRUE ); + formWindow()->raiseSelection( w ); + formWindow()->raiseChildSelections( w ); + formWindow()->widgetChanged( TQT_TQOBJECT(w) ); + formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); + formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); + } + w->move( oldPos[ widgets.at() ] ); + } + formWindow()->updateSelection( w ); + formWindow()->updateChildSelections( w ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); + } +} + +// ------------------------------------------------------------ + +DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &wl ) + : Command( n, fw ), widgets( wl ) +{ + widgets.setAutoDelete( FALSE ); + TQWidgetList copyOfWidgets = widgets; + copyOfWidgets.setAutoDelete(FALSE); + + // Include the children of the selected items when deleting + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + TQObjectList *children = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + for ( TQWidget *c = (TQWidget *)children->first(); c; c = (TQWidget *)children->next() ) { + if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) { + widgets.insert(widgets.at() + 1, c); + widgets.prev(); + copyOfWidgets.append(c); + } + } + delete children; + } +} + +void DeleteCommand::execute() +{ + formWindow()->setPropertyShowingBlocked( TRUE ); + connections.clear(); + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->hide(); + TQString s = w->name(); + s.prepend( "qt_dead_widget_" ); + w->setName( s ); + formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); + formWindow()->widgets()->remove( w ); + TQValueList conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) ); + connections.insert( w, conns ); + TQValueList::Iterator it = conns.begin(); + for ( ; it != conns.end(); ++it ) { + MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), (*it).sender, + (*it).signal, (*it).receiver, (*it).slot ); + } + } + formWindow()->setPropertyShowingBlocked( FALSE ); + formWindow()->emitShowProperties(); + formWindow()->mainWindow()->objectHierarchy()->widgetsRemoved( widgets ); + +} + +void DeleteCommand::unexecute() +{ + formWindow()->setPropertyShowingBlocked( TRUE ); + formWindow()->clearSelection( FALSE ); + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->show(); + TQString s = w->name(); + s.remove( 0, TQString( "qt_dead_widget_" ).length() ); + w->setName( s ); + formWindow()->widgets()->insert( w, w ); + formWindow()->selectWidget( TQT_TQOBJECT(w) ); + TQValueList conns = *connections.find( w ); + TQValueList::Iterator it = conns.begin(); + for ( ; it != conns.end(); ++it ) { + MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender, + (*it).signal, (*it).receiver, (*it).slot ); + } + } + formWindow()->setPropertyShowingBlocked( FALSE ); + formWindow()->emitShowProperties(); + formWindow()->mainWindow()->objectHierarchy()->widgetsInserted( widgets ); +} + +// ------------------------------------------------------------ + +SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw, + TQObject *w, PropertyEditor *e, + const TQString &pn, const TQVariant &ov, + const TQVariant &nv, const TQString &ncut, + const TQString &ocut, bool reset ) + : Command( n, fw ), widget( w ), editor( e ), propName( pn ), + oldValue( ov ), newValue( nv ), oldCurrentItemText( ocut ), newCurrentItemText( ncut ), + wasChanged( TRUE ), isResetCommand( reset ) +{ + wasChanged = MetaDataBase::isPropertyChanged( w, propName ); + if ( oldCurrentItemText.isNull() ) + oldCurrentItemText = ""; + if ( newCurrentItemText.isNull() ) + newCurrentItemText = ""; +} + + +void SetPropertyCommand::execute() +{ + if ( !wasChanged ) + MetaDataBase::setPropertyChanged( widget, propName, TRUE ); + if ( isResetCommand ) { + MetaDataBase::setPropertyChanged( widget, propName, FALSE ); + if ( WidgetFactory::resetProperty( widget, propName ) ) { + if ( !formWindow()->isWidgetSelected( widget ) && TQT_TQOBJECT(formWindow()) != TQT_TQOBJECT(widget) ) + formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + if ( editor->widget() != widget ) + editor->setWidget( widget, formWindow() ); + editor->propertyList()->setCurrentProperty( propName ); + PropertyItem *i = (PropertyItem*)editor->propertyList()->currentItem(); + if ( !i ) + return; + i->setValue( widget->property( propName ) ); + i->setChanged( FALSE ); + editor->refetchData(); + editor->emitWidgetChanged(); + return; + } + } + setProperty( newValue, newCurrentItemText ); +} + +void SetPropertyCommand::unexecute() +{ + if ( !wasChanged ) + MetaDataBase::setPropertyChanged( widget, propName, FALSE ); + if ( isResetCommand ) + MetaDataBase::setPropertyChanged( widget, propName, TRUE ); + setProperty( oldValue, oldCurrentItemText ); +} + +bool SetPropertyCommand::canMerge( Command *c ) +{ + SetPropertyCommand *cmd = (SetPropertyCommand*)c; + if ( !widget ) + return FALSE; + const TQMetaProperty *p = + widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE ); + if ( !p ) { + if ( propName == "toolTip" || propName == "whatsThis" ) + return TRUE; + if ( ::tqqt_cast((TQObject *)widget) ) { + MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget(); + if ( !cw ) + return FALSE; + for ( TQValueList::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { + if ( TQString( (*it ).property ) == propName ) { + if ( (*it).type == "String" || (*it).type == "CString" || (*it).type == "Int" || (*it).type == "UInt" ) + return TRUE; + } + } + } + return FALSE; + } + TQVariant::Type t = TQVariant::nameToType( p->type() ); + return ( cmd->propName == propName && + t == TQVariant::String || t == TQVariant::CString || t == TQVariant::Int || t == TQVariant::UInt ); +} + +void SetPropertyCommand::merge( Command *c ) +{ + SetPropertyCommand *cmd = (SetPropertyCommand*)c; + newValue = cmd->newValue; + newCurrentItemText = cmd->newCurrentItemText; +} + +bool SetPropertyCommand::checkProperty() +{ + if ( propName == "name" /*|| propName == "itemName"*/ ) { // ### fix that + TQString s = newValue.toString(); + if ( !formWindow()->unify( widget, s, FALSE ) ) { + TQMessageBox::information( formWindow()->mainWindow(), + i18n( "Set 'name' Property" ), + i18n( "The name of a widget must be unique.\n" + "'%1' is already used in form '%2',\n" + "so the name has been reverted to '%3'." ). + arg( newValue.toString() ). + arg( formWindow()->name() ). + arg( oldValue.toString() )); + setProperty( oldValue, oldCurrentItemText, FALSE ); + return FALSE; + } + if ( s.isEmpty() ) { + TQMessageBox::information( formWindow()->mainWindow(), + i18n( "Set 'name' Property" ), + i18n( "The name of a widget must not be null.\n" + "The name has been reverted to '%1'." ). + arg( oldValue.toString() )); + setProperty( oldValue, oldCurrentItemText, FALSE ); + return FALSE; + } + + if ( ::tqqt_cast(widget->parent()) ) + formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() ); + } + return TRUE; +} + +void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤tItemText, bool select ) +{ + if ( !widget ) + return; + + if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select ) + formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + if ( editor->widget() != widget && select ) + editor->setWidget( widget, formWindow() ); + if ( select ) + editor->propertyList()->setCurrentProperty( propName ); + const TQMetaProperty *p = + widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE ); + if ( !p ) { + if ( propName == "hAlign" ) { + p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + int align = widget->property( "alignment" ).toInt(); + align &= ~( AlignHorizontal_Mask ); + align |= p->keyToValue( currentItemText ); + widget->setProperty( "alignment", TQVariant( align ) ); + } else if ( propName == "vAlign" ) { + p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + int align = widget->property( "alignment" ).toInt(); + align &= ~( AlignVertical_Mask ); + align |= p->keyToValue( currentItemText ); + widget->setProperty( "alignment", TQVariant( align ) ); + } else if ( propName == "wordwrap" ) { + int align = widget->property( "alignment" ).toInt(); + align &= ~WordBreak; + if ( v.toBool() ) + align |= WordBreak; + widget->setProperty( "alignment", TQVariant( align ) ); + } else if ( propName == "layoutSpacing" ) { + TQVariant val = v; + if ( val.toString() == "default" ) + val = -1; + MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); + } else if ( propName == "layoutMargin" ) { + TQVariant val = v; + if ( val.toString() == "default" ) + val = -1; + MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); + } else if ( propName == "resizeMode" ) { + MetaDataBase::setResizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), currentItemText ); + } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) { + MetaDataBase::setFakeProperty( editor->widget(), propName, v ); + } else if ( ::tqqt_cast(editor->widget()) ) { + MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget(); + if ( cw ) { + MetaDataBase::setFakeProperty( editor->widget(), propName, v ); + } + } + editor->refetchData(); + editor->emitWidgetChanged(); + ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) ); +#ifndef TQT_NO_SQL + if ( propName == "database" ) { + formWindow()->mainWindow()->objectHierarchy()->databasePropertyChanged( (TQWidget*)((TQObject *)widget), MetaDataBase::fakeProperty( widget, "database" ).toStringList() ); + } +#endif + return; + } + + if ( p->isSetType() ) { + TQStrList strlst; + TQStringList lst = TQStringList::split( "|", currentItemText ); + TQValueListConstIterator it = lst.begin(); + for ( ; it != lst.end(); ++it ) + strlst.append( (*it).latin1() ); + widget->setProperty( propName, p->keysToValue( strlst ) ); + } else if ( p->isEnumType() ) { + widget->setProperty( propName, p->keyToValue( currentItemText ) ); + } else if ( qstrcmp( p->name(), "buddy" ) == 0 ) { + widget->setProperty( propName, currentItemText ); + } else { + TQVariant ov; + if ( propName == "name" || propName == "itemName" ) + ov = widget->property( propName ); + int oldSerNum = -1; + if ( v.type() == TQVariant::Pixmap ) + oldSerNum = v.toPixmap().serialNumber(); + widget->setProperty( propName, v ); + if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() ) + MetaDataBase::setPixmapKey( TQT_TQOBJECT(formWindow()), + widget->property( propName ).toPixmap().serialNumber(), + MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) ); + if ( propName == "cursor" ) { + MetaDataBase::setCursor( (TQWidget*)((TQObject *)widget), v.toCursor() ); + } + if ( propName == "name" && widget->isWidgetType() ) { + formWindow()->mainWindow()->objectHierarchy()->namePropertyChanged( ((TQWidget*)(TQObject *)widget), ov ); + if ( formWindow()->isMainContainer( widget ) ) + formWindow()->setName( v.toCString() ); + } + if ( propName == "name" && ::tqqt_cast((TQObject *)widget) && ::tqqt_cast(formWindow()->mainContainer()) ) { + formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget ); + } + if ( propName == "iconSet" && ::tqqt_cast((TQObject *)widget) && ::tqqt_cast(formWindow()->mainContainer()) ) { + formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget ); + } + if ( propName == "caption" ) { + if ( formWindow()->isMainContainer( widget ) ) + formWindow()->setCaption( v.toString() ); + } + if ( propName == "icon" ) { + if ( formWindow()->isMainContainer( widget ) ) + formWindow()->setIcon( v.toPixmap() ); + } + } + editor->refetchData(); + if ( editor->propertyList()->currentItem() && select ) { + ( ( PropertyItem* )editor->propertyList()->currentItem() )->showEditor(); + ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) ); + } + editor->emitWidgetChanged(); + formWindow()->killAccels( TQT_TQOBJECT(widget) ); +} + +// ------------------------------------------------------------ + +LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase ) +{ +} + +void LayoutHorizontalCommand::execute() +{ + formWindow()->clearSelection( FALSE ); + layout.doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void LayoutHorizontalCommand::unexecute() +{ + formWindow()->clearSelection( FALSE ); + layout.undoLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE ) +{ +} + +void LayoutHorizontalSplitCommand::execute() +{ + formWindow()->clearSelection( FALSE ); + layout.doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void LayoutHorizontalSplitCommand::unexecute() +{ + formWindow()->clearSelection( FALSE ); + layout.undoLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase ) +{ +} + +void LayoutVerticalCommand::execute() +{ + formWindow()->clearSelection( FALSE ); + layout.doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void LayoutVerticalCommand::unexecute() +{ + formWindow()->clearSelection( FALSE ); + layout.undoLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE ) +{ +} + +void LayoutVerticalSplitCommand::execute() +{ + formWindow()->clearSelection( FALSE ); + layout.doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void LayoutVerticalSplitCommand::unexecute() +{ + formWindow()->clearSelection( FALSE ); + layout.undoLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl, int xres, int yres ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) ) +{ +} + +void LayoutGridCommand::execute() +{ + formWindow()->clearSelection( FALSE ); + layout.doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void LayoutGridCommand::unexecute() +{ + formWindow()->clearSelection( FALSE ); + layout.undoLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, + TQWidget *layoutBase, const TQWidgetList &wl ) + : Command( n, fw ), lb( layoutBase ), widgets( wl ) +{ + WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase ); + spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) ); + margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) ); + layout = 0; + if ( lay == WidgetFactory::HBox ) + layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast(layoutBase) != 0 ); + else if ( lay == WidgetFactory::VBox ) + layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast(layoutBase) != 0 ); + else if ( lay == WidgetFactory::Grid ) + layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE ); +} + +void BreakLayoutCommand::execute() +{ + if ( !layout ) + return; + formWindow()->clearSelection( FALSE ); + layout->breakLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) + w->resize( TQMAX( 16, w->width() ), TQMAX( 16, w->height() ) ); +} + +void BreakLayoutCommand::unexecute() +{ + if ( !layout ) + return; + formWindow()->clearSelection( FALSE ); + layout->doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); + MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing ); + MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin ); +} + +// ------------------------------------------------------------ + +MacroCommand::MacroCommand( const TQString &n, FormWindow *fw, + const TQPtrList &cmds ) + : Command( n, fw ), commands( cmds ) +{ +} + +void MacroCommand::execute() +{ + for ( Command *c = commands.first(); c; c = commands.next() ) + c->execute(); +} + +void MacroCommand::unexecute() +{ + for ( Command *c = commands.last(); c; c = commands.prev() ) + c->unexecute(); +} + +// ------------------------------------------------------------ + +AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, const TQString &label ) + : Command( n, fw ), tabWidget( tw ), tabLabel( label ) +{ + tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" ); + tabPage->hide(); + index = -1; + MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) ); +} + +void AddTabPageCommand::execute() +{ + if ( index == -1 ) + index = ( (QDesignerTabWidget*)tabWidget )->count(); + tabWidget->insertTab( tabPage, tabLabel, index ); + tabWidget->showPage( tabPage ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +void AddTabPageCommand::unexecute() +{ + tabWidget->removePage( tabPage ); + tabPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +// ------------------------------------------------------------ + +MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, TQWidget* page, const TQString& label, int nIndex, int oIndex ) + : Command( n, fw ), tabWidget( tw ), tabPage( page ), tabLabel( label ) +{ + newIndex = nIndex; + oldIndex = oIndex; +} + +void MoveTabPageCommand::execute() +{ + ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); + ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +void MoveTabPageCommand::unexecute() +{ + ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); + ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +// ------------------------------------------------------------ + +DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, TQWidget *page ) + : Command( n, fw ), tabWidget( tw ), tabPage( page ) +{ + tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle(); + index = ( (QDesignerTabWidget*)tabWidget )->currentPage(); +} + +void DeleteTabPageCommand::execute() +{ + tabWidget->removePage( tabPage ); + tabPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +void DeleteTabPageCommand::unexecute() +{ + tabWidget->insertTab( tabPage, tabLabel, index ); + tabWidget->showPage( tabPage ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +// ------------------------------------------------------------ + +AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWindow *fw, + QDesignerWidgetStack *ws ) + : Command( n, fw ), widgetStack( ws ) +{ + stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" ); + stackPage->hide(); + index = -1; + MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) ); +} + +void AddWidgetStackPageCommand::execute() +{ + index = widgetStack->insertPage( stackPage, index ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); +} + +void AddWidgetStackPageCommand::unexecute() +{ + index = widgetStack->removePage( stackPage ); + stackPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); +} + +DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw, + QDesignerWidgetStack *ws, TQWidget *page ) + : Command( n, fw), widgetStack( ws ), stackPage( page ) +{ + index = -1; +} + +void DeleteWidgetStackPageCommand::execute() +{ + index = widgetStack->removePage( stackPage ); + stackPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( stackPage ); +} + +void DeleteWidgetStackPageCommand::unexecute() +{ + index = widgetStack->insertPage( stackPage, index ); + widgetStack->raiseWidget( stackPage ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->widgetInserted( stackPage ); +} + +// ------------------------------------------------------------ + +AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, const TQString &label, int i, bool s ) + : Command( n, fw ), wizard( w ), pageLabel( label ) +{ + page = new QDesignerWidget( formWindow(), wizard, "WizardPage" ); + page->hide(); + index = i; + show = s; + MetaDataBase::addEntry( TQT_TQOBJECT(page) ); +} + +void AddWizardPageCommand::execute() +{ + if ( index == -1 ) + index = wizard->pageCount(); + wizard->insertPage( page, pageLabel, index ); + if ( show ) + ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +void AddWizardPageCommand::unexecute() +{ + wizard->removePage( page ); + page->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +// ------------------------------------------------------------ + +DeleteWizardPageCommand::DeleteWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int i, bool s ) + : Command( n, fw ), wizard( w ), index( i ) +{ + show = s; +} + +void DeleteWizardPageCommand::execute() +{ + page = wizard->page( index ); + pageLabel = wizard->title( page ); + wizard->removePage( page ); + page->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +void DeleteWizardPageCommand::unexecute() +{ + wizard->insertPage( page, pageLabel, index ); + if ( show ) + ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +// ------------------------------------------------------------ + +RenameWizardPageCommand::RenameWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int i, const TQString& name ) + : Command( n, fw ), wizard( w ), index( i ), label( name ) +{ + +} + +void RenameWizardPageCommand::execute() +{ + page = wizard->page( index ); + TQString oldLabel = wizard->title( page ); + + wizard->setTitle( page, label ); + label = oldLabel; + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); +} + +void RenameWizardPageCommand::unexecute() +{ + execute(); +} + +// ------------------------------------------------------------ + +SwapWizardPagesCommand::SwapWizardPagesCommand( const TQString &n, FormWindow *fw, TQWizard *w, int i1, int i2 ) + : Command( n, fw ), wizard( w ), index1( i1 ), index2( i2 ) +{ +} + +void SwapWizardPagesCommand::execute() +{ + TQWidget *page1 = wizard->page( index1 ); + TQWidget *page2 = wizard->page( index2 ); + TQString page1Label = wizard->title( page1 ); + TQString page2Label = wizard->title( page2 ); + wizard->removePage( page1 ); + wizard->removePage( page2 ); + wizard->insertPage( page1, page1Label, index2 ); + wizard->insertPage( page2, page2Label, index1 ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +void SwapWizardPagesCommand::unexecute() +{ + execute(); +} + +// ------------------------------------------------------------ + +MoveWizardPageCommand::MoveWizardPageCommand( const TQString &n, FormWindow *fw, TQWizard *w, int i1, int i2 ) + : Command( n, fw ), wizard( w ), index1( i1 ), index2( i2 ) +{ +} + +void MoveWizardPageCommand::execute() +{ + TQWidget *page = wizard->page( index1 ); + TQString pageLabel = wizard->title( page ); + wizard->removePage( page ); + wizard->insertPage( page, pageLabel, index2 ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +void MoveWizardPageCommand::unexecute() +{ + // ###FIX: index1 may be the wrong place + TQWidget *page = wizard->page( index2 ); + TQString pageLabel = wizard->title( page ); + wizard->removePage( page ); + wizard->insertPage( page, pageLabel, index1 ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +// ------------------------------------------------------------ + +AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw, + MetaDataBase::Connection c ) + : Command( name, fw ), connection( c ) +{ +} + +void AddConnectionCommand::execute() +{ + MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, + connection.signal, connection.receiver, connection.slot ); + if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); +} + +void AddConnectionCommand::unexecute() +{ + MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, + connection.signal, connection.receiver, connection.slot ); + if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); +} + +// ------------------------------------------------------------ + +RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWindow *fw, + MetaDataBase::Connection c ) + : Command( name, fw ), connection( c ) +{ +} + +void RemoveConnectionCommand::execute() +{ + MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, + connection.signal, connection.receiver, connection.slot ); + if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); +} + +void RemoveConnectionCommand::unexecute() +{ + MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, + connection.signal, connection.receiver, connection.slot ); + if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); +} + +// ------------------------------------------------------------ + +AddFunctionCommand::AddFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, + const TQString& spec, const TQString &a, const TQString &t, + const TQString &l, const TQString &rt ) + : Command( name, fw ), function( f ), specifier( spec ), access( a ), functionType( t ), language( l ), + returnType( rt ) +{ +} + +void AddFunctionCommand::execute() +{ + MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (add - execute) + KInterfaceDesigner::Function f; + f.returnType = returnType; + f.function = function; + f.specifier = specifier; + f.access = access; + f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->clearSelection(false); + formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void AddFunctionCommand::unexecute() +{ + MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (add - unexecute) + KInterfaceDesigner::Function f; + f.returnType = returnType; + f.function = function; + f.specifier = specifier; + f.access = access; + f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const TQString &name, FormWindow *fw, MetaDataBase::Function f, + const TQString &on, const TQString &os, + const TQString &oa, const TQString &ot, const TQString &ol, + const TQString &ort ) + : Command( name, fw ), oldName( on ), oldSpec( os ), oldAccess( oa ), + oldType( ot ), oldLang( ol ), oldReturnType( ort ) +{ + newName = f.function; + newSpec = f.specifier; + newAccess = f.access; + newType = f.type; + newLang = f.language; + newReturnType = f.returnType; +} + +void ChangeFunctionAttribCommand::execute() +{ + MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), oldName, newName, newSpec, newAccess, + newType, newLang, newReturnType ); + formWindow()->formFile()->functionNameChanged( oldName, newName ); + formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (edit - execute) + KInterfaceDesigner::Function f; + f.returnType = newReturnType; + f.function = newName; + f.specifier = newSpec; + f.access = newAccess; + f.type = (newType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + KInterfaceDesigner::Function of; + f.returnType = oldReturnType; + f.function = oldName; + f.specifier = oldSpec; + f.access = oldAccess; + f.type = (oldType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), of, f); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void ChangeFunctionAttribCommand::unexecute() +{ + MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), newName, oldName, oldSpec, oldAccess, + oldType, oldLang, oldReturnType ); + formWindow()->formFile()->functionNameChanged( newName, oldName ); + formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (edit - execute) + KInterfaceDesigner::Function f; + f.returnType = newReturnType; + f.function = newName; + f.specifier = newSpec; + f.access = newAccess; + f.type = (newType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + KInterfaceDesigner::Function of; + f.returnType = oldReturnType; + f.function = oldName; + f.specifier = oldSpec; + f.access = oldAccess; + f.type = (oldType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), f, of); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, + const TQString& spec, const TQString &a, const TQString &t, + const TQString &l, const TQString &rt ) + : Command( name, fw ), function( f ), specifier( spec ), access( a ), functionType( t ), language( l ), + returnType( rt ) +{ + if ( spec.isNull() ) { + TQValueList lst = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); + for ( TQValueList::Iterator it = lst.begin(); it != lst.end(); ++it ) { + if ( MetaDataBase::normalizeFunction( (*it).function ) == + MetaDataBase::normalizeFunction( function ) ) { + specifier = (*it).specifier; + access = (*it).access; + functionType = (*it).type; + returnType = (*it).returnType; + language = (*it).language; + break; + } + } + } +} + +void RemoveFunctionCommand::execute() +{ + MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (remove - execute) + KInterfaceDesigner::Function f; + f.returnType = returnType; + f.function = function; + f.specifier = specifier; + f.access = access; + f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void RemoveFunctionCommand::unexecute() +{ + if ( MetaDataBase::hasFunction( TQT_TQOBJECT(formWindow()), function ) ) + return; + MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (remove - unexecute) + KInterfaceDesigner::Function f; + f.returnType = returnType; + f.function = function; + f.specifier = specifier; + f.access = access; + f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->clearSelection(false); + formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +AddVariableCommand::AddVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn, const TQString &a ) + : Command( name, fw ), varName( vn ), access( a ) +{ +} + +void AddVariableCommand::execute() +{ + MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void AddVariableCommand::unexecute() +{ + MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +SetVariablesCommand::SetVariablesCommand( const TQString &name, FormWindow *fw, + TQValueList lst ) + : Command( name, fw ), newList( lst ) +{ + oldList = MetaDataBase::variables( TQT_TQOBJECT(formWindow()) ); +} + +void SetVariablesCommand::execute() +{ + MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), newList ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void SetVariablesCommand::unexecute() +{ + MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), oldList ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn ) + : Command( name, fw ), varName( vn ) +{ + TQValueList lst = MetaDataBase::variables( TQT_TQOBJECT(fw) ); + for ( TQValueList::Iterator it = lst.begin(); it != lst.end(); ++it ) { + if ( (*it).varName == varName ) { + access = (*it).varAccess; + break; + } + } +} + +void RemoveVariableCommand::execute() +{ + MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void RemoveVariableCommand::unexecute() +{ + MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +EditDefinitionsCommand::EditDefinitionsCommand( const TQString &name, FormWindow *fw, LanguageInterface *lf, + const TQString &n, const TQStringList &nl ) + : Command( name, fw ), lIface( lf ), defName( n ), newList( nl ) +{ + oldList = lIface->definitionEntries( defName, formWindow()->mainWindow()->designerInterface() ); +} + +void EditDefinitionsCommand::execute() +{ + lIface->setDefinitionEntries( defName, newList, formWindow()->mainWindow()->designerInterface() ); + lIface->release(); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void EditDefinitionsCommand::unexecute() +{ + lIface->setDefinitionEntries( defName, oldList, formWindow()->mainWindow()->designerInterface() ); + lIface->release(); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +LowerCommand::LowerCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ) + : Command( name, fw ), widgets( w ) +{ +} + +void LowerCommand::execute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->lower(); + formWindow()->raiseSelection( w ); + } + +} + +void LowerCommand::unexecute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->raise(); + formWindow()->raiseSelection( w ); + } +} + +// ------------------------------------------------------------ + +RaiseCommand::RaiseCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ) + : Command( name, fw ), widgets( w ) +{ +} + +void RaiseCommand::execute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->raise(); + formWindow()->raiseSelection( w ); + } + +} + +void RaiseCommand::unexecute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->lower(); + formWindow()->raiseSelection( w ); + } +} + +// ------------------------------------------------------------ + +PasteCommand::PasteCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &w ) + : Command( n, fw ), widgets( w ) +{ +} + +void PasteCommand::execute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->show(); + formWindow()->selectWidget( TQT_TQOBJECT(w) ); + formWindow()->widgets()->insert( w, w ); + formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); + } +} + +void PasteCommand::unexecute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->hide(); + formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); + formWindow()->widgets()->remove( w ); + formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); + } + } + +// ------------------------------------------------------------ + +TabOrderCommand::TabOrderCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &ol, const TQWidgetList &nl ) + : Command( n, fw ), oldOrder( ol ), newOrder( nl ) +{ +} + +void TabOrderCommand::merge( Command *c ) +{ + TabOrderCommand *cmd = (TabOrderCommand*)c; + newOrder = cmd->newOrder; +} + +bool TabOrderCommand::canMerge( Command * ) +{ + return TRUE; +} + +void TabOrderCommand::execute() +{ + MetaDataBase::setTabOrder( formWindow(), newOrder ); +} + +void TabOrderCommand::unexecute() +{ + MetaDataBase::setTabOrder( formWindow(), oldOrder ); +} + +// ------------------------------------------------------------ + +PopulateListBoxCommand::PopulateListBoxCommand( const TQString &n, FormWindow *fw, + TQListBox *lb, const TQValueList &items ) + : Command( n, fw ), newItems( items ), listbox( lb ) +{ + TQListBoxItem *i = 0; + for ( i = listbox->firstItem(); i; i = i->next() ) { + Item item; + if ( i->pixmap() ) + item.pix = *i->pixmap(); + item.text = i->text(); + oldItems.append( item ); + } +} + +void PopulateListBoxCommand::execute() +{ + listbox->clear(); + for ( TQValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { + Item i = *it; + if ( !i.pix.isNull() ) + (void)new TQListBoxPixmap( listbox, i.pix, i.text ); + else + (void)new TQListBoxText( listbox, i.text ); + } + formWindow()->mainWindow()->propertyeditor()->refetchData(); +} + +void PopulateListBoxCommand::unexecute() +{ + listbox->clear(); + for ( TQValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { + Item i = *it; + if ( !i.pix.isNull() ) + (void)new TQListBoxPixmap( listbox, i.pix, i.text ); + else + (void)new TQListBoxText( listbox, i.text ); + } + formWindow()->mainWindow()->propertyeditor()->refetchData(); +} + +// ------------------------------------------------------------ + +PopulateIconViewCommand::PopulateIconViewCommand( const TQString &n, FormWindow *fw, + TQIconView *iv, const TQValueList &items ) + : Command( n, fw ), newItems( items ), iconview( iv ) +{ +#ifndef TQT_NO_ICONVIEW + TQIconViewItem *i = 0; + for ( i = iconview->firstItem(); i; i = i->nextItem() ) { + Item item; + if ( i->pixmap() ) + item.pix = *i->pixmap(); + item.text = i->text(); + oldItems.append( item ); + } +#endif +} + +void PopulateIconViewCommand::execute() +{ +#ifndef TQT_NO_ICONVIEW + iconview->clear(); + for ( TQValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { + Item i = *it; + (void)new TQIconViewItem( iconview, i.text, i.pix ); + } +#endif +} + +void PopulateIconViewCommand::unexecute() +{ +#ifndef TQT_NO_ICONVIEW + iconview->clear(); + for ( TQValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { + Item i = *it; + (void)new TQIconViewItem( iconview, i.text, i.pix ); + } +#endif +} + +// ------------------------------------------------------------ + +PopulateListViewCommand::PopulateListViewCommand( const TQString &n, FormWindow *fw, + TQListView *lv, TQListView *from ) + : Command( n, fw ), listview( lv ) +{ + newItems = new TQListView(); + newItems->hide(); + transferItems( from, newItems ); + oldItems = new TQListView(); + oldItems->hide(); + transferItems( listview, oldItems ); +} + +void PopulateListViewCommand::execute() +{ + listview->clear(); + transferItems( newItems, listview ); +} + +void PopulateListViewCommand::unexecute() +{ + listview->clear(); + transferItems( oldItems, listview ); +} + +void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to ) +{ + TQHeader *header = to->header(); + while ( header->count() ) + to->removeColumn( 0 ); + TQHeader *h2 = from->header(); + for ( int i = 0; i < h2->count(); ++i ) { + to->addColumn( h2->label( i ) ); + if ( h2->iconSet( i ) && !h2->iconSet( i )->pixmap().isNull() ) + header->setLabel( i, *h2->iconSet( i ), h2->label( i ) ); + header->setResizeEnabled( h2->isResizeEnabled( i ), i ); + header->setClickEnabled( h2->isClickEnabled( i ), i ); + } + + TQListViewItemIterator it( from ); + TQPtrStack fromParents, toParents; + fromParents.push( 0 ); + toParents.push( 0 ); + TQPtrStack toLasts; + TQListViewItem *fromLast = 0; + toLasts.push( 0 ); + int cols = from->columns(); + to->setSorting( -1 ); + from->setSorting( -1 ); + for ( ; it.current(); ++it ) { + TQListViewItem *i = it.current(); + if ( i->parent() == fromParents.top() ) { + TQListViewItem *pi = toParents.top(); + TQListViewItem *ni = 0; + if ( pi ) + ni = new TQListViewItem( pi, toLasts.top() ); + else + ni = new TQListViewItem( to, toLasts.top() ); + for ( int c = 0; c < cols; ++c ) { + ni->setText( c, i->text( c ) ); + if ( i->pixmap( c ) ) + ni->setPixmap( c, *i->pixmap( c ) ); + } + toLasts.pop(); + toLasts.push( ni ); + if ( pi ) + pi->setOpen( TRUE ); + } else { + if ( i->parent() == fromLast ) { + fromParents.push( fromLast ); + toParents.push( toLasts.top() ); + toLasts.push( 0 ); + TQListViewItem *pi = toParents.top(); + TQListViewItem *ni = 0; + if ( pi ) + ni = new TQListViewItem( pi ); + else + ni = new TQListViewItem( to ); + for ( int c = 0; c < cols; ++c ) { + ni->setText( c, i->text( c ) ); + if ( i->pixmap( c ) ) + ni->setPixmap( c, *i->pixmap( c ) ); + } + toLasts.pop(); + toLasts.push( ni ); + if ( pi ) + pi->setOpen( TRUE ); + } else { + while ( fromParents.top() != i->parent() ) { + fromParents.pop(); + toParents.pop(); + toLasts.pop(); + } + + TQListViewItem *pi = toParents.top(); + TQListViewItem *ni = 0; + if ( pi ) + ni = new TQListViewItem( pi, toLasts.top() ); + else + ni = new TQListViewItem( to, toLasts.top() ); + for ( int c = 0; c < cols; ++c ) { + ni->setText( c, i->text( c ) ); + if ( i->pixmap( c ) ) + ni->setPixmap( c, *i->pixmap( c ) ); + } + if ( pi ) + pi->setOpen( TRUE ); + toLasts.pop(); + toLasts.push( ni ); + } + } + fromLast = i; + } +} + + + +// ------------------------------------------------------------ + +PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw, + TQTextEdit *mle, const TQString &txt ) + : Command( n, fw ), newText( txt ), mlined( mle ) +{ + oldText = mlined->text(); + wasChanged = MetaDataBase::isPropertyChanged( TQT_TQOBJECT(mlined), "text" ); +} + +void PopulateMultiLineEditCommand::execute() +{ + mlined->setText( newText ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", TRUE ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); +} + +void PopulateMultiLineEditCommand::unexecute() +{ + mlined->setText( oldText ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", wasChanged ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); +} + +// ------------------------------------------------------------ + +PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t, + const TQValueList &rows, + const TQValueList &columns ) + : Command( n, fw ), newRows( rows ), newColumns( columns ), table( t ) +{ +#ifndef TQT_NO_TABLE + int i = 0; + TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { + PopulateTableCommand::Column col; + col.text = table->horizontalHeader()->label( i ); + if ( table->horizontalHeader()->iconSet( i ) ) + col.pix = table->horizontalHeader()->iconSet( i )->pixmap(); + col.field = *columnFields.find( col.text ); + oldColumns.append( col ); + } + for ( i = 0; i < table->verticalHeader()->count(); ++i ) { + PopulateTableCommand::Row row; + row.text = table->verticalHeader()->label( i ); + if ( table->verticalHeader()->iconSet( i ) ) + row.pix = table->verticalHeader()->iconSet( i )->pixmap(); + oldRows.append( row ); + } +#endif +} + +void PopulateTableCommand::execute() +{ +#ifndef TQT_NO_TABLE + TQMap columnFields; + table->setNumCols( newColumns.count() ); + int i = 0; + for ( TQValueList::Iterator cit = newColumns.begin(); cit != newColumns.end(); ++cit, ++i ) { + table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text ); + if ( !(*cit).field.isEmpty() ) + columnFields.insert( (*cit).text, (*cit).field ); + } + MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); + table->setNumRows( newRows.count() ); + i = 0; + for ( TQValueList::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i ) + table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text ); +#endif +} + +void PopulateTableCommand::unexecute() +{ +#ifndef TQT_NO_TABLE + TQMap columnFields; + table->setNumCols( oldColumns.count() ); + int i = 0; + for ( TQValueList::Iterator cit = oldColumns.begin(); cit != oldColumns.end(); ++cit, ++i ) { + table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text ); + if ( !(*cit).field.isEmpty() ) + columnFields.insert( (*cit).text, (*cit).field ); + } + MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); + table->setNumRows( oldRows.count() ); + i = 0; + for ( TQValueList::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i ) + table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text ); +#endif +} + +// ------------------------------------------------------------ + +AddActionToToolBarCommand::AddActionToToolBarCommand( const TQString &n, FormWindow *fw, + TQAction *a, QDesignerToolBar *tb, int idx ) + : Command( n, fw ), action( a ), toolBar( tb ), index( idx ) +{ +} + +void AddActionToToolBarCommand::execute() +{ + action->addTo( toolBar ); + + if ( ::tqqt_cast(action) ) { + TQString s = ( (QDesignerAction*)action )->widget()->name(); + if ( s.startsWith( "qt_dead_widget_" ) ) { + s.remove( 0, TQString( "qt_dead_widget_" ).length() ); + ( (QDesignerAction*)action )->widget()->setName( s ); + } + toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action ); + ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar ); + } else if ( ::tqqt_cast(action) ) { + if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) { + toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action ); + ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); + } + } else if ( ::tqqt_cast(action) ) { + toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action ); + ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar ); + } + if ( !::tqqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { + if ( index == -1 ) + toolBar->appendAction( action ); + else + toolBar->insertAction( index, action ); + toolBar->reInsert(); + TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + } else { + TQObjectList clo = action->childrenListObject(); + if ( !clo.isEmpty() ) { + TQObjectListIt it( clo ); + int i = 0; + while ( it.current() ) { + TQObject *o = it.current(); + ++it; + if ( !::tqqt_cast(o) ) + continue; + // ### fix it for nested actiongroups + if ( ::tqqt_cast(o) ) { + QDesignerAction *ac = (QDesignerAction*)o; + toolBar->insertAction( ac->widget(), ac ); + ac->widget()->installEventFilter( toolBar ); + if ( index == -1 ) + toolBar->appendAction( ac ); + else + toolBar->insertAction( index + (i++), ac ); + } + TQObject::connect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + } + } + toolBar->reInsert(); + TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + } + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void AddActionToToolBarCommand::unexecute() +{ + if ( ::tqqt_cast(action) ) { + TQString s = ( (QDesignerAction*)action )->widget()->name(); + s.prepend( "qt_dead_widget_" ); + ( (QDesignerAction*)action )->widget()->setName( s ); + } + + toolBar->removeAction( action ); + action->removeFrom( toolBar ); + TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + if ( !::tqqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { + action->removeEventFilter( toolBar ); + } else { + TQObjectList clo = action->childrenListObject(); + if ( !clo.isEmpty() ) { + TQObjectListIt it( clo ); + while ( it.current() ) { + TQObject *o = it.current(); + ++it; + if ( !::tqqt_cast(o) ) + continue; + if ( ::tqqt_cast(o) ) { + o->removeEventFilter( toolBar ); + toolBar->removeAction( (TQAction*)o ); + } + TQObject::disconnect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + } + } + } + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +AddToolBarCommand::AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw ) + : Command( n, fw ), toolBar( 0 ), mainWindow( mw ) +{ +} + +void AddToolBarCommand::execute() +{ + if ( !toolBar ) { + toolBar = new QDesignerToolBar( mainWindow ); + TQString n = "Toolbar"; + formWindow()->unify( TQT_TQOBJECT(toolBar), n, TRUE ); + toolBar->setName( n ); + mainWindow->addToolBar( toolBar, n ); + } else { + toolBar->show(); + TQString s = toolBar->name(); + s.remove( 0, TQString( "qt_dead_widget_" ).length() ); + toolBar->setName( s ); + } + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void AddToolBarCommand::unexecute() +{ + toolBar->hide(); + TQString s = toolBar->name(); + s.prepend( "qt_dead_widget_" ); + toolBar->setName( s ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS +AddContainerPageCommand::AddContainerPageCommand( const TQString &n, FormWindow *fw, + TQWidget *c, const TQString &label ) + : Command( n, fw ), container( c ), index( -1 ), pageLabel( label ), page( 0 ) +{ + WidgetInterface *iface = 0; + widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); + if ( !iface ) + return; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); + if ( !wiface ) + return; + wClassName = WidgetFactory::classNameOf( container ); +} + +AddContainerPageCommand::~AddContainerPageCommand() +{ + if ( wiface ) + wiface->release(); +} + +void AddContainerPageCommand::execute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + if ( index == -1 ) + index = wiface->count( wClassName, container ); + if ( !page ) + page = wiface->addPage( wClassName, container, pageLabel, index ); + else + wiface->insertPage( wClassName, container, pageLabel, index, page ); + + MetaDataBase::addEntry( page ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} + +void AddContainerPageCommand::unexecute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + wiface->removePage( wClassName, container, index ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} + +// ------------------------------------------------------------ + +DeleteContainerPageCommand::DeleteContainerPageCommand( const TQString &n, FormWindow *fw, + TQWidget *c, int idx ) + : Command( n, fw ), container( c ), index( idx ) +{ + WidgetInterface *iface = 0; + widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); + if ( !iface ) + return; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); + if ( !wiface ) + return; + wClassName = WidgetFactory::classNameOf( container ); + page = wiface->page( wClassName, container, index ); + pageLabel = wiface->pageLabel( wClassName, container, index ); +} + +DeleteContainerPageCommand::~DeleteContainerPageCommand() +{ + if ( wiface ) + wiface->release(); +} + +void DeleteContainerPageCommand::execute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + + wiface->removePage( wClassName, container, index ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} + +void DeleteContainerPageCommand::unexecute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + if ( index == -1 ) + index = wiface->count( wClassName, container ); + + wiface->insertPage( wClassName, container, pageLabel, index, page ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} + +// ------------------------------------------------------------ + +RenameContainerPageCommand::RenameContainerPageCommand( const TQString &n, FormWindow *fw, + TQWidget *c, int idx, + const TQString &label ) + : Command( n, fw ), container( c ), index( idx ), newLabel( label ) +{ + WidgetInterface *iface = 0; + widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); + if ( !iface ) + return; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); + if ( !wiface ) + return; + wClassName = WidgetFactory::classNameOf( container ); + oldLabel = wiface->pageLabel( wClassName, container, index ); +} + +RenameContainerPageCommand::~RenameContainerPageCommand() +{ + if ( wiface ) + wiface->release(); +} + +void RenameContainerPageCommand::execute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + wiface->renamePage( wClassName, container, index, newLabel ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} + +void RenameContainerPageCommand::unexecute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + wiface->renamePage( wClassName, container, index, oldLabel ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} +#endif // TQT_CONTAINER_CUSTOM_WIDGETS +// ------------------------------------------------------------ + +AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n, + FormWindow *fw, + PopupMenuEditor *m, + PopupMenuEditorItem *i, + int idx ) + : Command( n, fw ), menu( m ), item( i ), index( idx ) +{ } + +void AddActionToPopupCommand::execute() +{ + menu->insert( item, index ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void AddActionToPopupCommand::unexecute() +{ + item->hideMenu(); + int i = menu->find( item->action() ); + menu->remove( i ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +RemoveActionFromPopupCommand::RemoveActionFromPopupCommand( const TQString &n, + FormWindow *fw, + PopupMenuEditor *m, + int idx ) + : AddActionToPopupCommand( n, fw, m, 0, idx ) +{ + item = menu->at( index ); +} + +void RemoveActionFromPopupCommand::execute() +{ + AddActionToPopupCommand::unexecute(); +} + +void RemoveActionFromPopupCommand::unexecute() +{ + AddActionToPopupCommand::execute(); +} + +// ------------------------------------------------------------ + +ExchangeActionInPopupCommand::ExchangeActionInPopupCommand( const TQString &n, + FormWindow *fw, + PopupMenuEditor *m, + int a, + int b ) + : Command( n, fw ), menu( m ), c( a ), d( b ) +{ } + +void ExchangeActionInPopupCommand::execute() +{ + menu->exchange( c, d ); +} + +void ExchangeActionInPopupCommand::unexecute() +{ + execute(); +} + +// ------------------------------------------------------------ + +ActionEditor *ActionCommand::actionEditor() +{ + // FIXME: handle multiple action editors + return (ActionEditor *) formWindow()->mainWindow()->child( 0, "ActionEditor" ); +} + +// ------------------------------------------------------------ + +RenameActionCommand::RenameActionCommand( const TQString &n, + FormWindow *fw, + TQAction *a, + PopupMenuEditor *m, + TQString nm ) + : ActionCommand( n, fw, a ), menu( m ), newName( nm ) +{ + oldName = action->menuText(); +} + +void RenameActionCommand::execute() +{ + TQString actionText = newName; + actionText.replace("&&", "&"); + TQString menuText = newName; + action->setText( actionText ); + action->setMenuText( menuText ); + + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void RenameActionCommand::unexecute() +{ + action->setMenuText( oldName ); + action->setText( oldName ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +SetActionIconsCommand::SetActionIconsCommand( const TQString &n, + FormWindow *fw, + TQAction *a, + PopupMenuEditor *m, + TQIconSet &icons ) + : ActionCommand( n, fw, a ), menu( m ), newIcons( icons ) +{ + oldIcons = a->iconSet(); +} + +void SetActionIconsCommand::execute() +{ + action->setIconSet( newIcons ); + ActionEditor *ae = actionEditor(); + if ( ae ) + ae->updateActionIcon( action ); + MetaDataBase::setPropertyChanged( action, "iconSet", TRUE ); +} + +void SetActionIconsCommand::unexecute() +{ + action->setIconSet( oldIcons ); + ActionEditor *ae = actionEditor(); + if ( ae ) + ae->updateActionIcon( action ); + MetaDataBase::setPropertyChanged( action, "iconSet", TRUE ); +} + +// ------------------------------------------------------------ + +AddMenuCommand::AddMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + MenuBarEditorItem *i, + int idx ) + : Command( n, fw ), mb( b ), item( i ), name( 0 ), index( idx ) +{ } + +AddMenuCommand::AddMenuCommand( const TQString &n, + FormWindow *fw, + TQMainWindow *mw, + const TQString &nm ) + : Command( n, fw ), mb( 0 ), item( 0 ), name( nm ), index( -1 ) +{ + if ( mw ) + mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); +} + +void AddMenuCommand::execute() +{ + TQString n; + TQMainWindow *mw = (TQMainWindow*)formWindow()->mainContainer(); + if ( !mb ) { + mb = new MenuBarEditor( formWindow(), mw ); + mb->setName( "MenuBarEditor" ); + formWindow()->insertWidget( mb, TRUE ); + } + if ( !item ) { + PopupMenuEditor *popup = new PopupMenuEditor( formWindow(), mw ); + popup->setName( "PopupMenuEditor" ); + formWindow()->insertWidget( popup, TRUE ); + mb->insertItem( name, popup, index ); + index = mb->findItem( popup ); + item = mb->item( index ); + } else { + PopupMenuEditor *popup = item->menu(); + popup->setName( item->menuText() ); + formWindow()->insertWidget( popup, TRUE ); + mb->insertItem( item, index ); + } + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void AddMenuCommand::unexecute() +{ + if ( !item ) { + tqWarning( "The AddMenuCommand was created without a menu item." ); + return; + } + item->menu()->hide(); + int i = mb->findItem( item ); + formWindow()->removeWidget( item->menu() ); + mb->removeItemAt( i ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +RemoveMenuCommand::RemoveMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + int idx ) + : AddMenuCommand( n, fw, b, 0, idx ) +{ + item = mb->item( index ); +} + +void RemoveMenuCommand::execute() +{ + mb->hideItem( index ); + AddMenuCommand::unexecute(); +} + +void RemoveMenuCommand::unexecute() +{ + AddMenuCommand::execute(); +} + +// ------------------------------------------------------------ + +ExchangeMenuCommand::ExchangeMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + int i, + int j ) + : Command( n, fw ), bar( b ), k( i ), l( j ) +{ } + +void ExchangeMenuCommand::execute() +{ + bar->exchange( k, l ); +} + +void ExchangeMenuCommand::unexecute() +{ + execute(); +} + +// ------------------------------------------------------------ + +MoveMenuCommand::MoveMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + int i, + int j ) + : Command( n, fw ), bar( b ), from( i ), to( j ) +{ } + +void MoveMenuCommand::execute() +{ + bar->hideItem( from ); + MenuBarEditorItem * i = bar->item( from ); + bar->removeItemAt( from ); + int t = ( from > to ? to : to - 1 ); + bar->insertItem( i, t ); +} + +void MoveMenuCommand::unexecute() +{ + bar->hideItem( to ); + int t = ( from > to ? to : to - 1 ); + MenuBarEditorItem * i = bar->item( t ); + bar->removeItemAt( t ); + bar->insertItem( i, from ); +} + +// ------------------------------------------------------------ + +RenameMenuCommand::RenameMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + TQString nm, + MenuBarEditorItem *i ) + : Command( n, fw ), bar( b ), item( i ), newName( nm ) +{ + oldName = item->menu()->name(); +} + +TQString RenameMenuCommand::makeLegal( const TQString &str ) +{ + // remove illegal characters + TQString d; + char c = 0, i = 0; + while ( !str.at(i).isNull() ) { + c = str.at(i).latin1(); + if ( c == '-' || c == ' ' ) + d += '_'; + else if ( ( c >= '0' && c <= '9') || ( c >= 'A' && c <= 'Z' ) + || c == '_' || ( c >= 'a' && c <= 'z' ) ) + d += c; + ++i; + } + return d; +} + +void RenameMenuCommand::execute() +{ + PopupMenuEditor *popup = item->menu(); + item->setMenuText( newName ); + TQString legal = makeLegal( newName ); + formWindow()->unify( TQT_TQOBJECT(popup), legal, TRUE ); + popup->setName( legal ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void RenameMenuCommand::unexecute() +{ + PopupMenuEditor *popup = item->menu(); + item->setMenuText( oldName ); + popup->setName( oldName ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw, + TQToolBox *tw, const TQString &label ) + : Command( n, fw ), toolBox( tw ), toolBoxLabel( label ) +{ + toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" ); + toolBoxPage->hide(); + index = -1; + MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) ); +} + +void AddToolBoxPageCommand::execute() +{ + index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel); + toolBox->setCurrentIndex( index ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void AddToolBoxPageCommand::unexecute() +{ + toolBox->removeItem( toolBoxPage ); + toolBoxPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +DeleteToolBoxPageCommand::DeleteToolBoxPageCommand( const TQString &n, FormWindow *fw, + TQToolBox *tw, TQWidget *page ) + : Command( n, fw ), toolBox( tw ), toolBoxPage( page ) +{ + toolBoxLabel = toolBox->itemLabel( toolBox->currentIndex() ); + index = toolBox->currentIndex(); +} + +void DeleteToolBoxPageCommand::execute() +{ + toolBox->removeItem( toolBoxPage ); + toolBoxPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void DeleteToolBoxPageCommand::unexecute() +{ + index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel ); + toolBox->setCurrentIndex( index ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} diff --git a/kdevdesigner/designer/command.h b/kdevdesigner/designer/command.h new file mode 100644 index 00000000..b1c7a2a5 --- /dev/null +++ b/kdevdesigner/designer/command.h @@ -0,0 +1,1260 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef COMMAND_H +#define COMMAND_H + +#include "metadatabase.h" +#include "layout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class TQWizard; +class TQTabWidget; +class Command; +class TQWidget; +class FormWindow; +class PropertyEditor; +class TQListBox; +class TQIconView; +class TQTable; +class TQAction; +class QDesignerToolBar; +class TQMainWindow; +class TQTextEdit; +struct LanguageInterface; +class TQToolBox; + +class MenuBarEditor; +class MenuBarEditorItem; +class PopupMenuEditor; +class PopupMenuEditorItem; +class ActionEditor; + +class Command : public TQt +{ +public: + Command( const TQString &n, FormWindow *fw ); + virtual ~Command(); + + enum Type { + Resize, + Insert, + Move, + Delete, + SetProperty, + LayoutHorizontal, + LayoutVertical, + LayoutHorizontalSplitter, + LayoutVerticalSplitter, + LayoutGrid, + BreakLayout, + Macro, + AddTabPage, + DeleteTabPage, + MoveTabPage, + AddWidgetStackPage, + DeleteWidgetStackPage, + AddWizardPage, + DeleteWizardPage, + SwapWizardPages, + MoveWizardPage, + RenameWizardPage, + AddConnection, + RemoveConnection, + Lower, + Raise, + Paste, + TabOrder, + PopulateListBox, + PopulateIconView, + PopulateListView, + PopulateMultiLineEdit, + PopulateTable, + AddActionToToolBar, + RemoveActionFromToolBar, + AddToolBar, + RemoveToolBar, + AddFunction, + ChangeFunctionAttrib, + RemoveFunction, + AddVariable, + SetVariables, + RemoveVariable, + EditDefinitions, + AddContainerPage, + DeleteContainerPage, + RenameContainerPage, + AddActionToPopup, + RemoveActionFromPopup, + ExchangeActionInPopup, + //MoveActionInPopup, + RenameAction, + SetActionIcons, + AddMenu, + RemoveMenu, + ExchangeMenu, + MoveMenu, + RenameMenu, + AddToolBoxPage, + DeleteToolBoxPage + }; + + TQString name() const; + + virtual void execute() = 0; + virtual void unexecute() = 0; + virtual Type type() const = 0; + virtual void merge( Command *c ); + virtual bool canMerge( Command *c ); + + FormWindow *formWindow() const; + +private: + TQString cmdName; + FormWindow *formWin; + +}; + +class CommandHistory : public TQObject +{ + Q_OBJECT + + +public: + CommandHistory( int s ); + + void addCommand( Command *cmd, bool tryCompress = FALSE ); + void undo(); + void redo(); + + void emitUndoRedo(); + + void setModified( bool m ); + bool isModified() const; + +public slots: + void checkCompressedCommand(); + +signals: + void undoRedoChanged( bool undoAvailable, bool redoAvailable, + const TQString &undoCmd, const TQString &redoCmd ); + void modificationChanged( bool m ); + +private: + TQPtrList history; + int current, steps; + bool modified; + int savedAt; + Command *compressedCommand; + +}; + +class ResizeCommand : public Command +{ +public: + ResizeCommand( const TQString &n, FormWindow *fw, + TQWidget *w, const TQRect &oldr, const TQRect &nr ); + + void execute(); + void unexecute(); + Type type() const { return Resize; } + +private: + TQWidget *widget; + TQRect oldRect, newRect; + +}; + +class InsertCommand : public Command +{ +public: + InsertCommand( const TQString &n, FormWindow *fw, TQWidget *w, const TQRect &g ); + + void execute(); + void unexecute(); + Type type() const { return Insert; } + +private: + TQWidget *widget; + TQRect geometry; + +}; + +class MoveCommand : public Command +{ +public: + MoveCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &w, + const TQValueList op, + const TQValueList np, + TQWidget *opr, TQWidget *npr ); + void execute(); + void unexecute(); + Type type() const { return Move; } + void merge( Command *c ); + bool canMerge( Command *c ); + +private: + TQWidgetList widgets; + TQValueList oldPos, newPos; + TQWidget *oldParent, *newParent; + +}; + +class DeleteCommand : public Command +{ +public: + DeleteCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &w ); + void execute(); + void unexecute(); + Type type() const { return Delete; } + +private: + TQWidgetList widgets; + TQMap< TQWidget*, TQValueList > connections; + +}; + +class SetPropertyCommand : public Command +{ +public: + SetPropertyCommand( const TQString &n, FormWindow *fw, + TQObject *w, PropertyEditor *e, + const TQString &pn, const TQVariant &ov, + const TQVariant &nv, const TQString &ncut, + const TQString &ocut, + bool reset = FALSE ); + + void execute(); + void unexecute(); + Type type() const { return SetProperty; } + void merge( Command *c ); + bool canMerge( Command *c ); + bool checkProperty(); + +private: + void setProperty( const TQVariant &v, const TQString ¤tItemText, bool select = TRUE ); + + TQGuardedPtr widget; + PropertyEditor *editor; + TQString propName; + TQVariant oldValue, newValue; + TQString oldCurrentItemText, newCurrentItemText; + bool wasChanged; + bool isResetCommand; + +}; + +class LayoutHorizontalCommand : public Command +{ +public: + LayoutHorizontalCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ); + + void execute(); + void unexecute(); + Type type() const { return LayoutHorizontal; } + +private: + HorizontalLayout layout; + +}; + +class LayoutHorizontalSplitCommand : public Command +{ +public: + LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ); + + void execute(); + void unexecute(); + Type type() const { return LayoutHorizontalSplitter; } + +private: + HorizontalLayout layout; + +}; + +class LayoutVerticalCommand : public Command +{ +public: + LayoutVerticalCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ); + + void execute(); + void unexecute(); + Type type() const { return LayoutVertical; } + +private: + VerticalLayout layout; + +}; + +class LayoutVerticalSplitCommand : public Command +{ +public: + LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ); + + void execute(); + void unexecute(); + Type type() const { return LayoutVerticalSplitter; } + +private: + VerticalLayout layout; + +}; + +class LayoutGridCommand : public Command +{ +public: + LayoutGridCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl, int xres, int yres ); + + void execute(); + void unexecute(); + Type type() const { return LayoutGrid; } + +private: + GridLayout layout; + +}; + +class BreakLayoutCommand : public Command +{ +public: + BreakLayoutCommand( const TQString &n, FormWindow *fw, + TQWidget *layoutBase, const TQWidgetList &wl ); + + void execute(); + void unexecute(); + Type type() const { return BreakLayout; } + +private: + Layout *layout; + int spacing; + int margin; + TQWidget *lb; + TQWidgetList widgets; + +}; + +class MacroCommand : public Command +{ +public: + MacroCommand( const TQString &n, FormWindow *fw, + const TQPtrList &cmds ); + + void execute(); + void unexecute(); + Type type() const { return Macro; } + +private: + TQPtrList commands; + +}; + +class AddTabPageCommand : public Command +{ +public: + AddTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, const TQString &label ); + + void execute(); + void unexecute(); + Type type() const { return AddTabPage; } + +private: + TQTabWidget *tabWidget; + int index; + TQWidget *tabPage; + TQString tabLabel; + +}; + +class DeleteTabPageCommand : public Command +{ +public: + DeleteTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, TQWidget *page ); + + void execute(); + void unexecute(); + Type type() const { return DeleteTabPage; } + +private: + TQTabWidget *tabWidget; + int index; + TQWidget *tabPage; + TQString tabLabel; + +}; + +class MoveTabPageCommand : public Command +{ +public: + MoveTabPageCommand(const TQString &n, FormWindow *fw, + TQTabWidget *tw, TQWidget *page, const TQString& label, int nIndex, int oIndex ); + + void execute(); + void unexecute(); + Type type() const { return MoveTabPage; } + +private: + TQTabWidget *tabWidget; + int newIndex, oldIndex; + TQWidget *tabPage; + TQString tabLabel; + +}; +class QDesignerWidgetStack; +class AddWidgetStackPageCommand : public Command +{ +public: + AddWidgetStackPageCommand( const TQString &n, FormWindow *fw, + QDesignerWidgetStack *ws ); + + void execute(); + void unexecute(); + Type type() const { return AddWidgetStackPage; } + +private: + QDesignerWidgetStack *widgetStack; + int index; + TQWidget *stackPage; +}; + +class DeleteWidgetStackPageCommand : public Command +{ +public: + DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw, + QDesignerWidgetStack *ws, TQWidget *page ); + + void execute(); + void unexecute(); + Type type() const { return DeleteWidgetStackPage; } + +private: + QDesignerWidgetStack *widgetStack; + int index; + TQWidget *stackPage; +}; + + + +class AddWizardPageCommand : public Command +{ +public: + AddWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, const TQString &label, int index = -1, bool show = TRUE ); + + void execute(); + void unexecute(); + Type type() const { return AddWizardPage; } + +private: + TQWizard *wizard; + int index; + bool show; + TQWidget *page; + TQString pageLabel; + +}; + +class DeleteWizardPageCommand : public Command +{ +public: + DeleteWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int index, bool show = TRUE ); + + void execute(); + void unexecute(); + Type type() const { return DeleteWizardPage; } + +private: + TQWizard *wizard; + int index; + bool show; + TQWidget *page; + TQString pageLabel; + +}; + +class RenameWizardPageCommand : public Command +{ +public: + RenameWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int index, const TQString& name ); + + void execute(); + void unexecute(); + Type type() const { return RenameWizardPage; } + +private: + TQWizard *wizard; + int index; + TQWidget *page; + TQString label; + +}; + +class SwapWizardPagesCommand : public Command +{ +public: + SwapWizardPagesCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int index1, int index2 ); + + void execute(); + void unexecute(); + Type type() const { return SwapWizardPages; } + +private: + TQWizard *wizard; + int index1, index2; + +}; + +class MoveWizardPageCommand : public Command +{ +public: + MoveWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int index1, int index2 ); + + void execute(); + void unexecute(); + Type type() const { return MoveWizardPage; } + +private: + TQWizard *wizard; + int index1, index2; + +}; + +class AddConnectionCommand : public Command +{ +public: + AddConnectionCommand( const TQString &name, FormWindow *fw, + MetaDataBase::Connection c ); + + void execute(); + void unexecute(); + Type type() const { return AddConnection; } + +private: + MetaDataBase::Connection connection; + +}; + +class RemoveConnectionCommand : public Command +{ +public: + RemoveConnectionCommand( const TQString &name, FormWindow *fw, + MetaDataBase::Connection c ); + + void execute(); + void unexecute(); + Type type() const { return RemoveConnection; } + +private: + MetaDataBase::Connection connection; + +}; + + +class AddFunctionCommand : public Command +{ +public: + AddFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, const TQString& spec, + const TQString &a, const TQString &t, const TQString &l, const TQString &rt ); + + void execute(); + void unexecute(); + Type type() const { return AddFunction; } + +private: + TQCString function; + TQString specifier; + TQString access; + TQString functionType; + TQString language; + TQString returnType; +}; + +class ChangeFunctionAttribCommand : public Command +{ +public: + ChangeFunctionAttribCommand( const TQString &name, FormWindow *fw, MetaDataBase::Function f, + const TQString &on, const TQString &os, const TQString &oa, + const TQString &ot, const TQString &ol, const TQString &ort ); + + void execute(); + void unexecute(); + Type type() const { return ChangeFunctionAttrib; } + +private: + TQString oldName, newName; + TQString oldSpec, newSpec; + TQString oldAccess, newAccess; + TQString oldType, newType; + TQString oldLang, newLang; + TQString oldReturnType, newReturnType; +}; + +class RemoveFunctionCommand : public Command +{ +public: + RemoveFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, const TQString& spec, + const TQString &a, const TQString &t, const TQString &l, const TQString &rt ); + + void execute(); + void unexecute(); + Type type() const { return RemoveFunction; } + +private: + TQCString function; + TQString specifier; + TQString access; + TQString functionType; + TQString language; + TQString returnType; +}; + +class AddVariableCommand : public Command +{ +public: + AddVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn, const TQString &a ); + void execute(); + void unexecute(); + Type type() const { return AddVariable; } + +private: + TQString varName; + TQString access; +}; + +class SetVariablesCommand : public Command +{ +public: + SetVariablesCommand( const TQString &name, FormWindow *fw, TQValueList lst ); + void execute(); + void unexecute(); + Type type() const { return SetVariables; } + +private: + TQValueList oldList, newList; +}; + +class RemoveVariableCommand : public Command +{ +public: + RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn ); + void execute(); + void unexecute(); + Type type() const { return RemoveVariable; } + +private: + TQString varName; + TQString access; +}; + +class EditDefinitionsCommand : public Command +{ +public: + EditDefinitionsCommand( const TQString &name, FormWindow *fw, LanguageInterface *lf, + const TQString &n, const TQStringList &l ); + void execute(); + void unexecute(); + Type type() const { return EditDefinitions; } + +private: + LanguageInterface *lIface; + TQString defName; + TQStringList newList, oldList; +}; + +class LowerCommand : public Command +{ +public: + LowerCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ); + + void execute(); + void unexecute(); + Type type() const { return Lower; } + +private: + TQWidgetList widgets; + +}; + +class RaiseCommand : public Command +{ +public: + RaiseCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ); + + void execute(); + void unexecute(); + Type type() const { return Raise; } + +private: + TQWidgetList widgets; + +}; + +class PasteCommand : public Command +{ +public: + PasteCommand( const TQString &n, FormWindow *fw, const TQWidgetList &w ); + + void execute(); + void unexecute(); + Type type() const { return Paste; } + +private: + TQWidgetList widgets; + +}; + +class TabOrderCommand : public Command +{ +public: + TabOrderCommand( const TQString &n, FormWindow *fw, const TQWidgetList &ol, const TQWidgetList &nl ); + + void execute(); + void unexecute(); + Type type() const { return TabOrder; } + void merge( Command *c ); + bool canMerge( Command *c ); + +private: + TQWidgetList oldOrder, newOrder; + +}; + +class PopulateListBoxCommand : public Command +{ +public: + struct Item + { + TQString text; + TQPixmap pix; + TQ_DUMMY_COMPARISON_OPERATOR( Item ) + }; + + PopulateListBoxCommand( const TQString &n, FormWindow *fw, + TQListBox *lb, const TQValueList &items ); + void execute(); + void unexecute(); + Type type() const { return PopulateListBox; } + + bool operator==( const PopulateListBoxCommand & ) const; + +private: + TQValueList oldItems, newItems; + TQListBox *listbox; + +}; + +class PopulateIconViewCommand : public Command +{ +public: + struct Item + { + TQString text; + TQPixmap pix; + TQ_DUMMY_COMPARISON_OPERATOR( Item ) + }; + + PopulateIconViewCommand( const TQString &n, FormWindow *fw, + TQIconView *iv, const TQValueList &items ); + void execute(); + void unexecute(); + Type type() const { return PopulateIconView; } + + bool operator==( const PopulateIconViewCommand & ) const; + +private: + TQValueList oldItems, newItems; + TQIconView *iconview; + +}; + +class PopulateListViewCommand : public Command +{ +public: + PopulateListViewCommand( const TQString &n, FormWindow *fw, + TQListView *lv, TQListView *from ); + void execute(); + void unexecute(); + Type type() const { return PopulateListView; } + static void transferItems( TQListView *from, TQListView *to ); + + bool operator==( const PopulateListViewCommand & ) const; + +private: + TQListView *oldItems, *newItems; + TQListView *listview; + +}; + +class PopulateMultiLineEditCommand : public Command +{ +public: + PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw, + TQTextEdit *mle, const TQString &txt ); + void execute(); + void unexecute(); + Type type() const { return PopulateMultiLineEdit; } + +private: + TQString newText, oldText; + TQTextEdit *mlined; + bool wasChanged; + +}; + +class PopulateTableCommand : public Command +{ +public: + struct Row + { + TQString text; + TQPixmap pix; + TQ_DUMMY_COMPARISON_OPERATOR( Row ) + }; + + struct Column + { + TQString text; + TQPixmap pix; + TQString field; + TQ_DUMMY_COMPARISON_OPERATOR( Column ) + }; + + PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t, + const TQValueList &rows, + const TQValueList &columns ); + + void execute(); + void unexecute(); + Type type() const { return PopulateTable; } + +private: + TQValueList oldRows, newRows; + TQValueList oldColumns, newColumns; + TQTable *table; + +}; + +class AddActionToToolBarCommand : public Command +{ +public: + AddActionToToolBarCommand( const TQString &n, FormWindow *fw, + TQAction *a, QDesignerToolBar *tb, int idx ); + + void execute(); + void unexecute(); + Type type() const { return AddActionToToolBar; } + +private: + TQAction *action; + QDesignerToolBar *toolBar; + int index; + +}; + +class RemoveActionFromToolBarCommand : public AddActionToToolBarCommand +{ +public: + RemoveActionFromToolBarCommand( const TQString &n, FormWindow *fw, + TQAction *a, QDesignerToolBar *tb, int idx ) + : AddActionToToolBarCommand( n, fw, a, tb, idx ) {} + + void execute() { AddActionToToolBarCommand::unexecute(); } + void unexecute() { AddActionToToolBarCommand::execute(); } + Type type() const { return RemoveActionFromToolBar; } + +}; + +// MenuCommands + +class AddToolBarCommand : public Command +{ +public: + AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw ); + + void execute(); + void unexecute(); + Type type() const { return AddToolBar; } + +protected: + QDesignerToolBar *toolBar; + TQMainWindow *mainWindow; + +}; + +class RemoveToolBarCommand : public AddToolBarCommand +{ +public: + RemoveToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, QDesignerToolBar *tb ) + : AddToolBarCommand( n, fw, mw ) { toolBar = tb; } + + void execute() { AddToolBarCommand::unexecute(); } + void unexecute() { AddToolBarCommand::execute(); } + Type type() const { return RemoveToolBar; } + +}; + +struct TQWidgetContainerInterfacePrivate; + +class AddContainerPageCommand : public Command +{ +public: + AddContainerPageCommand( const TQString &n, FormWindow *fw, + TQWidget *c, const TQString &label ); + + ~AddContainerPageCommand(); + + void execute(); + void unexecute(); + Type type() const { return AddContainerPage; } + +private: + TQString wClassName; + TQWidget *container; + int index; + TQString pageLabel; + TQWidget *page; + TQWidgetContainerInterfacePrivate *wiface; + +}; + +class DeleteContainerPageCommand : public Command +{ +public: + DeleteContainerPageCommand( const TQString &n, FormWindow *fw, + TQWidget *container, int index ); + ~DeleteContainerPageCommand(); + + void execute(); + void unexecute(); + Type type() const { return DeleteContainerPage; } + +private: + TQString wClassName; + TQWidget *container; + int index; + TQString pageLabel; + TQWidget *page; + TQWidgetContainerInterfacePrivate *wiface; + +}; + +class RenameContainerPageCommand : public Command +{ +public: + RenameContainerPageCommand( const TQString &n, FormWindow *fw, + TQWidget *container, int index, + const TQString &label ); + ~RenameContainerPageCommand(); + + void execute(); + void unexecute(); + Type type() const { return RenameContainerPage; } + +private: + TQString wClassName; + TQWidget *container; + int index; + TQString oldLabel, newLabel; + TQWidgetContainerInterfacePrivate *wiface; + +}; + +class AddActionToPopupCommand : public Command +{ +public: + AddActionToPopupCommand( const TQString &n, + FormWindow *fw, + PopupMenuEditor *m, + PopupMenuEditorItem *i, + int idx = -1 ); + void execute(); + void unexecute(); + Type type() const { return AddActionToPopup; } +protected: + TQString constructName() const; + PopupMenuEditor *menu; + PopupMenuEditorItem *item; + int index; +private: +}; + +class RemoveActionFromPopupCommand : public AddActionToPopupCommand +{ +public: + RemoveActionFromPopupCommand( const TQString &n, + FormWindow *fw, + PopupMenuEditor *m, + int idx ); + void execute(); + void unexecute(); + Type type() const { return RemoveActionFromPopup; } +protected: +private: +}; + +class ExchangeActionInPopupCommand : public Command +{ +public: + ExchangeActionInPopupCommand( const TQString &n, + FormWindow *fw, + PopupMenuEditor *m, + int a, + int b ); + void execute(); + void unexecute(); + Type type() const { return ExchangeActionInPopup; } +protected: +private: + PopupMenuEditor *menu; + int c; + int d; +}; +/* +class MoveActionInPopupCommand : public Command +{ +public: + MoveActionInPopupCommand( const TQString &n, + FormWindow *fw, + PopupMenuEditor *m, + int a, + int b ); + void execute(); + void unexecute(); + Type type() const { return MoveActionInPopup; } +protected: +private: + PopupMenuEditor *menu; + int from; + int to; +}; +*/ +class ActionCommand : public Command +{ +public: + ActionCommand( const TQString &n, + FormWindow *fw, + TQAction *a ) + : Command( n, fw ), action( a ) { } + virtual Type type() const = 0; +protected: + ActionEditor *actionEditor(); + TQAction *action; +}; + +class RenameActionCommand : public ActionCommand +{ +public: + RenameActionCommand( const TQString &n, + FormWindow *fw, + TQAction *a, + PopupMenuEditor *m, + TQString nm ); + void execute(); + void unexecute(); + Type type() const { return RenameAction; } +private: + PopupMenuEditor *menu; + TQString newName; + TQString oldName; +}; + +class SetActionIconsCommand : public ActionCommand +{ +public: + SetActionIconsCommand( const TQString &n, + FormWindow *fw, + TQAction *a, + PopupMenuEditor *m, + TQIconSet &icons ); + void execute(); + void unexecute(); + Type type() const { return SetActionIcons; } +protected: + void updateActionEditorItem(); +private: + PopupMenuEditor *menu; + TQIconSet newIcons; + TQIconSet oldIcons; +}; + +class AddMenuCommand : public Command +{ +public: + AddMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + MenuBarEditorItem *i, + int idx = -1 ); + + AddMenuCommand( const TQString &n, + FormWindow *fw, + TQMainWindow *mw, + const TQString &nm = "Menu" ); + + void execute(); + void unexecute(); + Type type() const { return AddMenu; } +protected: + MenuBarEditor *mb; + MenuBarEditorItem *item; + TQString name; + int index; +private: +}; + +class RemoveMenuCommand : public AddMenuCommand +{ +public: + RemoveMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + int idx ); + void execute(); + void unexecute(); + Type type() const { return RemoveMenu; } +protected: +private: +}; + +class ExchangeMenuCommand : public Command +{ +public: + ExchangeMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + int i, + int j ); + void execute(); + void unexecute(); + Type type() const { return ExchangeMenu; } +protected: +private: + MenuBarEditor *bar; + int k; + int l; +}; + + +class MoveMenuCommand : public Command +{ +public: + MoveMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + int i, + int j ); + void execute(); + void unexecute(); + Type type() const { return MoveMenu; } +protected: +private: + MenuBarEditor *bar; + int from; + int to; +}; + +class RenameMenuCommand : public Command +{ +public: + RenameMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *m, + TQString nm, + MenuBarEditorItem *i ); + void execute(); + void unexecute(); + Type type() const { return RenameMenu; } + static TQString makeLegal( const TQString &str ); +private: + MenuBarEditor *bar; + MenuBarEditorItem *item; + TQString newName; + TQString oldName; +}; + +class AddToolBoxPageCommand : public Command +{ +public: + AddToolBoxPageCommand( const TQString &n, FormWindow *fw, + TQToolBox *tw, const TQString &label ); + + void execute(); + void unexecute(); + Type type() const { return AddToolBoxPage; } + +private: + TQToolBox *toolBox; + int index; + TQWidget *toolBoxPage; + TQString toolBoxLabel; + +}; + +class DeleteToolBoxPageCommand : public Command +{ +public: + DeleteToolBoxPageCommand( const TQString &n, FormWindow *fw, + TQToolBox *tw, TQWidget *page ); + + void execute(); + void unexecute(); + Type type() const { return DeleteToolBoxPage; } + +private: + TQToolBox *toolBox; + int index; + TQWidget *toolBoxPage; + TQString toolBoxLabel; + +}; + +#endif diff --git a/kdevdesigner/designer/configtoolboxdialog.ui b/kdevdesigner/designer/configtoolboxdialog.ui new file mode 100644 index 00000000..226cdd35 --- /dev/null +++ b/kdevdesigner/designer/configtoolboxdialog.ui @@ -0,0 +1,326 @@ + +ConfigToolboxDialog +********************************************************************* +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + ConfigToolboxDialog + + + + 0 + 0 + 403 + 467 + + + + Configure Toolbox + + + + unnamed + + + + Layout2 + + + + unnamed + + + + Spacer2 + + + Horizontal + + + Expanding + + + + 342 + 0 + + + + + + PushButton3 + + + &OK + + + true + + + + + PushButton4 + + + &Cancel + + + + + + + Layout4 + + + + unnamed + + + + buttonAdd + + + false + + + &Add + + + + + Spacer3 + + + Horizontal + + + Expanding + + + + 111 + 0 + + + + + + + Available Tools + + + true + + + true + + + + listViewTools + + + Extended + + + LastColumn + + + + + + + Layout5 + + + + unnamed + + + + buttonRemove + + + false + + + &Remove + + + + + + Common Widgets Page + + + true + + + true + + + + listViewCommon + + + Extended + + + LastColumn + + + + + buttonDown + + + false + + + + + + "designer_s_down.png" + + + + + Spacer4 + + + Horizontal + + + Expanding + + + + 41 + 0 + + + + + + buttonUp + + + false + + + + + + "designer_s_up.png" + + + + + + + + + buttonAdd + clicked() + ConfigToolboxDialog + addTool() + + + buttonRemove + clicked() + ConfigToolboxDialog + removeTool() + + + buttonUp + clicked() + ConfigToolboxDialog + moveToolUp() + + + buttonDown + clicked() + ConfigToolboxDialog + moveToolDown() + + + listViewTools + clicked(TQListViewItem*) + ConfigToolboxDialog + currentToolChanged(TQListViewItem*) + + + listViewCommon + clicked(TQListViewItem*) + ConfigToolboxDialog + currentCommonToolChanged(TQListViewItem*) + + + PushButton3 + clicked() + ConfigToolboxDialog + accept() + + + PushButton4 + clicked() + ConfigToolboxDialog + reject() + + + PushButton3 + clicked() + ConfigToolboxDialog + ok() + + + listViewTools + doubleClicked(TQListViewItem*) + ConfigToolboxDialog + addTool() + + + + configtoolboxdialog.ui.h + + + addTool() + removeTool() + moveToolUp() + moveToolDown() + currentToolChanged( TQListViewItem * i ) + currentCommonToolChanged( TQListViewItem * i ) + ok() + + + init() + + + myiconloader.h + +BarIcon2 + + + diff --git a/kdevdesigner/designer/configtoolboxdialog.ui.h b/kdevdesigner/designer/configtoolboxdialog.ui.h new file mode 100644 index 00000000..7dcd6530 --- /dev/null +++ b/kdevdesigner/designer/configtoolboxdialog.ui.h @@ -0,0 +1,215 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "mainwindow.h" +#include "widgetaction.h" +#include "listviewdnd.h" +#include + +void ConfigToolboxDialog::init() +{ + listViewTools->setSorting( -1 ); + listViewCommon->setSorting( -1 ); + + ListViewDnd *toolsDnd = new ListViewDnd( listViewTools ); + toolsDnd->setDragMode( ListViewDnd::External | ListViewDnd::NullDrop | ListViewDnd::Flat ); + + ListViewDnd *commonDnd = new ListViewDnd( listViewCommon ); + commonDnd->setDragMode( ListViewDnd::Both | ListViewDnd::Move | ListViewDnd::Flat ); + + TQObject::connect( toolsDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ), + commonDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) ); + TQObject::connect( commonDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ), + commonDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) ); + + TQDict groups; + TQAction *a; + for ( a = MainWindow::self->toolActions.last(); + a; + a = MainWindow::self->toolActions.prev() ) { + TQString grp = ( (WidgetAction*)a )->group(); + TQListViewItem *parent = groups.find( grp ); + if ( !parent ) { + parent = new TQListViewItem( listViewTools ); + parent->setText( 0, grp ); + parent->setOpen( TRUE ); + groups.insert( grp, parent ); + } + TQListViewItem *i = new TQListViewItem( parent ); + i->setText( 0, a->text() ); + i->setPixmap( 0, a->iconSet().pixmap() ); + } + for ( a = MainWindow::self->commonWidgetsPage.last(); a; + a = MainWindow::self->commonWidgetsPage.prev() ) { + TQListViewItem *i = new TQListViewItem( listViewCommon ); + i->setText( 0, a->text() ); + i->setPixmap( 0, a->iconSet().pixmap() ); + } + +} + + +void ConfigToolboxDialog::addTool() +{ + TQListView *src = listViewTools; + + bool addKids = FALSE; + TQListViewItem *nextSibling = 0; + TQListViewItem *nextParent = 0; + TQListViewItemIterator it = src->firstChild(); + for ( ; *it; it++ ) { + // Hit the nextSibling, turn of child processing + if ( (*it) == nextSibling ) + addKids = FALSE; + + if ( (*it)->isSelected() ) { + if ( (*it)->childCount() == 0 ) { + // Selected, no children + TQListViewItem *i = new TQListViewItem( listViewCommon, listViewCommon->lastItem() ); + i->setText( 0, (*it)->text(0) ); + i->setPixmap( 0, *((*it)->pixmap(0)) ); + listViewCommon->setCurrentItem( i ); + listViewCommon->ensureItemVisible( i ); + } else if ( !addKids ) { + // Children processing not set, so set it + // Also find the item were we shall quit + // processing children...if any such item + addKids = TRUE; + nextSibling = (*it)->nextSibling(); + nextParent = (*it)->parent(); + while ( nextParent && !nextSibling ) { + nextSibling = nextParent->nextSibling(); + nextParent = nextParent->parent(); + } + } + } else if ( ((*it)->childCount() == 0) && addKids ) { + // Leaf node, and we _do_ process children + TQListViewItem *i = new TQListViewItem( listViewCommon, listViewCommon->lastItem() ); + i->setText( 0, (*it)->text(0) ); + i->setPixmap( 0, *((*it)->pixmap(0)) ); + listViewCommon->setCurrentItem( i ); + listViewCommon->ensureItemVisible( i ); + } + } +} + + +void ConfigToolboxDialog::removeTool() +{ + TQListViewItemIterator it = listViewCommon->firstChild(); + while ( *it ) { + if ( (*it)->isSelected() ) + delete (*it); + else + it++; + } +} + + +void ConfigToolboxDialog::moveToolUp() +{ + TQListViewItem *next = 0; + TQListViewItem *item = listViewCommon->firstChild(); + for ( int i = 0; i < listViewCommon->childCount(); ++i ) { + next = item->itemBelow(); + if ( item->isSelected() && (i > 0) && !item->itemAbove()->isSelected() ) + item->itemAbove()->moveItem( item ); + item = next; + } +} + + +void ConfigToolboxDialog::moveToolDown() +{ + int count = listViewCommon->childCount(); + TQListViewItem *next = 0; + TQListViewItem *item = listViewCommon->lastItem(); + for ( int i = 0; i < count; ++i ) { + next = item->itemAbove(); + if ( item->isSelected() && (i > 0) && !item->itemBelow()->isSelected() ) + item->moveItem( item->itemBelow() ); + item = next; + } + + // TQListViewItem *item = listViewCommon->firstChild(); + // for ( int i = 0; i < listViewCommon->childCount(); ++i ) { + //if ( item == listViewCommon->currentItem() ) { + // item->moveItem( item->itemBelow() ); + // currentCommonToolChanged( item ); + // break; + //} + //item = item->itemBelow(); + // } +} + + +void ConfigToolboxDialog::currentToolChanged( TQListViewItem *i ) +{ + bool canAdd = FALSE; + TQListViewItemIterator it = listViewTools->firstChild(); + for ( ; *it; it++ ) { + if ( (*it)->isSelected() ) { + canAdd = TRUE; + break; + } + } + buttonAdd->setEnabled( canAdd || ( i && i->isSelected() ) ); +} + + +void ConfigToolboxDialog::currentCommonToolChanged( TQListViewItem *i ) +{ + buttonUp->setEnabled( (bool) (i && i->itemAbove()) ); + buttonDown->setEnabled( (bool) (i && i->itemBelow()) ); + + bool canRemove = FALSE; + TQListViewItemIterator it = listViewCommon->firstChild(); + for ( ; *it; it++ ) { + if ( (*it)->isSelected() ) { + canRemove = TRUE; + break; + } + } + buttonRemove->setEnabled( canRemove || ( i && i->isSelected() ) ); +} + + +void ConfigToolboxDialog::ok() +{ + MainWindow::self->commonWidgetsPage.clear(); + TQListViewItem *item = listViewCommon->firstChild(); + for ( int j = 0; j < listViewCommon->childCount(); item = item->itemBelow(), ++j ) { + TQAction *a = 0; + for ( a = MainWindow::self->toolActions.last(); + a; + a = MainWindow::self->toolActions.prev() ) { + if ( a->text() == item->text( 0 ) ) + break; + } + if ( a ) + MainWindow::self->commonWidgetsPage.insert( j, a ); + } +} diff --git a/kdevdesigner/designer/connectiondialog.ui b/kdevdesigner/designer/connectiondialog.ui new file mode 100644 index 00000000..51995633 --- /dev/null +++ b/kdevdesigner/designer/connectiondialog.ui @@ -0,0 +1,219 @@ + +ConnectionDialog +********************************************************************* +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + ConnectionDialog + + + + 0 + 0 + 600 + 365 + + + + View & Edit Connections + + + + unnamed + + + 11 + + + 6 + + + + PushButton1 + + + &New + + + + + TextLabel1 + + + + 5 + 4 + 0 + 0 + + + + &Connections: + + + connectionsTable + + + + + PushButton2 + + + &Delete + + + + + PushButton3 + + + &Cancel + + + + + PushButton7 + + + &OK + + + true + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + buttonEditSlots + + + &Edit Slots... + + + + + connectionsTable + + + + + + + ConnectionTable +
connectiontable.h
+ + 50 + 50 + + 0 + + 7 + 7 + 0 + 0 + + "image0" +
+
+ + + 789c9597c972e3480e40eff5158ec2ada203cd3549c6c41cbcc9b6bccabbddd1078014bdcb9b6449ee987f9f240072caac9e4357d6c1cf5812890490f4ef3f562e8ff6577efcfeed7d4ad3bb72a5bca5b7951fd5ece969f9c79ffffeebdbf7285a69fec7f14af4fdb76fdf47d39572e5e079326e00c10304f24ff8b9c7d463ee71d9e3aac7e31ed70d67dc2ce1cb9e7cd0e3c957863eaff778d4b3bfe8c97be781a71eaff5f8e82bf37ecfff4dc314364b58fdb966096ff6ecf77af6b70d1771b3841f1b8ef366099ff7ec17bdf8faf7970847cd12f9b2e344f8b563890f5e3a96fda0ea98c45fdc71299c765c354c67c249bb1fcd3a56ff271d8b3d9d1b271a0f1d742c725874acfe9d70eef3a9f65bc2e47fa3f16a7d55411d6a3e4e1b0e03bf349e8171144a7e49ceeb295239cb79c3384ccdff76c7b23f14c269e8ccdfa9716ef6b5b18f407857d88585e57bbf65b39f18971a0fc8fd7b6fc624f723e524f9e3d2b8d4f391d49ba74ae5bed585a3c8e49b1d6b7c929f701ca5e65feac10b9dd967c2519485a9dcaf33ce952110cea3caec23e53830f9863045b5ca79ae1c8741263cec58eb59ed390ecd3e378e8d651e44651c85527f20f51cd55eae5c1b27a1f823b9bf388c0b65b831a6b090fd24be384bc24098a6d65fb5ca29ed58fd5f35eccbaf34ff320f922819ab3e487e93d4b3d6eb9b711d4abda0f44352a685d5f39d709db2ca296c380dd2c238366ee5605c1acb3c96f2d3feff148ed25aeb0d1e955d60fd22f94a63178632df79d5d8fa95971d8b9cee5b8e647ec1d038567b40e1a4d567a9d73475b1f14ecb5a7f2cf94a9d4b343eba304e357e3814ce5c6afd22f33b2d5c6ee7295bb6fc4abda4e40af3f7d972a4f52df79bb223ebff79cb2a2736e650ce470fc2652b67b9cfb4726dff5d195776bead96adbf1e3bd67a9779928ebbfdc898357f34346ee7c3a0658d07359eba5922d7fbaebd3fdd6f6e3c567d96f9e4c22cb4780a63eb7f90f7c525596cf11c1a2791ce9bd8d869bd93e4dba55eaeefc781b1dd17ee1b9b3e4b3e9dcbfcc4107f9fc671a4ef9dcc139765763fa4f6943965947a7355b3c45eceebc65965fb851deb79655e662ecfcddf93716172999759966791f67f689ceb79e9a363951f1b9b3d1e76acf36fcf98544e529fdebc954b3f67d42ce1eb86f3465df3fb2e5c14a5d53b2b53a0f316773ad6f922f32c2fa9cd9fdc6f5e79d6f8768d13ebc79d96559fe47dcd6b8a63cdcfbb71126bfcd21f45e0f5f57dbb357691c63f342e2cbea063d597f7b808c9e6151e1993c573d1b2de0fc8fd1711151a1fdf187324f393671debfe92df22a134d67e93fb2a1cd93c05630ef4fe48f25d641c683de2b171a8f399ef3a56f989b1bd273c6dd9f697f7bcc85b7dca8da348be4f41fabf2838b1f7e9cc38d5f715e4fd2888439b9f53639ba72cf55a701b3f0c8cad3ff9de38b57c4bfd15a5678d6f646cfd87857166ef95f46b51f9fdf57c609cda7b756edcbee7ceb850a671c7faf7809e7fccb9d63b6c1b93d5f7ac63d5d7fcd41c245a8fabc685e68f1f8c49ef93e5bda4c0fbd7f9b16b4c5a9ff060ccf63e4b3d52c889c6433bc685da33195bbfc2bd31dbfc947aa5982bf37fddb1c623f39c7cbbda7c94f889cac4ea4df24f55c9367fe43da47159da3c907ea39ac74ebfdfe5fe39e0dac9f71f4abed87fb02993d42b475562effb5dcb36ff243fec3f3f327d4fd1384db5ffd68c9db1bc579cb6faf8619cdafe321f39f39f33721fb46bec4cfe699c19cf3bd6f3ad1ae7c6f2de71ce2549fe71a9dcc917c685324b7eb8aac6767ff27dc763cf92afd1b4590848c8586285e3deaafc6fd94b61346df5b1c61bbcc53bbcff9bf5808ff884136ff5acfadef70dbee02bbee13b4e71861f38c7052ef1d3af555cc375dcc04d1c6069fae47dbfe2166ee30e0e7117f7701f0ff0108f7084c77882a77886e7788197a6cf3e922baf7d8d018618618c895f293acc30c702478000403831fdd247f90e8c019450610c63a8e1066efd4f15dcc13d3cc0a3d77f8256bff2fa531cc233bcc02bbcc13b4c61061f3087052ce11356c5ff1aac9bfed8ebcf701736bc741306b005dbb00343d8853def611f0ee0d0eb1fc1e827fd0f38861338f5becfe01c2ee0d26b5ec13504de4708d12ffa7388bd2481141c64907bed020f0909604944fc8bfe924a4ca8a231d5e2fb956ee896eee8deeb3fd0e32ffa0b7ac29426f041fed4f442afdee28dde694a33faa0f9aff1d0829618d327add21aadd3066dfafd06b445dbb443c3be3eedd21eed7bfd033aa4231ad1319dd0299dd1395dd0255dfd8dff6b0a28c4042af27fcc907fafc879ed73ff199053f145bfc207463c666062e6d2dfd9d2db2db9a20b1e73cd377cfbe5be4a5fb1eb7cc7f7fcc08ffcc4137ee6177ee5377ee729cff883e7bcf8a91ed8d7f7069ef1923f7995d7789d37789307bc4557bccd3b3ce45ddefba9defc4fbebecfe1fffce305eff1fe4ff50c3ea2015e00f93dd7fcb9beae35ff5bf2da5dbf788b676f71891398c03a8c7a6b1d267effcbfff5e33fe8f7fffcebdb7f01520e2ea3 + + + + + PushButton1 + clicked() + ConnectionDialog + addConnection() + + + PushButton7 + clicked() + ConnectionDialog + okClicked() + + + PushButton3 + clicked() + ConnectionDialog + cancelClicked() + + + PushButton2 + clicked() + ConnectionDialog + deleteClicked() + + + buttonEditSlots + clicked() + ConnectionDialog + editSlots() + + + + tqptrlist.h + connectionitems.h + connectiondialog.ui.h + + + TQPtrList<ConnectionContainer> connections; + TQObject *defaultSender; + TQObject *defaultReceiver; + + + init() + addConnection() + addConnection( TQObject * sender, TQObject * receiver, const TQString & signal, const TQString & slot ) + updateConnectionState( ConnectionContainer * c ) + okClicked() + cancelClicked() + deleteClicked() + editSlots() + setDefault( TQObject * sender, TQObject * receiver ) + updateEditSlotsButton() + updateConnectionContainers() + ensureConnectionVisible() + + +
diff --git a/kdevdesigner/designer/connectiondialog.ui.h b/kdevdesigner/designer/connectiondialog.ui.h new file mode 100644 index 00000000..25a5d5f2 --- /dev/null +++ b/kdevdesigner/designer/connectiondialog.ui.h @@ -0,0 +1,318 @@ +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +** +** If you wish to add, delete or rename slots use TQt Designer which will +** update this file, preserving your code. Create an init() slot in place of +** a constructor, and a destroy() slot in place of a destructor. +*****************************************************************************/ + +#include "mainwindow.h" +#include "formwindow.h" +#include "editfunctionsimpl.h" + +static const char *valid_connection[] = { + "16 14 7 1", + ". c none", + "# c #00c000", + "a c #008000", + "b c #004000", + "c c #000000", + "d c #c0fcc0", + "e c #400000", + "...............d", + "..............d#", + ".............d#a", + "............d#ab", + "...........d#abc", + "..da......d#abc.", + ".d##a....d#abe..", + "cba##a..d#abc...", + ".cba##ad#abe....", + "..eba###abe.....", + "...cba#abc......", + "....cbabc.......", + ".....cec........", + "................" +}; + +static const char * invalid_connection[] = { + "17 18 7 1", + " c None", + ". c #000000", + "+ c #C3C3C3", + "@ c #FFFFFF", + "# c #C00000", + "$ c #FFC0C0", + "% c #FF0000", + " ", + " . ", + " ... ", + " .+.. ", + " ...+@+.. ", + "..+@@@+#.. ", + ".@@@@$#%#.. ", + ".@@$$#%##.. ", + " .$%%%##.... ", + " .%%%##. .. ", + " .%#.. .. ", + " .. .. ", + " .. ", + " .. ", + " .. ", + " .. ", + " ", + " " +}; + +static TQPixmap *invalidConnection = 0; +static TQPixmap *validConnection = 0; + +void ConnectionDialog::init() +{ + connect( connectionsTable, TQT_SIGNAL( currentChanged( int, int ) ), + this, TQT_SLOT( updateEditSlotsButton() ) ); + connect( connectionsTable, TQT_SIGNAL( resorted() ), + this, TQT_SLOT( updateConnectionContainers() ) ); + buttonEditSlots->setEnabled( FALSE ); + + if ( !invalidConnection ) { + invalidConnection = new TQPixmap( invalid_connection ); + validConnection = new TQPixmap( valid_connection ); + } + + TQValueList conns = + MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); + for ( TQValueList::Iterator it = conns.begin(); + it != conns.end(); ++it ) { + ConnectionContainer *c = addConnection( (*it).sender, (*it).receiver, + (*it).signal, (*it).slot ); + c->setModified( FALSE ); + updateConnectionState( c ); + } + + defaultSender = defaultReceiver = 0; + connectionsTable->setCurrentCell( 0, 0 ); +} + +void ConnectionDialog::addConnection() +{ + addConnection( defaultSender, defaultReceiver, TQString(), TQString() ); + ensureConnectionVisible(); +} + +ConnectionContainer *ConnectionDialog::addConnection( TQObject *sender, TQObject *receiver, + const TQString &signal, + const TQString &slot ) +{ + connectionsTable->insertRows( connectionsTable->numRows() ); + + int row = connectionsTable->numRows() - 1; + SenderItem *se; + SignalItem *si; + ReceiverItem *re; + SlotItem *sl; + connectionsTable->setItem( row, 0, + ( se = new SenderItem( connectionsTable, + MainWindow::self->formWindow() ) ) ); + connectionsTable->setItem( row, 1, + ( si = new SignalItem( connectionsTable, + MainWindow::self->formWindow() ) ) ); + connectionsTable->setItem( row, 2, + ( re = new ReceiverItem( connectionsTable, + MainWindow::self->formWindow() ) ) ); + connectionsTable->setItem( row, 3, + ( sl = new SlotItem( connectionsTable, + MainWindow::self->formWindow() ) ) ); + + si->setSender( se ); + re->setSender( se ); + sl->setSender( se ); + se->setSender( se ); + + se->setSignal( si ); + re->setSignal( si ); + sl->setSignal( si ); + si->setSignal( si ); + + se->setReceiver( re ); + si->setReceiver( re ); + sl->setReceiver( re ); + re->setReceiver( re ); + + se->setSlot( sl ); + si->setSlot( sl ); + re->setSlot( sl ); + sl->setSlot( sl ); + + connect( re, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ), + this, TQT_SLOT( updateEditSlotsButton() ) ); + + ConnectionContainer *c = new ConnectionContainer( TQT_TQOBJECT(this), se, si, re, sl, row ); + connections.append( c ); + connect( c, TQT_SIGNAL( changed( ConnectionContainer * ) ), + this, TQT_SLOT( updateConnectionState( ConnectionContainer * ) ) ); + + connectionsTable->setCurrentCell( row, 0 ); + + connectionsTable->verticalHeader()->setLabel( row, *invalidConnection, TQString() ); + + if ( sender ) + se->setSenderEx( sender ); + defaultSender = sender; + if ( receiver ) + re->setReceiverEx( receiver ); + defaultReceiver = receiver; + + if ( !signal.isEmpty() && !slot.isEmpty() ) { + si->setCurrentItem( signal ); + sl->signalChanged( signal ); + sl->setCurrentItem( slot ); + } + + c->setModified( TRUE ); + return c; +} + +void ConnectionDialog::updateConnectionState( ConnectionContainer *c ) +{ + c->repaint(); + if ( c->isValid() ) + connectionsTable->verticalHeader()->setLabel( c->row(), + *validConnection, TQString() ); + else + connectionsTable->verticalHeader()->setLabel( c->row(), + *invalidConnection, TQString() ); +} + + +void ConnectionDialog::okClicked() +{ + TQValueList oldConnections = + MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); + TQPtrList newConnectionCmds; + TQPtrList oldConnectionCmds; + for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) { + MetaDataBase::Connection conn; + + // find sender widget + conn.sender = MainWindow::self->formWindow()->child( c->senderItem()->currentText() ); + if ( !conn.sender ) // if no sender widget, find sender action + conn.sender = MainWindow::self->formWindow()->findAction( c->senderItem()->currentText() ); + + // find receiver widget + conn.receiver = MainWindow::self->formWindow()->child( c->receiverItem()->currentText() ); + if ( !conn.receiver ) // if no receiver widget, find receiver action + conn.receiver = MainWindow::self->formWindow()->findAction( c->receiverItem()->currentText() ); + + conn.signal = c->signalItem()->currentText(); + conn.slot = c->slotItem()->currentText(); + AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Signal/Slot " + "Connection" ), + MainWindow::self->formWindow(), + conn ); + newConnectionCmds.append( cmd ); + } + + + TQValueList conns = + MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); + for ( TQValueList::Iterator it = conns.begin(); + it != conns.end(); ++it ) { + RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Signal/Slot " + "Connection" ), + MainWindow::self-> + formWindow(), *it ); + oldConnectionCmds.append( cmd ); + } + + MacroCommand *cmd1 = new MacroCommand( i18n( "Add Signal/Slot Connections" ), + MainWindow::self->formWindow(), + newConnectionCmds ); + MacroCommand *cmd2 = new MacroCommand( i18n( "Remove Signal/Slot Connections" ), + MainWindow::self->formWindow(), + oldConnectionCmds ); + TQPtrList cmds; + cmds.append( cmd2 ); + cmds.append( cmd1 ); + MacroCommand *cmd = new MacroCommand( i18n( "Edit Signal/Slot Connections" ), + MainWindow::self->formWindow(), + cmds ); + MainWindow::self->formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + + accept(); +} + + +void ConnectionDialog::cancelClicked() +{ + reject(); +} + + +void ConnectionDialog::deleteClicked() +{ + int cr = connectionsTable->currentRow(); + connections.remove( cr ); + connectionsTable->removeRow( cr ); + int i = 0; + for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) + c->setRow( i++ ); +} + + +void ConnectionDialog::editSlots() +{ + EditFunctions dlg( this, MainWindow::self->formWindow(), TRUE ); + dlg.exec(); + int currentCol = connectionsTable->currentColumn(); + connectionsTable->setCurrentCell( connectionsTable->currentRow(), 0 ); + for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) { + if ( c->receiverItem()->currentText() != + TQString( MainWindow::self->formWindow()->mainContainer()->name() ) ) + continue; + c->slotItem()->customSlotsChanged(); + } + connectionsTable->setCurrentCell( connectionsTable->currentRow(), currentCol ); +} + +void ConnectionDialog::setDefault( TQObject *sender, TQObject *receiver ) +{ + defaultSender = sender; + defaultReceiver = receiver; +} + +void ConnectionDialog::updateEditSlotsButton() +{ + if ( connectionsTable->currentRow() < 0 || + connectionsTable->currentRow() > (int)connections.count() - 1 ) + return; + ConnectionContainer *c = connections.at( connectionsTable->currentRow() ); + if ( !c || !c->receiverItem() ) + return; + buttonEditSlots->setEnabled( c->receiverItem()->currentText() == + TQString( MainWindow::self->formWindow()-> + mainContainer()->name() ) ); +} + +void ConnectionDialog::updateConnectionContainers() +{ + TQPtrList newContainers; + for ( int i = 0; i < connectionsTable->numRows(); ++i ) { + for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) { + if ( c->senderItem() == connectionsTable->item( i, 0 ) ) { + newContainers.append( c ); + c->setRow( i ); + updateConnectionState(c); + break; + } + } + } + connections = newContainers; + updateEditSlotsButton(); +} + +void ConnectionDialog::ensureConnectionVisible() +{ + connectionsTable->ensureCellVisible( connectionsTable->numRows() - 1, 0 ); +} diff --git a/kdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp new file mode 100644 index 00000000..12b03a1d --- /dev/null +++ b/kdevdesigner/designer/connectionitems.cpp @@ -0,0 +1,517 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "connectionitems.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "metadatabase.h" +#include "widgetfactory.h" +#include "project.h" +#include +#include +#include +#include +#include +#include +#include + +static const char* const ignore_slots[] = { + "destroyed()", + "setCaption(const TQString&)", + "setIcon(const TQPixmap&)", + "setIconText(const TQString&)", + "setMouseTracking(bool)", + "clearFocus()", + "setUpdatesEnabled(bool)", + "update()", + "update(int,int,int,int)", + "update(const TQRect&)", + "repaint()", + "repaint(bool)", + "repaint(int,int,int,int,bool)", + "repaint(const TQRect&,bool)", + "repaint(const TQRegion&,bool)", + "show()", + "hide()", + "iconify()", + "showMinimized()", + "showMaximized()", + "showFullScreen()", + "showNormal()", + "polish()", + "constPolish()", + "raise()", + "lower()", + "stackUnder(TQWidget*)", + "move(int,int)", + "move(const TQPoint&)", + "resize(int,int)", + "resize(const TQSize&)", + "setGeometry(int,int,int,int)", + "setGeometry(const TQRect&)", + "focusProxyDestroyed()", + "showExtension(bool)", + "setUpLayout()", + "showDockMenu(const TQPoint&)", + "init()", + "destroy()", + "deleteLater()", + 0 +}; + +ConnectionItem::ConnectionItem( TQTable *table, FormWindow *fw ) + : TQComboTableItem( table, TQStringList(), FALSE ), formWindow( fw ), conn( 0 ) +{ + setReplaceable( FALSE ); +} + +void ConnectionItem::senderChanged( TQObject * ) +{ + emit changed(); + TQWidget *w = table()->cellWidget( row(), col() ); + if ( w ) + setContentFromEditor( w ); +} + +void ConnectionItem::receiverChanged( TQObject * ) +{ + emit changed(); + TQWidget *w = table()->cellWidget( row(), col() ); + if ( w ) + setContentFromEditor( w ); +} + +void ConnectionItem::signalChanged( const TQString & ) +{ + emit changed(); + TQWidget *w = table()->cellWidget( row(), col() ); + if ( w ) + setContentFromEditor( w ); +} + +void ConnectionItem::slotChanged( const TQString & ) +{ + emit changed(); + TQWidget *w = table()->cellWidget( row(), col() ); + if ( w ) + setContentFromEditor( w ); +} + +void ConnectionItem::setSender( SenderItem *i ) +{ + connect( i, TQT_SIGNAL( currentSenderChanged( TQObject * ) ), + this, TQT_SLOT( senderChanged( TQObject * ) ) ); +} + +void ConnectionItem::setReceiver( ReceiverItem *i ) +{ + connect( i, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ), + this, TQT_SLOT( receiverChanged( TQObject * ) ) ); +} + +void ConnectionItem::setSignal( SignalItem *i ) +{ + connect( i, TQT_SIGNAL( currentSignalChanged( const TQString & ) ), + this, TQT_SLOT( signalChanged( const TQString & ) ) ); +} + +void ConnectionItem::setSlot( SlotItem *i ) +{ + connect( i, TQT_SIGNAL( currentSlotChanged( const TQString & ) ), + this, TQT_SLOT( slotChanged( const TQString & ) ) ); +} + +void ConnectionItem::paint( TQPainter *p, const TQColorGroup &cg, + const TQRect &cr, bool selected ) +{ + p->fillRect( 0, 0, cr.width(), cr.height(), + selected ? cg.brush( TQColorGroup::Highlight ) + : cg.brush( TQColorGroup::Base ) ); + + int w = cr.width(); + int h = cr.height(); + + int x = 0; + + if ( currentText()[0] == '<' ) + p->setPen( TQObject::red ); + else if ( selected ) + p->setPen( cg.highlightedText() ); + else + p->setPen( cg.text() ); + + TQFont f( p->font() ); + TQFont oldf( p->font() ); + if ( conn && conn->isModified() ) { + f.setBold( TRUE ); + p->setFont( f ); + } + + p->drawText( x + 2, 0, w - x - 4, h, alignment(), currentText() ); + p->setFont( oldf ); +} + +void ConnectionItem::setConnection( ConnectionContainer *c ) +{ + conn = c; +} + +// ------------------------------------------------------------------ + +static void appendChildActions( TQAction *action, TQStringList &lst ) +{ + TQObjectListIt it( action->childrenListObject() ); + while ( it.current() ) { + TQObject *o = it.current(); + ++it; + if ( !::tqqt_cast(o) ) + continue; + lst << o->name(); + if ( !o->childrenListObject().isEmpty() && ::tqqt_cast(o) ) + appendChildActions( (TQAction*)o, lst ); + } +} + +static TQStringList flatActions( const TQPtrList &l ) +{ + TQStringList lst; + + TQPtrListIterator it( l ); + while ( it.current() ) { + TQAction *action = it.current(); + lst << action->name(); + if ( !action->childrenListObject().isEmpty() && ::tqqt_cast(action) ) + appendChildActions( action, lst ); + ++it; + } + + return lst; +} + +// ------------------------------------------------------------------ + +SenderItem::SenderItem( TQTable *table, FormWindow *fw ) + : ConnectionItem( table, fw ) +{ + TQStringList lst; + + TQPtrDictIterator it( *formWindow->widgets() ); + while ( it.current() ) { + if ( lst.find( it.current()->name() ) != lst.end() ) { + ++it; + continue; + } + if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && + !::tqqt_cast(it.current()) && + !::tqqt_cast(it.current()) && + !::tqqt_cast(it.current()) && + qstrcmp( it.current()->name(), "central widget" ) != 0 ) { + lst << it.current()->name(); + } + ++it; + } + + lst += flatActions( formWindow->actionList() ); + + lst.prepend( "" ); + lst.sort(); + setStringList( lst ); +} + +TQWidget *SenderItem::createEditor() const +{ + TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); + cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); + connect( cb, TQT_SIGNAL( activated( const TQString & ) ), + this, TQT_SLOT( senderChanged( const TQString & ) ) ); + return cb; +} + +void SenderItem::setSenderEx( TQObject *sender ) +{ + setCurrentItem( sender->name() ); + emit currentSenderChanged( sender ); +} + +void SenderItem::senderChanged( const TQString &sender ) +{ + TQObject *o = formWindow->child( sender, TQOBJECT_OBJECT_NAME_STRING ); + if ( !o ) + o = formWindow->findAction( sender ); + if ( !o ) + return; + emit currentSenderChanged( o ); +} + + + +// ------------------------------------------------------------------ + +ReceiverItem::ReceiverItem( TQTable *table, FormWindow *fw ) + : ConnectionItem( table, fw ) +{ + TQStringList lst; + + TQPtrDictIterator it( *formWindow->widgets() ); + while ( it.current() ) { + if ( lst.find( it.current()->name() ) != lst.end() ) { + ++it; + continue; + } + if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && + !::tqqt_cast(it.current()) && + !::tqqt_cast(it.current()) && + !::tqqt_cast(it.current()) && + qstrcmp( it.current()->name(), "central widget" ) != 0 ) { + lst << it.current()->name(); + } + ++it; + } + + lst += flatActions( formWindow->actionList() ); + + lst.prepend( "" ); + lst.sort(); + setStringList( lst ); +} + +TQWidget *ReceiverItem::createEditor() const +{ + TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); + cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); + connect( cb, TQT_SIGNAL( activated( const TQString & ) ), + this, TQT_SLOT( receiverChanged( const TQString & ) ) ); + return cb; +} + +void ReceiverItem::setReceiverEx( TQObject *receiver ) +{ + setCurrentItem( receiver->name() ); + emit currentReceiverChanged( receiver ); +} + +void ReceiverItem::receiverChanged( const TQString &receiver ) +{ + TQObject *o = formWindow->child( receiver, TQOBJECT_OBJECT_NAME_STRING ); + if ( !o ) + o = formWindow->findAction( receiver ); + if ( !o ) + return; + emit currentReceiverChanged( o ); +} + + + +// ------------------------------------------------------------------ + +SignalItem::SignalItem( TQTable *table, FormWindow *fw ) + : ConnectionItem( table, fw ) +{ + TQStringList lst; + lst << ""; + lst.sort(); + setStringList( lst ); +} + +void SignalItem::senderChanged( TQObject *sender ) +{ + TQStrList sigs = sender->metaObject()->signalNames( TRUE ); + sigs.remove( "destroyed()" ); + sigs.remove( "destroyed(TQObject*)" ); + sigs.remove( "accessibilityChanged(int)" ); + sigs.remove( "accessibilityChanged(int,int)" ); + + TQStringList lst = TQStringList::fromStrList( sigs ); + + if ( ::tqqt_cast(sender) ) { + MetaDataBase::CustomWidget *w = ( (CustomWidget*)sender )->customWidget(); + for ( TQValueList::Iterator it = w->lstSignals.begin(); + it != w->lstSignals.end(); ++it ) + lst << MetaDataBase::normalizeFunction( *it ); + } + + if ( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(formWindow->mainContainer()) ) { + TQStringList extra = MetaDataBase::signalList( TQT_TQOBJECT(formWindow) ); + if ( !extra.isEmpty() ) + lst += extra; + } + + lst.prepend( "" ); + + lst.sort(); + setStringList( lst ); + + ConnectionItem::senderChanged( sender ); +} + +TQWidget *SignalItem::createEditor() const +{ + TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); + cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); + connect( cb, TQT_SIGNAL( activated( const TQString & ) ), + this, TQT_SIGNAL( currentSignalChanged( const TQString & ) ) ); + return cb; +} + +// ------------------------------------------------------------------ + +SlotItem::SlotItem( TQTable *table, FormWindow *fw ) + : ConnectionItem( table, fw ) +{ + TQStringList lst; + lst << ""; + lst.sort(); + setStringList( lst ); + + lastReceiver = 0; + lastSignal = ""; +} + +void SlotItem::receiverChanged( TQObject *receiver ) +{ + lastReceiver = receiver; + updateSlotList(); + ConnectionItem::receiverChanged( receiver ); +} + +void SlotItem::signalChanged( const TQString &signal ) +{ + lastSignal = signal; + updateSlotList(); + ConnectionItem::signalChanged( signal ); +} + +bool SlotItem::ignoreSlot( const char* slot ) const +{ +#ifndef TQT_NO_SQL + if ( qstrcmp( slot, "update()" ) == 0 && + ::tqqt_cast(lastReceiver) ) + return FALSE; +#endif + + for ( int i = 0; ignore_slots[i]; i++ ) { + if ( qstrcmp( slot, ignore_slots[i] ) == 0 ) + return TRUE; + } + + if ( !formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) { + if ( qstrcmp( slot, "close()" ) == 0 ) + return TRUE; + } + + if ( qstrcmp( slot, "setFocus()" ) == 0 ) + if ( lastReceiver->isWidgetType() && + ( (TQWidget*)lastReceiver )->focusPolicy() == TQ_NoFocus ) + return TRUE; + + return FALSE; +} + +void SlotItem::updateSlotList() +{ + TQStringList lst; + if ( !lastReceiver || lastSignal == "" ) { + lst << ""; + lst.sort(); + setStringList( lst ); + return; + } + + TQString signal = MetaDataBase::normalizeFunction( lastSignal ); + int n = lastReceiver->metaObject()->numSlots( TRUE ); + TQStringList slts; + + for( int i = 0; i < n; ++i ) { + // accept only public slots. For the form window, also accept protected slots + const TQMetaData* md = lastReceiver->metaObject()->slot( i, TRUE ); + if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->tqt_mo_access == TQMetaData::Public) || + (formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) && + lastReceiver->metaObject()->slot(i, TRUE)->tqt_mo_access == + TQMetaData::Protected) ) && + !ignoreSlot( md->tqt_mo_ci_name ) && + checkConnectArgs( signal.latin1(), lastReceiver, md->tqt_mo_ci_name ) ) + if ( lst.find( md->tqt_mo_ci_name ) == lst.end() ) + lst << MetaDataBase::normalizeFunction( md->tqt_mo_ci_name ); + } + + LanguageInterface *iface = + MetaDataBase::languageInterface( formWindow->project()->language() ); + if ( !iface || iface->supports( LanguageInterface::ConnectionsToCustomSlots ) ) { + if ( formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) { + TQValueList moreSlots = MetaDataBase::slotList( TQT_TQOBJECT(formWindow) ); + if ( !moreSlots.isEmpty() ) { + for ( TQValueList::Iterator it = moreSlots.begin(); + it != moreSlots.end(); ++it ) { + TQCString s = (*it).function; + if ( !s.data() ) + continue; + s = MetaDataBase::normalizeFunction( s ); + if ( checkConnectArgs( signal.latin1(), lastReceiver, s ) ) { + if ( lst.find( (*it).function ) == lst.end() ) + lst << s; + } + } + } + } + } + + if ( ::tqqt_cast(lastReceiver) ) { + MetaDataBase::CustomWidget *w = ( (CustomWidget*)lastReceiver )->customWidget(); + for ( TQValueList::Iterator it = w->lstSlots.begin(); + it != w->lstSlots.end(); ++it ) { + TQCString s = (*it).function; + if ( !s.data() ) + continue; + s = MetaDataBase::normalizeFunction( s ); + if ( checkConnectArgs( signal.latin1(), lastReceiver, s ) ) { + if ( lst.find( (*it).function ) == lst.end() ) + lst << s; + } + } + } + + lst.prepend( "" ); + lst.sort(); + setStringList( lst ); +} + +TQWidget *SlotItem::createEditor() const +{ + TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); + cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); + connect( cb, TQT_SIGNAL( activated( const TQString & ) ), + this, TQT_SIGNAL( currentSlotChanged( const TQString & ) ) ); + return cb; +} + +void SlotItem::customSlotsChanged() +{ + TQString currSlot = currentText(); + updateSlotList(); + setCurrentItem( "" ); + setCurrentItem( currSlot ); + emit currentSlotChanged( currentText() ); +} diff --git a/kdevdesigner/designer/connectionitems.h b/kdevdesigner/designer/connectionitems.h new file mode 100644 index 00000000..fe5e276d --- /dev/null +++ b/kdevdesigner/designer/connectionitems.h @@ -0,0 +1,226 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef CONNECTIONITEMS_H +#define CONNECTIONITEMS_H + +class FormWindow; + +#include + +class SenderItem; +class ReceiverItem; +class SignalItem; +class SlotItem; +class ConnectionContainer; + + +class ConnectionItem : public TQObject, + public TQComboTableItem +{ + Q_OBJECT + + +public: + ConnectionItem( TQTable *table, FormWindow *fw ); + + void paint( TQPainter *p, const TQColorGroup &cg, + const TQRect &cr, bool selected ); + + void setSender( SenderItem *i ); + void setReceiver( ReceiverItem *i ); + void setSignal( SignalItem *i ); + void setSlot( SlotItem *i ); + void setConnection( ConnectionContainer *c ); + +public slots: + virtual void senderChanged( TQObject *sender ); + virtual void receiverChanged( TQObject *receiver ); + virtual void signalChanged( const TQString &sig ); + virtual void slotChanged( const TQString &slot ); + +signals: + void changed(); + +protected: + FormWindow *formWindow; + +private: + ConnectionContainer *conn; + +}; + +// ------------------------------------------------------------------ + +class SenderItem : public ConnectionItem +{ + Q_OBJECT + + +public: + SenderItem( TQTable *table, FormWindow *fw ); + TQWidget *createEditor() const; + void setSenderEx( TQObject *sender ); + +signals: + void currentSenderChanged( TQObject *sender ); + +private slots: + void senderChanged( const TQString &sender ); + +}; + +// ------------------------------------------------------------------ + +class ReceiverItem : public ConnectionItem +{ + Q_OBJECT + + +public: + ReceiverItem( TQTable *table, FormWindow *fw ); + TQWidget *createEditor() const; + void setReceiverEx( TQObject *receiver ); + +signals: + void currentReceiverChanged( TQObject *receiver ); + +private slots: + void receiverChanged( const TQString &receiver ); + +}; + +// ------------------------------------------------------------------ + +class SignalItem : public ConnectionItem +{ + Q_OBJECT + + +public: + SignalItem( TQTable *table, FormWindow *fw ); + + void senderChanged( TQObject *sender ); + TQWidget *createEditor() const; + +signals: + void currentSignalChanged( const TQString & ); + +}; + +// ------------------------------------------------------------------ + +class SlotItem : public ConnectionItem +{ + Q_OBJECT + + +public: + SlotItem( TQTable *table, FormWindow *fw ); + + void receiverChanged( TQObject *receiver ); + void signalChanged( const TQString &signal ); + TQWidget *createEditor() const; + + void customSlotsChanged(); + +signals: + void currentSlotChanged( const TQString & ); + +private: + void updateSlotList(); + bool ignoreSlot( const char* slot ) const; + +private: + TQObject *lastReceiver; + TQString lastSignal; + +}; + +// ------------------------------------------------------------------ + +class ConnectionContainer : public TQObject +{ + Q_OBJECT + + +public: + ConnectionContainer( TQObject *parent, SenderItem *i1, SignalItem *i2, + ReceiverItem *i3, SlotItem *i4, int r ) + : TQObject( parent ), mod( FALSE ), se( i1 ), si( i2 ), + re( i3 ), sl( i4 ), rw ( r ) { + i1->setConnection( this ); + i2->setConnection( this ); + i3->setConnection( this ); + i4->setConnection( this ); + connect( i1, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); + connect( i2, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); + connect( i3, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); + connect( i4, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); + } + + bool isModified() const { return mod; } + void setModified( bool b ) { mod = b; repaint(); } + bool isValid() const { + return se->currentText()[0] != '<' && + si->currentText()[0] != '<' && + re->currentText()[0] != '<' && + sl->currentText()[0] != '<'; + } + + void repaint() { + se->table()->updateCell( se->row(), se->col() ); + si->table()->updateCell( si->row(), si->col() ); + re->table()->updateCell( re->row(), re->col() ); + sl->table()->updateCell( sl->row(), sl->col() ); + } + + int row() const { return rw; } + void setRow( int r ) { rw = r; } + + SenderItem *senderItem() const { return se; } + SignalItem *signalItem() const { return si; } + ReceiverItem *receiverItem() const { return re; } + SlotItem *slotItem() const { return sl; } + +public slots: + void somethingChanged() { mod = TRUE; emit changed( this ); } + +signals: + void changed( ConnectionContainer *c ); + +private: + bool mod; + SenderItem *se; + SignalItem *si; + ReceiverItem *re; + SlotItem *sl; + int rw; + +}; + + +#endif diff --git a/kdevdesigner/designer/connectiontable.cpp b/kdevdesigner/designer/connectiontable.cpp new file mode 100644 index 00000000..834fdc96 --- /dev/null +++ b/kdevdesigner/designer/connectiontable.cpp @@ -0,0 +1,56 @@ + /********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "connectiontable.h" + +#include + +ConnectionTable::ConnectionTable( TQWidget *parent, const char *name ) + : TQTable( 0, 4, parent, name ) +{ + setSorting( TRUE ); + setShowGrid( FALSE ); + setFocusStyle( FollowStyle ); + setSelectionMode( SingleRow ); + horizontalHeader()->setLabel( 0, i18n( "Sender" ) ); + horizontalHeader()->setLabel( 1, i18n( "Signal" ) ); + horizontalHeader()->setLabel( 2, i18n( "Receiver" ) ); + horizontalHeader()->setLabel( 3, i18n( "Slot" ) ); + setColumnStretchable( 0, TRUE ); + setColumnStretchable( 1, TRUE ); + setColumnStretchable( 2, TRUE ); + setColumnStretchable( 3, TRUE ); +} + +void ConnectionTable::sortColumn( int col, bool ascending, bool ) +{ + horizontalHeader()->setSortIndicator( col, ascending ); + if ( isEditing() ) + endEdit( currEditRow(), currEditCol(), FALSE, FALSE ); + TQTable::sortColumn( col, ascending, TRUE ); + setCurrentCell( 0, 0 ); + emit resorted(); +} diff --git a/kdevdesigner/designer/connectiontable.h b/kdevdesigner/designer/connectiontable.h new file mode 100644 index 00000000..60b84426 --- /dev/null +++ b/kdevdesigner/designer/connectiontable.h @@ -0,0 +1,47 @@ + /********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef CONNECTIONTABLE_H +#define CONNECTIONTABLE_H + +#include + +class ConnectionTable : public TQTable +{ + Q_OBJECT + + +public: + ConnectionTable( TQWidget *parent, const char *name ); + + void sortColumn( int col, bool ascending, bool wholeRows ); + +signals: + void resorted(); + +}; + +#endif diff --git a/kdevdesigner/designer/createtemplate.ui b/kdevdesigner/designer/createtemplate.ui new file mode 100644 index 00000000..e03340b1 --- /dev/null +++ b/kdevdesigner/designer/createtemplate.ui @@ -0,0 +1,195 @@ + +CreateTemplate +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + CreateTemplate + + + + 0 + 0 + 347 + 248 + + + + Create Template + + + true + + + + unnamed + + + 11 + + + 6 + + + + TextLabel1 + + + Template &name: + + + editName + + + + + editName + + + Name of the new template + + + Enter the name of the new template + + + + + listClass + + + Class of the new template + + + Enter the name of the class which should be used as the template's base class + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + Spacer1 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonCreate + + + C&reate + + + true + + + Creates the new template + + + + + PushButton1 + + + &Cancel + + + Closes the Dialog + + + + + + + TextLabel2 + + + &Baseclass for template: + + + listClass + + + + + Spacer2 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + + + buttonCreate + clicked() + CreateTemplate + accept() + + + PushButton1 + clicked() + CreateTemplate + reject() + + + + + klineedit.h + + diff --git a/kdevdesigner/designer/customwidgeteditor.ui b/kdevdesigner/designer/customwidgeteditor.ui new file mode 100644 index 00000000..db6860f0 --- /dev/null +++ b/kdevdesigner/designer/customwidgeteditor.ui @@ -0,0 +1,1378 @@ + +CustomWidgetEditorBase +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + CustomWidgetEditorBase + + + + 0 + 0 + 712 + 386 + + + + Edit Custom Widgets + + + true + + + <b>Edit Custom Widgets</b><p>Add or delete custom widgets from <i>Qt Designer</i>'s database, and edit the properties of existing widgets.</p> + + + + unnamed + + + 11 + + + 6 + + + + boxWidgets + + + The list of all custom widgets known to Qt Designer. + + + + + buttonNewWidget + + + &New Widget + + + Add new custom widget. + + + <b>Create an empty custom widget and add it to the list.</b><p>New custom widgets have a default name and header file, which must both be changed to appropriate values.</p> + + + + + buttonDeleteWidget + + + &Delete Widget + + + Delete custom widget + + + <b>Delete the selected custom widget.</b><p>You can only delete widgets that are not used in any open form.</p> + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + helpButton + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonCancel + + + &Close + + + true + + + Closes the Dialog. + + + + + + + Vertical Spacing1 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + buttonLoad + + + &Load Descriptions... + + + Loads widget description file + + + <b>Load Descriptions</b><p>Loads a file which contains descriptions of custom widgets, so that these custom widgets can be used in the Qt Designer.</p> +<p>Since it is a lot of work to type in all the information for custom widgets, you should consider using the tqtcreatecw tool which is in $QTDIR/tools/designer/tools/tqtcreatecw. Using tqtcreatecw you can create custom widget description files for your custom widgets without the need to type in all the information manually. For more information about the README file in the tqtcreatecw directory</p> + + + + + buttonSave + + + &Save Descriptions... + + + Saves widget description file + + + <b>Save Descriptions</b><p>Saves all the descriptions of the shown custom widgets to a file which can then be used to import the custom widgets elsewhere. + + + + + TabWidget1 + + + Change the properties of the selected custom widget. + + + + Widget2 + + + De&finition + + + + unnamed + + + 11 + + + 6 + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + previewPixmap + + + + + + + + buttonChoosePixmap + + + + 30 + 22 + + + + ... + + + Select a Pixmap + + + <b>Select a pixmap file.</b><p>The pixmap will be used to represent the widget in forms.</p> + + + + + + + Layout5 + + + + unnamed + + + 0 + + + 6 + + + + editHeader + + + Enter filename + + + <b>Change the header file's name for the selected custom widget.</b><p>The header file will be included by forms using the widget.</p> + + + + + buttonChooseHeader + + + + 30 + 22 + + + + ... + + + Choose headerfile + + + Look for the header file using a file dialog. + + + + + + Global + + + + + Local + + + + localGlobalCombo + + + Select access + + + <b>Change how the include file will be included.</b><p>Global include files will be included using &lt;&gt;-brackets, while local files will included using quotation marks.</p> + + + + + + + editClass + + + Change classname + + + <b>Enter the classname for the selected custom widget.</b><p>A class of that name must be defined in the header file.</p> + + + + + Label11 + + + Heade&rfile: + + + editHeader + + + + + Label10 + + + Cl&ass: + + + editClass + + + + + Label2 + + + Pixmap: + + + + + Label7 + + + Si&ze hint: + + + spinWidth + + + + + TextLabel1_2 + + + Size p&olicy: + + + sizeHor + + + + + + Fixed + + + + + Minimum + + + + + Maximum + + + + + Preferred + + + + + MinimumExpanding + + + + + Expanding + + + + sizeVer + + + Vertical Sizepolicy + + + Choose theQt::Vertical size policy + + + + + spinWidth + + + 32767 + + + -1 + + + -1 + + + Size hint width + + + <b>Set the size hint for the selected widget.</b><p>The size hint provides the recommended size for the widget. Enter a sizehint of -1/-1 if no size is recommended.</p> + + + + + spinHeight + + + 32767 + + + -1 + + + -1 + + + Size hint height + + + <b>Set the size hint for the selected widget.</b><p>The size hint provides the recommended size for the widget. Enter a sizehint of -1/-1 if no size is recommended.</p> + + + + + + Fixed + + + + + Minimum + + + + + Maximum + + + + + Preferred + + + + + MinimumExpanding + + + + + Expanding + + + + sizeHor + + + Horizontal Sizepolicy + + + Choose the horizontal size policy for the widget + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + checkContainer + + + Con&tainer widget + + + Container Widget + + + <p><b>Container Widget</b></p> +<p>If this custom widget is able to contain other widgets (children), check this checkbox.</p> + + + + + + + Widget3 + + + Si&gnals + + + + unnamed + + + 11 + + + 6 + + + + listSignals + + + The list of all the Q_SIGNALS that the selected widget can emit. + + + + + Layout40 + + + + unnamed + + + 0 + + + 6 + + + + Spacer1_2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonAddSignal + + + N&ew Signal + + + true + + + Add new signal + + + <b>Add a new signal for the current custom widget.</b><p>An argument list should be provided in the signal's name, and the name must be unique.</p> + + + + + buttonRemoveSignal + + + Dele&te Signal + + + true + + + Delete signal + + + <b>Delete the signal.</b><p>All connections using this signal will also be deleted.</p> + + + + + + + Layout38 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel1 + + + S&ignal: + + + editSignal + + + + + editSignal + + + Change signal name + + + <b>Change the name of the selected slot.</b><p>An argument list should be provided in the signal's name, and the name must be unique.</p> + + + + + + + + + Widget4 + + + S&lots + + + + unnamed + + + 11 + + + 6 + + + + + Slot + + + true + + + true + + + + + Access + + + true + + + true + + + + listSlots + + + true + + + true + + + The list of all the custom widget's slots. + + + + + TextLabel2 + + + Sl&ot: + + + editSlot + + + + + editSlot + + + Change slot name + + + <b>Change the name of the selected slot.</b><p>An argument list should be provided in the signal's name, and the name must be unique.</p> + + + + + TextLabel3 + + + &Access: + + + comboAccess + + + + + + public + + + + + protected + + + + comboAccess + + + Change slot access + + + <b>Change the slot's access policy.</b><p>You can only connect to the widget's public Q_SLOTS.</p> + + + + + Layout7 + + + + unnamed + + + 0 + + + 6 + + + + Spacer2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonAddSlot + + + N&ew Slot + + + true + + + Add new slot + + + <b>Add a new slot to the current custom widget.</b><p>An argument list should be provided in the signal's name, and the name must be unique.</p> + + + + + buttonRemoveSlot + + + Dele&te Slot + + + true + + + Delete slot + + + <b>Delete the slot.</b><p>All connections using this slot will also be deleted.</p> + + + + + + + + + Widget5 + + + &Properties + + + + unnamed + + + 11 + + + 6 + + + + Layout7_2 + + + + unnamed + + + 0 + + + 6 + + + + Spacer2_2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonAddProperty + + + N&ew Property + + + true + + + Add new property + + + <b>Add a new property to the current custom widget.</b><p>The properties must be implemented in the class using Qt's property system.</p> + + + + + buttonRemoveProperty + + + Dele&te Property + + + true + + + Delete property + + + Deletes the selected property. + + + + + + + + String + + + + + CString + + + + + StringList + + + + + Bool + + + + + Int + + + + + UInt + + + + + Font + + + + + Color + + + + + Rect + + + + + Point + + + + + Size + + + + + Pixmap + + + + + Palette + + + + + Cursor + + + + + SizePolicy + + + + comboType + + + Select property type + + + <b>Select the type of the property.</b><p>The property must be implemented in the class using Qt's property system.</p><p>You can use integer types to support enumeration properties in the property editor.</p> + + + + + + Property + + + true + + + true + + + + + Type + + + true + + + true + + + + listProperties + + + true + + + true + + + <b>The list of the current widget's properties.</b><p>The properties of the custom widget can be changed in the property editor.</p> + + + + + editProperty + + + Change property name + + + <b>Enter a name for the property.</b><p>The properties must be implemented in the class using Qt's property system.</p> + + + + + TextLabel2_2 + + + P&roperty name: + + + editProperty + + + + + TextLabel3_2 + + + T&ype: + + + comboType + + + + + + + + + + boxWidgets + selectionChanged(TQListBoxItem*) + CustomWidgetEditorBase + currentWidgetChanged(TQListBoxItem*) + + + boxWidgets + currentChanged(TQListBoxItem*) + CustomWidgetEditorBase + currentWidgetChanged(TQListBoxItem*) + + + buttonNewWidget + clicked() + CustomWidgetEditorBase + addWidgetClicked() + + + buttonDeleteWidget + clicked() + CustomWidgetEditorBase + deleteWidgetClicked() + + + editClass + textChanged(const TQString&) + CustomWidgetEditorBase + classNameChanged(const TQString&) + + + editHeader + textChanged(const TQString&) + CustomWidgetEditorBase + headerFileChanged(const TQString&) + + + spinWidth + valueChanged(int) + CustomWidgetEditorBase + widthChanged(int) + + + spinHeight + valueChanged(int) + CustomWidgetEditorBase + heightChanged(int) + + + buttonChoosePixmap + clicked() + CustomWidgetEditorBase + pixmapChoosen() + + + localGlobalCombo + highlighted(int) + CustomWidgetEditorBase + includePolicyChanged(int) + + + buttonChooseHeader + clicked() + CustomWidgetEditorBase + chooseHeader() + + + buttonCancel + clicked() + CustomWidgetEditorBase + closeClicked() + + + listSignals + currentChanged(TQListBoxItem*) + CustomWidgetEditorBase + currentSignalChanged(TQListBoxItem*) + + + listSignals + selectionChanged(TQListBoxItem*) + CustomWidgetEditorBase + currentSignalChanged(TQListBoxItem*) + + + buttonRemoveSignal + clicked() + CustomWidgetEditorBase + removeSignal() + + + editSignal + textChanged(const TQString&) + CustomWidgetEditorBase + signalNameChanged(const TQString&) + + + listSlots + currentChanged(TQListViewItem*) + CustomWidgetEditorBase + currentSlotChanged(TQListViewItem*) + + + listSlots + selectionChanged(TQListViewItem*) + CustomWidgetEditorBase + currentSlotChanged(TQListViewItem*) + + + buttonRemoveSlot + clicked() + CustomWidgetEditorBase + removeSlot() + + + editSlot + textChanged(const TQString&) + CustomWidgetEditorBase + slotNameChanged(const TQString&) + + + comboAccess + activated(const TQString&) + CustomWidgetEditorBase + slotAccessChanged(const TQString&) + + + listProperties + currentChanged(TQListViewItem*) + CustomWidgetEditorBase + currentPropertyChanged(TQListViewItem*) + + + listProperties + selectionChanged(TQListViewItem*) + CustomWidgetEditorBase + currentPropertyChanged(TQListViewItem*) + + + buttonRemoveProperty + clicked() + CustomWidgetEditorBase + removeProperty() + + + editProperty + textChanged(const TQString&) + CustomWidgetEditorBase + propertyNameChanged(const TQString&) + + + comboType + activated(const TQString&) + CustomWidgetEditorBase + propertyTypeChanged(const TQString&) + + + buttonLoad + clicked() + CustomWidgetEditorBase + loadDescription() + + + buttonSave + clicked() + CustomWidgetEditorBase + saveDescription() + + + sizeHor + activated(int) + CustomWidgetEditorBase + horDataChanged(int) + + + sizeVer + activated(int) + CustomWidgetEditorBase + verDataChanged(int) + + + buttonAddProperty + clicked() + CustomWidgetEditorBase + addProperty() + + + checkContainer + toggled(bool) + CustomWidgetEditorBase + widgetIsContainer(bool) + + + buttonAddSignal + clicked() + CustomWidgetEditorBase + addSignal() + + + buttonAddSlot + clicked() + CustomWidgetEditorBase + addSlot() + + init() + destroy() + addProperty() + addSignal() + addWidgetClicked() + chooseHeader() + classNameChanged( const TQString & ) + closeClicked() + currentPropertyChanged( TQListViewItem * ) + currentSignalChanged( TQListBoxItem * ) + currentSlotChanged( TQListViewItem * ) + currentWidgetChanged( TQListBoxItem * ) + deleteWidgetClicked() + headerFileChanged( const TQString & ) + heightChanged( int ) + horDataChanged(int) + includePolicyChanged( int ) + loadDescription() + addSlot() + pixmapChoosen() + propertyNameChanged( const TQString & ) + propertyTypeChanged( const TQString & ) + removeProperty() + removeSignal() + removeSlot() + saveDescription() + signalNameChanged( const TQString & ) + slotAccessChanged( const TQString & ) + slotNameChanged( const TQString & ) + verDataChanged(int) + widgetIsContainer(bool) + widthChanged( int ) + + + buttonCancel + boxWidgets + buttonNewWidget + buttonDeleteWidget + buttonLoad + buttonSave + TabWidget1 + editClass + editHeader + buttonChooseHeader + localGlobalCombo + buttonChoosePixmap + spinWidth + spinHeight + sizeHor + sizeVer + checkContainer + helpButton + listSignals + buttonAddSignal + buttonRemoveSignal + editSignal + listSlots + buttonAddSlot + buttonRemoveSlot + editSlot + comboAccess + listProperties + buttonAddProperty + buttonRemoveProperty + editProperty + comboType + + diff --git a/kdevdesigner/designer/customwidgeteditorimpl.cpp b/kdevdesigner/designer/customwidgeteditorimpl.cpp new file mode 100644 index 00000000..f417f6f2 --- /dev/null +++ b/kdevdesigner/designer/customwidgeteditorimpl.cpp @@ -0,0 +1,842 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "customwidgeteditorimpl.h" +#include "defs.h" +#include "pixmapchooser.h" +#include "mainwindow.h" +#include "asciivalidator.h" +#include "resource.h" +#include "widgetfactory.h" +#include "widgetdatabase.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw ) + : CustomWidgetEditorBase( parent, 0, TRUE ), mainWindow( mw ) +{ + connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + checkTimer = new TQTimer( this ); + connect( checkTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( checkWidgetName() ) ); + + editClass->setEnabled( FALSE ); + editHeader->setEnabled( FALSE ); + buttonChooseHeader->setEnabled( FALSE ); + buttonChoosePixmap->setEnabled( FALSE ); + spinWidth->setEnabled( FALSE ); + spinHeight->setEnabled( FALSE ); + sizeHor->setEnabled( FALSE ); + sizeVer->setEnabled( FALSE ); + checkContainer->setEnabled( FALSE ); + localGlobalCombo->setEnabled( FALSE ); + editClass->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(editClass) ) ); + editSignal->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) ); + editSlot->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) ); + editProperty->setValidator( new AsciiValidator( TQT_TQOBJECT(editSignal) ) ); + editSignal->setEnabled( FALSE ); + buttonRemoveSignal->setEnabled( FALSE ); + + setupDefinition(); + setupSignals(); + setupSlots(); + setupProperties(); +} + +void CustomWidgetEditor::setupDefinition() +{ + TQPtrList *lst = MetaDataBase::customWidgets(); + for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { + TQListBoxItem *i; + if ( w->pixmap ) + i = new TQListBoxPixmap( boxWidgets, *w->pixmap, w->className ); + else + i = new TQListBoxText( boxWidgets, w->className ); + customWidgets.insert( i, w ); + } + + if ( boxWidgets->firstItem() ) { + boxWidgets->setCurrentItem( boxWidgets->firstItem() ); + boxWidgets->setSelected( boxWidgets->firstItem(), TRUE ); + } + oldItem = 0; +} + +void CustomWidgetEditor::setupSignals() +{ + editSignal->setEnabled( FALSE ); + buttonRemoveSignal->setEnabled( FALSE ); + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( !w ) + return; + listSignals->clear(); + for ( TQValueList::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) + listSignals->insertItem( TQString( *it ) ); + if ( listSignals->firstItem() ) { + listSignals->setCurrentItem( listSignals->firstItem() ); + listSignals->setSelected( listSignals->firstItem(), TRUE ); + } +} + +void CustomWidgetEditor::setupSlots() +{ + editSlot->setEnabled( FALSE ); + comboAccess->setEnabled( FALSE ); + buttonRemoveSlot->setEnabled( FALSE ); + + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( !w ) + return; + listSlots->clear(); + for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) + (void)new TQListViewItem( listSlots, (*it).function, (*it).access ); + + if ( listSlots->firstChild() ) { + listSlots->setCurrentItem( listSlots->firstChild() ); + listSlots->setSelected( listSlots->firstChild(), TRUE ); + } +} + +void CustomWidgetEditor::setupProperties() +{ + editProperty->setEnabled( FALSE ); + comboType->setEnabled( FALSE ); + buttonRemoveProperty->setEnabled( FALSE ); + + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( !w ) + return; + listProperties->clear(); + for ( TQValueList::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it ) + (void)new TQListViewItem( listProperties, (*it).property, (*it).type ); + + if ( listProperties->firstChild() ) { + listProperties->setCurrentItem( listProperties->firstChild() ); + listProperties->setSelected( listProperties->firstChild(), TRUE ); + } +} + +void CustomWidgetEditor::currentWidgetChanged( TQListBoxItem *i ) +{ + checkTimer->stop(); + checkWidgetName(); + + MetaDataBase::CustomWidget *w = findWidget( i ); + if ( !i || !w ) { + buttonChooseHeader->setEnabled( FALSE ); + editClass->setEnabled( FALSE ); + editHeader->setEnabled( FALSE ); + buttonChoosePixmap->setEnabled( FALSE ); + spinWidth->setEnabled( FALSE ); + spinHeight->setEnabled( FALSE ); + localGlobalCombo->setEnabled( FALSE ); + sizeHor->setEnabled( FALSE ); + sizeVer->setEnabled( FALSE ); + checkContainer->setEnabled( FALSE ); + return; + } + + buttonChooseHeader->setEnabled( TRUE ); + editClass->setEnabled( TRUE ); + editHeader->setEnabled( TRUE ); + buttonChoosePixmap->setEnabled( TRUE ); + spinWidth->setEnabled( TRUE ); + spinHeight->setEnabled( TRUE ); + localGlobalCombo->setEnabled( TRUE ); + sizeHor->setEnabled( TRUE ); + sizeVer->setEnabled( TRUE ); + checkContainer->setEnabled( TRUE ); + + editClass->blockSignals( TRUE ); + editClass->setText( w->className ); + editClass->blockSignals( FALSE ); + editHeader->setText( w->includeFile ); + localGlobalCombo->setCurrentItem( (int)w->includePolicy ); + if ( w->pixmap ) + previewPixmap->setPixmap( *w->pixmap ); + else + previewPixmap->setText( "" ); + spinWidth->setValue( w->sizeHint.width() ); + spinHeight->setValue( w->sizeHint.height() ); + sizeHor->setCurrentItem( size_type_to_int( w->sizePolicy.horData() ) ); + sizeVer->setCurrentItem( size_type_to_int( w->sizePolicy.verData() ) ); + checkContainer->setChecked( w->isContainer ); + + setupSignals(); + setupSlots(); + setupProperties(); +} + +void CustomWidgetEditor::addWidgetClicked() +{ + oldItem = 0; + checkTimer->stop(); + checkWidgetName(); + + MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget; + TQString s = w->className; + if ( !MetaDataBase::addCustomWidget( w ) ) { + TQMessageBox::information( this, i18n( "Adding Custom Widget" ), + i18n( "Custom widget names must be unique.\n" + "A custom widget called '%1' already exists, so it is not possible " + "to add another widget with this name." ).arg( s ) ); + return; + } + + TQListBoxPixmap *i = new TQListBoxPixmap( boxWidgets, *w->pixmap, w->className ); + customWidgets.insert( i, w ); + + boxWidgets->setCurrentItem( i ); + boxWidgets->setSelected( i, TRUE ); +} + +void CustomWidgetEditor::classNameChanged( const TQString &s ) +{ + TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + if ( !i || !w ) + return; + + WidgetDatabase::customWidgetClassNameChanged( w->className, s ); + + checkTimer->stop(); + boxWidgets->blockSignals( TRUE ); + oldName = w->className; + w->className = s; + TQListBoxItem *old = i; + if ( w->pixmap ) + boxWidgets->changeItem( *w->pixmap, s, boxWidgets->currentItem() ); + else + boxWidgets->changeItem( s, boxWidgets->currentItem() ); + i = boxWidgets->item( boxWidgets->currentItem() ); + oldItem = i; + customWidgets.insert( i, w ); + customWidgets.remove( old ); + boxWidgets->blockSignals( FALSE ); + checkTimer->start( 1000, TRUE ); +} + +void CustomWidgetEditor::deleteWidgetClicked() +{ + oldItem = 0; + checkTimer->stop(); + checkWidgetName(); + + TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + + if ( mainWindow->isCustomWidgetUsed( w ) ) { + TQMessageBox::information( mainWindow, i18n( "Removing Custom Widget" ), + i18n( "The custom widget '%1' is in use, so it cannot be removed." ). + arg( w->className ) ); + return; + } + + if ( !i || !w ) + return; + + MetaDataBase::CustomWidget *cw = MetaDataBase::customWidget( mainWindow->currentTool() ); + if ( cw == w ) + mainWindow->resetTool(); + + MetaDataBase::removeCustomWidget( w ); + customWidgets.remove( i ); + delete i; + + i = boxWidgets->item( boxWidgets->currentItem() ); + if ( i ) { + boxWidgets->setCurrentItem( i ); + boxWidgets->setSelected( i, TRUE ); + } +} + +void CustomWidgetEditor::headerFileChanged( const TQString &s ) +{ + TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + if ( !i || !w ) + return; + + w->includeFile = s; +} + +void CustomWidgetEditor::heightChanged( int h ) +{ + TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + if ( !i || !w ) + return; + + w->sizeHint.setHeight( h ); + updateCustomWidgetSizes(); +} + +void CustomWidgetEditor::includePolicyChanged( int p ) +{ + TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + if ( !i || !w ) + return; + + w->includePolicy = (MetaDataBase::CustomWidget::IncludePolicy)p; +} + +void CustomWidgetEditor::pixmapChoosen() +{ + TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + if ( !i || !w ) + return; + + TQPixmap pix = qChoosePixmap( this ); + if ( pix.isNull() ) + return; + delete w->pixmap; + w->pixmap = new TQPixmap( pix ); + + boxWidgets->blockSignals( TRUE ); + TQListBoxItem *old = i; + boxWidgets->changeItem( *w->pixmap, w->className, boxWidgets->currentItem() ); + i = boxWidgets->item( boxWidgets->currentItem() ); + customWidgets.insert( i, w ); + customWidgets.remove( old ); + boxWidgets->blockSignals( FALSE ); + previewPixmap->setPixmap( *w->pixmap ); +} + +void CustomWidgetEditor::widthChanged( int wid ) +{ + TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + if ( !i || !w ) + return; + + w->sizeHint.setWidth( wid ); + updateCustomWidgetSizes(); +} + +MetaDataBase::CustomWidget *CustomWidgetEditor::findWidget( TQListBoxItem *i ) +{ + if ( !i ) + return 0; + + TQMap::Iterator it = customWidgets.find( i ); + if ( it == customWidgets.end() ) + return 0; + return *it; +} + +void CustomWidgetEditor::chooseHeader() +{ + TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + if ( !i || !w ) + return; + + TQString h = KFileDialog::getOpenFileName( TQString(), i18n( "*.h *.h++ *.hxx *.hh|Header Files" ), this ); + if ( h.isEmpty() ) + return; + editHeader->setText( h ); + localGlobalCombo->setCurrentItem( (int)MetaDataBase::CustomWidget::Global ); +} + +void CustomWidgetEditor::checkWidgetName() +{ + TQListBoxItem *i = oldItem ? oldItem : boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + oldItem = 0; + if ( !i || !w ) + return; + + if ( MetaDataBase::isWidgetNameUsed( w ) ) { + TQString s = w->className; + w->className = oldName; + TQMessageBox::information( this, i18n( "Renaming Custom Widget" ), + i18n( "Custom widget names must be unique.\n" + "A custom widget called '%1' already exists, so it is not possible " + "to rename this widget with this name." ).arg( s ) ); + if ( i != boxWidgets->item( boxWidgets->currentItem() ) ) { + boxWidgets->setCurrentItem( i ); + tqApp->processEvents(); + } + editClass->setText( w->className ); + classNameChanged( w->className ); + } +} + +void CustomWidgetEditor::closeClicked() +{ + oldItem = 0; + checkTimer->stop(); + checkWidgetName(); + accept(); +} + +void CustomWidgetEditor::currentSignalChanged( TQListBoxItem *i ) +{ + editSignal->blockSignals( TRUE ); + editSignal->setText( "" ); + editSignal->blockSignals( FALSE ); + + if ( !i ) { + editSignal->setEnabled( FALSE ); + buttonRemoveSignal->setEnabled( FALSE ); + return; + } + + editSignal->blockSignals( TRUE ); + editSignal->setEnabled( TRUE ); + buttonRemoveSignal->setEnabled( TRUE ); + editSignal->setText( i->text() ); + editSignal->blockSignals( FALSE ); +} + +void CustomWidgetEditor::addSignal() +{ + TQListBoxItem *i = new TQListBoxText( listSignals, "signal()" ); + listSignals->setCurrentItem( i ); + listSignals->setSelected( i, TRUE ); + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( w ) + w->lstSignals.append( i->text().latin1() ); +} + +void CustomWidgetEditor::removeSignal() +{ + TQString s = listSignals->currentText(); + delete listSignals->item( listSignals->currentItem() ); + if ( listSignals->currentItem() != -1 ) + listSignals->setSelected( listSignals->currentItem(), TRUE ); + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( w ) + w->lstSignals.remove( s.latin1() ); +} + +void CustomWidgetEditor::signalNameChanged( const TQString &s ) +{ + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( !w || listSignals->currentItem() == -1 ) + return; + + TQValueList::Iterator it = w->lstSignals.find( listSignals->currentText().latin1() ); + if ( it != w->lstSignals.end() ) + w->lstSignals.remove( it ); + listSignals->blockSignals( TRUE ); + listSignals->changeItem( s, listSignals->currentItem() ); + listSignals->blockSignals( FALSE ); + w->lstSignals.append( s.latin1() ); +} + +void CustomWidgetEditor::slotAccessChanged( const TQString &s ) +{ + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( !w || !listSlots->currentItem() ) + return; + + MetaDataBase::Function slot; + slot.function = listSlots->currentItem()->text( 0 ); + slot.access = listSlots->currentItem()->text( 1 ); + TQValueList::Iterator it = w->lstSlots.find( slot ); + if ( it != w->lstSlots.end() ) + w->lstSlots.remove( it ); + listSlots->currentItem()->setText( 1, s ); + slot.function = listSlots->currentItem()->text( 0 ); + slot.access = listSlots->currentItem()->text( 1 ); + w->lstSlots.append( slot ); +} + +void CustomWidgetEditor::slotNameChanged( const TQString &s ) +{ + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( !w || !listSlots->currentItem() ) + return; + + MetaDataBase::Function slot; + slot.function = listSlots->currentItem()->text( 0 ); + slot.access = listSlots->currentItem()->text( 1 ); + slot.type = "slot"; + TQValueList::Iterator it = w->lstSlots.find( slot ); + if ( it != w->lstSlots.end() ) + w->lstSlots.remove( it ); + listSlots->currentItem()->setText( 0, s ); + slot.function = listSlots->currentItem()->text( 0 ); + slot.access = listSlots->currentItem()->text( 1 ); + w->lstSlots.append( slot ); +} + +void CustomWidgetEditor::addSlot() +{ + TQListViewItem *i = new TQListViewItem( listSlots, "slot()", "public" ); + listSlots->setCurrentItem( i ); + listSlots->setSelected( i, TRUE ); + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( w ) { + MetaDataBase::Function slot; + slot.function = "slot()"; + slot.access = "public"; + slot.type = "slot"; + w->lstSlots.append( slot ); + } +} + +void CustomWidgetEditor::removeSlot() +{ + MetaDataBase::Function slot; + slot.function = "1 2 3"; + if ( listSlots->currentItem() ) { + slot.function = listSlots->currentItem()->text( 0 ); + slot.access = listSlots->currentItem()->text( 1 ); + } + delete listSlots->currentItem(); + if ( listSlots->currentItem() ) + listSlots->setSelected( listSlots->currentItem(), TRUE ); + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( w && slot.function != "1 2 3" ) + w->lstSlots.remove( slot ); +} + +void CustomWidgetEditor::currentSlotChanged( TQListViewItem *i ) +{ + editSlot->blockSignals( TRUE ); + editSlot->setText( "" ); + editSignal->blockSignals( FALSE ); + + if ( !i ) { + editSlot->setEnabled( FALSE ); + comboAccess->setEnabled( FALSE ); + buttonRemoveSlot->setEnabled( FALSE ); + return; + } + + editSlot->setEnabled( TRUE ); + comboAccess->setEnabled( TRUE ); + buttonRemoveSlot->setEnabled( TRUE ); + editSlot->blockSignals( TRUE ); + comboAccess->blockSignals( TRUE ); + editSlot->setText( i->text( 0 ) ); + if ( i->text( 1 ) == i18n( "protected" ) ) + comboAccess->setCurrentItem( 1 ); + else + comboAccess->setCurrentItem( 0 ); + editSlot->blockSignals( FALSE ); + comboAccess->blockSignals( FALSE ); +} + +void CustomWidgetEditor::propertyTypeChanged( const TQString &s ) +{ + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( !w || !listProperties->currentItem() ) + return; + + MetaDataBase::Property property; + property.property = listProperties->currentItem()->text( 0 ); + property.type = listProperties->currentItem()->text( 1 ); + TQValueList::Iterator it = w->lstProperties.find( property ); + if ( it != w->lstProperties.end() ) + w->lstProperties.remove( it ); + listProperties->currentItem()->setText( 1, s ); + property.property = listProperties->currentItem()->text( 0 ); + property.type = listProperties->currentItem()->text( 1 ); + w->lstProperties.append( property ); +} + +void CustomWidgetEditor::propertyNameChanged( const TQString &s ) +{ + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( !w || !listProperties->currentItem() ) + return; + + MetaDataBase::Property property; + property.property = listProperties->currentItem()->text( 0 ); + property.type = listProperties->currentItem()->text( 1 ); + TQValueList::Iterator it = w->lstProperties.find( property ); + if ( it != w->lstProperties.end() ) + w->lstProperties.remove( it ); + listProperties->currentItem()->setText( 0, s ); + property.property = listProperties->currentItem()->text( 0 ); + property.type = listProperties->currentItem()->text( 1 ); + w->lstProperties.append( property ); +} + +void CustomWidgetEditor::addProperty() +{ + TQListViewItem *i = new TQListViewItem( listProperties, "property", "String" ); + listProperties->setCurrentItem( i ); + listProperties->setSelected( i, TRUE ); + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( w ) { + MetaDataBase::Property prop; + prop.property = "property"; + prop.type = "String"; + w->lstProperties.append( prop ); + } +} + +void CustomWidgetEditor::removeProperty() +{ + MetaDataBase::Property property; + property.property = "1 2 3"; + if ( listProperties->currentItem() ) { + property.property = listProperties->currentItem()->text( 0 ); + property.type = listProperties->currentItem()->text( 1 ); + } + delete listProperties->currentItem(); + if ( listProperties->currentItem() ) + listProperties->setSelected( listProperties->currentItem(), TRUE ); + MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); + if ( w && property.property != "1 2 3" ) + w->lstProperties.remove( property ); +} + +void CustomWidgetEditor::currentPropertyChanged( TQListViewItem *i ) +{ + editProperty->blockSignals( TRUE ); + editProperty->setText( "" ); + editSignal->blockSignals( FALSE ); + + if ( !i ) { + editProperty->setEnabled( FALSE ); + comboType->setEnabled( FALSE ); + buttonRemoveProperty->setEnabled( FALSE ); + return; + } + + editProperty->setEnabled( TRUE ); + comboType->setEnabled( TRUE ); + buttonRemoveProperty->setEnabled( TRUE ); + editProperty->blockSignals( TRUE ); + comboType->blockSignals( TRUE ); + editProperty->setText( i->text( 0 ) ); + + for ( int j = 0; j < comboType->count(); ++j ) { + if ( i->text( 1 ) == comboType->text( j ) ) { + comboType->setCurrentItem( j ); + break; + } + } + editProperty->blockSignals( FALSE ); + comboType->blockSignals( FALSE ); +} + +static TQString makeIndent2( int indent ) +{ + TQString s; + s.fill( ' ', indent * 4 ); + return s; +} + +static TQString entitize2( const TQString &s ) +{ + TQString s2 = s; + s2 = s2.replace( "\"", """ ); + s2 = s2.replace( "&", "&" ); + s2 = s2.replace( ">", ">" ); + s2 = s2.replace( "<", "<" ); + s2 = s2.replace( "'", "'" ); + return s2; +} + +void CustomWidgetEditor::saveDescription() +{ + TQString fn = KFileDialog::getSaveFileName( TQString(), i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this ); + if ( fn.isEmpty() ) + return; + + if ( TQFileInfo( fn ).extension() != "cw" ) + fn += ".cw"; + TQFile f( fn ); + if ( !f.open( IO_WriteOnly ) ) + return; + + TQTextStream ts( &f ); + ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) ); + int indent = 0; + + ts << "" << endl; + + ts << makeIndent2( indent ) << "" << endl; + indent++; + + TQPtrList *lst = MetaDataBase::customWidgets(); + for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { + ts << makeIndent2( indent ) << "" << endl; + indent++; + ts << makeIndent2( indent ) << "" << w->className << "" << endl; + ts << makeIndent2( indent ) << "
includePolicy == MetaDataBase::CustomWidget::Local ? "local" : "global" ) + << "\">" << w->includeFile << "
" << endl; + ts << makeIndent2( indent ) << "" << endl; + indent++; + ts << makeIndent2( indent ) << "" << w->sizeHint.width() << "" << endl; + ts << makeIndent2( indent ) << "" << w->sizeHint.height() << "" << endl; + indent--; + ts << makeIndent2( indent ) << "" << endl; + ts << makeIndent2( indent ) << "" << (int)w->isContainer << "" << endl; + ts << makeIndent2( indent ) << "" << endl; + indent++; + ts << makeIndent2( indent ) << "" << (int)w->sizePolicy.horData() << "" << endl; + ts << makeIndent2( indent ) << "" << (int)w->sizePolicy.verData() << "" << endl; + indent--; + ts << makeIndent2( indent ) << "" << endl; + ts << makeIndent2( indent ) << "" << endl; + indent++; + Resource::saveImageData( w->pixmap->convertToImage(), ts, indent ); + indent--; + ts << makeIndent2( indent ) << "" << endl; + if ( !w->lstSignals.isEmpty() ) { + for ( TQValueList::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) + ts << makeIndent2( indent ) << "" << entitize2( *it ) << "" << endl; + } + if ( !w->lstSlots.isEmpty() ) { + for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) + ts << makeIndent2( indent ) << "" << entitize2( (*it).function ) << "" << endl; + } + if ( !w->lstProperties.isEmpty() ) { + for ( TQValueList::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it ) + ts << makeIndent2( indent ) << "" << entitize2( (*it).property ) << "" << endl; + } + indent--; + ts << makeIndent2( indent ) << "
" << endl; + } + + indent--; + ts << makeIndent2( indent ) << "
" << endl; + ts << "
" << endl; +} + +void CustomWidgetEditor::loadDescription() +{ + TQString fn = KFileDialog::getOpenFileName( TQString(), i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this ); + if ( fn.isEmpty() ) + return; + + TQFile f( fn ); + if ( !f.open( IO_ReadOnly ) ) + return; + + TQDomDocument doc; + TQString errMsg; + int errLine; + if ( !doc.setContent( &f, &errMsg, &errLine ) ) { + tqDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); + return; + } + + TQDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement(); + + while ( firstWidget.tagName() != "customwidgets" ) + firstWidget = firstWidget.nextSibling().toElement(); + + Resource::loadCustomWidgets( firstWidget, 0 ); + boxWidgets->clear(); + setupDefinition(); + setupSignals(); + setupSlots(); + setupProperties(); +} + +void CustomWidgetEditor::updateCustomWidgetSizes() +{ + if ( cwLst.isEmpty() ) + cwLst = *mainWindow->queryList( "CustomWidget" ); + for ( TQObject *o = cwLst.first(); o; o = cwLst.next() ) + ( (TQWidget*)o )->updateGeometry(); +} + +void CustomWidgetEditor::horDataChanged( int a ) +{ + TQSizePolicy::SizeType st = int_to_size_type( a ); + TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + if ( !i || !w ) + return; + + TQSizePolicy osp = w->sizePolicy; + w->sizePolicy.setHorData( st ); + if ( cwLst.isEmpty() ) + cwLst = *mainWindow->queryList( "CustomWidget" ); + for ( TQObject *o = cwLst.first(); o; o = cwLst.next() ) { + CustomWidget *cw = (CustomWidget*)o; + if ( cw->realClassName() == boxWidgets->currentText() ) { + if ( cw->sizePolicy() == osp ) + cw->setSizePolicy( w->sizePolicy ); + } + } +} + +void CustomWidgetEditor::verDataChanged( int a ) +{ + TQSizePolicy::SizeType st = int_to_size_type( a ); + TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + if ( !i || !w ) + return; + + TQSizePolicy osp = w->sizePolicy; + w->sizePolicy.setVerData( st ); + if ( cwLst.isEmpty() ) + cwLst = *mainWindow->queryList( "CustomWidget" ); + for ( TQObject *o = cwLst.first(); o; o = cwLst.next() ) { + CustomWidget *cw = (CustomWidget*)o; + if ( cw->realClassName() == boxWidgets->currentText() ) { + if ( cw->sizePolicy() == osp ) + cw->setSizePolicy( w->sizePolicy ); + } + } +} + +void CustomWidgetEditor::widgetIsContainer( bool b ) +{ + TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); + MetaDataBase::CustomWidget *w = findWidget( i ); + if ( !i || !w ) + return; + + w->isContainer = b; + WidgetDatabaseRecord *r = WidgetDatabase::at( w->id ); + if ( r ) + r->isContainer = b; +} diff --git a/kdevdesigner/designer/customwidgeteditorimpl.h b/kdevdesigner/designer/customwidgeteditorimpl.h new file mode 100644 index 00000000..9e53b2ce --- /dev/null +++ b/kdevdesigner/designer/customwidgeteditorimpl.h @@ -0,0 +1,99 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef CUSTOMWIDGETEDITORIMPL_H +#define CUSTOMWIDGETEDITORIMPL_H + +#include "customwidgeteditor.h" +#include "metadatabase.h" + +#include +#include + +class TQTimer; +class TQListBoxItem; +class MainWindow; + +class CustomWidgetEditor : public CustomWidgetEditorBase +{ + Q_OBJECT + + +public: + CustomWidgetEditor( TQWidget *parent , MainWindow *mw); + +protected slots: + void addWidgetClicked(); + void classNameChanged( const TQString & ); + void currentWidgetChanged( TQListBoxItem * ); + void deleteWidgetClicked(); + void headerFileChanged( const TQString & ); + void heightChanged( int ); + void includePolicyChanged( int ); + void pixmapChoosen(); + void widthChanged( int ); + void chooseHeader(); + void checkWidgetName(); + void closeClicked(); + void currentSignalChanged( TQListBoxItem *i ); + void addSignal(); + void removeSignal(); + void signalNameChanged( const TQString &s ); + void slotAccessChanged( const TQString & ); + void slotNameChanged( const TQString & ); + void addSlot(); + void removeSlot(); + void currentSlotChanged( TQListViewItem * ); + void propertyTypeChanged( const TQString & ); + void propertyNameChanged( const TQString & ); + void addProperty(); + void removeProperty(); + void currentPropertyChanged( TQListViewItem * ); + void saveDescription(); + void loadDescription(); + void horDataChanged( int ); + void verDataChanged( int ); + void widgetIsContainer( bool ); + +private: + MetaDataBase::CustomWidget *findWidget( TQListBoxItem *i ); + void setupDefinition(); + void setupSignals(); + void setupSlots(); + void setupProperties(); + void updateCustomWidgetSizes(); + +private: + TQMap customWidgets; + TQString oldName; + TQTimer *checkTimer; + TQListBoxItem *oldItem; + MainWindow *mainWindow; + TQObjectList cwLst; + +}; + +#endif diff --git a/kdevdesigner/designer/database.cpp b/kdevdesigner/designer/database.cpp new file mode 100644 index 00000000..b5baea28 --- /dev/null +++ b/kdevdesigner/designer/database.cpp @@ -0,0 +1,122 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#if defined(DESIGNER) +#include "database.h" +#else +#include "database2.h" +#endif + +#ifndef TQT_NO_SQL + +#if defined(DESIGNER) +#include "formwindow.h" +#include "mainwindow.h" +#endif + +#include +#include +#include +#include + +DatabaseSupport::DatabaseSupport() +{ + con = 0; + frm = 0; + parent = 0; +} + +void DatabaseSupport::initPreview( const TQString &connection, const TQString &table, TQObject *o, + const TQMap &databaseControls ) +{ + tbl = table; + dbControls = databaseControls; + parent = o; + + if ( connection != "(default)" ) + con = TQSqlDatabase::database( connection ); + else + con = TQSqlDatabase::database(); + frm = new TQSqlForm( o, table ); + for ( TQMap::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) { + TQObject *chld = parent->child( it.key(), TQWIDGET_OBJECT_NAME_STRING ); + if ( !chld ) + continue; + frm->insert( (TQWidget*)chld, *it ); + } +} + +QDesignerDataBrowser::QDesignerDataBrowser( TQWidget *parent, const char *name ) + : TQDataBrowser( parent, name ) +{ +} + +bool QDesignerDataBrowser::event( TQEvent* e ) +{ + bool b = TQDataBrowser::event( e ); +#if defined(DESIGNER) + if ( MainWindow::self->isPreviewing() ) { +#endif + if ( e->type() == TQEvent::Show ) { + if ( con ) { + TQSqlCursor* cursor = new TQSqlCursor( tbl, TRUE, con ); + setSqlCursor( cursor, TRUE ); + setForm( frm ); + refresh(); + first(); + } + return TRUE; + } +#if defined(DESIGNER) + } +#endif + return b; +} + +QDesignerDataView::QDesignerDataView( TQWidget *parent, const char *name ) + : TQDataView( parent, name ) +{ +} + +bool QDesignerDataView::event( TQEvent* e ) +{ + bool b = TQDataView::event( e ); +#if defined(DESIGNER) + if ( MainWindow::self->isPreviewing() ) { +#endif + if ( e->type() == TQEvent::Show ) { + setForm( frm ); + readFields(); + return TRUE; + } +#if defined(DESIGNER) + } +#endif + return b; +} + + +#endif diff --git a/kdevdesigner/designer/database.h b/kdevdesigner/designer/database.h new file mode 100644 index 00000000..cbde491f --- /dev/null +++ b/kdevdesigner/designer/database.h @@ -0,0 +1,85 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef DATABASE_H +#define DATABASE_H + +#include "tqfeatures.h" + +#ifndef TQT_NO_SQL +#include +#include +#include +#include + +class TQSqlDatabase; +class TQSqlForm; + +class DatabaseSupport +{ +public: + DatabaseSupport(); + virtual ~DatabaseSupport() {} + + void initPreview( const TQString &connection, const TQString &table, TQObject *o, + const TQMap &databaseControls ); + +protected: + TQSqlDatabase* con; + TQSqlForm* frm; + TQString tbl; + TQMap dbControls; + TQObject *parent; + +}; + +class QDesignerDataBrowser : public TQDataBrowser, public DatabaseSupport +{ + Q_OBJECT + + +public: + QDesignerDataBrowser( TQWidget *parent, const char *name ); + +protected: + bool event( TQEvent* e ); +}; + +class QDesignerDataView : public TQDataView, public DatabaseSupport +{ + Q_OBJECT + + +public: + QDesignerDataView( TQWidget *parent, const char *name ); + +protected: + bool event( TQEvent* e ); + +}; +#endif + +#endif diff --git a/kdevdesigner/designer/dbconnection.ui b/kdevdesigner/designer/dbconnection.ui new file mode 100644 index 00000000..75b7d5cb --- /dev/null +++ b/kdevdesigner/designer/dbconnection.ui @@ -0,0 +1,222 @@ + +DatabaseConnectionWidget +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + DatabaseConnectionWidget + + + + 0 + 0 + 199 + 185 + + + + Edit Database Connection + + + + unnamed + + + 0 + + + 6 + + + + TextLabel3 + + + &Database name: + + + editDatabase + + + + + TextLabel4 + + + &Username: + + + editUsername + + + + + TextLabel4_2 + + + &Password: + + + editPassword + + + + + TextLabel2 + + + D&river: + + + comboDriver + + + + + editName + + + false + + + + + TextLabel5 + + + &Hostname: + + + editHostname + + + + + comboDriver + + + false + + + true + + + + + TextLabel1 + + + &Name: + + + editName + + + + + editHostname + + + false + + + + + TextLabel1_2 + + + P&ort: + + + editPort + + + + + editUsername + + + false + + + + + editPassword + + + false + + + Password + + + + + editDatabase + + + false + + + + + editPort + + + false + + + Default + + + 65535 + + + -1 + + + -1 + + + + + + + + editName + comboDriver + editDatabase + editUsername + editPassword + editHostname + editPort + + + init() + destroy() + + + diff --git a/kdevdesigner/designer/dbconnectioneditor.ui b/kdevdesigner/designer/dbconnectioneditor.ui new file mode 100644 index 00000000..40ef0a9b --- /dev/null +++ b/kdevdesigner/designer/dbconnectioneditor.ui @@ -0,0 +1,147 @@ + +DatabaseConnectionEditorBase +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + DatabaseConnectionEditorBase + + + + 0 + 0 + 393 + 286 + + + + Connect + + + + unnamed + + + 11 + + + 6 + + + + PushButton2 + + + &Cancel + + + + + PushButton1 + + + &OK + + + true + + + + + Spacer1 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + grp + + + Connection Details + + + + unnamed + + + 11 + + + 6 + + + + Spacer2 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + + + + + PushButton2 + clicked() + DatabaseConnectionEditorBase + reject() + + + PushButton1 + clicked() + DatabaseConnectionEditorBase + accept() + + init() + destroy() + + + PushButton1 + PushButton2 + + diff --git a/kdevdesigner/designer/dbconnectionimpl.cpp b/kdevdesigner/designer/dbconnectionimpl.cpp new file mode 100644 index 00000000..3cfd1fdc --- /dev/null +++ b/kdevdesigner/designer/dbconnectionimpl.cpp @@ -0,0 +1,80 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "dbconnectionimpl.h" +#include "dbconnection.h" +#include "project.h" +#include "asciivalidator.h" +#include +#include +#include +#include +#include +#include + +DatabaseConnectionEditor::DatabaseConnectionEditor( DatabaseConnection* connection, TQWidget* parent, + const char* name, bool modal, WFlags fl ) + : DatabaseConnectionEditorBase( parent, name, modal, fl ), conn( connection ) +{ + connectionWidget = new DatabaseConnectionWidget( grp ); + grpLayout->addWidget( connectionWidget, 0, 0 ); + init(); +} + +DatabaseConnectionEditor::~DatabaseConnectionEditor() +{ +} + +void DatabaseConnectionEditor::accept() +{ +#ifndef TQT_NO_SQL + conn->setUsername( connectionWidget->editUsername->text() ); + conn->setPassword( connectionWidget->editPassword->text() ); + conn->setHostname( connectionWidget->editHostname->text() ); +#endif + DatabaseConnectionEditorBase::accept(); +} + +void DatabaseConnectionEditor::init() +{ + connectionWidget->editName->setEnabled( FALSE ); + connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) ); + connectionWidget->editName->setText( conn->name() ); + connectionWidget->comboDriver->setEnabled( FALSE ); + connectionWidget->comboDriver->lineEdit()->setText( conn->driver() ); + connectionWidget->editDatabase->setEnabled( FALSE ); + connectionWidget->editDatabase->setText( conn->database() ); + connectionWidget->editUsername->setEnabled( TRUE ); + connectionWidget->editUsername->setText( conn->username() ); + connectionWidget->editPassword->setEnabled( TRUE ); + connectionWidget->editPassword->setText( "" ); + connectionWidget->editHostname->setEnabled( TRUE ); + connectionWidget->editHostname->setText( conn->hostname() ); + connectionWidget->editPort->setEnabled( TRUE ); + connectionWidget->editPort->setValue( conn->port() ); + connectionWidget->editUsername->setFocus(); + connectionWidget->editUsername->selectAll(); +} diff --git a/kdevdesigner/designer/dbconnectionimpl.h b/kdevdesigner/designer/dbconnectionimpl.h new file mode 100644 index 00000000..e2db2286 --- /dev/null +++ b/kdevdesigner/designer/dbconnectionimpl.h @@ -0,0 +1,58 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef DBCONNECTIONIMPL_H +#define DBCONNECTIONIMPL_H + +#include "dbconnectioneditor.h" + +class DatabaseConnection; +class DatabaseConnectionWidget; +class TQGridLayout; + +class DatabaseConnectionEditor : public DatabaseConnectionEditorBase +{ + Q_OBJECT + + +public: + DatabaseConnectionEditor( DatabaseConnection* connection, TQWidget* parent = 0, + const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ~DatabaseConnectionEditor(); + +public slots: + void accept(); +private: + void init(); + +private: + DatabaseConnection *conn; + TQGridLayout* lay; + DatabaseConnectionWidget* connectionWidget; + +}; + +#endif // DBCONNECTIONIMPL_H diff --git a/kdevdesigner/designer/dbconnections.ui b/kdevdesigner/designer/dbconnections.ui new file mode 100644 index 00000000..27d7d127 --- /dev/null +++ b/kdevdesigner/designer/dbconnections.ui @@ -0,0 +1,321 @@ + +DatabaseConnectionBase +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + DatabaseConnectionBase + + + + 0 + 0 + 512 + 309 + + + + Edit Database Connections + + + true + + + + unnamed + + + 11 + + + 6 + + + + buttonNew + + + &New Connection + + + + + listConnections + + + + + buttonDelete + + + &Delete Connection + + + + + Layout5 + + + + unnamed + + + 0 + + + 6 + + + + buttonHelp + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonClose + + + &Close + + + true + + + Close the dialog and discard any changes. + + + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + grp + + + Connection + + + + unnamed + + + 11 + + + 6 + + + + Spacer3 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + Spacer4 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonConnect + + + false + + + Connec&t + + + + + Spacer5 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + + + Spacer6 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + + + buttonClose + clicked() + DatabaseConnectionBase + accept() + + + buttonNew + clicked() + DatabaseConnectionBase + newConnection() + + + buttonDelete + clicked() + DatabaseConnectionBase + deleteConnection() + + + buttonConnect + clicked() + DatabaseConnectionBase + doConnect() + + + listConnections + highlighted(const TQString&) + DatabaseConnectionBase + currentConnectionChanged(const TQString&) + + + listConnections + selected(const TQString&) + DatabaseConnectionBase + currentConnectionChanged(const TQString&) + + init() + destroy() + currentConnectionChanged( const TQString & ) + deleteConnection() + newConnection() + connectionNameChanged( const TQString & ) + doConnect() + + + buttonClose + listConnections + buttonNew + buttonDelete + buttonConnect + buttonHelp + + diff --git a/kdevdesigner/designer/dbconnectionsimpl.cpp b/kdevdesigner/designer/dbconnectionsimpl.cpp new file mode 100644 index 00000000..e589679b --- /dev/null +++ b/kdevdesigner/designer/dbconnectionsimpl.cpp @@ -0,0 +1,196 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "dbconnectionsimpl.h" +#include +#include +#include +#include "project.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "mainwindow.h" +#include "asciivalidator.h" + +#include + +static bool blockChanges = FALSE; + +/* + * Constructs a DatabaseConnectionsEditor which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. + */ +DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl ) + : DatabaseConnectionBase( parent, name, modal, fl ), project( pro ) +{ + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connectionWidget = new DatabaseConnectionWidget( grp ); + grpLayout->addWidget( connectionWidget, 0, 0 ); +#ifndef TQT_NO_SQL + TQPtrList lst = project->databaseConnections(); + for ( DatabaseConnection *conn = lst.first(); conn; conn = lst.next() ) + listConnections->insertItem( conn->name() ); + connectionWidget->comboDriver->insertStringList( TQSqlDatabase::drivers() ); +#endif + connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) ); + enableAll( FALSE ); +} + +DatabaseConnectionsEditor::~DatabaseConnectionsEditor() +{ +} + +void DatabaseConnectionsEditor::deleteConnection() +{ + if ( listConnections->currentItem() == -1 ) + return; + project->removeDatabaseConnection( listConnections->currentText() ); + delete listConnections->item( listConnections->currentItem() ); + if ( listConnections->count() ) { + listConnections->setCurrentItem( 0 ); + currentConnectionChanged( listConnections->currentText() ); + } else { + enableAll( FALSE ); + } + project->saveConnections(); +} + +void DatabaseConnectionsEditor::newConnection() +{ + blockChanges = TRUE; + enableAll( TRUE ); + TQString n( "(default)" ); + if ( project->databaseConnection( n ) ) { + n = "connection"; + int i = 2; + while ( project->databaseConnection( n + TQString::number( i ) ) ) + ++i; + n = n + TQString::number( i ); + } + connectionWidget->editName->setText( n ); + listConnections->clearSelection(); + buttonConnect->setDefault( TRUE ); + connectionWidget->editName->setFocus(); + blockChanges = FALSE; +} + +void DatabaseConnectionsEditor::doConnect() +{ +#ifndef TQT_NO_SQL + if ( listConnections->currentItem() == -1 || + !listConnections->item( listConnections->currentItem() )->isSelected() ) { // new connection + // ### do error checking for duplicated connection names + DatabaseConnection *conn = new DatabaseConnection( project ); + conn->setName( connectionWidget->editName->text() ); + conn->setDriver( connectionWidget->comboDriver->lineEdit()->text() ); + conn->setDatabase( connectionWidget->editDatabase->text() ); + conn->setUsername( connectionWidget->editUsername->text() ); + conn->setPassword( connectionWidget->editPassword->text() ); + conn->setHostname( connectionWidget->editHostname->text() ); + conn->setPort( connectionWidget->editPort->value() ); + if ( conn->refreshCatalog() ) { + project->addDatabaseConnection( conn ); + listConnections->insertItem( conn->name() ); + listConnections->setCurrentItem( listConnections->count() - 1 ); + project->saveConnections(); + } else { + TQMessageBox::warning( MainWindow::self, i18n( "Connection" ), + i18n( "Could not connect to the database.\n" + "Please ensure that the database server is running " + "and that all the connection information is correct.\n" + "[ " + conn->lastError() + " ]" ) ); + delete conn; + } + } else { // sync // ### should this do something else? right now it just overwrites all info about the connection... + DatabaseConnection *conn = project->databaseConnection( listConnections->currentText() ); + conn->setName( connectionWidget->editName->text() ); + conn->setDriver( connectionWidget->comboDriver->lineEdit()->text() ); + conn->setDatabase( connectionWidget->editDatabase->text() ); + conn->setUsername( connectionWidget->editUsername->text() ); + conn->setPassword( connectionWidget->editPassword->text() ); + conn->setHostname( connectionWidget->editHostname->text() ); + conn->setPort( connectionWidget->editPort->value() ); + conn->refreshCatalog(); + project->saveConnections(); + } +#endif +} + +void DatabaseConnectionsEditor::currentConnectionChanged( const TQString &s ) +{ +#ifndef TQT_NO_SQL + DatabaseConnection *conn = project->databaseConnection( s ); + blockChanges = TRUE; + enableAll( conn != 0 ); + connectionWidget->editName->setEnabled( FALSE ); + blockChanges = FALSE; + if ( !conn ) + return; + blockChanges = TRUE; + connectionWidget->editName->setText( conn->name() ); + blockChanges = FALSE; + connectionWidget->comboDriver->lineEdit()->setText( conn->driver() ); + connectionWidget->editDatabase->setText( conn->database() ); + connectionWidget->editUsername->setText( conn->username() ); + connectionWidget->editPassword->setText( conn->password() ); + connectionWidget->editHostname->setText( conn->hostname() ); + connectionWidget->editPort->setValue( conn->port() ); +#endif +} + +void DatabaseConnectionsEditor::connectionNameChanged( const TQString &s ) +{ + if ( listConnections->currentItem() == 0 || blockChanges ) + return; + listConnections->changeItem( s, listConnections->currentItem() ); +} + +void DatabaseConnectionsEditor::enableAll( bool b ) +{ + connectionWidget->editName->setEnabled( b ); + connectionWidget->editName->setText( "" ); + connectionWidget->comboDriver->setEnabled( b ); + connectionWidget->comboDriver->lineEdit()->setText( "" ); + connectionWidget->editDatabase->setEnabled( b ); + connectionWidget->editDatabase->setText( "" ); + connectionWidget->editUsername->setEnabled( b ); + connectionWidget->editUsername->setText( "" ); + connectionWidget->editPassword->setEnabled( b ); + connectionWidget->editPassword->setText( "" ); + connectionWidget->editHostname->setEnabled( b ); + connectionWidget->editHostname->setText( "" ); + connectionWidget->editPort->setEnabled( b ); + connectionWidget->editPort->setValue( -1 ); + buttonConnect->setEnabled( b ); +} diff --git a/kdevdesigner/designer/dbconnectionsimpl.h b/kdevdesigner/designer/dbconnectionsimpl.h new file mode 100644 index 00000000..e06cc06a --- /dev/null +++ b/kdevdesigner/designer/dbconnectionsimpl.h @@ -0,0 +1,61 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef DBCONNECTIONSIMPL_H +#define DBCONNECTIONSIMPL_H + +#include "dbconnections.h" +#include "dbconnection.h" + +class Project; + +class DatabaseConnectionsEditor : public DatabaseConnectionBase +{ + Q_OBJECT + + +public: + DatabaseConnectionsEditor( Project *pro, TQWidget* parent = 0, + const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ~DatabaseConnectionsEditor(); + +protected slots: + void deleteConnection(); + void newConnection(); + void doConnect(); + void currentConnectionChanged( const TQString & ); + void connectionNameChanged( const TQString &s ); + +private: + void enableAll( bool b ); + +private: + Project *project; + DatabaseConnectionWidget* connectionWidget; + +}; + +#endif // DBCONNECTIONSIMPL_H diff --git a/kdevdesigner/designer/defs.cpp b/kdevdesigner/designer/defs.cpp new file mode 100644 index 00000000..c1aa36de --- /dev/null +++ b/kdevdesigner/designer/defs.cpp @@ -0,0 +1,84 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "defs.h" + +int size_type_to_int( TQSizePolicy::SizeType t ) +{ + if ( t == TQSizePolicy::Fixed ) + return 0; + if ( t == TQSizePolicy::Minimum ) + return 1; + if ( t == TQSizePolicy::Maximum ) + return 2; + if ( t == TQSizePolicy::Preferred ) + return 3; + if ( t == TQSizePolicy::MinimumExpanding ) + return 4; + if ( t == TQSizePolicy::Expanding ) + return 5; + if ( t == TQSizePolicy::Ignored ) + return 6; + return 0; +} + +TQString size_type_to_string( TQSizePolicy::SizeType t ) +{ + if ( t == TQSizePolicy::Fixed ) + return "Fixed"; + if ( t == TQSizePolicy::Minimum ) + return "Minimum"; + if ( t == TQSizePolicy::Maximum ) + return "Maximum"; + if ( t == TQSizePolicy::Preferred ) + return "Preferred"; + if ( t == TQSizePolicy::MinimumExpanding ) + return "MinimumExpanding"; + if ( t == TQSizePolicy::Expanding ) + return "Expanding"; + if ( t == TQSizePolicy::Ignored ) + return "Ignored"; + return TQString(); +} + +TQSizePolicy::SizeType int_to_size_type( int i ) +{ + if ( i == 0 ) + return TQSizePolicy::Fixed; + if ( i == 1 ) + return TQSizePolicy::Minimum; + if ( i == 2 ) + return TQSizePolicy::Maximum; + if ( i == 3 ) + return TQSizePolicy::Preferred; + if ( i == 4 ) + return TQSizePolicy::MinimumExpanding; + if ( i == 5 ) + return TQSizePolicy::Expanding; + if ( i == 6 ) + return TQSizePolicy::Ignored; + return TQSizePolicy::Preferred; +} diff --git a/kdevdesigner/designer/defs.h b/kdevdesigner/designer/defs.h new file mode 100644 index 00000000..45143b81 --- /dev/null +++ b/kdevdesigner/designer/defs.h @@ -0,0 +1,42 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef DEFS_H +#define DEFS_H + +#include +#include + +#define POINTER_TOOL 32000 +#define CONNECT_TOOL 32001 +#define ORDER_TOOL 32002 +#define BUDDY_TOOL 32004 + +int size_type_to_int( TQSizePolicy::SizeType t ); +TQString size_type_to_string( TQSizePolicy::SizeType t ); +TQSizePolicy::SizeType int_to_size_type( int i ); + +#endif diff --git a/kdevdesigner/designer/designer_pch.h b/kdevdesigner/designer/designer_pch.h new file mode 100644 index 00000000..fa840181 --- /dev/null +++ b/kdevdesigner/designer/designer_pch.h @@ -0,0 +1,44 @@ +/* + * This is a precompiled header file for use in Xcode / Mac GCC / + * GCC >= 3.4 / VC to greatly speed the building of TQt Designer. It may + * also be of use to people developing their own project, but it is + * probably better to define your own header. Use of this header is + * currently UNSUPPORTED. + */ + +#if defined __cplusplus + +#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 "command.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "metadatabase.h" +#include "project.h" +#include "widgetfactory.h" + +#endif diff --git a/kdevdesigner/designer/designeraction.cpp b/kdevdesigner/designer/designeraction.cpp new file mode 100644 index 00000000..66ecb438 --- /dev/null +++ b/kdevdesigner/designer/designeraction.cpp @@ -0,0 +1,38 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program 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 program 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 "designeraction.h" + +DesignerAction::~DesignerAction() +{ +} + +void DesignerAction::setDisabled( bool d ) +{ + TQAction::setEnabled(!d); + emit actionEnabled(!d); +} + +void DesignerAction::setEnabled( bool e ) +{ + TQAction::setEnabled(e); + emit actionEnabled(e); +} + +#include "designeraction.moc" diff --git a/kdevdesigner/designer/designeraction.h b/kdevdesigner/designer/designeraction.h new file mode 100644 index 00000000..85efef6b --- /dev/null +++ b/kdevdesigner/designer/designeraction.h @@ -0,0 +1,52 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program 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 program 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 DESIGNERACTION_H +#define DESIGNERACTION_H + +#include + +class DesignerAction : public TQAction +{ +Q_OBJECT + +public: + DesignerAction(TQObject *parent = 0, const char *name = 0) + :TQAction(parent, name) {} + DesignerAction ( const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 ) + :TQAction(menuText, accel, parent, name) {} + DesignerAction ( const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 ) + :TQAction(icon, menuText, accel, parent, name) {} + DesignerAction ( const TQString & text, const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE ) + :TQAction(text, icon, menuText, accel, parent, name, toggle) {} + DesignerAction ( const TQString & text, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE ) + :TQAction(text, menuText, accel, parent, name, toggle) {} + DesignerAction ( TQObject * parent, const char * name, bool toggle ) + :TQAction(parent, name, toggle) {} + ~DesignerAction(); + + virtual void setEnabled(bool e); + virtual void setDisabled(bool d); + +signals: + void actionEnabled(bool e); + +}; + +#endif diff --git a/kdevdesigner/designer/designerapp.cpp b/kdevdesigner/designer/designerapp.cpp new file mode 100644 index 00000000..22d1e531 --- /dev/null +++ b/kdevdesigner/designer/designerapp.cpp @@ -0,0 +1,176 @@ + /********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "designerappiface.h" +#include "designerapp.h" +#include "mainwindow.h" +#include "formwindow.h" + +#include + +#include +#include +#include +#include + +#ifdef TQ_WS_WIN +#include +#include +#endif + +static TQSplashScreen *splash = 0; + +void set_splash_status( const TQString &txt ) +{ + if ( !splash ) + return; + TQString splashText = "Licensed to " + + TQString::fromLatin1( TQT_PRODUCT_LICENSEE ) + "\n" + + txt; + splash->message( splashText, TQt::AlignRight|TQt::AlignTop ); +} + +DesignerApplication::DesignerApplication( int &argc, char **argv ) + : TQApplication( argc, argv ) +{ +#if defined(TQ_WS_WIN) + if ( winVersion() & TQt::WV_NT_based ) + DESIGNER_OPENFILE = RegisterWindowMessage((TCHAR*)"TQT_DESIGNER_OPEN_FILE"); + else + DESIGNER_OPENFILE = RegisterWindowMessageA("TQT_DESIGNER_OPEN_FILE"); +#endif +} + +TQSplashScreen *DesignerApplication::showSplash() +{ + TQRect screen = TQApplication::desktop()->screenGeometry(); + TQSettings config; + config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); + + TQRect mainRect; + TQString keybase = settingsKey(); + bool show = config.readBoolEntry( keybase + "SplashScreen", TRUE ); + mainRect.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", 0 ) ); + mainRect.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", 0 ) ); + mainRect.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", 500 ) ); + mainRect.setHeight( config.readNumEntry( keybase + "Geometries/MainwindowHeight", 500 ) ); + screen = TQApplication::desktop()->screenGeometry( TQApplication::desktop()->screenNumber( mainRect.center() ) ); + + if ( show ) { + splash = new TQSplashScreen( UserIcon("designer_splash.png") ); + splash->show(); + set_splash_status( "Initializing..." ); + } + + return splash; +} + +void DesignerApplication::closeSplash() +{ + splash->hide(); +} + +static TQString *settings_key = 0; +static TQString *old_settings_key = 0; + +TQString DesignerApplication::settingsKey() +{ + if ( !settings_key ) + settings_key = new TQString( "/TQt Designer/" + + TQString::number( (TQT_VERSION >> 16) & 0xff ) + + "." + TQString::number( (TQT_VERSION >> 8) & 0xff ) + "/" ); + return *settings_key; +} + +TQString DesignerApplication::oldSettingsKey() +{ + if ( !old_settings_key ) { + int majorVer = (TQT_VERSION >> 16) & 0xff; + int minorVer = (TQT_VERSION >> 8) & 0xff; + + // If minorVer is 0 (e.g. 4.0) then we don't want to read the + // old settings, too much might have changed. + if ( !minorVer == 0 ) + minorVer--; + + old_settings_key = new TQString( "/TQt Designer/" + + TQString::number( majorVer ) + + "." + TQString::number( minorVer ) + "/" ); + } + return *old_settings_key; +} + +void DesignerApplication::setSettingsKey( const TQString &key ) +{ + if ( !settings_key ) + settings_key = new TQString( key ); + else + *settings_key = key; +} + +#if defined(TQ_WS_WIN) +bool DesignerApplication::winEventFilter( MSG *msg ) +{ + if ( msg->message == DESIGNER_OPENFILE ) { + TQFile f( TQDir::homeDirPath() + "/.designerargs" ); + TQFileInfo fi(f); + if ( fi.lastModified() == lastMod ) + return TQApplication::winEventFilter( msg ); + lastMod = fi.lastModified(); + f.open( IO_ReadOnly ); + TQString args; + f.readLine( args, f.size() ); + TQStringList lst = TQStringList::split( " ", args ); + + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { + TQString arg = (*it).stripWhiteSpace(); + if ( arg[0] != '-' ) { + TQObjectList* l = MainWindow::self->queryList( "FormWindow" ); + FormWindow* fw = (FormWindow*) l->first(); + FormWindow* totop = 0; + bool haveit = FALSE; + while ( fw ) { + haveit = haveit || fw->fileName() == arg; + if ( haveit ) + totop = fw; + + fw = (FormWindow*) l->next(); + } + + if ( !haveit ) { + FlashWindow( MainWindow::self->winId(), TRUE ); + MainWindow::self->openFormWindow( arg ); + } else if ( totop ) { + totop->setFocus(); + } + delete l; + } + } + return TRUE; + } + return TQApplication::winEventFilter( msg ); +} +#endif diff --git a/kdevdesigner/designer/designerapp.h b/kdevdesigner/designer/designerapp.h new file mode 100644 index 00000000..b3c62a11 --- /dev/null +++ b/kdevdesigner/designer/designerapp.h @@ -0,0 +1,58 @@ + /********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef DESIGNERAPP_H +#define DESIGNERAPP_H + +class TQSplashScreen; + +#include + +class DesignerApplication : public TQApplication +{ +public: + const char *className() const { return "DesignerApplication"; } + + DesignerApplication( int &argc, char **argv ); + + TQSplashScreen *showSplash(); + static void closeSplash(); + + static TQString settingsKey(); + static TQString oldSettingsKey(); + static void setSettingsKey( const TQString &key ); + +protected: + TQDateTime lastMod; + +#if defined(TQ_WS_WIN) + bool winEventFilter( MSG *msg ); + uint DESIGNER_OPENFILE; +#endif + +}; + +#endif diff --git a/kdevdesigner/designer/designerappiface.cpp b/kdevdesigner/designer/designerappiface.cpp new file mode 100644 index 00000000..57ee992e --- /dev/null +++ b/kdevdesigner/designer/designerappiface.cpp @@ -0,0 +1,1093 @@ + /********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include +#include +#include "designerappiface.h" +#include "mainwindow.h" +#include "project.h" +#include "formwindow.h" +#include "workspace.h" +#include "widgetfactory.h" +#include "command.h" +#include "outputwindow.h" +#include "../shared/widgetdatabase.h" +#include +#include +#include +#include +#include "pixmapcollection.h" +#include "hierarchyview.h" +#include +#include +#include "popupmenueditor.h" +#include "menubareditor.h" + +DesignerInterfaceImpl::DesignerInterfaceImpl( MainWindow *mw ) + : mainWindow( mw ) +{ +} + +TQRESULT DesignerInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInterface** iface ) +{ + *iface = 0; + + if ( uuid == IID_TQUnknown ) + *iface = (TQUnknownInterface*)this; + else if ( uuid == IID_TQComponentInformation ) + *iface = (TQComponentInformationInterface*)this; + else if ( uuid == IID_Designer ) + *iface = (DesignerInterface*)this; + else + return TQE_NOINTERFACE; + + (*iface)->addRef(); + return TQS_OK; +} + + +DesignerProject *DesignerInterfaceImpl::currentProject() const +{ + return mainWindow->currProject()->iFace(); +} + +DesignerFormWindow *DesignerInterfaceImpl::currentForm() const +{ + if ( mainWindow->formWindow() ) + return mainWindow->formWindow()->iFace(); + return 0; +} + +DesignerSourceFile *DesignerInterfaceImpl::currentSourceFile() const +{ + if ( mainWindow->sourceFile() ) + return mainWindow->sourceFile()->iFace(); + return 0; +} + +TQPtrList DesignerInterfaceImpl::projectList() const +{ + return mainWindow->projectList(); +} + +void DesignerInterfaceImpl::showStatusMessage( const TQString &text, int ms ) const +{ + if ( text.isEmpty() ) { + mainWindow->statusBar()->clear(); + return; + } + if ( ms ) + mainWindow->statusMessage( text/*, ms*/ ); + else + mainWindow->statusMessage( text ); +} + +DesignerDock *DesignerInterfaceImpl::createDock() const +{ + return 0; +} + +DesignerOutputDock *DesignerInterfaceImpl::outputDock() const +{ + return mainWindow->outputWindow() ? mainWindow->outputWindow()->iFace() : 0; +} + +void DesignerInterfaceImpl::setModified( bool b, TQWidget *window ) +{ + mainWindow->setModified( b, window ); +} + +void DesignerInterfaceImpl::updateFunctionList() +{ + mainWindow->updateFunctionList(); + if ( mainWindow->objectHierarchy()->sourceEditor() ) + mainWindow->objectHierarchy()->updateClassBrowsers(); +} + +void DesignerInterfaceImpl::onProjectChange( TQObject *receiver, const char *slot ) +{ + TQObject::connect( mainWindow, TQT_SIGNAL( projectChanged() ), receiver, slot ); +} + +void DesignerInterfaceImpl::onFormChange( TQObject *receiver, const char *slot ) +{ + TQObject::connect( mainWindow, TQT_SIGNAL( formWindowChanged() ), receiver, slot ); + TQObject::connect( mainWindow, TQT_SIGNAL( editorChanged() ), receiver, slot ); +} + +bool DesignerInterfaceImpl::singleProjectMode() const +{ + return mainWindow->singleProjectMode(); +} + +void DesignerInterfaceImpl::showError( TQWidget *widget, + int line, const TQString &message ) +{ + mainWindow->showErrorMessage( TQT_TQOBJECT(widget), line, message ); +} + +void DesignerInterfaceImpl::runFinished() +{ + mainWindow->finishedRun(); +} + +void DesignerInterfaceImpl::showStackFrame( TQWidget *w, int line ) +{ + mainWindow->showStackFrame( TQT_TQOBJECT(w), line ); +} + +void DesignerInterfaceImpl::showDebugStep( TQWidget *w, int line ) +{ + mainWindow->showDebugStep( TQT_TQOBJECT(w), line ); +} + +void DesignerInterfaceImpl::runProjectPrecondition() +{ + mainWindow->runProjectPrecondition(); +} + +void DesignerInterfaceImpl::runProjectPostcondition( TQObjectList *l ) +{ + mainWindow->runProjectPostcondition( l ); +} + +DesignerProjectImpl::DesignerProjectImpl( Project *pr ) + : project( pr ) +{ +} + +TQPtrList DesignerProjectImpl::formList() const +{ + TQPtrList list; + TQObjectList *forms = project->formList(); + if ( !forms ) + return list; + + TQPtrListIterator it( *forms ); + while ( it.current() ) { + TQObject *obj = it.current(); + ++it; + TQWidget *par = ::tqqt_cast(obj->parent()); + if ( !obj->isWidgetType() || !par ) + continue; + + list.append( ((FormWindow*)par)->iFace() ); + } + + delete forms; + return list; +} + +TQString DesignerProjectImpl::formFileName( const TQString &form ) const +{ + for ( TQPtrListIterator forms = project->formFiles(); + forms.current(); ++forms ) { + if ( TQString( forms.current()->formName() ) == form ) + return forms.current()->fileName(); + } + return TQString(); +} + +TQStringList DesignerProjectImpl::formNames() const +{ + TQStringList l; + for ( TQPtrListIterator forms = project->formFiles(); + forms.current(); ++forms ) { + FormFile* f = forms.current(); + if ( f->isFake() ) + continue; + l << f->formName(); + } + return l; +} + +void DesignerProjectImpl::addForm( DesignerFormWindow * ) +{ +} + +void DesignerProjectImpl::removeForm( DesignerFormWindow * ) +{ +} + +TQString DesignerProjectImpl::fileName() const +{ + return project->fileName(); +} + +void DesignerProjectImpl::setFileName( const TQString & ) +{ +} + +TQString DesignerProjectImpl::projectName() const +{ + return project->projectName(); +} + +void DesignerProjectImpl::setProjectName( const TQString & ) +{ +} + +TQString DesignerProjectImpl::databaseFile() const +{ + return TQString(); +} + +void DesignerProjectImpl::setDatabaseFile( const TQString & ) +{ +} + +void DesignerProjectImpl::setupDatabases() const +{ + MainWindow::self->editDatabaseConnections(); +} + +TQPtrList DesignerProjectImpl::databaseConnections() const +{ + TQPtrList lst; +#ifndef TQT_NO_SQL + TQPtrList conns = project->databaseConnections(); + for ( DatabaseConnection *d = conns.first(); d; d = conns.next() ) + lst.append( d->iFace() ); +#endif + return lst; +} + +void DesignerProjectImpl::addDatabase( DesignerDatabase * ) +{ +} + +void DesignerProjectImpl::removeDatabase( DesignerDatabase * ) +{ +} + +void DesignerProjectImpl::save() const +{ +} + +void DesignerProjectImpl::setLanguage( const TQString &l ) +{ + project->setLanguage( l ); +} + +TQString DesignerProjectImpl::language() const +{ + return project->language(); +} + +void DesignerProjectImpl::setCustomSetting( const TQString &key, const TQString &value ) +{ + project->setCustomSetting( key, value ); +} + +TQString DesignerProjectImpl::customSetting( const TQString &key ) const +{ + if ( key == "QTSCRIPT_PACKAGES" ) { + TQString s = getenv( "QTSCRIPT_PACKAGES" ); + TQString s2 = project->customSetting( "QUICK_PACKAGES" ); + if ( !s.isEmpty() && !s2.isEmpty() ) +#if defined(Q_OS_WIN32) + s += ";"; +#else + s += ":"; +#endif + s += s2; + return s; + } + return project->customSetting( key ); +} + +DesignerPixmapCollection *DesignerProjectImpl::pixmapCollection() const +{ + return project->pixmapCollection()->iFace(); +} + +void DesignerProjectImpl::breakPoints( TQMap > &bps ) const +{ + MainWindow::self->saveAllBreakPoints(); + for ( TQPtrListIterator sources = project->sourceFiles(); + sources.current(); ++sources ) { + SourceFile* f = sources.current(); + bps.insert( project->makeRelative( f->fileName() ) + " ", MetaDataBase::breakPoints( f ) ); + } + for ( TQPtrListIterator forms = project->formFiles(); + forms.current(); ++forms ) { + if ( forms.current()->formWindow() ) + bps.insert( TQString( forms.current()->formWindow()->name() ) + "
", MetaDataBase::breakPoints( TQT_TQOBJECT(forms.current()->formWindow()) ) ); + } +} + +TQString DesignerProjectImpl::breakPointCondition( TQObject *o, int line ) const +{ + return MetaDataBase::breakPointCondition( MainWindow::self->findRealObject( o ), line ); +} + +void DesignerProjectImpl::setBreakPointCondition( TQObject *o, int line, const TQString &condition ) +{ + MetaDataBase::setBreakPointCondition( MainWindow::self->findRealObject( o ), line, condition ); +} + +void DesignerProjectImpl::clearAllBreakpoints() const +{ + TQValueList empty; + for ( TQPtrListIterator sources = project->sourceFiles(); + sources.current(); ++sources ) { + SourceFile* f = sources.current(); + MetaDataBase::setBreakPoints( f, empty ); + } + for ( TQPtrListIterator forms = project->formFiles(); + forms.current(); ++forms ) { + if ( forms.current()->formWindow() ) + MetaDataBase::setBreakPoints( TQT_TQOBJECT(forms.current()->formWindow()), empty ); + MainWindow::self->resetBreakPoints(); + } +} + +void DesignerProjectImpl::setIncludePath( const TQString &platform, const TQString &path ) +{ + project->setIncludePath( platform, path ); +} + +void DesignerProjectImpl::setLibs( const TQString &platform, const TQString &path ) +{ + project->setLibs( platform, path ); +} + +void DesignerProjectImpl::setDefines( const TQString &platform, const TQString &path ) +{ + project->setDefines( platform, path ); +} + +void DesignerProjectImpl::setConfig( const TQString &platform, const TQString &config ) +{ + project->setConfig( platform, config ); +} + +void DesignerProjectImpl::setTemplate( const TQString &t ) +{ + project->setTemplate( t ); +} + +TQString DesignerProjectImpl::config( const TQString &platform ) const +{ + return project->config( platform ); +} + +TQString DesignerProjectImpl::libs( const TQString &platform ) const +{ + return project->libs( platform ); +} + +TQString DesignerProjectImpl::defines( const TQString &platform ) const +{ + return project->defines( platform ); +} + +TQString DesignerProjectImpl::includePath( const TQString &platform ) const +{ + return project->includePath( platform ); +} + +TQString DesignerProjectImpl::templte() const +{ + return project->templte(); +} + +bool DesignerProjectImpl::isGenericObject( TQObject *o ) const +{ + return !!project->fakeFormFileFor( o ); +} + + + + + + + +#ifndef TQT_NO_SQL +DesignerDatabaseImpl::DesignerDatabaseImpl( DatabaseConnection *d ) + : db( d ) +{ +} + +TQString DesignerDatabaseImpl::name() const +{ + return db->name(); +} + +void DesignerDatabaseImpl::setName( const TQString & ) +{ +} + +TQString DesignerDatabaseImpl::driver() const +{ + return db->driver(); +} + +void DesignerDatabaseImpl::setDriver( const TQString & ) +{ +} + +TQString DesignerDatabaseImpl::database() const +{ + return db->database(); +} + +void DesignerDatabaseImpl::setDatabase( const TQString & ) +{ +} + +TQString DesignerDatabaseImpl::userName() const +{ + return db->username(); +} + +void DesignerDatabaseImpl::setUserName( const TQString & ) +{ +} + +TQString DesignerDatabaseImpl::password() const +{ + return db->password(); +} + +void DesignerDatabaseImpl::setPassword( const TQString & ) +{ +} + +TQString DesignerDatabaseImpl::hostName() const +{ + return db->hostname(); +} + +void DesignerDatabaseImpl::setHostName( const TQString & ) +{ +} + +TQStringList DesignerDatabaseImpl::tables() const +{ + return db->tables(); +} + +TQMap DesignerDatabaseImpl::fields() const +{ + return db->fields(); +} + +void DesignerDatabaseImpl::open( bool suppressDialog ) const +{ + db->open( suppressDialog ); +} + +void DesignerDatabaseImpl::close() const +{ + db->close(); +} + +void DesignerDatabaseImpl::setFields( const TQMap & ) +{ +} + +void DesignerDatabaseImpl::setTables( const TQStringList & ) +{ +} + +TQSqlDatabase* DesignerDatabaseImpl::connection() +{ + return db->connection(); +} +#endif + + + +DesignerPixmapCollectionImpl::DesignerPixmapCollectionImpl( PixmapCollection *coll ) + : pixCollection( coll ) +{ +} + +void DesignerPixmapCollectionImpl::addPixmap( const TQPixmap &p, const TQString &name, bool force ) +{ + PixmapCollection::Pixmap pix; + pix.pix = p; + pix.name = name; + pixCollection->addPixmap( pix, force ); + FormWindow *fw = MainWindow::self->formWindow(); + if ( fw ) + MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), p.serialNumber(), name ); +} + +TQPixmap DesignerPixmapCollectionImpl::pixmap( const TQString &name ) const +{ + return pixCollection->pixmap( name ); +} + + + +DesignerFormWindowImpl::DesignerFormWindowImpl( FormWindow *fw ) + : formWindow( fw ) +{ +} + +TQString DesignerFormWindowImpl::name() const +{ + return formWindow->name(); + } + +void DesignerFormWindowImpl::setName( const TQString &n ) +{ + formWindow->setName( n ); +} + +TQString DesignerFormWindowImpl::fileName() const +{ + return formWindow->fileName(); +} + +void DesignerFormWindowImpl::setFileName( const TQString & ) +{ +} + +void DesignerFormWindowImpl::save() const +{ +} + +bool DesignerFormWindowImpl::isModified() const +{ + return formWindow->commandHistory()->isModified(); +} + +void DesignerFormWindowImpl::insertWidget( TQWidget * ) +{ +} + +TQWidget *DesignerFormWindowImpl::create( const char *className, TQWidget *parent, const char *name ) +{ + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name ); + formWindow->insertWidget( w, TRUE ); + formWindow->killAccels( TQT_TQOBJECT(formWindow->mainContainer()) ); + return w; +} + +void DesignerFormWindowImpl::removeWidget( TQWidget * ) +{ +} + +TQWidgetList DesignerFormWindowImpl::widgets() const +{ + return TQWidgetList(); +} + +void DesignerFormWindowImpl::undo() +{ +} + +void DesignerFormWindowImpl::redo() +{ +} + +void DesignerFormWindowImpl::cut() +{ +} + +void DesignerFormWindowImpl::copy() +{ +} + +void DesignerFormWindowImpl::paste() +{ +} + +void DesignerFormWindowImpl::adjustSize() +{ +} + +void DesignerFormWindowImpl::editConnections() +{ +} + +void DesignerFormWindowImpl::checkAccels() +{ +} + +void DesignerFormWindowImpl::layoutH() +{ + formWindow->layoutHorizontal(); +} + +void DesignerFormWindowImpl::layoutV() +{ +} + +void DesignerFormWindowImpl::layoutHSplit() +{ +} + +void DesignerFormWindowImpl::layoutVSplit() +{ +} + +void DesignerFormWindowImpl::layoutG() +{ + formWindow->layoutGrid(); +} + +void DesignerFormWindowImpl::layoutHContainer( TQWidget* w ) +{ + formWindow->layoutHorizontalContainer( w ); +} + +void DesignerFormWindowImpl::layoutVContainer( TQWidget* w ) +{ + formWindow->layoutVerticalContainer( w ); +} + +void DesignerFormWindowImpl::layoutGContainer( TQWidget* w ) +{ + formWindow->layoutGridContainer( w ); +} + +void DesignerFormWindowImpl::breakLayout() +{ +} + +void DesignerFormWindowImpl::selectWidget( TQWidget * w ) +{ + formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); +} + +void DesignerFormWindowImpl::selectAll() +{ +} + +void DesignerFormWindowImpl::clearSelection() +{ + formWindow->clearSelection(); +} + +bool DesignerFormWindowImpl::isWidgetSelected( TQWidget * ) const +{ + return FALSE; +} + +TQWidgetList DesignerFormWindowImpl::selectedWidgets() const +{ + return formWindow->selectedWidgets(); +} + +TQWidget *DesignerFormWindowImpl::currentWidget() const +{ + return formWindow->currentWidget(); +} + +TQWidget *DesignerFormWindowImpl::form() const +{ + return formWindow; +} + + +void DesignerFormWindowImpl::setCurrentWidget( TQWidget * ) +{ +} + +TQPtrList DesignerFormWindowImpl::actionList() const +{ + return TQPtrList(); +} + +TQAction *DesignerFormWindowImpl::createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel, + TQObject* parent, const char* name, bool toggle ) +{ + QDesignerAction *a = new QDesignerAction( parent ); + a->setName( name ); + a->setText( text ); + if ( !icon.isNull() && !icon.pixmap().isNull() ) + a->setIconSet( icon ); + a->setMenuText( menuText ); + a->setAccel( accel ); + a->setToggleAction( toggle ); + return a; +} + +void DesignerFormWindowImpl::addAction( TQAction *a ) +{ + if ( formWindow->actionList().findRef( a ) != -1 ) + return; + formWindow->actionList().append( a ); + MetaDataBase::addEntry( a ); + setPropertyChanged( a, "name", TRUE ); + setPropertyChanged( a, "text", TRUE ); + setPropertyChanged( a, "menuText", TRUE ); + setPropertyChanged( a, "accel", TRUE ); + if ( !a->iconSet().isNull() && !a->iconSet().pixmap().isNull() ) + setPropertyChanged( a, "iconSet", TRUE ); +} + +void DesignerFormWindowImpl::removeAction( TQAction *a ) +{ + formWindow->actionList().removeRef( a ); +} + +void DesignerFormWindowImpl::preview() const +{ +} + +void DesignerFormWindowImpl::addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot ) +{ + MetaDataBase::addConnection( TQT_TQOBJECT(formWindow), sender, signal, receiver, slot ); +} + +void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQString &specifier, + const TQString &access, const TQString &type, + const TQString &language, const TQString &returnType ) +{ + MetaDataBase::addFunction( TQT_TQOBJECT(formWindow), function, specifier, access, type, language, returnType ); + formWindow->mainWindow()->functionsChanged(); +} + + + +void DesignerFormWindowImpl::setProperty( TQObject *o, const char *property, const TQVariant &value ) +{ + int id = o->metaObject()->findProperty( property, TRUE ); + const TQMetaProperty* p = o->metaObject()->property( id, TRUE ); + if ( p && p->isValid() ) + o->setProperty( property, value ); + else + MetaDataBase::setFakeProperty( o, property, value ); +} + +TQVariant DesignerFormWindowImpl::property( TQObject *o, const char *prop ) const +{ + int id = o->metaObject()->findProperty( prop, TRUE ); + const TQMetaProperty* p = o->metaObject()->property( id, TRUE ); + if ( p && p->isValid() ) + return o->property( prop ); + return MetaDataBase::fakeProperty( o, prop ); +} + +void DesignerFormWindowImpl::setPropertyChanged( TQObject *o, const char *property, bool changed ) +{ + MetaDataBase::setPropertyChanged( o, property, changed ); +} + +bool DesignerFormWindowImpl::isPropertyChanged( TQObject *o, const char *property ) const +{ + return MetaDataBase::isPropertyChanged( o, property ); +} + +void DesignerFormWindowImpl::setColumnFields( TQObject *o, const TQMap &f ) +{ + MetaDataBase::setColumnFields( o, f ); +} + +TQStringList DesignerFormWindowImpl::implementationIncludes() const +{ + TQValueList includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQStringList lst; + for ( TQValueList::Iterator it = includes.begin(); it != includes.end(); ++it ) { + MetaDataBase::Include inc = *it; + if ( inc.implDecl != "in implementation" ) + continue; + TQString s = inc.header; + if ( inc.location == "global" ) { + s.prepend( "<" ); + s.append( ">" ); + } else { + s.prepend( "\"" ); + s.append( "\"" ); + } + lst << s; + } + return lst; +} + +TQStringList DesignerFormWindowImpl::declarationIncludes() const +{ + TQValueList includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQStringList lst; + for ( TQValueList::Iterator it = includes.begin(); it != includes.end(); ++it ) { + MetaDataBase::Include inc = *it; + if ( inc.implDecl == "in implementation" ) + continue; + TQString s = inc.header; + if ( inc.location == "global" ) { + s.prepend( "<" ); + s.append( ">" ); + } else { + s.prepend( "\"" ); + s.append( "\"" ); + } + lst << s; + } + return lst; +} + +void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst ) +{ + TQValueList oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQValueList includes; + for ( TQValueList::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) { + MetaDataBase::Include inc = *it; + if ( inc.implDecl == "in implementation" ) + continue; + includes << inc; + } + + for ( TQStringList::ConstIterator sit = lst.begin(); sit != lst.end(); ++sit ) { + TQString s = *sit; + if ( s.startsWith( "#include" ) ) + s.remove( (uint)0, 8 ); + s = s.simplifyWhiteSpace(); + if ( s[ 0 ] != '<' && s[ 0 ] != '"' ) { + s.prepend( "\"" ); + s.append( "\"" ); + } + if ( s[ 0 ] == '<' ) { + s.remove( (uint)0, 1 ); + s.remove( s.length() - 1, 1 ); + MetaDataBase::Include inc; + inc.header = s; + inc.implDecl = "in implementation"; + inc.location = "global"; + includes << inc; + } else { + s.remove( (uint)0, 1 ); + s.remove( s.length() - 1, 1 ); + MetaDataBase::Include inc; + inc.header = s; + inc.implDecl = "in implementation"; + inc.location = "local"; + includes << inc; + } + } + MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes ); + formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); +} + +void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst ) +{ + TQValueList oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQValueList includes; + for ( TQValueList::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) { + MetaDataBase::Include inc = *it; + if ( inc.implDecl == "in declaration" ) + continue; + includes << inc; + } + + for ( TQStringList::ConstIterator sit = lst.begin(); sit != lst.end(); ++sit ) { + TQString s = *sit; + if ( s.startsWith( "#include" ) ) + s.remove( (uint)0, 8 ); + s = s.simplifyWhiteSpace(); + if ( s[ 0 ] != '<' && s[ 0 ] != '"' ) { + s.prepend( "\"" ); + s.append( "\"" ); + } + if ( s[ 0 ] == '<' ) { + s.remove( (uint)0, 1 ); + s.remove( s.length() - 1, 1 ); + MetaDataBase::Include inc; + inc.header = s; + inc.implDecl = "in declaration"; + inc.location = "global"; + includes << inc; + } else { + s.remove( (uint)0, 1 ); + s.remove( s.length() - 1, 1 ); + MetaDataBase::Include inc; + inc.header = s; + inc.implDecl = "in declaration"; + inc.location = "local"; + includes << inc; + } + } + MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes ); + formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); +} + +TQStringList DesignerFormWindowImpl::forwardDeclarations() const +{ + return MetaDataBase::forwards( TQT_TQOBJECT(formWindow) ); +} + +void DesignerFormWindowImpl::setForwardDeclarations( const TQStringList &lst ) +{ + MetaDataBase::setForwards( TQT_TQOBJECT(formWindow), lst ); + formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); +} + +TQStringList DesignerFormWindowImpl::signalList() const +{ + return MetaDataBase::signalList( TQT_TQOBJECT(formWindow) ); +} + +void DesignerFormWindowImpl::setSignalList( const TQStringList &lst ) +{ + MetaDataBase::setSignalList( TQT_TQOBJECT(formWindow), lst ); + formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); +} + +void DesignerFormWindowImpl::onModificationChange( TQObject *receiver, const char *slot ) +{ + TQObject::connect( formWindow, TQT_SIGNAL( modificationChanged( bool, FormWindow * ) ), receiver, slot ); +} + +void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name ) +{ + if ( !::tqqt_cast(formWindow->mainContainer()) ) + return; + + TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); + PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw ); + TQString n = name; + formWindow->unify( TQT_TQOBJECT(popup), n, TRUE ); + popup->setName( n ); + MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); + if ( !mb ) { + mb = new MenuBarEditor( formWindow, mw ); + mb->setName( "MenuBar" ); + MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); + } + mb->insertItem( text, popup ); + MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); +} + +void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a ) +{ + if ( !::tqqt_cast(formWindow->mainContainer()) ) + return; + TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); + if ( !mw->child( 0, "MenuBarEditor" ) ) + return; + PopupMenuEditor *popup = (PopupMenuEditor*)mw->child( menu, "PopupMenuEditor" ); + if ( !popup ) + return; + popup->insert( a ); +} + +void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu ) +{ + if ( !::tqqt_cast(formWindow->mainContainer()) ) + return; + TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); + if ( !mw->child( 0, "MenuBarEditor" ) ) + return; + PopupMenuEditor *popup = (PopupMenuEditor*)mw->child( menu, "PopupMenuEditor" ); + if ( !popup ) + return; + TQAction *a = new QSeparatorAction( 0 ); + popup->insert( a ); +} + +void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &name ) +{ + if ( !::tqqt_cast(formWindow->mainContainer()) ) + return; + TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); + TQToolBar *tb = new QDesignerToolBar( mw ); + TQString n = name; + formWindow->unify( TQT_TQOBJECT(tb), n, TRUE ); + tb->setName( n ); + mw->addToolBar( tb, text ); +} + +void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a ) +{ + if ( !::tqqt_cast(formWindow->mainContainer()) ) + return; + TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); + QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" ); + if ( !tb ) + return; + a->addTo( tb ); + tb->addAction( a ); +} + +void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn ) +{ + if ( !::tqqt_cast(formWindow->mainContainer()) ) + return; + TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); + QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" ); + if ( !tb ) + return; + TQAction *a = new QSeparatorAction( 0 ); + a->addTo( tb ); + tb->addAction( a ); +} + +DesignerDockImpl::DesignerDockImpl() +{ +} + +TQDockWindow *DesignerDockImpl::dockWindow() const +{ + return 0; +} + +DesignerOutputDockImpl::DesignerOutputDockImpl( OutputWindow *ow ) + : outWin( ow ) +{ +} + +TQWidget *DesignerOutputDockImpl::addView( const TQString &title ) +{ + TQWidget *page = new TQWidget( outWin ); + outWin->addTab( page, title ); + return page; +} + +void DesignerOutputDockImpl::appendDebug( const TQString &s ) +{ + outWin->appendDebug( s ); +} + +void DesignerOutputDockImpl::clearDebug() +{ +} + +void DesignerOutputDockImpl::appendError( const TQString &s, int l ) +{ + TQStringList ls; + ls << s; + TQValueList ll; + ll << l; + outWin->setErrorMessages( ls, ll, FALSE, TQStringList(), TQObjectList() ); +} + +void DesignerOutputDockImpl::clearError() +{ +} + +DesignerSourceFileImpl::DesignerSourceFileImpl( SourceFile *e ) + : ed( e ) +{ +} + +TQString DesignerSourceFileImpl::fileName() const +{ + return ed->fileName(); +} diff --git a/kdevdesigner/designer/designerappiface.h b/kdevdesigner/designer/designerappiface.h new file mode 100644 index 00000000..2ddcd47c --- /dev/null +++ b/kdevdesigner/designer/designerappiface.h @@ -0,0 +1,277 @@ + /********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef DESIGNERAPPIFACE_H +#define DESIGNERAPPIFACE_H + +#include "../interfaces/designerinterface.h" +#include "project.h" + +class FormWindow; +class MainWindow; +class Project; +class OutputWindow; +class SourceFile; + +class DesignerInterfaceImpl : public DesignerInterface +{ +public: + DesignerInterfaceImpl( MainWindow *mw ); + + DesignerProject *currentProject() const; + DesignerFormWindow *currentForm() const; + DesignerSourceFile *currentSourceFile() const; + TQPtrList projectList() const; + void showStatusMessage( const TQString &, int ms = 0 ) const; + DesignerDock *createDock() const; + DesignerOutputDock *outputDock() const; + void setModified( bool b, TQWidget *window ); + void updateFunctionList(); + + void onProjectChange( TQObject *receiver, const char *slot ); + void onFormChange( TQObject *receiver, const char *slot ); + + bool singleProjectMode() const; + void showError( TQWidget *widget, int line, const TQString &message ); + void runFinished(); + void showStackFrame( TQWidget *w, int line ); + void showDebugStep( TQWidget *w, int line ); + void runProjectPrecondition(); + void runProjectPostcondition( TQObjectList *l ); + + + TQRESULT queryInterface( const TQUuid &uuid, TQUnknownInterface** iface ); + TQ_REFCOUNT + +private: + MainWindow *mainWindow; + +}; + +class DesignerProjectImpl: public DesignerProject +{ +public: + DesignerProjectImpl( Project *pr ); + + TQPtrList formList() const; + TQStringList formNames() const; + TQString formFileName( const TQString &form ) const; + void addForm( DesignerFormWindow * ); + void removeForm( DesignerFormWindow * ); + TQString fileName() const; + void setFileName( const TQString & ); + TQString projectName() const; + void setProjectName( const TQString & ); + TQString databaseFile() const; + void setDatabaseFile( const TQString & ); + void setupDatabases() const; + TQPtrList databaseConnections() const; + void addDatabase( DesignerDatabase * ); + void removeDatabase( DesignerDatabase * ); + void save() const; + void setLanguage( const TQString & ); + TQString language() const; + void setCustomSetting( const TQString &key, const TQString &value ); + TQString customSetting( const TQString &key ) const; + DesignerPixmapCollection *pixmapCollection() const; + void breakPoints( TQMap > &bps ) const; + TQString breakPointCondition( TQObject *o, int line ) const; + void setBreakPointCondition( TQObject *o, int line, const TQString &condition ); + void clearAllBreakpoints() const; + void setIncludePath( const TQString &platform, const TQString &path ); + void setLibs( const TQString &platform, const TQString &path ); + void setDefines( const TQString &platform, const TQString &path ); + void setConfig( const TQString &platform, const TQString &config ); + void setTemplate( const TQString &t ); + TQString config( const TQString &platform ) const; + TQString libs( const TQString &platform ) const; + TQString defines( const TQString &platform ) const; + TQString includePath( const TQString &platform ) const; + TQString templte() const; + bool isGenericObject( TQObject *o ) const; + +private: + Project *project; + +}; + +#ifndef TQT_NO_SQL +class TQSqlDatabase; + +class DesignerDatabaseImpl: public DesignerDatabase +{ +public: + DesignerDatabaseImpl( DatabaseConnection *d ); + + TQString name() const; + void setName( const TQString & ); + TQString driver() const; + void setDriver( const TQString & ); + TQString database() const; + void setDatabase( const TQString & ); + TQString userName() const; + void setUserName( const TQString & ); + TQString password() const; + void setPassword( const TQString & ); + TQString hostName() const; + void setHostName( const TQString & ); + TQStringList tables() const; + void setTables( const TQStringList & ); + TQMap fields() const; + void setFields( const TQMap & ); + void open( bool suppressDialog = TRUE ) const; + void close() const; + TQSqlDatabase* connection(); +private: + DatabaseConnection *db; + +}; +#endif + +class DesignerPixmapCollectionImpl : public DesignerPixmapCollection +{ +public: + DesignerPixmapCollectionImpl( PixmapCollection *coll ); + void addPixmap( const TQPixmap &p, const TQString &name, bool force ); + TQPixmap pixmap( const TQString &name ) const; + +private: + PixmapCollection *pixCollection; + +}; + +class DesignerFormWindowImpl: public DesignerFormWindow +{ +public: + DesignerFormWindowImpl( FormWindow *fw ); + + TQString name() const; + void setName( const TQString &n ); + TQString fileName() const; + void setFileName( const TQString & ); + void save() const; + bool isModified() const; + void insertWidget( TQWidget * ); + TQWidget *create( const char *className, TQWidget *parent, const char *name ); + void removeWidget( TQWidget * ); + TQWidgetList widgets() const; + void undo(); + void redo(); + void cut(); + void copy(); + void paste(); + void adjustSize(); + void editConnections(); + void checkAccels(); + void layoutH(); + void layoutV(); + void layoutHSplit(); + void layoutVSplit(); + void layoutG(); + void layoutHContainer( TQWidget* w ); + void layoutVContainer( TQWidget* w ); + void layoutGContainer( TQWidget* w ); + void breakLayout(); + void selectWidget( TQWidget * ); + void selectAll(); + void clearSelection(); + bool isWidgetSelected( TQWidget * ) const; + TQWidgetList selectedWidgets() const; + TQWidget *currentWidget() const; + TQWidget *form() const; + void setCurrentWidget( TQWidget * ); + TQPtrList actionList() const; + TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel, + TQObject* parent, const char* name = 0, bool toggle = FALSE ); + void addAction( TQAction * ); + void removeAction( TQAction * ); + void preview() const; + void addFunction( const TQCString &function, const TQString& specifier, const TQString &access, + const TQString &type, const TQString &language, const TQString &returnType ); + void addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot ); + void setProperty( TQObject *o, const char *property, const TQVariant &value ); + TQVariant property( TQObject *o, const char *property ) const; + void setPropertyChanged( TQObject *o, const char *property, bool changed ); + bool isPropertyChanged( TQObject *o, const char *property ) const; + void setColumnFields( TQObject *o, const TQMap & ); + TQStringList implementationIncludes() const; + TQStringList declarationIncludes() const; + void setImplementationIncludes( const TQStringList &lst ); + void setDeclarationIncludes( const TQStringList &lst ); + TQStringList forwardDeclarations() const; + void setForwardDeclarations( const TQStringList &lst ); + TQStringList signalList() const; + void setSignalList( const TQStringList &lst ); + void addMenu( const TQString &text, const TQString &name ); + void addMenuAction( const TQString &menu, TQAction *a ); + void addMenuSeparator( const TQString &menu ); + void addToolBar( const TQString &text, const TQString &name ); + void addToolBarAction( const TQString &tb, TQAction *a ); + void addToolBarSeparator( const TQString &tb ); + + void onModificationChange( TQObject *receiver, const char *slot ); + +private: + FormWindow *formWindow; + +}; + +class DesignerDockImpl: public DesignerDock +{ +public: + DesignerDockImpl(); + + TQDockWindow *dockWindow() const; +}; + +class DesignerOutputDockImpl: public DesignerOutputDock +{ +public: + DesignerOutputDockImpl( OutputWindow *ow ); + + TQWidget *addView( const TQString &pageName ); + void appendDebug( const TQString & ); + void clearDebug(); + void appendError( const TQString &, int ); + void clearError(); + +private: + OutputWindow *outWin; + +}; + +class DesignerSourceFileImpl : public DesignerSourceFile +{ +public: + DesignerSourceFileImpl( SourceFile *e ); + TQString fileName() const; + +private: + SourceFile *ed; + +}; + +#endif diff --git a/kdevdesigner/designer/editfunctions.ui b/kdevdesigner/designer/editfunctions.ui new file mode 100644 index 00000000..ea59e46a --- /dev/null +++ b/kdevdesigner/designer/editfunctions.ui @@ -0,0 +1,714 @@ + +EditFunctionsBase +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + EditFunctionsBase + + + + 0 + 0 + 600 + 371 + + + + Edit Functions + + + true + + + <b>Edit Functions</b><p>Add, edit or delete the current form's slots or functions.</p><p>Click the <b>Add Function</b>-button to create a new function; enter a name, choose an access mode and specify if it should be a slot or normal function.</p><p>Select an entry from the list and click the <b>Delete Function</b>-button to remove a function; in case of a slot all connections using this slot will also be removed.</p> + + + + unnamed + + + 11 + + + 6 + + + + + Function + + + true + + + true + + + + + Return Type + + + true + + + true + + + + + Specifier + + + true + + + true + + + + + Access + + + true + + + true + + + + + Type + + + true + + + true + + + + + In Use + + + true + + + true + + + + functionListView + + + + 7 + 7 + 0 + 0 + + + + StyledPanel + + + Sunken + + + true + + + true + + + <b>This form's functions.</b><p>Select the function you want to change or delete.</p> + + + + + Layout11 + + + + unnamed + + + 6 + + + + showOnlySlots + + + StrongFocus + + + Only d&isplay slots + + + Change displaying mode for functions + + + <b>Check this button if only the slots should be displayed</b><p>Otherwise all functions, i.e. normal C++ functions and slots are displayed.</p> + + + + + + Vertical Spacing1 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + addFunction + + + &New Function + + + Add new function + + + <b>Add a new function.</b><p>New functions have a default name and public access.</p> + + + + + deleteFunction + + + &Delete Function + + + Delete function + + + <b>Delete the selected function.</b><p>All connections using this function are also removed.</p> + + + + + + + boxProperties + + + + 5 + 5 + 0 + 0 + + + + Function Properties + + + + unnamed + + + 11 + + + 6 + + + + Layout14 + + + + unnamed + + + 0 + + + + Layout5 + + + + unnamed + + + 0 + + + 6 + + + + Label8 + + + &Function: + + + AlignVCenter|AlignRight + + + functionName + + + + + functionName + + + + 7 + 0 + 0 + 0 + + + + Change function name + + + <b>Change the name of the selected function.</b><p>The name should include the argument list and must be syntactically correct.</p> + + + + + labelType + + + &Return type: + + + AlignVCenter|AlignRight + + + editType + + + + + editType + + + + 5 + 0 + 0 + 0 + + + + Change the return type of the function + + + <b>Change the return type of the selected function.</b><p>Specifiy here the datatype which should be returned by the function.</p> + + + + + + + Spacer6_2 + + + Vertical + + + Fixed + + + + 20 + 16 + + + + + + Layout13 + + + + unnamed + + + 0 + + + + Label9_2 + + + S&pecifier: + + + AlignVCenter|AlignRight + + + functionSpecifier + + + + + + non virtual + + + + + virtual + + + + + pure virtual + + + + + static + + + + functionSpecifier + + + + 1 + 0 + 0 + 0 + + + + Change function access + + + <b>Change the access policy of the function</b><p>All functions are created virtual and should be reimplemented in subclasses.</p> + + + + + TextLabel1 + + + &Access: + + + WordBreak|AlignVCenter|AlignRight + + + functionAccess + + + + + + public + + + + + protected + + + + + private + + + + functionAccess + + + + 1 + 0 + 0 + 0 + + + + Change function access + + + <b>Change the access policy of the function</b><p>All functions are created virtual and should be reimplemented in subclasses.</p> + + + + + TextLabel1_2 + + + &Type: + + + AlignVCenter|AlignRight + + + functionType + + + + + + slot + + + + + function + + + + functionType + + + Change function type + + + <b>Change the type of the function.</b><p>The type specifies if the function is either a slot or a normal C++ function.</p> + + + + + Spacer5 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + + + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + helpButton + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + okButton + + + &OK + + + true + + + true + + + Close the dialog and apply all the changes. + + + + + cancelButton + + + &Cancel + + + true + + + Close the dialog and discard any changes. + + + + + + + + + cancelButton + clicked() + EditFunctionsBase + reject() + + + okButton + clicked() + EditFunctionsBase + okClicked() + + + deleteFunction + clicked() + EditFunctionsBase + functionRemove() + + + addFunction + clicked() + EditFunctionsBase + functionAdd() + + + functionName + textChanged(const TQString&) + EditFunctionsBase + currentTextChanged(const TQString&) + + + functionListView + selectionChanged(TQListViewItem*) + EditFunctionsBase + currentItemChanged(TQListViewItem*) + + + functionListView + currentChanged(TQListViewItem*) + EditFunctionsBase + currentItemChanged(TQListViewItem*) + + + editType + textChanged(const TQString&) + EditFunctionsBase + currentReturnTypeChanged(const TQString&) + + + functionSpecifier + activated(const TQString&) + EditFunctionsBase + currentSpecifierChanged(const TQString&) + + + functionAccess + activated(const TQString&) + EditFunctionsBase + currentAccessChanged(const TQString&) + + + functionType + activated(const TQString&) + EditFunctionsBase + currentTypeChanged(const TQString&) + + + showOnlySlots + toggled(bool) + EditFunctionsBase + displaySlots(bool) + + + + functionName + editType + functionSpecifier + functionAccess + functionType + helpButton + okButton + cancelButton + functionListView + showOnlySlots + addFunction + deleteFunction + + + currentItemChanged( TQListViewItem * ) + currentSpecifierChanged( const TQString & ) + currentTextChanged( const TQString & ) + currentReturnTypeChanged( const TQString & ) + destroy() + init() + currentAccessChanged( const TQString & ) + currentTypeChanged( const TQString & ) + okClicked() + functionAdd() + functionRemove() + displaySlots( bool ) + + + diff --git a/kdevdesigner/designer/editfunctionsimpl.cpp b/kdevdesigner/designer/editfunctionsimpl.cpp new file mode 100644 index 00000000..5681f00b --- /dev/null +++ b/kdevdesigner/designer/editfunctionsimpl.cpp @@ -0,0 +1,534 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "editfunctionsimpl.h" +#include "formwindow.h" +#include "metadatabase.h" +#include "asciivalidator.h" +#include "mainwindow.h" +#include "hierarchyview.h" +#include "project.h" + +#include +#include +#include "kdevdesigner_part.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) + : EditFunctionsBase( parent, 0, TRUE ), formWindow( fw ) +{ + connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + + id = 0; + functList.clear(); + + TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); + for ( TQValueList::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { + TQListViewItem *i = new TQListViewItem( functionListView ); + + i->setPixmap( 0, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()) ); + i->setText( 0, (*it).function ); + i->setText( 1, (*it).returnType ); + i->setText( 2, (*it).specifier ); + i->setText( 3, (*it).access ); + i->setText( 4, (*it).type ); + + FunctItem fui; + fui.id = id; + fui.oldName = (*it).function; + fui.newName = fui.oldName; + fui.oldRetTyp = (*it).returnType; + fui.retTyp = fui.oldRetTyp; + fui.oldSpec = (*it).specifier; + fui.spec = fui.oldSpec; + fui.oldAccess = (*it).access; + fui.access = fui.oldAccess; + fui.oldType = (*it).type; + fui.type = fui.oldType; + functList.append( fui ); + + functionIds.insert( i, id ); + id++; + + if ( (*it).type == "slot" ) { + if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).function ).latin1() ) ) + i->setText( 5, i18n( "Yes" ) ); + else + i->setText( 5, i18n( "No" ) ); + } else { + i->setText( 5, "---" ); + } + } + + boxProperties->setEnabled( FALSE ); + functionName->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(functionName) ) ); + + if ( functionListView->firstChild() ) + functionListView->setCurrentItem( functionListView->firstChild() ); + + showOnlySlots->setChecked( justSlots ); + lastType = "function"; + + // Enable rename for all TQListViewItems + TQListViewItemIterator lvit = functionListView->firstChild(); + for ( ; *lvit; lvit++ ) + (*lvit)->setRenameEnabled( 0, TRUE ); + + // Connect listview signal to signal-relay + TQObject::connect( functionListView, + TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ), + this, + TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); + + // Connect signal-relay to TQLineEdit "functionName" + TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "functionName" ); + TQObject *obj; + TQObjectListIt itemsLineEditIt( *l ); + while ( (obj = itemsLineEditIt.current()) != 0 ) { + ++itemsLineEditIt; + TQObject::connect( this, + TQT_SIGNAL( itemRenamed( const TQString & ) ), + obj, + TQT_SLOT( setText( const TQString & ) ) ); + } + delete l; +} + +void EditFunctions::okClicked() +{ + TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); + TQString n = i18n( "Add/Remove functions of '%1'" ).arg( formWindow->name() ); + TQPtrList commands; + TQValueList::Iterator fit; + if ( !functionList.isEmpty() ) { + for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) { + bool functionFound = FALSE; + TQValueList::Iterator it = functList.begin(); + for ( ; it != functList.end(); ++it ) { + if ( MetaDataBase::normalizeFunction( (*it).oldName ) == + MetaDataBase::normalizeFunction( (*fit).function ) ) { + functionFound = TRUE; + break; + } + } + if ( !functionFound ) + commands.append( new RemoveFunctionCommand( i18n( "Remove Function" ), + formWindow, (*fit).function, (*fit).specifier, + (*fit).access, + (*fit).type, + formWindow->project()->language(), + (*fit).returnType ) ); + } + } + + bool invalidFunctions = FALSE; + TQValueList invalidItems; + + if ( !functList.isEmpty() ) { + TQStrList lst; + TQValueList::Iterator it = functList.begin(); + for ( ; it != functList.end(); ++it ) { + MetaDataBase::Function function; + function.function = (*it).newName; + function.returnType = (*it).retTyp; + function.specifier = (*it).spec; + function.access = (*it).access; + function.type = (*it).type; + function.language = formWindow->project()->language(); + if ( function.returnType.isEmpty() ) + function.returnType = "void"; + TQString s = function.function; + s = s.simplifyWhiteSpace(); + bool startNum = s[ 0 ] >= '0' && s[ 0 ] <= '9'; + bool noParens = s.contains( '(' ) != 1 || s.contains( ')' ) != 1; + bool illegalSpace = s.find( ' ' ) != -1 && s.find( ' ' ) < s.find( '(' ); + + if ( startNum || noParens || illegalSpace || lst.find( function.function ) != -1 ) { + invalidFunctions = TRUE; + invalidItems.append( (*it) ); + continue; + } + bool functionFound = FALSE; + for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) { + if ( MetaDataBase::normalizeFunction( (*fit).function ) == + MetaDataBase::normalizeFunction( (*it).oldName ) ) { + functionFound = TRUE; + break; + } + } + if ( !functionFound ) + commands.append( new AddFunctionCommand( i18n( "Add Function" ), + formWindow, function.function, function.specifier, + function.access, + function.type, formWindow->project()->language(), + function.returnType ) ); + if ( MetaDataBase::normalizeFunction( (*it).newName ) != MetaDataBase::normalizeFunction( (*it).oldName ) || + (*it).spec != (*it).oldSpec || (*it).access != (*it).oldAccess || (*it).type != (*it).oldType || + (*it).retTyp != (*it).oldRetTyp ) { + TQString normalizedOldName = MetaDataBase::normalizeFunction( (*it).oldName ); + if ((*it).oldName.endsWith("const")) // make sure we get the 'const' when we remove the old name + normalizedOldName += " const"; + commands.append( new ChangeFunctionAttribCommand( i18n( "Change Function Attributes" ), + formWindow, function, normalizedOldName, + (*it).oldSpec, (*it).oldAccess, (*it).oldType, + formWindow->project()->language(), (*it).oldRetTyp ) ); + } + lst.append( function.function ); + } + } + + if ( invalidFunctions ) { + if ( TQMessageBox::information( this, i18n( "Edit Functions" ), + i18n( "Some syntactically incorrect functions have been defined.\n" + "Remove these functions?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { + TQValueList::Iterator it = functList.begin(); + while ( it != functList.end() ) { + bool found = FALSE; + TQValueList::Iterator vit = invalidItems.begin(); + for ( ; vit != invalidItems.end(); ++vit ) { + if ( (*vit).newName == (*it).newName ) { + invalidItems.remove( vit ); + found = TRUE; + break; + } + } + if ( found ) { + int delId = (*it).id; + it = functList.remove( it ); + TQMap::Iterator fit = functionIds.begin(); + while ( fit != functionIds.end() ) { + if ( *fit == delId ) { + TQListViewItem *litem = fit.key(); + functionIds.remove( fit ); + delete litem; + if ( functionListView->currentItem() ) + functionListView->setSelected( functionListView->currentItem(), TRUE ); + currentItemChanged( functionListView->currentItem() ); + break; + } + ++fit; + } + } + else + ++it; + } + if ( functionListView->firstChild() ) { + functionListView->setCurrentItem( functionListView->firstChild() ); + functionListView->setSelected( functionListView->firstChild(), TRUE ); + } + } + formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + return; + } + + if ( !commands.isEmpty() ) { + MacroCommand *cmd = new MacroCommand( n, formWindow, commands ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + + formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + accept(); +} + +void EditFunctions::functionAdd( const TQString &access, const TQString &type ) +{ + TQListViewItem *i = new TQListViewItem( functionListView ); + i->setPixmap( 0, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()) ); + i->setRenameEnabled( 0, TRUE ); + i->setText( 1, "void" ); + i->setText( 2, "virtual" ); + + if ( access.isEmpty() ) + i->setText( 3, "public" ); + else + i->setText( 3, access ); + + if( type.isEmpty() ) { + if ( showOnlySlots->isChecked() ) + i->setText( 4, "slot" ); + else { + i->setText( 4, lastType ); + } + } else { + i->setText( 4, type ); + } + + if ( i->text( 4 ) == "slot" ) { + i->setText( 0, "newSlot()" ); + if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), "newSlot()" ) ) + i->setText( 5, i18n( "Yes" ) ); + else + i->setText( 5, i18n( "No" ) ); + } else { + i->setText( 0, "newFunction()" ); + i->setText( 5, "---" ); + } + + functionListView->setCurrentItem( i ); + functionListView->setSelected( i, TRUE ); + functionListView->ensureItemVisible( i ); + functionName->setFocus(); + functionName->selectAll(); + + FunctItem fui; + fui.id = id; + fui.oldName = i->text( 0 ); + fui.newName = fui.oldName; + fui.oldRetTyp = i->text( 1 ); + fui.retTyp = fui.oldRetTyp; + fui.oldSpec = i->text ( 2 ); + fui.spec = fui.oldSpec; + fui.oldAccess = i->text( 3 ); + fui.access = fui.oldAccess; + fui.oldType = i->text( 4 ); + fui.type = fui.oldType; + lastType = fui.oldType; + functList.append( fui ); + functionIds.insert( i, id ); + id++; +} + +void EditFunctions::functionRemove() +{ + if ( !functionListView->currentItem() ) + return; + + functionListView->blockSignals( TRUE ); + removedFunctions << MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ) ); + int delId = functionIds[ functionListView->currentItem() ]; + TQValueList::Iterator it = functList.begin(); + while ( it != functList.end() ) { + if ( (*it).id == delId ) { + functList.remove( it ); + break; + } + ++it; + } + functionIds.remove( functionListView->currentItem() ); + delete functionListView->currentItem(); + if ( functionListView->currentItem() ) + functionListView->setSelected( functionListView->currentItem(), TRUE ); + functionListView->blockSignals( FALSE ); + currentItemChanged( functionListView->currentItem() ); +} + +void EditFunctions::currentItemChanged( TQListViewItem *i ) +{ + functionName->blockSignals( TRUE ); + functionName->setText( "" ); + functionAccess->setCurrentItem( 0 ); + functionName->blockSignals( FALSE ); + + if ( !i ) { + boxProperties->setEnabled( FALSE ); + return; + } + + functionName->blockSignals( TRUE ); + functionName->setText( i->text( 0 ) ); + editType->setText( i->text( 1 ) ); + TQString specifier = i->text( 2 ); + TQString access = i->text( 3 ); + TQString type = i->text( 4 ); + if ( specifier == "pure virtual" ) + functionSpecifier->setCurrentItem( 2 ); + else if ( specifier == "non virtual" ) + functionSpecifier->setCurrentItem( 0 ); + else if ( specifier == "virtual" ) + functionSpecifier->setCurrentItem( 1 ); + else + functionSpecifier->setCurrentItem( 3 ); + if ( access == "private" ) + functionAccess->setCurrentItem( 2 ); + else if ( access == "protected" ) + functionAccess->setCurrentItem( 1 ); + else + functionAccess->setCurrentItem( 0 ); + if ( type == "slot" ) + functionType->setCurrentItem( 0 ); + else + functionType->setCurrentItem( 1 ); + + functionName->blockSignals( FALSE ); + boxProperties->setEnabled( TRUE ); +} + +void EditFunctions::currentTextChanged( const TQString &txt ) +{ + if ( !functionListView->currentItem() ) + return; + + changeItem( functionListView->currentItem(), Name, txt ); + functionListView->currentItem()->setText( 0, txt ); + + if ( functionListView->currentItem()->text( 4 ) == "slot" ) { + if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) ) + functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); + else + functionListView->currentItem()->setText( 5, i18n( "No" ) ); + } else { + functionListView->currentItem()->setText( 5, "---" ); + } +} + +void EditFunctions::currentSpecifierChanged( const TQString& s ) +{ + if ( !functionListView->currentItem() ) + return; + + changeItem( functionListView->currentItem(), Specifier, s ); + functionListView->currentItem()->setText( 2, s ); +} + +void EditFunctions::currentAccessChanged( const TQString& a ) +{ + if ( !functionListView->currentItem() ) + return; + changeItem( functionListView->currentItem(), Access, a ); + functionListView->currentItem()->setText( 3, a ); +} + + +void EditFunctions::currentReturnTypeChanged( const TQString &type ) +{ + if ( !functionListView->currentItem() ) + return; + changeItem( functionListView->currentItem(), ReturnType, type ); + functionListView->currentItem()->setText( 1, type ); +} + +void EditFunctions::currentTypeChanged( const TQString &type ) +{ + if ( !functionListView->currentItem() ) + return; + changeItem( functionListView->currentItem(), Type, type ); + lastType = type; + functionListView->currentItem()->setText( 4, type ); + if ( type == "slot" ) { + if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), + MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ).latin1() ).latin1() ) ) + functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); + else + functionListView->currentItem()->setText( 5, i18n( "No" ) ); + } else { + functionListView->currentItem()->setText( 5, "---" ); + } +} + +void EditFunctions::changeItem( TQListViewItem *item, Attribute a, const TQString &nV ) +{ + int itemId; + TQMap::Iterator fit = functionIds.find( item ); + if ( fit != functionIds.end() ) + itemId = *fit; + else + return; + + TQValueList::Iterator it = functList.begin(); + for ( ; it != functList.end(); ++it ) { + if ( (*it).id == itemId ) { + switch( a ) { + case Name: + (*it).newName = nV; + break; + case Specifier: + (*it).spec = nV; + break; + case Access: + (*it).access = nV; + break; + case ReturnType: + (*it).retTyp = nV; + break; + case Type: + (*it).type = nV; + break; + } + } + } +} + +void EditFunctions::setCurrentFunction( const TQString &function ) +{ + TQListViewItemIterator it( functionListView ); + while ( it.current() ) { + if ( MetaDataBase::normalizeFunction( it.current()->text( 0 ) ) == function ) { + functionListView->setCurrentItem( it.current() ); + functionListView->setSelected( it.current(), TRUE ); + currentItemChanged( it.current() ); + return; + } + ++it; + } +} + +void EditFunctions::displaySlots( bool justSlots ) +{ + functionIds.clear(); + functionListView->clear(); + for ( TQValueList::Iterator it = functList.begin(); it != functList.end(); ++it ) { + if ( (*it).type == "function" && justSlots ) + continue; + TQListViewItem *i = new TQListViewItem( functionListView ); + functionIds.insert( i, (*it).id ); + i->setPixmap( 0, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()) ); + i->setText( 0, (*it).newName ); + i->setText( 1, (*it).retTyp ); + i->setText( 2, (*it).spec ); + i->setText( 3, (*it).access ); + i->setText( 4, (*it).type ); + + if ( (*it).type == "slot" ) { + if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) ) + i->setText( 5, i18n( "Yes" ) ); + else + i->setText( 5, i18n( "No" ) ); + } else { + i->setText( 5, "---" ); + } + } + + if ( functionListView->firstChild() ) + functionListView->setSelected( functionListView->firstChild(), TRUE ); +} + +void EditFunctions::emitItemRenamed( TQListViewItem *, int, const TQString & text ) +{ + emit itemRenamed( text ); // Relay signal ( to TQLineEdit ) +} diff --git a/kdevdesigner/designer/editfunctionsimpl.h b/kdevdesigner/designer/editfunctionsimpl.h new file mode 100644 index 00000000..0d4259dc --- /dev/null +++ b/kdevdesigner/designer/editfunctionsimpl.h @@ -0,0 +1,95 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef EDITFUNCTIONSIMPL_H +#define EDITFUNCTIONSIMPL_H + +#include "editfunctions.h" +#include "hierarchyview.h" +#include "metadatabase.h" +#include + +class FormWindow; +class TQListViewItem; + +class EditFunctions : public EditFunctionsBase +{ + Q_OBJECT + + +public: + EditFunctions( TQWidget *parent, FormWindow *fw, bool showOnlySlots = FALSE ); + + void setCurrentFunction( const TQString &function ); + void functionAdd( const TQString &access = TQString(), + const TQString &type = TQString() ); + void functionAdd() { functionAdd( "public" ); } + +signals: + void itemRenamed(const TQString &); + +protected slots: + void okClicked(); + void functionRemove(); + void currentItemChanged( TQListViewItem * ); + void currentTextChanged( const TQString &txt ); + void currentSpecifierChanged( const TQString &s ); + void currentAccessChanged( const TQString &a ); + void currentReturnTypeChanged( const TQString &type ); + void currentTypeChanged( const TQString &type ); + void displaySlots( bool justSlots ); + void emitItemRenamed( TQListViewItem *, int, const TQString & ); + +private: + enum Attribute { Name, Specifier, Access, ReturnType, Type }; + struct FunctItem { + int id; + TQString oldName; + TQString newName; + TQString oldRetTyp; + TQString retTyp; + TQString spec; + TQString oldSpec; + TQString access; + TQString oldAccess; + TQString type; + TQString oldType; + + TQ_DUMMY_COMPARISON_OPERATOR( FunctItem ) + }; + + void changeItem( TQListViewItem *item, Attribute a, const TQString &nV ); + + FormWindow *formWindow; + TQMap functionIds; + TQStringList removedFunctions; + TQValueList itemList; + TQValueList functList; + int id; + TQString lastType; +}; + +#endif diff --git a/kdevdesigner/designer/filechooser.cpp b/kdevdesigner/designer/filechooser.cpp new file mode 100644 index 00000000..0f4c426e --- /dev/null +++ b/kdevdesigner/designer/filechooser.cpp @@ -0,0 +1,90 @@ +/********************************************************************** +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "filechooser.h" +#include +#include +#include +#include + +#include + +FileChooser::FileChooser( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), md( File ) +{ + TQHBoxLayout *layout = new TQHBoxLayout( this ); + layout->setMargin( 0 ); + + lineEdit = new TQLineEdit( this, "filechooser_lineedit" ); + layout->addWidget( lineEdit ); + + connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SIGNAL( fileNameChanged( const TQString & ) ) ); + + button = new TQPushButton( "...", this, "filechooser_button" ); + button->setFixedWidth( button->fontMetrics().width( " ... " ) ); + layout->addWidget( button ); + + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( chooseFile() ) ); + + setFocusProxy( lineEdit ); +} + +void FileChooser::setMode( Mode m ) +{ + md = m; +} + +FileChooser::Mode FileChooser::mode() const +{ + return md; +} + +void FileChooser::setFileName( const TQString &fn ) +{ + lineEdit->setText( fn ); +} + +TQString FileChooser::fileName() const +{ + return lineEdit->text(); +} + +void FileChooser::chooseFile() +{ + TQString fn; + if ( mode() == File ) + fn = KFileDialog::getOpenFileName( lineEdit->text(), TQString(), this ); + else + fn = KFileDialog::getExistingDirectory( lineEdit->text(),this ); + + if ( !fn.isEmpty() ) { + lineEdit->setText( fn ); + emit fileNameChanged( fn ); + } +} + diff --git a/kdevdesigner/designer/filechooser.h b/kdevdesigner/designer/filechooser.h new file mode 100644 index 00000000..42430334 --- /dev/null +++ b/kdevdesigner/designer/filechooser.h @@ -0,0 +1,69 @@ +/********************************************************************** +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef FILECHOOSER_H +#define FILECHOOSER_H + +#include + +class TQLineEdit; +class TQPushButton; + +class FileChooser : public TQWidget +{ + Q_OBJECT + + + TQ_ENUMS( Mode ) + TQ_PROPERTY( Mode mode READ mode WRITE setMode ) + TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName ) + +public: + FileChooser( TQWidget *parent = 0, const char *name = 0); + + enum Mode { File, Directory }; + + TQString fileName() const; + Mode mode() const; + +public slots: + void setFileName( const TQString &fn ); + void setMode( Mode m ); + +signals: + void fileNameChanged( const TQString & ); + +private slots: + void chooseFile(); + +private: + TQLineEdit *lineEdit; + TQPushButton *button; + Mode md; + +}; + +#endif diff --git a/kdevdesigner/designer/finddialog.ui b/kdevdesigner/designer/finddialog.ui new file mode 100644 index 00000000..9b16cd8c --- /dev/null +++ b/kdevdesigner/designer/finddialog.ui @@ -0,0 +1,274 @@ + +FindDialog +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + FindDialog + + + + 0 + 0 + 285 + 189 + + + + Find Text + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel1 + + + F&ind: + + + comboFind + + + + + comboFind + + + + 7 + 0 + 0 + 0 + + + + true + + + + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + Spacer1 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + PushButton1 + + + &Find + + + true + + + + + PushButton2 + + + &Close + + + + + + + ButtonGroup2 + + + Direction + + + + unnamed + + + 11 + + + 6 + + + + radioForward + + + Forwar&d + + + true + + + + + radioBackward + + + Bac&kward + + + + + + + ButtonGroup1 + + + Options + + + + unnamed + + + 11 + + + 6 + + + + checkWords + + + &Whole words only + + + + + checkCase + + + Case &sensitive + + + + + checkBegin + + + Start at &beginning + + + + + + + + + PushButton1 + clicked() + FindDialog + doFind() + + + PushButton2 + clicked() + FindDialog + reject() + + + + comboFind + checkWords + checkCase + checkBegin + radioForward + radioBackward + PushButton1 + PushButton2 + + + tqlineedit.h + ../interfaces/editorinterface.h + finddialog.ui.h + + + struct EditorInterface; + + + EditorInterface *editor; + TQObject *formWindow; + + + init() + destroy() + doFind() + setEditor( EditorInterface * e, TQObject * fw ) + + + diff --git a/kdevdesigner/designer/finddialog.ui.h b/kdevdesigner/designer/finddialog.ui.h new file mode 100644 index 00000000..126c0a5f --- /dev/null +++ b/kdevdesigner/designer/finddialog.ui.h @@ -0,0 +1,61 @@ +/********************************************************************** +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +void FindDialog::init() +{ + editor = 0; + formWindow = 0; +} + +void FindDialog::destroy() +{ + if ( editor ) + editor->release(); +} + +void FindDialog::doFind() +{ + if ( !editor ) + return; + + if ( !editor->find( comboFind->currentText(), checkCase->isChecked(), + checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked() ) ) + checkBegin->setChecked( TRUE ); + else + checkBegin->setChecked( FALSE ); + +} + +void FindDialog::setEditor( EditorInterface * e, TQObject * fw ) +{ + if ( fw != formWindow ) + checkBegin->setChecked( TRUE ); + formWindow = fw; + if ( editor ) + editor->release(); + editor = e; + editor->addRef(); +} diff --git a/kdevdesigner/designer/formfile.cpp b/kdevdesigner/designer/formfile.cpp new file mode 100644 index 00000000..4ba5b7c7 --- /dev/null +++ b/kdevdesigner/designer/formfile.cpp @@ -0,0 +1,905 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "formfile.h" +#include "timestamp.h" +#include "project.h" +#include "formwindow.h" +#include "command.h" +#include "sourceeditor.h" +#include "mainwindow.h" +#include "../interfaces/languageinterface.h" +#include "resource.h" +#include "workspace.h" +#include +#include +#include +#include "propertyeditor.h" +#include +#include +#include "designerappiface.h" +#include + +#include +#include +#include "kdevdesigner_part.h" + +static TQString make_func_pretty( const TQString &s ) +{ + TQString res = s; + if ( res.find( ")" ) - res.find( "(" ) == 1 ) + return res; + res.replace( "(", "( " ); + res.replace( ")", " )" ); + res.replace( "&", " &" ); + res.replace( "*", " *" ); + res.replace( ",", ", " ); + res.replace( ":", " : " ); + res = res.simplifyWhiteSpace(); + res.replace( " : : ", "::" ); + res.replace( ">>", "> >" ); + return res; +} + +FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name ) + : filename( fn ), fileNameTemp( temp ), pro( p ), fw( 0 ), ed( 0 ), + timeStamp( 0, fn + codeExtension() ), codeEdited( FALSE ), pkg( FALSE ), + cm( FALSE ), codeFileStat( None ) +{ + MetaDataBase::addEntry( this ); + fake = qstrcmp( name, "qt_fakewindow" ) == 0; + //codeFileStat = FormFile::None; + pro->addFormFile( this ); + loadCode(); + if ( !temp ) + checkFileName( FALSE ); + + connect(this, TQT_SIGNAL(somethingChanged(FormFile* )), this, TQT_SLOT(emitNewStatus(FormFile* ))); +} + +FormFile::~FormFile() +{ + pro->removeFormFile( this ); + if ( TQT_TQOBJECT(formWindow()) ) + formWindow()->setFormFile( 0 ); +} + +void FormFile::setFormWindow( FormWindow *f ) +{ + if ( f == fw ) + return; + if ( fw ) + fw->setFormFile( 0 ); + fw = f; + if ( fw ) + fw->setFormFile( this ); + parseCode( cod, FALSE ); + TQTimer::singleShot( 0, this, TQT_SLOT( notifyFormWindowChange() ) ); +} + +void FormFile::setEditor( SourceEditor *e ) +{ + ed = e; +} + +void FormFile::setFileName( const TQString &fn ) +{ + if ( fn == filename ) + return; + if ( fn.isEmpty() ) { + fileNameTemp = TRUE; + if ( filename.find( "unnamed" ) != 0 ) + filename = createUnnamedFileName(); + return; + } else { + fileNameTemp = FALSE; + } + filename = fn; + timeStamp.setFileName( filename + codeExtension() ); + cod = ""; + loadCode(); +} + +void FormFile::setCode( const TQString &c ) +{ + cod = c; +} + +FormWindow *FormFile::formWindow() const +{ + return fw; +} + +SourceEditor *FormFile::editor() const +{ + return ed; +} + +TQString FormFile::fileName() const +{ + return filename; +} + +TQString FormFile::absFileName() const +{ + return pro->makeAbsolute( filename ); +} + +TQString FormFile::codeFile() const +{ + TQString codeExt = codeExtension(); + if ( codeExt.isEmpty() ) + return ""; + return filename + codeExt; +} + +TQString FormFile::code() +{ + return cod; +} + +bool FormFile::save( bool withMsgBox, bool ignoreModified ) +{ + if ( fileNameTemp ) + return saveAs(); + if ( !ignoreModified && !isModified() ) + return TRUE; + if ( ed ) + ed->save(); + + if ( TQT_TQOBJECT(formWindow()) && isModified( WFormWindow ) ) { + if ( withMsgBox ) { + if ( !formWindow()->checkCustomWidgets() ) + return FALSE; + } + + if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) { + TQString fn( pro->makeAbsolute( filename ) ); +#if defined(Q_OS_WIN32) + fn += ".bak"; +#else + fn += "~"; +#endif + TQFile f( pro->makeAbsolute( filename ) ); + if ( f.open( IO_ReadOnly ) ) { + TQFile f2( fn ); + if ( f2.open( IO_WriteOnly | IO_Translate ) ) { + TQCString data( f.size() ); + f.readBlock( data.data(), f.size() ); + f2.writeBlock( data ); + } else { + TQMessageBox::warning( MainWindow::self, i18n( "Save" ), + i18n( "The file %1 could not be saved" ).arg( codeFile() ) ); + } + } + } + } + + if ( isModified( WFormCode ) ) { + if ( TQFile::exists( pro->makeAbsolute( codeFile() ) ) ) { + TQString fn( pro->makeAbsolute( codeFile() ) ); +#if defined(Q_OS_WIN32) + fn += ".bak"; +#else + fn += "~"; +#endif + TQFile f( pro->makeAbsolute( codeFile() ) ); + if ( f.open( IO_ReadOnly ) ) { + TQFile f2( fn ); + if ( f2.open( IO_WriteOnly | IO_Translate) ) { + TQCString data( f.size() ); + f.readBlock( data.data(), f.size() ); + f2.writeBlock( data ); + } else if ( tqApp->type() != TQApplication::Tty ) { + TQMessageBox::warning( MainWindow::self, i18n( "Save" ), + i18n( "The file %1 could not be saved" ).arg( codeFile() ) ); + } + } + } + } + + if ( TQT_TQOBJECT(formWindow()) ) { + Resource resource( MainWindow::self ); + resource.setWidget( formWindow() ); + bool formCodeOnly = isModified( WFormCode ) && !isModified( WFormWindow ); + if ( !resource.save( pro->makeAbsolute( filename ), formCodeOnly ) ) { + if ( MainWindow::self ) + MainWindow::self->statusMessage( i18n( "Failed to save file '%1'.").arg( formCodeOnly ? codeFile(): filename ) ); + if ( formCodeOnly ) + return FALSE; + return saveAs(); + } + if ( MainWindow::self ) + MainWindow::self->statusMessage( i18n( "'%1' saved."). + arg( formCodeOnly ? codeFile() : filename )); + } else { + if ( !Resource::saveFormCode(this, MetaDataBase::languageInterface(pro->language())) ) + return FALSE; + } + timeStamp.update(); + setModified( FALSE ); + return TRUE; +} + +bool FormFile::saveAs( bool ignoreModified ) +{ + TQString f = pro->makeAbsolute( fileName() ); + if ( fileNameTemp && TQT_TQOBJECT(formWindow()) ) { + f = TQString( formWindow()->name() ).lower(); + f.replace( "::", "_" ); + f = pro->makeAbsolute( f + ".ui" ); + } + bool saved = FALSE; + if ( ignoreModified ) { + TQString dir = TQStringList::split( ':', pro->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first(); + f = TQFileInfo( f ).fileName(); + f.prepend( dir + "/" ); + } + TQString fn; + while ( !saved ) { + fn = KFileDialog::getSaveFileName( f, + i18n( "*.ui|TQt User-Interface Files" ) + "\n" + + i18n( "*|All Files" ), MainWindow::self, /*0,*/ + i18n( "Save Form '%1' As").arg( formName() )/*, + MainWindow::self ? &MainWindow::self->lastSaveFilter : 0*/ ); + if ( fn.isEmpty() ) + return FALSE; + TQFileInfo fi( fn ); + if ( fi.extension() != "ui" ) + fn += ".ui"; + fileNameTemp = FALSE; + filename = pro->makeRelative( fn ); + TQFileInfo relfi( filename ); + if ( relfi.exists() ) { + if ( TQMessageBox::warning( MainWindow::self, i18n( "File Already Exists" ), + i18n( "The file already exists. Do you wish to overwrite it?" ), + TQMessageBox::Yes, + TQMessageBox::No ) == TQMessageBox::Yes ) { + saved = TRUE; + } else { + filename = f; + } + + } else { + saved = TRUE; + } + } + if ( !checkFileName( TRUE ) ) { + filename = f; + return FALSE; + } + pro->setModified( TRUE ); + timeStamp.setFileName( pro->makeAbsolute( codeFile() ) ); + if ( ed && TQT_TQOBJECT(formWindow()) ) + ed->setCaption( i18n( "Edit %1" ).arg( formWindow()->name() ) ); + setModified( TRUE ); + if ( pro->isDummy() ) + fw->mainWindow()->addRecentlyOpenedFile( fn ); + return save( TRUE, ignoreModified ); +} + +bool FormFile::close() +{ + if ( editor() ) { + editor()->save(); + editor()->close(); + } + if ( TQT_TQOBJECT(formWindow()) ) + return formWindow()->close(); + return TRUE; +} + +bool FormFile::closeEvent() +{ + if ( !isModified() && fileNameTemp ) { + pro->removeFormFile( this ); + return TRUE; + } + + if ( !isModified() ) + return TRUE; + + if ( editor() ) + editor()->save(); + + switch ( TQMessageBox::warning( MainWindow::self, i18n( "Save Form" ), + i18n( "Save changes to form '%1'?" ).arg( filename ), + i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { + case 0: // save + if ( !save() ) + return FALSE; + case 1: // don't save + loadCode(); + if ( ed ) + ed->editorInterface()->setText( cod ); + if ( fileNameTemp ) + pro->removeFormFile( this ); + if ( MainWindow::self ) + MainWindow::self->workspace()->update(); + break; + case 2: // cancel + return FALSE; + default: + break; + } + + setModified( FALSE ); + if ( MainWindow::self ) + MainWindow::self->updateFunctionList(); + setCodeEdited( FALSE ); + return TRUE; +} + +void FormFile::setModified( bool m, int who ) +{ + if ( ( who & WFormWindow ) == WFormWindow ) + setFormWindowModified( m ); + if ( ( who & WFormCode ) == WFormCode ) + setCodeModified( m ); +} + +bool FormFile::isModified( int who ) +{ + if ( who == WFormWindow ) + return isFormWindowModified(); + if ( who == WFormCode ) + return isCodeModified(); + return isCodeModified() || isFormWindowModified(); +} + +bool FormFile::isFormWindowModified() const +{ + if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) + return FALSE; + return formWindow()->commandHistory()->isModified(); +} + +bool FormFile::isCodeModified() const +{ + if ( !editor() ) + return cm; + return editor()->isModified(); +} + +void FormFile::setFormWindowModified( bool m ) +{ + bool b = isFormWindowModified(); + if ( m == b ) + return; + if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) + return; + formWindow()->commandHistory()->setModified( m ); + emit somethingChanged( this ); +} + +void FormFile::setCodeModified( bool m ) +{ + bool b = isCodeModified(); + if ( m == b ) + return; + emit somethingChanged( this ); + cm = m; + if ( !editor() ) + return; + editor()->setModified( m ); +} + +void FormFile::showFormWindow() +{ + if ( !MainWindow::self ) + return; + if ( TQT_TQOBJECT(formWindow()) ) { + if ( ( formWindow()->hasFocus() || + TQT_BASE_OBJECT(MainWindow::self->qWorkspace()->activeWindow()) == TQT_BASE_OBJECT(formWindow()) ) && + TQT_BASE_OBJECT(MainWindow::self->propertyeditor()->formWindow()) != TQT_BASE_OBJECT(formWindow()) ) { + MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(formWindow()->currentWidget()), formWindow() ); + MainWindow::self->objectHierarchy()->setFormWindow( formWindow(), + TQT_TQOBJECT(formWindow()->currentWidget()) ); + } + formWindow()->setFocus(); + return; + } + MainWindow::self->openFormWindow( pro->makeAbsolute( filename ), TRUE, this ); +} + +bool FormFile::setupUihFile( bool askForUih ) +{ + if ( !pro->isCpp() || !askForUih ) { + if ( !hasFormCode() ) { + createFormCode(); + setModified( TRUE ); + } + codeFileStat = FormFile::Ok; + return TRUE; + } + if ( codeFileStat != FormFile::Ok && !ed ) { + if ( hasFormCode() ) { + int i = TQMessageBox::information( MainWindow::self, i18n( "Using ui.h File" ), + i18n( "An \"ui.h\" file for this form already exists.\n" + "Do you want to use it or create a new one?" ), + i18n( "Use Existing" ), i18n( "Create New" ), + i18n( "Cancel" ), 2, 2 ); + if ( i == 2 ) + return FALSE; + if ( i == 1 ) + createFormCode(); + } else { + if ( TQMessageBox::Yes != TQMessageBox::information( MainWindow::self, i18n( "Creating ui.h file" ), + i18n( "Do you want to create an new \"ui.h\" file?" ), + TQMessageBox::Yes, TQMessageBox::No ) ) + return FALSE; + createFormCode(); + } + setModified( TRUE ); + } + codeFileStat = FormFile::Ok; + return TRUE; +} + +SourceEditor *FormFile::showEditor( bool askForUih ) +{ + if ( !MainWindow::self ) + return 0; + showFormWindow(); + //emit signal to the embedding IDE if there is one and return 0 because + //no source editing is possible + emit fw->mainWindow()->part()->emitEditSource(fw->fileName()); + return 0; +/* if ( !setupUihFile( askForUih ) ) + return 0; + return MainWindow::self->openSourceEditor();*/ +} + +static int ui_counter = 0; +TQString FormFile::createUnnamedFileName() +{ + return TQString( "unnamed" ) + TQString::number( ++ui_counter ) + TQString( ".ui" ); +} + +TQString FormFile::codeExtension() const +{ + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( iface ) + return iface->formCodeExtension(); + return ""; +} + +TQString FormFile::codeComment() const +{ + return TQString( "/****************************************************************************\n" + "** ui.h extension file, included from the uic-generated form implementation.\n" + "**\n" + "** If you want to add, delete, or rename functions or slots, use\n" + "** TQt Designer to update this file, preserving your code.\n" + "**\n" + "** You should not define a constructor or destructor in this file.\n" + "** Instead, write your code in functions called init() and destroy().\n" + "** These will automatically be called by the form's constructor and\n" + "** destructor.\n" + "*****************************************************************************/\n" ); +} + +bool FormFile::hasFormCode() const +{ + return !cod.isEmpty() && cod != TQString( codeComment() ); +} + +int FormFile::codeFileState() const +{ + return hasFormCode() ? codeFileStat : None; +} + +void FormFile::setCodeFileState( UihState s ) +{ + codeFileStat = s; +} + +void FormFile::createFormCode() +{ + if ( !TQT_TQOBJECT(formWindow()) ) + return; + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( !iface ) + return; + if ( pro->isCpp() ) + cod = codeComment(); + TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); + for ( TQValueList::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { + cod += (!cod.isEmpty() ? "\n\n" : "") + + iface->createFunctionStart( formWindow()->name(), make_func_pretty((*it).function), + (*it).returnType.isEmpty() ? + TQString( "void" ) : + (*it).returnType, (*it).access ) + + "\n" + iface->createEmptyFunction(); + } + parseCode( cod, FALSE ); +} + +void FormFile::load() +{ + showFormWindow(); + code(); +} + +bool FormFile::loadCode() +{ + TQFile f( pro->makeAbsolute( codeFile() ) ); + if ( !f.open( IO_ReadOnly ) ) { + cod = ""; + setCodeFileState( FormFile::None ); + return FALSE; + } + TQTextStream ts( &f ); + cod = ts.read(); + parseCode( cod, FALSE ); + if ( hasFormCode() && codeFileStat != FormFile::Ok ) + setCodeFileState( FormFile::Deleted ); + timeStamp.update(); + return TRUE; +} + +bool FormFile::isCodeEdited() const +{ + return codeEdited; +} + +void FormFile::setCodeEdited( bool b ) +{ + codeEdited = b; +} + +void FormFile::parseCode( const TQString &txt, bool allowModify ) +{ + if ( !TQT_TQOBJECT(formWindow()) ) + return; + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( !iface ) + return; + TQValueList functions; + TQValueList newFunctions, oldFunctions; + oldFunctions = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); + iface->functions( txt, &functions ); + TQMap funcs; + for ( TQValueList::Iterator it = functions.begin(); + it != functions.end(); ++it ) { + bool found = FALSE; + for ( TQValueList::Iterator fit = oldFunctions.begin(); + fit != oldFunctions.end(); ++fit ) { + TQString f( (*fit).function ); + if ( MetaDataBase::normalizeFunction( f ) == + MetaDataBase::normalizeFunction( (*it).name ) ) { + found = TRUE; + MetaDataBase::Function function; + function.function = make_func_pretty( (*it).name ); + function.specifier = (*fit).specifier; + function.type = (*fit).type; + if ( !pro->isCpp() ) + function.access = (*it).access; + else + function.access = (*fit).access; + function.language = (*fit).language; + function.returnType = (*it).returnType; + newFunctions << function; + funcs.insert( (*it).name, (*it).body ); + oldFunctions.remove( fit ); + break; + } + } + if ( !found ) { + MetaDataBase::Function function; + function.function = make_func_pretty( (*it).name ); + function.specifier = "virtual"; + function.access = "public"; + function.language = pro->language(); + function.returnType = (*it).returnType; + if ( function.returnType == "void" ) + function.type = "slot"; + else + function.type = "function"; + if ( function.function == "init()" || function.function == "destroy()" ) { + function.type = "function"; + function.access = "private"; + function.specifier = "non virtual"; + } + newFunctions << function; + funcs.insert( (*it).name, (*it).body ); + if ( allowModify ) + setFormWindowModified( TRUE ); + } + } + + if ( allowModify && oldFunctions.count() > 0 ) + setFormWindowModified( TRUE ); + + MetaDataBase::setFunctionList( TQT_TQOBJECT(formWindow()), newFunctions ); +} + +void FormFile::syncCode() +{ + if ( !editor() ) + return; + parseCode( editor()->editorInterface()->text(), TRUE ); + cod = editor()->editorInterface()->text(); +} + +void FormFile::checkTimeStamp() +{ + if ( timeStamp.isUpToDate() ) + return; + timeStamp.update(); + if ( codeEdited ) { + if ( TQMessageBox::information( MainWindow::self, i18n( "TQt Designer" ), + i18n( "File '%1' has been changed outside TQt Designer.\n" + "Do you want to reload it?" ).arg( timeStamp.fileName() ), + i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { + TQFile f( timeStamp.fileName() ); + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + editor()->editorInterface()->setText( ts.read() ); + editor()->save(); + if ( MainWindow::self ) + MainWindow::self->functionsChanged(); + } + } + } else { + loadCode(); + } +} + +bool FormFile::isUihFileUpToDate() +{ + if ( timeStamp.isUpToDate() ) + return TRUE; + if ( !editor() ) { + MainWindow::self->editSource(); + tqDebug( "parse Code" ); + parseCode( editor()->editorInterface()->text(), TRUE ); + } + checkTimeStamp(); + return FALSE; +} + +void FormFile::addFunctionCode( MetaDataBase::Function function ) +{ + if ( pro->isCpp() && !hasFormCode() && !codeEdited ) + return; + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( !iface ) + return; + + TQValueList funcs; + iface->functions( cod, &funcs ); + bool hasFunc = FALSE; + for ( TQValueList::Iterator it = funcs.begin(); + it != funcs.end(); ++it ) { + if ( MetaDataBase::normalizeFunction( (*it).name ) == MetaDataBase::normalizeFunction( function.function ) ) { + hasFunc = TRUE; + break; + } + } + + if ( !hasFunc ) { + if ( !codeEdited && !timeStamp.isUpToDate() ) + loadCode(); + MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( TQT_TQOBJECT(formWindow()) ); + TQString cn; + if ( mi.classNameChanged ) + cn = mi.className; + if ( cn.isEmpty() ) + cn = formWindow()->name(); + TQString body = "\n\n" + iface->createFunctionStart( cn, + make_func_pretty( function.function ), + function.returnType.isEmpty() ? + TQString( "void" ) : + function.returnType, function.access ) + + "\n" + iface->createEmptyFunction(); + cod += body; + if ( codeEdited ) { + setModified( TRUE ); + emit somethingChanged( this ); + } + } +} + +void FormFile::removeFunctionCode( MetaDataBase::Function function ) +{ + if ( pro->isCpp() && !hasFormCode() && !codeEdited ) + return; + + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( !iface ) + return; + + checkTimeStamp(); + TQString sourceCode = code(); + if ( sourceCode.isEmpty() ) + return; + TQValueList functions; + iface->functions( sourceCode, &functions ); + TQString fu = MetaDataBase::normalizeFunction( function.function ); + for ( TQValueList::Iterator fit = functions.begin(); fit != functions.end(); ++fit ) { + if ( MetaDataBase::normalizeFunction( (*fit).name ) == fu ) { + int line = 0; + int start = 0; + while ( line < (*fit).start - 1 ) { + start = sourceCode.find( '\n', start ); + if ( start == -1 ) + return; + start++; + line++; + } + if ( start == -1 ) + return; + int end = start; + while ( line < (*fit).end + 1 ) { + end = sourceCode.find( '\n', end ); + if ( end == -1 ) { + if ( line <= (*fit).end ) + end = sourceCode.length() - 1; + else + return; + } + end++; + line++; + } + if ( end < start ) + return; + sourceCode.remove( start, end - start ); + setCode( sourceCode ); + } + } +} + +void FormFile::functionNameChanged( const TQString &oldName, const TQString &newName ) +{ + if ( !cod.isEmpty() ) { + TQString funcStart = TQString( formWindow()->name() ) + TQString( "::" ); + int i = cod.find( funcStart + oldName ); + if ( i != -1 ) { + cod.remove( i + funcStart.length(), oldName.length() ); + cod.insert( i + funcStart.length(), newName ); + } + } +} + +void FormFile::functionRetTypeChanged( const TQString &fuName, const TQString &oldType, const TQString &newType ) +{ + if ( !cod.isEmpty() ) { + TQString oldFunct = oldType + " " + TQString( formWindow()->name() ) + "::" + fuName; + TQString newFunct = newType + " " + TQString( formWindow()->name() ) + "::" + fuName; + + int i = cod.find( oldFunct ); + if ( i != -1 ) { + cod.remove( i, oldFunct.length() ); + cod.insert( i, newFunct ); + } + } +} + +TQString FormFile::formName() const +{ + FormFile* that = (FormFile*) this; + if ( TQT_TQOBJECT(formWindow()) ) { + that->cachedFormName = formWindow()->name(); + return cachedFormName; + } + if ( !cachedFormName.isNull() ) + return cachedFormName; + TQFile f( pro->makeAbsolute( filename ) ); + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + TQString line; + TQString className; + while ( !ts.eof() ) { + line = ts.readLine(); + if ( !className.isEmpty() ) { + int end = line.find( "" ); + if ( end == -1 ) { + className += line; + } else { + className += line.left( end ); + break; + } + continue; + } + int start; + if ( ( start = line.find( "" ) ) != -1 ) { + int end = line.find( "" ); + if ( end == -1 ) { + className = line.mid( start + 7 ); + } else { + className = line.mid( start + 7, end - ( start + 7 ) ); + break; + } + } + } + that->cachedFormName = className; + } + if ( cachedFormName.isEmpty() ) + that->cachedFormName = filename; + return cachedFormName; +} + +void FormFile::formWindowChangedSomehow() +{ + emit somethingChanged( this ); +} + +bool FormFile::checkFileName( bool allowBreak ) +{ + FormFile *ff = pro->findFormFile( filename, this ); + if ( ff ) + TQMessageBox::warning( MainWindow::self, i18n( "Invalid Filename" ), + i18n( "The project already contains a form with a\n" + "filename of '%1'. Please choose a new filename." ).arg( filename ) ); + while ( ff ) { + TQString fn; + while ( fn.isEmpty() ) { + fn = KFileDialog::getSaveFileName( pro->makeAbsolute( fileName() ), + i18n( "*.ui|TQt User-Interface Files" ) + "\n" + + i18n( "*|All Files" ), MainWindow::self,/* 0,*/ + i18n( "Save Form '%1' As"). + arg( formWindow()->name() )/*, + MainWindow::self ? &MainWindow::self->lastSaveFilter : 0 */); + if ( allowBreak && fn.isEmpty() ) + return FALSE; + } + filename = pro->makeRelative( fn ); + ff = pro->findFormFile( filename, this ); + } + return TRUE; +} + +void FormFile::addConnection( const TQString &sender, const TQString &signal, + const TQString &receiver, const TQString &slot ) +{ + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( iface ) + iface->addConnection( sender, signal, receiver, slot, &cod ); + if ( ed ) + ed->editorInterface()->setText( cod ); +} + +void FormFile::removeConnection( const TQString &sender, const TQString &signal, + const TQString &receiver, const TQString &slot ) +{ + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( iface ) + iface->removeConnection( sender, signal, receiver, slot, &cod ); + if ( ed ) + ed->editorInterface()->setText( cod ); +} + +void FormFile::notifyFormWindowChange() +{ + if ( fw ) + pro->formOpened( fw ); +} + +void FormFile::emitNewStatus(FormFile *file) +{ + fw->mainWindow()->part()->emitNewStatus(fileName(), isModified()); +} diff --git a/kdevdesigner/designer/formfile.h b/kdevdesigner/designer/formfile.h new file mode 100644 index 00000000..79f92d16 --- /dev/null +++ b/kdevdesigner/designer/formfile.h @@ -0,0 +1,146 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef FORMFILE_H +#define FORMFILE_H + +#include +#include "timestamp.h" +#include "metadatabase.h" + +class Project; +class FormWindow; +class SourceEditor; + +class FormFile : public TQObject +{ + Q_OBJECT + + friend class SourceEditor; + +public: + enum Who { + WFormWindow = 1, + WFormCode = 2, + WAnyOrAll = WFormWindow | WFormCode + }; + + enum UihState { None, Ok, Deleted }; + + FormFile( const TQString &fn, bool temp, Project *p, const char *name = 0 ); + ~FormFile(); + + void setFormWindow( FormWindow *f ); + void setEditor( SourceEditor *e ); + void setFileName( const TQString &fn ); + void setCode( const TQString &c ); + void setModified( bool m, int who = WAnyOrAll ); + void setCodeEdited( bool b ); + + FormWindow *formWindow() const; + SourceEditor *editor() const; + TQString fileName() const; + TQString absFileName() const; + + bool supportsCodeFile() const { return !codeExtension().isEmpty(); } + TQString codeComment() const; + TQString codeFile() const; + TQString code(); + bool isCodeEdited() const; + + bool loadCode(); + void load(); + bool save( bool withMsgBox = TRUE, bool ignoreModified = FALSE ); + bool saveAs( bool ignoreModified = FALSE ); + bool close(); + bool closeEvent(); + bool isModified( int who = WAnyOrAll ); + bool hasFormCode() const; + void createFormCode(); + void syncCode(); + void checkTimeStamp(); + bool isUihFileUpToDate(); + void addFunctionCode( MetaDataBase::Function function ); + void removeFunctionCode( MetaDataBase::Function function ); + void functionNameChanged( const TQString &oldName, const TQString &newName ); + void functionRetTypeChanged( const TQString &fuName, const TQString &oldType, const TQString &newType ); + + void showFormWindow(); + SourceEditor *showEditor( bool askForUih = TRUE ); + + static TQString createUnnamedFileName(); + TQString formName() const; + + bool isFake() const { return fake; } + + void parseCode( const TQString &txt, bool allowModify ); + + void addConnection( const TQString &sender, const TQString &signal, + const TQString &receiver, const TQString &slot ); + void removeConnection( const TQString &sender, const TQString &signal, + const TQString &receiver, const TQString &slot ); + + bool hasTempFileName() const { return fileNameTemp; } + void setCodeFileState( UihState ); + int codeFileState() const; + bool setupUihFile( bool askForUih = TRUE ); + + Project *project() const { return pro; } + +signals: + void somethingChanged( FormFile* ); + +private slots: + void formWindowChangedSomehow(); + void notifyFormWindowChange(); + void emitNewStatus(FormFile* file); + +private: + bool isFormWindowModified() const; + bool isCodeModified() const; + void setFormWindowModified( bool m ); + void setCodeModified( bool m ); + TQString codeExtension() const; + bool checkFileName( bool allowBreak ); + +private: + TQString filename; + bool fileNameTemp; + Project *pro; + FormWindow *fw; + SourceEditor *ed; + TQString cod; + TimeStamp timeStamp; + bool codeEdited; + TQString cachedFormName; + bool fake; + bool pkg; + bool cm; + UihState codeFileStat; + +}; + +#endif diff --git a/kdevdesigner/designer/formsettings.ui b/kdevdesigner/designer/formsettings.ui new file mode 100644 index 00000000..6337e8cf --- /dev/null +++ b/kdevdesigner/designer/formsettings.ui @@ -0,0 +1,549 @@ + +FormSettingsBase +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + FormSettingsBase + + + + 0 + 0 + 597 + 458 + + + + Form Settings + + + true + + + <b>Form Settings</b><p>Change settings for the form. Settings like <b>Comment</b> and <b>Author</b> are for your own use and are not required.</p> + + + + unnamed + + + 11 + + + 6 + + + + ButtonGroup1 + + + Pixmaps + + + + unnamed + + + 11 + + + 6 + + + + radioPixmapInline + + + Save in&line + + + true + + + Save pixmaps in the .ui files + + + <b>Save Inline</b><p>Saves the pixmaps as binary data in the .ui files. Pixmaps saved like this are not shared between forms. We recommend using Project image files instead. + + + + + radioProjectImageFile + + + Project &image file + + + Use the Project's Image file for pixmaps + + + <b>Use the Project's Image file for pixmaps</b> +<p>Each project may have a collection of pixmaps. If you use a project, we recommend that you use this option since it shares the images and is the fastest and most efficient way to use pixmaps in your forms.</p> + + + + + editPixmapFunction + + + false + + + Specify Pixmap-Loader function (only the function's name, no parentheses.) + + + <b>Specify Pixmap-Loader function</b><p>Specify the function which should be used for loading a pixmap in the generated code. <em>Only enter the function's name, without parentheses.</em> + + + + + radioPixmapFunction + + + Use &function: + + + Use the given function for pixmaps + + + <b>Use a given function for pixmaps</b><p>If you choose this option you must define a function in the line edit at the right which will be used in the generated code for loading pixmaps. When choosing a pixmap in <i>Qt Designer</i> you will be asked to specify the arguments which will be passed to the function in the generated code.<p> This approach makes it possible to use your own icon-loader function for loading pixmaps. <i>Qt Designer</i> cannot preview the correct image if you use your own function. + + + + + + + GroupBox1 + + + Box + + + Sunken + + + Settings + + + + unnamed + + + 11 + + + 6 + + + + editClassName + + + Change class name + + + <b>Enter the name of the class that will be created.</b><p><em>classname.h</em> and <em>classname.cpp</em> will be generated as C++ output when it is compiled by uic.</p> + + + + + TextLabel1_2 + + + A&uthor: + + + editAuthor + + + + + editAuthor + + + Enter your name + + + Enter your name. + + + + + TextLabel1 + + + Class &name: + + + editClassName + + + + + TextLabel2 + + + Co&mment: + + + editComment + + + + + editComment + + + Enter a comment about the form. + + + + + Spacer1 + + + Vertical + + + Expanding + + + + + + + GroupBox2 + + + La&youts + + + + unnamed + + + 11 + + + 6 + + + + spinMargin + + + 11 + + + + + Spacer3 + + + Horizontal + + + Expanding + + + + + TextLabel2_2 + + + D&efault spacing: + + + spinSpacing + + + + + checkLayoutFunctions + + + Use func&tions: + + + Use functions to get the margin and spacing + + + <b>Use a given function for margin and/or spacing</b><p>If you choose this option you must define functions in the line edit below which will be used in the generated code for getting the margin and spacing value. <i>Qt Designer</i> cannot preview the correct margin or spacing if you use your own function. Instead, the default values will be used for preview. + + + + + spinSpacing + + + 6 + + + + + Spacer4 + + + Horizontal + + + Expanding + + + + + TextLabel1_3 + + + Default mar&gin: + + + spinMargin + + + + + spaFuLabel + + + false + + + S&pacing: + + + editSpacingFunction + + + + + marFuLabel + + + false + + + + 5 + 5 + 0 + 0 + + + + Ma&rgin: + + + editMarginFunction + + + + + Spacer5 + + + Horizontal + + + Expanding + + + + + editSpacingFunction + + + false + + + Specify spacing function (only the function's name, no parentheses.) + + + <b>Specify spacing function</b><p>Specify the function which should be used for getting the spacing in the generated code. <em>Only enter the function's name, without parentheses.</em> + + + + + editMarginFunction + + + false + + + + 5 + 0 + 0 + 0 + + + + Specify margin function (only the function's name, no parentheses.) + + + <b>Specify margin function</b><p>Specify the function which should be used for getting the margin in the generated code. <em>Only enter the function's name, without parentheses.</em> + + + + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + buttonHelp + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + + buttonOk + + + &OK + + + true + + + true + + + Close the dialog and apply all the changes. + + + + + buttonCancel + + + &Cancel + + + true + + + Close the dialog and discard any changes. + + + + + + + + + buttonCancel + clicked() + FormSettingsBase + reject() + + + buttonOk + clicked() + FormSettingsBase + okClicked() + + + radioPixmapFunction + toggled(bool) + editPixmapFunction + setEnabled(bool) + + + checkLayoutFunctions + toggled(bool) + editSpacingFunction + setEnabled(bool) + + + checkLayoutFunctions + toggled(bool) + editMarginFunction + setEnabled(bool) + + + checkLayoutFunctions + toggled(bool) + marFuLabel + setEnabled(bool) + + + checkLayoutFunctions + toggled(bool) + spaFuLabel + setEnabled(bool) + + + + editClassName + editComment + editAuthor + radioPixmapInline + radioPixmapFunction + editPixmapFunction + radioProjectImageFile + spinMargin + spinSpacing + checkLayoutFunctions + editMarginFunction + editSpacingFunction + buttonOk + buttonCancel + buttonHelp + + + okClicked() + + + diff --git a/kdevdesigner/designer/formsettingsimpl.cpp b/kdevdesigner/designer/formsettingsimpl.cpp new file mode 100644 index 00000000..e29ea157 --- /dev/null +++ b/kdevdesigner/designer/formsettingsimpl.cpp @@ -0,0 +1,118 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "formsettingsimpl.h" +#include "formwindow.h" +#include "metadatabase.h" +#include "command.h" +#include "asciivalidator.h" +#include "mainwindow.h" +#include "project.h" + +#include +#include +#include +#include +#include +#include +#include + +FormSettings::FormSettings( TQWidget *parent, FormWindow *fw ) + : FormSettingsBase( parent, 0, TRUE ), formwindow( fw ) +{ + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(fw) ); + if ( info.classNameChanged && !info.className.isEmpty() ) + editClassName->setText( info.className ); + else + editClassName->setText( fw->name() ); + editComment->setText( info.comment ); + editAuthor->setText( info.author ); + + editClassName->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editClassName) ) ); + editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editPixmapFunction) ) ); + + if ( formwindow->savePixmapInline() ) + radioPixmapInline->setChecked( TRUE ); + else if ( formwindow->savePixmapInProject() ) + radioProjectImageFile->setChecked( TRUE ); + else + radioPixmapFunction->setChecked( TRUE ); + editPixmapFunction->setText( formwindow->pixmapLoaderFunction() ); + radioProjectImageFile->setEnabled( !fw->project()->isDummy() ); + spinSpacing->setValue( formwindow->layoutDefaultSpacing() ); + spinMargin->setValue( formwindow->layoutDefaultMargin() ); + editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editSpacingFunction) ) ); + editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editMarginFunction) ) ); + checkLayoutFunctions->setChecked( formwindow->hasLayoutFunctions() ); + editSpacingFunction->setText( formwindow->spacingFunction() ); + editMarginFunction->setText( formwindow->marginFunction() ); +} + +void FormSettings::okClicked() +{ + MetaDataBase::MetaInfo info; + info.className = editClassName->text(); + info.classNameChanged = info.className != TQString( formwindow->name() ); + info.comment = editComment->text(); + info.author = editAuthor->text(); + MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), info ); + + formwindow->commandHistory()->setModified( TRUE ); + + if ( formwindow->savePixmapInline() ) { + MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) ); + MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) ); + } else if ( formwindow->savePixmapInProject() ) { + MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) ); + } else { + MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) ); + } + + if ( radioPixmapInline->isChecked() ) { + formwindow->setSavePixmapInline( TRUE ); + formwindow->setSavePixmapInProject( FALSE ); + } else if ( radioProjectImageFile->isChecked() ){ + formwindow->setSavePixmapInline( FALSE ); + formwindow->setSavePixmapInProject( TRUE ); + } else { + formwindow->setSavePixmapInline( FALSE ); + formwindow->setSavePixmapInProject( FALSE ); + } + + if ( checkLayoutFunctions->isChecked() ) + formwindow->hasLayoutFunctions( TRUE ); + else + formwindow->hasLayoutFunctions( FALSE ); + + formwindow->setPixmapLoaderFunction( editPixmapFunction->text() ); + formwindow->setLayoutDefaultSpacing( spinSpacing->value() ); + formwindow->setSpacingFunction( editSpacingFunction->text() ); + formwindow->setLayoutDefaultMargin( spinMargin->value() ); + formwindow->setMarginFunction( editMarginFunction->text() ); + + accept(); +} diff --git a/kdevdesigner/designer/formsettingsimpl.h b/kdevdesigner/designer/formsettingsimpl.h new file mode 100644 index 00000000..3dcb6dd7 --- /dev/null +++ b/kdevdesigner/designer/formsettingsimpl.h @@ -0,0 +1,50 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef FORMSETTINGSIMPL_H +#define FORMSETTINGSIMPL_H + +#include "formsettings.h" + +class FormWindow; + +class FormSettings : public FormSettingsBase +{ + Q_OBJECT + + +public: + FormSettings( TQWidget *parent, FormWindow *fw ); + +protected slots: + void okClicked(); + +private: + FormWindow *formwindow; + +}; + +#endif diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp new file mode 100644 index 00000000..4e5bc09d --- /dev/null +++ b/kdevdesigner/designer/formwindow.cpp @@ -0,0 +1,2773 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "formwindow.h" +#include "defs.h" +#include "mainwindow.h" +#include "widgetfactory.h" +#include "sizehandle.h" +#include "metadatabase.h" +#include "resource.h" +#include "tqlayout.h" +#include "connectiondialog.h" +#include +#include "pixmapchooser.h" +#include "orderindicator.h" +#include "hierarchyview.h" +#include "designerappiface.h" +#include "menubareditor.h" +#define NO_STATIC_COLORS +#include "globaldefs.h" + +#include + +#include +#include +#include "kdevdesigner_part.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// FormWindow should be able to work to some limited degree +// (existance, loading) without a MainWindow. Functions which require +// a MainWindow in theory should never be called if no MainWindow +// exists. These macros are used to let us know if that happens anyway +// and to ensure that we don't crash +#define CHECK_MAINWINDOW Q_ASSERT( mainWindow() ); if ( !mainWindow() ) return +#define CHECK_MAINWINDOW_VALUE( v ) Q_ASSERT( mainWindow() ); if ( !mainWindow() ) return v + +static void setCursorToAll( const TQCursor &c, TQWidget *start ) +{ + start->setCursor( c ); + TQObjectList l = start->childrenListObject(); + if ( !l.isEmpty() ) { + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && !::tqqt_cast(o) ) + setCursorToAll( c, ( (TQWidget*)o ) ); + } + } +} + +static void restoreCursors( TQWidget *start, FormWindow *fw ) +{ + if ( fw->widgets()->find( start ) ) + start->setCursor( MetaDataBase::cursor( start ) ); + else + start->setCursor( TQt::ArrowCursor ); + TQObjectList l = start->childrenListObject(); + if ( !l.isEmpty() ) { + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && !::tqqt_cast(o) ) + restoreCursors( ( (TQWidget*)o ), fw ); + } + } +} + +#if defined(TQ_WS_WIN32) // #### needed for the workaround for repaint problem on windows +#include +static void flickerfree_update( TQWidget *w ) +{ + InvalidateRect( w->winId(), 0, FALSE ); +} +#endif + +/*! + \class FormWindow formwindow.h + \brief Editor window for a form + + The FormWindow is the widget which is used as editor for forms. It + handles inserting, deleting, moving, resizing, etc. of widgets. + + Normally multiple formwindows are used at the same time in the + Designer. So each formwindow has its own undo/redo buffer, etc. + + Also the formwindow has some signals to inform e.g. about selection + changes which is interesting for the PropertyEditor. + + For handling the events of the child widgets (moving, etc.) the + handleMousePress(), etc. functions are called from the application + event filter which is implemented in MainWindow::eventFilter(). +*/ + +FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name ) + : TQWidget( parent, name, WDestructiveClose ), mainwindow( mw ), + commands( 100 ), pixInline( TRUE ), pixProject( FALSE ) +{ + ff = f; + init(); + initSlots(); +} + +FormWindow::FormWindow( FormFile *f, TQWidget *parent, const char *name ) + : TQWidget( parent, name, WDestructiveClose ), mainwindow( 0 ), + commands( 100 ), pixInline( TRUE ) +{ + ff = f; + init(); +} + +void FormWindow::init() +{ + setWFlags(getWFlags() & TQt::WStyle_Maximize); + + fake = qstrcmp( name(), "qt_fakewindow" ) == 0; + MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + ff->setFormWindow( this ); + iface = 0; + proj = 0; + propertyWidget = 0; + toolFixed = FALSE; + checkedSelectionsForMove = FALSE; + mContainer = 0; + startWidget = endWidget = 0; + currTool = POINTER_TOOL; + unclippedPainter = 0; + widgetPressed = FALSE; + drawRubber = FALSE; + setFocusPolicy( TQ_ClickFocus ); + sizePreviewLabel = 0; + checkSelectionsTimer = new TQTimer( this, "checkSelectionsTimer" ); + connect( checkSelectionsTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( invalidCheckedSelections() ) ); + updatePropertiesTimer = new TQTimer( this ); + connect( updatePropertiesTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( updatePropertiesTimerDone() ) ); + showPropertiesTimer = new TQTimer( this ); + //!!!! + connect( showPropertiesTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( showPropertiesTimerDone() ) ); + selectionChangedTimer = new TQTimer( this ); + connect( selectionChangedTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( selectionChangedTimerDone() ) ); + windowsRepaintWorkaroundTimer = new TQTimer( this ); + connect( windowsRepaintWorkaroundTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( windowsRepaintWorkaroundTimerTimeout() ) ); + insertParent = 0; + connect( &commands, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), + this, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) ); + propShowBlocked = FALSE; + + setIcon( SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) ); + + connect( &commands, TQT_SIGNAL( modificationChanged( bool ) ), + this, TQT_SLOT( modificationChanged( bool ) ) ); + buffer = 0; + + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this ); + setMainContainer( w ); + propertyWidget = TQT_TQOBJECT(w); + targetContainer = 0; + hadOwnPalette = FALSE; + + defSpacing = BOXLAYOUT_DEFAULT_SPACING; + defMargin = BOXLAYOUT_DEFAULT_MARGIN; + hasLayoutFunc = FALSE; +} + +void FormWindow::setMainWindow( MainWindow *w ) +{ + mainwindow = w; + MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + initSlots(); +} + +void FormWindow::initSlots() +{ + if ( isFake() ) + return; + Q_ASSERT( project() || MainWindow::self ); + if ( !project() && !MainWindow::self ) + return; + Project *p = project() ? project() : MainWindow::self->currProject(); + if ( p && p->isCpp() ) { + TQString code = formFile()->code(); + if ( code.isEmpty() ) + formFile()->setCode( formFile()->codeComment() ); + } +} + +FormWindow::~FormWindow() +{ + if ( MainWindow::self && MainWindow::self->objectHierarchy()->formWindow() == this ) + MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 ); + + MetaDataBase::clear( TQT_TQOBJECT(this) ); + if ( ff ) + ff->setFormWindow( 0 ); + delete iface; +} + +void FormWindow::closeEvent( TQCloseEvent *e ) +{ + TQGuardedPtr that = this; + if ( ff->closeEvent() && ( !that || ( mainwindow && mainwindow->unregisterClient( this ) ) ) ) + e->accept(); + else + e->ignore(); +} + +void FormWindow::paintGrid( TQWidget *w, TQPaintEvent *e ) +{ + if ( !mainWindow() || !mainWindow()->showGrid() ) + return; + TQPixmap grid; + TQString grid_name; + grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y()); + if( !TQPixmapCache::find( grid_name, grid ) ) { + grid = TQPixmap( 350 + ( 350 % mainWindow()->grid().x() ), 350 + ( 350 % mainWindow()->grid().y() ) ); + grid.fill( colorGroup().color( TQColorGroup::Foreground ) ); + TQBitmap mask( grid.width(), grid.height() ); + mask.fill( color0 ); + TQPainter p( &mask ); + p.setPen( color1 ); + for ( int y = 0; y < grid.width(); y += mainWindow()->grid().y()) { + for ( int x = 0; x < grid.height(); x += mainWindow()->grid().x() ) { + p.drawPoint( x, y ); + } + } + grid.setMask( mask ); + TQPixmapCache::insert( grid_name, grid ); + } + TQPainter p( w ); + p.setClipRegion( e->rect() ); + p.drawTiledPixmap( TQRect( 0, 0, width(), height() ), grid ); +} + +/*! For operations like drawing a rubber band or drawing the rect + when inserting a new widget, a unclipped painter (which draws also + on child widgets) is needed. This method does all the initialization. +*/ + +void FormWindow::beginUnclippedPainter( bool doNot ) +{ + endUnclippedPainter(); + bool unclipped = testWFlags( WPaintUnclipped ); + setWFlags( WPaintUnclipped ); + unclippedPainter = new TQPainter; + unclippedPainter->begin( this ); + if ( !unclipped ) + clearWFlags( WPaintUnclipped ); + if ( doNot ) { + unclippedPainter->setPen( TQPen( color0, 2 ) ); + unclippedPainter->setRasterOp( NotROP ); + } +} + +/*! + Gets rid of an open unclipped painter. + + \sa beginUnclippedPainter() +*/ + +void FormWindow::endUnclippedPainter() +{ + if ( unclippedPainter ) + unclippedPainter->end(); + delete unclippedPainter; + unclippedPainter = 0; +} + +TQPoint FormWindow::gridPoint( const TQPoint &p ) +{ + return TQPoint( ( p.x() / grid().x() ) * grid().x(), + ( p.y() / grid().y() ) * grid().y() ); +} + +void FormWindow::drawSizePreview( const TQPoint &pos, const TQString& text ) +{ + unclippedPainter->save(); + unclippedPainter->setPen( TQPen( colorGroup().foreground(), 1 )); + unclippedPainter->setRasterOp( CopyROP ); + if ( !sizePreviewPixmap.isNull() ) + unclippedPainter->drawPixmap( sizePreviewPos, sizePreviewPixmap ); + if ( text.isNull() ) { + sizePreviewPixmap = TQPixmap(); // set null again + unclippedPainter->restore(); + return; + } + TQRect r = fontMetrics().boundingRect( 0, 0, 0, 0, AlignCenter, text ); + r = TQRect( pos + TQPoint( 10, 10 ), r.size() + TQSize( 5, 5 ) ); + + checkPreviewGeometry( r ); + + sizePreviewPos = r.topLeft(); + sizePreviewPixmap = TQPixmap::grabWindow( winId(), r.x(), r.y(), r.width(), r.height() ); + unclippedPainter->setBrush( TQColor( 255, 255, 128 ) ); + unclippedPainter->drawRect( r ); + unclippedPainter->drawText( r, AlignCenter, text ); + unclippedPainter->restore(); +} + +void FormWindow::insertWidget() +{ + CHECK_MAINWINDOW; + if ( !insertParent ) + return; + + if ( currTool == POINTER_TOOL ) + return; + + bool useSizeHint = !oldRectValid || ( currRect.width() < 2 && currRect.height() < 2 ); + Qt::Orientation orient =Qt::Horizontal; + TQString n = WidgetDatabase::className( currTool ); + if ( useSizeHint && ( n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING ) ) { + TQPopupMenu m( mainWindow() ); + m.insertItem( i18n( "&Horizontal" ) ); + int ver = m.insertItem( i18n( "&Vertical" ) ); + int r = m.exec( TQCursor::pos() ); + if ( r == ver ) + orient =Qt::Vertical; + } + + + TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, TRUE, &currRect, orient ); + if ( !w ) + return; + + if ( !savePixmapInline() && currTool == WidgetDatabase::idFromClassName( "PixmapLabel" ) ) { // ### what to do for pixmaps in project + TQPixmap pix; + // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that + pix.convertFromImage( SmallIcon( "designer_image.png" , KDevDesignerPartFactory::instance()).convertToImage() ); + ( (TQLabel*)w )->setPixmap( pix ); + } + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); + if ( WidgetDatabase::isCustomWidget( id ) ) { + TQWhatsThis::add( w, i18n("A %1 (custom widget) " + "

Click Edit Custom Widgets... in the Tools|Custom " + "menu to add and change custom widgets. You can add " + "properties as well as signals and slots to integrate custom widgets into " + "TQt Designer, and provide a pixmap which will be used to represent " + "the widget on the form.

") + .arg(WidgetDatabase::toolTip( id )) ); + TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) ); + } else { + TQString tt = WidgetDatabase::toolTip( id ); + TQString wt = WidgetDatabase::whatsThis( id ); + if ( !wt.isEmpty() && !tt.isEmpty() ) + TQWhatsThis::add( w, TQString("A %1

%2

").arg( tt ).arg( wt ) ); + } + + TQString s = w->name(); + unify( TQT_TQOBJECT(w), s, TRUE ); + w->setName( s ); + insertWidget( w ); + TQRect r( currRect ); + if ( !oldRectValid || + ( currRect.width() < 2 && currRect.height() < 2 ) ) + r = TQRect( rectAnchor, TQSize( 0, 0 ) ); + + TQPoint p = r.topLeft(); + p = mapToGlobal( p ); + p = insertParent->mapFromGlobal( p ); + r = TQRect( p, r.size() ); + + if ( useSizeHint ) { + if ( n == "Spacer" ) { + if ( orient ==Qt::Vertical ) { + r.setWidth( 20 ); + r.setHeight( 40 ); + } else { + r.setWidth( 40 ); + r.setHeight( 20 ); + } + } else { + r.setWidth( w->sizeHint().width() ); + r.setHeight( w->sizeHint().height() ); + } + } + + if ( r.width() < 2 * grid().x() ) + r.setWidth( 2 * grid().x() ); + if ( r.height() < 2 * grid().y() ) + r.setHeight( 2 * grid().y() ); + + const TQObjectList l = insertParent->childrenListObject(); + TQObjectListIt it( l ); + TQWidgetList lst; + if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + for ( ; it.current(); ) { + TQObject *o = it.current(); + ++it; + if ( o->isWidgetType() && + ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets.find( TQT_TQWIDGET(o) ) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w) ) { + TQRect r2( ( (TQWidget*)o )->pos(), + ( (TQWidget*)o )->size() ); + if ( r.contains( r2 ) ) + lst.append( (TQWidget*)o ); + } + } + } + + if ( !lst.isEmpty() ) { + TQWidget *pw = WidgetFactory::containerOfWidget( w ); + if (pw) { + TQValueList op, np; + for ( TQWidget *i = lst.first(); i; i = lst.next() ) { + op.append( i->pos() ); + TQPoint pos = pw->mapFromGlobal( i->mapToGlobal( TQPoint( 0, 0 ) ) ); + pos -= r.topLeft(); + np.append( pos ); + } + + MoveCommand *mv = new MoveCommand( i18n( "Reparent Widgets" ), this, + lst, op, np, insertParent, pw ); + + if ( !toolFixed ) + mainwindow->resetTool(); + else + setCursorToAll( CrossCursor, w ); + + InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).arg( w->name() ), this, w, r ); + + TQPtrList commands; + commands.append( mv ); + commands.append( cmd ); + + MacroCommand *mc = new MacroCommand( i18n( "Insert %1" ).arg( w->name() ), this, commands ); + commandHistory()->addCommand( mc ); + mc->execute(); + } + } else { + if ( !toolFixed ) + mainwindow->resetTool(); + else + setCursorToAll( CrossCursor, w ); + + InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).arg( w->name() ), this, w, r ); + commandHistory()->addCommand( cmd ); + cmd->execute(); + } + + TemplateWizardInterface *iface = mainWindow()->templateWizardInterface( w->className() ); + if ( iface ) { + iface->setup( w->className(), w, iFace(), mainWindow()->designerInterface() ); + iface->release(); + } +} + +void FormWindow::insertWidget( TQWidget *w, bool checkName ) +{ + if ( !w ) + return; + if ( checkName ) { + TQString s = w->name(); + unify( TQT_TQOBJECT(w), s, TRUE ); + w->setName( s ); + } + + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); + if ( WidgetDatabase::isCustomWidget( id ) ) { + TQWhatsThis::add( w, i18n("A %1 (custom widget) " + "

Click Edit Custom Widgets... in the Tools|Custom " + "menu to add and change custom widgets. You can add " + "properties as well as signals and slots to integrate custom widgets into " + "TQt Designer, and provide a pixmap which will be used to represent " + "the widget on the form.

") + .arg(WidgetDatabase::toolTip( id )) ); + TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) ); + } else { + TQString tt = WidgetDatabase::toolTip( id ); + TQString wt = WidgetDatabase::whatsThis( id ); + if ( !wt.isEmpty() && !tt.isEmpty() ) + TQWhatsThis::add( w, TQString("A %1

%2

").arg( tt ).arg( wt ) ); + } + + restoreCursors( w, this ); + widgets()->insert( w, w ); + w->show(); +} + +void FormWindow::removeWidget( TQWidget *w ) +{ + MetaDataBase::removeEntry( TQT_TQOBJECT(w) ); + widgets()->take( w ); +} + +void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w ) +{ + CHECK_MAINWINDOW; + switch ( currTool ) { + case POINTER_TOOL: { + if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget + raiseChildSelections( w ); // raise selections and select widget + selectWidget( TQT_TQOBJECT(w) ); + // if widget is laid out, find the first non-laid out super-widget + TQWidget *realWidget = w; // but store the original one + while ( w->parentWidget() && + ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || + !insertedWidgets.find(w) ) ) + w = w->parentWidget(); + if ( ::tqqt_cast(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { + e->accept(); + mainwindow->popupFormWindowMenu( e->globalPos(), this ); + } else { + e->accept(); + mainwindow->popupWidgetMenu( e->globalPos(), this, realWidget); + } + } else { + e->accept(); + clearSelection(); + mainwindow->popupFormWindowMenu( e->globalPos(), this ); + } + break; } + default: + break; + } +} + +void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) +{ + CHECK_MAINWINDOW; + checkedSelectionsForMove = FALSE; + checkSelectionsTimer->stop(); + if ( !sizePreviewLabel ) { + sizePreviewLabel = new TQLabel( this ); + sizePreviewLabel->hide(); + sizePreviewLabel->setBackgroundColor( TQColor( 255, 255, 128 ) ); + sizePreviewLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box ); + } + + switch ( currTool ) { + case POINTER_TOOL: + if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget + // if the clicked widget is not in a layout, raise it + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) + w->raise(); + if ( ( e->state() & ControlButton ) ) { // with control pressed, always start rubber band selection + drawRubber = TRUE; + currRect = TQRect( 0, 0, -1, -1 ); + startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); + break; + } + + bool sel = isWidgetSelected( TQT_TQOBJECT(w) ); + if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed... + if ( !sel ) { // ...and widget no selectted: unselect all + clearSelection( FALSE ); + } else { // ...widget selected + // only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) { + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + setPropertyShowingBlocked( TRUE ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( !o->isWidgetType() ) + continue; + if ( insertedWidgets.find( (TQWidget*)o ) ) + selectWidget( TQT_TQOBJECT(o), FALSE ); + } + setPropertyShowingBlocked( FALSE ); + delete l; + } + } + tqApp->processEvents(); + } + if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) && + sel && e->button() == Qt::LeftButton ) { // control pressed and selected, unselect widget + selectWidget( TQT_TQOBJECT(w), FALSE ); + break; + } + + raiseChildSelections( w ); // raise selections and select widget + selectWidget( TQT_TQOBJECT(w) ); + + // if widget is laid out, find the first non-laid out super-widget + while ( w->parentWidget() && + ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.find(w) ) ) + w = w->parentWidget(); + + if ( e->button() == Qt::LeftButton ) { // left button: store original geometry and more as the widget might start moving + widgetPressed = TRUE; + widgetGeom = TQRect( w->pos(), w->size() ); + oldPressPos = w->mapFromGlobal( e->globalPos() ); + origPressPos = oldPressPos; + checkedSelectionsForMove = FALSE; + moving.clear(); + if ( w->parentWidget() && !isMainContainer( TQT_TQOBJECT(w->parentWidget()) ) && !isCentralWidget( TQT_TQOBJECT(w->parentWidget()) ) ) { + targetContainer = w->parentWidget(); + hadOwnPalette = w->parentWidget()->ownPalette(); + restorePalette = w->parentWidget()->palette(); + } + } + } else { // press was on the formwindow + if ( e->button() == Qt::LeftButton ) { // left button: start rubber selection and show formwindow properties + drawRubber = TRUE; + if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { + clearSelection( FALSE ); + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + } + currRect = TQRect( 0, 0, -1, -1 ); + startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); + } + } + break; + case CONNECT_TOOL: + case BUDDY_TOOL: + if ( e->button() != Qt::LeftButton ) + break; + validForBuddy = FALSE; + if ( currTool == BUDDY_TOOL ) { + if ( !::tqqt_cast(w) ) + break; + clearSelection( FALSE ); + validForBuddy = TRUE; + mainWindow()->statusMessage( i18n( "Set buddy for '%1' to..." ).arg( w->name() ) ); + } else { + mainWindow()->statusMessage( i18n( "Connect '%1' with..." ).arg( w->name() ) ); + } + saveBackground(); + startPos = mapFromGlobal( e->globalPos() ); + currentPos = startPos; + startWidget = designerWidget( TQT_TQOBJECT(w) ); + endWidget = startWidget; + beginUnclippedPainter( FALSE ); + drawConnectionLine(); + break; + case ORDER_TOOL: + if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget + orderedWidgets.removeRef( w ); + orderedWidgets.append( w ); + for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { + int i = stackedWidgets.findRef( wid ); + if ( i != -1 ) { + stackedWidgets.removeRef( wid ); + stackedWidgets.insert( 0, wid ); + } + } + TQWidgetList oldl = MetaDataBase::tabOrder( this ); + TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets ); + cmd->execute(); + commandHistory()->addCommand( cmd, TRUE ); + updateOrderIndicators(); + } + break; + default: // any insert widget tool + if ( e->button() == Qt::LeftButton ) { + insertParent = WidgetFactory::containerOfWidget( mainContainer() ); // default parent for new widget is the formwindow + if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press was not on formwindow, check if we can find another parent + TQWidget *wid = w; + for (;;) { + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(wid) ) ); + if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) && + !::tqqt_cast(wid) && !::tqqt_cast(wid) ) { + insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it + break; + } else { + wid = wid->parentWidget(); + if ( !wid ) + break; + } + } + } + startRectDraw( w->mapFromGlobal( e->globalPos() ), e->globalPos(), w, Insert ); + } + break; + } +} + +void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) +{ + CHECK_MAINWINDOW; + switch ( currTool ) { + case ORDER_TOOL: + if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget + orderedWidgets.clear(); + orderedWidgets.append( w ); + for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { + int i = stackedWidgets.findRef( wid ); + if ( i != -1 ) { + stackedWidgets.removeRef( wid ); + stackedWidgets.insert( 0, wid ); + } + } + TQWidgetList oldl = MetaDataBase::tabOrder( this ); + TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets ); + cmd->execute(); + commandHistory()->addCommand( cmd, TRUE ); + updateOrderIndicators(); + } + default: + if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) && + ( isMainContainer( TQT_TQOBJECT(w) ) || TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(this) ) ) + mainWindow()->editSource(); + break; + } +} + +void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) +{ + CHECK_MAINWINDOW; + if ( ( e->state() & Qt::LeftButton ) != Qt::LeftButton ) + return; + + TQWidget *newendWidget = endWidget, *oldendWidget = endWidget, *wid; + bool drawRecRect; + switch ( currTool ) { + case POINTER_TOOL: + if ( widgetPressed && allowMove( w ) ) { // we are prepated for a move + + // if widget is laid out, find the first non-laid out super-widget + while ( w->parentWidget() && + ( WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout || !insertedWidgets.find(w ) ) ) + w = w->parentWidget(); + + // calc correct position + TQPoint pos = w->mapFromGlobal( e->globalPos() ); + +#if 0 + TQPoint mpos = w->mapToParent( pos ); + // check if we are not outside the visible area, else correct coords + if ( mpos.x() < 0 ) + pos.setX( w->mapFromParent( TQPoint( 0, mpos.y() ) ).x() ); + if ( mpos.y() < 0 ) + pos.setY( w->mapFromParent( TQPoint( mpos.x(), 0 ) ).y() ); + if ( mpos.x() > w->parentWidget()->width() ) + pos.setX( w->mapFromParent( TQPoint( w->parentWidget()->width(), mpos.y() ) ).x() ); + if ( mpos.y() > w->parentWidget()->height() ) + pos.setY( w->mapFromParent( TQPoint( mpos.x(), w->parentWidget()->height() ) ).y() ); +#endif + + // calc move distance and store it + TQPoint d = oldPressPos - pos; + if ( TQABS( d.x() ) < grid().x() ) + d.setX( 0 ); + if ( TQABS( d.y() ) < grid().y() ) + d.setY( 0 ); + if ( d.x() == 0 ) + pos.setX( oldPressPos.x() ); + if ( d.y() == 0 ) + pos.setY( oldPressPos.y() ); + oldPressPos = pos; + + // snap to grid + int x = widgetGeom.x() - d.x(); + widgetGeom.setX( x ); + x = ( x / grid().x() ) * grid().x(); + int y = widgetGeom.y() - d.y(); + widgetGeom.setY( y ); + y = ( y / grid().y() ) * grid().y(); + TQPoint p = w->pos(); + + if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move + if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected... + if ( !isWidgetSelected( TQT_TQOBJECT(w) ) ) { // and unselect others. Only siblings can be moved at the same time + setPropertyShowingBlocked( TRUE ); + selectWidget( TQT_TQOBJECT(w) ); + setPropertyShowingBlocked( FALSE ); + } + checkSelectionsForMove( w ); + } + + // check whether we would have to reparent the selection and highlight the possible new parent container + TQMapConstIterator it = moving.begin(); + TQWidget* wa = containerAt( e->globalPos(), it.key() ); + if ( wa && !isMainContainer( TQT_TQOBJECT(wa) ) && !isCentralWidget( TQT_TQOBJECT(wa) ) ) { + wa = WidgetFactory::containerOfWidget( wa ); + // ok, looks like we moved onto a container + + if ( wa != targetContainer ) { + if ( targetContainer ) { + if ( hadOwnPalette ) + targetContainer->setPalette( restorePalette ); + else + targetContainer->unsetPalette(); + } + targetContainer = wa; + hadOwnPalette = wa->ownPalette(); + restorePalette = wa->palette(); + wa->setPaletteBackgroundColor( wa->colorGroup().midlight() ); + } + } + else if ( targetContainer ) { + if( hadOwnPalette ) + targetContainer->setPalette( restorePalette ); + else + targetContainer->unsetPalette(); + targetContainer = 0; + } + + // finally move the selected widgets and show/update preview label + moveSelectedWidgets( x - p.x(), y - p.y() ); + sizePreviewLabel->setText( i18n( "%1/%2" ).arg( w->pos().x() ).arg( w->pos().y() ) ); + sizePreviewLabel->adjustSize(); + TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() ); + checkPreviewGeometry( lg ); + sizePreviewLabel->setGeometry( lg ); + sizePreviewLabel->raise(); + sizePreviewLabel->show(); +#if defined(TQ_WS_WIN32) + windowsRepaintWorkaroundTimer->start( 100, TRUE ); +#endif + } else { // if we don't need to move, do some indication + TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() ); + checkPreviewGeometry( lg ); + sizePreviewLabel->move( lg.x(), lg.y() ); + } + + oldPressPos += ( p - w->pos() ); + } else if ( drawRubber ) { // draw rubber if we are in rubber-selection mode + continueRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); + } + break; + case CONNECT_TOOL: + restoreConnectionLine(); + wid = tqApp->widgetAt( e->globalPos(), TRUE ); + if ( wid ) + wid = designerWidget( TQT_TQOBJECT(wid) ); + if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) + newendWidget = wid; + if ( ::tqqt_cast(newendWidget) || ::tqqt_cast(newendWidget) ) + newendWidget = (TQWidget*)endWidget; + drawRecRect = newendWidget != endWidget; + if ( newendWidget && + ( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) + endWidget = newendWidget; + mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).arg( startWidget->name() ). + arg( endWidget->name() ) ); + currentPos = mapFromGlobal( e->globalPos() ); + tqApp->processEvents(); + if ( drawRecRect ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), + ( (TQWidget*)oldendWidget )->size() ) ); + drawConnectionLine(); + break; + case BUDDY_TOOL: + if ( !validForBuddy ) + break; + restoreConnectionLine(); + wid = tqApp->widgetAt( e->globalPos(), TRUE ); + if ( wid ) + wid = designerWidget( TQT_TQOBJECT(wid) ); + if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) ) + newendWidget = wid; + else + newendWidget = 0; + if ( ::tqqt_cast(newendWidget) || ::tqqt_cast(newendWidget) ) + newendWidget = (TQWidget*)endWidget; + drawRecRect = newendWidget != endWidget; + if ( !newendWidget ) + endWidget = newendWidget; + else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) + endWidget = newendWidget; + if ( endWidget ) + mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).arg( startWidget->name() ). + arg( endWidget->name() ) ); + else + mainWindow()->statusMessage( i18n( "Set buddy '%1' to ..." ).arg( startWidget->name() ) ); + currentPos = mapFromGlobal( e->globalPos() ); + tqApp->processEvents(); + if ( drawRecRect && oldendWidget ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), + ( (TQWidget*)oldendWidget )->size() ) ); + drawConnectionLine(); + break; + case ORDER_TOOL: + break; + default: // we are in an insert-widget tool + if ( insertParent ) // draw insert rect + continueRectDraw( w->mapFromGlobal( e->globalPos() ), e->globalPos(), w, Insert ); + break; + } +} + +void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) +{ + CHECK_MAINWINDOW; + if ( e->button() != Qt::LeftButton ) + return; + + switch ( currTool ) { + case POINTER_TOOL: + if ( widgetPressed && allowMove( w ) ) { // we moved the widget + sizePreviewLabel->hide(); + + if ( moving.isEmpty() || w->pos() == *moving.find(w) ) + break; + + // restore targetContainer + if ( targetContainer ) { + if( hadOwnPalette ) + targetContainer->setPalette( restorePalette ); + else + targetContainer->unsetPalette(); + } + + // tell property editor to update + if ( propertyWidget && propertyWidget->isWidgetType() && !isMainContainer( propertyWidget ) ) + emitUpdateProperties( propertyWidget ); + + TQMapConstIterator it = moving.begin(); + TQWidget *oldParent = it.key()->parentWidget(); + TQWidget *newParent = oldParent; + // check whether we have to reparent the selection + TQWidget* wa = containerAt( e->globalPos(), it.key() ); + if ( wa ) { + wa = WidgetFactory::containerOfWidget( wa ); + // ok, looks like we moved onto a container + + // check whether we really have different parents. + if ( wa == it.key()->parentWidget() ) + goto make_move_command; + + // break layout if necessary + if ( WidgetFactory::layoutType( wa ) != WidgetFactory::NoLayout ) { + if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ), + i18n( "You tried to insert a widget into the " + "layout Container Widget '%1'.\n" + "This is not possible. " + "In order to insert the widget, the layout of '%1'\n" + "must first be broken.\n" + "Break the layout or cancel the operation?" ). + arg( wa->name() ). + arg( wa->name() ), i18n( "&Break Layout" ), i18n( "&Cancel" ) ) ) + goto make_move_command; // cancel + breakLayout( wa ); + } + + // doesn't need to be a command, the MoveCommand does reparenting too + bool emitSelChanged = FALSE; + for ( TQMap::Iterator it = moving.begin(); it != moving.end(); ++it ) { + TQWidget *i = it.key(); + if ( !emitSelChanged && ::tqqt_cast(i) ) { + if ( ::tqqt_cast(i->parentWidget()) || ::tqqt_cast(wa) ) + emitSelChanged = TRUE; + if ( !::tqqt_cast(wa) ) { + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(i), "buttonGroupId", FALSE ); + if ( ::tqqt_cast(i->parentWidget()) ) + ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); + } + } + TQPoint pos = wa->mapFromGlobal( i->mapToGlobal( TQPoint(0,0) ) ); + i->reparent( wa, pos, TRUE ); + raiseSelection( i ); + raiseChildSelections( i ); + widgetChanged( TQT_TQOBJECT(i) ); + mainWindow()->objectHierarchy()->widgetRemoved( i ); + mainWindow()->objectHierarchy()->widgetInserted( i ); + } + if ( emitSelChanged ) { + emit showProperties( TQT_TQOBJECT(wa) ); + emit showProperties( propertyWidget ); + } + newParent = wa; + } + + make_move_command: + TQWidgetList widgets; // collect the widgets and its old and new positions which have been moved + TQValueList oldPos, newPos; + for ( it = moving.begin(); it != moving.end(); ++it ) { + widgets.append( it.key() ); + oldPos.append( *it ); + newPos.append( it.key()->pos() ); + } + // add move command, don't execute it, this is just a summary of the operations we did during the move-event handling + commandHistory()->addCommand( new MoveCommand( i18n( "Move" ), + this, widgets, + oldPos, newPos, oldParent, newParent ) ); + } else if ( drawRubber ) { // we were drawing a rubber selection + endRectDraw(); // get rid of the rectangle + blockSignals( TRUE ); + selectWidgets(); // select widgets which intersect the rect + blockSignals( FALSE ); + emitSelectionChanged(); // inform about selection changes + if ( propertyWidget ) + emitShowProperties( propertyWidget ); + } + break; + case CONNECT_TOOL: + case BUDDY_TOOL: + restoreConnectionLine(); + if ( startWidget ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(), + ( (TQWidget*)startWidget )->pos() ), + ((TQWidget*)startWidget )->size() ) ); + if ( endWidget ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(), + ( (TQWidget*)endWidget )->pos() ), + ( (TQWidget*)endWidget )->size() ) ); + endUnclippedPainter(); + tqApp->processEvents(); + + if ( startWidget && endWidget ) { + if ( currTool == CONNECT_TOOL ) + editConnections(); + else if ( currTool == BUDDY_TOOL && validForBuddy && startWidget != endWidget ) { + TQString oldBuddy = startWidget->property( "buddy" ).toString(); + if ( oldBuddy.isNull() ) + oldBuddy = ""; + SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ), + this, TQT_TQOBJECT(startWidget), mainWindow()->propertyeditor(), + "buddy", startWidget->property( "buddy" ), + endWidget->name(), endWidget->name(), + oldBuddy ); + commandHistory()->addCommand( cmd, TRUE ); + cmd->execute(); + emitUpdateProperties( TQT_TQOBJECT(startWidget) ); + } + } + if ( !toolFixed ) + mainwindow->resetTool(); + startWidget = endWidget = 0; + mainWindow()->statusBar()->clear(); + break; + case ORDER_TOOL: + break; + default: // any insert widget tool is active + if ( insertParent ) { // we should insert the new widget now + endRectDraw(); + if ( WidgetFactory::layoutType( insertParent ) != WidgetFactory::NoLayout ) { + if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ), + i18n( "You tried to insert a widget into the " + "layout Container Widget '%1'.\n" + "This is not possible. " + "In order to insert the widget, the layout of '%1'\n" + "must first be broken.\n" + "Break the layout or cancel the operation?" ). + arg( insertParent->name() ). + arg( insertParent->name() ), i18n( "&Break Layout" ), i18n( "&Cancel" ) ) == 0 ) { + breakLayout( insertParent ); + } else { + if ( !toolFixed ) + mainWindow()->resetTool(); + break; + } + } + insertWidget(); // so do it + } + break; + } + widgetPressed = FALSE; + drawRubber = FALSE; + insertParent = 0; + delete buffer; + buffer = 0; +} + +void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w ) +{ + CHECK_MAINWINDOW; + e->ignore(); + checkSelectionsTimer->stop(); + if ( !checkedSelectionsForMove && + ( e->key() == Key_Left || + e->key() == Key_Right || + e->key() == Key_Up || + e->key() == Key_Down ) && + propertyWidget->isWidgetType() ) + checkSelectionsForMove( (TQWidget*)propertyWidget ); + checkSelectionsTimer->start( 1000, TRUE ); + if ( e->key() == Key_Left || e->key() == Key_Right || + e->key() == Key_Up || e->key() == Key_Down ) { + TQWidgetList widgets; + TQValueList oldPos, newPos; + for ( WidgetSelection *s = selections.first(); s; s = selections.next() ) { + if ( s->isUsed() ) { + int dx = 0, dy = 0; + bool control = e->state() & ControlButton; + + switch ( e->key() ) { + case Key_Left: { + e->accept(); + if ( control ) + dx = -1; + else + dx = -grid().x(); + } break; + case Key_Right: { + e->accept(); + if ( control ) + dx = 1; + else + dx = grid().x(); + } break; + case Key_Up: { + e->accept(); + if ( control ) + dy = -1; + else + dy = -grid().y(); + } break; + case Key_Down: { + e->accept(); + if ( control ) + dy = 1; + else + dy = grid().y(); + } break; + default: + break; + } + + widgets.append( s->widget() ); + oldPos.append( s->widget()->pos() ); + newPos.append( s->widget()->pos() + TQPoint( dx, dy ) ); + } + } + if ( !widgets.isEmpty() ) { + MoveCommand *cmd = new MoveCommand( i18n( "Move" ), this, + widgets, oldPos, newPos, 0, 0 ); + commandHistory()->addCommand( cmd, TRUE ); + cmd->execute(); + } + } + if ( !e->isAccepted() ) { + TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( !l ) + return; + if ( l->find( TQT_TQOBJECT(w) ) != -1 ) + e->accept(); + delete l; + } + +} + +void FormWindow::handleKeyRelease( TQKeyEvent *e, TQWidget * ) +{ + e->ignore(); +} + +void FormWindow::selectWidget( TQObject *o, bool select ) +{ + CHECK_MAINWINDOW; + if ( !o->isWidgetType() ) { + // ########### do TQObject stuff + return; + } + + TQWidget *w = (TQWidget*)o; + + if ( isMainContainer( TQT_TQOBJECT(w) ) ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + emitShowProperties( propertyWidget ); + return; + } + + if ( ::tqqt_cast(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + emitShowProperties( propertyWidget ); + return; + } + + if ( ::tqqt_cast(o) ) + return; + + if ( select ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(w); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + if ( !isPropertyShowingBlocked() ) + emitShowProperties( propertyWidget ); + WidgetSelection *s = usedSelections.find( w ); + if ( s ) { + s->show(); + return; + } + + for ( WidgetSelection *s2 = selections.first(); s2; s2 = selections.next() ) { + if ( !s2->isUsed() ) { + s = s2; + } + } + + if ( !s ) { + s = new WidgetSelection( this, &usedSelections ); + selections.append( s ); + } + + s->setWidget( w ); + emitSelectionChanged(); + } else { + WidgetSelection *s = usedSelections.find( w ); + if ( s ) + s->setWidget( 0 ); + TQObject *opw = propertyWidget; + if ( !usedSelections.isEmpty() ) + propertyWidget = TQT_TQOBJECT(TQPtrDictIterator( usedSelections ).current()->widget()); + else + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + if ( !isPropertyShowingBlocked() ) + emitShowProperties( propertyWidget ); + emitSelectionChanged(); + } +} + +TQPoint FormWindow::grid() const +{ + if ( !mainWindow() || !mainWindow()->snapGrid() ) + return TQPoint( 1, 1 ); + return mainWindow()->grid(); +} + +void FormWindow::updateSelection( TQWidget *w ) +{ + WidgetSelection *s = usedSelections.find( w ); + if ( !w->isVisibleTo( this ) ) + selectWidget( TQT_TQOBJECT(w), FALSE ); + else if ( s ) + s->updateGeometry(); +} + +void FormWindow::raiseSelection( TQWidget *w ) +{ + WidgetSelection *s = usedSelections.find( w ); + if ( s ) + s->show(); +} + +void FormWindow::repaintSelection( TQWidget *w ) +{ + WidgetSelection *s = usedSelections.find( w ); + if ( s ) + s->update(); +} + +void FormWindow::clearSelection( bool changePropertyDisplay ) +{ + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) + it.current()->setWidget( 0, FALSE ); + + usedSelections.clear(); + if ( changePropertyDisplay ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + emitShowProperties( propertyWidget ); + } + emitSelectionChanged(); +} + +void FormWindow::startRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *, RectType t ) +{ + TQPoint pos( p ); + pos = mapFromGlobal( global ); + oldRectValid = FALSE; + beginUnclippedPainter( TRUE ); + if ( t == Rubber ) + unclippedPainter->setPen( TQPen( color0, 1 ) ); + if ( t == Insert ) + rectAnchor = gridPoint( pos ); + else if ( t == Rubber ) + rectAnchor = pos; + currRect = TQRect( rectAnchor, TQPoint( 0, 0 ) ); + if ( t == Insert ) + drawSizePreview( pos, i18n("Use Size Hint") ); +} + +void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *, RectType t ) +{ + TQPoint pos =p; + pos = mapFromGlobal( global ); + TQPoint p2; + if ( t == Insert ) + p2 = gridPoint( pos ); + else if ( t == Rubber ) + p2 = pos; + TQRect r( rectAnchor, p2 ); + r = r.normalize(); + + if ( currRect == r ) { + TQString t = i18n( "%1/%2" ); + t = t.arg( r.width() - 1 ).arg( r.height() - 1 ); + drawSizePreview( pos, t ); + return; + } + + if ( oldRectValid ) + unclippedPainter->drawRect( currRect ); + if ( r.width() > 1 || r.height() > 1 ) { + oldRectValid = TRUE; + currRect = r; + if ( t == Insert ) { + TQString t = i18n( "%1/%2" ); + t = t.arg( r.width() - 1 ).arg( r.height() - 1 ); + drawSizePreview( pos, t ); + } + unclippedPainter->setClipRegion( TQRegion( rect() ).subtract( TQRect( sizePreviewPos, sizePreviewPixmap.size() ) ) ); + unclippedPainter->drawRect( currRect ); + unclippedPainter->setClipping( FALSE ); + } else { + oldRectValid = FALSE; + if ( t == Insert ) + drawSizePreview( pos, i18n("Use Size Hint") ); + } +} + +void FormWindow::endRectDraw() +{ + if ( !unclippedPainter ) + return; + + if ( oldRectValid ) + unclippedPainter->drawRect( currRect ); + drawSizePreview( TQPoint(-1,-1), TQString() ); + endUnclippedPainter(); +} + +void FormWindow::selectWidgets() +{ + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( l ) { + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets[ (void*)o ] ) { + TQPoint p = ( (TQWidget*)o )->mapToGlobal( TQPoint(0,0) ); + p = mapFromGlobal( p ); + TQRect r( p, ( (TQWidget*)o )->size() ); + if ( r.intersects( currRect ) && !r.contains( currRect ) ) + selectWidget( TQT_TQOBJECT(o) ); + } + } + delete l; + } + emitSelectionChanged(); +} + +bool FormWindow::isWidgetSelected( TQObject *w ) +{ + if ( w->isWidgetType() ) + return usedSelections.find( (TQWidget*)w ) != 0; + return FALSE; // #### do stuff for TQObjects +} + +void FormWindow::moveSelectedWidgets( int dx, int dy ) +{ + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) { + WidgetSelection *s = it.current(); + TQWidget *w = s->widget(); + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) + continue; + w->move( w->x() + dx, w->y() + dy ); + s->updateGeometry(); + updateChildSelections( w ); + } +} + +CommandHistory *FormWindow::commandHistory() +{ + return &commands; +} + +void FormWindow::undo() +{ + commandHistory()->undo(); +} + +void FormWindow::redo() +{ + commandHistory()->redo(); +} + +void FormWindow::raiseChildSelections( TQWidget *w ) +{ + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( !l || !l->first() ) { + delete l; + return; + } + + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) { + if ( l->findRef( TQT_TQOBJECT(it.current()->widget()) ) != -1 ) + it.current()->show(); + } + delete l; +} + +void FormWindow::updateChildSelections( TQWidget *w ) +{ + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( l ) { + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( o->isWidgetType() && + insertedWidgets.find( (TQWidget*)o ) ) + updateSelection( (TQWidget*)o ); + } + delete l; + } +} + +void FormWindow::checkSelectionsForMove( TQWidget *w ) +{ + checkedSelectionsForMove = TRUE; + + TQObjectList *l = w->parentWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, FALSE, FALSE ); + moving.clear(); + if ( l ) { + TQPtrDictIterator it( usedSelections ); + WidgetSelection *sel; + while ( ( sel = it.current() ) != 0 ) { + if ( it.current()->widget() == mainContainer() ) + continue; + ++it; + if ( l->find( TQT_TQOBJECT(sel->widget()) ) == -1 ) { + if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) + sel->setWidget( 0 ); + } else { + if ( WidgetFactory::layoutType( sel->widget()->parentWidget() ) == WidgetFactory::NoLayout ) { + moving.insert( sel->widget(), sel->widget()->pos() ); + sel->widget()->raise(); + raiseChildSelections( sel->widget() ); + raiseSelection( sel->widget() ); + } + } + } + delete l; + } +} + +void FormWindow::deleteWidgets() +{ + CHECK_MAINWINDOW; + TQWidgetList widgets; + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) { + TQWidget *tb = 0; + if ( !( tb = mainWindow()->isAToolBarChild( TQT_TQOBJECT(it.current()->widget()) ) ) ) + widgets.append( it.current()->widget() ); + else + ( (QDesignerToolBar*)tb )->removeWidget( it.current()->widget() ); + } + + if ( widgets.isEmpty() ) + return; + + DeleteCommand *cmd = new DeleteCommand( i18n( "Delete" ), this, widgets ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::editAdjustSize() +{ + TQPtrList commands; + TQWidgetList widgets = selectedWidgets(); + if ( widgets.isEmpty() ) { + TQRect oldr = geometry(); + mainContainer()->adjustSize(); + resize( mainContainer()->size() ); + // check whether our own size constraint hit us + if ( size() != mainContainer()->size() ) + mainContainer()->resize( size() ); + TQRect nr = geometry(); + if ( oldr != nr ) { + ResizeCommand *cmd = new ResizeCommand( i18n( "Adjust Size" ), this, this, oldr, nr ); + commandHistory()->addCommand( cmd ); + } + return; + } + for ( TQWidget* w = widgets.first(); w; w = widgets.next() ) { + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) + continue; + TQRect oldr = w->geometry(); + w->adjustSize(); + TQRect nr = w->geometry(); + if ( oldr != nr ) + commands.append( new ResizeCommand( i18n("Adjust Size"), this, w, oldr, nr ) ); + } + + if ( commands.isEmpty() ) + return; + for ( WidgetSelection *s = selections.first(); s; s = selections.next() ) + s->updateGeometry(); + + MacroCommand *cmd = new MacroCommand( i18n( "Adjust Size" ), this, commands ); + commandHistory()->addCommand( cmd ); +} + + +TQWidgetList FormWindow::selectedWidgets() const +{ + TQWidgetList widgets; + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) + widgets.append( it.current()->widget() ); + return widgets; +} + +void FormWindow::widgetChanged( TQObject *w ) +{ + if ( w->isWidgetType() ) + updateSelection( (TQWidget*)w ); + // ########## do TQObject stuff +} + +TQLabel *FormWindow::sizePreview() const +{ + if ( !sizePreviewLabel ) { + ( (FormWindow*)this )->sizePreviewLabel = new TQLabel( (FormWindow*)this ); + ( (FormWindow*)this )->sizePreviewLabel->hide(); + ( (FormWindow*)this )->sizePreviewLabel->setBackgroundColor( TQColor( 255, 255, 128 ) ); + ( (FormWindow*)this )->sizePreviewLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box ); + } + return sizePreviewLabel; +} + +void FormWindow::invalidCheckedSelections() +{ + checkedSelectionsForMove = FALSE; +} + +void FormWindow::checkPreviewGeometry( TQRect &r ) +{ + if ( !TQT_TQRECT_OBJECT(rect()).contains( r ) ) { + if ( r.left() < rect().left() ) + r.moveTopLeft( TQPoint( 0, r.top() ) ); + if ( r.right() > rect().right() ) + r.moveBottomRight( TQPoint( rect().right(), r.bottom() ) ); + if ( r.top() < rect().top() ) + r.moveTopLeft( TQPoint( r.left(), rect().top() ) ); + if ( r.bottom() > rect().bottom() ) + r.moveBottomRight( TQPoint( r.right(), rect().bottom() ) ); + } +} + +void FormWindow::focusInEvent( TQFocusEvent * ){ + + if (ff) + ff->checkTimeStamp(); +} + +void FormWindow::focusOutEvent( TQFocusEvent * ) +{ + if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + } +} + +void FormWindow::resizeEvent( TQResizeEvent *e ) +{ + TQWidget::resizeEvent( e ); + if ( currTool == ORDER_TOOL ) + repositionOrderIndicators(); + if ( isVisible() ) + formFile()->setModified( TRUE, FormFile::WFormWindow ); + +#if defined(TQ_WS_WIN32) + windowsRepaintWorkaroundTimer->start( 100, TRUE ); +#endif +} + +void FormWindow::windowsRepaintWorkaroundTimerTimeout() +{ +#if defined(TQ_WS_WIN32) + TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + flickerfree_update( (TQWidget*)o ); + } + flickerfree_update( this ); + delete l; +#endif +} + +TQPtrDict *FormWindow::widgets() +{ + return &insertedWidgets; +} + +TQWidget *FormWindow::designerWidget( TQObject *o ) const +{ + if ( !o || !o->isWidgetType() ) + return 0; + TQWidget *w = (TQWidget*)o; + while ( w && !isMainContainer( TQT_TQOBJECT(w) ) && !insertedWidgets[ (void*)w ] || isCentralWidget( TQT_TQOBJECT(w) ) ) + w = (TQWidget*)w->parent(); + return w; +} + +void FormWindow::emitShowProperties( TQObject *w ) +{ + if ( w ) { + TQObject *opw = propertyWidget; + propertyWidget = w; + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + } + showPropertiesTimer->stop(); +// showPropertiesTimer->start( 0, TRUE ); + showPropertiesTimerDone(); +} + +void FormWindow::emitUpdateProperties( TQObject *w ) +{ + if ( w == propertyWidget ) { + updatePropertiesTimer->stop(); + updatePropertiesTimer->start( 0, TRUE ); + } +} + +void FormWindow::emitSelectionChanged() +{ + selectionChangedTimer->stop(); + selectionChangedTimer->start( 0, TRUE ); +} + +void FormWindow::updatePropertiesTimerDone() +{ + CHECK_MAINWINDOW; + if ( propertyWidget && mainWindow()->formWindow() == this ) + emit updateProperties( propertyWidget ); +} + +void FormWindow::showPropertiesTimerDone() +{ + CHECK_MAINWINDOW; + if ( propertyWidget && mainWindow()->formWindow() == this ) + emit showProperties( propertyWidget ); +} + +void FormWindow::selectionChangedTimerDone() +{ + emit selectionChanged(); +} + +void FormWindow::currentToolChanged() +{ + CHECK_MAINWINDOW; + toolFixed = FALSE; + int t = mainwindow->currentTool(); + if ( currTool == t && t != ORDER_TOOL ) + return; + + // tool cleanup + switch ( currTool ) { + case ORDER_TOOL: + hideOrderIndicators(); + break; + case CONNECT_TOOL: + case BUDDY_TOOL: + restoreConnectionLine(); + if ( startWidget ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(), + ( (TQWidget*)startWidget )->pos() ), + ( (TQWidget*)startWidget )->size() ) ); + if ( endWidget ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(), + ( (TQWidget*)endWidget )->pos() ), + ( (TQWidget*)endWidget )->size() ) ); + endUnclippedPainter(); + break; + case POINTER_TOOL: + break; + default: + if ( insertParent ) + endRectDraw(); + break; + } + + startWidget = endWidget = 0; + widgetPressed = FALSE; + drawRubber = FALSE; + insertParent = 0; + delete buffer; + buffer = 0; + + currTool = t; + + if ( hasFocus() ) + clearSelection( FALSE ); + + mainWindow()->statusBar()->clear(); + + // tool setup + switch ( currTool ) { + case POINTER_TOOL: + if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) + emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + restoreCursors( this, this ); + break; + case ORDER_TOOL: + if ( mainWindow()->formWindow() == this ) { + mainWindow()->statusMessage( i18n( "Click widgets to change the tab order...") ); + orderedWidgets.clear(); + showOrderIndicators(); + if ( mainWindow()->formWindow() == this ) + emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + setCursorToAll( ArrowCursor, this ); + } + break; + case CONNECT_TOOL: + case BUDDY_TOOL: + if ( currTool == CONNECT_TOOL ) + mainWindow()->statusMessage( i18n( "Drag a line to create a connection...") ); + else + mainWindow()->statusMessage( i18n( "Drag a line to set a buddy...") ); + setCursorToAll( CrossCursor, this ); + if ( mainWindow()->formWindow() == this ) + emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + break; + default: + mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).arg( WidgetDatabase::toolTip( currTool ).lower() ) ); + setCursorToAll( CrossCursor, this ); + if ( mainWindow()->formWindow() == this ) + emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + break; + } +} + +void FormWindow::showOrderIndicators() +{ + hideOrderIndicators(); + orderIndicators.setAutoDelete( TRUE ); + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + stackedWidgets = MetaDataBase::tabOrder( this ); + if ( l ) { + int order = 1; + for ( TQObject *o = l->first(); o; o = l->next() ) { + TQWidget* w = (TQWidget*) o; + if ( w->isShown() && + insertedWidgets[ (void*)w ] && + w->focusPolicy() != TQ_NoFocus ) { + OrderIndicator* ind = new OrderIndicator( order++, w, this ); + orderIndicators.append( ind ); + if ( stackedWidgets.findRef( w ) == -1 ) + stackedWidgets.append( w ); + } + } + delete l; + } + updateOrderIndicators(); +} + +void FormWindow::hideOrderIndicators() +{ + orderIndicators.clear(); +} + +void FormWindow::updateOrderIndicators() +{ + int order = 1; + for ( TQWidget *w = stackedWidgets.first(); w; w = stackedWidgets.next() ) { + for ( OrderIndicator* i = orderIndicators.first(); i; i = orderIndicators.next() ) + i->setOrder( order, w ); + order++; + } +} + +void FormWindow::repositionOrderIndicators() +{ + for ( OrderIndicator* i = orderIndicators.first(); i; i = orderIndicators.next() ) + i->reposition(); +} + + +void FormWindow::updateUndoInfo() +{ + commandHistory()->emitUndoRedo(); +} + +bool FormWindow::checkCustomWidgets() +{ + TQStringList missingCustomWidgets; + TQPtrDictIterator it( insertedWidgets ); + for ( ; it.current(); ++it ) { + if ( it.current()->isA( "CustomWidget" ) ) { + TQString className = WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ); + if ( !MetaDataBase::hasCustomWidget( className ) ) + missingCustomWidgets << className; + } + } + + if ( !missingCustomWidgets.isEmpty() ) { + TQString txt = i18n( "The following custom widgets are used in '%1',\n" + "but are not known to TQt Designer:\n" ).arg( name() ); + for ( TQStringList::Iterator sit = missingCustomWidgets.begin(); sit != missingCustomWidgets.end(); ++sit ) + txt += " " + *sit + "\n"; + txt += i18n( "If you save this form and generate code for it using uic, \n" + "the generated code will not compile.\n" + "Do you want to save this form now?" ); + if ( TQMessageBox::information( mainWindow(), i18n( "Save Form" ), txt ) == 1 ) + return FALSE; + } + return TRUE; +} + +void FormWindow::setPropertyShowingBlocked( bool b ) +{ + propShowBlocked = b; +} + +bool FormWindow::isPropertyShowingBlocked() const +{ + return propShowBlocked; +} + +int FormWindow::numSelectedWidgets() const +{ + return usedSelections.count(); +} + +TQString FormWindow::copy() +{ + CHECK_MAINWINDOW_VALUE( TQString() ); + Resource resource( mainWindow() ); + resource.setWidget( this ); + return resource.copy(); +} + +void FormWindow::lowerWidgets() +{ + TQWidgetList widgets; + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) + widgets.append( it.current()->widget() ); + + LowerCommand *cmd = new LowerCommand( i18n( "Lower" ), this, widgets ); + cmd->execute(); + commandHistory()->addCommand( cmd ); +} + +void find_accel( const TQString &txt, TQMap &accels, TQWidget *w ) +{ + int i = txt.find( "&" ); + if ( i == -1 ) + return; + TQChar c = txt[ i + 1 ]; + if ( c.isNull() || c == '&' ) + return; + c = c.lower(); + TQMap::Iterator it = accels.find( c ); + if ( it == accels.end() ) { + TQWidgetList wl; + wl.append( w ); + accels.insert( c, wl ); + } else { + TQWidgetList *wl = &*it; + wl->append( w ); + } +} + +void FormWindow::checkAccels() +{ + CHECK_MAINWINDOW; + TQMap accels; + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( l ) { + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets[ (void*)o ] ) { + TQWidget *w = (TQWidget*)o; + const TQMetaProperty* text = + w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); + const TQMetaProperty* title = + w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + const TQMetaProperty* pageTitle = + w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); + if ( text ) + find_accel( w->property( "text" ).toString(), accels, w ); + if ( title ) + find_accel( w->property( "title" ).toString(), accels, w ); + if ( pageTitle ) + find_accel( w->property( "pageTitle" ).toString(), accels, w ); + } else if ( ::tqqt_cast(o) ) { + ((MenuBarEditor *)o)->checkAccels( accels ); + } + } + delete l; + } + + bool ok = TRUE; + TQWidget *wid; + for ( TQMap::Iterator it = accels.begin(); it != accels.end(); ++it ) { + if ( (*it).count() > 1 ) { + ok = FALSE; + switch ( TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ), + i18n( "Accelerator '%1' is used once.", "Accelerator '%1' is used %n times.", (*it).count() + ).arg( it.key().upper() ), + i18n( "&Select" ), + i18n( "&Cancel" ), TQString(), 2 ) ) { + case 0: // select + clearSelection( FALSE ); + for ( wid = (*it).first(); wid; wid = (*it).next() ) + selectWidget( TQT_TQOBJECT(wid), TRUE ); + return; + case 1: // cancel + return; + } + } + } + + if ( ok ) + TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ), + i18n( "No accelerator is used more than once." ) ); +} + +void FormWindow::raiseWidgets() +{ + TQWidgetList widgets; + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) + widgets.append( it.current()->widget() ); + + RaiseCommand *cmd = new RaiseCommand( i18n( "Raise" ), this, widgets ); + cmd->execute(); + commandHistory()->addCommand( cmd ); +} + +void FormWindow::paste( const TQString &cb, TQWidget *parent ) +{ + CHECK_MAINWINDOW; + Resource resource( mainWindow() ); + resource.setWidget( this ); + resource.paste( cb, parent ); +} + +void FormWindow::selectAll() +{ + checkedSelectionsForMove = FALSE; + blockSignals( TRUE ); + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( l ) { + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets[ (void*)o ] ) { + selectWidget( TQT_TQOBJECT(o) ); + } + } + delete l; + } + + blockSignals( FALSE ); + emitSelectionChanged(); + if ( propertyWidget ) + emitShowProperties( propertyWidget ); + emitSelectionChanged(); +} + +void FormWindow::layoutHorizontal() +{ + TQWidgetList widgets( selectedWidgets() ); + LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay OutQt::Horizontally" ), + this, mainContainer(), 0, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutVertical() +{ + TQWidgetList widgets( selectedWidgets() ); + LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay OutQt::Vertically" ), + this, mainContainer(), 0, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutHorizontalSplit() +{ + TQWidgetList widgets( selectedWidgets() ); + LayoutHorizontalSplitCommand *cmd = new LayoutHorizontalSplitCommand( i18n( "Lay OutQt::Horizontally (in splitter)" ), + this, mainContainer(), 0, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutVerticalSplit() +{ + TQWidgetList widgets( selectedWidgets() ); + LayoutVerticalSplitCommand *cmd = new LayoutVerticalSplitCommand( i18n( "Lay OutQt::Vertically (in splitter)" ), + this, mainContainer(), 0, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutGrid() +{ + int xres = grid().x(); + int yres = grid().y(); + + TQWidgetList widgets( selectedWidgets() ); + LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out in a Grid" ), + this, mainContainer(), 0, widgets, xres, yres ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutHorizontalContainer( TQWidget *w ) +{ + if ( w == this ) + w = mainContainer(); + TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); + if ( l.isEmpty() ) + return; + TQWidgetList widgets; + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && + ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets.find( (TQWidget*)o ) ) + widgets.append( (TQWidget*)o ); + } + LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay Out ChildrenQt::Horizontally" ), + this, mainContainer(), w, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutVerticalContainer( TQWidget *w ) +{ + if ( w == this ) + w = mainContainer(); + TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); + if ( l.isEmpty() ) + return; + TQWidgetList widgets; + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && + ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets.find( (TQWidget*)o ) ) + widgets.append( (TQWidget*)o ); + } + LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay Out ChildrenQt::Vertically" ), + this, mainContainer(), w, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutGridContainer( TQWidget *w ) +{ + if ( w == this ) + w = mainContainer(); + int xres = grid().x(); + int yres = grid().y(); + + TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); + if ( l.isEmpty() ) + return; + TQWidgetList widgets; + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && + ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets.find( (TQWidget*)o ) ) + widgets.append( (TQWidget*)o ); + } + LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out Children in a Grid" ), + this, mainContainer(), w, widgets, xres, yres ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::breakLayout( TQWidget *w ) +{ + if ( w == this ) + w = mainContainer(); + w = WidgetFactory::containerOfWidget( w ); + TQPtrList commands; + + for (;;) { + if ( !w || w == this ) + break; + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout && + WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + Command *cmd = breakLayoutCommand( w ); + if ( cmd ) + commands.insert( 0, cmd ); + if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) + break; + } + w = w->parentWidget(); + } + + if ( commands.isEmpty() ) + return; + + clearSelection( FALSE ); + MacroCommand *cmd = new MacroCommand( i18n( "Break Layout" ), this, commands ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w ) +{ + CHECK_MAINWINDOW_VALUE( 0 ); + TQObjectList l = w->childrenListObject(); + if ( l.isEmpty() ) + return 0; + + TQWidgetList widgets; + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && + !mainWindow()->isAToolBarChild( TQT_TQOBJECT(o) ) && + ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets.find( (TQWidget*)o ) ) + widgets.append( (TQWidget*)o ); + } + return new BreakLayoutCommand( i18n( "Break Layout" ), this, WidgetFactory::widgetOfContainer( w ), widgets ); +} + +int FormWindow::numVisibleWidgets() const +{ + TQPtrDictIterator it( insertedWidgets ); + int visible = 0; + for ( ; it.current(); ++it ) { + if ( it.current()->isVisibleTo( (FormWindow*)this ) ) + visible++; + } + return visible; +} + +bool FormWindow::hasInsertedChildren( TQWidget *w ) const +{ + if ( !w ) + return FALSE; + w = WidgetFactory::containerOfWidget( w ); + if ( !w ) + return FALSE; + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( !l || !l->first() ) { + delete l; + return FALSE; + } + + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( o->isWidgetType() && + ( (TQWidget*)o )->isVisibleTo( (FormWindow*)this ) && + insertedWidgets.find( (TQWidget*)o ) ) { + delete l; + return TRUE; + } + } + + delete l; + return FALSE; +} + +bool FormWindow::allowMove( TQWidget *w ) +{ + w = w->parentWidget(); + while ( w ) { + if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) + return TRUE; + w = w->parentWidget(); + } + return FALSE; +} + + +void FormWindow::editConnections() +{ + CHECK_MAINWINDOW; + buffer = 0; + if ( !startWidget || !endWidget ) + return; + + ConnectionDialog dlg( mainwindow ); + mainWindow()->statusMessage( i18n( "Edit connections...") ); + dlg.addConnection( TQT_TQOBJECT(startWidget), TQT_TQOBJECT(endWidget), TQString(), TQString() ); + TQTimer::singleShot( 0, &dlg, TQT_SLOT(ensureConnectionVisible()) ); + dlg.exec(); +} + +void FormWindow::saveBackground() +{ + if ( buffer ) + delete buffer; + buffer = new TQPixmap( width(), height() ); + *buffer = TQPixmap::grabWindow( winId() ); +} + +void FormWindow::restoreConnectionLine() +{ + if (!unclippedPainter || !buffer) // designer will occasionally crash if buffer is not tested to be non-zero + return; + + int a =TQABS( startPos.x() - currentPos.x() ); + int b = TQABS( startPos.y() - currentPos.y() ); + TQRect r( startPos, currentPos ); + + if ( a < 32 || b < 32 ) { // special case: vertical or horizontal line + r = r.normalize(); + unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, + r.x() - 2, r.y() - 2, r.width() + 4, r.height() + 4 ); + return; + } + + if ( a <= 0 ) + a = 1; + if ( b <= 0 ) + b = 1; + int w, h; + if ( b > a ) { + h = 64; + w = ( a * h ) / b; + } else { + w = 64; + h = ( b * w ) / a; + } + + int dx = 2 * w / 3; + int dy = 2 * h / 3; + TQPoint p( startPos ); + + if ( r.x() > r.right() ) { + dx = dx * -1; + p.setX( p.x() - 64 ); + r.moveBy( -64, 0 ); + } + if ( r.y() > r.bottom() ) { + dy = dy * -1; + p.setY( p.y() - 64 ); + r.moveBy( 0, -64 ); + } + + w = h = 64; + r = r.normalize(); + while ( r.contains( p ) ) { + unclippedPainter->drawPixmap( p, *buffer, TQRect( p, TQSize( w, h ) ) ); + unclippedPainter->setPen( red ); + p.setX( p.x() + dx ); + p.setY( p.y() + dy ); + } + + unclippedPainter->drawPixmap( startPos.x() - 10, startPos.y() - 10, *buffer, + startPos.x() - 10, startPos.y() - 10, 20, 20 ); +} + +void FormWindow::restoreRect( const TQRect &rect ) +{ + if (!unclippedPainter || !buffer) + return; + + TQRect r( rect ); + r = r.normalize(); + + r = TQRect( r.x() + 2, r.y() + 2, r.width() - 4, r.height() - 4 ); + + unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, r.width() + 4, 4 ); + unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, 4, r.height() + 4 ); + unclippedPainter->drawPixmap( r.x() - 2, r.y() + r.height() - 3, *buffer, r.x() - 2, r.y() + r.height() - 3, r.width() + 4, 5 ); + unclippedPainter->drawPixmap( r.x() + r.width() - 2, r.y(), *buffer, r.x() + r.width() - 2, r.y(), 4, r.height() + 4 ); +} + +void FormWindow::drawConnectionLine() +{ + if ( !unclippedPainter ) + return; + + unclippedPainter->setPen( TQPen( white, 2 ) ); + unclippedPainter->drawLine( startPos, currentPos ); + if ( validForBuddy ) + unclippedPainter->setPen( TQPen( darkRed, 1 ) ); + else + unclippedPainter->setPen( TQPen( darkCyan, 1 ) ); + unclippedPainter->drawLine( startPos, currentPos ); + + if ( validForBuddy ) + unclippedPainter->setPen( TQPen( darkGreen, 1 ) ); + else + unclippedPainter->setPen( TQPen( magenta, 1 ) ); + if ( startWidget ) { + TQWidget *s = (TQWidget*)startWidget; + TQPoint p = mapToForm( s, TQPoint(0,0) ); + unclippedPainter->drawRect( TQRect( p + TQPoint( 2, 2 ), s->size() - TQSize( 4, 4 ) ) ); + } + if ( endWidget ) { + TQWidget *e = (TQWidget*)endWidget; + TQPoint p = mapToForm( e, TQPoint(0,0) ); + unclippedPainter->drawRect( TQRect( p + TQPoint( 2, 2 ), e->size() - TQSize( 4, 4 ) ) ); + } +} + +TQString FormWindow::fileName() const +{ + return ff->absFileName(); +} + +void FormWindow::setFileName( const TQString &fn ) +{ + ff->setFileName( fn ); + emit fileNameChanged( ff->fileName(), this ); +} + +void FormWindow::modificationChanged( bool m ) +{ + emit modificationChanged( m, this ); + emit modificationChanged( m, ff->fileName() ); +} + +bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) +{ + bool found = !isMainContainer( w ) && qstrcmp( name(), s.latin1() ) == 0; + if ( !found ) { + TQString orig = s; + int num = 1; + TQPtrDictIterator it( insertedWidgets ); + for ( ; it.current();) { + if ( TQT_BASE_OBJECT(it.current()) != TQT_BASE_OBJECT(w) && + qstrcmp( it.current()->name(), s.latin1() ) == 0 ) { + found = TRUE; + if ( !changeIt ) + break; + s = orig + "_" + TQString::number( ++num ); + it.toFirst(); + } else { + ++it; + } + } + if ( !found ) { + TQPtrList al; + TQAction *a = 0; + for ( a = actions.first(); a; a = actions.next() ) { + TQObjectList *l = a->queryList( TQACTION_OBJECT_NAME_STRING ); + al.append( a ); + for ( TQObject *ao = l->first(); ao; ao = l->next() ) + al.append( (TQAction*)ao ); + delete l; + } + for ( a = al.first(); a; a = al.next() ) { + if ( a != w && + qstrcmp( a->name(), s.latin1() ) == 0 ) { + found = TRUE; + if ( !changeIt ) + break; + s = orig + "_" + TQString::number( ++num ); + a = actions.first(); + } + } + } + if ( ::tqqt_cast(mainContainer()) && !found ) { + TQObjectList *l = mainContainer()->queryList( "PopupMenuEditor" ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( o != w && + qstrcmp ( o->name(), s.latin1() ) == 0 ) { + found = TRUE; + if ( !changeIt ) + break; + s = orig + "_" + TQString::number( ++num ); + o = l->first(); + } + } + delete l; + } + if ( ::tqqt_cast(mainContainer()) ) { + if ( !found ) { + TQObjectList *l = mainContainer()->queryList( TQDOCKWINDOW_OBJECT_NAME_STRING, 0, TRUE ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( o != w && + qstrcmp( o->name(), s.latin1() ) == 0 ) { + found = TRUE; + if ( !changeIt ) + break; + s = orig + "_" + TQString::number( ++num ); + o = l->first(); + } + } + delete l; + } + } + } + + if ( !found ) + return TRUE; + return FALSE; +} + +bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w ) +{ + TQPtrDictIterator it( insertedWidgets ); + for ( ; it.current(); ++it ) { + if ( it.current()->isA( "CustomWidget" ) ) { + if ( qstrcmp( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ), w->className.utf8() ) == 0 ) + return TRUE; + } + } + + return FALSE; +} + +bool FormWindow::isDatabaseWidgetUsed() const +{ +#ifndef TQT_NO_SQL + TQStringList dbClasses; + dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here + TQPtrDictIterator it( insertedWidgets ); + for ( ; it.current(); ++it ) { + TQString c( it.current()->className() ); + if ( dbClasses.contains( c ) > 0 ) { + return TRUE; + } + } +#endif + return FALSE; +} + +bool FormWindow::isDatabaseAware() const +{ +#ifndef TQT_NO_SQL + if ( TQString(mContainer->className()) == "QDesignerDataBrowser" || TQString(mContainer->className()) == "QDesignerDataView" ) + return TRUE; + return isDatabaseWidgetUsed(); +#else + return FALSE; +#endif +} + +void FormWindow::visibilityChanged() +{ + if ( currTool != ORDER_TOOL ) { + emitUpdateProperties( TQT_TQOBJECT(currentWidget()) ); + } else { + updateOrderIndicators(); + repositionOrderIndicators(); + } +} + + +/*! + Maps \a pos in \a w's coordinates to the form's coordinate system. + + This is the equivalent to mapFromGlobal(w->mapToGlobal(pos) ) but + avoids the two roundtrips to the X-Server on Unix/X11. + */ +TQPoint FormWindow::mapToForm( const TQWidget* w, const TQPoint& pos ) const +{ + TQPoint p = pos; + const TQWidget* i = w; + while ( i && !i->isTopLevel() && !isMainContainer( TQT_TQOBJECT(const_cast(i)) ) ) { + p = i->mapToParent( p ); + i = i->parentWidget(); + } + return mapFromGlobal( w->mapToGlobal( pos ) ); +} + +static int widgetDepth( TQWidget *w ) +{ + int d = -1; + while ( w && !w->isTopLevel() ) { + d++; + w = w->parentWidget(); + } + + return d; +} + +static bool isChildOf( TQWidget *c, TQWidget *p ) +{ + while ( c && !c->isTopLevel() ) { + if ( c == p ) + return TRUE; + c = c->parentWidget(); + } + return FALSE; +} + +TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) +{ + TQPtrDictIterator it( insertedWidgets ); + TQWidget *container = 0; + int depth = -1; + TQWidgetList selected = selectedWidgets(); + if ( TQT_TQRECT_OBJECT(rect()).contains( mapFromGlobal( pos ) ) ) { + container = mainContainer(); + depth = widgetDepth( container ); + } + + for ( ; it.current(); ++it ) { + if ( ::tqqt_cast(it.current()) + || ::tqqt_cast(it.current()) ) + continue; + if ( !it.current()->isVisibleTo( this ) ) + continue; + if ( selected.find( it.current() ) != -1 ) + continue; + if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ) ) ) && + it.current() != mainContainer() ) + continue; + + // the rectangles of all ancestors of the container must contain the insert position + TQWidget *w = it.current(); + while ( w && !w->isTopLevel() ) { + if ( !TQT_TQRECT_OBJECT(w->rect()).contains( ( w->mapFromGlobal( pos ) ) ) ) + break; + w = w->parentWidget(); + } + if ( !( w == 0 || w->isTopLevel() ) ) continue; // we did not get through the full while loop + + int wd = widgetDepth( it.current() ); + if ( wd == depth && container ) { + if ( ( it.current()->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(it.current()) ) > + ( container->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(container) ) ) + wd++; + } + if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) { + depth = wd; + container = it.current(); + } + } + + return container; +} + +bool FormWindow::isMainContainer( TQObject *w ) const +{ + return w && w->isWidgetType() && ( TQT_BASE_OBJECT(w) == this || TQT_BASE_OBJECT(w) == mainContainer() ); +} + +void FormWindow::setMainContainer( TQWidget *w ) +{ + bool resetPropertyWidget = isMainContainer( propertyWidget ); + if ( mContainer ) + insertedWidgets.remove( mContainer ); + if ( TQT_BASE_OBJECT(propertyWidget) == TQT_BASE_OBJECT(mContainer) ) + propertyWidget = 0; + delete mContainer; + mContainer = w; + insertedWidgets.insert( mContainer, mContainer ); + delete layout(); + TQHBoxLayout *l = new TQHBoxLayout( this ); + l->addWidget( w ); + if ( resetPropertyWidget ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mContainer); + if ( opw && opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + } + if ( project() ) { + LanguageInterface *iface = MetaDataBase::languageInterface( project()->language() ); + if ( iface && !project()->isCpp() && !isFake() ) { + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "init()" ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(this), "init()", "", "private", "function", + project()->language(), "void" ); + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "destroy()" ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(this), "destroy()", "", "private", "function", + project()->language(), "void" ); + if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ) ) + MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ); + if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", TQT_TQOBJECT(mainContainer()), "destroy" ) ) + MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", + TQT_TQOBJECT(mainContainer()), "destroy" ); + } + } +} + +bool FormWindow::savePixmapInline() const +{ + return pixInline; +} + +bool FormWindow::savePixmapInProject() const +{ + return pixProject; +} + +TQString FormWindow::pixmapLoaderFunction() const +{ + return pixLoader; +} + +void FormWindow::setSavePixmapInline( bool b ) +{ + pixInline = b; + if ( b ) + pixProject = FALSE; +} + +void FormWindow::setSavePixmapInProject( bool b ) +{ + pixProject = b; + if ( b ) + pixInline = FALSE; +} + +void FormWindow::setPixmapLoaderFunction( const TQString &func ) +{ + pixLoader = func; +} + +void FormWindow::setActiveObject( TQObject *o ) +{ + emitShowProperties( o ); + propertyWidget = o; +} + +void FormWindow::setProject( Project *pro ) +{ + proj = pro; +} + +Project *FormWindow::project() const +{ + return proj; +} + +TQAction *FormWindow::findAction( const TQString &name ) +{ + for ( TQAction *a = actionList().first(); a; a = actionList().next() ) { + if ( TQString( a->name() ) == name ) + return a; + TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING ); + if ( ac ) + return ac; + } + return 0; +} + +void FormWindow::killAccels( TQObject *top ) +{ + TQObjectList *l = top->queryList( TQACCEL_OBJECT_NAME_STRING ); + if ( !l ) + return; + for ( TQObject *o = l->first(); o; o = l->next() ) + ( (TQAccel*)o )->setEnabled( FALSE ); + delete l; +} + +DesignerFormWindow *FormWindow::iFace() +{ + if ( !iface ) + iface = new DesignerFormWindowImpl( this ); + return iface; +} + +bool FormWindow::isCentralWidget( TQObject *w ) const +{ + if ( !::tqqt_cast(mainContainer()) ) + return FALSE; + return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(( (TQMainWindow*)mainContainer() )->centralWidget()); +} + +int FormWindow::layoutDefaultSpacing() const +{ + return defSpacing; +} + +int FormWindow::layoutDefaultMargin() const +{ + return defMargin; +} + +void FormWindow::setLayoutDefaultSpacing( int s ) +{ + defSpacing = s; +} + +void FormWindow::setLayoutDefaultMargin( int s ) +{ + defMargin = s; +} + +void FormWindow::setSpacingFunction( const TQString &funct ) +{ + spacFunction = funct; +} + +TQString FormWindow::spacingFunction() const +{ + return spacFunction; +} + +void FormWindow::hasLayoutFunctions( bool b ) +{ + hasLayoutFunc = b; +} + +bool FormWindow::hasLayoutFunctions() const +{ + return hasLayoutFunc; +} + +void FormWindow::setMarginFunction( const TQString &funct ) +{ + margFunction = funct; +} + +TQString FormWindow::marginFunction() const +{ + return margFunction; +} + +FormFile *FormWindow::formFile() const +{ + return ff; +} + +void FormWindow::setFormFile( FormFile *f ) +{ + ff = f; + if ( ff ) + connect( this, TQT_SIGNAL( modificationChanged(bool, const TQString&) ), ff, TQT_SLOT( formWindowChangedSomehow() ) ); +} + +bool FormWindow::canBeBuddy( const TQWidget *w ) const +{ + return w->focusPolicy() != TQ_NoFocus; +} + +bool FormWindow::event( TQEvent *e ) +{ + if (e->type() == TQEvent::ShowMaximized) + { + if ( isMaximized() ) + setWindowState( windowState() & ~WindowMaximized | WindowActive); + return true; + } + return TQWidget::event(e); +} diff --git a/kdevdesigner/designer/formwindow.h b/kdevdesigner/designer/formwindow.h new file mode 100644 index 00000000..d4295e7e --- /dev/null +++ b/kdevdesigner/designer/formwindow.h @@ -0,0 +1,323 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef FORMWINDOW_H +#define FORMWINDOW_H + +#include "command.h" +#include "metadatabase.h" +#include "sizehandle.h" +#include "actiondnd.h" + +#include +#include +#include +#include +#include + +class TQPaintEvent; +class TQMouseEvent; +class TQKeyEvent; +class TQPainter; +class TQLabel; +class MainWindow; +class TQTimer; +class TQFocusEvent; +class TQCloseEvent; +class Resource; +class TQResizeEvent; +class BreakLayoutCommand; +class TQPixmap; +class TQSizeGrip; +class Project; +struct DesignerFormWindow; +class FormFile; + +#if defined(TQ_CC_MSVC) || defined(TQ_FULL_TEMPLATE_INSTANTIATION) +#include "orderindicator.h" +#else +class OrderIndicator; +#endif + +class FormWindow : public TQWidget +{ + Q_OBJECT + + TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName ) + +public: + FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name = 0 ); + FormWindow( FormFile *f, TQWidget *parent, const char *name = 0 ); + ~FormWindow(); + + void init(); + virtual void setMainWindow( MainWindow *w ); + + virtual TQString fileName() const; + virtual void setFileName( const TQString &fn ); + + virtual TQPoint grid() const; + virtual TQPoint gridPoint( const TQPoint &p ); + + virtual CommandHistory *commandHistory(); + + virtual void undo(); + virtual void redo(); + virtual TQString copy(); + virtual void paste( const TQString &cb, TQWidget *parent ); + virtual void lowerWidgets(); + virtual void raiseWidgets(); + virtual void checkAccels(); + + virtual void layoutHorizontal(); + virtual void layoutVertical(); + virtual void layoutHorizontalSplit(); + virtual void layoutVerticalSplit(); + virtual void layoutGrid(); + + virtual void layoutHorizontalContainer( TQWidget *w ); + virtual void layoutVerticalContainer( TQWidget *w ); + virtual void layoutGridContainer( TQWidget *w ); + + virtual void breakLayout( TQWidget *w ); + + virtual void selectWidget( TQObject *w, bool select = TRUE ); + virtual void selectAll(); + virtual void updateSelection( TQWidget *w ); + virtual void raiseSelection( TQWidget *w ); + virtual void repaintSelection( TQWidget *w ); + virtual void clearSelection( bool changePropertyDisplay = TRUE ); + virtual void selectWidgets(); + bool isWidgetSelected( TQObject *w ); + virtual void updateChildSelections( TQWidget *w ); + virtual void raiseChildSelections( TQWidget *w ); + + virtual void emitUpdateProperties( TQObject *w ); + virtual void emitShowProperties( TQObject *w = 0 ); + virtual void emitSelectionChanged(); + + virtual void setPropertyShowingBlocked( bool b ); + bool isPropertyShowingBlocked() const; + + virtual TQLabel *sizePreview() const; + virtual void checkPreviewGeometry( TQRect &r ); + + virtual TQPtrDict *widgets(); + virtual TQWidgetList selectedWidgets() const; + + virtual TQWidget *designerWidget( TQObject *o ) const; + + virtual void handleContextMenu( TQContextMenuEvent *e, TQWidget *w ); + virtual void handleMousePress( TQMouseEvent *e, TQWidget *w ); + virtual void handleMouseRelease( TQMouseEvent *e, TQWidget *w ); + virtual void handleMouseDblClick( TQMouseEvent *e, TQWidget *w ); + virtual void handleMouseMove( TQMouseEvent *e, TQWidget *w ); + virtual void handleKeyPress( TQKeyEvent *e, TQWidget *w ); + virtual void handleKeyRelease( TQKeyEvent *e, TQWidget *w ); + + virtual void updateUndoInfo(); + + virtual MainWindow *mainWindow() const { return mainwindow; } + + bool checkCustomWidgets(); + virtual void insertWidget( TQWidget *w, bool checkName = FALSE ); + virtual void removeWidget( TQWidget *w ); + virtual void deleteWidgets(); + virtual void editAdjustSize(); + virtual void editConnections(); + + virtual int numSelectedWidgets() const; + virtual int numVisibleWidgets() const; + + virtual bool hasInsertedChildren( TQWidget *w ) const; + + virtual TQWidget *currentWidget() const { return propertyWidget && propertyWidget->isWidgetType() ? (TQWidget*)propertyWidget : 0; } // ##### + virtual bool unify( TQObject *w, TQString &s, bool changeIt ); + + virtual bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w ); + virtual bool isDatabaseWidgetUsed() const; + virtual bool isDatabaseAware() const; + + virtual TQPoint mapToForm( const TQWidget* w, const TQPoint& ) const; + + bool isMainContainer( TQObject *w ) const; + bool isCentralWidget( TQObject *w ) const; + TQWidget *mainContainer() const { return mContainer; } + void setMainContainer( TQWidget *w ); + + void paintGrid( TQWidget *w, TQPaintEvent *e ); + + bool savePixmapInline() const; + TQString pixmapLoaderFunction() const; + void setSavePixmapInline( bool b ); + void setPixmapLoaderFunction( const TQString &func ); + + bool savePixmapInProject() const; + void setSavePixmapInProject( bool b ); + + void setToolFixed() { toolFixed = TRUE; } + + void setActiveObject( TQObject *o ); + + TQPtrList &actionList() { return actions; } + TQAction *findAction( const TQString &name ); + + void setProject( Project *pro ); + Project *project() const; + + void killAccels( TQObject *top ); + + DesignerFormWindow *iFace(); + + int layoutDefaultSpacing() const; + int layoutDefaultMargin() const; + void setLayoutDefaultSpacing( int s ); + void setLayoutDefaultMargin( int s ); + TQString spacingFunction() const; + TQString marginFunction() const; + void setSpacingFunction( const TQString &func ); + void setMarginFunction( const TQString &func ); + bool hasLayoutFunctions() const; + void hasLayoutFunctions( bool b ); + + void initSlots(); + FormFile *formFile() const; + void setFormFile( FormFile *f ); + + bool isFake() const { return fake; } + bool canBeBuddy( const TQWidget* ) const; + +public slots: + virtual void widgetChanged( TQObject *w ); + virtual void currentToolChanged(); + virtual void visibilityChanged(); + virtual void modificationChanged( bool m ); + +signals: + void showProperties( TQObject *w ); + void updateProperties( TQObject *w ); + void undoRedoChanged( bool undoAvailable, bool redoAvailable, + const TQString &undoCmd, const TQString &redoCmd ); + void selectionChanged(); + void modificationChanged( bool m, FormWindow *fw ); + void modificationChanged( bool m, const TQString &s ); + void fileNameChanged( const TQString &s, FormWindow *fw ); + +protected: + virtual void closeEvent( TQCloseEvent *e ); + virtual void focusInEvent( TQFocusEvent *e ); + virtual void focusOutEvent( TQFocusEvent *e ); + virtual void resizeEvent( TQResizeEvent *e ); + void mouseDoubleClickEvent( TQMouseEvent *e ) { handleMouseDblClick( e, mainContainer() ); } + virtual bool event( TQEvent *e ); + +private: + enum RectType { Insert, Rubber }; + + void beginUnclippedPainter( bool doNot ); + void endUnclippedPainter(); + void drawConnectionLine(); + void drawSizePreview( const TQPoint &pos, const TQString& text ); + + void insertWidget(); + void moveSelectedWidgets( int dx, int dy ); + + void startRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *w, RectType t ); + void continueRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *w, RectType t ); + void endRectDraw(); + + void checkSelectionsForMove( TQWidget *w ); + BreakLayoutCommand *breakLayoutCommand( TQWidget *w ); + + bool allowMove( TQWidget *w ); + + void saveBackground(); + void restoreConnectionLine(); + void restoreRect( const TQRect &rect ) ; + + void showOrderIndicators(); + void updateOrderIndicators(); + void repositionOrderIndicators(); + void hideOrderIndicators(); + + TQWidget *containerAt( const TQPoint &pos, TQWidget *notParentOf ); + +private slots: + void invalidCheckedSelections(); + void updatePropertiesTimerDone(); + void showPropertiesTimerDone(); + void selectionChangedTimerDone(); + void windowsRepaintWorkaroundTimerTimeout(); + +private: + int currTool; + bool oldRectValid, widgetPressed, drawRubber, checkedSelectionsForMove; + bool validForBuddy; + TQRect currRect; + TQPoint rectAnchor; + TQPainter *unclippedPainter; + TQPoint sizePreviewPos; + TQPixmap sizePreviewPixmap; + MainWindow *mainwindow; + TQPtrList selections; + TQPtrDict usedSelections; + TQRect widgetGeom, rubber; + TQPoint oldPressPos, origPressPos; + CommandHistory commands; + TQMap moving; + TQWidget *insertParent; + TQObject *propertyWidget; + TQLabel *sizePreviewLabel; + TQTimer *checkSelectionsTimer; + TQPtrDict insertedWidgets; + bool propShowBlocked; + TQTimer* updatePropertiesTimer, *showPropertiesTimer, *selectionChangedTimer, + *windowsRepaintWorkaroundTimer; + TQPoint startPos, currentPos; + TQWidget *startWidget, *endWidget; + TQPixmap *buffer; + TQPtrList orderIndicators; + TQWidgetList orderedWidgets; + TQWidgetList stackedWidgets; + TQWidget *mContainer; + bool pixInline, pixProject; + TQString pixLoader; + bool toolFixed; + TQPtrList actions; + Project *proj; + DesignerFormWindow *iface; + TQWidget* targetContainer; + TQPalette restorePalette; + bool hadOwnPalette; + int defSpacing, defMargin; + TQString spacFunction, margFunction; + bool hasLayoutFunc; + FormFile *ff; + bool fake; + +}; + +#endif diff --git a/kdevdesigner/designer/gotolinedialog.ui b/kdevdesigner/designer/gotolinedialog.ui new file mode 100644 index 00000000..99df35d2 --- /dev/null +++ b/kdevdesigner/designer/gotolinedialog.ui @@ -0,0 +1,169 @@ + +GotoLineDialog +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* +../interfaces/editorinterface.h +gotolinedialog.ui.h +struct EditorInterface; +EditorInterface *editor; + + + + GotoLineDialog + + + + 0 + 0 + 243 + 85 + + + + Goto Line + + + + unnamed + + + 11 + + + 6 + + + + TextLabel1 + + + &Line: + + + spinLine + + + + + spinLine + + + + 7 + 0 + + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + Spacer2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + PushButton2 + + + &Goto + + + true + + + + + PushButton1 + + + &Close + + + + + + + Spacer3 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + + + PushButton1 + clicked() + GotoLineDialog + reject() + + + PushButton2 + clicked() + GotoLineDialog + gotoLine() + + init() + destroy() + gotoLine() + setEditor( EditorInterface * e ) + + diff --git a/kdevdesigner/designer/gotolinedialog.ui.h b/kdevdesigner/designer/gotolinedialog.ui.h new file mode 100644 index 00000000..4ddf4114 --- /dev/null +++ b/kdevdesigner/designer/gotolinedialog.ui.h @@ -0,0 +1,50 @@ +/********************************************************************** +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +void GotoLineDialog::init() +{ + editor = 0; +} + +void GotoLineDialog::destroy() +{ + if ( editor ) + editor->release(); +} + +void GotoLineDialog::gotoLine() +{ + if ( editor ) + editor->gotoLine( spinLine->value() - 1 ); + accept(); +} + +void GotoLineDialog::setEditor( EditorInterface *e ) +{ + editor = e; + editor->addRef(); +} + diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp new file mode 100644 index 00000000..c6433cd0 --- /dev/null +++ b/kdevdesigner/designer/hierarchyview.cpp @@ -0,0 +1,1508 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "hierarchyview.h" +#include "formwindow.h" +#include "globaldefs.h" +#include "mainwindow.h" +#include "command.h" +#include "widgetfactory.h" +#include "widgetdatabase.h" +#include "project.h" +#include "sourceeditor.h" +#include "propertyeditor.h" +#include "editfunctionsimpl.h" +#include "listeditor.h" +#include "actiondnd.h" +#include "actioneditorimpl.h" +#include "variabledialogimpl.h" +#include "popupmenueditor.h" +#include "menubareditor.h" + +#include +#include "kdevdesigner_part.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../interfaces/languageinterface.h" +#include +#include +#include + +#include + +TQListViewItem *newItem = 0; + +static TQPluginManager *classBrowserInterfaceManager = 0; + +HierarchyItem::HierarchyItem( Type type, TQListViewItem *parent, TQListViewItem *after, + const TQString &txt1, const TQString &txt2, const TQString &txt3 ) + : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type ) +{ +} + +HierarchyItem::HierarchyItem( Type type, TQListView *parent, TQListViewItem *after, + const TQString &txt1, const TQString &txt2, const TQString &txt3 ) + : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type ) +{ +} + +void HierarchyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) +{ + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + g.setColor( TQColorGroup::Foreground, TQt::black ); + g.setColor( TQColorGroup::Text, TQt::black ); + TQString txt = text( 0 ); + if ( rtti() == Function && + MainWindow::self->currProject()->isCpp() && + ( txt == "init()" || txt == "destroy()" ) ) { + listView()->setUpdatesEnabled( FALSE ); + if ( txt == "init()" ) + setText( 0, txt + " " + "(Constructor)" ); + else + setText( 0, txt + " " + "(Destructor)" ); + TQListViewItem::paintCell( p, g, column, width, align ); + setText( 0, txt ); + listView()->setUpdatesEnabled( TRUE ); + } else { + TQListViewItem::paintCell( p, g, column, width, align ); + } + p->save(); + p->setPen( TQPen( cg.dark(), 1 ) ); + if ( column == 0 ) + p->drawLine( 0, 0, 0, height() - 1 ); + if ( listView()->firstChild() != this ) { + if ( nextSibling() != itemBelow() && itemBelow()->depth() < depth() ) { + int d = depth() - itemBelow()->depth(); + p->drawLine( -listView()->treeStepSize() * d, height() - 1, 0, height() - 1 ); + } + } + p->drawLine( 0, height() - 1, width, height() - 1 ); + p->drawLine( width - 1, 0, width - 1, height() ); + p->restore(); +} + +TQColor HierarchyItem::backgroundColor() +{ + updateBackColor(); + return backColor; +} + +void HierarchyItem::updateBackColor() +{ + if ( listView()->firstChild() == this ) { + backColor = *backColor1; + return; + } + + TQListViewItemIterator it( this ); + --it; + if ( it.current() ) { + if ( ( ( HierarchyItem*)it.current() )->backColor == *backColor1 ) + backColor = *backColor2; + else + backColor = *backColor1; + } else { + backColor = *backColor1; + } +} + +void HierarchyItem::setObject( TQObject *o ) +{ + obj = o; +} + +TQObject *HierarchyItem::object() const +{ + return obj; +} + +void HierarchyItem::okRename( int col ) +{ + if ( newItem == this ) + newItem = 0; + TQListViewItem::okRename( col ); +} + +void HierarchyItem::cancelRename( int col ) +{ + if ( newItem == this ) { + newItem = 0; + TQListViewItem::cancelRename( col ); + delete this; + return; + } + TQListViewItem::cancelRename( col ); +} + + + + +HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects ) + : TQListView( parent ), formWindow( fw ) +{ + DesignerFormPix = SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()); + DesignerLayoutPix = SmallIcon( "designer_layout.png" , KDevDesignerPartFactory::instance()); + DesignerFolderPix = SmallIcon( "designer_folder.png" , KDevDesignerPartFactory::instance()); + DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()); + + init_colors(); + + setDefaultRenameAction( Accept ); + header()->setMovingEnabled( FALSE ); + header()->setStretchEnabled( TRUE ); + normalMenu = 0; + tabWidgetMenu = 0; + addColumn( i18n( "Name" ) ); + addColumn( i18n( "Class" ) ); + TQPalette p( palette() ); + p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) ); + (void)*selectedBack; // hack + setPalette( p ); + disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), + this, TQT_SLOT( changeSortColumn( int ) ) ); + setSorting( -1 ); + setHScrollBarMode( AlwaysOff ); + setVScrollBarMode( AlwaysOn ); + if ( doConnects ) { + connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ), + this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQT_SLOT( objectDoubleClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), + this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ), + this, TQT_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) ); + } + deselect = TRUE; + setColumnWidthMode( 1, Manual ); +} + +void HierarchyList::keyPressEvent( TQKeyEvent *e ) +{ + if ( e->key() == Key_Shift || e->key() == Key_Control ) + deselect = FALSE; + else + deselect = TRUE; + TQListView::keyPressEvent( e ); +} + +void HierarchyList::keyReleaseEvent( TQKeyEvent *e ) +{ + deselect = TRUE; + TQListView::keyReleaseEvent( e ); +} + +void HierarchyList::viewportMousePressEvent( TQMouseEvent *e ) +{ + if ( e->state() & ShiftButton || e->state() & ControlButton ) + deselect = FALSE; + else + deselect = TRUE; + TQListView::viewportMousePressEvent( e ); +} + +void HierarchyList::viewportMouseReleaseEvent( TQMouseEvent *e ) +{ + TQListView::viewportMouseReleaseEvent( e ); +} + +TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) +{ + if ( !i ) + return 0; + + TQObject *o = findObject( i ); + if ( !o ) + return 0; + if ( TQT_BASE_OBJECT(formWindow) == TQT_BASE_OBJECT(o) ) { + if ( deselect ) + formWindow->clearSelection( FALSE ); + formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) ); + return 0; + } + if ( o->isWidgetType() ) { + TQWidget *w = (TQWidget*)o; + if ( !formWindow->widgets()->find( w ) ) { + if ( ::tqqt_cast(w->parent()) ) { + if (::tqqt_cast(w->parent()->parent()) ) { + ((TQTabWidget*)w->parent()->parent())->showPage( w ); + o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); + formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); + } else if ( ::tqqt_cast(w->parent()->parent()) ) { + ((QDesignerWizard*)w->parent()->parent())-> + setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); + o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); + formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); + } else { + ( (TQWidgetStack*)w->parent() )->raiseWidget( w ); + if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) ) + ( (QDesignerWidgetStack*)w->parent() )->updateButtons(); + } + } else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) { + formWindow->setActiveObject( TQT_TQOBJECT(w) ); + } else if ( ::tqqt_cast(w) ) { + return 0; // ### we could try to find our menu bar and change the currentMenu to our index + } else { + return 0; + } + } + } else if ( ::tqqt_cast(o) ) { + MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o ); + deselect = TRUE; + } + + if ( deselect ) + formWindow->clearSelection( FALSE ); + + return o; +} + + +void HierarchyList::objectDoubleClicked( TQListViewItem *i ) +{ + TQObject *o = handleObjectClick( i ); + if ( !o ) + return; + if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { + TQWidget *w = (TQWidget*)o; + if ( !w->parentWidget() || + WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) + w->raise(); + formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); + } +} + +void HierarchyList::objectClicked( TQListViewItem *i ) +{ + TQObject *o = handleObjectClick( i ); + if ( !o ) + return; + if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { + TQWidget *w = (TQWidget*)o; + formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); + } +} + +TQObject *HierarchyList::findObject( TQListViewItem *i ) +{ + return ( (HierarchyItem*)i )->object(); +} + +TQListViewItem *HierarchyList::findItem( TQObject *o ) +{ + TQListViewItemIterator it( this ); + while ( it.current() ) { + if ( ( (HierarchyItem*)it.current() )->object() == o ) + return it.current(); + ++it; + } + return 0; +} + +TQObject *HierarchyList::current() const +{ + if ( currentItem() ) + return ( (HierarchyItem*)currentItem() )->object(); + return 0; +} + +void HierarchyList::changeNameOf( TQObject *o, const TQString &name ) +{ + TQListViewItem *item = findItem( o ); + if ( !item ) + return; + item->setText( 0, name ); +} + + +void HierarchyList::changeDatabaseOf( TQObject *o, const TQString &info ) +{ +#ifndef TQT_NO_SQL + if ( !formWindow->isDatabaseAware() ) + return; + TQListViewItem *item = findItem( o ); + if ( !item ) + return; + item->setText( 2, info ); +#endif +} + +static TQPtrList *widgetStacks = 0; + +void HierarchyList::setup() +{ + if ( !formWindow || formWindow->isFake() ) + return; + clear(); + TQWidget *w = formWindow->mainContainer(); +#ifndef TQT_NO_SQL + if ( formWindow->isDatabaseAware() ) { + if ( columns() == 2 ) { + addColumn( i18n( "Database" ) ); + header()->resizeSection( 0, 1 ); + header()->resizeSection( 1, 1 ); + header()->resizeSection( 2, 1 ); + header()->adjustHeaderSize(); + } + } else { + if ( columns() == 3 ) { + removeColumn( 2 ); + } + } +#endif + if ( !widgetStacks ) + widgetStacks = new TQPtrList; + if ( w ) + insertObject( TQT_TQOBJECT(w), 0 ); + widgetStacks->clear(); +} + +void HierarchyList::setOpen( TQListViewItem *i, bool b ) +{ + TQListView::setOpen( i, b ); +} + +void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) +{ + if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) + return; + bool fakeMainWindow = FALSE; + if ( ::tqqt_cast(o) ) { + TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + if ( cw ) { + o = cw; + fakeMainWindow = TRUE; + } + } + TQListViewItem *item = 0; + TQString className = WidgetFactory::classNameOf( o ); + if ( ::tqqt_cast(o) ) { + switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) { + case WidgetFactory::HBox: + className = "HBox"; + break; + case WidgetFactory::VBox: + className = "VBox"; + break; + case WidgetFactory::Grid: + className = "Grid"; + break; + default: + break; + } + } + + TQString dbInfo; +#ifndef TQT_NO_SQL + dbInfo = MetaDataBase::fakeProperty( o, "database" ).toStringList().join("."); +#endif + + TQString name = o->name(); + if ( ::tqqt_cast(o->parent()) ) { + if ( ::tqqt_cast(o->parent()->parent()) ) + name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o ); + else if ( ::tqqt_cast(o->parent()->parent()) ) + name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o ); + } + + TQToolBox *tb; + if ( o->parent() && o->parent()->parent() && + (tb = ::tqqt_cast(o->parent()->parent()->parent())) ) + name = tb->itemLabel( tb->indexOf((TQWidget*)o) ); + + if ( fakeMainWindow ) { + name = o->parent()->name(); + className = TQMAINWINDOW_OBJECT_NAME_STRING; + } + + if ( !parent ) + item = new HierarchyItem( HierarchyItem::Widget, this, 0, name, className, dbInfo ); + else + item = new HierarchyItem( HierarchyItem::Widget, parent, 0, name, className, dbInfo ); + item->setOpen( TRUE ); + if ( !parent ) + item->setPixmap( 0, DesignerFormPix ); + else if ( ::tqqt_cast(o) ) + item->setPixmap( 0, DesignerLayoutPix ); + else + item->setPixmap( 0, WidgetDatabase::iconSet( + WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ). + pixmap( TQIconSet::Small, TQIconSet::Normal ) ); + if ( ::tqqt_cast(o) ) + item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() ); + + ( (HierarchyItem*)item )->setObject( o ); + TQObjectList l = o->childrenListObject(); + if ( ::tqqt_cast(o) ) + l.clear(); + if ( !l.isEmpty() ) { + TQObjectListIt it( l ); + it.toLast(); + for ( ; it.current(); --it ) { + if ( !it.current()->isWidgetType() || + ( (TQWidget*)it.current() )->isHidden() ) + continue; + if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { + if ( ::tqqt_cast(it.current()->parent()) || + ::tqqt_cast(it.current()) ) { + TQObject *obj = it.current(); + QDesignerTabWidget *tw = ::tqqt_cast(it.current()->parent()); + QDesignerWizard *dw = ::tqqt_cast(it.current()->parent()); + TQWidgetStack *stack = 0; + if ( dw || tw || ::tqqt_cast(obj) ) + stack = (TQWidgetStack*)obj; + else + stack = (TQWidgetStack*)obj->parent(); + if ( widgetStacks->findRef( stack ) != -1 ) + continue; + widgetStacks->append( stack ); + TQObjectList *l2 = stack->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, TRUE, FALSE ); + for ( obj = l2->last(); obj; obj = l2->prev() ) { + if ( qstrcmp( obj->className(), + "TQWidgetStackPrivate::Invisible" ) == 0 || + ( tw && !tw->tabBar()->tab( stack->id( (TQWidget*)obj ) ) ) || + ( dw && dw->isPageRemoved( (TQWidget*)obj ) ) ) + continue; + if ( qstrcmp( obj->name(), "designer_wizardstack_button" ) == 0 ) + continue; + if ( stack->id( (TQWidget*)obj ) == -1 ) + continue; + insertObject( obj, item ); + } + delete l2; + } else if ( ::tqqt_cast(it.current()->parent()) ) { + if ( !::tqqt_cast(it.current()) ) + continue; + TQToolBox *tb = (TQToolBox*)it.current()->parent(); + for ( int i = tb->count() - 1; i >= 0; --i ) + insertObject( TQT_TQOBJECT(tb->item( i )), item ); + } + continue; + } + insertObject( it.current(), item ); + } + } + + if ( fakeMainWindow ) { + TQObjectList *l = o->parent()->queryList( "QDesignerToolBar" ); + TQObject *obj; + for ( obj = l->first(); obj; obj = l->next() ) + insertObject( obj, item ); + delete l; + l = o->parent()->queryList( "MenuBarEditor" ); + for ( obj = l->first(); obj; obj = l->next() ) + insertObject( obj, item ); + delete l; + } else if ( ::tqqt_cast(o) || ::tqqt_cast(o) ) { + TQPtrList actions; + if ( ::tqqt_cast(o) ) + actions = ( (QDesignerToolBar*)o )->insertedActions(); + else + ( (PopupMenuEditor*)o )->insertedActions( actions ); + + TQPtrListIterator it( actions ); + it.toLast(); + while ( it.current() ) { + TQAction *a = it.current(); + if ( ::tqqt_cast(a) ) { + QDesignerAction *da = (QDesignerAction*)a; + if ( da->supportsMenu() ) + insertObject( da, item ); + else + insertObject( TQT_TQOBJECT(da->widget()), item ); + } else if ( ::tqqt_cast(a) ) { + insertObject( a, item ); + } + --it; + } + } else if ( ::tqqt_cast(o) && !o->childrenListObject().isEmpty() ) { + TQObjectList l = o->childrenListObject(); + for ( TQObject *obj = l.last(); obj; obj = l.prev() ) { + if ( ::tqqt_cast(obj) ) { + QDesignerAction *da = (QDesignerAction*)obj; + if ( da->supportsMenu() ) + insertObject( da, item ); + else + insertObject( TQT_TQOBJECT(da->widget()), item ); + } else if ( ::tqqt_cast(obj) ) { + insertObject( obj, item ); + } + } + } else if ( ::tqqt_cast(o) ) { + MenuBarEditor *mb = (MenuBarEditor*)o; + for ( int i = mb->count() -1; i >= 0; --i ) { + MenuBarEditorItem *md = mb->item( i ); + if ( !md || !md->menu() ) + continue; + insertObject( TQT_TQOBJECT(md->menu()), item ); + } + } +} + +void HierarchyList::setCurrent( TQObject *o ) +{ + TQListViewItemIterator it( this ); + while ( it.current() ) { + if ( ( (HierarchyItem*)it.current() )->object() == o ) { + blockSignals( TRUE ); + setCurrentItem( it.current() ); + ensureItemVisible( it.current() ); + blockSignals( FALSE ); + return; + } + ++it; + } +} + +void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) +{ + if ( !i ) + return; + + TQObject *o = findObject( i ); + if ( !o ) + return; + + if ( !o->isWidgetType() || + ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(formWindow) && !formWindow->widgets()->find( (TQWidget*)o ) ) ) + return; + + TQWidget *w = (TQWidget*)o; + if ( w->isVisibleTo( formWindow ) ) { + if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) { + if ( !normalMenu ) + normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this ); + normalMenu->popup( p ); + } else { + if ( !tabWidgetMenu ) + tabWidgetMenu = + formWindow->mainWindow()->setupTabWidgetHierarchyMenu( + this, TQT_SLOT( addTabPage() ), + TQT_SLOT( removeTabPage() ) ); + tabWidgetMenu->popup( p ); + } + } +} + +void HierarchyList::addTabPage() +{ + TQObject *o = current(); + if ( !o || !o->isWidgetType() ) + return; + TQWidget *w = (TQWidget*)o; + if ( ::tqqt_cast(w) ) { + TQTabWidget *tw = (TQTabWidget*)w; + AddTabPageCommand *cmd = new AddTabPageCommand( i18n( "Add Page to %1" ). + arg( tw->name() ), formWindow, + tw, "Tab" ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( ::tqqt_cast(w) ) { + TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); + AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ). + arg( wiz->name() ), formWindow, + wiz, "Page" ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } +} + +void HierarchyList::removeTabPage() +{ + TQObject *o = current(); + if ( !o || !o->isWidgetType() ) + return; + TQWidget *w = (TQWidget*)o; + if ( ::tqqt_cast(w) ) { + TQTabWidget *tw = (TQTabWidget*)w; + if ( tw->currentPage() ) { + QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; + DeleteTabPageCommand *cmd = + new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ). + arg( dtw->pageTitle() ).arg( tw->name() ), + formWindow, tw, tw->currentPage() ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } else if ( ::tqqt_cast(w) ) { + TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); + if ( wiz->currentPage() ) { + QDesignerWizard *dw = (QDesignerWizard*)wiz; + DeleteWizardPageCommand *cmd = + new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). + arg( dw->pageTitle() ).arg( wiz->name() ), + formWindow, wiz, + wiz->indexOf( wiz->currentPage() ), TRUE ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } +} + +// ------------------------------------------------------------ + +FormDefinitionView::FormDefinitionView( TQWidget *parent, FormWindow *fw ) + : HierarchyList( parent, fw, TRUE ) +{ + header()->hide(); + removeColumn( 1 ); + connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), + this, TQT_SLOT( renamed( TQListViewItem * ) ) ); + popupOpen = FALSE; +} + +void FormDefinitionView::setup() +{ + if ( popupOpen || !formWindow ) + return; + if ( !formWindow->project()->isCpp() ) + return; + TQListViewItem *i = firstChild(); + while ( i ) { + if ( i->rtti() == HierarchyItem::DefinitionParent ) { + TQListViewItem *a = i; + i = i->nextSibling(); + delete a; + continue; + } + i = i->nextSibling(); + } + + LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); + if ( lIface ) { + TQStringList defs = lIface->definitions(); + for ( TQStringList::Iterator dit = defs.begin(); dit != defs.end(); ++dit ) { + HierarchyItem *itemDef = new HierarchyItem( HierarchyItem::DefinitionParent, this, 0, + i18n( *dit ), TQString(), TQString() ); + itemDef->setPixmap( 0, DesignerFolderPix ); + itemDef->setOpen( TRUE ); + TQStringList entries = + lIface->definitionEntries( *dit, formWindow->mainWindow()->designerInterface() ); + HierarchyItem *item = 0; + for ( TQStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit ) { + item = new HierarchyItem( HierarchyItem::Definition, + itemDef, item, *eit, TQString(), TQString() ); + item->setRenameEnabled( 0, TRUE ); + } + } + lIface->release(); + } + setupVariables(); + refresh(); +} + +void FormDefinitionView::setupVariables() +{ + bool pubOpen, protOpen, privOpen; + pubOpen = protOpen = privOpen = TRUE; + TQListViewItem *i = firstChild(); + while ( i ) { + if ( i->rtti() == HierarchyItem::VarParent ) { + TQListViewItem *a = i; + i = i->firstChild(); + while ( i ) { + if ( i->rtti() == HierarchyItem::VarPublic ) + pubOpen = i->isOpen(); + else if ( i->rtti() == HierarchyItem::VarProtected ) + protOpen = i->isOpen(); + else if ( i->rtti() == HierarchyItem::VarPrivate ) + privOpen = i->isOpen(); + i = i->nextSibling(); + } + delete a; + break; + } + i = i->nextSibling(); + } + + HierarchyItem *itemVar = new HierarchyItem( HierarchyItem::VarParent, this, 0, i18n( "Class Variables" ), + TQString(), TQString() ); + itemVar->setPixmap( 0, DesignerFolderPix ); + itemVar->setOpen( TRUE ); + + itemVarPriv = new HierarchyItem( HierarchyItem::VarPrivate, itemVar, 0, i18n( "private" ), + TQString(), TQString() ); + itemVarProt = new HierarchyItem( HierarchyItem::VarProtected, itemVar, 0, i18n( "protected" ), + TQString(), TQString() ); + itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, i18n( "public" ), + TQString(), TQString() ); + + TQValueList varList = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); + TQValueList::Iterator it = --( varList.end() ); + if ( !varList.isEmpty() && itemVar ) { + for (;;) { + TQListViewItem *item = 0; + if ( (*it).varAccess == "public" ) + item = new HierarchyItem( HierarchyItem::Variable, itemVarPubl, 0, (*it).varName, + TQString(), TQString() ); + else if ( (*it).varAccess == "private" ) + item = new HierarchyItem( HierarchyItem::Variable, itemVarPriv, 0, (*it).varName, + TQString(), TQString() ); + else // default is protected + item = new HierarchyItem( HierarchyItem::Variable, itemVarProt, 0, (*it).varName, + TQString(), TQString() ); + item->setPixmap( 0, DesignerEditSlotsPix ); + if ( it == varList.begin() ) + break; + --it; + } + } + itemVar->setOpen( TRUE ); + itemVarPriv->setOpen( privOpen ); + itemVarProt->setOpen( protOpen ); + itemVarPubl->setOpen( pubOpen ); +} + +void FormDefinitionView::refresh() +{ + if ( popupOpen || !formWindow || !formWindow->project()->isCpp() ) + return; + + bool fuPub, fuProt, fuPriv, slPub, slProt, slPriv; + fuPub = fuProt = fuPriv = slPub = slProt = slPriv = TRUE; + TQListViewItem *i = firstChild(); + while ( i ) { + if ( i->rtti() == HierarchyItem::SlotParent || + i->rtti() == HierarchyItem::FunctParent ) { + TQListViewItem *a = i; + i = i->firstChild(); + while ( i ) { + switch( i->rtti() ) { + case HierarchyItem::FunctPublic: + fuPub = i->isOpen(); + case HierarchyItem::FunctProtected: + fuProt = i->isOpen(); + break; + case HierarchyItem::FunctPrivate: + fuPriv = i->isOpen(); + break; + case HierarchyItem::SlotPublic: + slPub = i->isOpen(); + if ( slPub ) + break; + case HierarchyItem::SlotProtected: + slProt = i->isOpen(); + break; + case HierarchyItem::SlotPrivate: + slPriv = i->isOpen(); + } + i = i->nextSibling(); + } + i = a->nextSibling(); + delete a; + continue; + } + i = i->nextSibling(); + } + + + itemFunct = new HierarchyItem( HierarchyItem::FunctParent, + this, 0, i18n( "Functions" ), TQString(), TQString() ); + itemFunct->moveItem( i ); + itemFunct->setPixmap( 0, DesignerFolderPix ); + itemFunctPriv = new HierarchyItem( HierarchyItem::FunctPrivate, itemFunct, 0, + i18n( "private" ), TQString(), TQString() ); + itemFunctProt = new HierarchyItem( HierarchyItem::FunctProtected, itemFunct, 0, + i18n( "protected" ), TQString(), TQString() ); + itemFunctPubl = new HierarchyItem( HierarchyItem::FunctPublic, itemFunct, 0, + i18n( "public" ), TQString(), TQString() ); + + itemSlots = new HierarchyItem( HierarchyItem::SlotParent, + this, 0, i18n( "Slots" ), TQString(), TQString() ); + itemSlots->setPixmap( 0, DesignerFolderPix ); + itemPrivate = new HierarchyItem( HierarchyItem::SlotPrivate, itemSlots, 0, i18n( "private" ), + TQString(), TQString() ); + itemProtected = new HierarchyItem( HierarchyItem::SlotProtected, itemSlots, 0, i18n( "protected" ), + TQString(), TQString() ); + itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, i18n( "public" ), + TQString(), TQString() ); + + TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); + TQValueList::Iterator it = --( functionList.end() ); + if ( !functionList.isEmpty() && itemFunct ) { + for (;;) { + TQListViewItem *item = 0; + if ( (*it).type == "slot" ) { + if ( (*it).access == "protected" ) + item = new HierarchyItem( HierarchyItem::Slot, itemProtected, 0, (*it).function, + TQString(), TQString() ); + else if ( (*it).access == "private" ) + item = new HierarchyItem( HierarchyItem::Slot, itemPrivate, 0, (*it).function, + TQString(), TQString() ); + else // default is public + item = new HierarchyItem( HierarchyItem::Slot, itemPublic, 0, (*it).function, + TQString(), TQString() ); + } else { + if ( (*it).access == "protected" ) + item = new HierarchyItem( HierarchyItem::Function, itemFunctProt, 0, (*it).function, + TQString(), TQString() ); + else if ( (*it).access == "private" ) + item = new HierarchyItem( HierarchyItem::Function, itemFunctPriv, 0, (*it).function, + TQString(), TQString() ); + else // default is public + item = new HierarchyItem( HierarchyItem::Function, itemFunctPubl, 0, (*it).function, + TQString(), TQString() ); + } + item->setPixmap( 0, DesignerEditSlotsPix ); + if ( it == functionList.begin() ) + break; + --it; + } + } + + itemFunct->setOpen( TRUE ); + itemFunctPubl->setOpen( fuPub ); + itemFunctProt->setOpen( fuProt ); + itemFunctPriv->setOpen( fuPriv ); + + itemSlots->setOpen( TRUE ); + itemPublic->setOpen( slPub ); + itemProtected->setOpen( slProt ); + itemPrivate->setOpen( slPriv ); +} + + +void FormDefinitionView::setCurrent( TQWidget * ) +{ +} + +void FormDefinitionView::objectClicked( TQListViewItem *i ) +{ + if ( !i ) + return; + if ( (i->rtti() == HierarchyItem::Slot) || (i->rtti() == HierarchyItem::Function) ) + { + formWindow->clearSelection(false); + formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); + } +// formWindow->mainWindow()->editFunction( i->text( 0 ) ); +} + +static HierarchyItem::Type getChildType( int type ) +{ + switch ( (HierarchyItem::Type)type ) { + case HierarchyItem::Widget: + tqWarning( "getChildType: Inserting childs dynamically to Widget or SlotParent is not allowed!" ); + break; + case HierarchyItem::SlotParent: + case HierarchyItem::SlotPublic: + case HierarchyItem::SlotProtected: + case HierarchyItem::SlotPrivate: + case HierarchyItem::Slot: + return HierarchyItem::Slot; + case HierarchyItem::DefinitionParent: + case HierarchyItem::Definition: + return HierarchyItem::Definition; + case HierarchyItem::Event: + case HierarchyItem::EventFunction: + return HierarchyItem::Event; + case HierarchyItem::FunctParent: + case HierarchyItem::FunctPublic: + case HierarchyItem::FunctProtected: + case HierarchyItem::FunctPrivate: + case HierarchyItem::Function: + return HierarchyItem::Function; + case HierarchyItem::VarParent: + case HierarchyItem::VarPublic: + case HierarchyItem::VarProtected: + case HierarchyItem::VarPrivate: + case HierarchyItem::Variable: + return HierarchyItem::Variable; + } + return (HierarchyItem::Type)type; +} + +void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const TQString &s ) +{ + TQListViewItem *after = i->firstChild(); + while ( after && after->nextSibling() ) + after = after->nextSibling(); + HierarchyItem *item = new HierarchyItem( getChildType( i->rtti() ), i, after, s, + TQString(), TQString() ); + if ( !pix.isNull() ) + item->setPixmap( 0, pix ); + item->setRenameEnabled( 0, TRUE ); + setCurrentItem( item ); + ensureItemVisible( item ); + tqApp->processEvents(); + newItem = item; + item->startRename( 0 ); +} + +void FormDefinitionView::contentsMouseDoubleClickEvent( TQMouseEvent *e ) +{ + TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) ); + if ( !i ) + return; + + if ( i->rtti() == HierarchyItem::SlotParent || i->rtti() == HierarchyItem::FunctParent || + i->rtti() == HierarchyItem::VarParent ) + return; + + HierarchyItem::Type t = getChildType( i->rtti() ); + if ( (int)t == i->rtti() ) + i = i->parent(); + + if ( formWindow->project()->isCpp() ) + switch( i->rtti() ) { + case HierarchyItem::FunctPublic: + execFunctionDialog( "public", "function", TRUE ); + break; + case HierarchyItem::FunctProtected: + execFunctionDialog( "protected", "function", TRUE ); + break; + case HierarchyItem::FunctPrivate: + execFunctionDialog( "private", "function", TRUE ); + break; + case HierarchyItem::SlotPublic: + execFunctionDialog( "public", "slot", TRUE ); + break; + case HierarchyItem::SlotProtected: + execFunctionDialog( "protected", "slot", TRUE ); + break; + case HierarchyItem::SlotPrivate: + execFunctionDialog( "private", "slot", TRUE ); + break; + case HierarchyItem::VarPublic: + case HierarchyItem::VarProtected: + case HierarchyItem::VarPrivate: { + VariableDialog varDia( formWindow, this ); + TQListViewItem *i = selectedItem(); + if ( i ) + varDia.setCurrentItem( i->text( 0 ) ); + varDia.exec(); + break; + } + default: + insertEntry( i ); + } else + insertEntry( i ); +} + +void FormDefinitionView::execFunctionDialog( const TQString &access, const TQString &type, bool addFunc ) +{ + FormFile *formFile = formWindow->formFile(); + if ( !formFile || !formFile->isUihFileUpToDate() ) + return; + + // refresh the functions list in the metadatabase + SourceEditor *editor = formFile->editor(); + if ( editor ) + editor->refresh( TRUE ); + + EditFunctions dlg( this, formWindow ); + if ( addFunc ) + dlg.functionAdd( access, type ); + dlg.exec(); +} + +void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) +{ + if ( !i ) + return; + + const int EDIT = 1; + const int NEW = 2; + const int DEL = 3; + const int PROPS = 4; + const int GOIMPL = 5; + + TQPopupMenu menu; + bool insertDelete = FALSE; + + if ( i->rtti() == HierarchyItem::FunctParent || i->rtti() == HierarchyItem::SlotParent || + i->rtti() == HierarchyItem::VarParent ) { + menu.insertItem( SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), i18n( "Edit..." ), EDIT ); + } else + menu.insertItem( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()), i18n( "New..." ), NEW ); + if ( i->rtti() == HierarchyItem::DefinitionParent || i->rtti() == HierarchyItem::Variable || + i->rtti() == HierarchyItem::Definition ) { + menu.insertItem( SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), i18n( "Edit..." ), EDIT ); + } + if ( i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot ) { + if ( formWindow->project()->isCpp() ) + menu.insertItem( SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), i18n( "Properties" ), PROPS ); + if ( MetaDataBase::hasEditor( formWindow->project()->language() ) ) + menu.insertItem( i18n( "Goto Implementation" ), GOIMPL ); + insertDelete = TRUE; + } + if ( insertDelete || i->rtti() == HierarchyItem::Variable || + i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot || + i->rtti() == HierarchyItem::Definition ) { + menu.insertSeparator(); + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), i18n( "Delete" ), DEL ); + } + popupOpen = TRUE; + int res = menu.exec( pos ); + popupOpen = FALSE; + if ( res == -1 ) + return; + + if ( res == EDIT ) { + switch( i->rtti() ) { + case HierarchyItem::FunctParent: + execFunctionDialog( "public", "function", FALSE ); + break; + case HierarchyItem::SlotParent: + execFunctionDialog( "public", "slot", FALSE ); + break; + case HierarchyItem::VarParent: + case HierarchyItem::VarPublic: + case HierarchyItem::VarProtected: + case HierarchyItem::VarPrivate: + case HierarchyItem::Variable: { + VariableDialog varDia( formWindow, this ); + TQListViewItem *i = selectedItem(); + if ( i ) + varDia.setCurrentItem( i->text( 0 ) ); + if ( varDia.exec() == TQDialog::Accepted ) + formWindow->commandHistory()->setModified( TRUE ); + break; + } + case HierarchyItem::Definition: + case HierarchyItem::DefinitionParent: + LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); + if ( !lIface ) + return; + if ( i->rtti() == HierarchyItem::Definition ) + i = i->parent(); + ListEditor dia( this, 0, TRUE ); + dia.setCaption( i18n( "Edit %1" ).arg( i->text( 0 ) ) ); + TQStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() ); + dia.setList( entries ); + dia.exec(); + Command *cmd = new EditDefinitionsCommand( i18n( "Edit %1" ).arg( i->text( 0 )), formWindow, + lIface, i->text( 0 ), dia.items() ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } else if ( res == NEW ) { + HierarchyItem::Type t = getChildType( i->rtti() ); + if ( (int)t == i->rtti() ) + i = i->parent(); + switch( i->rtti() ) { + case HierarchyItem::SlotPublic: + execFunctionDialog( "public", "slot", TRUE ); + break; + case HierarchyItem::SlotProtected: + execFunctionDialog( "protected", "slot", TRUE ); + break; + case HierarchyItem::SlotPrivate: + execFunctionDialog( "private" , "slot", TRUE ); + break; + case HierarchyItem::FunctPublic: + execFunctionDialog( "public", "function", TRUE ); + break; + case HierarchyItem::FunctProtected: + execFunctionDialog( "protected", "function", TRUE ); + break; + case HierarchyItem::FunctPrivate: + execFunctionDialog( "private" , "function", TRUE ); + break; + default: + insertEntry( i ); + } + } else if ( res == DEL ) { + if ( i->rtti() == HierarchyItem::Slot || i->rtti() == HierarchyItem::Function ) { + + TQCString funct( MetaDataBase::normalizeFunction( i->text( 0 ) ).latin1() ); + Command *cmd = new RemoveFunctionCommand( i18n( "Remove Function" ), formWindow, funct, + TQString(), TQString(), TQString(), + TQString(), formWindow->project()->language() ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + } else if ( i->rtti() == HierarchyItem::Variable ) { + Command *cmd = new RemoveVariableCommand( i18n( "Remove Variable" ), formWindow, + i->text( 0 ) ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else { + TQListViewItem *p = i->parent(); + delete i; + save( p, 0 ); + } + } else if ( res == PROPS ) { + if ( i->rtti() == HierarchyItem::Slot || + i->rtti() == HierarchyItem::Function ) { + EditFunctions dlg( this, formWindow ); + dlg.setCurrentFunction( MetaDataBase::normalizeFunction( i->text( 0 ) ) ); + dlg.exec(); + } + } else if ( res == GOIMPL ) { + if ( i->rtti() == HierarchyItem::Slot || + i->rtti() == HierarchyItem::Function ) { + formWindow->clearSelection(false); + formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); +// formWindow->mainWindow()->editFunction( i->text( 0 ) ); + } + } +} + +void FormDefinitionView::renamed( TQListViewItem *i ) +{ + if ( newItem == i ) + newItem = 0; + if ( !i->parent() ) + return; + save( i->parent(), i ); +} + + +void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i ) +{ + if ( i && i->text( 0 ).isEmpty() ) { + delete i; + return; + } + + if ( i && i->rtti() == HierarchyItem::Variable ) { + i->setRenameEnabled( 0, FALSE ); + TQString varName = i->text( 0 ); + varName = varName.simplifyWhiteSpace(); + if ( varName[(int)varName.length() - 1] != ';' ) + varName += ";"; + if ( MetaDataBase::hasVariable( TQT_TQOBJECT(formWindow), varName ) ) { + TQMessageBox::information( this, i18n( "Edit Variables" ), + i18n( "This variable has already been declared." ) ); + } else { + if ( p->rtti() == HierarchyItem::VarPublic ) + addVariable( varName, "public" ); + else if ( p->rtti() == HierarchyItem::VarProtected ) + addVariable( varName, "protected" ); + else if ( p->rtti() == HierarchyItem::VarPrivate ) + addVariable( varName, "private" ); + } + } else { + LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); + if ( !lIface ) + return; + TQStringList lst; + i = p->firstChild(); + while ( i ) { + lst << i->text( 0 ); + i = i->nextSibling(); + } + Command *cmd = new EditDefinitionsCommand( i18n( "Edit %1" ).arg( p->text( 0 ) ), formWindow, + lIface, p->text( 0 ), lst ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } +} + +void FormDefinitionView::addVariable( const TQString &varName, const TQString &access ) +{ + Command *cmd = new AddVariableCommand( i18n( "Add Variable" ), formWindow, + varName, access ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +// ------------------------------------------------------------ + +HierarchyView::HierarchyView( TQWidget *parent ) + : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | + WStyle_Tool |WStyle_MinMax | WStyle_SysMenu ) +{ + formwindow = 0; + editor = 0; + listview = new HierarchyList( this, formWindow() ); + fView = new FormDefinitionView( this, formWindow() ); + if ( !MainWindow::self->singleProjectMode() ) { + addTab( listview, i18n( "Objects" ) ); + setTabToolTip( listview, i18n( "List of all widgets and objects of the current form in hierarchical order" ) ); + addTab( fView, i18n( "Members" ) ); + setTabToolTip( fView, i18n( "List of all members of the current form" ) ); + } else { + listview->hide(); + fView->hide(); + } + + if ( !classBrowserInterfaceManager ) { + classBrowserInterfaceManager = + new TQPluginManager( IID_ClassBrowser, TQApplication::libraryPaths(), + MainWindow::self->pluginDirectory() ); + } + + classBrowsers = new TQMap(); + TQStringList langs = MetaDataBase::languages(); + for ( TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it ) { + TQInterfacePtr ciface = 0; + classBrowserInterfaceManager->queryInterface( *it, &ciface ); + if ( ciface ) { + ClassBrowser cb( ciface->createClassBrowser( this ), ciface ); + addTab( cb.lv, i18n( "Class Declarations" ) ); + setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) ); + ciface->onClick( TQT_TQOBJECT(this), TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) ); + classBrowsers->insert( *it, cb ); + setTabEnabled( cb.lv, FALSE ); + } + } +} + +HierarchyView::~HierarchyView() +{ +} + +void HierarchyView::clear() +{ + listview->clear(); + fView->clear(); + for ( TQMap::Iterator it = classBrowsers->begin(); + it != classBrowsers->end(); ++it ) { + (*it).iface->clear(); + } +} + +void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o ) +{ + bool fake = fw && qstrcmp( fw->name(), "qt_fakewindow" ) == 0; + if ( fw == 0 || o == 0 ) { + listview->clear(); + fView->clear(); + listview->setFormWindow( fw ); + fView->setFormWindow( fw ); + formwindow = 0; + editor = 0; + } + + setTabEnabled( listview, TRUE ); + setTabEnabled( fView, fw && fw->project()->isCpp() ); + + if ( fw == formwindow ) { + if ( fw ) { + if ( !fake ) + listview->setCurrent( TQT_TQOBJECT(o) ); + else + listview->clear(); + if ( MainWindow::self->qWorkspace()->activeWindow() == fw ) + showPage( listview ); + else if ( fw->project()->isCpp() ) + showPage( fView ); + else + showClasses( fw->formFile()->editor() ); + } + } + + formwindow = fw; + if ( !fake ) { + listview->setFormWindow( fw ); + } else { + listview->setFormWindow( 0 ); + listview->clear(); + } + + fView->setFormWindow( fw ); + if ( !fake ) { + listview->setup(); + listview->setCurrent( TQT_TQOBJECT(o) ); + } + fView->setup(); + + for ( TQMap::Iterator it = classBrowsers->begin(); + it != classBrowsers->end(); ++it ) { + (*it).iface->clear(); + setTabEnabled( (*it).lv, fw && !fw->project()->isCpp() ); + } + + if ( MainWindow::self->qWorkspace()->activeWindow() == fw ) + showPage( listview ); + else if ( fw && fw->project()->isCpp() ) + showPage( fView ); + else if ( fw ) + showClasses( fw->formFile()->editor() ); + + editor = 0; +} + +void HierarchyView::showClasses( SourceEditor *se ) +{ + if ( !se->object() ) + return; + + lastSourceEditor = se; + TQTimer::singleShot( 100, this, TQT_SLOT( showClassesTimeout() ) ); +} + +void HierarchyView::showClassesTimeout() +{ + if ( !lastSourceEditor ) + return; + SourceEditor *se = (SourceEditor*)lastSourceEditor; + if ( !se->object() ) + return; + if ( se->formWindow() && se->formWindow()->project()->isCpp() ) { + setFormWindow( se->formWindow(), TQT_TQOBJECT(se->formWindow()->currentWidget()) ); + MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(se->formWindow()->currentWidget()), + se->formWindow() ); + return; + } + + setTabEnabled( listview, !!se->formWindow() && !se->formWindow()->isFake() ); + setTabEnabled( fView, FALSE ); + + formwindow = 0; + listview->setFormWindow( 0 ); + fView->setFormWindow( 0 ); + listview->clear(); + fView->clear(); + if ( !se->formWindow() ) + MainWindow::self->propertyeditor()->setWidget( 0, 0 ); + editor = se; + + for ( TQMap::Iterator it = classBrowsers->begin(); + it != classBrowsers->end(); ++it ) { + if ( it.key() == se->project()->language() ) { + (*it).iface->update( se->text() ); + setTabEnabled( (*it).lv, TRUE ); + showPage( (*it).lv ); + } else { + setTabEnabled( (*it).lv, FALSE ); + (*it).iface->clear(); + } + } +} + +void HierarchyView::updateClassBrowsers() +{ + if ( !editor ) + return; + for ( TQMap::Iterator it = classBrowsers->begin(); + it != classBrowsers->end(); ++it ) { + if ( it.key() == editor->project()->language() ) + (*it).iface->update( editor->text() ); + else + (*it).iface->clear(); + } +} + +FormWindow *HierarchyView::formWindow() const +{ + return formwindow; +} + +void HierarchyView::closeEvent( TQCloseEvent *e ) +{ + emit hidden(); + e->accept(); +} + +void HierarchyView::widgetInserted( TQWidget * ) +{ + listview->setup(); +} + +void HierarchyView::widgetRemoved( TQWidget * ) +{ + listview->setup(); +} + +void HierarchyView::widgetsInserted( const TQWidgetList & ) +{ + listview->setup(); +} + +void HierarchyView::widgetsRemoved( const TQWidgetList & ) +{ + listview->setup(); +} + +void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & ) +{ + TQWidget *w2 = w; + if ( ::tqqt_cast(w) ) + w2 = ( (TQMainWindow*)w )->centralWidget(); + listview->changeNameOf( TQT_TQOBJECT(w2), w->name() ); +} + + +void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& info ) +{ +#ifndef TQT_NO_SQL + TQString i = info.join( "." ); + listview->changeDatabaseOf( TQT_TQOBJECT(w), i ); +#endif +} + + +void HierarchyView::tabsChanged( TQTabWidget * ) +{ + listview->setup(); +} + +void HierarchyView::pagesChanged( TQWizard * ) +{ + listview->setup(); +} + +void HierarchyView::rebuild() +{ + listview->setup(); +} + +void HierarchyView::closed( FormWindow *fw ) +{ + if ( fw == formwindow ) { + listview->clear(); + fView->clear(); + } +} + +void HierarchyView::updateFormDefinitionView() +{ + fView->setup(); +} + +void HierarchyView::jumpTo( const TQString &func, const TQString &clss, int type ) +{ + if ( !editor ) + return; + if ( type == ClassBrowserInterface::Class ) + editor->setClass( func ); + else + editor->setFunction( func, clss ); +} + +HierarchyView::ClassBrowser::ClassBrowser( TQListView *l, ClassBrowserInterface *i ) + : lv( l ), iface( i ) +{ +} + +HierarchyView::ClassBrowser::~ClassBrowser() +{ +} diff --git a/kdevdesigner/designer/hierarchyview.h b/kdevdesigner/designer/hierarchyview.h new file mode 100644 index 00000000..cb21ed50 --- /dev/null +++ b/kdevdesigner/designer/hierarchyview.h @@ -0,0 +1,252 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef HIRARCHYVIEW_H +#define HIRARCHYVIEW_H + +#include +#include +#include +#include +#include +#include "../interfaces/classbrowserinterface.h" + +class FormWindow; +class TQCloseEvent; +class TQPopupMenu; +class TQKeyEvent; +class TQMouseEvent; +class TQWizard; +class SourceEditor; + +class HierarchyItem : public TQListViewItem +{ +public: + enum Type { + Widget, + SlotParent, + SlotPublic, + SlotProtected, + SlotPrivate, + Slot, + DefinitionParent, + Definition, + Event, + EventFunction, + FunctParent, + FunctPublic, + FunctProtected, + FunctPrivate, + Function, + VarParent, + VarPublic, + VarProtected, + VarPrivate, + Variable + }; + + HierarchyItem( Type type, TQListViewItem *parent, TQListViewItem *after, + const TQString &txt1, const TQString &txt2, const TQString &txt3 ); + HierarchyItem( Type type, TQListView *parent, TQListViewItem *after, + const TQString &txt1, const TQString &txt2, const TQString &txt3 ); + + void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); + void updateBackColor(); + + void setObject( TQObject *o ); + TQObject *object() const; + + void setText( int col, const TQString &txt ) { if ( !txt.isEmpty() ) TQListViewItem::setText( col, txt ); } + + int rtti() const { return (int)typ; } + +private: + void okRename( int col ); + void cancelRename( int col ); + +private: + TQColor backgroundColor(); + TQColor backColor; + TQObject *obj; + Type typ; + +}; + +class HierarchyList : public TQListView +{ + Q_OBJECT + + +public: + HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects = TRUE ); + + virtual void setup(); + virtual void setCurrent( TQObject *o ); + void setOpen( TQListViewItem *i, bool b ); + void changeNameOf( TQObject *o, const TQString &name ); + void changeDatabaseOf( TQObject *o, const TQString &info ); + void setFormWindow( FormWindow *fw ) { formWindow = fw; } + void drawContentsOffset( TQPainter *p, int ox, int oy, + int cx, int cy, int cw, int ch ) { + setUpdatesEnabled( FALSE ); + triggerUpdate(); + setUpdatesEnabled( TRUE ); + TQListView::drawContentsOffset( p, ox, oy, cx, cy, cw, ch ); + } + + void insertEntry( TQListViewItem *i, const TQPixmap &pix = TQPixmap(), const TQString &s = TQString() ); + +protected: + void keyPressEvent( TQKeyEvent *e ); + void keyReleaseEvent( TQKeyEvent *e ); + void viewportMousePressEvent( TQMouseEvent *e ); + void viewportMouseReleaseEvent( TQMouseEvent *e ); + +public slots: + void addTabPage(); + void removeTabPage(); + +private: + void insertObject( TQObject *o, TQListViewItem *parent ); + TQObject *findObject( TQListViewItem *i ); + TQListViewItem *findItem( TQObject *o ); + TQObject *current() const; + TQObject *handleObjectClick( TQListViewItem *i ); + +private slots: + virtual void objectClicked( TQListViewItem *i ); + virtual void objectDoubleClicked( TQListViewItem *i ); + virtual void showRMBMenu( TQListViewItem *, const TQPoint & ); + +protected: + FormWindow *formWindow; + TQPopupMenu *normalMenu, *tabWidgetMenu; + bool deselect; + + TQPixmap DesignerFormPix; + TQPixmap DesignerLayoutPix; + TQPixmap DesignerFolderPix; + TQPixmap DesignerEditSlotsPix; + +}; + +class FormDefinitionView : public HierarchyList +{ + Q_OBJECT + + +public: + FormDefinitionView( TQWidget *parent, FormWindow *fw ); + + void setup(); + void setupVariables(); + void refresh(); + void setCurrent( TQWidget *w ); + +protected: + void contentsMouseDoubleClickEvent( TQMouseEvent *e ); + +private: + void save( TQListViewItem *p, TQListViewItem *i ); + void execFunctionDialog( const TQString &access, const TQString &type, bool addFunc ); + void addVariable( const TQString &varName, const TQString &access ); + +private slots: + void objectClicked( TQListViewItem *i ); + void showRMBMenu( TQListViewItem *, const TQPoint & ); + void renamed( TQListViewItem *i ); + +private: + bool popupOpen; + HierarchyItem *itemSlots, *itemPrivate, *itemProtected, *itemPublic; + HierarchyItem *itemFunct, *itemFunctPriv, *itemFunctProt, *itemFunctPubl; + HierarchyItem *itemVar, *itemVarPriv, *itemVarProt, *itemVarPubl; +}; + + +class HierarchyView : public TQTabWidget +{ + Q_OBJECT + + +public: + HierarchyView( TQWidget *parent ); + ~HierarchyView(); + + void setFormWindow( FormWindow *fw, TQObject *o ); + FormWindow *formWindow() const; + SourceEditor *sourceEditor() const { return editor; } + void clear(); + + void showClasses( SourceEditor *se ); + void updateClassBrowsers(); + + void widgetInserted( TQWidget *w ); + void widgetRemoved( TQWidget *w ); + void widgetsInserted( const TQWidgetList &l ); + void widgetsRemoved( const TQWidgetList &l ); + void namePropertyChanged( TQWidget *w, const TQVariant &old ); + void databasePropertyChanged( TQWidget *w, const TQStringList& info ); + void tabsChanged( TQTabWidget *w ); + void pagesChanged( TQWizard *w ); + void rebuild(); + void closed( FormWindow *fw ); + void updateFormDefinitionView(); + + FormDefinitionView *formDefinitionView() const { return fView; } + HierarchyList *hierarchyList() const { return listview; } + +protected slots: + void jumpTo( const TQString &func, const TQString &clss,int type ); + void showClassesTimeout(); + +protected: + void closeEvent( TQCloseEvent *e ); + +signals: + void hidden(); + +private: + struct ClassBrowser + { + ClassBrowser( TQListView * = 0, ClassBrowserInterface * = 0 ); + ~ClassBrowser(); + TQListView *lv; + TQInterfacePtr iface; + + TQ_DUMMY_COMPARISON_OPERATOR( ClassBrowser ) + }; + FormWindow *formwindow; + HierarchyList *listview; + FormDefinitionView *fView; + SourceEditor *editor; + TQMap *classBrowsers; + TQGuardedPtr lastSourceEditor; + +}; + + +#endif diff --git a/kdevdesigner/designer/iconvieweditor.ui b/kdevdesigner/designer/iconvieweditor.ui new file mode 100644 index 00000000..8711bd6b --- /dev/null +++ b/kdevdesigner/designer/iconvieweditor.ui @@ -0,0 +1,461 @@ + +IconViewEditorBase +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + IconViewEditorBase + + + + 0 + 0 + 567 + 321 + + + + Edit Iconview + + + true + + + <b>Edit Iconview</b><p>Add, edit or delete items in the icon view.</p><p>Click the <b>New Item</b>-button to create a new item, then enter text and choose a pixmap.</p><p>Select an item from the view and click the <b>Delete Item</b>-button to remove the item from the iconview.</p> + + + + unnamed + + + 11 + + + 6 + + + + Layout6 + + + + unnamed + + + 0 + + + 6 + + + + preview + + + All items in the iconview. + + + + + Layout5 + + + + unnamed + + + 0 + + + 6 + + + + itemNew + + + &New Item + + + Add an item + + + Create a new item for the iconview. + + + + + itemDelete + + + &Delete Item + + + Delete item + + + Delete the selected item. + + + + + Vertical Spacing1 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + + + GroupBox1 + + + + 0 + 5 + 0 + 0 + + + + &Item Properties + + + + unnamed + + + 11 + + + 6 + + + + Label1 + + + &Text: + + + itemText + + + + + itemText + + + + 0 + 0 + + + + Change text + + + Change the text for the selected item. + + + + + Label2 + + + &Pixmap: + + + itemChoosePixmap + + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + itemPixmap + + + Label4 + + + + + itemDeletePixmap + + + + 30 + 22 + + + + + + + "designer_s_editcut.png" + + + Delete Pixmap + + + Delete the selected item's pixmap. + + + + + itemChoosePixmap + + + + 30 + 22 + + + + ... + + + Select a Pixmap + + + Select a pixmap file for the current item. + + + + + + + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + buttonHelp + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + true + + + true + + + Close the dialog and apply all the changes. + + + + + buttonApply + + + &Apply + + + true + + + Apply all changes. + + + + + buttonCancel + + + &Cancel + + + true + + + Close the dialog and discard any changes. + + + + + + + + + itemNew + clicked() + IconViewEditorBase + insertNewItem() + + + itemDelete + clicked() + IconViewEditorBase + deleteCurrentItem() + + + itemText + textChanged( const TQString & ) + IconViewEditorBase + currentTextChanged(const TQString&) + + + buttonOk + clicked() + IconViewEditorBase + okClicked() + + + buttonApply + clicked() + IconViewEditorBase + applyClicked() + + + buttonCancel + clicked() + IconViewEditorBase + cancelClicked() + + + itemChoosePixmap + clicked() + IconViewEditorBase + choosePixmap() + + + preview + selectionChanged(TQIconViewItem*) + IconViewEditorBase + currentItemChanged(TQIconViewItem*) + + + preview + currentChanged(TQIconViewItem*) + IconViewEditorBase + currentItemChanged(TQIconViewItem*) + + + itemDeletePixmap + clicked() + IconViewEditorBase + deletePixmap() + + + + buttonOk + buttonCancel + preview + itemNew + itemDelete + itemText + itemDeletePixmap + itemChoosePixmap + buttonHelp + buttonApply + + + init() + destroy() + applyClicked() + cancelClicked() + choosePixmap() + currentItemChanged( TQIconViewItem * ) + currentTextChanged( const TQString & ) + deleteCurrentItem() + insertNewItem() + deletePixmap() + okClicked() + + + myiconloader.h + +BarIcon2 + + + diff --git a/kdevdesigner/designer/iconvieweditorimpl.cpp b/kdevdesigner/designer/iconvieweditorimpl.cpp new file mode 100644 index 00000000..32a81412 --- /dev/null +++ b/kdevdesigner/designer/iconvieweditorimpl.cpp @@ -0,0 +1,165 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "iconvieweditorimpl.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "pixmapchooser.h" + +#include +#include +#include +#include +#include + +#include + +IconViewEditor::IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) + : IconViewEditorBase( parent, 0, TRUE ), formwindow( fw ) +{ + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + iconview = (TQIconView*)editWidget; + + itemText->setText( "" ); + itemText->setEnabled( FALSE ); + itemPixmap->setText( "" ); + itemChoosePixmap->setEnabled( FALSE ); + itemDeletePixmap->setEnabled( FALSE ); + + TQIconViewItem *i = 0; + for ( i = iconview->firstItem(); i; i = i->nextItem() ) { + (void)new TQIconViewItem( preview, i->text(), *i->pixmap() ); + } + + if ( preview->firstItem() ) + preview->setCurrentItem( preview->firstItem() ); +} + +void IconViewEditor::insertNewItem() +{ + TQIconViewItem *i = new TQIconViewItem( preview, i18n( "New Item" ) ); + preview->setCurrentItem( i ); + preview->setSelected( i, TRUE ); + itemText->setFocus(); + itemText->selectAll(); +} + +void IconViewEditor::deleteCurrentItem() +{ + delete preview->currentItem(); + if ( preview->currentItem() ) + preview->setSelected( preview->currentItem(), TRUE ); +} + +void IconViewEditor::currentItemChanged( TQIconViewItem *i ) +{ + itemText->blockSignals( TRUE ); + itemText->setText( "" ); + itemPixmap->setText( "" ); + itemText->blockSignals( FALSE ); + + if ( !i ) { + itemText->setEnabled( FALSE ); + itemChoosePixmap->setEnabled( FALSE ); + return; + } + + itemText->blockSignals( TRUE ); + itemText->setEnabled( TRUE ); + itemChoosePixmap->setEnabled( TRUE ); + itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() ); + + itemText->setText( i->text() ); + if ( i->pixmap() ) + itemPixmap->setPixmap( *i->pixmap() ); + itemText->blockSignals( FALSE ); +} + +void IconViewEditor::currentTextChanged( const TQString &txt ) +{ + if ( !preview->currentItem() ) + return; + + preview->currentItem()->setText( txt ); +} + +void IconViewEditor::okClicked() +{ + applyClicked(); + accept(); +} + +void IconViewEditor::cancelClicked() +{ + reject(); +} + +void IconViewEditor::applyClicked() +{ + TQIconViewItem *i = 0; + TQValueList items; + for ( i = preview->firstItem(); i; i = i->nextItem() ) { + PopulateIconViewCommand::Item item; + if ( i->pixmap() ) + item.pix = *i->pixmap(); + item.text = i->text(); + items.append( item ); + } + + PopulateIconViewCommand *cmd = new PopulateIconViewCommand( i18n( "Edit the Items of '%1'" ).arg( iconview->name() ), + formwindow, iconview, items ); + cmd->execute(); + formwindow->commandHistory()->addCommand( cmd ); +} + +void IconViewEditor::choosePixmap() +{ + if ( !preview->currentItem() ) + return; + + TQPixmap pix; + if ( preview->currentItem()->pixmap() ) + pix = qChoosePixmap( this, formwindow, *preview->currentItem()->pixmap() ); + else + pix = qChoosePixmap( this, formwindow, TQPixmap() ); + + if ( pix.isNull() ) + return; + + preview->currentItem()->setPixmap( pix ); + itemPixmap->setPixmap( pix ); + itemDeletePixmap->setEnabled( TRUE ); +} + +void IconViewEditor::deletePixmap() +{ + if ( !preview->currentItem() ) + return; + + preview->currentItem()->setPixmap( TQPixmap() ); + itemPixmap->setText( "" ); + itemDeletePixmap->setEnabled( FALSE ); +} diff --git a/kdevdesigner/designer/iconvieweditorimpl.h b/kdevdesigner/designer/iconvieweditorimpl.h new file mode 100644 index 00000000..969c9cf4 --- /dev/null +++ b/kdevdesigner/designer/iconvieweditorimpl.h @@ -0,0 +1,59 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef ICONVIEWEDITORIMPL_H +#define ICONVIEWEDITORIMPL_H + +#include "iconvieweditor.h" + +class FormWindow; + +class IconViewEditor : public IconViewEditorBase +{ + Q_OBJECT + + +public: + IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ); + +protected slots: + void insertNewItem(); + void deleteCurrentItem(); + void currentItemChanged( TQIconViewItem * ); + void currentTextChanged( const TQString & ); + void okClicked(); + void cancelClicked(); + void applyClicked(); + void choosePixmap(); + void deletePixmap(); + +private: + TQIconView *iconview; + FormWindow *formwindow; + +}; + +#endif diff --git a/kdevdesigner/designer/kdevdesigner_part.cpp b/kdevdesigner/designer/kdevdesigner_part.cpp new file mode 100644 index 00000000..ac966d00 --- /dev/null +++ b/kdevdesigner/designer/kdevdesigner_part.cpp @@ -0,0 +1,565 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program 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 program 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 "kdevdesigner_part.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "mainwindow.h" +#include "designeraction.h" +#include "formwindow.h" + +KDevDesignerPart::KDevDesignerPart( TQWidget *parentWidget, const char *// widgetName + , + TQObject *parent, const char *name, const TQStringList &args ) + : KInterfaceDesigner::Designer(parent, name) +{ + setInstance( KDevDesignerPartFactory::instance() ); + + m_widget = new MainWindow( this, true ); + m_widget->reparent(parentWidget, TQPoint(0,0)); + setupDesignerWindow(); + + setWidget(m_widget); + + setupActions(); + if (args.contains("in shell")) + setXMLFile("kdevdesigner_part_sh.rc"); + else + setXMLFile("kdevdesigner_part.rc"); + + setReadWrite(true); + setModified(false); + + connect(m_widget, TQT_SIGNAL(formModified(bool )), this, TQT_SLOT(formModified(bool))); +} + +void KDevDesignerPart::setupDesignerWindow() +{ + m_widget->menuBar()->hide(); + m_widget->layoutToolBar->hide(); + m_widget->projectToolBar->hide(); + m_widget->toolsToolBar->hide(); + m_widget->statusBar()->hide(); +} + +static TQIconSet createPartIconSet( const TQString &name ) +{ + TQIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) ); + TQString prefix = "designer_"; + int right = name.length() - prefix.length(); + ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), KDevDesignerPartFactory::instance() ), + TQIconSet::Small, TQIconSet::Disabled ); + return ic; +} + +void KDevDesignerPart::setupActions( ) +{ + TDEAction *action; + action = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); + action = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); + action = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection()); + stateSync(action, m_widget->actionFileClose); + action = KStdAction::save(this, TQT_SLOT(save()), actionCollection()); + stateSync(action, m_widget->actionFileSave); + action = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); + stateSync(action, m_widget->actionFileSaveAs); + action = new TDEAction(i18n("Save Al&l"), 0, this, TQT_SLOT(fileSaveAs()), actionCollection(), "file_saveall"); + stateSync(action, m_widget->actionFileSaveAll); + new TDEAction(i18n("Create &Template..."), 0, this, TQT_SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate"); + + action = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection()); + stateSync(action, m_widget->actionEditUndo); + action = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection()); + stateSync(action, m_widget->actionEditRedo); + action = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection()); + stateSync(action, m_widget->actionEditCut); + action = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection()); + stateSync(action, m_widget->actionEditCopy); + action = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection()); + stateSync(action, m_widget->actionEditPaste); + action = new TDEAction(i18n("&Delete"), Key_Delete, this, TQT_SLOT(editDelete()), actionCollection(), "edit_delete"); + stateSync(action, m_widget->actionEditDelete); + action = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection()); + stateSync(action, m_widget->actionEditSelectAll); + action = new TDEAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()), actionCollection(), "edit_accels"); + stateSync(action, m_widget->actionEditAccels); + action = new TDEAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, TQT_SLOT(editFunctions()), actionCollection(), "edit_functions"); + stateSync(action, m_widget->actionEditFunctions); + action = new TDEAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, TQT_SLOT(editConnections()), actionCollection(), "edit_connections"); + stateSync(action, m_widget->actionEditConnections); + action = new TDEAction(i18n("&Form Settings..."), 0, this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_formsettings"); + stateSync(action, m_widget->actionEditFormSettings); + + action = new TDEAction(i18n("&Add File..."), 0, this, TQT_SLOT(projectAddFile()), actionCollection(), "project_addfile"); + stateSync(action, m_widget->actionProjectAddFile); + action = new TDEAction(i18n("&Image Collection..."), 0, this, TQT_SLOT(projectImageCollection()), actionCollection(), "project_imagecollection"); + stateSync(action, m_widget->actionEditPixmapCollection); + action = new TDEAction(i18n("&Database Connections..."), 0, this, TQT_SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections"); + stateSync(action, m_widget->actionEditDatabaseConnections); + action = new TDEAction(i18n("&Designer Project Settings..."), 0, this, TQT_SLOT(projectSettings()), actionCollection(), "project_settings"); + stateSync(action, m_widget->actionEditProjectSettings); + + TDERadioAction *toggle; + toggle = new TDERadioAction(i18n("&Pointer"), createPartIconSet("designer_pointer.png"), Key_F2, actionCollection(), "tools_pointer"); + setupToolsAction(toggle, m_widget->actionPointerTool); + pointerAction = toggle; + toggle = new TDERadioAction(i18n("&Connect Signal/Slots"), createPartIconSet("designer_connecttool.png"), Key_F3, actionCollection(), "tools_connect"); + setupToolsAction(toggle, m_widget->actionConnectTool); + toggle = new TDERadioAction(i18n("Tab &Order"), createPartIconSet("designer_ordertool.png"), Key_F4, actionCollection(), "tools_taborder"); + setupToolsAction(toggle, m_widget->actionOrderTool); + toggle = new TDERadioAction(i18n("Set &Buddy"), createPartIconSet("designer_setbuddy.png"), Key_F12, actionCollection(), "tools_setbuddy"); + setupToolsAction(toggle, m_widget->actionBuddyTool); + new TDEAction(i18n("Configure Toolbox..."), 0, this, TQT_SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox"); + new TDEAction(i18n("Edit &Custom Widgets..."), 0, this, TQT_SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets"); + + action = new TDEAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQT_SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize"); + stateSync(action, m_widget->actionEditAdjustSize); + action = new TDEAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, TQT_SLOT(layoutHLayout()), actionCollection(), "layout_h"); + stateSync(action, m_widget->actionEditHLayout); + action = new TDEAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, TQT_SLOT(layoutVLayout()), actionCollection(), "layout_v"); + stateSync(action, m_widget->actionEditVLayout); + action = new TDEAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQT_SLOT(layoutGridLayout()), actionCollection(), "layout_grid"); + stateSync(action, m_widget->actionEditGridLayout); + action = new TDEAction(i18n("Lay OutQt::Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith"); + stateSync(action, m_widget->actionEditSplitHorizontal); + action = new TDEAction(i18n("Lay OutQt::Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv"); + stateSync(action, m_widget->actionEditSplitVertical); + action = new TDEAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQT_SLOT(layoutBreak()), actionCollection(), "layout_break"); + stateSync(action, m_widget->actionEditBreakLayout); + toggle = new TDERadioAction(i18n("Add Spacer"), createPartIconSet("designer_spacer.png"), 0, actionCollection(), "layout_spacer"); + setupToolsAction(toggle, m_widget->actionInsertSpacer); + + action = new TDEAction(i18n("Preview &Form"), CTRL + Key_T, this, TQT_SLOT(windowPreview()), actionCollection(), "window_preview"); + stateSync(action, m_widget->actionPreview); + action = new TDEAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, TQT_SLOT(windowNext()), actionCollection(), "window_next"); + stateSync(action, m_widget->actionWindowNext); + action = new TDEAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, TQT_SLOT(windowPrev()), actionCollection(), "window_prev"); + stateSync(action, m_widget->actionWindowPrevious); + + action = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection()); + action->setText(i18n("Configure &KDevDesigner...")); + stateSync(action, m_widget->actionEditPreferences); +} + +KDevDesignerPart::~KDevDesignerPart() +{ +} + +void KDevDesignerPart::setReadWrite(bool rw) +{ + ReadWritePart::setReadWrite(rw); +} + +void KDevDesignerPart::setModified(bool modified) +{ +/* TDEAction *save = actionCollection()->action(KStdAction::stdName(KStdAction::Save)); + if (!save) + return; + if (modified) + save->setEnabled(true); + else + save->setEnabled(false);*/ + + ReadWritePart::setModified(modified); +} + +bool KDevDesignerPart::openFile() +{ + m_widget->fileOpen("", "", m_file); + return true; +} + +bool KDevDesignerPart::saveFile() +{ + if (isReadWrite() == false) + return false; + m_widget->actionFileSaveAll->activate(); + return true; +} + +void KDevDesignerPart::stateSync( TDEAction * tdeaction, TQAction * qaction ) +{ + if (!qaction) + return; + tdeaction->setEnabled(qaction->isEnabled()); + DesignerAction *ac = dynamic_cast(qaction); + if (!ac) + return; + connect(ac, TQT_SIGNAL(actionEnabled(bool )), tdeaction, TQT_SLOT(setEnabled(bool ))); +} + +void KDevDesignerPart::setupToolsAction( TDERadioAction * toggle, TQAction * action ) +{ + if (!action) + return; + + toggle->setGroup("tools"); + toggle->setExclusiveGroup("tools"); + connect(action, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); + connect(toggle, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setToggleActionOn(bool))); + toggle->setChecked(action->isOn()); + m_actionMap[action] = toggle; + m_actionMap2[toggle] = action; +} + + +// It's usually safe to leave the factory code alone.. with the +// notable exception of the TDEAboutData data +#include +#include + +TDEInstance* KDevDesignerPartFactory::s_instance = 0L; +TDEAboutData* KDevDesignerPartFactory::s_about = 0L; + +KDevDesignerPartFactory::KDevDesignerPartFactory() + : KParts::Factory() +{ +} + +KDevDesignerPartFactory::~KDevDesignerPartFactory() +{ + delete s_instance; + delete s_about; + + s_instance = 0L; +} + +KParts::Part* KDevDesignerPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const char *classname, const TQStringList &args ) +{ + // Create an instance of our Part + KDevDesignerPart* obj = new KDevDesignerPart( parentWidget, widgetName, parent, name, args ); + + // See if we are to be read-write or not + if (TQCString(classname) == "KParts::ReadOnlyPart") + obj->setReadWrite(false); + + return obj; +} + +TDEInstance* KDevDesignerPartFactory::instance() +{ + if( !s_instance ) + { + s_about = new TDEAboutData("kdevdesignerpart", I18N_NOOP("KDevDesignerPart"), "0.1"); + s_about->addAuthor("Alexander Dymo", 0, "cloudtemple@mksat.net"); + s_about->addAuthor("Trolltech AS", 0, "info@trolltech.com"); + s_instance = new TDEInstance(s_about); + } + return s_instance; +} + +extern "C" +{ + void* init_libkdevdesignerpart() + { + return new KDevDesignerPartFactory; + } +} + +//actions + +void KDevDesignerPart::fileNew( ) +{ + if (!m_widget->actionNewFile) + { + tqWarning("wrong m_widget->actionNewFile"); + return; + } + m_widget->actionNewFile->activate(); +} + +void KDevDesignerPart::fileOpen() +{ + m_widget->fileOpen(); +} + +void KDevDesignerPart::fileSaveAs() +{ + m_widget->actionFileSaveAs->activate(); +} + +void KDevDesignerPart::fileClose( ) +{ + m_widget->actionFileClose->activate(); +} + +void KDevDesignerPart::fileCreateTemplate( ) +{ + m_widget->fileCreateTemplate(); +} + +void KDevDesignerPart::editUndo( ) +{ + m_widget->actionEditUndo->activate(); +} + +void KDevDesignerPart::editRedo( ) +{ + m_widget->actionEditRedo->activate(); +} + +void KDevDesignerPart::editCut( ) +{ + m_widget->actionEditCut->activate(); +} + +void KDevDesignerPart::editPaste( ) +{ + m_widget->actionEditPaste->activate(); +} + +void KDevDesignerPart::editCopy( ) +{ + m_widget->actionEditCopy->activate(); +} + +void KDevDesignerPart::editDelete( ) +{ + m_widget->actionEditDelete->activate(); +} + +void KDevDesignerPart::editSelectAll( ) +{ + m_widget->actionEditSelectAll->activate(); +} + +void KDevDesignerPart::editAccels( ) +{ + m_widget->actionEditAccels->activate(); +} + +void KDevDesignerPart::editFunctions( ) +{ + m_widget->actionEditFunctions->activate(); +} + +void KDevDesignerPart::editConnections( ) +{ + m_widget->actionEditConnections->activate(); +} + +void KDevDesignerPart::editFormSettings( ) +{ + m_widget->actionEditFormSettings->activate(); +} + +void KDevDesignerPart::editPreferences( ) +{ + m_widget->actionEditPreferences->activate(); +} + +void KDevDesignerPart::projectAddFile( ) +{ + m_widget->actionProjectAddFile->activate(); +} + +void KDevDesignerPart::projectImageCollection( ) +{ + m_widget->actionEditPixmapCollection->activate(); +} + +void KDevDesignerPart::projectDatabaseCollections( ) +{ + m_widget->actionEditDatabaseConnections->activate(); +} + +void KDevDesignerPart::projectSettings( ) +{ + m_widget->actionEditProjectSettings->activate(); +} + +void KDevDesignerPart::toolsConfigureToolbox( ) +{ + m_widget->toolsConfigure(); +} + +void KDevDesignerPart::layoutAdjustSize( ) +{ + m_widget->actionEditAdjustSize->activate(); +} + +void KDevDesignerPart::layoutHLayout( ) +{ + m_widget->actionEditHLayout->activate(); +} + +void KDevDesignerPart::layoutVLayout( ) +{ + m_widget->actionEditVLayout->activate(); +} + +void KDevDesignerPart::layoutGridLayout( ) +{ + m_widget->actionEditGridLayout->activate(); +} + +void KDevDesignerPart::layoutSplitHLayout( ) +{ + m_widget->actionEditSplitHorizontal->activate(); +} + +void KDevDesignerPart::layoutSplitVLayout( ) +{ + m_widget->actionEditSplitVertical->activate(); +} + +void KDevDesignerPart::layoutBreak( ) +{ + m_widget->actionEditBreakLayout->activate(); +} + +void KDevDesignerPart::windowPreview( ) +{ + m_widget->actionPreview->activate(); +} + +void KDevDesignerPart::windowNext( ) +{ + m_widget->actionWindowNext->activate(); +} + +void KDevDesignerPart::windowPrev( ) +{ + m_widget->actionWindowPrevious->activate(); +} + +void KDevDesignerPart::statusMessage( const TQString & msg ) +{ + emit setStatusBarText(msg); +} + +void KDevDesignerPart::setToggleActionChecked( bool b) +{ + if (!sender()) + return; + const TQAction *action = dynamic_cast(sender()); + if (!action) + return; + if (b) + { + if (action == m_widget->actionPointerTool) + pointerAction->setChecked(true); + return; + } + TDERadioAction *tdeaction = m_actionMap[action]; + if (!tdeaction) + return; +// kdDebug() << "untoggle action: " << tdeaction->text() << endl; + tdeaction->blockSignals(true); + tdeaction->setChecked(b); + tdeaction->blockSignals(false); +} + +void KDevDesignerPart::setToggleActionOn( bool b ) +{ + if (!sender()) + return; + const TDERadioAction *action = dynamic_cast(sender()); + if (!action) + return; +// kdDebug() << (b?TQString("toggle"):TQString("untoggle")) << " action: " << action->text() << endl; + TQAction *qaction = m_actionMap2[action]; + if (!qaction) + return; + disconnect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); + qaction->setOn(b); + connect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); +} + +void KDevDesignerPart::openProject( const TQString & // projectFile + ) +{ + //TODO: implement + return; +} + +KInterfaceDesigner::DesignerType KDevDesignerPart::designerType( ) +{ + return KInterfaceDesigner::TQtDesigner; +} + +void KDevDesignerPart::emitAddedFunction( const TQString & form, KInterfaceDesigner::Function func ) +{ + kdDebug() << "KDevDesignerPart::emitAddedFunction: form " << form << ", function: " << func.function << endl; + emit addedFunction(designerType(), form, func); +} + +void KDevDesignerPart::emitRemovedFunction( const TQString & form, KInterfaceDesigner::Function func ) +{ + kdDebug() << "KDevDesignerPart::emitRemovedFunction: form " << form << ", function: " << func.function << endl; + emit removedFunction(designerType(), form, func); +} + +void KDevDesignerPart::emitEditedFunction( const TQString & form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func ) +{ + kdDebug() << "KDevDesignerPart::emitEditedFunction: form " << form + << ", old function: " << oldFunc.function + << ", function: " << func.function << endl; + +// m_widget->formWindow()->clearSelection(false); + emit editedFunction(designerType(), form, oldFunc, func); +} + +void KDevDesignerPart::emitEditFunction(const TQString &formName, const TQString &functionName) +{ + kdDebug() << "KDevDesignerPart::emitEditedFunction: form " << formName + << ", function: " << functionName << endl; + emit editFunction(designerType(), formName, functionName); +} + +void KDevDesignerPart::formModified(bool b) +{ + kdDebug() << "KDevDesignerPart::formModified " << b << endl; + setModified(b); +} + +void KDevDesignerPart::emitEditSource(const TQString &formName) +{ + emit editSource(designerType(), formName); +} + +void KDevDesignerPart::emitNewStatus(const TQString &formName, int status) +{ + emit newStatus(formName, status); +} + +void KDevDesignerPart::toolsEditCustomWidgets( ) +{ + m_widget->toolsCustomWidget(); +} + +#include "kdevdesigner_part.moc" diff --git a/kdevdesigner/designer/kdevdesigner_part.desktop b/kdevdesigner/designer/kdevdesigner_part.desktop new file mode 100644 index 00000000..2928a8ad --- /dev/null +++ b/kdevdesigner/designer/kdevdesigner_part.desktop @@ -0,0 +1,16 @@ +[Desktop Entry] +Name=KDevDesignerPart +Name[da]=TDevelop Designer-part +Name[el]=ΤμήμαKDevDesigner +Name[nds]=Kdevelop-Makerkomponent +Name[ne]=केडीई विकास डिजाइनर भाग +Name[sv]=TDevelop designerdel +Name[ta]=கேமேம்பாட்டு வடிவமைப்பாளர் பகுதி +Name[tg]=KDevҚисми дизайнгар +Name[zh_TW]=TDevelop 設計元件 +MimeType=application/x-designer +ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart +X-TDE-Library=libkdevdesignerpart +Type=Service +InitialPreference=10 + diff --git a/kdevdesigner/designer/kdevdesigner_part.h b/kdevdesigner/designer/kdevdesigner_part.h new file mode 100644 index 00000000..3006c600 --- /dev/null +++ b/kdevdesigner/designer/kdevdesigner_part.h @@ -0,0 +1,148 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program 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 program 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 _KDEVDESIGNERPART_H_ +#define _KDEVDESIGNERPART_H_ + +#include + +#include +#include + +#include "designer.h" + +class TQWidget; +class TQPainter; +class KURL; +class MainWindow; +class TDEAction; +class TQAction; +class TDERadioAction; + +class KDevDesignerPart : public KInterfaceDesigner::Designer +{ + Q_OBJECT + +public: + KDevDesignerPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList &args); + virtual ~KDevDesignerPart(); + + virtual void setReadWrite(bool rw); + virtual void setModified(bool modified); + + void statusMessage(const TQString &msg); + + //KInterfaceDesigner::Designer methods + virtual void openProject(const TQString &projectFile); + virtual KInterfaceDesigner::DesignerType designerType(); + + void emitAddedFunction(const TQString &form, KInterfaceDesigner::Function func); + void emitEditedFunction(const TQString &form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func); + void emitRemovedFunction(const TQString &form, KInterfaceDesigner::Function func); + + void emitEditFunction(const TQString &formName, const TQString &functionName); + void emitEditSource(const TQString &formName); + + void emitNewStatus(const TQString &formName, int status); + +protected: + virtual bool openFile(); + virtual bool saveFile(); + + void setupDesignerWindow(); + void setupActions(); + + void stateSync(TDEAction *tdeaction, TQAction *qaction); + void setupToolsAction(TDERadioAction *toggle, TQAction *action); + +protected slots: + void setToggleActionChecked(bool b); + void setToggleActionOn(bool b); + + void fileNew(); + void fileOpen(); + void fileClose(); + void fileSaveAs(); + void fileCreateTemplate(); + + void editUndo(); + void editRedo(); + void editCut(); + void editCopy(); + void editPaste(); + void editDelete(); + void editSelectAll(); + void editAccels(); + void editFunctions(); + void editConnections(); + void editFormSettings(); + void editPreferences(); + + void projectAddFile(); + void projectImageCollection(); + void projectDatabaseCollections(); + void projectSettings(); + + void toolsConfigureToolbox(); + void toolsEditCustomWidgets(); + + void layoutAdjustSize(); + void layoutHLayout(); + void layoutVLayout(); + void layoutGridLayout(); + void layoutSplitHLayout(); + void layoutSplitVLayout(); + void layoutBreak(); + + void windowPreview(); + void windowNext(); + void windowPrev(); + + void formModified(bool b); +private: + MainWindow *m_widget; + + TQMap m_actionMap; + TQMap m_actionMap2; + TDERadioAction* pointerAction; +}; + +class TDEInstance; +class TDEAboutData; + +class KDevDesignerPartFactory : public KParts::Factory +{ + Q_OBJECT + +public: + KDevDesignerPartFactory(); + virtual ~KDevDesignerPartFactory(); + virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const char *classname, const TQStringList &args ); + static TDEInstance* instance(); + +private: + static TDEInstance* s_instance; + static TDEAboutData* s_about; +}; + +#endif // _KDEVDESIGNERPART_H_ diff --git a/kdevdesigner/designer/kdevdesigner_part.rc b/kdevdesigner/designer/kdevdesigner_part.rc new file mode 100644 index 00000000..71adcdc9 --- /dev/null +++ b/kdevdesigner/designer/kdevdesigner_part.rc @@ -0,0 +1,121 @@ + + + + &File + + + + + + &Edit + + + + + + + + + + + + + + + + + + + &Project + + + + + + + + &Tools + + + + + + + + + + &Layout + + + + + + + + + + + + + &Settings + + + + &Window + + + + + + + + + + +Main Toolbar + + + + + + + + + + + + +Layout Toolbar + + + + + + + + + + + + +Tools Toolbar + + + + + + + diff --git a/kdevdesigner/designer/kdevdesigner_part_sh.rc b/kdevdesigner/designer/kdevdesigner_part_sh.rc new file mode 100644 index 00000000..eb6b503b --- /dev/null +++ b/kdevdesigner/designer/kdevdesigner_part_sh.rc @@ -0,0 +1,116 @@ + + + + &File + + + + + + + + + + + + + + &Edit + + + + + + + + + + + + + + + + + + &Project + + + + + + + + &Tools + + + + + + + + + + &Layout + + + + + + + + + + + + + &Settings + + + + &Window + + + + + + + + +File Toolbar + + + + + +Edit Toolbar + + + + + + + + +Layout Toolbar + + + + + + + + + + + + +Tools Toolbar + + + + + + + diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp new file mode 100644 index 00000000..b8fb737c --- /dev/null +++ b/kdevdesigner/designer/layout.cpp @@ -0,0 +1,1017 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "formwindow.h" +#include "tqlayout.h" +#include +#include "widgetfactory.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +bool operator<( const TQGuardedPtr &p1, const TQGuardedPtr &p2 ) +{ + return p1.operator->() < p2.operator->(); +} + +/*! + \class Layout tqlayout.h + \brief Baseclass for layouting widgets in the Designer + + Classes derived from this abstract base class are used for layouting + operations in the Designer. + +*/ + +/*! \a p specifies the parent of the layoutBase \a lb. The parent + might be changed in setup(). If the layoutBase is a + container, the parent and the layoutBase are the same. Also they + always have to be a widget known to the designer (e.g. in the case + of the tabwidget parent and layoutBase are the tabwidget and not the + page which actually gets laid out. For actual usage the correct + widget is found later by Layout.) + */ + +Layout::Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter ) + : widgets( wl ), parent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter ) +{ + widgets.setAutoDelete( FALSE ); + layoutBase = lb; + if ( !doSetup && layoutBase ) + oldGeometry = layoutBase->geometry(); +} + +/*! The widget list we got in the constructor might contain too much + widgets (like widgets with different parents, already laid out + widgets, etc.). Here we set up the list and so the only the "best" + widgets get laid out. +*/ + +void Layout::setup() +{ + startPoint = TQPoint( 32767, 32767 ); + TQValueList lists; + TQWidget *lastParent = 0; + TQWidgetList *lastList = 0; + TQWidget *w = 0; + + // Go through all widgets of the list we got. As we can only + // layout widgets which have the same parent, we first do some + // sorting which means create a list for each parent containing + // its child here. After that we keep working on the list of + // childs which has the most entries. + // Widgets which are already laid out are thrown away here too + for ( w = widgets.first(); w; w = widgets.next() ) { + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) + continue; + if ( lastParent != w->parentWidget() ) { + lastList = 0; + lastParent = w->parentWidget(); + TQValueList::Iterator it = lists.begin(); + for ( ; it != lists.end(); ++it ) { + if ( ( *it ).first()->parentWidget() == w->parentWidget() ) + lastList = &( *it ); + } + if ( !lastList ) { + TQWidgetList l; + l.setAutoDelete( FALSE ); + lists.append( l ); + lastList = &lists.last(); + } + } + lastList->append( w ); + } + + // So, now find the list with the most entries + lastList = 0; + TQValueList::Iterator it = lists.begin(); + for ( ; it != lists.end(); ++it ) { + if ( !lastList || ( *it ).count() > lastList->count() ) + lastList = &( *it ); + } + + // If we found no list (because no widget did fit at all) or the + // best list has only one entry and we do not layout a container, + // we leave here. + if ( !lastList || ( lastList->count() < 2 && + ( !layoutBase || + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && + layoutBase != formWindow->mainContainer() ) ) + ) ) { + widgets.clear(); + startPoint = TQPoint( 0, 0 ); + return; + } + + // Now we have a new and clean widget list, which makes sense + // to layout + widgets = *lastList; + // Also use the only correct parent later, so store it + parent = WidgetFactory::widgetOfContainer( widgets.first()->parentWidget() ); + // Now calculate the position where the layout-meta-widget should + // be placed and connect to widgetDestroyed() signals of the + // widgets to get informed if one gets deleted to be able to + // handle that and do not crash in this case + for ( w = widgets.first(); w; w = widgets.next() ) { + connect( w, TQT_SIGNAL( destroyed() ), + this, TQT_SLOT( widgetDestroyed() ) ); + startPoint = TQPoint( TQMIN( startPoint.x(), w->x() ), + TQMIN( startPoint.y(), w->y() ) ); + geometries.insert( w, TQRect( w->pos(), w->size() ) ); + // Change the Z-order, as saving/loading uses the Z-order for + // writing/creating widgets and this has to be the same as in + // the layout. Else saving + loading will give different results + w->raise(); + } +} + +void Layout::widgetDestroyed() +{ + if ( sender() && sender()->isWidgetType() ) + widgets.removeRef( (TQWidget*)sender() ); +} + +bool Layout::prepareLayout( bool &needMove, bool &needReparent ) +{ + if ( !widgets.count() ) + return FALSE; + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) + w->raise(); + needMove = !layoutBase; + needReparent = needMove || ::tqqt_cast(layoutBase) || ::tqqt_cast(layoutBase); + if ( !layoutBase ) { + if ( !useSplitter ) + layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ), + WidgetFactory::containerOfWidget( parent ) ); + else + layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ), + WidgetFactory::containerOfWidget( parent ) ); + } else { + WidgetFactory::deleteLayout( layoutBase ); + } + + return TRUE; +} + +void Layout::finishLayout( bool needMove, TQLayout *layout ) +{ + if ( needMove ) + layoutBase->move( startPoint ); + TQRect g( TQRect( layoutBase->pos(), layoutBase->size() ) ); + if ( WidgetFactory::layoutType( layoutBase->parentWidget() ) == WidgetFactory::NoLayout && !isBreak ) + layoutBase->adjustSize(); + else if ( isBreak ) + layoutBase->setGeometry( oldGeometry ); + oldGeometry = g; + layoutBase->show(); + layout->activate(); + formWindow->insertWidget( layoutBase ); + formWindow->selectWidget( TQT_TQOBJECT(layoutBase) ); + TQString n = layoutBase->name(); + if ( n.find( "qt_dead_widget_" ) != -1 ) { + n.remove( 0, TQString( "qt_dead_widget_" ).length() ); + layoutBase->setName( n ); + } +} + +void Layout::undoLayout() +{ + if ( !widgets.count() ) + return; + TQMap, TQRect>::Iterator it = geometries.begin(); + for ( ; it != geometries.end(); ++it ) { + if ( !it.key() ) + continue; + it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) ); + it.key()->resize( ( *it ).size() ); + } + formWindow->selectWidget( TQT_TQOBJECT(layoutBase), FALSE ); + WidgetFactory::deleteLayout( layoutBase ); + if ( parent != layoutBase && !::tqqt_cast(layoutBase) ) { + layoutBase->hide(); + TQString n = layoutBase->name(); + n.prepend( "qt_dead_widget_" ); + layoutBase->setName( n ); + } else { + layoutBase->setGeometry( oldGeometry ); + } + if ( widgets.first() ) + formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); + else + formWindow->selectWidget( TQT_TQOBJECT(formWindow) ); +} + +void Layout::breakLayout() +{ + TQMap rects; + if ( !widgets.isEmpty() ) { + TQWidget *w; + for ( w = widgets.first(); w; w = widgets.next() ) + rects.insert( w, w->geometry() ); + } + WidgetFactory::deleteLayout( layoutBase ); + bool needReparent = qstrcmp( layoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 || + qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 || + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && + layoutBase != formWindow->mainContainer() ); + bool needResize = qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0; + bool add = geometries.isEmpty(); + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + if ( needReparent ) + w->reparent( layoutBase->parentWidget(), 0, + layoutBase->pos() + w->pos(), TRUE ); + if ( needResize ) { + TQMap::Iterator it = rects.find( w ); + if ( it != rects.end() ) + w->setGeometry( TQRect( layoutBase->pos() + (*it).topLeft(), (*it).size() ) ); + } + if ( add ) + geometries.insert( w, TQRect( w->pos(), w->size() ) ); + } + if ( needReparent ) { + layoutBase->hide(); + parent = layoutBase->parentWidget(); + TQString n = layoutBase->name(); + n.prepend( "qt_dead_widget_" ); + layoutBase->setName( n ); + } else { + parent = layoutBase; + } + if ( widgets.first() && widgets.first()->isVisibleTo( formWindow ) ) + formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); + else + formWindow->selectWidget( TQT_TQOBJECT(formWindow) ); +} + +class HorizontalLayoutList : public TQWidgetList +{ +public: + HorizontalLayoutList( const TQWidgetList &l ) + : TQWidgetList( l ) {} + + int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) { + TQWidget *w1 = (TQWidget*)item1; + TQWidget *w2 = (TQWidget*)item2; + if ( w1->x() == w2->x() ) + return 0; + if ( w1->x() > w2->x() ) + return 1; + return -1; + } + +}; + +HorizontalLayout::HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter ) + : Layout( wl, p, fw, lb, doSetup, splitter ) +{ + if ( doSetup ) + setup(); +} + +void HorizontalLayout::setup() +{ + HorizontalLayoutList l( widgets ); + l.sort(); + widgets = l; + Layout::setup(); +} + +void HorizontalLayout::doLayout() +{ + bool needMove, needReparent; + if ( !prepareLayout( needMove, needReparent ) ) + return; + + TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox ); + + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); + if ( !useSplitter ) { + if ( qstrcmp( w->className(), "Spacer" ) == 0 ) + layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); + else + layout->addWidget( w ); + if ( ::tqqt_cast(w) ) + ( (TQLayoutWidget*)w )->updateSizePolicy(); + } + w->show(); + } + + if ( ::tqqt_cast(layoutBase) ) + ( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal ); + + finishLayout( needMove, layout ); +} + + + + +class VerticalLayoutList : public TQWidgetList +{ +public: + VerticalLayoutList( const TQWidgetList &l ) + : TQWidgetList( l ) {} + + int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) { + TQWidget *w1 = (TQWidget*)item1; + TQWidget *w2 = (TQWidget*)item2; + if ( w1->y() == w2->y() ) + return 0; + if ( w1->y() > w2->y() ) + return 1; + return -1; + } + +}; + +VerticalLayout::VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter ) + : Layout( wl, p, fw, lb, doSetup, splitter ) +{ + if ( doSetup ) + setup(); +} + +void VerticalLayout::setup() +{ + VerticalLayoutList l( widgets ); + l.sort(); + widgets = l; + Layout::setup(); +} + +void VerticalLayout::doLayout() +{ + bool needMove, needReparent; + if ( !prepareLayout( needMove, needReparent ) ) + return; + + TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox ); + + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); + if ( !useSplitter ) { + if ( qstrcmp( w->className(), "Spacer" ) == 0 ) + layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); + else + layout->addWidget( w ); + if ( ::tqqt_cast(w) ) + ( (TQLayoutWidget*)w )->updateSizePolicy(); + } + w->show(); + } + + if ( ::tqqt_cast(layoutBase) ) + ( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical ); + + finishLayout( needMove, layout ); +} + + + + + +class Grid +{ +public: + Grid( int rows, int cols ); + ~Grid(); + + TQWidget* cell( int row, int col ) const { return cells[ row * ncols + col]; } + void setCell( int row, int col, TQWidget* w ) { cells[ row*ncols + col] = w; } + void setCells( TQRect c, TQWidget* w ) { + for ( int rows = c.bottom()-c.top(); rows >= 0; rows--) + for ( int cols = c.right()-c.left(); cols >= 0; cols--) { + setCell(c.top()+rows, c.left()+cols, w); + } + } + int numRows() const { return nrows; } + int numCols() const { return ncols; } + + void simplify(); + bool locateWidget( TQWidget* w, int& row, int& col, int& rowspan, int& colspan ); + +private: + void merge(); + int countRow( int r, int c ) const; + int countCol( int r, int c ) const; + void setRow( int r, int c, TQWidget* w, int count ); + void setCol( int r, int c, TQWidget* w, int count ); + bool isWidgetStartCol( int c ) const; + bool isWidgetEndCol( int c ) const; + bool isWidgetStartRow( int r ) const; + bool isWidgetEndRow( int r ) const; + bool isWidgetTopLeft( int r, int c ) const; + void extendLeft(); + void extendRight(); + void extendUp(); + void extendDown(); + TQWidget** cells; + bool* cols; + bool* rows; + int nrows, ncols; + +}; + +Grid::Grid( int r, int c ) + : nrows( r ), ncols( c ) +{ + cells = new TQWidget*[ r * c ]; + memset( cells, 0, sizeof( cells ) * r * c ); + rows = new bool[ r ]; + cols = new bool[ c ]; + +} + +Grid::~Grid() +{ + delete [] cells; + delete [] cols; + delete [] rows; +} + +int Grid::countRow( int r, int c ) const +{ + TQWidget* w = cell( r, c ); + int i = c + 1; + while ( i < ncols && cell( r, i ) == w ) + i++; + return i - c; +} + +int Grid::countCol( int r, int c ) const +{ + TQWidget* w = cell( r, c ); + int i = r + 1; + while ( i < nrows && cell( i, c ) == w ) + i++; + return i - r; +} + +void Grid::setCol( int r, int c, TQWidget* w, int count ) +{ + for (int i = 0; i < count; i++ ) + setCell( r + i, c, w ); +} + +void Grid::setRow( int r, int c, TQWidget* w, int count ) +{ + for (int i = 0; i < count; i++ ) + setCell( r, c + i, w ); +} + +bool Grid::isWidgetStartCol( int c ) const +{ + int r; + for ( r = 0; r < nrows; r++ ) { + if ( cell( r, c ) && ( (c==0) || (cell( r, c) != cell( r, c-1) )) ) { + return TRUE; + } + } + return FALSE; +} + +bool Grid::isWidgetEndCol( int c ) const +{ + int r; + for ( r = 0; r < nrows; r++ ) { + if ( cell( r, c ) && ((c == ncols-1) || (cell( r, c) != cell( r, c+1) )) ) + return TRUE; + } + return FALSE; +} + +bool Grid::isWidgetStartRow( int r ) const +{ + int c; + for ( c = 0; c < ncols; c++ ) { + if ( cell( r, c ) && ( (r==0) || (cell( r, c) != cell( r-1, c) )) ) + return TRUE; + } + return FALSE; +} + +bool Grid::isWidgetEndRow( int r ) const +{ + int c; + for ( c = 0; c < ncols; c++ ) { + if ( cell( r, c ) && ((r == nrows-1) || (cell( r, c) != cell( r+1, c) )) ) + return TRUE; + } + return FALSE; +} + + +bool Grid::isWidgetTopLeft( int r, int c ) const +{ + TQWidget* w = cell( r, c ); + if ( !w ) + return FALSE; + return ( !r || cell( r-1, c) != w ) && (!c || cell( r, c-1) != w); +} + +void Grid::extendLeft() +{ + int r,c,i; + for ( c = 1; c < ncols; c++ ) { + for ( r = 0; r < nrows; r++ ) { + TQWidget* w = cell( r, c ); + if ( !w ) + continue; + int cc = countCol( r, c); + int stretch = 0; + for ( i = c-1; i >= 0; i-- ) { + if ( cell( r, i ) ) + break; + if ( countCol( r, i ) < cc ) + break; + if ( isWidgetEndCol( i ) ) + break; + if ( isWidgetStartCol( i ) ) { + stretch = c - i; + break; + } + } + if ( stretch ) { + for ( i = 0; i < stretch; i++ ) + setCol( r, c-i-1, w, cc ); + } + } + } +} + + +void Grid::extendRight() +{ + int r,c,i; + for ( c = ncols - 2; c >= 0; c-- ) { + for ( r = 0; r < nrows; r++ ) { + TQWidget* w = cell( r, c ); + if ( !w ) + continue; + int cc = countCol( r, c); + int stretch = 0; + for ( i = c+1; i < ncols; i++ ) { + if ( cell( r, i ) ) + break; + if ( countCol( r, i ) < cc ) + break; + if ( isWidgetStartCol( i ) ) + break; + if ( isWidgetEndCol( i ) ) { + stretch = i - c; + break; + } + } + if ( stretch ) { + for ( i = 0; i < stretch; i++ ) + setCol( r, c+i+1, w, cc ); + } + } + } + +} + +void Grid::extendUp() +{ + int r,c,i; + for ( r = 1; r < nrows; r++ ) { + for ( c = 0; c < ncols; c++ ) { + TQWidget* w = cell( r, c ); + if ( !w ) + continue; + int cr = countRow( r, c); + int stretch = 0; + for ( i = r-1; i >= 0; i-- ) { + if ( cell( i, c ) ) + break; + if ( countRow( i, c ) < cr ) + break; + if ( isWidgetEndRow( i ) ) + break; + if ( isWidgetStartRow( i ) ) { + stretch = r - i; + break; + } + } + if ( stretch ) { + for ( i = 0; i < stretch; i++ ) + setRow( r-i-1, c, w, cr ); + } + } + } +} + +void Grid::extendDown() +{ + int r,c,i; + for ( r = nrows - 2; r >= 0; r-- ) { + for ( c = 0; c < ncols; c++ ) { + TQWidget* w = cell( r, c ); + if ( !w ) + continue; + int cr = countRow( r, c); + int stretch = 0; + for ( i = r+1; i < nrows; i++ ) { + if ( cell( i, c ) ) + break; + if ( countRow( i, c ) < cr ) + break; + if ( isWidgetStartRow( i ) ) + break; + if ( isWidgetEndRow( i ) ) { + stretch = i - r; + break; + } + } + if ( stretch ) { + for ( i = 0; i < stretch; i++ ) + setRow( r+i+1, c, w, cr ); + } + } + } + +} + +void Grid::simplify() +{ + extendLeft(); + extendRight(); + extendUp(); + extendDown(); + merge(); +} + + +void Grid::merge() +{ + int r,c; + for ( c = 0; c < ncols; c++ ) + cols[c] = FALSE; + + for ( r = 0; r < nrows; r++ ) + rows[r] = FALSE; + + for ( c = 0; c < ncols; c++ ) { + for ( r = 0; r < nrows; r++ ) { + if ( isWidgetTopLeft( r, c ) ) { + rows[r] = TRUE; + cols[c] = TRUE; + } + } + } +} + +bool Grid::locateWidget( TQWidget* w, int& row, int& col, int& rowspan, int & colspan ) +{ + int r,c, r2, c2; + for ( c = 0; c < ncols; c++ ) { + for ( r = 0; r < nrows; r++ ) { + if ( cell( r, c ) == w ) { + row = 0; + for ( r2 = 1; r2 <= r; r2++ ) { + if ( rows[ r2-1 ] ) + row++; + } + col = 0; + for ( c2 = 1; c2 <= c; c2++ ) { + if ( cols[ c2-1 ] ) + col++; + } + rowspan = 0; + for ( r2 = r ; r2 < nrows && cell( r2, c) == w; r2++ ) { + if ( rows[ r2 ] ) + rowspan++; + } + colspan = 0; + for ( c2 = c; c2 < ncols && cell( r, c2) == w; c2++ ) { + if ( cols[ c2] ) + colspan++; + } + return TRUE; + } + } + } + return FALSE; +} + + + + +GridLayout::GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup ) + : Layout( wl, p, fw, lb, doSetup ), resolution( res ) +{ + grid = 0; + if ( doSetup ) + setup(); +} + +GridLayout::~GridLayout() +{ + delete grid; +} + +void GridLayout::doLayout() +{ + bool needMove, needReparent; + if ( !prepareLayout( needMove, needReparent ) ) + return; + + QDesignerGridLayout *layout = (QDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid ); + + if ( !grid ) + buildGrid(); + + TQWidget* w; + int r, c, rs, cs; + for ( w = widgets.first(); w; w = widgets.next() ) { + if ( grid->locateWidget( w, r, c, rs, cs) ) { + if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); + if ( rs * cs == 1 ) { + layout->addWidget( w, r, c, ::tqqt_cast(w) ? ( (Spacer*)w )->alignment() : 0 ); + } else { + layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::tqqt_cast(w) ? ( (Spacer*)w )->alignment() : 0 ); + } + if ( ::tqqt_cast(w) ) + ( (TQLayoutWidget*)w )->updateSizePolicy(); + w->show(); + } else { + tqWarning("ooops, widget '%s' does not fit in layout", w->name() ); + } + } + finishLayout( needMove, layout ); +} + +void GridLayout::setup() +{ + Layout::setup(); + buildGrid(); +} + +void GridLayout::buildGrid() +{ + if ( !widgets.count() ) + return; + + // Pixel to cell conversion: + // By keeping a list of start'n'stop values (x & y) for each widget, + // it is possible to create a very small grid of cells to represent + // the widget layout. + // ----------------------------------------------------------------- + + // We need a list of both start and stop values for x- & y-axis + TQValueVector x( widgets.count()*2 ); + TQValueVector y( widgets.count()*2 ); + + // Using push_back would look nicer, but operator[] is much faster + int index = 0; + TQWidget* w = 0; + for ( w = widgets.first(); w; w = widgets.next() ) { + TQRect widgetPos = w->geometry(); + x[index] = widgetPos.left(); + x[index+1] = widgetPos.right(); + y[index] = widgetPos.top(); + y[index+1] = widgetPos.bottom(); + index += 2; + } + + qHeapSort(x); + qHeapSort(y); + + // Remove duplicate x enteries (Remove next, if equal to current) + if ( !x.empty() ) { + for (TQValueVector::iterator current = x.begin() ; + (current != x.end()) && ((current+1) != x.end()) ; ) + if ( (*current == *(current+1)) ) + x.erase(current+1); + else + current++; + } + + // Remove duplicate y enteries (Remove next, if equal to current) + if ( !y.empty() ) { + for (TQValueVector::iterator current = y.begin() ; + (current != y.end()) && ((current+1) != y.end()) ; ) + if ( (*current == *(current+1)) ) + y.erase(current+1); + else + current++; + } + + // Create the smallest grid possible to represent the current layout + // Since no widget will be placed in the last row and column, we'll + // skip them to increase speed even further + delete grid; + grid = new Grid( y.size()-1, x.size()-1 ); + + // Mark the cells in the grid that contains a widget + for ( w = widgets.first(); w; w = widgets.next() ) { + TQRect c(0,0,0,0), widgetPos = w->geometry(); + // From left til right (not including) + for (uint cw=0; cwsetCells(c, w); // Mark cellblock + } + grid->simplify(); +} + + + + + + + +Spacer::Spacer( TQWidget *parent, const char *name ) + : TQWidget( parent, name, WMouseNoMask ), + orient(Qt::Vertical ), interactive(TRUE), sh( TQSize(20,20) ) +{ + setSizeType( Expanding ); + setAutoMask( TRUE ); +} + +void Spacer::paintEvent( TQPaintEvent * ) +{ + TQPainter p( this ); + p.setPen( TQt::blue ); + + if ( orient ==Qt::Horizontal ) { + const int dist = 3; + const int amplitude = TQMIN( 3, height() / 3 ); + const int base = height() / 2; + int i = 0; + p.setPen( white ); + for ( i = 0; i < width() / 3 +2; ++i ) + p.drawLine( i * dist, base - amplitude, i * dist + dist / 2, base + amplitude ); + p.setPen( blue ); + for ( i = 0; i < width() / 3 +2; ++i ) + p.drawLine( i * dist + dist / 2, base + amplitude, i * dist + dist, base - amplitude ); + p.drawLine( 0, 0, 0, height() ); + p.drawLine( width() - 1, 0, width() - 1, height()); + } else { + const int dist = 3; + const int amplitude = TQMIN( 3, width() / 3 ); + const int base = width() / 2; + int i = 0; + p.setPen( white ); + for ( i = 0; i < height() / 3 +2; ++i ) + p.drawLine( base - amplitude, i * dist, base + amplitude,i * dist + dist / 2 ); + p.setPen( blue ); + for ( i = 0; i < height() / 3 +2; ++i ) + p.drawLine( base + amplitude, i * dist + dist / 2, base - amplitude, i * dist + dist ); + p.drawLine( 0, 0, width(), 0 ); + p.drawLine( 0, height() - 1, width(), height() - 1 ); + } +} + +void Spacer::resizeEvent( TQResizeEvent* e) +{ + TQWidget::resizeEvent( e ); + if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) + sh = size(); +} + +void Spacer::updateMask() +{ + TQRegion r( rect() ); + if ( orient ==Qt::Horizontal ) { + const int amplitude = TQMIN( 3, height() / 3 ); + const int base = height() / 2; + r = r.subtract( TQRect(1, 0, width() - 2, base - amplitude ) ); + r = r.subtract( TQRect(1, base + amplitude, width() - 2, height() - base - amplitude ) ); + } else { + const int amplitude = TQMIN( 3, width() / 3 ); + const int base = width() / 2; + r = r.subtract( TQRect(0, 1, base - amplitude, height() - 2 ) ); + r = r.subtract( TQRect( base + amplitude, 1, width() - base - amplitude, height() - 2 ) ); + } + setMask( r ); +} + +void Spacer::setSizeType( SizeType t ) +{ + TQSizePolicy sizeP; + if ( orient ==Qt::Vertical ) + sizeP = TQSizePolicy( TQSizePolicy::Minimum, (TQSizePolicy::SizeType)t ); + else + sizeP = TQSizePolicy( (TQSizePolicy::SizeType)t, TQSizePolicy::Minimum ); + setSizePolicy( sizeP ); +} + + +Spacer::SizeType Spacer::sizeType() const +{ + if ( orient ==Qt::Vertical ) + return (SizeType)sizePolicy().verData(); + return (SizeType)sizePolicy().horData(); +} + +int Spacer::alignment() const +{ + if ( orient ==Qt::Vertical ) + return AlignHCenter; + return AlignVCenter; +} + +TQSize Spacer::minimumSize() const +{ + TQSize s = TQSize( 20,20 ); + if ( sizeType() == Expanding ) + if ( orient ==Qt::Vertical ) + s.rheight() = 0; + else + s.rwidth() = 0; + return s; +} + +TQSize Spacer::sizeHint() const +{ + return sh; +} + + +void Spacer::setSizeHint( const TQSize &s ) +{ + sh = s; + if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) + resize( sizeHint() ); + updateGeometry(); +} + +Qt::Orientation Spacer::orientation() const +{ + return orient; +} + +void Spacer::setOrientation( Qt::Orientation o ) +{ + if ( orient == o ) + return; + + SizeType st = sizeType(); + orient = o; + setSizeType( st ); + if ( interactive ) { + sh = TQSize( sh.height(), sh.width() ); + if (!parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) + resize( height(), width() ); + } + updateMask(); + update(); + updateGeometry(); +} + + +void QDesignerGridLayout::addWidget( TQWidget *w, int row, int col, int align_ ) +{ + items.insert( w, Item(row, col, 1, 1) ); + TQGridLayout::addWidget( w, row, col, align_ ); +} + +void QDesignerGridLayout::addMultiCellWidget( TQWidget *w, int fromRow, int toRow, + int fromCol, int toCol, int align_ ) +{ + items.insert( w, Item(fromRow, fromCol, toRow - fromRow + 1, toCol - fromCol +1) ); + TQGridLayout::addMultiCellWidget( w, fromRow, toRow, fromCol, toCol, align_ ); +} diff --git a/kdevdesigner/designer/layout.h b/kdevdesigner/designer/layout.h new file mode 100644 index 00000000..d1ea776e --- /dev/null +++ b/kdevdesigner/designer/layout.h @@ -0,0 +1,191 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef LAYOUT_H +#define LAYOUT_H + +#include +#include +#include +#include +#include +#include +#include + +class FormWindow; +class TQPaintEvent; + +class Layout : public TQObject +{ + Q_OBJECT + + +public: + Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); + virtual ~Layout() {} + + virtual void doLayout() = 0; + virtual void undoLayout(); + virtual void breakLayout(); + virtual bool prepareLayout( bool &needMove, bool &needReparent ); + virtual void finishLayout( bool needMove, TQLayout *layout ); + +protected: + TQWidgetList widgets; + TQWidget *parent; + TQPoint startPoint; + TQMap, TQRect> geometries; + TQWidget *layoutBase; + FormWindow *formWindow; + TQRect oldGeometry; + bool isBreak; + bool useSplitter; + +protected: + virtual void setup(); + +protected slots: + void widgetDestroyed(); + +}; + +class HorizontalLayout : public Layout +{ +public: + HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); + + void doLayout(); + +protected: + void setup(); + +}; + +class VerticalLayout : public Layout +{ +public: + VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); + + void doLayout(); + +protected: + void setup(); + +}; + +class Grid; + +class GridLayout : public Layout +{ +public: + GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup = TRUE ); + ~GridLayout(); + + void doLayout(); + +protected: + void setup(); + +protected: + void buildGrid(); + TQSize resolution; + Grid* grid; + +}; + +class Spacer : public TQWidget +{ + Q_OBJECT + + + TQ_OVERRIDE( TQCString name ) + TQ_PROPERTY( Orientation orientation READ orientation WRITE setOrientation ) + TQ_ENUMS( SizeType ) + TQ_PROPERTY( SizeType sizeType READ sizeType WRITE setSizeType ) + TQ_PROPERTY( TQSize sizeHint READ sizeHint WRITE setSizeHint DESIGNABLE true STORED true ) + TQ_OVERRIDE( TQRect geometry DESIGNABLE false ) + +private: + enum { HSize = 6, HMask = 0x3f, VMask = HMask << HSize, + MayGrow = 1, ExpMask = 2, MayShrink = 4 }; + +public: + enum SizeType { Fixed = 0, + Minimum = MayGrow, + Maximum = MayShrink, + Preferred = MayGrow|MayShrink , + MinimumExpanding = Minimum|ExpMask, + Expanding = MinimumExpanding|MayShrink }; + + Spacer( TQWidget *parent, const char *name ); + + TQSize minimumSize() const; + TQSize sizeHint() const; + void setSizeType( SizeType t ); + SizeType sizeType() const; + int alignment() const; + Orientation orientation() const; + void setOrientation( Orientation o ); + void setInteraciveMode( bool b ) { interactive = b; }; + void setSizeHint( const TQSize &s ); + +protected: + void paintEvent( TQPaintEvent *e ); + void resizeEvent( TQResizeEvent* e ); + void updateMask(); + Orientation orient; + bool interactive; + TQSize sh; +}; + +class QDesignerGridLayout : public TQGridLayout +{ + Q_OBJECT + +public: + QDesignerGridLayout( TQWidget *parent ) : TQGridLayout( parent ){}; + QDesignerGridLayout( TQLayout *parentLayout ) : TQGridLayout( parentLayout ){}; + + void addWidget( TQWidget *, int row, int col, int align = 0 ); + void addMultiCellWidget( TQWidget *, int fromRow, int toRow, + int fromCol, int toCol, int align = 0 ); + + struct Item + { + Item(): row(0), column(0),rowspan(1),colspan(1){} + Item( int r, int c, int rs, int cs): row(r), column(c), rowspan(rs), colspan(cs){} + int row; + int column; + int rowspan; + int colspan; + TQ_DUMMY_COMPARISON_OPERATOR( Item ) + }; + + TQMap items; +}; + + +#endif diff --git a/kdevdesigner/designer/listboxdnd.cpp b/kdevdesigner/designer/listboxdnd.cpp new file mode 100644 index 00000000..54498478 --- /dev/null +++ b/kdevdesigner/designer/listboxdnd.cpp @@ -0,0 +1,305 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "listboxdnd.h" +#include +#include +#include +#include +#include + +// The Dragobject Declaration --------------------------------------- +class ListBoxItemDrag : public TQStoredDrag +{ +public: + ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = FALSE, TQListBox * parent = 0, const char * name = 0 ); + ~ListBoxItemDrag() {}; + static bool canDecode( TQDragMoveEvent * event ); + static bool decode( TQDropEvent * event, TQListBox * parent, TQListBoxItem * insertPoint ); + enum ItemType { ListBoxText = 1, ListBoxPixmap = 2 }; +}; +// ------------------------------------------------------------------ + +ListBoxDnd::ListBoxDnd( TQListBox * eventSource, const char * name ) + : ListDnd( eventSource, name ) { } + +void ListBoxDnd::confirmDrop( TQListBoxItem * ) +{ + dropConfirmed = TRUE; +} + +bool ListBoxDnd::dropEvent( TQDropEvent * event ) +{ + if ( dragInside ) { + + if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item + event->accept(); + emit dropped( 0 ); // a NullDrop + return TRUE; + } + + TQPoint pos = event->pos(); + TQListBoxItem * after = itemAt( pos ); + + if ( ListBoxItemDrag::decode( event, (TQListBox *) src, after ) ) { + event->accept(); + TQListBox * src = (TQListBox *) this->src; + TQListBoxItem * item = ( after ? after->next() : src->firstItem() ); + src->setCurrentItem( item ); + emit dropped( item ); // ###FIX: Supports only one item! + } + } + + line->hide(); + dragInside = FALSE; + + return TRUE; +} + +bool ListBoxDnd::mouseMoveEvent( TQMouseEvent * event ) +{ + if ( event->state() & Qt::LeftButton ) { + if ( ( event->pos() - mousePressPos ).manhattanLength() > 3 ) { + + ListBoxItemList list; + buildList( list ); + ListBoxItemDrag * dragobject = new ListBoxItemDrag( list, (dMode & Internal), (TQListBox *) src ); + + // Emit signal for all dragged items + TQListBoxItem * i = list.first(); + while ( i ) { + emit dragged( i ); + i = list.next(); + } + + if ( dMode & Move ) { + removeList( list ); // "hide" items + } + + dragobject->dragCopy(); + + if ( dMode & Move ) { + if ( dropConfirmed ) { + // ###FIX: memleak ? in internal mode, only pointers are transfered... + //list.setAutoDelete( TRUE ); + list.clear(); + dropConfirmed = FALSE; + } + insertList( list ); // "show" items + } + } + } + return FALSE; +} + +int ListBoxDnd::buildList( ListBoxItemList & list ) +{ + TQListBoxItem * i = ((TQListBox *)src)->firstItem(); + while ( i ) { + if ( i->isSelected() ) { + ((TQListBox *)src)->setSelected( i, FALSE ); + list.append( i ); + } + i = i->next(); + } + return list.count(); +} + +void ListBoxDnd::insertList( ListBoxItemList & list ) +{ + TQListBoxItem * i = list.first(); + while ( i ) { + ((TQListBox *)src)->insertItem( i, i->prev() ); + i = list.next(); + } +} + +void ListBoxDnd::removeList( ListBoxItemList & list ) +{ + TQListBoxItem * i = list.first(); + while ( i ) { + ((TQListBox *)src)->takeItem( i ); // remove item from TQListBox + i = list.next(); + } +} + +void ListBoxDnd::updateLine( const TQPoint & dragPos ) +{ + TQListBox * src = (TQListBox *) this->src; + TQListBoxItem *item = itemAt( dragPos ); + + int ypos = item ? + ( src->itemRect( item ).bottom() - ( line->height() / 2 ) ) : + ( src->itemRect( ((TQListBox *)src)->firstItem() ).top() ); + + line->resize( src->viewport()->width(), line->height() ); + line->move( 0, ypos ); +} + +TQListBoxItem * ListBoxDnd::itemAt( TQPoint pos ) +{ + TQListBox * src = (TQListBox *) this->src; + TQListBoxItem * result = src->itemAt( pos ); + TQListBoxItem * last = src->item( src->count() - 1 ); + int i = src->index( result ); + + if ( result && ( pos.y() < (src->itemRect(result).top() + src->itemHeight(i)/2) ) ) + result = result->prev(); + else if ( !result && pos.y() > src->itemRect( last ).bottom() ) + result = last; + + return result; +} + +bool ListBoxDnd::canDecode( TQDragEnterEvent * event ) +{ + return ListBoxItemDrag::canDecode( event ); +} + + +// ------------------------------------------------------------------ +// The Dragobject Implementation ------------------------------------ +// ------------------------------------------------------------------ + +ListBoxItemDrag::ListBoxItemDrag( ListBoxItemList & items, bool sendPtr, TQListBox * parent, const char * name ) + : TQStoredDrag( "qt/listboxitem", parent, name ) +{ + // ### FIX! + TQByteArray data( sizeof( TQ_INT32 ) + sizeof( TQListBoxItem ) * items.count() ); + TQDataStream stream( data, IO_WriteOnly ); + + stream << items.count(); + stream << (TQ_UINT8) sendPtr; // just transfer item pointer; omit data + + TQListBoxItem * i = items.first(); + + if ( sendPtr ) { + + while ( i ) { + + stream << (TQ_ULONG) i; //###FIX: demands sizeof(ulong) >= sizeof(void*) + i = items.next(); + + } + + } else { + + while ( i ) { + + TQ_UINT8 b = 0; + + b = (TQ_UINT8) ( i->text() != TQString() ); // does item have text ? + stream << b; + if ( b ) { + stream << i->text(); + } + + b = (TQ_UINT8) ( !!i->pixmap() ); // does item have a pixmap ? + stream << b; + if ( b ) { + stream << ( *i->pixmap() ); + } + + stream << (TQ_UINT8) i->isSelectable(); + + i = items.next(); + } + + } + + setEncodedData( data ); +} + +bool ListBoxItemDrag::canDecode( TQDragMoveEvent * event ) +{ + return event->provides( "qt/listboxitem" ); +} + +bool ListBoxItemDrag::decode( TQDropEvent * event, TQListBox * parent, TQListBoxItem * after ) +{ + TQByteArray data = event->encodedData( "qt/listboxitem" ); + + if ( data.size() ) { + event->accept(); + TQDataStream stream( data, IO_ReadOnly ); + + int count = 0; + stream >> count; + + TQ_UINT8 recievePtr = 0; // data contains just item pointers; no data + stream >> recievePtr; + + TQListBoxItem * item = 0; + + if ( recievePtr ) { + + for( int i = 0; i < count; i++ ) { + + TQ_ULONG p = 0; //###FIX: demands sizeof(ulong) >= sizeof(void*) + stream >> p; + item = (TQListBoxItem *) p; + + parent->insertItem( item, after ); + + } + + } else { + + for ( int i = 0; i < count; i++ ) { + + TQ_UINT8 hasText = 0; + TQString text; + stream >> hasText; + if ( hasText ) { + stream >> text; + } + + TQ_UINT8 hasPixmap = 0; + TQPixmap pixmap; + stream >> hasPixmap; + if ( hasPixmap ) { + stream >> pixmap; + } + + TQ_UINT8 isSelectable = 0; + stream >> isSelectable; + + if ( hasPixmap ) { + item = new TQListBoxPixmap( parent, pixmap, text, after ); + } else { + item = new TQListBoxText( parent, text, after ); + } + + item->setSelectable( isSelectable ); + + } + + } + + return TRUE; + } + return FALSE; +} diff --git a/kdevdesigner/designer/listboxdnd.h b/kdevdesigner/designer/listboxdnd.h new file mode 100644 index 00000000..5abf792f --- /dev/null +++ b/kdevdesigner/designer/listboxdnd.h @@ -0,0 +1,64 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef LISTBOXDND_H +#define LISTBOXDND_H + +#include +#include +#include "listdnd.h" + +typedef TQPtrList ListBoxItemList; + +class ListBoxDnd : public ListDnd +{ + Q_OBJECT + +public: + // dragModes are enumerated in ListDnd + ListBoxDnd( TQListBox * eventSource, const char * name = 0 ); + +signals: + void dropped( TQListBoxItem * ); + void dragged( TQListBoxItem * ); + +public slots: + void confirmDrop( TQListBoxItem * ); + +protected: + virtual bool dropEvent( TQDropEvent * event ); + virtual bool mouseMoveEvent( TQMouseEvent * event ); + virtual void updateLine( const TQPoint & pos ); + virtual bool canDecode( TQDragEnterEvent * event ); + +private: + TQListBoxItem * itemAt( TQPoint pos ); + int buildList( ListBoxItemList & list ); + void insertList( ListBoxItemList & list ); + void removeList( ListBoxItemList & list ); +}; + +#endif //LISTBOXDND_H diff --git a/kdevdesigner/designer/listboxeditor.ui b/kdevdesigner/designer/listboxeditor.ui new file mode 100644 index 00000000..df584ddf --- /dev/null +++ b/kdevdesigner/designer/listboxeditor.ui @@ -0,0 +1,457 @@ + +ListBoxEditorBase +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + ListBoxEditorBase + + + + 0 + 0 + 482 + 229 + + + + Edit Listbox + + + true + + + <b>Edit Listbox</b><p>Add, edit or delete items in the listbox.</p><p>Click the <b>New Item</b>-button to create a new listbox entry, then enter text and choose a pixmap.</p><p>Select an item from the list and click the <b>Delete Item</b>-button to remove the item from the list.</p> + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + helpButton + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + true + + + true + + + Close the dialog and apply all the changes. + + + + + buttonApply + + + &Apply + + + true + + + Apply all changes. + + + + + buttonCancel + + + &Cancel + + + true + + + Close the dialog and discard any changes. + + + + + + + preview + + + Delete Item + + + The list of items. + + + + + GroupBox1 + + + &Item Properties + + + + unnamed + + + 11 + + + 6 + + + + Label2 + + + &Pixmap: + + + itemChoosePixmap + + + + + itemPixmap + + + Label4 + + + + + itemDeletePixmap + + + + 30 + 22 + + + + + + + "designer_s_editcut.png" + + + Delete Pixmap + + + Delete the selected item's pixmap. + + + + + itemChoosePixmap + + + + 30 + 22 + + + + ... + + + Select a Pixmap + + + Choose a pixmap file for the selected item. + + + + + Label1 + + + &Text: + + + itemText + + + + + itemText + + + + 0 + 0 + + + + Change text + + + Change the selected item's text. + + + + + + + itemNew + + + &New Item + + + Add an item + + + <b>Add a new item.</b><p>New items are appended to the list.</p> + + + + + itemDelete + + + &Delete Item + + + Delete Item + + + Delete the selected item + + + + + Vertical Spacing1 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + itemUp + + + + + + "designer_s_up.png" + + + Move up + + + Moves the selected item up. + + + + + itemDown + + + + + + "designer_s_down.png" + + + Move down + + + Move the selected item down. + + + + + + + itemNew + clicked() + ListBoxEditorBase + insertNewItem() + + + itemDelete + clicked() + ListBoxEditorBase + deleteCurrentItem() + + + itemText + textChanged( const TQString & ) + ListBoxEditorBase + currentTextChanged(const TQString&) + + + buttonOk + clicked() + ListBoxEditorBase + okClicked() + + + buttonApply + clicked() + ListBoxEditorBase + applyClicked() + + + buttonCancel + clicked() + ListBoxEditorBase + cancelClicked() + + + itemChoosePixmap + clicked() + ListBoxEditorBase + choosePixmap() + + + itemDeletePixmap + clicked() + ListBoxEditorBase + deletePixmap() + + + itemUp + clicked() + ListBoxEditorBase + moveItemUp() + + + itemDown + clicked() + ListBoxEditorBase + moveItemDown() + + + preview + selectionChanged(TQListBoxItem*) + ListBoxEditorBase + currentItemChanged(TQListBoxItem*) + + + preview + currentChanged( TQListBoxItem * ) + ListBoxEditorBase + currentItemChanged(TQListBoxItem*) + + + + buttonOk + buttonCancel + preview + itemNew + itemDelete + itemUp + itemDown + itemText + itemDeletePixmap + itemChoosePixmap + helpButton + buttonApply + + + init() + destroy() + insertNewItem() + deleteCurrentItem() + currentItemChanged( TQListBoxItem * ) + currentTextChanged( const TQString & ) + okClicked() + cancelClicked() + applyClicked() + choosePixmap() + deletePixmap() + moveItemUp() + moveItemDown() + + + myiconloader.h + +BarIcon2 + + diff --git a/kdevdesigner/designer/listboxeditorimpl.cpp b/kdevdesigner/designer/listboxeditorimpl.cpp new file mode 100644 index 00000000..01dfa64e --- /dev/null +++ b/kdevdesigner/designer/listboxeditorimpl.cpp @@ -0,0 +1,245 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "listboxeditorimpl.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "pixmapchooser.h" +#include "command.h" +#include "listboxdnd.h" +#include "listboxrename.h" + +#include +#include +#include +#include +#include + +#include + +ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) + : ListBoxEditorBase( parent, 0, TRUE ), formwindow( fw ) +{ + connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + listbox = (TQListBox*)editWidget; + + itemText->setText( "" ); + itemText->setEnabled( FALSE ); + itemPixmap->setText( "" ); + itemChoosePixmap->setEnabled( FALSE ); + itemDeletePixmap->setEnabled( FALSE ); + + TQListBoxItem *i = 0; + for ( i = listbox->firstItem(); i; i = i->next() ) { + if ( i->pixmap() ) + (void)new TQListBoxPixmap( preview, *i->pixmap(), i->text() ); + else + (void)new TQListBoxText( preview, i->text() ); + } + + if ( preview->firstItem() ) + preview->setCurrentItem( preview->firstItem() ); + + ListBoxDnd *editorDnd = new ListBoxDnd( preview ); + editorDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move ); + TQObject::connect( editorDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), + editorDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) ); + + ListBoxRename *editorRename = new ListBoxRename( preview ); + + TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" ); + TQObjectListIt it( *l ); + TQObject *obj; + while ( (obj = it.current()) != 0 ) { + ++it; + TQObject::connect( editorRename, + TQT_SIGNAL( itemTextChanged( const TQString & ) ), + obj, + TQT_SLOT( setText( const TQString & ) ) ); + } + delete l; + +} + +void ListBoxEditor::insertNewItem() +{ + TQListBoxItem *i = new TQListBoxText( preview, i18n("New Item") ); + preview->setCurrentItem( i ); + preview->setSelected( i, TRUE ); + itemText->setFocus(); + itemText->selectAll(); +} + +void ListBoxEditor::deleteCurrentItem() +{ + delete preview->item( preview->currentItem() ); + if ( preview->currentItem() != -1 ) + preview->setSelected( preview->currentItem(), TRUE ); +} + +void ListBoxEditor::currentItemChanged( TQListBoxItem *i ) +{ + itemText->blockSignals( TRUE ); + itemText->setText( "" ); + itemPixmap->setText( "" ); + itemText->blockSignals( FALSE ); + + if ( !i ) { + itemText->setEnabled( FALSE ); + itemChoosePixmap->setEnabled( FALSE ); + itemDeletePixmap->setEnabled( FALSE ); + return; + } + + itemText->blockSignals( TRUE ); + itemText->setEnabled( TRUE ); + itemChoosePixmap->setEnabled( TRUE ); + itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() ); + + itemText->setText( i->text() ); + if ( i->pixmap() ) + itemPixmap->setPixmap( *i->pixmap() ); + itemText->blockSignals( FALSE ); +} + +void ListBoxEditor::currentTextChanged( const TQString &txt ) +{ + if ( preview->currentItem() == -1 ) + return; + + preview->blockSignals( TRUE ); + if ( preview->item( preview->currentItem() )->pixmap() ) + preview->changeItem( *preview->item( preview->currentItem() )->pixmap(), txt, preview->currentItem() ); + else + preview->changeItem( txt, preview->currentItem() ); + preview->blockSignals( FALSE ); +} + +void ListBoxEditor::okClicked() +{ + applyClicked(); + accept(); +} + +void ListBoxEditor::cancelClicked() +{ + reject(); +} + +void ListBoxEditor::applyClicked() +{ + TQListBoxItem *i = 0; + TQValueList items; + for ( i = preview->firstItem(); i; i = i->next() ) { + PopulateListBoxCommand::Item item; + if ( i->pixmap() ) + item.pix = *i->pixmap(); + item.text = i->text(); + items.append( item ); + } + + PopulateListBoxCommand *cmd = new PopulateListBoxCommand( i18n( "Edit the Items of '%1'" ).arg( listbox->name() ), + formwindow, listbox, items ); + cmd->execute(); + formwindow->commandHistory()->addCommand( cmd ); +} + +void ListBoxEditor::choosePixmap() +{ + if ( preview->currentItem() == -1 ) + return; + + TQPixmap pix; + if ( preview->item( preview->currentItem() )->pixmap() ) + pix = qChoosePixmap( this, formwindow, *preview->item( preview->currentItem() )->pixmap() ); + else + pix = qChoosePixmap( this, formwindow, TQPixmap() ); + + if ( pix.isNull() ) + return; + + TQString txt = preview->item( preview->currentItem() )->text(); + preview->changeItem( pix, txt, preview->currentItem() ); + itemDeletePixmap->setEnabled( TRUE ); +} + +void ListBoxEditor::moveItemUp() +{ + if ( preview->currentItem() < 1 ) + return; + + TQListBoxItem *i = preview->item( preview->currentItem() ); + bool hasPix = (i->pixmap() != 0); + TQPixmap pix; + if ( hasPix ) + pix = *i->pixmap(); + TQString txt = i->text(); + + TQListBoxItem *p = i->prev(); + if ( p->pixmap() ) + preview->changeItem( *p->pixmap(), p->text(), preview->currentItem() ); + else + preview->changeItem( p->text(), preview->currentItem() ); + + if ( hasPix ) + preview->changeItem( pix, txt, preview->currentItem() - 1 ); + else + preview->changeItem( txt, preview->currentItem() - 1 ); +} + +void ListBoxEditor::moveItemDown() +{ + if ( preview->currentItem() == -1 || preview->currentItem() > (int)preview->count() - 2 ) + return; + + TQListBoxItem *i = preview->item( preview->currentItem() ); + bool hasPix = (i->pixmap() != 0); + TQPixmap pix; + if ( hasPix ) + pix = *i->pixmap(); + TQString txt = i->text(); + + TQListBoxItem *n = i->next(); + if ( n->pixmap() ) + preview->changeItem( *n->pixmap(), n->text(), preview->currentItem() ); + else + preview->changeItem( n->text(), preview->currentItem() ); + + if ( hasPix ) + preview->changeItem( pix, txt, preview->currentItem() + 1 ); + else + preview->changeItem( txt, preview->currentItem() + 1 ); +} + +void ListBoxEditor::deletePixmap() +{ + if ( preview->currentItem() == -1 ) + return; + + TQListBoxItem *i = preview->item( preview->currentItem() ); + preview->changeItem( i->text(), preview->currentItem() ); + itemDeletePixmap->setEnabled( FALSE ); +} diff --git a/kdevdesigner/designer/listboxeditorimpl.h b/kdevdesigner/designer/listboxeditorimpl.h new file mode 100644 index 00000000..28ca0254 --- /dev/null +++ b/kdevdesigner/designer/listboxeditorimpl.h @@ -0,0 +1,62 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef LISTBOXEDITORIMPL_H +#define LISTBOXEDITORIMPL_H + +class TQListBox; +class FormWindow; + +#include "listboxeditor.h" + +class ListBoxEditor : public ListBoxEditorBase +{ + Q_OBJECT + + +public: + ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ); + +protected slots: + void insertNewItem(); + void deleteCurrentItem(); + void currentItemChanged( TQListBoxItem * ); + void currentTextChanged( const TQString & ); + void okClicked(); + void cancelClicked(); + void applyClicked(); + void choosePixmap(); + void moveItemUp(); + void moveItemDown(); + void deletePixmap(); + +private: + TQListBox *listbox; + FormWindow *formwindow; + +}; + +#endif diff --git a/kdevdesigner/designer/listboxrename.cpp b/kdevdesigner/designer/listboxrename.cpp new file mode 100644 index 00000000..0a32d292 --- /dev/null +++ b/kdevdesigner/designer/listboxrename.cpp @@ -0,0 +1,157 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include +#include +#include +#include "listboxrename.h" + +class EditableListBoxItem : public TQListBoxItem +{ +public: + void setText( const TQString & text ) + { + TQListBoxItem::setText( text ); + } +}; + +ListBoxRename::ListBoxRename( TQListBox * eventSource, const char * name ) + : TQObject( eventSource, name ), + clickedItem( 0 ), activity( FALSE ) +{ + src = eventSource; + src->installEventFilter( this ); + ed = new TQLineEdit( src->viewport() ); + ed->hide(); + ed->setFrame( FALSE ); + + TQObject::connect( ed, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( renameClickedItem() ) ); +} + +bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) +{ + switch ( event->type() ) { + + case TQEvent::MouseButtonPress: + { + TQPoint pos = ((TQMouseEvent *) event)->pos(); + + if ( clickedItem && + clickedItem->isSelected() && + (clickedItem == src->itemAt( pos )) ) { + TQTimer::singleShot( 500, this, TQT_SLOT( showLineEdit() ) ); + activity = FALSE; // no drags or clicks for 500 ms before we start the renaming + } else { // new item clicked + activity = TRUE; + clickedItem = src->itemAt( pos ); + ed->hide(); + } + } + break; + + case TQEvent::MouseMove: + + if ( ((TQMouseEvent *) event)->state() & Qt::LeftButton ) { + activity = TRUE; // drag + } + break; + + case TQEvent::KeyPress: + + switch ( ((TQKeyEvent *) event)->key() ) { + + case TQt::Key_F2: + + activity = FALSE; + clickedItem = src->item( src->currentItem() ); + showLineEdit(); + break; + + case TQt::Key_Escape: + if ( !ed->isHidden() ) { + hideLineEdit(); // abort rename + return TRUE; + } + break; + + case TQt::Key_Up: + case TQt::Key_Down: + case TQt::Key_PageUp: + case TQt::Key_PageDown: + + if ( !ed->isHidden() ) + return TRUE; // Filter out the keystrokes + break; + + } + break; + + case TQEvent::Resize: + + if ( clickedItem && ed && !ed->isHidden() ) { + TQRect rect = src->itemRect( clickedItem ); + ed->resize( rect.right() - rect.left() - 1, + rect.bottom() - rect.top() - 1 ); + } + break; + + default: + break; + } + + return FALSE; +} + +void ListBoxRename::showLineEdit() +{ + if ( !clickedItem || activity ) + return; + TQRect rect = src->itemRect( clickedItem ); + ed->resize( rect.right() - rect.left() - 1, + rect.bottom() - rect.top() - 1 ); + ed->move( rect.left() + 1, rect.top() + 1 ); + ed->setText( clickedItem->text() ); + ed->selectAll(); + ed->show(); + ed->setFocus(); +} + +void ListBoxRename::hideLineEdit() +{ + ed->hide(); + clickedItem = 0; + src->setFocus(); +} + +void ListBoxRename::renameClickedItem() +{ + if ( clickedItem && ed ) { + ( (EditableListBoxItem *) clickedItem )->setText( ed->text() ); + emit itemTextChanged( ed->text() ); + } + hideLineEdit(); +} diff --git a/kdevdesigner/designer/listboxrename.h b/kdevdesigner/designer/listboxrename.h new file mode 100644 index 00000000..ec666f70 --- /dev/null +++ b/kdevdesigner/designer/listboxrename.h @@ -0,0 +1,58 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef LISTBOXRENAME_H +#define LISTBOXRENAME_H + +#include +#include + +class TQLineEdit; + +class ListBoxRename : public TQObject +{ + Q_OBJECT + +public: + ListBoxRename( TQListBox * eventSource, const char * name = 0 ); + bool eventFilter( TQObject *, TQEvent * event ); + +signals: + void itemTextChanged( const TQString & ); + +public slots: + void showLineEdit(); + void hideLineEdit(); + void renameClickedItem(); + +private: + TQListBoxItem * clickedItem; + TQListBox * src; + TQLineEdit * ed; + bool activity; +}; + +#endif //LISTBOXRENAME_H diff --git a/kdevdesigner/designer/listdnd.cpp b/kdevdesigner/designer/listdnd.cpp new file mode 100644 index 00000000..8431fd18 --- /dev/null +++ b/kdevdesigner/designer/listdnd.cpp @@ -0,0 +1,142 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "listdnd.h" +#include +#include + +ListDnd::ListDnd( TQScrollView * eventSource, const char * name ) + : TQObject( eventSource, name ), + dragInside( FALSE ), dragDelete( TRUE ), dropConfirmed( FALSE ), dMode( Both ) +{ + src = eventSource; + src->setAcceptDrops( TRUE ); + src->installEventFilter( this ); + src->viewport()->installEventFilter( this ); + + line = new TQWidget( src->viewport(), 0, TQt::WStyle_NoBorder | WStyle_StaysOnTop ); + line->setBackgroundColor( TQt::black ); + line->resize( src->viewport()->width(), 2 ); + line->hide(); +} + +void ListDnd::setDragMode( int mode ) +{ + dMode = mode; +} + +int ListDnd::dragMode() const +{ + return dMode; +} + +bool ListDnd::eventFilter( TQObject *, TQEvent * event ) +{ + switch ( event->type() ) { + case TQEvent::DragEnter: + return dragEnterEvent( (TQDragEnterEvent *) event ); + case TQEvent::DragLeave: + return dragLeaveEvent( (TQDragLeaveEvent *) event ); + case TQEvent::DragMove: + return dragMoveEvent( (TQDragMoveEvent *) event ); + case TQEvent::Drop: + return dropEvent( (TQDropEvent *) event ); + case TQEvent::MouseButtonPress: + return mousePressEvent( (TQMouseEvent *) event ); + case TQEvent::MouseMove: + return mouseMoveEvent( (TQMouseEvent *) event ); + default: + break; + } + return FALSE; +} + + +bool ListDnd::dragEnterEvent( TQDragEnterEvent * event ) +{ + if ( dMode == None ) { + return TRUE; + } + + bool ok = ( ( ( dMode & Both ) == Both ) || + ( ( dMode & Internal ) && ( event->source() == src ) ) || + ( ( dMode & External ) && ( event->source() != src ) ) ); + + if ( ok && canDecode( event ) ) { + event->accept(); + dragInside = TRUE; + if ( !( dMode & NullDrop ) ) { + updateLine( event->pos() ); + line->show(); + } + } + return TRUE; +} + +bool ListDnd::dragLeaveEvent( TQDragLeaveEvent * ) +{ + dragInside = FALSE; + line->hide(); + return TRUE; +} + +bool ListDnd::dragMoveEvent( TQDragMoveEvent * event ) +{ + if ( dragInside && dMode && !( dMode & NullDrop ) ) { + updateLine( event->pos() ); + } + return TRUE; +} + +bool ListDnd::dropEvent( TQDropEvent * ) +{ + // do nothing + return FALSE; +} + +bool ListDnd::mousePressEvent( TQMouseEvent * event ) +{ + if ( event->button() == Qt::LeftButton ) + mousePressPos = event->pos(); + return FALSE; +} + +bool ListDnd::mouseMoveEvent( TQMouseEvent * ) +{ + // do nothing + return FALSE; +} + +void ListDnd::updateLine( const TQPoint & ) +{ + // do nothing +} + +bool ListDnd::canDecode( TQDragEnterEvent * ) +{ + // do nothing + return FALSE; +} diff --git a/kdevdesigner/designer/listdnd.h b/kdevdesigner/designer/listdnd.h new file mode 100644 index 00000000..39e1af11 --- /dev/null +++ b/kdevdesigner/designer/listdnd.h @@ -0,0 +1,64 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef LISTDND_H +#define LISTDND_H + +#include +#include + +class ListDnd : public TQObject +{ + Q_OBJECT + +public: + enum DragMode { None = 0, External = 1, Internal = 2, Both = 3, Move = 4, NullDrop = 8 }; + ListDnd( TQScrollView * eventSource, const char * name = 0 ); + void setDragMode( int mode ); + int dragMode() const; + bool eventFilter( TQObject *, TQEvent * event ); + +protected: + virtual bool dragEnterEvent( TQDragEnterEvent * event ); + virtual bool dragLeaveEvent( TQDragLeaveEvent * ); + virtual bool dragMoveEvent( TQDragMoveEvent * event ); + virtual bool dropEvent( TQDropEvent * event ); + virtual bool mousePressEvent( TQMouseEvent * event ); + virtual bool mouseMoveEvent( TQMouseEvent * event ); + virtual void updateLine( const TQPoint & dragPos ); + virtual bool canDecode( TQDragEnterEvent * event ); + + TQScrollView * src; + TQWidget * line; + TQPoint mousePressPos; + TQPoint dragPos; + bool dragInside; + bool dragDelete; + bool dropConfirmed; + int dMode; +}; + +#endif // LISTDND_H diff --git a/kdevdesigner/designer/listeditor.ui b/kdevdesigner/designer/listeditor.ui new file mode 100644 index 00000000..c477ff1a --- /dev/null +++ b/kdevdesigner/designer/listeditor.ui @@ -0,0 +1,179 @@ + +ListEditor +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + ListEditor + + + + 0 + 0 + 331 + 301 + + + + Edit + + + + unnamed + + + 11 + + + 6 + + + + + Column 1 + + + true + + + true + + + + listview + + + Extended + + + AllColumns + + + + + PushButton1 + + + &Add + + + + + PushButton2 + + + &Remove + + + + + PushButton3 + + + Re&name + + + + + PushButton4 + + + &Close + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + + + PushButton1 + clicked() + ListEditor + addItem() + + + PushButton2 + clicked() + ListEditor + removeItems() + + + PushButton4 + clicked() + ListEditor + accept() + + + listview + itemRenamed(TQListViewItem*,int) + ListEditor + renamed(TQListViewItem*) + + + PushButton3 + clicked() + ListEditor + renameItem() + + + + listeditor.ui.h + + + class TQStringList; + + + init() + setList( const TQStringList & l ) + addItem() + renamed( TQListViewItem * i ) + removeItems() + items() + renameItem() + + + myiconloader.h + +BarIcon2 + + + diff --git a/kdevdesigner/designer/listeditor.ui.h b/kdevdesigner/designer/listeditor.ui.h new file mode 100644 index 00000000..7f179cef --- /dev/null +++ b/kdevdesigner/designer/listeditor.ui.h @@ -0,0 +1,72 @@ +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +** +** If you wish to add, delete or rename slots use TQt Designer which will +** update this file, preserving your code. Create an init() slot in place of +** a constructor, and a destroy() slot in place of a destructor. +*****************************************************************************/ + +#include +#include + +void ListEditor::init() +{ + listview->header()->hide(); + listview->setSorting( -1 ); + listview->setDefaultRenameAction( TQListView::Accept ); +} + +void ListEditor::setList( const TQStringList &l ) +{ + TQListViewItem *i = 0; + for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { + i = new TQListViewItem( listview, i ); + i->setText( 0, *it ); + i->setRenameEnabled( 0, TRUE ); + } +} + +void ListEditor::addItem() +{ + TQListViewItem *i = new TQListViewItem( listview, listview->lastItem() ); + i->setRenameEnabled( 0, TRUE ); + tqApp->processEvents(); + i->startRename( 0 ); +} + +void ListEditor::renamed( TQListViewItem *i ) +{ + if ( i && i->text( 0 ).isEmpty() ) + i->startRename( 0 ); +} + +void ListEditor::removeItems() +{ + TQListViewItemIterator it( listview ); + TQListViewItem *i = 0; + while ( ( i = it.current() ) ) { + ++it; + if ( i->isSelected() ) + delete i; + } +} + +TQStringList ListEditor::items() +{ + TQStringList l; + TQListViewItemIterator it( listview ); + TQListViewItem *i = 0; + while ( ( i = it.current() ) ) { + ++it; + if ( !i->text( 0 ).isEmpty() ) + l << i->text( 0 ); + } + return l; +} + +void ListEditor::renameItem() +{ + TQListViewItem *i = listview->currentItem(); + if ( i ) + i->startRename( 0 ); +} diff --git a/kdevdesigner/designer/listviewdnd.cpp b/kdevdesigner/designer/listviewdnd.cpp new file mode 100644 index 00000000..32dcc6d5 --- /dev/null +++ b/kdevdesigner/designer/listviewdnd.cpp @@ -0,0 +1,432 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "listviewdnd.h" +#include +#include +#include +#include +#include + +// The Dragobject Declaration --------------------------------------- +class ListViewItemDrag : public TQStoredDrag +{ +public: + enum DropRelation { Sibling, Child }; + ListViewItemDrag( ListViewItemList & items, TQWidget * parent = 0, const char * name = 0 ); + ~ListViewItemDrag() {}; + static bool canDecode( TQDragMoveEvent * event ); + static bool decode( TQDropEvent * event, TQListView * parent, TQListViewItem * insertPoint, DropRelation dr ); +}; +// ------------------------------------------------------------------ + +ListViewDnd::ListViewDnd( TQListView * eventSource, const char * name ) + : ListDnd( eventSource, name ) { } + +void ListViewDnd::confirmDrop( TQListViewItem * ) +{ + dropConfirmed = TRUE; +} + +bool ListViewDnd::dropEvent( TQDropEvent * event ) +{ + if ( dragInside ) { + + if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item + event->accept(); + emit dropped( 0 ); // a NullDrop + return TRUE; + } + + TQPoint pos = event->pos(); + + ListViewItemDrag::DropRelation dr = ListViewItemDrag::Sibling; + TQListViewItem *item = itemAt( pos ); + int dpos = dropDepth( item, pos ); + + if ( item ) { + if ( dpos > item->depth() && !(dMode & Flat) ) { + // Child node + dr = ListViewItemDrag::Child; + } else if ( dpos < item->depth() ) { + // Parent(s) Sibling + while ( item && (item->depth() > dpos) ) + item = item->parent(); + } + } + + if ( ListViewItemDrag::decode( event, (TQListView *) src, item, dr ) ) { + event->accept(); + emit dropped( 0 ); // Use ID instead of item? + } + } + + line->hide(); + dragInside = FALSE; + + return TRUE; +} + +bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event ) +{ + if ( event->state() & Qt::LeftButton ) { + if ( ( event->pos() - mousePressPos ).manhattanLength() > 3 ) { + ListViewItemList list; + + if ( dMode & Flat ) + buildFlatList( list ); + else + buildTreeList( list ); + + ListViewItemDrag * dragobject = new ListViewItemDrag( list, (TQListView *) src ); + + if ( dMode & Move ) { + disabledItems = list; + setVisibleItems( FALSE ); + } + + dragobject->dragCopy(); + + if ( dMode & Move ) { + // Did the target accept the drop? + if ( dropConfirmed ) { + // Shouldn't autoDelete handle this? + for( list.first(); list.current(); list.next() ) + delete list.current(); + dropConfirmed = FALSE; + } else { + // Reenable disabled items since + // drag'n'drop was aborted + setVisibleItems( TRUE ); + } + disabledItems.clear(); + } + } + } + return FALSE; +} + +int ListViewDnd::buildFlatList( ListViewItemList & list ) +{ + bool addKids = FALSE; + TQListViewItem *nextSibling = 0; + TQListViewItem *nextParent = 0; + TQListViewItemIterator it = ((TQListView *)src)->firstChild(); + for ( ; *it; it++ ) { + // Hit the nextSibling, turn of child processing + if ( (*it) == nextSibling ) + addKids = FALSE; + + if ( (*it)->isSelected() ) { + if ( (*it)->childCount() == 0 ) { + // Selected, no children + list.append( *it ); + } else if ( !addKids ) { + // Children processing not set, so set it + // Also find the item were we shall quit + // processing children...if any such item + addKids = TRUE; + nextSibling = (*it)->nextSibling(); + nextParent = (*it)->parent(); + while ( nextParent && !nextSibling ) { + nextSibling = nextParent->nextSibling(); + nextParent = nextParent->parent(); + } + } + } else if ( ((*it)->childCount() == 0) && addKids ) { + // Leaf node, and we _do_ process children + list.append( *it ); + } + } + return list.count(); +} + +int ListViewDnd::buildTreeList( ListViewItemList & list ) +{ + TQListViewItemIterator it = ((TQListView *)src)->firstChild(); + for ( ; *it; it++ ) { + if ( (*it)->isSelected() ) + list.append( *it ); + } + return list.count(); +} + +void ListViewDnd::setVisibleItems( bool b ) +{ + if ( disabledItems.isEmpty() ) + return; + + disabledItems.first(); + do { + disabledItems.current()->setVisible( b ); + } while ( disabledItems.next() ); +} + +void ListViewDnd::updateLine( const TQPoint & dragPos ) +{ + TQListViewItem * item = itemAt(dragPos); + TQListView * src = (TQListView *) this->src; + + int ypos = item ? + ( src->itemRect( item ).bottom() - ( line->height() / 2 ) ) : + ( src->itemRect( src->firstChild() ).top() ); + + int xpos = dropDepth( item, dragPos ) * src->treeStepSize(); + line->resize( src->viewport()->width() - xpos, line->height() ); + line->move( xpos, ypos ); +} + +TQListViewItem * ListViewDnd::itemAt( TQPoint pos ) +{ + TQListView * src = (TQListView *) this->src; + int headerHeight = (int)(src->header()->height()); + pos.ry() -= headerHeight; + TQListViewItem * result = src->itemAt( pos ); + + if ( result && ( pos.ry() < (src->itemPos(result) + result->height()/2) ) ) + result = result->itemAbove(); + + // Wind back if has parent, and we're in flat mode + while ( result && result->parent() && (dMode & Flat) ) + result = result->parent(); + + // Wind back if has parent, and we're in flat mode + while ( result && !result->isVisible() && result->parent() ) + result = result->parent(); + + if ( !result && src->firstChild() && (pos.y() > src->itemRect(src->firstChild()).bottom()) ) { + result = src->lastItem(); + if ( !result->isVisible() ) + // Handle special case where last item is actually hidden + result = result->itemAbove(); + } + + return result; +} + +int ListViewDnd::dropDepth( TQListViewItem * item, TQPoint pos ) +{ + if ( !item || (dMode & Flat) ) + return 0; + + int result = 0; + int itemDepth = item->depth(); + int indentSize = ((TQListView *)src)->treeStepSize(); + int itemLeft = indentSize * itemDepth; + int childMargin = indentSize*2; + if ( pos.x() > itemLeft + childMargin ) { + result = itemDepth + 1; + } else if ( pos.x() < itemLeft ) { + result = pos.x() / indentSize; + } else { + result = itemDepth; + } + return result; +} + +bool ListViewDnd::canDecode( TQDragEnterEvent * event ) +{ + return ListViewItemDrag::canDecode( event ); +} + +// ------------------------------------------------------------------ +// The Dragobject Implementation ------------------------------------ +// ------------------------------------------------------------------ + +TQDataStream & operator<< ( TQDataStream & stream, const TQListViewItem & item ); +TQDataStream & operator>> ( TQDataStream & stream, TQListViewItem & item ); + +ListViewItemDrag::ListViewItemDrag( ListViewItemList & items, TQWidget * parent, const char * name ) + : TQStoredDrag( "qt/listviewitem", parent, name ) +{ + // ### FIX! + TQByteArray data( sizeof( TQ_INT32 ) + sizeof( TQListViewItem ) * items.count() ); + TQDataStream stream( data, IO_WriteOnly ); + + stream << items.count(); + + TQListViewItem *i = items.first(); + while ( i ) { + stream << *i; + i = items.next(); + } + + setEncodedData( data ); +} + +bool ListViewItemDrag::canDecode( TQDragMoveEvent * event ) +{ + return event->provides( "qt/listviewitem" ); +} + +bool ListViewItemDrag::decode( TQDropEvent * event, TQListView * parent, TQListViewItem * insertPoint, DropRelation dr ) +{ + TQByteArray data = event->encodedData( "qt/listviewitem" ); + TQListViewItem* itemParent = insertPoint ? insertPoint->parent() : 0; + + // Change from sibling (default) to child creation + if ( insertPoint && dr == Child ) { + itemParent = insertPoint; + insertPoint = 0; + } + + if ( data.size() ) { + event->accept(); + TQDataStream stream( data, IO_ReadOnly ); + + int count = 0; + stream >> count; + + for( int i = 0; i < count; i++ ) { + if ( itemParent ) { + insertPoint = new TQListViewItem( itemParent, insertPoint ); + itemParent->setOpen( TRUE ); + } else { // No parent for insertPoint, use TQListView + insertPoint = new TQListViewItem( parent, insertPoint ); + } + stream >> *insertPoint; + } + return TRUE; + } + return FALSE; +} + + +TQDataStream & operator<< ( TQDataStream & stream, const TQListViewItem & item ) +{ + int columns = item.listView()->columns(); + stream << columns; + + TQ_UINT8 b = 0; + + int i; + for ( i = 0; i < columns; i++ ) { + b = (TQ_UINT8) ( item.text( i ) != TQString() ); // does column i have a string ? + stream << b; + if ( b ) { + stream << item.text( i ); + } + } + + for ( i = 0; i < columns; i++ ) { + b = (TQ_UINT8) ( !!item.pixmap( i ) ); // does column i have a pixmap ? + stream << b; + if ( b ) { + stream << ( *item.pixmap( i ) ); + } + } + + stream << (TQ_UINT8) item.isOpen(); + stream << (TQ_UINT8) item.isSelectable(); + stream << (TQ_UINT8) item.isExpandable(); + stream << (TQ_UINT8) item.dragEnabled(); + stream << (TQ_UINT8) item.dropEnabled(); + stream << (TQ_UINT8) item.isVisible(); + + for ( i = 0; i < columns; i++ ) { + stream << (TQ_UINT8) item.renameEnabled( i ); + } + + stream << (TQ_UINT8) item.multiLinesEnabled(); + stream << item.childCount(); + + if ( item.childCount() > 0 ) { + TQListViewItem * child = item.firstChild(); + while ( child ) { + stream << ( *child ); // recursive call + child = child->nextSibling(); + } + } + + return stream; +} + +TQDataStream & operator>> ( TQDataStream & stream, TQListViewItem & item ) +{ + TQ_INT32 columns; + stream >> columns; + + TQ_UINT8 b = 0; + + TQString text; + int i; + for ( i = 0; i < columns; i++ ) { + stream >> b; + if ( b ) { // column i has string ? + stream >> text; + item.setText( i, text ); + } + } + + TQPixmap pixmap; + for ( i = 0; i < columns; i++ ) { + stream >> b; // column i has pixmap ? + if ( b ) { + stream >> pixmap; + item.setPixmap( i, pixmap ); + } + } + + stream >> b; + item.setOpen( b ); + + stream >> b; + item.setSelectable( b ); + + stream >> b; + item.setExpandable( b ); + + stream >> b; + item.setDragEnabled( b ); + + stream >> b; + item.setDropEnabled( b ); + + stream >> b; + item.setVisible( b ); + + for ( i = 0; i < columns; i++ ) { + stream >> b; + item.setRenameEnabled( i, b ); + } + + stream >> b; + item.setMultiLinesEnabled( b ); + + int childCount; + stream >> childCount; + + TQListViewItem *child = 0; + TQListViewItem *prevchild = 0; + for ( i = 0; i < childCount; i++ ) { + child = new TQListViewItem( &item, prevchild ); + stream >> ( *child ); + item.insertItem( child ); + prevchild = child; + } + + return stream; +} diff --git a/kdevdesigner/designer/listviewdnd.h b/kdevdesigner/designer/listviewdnd.h new file mode 100644 index 00000000..5a59f4ad --- /dev/null +++ b/kdevdesigner/designer/listviewdnd.h @@ -0,0 +1,67 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef LISTVIEWDND_H +#define LISTVIEWDND_H + +#include +#include +#include "listdnd.h" + +class TQWidget; +class TQListView; +typedef TQPtrList ListViewItemList; + +class ListViewDnd : public ListDnd +{ + Q_OBJECT + +public: + enum DragMode { Flat = 16 }; // see ListDnd::DragMode + + ListViewDnd( TQListView * eventSource, const char * name = 0 ); + +signals: + void dropped( TQListViewItem * ); + +public slots: + void confirmDrop( TQListViewItem * ); + +protected: + virtual bool dropEvent( TQDropEvent * event ); + virtual bool mouseMoveEvent( TQMouseEvent * event ); + virtual void updateLine( const TQPoint & pos ); + virtual bool canDecode( TQDragEnterEvent * event ); +private: + TQListViewItem * itemAt( TQPoint pos ); + int dropDepth( TQListViewItem * item, TQPoint pos ); + int buildFlatList( ListViewItemList & list ); + int buildTreeList( ListViewItemList & list ); + void setVisibleItems( bool b ); + ListViewItemList disabledItems; +}; + +#endif //LISTVIEWDND_H diff --git a/kdevdesigner/designer/listvieweditor.ui b/kdevdesigner/designer/listvieweditor.ui new file mode 100644 index 00000000..8a0abe14 --- /dev/null +++ b/kdevdesigner/designer/listvieweditor.ui @@ -0,0 +1,935 @@ + +ListViewEditorBase +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + ListViewEditorBase + + + + 0 + 0 + 567 + 398 + + + + Edit Listview + + + true + + + <b>Edit Listview</b><p>Use the controls on the <b>Items</b>-tab to add, edit or delete items in the listview. Change the column configuration of the listview using the controls on the <b>Columns</b>-tab.</p>Click the <b>New Item</b>-button to create a new item, then enter text and add a pixmap.</p><p>Select an item from the list and click the <b>Delete Item</b>-button to remove the item from the list.</p> + + + + unnamed + + + 11 + + + 6 + + + + tabWidget + + + + Widget10 + + + &Items + + + + unnamed + + + 11 + + + 6 + + + + itemDelete + + + &Delete Item + + + Delete item + + + <b>Deletes the selected item.</b><p>Any sub-items are also deleted.</p> + + + + + GroupBox1 + + + + 0 + 5 + 0 + 0 + + + + Item Properties + + + + unnamed + + + 11 + + + 6 + + + + Label2 + + + Pi&xmap: + + + itemChoosePixmap + + + + + Label1 + + + &Text: + + + itemText + + + + + itemText + + + + 0 + 0 + + + + Change text + + + <b>Change the text of the item.</b><p>The text will be changed in the current column of the selected item.</p> + + + + + itemColumn + + + Change column + + + <b>Select the current column.</b><p>The item's text and pixmap will be changed for the current column</p> + + + + + Label4 + + + Colu&mn: + + + itemColumn + + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + itemPixmap + + + Label4 + + + + + itemDeletePixmap + + + + 30 + 22 + + + + + + + "designer_s_editcut.png" + + + Delete Pixmap + + + <b>Delete the selected item's pixmap.</b><p>The pixmap in the current column of the selected item will be deleted.</p> + + + + + itemChoosePixmap + + + + 30 + 22 + + + + ... + + + Select a Pixmap + + + <b>Select a pixmap file for the item.</b><p>The pixmap will be changed in the current column of the selected item.</p> + + + + + + + + + itemNew + + + &New Item + + + Add an item + + + <b>Adds a new item to the list.</b><p>The item will be inserted at the top of the list and can be moved using the up- and down-buttons.</p> + + + + + itemsPreview + + + The list of items. + + + + + itemNewSub + + + New &Subitem + + + Add a subitem + + + <b>Create a new sub-item for the selected item.</b><p>New sub-items are inserted at the top of the list of sub-items, and new levels are created automatically.</p> + + + + + Vertical Spacing1 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + itemUp + + + + + + "designer_s_up.png" + + + Move up + + + <b>Move the selected item up.</b><p>The item will be moved within its level in the hierarchy.</p> + + + + + itemDown + + + + + + "designer_s_down.png" + + + Move down + + + <b>Move the selected item down.</b><p>The item will be moved within its level in the hierarchy.</p> + + + + + itemLeft + + + + + + "designer_s_left.png" + + + Move left + + + <b>Move the selected item one level up.</b><p>This will also change the level of the item's sub-items.</p> + + + + + itemRight + + + + + + "designer_s_right.png" + + + Move right + + + <b>Move the selected item one level down.</b><p>This will also change the level of the item's sub-items.</p> + + + + + + + Widget11 + + + Co&lumns + + + + unnamed + + + 11 + + + 6 + + + + GroupBox1 + + + Column Properties + + + + unnamed + + + 11 + + + 6 + + + + Label2 + + + &Pixmap: + + + colChoosePixmap + + + + + colPixmap + + + Label4 + + + + + colDeletePixmap + + + + 30 + 22 + + + + + + + "designer_s_editcut.png" + + + Delete Pixmap + + + Delete the pixmap of the selected column. + + + + + colChoosePixmap + + + + 30 + 22 + + + + ... + + + Select a Pixmap + + + <b>Select a pixmap file for the selected column.</b><p>The pixmap will be displayed in the header of the listview.</p> + + + + + Label1 + + + &Text: + + + colText + + + + + colText + + + + 0 + 0 + + + + Enter column text + + + <b>Enter the text for the selected column.</b><p>The text will be displayed in the header of the listview.</p> + + + + + colClickable + + + Clicka&ble + + + If this option is checked, the selected column will react to mouse clicks on the header. + + + + + colResizable + + + Re&sizable + + + The column's width will be resizable if this option is checked. + + + + + + + colDelete + + + &Delete Column + + + Delete column + + + Deletes the selected Column. + + + + + colDown + + + + + + "designer_s_down.png" + + + Move down + + + <b>Move the selected item down.</b><p>The top-most column will be the first column in the list.</p> + + + + + colNew + + + &New Column + + + Add a Column + + + <b>Create a new column.</b><p>New columns are appended at the end of (right of) the list and may be moved using the up- and down-buttons.</p> + + + + + colUp + + + + + + "designer_s_up.png" + + + Move up + + + <b>Move the selected item up.</b><p>The top-most column will be the first column in the list.</p> + + + + + colPreview + + + The list of columns. + + + + + Vertical Spacing2 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + helpButton + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + okButton + + + &OK + + + true + + + true + + + Close the dialog and apply all the changes. + + + + + applyButton + + + &Apply + + + true + + + Apply all changes. + + + + + cancelButton + + + &Cancel + + + true + + + Close the dialog and discard any changes. + + + + + + + + + cancelButton + clicked() + ListViewEditorBase + reject() + + + itemNew + clicked() + ListViewEditorBase + itemNewClicked() + + + itemDelete + clicked() + ListViewEditorBase + itemDeleteClicked() + + + itemUp + clicked() + ListViewEditorBase + itemUpClicked() + + + itemDown + clicked() + ListViewEditorBase + itemDownClicked() + + + itemColumn + valueChanged(int) + ListViewEditorBase + itemColChanged(int) + + + itemText + textChanged(const TQString&) + ListViewEditorBase + itemTextChanged(const TQString&) + + + itemDeletePixmap + clicked() + ListViewEditorBase + itemPixmapDeleted() + + + itemChoosePixmap + clicked() + ListViewEditorBase + itemPixmapChoosen() + + + colNew + clicked() + ListViewEditorBase + newColumnClicked() + + + colDelete + clicked() + ListViewEditorBase + deleteColumnClicked() + + + colUp + clicked() + ListViewEditorBase + columnUpClicked() + + + colDown + clicked() + ListViewEditorBase + columnDownClicked() + + + colText + textChanged(const TQString&) + ListViewEditorBase + columnTextChanged(const TQString&) + + + colDeletePixmap + clicked() + ListViewEditorBase + columnPixmapDeleted() + + + colChoosePixmap + clicked() + ListViewEditorBase + columnPixmapChosen() + + + colResizable + toggled(bool) + ListViewEditorBase + columnResizable(bool) + + + colClickable + toggled(bool) + ListViewEditorBase + columnClickable(bool) + + + tabWidget + selected(const TQString&) + ListViewEditorBase + initTabPage(const TQString&) + + + okButton + clicked() + ListViewEditorBase + okClicked() + + + applyButton + clicked() + ListViewEditorBase + applyClicked() + + + colPreview + currentChanged(TQListBoxItem*) + ListViewEditorBase + currentColumnChanged(TQListBoxItem*) + + + colPreview + selectionChanged(TQListBoxItem*) + ListViewEditorBase + currentColumnChanged(TQListBoxItem*) + + + itemsPreview + currentChanged(TQListViewItem*) + ListViewEditorBase + currentItemChanged(TQListViewItem*) + + + itemsPreview + selectionChanged(TQListViewItem*) + ListViewEditorBase + currentItemChanged(TQListViewItem*) + + + itemNewSub + clicked() + ListViewEditorBase + itemNewSubClicked() + + + itemLeft + clicked() + ListViewEditorBase + itemLeftClicked() + + + itemRight + clicked() + ListViewEditorBase + itemRightClicked() + + + + okButton + cancelButton + tabWidget + itemsPreview + itemNew + itemNewSub + itemDelete + itemUp + itemDown + itemLeft + itemRight + itemColumn + itemText + itemDeletePixmap + itemChoosePixmap + helpButton + applyButton + colPreview + colNew + colDelete + colUp + colDown + colText + colDeletePixmap + colChoosePixmap + colClickable + colResizable + + + init() + destroy() + applyClicked() + columnClickable(bool) + columnDownClicked() + columnPixmapChosen() + columnPixmapDeleted() + columnResizable(bool) + columnTextChanged(const TQString &) + columnUpClicked() + currentColumnChanged(TQListBoxItem*) + currentItemChanged(TQListViewItem*) + deleteColumnClicked() + initTabPage(const TQString &) + itemColChanged(int) + itemDeleteClicked() + itemDownClicked() + itemLeftClicked() + itemNewClicked() + itemNewSubClicked() + itemPixmapChoosen() + itemPixmapDeleted() + itemTextChanged(const TQString &) + itemUpClicked() + newColumnClicked() + itemRightClicked() + okClicked() + + + myiconloader.h + +BarIcon2 + + + diff --git a/kdevdesigner/designer/listvieweditorimpl.cpp b/kdevdesigner/designer/listvieweditorimpl.cpp new file mode 100644 index 00000000..c5ec7498 --- /dev/null +++ b/kdevdesigner/designer/listvieweditorimpl.cpp @@ -0,0 +1,650 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "formwindow.h" +#include "mainwindow.h" +#include "listvieweditorimpl.h" +#include "pixmapchooser.h" +#include "command.h" +#include "listviewdnd.h" +#include "listboxdnd.h" +#include "listboxrename.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw ) + : ListViewEditorBase( parent, 0, TRUE ), listview( lv ), formwindow( fw ) +{ + connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + itemText->setEnabled( FALSE ); + itemChoosePixmap->setEnabled( FALSE ); + itemDeletePixmap->setEnabled( FALSE ); + itemColumn->setEnabled( FALSE ); + + setupColumns(); + PopulateListViewCommand::transferItems( listview, itemsPreview ); + setupItems(); + + itemsPreview->setShowSortIndicator( listview->showSortIndicator() ); + itemsPreview->setAllColumnsShowFocus( listview->allColumnsShowFocus() ); + itemsPreview->setRootIsDecorated( listview->rootIsDecorated() ); + + if ( itemsPreview->firstChild() ) { + itemsPreview->setCurrentItem( itemsPreview->firstChild() ); + itemsPreview->setSelected( itemsPreview->firstChild(), TRUE ); + } + + // Clamp on drag and drop to TQListView + ListViewDnd *itemsDnd = new ListViewDnd( itemsPreview ); + itemsDnd->setDragMode( ListViewDnd::Internal | ListViewDnd::Move ); + TQObject::connect( itemsDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ), + itemsDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) ); + + // Enable rename for all TQListViewItems + TQListViewItemIterator it = ((TQListView *)itemsPreview)->firstChild(); + for ( ; *it; it++ ) + (*it)->setRenameEnabled( 0, TRUE ); + + // Connect listview signal to signal-relay + TQObject::connect( itemsPreview, + TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ), + this, + TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); + + // Connect signal-relay to TQLineEdit "itemText" + TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" ); + TQObject *obj; + TQObjectListIt itemsLineEditIt( *l ); + while ( (obj = itemsLineEditIt.current()) != 0 ) { + ++itemsLineEditIt; + TQObject::connect( this, + TQT_SIGNAL( itemRenamed( const TQString & ) ), + obj, + TQT_SLOT( setText( const TQString & ) ) ); + } + delete l; + + // Clamp on drag and drop to TQListBox + ListBoxDnd *columnsDnd = new ListBoxDnd( colPreview ); + columnsDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move ); + TQObject::connect( columnsDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), + columnsDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) ); + + // Clamp on rename to TQListBox + ListBoxRename *columnsRename = new ListBoxRename( colPreview ); + TQObject::connect( columnsRename, + TQT_SIGNAL( itemTextChanged( const TQString & ) ), + this, + TQT_SLOT( columnTextChanged( const TQString & ) ) ); + + // Find TQLineEdit "colText" and connect + l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "colText" ); + TQObjectListIt columnsLineEditIt( *l ); + while ( (obj = columnsLineEditIt.current()) != 0 ) { + ++columnsLineEditIt; + TQObject::connect( columnsRename, + TQT_SIGNAL( itemTextChanged( const TQString & ) ), + obj, + TQT_SLOT( setText( const TQString & ) ) ); + } + delete l; +} + +void ListViewEditor::applyClicked() +{ + setupItems(); + PopulateListViewCommand *cmd = new PopulateListViewCommand( i18n( "Edit the Items and Columns of '%1'" ).arg( listview->name() ), + formwindow, listview, itemsPreview ); + cmd->execute(); + formwindow->commandHistory()->addCommand( cmd ); +} + +void ListViewEditor::okClicked() +{ + applyClicked(); + accept(); +} + +void ListViewEditor::columnClickable( bool b ) +{ + Column *c = findColumn( colPreview->item( colPreview->currentItem() ) ); + if ( !c ) + return; + c->clickable = b; +} + +void ListViewEditor::columnDownClicked() +{ + if ( colPreview->currentItem() == -1 || + colPreview->currentItem() > (int)colPreview->count() - 2 ) + return; + + colPreview->clearSelection(); + TQListBoxItem *i = colPreview->item( colPreview->currentItem() ); + TQListBoxItem *below = i->next(); + + colPreview->takeItem( i ); + colPreview->insertItem( i, below ); + + colPreview->setCurrentItem( i ); + colPreview->setSelected( i, TRUE ); +} + +void ListViewEditor::columnPixmapChosen() +{ + Column *c = findColumn( colPreview->item( colPreview->currentItem() ) ); + if ( !c ) + return; + + TQPixmap pix; + if ( colPixmap->pixmap() ) + pix = qChoosePixmap( this, formwindow, *colPixmap->pixmap() ); + else + pix = qChoosePixmap( this, formwindow, TQPixmap() ); + + if ( pix.isNull() ) + return; + + c->pixmap = pix; + colPreview->blockSignals( TRUE ); + if ( !c->pixmap.isNull() ) + colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) ); + else + colPreview->changeItem( c->text, colPreview->index( c->item ) ); + c->item = colPreview->item( colPreview->currentItem() ); + colPixmap->setPixmap( c->pixmap ); + colPreview->blockSignals( FALSE ); + colDeletePixmap->setEnabled( TRUE ); +} + +void ListViewEditor::columnPixmapDeleted() +{ + Column *c = findColumn( colPreview->item( colPreview->currentItem() ) ); + if ( !c ) + return; + + c->pixmap = TQPixmap(); + colPreview->blockSignals( TRUE ); + if ( !c->pixmap.isNull() ) + colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) ); + else + colPreview->changeItem( c->text, colPreview->index( c->item ) ); + c->item = colPreview->item( colPreview->currentItem() ); + colPixmap->setText( "" ); + colPreview->blockSignals( FALSE ); + colDeletePixmap->setEnabled( FALSE ); +} + +void ListViewEditor::columnResizable( bool b ) +{ + Column *c = findColumn( colPreview->item( colPreview->currentItem() ) ); + if ( !c ) + return; + c->resizable = b; +} + +void ListViewEditor::columnTextChanged( const TQString &txt ) +{ + Column *c = findColumn( colPreview->item( colPreview->currentItem() ) ); + if ( !c ) + return; + + c->text = txt; + colPreview->blockSignals( TRUE ); + if ( !c->pixmap.isNull() ) + colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) ); + else + colPreview->changeItem( c->text, colPreview->index( c->item ) ); + c->item = colPreview->item( colPreview->currentItem() ); + colPreview->blockSignals( FALSE ); +} + +void ListViewEditor::columnUpClicked() +{ + if ( colPreview->currentItem() <= 0 ) + return; + + colPreview->clearSelection(); + TQListBoxItem *i = colPreview->item( colPreview->currentItem() ); + TQListBoxItem *above = i->prev(); + + colPreview->takeItem( above ); + colPreview->insertItem( above, i ); + + colPreview->setCurrentItem( i ); + colPreview->setSelected( i, TRUE ); +} + +void ListViewEditor::currentColumnChanged( TQListBoxItem *i ) +{ + Column *c = findColumn( i ); + if ( !i || !c ) { + colText->setEnabled( FALSE ); + colPixmap->setEnabled( FALSE ); + colDeletePixmap->setEnabled( FALSE ); + colText->blockSignals( TRUE ); + colText->setText( "" ); + colText->blockSignals( FALSE ); + colClickable->setEnabled( FALSE ); + colResizable->setEnabled( FALSE ); + return; + } + + colText->setEnabled( TRUE ); + colPixmap->setEnabled( TRUE ); + colDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() ); + colClickable->setEnabled( TRUE ); + colResizable->setEnabled( TRUE ); + + colText->blockSignals( TRUE ); + colText->setText( c->text ); + colText->blockSignals( FALSE ); + if ( !c->pixmap.isNull() ) + colPixmap->setPixmap( c->pixmap ); + else + colPixmap->setText( "" ); + colClickable->setChecked( c->clickable ); + colResizable->setChecked( c->resizable ); +} + +void ListViewEditor::newColumnClicked() +{ + Column col; + col.text = i18n( "New Column" ); + col.pixmap = TQPixmap(); + col.clickable = TRUE; + col.resizable = TRUE; + if ( !col.pixmap.isNull() ) + col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text ); + else + col.item = new TQListBoxText( colPreview, col.text ); + columns.append( col ); + colPreview->setCurrentItem( col.item ); + colPreview->setSelected( col.item, TRUE ); +} + +void ListViewEditor::deleteColumnClicked() +{ + TQListBoxItem *i = colPreview->item( colPreview->currentItem() ); + if ( !i ) + return; + + for ( TQValueList::Iterator it = columns.begin(); it != columns.end(); ++it ) { + if ( ( *it ).item == i ) { + delete (*it).item; + columns.remove( it ); + break; + } + } + + if ( colPreview->currentItem() != -1 ) + colPreview->setSelected( colPreview->currentItem(), TRUE ); +} + +void ListViewEditor::currentItemChanged( TQListViewItem *i ) +{ + if ( !i ) { + itemText->setEnabled( FALSE ); + itemChoosePixmap->setEnabled( FALSE ); + itemDeletePixmap->setEnabled( FALSE ); + itemColumn->setEnabled( FALSE ); + return; + } + + itemText->setEnabled( TRUE ); + itemChoosePixmap->setEnabled( TRUE ); + itemDeletePixmap->setEnabled( i->pixmap( itemColumn->value() ) && + !i->pixmap( itemColumn->value() )->isNull() ); + itemColumn->setEnabled( TRUE ); + + displayItem( i, itemColumn->value() ); +} + +void ListViewEditor::displayItem( TQListViewItem *i, int col ) +{ + itemText->blockSignals( TRUE ); + itemText->setText( i->text( col ) ); + itemText->blockSignals( FALSE ); + + itemPixmap->blockSignals( TRUE ); + if ( i->pixmap( col ) ) + itemPixmap->setPixmap( *i->pixmap( col ) ); + else + itemPixmap->setText( "" ); + itemPixmap->blockSignals( FALSE ); +} + +void ListViewEditor::itemColChanged( int col ) +{ + TQListViewItem *i = itemsPreview->currentItem(); + if ( !i ) + return; + + displayItem( i, col ); + itemDeletePixmap->setEnabled( i->pixmap( col ) && !i->pixmap( col )->isNull() ); +} + +void ListViewEditor::itemDeleteClicked() +{ + TQListViewItem *i = itemsPreview->currentItem(); + if ( !i ) + return; + + delete i; + if ( itemsPreview->firstChild() ) { + itemsPreview->setCurrentItem( itemsPreview->firstChild() ); + itemsPreview->setSelected( itemsPreview->firstChild(), TRUE ); + } +} + +void ListViewEditor::itemDownClicked() +{ + TQListViewItem *i = itemsPreview->currentItem(); + if ( !i ) + return; + + TQListViewItemIterator it( i ); + TQListViewItem *parent = i->parent(); + it++; + while ( it.current() ) { + if ( it.current()->parent() == parent ) + break; + it++; + } + + if ( !it.current() ) + return; + TQListViewItem *other = it.current(); + + i->moveItem( other ); +} + +void ListViewEditor::itemNewClicked() +{ + TQListViewItem *item = new TQListViewItem( itemsPreview ); + item->setText( 0, i18n( "Item" ) ); + item->setRenameEnabled( 0, TRUE ); + itemsPreview->setCurrentItem( item ); + itemsPreview->setSelected( item, TRUE ); + itemText->setFocus(); + itemText->selectAll(); +} + +void ListViewEditor::itemNewSubClicked() +{ + TQListViewItem *parent = itemsPreview->currentItem(); + TQListViewItem *item = 0; + if ( parent ) { + item = new TQListViewItem( parent ); + parent->setOpen( TRUE ); + } else { + item = new TQListViewItem( itemsPreview ); + } + item->setText( 0, i18n( "Subitem" ) ); + item->setRenameEnabled( 0, TRUE ); + itemsPreview->setCurrentItem( item ); + itemsPreview->setSelected( item, TRUE ); +} + +void ListViewEditor::itemPixmapChoosen() +{ + TQListViewItem *i = itemsPreview->currentItem(); + if ( !i ) + return; + + TQPixmap pix; + if ( itemPixmap->pixmap() ) + pix = qChoosePixmap( this, formwindow, *itemPixmap->pixmap() ); + else + pix = qChoosePixmap( this, formwindow, TQPixmap() ); + + if ( pix.isNull() ) + return; + + i->setPixmap( itemColumn->value(), TQPixmap( pix ) ); + itemPixmap->setPixmap( pix ); + itemDeletePixmap->setEnabled( TRUE ); +} + +void ListViewEditor::itemPixmapDeleted() +{ + TQListViewItem *i = itemsPreview->currentItem(); + if ( !i ) + return; + + i->setPixmap( itemColumn->value(), TQPixmap() ); + itemPixmap->setText( "" ); + itemDeletePixmap->setEnabled( FALSE ); +} + +void ListViewEditor::itemTextChanged( const TQString &txt ) +{ + TQListViewItem *i = itemsPreview->currentItem(); + if ( !i ) + return; + i->setText( itemColumn->value(), txt ); +} + +void ListViewEditor::itemUpClicked() +{ + TQListViewItem *i = itemsPreview->currentItem(); + if ( !i ) + return; + + TQListViewItemIterator it( i ); + TQListViewItem *parent = i->parent(); + --it; + while ( it.current() ) { + if ( it.current()->parent() == parent ) + break; + --it; + } + + if ( !it.current() ) + return; + TQListViewItem *other = it.current(); + + other->moveItem( i ); +} + +void ListViewEditor::itemRightClicked() +{ + TQListViewItem *i = itemsPreview->currentItem(); + if ( !i ) + return; + + TQListViewItemIterator it( i ); + TQListViewItem *parent = i->parent(); + parent = parent ? parent->firstChild() : itemsPreview->firstChild(); + if ( !parent ) + return; + it++; + while ( it.current() ) { + if ( it.current()->parent() == parent ) + break; + it++; + } + + if ( !it.current() ) + return; + TQListViewItem *other = it.current(); + + for ( int c = 0; c < itemsPreview->columns(); ++c ) { + TQString s = i->text( c ); + i->setText( c, other->text( c ) ); + other->setText( c, s ); + TQPixmap pix; + if ( i->pixmap( c ) ) + pix = *i->pixmap( c ); + if ( other->pixmap( c ) ) + i->setPixmap( c, *other->pixmap( c ) ); + else + i->setPixmap( c, TQPixmap() ); + other->setPixmap( c, pix ); + } + + itemsPreview->setCurrentItem( other ); + itemsPreview->setSelected( other, TRUE ); +} + +void ListViewEditor::itemLeftClicked() +{ + TQListViewItem *i = itemsPreview->currentItem(); + if ( !i ) + return; + + TQListViewItemIterator it( i ); + TQListViewItem *parent = i->parent(); + if ( !parent ) + return; + parent = parent->parent(); + --it; + while ( it.current() ) { + if ( it.current()->parent() == parent ) + break; + --it; + } + + if ( !it.current() ) + return; + TQListViewItem *other = it.current(); + + for ( int c = 0; c < itemsPreview->columns(); ++c ) { + TQString s = i->text( c ); + i->setText( c, other->text( c ) ); + other->setText( c, s ); + TQPixmap pix; + if ( i->pixmap( c ) ) + pix = *i->pixmap( c ); + if ( other->pixmap( c ) ) + i->setPixmap( c, *other->pixmap( c ) ); + else + i->setPixmap( c, TQPixmap() ); + other->setPixmap( c, pix ); + } + + itemsPreview->setCurrentItem( other ); + itemsPreview->setSelected( other, TRUE ); +} + +void ListViewEditor::setupColumns() +{ + TQHeader *h = listview->header(); + for ( int i = 0; i < (int)h->count(); ++i ) { + Column col; + col.text = h->label( i ); + col.pixmap = TQPixmap(); + if ( h->iconSet( i ) ) + col.pixmap = h->iconSet( i )->pixmap(); + col.clickable = h->isClickEnabled( i ); + col.resizable = h->isResizeEnabled( i ); + if ( !col.pixmap.isNull() ) + col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text ); + else + col.item = new TQListBoxText( colPreview, col.text ); + columns.append( col ); + } + + colText->setEnabled( FALSE ); + colPixmap->setEnabled( FALSE ); + colClickable->setEnabled( FALSE ); + colResizable->setEnabled( FALSE ); + + if ( colPreview->firstItem() ) + colPreview->setCurrentItem( colPreview->firstItem() ); + numColumns = colPreview->count(); +} + +void ListViewEditor::setupItems() +{ + itemColumn->setMinValue( 0 ); + itemColumn->setMaxValue( TQMAX( numColumns - 1, 0 ) ); + int i = 0; + TQHeader *header = itemsPreview->header(); + for ( TQListBoxItem *item = colPreview->firstItem(); item; item = item->next() ) { + Column *col = findColumn( item ); + if ( !col ) + continue; + if ( i >= itemsPreview->columns() ) + itemsPreview->addColumn( col->text ); + header->setLabel( i, col->pixmap, col->text ); + header->setResizeEnabled( col->resizable, i ); + header->setClickEnabled( col->clickable, i ); + ++i; + } + while ( itemsPreview->columns() > i ) + itemsPreview->removeColumn( i ); + + itemColumn->setValue( TQMIN( numColumns - 1, itemColumn->value() ) ); +} + +ListViewEditor::Column *ListViewEditor::findColumn( TQListBoxItem *i ) +{ + if ( !i ) + return 0; + + for ( TQValueList::Iterator it = columns.begin(); it != columns.end(); ++it ) { + if ( ( *it ).item == i ) + return &( *it ); + } + + return 0; +} + +void ListViewEditor::initTabPage( const TQString &page ) +{ + numColumns = colPreview->count(); + if ( page == i18n( "&Items" ) ) { + setupItems(); + if ( numColumns == 0 ) { + itemNew->setEnabled( FALSE ); + itemNewSub->setEnabled( FALSE ); + itemText->setEnabled( FALSE ); + itemChoosePixmap->setEnabled( FALSE ); + itemDeletePixmap->setEnabled( FALSE ); + itemColumn->setEnabled( FALSE ); + } else { + itemNew->setEnabled( TRUE ); + itemNewSub->setEnabled( TRUE ); + } + } +} + +void ListViewEditor::emitItemRenamed( TQListViewItem *, int, const TQString & text ) +{ + emit itemRenamed( text ); // Relay signal ( to TQLineEdit ) +} diff --git a/kdevdesigner/designer/listvieweditorimpl.h b/kdevdesigner/designer/listvieweditorimpl.h new file mode 100644 index 00000000..64048c9d --- /dev/null +++ b/kdevdesigner/designer/listvieweditorimpl.h @@ -0,0 +1,103 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef LISTVIEWEDITORIMPL_H +#define LISTVIEWEDITORIMPL_H + +#include "listvieweditor.h" + +#include +#include +#include + +class FormWindow; + +class ListViewEditor : public ListViewEditorBase +{ + Q_OBJECT + + +public: + ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw ); + +signals: + void itemRenamed(const TQString &); + +protected slots: + void applyClicked(); + void columnClickable(bool); + void columnDownClicked(); + void columnPixmapChosen(); + void columnPixmapDeleted(); + void columnResizable(bool); + void columnTextChanged(const TQString &); + void columnUpClicked(); + void currentColumnChanged(TQListBoxItem*); + void currentItemChanged(TQListViewItem*); + void deleteColumnClicked(); + void itemColChanged(int); + void itemDeleteClicked(); + void itemDownClicked(); + void itemNewClicked(); + void itemNewSubClicked(); + void itemPixmapChoosen(); + void itemPixmapDeleted(); + void itemTextChanged(const TQString &); + void itemUpClicked(); + void itemLeftClicked(); + void itemRightClicked(); + void newColumnClicked(); + void okClicked(); + void initTabPage(const TQString &page); + void emitItemRenamed(TQListViewItem*, int, const TQString&); // signal relay + +private: + struct Column + { + TQListBoxItem *item; + TQString text; + TQPixmap pixmap; + bool clickable, resizable; + TQ_DUMMY_COMPARISON_OPERATOR( Column ) + }; + +private: + void setupColumns(); + void setupItems(); + Column *findColumn( TQListBoxItem *i ); + void transferItems( TQListView *from, TQListView *to ); + void displayItem( TQListViewItem *i, int col ); + +private: + TQListView *listview; + TQValueList columns; + int numColumns; + FormWindow *formwindow; + +}; + + +#endif diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp new file mode 100644 index 00000000..3d900532 --- /dev/null +++ b/kdevdesigner/designer/mainwindow.cpp @@ -0,0 +1,3784 @@ + /********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "designerappiface.h" +#include "designerapp.h" + +#include "mainwindow.h" +#include "defs.h" +#include "globaldefs.h" +#include "formwindow.h" +#include "widgetdatabase.h" +#include "widgetfactory.h" +#include "propertyeditor.h" +#include "metadatabase.h" +#include "resource.h" +#include "hierarchyview.h" +#include "newformimpl.h" +#include "workspace.h" +#include "about.h" +#include "multilineeditorimpl.h" +#include "wizardeditorimpl.h" +#include "outputwindow.h" +#include "actioneditorimpl.h" +#include "actiondnd.h" +#include "project.h" +#include "projectsettingsimpl.h" +#include "tqwidgetfactory.h" +#include "pixmapcollection.h" +#include "qcompletionedit.h" +#include "sourcefile.h" +#include "orderindicator.h" +#include +#include "widgetaction.h" +#include "propertyobject.h" +#include "popupmenueditor.h" +#include "menubareditor.h" + +#include "startdialog.h" +#include "createtemplate.h" +#include "editfunctions.h" +//#include "connectionviewer.h" +#include "formsettings.h" +#include "preferences.h" +#include "pixmapcollectioneditor.h" +#ifndef TQT_NO_SQL +#include "dbconnectionimpl.h" +#endif +//#include "connectioneditor.h" +#include "customwidgeteditorimpl.h" +#include "paletteeditorimpl.h" +#include "listboxeditorimpl.h" +#include "listvieweditorimpl.h" +#include "iconvieweditorimpl.h" +#include "tableeditorimpl.h" +#include "multilineeditor.h" +#include "finddialog.h" +#include "replacedialog.h" +#include "gotolinedialog.h" +#include "designeraction.h" + +#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 "kdevdesigner_part.h" + +static bool mblockNewForms = FALSE; +extern TQMap *qwf_forms; +extern TQString *qwf_language; +extern bool qwf_execute_code; +extern bool qwf_stays_on_top; +extern void set_splash_status( const TQString &txt ); +extern TQObject* qwf_form_object; +extern TQString *qwf_plugin_dir; + +MainWindow *MainWindow::self = 0; + +TQString assistantPath() +{ + TQString path = TQDir::cleanDirPath( TQString( tqInstallPathBins() ) + + TQDir::separator() ); + return path; +} + + +static TQString textNoAccel( const TQString& text) +{ + TQString t = text; + int i; + while ( (i = t.find('&') )>= 0 ) { + t.remove(i,1); + } + return t; +} + + +MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, const TQString &plgDir ) + : TQMainWindow( 0, "designer_mainwindow"/*, WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader*/ ), + grd( 10, 10 ), sGrid( TRUE ), snGrid( TRUE ), restoreConfig( TRUE ), splashScreen( TRUE ), + fileFilter( i18n( "TQt User-Interface Files (*.ui)" ) ), client( asClient ), + previewing( FALSE ), databaseAutoEdit( FALSE ), autoSaveEnabled( FALSE ), autoSaveInterval( 1800 ), m_part(part) +{ +// extern void qInitImages_designercore(); +// qInitImages_designercore(); + + self = this; + setPluginDirectory( plgDir ); + customWidgetToolBar = customWidgetToolBar2 = 0; + guiStuffVisible = TRUE; + editorsReadOnly = FALSE; + sSignalHandlers = TRUE; + init_colors(); + shStartDialog = FALSE; + + desInterface = new DesignerInterfaceImpl( this ); + desInterface->addRef(); + inDebugMode = FALSE; + savePluginPaths = FALSE; + + updateFunctionsTimer = new TQTimer( this ); + connect( updateFunctionsTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( doFunctionsChanged() ) ); + + autoSaveTimer = new TQTimer( this ); + connect( autoSaveTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( fileSaveAll() ) ); + + set_splash_status( "Loading Plugins..." ); + setupPluginManagers(); + +/* if ( !single ) + tqApp->setMainWidget( this );*/ + TQWidgetFactory::addWidgetFactory( new CustomWidgetFactory ); +#ifndef TQ_WS_MACX + setIcon( BarIcon( "designer_appicon.png", KDevDesignerPartFactory::instance() ) ); +#endif + + actionGroupTools = 0; + prefDia = 0; + windowMenu = 0; + hierarchyView = 0; + actionEditor = 0; + currentProject = 0; + wspace = 0; + oWindow = 0; + singleProject = single; + + statusBar()->clear(); +#if defined(TQT_NON_COMMERCIAL) + statusBar()->addWidget( new TQLabel(i18n("Ready - This is the non-commercial version of TQt - " + "For commercial evaluations, use the help menu to register with Trolltech."), statusBar()), 1 ); +#else + statusBar()->addWidget( new TQLabel("Ready", statusBar()), 1 ); +#endif + + + set_splash_status( "Setting up GUI..." ); + setupMDI(); + setupMenuBar(); + + setupToolbox(); + + setupFileActions(); + setupEditActions(); + setupProjectActions(); + setupSearchActions(); + layoutToolBar = new TQToolBar( this, "Layout" ); + layoutToolBar->setCloseMode( TQDockWindow::Undocked ); + addToolBar( layoutToolBar, i18n( "Layout" ) ); + interpreterPluginManager = 0; + setupToolActions(); + setupLayoutActions(); + setupPreviewActions(); + setupOutputWindow(); + setupActionManager(); + setupWindowActions(); + + setupWorkspace(); + setupHierarchyView(); + setupPropertyEditor(); + setupActionEditor(); + + setupHelpActions(); + + setupRMBMenus(); + + connect( this, TQT_SIGNAL( projectChanged() ), this, TQT_SLOT( emitProjectSignals() ) ); + connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), this, TQT_SLOT( emitProjectSignals() ) ); + + emit hasActiveForm( FALSE ); + emit hasActiveWindow( FALSE ); + + lastPressWidget = 0; + tqApp->installEventFilter( this ); + + TQSize as( tqApp->desktop()->size() ); + as -= TQSize( 30, 30 ); + resize( TQSize( 1200, 1000 ).boundedTo( as ) ); + + connect( tqApp->clipboard(), TQT_SIGNAL( dataChanged() ), + this, TQT_SLOT( clipboardChanged() ) ); + clipboardChanged(); + layoutChilds = FALSE; + layoutSelected = FALSE; + breakLayout = FALSE; + backPix = TRUE; + + set_splash_status( "Loading User Settings..." ); + readConfig(); + // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties) + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); + delete w; + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), this, 0, FALSE ); + delete w; + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLABEL_OBJECT_NAME_STRING ), this, 0, FALSE ); + delete w; + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQTABWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); + delete w; + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE ); + delete w; + setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); + actionEditor->parentWidget()->hide(); + + assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) ); + + statusBar()->setSizeGripEnabled( TRUE ); + set_splash_status( "Initialization Done." ); +/* if ( shStartDialog ) + TQTimer::singleShot( 0, this, TQT_SLOT( showStartDialog() ));*/ + + if ( autoSaveEnabled ) + autoSaveTimer->start( autoSaveInterval * 1000 ); + + setFocusPolicy( TQ_StrongFocus ); +} + +MainWindow::~MainWindow() +{ + TQValueList::Iterator tit; + for ( tit = preferenceTabs.begin(); tit != preferenceTabs.end(); ++tit ) { + Tab t = *tit; + delete t.w; + } + for ( tit = projectTabs.begin(); tit != projectTabs.end(); ++tit ) { + Tab t = *tit; + delete t.w; + } + + TQMap< TQAction*, Project* >::Iterator it = projects.begin(); + while ( it != projects.end() ) { + Project *p = *it; + ++it; + delete p; + } + projects.clear(); + + delete oWindow; + oWindow = 0; + + desInterface->release(); + desInterface = 0; + + delete actionPluginManager; + delete preferencePluginManager; + delete projectSettingsPluginManager; + delete interpreterPluginManager; + delete templateWizardPluginManager; + delete editorPluginManager; + delete sourceTemplatePluginManager; + + MetaDataBase::clearDataBase(); + if(self == this) + self = 0; +} + +void MainWindow::setupMDI() +{ + TQVBox *vbox = new TQVBox( this ); + setCentralWidget( vbox ); + vbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + vbox->setMargin( 1 ); + vbox->setLineWidth( 1 ); + qworkspace = new TQWorkspace( vbox ); + qworkspace->setPaletteBackgroundPixmap( UserIcon( "designer_background.png", KDevDesignerPartFactory::instance() ) ); + qworkspace->setScrollBarsEnabled( TRUE ); + connect( qworkspace, TQT_SIGNAL( windowActivated( TQWidget * ) ), + this, TQT_SLOT( activeWindowChanged( TQWidget * ) ) ); + lastActiveFormWindow = 0; + qworkspace->setAcceptDrops( TRUE ); +} + +void MainWindow::setupMenuBar() +{ + menubar = menuBar(); +} + +void MainWindow::setupPropertyEditor() +{ + TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + propertyEditor = new PropertyEditor( dw ); + addToolBar( dw, TQt::DockRight ); + dw->setWidget( propertyEditor ); + dw->setFixedExtentWidth( 250 ); + dw->setCaption( i18n( "Property Editor/Signal Handlers" ) ); + TQWhatsThis::add( propertyEditor, + i18n("The Property Editor" + "

You can change the appearance and behavior of the selected widget in the " + "property editor.

" + "

You can set properties for components and forms at design time and see the " + "immediately see the effects of the changes. " + "Each property has its own editor which (depending on the property) can be used " + "to enter " + "new values, open a special dialog, or to select values from a predefined list. " + "Click F1 to get detailed help for the selected property.

" + "

You can resize the columns of the editor by dragging the separators in the " + "list's header.

" + "

Signal Handlers

" + "

In the Signal Handlers tab you can define connections between " + "the signals emitted by widgets and the slots in the form. " + "(These connections can also be made using the connection tool.)" ) ); + dw->show(); +} + +void MainWindow::setupOutputWindow() +{ + TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + addToolBar( dw, TQt::DockBottom ); + oWindow = new OutputWindow( dw ); + dw->setWidget( oWindow ); + dw->setFixedExtentHeight( 150 ); + dw->setCaption( i18n( "Output Window" ) ); +} + +void MainWindow::setupHierarchyView() +{ + if ( hierarchyView ) + return; + TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + hierarchyView = new HierarchyView( dw ); + addToolBar( dw, TQt::DockRight ); + dw->setWidget( hierarchyView ); + + dw->setCaption( i18n( "Object Explorer" ) ); + dw->setFixedExtentWidth( 250 ); + TQWhatsThis::add( hierarchyView, + i18n("The Object Explorer" + "

The Object Explorer provides an overview of the relationships " + "between the widgets in a form. You can use the clipboard functions using " + "a context menu for each item in the view. It is also useful for selecting widgets " + "in forms that have complex layouts.

" + "

The columns can be resized by dragging the separator in the list's header.

" + "

The second tab shows all the form's slots, class variables, includes, etc.

") ); + dw->show(); +} + +void MainWindow::setupWorkspace() +{ + TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + TQVBox *vbox = new TQVBox( dw ); + QCompletionEdit *edit = new QCompletionEdit( vbox ); + TQToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) ); + TQAccel *a = new TQAccel( this ); + a->connectItem( a->insertItem( ALT + Key_B ), edit, TQT_SLOT( setFocus() ) ); + wspace = new Workspace( vbox, this ); + wspace->setBufferEdit( edit ); + wspace->setCurrentProject( currentProject ); + addToolBar( dw, TQt::DockRight ); + dw->setWidget( vbox ); + + dw->setCaption( i18n( "Project Overview" ) ); + TQWhatsThis::add( wspace, i18n("The Project Overview Window" + "

The Project Overview Window displays all the current " + "project, including forms and source files.

" + "

Use the search field to rapidly switch between files.

")); + dw->setFixedExtentHeight( 100 ); + dw->show(); +} + +void MainWindow::setupActionEditor() +{ + TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, 0 ); + addDockWindow( dw, TQt::DockTornOff ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + actionEditor = new ActionEditor( dw ); + dw->setWidget( actionEditor ); + actionEditor->show(); + dw->setCaption( i18n( "Action Editor" ) ); + TQWhatsThis::add( actionEditor, i18n("The Action Editor" + "

The Action Editor is used to add actions and action groups to " + "a form, and to connect actions to slots. Actions and action " + "groups can be dragged into menus and into toolbars, and may " + "feature keyboard shortcuts and tooltips. If actions have pixmaps " + "these are displayed on toolbar buttons and besides their names in " + "menus.

" ) ); + dw->hide(); + setAppropriate( dw, FALSE ); +} + +void MainWindow::setupToolbox() +{ + TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + addToolBar( dw, TQt::DockLeft ); + toolBox = new TQToolBox( dw ); + dw->setWidget( toolBox ); + dw->setFixedExtentWidth( 160 ); + dw->setCaption( i18n( "Toolbox" ) ); + dw->show(); + setDockEnabled( dw, TQt::DockTop, FALSE ); + setDockEnabled( dw, TQt::DockBottom, FALSE ); + commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" ); + commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame ); + commonWidgetsToolBar->setOrientation( Qt::Vertical ); + commonWidgetsToolBar->setBackgroundMode(PaletteBase); + toolBox->addItem( commonWidgetsToolBar, "Common Widgets" ); +} + +void MainWindow::setupRMBMenus() +{ + rmbWidgets = new TQPopupMenu( this ); + actionEditCut->addTo( rmbWidgets ); + actionEditCopy->addTo( rmbWidgets ); + actionEditPaste->addTo( rmbWidgets ); + actionEditDelete->addTo( rmbWidgets ); +#if 0 + rmbWidgets->insertSeparator(); + actionEditLower->addTo( rmbWidgets ); + actionEditRaise->addTo( rmbWidgets ); +#endif + rmbWidgets->insertSeparator(); + actionEditAdjustSize->addTo( rmbWidgets ); + actionEditHLayout->addTo( rmbWidgets ); + actionEditVLayout->addTo( rmbWidgets ); + actionEditGridLayout->addTo( rmbWidgets ); + actionEditSplitHorizontal->addTo( rmbWidgets ); + actionEditSplitVertical->addTo( rmbWidgets ); + actionEditBreakLayout->addTo( rmbWidgets ); + rmbWidgets->insertSeparator(); + if ( !singleProjectMode() ) + actionEditConnections->addTo( rmbWidgets ); + actionEditSource->addTo( rmbWidgets ); + + rmbFormWindow = new TQPopupMenu( this ); + actionEditPaste->addTo( rmbFormWindow ); + actionEditSelectAll->addTo( rmbFormWindow ); + actionEditAccels->addTo( rmbFormWindow ); + rmbFormWindow->insertSeparator(); + actionEditAdjustSize->addTo( rmbFormWindow ); + actionEditHLayout->addTo( rmbFormWindow ); + actionEditVLayout->addTo( rmbFormWindow ); + actionEditGridLayout->addTo( rmbFormWindow ); + actionEditBreakLayout->addTo( rmbFormWindow ); + rmbFormWindow->insertSeparator(); + if ( !singleProjectMode() ) { + actionEditFunctions->addTo( rmbFormWindow ); + actionEditConnections->addTo( rmbFormWindow ); + } + actionEditSource->addTo( rmbFormWindow ); + rmbFormWindow->insertSeparator(); + actionEditFormSettings->addTo( rmbFormWindow ); +} + +void MainWindow::toolSelected( TQAction* action ) +{ + actionCurrentTool = action; + emit currentToolChanged(); + if ( formWindow() ) + formWindow()->commandHistory()->emitUndoRedo(); +} + +int MainWindow::currentTool() const +{ + if ( !actionCurrentTool ) + return POINTER_TOOL; + return TQString::fromLatin1(actionCurrentTool->name()).toInt(); +} + +void MainWindow::runProjectPrecondition() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + e->save(); + e->saveBreakPoints(); + } + fileSaveProject(); + + if ( currentTool() == ORDER_TOOL ) + resetTool(); + oWindow->clearErrorMessages(); + oWindow->clearDebug(); + oWindow->showDebugTab(); + previewing = TRUE; +} + +void MainWindow::runProjectPostcondition( TQObjectList *l ) +{ + inDebugMode = TRUE; + debuggingForms = *l; + enableAll( FALSE ); + for ( SourceEditor *e2 = sourceEditors.first(); e2; e2 = sourceEditors.next() ) { + if ( e2->project() == currentProject ) + e2->editorInterface()->setMode( EditorInterface::Debugging ); + } +} + +TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) +{ + qwf_execute_code = FALSE; + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) + e->save(); + if ( currentTool() == ORDER_TOOL ) + resetTool(); + + FormWindow *fw = formWindow(); + if ( !fw ) + return 0; + + TQStringList databases; + TQPtrDictIterator wit( *fw->widgets() ); + while ( wit.current() ) { + TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(wit.current()), "database" ).toStringList(); + if ( !lst.isEmpty() ) + databases << lst [ 0 ]; + ++wit; + } + + if ( fw->project() ) { + TQStringList::ConstIterator it; + for ( it = databases.begin(); it != databases.end(); ++it ) + fw->project()->openDatabase( *it, FALSE ); + } + TQApplication::setOverrideCursor( WaitCursor ); + + TQCString s; + TQBuffer buffer( s ); + buffer.open( IO_WriteOnly ); + Resource resource( this ); + resource.setWidget( fw ); + TQValueList images; + resource.save( TQT_TQIODEVICE(&buffer) ); + + buffer.close(); + buffer.open( IO_ReadOnly ); + + TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&buffer) ); + if ( w ) { + previewedForm = w; + if ( palet ) { + if ( style ) + style->polish( *palet ); + w->setPalette( *palet ); + } + + if ( style ) + w->setStyle( style ); + + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( style ) + ( (TQWidget*)o )->setStyle( style ); + } + delete l; + + w->move( fw->mapToGlobal( TQPoint(0,0) ) ); + ((MainWindow*)w )->setWFlags( WDestructiveClose ); + previewing = TRUE; + w->show(); + previewing = FALSE; + TQApplication::restoreOverrideCursor(); + return w; + } + TQApplication::restoreOverrideCursor(); + return 0; +} + +void MainWindow::previewForm() +{ + TQWidget* w = previewFormInternal(); + if ( w ) + w->show(); +} + +void MainWindow::previewForm( const TQString & style ) +{ + TQStyle* st = TQStyleFactory::create( style ); + TQWidget* w = 0; + if ( style == "Motif" ) { + TQPalette p( TQColor( 192, 192, 192 ) ); + w = previewFormInternal( st, &p ); + } else if ( style == "Windows" ) { + TQPalette p( TQColor( 212, 208, 200 ) ); + w = previewFormInternal( st, &p ); + } else if ( style == "Platinum" ) { + TQPalette p( TQColor( 220, 220, 220 ) ); + w = previewFormInternal( st, &p ); + } else if ( style == "CDE" ) { + TQPalette p( TQColor( 75, 123, 130 ) ); + p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Inactive, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Disabled, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Active, TQColorGroup::Highlight, TQt::white ); + p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Inactive, TQColorGroup::Highlight, TQt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Disabled, TQColorGroup::Highlight, TQt::white ); + p.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Active, TQColorGroup::Foreground, TQt::white ); + p.setColor( TQPalette::Active, TQColorGroup::Text, TQt::white ); + p.setColor( TQPalette::Active, TQColorGroup::ButtonText, TQt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::Foreground, TQt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::Text, TQt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::ButtonText, TQt::white ); + p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray ); + p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray ); + p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray ); + + w = previewFormInternal( st, &p ); + } else if ( style == "SGI" ) { + TQPalette p( TQColor( 220, 220, 220 ) ); + w = previewFormInternal( st, &p ); + } else if ( style == "MotifPlus" ) { + TQColor gtkfg(0x00, 0x00, 0x00); + TQColor gtkdf(0x75, 0x75, 0x75); + TQColor gtksf(0xff, 0xff, 0xff); + TQColor gtkbs(0xff, 0xff, 0xff); + TQColor gtkbg(0xd6, 0xd6, 0xd6); + TQColor gtksl(0x00, 0x00, 0x9c); + TQColorGroup active(gtkfg, // foreground + gtkbg, // button + gtkbg.light(), // light + gtkbg.dark(142), // dark + gtkbg.dark(110), // mid + gtkfg, // text + gtkfg, // bright text + gtkbs, // base + gtkbg), // background + disabled(gtkdf, // foreground + gtkbg, // button + gtkbg.light(), // light + gtkbg.dark(156), // dark + gtkbg.dark(110), // mid + gtkdf, // text + gtkdf, // bright text + gtkbs, // base + gtkbg); // background + + TQPalette pal(active, disabled, active); + + pal.setColor(TQPalette::Active, TQColorGroup::Highlight, + gtksl); + pal.setColor(TQPalette::Active, TQColorGroup::HighlightedText, + gtksf); + pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight, + gtksl); + pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, + gtksf); + pal.setColor(TQPalette::Disabled, TQColorGroup::Highlight, + gtksl); + pal.setColor(TQPalette::Disabled, TQColorGroup::HighlightedText, + gtkdf); + w = previewFormInternal( st, &pal ); + } else { + w = previewFormInternal( st ); + } + + if ( !w ) + return; + w->insertChild( TQT_TQOBJECT(st) ); + w->show(); +} + +void MainWindow::helpContents() +{ + TQWidget *focusWidget = tqApp->focusWidget(); + bool showClassDocu = TRUE; + while ( focusWidget ) { + if ( focusWidget->isA( "PropertyList" ) ) { + showClassDocu = FALSE; + break; + } + focusWidget = focusWidget->parentWidget(); + } + + TQString source = "designer-manual.html"; + if ( propertyDocumentation.isEmpty() ) { + TQString indexFile = documentationPath() + "/propertyindex"; + TQFile f( indexFile ); + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + while ( !ts.eof() ) { + TQString s = ts.readLine(); + int from = s.find( "\"" ); + if ( from == -1 ) + continue; + int to = s.findRev( "\"" ); + if ( to == -1 ) + continue; + propertyDocumentation[ s.mid( from + 1, to - from - 1 ) ] = s.mid( to + 2 ) + "-prop"; + } + f.close(); + } + } + + if ( propertyEditor->widget() && !showClassDocu ) { + if ( !propertyEditor->currentProperty().isEmpty() ) { + TQMetaObject* mo = propertyEditor->metaObjectOfCurrentProperty(); + TQString s; + TQString cp = propertyEditor->currentProperty(); + if ( cp == "layoutMargin" ) { + source = propertyDocumentation[ "TQLayout/margin" ]; + } else if ( cp == "layoutSpacing" ) { + source = propertyDocumentation[ "TQLayout/spacing" ]; + } else if ( cp == "toolTip" ) { + source = "tqtooltip.html#details"; + } else if ( mo && qstrcmp( mo->className(), "Spacer" ) == 0 ) { + if ( cp != "name" ) + source = "tqsizepolicy.html#SizeType"; + else + source = propertyDocumentation[ "TQObject/name" ]; + } else { + while ( mo && !propertyDocumentation.contains( ( s = TQString( mo->className() ) + "/" + cp ) ) ) + mo = mo->superClass(); + if ( mo ) + source = "p:" + propertyDocumentation[s]; + } + } + + TQString classname = WidgetFactory::classNameOf( propertyEditor->widget() ); + if ( source.isEmpty() || source == "designer-manual.html" ) { + if ( classname.lower() == "spacer" ) + source = "qspaceritem.html#details"; + else if ( classname == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + source = "layout.html"; + else + source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details"; + } + } else if ( propertyEditor->widget() ) { + source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details"; + } + + if ( !source.isEmpty() ) + assistant->showPage( documentationPath() + source ); +} + +void MainWindow::helpManual() +{ + assistant->showPage( documentationPath() + "/designer-manual.html" ); +} + +void MainWindow::helpAbout() +{ + AboutDialog dlg( this, 0, TRUE ); + if ( singleProjectMode() ) { + dlg.aboutPixmap->setText( "" ); + dlg.aboutVersion->setText( "" ); + dlg.aboutCopyright->setText( "" ); + LanguageInterface *iface = MetaDataBase::languageInterface( eProject->language() ); + dlg.aboutLicense->setText( iface->aboutText() ); + } + dlg.aboutVersion->setText(TQString("Version ") + TQString(TQT_VERSION_STR)); + dlg.resize( dlg.width(), dlg.layout()->heightForWidth(dlg.width()) ); + dlg.exec(); +} + +void MainWindow::helpAboutQt() +{ + TQMessageBox::aboutTQt( this, "TQt Designer" ); +} + +#if defined(_WS_WIN_) +#include +#include +#endif + +void MainWindow::helpRegister() +{ +#if defined(_WS_WIN_) + HKEY key; + HKEY subkey; + long res; + DWORD type; + DWORD size = 255; + TQString command; + TQString sub( "htmlfile\\shell" ); +#if defined(UNICODE) + if ( TQApplication::winVersion() & TQt::WV_NT_based ) { + unsigned char data[256]; + res = RegOpenKeyExW( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key ); + res = RegOpenKeyExW( key, (TCHAR*)sub.ucs2(), 0, KEY_READ, &subkey ); + res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size ); + command = qt_winTQString( data ) + "\\command"; + size = 255; + res = RegOpenKeyExW( subkey, (TCHAR*)command.ucs2(), 0, KEY_READ, &subkey ); + res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size ); + command = qt_winTQString( data ); + } else +#endif + { + unsigned char data[256]; + res = RegOpenKeyExA( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key ); + res = RegOpenKeyExA( key, sub.local8Bit(), 0, KEY_READ, &subkey ); + res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size ); + command = TQString::fromLocal8Bit( (const char*) data ) + "\\command"; + size = 255; + res = RegOpenKeyExA( subkey, command.local8Bit(), 0, KEY_READ, &subkey ); + res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size ); + command = TQString::fromLocal8Bit( (const char*) data ); + } + + res = RegCloseKey( subkey ); + res = RegCloseKey( key ); + + TQProcess process( command + " www.trolltech.com/products/download/eval/evaluation.html" ); + if ( !process.start() ) + TQMessageBox::information( this, "Register TQt", "Launching your web browser failed.\n" + "To register TQt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" ); +#endif +} + +void MainWindow::showProperties( TQObject *o ) +{ + if ( !o->isWidgetType() ) { + propertyEditor->setWidget( o, lastActiveFormWindow ); + if ( lastActiveFormWindow ) + hierarchyView->setFormWindow( lastActiveFormWindow, TQT_TQOBJECT(lastActiveFormWindow->mainContainer()) ); + else + hierarchyView->setFormWindow( 0, 0 ); + return; + } + TQWidget *w = (TQWidget*)o; + setupHierarchyView(); + FormWindow *fw = (FormWindow*)isAFormWindowChild( TQT_TQOBJECT(w) ); + if ( fw ) { + if ( fw->numSelectedWidgets() > 1 ) { + TQWidgetList wl = fw->selectedWidgets(); + if ( wl.first() != w ) { + wl.removeRef( w ); + wl.insert( 0, w ); + } + propertyEditor->setWidget( new PropertyObject( wl ), fw ); + } else { + propertyEditor->setWidget( TQT_TQOBJECT(w), fw ); + } + hierarchyView->setFormWindow( fw, TQT_TQOBJECT(w) ); + } else { + propertyEditor->setWidget( 0, 0 ); + hierarchyView->setFormWindow( 0, 0 ); + } + + if ( currentTool() == POINTER_TOOL && fw && + ( !qworkspace->activeWindow() || !::tqqt_cast(qworkspace->activeWindow()) ) ) + fw->setFocus(); +} + +void MainWindow::resetTool() +{ + actionPointerTool->setOn( TRUE ); +} + +void MainWindow::updateProperties( TQObject * ) +{ + if ( propertyEditor ) + propertyEditor->refetchData(); +} + +bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) +{ + if ( ::tqqt_cast(o) || ::tqqt_cast(o) || + ( o && + ( ::tqqt_cast(o->parent()) || + ::tqqt_cast(o->parent()) ) ) ) { + + if ( e->type() == TQEvent::Accel && ::tqqt_cast(o) ) { + return TRUE; // consume accel events + } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast(o) ) { + TQPoint pos = ((TQMouseEvent*)e)->pos(); + MenuBarEditor *m = ::tqqt_cast(o); + showProperties( o ); + if ( m->findItem( pos ) >= m->count() ) + m->setFocus(); + } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast(o) ) { + PopupMenuEditor *m = ::tqqt_cast(o); + PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() ); + if ( m->find( i->action() ) != -1 && !i->isSeparator() ) + showProperties( i->action() ); + } + return TQMainWindow::eventFilter( o, e ); + } + + if ( !o || !e || !o->isWidgetType() ) + return TQMainWindow::eventFilter( o, e ); + + TQWidget *w = 0; + bool passiveInteractor; + switch ( e->type() ) { + case TQEvent::AccelOverride: + if ( ( (TQKeyEvent*)e )->key() == Key_F1 && + ( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) { + w = (TQWidget*)o; + while ( w ) { + if ( ::tqqt_cast(w) ) + break; + w = w->parentWidget( TRUE ); + } + if ( w ) { + propertyEditor->propertyList()->showCurrentWhatsThis(); + ( (TQKeyEvent*)e )->accept(); + return TRUE; + } + } + break; + case TQEvent::Accel: + if ( ( ( (TQKeyEvent*)e )->key() == Key_A || + ( (TQKeyEvent*)e )->key() == Key_E ) && + ( (TQKeyEvent*)e )->state() & ControlButton ) { + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (TQKeyEvent*)e )->ignore(); + return TRUE; + } + } + break; + case TQEvent::ContextMenu: + case TQEvent::MouseButtonPress: + if ( o && currentTool() == POINTER_TOOL && + ( ::tqqt_cast(o) || + ::tqqt_cast(o) || + ::tqqt_cast(o) || + ( ::tqqt_cast(o) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) && + o->parent() + && ( ::tqqt_cast(o->parent()) + || ::tqqt_cast(o->parent())) ) ) { + TQWidget *w = (TQWidget*)o; + if ( ::tqqt_cast(w) || + ::tqqt_cast(w) || + ::tqqt_cast(w) || + ::tqqt_cast(w) ) + w = w->parentWidget(); + TQWidget *pw = w->parentWidget(); + while ( pw ) { + if ( ::tqqt_cast(pw) ) { + ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) ); + if ( !::tqqt_cast(o) ) + return ( !::tqqt_cast(o) && + !::tqqt_cast(o) && + !::tqqt_cast(o) && + !::tqqt_cast(o) ); + } + pw = pw->parentWidget(); + } + } + if ( o && ( ::tqqt_cast(o) || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) + && e->type() == TQEvent::ContextMenu ) + break; + if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) + break; + if ( ::tqqt_cast(o) ) + break; + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + if ( !w->hasFocus() ) + w->setFocus(); + passiveInteractor = WidgetFactory::isPassiveInteractor( o ); + if ( !passiveInteractor || currentTool() != ORDER_TOOL ) { + if( e->type() == TQEvent::ContextMenu ) { + ( (FormWindow*)w )->handleContextMenu( (TQContextMenuEvent*)e, + ( (FormWindow*)w )->designerWidget( o ) ); + return TRUE; + } else { + ( (FormWindow*)w )->handleMousePress( (TQMouseEvent*)e, + ( (FormWindow*)w )->designerWidget( o ) ); + } + } + lastPressWidget = (TQWidget*)o; + if ( passiveInteractor ) + TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); + if ( currentTool() == CONNECT_TOOL || currentTool() == BUDDY_TOOL ) + return TRUE; + return !passiveInteractor; + case TQEvent::MouseButtonRelease: + lastPressWidget = 0; + if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) + break; + if ( ::tqqt_cast(o) ) + break; + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + passiveInteractor = WidgetFactory::isPassiveInteractor( o ); + if ( !passiveInteractor ) + ( (FormWindow*)w )->handleMouseRelease( (TQMouseEvent*)e, + ( (FormWindow*)w )->designerWidget( o ) ); + if ( passiveInteractor ) { + TQTimer::singleShot( 0, this, TQT_SLOT( selectionChanged() ) ); + TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); + } + return !passiveInteractor; + case TQEvent::MouseMove: + if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) + break; + w = isAFormWindowChild( o ); + if ( lastPressWidget != (TQWidget*)o && w && + !::tqqt_cast(o) && !::tqqt_cast(o) && + !::tqqt_cast(o) && !::tqqt_cast(o) && + !::tqqt_cast(o) ) + return TRUE; + if ( o && ::tqqt_cast(o) ) + break; + if ( lastPressWidget != (TQWidget*)o || + ( !w || ::tqqt_cast(o) ) || + ::tqqt_cast(o) ) + break; + passiveInteractor = WidgetFactory::isPassiveInteractor( o ); + if ( !passiveInteractor ) + ( (FormWindow*)w )->handleMouseMove( (TQMouseEvent*)e, + ( (FormWindow*)w )->designerWidget( o ) ); + return !passiveInteractor; + case TQEvent::KeyPress: + if ( ( (TQKeyEvent*)e )->key() == Key_Escape && currentTool() != POINTER_TOOL ) { + resetTool(); + return FALSE; + } + if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) { + if ( ::tqqt_cast(qWorkspace()->activeWindow()) ) { + qWorkspace()->activeWindow()->setFocus(); + return TRUE; + } + } + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + ( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); + if ( ((TQKeyEvent*)e)->isAccepted() ) + return TRUE; + break; + case TQEvent::MouseButtonDblClick: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) { + if ( ::tqqt_cast(o) && ((TQToolButton*)o)->isOn() && + o->parent() && ::tqqt_cast(o->parent()) && formWindow() ) + formWindow()->setToolFixed(); + break; + } + if ( currentTool() == ORDER_TOOL ) { + ( (FormWindow*)w )->handleMouseDblClick( (TQMouseEvent*)e, + ( (FormWindow*)w )->designerWidget( o ) ); + return TRUE; + } + if ( !WidgetFactory::isPassiveInteractor( o ) && ( (FormWindow*)w )->formFile() ) + return openEditor( ( (FormWindow*)w )->designerWidget( o ), (FormWindow*)w ); + return TRUE; + case TQEvent::KeyRelease: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + ( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); + if ( ((TQKeyEvent*)e)->isAccepted() ) + return TRUE; + break; + case TQEvent::Hide: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + if ( ( (FormWindow*)w )->isWidgetSelected( TQT_TQOBJECT(o) ) ) + ( (FormWindow*)w )->selectWidget( TQT_TQOBJECT(o), FALSE ); + break; + case TQEvent::Enter: + case TQEvent::Leave: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + return TRUE; + case TQEvent::Resize: + case TQEvent::Move: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) { + ( (FormWindow*)w )->updateSelection( (TQWidget*)o ); + if ( e->type() != TQEvent::Resize ) + ( (FormWindow*)w )->updateChildSelections( (TQWidget*)o ); + } + break; + case TQEvent::Close: + if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) { + if ( lastActiveFormWindow && lastActiveFormWindow->project() ) { + TQStringList lst = + MetaDataBase::fakeProperty( TQT_TQOBJECT(lastActiveFormWindow), "database" ).toStringList(); + lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] ); + } + } + break; + case TQEvent::DragEnter: + if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e ); + return TRUE; + } + break; + case TQEvent::DragMove: + if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e ); + return TRUE; + } + break; + case TQEvent::Drop: + if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + workspace()->contentsDropEvent( (TQDropEvent*)e ); + return TRUE; + } + break; + case TQEvent::Show: + if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) ) + break; + if ( ((TQShowEvent*)e)->spontaneous() ) + break; + TQApplication::sendPostedEvents( qworkspace, TQEvent::ChildInserted ); + showEvent( (TQShowEvent*)e ); + checkTempFiles(); + return TRUE; + case TQEvent::Wheel: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + return TRUE; + case TQEvent::FocusIn: + if ( !::tqqt_cast(o) && isAFormWindowChild( o ) ) + return TRUE; //FIXME + if ( hierarchyView->formDefinitionView()->isRenaming() + && ( o->inherits( "Editor" ) || ::tqqt_cast(o) ) ) + TQApplication::sendPostedEvents(); + if ( o->inherits( "Editor" ) ) { + TQWidget *w = (TQWidget*)o; + while ( w ) { + if ( ::tqqt_cast(w) ) + break; + w = w->parentWidget( TRUE ); + } + if ( ::tqqt_cast(w) ) + ( (SourceEditor*)w )->checkTimeStamp(); + } else if ( ::tqqt_cast(o) ) { + FormWindow *fw = (FormWindow*)o; + if ( fw->formFile() && fw->formFile()->editor() ) + fw->formFile()->editor()->checkTimeStamp(); + } + break; + case TQEvent::FocusOut: + if ( !::tqqt_cast(o) && isAFormWindowChild( o ) ) + return TRUE; + break; + default: + return TQMainWindow::eventFilter( o, e ); + } + + return TQMainWindow::eventFilter( o, e ); +} + +TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const +{ + if ( ::tqqt_cast(o->parent()) && !::tqqt_cast(o) ) + return 0; + while ( o ) { + if ( ::tqqt_cast(o) ) + return (TQWidget*)o; + o = o->parent(); + } + return 0; +} + +TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const +{ + while ( o ) { + if ( ::tqqt_cast(o) ) + return (TQWidget*)o; + if ( ::tqqt_cast(o) ) + return 0; + o = o->parent(); + } + return 0; +} + +FormWindow *MainWindow::formWindow() +{ + if ( qworkspace->activeWindow() ) { + FormWindow *fw = 0; + if ( ::tqqt_cast(qworkspace->activeWindow()) ) + fw = (FormWindow*)qworkspace->activeWindow(); + else if ( lastActiveFormWindow && + qworkspace->windowList().find( lastActiveFormWindow ) != -1) + fw = lastActiveFormWindow; + return fw; + } + return 0; +} + +void MainWindow::emitProjectSignals() +{ + emit hasNonDummyProject( !currentProject->isDummy() ); + emit hasActiveWindowOrProject( !!qworkspace->activeWindow() || !currentProject->isDummy() ); +} + +void MainWindow::insertFormWindow( FormWindow *fw ) +{ + if ( fw ) + TQWhatsThis::add( fw, i18n( "The Form Window" + "

Use the various tools to add widgets or to change the layout " + "and behavior of the components in the form. Select one or multiple " + "widgets to move them or lay them out. If a single widget is chosen it can " + "be resized using the resize handles.

" + "

Changes in the Property Editor are visible at design time, " + "and you can preview the form in different styles.

" + "

You can change the grid resolution, or turn the grid off in the " + "Preferences dialog in the Edit menu." + "

You can have several forms open, and all open forms are listed " + "in the Form List.") ); + + connect( fw, TQT_SIGNAL( showProperties( TQObject * ) ), + this, TQT_SLOT( showProperties( TQObject * ) ) ); + connect( fw, TQT_SIGNAL( updateProperties( TQObject * ) ), + this, TQT_SLOT( updateProperties( TQObject * ) ) ); + connect( this, TQT_SIGNAL( currentToolChanged() ), + fw, TQT_SLOT( currentToolChanged() ) ); + connect( fw, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( selectionChanged() ) ); + connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), + this, TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); + + if ( !mblockNewForms ) { + } else { + fw->setProject( currentProject ); + } + fw->show(); + fw->currentToolChanged(); + if ( fw->caption().isEmpty() && tqstrlen( fw->name() ) ) + fw->setCaption( fw->name() ); + fw->mainContainer()->setCaption( fw->caption() ); + WidgetFactory::saveDefaultProperties( TQT_TQOBJECT(fw->mainContainer()), + WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(fw->mainContainer()) ) ) ); + activeWindowChanged( fw ); + emit formWindowsChanged(); + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( e->project() == fw->project() ) + e->resetContext(); + } +} + +void MainWindow::createNewProject( const TQString &lang ) +{ + Project *pro = new Project( "", "", projectSettingsPluginManager ); + pro->setLanguage( lang ); + + + if ( !openProjectSettings( pro ) ) { + delete pro; + return; + } + + if ( !pro->isValid() ) { + TQMessageBox::information( this, i18n("New Project"), i18n( "Cannot create an invalid project." ) ); + delete pro; + return; + } + + TQAction *a = new TQAction( pro->makeRelative( pro->fileName() ), + pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, TRUE ); + projects.insert( a, pro ); + addRecentlyOpened( pro->makeAbsolute( pro->fileName() ), recentlyProjects ); + projectSelected( a ); +} + + +bool MainWindow::unregisterClient( FormWindow *w ) +{ + propertyEditor->closed( w ); + objectHierarchy()->closed( w ); + if ( w == lastActiveFormWindow ) + lastActiveFormWindow = 0; + + TQPtrList waitingForDelete; + waitingForDelete.setAutoDelete( TRUE ); + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(w) ) + waitingForDelete.append( e ); + } + + if ( actionEditor->form() == w ) { + actionEditor->setFormWindow( 0 ); + actionEditor->parentWidget()->hide(); + } + + return TRUE; +} + +void MainWindow::activeWindowChanged( TQWidget *w ) +{ + TQWidget *old = formWindow(); + if ( ::tqqt_cast(w) ) { + FormWindow *fw = (FormWindow*)w; + FormWindow *ofw = lastActiveFormWindow; + lastActiveFormWindow = fw; + lastActiveFormWindow->updateUndoInfo(); + emit hasActiveForm( TRUE ); + if ( formWindow() ) { + formWindow()->emitShowProperties(); + emit formModified( formWindow()->commandHistory()->isModified() ); + if ( currentTool() != POINTER_TOOL ) + formWindow()->clearSelection(); + } + workspace()->activeFormChanged( fw ); + setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), + ::tqqt_cast(lastActiveFormWindow->mainContainer()) ); + if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) { + if ( actionEditor->wantToBeShown() ) + actionEditor->parentWidget()->show(); + } else { + TQWidget *mc = 0; + if ( ofw && (mc = ofw->mainContainer()) && ::tqqt_cast(mc) ) + actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() ); + actionEditor->parentWidget()->hide(); + } + + actionEditor->setFormWindow( lastActiveFormWindow ); + if ( wspace && fw->project() && fw->project() != currentProject ) { + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( *it == fw->project() ) { + projectSelected( it.key() ); + break; + } + } + } + emit formWindowChanged(); + + } else if ( w == propertyEditor ) { + propertyEditor->resetFocus(); + } else if ( !lastActiveFormWindow ) { + emit formWindowChanged(); + emit hasActiveForm( FALSE ); + actionEditUndo->setEnabled( FALSE ); + actionEditRedo->setEnabled( FALSE ); + } + + if ( !w ) { + emit formWindowChanged(); + emit hasActiveForm( FALSE ); + propertyEditor->clear(); + hierarchyView->clear(); + updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); + } + + selectionChanged(); + + if ( ::tqqt_cast(w) ) { + SourceEditor *se = (SourceEditor*)w; + TQGuardedPtr fw = se->formWindow(); + if ( se->formWindow() && + lastActiveFormWindow != fw ) { + activeWindowChanged( se->formWindow() ); + } + actionSearchFind->setEnabled( TRUE ); + actionSearchIncremetal->setEnabled( TRUE ); + actionSearchReplace->setEnabled( TRUE ); + actionSearchGotoLine->setEnabled( TRUE ); + incrementalSearch->setEnabled( TRUE ); + + actionEditUndo->setEnabled( FALSE ); + actionEditRedo->setEnabled( FALSE ); + actionEditCut->setEnabled( TRUE ); + actionEditCopy->setEnabled( TRUE ); + actionEditPaste->setEnabled( TRUE ); + actionEditSelectAll->setEnabled( TRUE ); + actionEditUndo->setMenuText( i18n( "&Undo" ) ); + actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) ); + actionEditRedo->setMenuText( i18n( "&Redo" ) ); + actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) ); + if ( hierarchyView->sourceEditor() != w ) + hierarchyView->showClasses( se ); + actionEditor->setFormWindow( 0 ); + if ( wspace && se->project() && se->project() != currentProject ) { + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( *it == se->project() ) { + projectSelected( it.key() ); + break; + } + } + } + workspace()->activeEditorChanged( se ); + } else { + actionSearchFind->setEnabled( FALSE ); + actionSearchIncremetal->setEnabled( FALSE ); + actionSearchReplace->setEnabled( FALSE ); + actionSearchGotoLine->setEnabled( FALSE ); + incrementalSearch->setEnabled( FALSE ); + } + + if ( currentTool() == ORDER_TOOL && w != old ) + emit currentToolChanged(); + + emit hasActiveWindow( !!qworkspace->activeWindow() ); +} + +void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, + const TQString &undoCmd, const TQString &redoCmd ) +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) + return; // do not set a formWindow related command + actionEditUndo->setEnabled( undoAvailable ); + actionEditRedo->setEnabled( redoAvailable ); + if ( !undoCmd.isEmpty() ) + actionEditUndo->setMenuText( i18n( "&Undo: %1" ).arg( undoCmd ) ); + else + actionEditUndo->setMenuText( i18n( "&Undo: Not Available" ) ); + if ( !redoCmd.isEmpty() ) + actionEditRedo->setMenuText( i18n( "&Redo: %1" ).arg( redoCmd ) ); + else + actionEditRedo->setMenuText( i18n( "&Redo: Not Available" ) ); + + actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) ); + actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) ); + + if ( currentTool() == ORDER_TOOL ) { + actionEditUndo->setEnabled( FALSE ); + actionEditRedo->setEnabled( FALSE ); + } +} + +void MainWindow::updateEditorUndoRedo() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow(); + actionEditUndo->setEnabled( editor->editIsUndoAvailable() ); + actionEditRedo->setEnabled( editor->editIsRedoAvailable() ); +} + +TQWorkspace *MainWindow::qWorkspace() const +{ + return qworkspace; +} + +void MainWindow::popupFormWindowMenu( const TQPoint & gp, FormWindow *fw ) +{ + TQValueList ids; + TQMap commands; + + setupRMBSpecialCommands( ids, commands, fw ); + setupRMBProperties( ids, commands, fw ); + + tqApp->processEvents(); + int r = rmbFormWindow->exec( gp ); + + handleRMBProperties( r, commands, fw ); + handleRMBSpecialCommands( r, commands, fw ); + + for ( TQValueList::ConstIterator i = ids.begin(); i != ids.end(); ++i ) + rmbFormWindow->removeItem( *i ); +} + +void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidget * w) +{ + TQValueList ids; + TQMap commands; + + setupRMBSpecialCommands( ids, commands, w ); + setupRMBProperties( ids, commands, w ); + + tqApp->processEvents(); + int r = rmbWidgets->exec( gp ); + + handleRMBProperties( r, commands, w ); + handleRMBSpecialCommands( r, commands, w ); + + for ( TQValueList::ConstIterator i = ids.begin(); i != ids.end(); ++i ) + rmbWidgets->removeItem( *i ); +} + +void MainWindow::setupRMBProperties( TQValueList &ids, TQMap &props, TQWidget *w ) +{ + const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); + if ( text && qstrcmp( text->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + text = 0; + const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + if ( title && qstrcmp( title->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + title = 0; + const TQMetaProperty* pagetitle = + w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); + if ( pagetitle && qstrcmp( pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + pagetitle = 0; + const TQMetaProperty* pixmap = + w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE ); + if ( pixmap && qstrcmp( pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0 ) + pixmap = 0; + + if ( text && text->designable(w) || + title && title->designable(w) || + pagetitle && pagetitle->designable(w) || + pixmap && pixmap->designable(w) ) { + int id = 0; + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator(0); + if ( pixmap && pixmap->designable(w) ) { + ids << ( id = rmbWidgets->insertItem( i18n("Choose Pixmap..."), -1, 0) ); + props.insert( "pixmap", id ); + } + if ( text && text->designable(w) && !::tqqt_cast(w) ) { + ids << ( id = rmbWidgets->insertItem( i18n("Edit Text..."), -1, 0) ); + props.insert( "text", id ); + } + if ( title && title->designable(w) ) { + ids << ( id = rmbWidgets->insertItem( i18n("Edit Title..."), -1, 0) ); + props.insert( "title", id ); + } + if ( pagetitle && pagetitle->designable(w) ) { + ids << ( id = rmbWidgets->insertItem( i18n("Edit Page Title..."), -1, 0) ); + props.insert( "pagetitle", id ); + } + } +} + +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS +static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w ) +{ + WidgetInterface *iface = 0; + widgetManager()->queryInterface( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), &iface ); + if ( !iface ) + return 0; + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( !iface2 ) + return 0; + iface->release(); + return iface2; +} +#endif + +void MainWindow::setupRMBSpecialCommands( TQValueList &ids, + TQMap &commands, TQWidget *w ) +{ + int id; + + if ( ::tqqt_cast(w) ) { + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator( 0 ); + if ( ( (QDesignerTabWidget*)w )->count() > 1) { + ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); + commands.insert( "remove", id ); + } + ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); + commands.insert( "add", id ); + } else if ( ::tqqt_cast(w) ) { + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator( 0 ); + if ( ( (QDesignerWidgetStack*)w )->count() > 1) { + ids << ( id = rmbWidgets->insertItem( i18n("Previous Page"), -1, 0 ) ); + commands.insert( "prevpage", id ); + ids << ( id = rmbWidgets->insertItem( i18n("Next Page"), -1, 0 ) ); + ids << rmbWidgets->insertSeparator( 0 ); + commands.insert( "nextpage", id ); + ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); + commands.insert( "remove", id ); + } + ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); + commands.insert( "add", id ); + } else if ( ::tqqt_cast(w) ) { + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator( 0 ); + if ( ( (TQToolBox*)w )->count() > 1 ) { + ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); + commands.insert( "remove", id ); + } + ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); + commands.insert( "add", id ); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + } else if ( WidgetDatabase:: + isCustomPluginWidget( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); + if ( iface && iface->supportsPages( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) { + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator( 0 ); + + if ( iface->count( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) > 1 ) { + ids << ( id = rmbWidgets->insertItem( i18n( "Delete Page" ), -1, 0 ) ); + commands.insert( "remove", id ); + } + ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); + commands.insert( "add", id ); + if ( iface->currentIndex( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) != -1 ) { + ids << ( id = rmbWidgets->insertItem( i18n("Rename Current Page..."), -1, 0 ) ); + commands.insert( "rename", id ); + } + } + if ( iface ) + iface->release(); +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + } + + if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator( 0 ); + ids << ( id = rmbWidgets->insertItem( i18n("Edit..."), -1, 0 ) ); + commands.insert( "edit", id ); + } +} + +void MainWindow::setupRMBSpecialCommands( TQValueList &ids, + TQMap &commands, FormWindow *fw ) +{ + int id; + + if ( ::tqqt_cast(fw->mainContainer()) ) { + if ( ids.isEmpty() ) + ids << rmbFormWindow->insertSeparator( 0 ); + + if ( ( (TQWizard*)fw->mainContainer() )->pageCount() > 1) { + ids << ( id = rmbFormWindow->insertItem( i18n("Delete Page"), -1, 0 ) ); + commands.insert( "remove", id ); + } + + ids << ( id = rmbFormWindow->insertItem( i18n("Add Page"), -1, 0 ) ); + commands.insert( "add", id ); + + ids << ( id = rmbFormWindow->insertItem( i18n("Edit Page Title..."), -1, 0 ) ); + commands.insert( "rename", id ); + + ids << ( id = rmbFormWindow->insertItem( i18n("Edit Pages..."), -1, 0 ) ); + commands.insert( "edit", id ); + + } else if ( ::tqqt_cast(fw->mainContainer()) ) { + if ( ids.isEmpty() ) + ids << rmbFormWindow->insertSeparator( 0 ); + ids << ( id = rmbFormWindow->insertItem( i18n( "Add Menu Item" ), -1, 0 ) ); + commands.insert( "add_menu_item", id ); + ids << ( id = rmbFormWindow->insertItem( i18n( "Add Toolbar" ), -1, 0 ) ); + commands.insert( "add_toolbar", id ); + } +} + +void MainWindow::handleRMBProperties( int id, TQMap &props, TQWidget *w ) +{ + if ( id == props[ "text" ] ) { + bool ok = FALSE; + bool oldDoWrap = FALSE; + if ( ::tqqt_cast(w) ) { + int align = w->property( "alignment" ).toInt(); + if ( align & WordBreak ) + oldDoWrap = TRUE; + } + bool doWrap = oldDoWrap; + + TQString text; + if ( ::tqqt_cast(w) || ::tqqt_cast(w) || ::tqqt_cast(w) ) { + text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqqt_cast(w), &doWrap ); + ok = !text.isNull(); + } else { + text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), + TQLineEdit::Normal, w->property("text").toString(), &ok, this ); + } + if ( ok ) { + if ( oldDoWrap != doWrap ) { + TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "wordwrap", TQVariant( oldDoWrap, 0 ), + TQVariant( doWrap, 0 ), TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); + } + + TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "text", w->property( "text" ), + text, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); + } + } else if ( id == props[ "title" ] ) { + bool ok = FALSE; + TQString title = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), + TQLineEdit::Normal, w->property("title").toString(), &ok, this ); + if ( ok ) { + TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "title", w->property( "title" ), + title, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); + } + } else if ( id == props[ "pagetitle" ] ) { + bool ok = FALSE; + TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), + TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this ); + if ( ok ) { + TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "pageTitle", + w->property( "pageTitle" ), + text, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pageTitle", TRUE ); + } + } else if ( id == props[ "pixmap" ] ) { + TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap(); + TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix ); + if ( !pix.isNull() ) { + TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "pixmap", w->property( "pixmap" ), + pix, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pixmap", TRUE ); + } + } +} + +void MainWindow::handleRMBSpecialCommands( int id, TQMap &commands, TQWidget *w ) +{ + if ( ::tqqt_cast(w) ) { + TQTabWidget *tw = (TQTabWidget*)w; + if ( id == commands[ "add" ] ) { + AddTabPageCommand *cmd = + new AddTabPageCommand( i18n( "Add Page to %1" ).arg( tw->name() ), formWindow(), + tw, "Tab" ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "remove" ] ) { + if ( tw->currentPage() ) { + QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; + DeleteTabPageCommand *cmd = + new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ). + arg( dtw->pageTitle() ).arg( tw->name() ), + formWindow(), tw, tw->currentPage() ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } + } else if ( ::tqqt_cast(w) ) { + TQToolBox *tb = (TQToolBox*)w; + if ( id == commands[ "add" ] ) { + AddToolBoxPageCommand *cmd = + new AddToolBoxPageCommand( i18n( "Add Page to %1" ).arg( tb->name() ), + formWindow(), + tb, "Page" ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "remove" ] ) { + if ( tb->currentItem() ) { + DeleteToolBoxPageCommand *cmd = + new DeleteToolBoxPageCommand( i18n( "Delete Page %1 of %2" ). + arg( tb->itemLabel( tb->currentIndex() ) ). + arg( tb->name() ), + formWindow(), tb, tb->currentItem() ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } + } else if ( ::tqqt_cast(w) ) { + QDesignerWidgetStack *ws = (QDesignerWidgetStack*)w; + if ( id == commands[ "add" ] ) { + AddWidgetStackPageCommand *cmd = + new AddWidgetStackPageCommand( i18n( "Add Page to %1" ).arg( ws->name() ), + formWindow(), ws ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "remove" ] ) { + if ( ws->visibleWidget() ) { + DeleteWidgetStackPageCommand *cmd = + new DeleteWidgetStackPageCommand( i18n( "Delete Page %1 of %2" ). + arg( ws->currentPage() ).arg( ws->name() ), + formWindow(), ws, ws->visibleWidget() ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } else if ( id == commands[ "nextpage" ] ) { + int currentPage = w->property( "currentPage" ).toInt(); + TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = + new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "currentPage", currentPage, + currentPage + 1, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); + } else if ( id == commands[ "prevpage" ] ) { + int currentPage = w->property( "currentPage" ).toInt(); + TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = + new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "currentPage", currentPage, + currentPage -1, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); + } +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + } else if ( WidgetDatabase:: + isCustomPluginWidget( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + if ( id == commands[ "add" ] ) { + AddContainerPageCommand *cmd = + new AddContainerPageCommand( i18n( "Add Page to %1" ).arg( w->name() ), + formWindow(), w, "Page" ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "remove" ] ) { + TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); + if ( iface ) { + TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + int index = iface->currentIndex( wClassName, w ); + DeleteContainerPageCommand *cmd = + new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ). + arg( iface->pageLabel( wClassName, + w, index ) ). + arg( w->name() ), + formWindow(), w, index ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + iface->release(); + } + } else if ( id == commands[ "rename" ] ) { + TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); + if ( iface ) { + bool ok = FALSE; + TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + int index = iface->currentIndex( wClassName, w ); + TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), + TQLineEdit::Normal, + iface->pageLabel( wClassName, w, + index ), + &ok, this ); + if ( ok ) { + RenameContainerPageCommand *cmd = + new RenameContainerPageCommand( i18n( "Rename Page %1 to %2" ). + arg( iface-> + pageLabel( wClassName, w, + index ) ). + arg( text ), formWindow(), + w, index, text ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + iface->release(); + } + } +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + } + + if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + if ( id == commands[ "edit" ] ) + WidgetFactory::editWidget( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), this, w, formWindow() ); + } +} + +void MainWindow::handleRMBSpecialCommands( int id, TQMap &commands, FormWindow *fw ) +{ + if ( ::tqqt_cast(fw->mainContainer()) ) { + TQWizard *wiz = (TQWizard*)fw->mainContainer(); + if ( id == commands[ "add" ] ) { + AddWizardPageCommand *cmd = + new AddWizardPageCommand( i18n( "Add Page to %1" ).arg( wiz->name() ), + formWindow(), wiz, "WizardPage" ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "remove" ] ) { + if ( wiz->currentPage() ) { + QDesignerWizard *dw = (QDesignerWizard*)wiz; + DeleteWizardPageCommand *cmd = + new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). + arg( dw->pageTitle() ).arg( wiz->name() ), + formWindow(), wiz, + wiz->indexOf( wiz->currentPage() ) ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } else if ( id == commands[ "edit" ] ) { + WizardEditor *e = new WizardEditor( this, wiz, fw ); + e->exec(); + delete e; + } else if ( id == commands[ "rename" ] ) { + + bool ok = FALSE; + QDesignerWizard *dw = (QDesignerWizard*)wiz; + TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), + TQLineEdit::Normal, dw->pageTitle(), &ok, this ); + if ( ok ) { + TQString pn( i18n( "Rename page %1 of %2" ).arg( dw->pageTitle() ).arg( wiz->name() ) ); + RenameWizardPageCommand *cmd = + new RenameWizardPageCommand( pn, formWindow() + , wiz, wiz->indexOf( wiz->currentPage() ), text ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } + } else if ( ::tqqt_cast(fw->mainContainer()) ) { + TQMainWindow *mw = (TQMainWindow*)fw->mainContainer(); + if ( id == commands[ "add_toolbar" ] ) { + AddToolBarCommand *cmd = + new AddToolBarCommand( i18n( "Add Toolbar to '%1'" ).arg( formWindow()->name() ), + formWindow(), mw ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "add_menu_item" ] ) { + AddMenuCommand *cmd = + new AddMenuCommand( i18n( "Add Menu to '%1'" ).arg( formWindow()->name() ), + formWindow(), mw ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } +} + +void MainWindow::clipboardChanged() +{ + TQString text( tqApp->clipboard()->text() ); + TQString start( "" ); + actionEditPaste->setEnabled( text.left( start.length() ) == start ); +} + +void MainWindow::selectionChanged() +{ + layoutChilds = FALSE; + layoutSelected = FALSE; + breakLayout = FALSE; + if ( !formWindow() ) { + actionEditCut->setEnabled( FALSE ); + actionEditCopy->setEnabled( FALSE ); + actionEditDelete->setEnabled( FALSE ); + actionEditAdjustSize->setEnabled( FALSE ); + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditSplitHorizontal->setEnabled( FALSE ); + actionEditSplitVertical->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( FALSE ); + actionEditLower->setEnabled( FALSE ); + actionEditRaise->setEnabled( FALSE ); + actionEditAdjustSize->setEnabled( FALSE ); + return; + } + + int selectedWidgets = formWindow()->numSelectedWidgets(); + bool enable = selectedWidgets > 0; + actionEditCut->setEnabled( enable ); + actionEditCopy->setEnabled( enable ); + actionEditDelete->setEnabled( enable ); + actionEditLower->setEnabled( enable ); + actionEditRaise->setEnabled( enable ); + + actionEditAdjustSize->setEnabled( FALSE ); + actionEditSplitHorizontal->setEnabled( FALSE ); + actionEditSplitVertical->setEnabled( FALSE ); + + enable = FALSE; + TQWidgetList widgets = formWindow()->selectedWidgets(); + if ( selectedWidgets > 1 ) { + int unlaidout = 0; + int laidout = 0; + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) + unlaidout++; + else + laidout++; + } + actionEditHLayout->setEnabled( unlaidout > 1 ); + actionEditVLayout->setEnabled( unlaidout > 1 ); + actionEditSplitHorizontal->setEnabled( unlaidout > 1 ); + actionEditSplitVertical->setEnabled( unlaidout > 1 ); + actionEditGridLayout->setEnabled( unlaidout > 1 ); + actionEditBreakLayout->setEnabled( laidout > 0 ); + actionEditAdjustSize->setEnabled( laidout > 0 ); + layoutSelected = unlaidout > 1; + breakLayout = laidout > 0; + } else if ( selectedWidgets == 1 ) { + TQWidget *w = widgets.first(); + bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) || + w == formWindow()->mainContainer(); + actionEditAdjustSize->setEnabled( !w->parentWidget() || + WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ); + + if ( !isContainer ) { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { + actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + breakLayout = TRUE; + } else { + actionEditBreakLayout->setEnabled( FALSE ); + } + } else { + if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { + if ( !formWindow()->hasInsertedChildren( w ) ) { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( FALSE ); + } else { + actionEditHLayout->setEnabled( TRUE ); + actionEditVLayout->setEnabled( TRUE ); + actionEditGridLayout->setEnabled( TRUE ); + actionEditBreakLayout->setEnabled( FALSE ); + layoutChilds = TRUE; + } + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { + actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + breakLayout = TRUE; + } + } else { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + breakLayout = TRUE; + } + } + } else if ( selectedWidgets == 0 ) { + actionEditAdjustSize->setEnabled( TRUE ); + TQWidget *w = formWindow()->mainContainer(); + if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { + if ( !formWindow()->hasInsertedChildren( w ) ) { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( FALSE ); + } else { + actionEditHLayout->setEnabled( TRUE ); + actionEditVLayout->setEnabled( TRUE ); + actionEditGridLayout->setEnabled( TRUE ); + actionEditBreakLayout->setEnabled( FALSE ); + layoutChilds = TRUE; + } + } else { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( TRUE ); + breakLayout = TRUE; + } + } else { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( FALSE ); + } +} + +static TQString fixArgs( const TQString &s2 ) +{ + TQString s = s2; + return s.replace( ',', ';' ); +} + +void MainWindow::writeConfig() +{ + TQSettings config; + + // No search path for unix, only needs application name + config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); + + TQString keybase = DesignerApplication::settingsKey(); + + if (savePluginPaths) { + TQStringList pluginPaths = TQApplication::libraryPaths(); + config.writeEntry( keybase + "PluginPaths", pluginPaths ); + } + config.writeEntry( keybase + "RestoreWorkspace", restoreConfig ); + config.writeEntry( keybase + "SplashScreen", splashScreen ); + config.writeEntry( keybase + "ShowStartDialog", shStartDialog ); + config.writeEntry( keybase + "FileFilter", fileFilter ); + config.writeEntry( keybase + "TemplatePath", templPath ); + config.writeEntry( keybase + "RecentlyOpenedFiles", recentlyFiles ); + config.writeEntry( keybase + "RecentlyOpenedProjects", recentlyProjects ); + config.writeEntry( keybase + "DatabaseAutoEdit", databaseAutoEdit ); + + config.writeEntry( keybase + "AutoSave/Enabled", autoSaveEnabled ); + config.writeEntry( keybase + "AutoSave/Interval", autoSaveInterval ); + + config.writeEntry( keybase + "Grid/Snap", snGrid ); + config.writeEntry( keybase + "Grid/Show", sGrid ); + config.writeEntry( keybase + "Grid/x", grid().x() ); + config.writeEntry( keybase + "Grid/y", grid().y() ); + config.writeEntry( keybase + "LastToolPage", + toolBox->itemLabel( toolBox->currentIndex() ) ); + + config.writeEntry( keybase + "Background/UsePixmap", backPix ); + config.writeEntry( keybase + "Background/Color", (int)qworkspace->backgroundColor().rgb() ); + if ( qworkspace->backgroundPixmap() ) + qworkspace->backgroundPixmap()->save( TQDir::home().absPath() + "/.designer/" + "background.xpm", "PNG" ); + + config.writeEntry( keybase + "Geometries/MainwindowX", x() ); + config.writeEntry( keybase + "Geometries/MainwindowY", y() ); + config.writeEntry( keybase + "Geometries/MainwindowWidth", width() ); + config.writeEntry( keybase + "Geometries/MainwindowHeight", height() ); + config.writeEntry( keybase + "Geometries/MainwindowMaximized", isMaximized() ); + config.writeEntry( keybase + "Geometries/PropertyEditorX", propertyEditor->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/PropertyEditorY", propertyEditor->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/PropertyEditorWidth", propertyEditor->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/PropertyEditorHeight", propertyEditor->parentWidget()->height() ); + config.writeEntry( keybase + "Geometries/HierarchyViewX", hierarchyView->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/HierarchyViewY", hierarchyView->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/HierarchyViewWidth", hierarchyView->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/HierarchyViewHeight", hierarchyView->parentWidget()->height() ); + config.writeEntry( keybase + "Geometries/WorkspaceX", wspace->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/WorkspaceY", wspace->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/WorkspaceWidth", wspace->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/WorkspaceHeight", wspace->parentWidget()->height() ); + + config.writeEntry( keybase + "View/TextLabels", usesTextLabel() ); + config.writeEntry( keybase + "View/BigIcons", usesBigPixmaps() ); + + TQString mwlKey = "MainwindowLayout"; + if ( singleProjectMode() ) + mwlKey += "S"; + TQString mainWindowLayout; + TQTextStream ts( &mainWindowLayout, IO_WriteOnly ); + ts << *this; + config.writeEntry( keybase + mwlKey, mainWindowLayout ); + + + TQPtrList *lst = MetaDataBase::customWidgets(); + config.writeEntry( keybase + "CustomWidgets/num", (int)lst->count() ); + int j = 0; + TQDir::home().mkdir( ".designer" ); + for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { + TQStringList l; + l << w->className; + l << w->includeFile; + l << TQString::number( (int)w->includePolicy ); + l << TQString::number( w->sizeHint.width() ); + l << TQString::number( w->sizeHint.height() ); + l << TQString::number( w->lstSignals.count() ); + for ( TQValueList::ConstIterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) + l << TQString( fixArgs( *it ) ); + l << TQString::number( w->lstSlots.count() ); + for ( TQValueList::ConstIterator it2 = w->lstSlots.begin(); it2 != w->lstSlots.end(); ++it2 ) { + l << fixArgs( (*it2).function ); + l << (*it2).access; + } + l << TQString::number( w->lstProperties.count() ); + for ( TQValueList::ConstIterator it3 = w->lstProperties.begin(); it3 != w->lstProperties.end(); ++it3 ) { + l << (*it3).property; + l << (*it3).type; + } + l << TQString::number( size_type_to_int( w->sizePolicy.horData() ) ); + l << TQString::number( size_type_to_int( w->sizePolicy.verData() ) ); + l << TQString::number( (int)w->isContainer ); + config.writeEntry( keybase + "CustomWidgets/Widget" + TQString::number( j++ ), l, ',' ); + w->pixmap->save( TQDir::home().absPath() + "/.designer/" + w->className, "XPM" ); + } + + TQStringList l; + for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() ) + l << a->text(); + config.writeEntry( keybase + "ToolBox/CommonWidgets", l ); +} + +static TQString fixArgs2( const TQString &s2 ) +{ + TQString s = s2; + return s.replace( ';', ',' ); +} + +void MainWindow::readConfig() +{ + TQString keybase = DesignerApplication::settingsKey(); + TQSettings config; + config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); + + bool ok; + bool readPreviousConfig = FALSE; + TQString backPixName( TQDir::home().absPath() + "/.designer/" + "background.xpm" ); + restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); + if ( !ok ) { + keybase = DesignerApplication::oldSettingsKey(); + restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); + if ( !ok ) { + if ( oWindow ) { + oWindow->shuttingDown(); + ( (TQDockWindow*)oWindow->parent() )->hide(); + } + TQPixmap pix; + pix.load( backPixName ); + if ( !pix.isNull() ) + qworkspace->setBackgroundPixmap( pix ); + return; + } + readPreviousConfig = TRUE; + } + if ( !readPreviousConfig ) { + fileFilter = config.readEntry( keybase + "FileFilter", fileFilter ); + templPath = config.readEntry( keybase + "TemplatePath", TQString() ); + databaseAutoEdit = config.readBoolEntry( keybase + "DatabaseAutoEdit", databaseAutoEdit ); + shStartDialog = config.readBoolEntry( keybase + "ShowStartDialog", shStartDialog ); + autoSaveEnabled = config.readBoolEntry( keybase + "AutoSave/Enabled", autoSaveEnabled ); + autoSaveInterval = config.readNumEntry( keybase + "AutoSave/Interval", autoSaveInterval ); + } + + if ( restoreConfig || readPreviousConfig ) { + TQString s = config.readEntry( keybase + "LastToolPage" ); + for ( int i = 0; i < toolBox->count(); ++i ) { + if ( toolBox->itemLabel(i) == s ) { + toolBox->setCurrentIndex( i ); + break; + } + } + // We know that the oldSettingsKey() will return 3.1 + if ( keybase == DesignerApplication::oldSettingsKey() ) { + if (keybase.contains("3.1")) + recentlyFiles = config.readListEntry( keybase + "RecentlyOpenedFiles", ',' ); + else + recentlyFiles = config.readListEntry(keybase + "RecentlyOpenedFiles"); + + if ( recentlyFiles.count() == 1 && recentlyFiles[0].isNull() ) + recentlyFiles.clear(); + if (keybase.contains("3.1")) + recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects", ',' ); + else + recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects"); + if ( recentlyProjects.count() == 1 && recentlyProjects[0].isNull() ) + recentlyProjects.clear(); + } else { + recentlyFiles = config.readListEntry( keybase + "RecentlyOpenedFiles" ); + recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects" ); + } + + backPix = config.readBoolEntry( keybase + "Background/UsePixmap", TRUE ) | readPreviousConfig; + if ( backPix ) { + TQPixmap pix; + pix.load( backPixName ); + if ( !pix.isNull() ) + qworkspace->setBackgroundPixmap( pix ); + } else { + qworkspace->setBackgroundColor( TQColor( (TQRgb)config.readNumEntry( keybase + "Background/Color" ) ) ); + } + + if ( !readPreviousConfig ) { + splashScreen = config.readBoolEntry( keybase + "SplashScreen", TRUE ); + + sGrid = config.readBoolEntry( keybase + "Grid/Show", TRUE ); + snGrid = config.readBoolEntry( keybase + "Grid/Snap", TRUE ); + grd.setX( config.readNumEntry( keybase + "Grid/x", 10 ) ); + grd.setY( config.readNumEntry( keybase + "Grid/y", 10 ) ); + + if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", FALSE ) ) { + TQRect r( pos(), size() ); + r.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", r.x() ) ); + r.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", r.y() ) ); + r.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", r.width() ) ); + r.setHeight( config.readNumEntry( keybase + "Geometries/MainwindowHeight", r.height() ) ); + + TQRect desk = TQApplication::desktop()->geometry(); + TQRect inter = desk.intersect( r ); + resize( r.size() ); + if ( inter.width() * inter.height() > ( r.width() * r.height() / 20 ) ) { + move( r.topLeft() ); + } + } + setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", FALSE ) ); + setUsesBigPixmaps( FALSE /*config.readBoolEntry( "BigIcons", FALSE )*/ ); // ### disabled for now + } + } + int num = config.readNumEntry( keybase + "CustomWidgets/num" ); + for ( int j = 0; j < num; ++j ) { + MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget; + TQStringList l = config.readListEntry( keybase + "CustomWidgets/Widget" + TQString::number( j ), ',' ); + w->className = l[ 0 ]; + w->includeFile = l[ 1 ]; + w->includePolicy = (MetaDataBase::CustomWidget::IncludePolicy)l[ 2 ].toInt(); + w->sizeHint.setWidth( l[ 3 ].toInt() ); + w->sizeHint.setHeight( l[ 4 ].toInt() ); + uint c = 5; + if ( l.count() > c ) { + int numSignals = l[ c ].toInt(); + c++; + for ( int i = 0; i < numSignals; ++i, c++ ) + w->lstSignals.append( fixArgs2( l[ c ] ).latin1() ); + } + if ( l.count() > c ) { + int numSlots = l[ c ].toInt(); + c++; + for ( int i = 0; i < numSlots; ++i ) { + MetaDataBase::Function slot; + slot.function = fixArgs2( l[ c ] ); + c++; + slot.access = l[ c ]; + c++; + w->lstSlots.append( slot ); + } + } + if ( l.count() > c ) { + int numProperties = l[ c ].toInt(); + c++; + for ( int i = 0; i < numProperties; ++i ) { + MetaDataBase::Property prop; + prop.property = l[ c ]; + c++; + prop.type = l[ c ]; + c++; + w->lstProperties.append( prop ); + } + } if ( l.count() > c ) { + TQSizePolicy::SizeType h, v; + h = int_to_size_type( l[ c++ ].toInt() ); + v = int_to_size_type( l[ c++ ].toInt() ); + w->sizePolicy = TQSizePolicy( h, v ); + } + if ( l.count() > c ) { + w->isContainer = (bool)l[ c++ ].toInt(); + } + w->pixmap = new TQPixmap( BarIcon( TQDir::home().absPath() + "/.designer/" + w->className , KDevDesignerPartFactory::instance()) ); + MetaDataBase::addCustomWidget( w ); + } + if ( num > 0 ) + rebuildCustomWidgetGUI(); + + if ( !restoreConfig ) + return; + +#ifndef TQ_WS_MAC + /* I'm sorry to make this not happen on the Mac, but it seems to hang somewhere deep + in TQLayout, it gets into a very large loop - and seems it has to do with clever + things the designer does ###Sam */ + TQApplication::sendPostedEvents(); +#endif + + if ( !readPreviousConfig ) { + TQString mwlKey = "MainwindowLayout"; + if ( singleProjectMode() ) + mwlKey += "S"; + TQString mainWindowLayout = config.readEntry( keybase + mwlKey ); + TQTextStream ts( &mainWindowLayout, IO_ReadOnly ); + ts >> *this; + } + if ( readPreviousConfig && oWindow ) { + oWindow->shuttingDown(); + ( (TQDockWindow*)oWindow->parent() )->hide(); + } + + rebuildCustomWidgetGUI(); + + TQStringList l = config.readListEntry( keybase + "ToolBox/CommonWidgets" ); + if ( !l.isEmpty() ) { + TQPtrList lst; + commonWidgetsPage.clear(); + for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { + for ( TQAction *a = toolActions.first(); a; a = toolActions.next() ) { + if ( *it == a->text() ) { + lst.append( a ); + break; + } + } + } + if ( lst != commonWidgetsPage ) { + commonWidgetsPage = lst; + rebuildCommonWidgetsToolBoxPage(); + } + } +} + +HierarchyView *MainWindow::objectHierarchy() const +{ + if ( !hierarchyView ) + ( (MainWindow*)this )->setupHierarchyView(); + return hierarchyView; +} + +TQPopupMenu *MainWindow::setupNormalHierarchyMenu( TQWidget *parent ) +{ + TQPopupMenu *menu = new TQPopupMenu( parent ); + + actionEditCut->addTo( menu ); + actionEditCopy->addTo( menu ); + actionEditPaste->addTo( menu ); + actionEditDelete->addTo( menu ); + + return menu; +} + +TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot ) +{ + TQPopupMenu *menu = new TQPopupMenu( parent ); + + menu->insertItem( i18n( "Add Page" ), parent, addSlot ); + menu->insertItem( i18n( "Delete Page" ), parent, removeSlot ); + menu->insertSeparator(); + actionEditCut->addTo( menu ); + actionEditCopy->addTo( menu ); + actionEditPaste->addTo( menu ); + actionEditDelete->addTo( menu ); + + return menu; +} + +void MainWindow::closeEvent( TQCloseEvent *e ) +{ + if ( singleProject ) { + hide(); + e->ignore(); + return; + } + + TQWidgetList windows = qWorkspace()->windowList(); + TQWidgetListIt wit( windows ); + while ( wit.current() ) { + TQWidget *w = wit.current(); + ++wit; + if ( ::tqqt_cast(w) ) { + if ( ( (FormWindow*)w )->formFile()->editor() ) + windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); + if ( ( (FormWindow*)w )->formFile()->formWindow() ) + windows.removeRef( ( (FormWindow*)w )->formFile()->formWindow() ); + if ( !( (FormWindow*)w )->formFile()->close() ) { + e->ignore(); + return; + } + } else if ( ::tqqt_cast(w) ) { + if ( !( (SourceEditor*)w )->close() ) { + e->ignore(); + return; + } + } + w->close(); + } + + TQMapConstIterator it = projects.begin(); + while( it != projects.end() ) { + Project *pro = it.data(); + ++it; + if ( pro->isModified() ) { + switch ( TQMessageBox::warning( this, i18n( "Save Project Settings" ), + i18n( "Save changes to '%1'?" ).arg( pro->fileName() ), + i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { + case 0: // save + pro->save(); + break; + case 1: // don't save + break; + case 2: // cancel + e->ignore(); + return; + default: + break; + } + } + } + + writeConfig(); + hide(); + e->accept(); + + if ( client ) { + TQDir home( TQDir::homeDirPath() ); + home.remove( ".designerpid" ); + } +} + +Workspace *MainWindow::workspace() const +{ + if ( !wspace ) + ( (MainWindow*)this )->setupWorkspace(); + return wspace; +} + +PropertyEditor *MainWindow::propertyeditor() const +{ + if ( !propertyEditor ) + ( (MainWindow*)this )->setupPropertyEditor(); + return propertyEditor; +} + +ActionEditor *MainWindow::actioneditor() const +{ + if ( !actionEditor ) + ( (MainWindow*)this )->setupActionEditor(); + return actionEditor; +} + +bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) +{ + if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) { + TQString defSignal = WidgetFactory::defaultSignal( TQT_TQOBJECT(w) ); + if ( defSignal.isEmpty() ) { + editSource(); + } else { + TQString s = TQString( w->name() ) + "_" + defSignal; + LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() ); + if ( iface ) { + TQStrList sigs = iface->signalNames( TQT_TQOBJECT(w) ); + TQString fullSignal; + for ( int i = 0; i < (int)sigs.count(); ++i ) { + TQString sig = sigs.at( i ); + if ( sig.left( sig.find( '(' ) ) == defSignal ) { + fullSignal = sig; + break; + } + } + + if ( !fullSignal.isEmpty() ) { + TQString signl = fullSignal; + fullSignal = fullSignal.mid( fullSignal.find( '(' ) + 1 ); + fullSignal.remove( (int)fullSignal.length() - 1, 1 ); + fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() ); + s += "(" + fullSignal + ")"; + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(f), s.latin1() ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(f), s.latin1(), "", "public", "slot", + f->project()->language(), "void" ); + s = s.left( s.find( '(' ) ).latin1(); + if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(f), TQT_TQOBJECT(w), defSignal.latin1(), TQT_TQOBJECT(f->mainContainer()), s.latin1() ) ) { + MetaDataBase::Connection conn; + conn.sender = TQT_TQOBJECT(w); + conn.receiver = TQT_TQOBJECT(f->mainContainer()); + conn.signal = signl; + conn.slot = s; + AddConnectionCommand *cmd = + new AddConnectionCommand( i18n( "Add Connection" ), f, conn ); + f->commandHistory()->addCommand( cmd ); + cmd->execute(); + f->formFile()->setModified( TRUE ); + } + } + } + editFunction( s, TRUE ); + } + return TRUE; + } + if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + statusMessage( i18n( "Edit %1..." ).arg( w->className() ) ); + WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), + this, w, formWindow() ); + statusBar()->clear(); + return TRUE; + } + + const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); + const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + if ( text && text->designable(w) ) { + bool ok = FALSE; + bool oldDoWrap = FALSE; + if ( ::tqqt_cast(w) ) { + int align = w->property( "alignment" ).toInt(); + if ( align & WordBreak ) + oldDoWrap = TRUE; + } + bool doWrap = oldDoWrap; + + TQString text; + if ( ::tqqt_cast(w) || ::tqqt_cast(w) || ::tqqt_cast(w) ) { + text = MultiLineEditor::getText( this, w->property( "text" ).toString(), + !::tqqt_cast(w), &doWrap ); + ok = !text.isNull(); + } else { + text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), + TQLineEdit::Normal, w->property("text").toString(), &ok, this ); + } + if ( ok ) { + if ( oldDoWrap != doWrap ) { + TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "wordwrap", TQVariant( oldDoWrap, 0 ), + TQVariant( doWrap, 0 ), TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); + } + + TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "text", w->property( "text" ), + text, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); + } + return TRUE; + } + if ( title && title->designable(w) ) { + bool ok = FALSE; + TQString text; + text = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); + if ( ok ) { + TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "title", w->property( "title" ), + text, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); + } + return TRUE; + } + + if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) + editSource(); + + return TRUE; +} + +void MainWindow::rebuildCustomWidgetGUI() +{ + customWidgetToolBar->clear(); + customWidgetMenu->clear(); + customWidgetToolBar2->clear(); + int count = 0; + + TQPtrListIterator it( toolActions ); + TQAction *action; + while ( ( action = it.current() ) ) { + ++it; + if ( ( (WidgetAction*)action )->group() == "Custom Widgets" ) + delete action; + } + + TQPtrList *lst = MetaDataBase::customWidgets(); + + actionToolsCustomWidget->addTo( customWidgetMenu ); + customWidgetMenu->insertSeparator(); + + for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { + WidgetAction* a = new WidgetAction( "Custom Widgets", actionGroupTools, TQString::number( w->id ).latin1() ); + a->setToggleAction( TRUE ); + a->setText( w->className ); + a->setIconSet( *w->pixmap ); + a->setStatusTip( i18n( "Insert a %1 (custom widget)" ).arg( w->className ) ); + a->setWhatsThis( i18n("%1 (custom widget)" + "

Click Edit Custom Widgets... in the Tools|Custom menu to " + "add and change custom widgets. You can add properties as well as " + "signals and slots to integrate them into TQt Designer, " + "and provide a pixmap which will be used to represent the widget on the form.

").arg( w->className ) ); + + a->addTo( customWidgetToolBar ); + a->addTo( customWidgetToolBar2 ); + a->addTo( customWidgetMenu ); + count++; + } + TQWidget *wid; + customWidgetToolBar2->setStretchableWidget( ( wid = new TQWidget( customWidgetToolBar2 ) ) ); + wid->setBackgroundMode( customWidgetToolBar2->backgroundMode() ); + + if ( count == 0 ) + customWidgetToolBar->hide(); + else if ( customWidgetToolBar->isVisible() ) + customWidgetToolBar->show(); +} + +void MainWindow::rebuildCommonWidgetsToolBoxPage() +{ + toolBox->setUpdatesEnabled( FALSE ); + commonWidgetsToolBar->setUpdatesEnabled( FALSE ); + commonWidgetsToolBar->clear(); + for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() ) + a->addTo( commonWidgetsToolBar ); + TQWidget *w; + commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); + w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); + toolBox->setUpdatesEnabled( TRUE ); + commonWidgetsToolBar->setUpdatesEnabled( TRUE ); +} + +bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) +{ + TQWidgetList windows = qWorkspace()->windowList(); + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + if ( ::tqqt_cast(w) ) { + if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) ) + return TRUE; + } + } + return FALSE; +} + +void MainWindow::setGrid( const TQPoint &p ) +{ + if ( p == grd ) + return; + grd = p; + TQWidgetList windows = qWorkspace()->windowList(); + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + if ( !::tqqt_cast(w) ) + continue; + ( (FormWindow*)w )->mainContainer()->update(); + } +} + +void MainWindow::setShowGrid( bool b ) +{ + if ( b == sGrid ) + return; + sGrid = b; + TQWidgetList windows = qWorkspace()->windowList(); + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + if ( !::tqqt_cast(w) ) + continue; + ( (FormWindow*)w )->mainContainer()->update(); + } +} + +void MainWindow::setSnapGrid( bool b ) +{ + if ( b == snGrid ) + return; + snGrid = b; +} + +TQString MainWindow::documentationPath() const +{ + return TQString( tqInstallPathDocs() ) + "/html/"; +} + +void MainWindow::windowsMenuActivated( int id ) +{ + TQWidget* w = qworkspace->windowList().at( id ); + if ( w ) + w->setFocus(); +} + +void MainWindow::projectSelected( TQAction *a ) +{ + a->setOn( TRUE ); + if ( currentProject ) + currentProject->setActive( FALSE ); + Project *p = *projects.find( a ); + p->setActive( TRUE ); + if ( currentProject == p ) + return; + currentProject = p; + if ( wspace ) + wspace->setCurrentProject( currentProject ); +} + +void MainWindow::openProject( const TQString &fn ) +{ + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( (*it)->fileName() == fn ) { + projectSelected( it.key() ); + return; + } + } + TQApplication::setOverrideCursor( waitCursor ); + Project *pro = new Project( fn, "", projectSettingsPluginManager ); + pro->setModified( FALSE ); + TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, TRUE ); + projects.insert( a, pro ); + projectSelected( a ); + TQApplication::restoreOverrideCursor(); +} + +void MainWindow::checkTempFiles() +{ + TQString s = TQDir::homeDirPath() + "/.designer"; + TQString baseName = s+ "/saved-form-"; + if ( !TQFile::exists( baseName + "1.ui" ) ) + return; + DesignerApplication::closeSplash(); + TQDir d( s ); + d.setNameFilter( "*.ui" ); + TQStringList lst = d.entryList(); + TQApplication::restoreOverrideCursor(); + bool load = TQMessageBox::information( this, i18n( "Restoring Last Session" ), + i18n( "TQt Designer found some temporary saved files, which were\n" + "written when TQt Designer crashed last time. Do you want to\n" + "load these files?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0; + TQApplication::setOverrideCursor( waitCursor ); + for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + if ( load ) + openFormWindow( s + "/" + *it, FALSE ); + d.remove( *it ); + } +} + +void MainWindow::showDialogHelp() +{ + TQWidget *w = (TQWidget*)sender(); + w = w->topLevelWidget(); + + TQString link = documentationPath() + "/designer-manual-13.html#"; + + if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) // own doc for startdialog? + link += "dialog-file-new"; + else if ( ::tqqt_cast(w) ) + link += "dialog-file-create-template"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-functions"; +// else if ( ::tqqt_cast(w) ) + else if ( w->inherits("ConnectionViewerBase") ) + link += "dialog-view-connections"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-form-settings"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-preferences"; + else if ( ::tqqt_cast(w) ) + link += "dialog-image-collection"; +// else if ( ::tqqt_cast(w) ) + else if ( w->inherits( "DatabaseConnectionBase" ) ) + link += "dialog-edit-database-connections"; + else if ( ::tqqt_cast(w) ) + link += "dialog-project-settings"; + else if ( ::tqqt_cast(w) ) + link += "dialog-find-text"; + else if ( ::tqqt_cast(w) ) + link += "dialog-replace-text"; + else if ( ::tqqt_cast(w) ) + link += "dialog-go-to-line"; +// else if ( ::tqqt_cast(w) ) + else if ( w->inherits("ConnectionEditorBase") ) + link += "dialog-edit-connections"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-custom-widgets"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-palette"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-listbox"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-listview"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-iconview"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-table"; + else if ( ::tqqt_cast(w) ) + link += "dialog-text"; + + else { + TQMessageBox::information( this, i18n( "Help" ), + i18n( "There is no help available for this dialog at the moment." ) ); + return; + } + + assistant->showPage( link ); +} + +void MainWindow::setupActionManager() +{ + actionPluginManager = new TQPluginManager( IID_Action, TQApplication::libraryPaths(), pluginDirectory() ); + + TQStringList lst = actionPluginManager->featureList(); + for ( TQStringList::ConstIterator ait = lst.begin(); ait != lst.end(); ++ait ) { + ActionInterface *iface = 0; + actionPluginManager->queryInterface( *ait, &iface ); + if ( !iface ) + continue; + + iface->connectTo( desInterface ); + TQAction *a = iface->create( *ait, TQT_TQOBJECT(this) ); + if ( !a ) + continue; + + TQString grp = iface->group( *ait ); + if ( grp.isEmpty() ) + grp = "3rd party actions"; + TQPopupMenu *menu = 0; + TQToolBar *tb = 0; + + if ( !( menu = (TQPopupMenu*)child( grp.latin1(), TQPOPUPMENU_OBJECT_NAME_STRING ) ) ) { + menu = new TQPopupMenu( this, grp.latin1() ); + menuBar()->insertItem( i18n( grp ), menu ); + } + if ( !( tb = (TQToolBar*)child( grp.latin1(), TQTOOLBAR_OBJECT_NAME_STRING ) ) ) { + tb = new TQToolBar( this, grp.latin1() ); + tb->setCloseMode( TQDockWindow::Undocked ); + addToolBar( tb, grp ); + } + + if ( iface->location( *ait, ActionInterface::Menu ) ) + a->addTo( menu ); + if ( iface->location( *ait, ActionInterface::Toolbar ) ) + a->addTo( tb ); + + iface->release(); + } +} + +void MainWindow::editFunction( const TQString &func, bool rereadSource ) +{ + if ( !formWindow() ) + return; + + if ( formWindow()->formFile()->codeFileState() != FormFile::Ok ) + if ( !formWindow()->formFile()->setupUihFile(FALSE) ) + return; + + TQString lang = currentProject->language(); + if ( !MetaDataBase::hasEditor( lang ) ) { + TQMessageBox::information( this, i18n( "Edit Source" ), + i18n( "There is no plugin for editing %1 code installed.\n" + "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); + return; + } + + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( e->language() == lang && e->formWindow() == formWindow() ) { + e->show(); + e->setFunction( func ); + return; + } + } + + createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang, func, rereadSource ); +} + +void MainWindow::setupRecentlyFilesMenu() +{ + recentlyFilesMenu->clear(); + int id = 0; + for ( TQStringList::ConstIterator it = recentlyFiles.begin(); it != recentlyFiles.end(); ++it ) { + recentlyFilesMenu->insertItem( *it, id ); + id++; + } +} + +void MainWindow::setupRecentlyProjectsMenu() +{ + recentlyProjectsMenu->clear(); + int id = 0; + for ( TQStringList::ConstIterator it = recentlyProjects.begin(); it != recentlyProjects.end(); ++it ) { + recentlyProjectsMenu->insertItem( *it, id ); + id++; + } +} + +TQPtrList MainWindow::projectList() const +{ + TQPtrList list; + TQMapConstIterator it = projects.begin(); + + while( it != projects.end() ) { + Project *p = it.data(); + ++it; + list.append( p->iFace() ); + } + + return list; +} + +TQStringList MainWindow::projectNames() const +{ + TQStringList res; + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) + res << (*it)->projectName(); + return res; +} + +TQStringList MainWindow::projectFileNames() const +{ + TQStringList res; + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) + res << (*it)->makeRelative( (*it)->fileName() ); + return res; +} + +Project *MainWindow::findProject( const TQString &projectName ) const +{ + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( (*it)->projectName() == projectName ) + return *it; + } + return 0; +} + +void MainWindow::setCurrentProject( Project *pro ) +{ + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( *it == pro ) { + projectSelected( it.key() ); + return; + } + } +} + +void MainWindow::setCurrentProjectByFilename( const TQString& proFilename ) +{ + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( (*it)->makeRelative( (*it)->fileName() ) == proFilename ) { + projectSelected( it.key() ); + return; + } + } +} + + +void MainWindow::recentlyFilesMenuActivated( int id ) +{ + if ( id != -1 ) { + if ( !TQFile::exists( *recentlyFiles.at( id ) ) ) { + TQMessageBox::warning( this, i18n( "Open File" ), + i18n( "Could not open '%1'. File does not exist." ). + arg( *recentlyFiles.at( id ) ) ); + recentlyFiles.remove( recentlyFiles.at( id ) ); + return; + } + fileOpen( "", "", *recentlyFiles.at( id ) ); + TQString fn( *recentlyFiles.at( id ) ); + addRecentlyOpened( fn, recentlyFiles ); + } +} + +void MainWindow::recentlyProjectsMenuActivated( int id ) +{ + if ( id != -1 ) { + if ( !TQFile::exists( *recentlyProjects.at( id ) ) ) { + TQMessageBox::warning( this, i18n( "Open Project" ), + i18n( "Could not open '%1'. File does not exist." ). + arg( *recentlyProjects.at( id ) ) ); + recentlyProjects.remove( recentlyProjects.at( id ) ); + return; + } + openProject( *recentlyProjects.at( id ) ); + TQString fn( *recentlyProjects.at( id ) ); + addRecentlyOpened( fn, recentlyProjects ); + } +} + +void MainWindow::addRecentlyOpened( const TQString &fn, TQStringList &lst ) +{ + TQFileInfo fi( fn ); + fi.convertToAbs(); + TQString f = fi.filePath(); + if ( lst.find( f ) != lst.end() ) + lst.remove( f ); + if ( lst.count() >= 10 ) + lst.pop_back(); + lst.prepend( f ); +} + +TemplateWizardInterface * MainWindow::templateWizardInterface( const TQString& className ) +{ + TemplateWizardInterface* iface = 0; + templateWizardPluginManager->queryInterface( className, & iface ); + return iface; +} + +void MainWindow::setupPluginManagers() +{ + editorPluginManager = new TQPluginManager( IID_Editor, TQApplication::libraryPaths(), "/kdevdesigner" ); + MetaDataBase::setEditor( editorPluginManager->featureList() ); + + templateWizardPluginManager = + new TQPluginManager( IID_TemplateWizard, TQApplication::libraryPaths(), pluginDirectory() ); + + MetaDataBase::setupInterfaceManagers( "/designer" ); + preferencePluginManager = + new TQPluginManager( IID_Preference, TQApplication::libraryPaths(), pluginDirectory() ); + projectSettingsPluginManager = + new TQPluginManager( IID_ProjectSettings, TQApplication::libraryPaths(), pluginDirectory() ); + sourceTemplatePluginManager = + new TQPluginManager( IID_SourceTemplate, TQApplication::libraryPaths(), pluginDirectory() ); + + if ( preferencePluginManager ) { + TQStringList lst = preferencePluginManager->featureList(); + for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + PreferenceInterface *i = 0; + preferencePluginManager->queryInterface( *it, &i ); + if ( !i ) + continue; + i->connectTo( designerInterface() ); + PreferenceInterface::Preference *pf = i->preference(); + if ( pf ) + addPreferencesTab( pf->tab, pf->title, pf->receiver, pf->init_slot, pf->accept_slot ); + i->deletePreferenceObject( pf ); + + i->release(); + } + } + if ( projectSettingsPluginManager ) { + TQStringList lst = projectSettingsPluginManager->featureList(); + for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + ProjectSettingsInterface *i = 0; + projectSettingsPluginManager->queryInterface( *it, &i ); + if ( !i ) + continue; + i->connectTo( designerInterface() ); + + ProjectSettingsInterface::ProjectSettings *pf = i->projectSetting(); + if ( pf ) + addProjectTab( pf->tab, pf->title, pf->receiver, pf->init_slot, pf->accept_slot ); + i->deleteProjectSettingsObject( pf ); + i->release(); + } + } +} + +void MainWindow::addPreferencesTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ) +{ + Tab t; + t.w = tab; + t.title = title; + t.receiver = receiver; + t.init_slot = init_slot; + t.accept_slot = accept_slot; + preferenceTabs << t; +} + +void MainWindow::addProjectTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ) +{ + Tab t; + t.w = tab; + t.title = title; + t.receiver = receiver; + t.init_slot = init_slot; + t.accept_slot = accept_slot; + projectTabs << t; +} + +void MainWindow::setModified( bool b, TQWidget *window ) +{ + TQWidget *w = window; + while ( w ) { + if ( ::tqqt_cast(w) ) { + ( (FormWindow*)w )->modificationChanged( b ); + return; + } else if ( ::tqqt_cast(w) ) { + FormWindow *fw = ( (SourceEditor*)w )->formWindow(); + if ( fw && !fw->isFake() ) { + //fw->commandHistory()->setModified( b ); + //fw->modificationChanged( b ); + fw->formFile()->setModified( b, FormFile::WFormCode ); + wspace->update( fw->formFile() ); + } else { + wspace->update(); + } + return; + } + w = w->parentWidget( TRUE ); + } +} + +void MainWindow::editorClosed( SourceEditor *e ) +{ + sourceEditors.take( sourceEditors.findRef( e ) ); +} + +void MainWindow::functionsChanged() +{ + updateFunctionsTimer->start( 0, TRUE ); +} + +void MainWindow::doFunctionsChanged() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) + e->refresh( FALSE ); + hierarchyView->formDefinitionView()->refresh(); +} + +void MainWindow::updateFunctionList() +{ + if ( !qWorkspace()->activeWindow() || !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow(); + se->save(); + hierarchyView->formDefinitionView()->refresh(); + if ( !currentProject->isCpp() && se->formWindow() ) { + LanguageInterface *iface = MetaDataBase::languageInterface( currentProject->language() ); + if ( !iface ) + return; + TQValueList conns; + iface->connections( se->text(), &conns ); + MetaDataBase::setupConnections( TQT_TQOBJECT(se->formWindow()), conns ); + propertyEditor->eventList()->setup(); + } +} + +void MainWindow::updateWorkspace() +{ + wspace->setCurrentProject( currentProject ); +} + +void MainWindow::showDebugStep( TQObject *o, int line ) +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) + e->clearStep(); + if ( !o || line == -1 ) + return; + showSourceLine( o, line, Step ); +} + +void MainWindow::showStackFrame( TQObject *o, int line ) +{ + if ( !o || line == -1 ) + return; + showSourceLine( o, line, StackFrame ); +} + +void MainWindow::showErrorMessage( TQObject *o, int errorLine, const TQString &errorMessage ) +{ + if ( o ) { + errorLine--; // ###### + TQValueList l; + l << ( errorLine + 1 ); + TQStringList l2; + l2 << errorMessage; + TQObjectList ol; + ol.append( o ); + TQStringList ll; + ll << currentProject->locationOfObject( o ); + oWindow->setErrorMessages( l2, l, TRUE, ll, ol ); + showSourceLine( o, errorLine, Error ); + } +} + +void MainWindow::finishedRun() +{ + inDebugMode = FALSE; + previewing = FALSE; + debuggingForms.clear(); + enableAll( TRUE ); + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( e->project() == currentProject ) + e->editorInterface()->setMode( EditorInterface::Editing ); + e->clearStackFrame(); + } + outputWindow()->clearErrorMessages(); +} + +void MainWindow::enableAll( bool enable ) +{ + menuBar()->setEnabled( enable ); + TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( TQT_BASE_OBJECT(o) == wspace->parentWidget() || + TQT_BASE_OBJECT(o) == oWindow->parentWidget() || + TQT_BASE_OBJECT(o) == hierarchyView->parentWidget() ) + continue; + ( (TQWidget*)o )->setEnabled( enable ); + } + delete l; +} + +void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) +{ + TQWidgetList windows = qworkspace->windowList(); + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + FormWindow *fw = 0; + SourceEditor *se = 0; + SourceFile *sf = 0; + if ( ::tqqt_cast(w) ) { + fw = (FormWindow*)w; + } else if ( ::tqqt_cast(w) ) { + se = (SourceEditor*)w; + if ( !se->object() ) + continue; + if ( se->formWindow() ) + fw = se->formWindow(); + else + sf = se->sourceFile(); + } + + if ( fw ) { + if ( fw->project() != currentProject ) + continue; + if ( qstrcmp( fw->name(), o->name() ) == 0 || + fw->isFake() && currentProject->objectForFakeForm( fw ) == o ) { + if ( se ) { + switch ( lm ) { + case Error: + se->editorInterface()->setError( line ); + break; + case Step: + se->editorInterface()->setStep( line ); + break; + case StackFrame: + se->editorInterface()->setStackFrame( line ); + break; + } + return; + } else { + fw->showNormal(); + fw->setFocus(); + lastActiveFormWindow = fw; + tqApp->processEvents(); + se = editSource(); + if ( se ) { + switch ( lm ) { + case Error: + se->editorInterface()->setError( line ); + break; + case Step: + se->editorInterface()->setStep( line ); + break; + case StackFrame: + se->editorInterface()->setStackFrame( line ); + break; + } + return; + } + } + } + } else if ( se ) { + if ( o != sf ) + continue; + switch ( lm ) { + case Error: + se->editorInterface()->setError( line ); + break; + case Step: + se->editorInterface()->setStep( line ); + break; + case StackFrame: + se->editorInterface()->setStackFrame( line ); + break; + } + return; + } + } + + if ( ::tqqt_cast(o) ) { + for ( TQPtrListIterator sources = currentProject->sourceFiles(); + sources.current(); ++sources ) { + SourceFile* f = sources.current(); + if ( f == o ) { + SourceEditor *se = editSource( f ); + if ( se ) { + switch ( lm ) { + case Error: + se->editorInterface()->setError( line ); + break; + case Step: + se->editorInterface()->setStep( line ); + break; + case StackFrame: + se->editorInterface()->setStackFrame( line ); + break; + } + } + return; + } + } + } + + FormFile *ff = currentProject->fakeFormFileFor( o ); + FormWindow *fw = 0; + if ( ff ) + fw = ff->formWindow(); + + if ( !fw && !qwf_forms ) { + tqWarning( "MainWindow::showSourceLine: qwf_forms is NULL!" ); + return; + } + + mblockNewForms = TRUE; + if ( !fw ) + openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) ); + else + fw->formFile()->showEditor( FALSE ); + tqApp->processEvents(); // give all views the chance to get the formwindow + SourceEditor *se = editSource(); + if ( se ) { + switch ( lm ) { + case Error: + se->editorInterface()->setError( line ); + break; + case Step: + se->editorInterface()->setStep( line ); + break; + case StackFrame: + se->editorInterface()->setStackFrame( line ); + break; + } + } + mblockNewForms = FALSE; +} + + +TQObject *MainWindow::findRealObject( TQObject *o ) +{ + TQWidgetList windows = qWorkspace()->windowList(); + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + if ( ::tqqt_cast(w) && TQString( w->name() ) == TQString( o->name() ) ) + return TQT_TQOBJECT(w); + else if ( ::tqqt_cast(w) && ( (SourceEditor*)w )->formWindow() && + TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) ) + return TQT_TQOBJECT(w); + else if ( ::tqqt_cast(w) && ( (SourceEditor*)w )->sourceFile() && + ( (SourceEditor*)w )->sourceFile() == o ) + return o; + } + return 0; +} + +void MainWindow::formNameChanged( FormWindow *fw ) +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(fw) ) + e->refresh( TRUE ); + if ( e->project() == fw->project() ) + e->resetContext(); + } +} + +void MainWindow::breakPointsChanged() +{ + if ( !inDebugMode ) + return; + if ( !qWorkspace()->activeWindow() || !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow(); + if ( !e->object() || !e->project() ) + return; + if ( e->project() != currentProject ) + return; + + if ( !interpreterPluginManager ) { + interpreterPluginManager = + new TQPluginManager( IID_Interpreter, + TQApplication::libraryPaths(), + "/qsa" ); + } + + InterpreterInterface *iiface = 0; + if ( interpreterPluginManager ) { + TQString lang = currentProject->language(); + iiface = 0; + interpreterPluginManager->queryInterface( lang, &iiface ); + if ( !iiface ) + return; + } + + e->saveBreakPoints(); + + for ( TQObject *o = debuggingForms.first(); o; o = debuggingForms.next() ) { + if ( qstrcmp( o->name(), e->object()->name() ) == 0 ) { + iiface->setBreakPoints( o, MetaDataBase::breakPoints( e->object() ) ); + break; + } + } + + for ( e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( e->project() == currentProject && e->sourceFile() ) { + TQValueList bps = MetaDataBase::breakPoints( e->sourceFile() ); + iiface->setBreakPoints( e->object(), bps ); + } + } + + iiface->release(); +} + +int MainWindow::currentLayoutDefaultSpacing() const +{ + if ( ( (MainWindow*)this )->formWindow() ) + return ( (MainWindow*)this )->formWindow()->layoutDefaultSpacing(); + return BOXLAYOUT_DEFAULT_SPACING; +} + +int MainWindow::currentLayoutDefaultMargin() const +{ + if ( ( (MainWindow*)this )->formWindow() ) + return ( (MainWindow*)this )->formWindow()->layoutDefaultMargin(); + return BOXLAYOUT_DEFAULT_MARGIN; +} + +void MainWindow::saveAllBreakPoints() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + e->save(); + e->saveBreakPoints(); + } +} + +void MainWindow::resetBreakPoints() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) + e->resetBreakPoints(); +} + +SourceFile *MainWindow::sourceFile() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( qworkspace->activeWindow() == e ) { + if ( e->sourceFile() ) + return e->sourceFile(); + } + } + return 0; +} + +bool MainWindow::openProjectSettings( Project *pro ) +{ + ProjectSettings dia( pro, this, 0, TRUE ); + SenderObject *senderObject = new SenderObject( designerInterface() ); + TQValueList::ConstIterator it; + for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { + Tab t = *it; + if ( t.title != pro->language() ) + continue; + dia.tabWidget->addTab( t.w, t.title ); + if ( t.receiver ) { + connect( dia.buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); + connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); + connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + senderObject->emitInitSignal(); + disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + } + } + + if ( singleProject ) + dia.tabWidget->setTabEnabled( dia.tabSettings, FALSE ); + + int res = dia.exec(); + + delete senderObject; + + for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { + Tab t = *it; + dia.tabWidget->removePage( t.w ); + t.w->reparent( 0, TQPoint(0,0), FALSE ); + } + + return res == TQDialog::Accepted; +} + +void MainWindow::popupProjectMenu( const TQPoint &pos ) +{ + projectMenu->exec( pos ); +} + +TQStringList MainWindow::sourceTemplates() const +{ + return sourceTemplatePluginManager->featureList(); +} + +SourceTemplateInterface* MainWindow::sourceTemplateInterface( const TQString& templ ) +{ + SourceTemplateInterface *iface = 0; + sourceTemplatePluginManager->queryInterface( templ, &iface); + return iface; +} + +TQString MainWindow::whatsThisFrom( const TQString &key ) +{ + if ( menuHelpFile.isEmpty() ) { + TQString fn( documentationPath() ); + fn += "/designer-manual-11.html"; + TQFile f( fn ); + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + menuHelpFile = ts.read(); + } + } + + int i = menuHelpFile.find( key ); + if ( i == -1 ) + return TQString(); + int start = i; + int end = i; + start = menuHelpFile.findRev( "
  • ", i ) + 4; + end = menuHelpFile.find( '\n', i ) - 1; + return menuHelpFile.mid( start, end - start + 1 ); +} + +void MainWindow::setSingleProject( Project *pro ) +{ + if ( eProject ) { + Project *pro = eProject; + pro->save(); + TQWidgetList windows = qWorkspace()->windowList(); + qWorkspace()->blockSignals( TRUE ); + TQWidgetListIt wit( windows ); + while ( wit.current() ) { + TQWidget *w = wit.current(); + ++wit; + if ( ::tqqt_cast(w) ) { + if ( ( (FormWindow*)w )->project() == pro ) { + if ( ( (FormWindow*)w )->formFile()->editor() ) + windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); + ( (FormWindow*)w )->formFile()->close(); + } + } else if ( ::tqqt_cast(w) ) { + ( (SourceEditor*)w )->close(); + } + } + hierarchyView->clear(); + windows = qWorkspace()->windowList(); + qWorkspace()->blockSignals( FALSE ); + currentProject = 0; + updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); + } + + singleProject = TRUE; + projects.clear(); + TQAction *a = new TQAction( i18n( pro->name() ), i18n( pro->name() ), 0, + actionGroupProjects, 0, TRUE ); + eProject = pro; + projects.insert( a, eProject ); + a->setOn( TRUE ); + actionGroupProjects->removeFrom( projectMenu ); + actionGroupProjects->removeFrom( projectToolBar ); + currentProject = eProject; + currentProject->designerCreated(); +} + +void MainWindow::shuttingDown() +{ + outputWindow()->shuttingDown(); +} + +void MainWindow::showGUIStuff( bool b ) +{ + if ( (bool)guiStuffVisible == b ) + return; + guiStuffVisible = b; + if ( !b ) { + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE ); + toolBox->parentWidget()->hide(); + for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { + tb->hide(); + setAppropriate( tb, FALSE ); + } + propertyEditor->setPropertyEditorEnabled( FALSE ); + setAppropriate( layoutToolBar, FALSE ); + layoutToolBar->hide(); + setAppropriate( toolsToolBar, FALSE ); + toolsToolBar->hide(); + menubar->removeItem( toolsMenuId ); + menubar->removeItem( toolsMenuId + 1 ); + menubar->removeItem( toolsMenuId + 2 ); + disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); + disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); + disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); + disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); + disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); + actionEditFormSettings->setEnabled( FALSE ); + actionEditSource->setEnabled( FALSE ); + actionEditConnections->setEnabled( FALSE ); + actionEditFunctions->setEnabled( FALSE ); + actionEditAccels->setEnabled( FALSE ); + ( (TQDockWindow*)propertyEditor->parentWidget() )-> + setCaption( i18n( "Signal Handlers" ) ); + actionGroupNew->removeFrom( fileMenu ); + actionGroupNew->removeFrom( projectToolBar ); + actionFileSave->removeFrom( fileMenu ); + actionFileSave->removeFrom( projectToolBar ); + actionFileExit->removeFrom( fileMenu ); + actionNewFile->addTo( fileMenu ); + actionNewFile->addTo( projectToolBar ); + actionFileSave->addTo( fileMenu ); + actionFileSave->addTo( projectToolBar ); + actionFileExit->addTo( fileMenu ); + } else { + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE ); + toolBox->parentWidget()->show(); + for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { + setAppropriate( tb, TRUE ); + tb->hide(); + } + propertyEditor->setPropertyEditorEnabled( TRUE ); + setAppropriate( layoutToolBar, TRUE ); + layoutToolBar->show(); + setAppropriate( toolsToolBar, TRUE ); + toolsToolBar->show(); + menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex ); + menubar->insertItem( i18n( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); + menubar->insertItem( i18n( "&Preview" ), previewMenu, toolsMenuId + 2, toolsMenuIndex + 2 ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); + actionEditFormSettings->setEnabled( TRUE ); + actionEditSource->setEnabled( TRUE ); + actionEditConnections->setEnabled( TRUE ); + actionEditFunctions->setEnabled( TRUE ); + actionEditAccels->setEnabled( TRUE ); + ( (TQDockWindow*)propertyEditor->parentWidget() )-> + setCaption( i18n( "Property Editor/Signal Handlers" ) ); + actionFileSave->removeFrom( fileMenu ); + actionFileSave->removeFrom( projectToolBar ); + actionFileExit->removeFrom( fileMenu ); + actionGroupNew->addTo( fileMenu ); + actionGroupNew->addTo( projectToolBar ); + actionFileSave->addTo( fileMenu ); + actionFileSave->addTo( projectToolBar ); + actionFileExit->addTo( fileMenu ); + } +} + +void MainWindow::setEditorsReadOnly( bool b ) +{ + editorsReadOnly = b; +} + +void MainWindow::setPluginDirectory( const TQString &pd ) +{ + pluginDir = pd; + if ( !qwf_plugin_dir ) + qwf_plugin_dir = new TQString( pd ); + else + *qwf_plugin_dir = pd; +} + +void MainWindow::toggleSignalHandlers( bool show ) +{ + if ( sSignalHandlers == show ) + return; + sSignalHandlers = show; + propertyEditor->setSignalHandlersEnabled( show ); +} + +void MainWindow::statusMessage( const TQString &msg ) +{ + m_part->statusMessage(msg); +} diff --git a/kdevdesigner/designer/mainwindow.h b/kdevdesigner/designer/mainwindow.h new file mode 100644 index 00000000..1b68c14d --- /dev/null +++ b/kdevdesigner/designer/mainwindow.h @@ -0,0 +1,513 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include "metadatabase.h" +#include "../interfaces/actioninterface.h" // for GCC 2.7.* compatibility +#include "../interfaces/editorinterface.h" +#include "../interfaces/templatewizardiface.h" +#include "../interfaces/languageinterface.h" +#include "../interfaces/filterinterface.h" +#include "../interfaces/interpreterinterface.h" +#include "../interfaces/preferenceinterface.h" +#include "../interfaces/projectsettingsiface.h" +#include "../interfaces/sourcetemplateiface.h" +#include "sourceeditor.h" + +#include +#include +#include +#include +#include +#include + +class TQToolBox; +class PropertyEditor; +class TQWorkspace; +class TQMenuBar; +class FormWindow; +class TQPopupMenu; +class HierarchyView; +class TQCloseEvent; +class Workspace; +class ActionEditor; +class Project; +class OutputWindow; +class TQTimer; +class FindDialog; +struct DesignerProject; +class ReplaceDialog; +class GotoLineDialog; +class SourceFile; +class FormFile; +class TQAssistantClient; +class DesignerAction; + +#if defined(TQ_FULL_TEMPLATE_INSTANTIATION) +#include +#else +class TQToolBar; +#endif +class Preferences; + +class KDevDesignerPart; + +class MainWindow : public TQMainWindow +{ + Q_OBJECT + + +public: + enum LineMode { Error, Step, StackFrame }; + + MainWindow( KDevDesignerPart *part, bool asClient, bool single = FALSE, const TQString &plgDir = "/designer" ); + ~MainWindow(); + + HierarchyView *objectHierarchy() const; + Workspace *workspace() const; + PropertyEditor *propertyeditor() const; + ActionEditor *actioneditor() const; + + void resetTool(); + int currentTool() const; + + FormWindow *formWindow(); + + bool unregisterClient( FormWindow *w ); + void editorClosed( SourceEditor *e ); + TQWidget *isAFormWindowChild( TQObject *o ) const; + TQWidget *isAToolBarChild( TQObject *o ) const; + + void insertFormWindow( FormWindow *fw ); + TQWorkspace *qWorkspace() const; + + void popupFormWindowMenu( const TQPoint &gp, FormWindow *fw ); + void popupWidgetMenu( const TQPoint &gp, FormWindow *fw, TQWidget *w ); + + TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent ); + TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot ); + + FormWindow *openFormWindow( const TQString &fn, bool validFileName = TRUE, FormFile *ff = 0 ); + bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w ); + + void setGrid( const TQPoint &p ); + void setShowGrid( bool b ); + void setSnapGrid( bool b ); + TQPoint grid() const { return grd; } + bool showGrid() const { return sGrid; } + bool snapGrid() const { return snGrid && sGrid; } + + TQString documentationPath() const; + + static MainWindow *self; + + TQString templatePath() const { return templPath; } + + void editFunction( const TQString &func, bool rereadSource = FALSE ); + + bool isPreviewing() const { return previewing; } + + Project *currProject() const { return currentProject; } + + FormWindow *activeForm() const { return lastActiveFormWindow; } + + TemplateWizardInterface* templateWizardInterface( const TQString& className ); + TQStringList sourceTemplates() const; + SourceTemplateInterface* sourceTemplateInterface( const TQString& templ ); + TQUnknownInterface* designerInterface() const { return desInterface; } + TQPtrList projectList() const; + TQStringList projectNames() const; + TQStringList projectFileNames() const; + Project *findProject( const TQString &projectName ) const; + void setCurrentProject( Project *pro ); + void setCurrentProjectByFilename( const TQString& proFilename ); + OutputWindow *outputWindow() const { return oWindow; } + void addPreferencesTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ); + void addProjectTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ); + void setModified( bool b, TQWidget *window ); + void functionsChanged(); + void updateFunctionList(); + void updateWorkspace(); + void runProjectPrecondition(); + void runProjectPostcondition( TQObjectList *l ); + + void formNameChanged( FormWindow *fw ); + + int currentLayoutDefaultSpacing() const; + int currentLayoutDefaultMargin() const; + + void saveAllBreakPoints(); + void resetBreakPoints(); + + SourceFile *sourceFile(); + void createNewProject( const TQString &lang ); + + void popupProjectMenu( const TQPoint &pos ); + TQObject *findRealObject( TQObject *o ); + + void setSingleProject( Project *pro ); + bool singleProjectMode() const { return singleProject; } + + void showSourceLine( TQObject *o, int line, LineMode lm ); + + void shuttingDown(); + void showGUIStuff( bool b ); + void setEditorsReadOnly( bool b ); + bool areEditorsReadOnly() const { return editorsReadOnly; } + void toggleSignalHandlers( bool show ); + bool showSignalHandlers() const { return sSignalHandlers; } + void writeConfig(); + + void openProject( const TQString &fn ); + void setPluginDirectory( const TQString &pd ); + TQString pluginDirectory() const { return pluginDir; } + + TQAssistantClient* assistantClient() const { return assistant; } + + void addRecentlyOpenedFile( const TQString &fn ) { addRecentlyOpened( fn, recentlyFiles ); } + + void statusMessage(const TQString &msg); + + //integration + KDevDesignerPart *part() const { return m_part; } + +public slots: + void showProperties( TQObject *w ); + void updateProperties( TQObject *w ); + void showDialogHelp(); + void showDebugStep( TQObject *o, int line ); + void showStackFrame( TQObject *o, int line ); + void showErrorMessage( TQObject *o, int line, const TQString &errorMessage ); + void finishedRun(); + void breakPointsChanged(); + +signals: + void currentToolChanged(); + void hasActiveForm( bool ); + void hasActiveWindow( bool ); + void hasActiveWindowOrProject( bool ); + void hasNonDummyProject( bool ); + void formModified( bool ); + void formWindowsChanged(); + void formWindowChanged(); + void projectChanged(); + void editorChanged(); + +protected: + bool eventFilter( TQObject *o, TQEvent *e ); + void closeEvent( TQCloseEvent *e ); + +public slots: + void fileNew(); + void fileNewDialog(); + void fileNewFile(); + void fileClose(); + void fileQuit(); + void fileCloseProject(); // not visible in menu, called from fileClose + void fileOpen(); + void fileOpen( const TQString &filter, const TQString &extension, const TQString &filename = "" , bool inProject = TRUE ); + bool fileSave(); + bool fileSaveForm(); // not visible in menu, called from fileSave + bool fileSaveProject(); // not visible in menu, called from fileSaveProject + bool fileSaveAs(); + void fileSaveAll(); + void fileCreateTemplate(); + +public slots: + void editUndo(); + void editRedo(); + void editCut(); + void editCopy(); + void editPaste(); + void editDelete(); + void editSelectAll(); + void editLower(); + void editRaise(); + void editAdjustSize(); + void editLayoutHorizontal(); + void editLayoutVertical(); + void editLayoutHorizontalSplit(); + void editLayoutVerticalSplit(); + void editLayoutGrid(); + void editLayoutContainerHorizontal(); + void editLayoutContainerVertical(); + void editLayoutContainerGrid(); + void editBreakLayout(); + void editAccels(); + void editFunctions(); + void editConnections(); + SourceEditor *editSource(); + SourceEditor *editSource( SourceFile *f ); + SourceEditor *openSourceEditor(); + SourceEditor *createSourceEditor( TQObject *object, Project *project, + const TQString &lang = TQString(), + const TQString &func = TQString(), + bool rereadSource = FALSE ); + void editFormSettings(); + void editProjectSettings(); + void editPixmapCollection(); + void editDatabaseConnections(); + void editPreferences(); + + void projectInsertFile(); + + void searchFind(); + void searchIncremetalFindMenu(); + void searchIncremetalFind(); + void searchIncremetalFindNext(); + void searchReplace(); + void searchGotoLine(); + + void previewForm(); + void previewForm( const TQString& ); + + void toolsCustomWidget(); + void toolsConfigure(); + + void helpContents(); + void helpManual(); + void helpAbout(); + void helpAboutQt(); + void helpRegister(); + +private slots: + void activeWindowChanged( TQWidget *w ); + void updateUndoRedo( bool, bool, const TQString &, const TQString & ); + void updateEditorUndoRedo(); + + void toolSelected( TQAction* ); + + void clipboardChanged(); + void selectionChanged(); + + void windowsMenuActivated( int id ); + void setupWindowActions(); + + void createNewTemplate(); + void projectSelected( TQAction *a ); + + void setupRecentlyFilesMenu(); + void setupRecentlyProjectsMenu(); + void recentlyFilesMenuActivated( int id ); + void recentlyProjectsMenuActivated( int id ); + + void emitProjectSignals(); + + void showStartDialog(); + +private: + void setupMDI(); + void setupMenuBar(); + void setupEditActions(); + void setupProjectActions(); + void setupSearchActions(); + void setupToolActions(); + void setupLayoutActions(); + void setupFileActions(); + void setupPreviewActions(); + void setupHelpActions(); + void setupRMBMenus(); + + void setupPropertyEditor(); + void setupHierarchyView(); + void setupWorkspace(); + void setupActionEditor(); + void setupOutputWindow(); + void setupToolbox(); + + void setupActionManager(); + void setupPluginManagers(); + + void enableAll( bool enable ); + + TQWidget* previewFormInternal( TQStyle* style = 0, TQPalette* pal = 0 ); + + void readConfig(); + + void setupRMBProperties( TQValueList &ids, TQMap &props, TQWidget *w ); + void handleRMBProperties( int id, TQMap &props, TQWidget *w ); + void setupRMBSpecialCommands( TQValueList &ids, TQMap &commands, TQWidget *w ); + void handleRMBSpecialCommands( int id, TQMap &commands, TQWidget *w ); + void setupRMBSpecialCommands( TQValueList &ids, TQMap &commands, FormWindow *w ); + void handleRMBSpecialCommands( int id, TQMap &commands, FormWindow *w ); + bool openEditor( TQWidget *w, FormWindow *fw ); + void rebuildCustomWidgetGUI(); + void rebuildCommonWidgetsToolBoxPage(); + void checkTempFiles(); + + void addRecentlyOpened( const TQString &fn, TQStringList &lst ); + + TQString whatsThisFrom( const TQString &key ); + +private slots: + void doFunctionsChanged(); + bool openProjectSettings( Project *pro ); + +private: + struct Tab + { + TQWidget *w; + TQString title; + TQObject *receiver; + const char *init_slot, *accept_slot; + TQ_DUMMY_COMPARISON_OPERATOR( Tab ) + }; + +private: + PropertyEditor *propertyEditor; + HierarchyView *hierarchyView; + Workspace *wspace; + TQWidget *lastPressWidget; + TQWorkspace *qworkspace; + TQMenuBar *menubar; + TQGuardedPtr lastActiveFormWindow; + bool breakLayout, layoutChilds, layoutSelected; + TQPoint grd; + bool sGrid, snGrid; + bool restoreConfig; + bool backPix; + bool splashScreen; + TQString fileFilter; + + TQMap projects; + DesignerAction *actionEditUndo, *actionEditRedo, *actionEditCut, *actionEditCopy, + *actionEditPaste, *actionEditDelete, + *actionEditAdjustSize, + *actionEditHLayout, *actionEditVLayout, *actionEditGridLayout, + *actionEditSplitHorizontal, *actionEditSplitVertical, + *actionEditSelectAll, *actionEditBreakLayout, *actionEditFunctions, *actionEditConnections, + *actionEditLower, *actionEditRaise; + TQAction *actionInsertSpacer; + TQActionGroup *actionGroupTools, *actionGroupProjects; + TQAction* actionPointerTool, *actionConnectTool, *actionOrderTool, *actionBuddyTool; + TQAction* actionCurrentTool; + DesignerAction *actionHelpContents, *actionHelpAbout, *actionHelpAboutTQt, *actionHelpWhatsThis; + DesignerAction *actionHelpManual; +#if defined(TQT_NON_COMMERCIAL) + DesignerAction *actionHelpRegister; +#endif + DesignerAction *actionToolsCustomWidget, *actionEditPreferences; + DesignerAction *actionWindowTile, *actionWindowCascade, *actionWindowClose, *actionWindowCloseAll; + DesignerAction *actionWindowNext, *actionWindowPrevious; + DesignerAction *actionEditFormSettings, *actionEditAccels; + DesignerAction *actionEditSource, *actionNewFile, *actionFileSave, *actionFileExit; + DesignerAction *actionFileClose, *actionFileSaveAs, *actionFileSaveAll; + DesignerAction *actionSearchFind, *actionSearchIncremetal, *actionSearchReplace, *actionSearchGotoLine; + DesignerAction *actionProjectAddFile, *actionEditPixmapCollection, *actionEditDatabaseConnections, + *actionEditProjectSettings, *actionPreview; + TQActionGroup *actionGroupNew; + + TQPopupMenu *rmbWidgets; + TQPopupMenu *rmbFormWindow; + TQPopupMenu *customWidgetMenu, *windowMenu, *fileMenu, *recentlyFilesMenu, *recentlyProjectsMenu; + TQPopupMenu *toolsMenu, *layoutMenu, *previewMenu; + TQToolBar *customWidgetToolBar, *layoutToolBar, *projectToolBar, *customWidgetToolBar2, *toolsToolBar; + TQToolBar *commonWidgetsToolBar; + TQPtrList widgetToolBars; + + Preferences *prefDia; + TQMap propertyDocumentation; + bool client; + TQString templPath; + ActionEditor *actionEditor; + Project *currentProject; + TQPluginManager *actionPluginManager; + TQPluginManager *editorPluginManager; + TQPluginManager *templateWizardPluginManager; + TQPluginManager *interpreterPluginManager; + TQPluginManager *preferencePluginManager; + TQPluginManager *projectSettingsPluginManager; + TQPluginManager *sourceTemplatePluginManager; + TQPtrList sourceEditors; + bool previewing; + TQUnknownInterface *desInterface; + TQStringList recentlyFiles; + TQStringList recentlyProjects; + OutputWindow *oWindow; + TQValueList preferenceTabs; + TQValueList projectTabs; + bool databaseAutoEdit; + TQTimer *updateFunctionsTimer; + TQTimer *autoSaveTimer; + bool autoSaveEnabled; + int autoSaveInterval; + TQLineEdit *incrementalSearch; + TQGuardedPtr findDialog; + TQGuardedPtr replaceDialog; + TQGuardedPtr gotoLineDialog; + Project *eProject; + bool inDebugMode; + TQObjectList debuggingForms; + TQString lastOpenFilter; + TQGuardedPtr previewedForm; + TQPopupMenu *projectMenu; + TQString menuHelpFile; + bool singleProject; + TQToolBox *toolBox; + int toolsMenuId, toolsMenuIndex; + uint guiStuffVisible : 1; + uint editorsReadOnly : 1; + uint savePluginPaths : 1; + TQAssistantClient *assistant; + bool shStartDialog; + TQString pluginDir; + bool sSignalHandlers; + + KDevDesignerPart *m_part; + +public: + TQString lastSaveFilter; + TQPtrList toolActions; + TQPtrList commonWidgetsPage; + +friend class KDevDesignerPart; +}; + +class SenderObject : public TQObject +{ + Q_OBJECT + + +public: + SenderObject( TQUnknownInterface *i ) : iface( i ) { iface->addRef(); } + ~SenderObject() { iface->release(); } + +public slots: + void emitInitSignal() { emit initSignal( iface ); } + void emitAcceptSignal() { emit acceptSignal( iface ); } + +signals: + void initSignal( TQUnknownInterface * ); + void acceptSignal( TQUnknownInterface * ); + +private: + TQUnknownInterface *iface; + +}; + +#endif diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp new file mode 100644 index 00000000..7fa1d1f7 --- /dev/null +++ b/kdevdesigner/designer/mainwindowactions.cpp @@ -0,0 +1,2067 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "mainwindow.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "defs.h" +#include "project.h" +#include "widgetdatabase.h" +#include "widgetfactory.h" +#include "preferences.h" +#include "formwindow.h" +#include "newformimpl.h" +#include "resource.h" +#include "projectsettingsimpl.h" +#include "workspace.h" +#include "createtemplate.h" +#include "hierarchyview.h" +#include "editfunctionsimpl.h" +#include "finddialog.h" +#include "replacedialog.h" +#include "gotolinedialog.h" +#include "formsettingsimpl.h" +#include "pixmapcollectioneditor.h" +#include "styledbutton.h" +#include "customwidgeteditorimpl.h" +#ifndef TQT_NO_SQL +#include "dbconnectionsimpl.h" +#include "dbconnectionimpl.h" +#endif +#include "widgetaction.h" +#include +#include "startdialogimpl.h" +#include "designerappiface.h" +#include "connectiondialog.h" +#include "configtoolboxdialog.h" +#include "designeraction.h" + +#include "kdevdesigner_part.h" + +static const char * whatsthis_image[] = { + "16 16 3 1", + " c None", + "o c #000000", + "a c #000080", + "o aaaaa ", + "oo aaa aaa ", + "ooo aaa aaa", + "oooo aa aa", + "ooooo aa aa", + "oooooo a aaa", + "ooooooo aaa ", + "oooooooo aaa ", + "ooooooooo aaa ", + "ooooo aaa ", + "oo ooo ", + "o ooo aaa ", + " ooo aaa ", + " ooo ", + " ooo ", + " ooo "}; + +const TQString toolbarHelp = "

    Toolbars contain a number of buttons to " +"provide quick access to often used functions.%1" +"
    Click on the toolbar handle to hide the toolbar, " +"or drag and place the toolbar to a different location.

    "; + +static TQIconSet createIconSet( const TQString &name ) +{ + TQIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) ); + TQString prefix = "designer_"; + int right = name.length() - prefix.length(); + ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), KDevDesignerPartFactory::instance() ), + TQIconSet::Small, TQIconSet::Disabled ); + return ic; +} + +void MainWindow::setupEditActions() +{ + actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, TQT_TQOBJECT(this), 0 ); + actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) ); + actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) ); + connect( actionEditUndo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editUndo() ) ); + actionEditUndo->setEnabled( FALSE ); + + actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, TQT_TQOBJECT(this), 0 ); + actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") ); + actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) ); + connect( actionEditRedo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRedo() ) ); + actionEditRedo->setEnabled( FALSE ); + + actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, TQT_TQOBJECT(this), 0 ); + actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) ); + actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) ); + connect( actionEditCut, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCut() ) ); + actionEditCut->setEnabled( FALSE ); + + actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, TQT_TQOBJECT(this), 0 ); + actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) ); + actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) ); + connect( actionEditCopy, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCopy() ) ); + actionEditCopy->setEnabled( FALSE ); + + actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, TQT_TQOBJECT(this), 0 ); + actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) ); + actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) ); + connect( actionEditPaste, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPaste() ) ); + actionEditPaste->setEnabled( FALSE ); + + actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, TQT_TQOBJECT(this), 0 ); + actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) ); + actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) ); + connect( actionEditDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); + actionEditDelete->setEnabled( FALSE ); +#ifdef TQ_WS_MAC + TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, TQT_TQOBJECT(this), 0 ); + connect( macDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); +#endif + + actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, TQT_TQOBJECT(this), 0 ); + actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) ); + actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) ); + connect( actionEditSelectAll, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ) ); + actionEditSelectAll->setEnabled( TRUE ); + + actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) ); + actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) ); + connect( actionEditRaise, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRaise() ) ); + actionEditRaise->setEnabled( FALSE ); + + actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) ); + actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) ); + connect( actionEditLower, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLower() ) ); + actionEditLower->setEnabled( FALSE ); + + actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(), + i18n( "Chec&k Accelerators" ), ALT + Key_R, TQT_TQOBJECT(this), 0 ); + actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") ); + actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) ); + connect( actionEditAccels, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAccels() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); + + actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"), + i18n( "S&lots..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") ); + actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) ); + connect( actionEditFunctions, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFunctions() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); + + actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"), + i18n( "Co&nnections..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") ); + actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) ); + connect( actionEditConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editConnections() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); + + actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(), + i18n( "&Source..." ), CTRL + Key_E, TQT_TQOBJECT(this), 0 ); + actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") ); + actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) ); + connect( actionEditSource, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSource() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); + + actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(), + i18n( "&Form Settings..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") ); + actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) ); + connect( actionEditFormSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFormSettings() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); + + actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(), + i18n( "Preferences..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") ); + actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) ); + connect( actionEditPreferences, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPreferences() ) ); + +/* TQToolBar *tb = new TQToolBar( this, "Edit" ); + tb->setCloseMode( TQDockWindow::Undocked ); + TQWhatsThis::add( tb, i18n( "The Edit toolbar%1").arg(i18n(toolbarHelp).arg("")) ); + addToolBar( tb, i18n( "Edit" ) ); + actionEditUndo->addTo( tb ); + actionEditRedo->addTo( tb ); + tb->addSeparator(); + actionEditCut->addTo( tb ); + actionEditCopy->addTo( tb ); + actionEditPaste->addTo( tb );*/ +#if 0 + tb->addSeparator(); + actionEditLower->addTo( tb ); + actionEditRaise->addTo( tb ); +#endif + + TQPopupMenu *menu = new TQPopupMenu( this, "Edit" ); + connect( menu, TQT_SIGNAL( aboutToShow() ), TQT_TQOBJECT(this), TQT_SLOT( updateEditorUndoRedo() ) ); + menubar->insertItem( i18n( "&Edit" ), menu ); + actionEditUndo->addTo( menu ); + actionEditRedo->addTo( menu ); + menu->insertSeparator(); + actionEditCut->addTo( menu ); + actionEditCopy->addTo( menu ); + actionEditPaste->addTo( menu ); + actionEditDelete->addTo( menu ); + actionEditSelectAll->addTo( menu ); + actionEditAccels->addTo( menu ); +#if 0 + menu->insertSeparator(); + actionEditLower->addTo( menu ); + actionEditRaise->addTo( menu ); +#endif + menu->insertSeparator(); + if ( !singleProjectMode() ) { + actionEditFunctions->addTo( menu ); + actionEditConnections->addTo( menu ); + } + actionEditFormSettings->addTo( menu ); + menu->insertSeparator(); + actionEditPreferences->addTo( menu ); +} + +void MainWindow::setupSearchActions() +{ + actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ), + i18n( "&Find..." ), CTRL + Key_F, TQT_TQOBJECT(this), 0 ); + connect( actionSearchFind, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchFind() ) ); + actionSearchFind->setEnabled( FALSE ); + actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) ); + + actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(), + i18n( "Find &Incremental" ), ALT + Key_I, TQT_TQOBJECT(this), 0 ); + connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchIncremetalFindMenu() ) ); + actionSearchIncremetal->setEnabled( FALSE ); + actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) ); + + actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(), + i18n( "&Replace..." ), CTRL + Key_R, TQT_TQOBJECT(this), 0 ); + connect( actionSearchReplace, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchReplace() ) ); + actionSearchReplace->setEnabled( FALSE ); + actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) ); + + actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(), + i18n( "&Goto Line..." ), ALT + Key_G, TQT_TQOBJECT(this), 0 ); + connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchGotoLine() ) ); + actionSearchGotoLine->setEnabled( FALSE ); + actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) ); + +/* TQToolBar *tb = new TQToolBar( this, "Search" ); + tb->setCloseMode( TQDockWindow::Undocked ); + addToolBar( tb, i18n( "Search" ) ); + + actionSearchFind->addTo( tb );*/ + incrementalSearch = new TQLineEdit( 0 ); + incrementalSearch->hide(); + TQToolTip::add( incrementalSearch, i18n( "Incremental search (Alt+I)" ) ); + connect( incrementalSearch, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( searchIncremetalFind() ) ); + connect( incrementalSearch, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( searchIncremetalFindNext() ) ); + incrementalSearch->setEnabled( FALSE ); + + TQPopupMenu *menu = new TQPopupMenu( this, "Search" ); + menubar->insertItem( i18n( "&Search" ), menu ); + actionSearchFind->addTo( menu ); + actionSearchIncremetal->addTo( menu ); + actionSearchReplace->addTo( menu ); + menu->insertSeparator(); + actionSearchGotoLine->addTo( menu ); +} + +void MainWindow::setupLayoutActions() +{ + if ( !actionGroupTools ) { + actionGroupTools = new TQActionGroup( this ); + actionGroupTools->setExclusive( TRUE ); + connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), TQT_TQOBJECT(this), TQT_SLOT( toolSelected(TQAction*) ) ); + } + + actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"), + i18n( "Adjust &Size" ), CTRL + Key_J, TQT_TQOBJECT(this), 0 ); + actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") ); + actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) ); + connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAdjustSize() ) ); + actionEditAdjustSize->setEnabled( FALSE ); + + actionEditHLayout = new DesignerAction( i18n( "Lay OutQt::Horizontally" ), createIconSet("designer_edithlayout.png"), + i18n( "Lay Out &Horizontally" ), CTRL + Key_H, TQT_TQOBJECT(this), 0 ); + actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") ); + actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Horizontally" ) ); + connect( actionEditHLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontal() ) ); + actionEditHLayout->setEnabled( FALSE ); + + actionEditVLayout = new DesignerAction( i18n( "Lay OutQt::Vertically" ), createIconSet("designer_editvlayout.png"), + i18n( "Lay Out &Vertically" ), CTRL + Key_L, TQT_TQOBJECT(this), 0 ); + actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") ); + actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Vertically" ) ); + connect( actionEditVLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVertical() ) ); + actionEditVLayout->setEnabled( FALSE ); + + actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"), + i18n( "Lay Out in a &Grid" ), CTRL + Key_G, TQT_TQOBJECT(this), 0 ); + actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") ); + actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) ); + connect( actionEditGridLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutGrid() ) ); + actionEditGridLayout->setEnabled( FALSE ); + + actionEditSplitHorizontal = new DesignerAction( i18n( "Lay OutQt::Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"), + i18n( "Lay OutQt::Horizontally (in S&plitter)" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") ); + actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Horizontally (in Splitter)" ) ); + connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontalSplit() ) ); + actionEditSplitHorizontal->setEnabled( FALSE ); + + actionEditSplitVertical = new DesignerAction( i18n( "Lay OutQt::Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"), + i18n( "Lay OutQt::Vertically (in Sp&litter)" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") ); + actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Vertically (in Splitter)" ) ); + connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVerticalSplit() ) ); + actionEditSplitVertical->setEnabled( FALSE ); + + actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"), + i18n( "&Break Layout" ), CTRL + Key_B, TQT_TQOBJECT(this), 0 ); + actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") ); + actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) ); + connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editBreakLayout() ) ); + actionEditBreakLayout->setEnabled( FALSE ); + + int id = WidgetDatabase::idFromClassName( "Spacer" ); + actionInsertSpacer = new WidgetAction( i18n( "Layout" ), actionGroupTools, TQString::number( id ).latin1() ); + actionInsertSpacer->setToggleAction( TRUE ); + actionInsertSpacer->setText( WidgetDatabase::className( id ) ); + actionInsertSpacer->setMenuText( i18n( "Add %1").arg( WidgetDatabase::className( id ) ) ); + actionInsertSpacer->setIconSet( WidgetDatabase::iconSet( id ) ); + actionInsertSpacer->setToolTip( WidgetDatabase::toolTip( id ) ); + actionInsertSpacer->setStatusTip( i18n( "Insert a %1").arg(WidgetDatabase::toolTip( id )) ); + actionInsertSpacer->setWhatsThis( i18n("A %1

    %2

    " + "

    Click to insert a single %3," + "or double click to keep the tool selected.") + .arg(WidgetDatabase::toolTip( id )) + .arg(WidgetDatabase::whatsThis( id )) + .arg(WidgetDatabase::toolTip( id ) )); + + actionInsertSpacer->addTo( commonWidgetsToolBar ); + commonWidgetsPage.append( actionInsertSpacer ); + TQWidget *w; + commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); + w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); + TQWhatsThis::add( layoutToolBar, i18n( "The Layout toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); + actionEditAdjustSize->addTo( layoutToolBar ); + layoutToolBar->addSeparator(); + actionEditHLayout->addTo( layoutToolBar ); + actionEditVLayout->addTo( layoutToolBar ); + actionEditGridLayout->addTo( layoutToolBar ); + actionEditSplitHorizontal->addTo( layoutToolBar ); + actionEditSplitVertical->addTo( layoutToolBar ); + actionEditBreakLayout->addTo( layoutToolBar ); + layoutToolBar->addSeparator(); + actionInsertSpacer->addTo( layoutToolBar ); + + TQPopupMenu *menu = new TQPopupMenu( this, "Layout" ); + layoutMenu = menu; + menubar->insertItem( i18n( "&Layout" ), menu, toolsMenuId + 1 ); + actionEditAdjustSize->addTo( menu ); + menu->insertSeparator(); + actionEditHLayout->addTo( menu ); + actionEditVLayout->addTo( menu ); + actionEditGridLayout->addTo( menu ); + actionEditSplitHorizontal->addTo( menu ); + actionEditSplitVertical->addTo( menu ); + actionEditBreakLayout->addTo( menu ); + menu->insertSeparator(); + actionInsertSpacer->addTo( menu ); +} + +void MainWindow::setupToolActions() +{ + if ( !actionGroupTools ) { + actionGroupTools = new TQActionGroup( this ); + actionGroupTools->setExclusive( TRUE ); + connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), + this, TQT_SLOT( toolSelected(TQAction*) ) ); + } + + actionPointerTool = new DesignerAction( i18n("Pointer"), createIconSet("designer_pointer.png"), + i18n("&Pointer"), Key_F2, + actionGroupTools, + TQString::number(POINTER_TOOL).latin1(), TRUE ); + actionPointerTool->setStatusTip( i18n("Selects the pointer tool") ); + actionPointerTool->setWhatsThis( whatsThisFrom( "Tools|Pointer" ) ); + + actionConnectTool = new DesignerAction( i18n("Connect Signal/Slots"), + createIconSet("designer_connecttool.png"), + i18n("&Connect Signal/Slots"), + singleProjectMode() ? 0 : Key_F3, + actionGroupTools, + TQString::number(CONNECT_TOOL).latin1(), TRUE ); + actionConnectTool->setStatusTip( i18n("Selects the connection tool") ); + actionConnectTool->setWhatsThis( whatsThisFrom( "Tools|Connect Signals and Slots" ) ); + + actionOrderTool = new DesignerAction( i18n("Tab Order"), createIconSet("designer_ordertool.png"), + i18n("Tab &Order"), Key_F4, + actionGroupTools, + TQString::number(ORDER_TOOL).latin1(), TRUE ); + actionOrderTool->setStatusTip( i18n("Selects the tab order tool") ); + actionOrderTool->setWhatsThis( whatsThisFrom( "Tools|Tab Order" ) ); + + actionBuddyTool = new DesignerAction( i18n( "Set Buddy" ), createIconSet( "designer_setbuddy.png" ), + i18n( "Set &Buddy" ), Key_F12, + actionGroupTools, TQString::number( BUDDY_TOOL ).latin1(), + TRUE ); + actionBuddyTool->setStatusTip( i18n( "Sets a buddy to a label" ) ); + actionBuddyTool->setWhatsThis( whatsThisFrom( "Tools|Set Buddy" ) ); + + TQToolBar *tb = new TQToolBar( this, "Tools" ); + tb->setCloseMode( TQDockWindow::Undocked ); + toolsToolBar = tb; + TQWhatsThis::add( tb, i18n( "The Tools toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); + + addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, FALSE ); + actionPointerTool->addTo( tb ); + if ( !singleProjectMode() ) + actionConnectTool->addTo( tb ); + actionOrderTool->addTo( tb ); + actionBuddyTool->addTo( tb ); + + TQPopupMenu *mmenu = new TQPopupMenu( this, "Tools" ); + toolsMenu = mmenu; + toolsMenuId = 100; + menubar->insertItem( i18n( "&Tools" ), mmenu, toolsMenuId ); + toolsMenuIndex = menubar->indexOf( toolsMenuId ); + actionPointerTool->addTo( mmenu ); + if ( !singleProjectMode() ) + actionConnectTool->addTo( mmenu ); + actionOrderTool->addTo( mmenu ); + actionBuddyTool->addTo( mmenu ); + mmenu->insertSeparator(); + + customWidgetToolBar = 0; + customWidgetMenu = 0; + + actionToolsCustomWidget = new DesignerAction( i18n("Custom Widgets"), + createIconSet( "designer_customwidget.png" ), + i18n("Edit &Custom Widgets..."), 0, TQT_TQOBJECT(this), 0 ); + actionToolsCustomWidget->setStatusTip( i18n("Opens a dialog to add and change " + "custom widgets") ); + actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom" + "Widgets" ) ); + connect( actionToolsCustomWidget, TQT_SIGNAL( activated() ), + this, TQT_SLOT( toolsCustomWidget() ) ); + + for ( int j = 0; j < WidgetDatabase::numWidgetGroups(); ++j ) { + TQString grp = WidgetDatabase::widgetGroup( j ); + if ( !WidgetDatabase::isGroupVisible( grp ) || + WidgetDatabase::isGroupEmpty( grp ) ) + continue; + TQToolBar *tb = new TQToolBar( this, grp.latin1() ); + tb->setCloseMode( TQDockWindow::Undocked ); + widgetToolBars.append( tb ); + bool plural = grp[(int)grp.length()-1] == 's'; + if ( plural ) { + TQWhatsThis::add( tb, i18n( "The %1%2" ).arg(grp).arg(i18n(toolbarHelp). + arg( i18n(" Click on a button to insert a single widget, " + "or double click to insert multiple %1.") ).arg(grp)) ); + } else { + TQWhatsThis::add( tb, i18n( "The %1 Widgets%2" ).arg(grp).arg(i18n(toolbarHelp). + arg( i18n(" Click on a button to insert a single %1 widget, " + "or double click to insert multiple widgets.") ).arg(grp)) ); + } + addToolBar( tb, grp ); + tb->hide(); + TQPopupMenu *menu = new TQPopupMenu( this, grp.latin1() ); + mmenu->insertItem( grp, menu ); + + TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, FALSE, grp.latin1() ); + tb2->setFrameStyle( TQFrame::NoFrame ); + tb2->setOrientation( Qt::Vertical ); + tb2->setBackgroundMode( PaletteBase ); + toolBox->addItem( tb2, grp ); + + if ( grp == "Custom" ) { + if ( !customWidgetMenu ) + actionToolsCustomWidget->addTo( menu ); + else + menu->insertSeparator(); + customWidgetMenu = menu; + customWidgetToolBar = tb; + } + + for ( int i = 0; i < WidgetDatabase::count(); ++i ) { + if ( WidgetDatabase::group( i ) != grp ) + continue; // only widgets, i.e. not forms and temp stuff + WidgetAction* a = + new WidgetAction( grp, actionGroupTools, TQString::number( i ).latin1() ); + a->setToggleAction( TRUE ); + TQString atext = WidgetDatabase::className( i ); + if ( atext[0] == 'Q' ) + atext = atext.mid(1); + while ( atext.length() && atext[0] >= 'a' && atext[0] <= 'z' ) + atext = atext.mid(1); + if ( atext.isEmpty() ) + atext = WidgetDatabase::className( i ); + a->setText( atext ); + TQString ttip = WidgetDatabase::toolTip( i ); + a->setIconSet( WidgetDatabase::iconSet( i ) ); + a->setToolTip( ttip ); + if ( !WidgetDatabase::isWhatsThisLoaded() ) + WidgetDatabase::loadWhatsThis( documentationPath() ); + a->setStatusTip( i18n( "Insert a %1").arg(WidgetDatabase::className( i )) ); + + TQString whats = i18n("A %1").arg( WidgetDatabase::className( i ) ); + if ( !WidgetDatabase::whatsThis( i ).isEmpty() ) + whats += TQString("

    %1

    ").arg(WidgetDatabase::whatsThis( i )); + a->setWhatsThis( whats+ i18n("

    Double click on this tool to keep it selected.

    ") ); + + if ( grp != "KDE" ) + a->addTo( tb ); + a->addTo( menu ); + a->addTo( tb2 ); + if ( WidgetDatabase::isCommon( i ) ) { + a->addTo( commonWidgetsToolBar ); + commonWidgetsPage.append( a ); + } + } + TQWidget *w; + tb2->setStretchableWidget( ( w = new TQWidget( tb2 ) ) ); + w->setBackgroundMode( tb2->backgroundMode() ); + } + + if ( !customWidgetToolBar ) { + TQToolBar *tb = new TQToolBar( this, "Custom Widgets" ); + tb->setCloseMode( TQDockWindow::Undocked ); + TQWhatsThis::add( tb, i18n( "The Custom Widgets toolbar%1" + "

    Click Edit Custom Widgets..." + "in the Tools|Custom menu to " + "add and change custom widgets

    " ). + arg(i18n(toolbarHelp). + arg( i18n(" Click on the buttons to insert a single widget, " + "or double click to insert multiple widgets.") )) ); + addToolBar( tb, i18n( "Custom" ) ); + tb->hide(); + widgetToolBars.append( tb ); + customWidgetToolBar = tb; + TQPopupMenu *menu = new TQPopupMenu( this, "Custom Widgets" ); + mmenu->insertItem( "Custom", menu ); + customWidgetMenu = menu; + customWidgetToolBar->hide(); + actionToolsCustomWidget->addTo( customWidgetMenu ); + customWidgetMenu->insertSeparator(); + TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0, + toolBox, FALSE, "Custom Widgets" ); + tb2->setBackgroundMode(PaletteBase); + tb2->setOrientation( Qt::Vertical ); + tb2->setFrameStyle( TQFrame::NoFrame ); + toolBox->addItem( tb2, "Custom Widgets" ); + customWidgetToolBar2 = tb2; + } + + TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, TQT_TQOBJECT(this) ); + a->setStatusTip( i18n( "Opens a dialog to configure the common " + "widgets page of the toolbox") ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( toolsConfigure() ) ); + mmenu->insertSeparator(); + a->addTo( mmenu ); + resetTool(); +} + +void MainWindow::setupFileActions() +{ + TQToolBar* tb = new TQToolBar( this, "File" ); + tb->setCloseMode( TQDockWindow::Undocked ); + projectToolBar = tb; + + TQWhatsThis::add( tb, i18n( "The File toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); + addToolBar( tb, i18n( "File" ) ); + fileMenu = new TQPopupMenu( this, "File" ); + menubar->insertItem( i18n( "&File" ), fileMenu ); + + DesignerAction *a = 0; + + if ( !singleProject ) { + DesignerAction *a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a->setText( i18n( "New" ) ); + a->setToolTip( i18n( "New dialog or file" ) ); + a->setMenuText( i18n( "&New..." ) ); + a->setIconSet( createIconSet("designer_filenew.png") ); + a->setAccel( CTRL + Key_N ); + a->setStatusTip( i18n( "Creates a new project, form or source file." ) ); + a->setWhatsThis( whatsThisFrom( "File|New" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNew() ) ); + a->addTo( tb ); + a->addTo( fileMenu ); + actionNewFile = a; + } else { + actionGroupNew = new TQActionGroup( this, 0, FALSE ); + TQActionGroup* a = actionGroupNew; + ( (TQActionGroup*)a )->setUsesDropDown( TRUE ); + a->setText( i18n( "New" ) ); + a->setMenuText( i18n( "&New..." ) ); + a->setIconSet( createIconSet("designer_form.png") ); + a->setStatusTip( i18n( "Creates a new dialog or file" ) ); + a->setWhatsThis( whatsThisFrom( "File|New" ) ); + + TQAction *newForm = new DesignerAction( a, 0 ); + newForm->setText( i18n( "New Dialog" ) ); + newForm->setMenuText( i18n( "&Dialog..." ) ); + newForm->setIconSet( createIconSet("designer_form.png") ); + newForm->setAccel( CTRL + Key_N ); + newForm->setStatusTip( i18n( "Creates a new dialog." ) ); + connect( newForm, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewDialog() ) ); + + DesignerAction *newFile = new DesignerAction( TQT_TQOBJECT(a), 0 ); + newFile->setText( i18n( "New File" ) ); + newFile->setMenuText( i18n( "&File..." ) ); + newFile->setIconSet( createIconSet("designer_filenew.png") ); + newFile->setAccel( ALT + Key_N ); + newFile->setStatusTip( i18n( "Creates a new file." ) ); + connect( newFile, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewFile() ) ); + actionNewFile = newFile; + + a->addTo( tb ); + a->addTo( fileMenu ); + + fileMenu->insertSeparator(); + } + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a->setText( i18n( "Open" ) ); + a->setMenuText( i18n( "&Open..." ) ); + a->setIconSet( createIconSet("designer_fileopen.png") ); + a->setAccel( CTRL + Key_O ); + a->setStatusTip( i18n( "Opens an existing project, form or source file ") ); + a->setWhatsThis( whatsThisFrom( "File|Open" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileOpen() ) ); + if ( !singleProject ) { + a->addTo( tb ); + a->addTo( fileMenu ); + fileMenu->insertSeparator(); + } + + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + actionFileClose = a; + a->setText( i18n( "Close" ) ); + a->setMenuText( i18n( "&Close" ) ); + a->setStatusTip( i18n( "Closes the current project or document" ) ); + a->setWhatsThis(whatsThisFrom( "File|Close" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileClose() ) ); + connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + if ( !singleProject ) { + a->addTo( fileMenu ); + fileMenu->insertSeparator(); + } + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + actionFileSave = a; + a->setText( i18n( "Save" ) ); + a->setMenuText( i18n( "&Save" ) ); + a->setIconSet( createIconSet("designer_filesave.png") ); + a->setAccel( CTRL + Key_S ); + a->setStatusTip( i18n( "Saves the current project or document" ) ); + a->setWhatsThis(whatsThisFrom( "File|Save" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSave() ) ); + connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + a->addTo( tb ); + a->addTo( fileMenu ); + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + actionFileSaveAs = a; + a->setText( i18n( "Save As" ) ); + a->setMenuText( i18n( "Save &As..." ) ); + a->setStatusTip( i18n( "Saves the current form with a new filename" ) ); + a->setWhatsThis( whatsThisFrom( "File|Save As" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAs() ) ); + connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + if ( !singleProject ) + a->addTo( fileMenu ); + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + actionFileSaveAll = a; + a->setText( i18n( "Save All" ) ); + a->setMenuText( i18n( "Sa&ve All" ) ); + a->setStatusTip( i18n( "Saves all open documents" ) ); + a->setWhatsThis( whatsThisFrom( "File|Save All" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAll() ) ); + connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + if ( !singleProject ) { + a->addTo( fileMenu ); + fileMenu->insertSeparator(); + } + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a->setText( i18n( "Create Template" ) ); + a->setMenuText( i18n( "Create &Template..." ) ); + a->setStatusTip( i18n( "Creates a new template" ) ); + a->setWhatsThis( whatsThisFrom( "File|Create Template" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileCreateTemplate() ) ); + if ( !singleProject ) + a->addTo( fileMenu ); + + if ( !singleProject ) + fileMenu->insertSeparator(); + + recentlyFilesMenu = new TQPopupMenu( this ); + recentlyProjectsMenu = new TQPopupMenu( this ); + + if ( !singleProject ) { + fileMenu->insertItem( i18n( "Recently Opened Files " ), recentlyFilesMenu ); + fileMenu->insertItem( i18n( "Recently Opened Projects" ), recentlyProjectsMenu ); + } + + connect( recentlyFilesMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( setupRecentlyFilesMenu() ) ); + connect( recentlyProjectsMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( setupRecentlyProjectsMenu() ) ); + connect( recentlyFilesMenu, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( recentlyFilesMenuActivated( int ) ) ); + connect( recentlyProjectsMenu, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( recentlyProjectsMenuActivated( int ) ) ); + + if ( !singleProject ) + fileMenu->insertSeparator(); + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + actionFileExit = a; + if ( !singleProjectMode() ) { + a->setText( i18n( "Exit" ) ); + a->setMenuText( i18n( "E&xit" ) ); + a->setStatusTip( i18n( "Quits the application and prompts to save any changed forms, source files or project settings" ) ); + a->setWhatsThis( whatsThisFrom( "File|Exit" ) ); + } else { + a->setText( i18n( "Close" ) ); + a->setMenuText( i18n( "&Close" ) ); + } + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileQuit() ) ); + a->addTo( fileMenu ); +} + +void MainWindow::setupProjectActions() +{ + projectMenu = new TQPopupMenu( this, "Project" ); + menubar->insertItem( i18n( "Pr&oject" ), projectMenu ); + + TQActionGroup *ag = new TQActionGroup( this, 0 ); + ag->setText( i18n( "Active Project" ) ); + ag->setMenuText( i18n( "Active Project" ) ); + ag->setExclusive( TRUE ); + ag->setUsesDropDown( TRUE ); + connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SLOT( projectSelected( TQAction * ) ) ); + connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SIGNAL( projectChanged() ) ); + DesignerAction *a = new DesignerAction( i18n( "" ), i18n( "" ), 0, ag, 0, TRUE ); + eProject = new Project( "", i18n( "" ), projectSettingsPluginManager, TRUE ); + projects.insert( a, eProject ); + a->setOn( TRUE ); + ag->addTo( projectMenu ); + ag->addTo( projectToolBar ); + actionGroupProjects = ag; + + if ( !singleProject ) + projectMenu->insertSeparator(); + + a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, TQT_TQOBJECT(this), 0 ); + actionProjectAddFile = a; + a->setStatusTip( i18n("Adds a file to the current project") ); + a->setWhatsThis( whatsThisFrom( "Project|Add File" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( projectInsertFile() ) ); + a->setEnabled( FALSE ); + connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + if ( !singleProject ) + a->addTo( projectMenu ); + + actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(), + i18n( "&Image Collection..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") ); + actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) ); + connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPixmapCollection() ) ); + actionEditPixmapCollection->setEnabled( FALSE ); + connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) ); + actionEditPixmapCollection->addTo( projectMenu ); + +#ifndef TQT_NO_SQL + actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(), + i18n( "&Database Connections..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") ); + actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) ); + connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDatabaseConnections() ) ); + //actionEditDatabaseConnections->setEnabled( FALSE ); + //connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) ); + if ( !singleProject ) + actionEditDatabaseConnections->addTo( projectMenu ); +#endif + + actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(), + i18n( "&Project Settings..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") ); + actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) ); + connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editProjectSettings() ) ); + actionEditProjectSettings->setEnabled( FALSE ); + connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) ); + actionEditProjectSettings->addTo( projectMenu ); + +} + +void MainWindow::setupPreviewActions() +{ + DesignerAction* a = 0; + TQPopupMenu *menu = new TQPopupMenu( this, "Preview" ); + layoutMenu = menu; + menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 ); + + a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, TQT_TQOBJECT(this), 0 ); + actionPreview = a; + a->setAccel( CTRL + Key_T ); + a->setStatusTip( i18n("Opens a preview") ); + a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( previewForm() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + a->addTo( menu ); + + menu->insertSeparator(); + + TQSignalMapper *mapper = new TQSignalMapper( TQT_TQOBJECT(this) ); + connect( mapper, TQT_SIGNAL(mapped(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(previewForm(const TQString&)) ); + TQStringList styles = TQStyleFactory::keys(); + for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { + TQString info; + if ( *it == "Motif" ) + info = i18n( "The preview will use the Motif look and feel which is used as the default style on most UNIX systems." ); + else if ( *it == "Windows" ) + info = i18n( "The preview will use the Windows look and feel." ); + else if ( *it == "Platinum" ) + info = i18n( "The preview will use the Platinum look and feel which is similar to the Macintosh GUI style." ); + else if ( *it == "CDE" ) + info = i18n( "The preview will use the CDE look and feel which is similar to some versions of the Common Desktop Environment." ); + else if ( *it == "SGI" ) + info = i18n( "The preview will use the Motif look and feel which is used as the default style on SGI systems." ); + else if ( *it == "MotifPlus" ) + info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." ); + + a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(), + i18n( "... in %1 Style" ).arg( *it ), 0, TQT_TQOBJECT(this), 0 ); + a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) ); + a->setWhatsThis( i18n("Open a preview in %1 style." + "

    Use the preview to test the design and " + "signal-slot connections of the current form. %2

    ").arg( *it ).arg( info ) ); + mapper->setMapping( a, *it ); + connect( a, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map()) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + a->addTo( menu ); + } +} + +void MainWindow::setupWindowActions() +{ +/* static bool windowActionsSetup = FALSE; + if ( !windowActionsSetup ) { + windowActionsSetup = TRUE; +*/ + actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, TQT_TQOBJECT(this) ); + actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") ); + actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) ); + connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) ); + actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, TQT_TQOBJECT(this) ); + actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") ); + actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) ); + connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) ); + + actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, TQT_TQOBJECT(this) ); + actionWindowClose->setStatusTip( i18n( "Closes the active window") ); + actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) ); + connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) ); + + actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, TQT_TQOBJECT(this) ); + actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") ); + actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) ); + connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) ); + + actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, TQT_TQOBJECT(this) ); + actionWindowNext->setStatusTip( i18n( "Activates the next window" ) ); + actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) ); + connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) ); + + actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(this) ); + actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) ); + actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) ); + connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) ); + // } + + if ( !windowMenu ) { + windowMenu = new TQPopupMenu( this, "Window" ); + menubar->insertItem( i18n( "&Window" ), windowMenu ); + connect( windowMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( setupWindowActions() ) ); + } else { + windowMenu->clear(); + } + + actionWindowClose->addTo( windowMenu ); + actionWindowCloseAll->addTo( windowMenu ); + windowMenu->insertSeparator(); + actionWindowNext->addTo( windowMenu ); + actionWindowPrevious->addTo( windowMenu ); + windowMenu->insertSeparator(); + actionWindowTile->addTo( windowMenu ); + actionWindowCascade->addTo( windowMenu ); + windowMenu->insertSeparator(); + windowMenu->insertItem( i18n( "Vie&ws" ), createDockWindowMenu( NoToolBars ) ); + windowMenu->insertItem( i18n( "Tool&bars" ), createDockWindowMenu( OnlyToolBars ) ); + TQWidgetList windows = qworkspace->windowList(); + if ( windows.count() && formWindow() ) + windowMenu->insertSeparator(); + int j = 0; + for ( int i = 0; i < int( windows.count() ); ++i ) { + TQWidget *w = windows.at( i ); + if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) + continue; + if ( ::tqqt_cast(w) && ( ( (FormWindow*)w )->isFake() ) ) + continue; + j++; + TQString itemText; + if ( j < 10 ) + itemText = TQString("&%1 ").arg( j ); + if ( ::tqqt_cast(w) ) + itemText += w->name(); + else + itemText += w->caption(); + + int id = windowMenu->insertItem( itemText, TQT_TQOBJECT(this), TQT_SLOT( windowsMenuActivated( int ) ) ); + windowMenu->setItemParameter( id, i ); + windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) ); + } +} + +void MainWindow::setupHelpActions() +{ + actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, TQT_TQOBJECT(this), 0 ); + actionHelpContents->setStatusTip( i18n("Opens the online help") ); + actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) ); + connect( actionHelpContents, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpContents() ) ); + + actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, TQT_TQOBJECT(this), 0 ); + actionHelpManual->setStatusTip( i18n("Opens the TQt Designer manual") ); + actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) ); + connect( actionHelpManual, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpManual() ) ); + + actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, TQT_TQOBJECT(this), 0 ); + actionHelpAbout->setStatusTip( i18n("Displays information about TQt Designer") ); + actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) ); + connect( actionHelpAbout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAbout() ) ); + + actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, TQT_TQOBJECT(this), 0 ); + actionHelpAboutTQt->setStatusTip( i18n("Displays information about the TQt Toolkit") ); + actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) ); + connect( actionHelpAboutTQt, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAboutTQt() ) ); + +#if 0 //defined(TQT_NON_COMMERCIAL) + // ### not used anymore -- should be deleted? + actionHelpRegister = new DesignerAction( i18n("Register TQt"), TQPixmap(), i18n("&Register TQt..."), 0, TQT_TQOBJECT(this), 0 ); + actionHelpRegister->setStatusTip( i18n("Opens a web browser at the evaluation form on www.trolltech.com") ); + actionHelpRegister->setWhatsThis( i18n("Register with Trolltech") ); + connect( actionHelpRegister, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpRegister() ) ); +#endif + + actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ), + i18n("What's This?"), SHIFT + Key_F1, TQT_TQOBJECT(this), 0 ); + actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") ); + actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) ); + connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( whatsThis() ) ); + +/* TQToolBar *tb = new TQToolBar( this, "Help" ); + tb->setCloseMode( TQDockWindow::Undocked ); + TQWhatsThis::add( tb, i18n( "The Help toolbar%1" ).arg(i18n(toolbarHelp).arg("") )); + addToolBar( tb, i18n( "Help" ) ); + actionHelpWhatsThis->addTo( tb );*/ + + TQPopupMenu *menu = new TQPopupMenu( this, "Help" ); + menubar->insertSeparator(); + menubar->insertItem( i18n( "&Help" ), menu ); + actionHelpContents->addTo( menu ); + actionHelpManual->addTo( menu ); + menu->insertSeparator(); + actionHelpAbout->addTo( menu ); + actionHelpAboutTQt->addTo( menu ); +#if 0 //defined(TQT_NON_COMMERCIAL) + // ### not used anymore -- should be deleted? + actionHelpRegister->addTo( menu ); +#endif + + menu->insertSeparator(); + actionHelpWhatsThis->addTo( menu ); +} + +void MainWindow::fileNew() +{ + statusMessage( i18n( "Create a new project, form or source file...") ); + NewForm dlg( this, projectNames(), currentProject->projectName(), templatePath() ); + dlg.exec(); + statusBar()->clear(); +} + +void MainWindow::fileNewDialog() +{ + static int forms = 0; + TQString n = "Dialog" + TQString::number( ++forms ); + while ( currentProject->findFormFile( n + ".ui" ) ) + n = "Dialog" + TQString::number( ++forms ); + FormWindow *fw = 0; + FormFile *ff = new FormFile( n + ".ui", FALSE, currentProject ); + fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); + ff->setModified( TRUE ); + currentProject->setModified( TRUE ); + workspace()->update(); + fw->setProject( currentProject ); + MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); + fw->setMainContainer( w ); + fw->setCaption( n ); + fw->resize( 600, 480 ); + insertFormWindow( fw ); + fw->killAccels( TQT_TQOBJECT(fw) ); + fw->project()->setModified( TRUE ); + fw->setFocus(); + fw->setSavePixmapInProject( TRUE ); + fw->setSavePixmapInline( FALSE ); +} + +void MainWindow::fileNewFile() +{ + TQString name = TQInputDialog::getText( i18n( "Name of File" ), i18n( "Enter the name of the new source file:" ) ); + if ( name.isEmpty() ) + return; + if ( name.right( 3 ) != ".qs" ) + name += ".qs"; + SourceFile *f = new SourceFile( name, FALSE, currentProject ); + MainWindow::self->editSource( f ); + f->setModified( TRUE ); + currentProject->setModified( TRUE ); + workspace()->update(); +} + +void MainWindow::fileQuit() +{ + close(); + if ( !singleProjectMode() ) + tqApp->closeAllWindows(); +} + +void MainWindow::fileClose() +{ + if ( !currentProject->isDummy() ) { + fileCloseProject(); + } else { + TQWidget *w = qworkspace->activeWindow(); + if ( w ) { + if ( ::tqqt_cast(w) ) + ( (FormWindow*)w )->formFile()->close(); + else if ( ::tqqt_cast(w) ) + ( (SourceEditor*)w )->close(); + } + } +} + + +void MainWindow::fileCloseProject() +{ + if ( currentProject->isDummy() ) + return; + Project *pro = currentProject; + TQAction* a = 0; + TQAction* lastValid = 0; + for ( TQMap::Iterator it = projects.begin(); it != projects.end(); ++it ) { + if ( it.data() == pro ) { + a = it.key(); + if ( lastValid ) + break; + } + lastValid = it.key(); + } + if ( a ) { + if ( pro->isModified() ) { + switch ( TQMessageBox::warning( this, i18n( "Save Project Settings" ), + i18n( "Save changes to '%1'?" ).arg( pro->fileName() ), + i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { + case 0: // save + pro->save(); + break; + case 1: // don't save + break; + case 2: // cancel + return; + default: + break; + } + } + + TQWidgetList windows = qWorkspace()->windowList(); + qWorkspace()->blockSignals( TRUE ); + TQWidgetListIt wit( windows ); + while ( wit.current() ) { + TQWidget *w = wit.current(); + ++wit; + if ( ::tqqt_cast(w) ) { + if ( ( (FormWindow*)w )->project() == pro ) { + if ( ( (FormWindow*)w )->formFile()->editor() ) + windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); + if ( !( (FormWindow*)w )->formFile()->close() ) + return; + } + } else if ( ::tqqt_cast(w) ) { + if ( !( (SourceEditor*)w )->close() ) + return; + } + } + hierarchyView->clear(); + windows = qWorkspace()->windowList(); + qWorkspace()->blockSignals( FALSE ); + actionGroupProjects->removeChild( a ); + projects.remove( a ); + delete a; + currentProject = 0; + if ( lastValid ) { + projectSelected( lastValid ); + statusMessage( i18n( "Selected project '%1'" ).arg( currentProject->projectName() ) ); + } + if ( !windows.isEmpty() ) { + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + if ( !::tqqt_cast(w) ) + continue; + w->setFocus(); + activeWindowChanged( w ); + break; + } + } else { + emit hasActiveWindow( FALSE ); + emit hasActiveForm( FALSE ); + updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); + } + } +} + +void MainWindow::fileOpen() // as called by the menu +{ + fileOpen( "", "", "", FALSE ); +} + +void MainWindow::projectInsertFile() +{ + fileOpen( "", "" ); +} + +void MainWindow::fileOpen( const TQString &filter, const TQString &extension, const TQString &fn, bool inProject ) +{ + statusMessage( i18n( "Open a file...") ); + + TQPluginManager manager( IID_ImportFilter, TQApplication::libraryPaths(), pluginDirectory() ); + + Project* project = inProject ? currentProject : eProject; + + TQStringList additionalSources; + + { + TQStringList filterlist; + if ( filter.isEmpty() ) { + if ( !inProject ) + filterlist << i18n( "*.ui *.pro|Designer Files" ); + filterlist << i18n( "*.ui|TQt User-Interface Files" ); + if ( !inProject ) + filterlist << i18n( "*.pro|TQMAKE Project Files" ); + TQStringList list = manager.featureList(); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) + filterlist << *it; + LanguageInterface *iface = MetaDataBase::languageInterface( project->language() ); + if ( iface ) { + filterlist += iface->fileFilterList(); + additionalSources += iface->fileExtensionList(); + } + filterlist << i18n( "*|All Files" ); + } else { + filterlist << filter; + } + + TQString filters = filterlist.join( "\n" ); + + TQStringList filenames; + if ( fn.isEmpty() ) { + if ( !inProject ) { + TQString f = KFileDialog::getOpenFileName( TQString(), filters, this, /*0,*/ + i18n("Open" )/*, &lastOpenFilter */); + filenames << f; + } else { + filenames = KFileDialog::getOpenFileNames( TQString(), filters, this, /*0,*/ + i18n("Add")/*, &lastOpenFilter */); + } + } else { + filenames << fn; + } + + for ( TQStringList::Iterator fit = filenames.begin(); fit != filenames.end(); ++fit ) { + TQString filename = *fit; + if ( !filename.isEmpty() ) { + TQFileInfo fi( filename ); + + if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) { + addRecentlyOpened( filename, recentlyProjects ); + openProject( filename ); + } else if ( fi.extension( FALSE ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) { + if ( !inProject ) + setCurrentProject( eProject ); + openFormWindow( filename ); + addRecentlyOpened( filename, recentlyFiles ); + } else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( FALSE ) ) != -1 || + additionalSources.find( fi.extension( FALSE ) ) != additionalSources.end() ) { + SourceFile *sf = project->findSourceFile( project->makeRelative( filename ) ); + if ( !sf ) + sf = new SourceFile( project->makeRelative( filename ), FALSE, project ); + editSource( sf ); + } else if ( extension.isEmpty() ) { + TQString filter; + for ( TQStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) { + if ( (*it2).contains( "." + fi.extension( FALSE ), FALSE ) ) { + filter = *it2; + break; + } + } + + ImportFilterInterface* iface = 0; + manager.queryInterface( filter, &iface ); + if ( !iface ) { + statusMessage( i18n( "No import filter is available to import '%1'"). + arg( filename )/*, 3000*/ ); + return; + } + statusMessage( i18n( "Importing '%1' using import filter ...").arg( filename ) ); + TQStringList list = iface->import( filter, filename ); + iface->release(); + if ( list.isEmpty() ) { + statusMessage( i18n( "Nothing to load in '%1'").arg( filename )/*, 3000*/ ); + return; + } + if ( !inProject ) + setCurrentProject( eProject ); + addRecentlyOpened( filename, recentlyFiles ); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + openFormWindow( *it, FALSE ); + TQFile::remove( *it ); + } + statusBar()->clear(); + } + } + } + } +} + +FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFileName, FormFile *ff ) +{ + if ( filename.isEmpty() ) + return 0; + + bool makeNew = FALSE; + + if ( !TQFile::exists( filename ) ) { + makeNew = TRUE; + } else { + TQFile f( filename ); + f.open( IO_ReadOnly ); + TQTextStream ts( &f ); + makeNew = ts.read().length() < 2; + } + if ( makeNew ) { + fileNew(); + if ( formWindow() ) + formWindow()->setFileName( filename ); + return formWindow(); + } + + statusMessage( i18n( "Reading file '%1'...").arg( filename ) ); + FormFile *ff2 = currentProject->findFormFile( currentProject->makeRelative(filename) ); + if ( ff2 && ff2->formWindow() ) { + ff2->formWindow()->setFocus(); + return ff2->formWindow(); + } + + if ( ff2 ) + ff = ff2; + TQApplication::setOverrideCursor( WaitCursor ); + Resource resource( this ); + if ( !ff ) + ff = new FormFile( currentProject->makeRelative( filename ), FALSE, currentProject ); + bool b = resource.load( ff ) && (FormWindow*)resource.widget(); + if ( !validFileName && resource.widget() ) + ( (FormWindow*)resource.widget() )->setFileName( TQString() ); + TQApplication::restoreOverrideCursor(); + if ( b ) { + rebuildCustomWidgetGUI(); + statusMessage( i18n( "Loaded file '%1'").arg( filename )/*, 3000 */); + } else { + statusMessage( i18n( "Failed to load file '%1'").arg( filename )/*, 5000 */); + TQMessageBox::information( this, i18n("Load File"), i18n("Could not load file '%1'.").arg( filename ) ); + delete ff; + } + return (FormWindow*)resource.widget(); +} + +bool MainWindow::fileSave() +{ + + if ( !currentProject->isDummy() ) + return fileSaveProject(); + return fileSaveForm(); +} + +bool MainWindow::fileSaveForm() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( TQT_BASE_OBJECT(e->object()) == formWindow() || e == qWorkspace()->activeWindow() ) { + e->save(); + } + } + + FormWindow *fw = 0; + + TQWidget *w = qWorkspace()->activeWindow(); + if ( w ) { + if ( ::tqqt_cast(w) ) { + SourceEditor *se = (SourceEditor*)w; + if ( se->formWindow() ) + fw = se->formWindow(); + else if ( se->sourceFile() ) { + se->sourceFile()->save(); + return TRUE; + } + } + } + + if ( !fw ) + fw = formWindow(); + if ( !fw || !fw->formFile()->save() ) + return FALSE; + TQApplication::restoreOverrideCursor(); + return TRUE; +} + +bool MainWindow::fileSaveProject() +{ + currentProject->save(); + statusMessage( i18n( "Project '%1' saved.").arg( currentProject->projectName() )/*, 3000 */); + return TRUE; +} + +bool MainWindow::fileSaveAs() +{ + statusMessage( i18n( "Enter a filename..." ) ); + + TQWidget *w = qworkspace->activeWindow(); + if ( !w ) + return TRUE; + if ( ::tqqt_cast(w) ) + return ( (FormWindow*)w )->formFile()->saveAs(); + else if ( ::tqqt_cast(w) ) + return ( (SourceEditor*)w )->saveAs(); + return FALSE; +} + +void MainWindow::fileSaveAll() +{ + for ( TQMap::Iterator it = projects.begin(); it != projects.end(); ++it ) + (*it)->save(); +} + +void MainWindow::fileCreateTemplate() +{ + CreateTemplate dia( this, 0, TRUE ); + + int i = 0; + for ( i = 0; i < WidgetDatabase::count(); ++i ) { + if ( WidgetDatabase::isForm( i ) && WidgetDatabase::group( i ) != "Temp") { + dia.listClass->insertItem( WidgetDatabase::className( i ) ); + } + } + for ( i = 0; i < WidgetDatabase::count(); ++i ) { + if ( WidgetDatabase::isContainer( i ) && !WidgetDatabase::isForm(i) && + WidgetDatabase::className( i ) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::group( i ) != "Temp" ) { + dia.listClass->insertItem( WidgetDatabase::className( i ) ); + } + } + + TQPtrList *lst = MetaDataBase::customWidgets(); + for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { + if ( w->isContainer ) + dia.listClass->insertItem( w->className ); + } + + dia.editName->setText( i18n( "NewTemplate" ) ); + connect( dia.buttonCreate, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( createNewTemplate() ) ); + dia.exec(); +} + +void MainWindow::createNewTemplate() +{ + CreateTemplate *dia = (CreateTemplate*)TQT_TQOBJECT(const_cast(sender()))->parent(); + TQString fn = dia->editName->text(); + TQString cn = dia->listClass->currentText(); + if ( fn.isEmpty() || cn.isEmpty() ) { + TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); + return; + } + + TQStringList templRoots; + const char *qtdir = getenv( "QTDIR" ); + if(qtdir) + templRoots << qtdir; + templRoots << tqInstallPathData(); + if(qtdir) //try the tools/designer directory last! + templRoots << (TQString(qtdir) + "/tools/designer"); + TQFile f; + for ( TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) { + if ( TQFile::exists( (*it) + "/templates/" )) { + TQString tmpfn = (*it) + "/templates/" + fn + ".ui"; + f.setName(tmpfn); + if(f.open(IO_WriteOnly)) + break; + } + } + if ( !f.isOpen() ) { + TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); + return; + } + TQTextStream ts( &f ); + + ts << "" << endl; + ts << "" << endl; + ts << "" << cn << "" << endl; + ts << "" << endl; + ts << " name" << endl; + ts << " " << cn << "Form" << endl; + ts << "" << endl; + ts << "" << endl; + ts << " geometry" << endl; + ts << " " << endl; + ts << " 300" << endl; + ts << " 400" << endl; + ts << " " << endl; + ts << "" << endl; + ts << "" << endl; + ts << "" << endl; + + dia->editName->setText( i18n( "NewTemplate" ) ); + + f.close(); +} + +void MainWindow::editUndo() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editUndo(); + return; + } + if ( formWindow() ) + formWindow()->undo(); +} + +void MainWindow::editRedo() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editRedo(); + return; + } + if ( formWindow() ) + formWindow()->redo(); +} + +void MainWindow::editCut() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editCut(); + return; + } + editCopy(); + editDelete(); +} + +void MainWindow::editCopy() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editCopy(); + return; + } + if ( formWindow() ) + tqApp->clipboard()->setText( formWindow()->copy() ); +} + +void MainWindow::editPaste() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editPaste(); + return; + } + if ( !formWindow() ) + return; + + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); + if ( l.count() == 1 ) { + w = l.first(); + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) && + w != formWindow()->mainContainer() ) ) + w = formWindow()->mainContainer(); + } + + if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { + formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) ); + hierarchyView->widgetInserted( 0 ); + formWindow()->commandHistory()->setModified( TRUE ); + } else { + TQMessageBox::information( this, i18n( "Paste Error" ), + i18n( "Cannot paste widgets. Designer could not find a container\n" + "to paste into which does not contain a layout. Break the layout\n" + "of the container you want to paste into and select this container\n" + "and then paste again." ) ); + } +} + +void MainWindow::editDelete() +{ + if ( formWindow() ) + formWindow()->deleteWidgets(); +} + +void MainWindow::editSelectAll() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editSelectAll(); + return; + } + if ( formWindow() ) + formWindow()->selectAll(); +} + + +void MainWindow::editLower() +{ + if ( formWindow() ) + formWindow()->lowerWidgets(); +} + +void MainWindow::editRaise() +{ + if ( formWindow() ) + formWindow()->raiseWidgets(); +} + +void MainWindow::editAdjustSize() +{ + if ( formWindow() ) + formWindow()->editAdjustSize(); +} + +void MainWindow::editLayoutHorizontal() +{ + if ( layoutChilds ) + editLayoutContainerHorizontal(); + else if ( layoutSelected && formWindow() ) + formWindow()->layoutHorizontal(); +} + +void MainWindow::editLayoutVertical() +{ + if ( layoutChilds ) + editLayoutContainerVertical(); + else if ( layoutSelected && formWindow() ) + formWindow()->layoutVertical(); +} + +void MainWindow::editLayoutHorizontalSplit() +{ + if ( layoutChilds ) + ; // no way to do that + else if ( layoutSelected && formWindow() ) + formWindow()->layoutHorizontalSplit(); +} + +void MainWindow::editLayoutVerticalSplit() +{ + if ( layoutChilds ) + ; // no way to do that + else if ( layoutSelected && formWindow() ) + formWindow()->layoutVerticalSplit(); +} + +void MainWindow::editLayoutGrid() +{ + if ( layoutChilds ) + editLayoutContainerGrid(); + else if ( layoutSelected && formWindow() ) + formWindow()->layoutGrid(); +} + +void MainWindow::editLayoutContainerVertical() +{ + if ( !formWindow() ) + return; + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); + if ( l.count() == 1 ) + w = l.first(); + if ( w ) + formWindow()->layoutVerticalContainer( w ); +} + +void MainWindow::editLayoutContainerHorizontal() +{ + if ( !formWindow() ) + return; + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); + if ( l.count() == 1 ) + w = l.first(); + if ( w ) + formWindow()->layoutHorizontalContainer( w ); +} + +void MainWindow::editLayoutContainerGrid() +{ + if ( !formWindow() ) + return; + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); + if ( l.count() == 1 ) + w = l.first(); + if ( w ) + formWindow()->layoutGridContainer( w ); +} + +void MainWindow::editBreakLayout() +{ + if ( !formWindow() || !breakLayout ) + return; + TQWidget *w = formWindow()->mainContainer(); + if ( formWindow()->currentWidget() ) + w = formWindow()->currentWidget(); + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || + w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { + formWindow()->breakLayout( w ); + return; + } else { + TQWidgetList widgets = formWindow()->selectedWidgets(); + for ( w = widgets.first(); w; w = widgets.next() ) { + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || + w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) + break; + } + if ( w ) { + formWindow()->breakLayout( w ); + return; + } + } + + w = formWindow()->mainContainer(); + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || + w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) + formWindow()->breakLayout( w ); +} + +void MainWindow::editAccels() +{ + if ( !formWindow() ) + return; + formWindow()->checkAccels(); +} + +void MainWindow::editFunctions() +{ + if ( !formWindow() ) + return; + + statusMessage( i18n( "Edit the current form's slots..." ) ); + EditFunctions dlg( this, formWindow(), TRUE ); + dlg.exec(); + statusBar()->clear(); +} + +void MainWindow::editConnections() +{ + if ( !formWindow() ) + return; + + statusMessage( i18n( "Edit the current form's connections..." ) ); + ConnectionDialog dlg( this ); + dlg.exec(); + + statusBar()->clear(); +} + +SourceEditor *MainWindow::editSource() +{ + if ( !formWindow() ) + return 0; + return formWindow()->formFile()->showEditor(); +} + +SourceEditor *MainWindow::openSourceEditor() +{ + if ( !formWindow() ) + return 0; + + TQString lang = currentProject->language(); + if ( !MetaDataBase::hasEditor( lang ) ) { + TQMessageBox::information( this, i18n( "Edit Source" ), + i18n( "There is no plugin for editing %1 code installed.\n" + "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); + return 0; + } + + SourceEditor *editor = 0; + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( e->language() == lang && e->formWindow() == formWindow() ) { + editor = e; + break; + } + } + + if ( !editor ) +editor = createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang ); + return editor; +} + +SourceEditor *MainWindow::editSource( SourceFile *f ) +{ + TQString lang = currentProject->language(); + if ( !MetaDataBase::hasEditor( lang ) ) { + TQMessageBox::information( this, i18n( "Edit Source" ), + i18n( "There is no plugin for editing %1 code installed.\n" + "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); + return 0; + } + + SourceEditor *editor = 0; + if ( f ) + editor = f->editor(); + if ( !editor ) + editor = createSourceEditor( f, currentProject, lang ); + editor->setActiveWindow(); + editor->setFocus(); + return editor; +} + +SourceEditor *MainWindow::createSourceEditor( TQObject *object, Project *project, + const TQString &lang, const TQString &func, + bool rereadSource ) +{ + SourceEditor *editor = 0; + EditorInterface *eIface = 0; + editorPluginManager->queryInterface( lang, &eIface ); + if ( !eIface ) + return 0; + LanguageInterface *lIface = MetaDataBase::languageInterface( lang ); + if ( !lIface ) + return 0; + TQApplication::setOverrideCursor( WaitCursor ); + editor = new SourceEditor( qWorkspace(), eIface, lIface ); + eIface->release(); + lIface->release(); + + editor->setLanguage( lang ); + sourceEditors.append( editor ); + TQApplication::restoreOverrideCursor(); + + if ( editor->object() != object ) + editor->setObject( object, project ); + else if ( rereadSource ) + editor->refresh( FALSE ); + + editor->show(); + editor->setFocus(); + if ( !func.isEmpty() ) + editor->setFunction( func ); + emit editorChanged(); + + return editor; +} + +void MainWindow::editFormSettings() +{ + if ( !formWindow() ) + return; + + statusMessage( i18n( "Edit the current form's settings..." ) ); + FormSettings dlg( this, formWindow() ); + dlg.exec(); + statusBar()->clear(); +} + +void MainWindow::editProjectSettings() +{ + openProjectSettings( currentProject ); + wspace->setCurrentProject( currentProject ); +} + +void MainWindow::editPixmapCollection() +{ + PixmapCollectionEditor dia( this, 0, TRUE ); + dia.setProject( currentProject ); + dia.exec(); +} + +void MainWindow::editDatabaseConnections() +{ +#ifndef TQT_NO_SQL + DatabaseConnectionsEditor dia( currentProject, this, 0, TRUE ); + dia.exec(); +#endif +} + +void MainWindow::editPreferences() +{ + statusMessage( i18n( "Edit preferences..." ) ); + Preferences *dia = new Preferences( this, 0, TRUE ); + prefDia = dia; + connect( dia->helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + dia->buttonColor->setEditor( StyledButton::ColorEditor ); + dia->buttonPixmap->setEditor( StyledButton::PixmapEditor ); + dia->groupBoxGrid->setChecked( sGrid ); + dia->checkBoxSnapGrid->setChecked( snGrid ); + dia->spinGridX->setValue( grid().x() ); + dia->spinGridY->setValue( grid().y() ); + dia->checkBoxWorkspace->setChecked( restoreConfig ); + dia->checkBoxTextLabels->setChecked( usesTextLabel() ); + dia->buttonColor->setColor( qworkspace->backgroundColor() ); + TQString pluginPaths = TQApplication::libraryPaths().join("\n"); + dia->textEditPluginPaths->setText(pluginPaths); + if ( qworkspace->backgroundPixmap() ) + dia->buttonPixmap->setPixmap( *qworkspace->backgroundPixmap() ); + if ( backPix ) + dia->radioPixmap->setChecked( TRUE ); + else + dia->radioColor->setChecked( TRUE ); + dia->checkBoxSplash->setChecked( splashScreen ); + dia->checkAutoEdit->setChecked( !databaseAutoEdit ); + dia->checkBoxStartDialog->setChecked( shStartDialog ); + dia->checkBoxAutoSave->setChecked( autoSaveEnabled ); + int h = autoSaveInterval / 3600; + int m = ( autoSaveInterval - h * 3600 ) / 60; + int s = autoSaveInterval - ( h * 3600 + m * 60 ); + TQTime t( h, m, s ); + dia->timeEditAutoSave->setTime( t ); + + SenderObject *senderObject = new SenderObject( designerInterface() ); + TQValueList::Iterator it; + for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) { + Tab t = *it; + dia->tabWidget->addTab( t.w, t.title ); + if ( t.receiver ) { + connect( dia->buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); + connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); + connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + senderObject->emitInitSignal(); + disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + } + } + + if ( dia->exec() == TQDialog::Accepted ) { + setSnapGrid( dia->checkBoxSnapGrid->isChecked() ); + setShowGrid( dia->groupBoxGrid->isChecked() ); + setGrid( TQPoint( dia->spinGridX->value(), + dia->spinGridY->value() ) ); + restoreConfig = dia->checkBoxWorkspace->isChecked(); + setUsesTextLabel( dia->checkBoxTextLabels->isChecked() ); + if (dia->textEditPluginPaths->isModified()) { + pluginPaths = dia->textEditPluginPaths->text(); + TQApplication::setLibraryPaths(TQStringList::split("\n", pluginPaths)); + savePluginPaths = TRUE; + } + + if ( dia->radioPixmap->isChecked() && dia->buttonPixmap->pixmap() ) { + qworkspace->setBackgroundPixmap( *dia->buttonPixmap->pixmap() ); + backPix = TRUE; + } else { + qworkspace->setBackgroundColor( dia->buttonColor->color() ); + backPix = FALSE; + } + splashScreen = dia->checkBoxSplash->isChecked(); + databaseAutoEdit = !dia->checkAutoEdit->isChecked(); + shStartDialog = dia->checkBoxStartDialog->isChecked(); + autoSaveEnabled = dia->checkBoxAutoSave->isChecked(); + TQTime time = dia->timeEditAutoSave->time(); + autoSaveInterval = time.hour() * 3600 + time.minute() * 60 + time.second(); + if ( autoSaveEnabled ) + autoSaveTimer->start( autoSaveInterval * 1000 ); + else + autoSaveTimer->stop(); + } + delete senderObject; + for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) { + Tab t = *it; + dia->tabWidget->removePage( t.w ); + t.w->reparent( 0, TQPoint(0,0), FALSE ); + } + + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) + e->configChanged(); + + delete dia; + prefDia = 0; + statusBar()->clear(); +} + +void MainWindow::searchFind() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + + if ( !findDialog ) + findDialog = new FindDialog( this, 0, FALSE ); + findDialog->show(); + findDialog->raise(); + findDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), + ( (SourceEditor*)qWorkspace()->activeWindow() )->object() ); + findDialog->comboFind->setFocus(); + findDialog->comboFind->lineEdit()->selectAll(); +} + +void MainWindow::searchIncremetalFindMenu() +{ + incrementalSearch->selectAll(); + incrementalSearch->setFocus(); +} + +void MainWindow::searchIncremetalFind() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + + ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), + FALSE, FALSE, TRUE, FALSE ); +} + +void MainWindow::searchIncremetalFindNext() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + + ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), + FALSE, FALSE, TRUE, TRUE ); +} + +void MainWindow::searchReplace() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + + if ( !replaceDialog ) + replaceDialog = new ReplaceDialog( this, 0, FALSE ); + replaceDialog->show(); + replaceDialog->raise(); + replaceDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), + ( (SourceEditor*)qWorkspace()->activeWindow() )->object() ); + replaceDialog->comboFind->setFocus(); + replaceDialog->comboFind->lineEdit()->selectAll(); +} + +void MainWindow::searchGotoLine() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + + if ( !gotoLineDialog ) + gotoLineDialog = new GotoLineDialog( this, 0, FALSE ); + gotoLineDialog->show(); + gotoLineDialog->raise(); + gotoLineDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface() ); + gotoLineDialog->spinLine->setFocus(); + gotoLineDialog->spinLine->setMinValue( 1 ); + gotoLineDialog->spinLine->setMaxValue( ( (SourceEditor*)qWorkspace()->activeWindow() )->numLines() ); + gotoLineDialog->spinLine->selectAll(); +} + +void MainWindow::toolsCustomWidget() +{ + statusMessage( i18n( "Edit custom widgets..." ) ); + CustomWidgetEditor edit( this, this ); + edit.exec(); + rebuildCustomWidgetGUI(); + statusBar()->clear(); +} + +void MainWindow::toolsConfigure() +{ + ConfigToolboxDialog dlg( this ); + if ( dlg.exec() != TQDialog::Accepted ) + return; + rebuildCommonWidgetsToolBoxPage(); +} + +void MainWindow::showStartDialog() +{ + if ( singleProjectMode() ) + return; + for ( int i = 1; i < tqApp->argc(); ++i ) { + TQString arg = tqApp->argv()[i]; + if ( arg[0] != '-' ) + return; + } + StartDialog *sd = new StartDialog( this, templatePath() ); + sd->setRecentlyFiles( recentlyFiles ); + sd->setRecentlyProjects( recentlyProjects ); + sd->exec(); + shStartDialog = sd->showDialogInFuture(); +} diff --git a/kdevdesigner/designer/menubareditor.cpp b/kdevdesigner/designer/menubareditor.cpp new file mode 100644 index 00000000..f62e15e0 --- /dev/null +++ b/kdevdesigner/designer/menubareditor.cpp @@ -0,0 +1,1129 @@ +/********************************************************************** +** Copyright (C) 2003 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "command.h" +#include "formwindow.h" +#include "menubareditor.h" +#include "popupmenueditor.h" + +#include + +extern void find_accel( const TQString &txt, TQMap &accels, TQWidget *w ); + +// Drag Object Declaration ------------------------------------------- + +class MenuBarEditorItemPtrDrag : public TQStoredDrag +{ +public: + MenuBarEditorItemPtrDrag( MenuBarEditorItem * item, + TQWidget * parent = 0, + const char * name = 0 ); + ~MenuBarEditorItemPtrDrag() {}; + static bool canDecode( TQDragMoveEvent * e ); + static bool decode( TQDropEvent * e, MenuBarEditorItem ** i ); +}; + +// Drag Object Implementation --------------------------------------- + +MenuBarEditorItemPtrDrag::MenuBarEditorItemPtrDrag( MenuBarEditorItem * item, + TQWidget * parent, + const char * name ) + : TQStoredDrag( "qt/menubareditoritemptr", parent, name ) +{ + TQByteArray data( sizeof( TQ_LONG ) ); + TQDataStream stream( data, IO_WriteOnly ); + stream << ( TQ_LONG ) item; + setEncodedData( data ); +} + +bool MenuBarEditorItemPtrDrag::canDecode( TQDragMoveEvent * e ) +{ + return e->provides( "qt/menubareditoritemptr" ); +} + +bool MenuBarEditorItemPtrDrag::decode( TQDropEvent * e, MenuBarEditorItem ** i ) +{ + TQByteArray data = e->encodedData( "qt/menubareditoritemptr" ); + TQDataStream stream( data, IO_ReadOnly ); + + if ( !data.size() ) + return FALSE; + + TQ_LONG p = 0; + stream >> p; + *i = ( MenuBarEditorItem *) p; + + return TRUE; +} + +// MenuBarEditorItem --------------------------------------------------- + +MenuBarEditorItem::MenuBarEditorItem( MenuBarEditor * bar, TQObject * parent, const char * name ) + : TQObject( parent, name ), + menuBar( bar ), + popupMenu( 0 ), + visible( TRUE ), + separator( FALSE ), + removable( FALSE ) +{ } + +MenuBarEditorItem::MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * bar, + TQObject * parent, const char * name ) + : TQObject( parent, name ), + menuBar( bar ), + popupMenu( menu ), + visible( TRUE ), + separator( FALSE ), + removable( TRUE ) +{ + text = menu->name(); +} + +MenuBarEditorItem::MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor * bar, + TQObject * parent, const char * name ) + : TQObject( parent, name ), + menuBar( bar ), + popupMenu( 0 ), + visible( TRUE ), + separator( FALSE ), + removable( TRUE ) +{ + text = actionGroup->menuText(); + popupMenu = new PopupMenuEditor( menuBar->formWindow(), menuBar ); + popupMenu->insert( actionGroup ); +} + +MenuBarEditorItem::MenuBarEditorItem( MenuBarEditorItem * item, TQObject * parent, const char * name ) + : TQObject( parent, name ), + menuBar( item->menuBar ), + popupMenu( 0 ), + text( item->text ), + visible( item->visible ), + separator( item->separator ), + removable( item->removable ) +{ + popupMenu = new PopupMenuEditor( menuBar->formWindow(), item->popupMenu, menuBar ); +} + +// MenuBarEditor -------------------------------------------------------- + +int MenuBarEditor::clipboardOperation = 0; +MenuBarEditorItem * MenuBarEditor::clipboardItem = 0; + +MenuBarEditor::MenuBarEditor( FormWindow * fw, TQWidget * parent, const char * name ) + : TQMenuBar( parent, name ), + formWnd( fw ), + draggedItem( 0 ), + currentIndex( 0 ), + itemHeight( 0 ), + separatorWidth( 32 ), + hideWhenEmpty( TRUE ), + hasSeparator( FALSE ) +{ + setAcceptDrops( TRUE ); + setFocusPolicy( TQ_StrongFocus ); + + addItem.setMenuText( i18n("new menu") ); + addSeparator.setMenuText( i18n("new separator") ); + + lineEdit = new TQLineEdit( this, "menubar lineedit" ); + lineEdit->hide(); + lineEdit->setFrameStyle(TQFrame::Plain | TQFrame::NoFrame); + lineEdit->polish(); + lineEdit->setBackgroundMode(PaletteButton); + lineEdit->setBackgroundOrigin(ParentOrigin); + lineEdit->installEventFilter( this ); + + dropLine = new TQWidget( this, "menubar dropline", TQt::WStyle_NoBorder | WStyle_StaysOnTop ); + dropLine->setBackgroundColor( TQt::red ); + dropLine->hide(); + + setMinimumHeight( fontMetrics().height() + 2 * borderSize() ); +} + +MenuBarEditor::~MenuBarEditor() +{ + itemList.setAutoDelete( TRUE ); +} + +FormWindow * MenuBarEditor::formWindow() +{ + return formWnd; +} + +MenuBarEditorItem * MenuBarEditor::createItem( int index, bool addToCmdStack ) +{ + MenuBarEditorItem * i = + new MenuBarEditorItem( new PopupMenuEditor( formWnd, ( TQWidget * ) parent() ), this ); + if ( addToCmdStack ) { + AddMenuCommand * cmd = new AddMenuCommand( i18n( "Add Menu" ), formWnd, this, i, index ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else { + AddMenuCommand cmd( i18n( "Add Menu" ), formWnd, this, i, index ); + cmd.execute(); + } + return i; +} + +void MenuBarEditor::insertItem( MenuBarEditorItem * item, int index ) +{ + item->menu()->parentMenu = this; + + if ( index != -1 ) + itemList.insert( index, item ); + else + itemList.append( item ); + + if ( hideWhenEmpty && itemList.count() == 1 ) + show(); // calls resizeInternals(); + else + resizeInternals(); + + if ( isVisible() ) + update(); +} + +void MenuBarEditor::insertItem( TQString text, PopupMenuEditor * menu, int index ) +{ + MenuBarEditorItem * item = new MenuBarEditorItem( menu, this ); + if ( !text.isNull() ) + item->setMenuText( text ); + insertItem( item, index ); +} + +void MenuBarEditor::insertItem( TQString text, TQActionGroup * group, int index ) +{ + MenuBarEditorItem * item = new MenuBarEditorItem( group, this ); + if ( !text.isNull() ) + item->setMenuText( text ); + insertItem( item, index ); +} + + +void MenuBarEditor::insertSeparator( int index ) +{ + if ( hasSeparator ) + return; + + MenuBarEditorItem * i = createItem( index ); + i->setSeparator( TRUE ); + i->setMenuText( i18n( "separator" ) ); + hasSeparator = TRUE; +} + +void MenuBarEditor::removeItemAt( int index ) +{ + removeItem( item( index ) ); +} + +void MenuBarEditor::removeItem( MenuBarEditorItem * item ) +{ + if ( item && + item->isRemovable() && + itemList.removeRef( item ) ) { + + if ( item->isSeparator() ) + hasSeparator = FALSE; + + if ( hideWhenEmpty && itemList.count() == 0 ) + hide(); + else + resizeInternals(); + + int n = count() + 1; + if ( currentIndex >= n ) + currentIndex = n; + + if ( isVisible() ) + update(); + } +} + +int MenuBarEditor::findItem( MenuBarEditorItem * item ) +{ + return itemList.findRef( item ); +} + +int MenuBarEditor::findItem( PopupMenuEditor * menu ) +{ + MenuBarEditorItem * i = itemList.first(); + + while ( i ) { + if ( i->menu() == menu ) + return itemList.at(); + i = itemList.next(); + } + + return -1; +} + +int MenuBarEditor::findItem( TQPoint & pos ) +{ + int x = borderSize(); + int dx = 0; + int y = 0; + int w = width(); + TQSize s; + TQRect r; + + MenuBarEditorItem * i = itemList.first(); + + while ( i ) { + + if ( i->isVisible() ) { + + s = itemSize( i ); + dx = s.width(); + + if ( x + dx > w && x > borderSize() ) { + y += itemHeight; + x = borderSize(); + } + + r = TQRect( x, y, s.width(), s.height() ); + + if ( r.contains( pos ) ) + return itemList.at(); + + addItemSizeToCoords( i, x, y, w ); + } + + i = itemList.next(); + } + + // check add item + s = itemSize( &addItem ); + dx = s.width(); + + if ( x + dx > w && x > borderSize() ) { + y += itemHeight; + x = borderSize(); + } + + r = TQRect( x, y, s.width(), s.height() ); + + if ( r.contains( pos ) ) + return itemList.count(); + + return itemList.count() + 1; +} + +MenuBarEditorItem * MenuBarEditor::item( int index ) +{ + if ( index == -1 ) + return itemList.at( currentIndex ); + + int c = itemList.count(); + if ( index == c ) + return &addItem; + else if ( index > c ) + return &addSeparator; + + return itemList.at( index ); +} + +int MenuBarEditor::count() +{ + return itemList.count(); +} + +int MenuBarEditor::current() +{ + return currentIndex; +} + +void MenuBarEditor::cut( int index ) +{ + if ( clipboardItem && clipboardOperation == Cut ) + delete clipboardItem; + + clipboardOperation = Cut; + clipboardItem = itemList.at( index ); + + if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) { + clipboardOperation = None; + clipboardItem = 0; + return; // do nothing + } + + RemoveMenuCommand * cmd = new RemoveMenuCommand( i18n( "Cut Menu" ), formWnd, this, index ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void MenuBarEditor::copy( int index ) +{ + if ( clipboardItem && clipboardOperation == Cut ) + delete clipboardItem; + + clipboardOperation = Copy; + clipboardItem = itemList.at( index ); + + if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) { + clipboardOperation = None; + clipboardItem = 0; + } +} + +void MenuBarEditor::paste( int index ) +{ + if ( clipboardItem && clipboardOperation ) { + MenuBarEditorItem * i = new MenuBarEditorItem( clipboardItem ); + AddMenuCommand * cmd = new AddMenuCommand( i18n( "Paste Menu" ), formWnd, this, i, index ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + } +} + +void MenuBarEditor::exchange( int a, int b ) +{ + MenuBarEditorItem * ia = itemList.at( a ); + MenuBarEditorItem * ib = itemList.at( b ); + if ( !ia || !ib || + ia == &addItem || ia == &addSeparator || + ib == &addItem || ib == &addSeparator ) + return; // do nothing + itemList.replace( b, ia ); + itemList.replace( a, ib ); +} + +void MenuBarEditor::showLineEdit( int index ) +{ + if ( index == -1 ) + index = currentIndex; + + MenuBarEditorItem * i = 0; + + if ( (uint) index >= itemList.count() ) + i = &addItem; + else + i = itemList.at( index ); + + if ( i && i->isSeparator() ) + return; + + // open edit field for item name + lineEdit->setText( i->menuText() ); + lineEdit->selectAll(); + TQPoint pos = itemPos( index ); + lineEdit->move( pos.x() + borderSize(), pos.y() - ( borderSize() / 2 ) ); + lineEdit->resize( itemSize( i ) ); + lineEdit->show(); + lineEdit->setFocus(); +} + +void MenuBarEditor::showItem( int index ) +{ + if ( index == -1 ) + index = currentIndex; + + if ( (uint)index < itemList.count() ) { + MenuBarEditorItem * i = itemList.at( index ); + if ( i->isSeparator() || draggedItem ) + return; + PopupMenuEditor * m = i->menu(); + TQPoint pos = itemPos( index ); + m->move( pos.x(), pos.y() + itemHeight - 1 ); + m->raise(); + m->show(); + setFocus(); + } +} + +void MenuBarEditor::hideItem( int index ) +{ + if ( index == -1 ) + index = currentIndex; + + if ( (uint)index < itemList.count() ) { + PopupMenuEditor * m = itemList.at( index )->menu(); + m->hideSubMenu(); + m->hide(); + } +} + +void MenuBarEditor::focusItem( int index ) +{ + if ( index == -1 ) + index = currentIndex; + + if ( (uint)index < itemList.count() ) { + PopupMenuEditor * m = itemList.at( index )->menu(); + m->setFocus(); + m->update(); + update(); + } +} + +void MenuBarEditor::deleteItem( int index ) +{ + if ( index == -1 ) + index = currentIndex; + + if ( (uint)index < itemList.count() ) { + RemoveMenuCommand * cmd = new RemoveMenuCommand( i18n( "Delete Menu" ), + formWnd, + this, + currentIndex ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + } +} + +TQSize MenuBarEditor::sizeHint() const +{ + return TQSize( parentWidget()->width(), heightForWidth( parentWidget()->width() ) ); +} + +int MenuBarEditor::heightForWidth( int max_width ) const +{ + MenuBarEditor * that = ( MenuBarEditor * ) this; + int x = borderSize(); + int y = 0; + + TQPainter p( this ); + that->itemHeight = that->itemSize( &(that->addItem) ).height(); + + MenuBarEditorItem * i = that->itemList.first(); + while ( i ) { + if ( i->isVisible() ) + that->addItemSizeToCoords( i, x, y, max_width ); + i = that->itemList.next(); + } + + that->addItemSizeToCoords( &(that->addItem), x, y, max_width ); + that->addItemSizeToCoords( &(that->addSeparator), x, y, max_width ); + + return y + itemHeight; +} + +void MenuBarEditor::show() +{ + TQWidget::show(); + resizeInternals(); + + TQResizeEvent e( parentWidget()->size(), parentWidget()->size() ); + TQApplication::sendEvent( parentWidget(), &e ); +} + +void MenuBarEditor::checkAccels( TQMap &accels ) +{ + TQString t; + MenuBarEditorItem * i = itemList.first(); + while ( i ) { + t = i->menuText(); + find_accel( t, accels, this ); + // do not check the accelerators in the popup menus + i = itemList.next(); + } +} + +// public slots + +void MenuBarEditor::cut() +{ + cut( currentIndex ); +} + +void MenuBarEditor::copy() +{ + copy( currentIndex ); +} + +void MenuBarEditor::paste() +{ + paste( currentIndex ); +} + +// protected + +bool MenuBarEditor::eventFilter( TQObject * o, TQEvent * e ) +{ + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit) && e->type() == TQEvent::FocusOut ) { + leaveEditMode(); + lineEdit->hide(); + update(); + } else if ( e->type() == TQEvent::LayoutHint ) { + resize( sizeHint() ); + } + return TQMenuBar::eventFilter( o, e ); +} + +void MenuBarEditor::paintEvent( TQPaintEvent * ) +{ + TQPainter p( this ); + TQRect r = rect(); + style().tqdrawPrimitive( TQStyle::PE_PanelMenuBar, &p, + r, colorGroup() ); + drawItems( p ); +} + +void MenuBarEditor::mousePressEvent( TQMouseEvent * e ) +{ + mousePressPos = e->pos(); + hideItem(); + lineEdit->hide(); + currentIndex = findItem( mousePressPos ); + showItem(); + update(); + e->accept(); +} + +void MenuBarEditor::mouseDoubleClickEvent( TQMouseEvent * e ) +{ + mousePressPos = e->pos(); + currentIndex = findItem( mousePressPos ); + lineEdit->hide(); + if ( currentIndex > (int)itemList.count() ) { + insertSeparator(); + update(); + } else { + showLineEdit(); + } +} + +void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e ) +{ + if ( e->state() & Qt::LeftButton ) { + if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) { + bool itemCreated = FALSE; + bool isSeparator = FALSE; + draggedItem = item( findItem( mousePressPos ) ); + if ( draggedItem == &addItem ) { + draggedItem = createItem(); + itemCreated = TRUE; + } else if ( draggedItem == &addSeparator ) { + if (hasSeparator) // we can only have one separator + return; + draggedItem = createItem(); + draggedItem->setSeparator( TRUE ); + draggedItem->setMenuText( "separator" ); + isSeparator = TRUE; + itemCreated = TRUE; + } else { + isSeparator = draggedItem->isSeparator(); + } + + MenuBarEditorItemPtrDrag * d = + new MenuBarEditorItemPtrDrag( draggedItem, this ); + d->setPixmap( createTextPixmap( draggedItem->menuText() ) ); + hideItem(); + draggedItem->setVisible( FALSE ); + update(); + + // If the item is dropped in the same list, + // we will have two instances of the same pointer + // in the list. + itemList.find( draggedItem ); + TQLNode * node = itemList.currentNode(); + dropConfirmed = FALSE; + d->dragCopy(); // dragevents and stuff happens + if ( draggedItem ) { // item was not dropped + if ( itemCreated ) { + removeItem( draggedItem ); + } else { + hideItem(); + draggedItem->setVisible( TRUE ); + draggedItem = 0; + showItem(); + } + } else if ( dropConfirmed ) { // item was dropped + dropConfirmed = FALSE; + hideItem(); + itemList.takeNode( node )->setVisible( TRUE ); + hasSeparator = isSeparator || hasSeparator; + showItem(); + } else { + hasSeparator = isSeparator || hasSeparator; + } + update(); + } + } +} + +void MenuBarEditor::dragEnterEvent( TQDragEnterEvent * e ) +{ + if ( MenuBarEditorItemPtrDrag::canDecode( e ) ) { + e->accept(); + dropLine->show(); + } +} + +void MenuBarEditor::dragLeaveEvent( TQDragLeaveEvent * ) +{ + dropLine->hide(); +} + +void MenuBarEditor::dragMoveEvent( TQDragMoveEvent * e ) +{ + + TQPoint pos = e->pos(); + dropLine->move( snapToItem( pos ) ); + + int idx = findItem( pos ); + if ( currentIndex != idx ) { + hideItem(); + currentIndex = idx; + showItem(); + } +} + +void MenuBarEditor::dropEvent( TQDropEvent * e ) +{ + MenuBarEditorItem * i = 0; + + if ( MenuBarEditorItemPtrDrag::decode( e, &i ) ) { + draggedItem = 0; + hideItem(); + dropInPlace( i, e->pos() ); + e->accept(); + } + + dropLine->hide(); +} + +void MenuBarEditor::keyPressEvent( TQKeyEvent * e ) +{ + if ( lineEdit->isHidden() ) { // In navigation mode + switch ( e->key() ) { + + case TQt::Key_Delete: + hideItem(); + deleteItem(); + showItem(); + break; + + case TQt::Key_Left: + e->accept(); + navigateLeft( e->state() & TQt::ControlButton ); + return; + + case TQt::Key_Right: + e->accept(); + navigateRight( e->state() & TQt::ControlButton ); + return; // no update + + case TQt::Key_Down: + e->accept(); + focusItem(); + return; // no update + + case TQt::Key_PageUp: + currentIndex = 0; + break; + + case TQt::Key_PageDown: + currentIndex = itemList.count(); + break; + + case TQt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_F2: + e->accept(); + enterEditMode(); + return; // no update + + case TQt::Key_Up: + case TQt::Key_Alt: + case TQt::Key_Shift: + case TQt::Key_Control: + case TQt::Key_Escape: + e->ignore(); + setFocus(); // FIXME: this is because some other widget get the focus when CTRL is pressed + return; // no update + + case TQt::Key_C: + if ( e->state() & TQt::ControlButton && currentIndex < (int)itemList.count() ) { + copy( currentIndex ); + break; + } + + case TQt::Key_X: + if ( e->state() & TQt::ControlButton && currentIndex < (int)itemList.count() ) { + hideItem(); + cut( currentIndex ); + showItem(); + break; + } + + case TQt::Key_V: + if ( e->state() & TQt::ControlButton ) { + hideItem(); + paste( currentIndex < (int)itemList.count() ? currentIndex + 1: itemList.count() ); + showItem(); + break; + } + + default: + if ( e->ascii() >= 32 || e->ascii() == 0 ) { + showLineEdit(); + TQApplication::sendEvent( lineEdit, e ); + e->accept(); + } else { + e->ignore(); + } + return; + } + } else { // In edit mode + + switch ( e->key() ) { + case TQt::Key_Control: + e->ignore(); + return; + case TQt::Key_Enter: + case TQt::Key_Return: + leaveEditMode(); + case TQt::Key_Escape: + lineEdit->hide(); + setFocus(); + break; + } + } + e->accept(); + update(); +} + +void MenuBarEditor::focusOutEvent( TQFocusEvent * e ) +{ + TQWidget * fw = tqApp->focusWidget(); + if ( e->lostFocus() && !::tqqt_cast(fw) ) + hideItem(); + update(); +} + +void MenuBarEditor::resizeInternals() +{ + dropLine->resize( 2, itemHeight ); + updateGeometry(); +} + +void MenuBarEditor::drawItems( TQPainter & p ) +{ + TQPoint pos( borderSize(), 0 ); + uint c = 0; + + p.setPen( colorGroup().buttonText() ); + + MenuBarEditorItem * i = itemList.first(); + while ( i ) { + if ( i->isVisible() ) + drawItem( p, i, c++, pos ); // updates x y + i = itemList.next(); + } + + p.setPen( darkBlue ); + drawItem( p, &addItem, c++, pos ); + if ( !hasSeparator ) + drawItem( p, &addSeparator, c, pos ); +} + +void MenuBarEditor::drawItem( TQPainter & p, + MenuBarEditorItem * i, + int idx, + TQPoint & pos ) +{ + int w = itemSize( i ).width(); + + // If the item passes the right border, and it is not the first item on the line + if ( pos.x() + w > width() && pos.x() > borderSize() ) { // wrap + pos.ry() += itemHeight; + pos.setX( borderSize() ); + } + + if ( i->isSeparator() ) { + drawSeparator( p, pos ); + } else { + int flags = TQPainter::AlignLeft | TQPainter::AlignVCenter | + TQt::ShowPrefix | TQt::SingleLine; + p.drawText( pos.x() + borderSize(), pos.y(), w - borderSize(), itemHeight, + flags, i->menuText() ); + } + + if ( hasFocus() && idx == currentIndex && !draggedItem ) + p.drawWinFocusRect( pos.x(), pos.y() + 1, w, itemHeight - 2 ); + + pos.rx() += w; +} + +void MenuBarEditor::drawSeparator( TQPainter & p, TQPoint & pos ) +{ + p.save(); + p.setPen( darkBlue ); + + int left = pos.x(); + int top = pos.y() + 2; + int right = left + separatorWidth - 1; + int bottom = pos.y() + itemHeight - 4; + + p.drawLine( left, top, left, bottom ); + p.drawLine( right, top, right, bottom ); + + p.fillRect( left, pos.y() + borderSize() * 2, + separatorWidth - 1, itemHeight - borderSize() * 4, + TQBrush( darkBlue, TQt::Dense5Pattern ) ); + + p.restore(); +} + +TQSize MenuBarEditor::itemSize( MenuBarEditorItem * i ) +{ + if ( i->isSeparator() ) + return TQSize( separatorWidth, itemHeight ); + TQRect r = fontMetrics().boundingRect( i->menuText().remove( "&") ); + return TQSize( r.width() + borderSize() * 2, r.height() + borderSize() * 4 ); +} + +void MenuBarEditor::addItemSizeToCoords( MenuBarEditorItem * i, int & x, int & y, int w ) +{ + int dx = itemSize( i ).width(); + if ( x + dx > w && x > borderSize() ) { + y += itemHeight; + x = borderSize(); + } + x += dx; +} + +TQPoint MenuBarEditor::itemPos( int index ) +{ + int x = borderSize(); + int y = 0; + int w = width(); + int dx = 0; + int c = 0; + + MenuBarEditorItem * i = itemList.first(); + + while ( i ) { + if ( i->isVisible() ) { + dx = itemSize( i ).width(); + if ( x + dx > w && x > borderSize() ) { + y += itemHeight; + x = borderSize(); + } + if ( c == index ) + return TQPoint( x, y ); + x += dx; + c++; + } + i = itemList.next(); + } + dx = itemSize( &addItem ).width(); + if ( x + dx > width() && x > borderSize() ) { + y += itemHeight; + x = borderSize(); + } + + return TQPoint( x, y ); +} + +TQPoint MenuBarEditor::snapToItem( const TQPoint & pos ) +{ + int x = borderSize(); + int y = 0; + int dx = 0; + + MenuBarEditorItem * n = itemList.first(); + + while ( n ) { + if ( n->isVisible() ) { + dx = itemSize( n ).width(); + if ( x + dx > width() && x > borderSize() ) { + y += itemHeight; + x = borderSize(); + } + if ( pos.y() > y && + pos.y() < y + itemHeight && + pos.x() < x + dx / 2 ) { + return TQPoint( x, y ); + } + x += dx; + } + n = itemList.next(); + } + + return TQPoint( x, y ); +} + +void MenuBarEditor::dropInPlace( MenuBarEditorItem * i, const TQPoint & pos ) +{ + int x = borderSize(); + int y = 0; + int dx = 0; + int idx = 0; + + MenuBarEditorItem * n = itemList.first(); + + while ( n ) { + if ( n->isVisible() ) { + dx = itemSize( n ).width(); + if ( x + dx > width() && x > borderSize() ) { + y += itemHeight; + x = borderSize(); + } + if ( pos.y() > y && + pos.y() < y + itemHeight && + pos.x() < x + dx / 2 ) + break; + x += dx; + } + n = itemList.next(); + idx++; + } + + hideItem(); + Command * cmd = 0; + int iidx = itemList.findRef( i ); + if ( iidx != -1 ) { // internal dnd + cmd = new MoveMenuCommand( i18n( "Item Dragged" ), formWnd, this, iidx, idx ); + item( iidx )->setVisible( TRUE ); + } else { + cmd = new AddMenuCommand( i18n( "Add Menu" ), formWnd, this, i, idx ); + dropConfirmed = TRUE; // let mouseMoveEvent set the item visible + } + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + currentIndex = ( iidx >= 0 && iidx < idx ) ? idx - 1 : idx; + showItem(); +} + + +void MenuBarEditor::safeDec() +{ + do { + currentIndex--; + } while ( currentIndex > 0 && !( item( currentIndex )->isVisible() ) ); +} + +void MenuBarEditor::safeInc() +{ + int max = (int)itemList.count(); + if ( !hasSeparator ) + max += 1; + if ( currentIndex < max ) { + do { + currentIndex++; + // skip invisible items + } while ( currentIndex < max && !( item( currentIndex )->isVisible() ) ); + } +} + +void MenuBarEditor::navigateLeft( bool ctrl ) +{ + // FIXME: handle invisible items + if ( currentIndex > 0 ) { + hideItem(); + if ( ctrl ) { + ExchangeMenuCommand * cmd = new ExchangeMenuCommand( i18n( "Move Menu Left" ), + formWnd, + this, + currentIndex, + currentIndex - 1 ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + safeDec(); + } else { + safeDec(); + } + showItem(); + } + update(); +} + +void MenuBarEditor::navigateRight( bool ctrl ) +{ +// FIXME: handle invisible items + hideItem(); + if ( ctrl ) { + if ( currentIndex < ( (int)itemList.count() - 1 ) ) { + ExchangeMenuCommand * cmd = new ExchangeMenuCommand( i18n( "Move Menu Right" ), + formWnd, + this, + currentIndex, + currentIndex + 1 ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + safeInc(); + } + } else { + safeInc(); + } + showItem(); + update(); +} + +void MenuBarEditor::enterEditMode() +{ + if ( currentIndex > (int)itemList.count() ) { + insertSeparator(); + } else { + showLineEdit(); + } +} + +void MenuBarEditor::leaveEditMode() +{ + MenuBarEditorItem * i = 0; + if ( currentIndex >= (int)itemList.count() ) { + i = createItem(); + // do not put rename on cmd stack + RenameMenuCommand rename( i18n( "Rename Menu" ), formWnd, this, lineEdit->text(), i ); + rename.execute(); + } else { + i = itemList.at( currentIndex ); + RenameMenuCommand * cmd = + new RenameMenuCommand( i18n( "Rename Menu" ), formWnd, this, lineEdit->text(), i ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + showItem(); +} + +TQPixmap MenuBarEditor::createTextPixmap( const TQString &text ) +{ + TQSize sz( fontMetrics().boundingRect( text ).size() ); + TQPixmap pix( sz.width() + 20, sz.height() * 2 ); + pix.fill( white ); + TQPainter p( &pix, this ); + p.drawText( 2, 0, pix.width(), pix.height(), 0, text ); + p.end(); + TQBitmap bm( pix.size() ); + bm.fill( color0 ); + p.begin( &bm ); + p.setPen( color1 ); + p.drawText( 2, 0, pix.width(), pix.height(), 0, text ); + p.end(); + pix.setMask( bm ); + return pix; +} diff --git a/kdevdesigner/designer/menubareditor.h b/kdevdesigner/designer/menubareditor.h new file mode 100644 index 00000000..f6279f2b --- /dev/null +++ b/kdevdesigner/designer/menubareditor.h @@ -0,0 +1,200 @@ +/********************************************************************** +** Copyright (C) 2003 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef MENUBAREDITOR_H +#define MENUBAREDITOR_H + +#include +#include + +class PopupMenuEditor; +class MenuBarEditor; +class TQActionGroup; + +class MenuBarEditorItem : public TQObject +{ + Q_OBJECT + + + friend class MenuBarEditor; + + MenuBarEditorItem( MenuBarEditor * bar = 0, TQObject * parent = 0, const char * name = 0 ); + +public: + MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * bar, + TQObject * parent = 0, const char * name = 0); + MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor * bar, + TQObject * parent = 0, const char * name = 0); + MenuBarEditorItem( MenuBarEditorItem * item, + TQObject * parent = 0, const char * name = 0); + ~MenuBarEditorItem() { }; + + PopupMenuEditor * menu() { return popupMenu; } + + void setMenuText( const TQString t ) { text = t; }; + TQString menuText() { return text; } + + void setVisible( bool enable ) { visible = enable; } + bool isVisible() { return visible; } + + void setRemovable( bool enable ) { removable = enable; } + bool isRemovable() { return removable; } + + bool isSeparator() { return separator; } +protected: + void setSeparator( bool enable ) { separator = enable; } + +private: + MenuBarEditor * menuBar; + PopupMenuEditor * popupMenu; + TQString text; + uint visible : 1; + uint separator : 1; + uint removable : 1; +}; + +class TQLineEdit; +class FormWindow; + +class MenuBarEditor : public TQMenuBar +{ + Q_OBJECT + + +public: + MenuBarEditor( FormWindow * fw, TQWidget * parent = 0, const char * name = 0 ); + ~MenuBarEditor(); + + FormWindow * formWindow(); + + MenuBarEditorItem * createItem( int index = -1, bool addToCmdStack = TRUE ); + void insertItem( MenuBarEditorItem * item, int index = -1 ); + void insertItem( TQString text, PopupMenuEditor * menu, int index = -1 ); + void insertItem( TQString text, TQActionGroup * group, int index = -1 ); + + void insertSeparator( int index = -1 ); + + void removeItemAt( int index ); + void removeItem( MenuBarEditorItem * item ); + + int findItem( MenuBarEditorItem * item ); + int findItem( PopupMenuEditor * menu ); + int findItem( TQPoint & pos ); + + MenuBarEditorItem * item( int index = -1 ); + + int count(); + int current(); + + void cut( int index ); + void copy( int index ); + void paste( int index ); + void exchange( int a, int b ); + + void showLineEdit( int index = -1); + void showItem( int index = -1 ); + void hideItem( int index = -1 ); + void focusItem( int index = -1 ); + void deleteItem( int index = -1 ); + + TQSize sizeHint() const; + TQSize minimumSize() const { return sizeHint(); } + TQSize minimumSizeHint() const { return sizeHint(); } + int heightForWidth( int max_width ) const; + + void show(); + + void checkAccels( TQMap &accels ); + +public slots: + void cut(); + void copy(); + void paste(); + +protected: + bool eventFilter( TQObject * o, TQEvent * e ); + void paintEvent( TQPaintEvent * e ); + void mousePressEvent( TQMouseEvent * e ); + void mouseDoubleClickEvent( TQMouseEvent * e ); + void mouseMoveEvent( TQMouseEvent * e ); + void dragEnterEvent( TQDragEnterEvent * e ); + void dragLeaveEvent( TQDragLeaveEvent * e ); + void dragMoveEvent( TQDragMoveEvent * e ); + void dropEvent( TQDropEvent * e ); + void keyPressEvent( TQKeyEvent * e ); + void focusOutEvent( TQFocusEvent * e ); + void resizeEvent( TQResizeEvent * e ) { TQFrame::resizeEvent( e ); } + + void resizeInternals(); + + void drawItems( TQPainter & p ); + void drawItem( TQPainter & p, MenuBarEditorItem * i, int idx, TQPoint & pos ); + void drawSeparator( TQPainter & p, TQPoint & pos ); + + TQSize itemSize( MenuBarEditorItem * i ); + void addItemSizeToCoords( MenuBarEditorItem * i, int & x, int & y, int w ); + + TQPoint itemPos( int index ); + TQPoint snapToItem( const TQPoint & pos ); + void dropInPlace( MenuBarEditorItem * i, const TQPoint & pos ); + + void safeDec(); + void safeInc(); + + void navigateLeft( bool ctrl ); + void navigateRight( bool ctrl ); + void enterEditMode(); + void leaveEditMode(); + + TQPixmap createTextPixmap( const TQString &text ); + int borderSize() const { return margin() + 4; } // add 4 pixels to the margin + +private: + FormWindow * formWnd; + TQLineEdit * lineEdit; + TQWidget * dropLine; + TQPtrList itemList; + MenuBarEditorItem addItem; + MenuBarEditorItem addSeparator; + MenuBarEditorItem * draggedItem; + TQPoint mousePressPos; + int currentIndex; + int itemHeight; + int separatorWidth; + bool hideWhenEmpty; + bool hasSeparator; + bool dropConfirmed; + + enum ClipboardOperation { + None = 0, + Cut = 1, + Copy = 2 + }; + static int clipboardOperation; + static MenuBarEditorItem * clipboardItem; +}; + +#endif //MENUBAREDITOR_H diff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp new file mode 100644 index 00000000..7aa004d7 --- /dev/null +++ b/kdevdesigner/designer/metadatabase.cpp @@ -0,0 +1,1692 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "metadatabase.h" +#include "widgetfactory.h" +#include "formwindow.h" +#include "parser.h" +#include "widgetdatabase.h" +#include "formfile.h" +#include "propertyobject.h" +#include "project.h" +#include "mainwindow.h" + +#include "kdevdesigner_part.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +class MetaDataBaseRecord +{ +public: + TQObject *object; + TQStringList changedProperties; + TQMap fakeProperties; + TQMap propertyComments; + int spacing, margin; + TQString resizeMode; + TQValueList connections; + TQValueList functionList; + TQValueList includes; + TQValueList variables; + TQStringList forwards, sigs; + TQWidgetList tabOrder; + MetaDataBase::MetaInfo metaInfo; + TQCursor cursor; + TQMap pixmapArguments; + TQMap pixmapKeys; + TQMap columnFields; + TQValueList breakPoints; + TQMap breakPointConditions; + TQString exportMacro; +}; + +static TQPtrDict *db = 0; +static TQPtrList *cWidgets = 0; +static bool doUpdate = TRUE; +static TQStringList langList; +static TQStringList editorLangList; +static TQPluginManager *languageInterfaceManager = 0; + +/*! + \class MetaDataBase metadatabase.h + \brief Database which stores meta data of widgets + + The MetaDataBase stores meta information of widgets, which are not + stored directly in widgets (properties). This is e.g. the + information which properties have been modified. +*/ + +MetaDataBase::MetaDataBase() +{ +} + +inline void setupDataBase() +{ + if ( !db || !cWidgets ) { + db = new TQPtrDict( 1481 ); + db->setAutoDelete( TRUE ); + cWidgets = new TQPtrList; + cWidgets->setAutoDelete( TRUE ); + } +} + +void MetaDataBase::clearDataBase() +{ + delete db; + db = 0; + delete cWidgets; + cWidgets = 0; +} + +void MetaDataBase::addEntry( TQObject *o ) +{ + if ( !o ) + return; + setupDataBase(); + if ( db->find( o ) ) + return; + MetaDataBaseRecord *r = new MetaDataBaseRecord; + r->object = o; + r->spacing = r->margin = -1; + db->insert( (void*)o, r ); + + WidgetFactory::initChangedProperties( o ); +} + +void MetaDataBase::removeEntry( TQObject *o ) +{ + setupDataBase(); + db->remove( o ); +} + +void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bool changed ) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) { + ( (PropertyObject*)o )->mdPropertyChanged( property, changed ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + if ( changed ) { + if ( r->changedProperties.findIndex( property ) == -1 ) + r->changedProperties.append( property ); + } else { + if ( r->changedProperties.findIndex( property ) != -1 ) + r->changedProperties.remove( property ); + } + + if ( doUpdate && + ( property == "hAlign" || property == "vAlign" || property == "wordwrap" ) ) { + doUpdate = FALSE; + setPropertyChanged( o, "alignment", changed || + isPropertyChanged( o, "hAlign" ) || + isPropertyChanged( o, "vAlign" ) || + isPropertyChanged( o, "wordwrap" ) ); + doUpdate = TRUE; + } + + if ( doUpdate && property == "alignment" ) { + doUpdate = FALSE; + setPropertyChanged( o, "hAlign", changed ); + setPropertyChanged( o, "vAlign", changed ); + setPropertyChanged( o, "wordwrap", changed ); + doUpdate = TRUE; + } +} + +bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property ) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) + return ( (PropertyObject*)o )->mdIsPropertyChanged( property ); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + return r->changedProperties.findIndex( property ) != -1; +} + +TQStringList MetaDataBase::changedProperties( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQStringList(); + } + + TQStringList lst( r->changedProperties ); + return lst; +} + +void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, const TQString &comment ) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) { + ( (PropertyObject*)o )->mdSetPropertyComment( property, comment ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->propertyComments.insert( property, comment ); +} + +TQString MetaDataBase::propertyComment( TQObject *o, const TQString &property ) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) + return ( (PropertyObject*)o )->mdPropertyComment( property ); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + + return *r->propertyComments.find( property ); +} + +void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) { + ( (PropertyObject*)o )->mdSetFakeProperty( property, value ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + r->fakeProperties[property] = value; +} + +TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) + return ( (PropertyObject*)o )->mdFakeProperty( property ); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQVariant(); + } + TQMap::Iterator it = r->fakeProperties.find( property ); + if ( it != r->fakeProperties.end() ) + return r->fakeProperties[property]; + return WidgetFactory::defaultValue( o, property ); + +} + +TQMap* MetaDataBase::fakeProperties( TQObject* o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return 0; + } + return &r->fakeProperties; +} + +void MetaDataBase::setSpacing( TQObject *o, int spacing ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->spacing = spacing; + TQLayout * layout = 0; + WidgetFactory::layoutType( (TQWidget*)o, layout ); + if ( layout ) { + int spadef = 6; + if ( MainWindow::self->formWindow() ) + spadef = MainWindow::self->formWindow()->layoutDefaultSpacing(); + if ( spacing == -1 ) + layout->setSpacing( spadef ); + else + layout->setSpacing( spacing ); + } +} + +int MetaDataBase::spacing( TQObject *o ) +{ + if ( !o ) + return -1; + setupDataBase(); + if ( ::tqqt_cast(o) ) + o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return -1; + } + + return r->spacing; +} + +void MetaDataBase::setMargin( TQObject *o, int margin ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->margin = margin; + TQLayout * layout = 0; + WidgetFactory::layoutType( (TQWidget*)o, layout ); + + bool isInnerLayout = TRUE; + + TQWidget *widget = (TQWidget*)o; + if ( widget && !::tqqt_cast(widget) && + ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || + widget && widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) ) ) + isInnerLayout = FALSE; + + + if ( layout ) { + int mardef = 11; + if ( MainWindow::self->formWindow() ) + mardef = MainWindow::self->formWindow()->layoutDefaultMargin(); + if ( margin == -1 ) { + if ( isInnerLayout ) + layout->setMargin( 1 ); + else + layout->setMargin( TQMAX( 1, mardef ) ); + } + else + layout->setMargin( TQMAX( 1, margin ) ); + } +} + +int MetaDataBase::margin( TQObject *o ) +{ + if ( !o ) + return -1; + setupDataBase(); + if ( ::tqqt_cast(o) ) + o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return -1; + } + return r->margin; +} + +void MetaDataBase::setResizeMode( TQObject *o, const TQString &mode ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->resizeMode = mode; +} + +TQString MetaDataBase::resizeMode( TQObject *o ) +{ + if ( !o ) + return TQString(); + setupDataBase(); + if ( ::tqqt_cast(o) ) + o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + return r->resizeMode; +} + +void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot, bool addCode ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + if ( !(sender && receiver) ) + return; + Connection conn; + conn.sender = sender; + conn.signal = signal; + conn.receiver = receiver; + conn.slot = slot; + r->connections.append( conn ); + if ( addCode ) { + TQString rec = receiver->name(); + if ( ::tqqt_cast(o) && TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) + rec = "this"; + TQString sen = sender->name(); + if ( ::tqqt_cast(o) && TQT_BASE_OBJECT(sender) ==( (FormWindow*)o )->mainContainer() ) + sen = "this"; + FormFile *ff = 0; + if ( ::tqqt_cast(o) ) + ff = (FormFile*)o; + else if ( ::tqqt_cast(o) ) + ff = ( (FormWindow*)o )->formFile(); + ff->addConnection( sen, signal, rec, slot ); + } +} + +void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + if ( !(sender && receiver) ) + return; + for ( TQValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { + Connection conn = *it; + if ( TQT_BASE_OBJECT(conn.sender) ==sender && + conn.signal == signal && + TQT_BASE_OBJECT(conn.receiver) ==receiver && + conn.slot == slot ) { + r->connections.remove( it ); + break; + } + } + if ( ::tqqt_cast(o) ) { + TQString rec = receiver->name(); + if ( TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) + rec = "this"; + ( (FormWindow*)o )->formFile()->removeConnection( sender->name(), signal, rec, slot ); + } +} + +void MetaDataBase::setupConnections( TQObject *o, const TQValueList &conns ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + if ( !::tqqt_cast(o) ) + return; + + FormFile *formfile = (FormFile*)o; + + r->connections.clear(); + + for ( TQValueList::ConstIterator cit = conns.begin(); + cit != conns.end(); ++cit ) { + // #### get the correct sender object out of Bla.Blub.sender + TQString senderName = (*cit).sender; + if ( senderName.find( '.' ) != -1 ) + senderName = senderName.mid( senderName.findRev( '.' ) + 1 ); + TQObject *sender = 0; + if ( formfile->formWindow() ) + sender = formfile->formWindow()->child( senderName ); + if ( !sender && formfile->isFake() ) + sender = formfile->project()->objectForFakeFormFile( formfile ); + if ( !sender && senderName == "this" ) + sender = formfile->formWindow() ? + TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : + TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )); + if ( !sender ) + continue; + MetaDataBase::addConnection( formfile->formWindow() ? + (TQObject*)formfile->formWindow() : + (TQObject*)formfile, + sender, + (*cit).signal.latin1(), + formfile->formWindow() ? + TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : + TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )), + (*cit).slot.latin1(), + FALSE ); + } +} + +bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + for ( TQValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { + Connection conn = *it; + if ( TQT_BASE_OBJECT(conn.sender) ==sender && + conn.signal == signal && + TQT_BASE_OBJECT(conn.receiver) ==receiver && + conn.slot == slot ) + return TRUE; + } + return FALSE; +} + + +TQValueList MetaDataBase::connections( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + return r->connections; +} + +TQValueList MetaDataBase::connections( TQObject *o, TQObject *sender, + TQObject *receiver ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + TQValueList::Iterator it = r->connections.begin(); + TQValueList ret; + TQValueList::Iterator conn; + while ( ( conn = it ) != r->connections.end() ) { + ++it; + if ( TQT_BASE_OBJECT((*conn).sender) ==sender && + TQT_BASE_OBJECT((*conn).receiver) ==receiver ) + ret << *conn; + } + + return ret; +} + +TQValueList MetaDataBase::connections( TQObject *o, TQObject *object ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + TQValueList::Iterator it = r->connections.begin(); + TQValueList ret; + TQValueList::Iterator conn; + while ( ( conn = it ) != r->connections.end() ) { + ++it; + if ( TQT_BASE_OBJECT((*conn).sender) ==object || + TQT_BASE_OBJECT((*conn).receiver) ==object ) + ret << *conn; + } + return ret; +} + +void MetaDataBase::doConnections( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + TQObject *sender = 0, *receiver = 0; + TQObjectList *l = 0; + TQValueList::Iterator it = r->connections.begin(); + for ( ; it != r->connections.end(); ++it ) { + Connection conn = *it; + if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) { + sender = o; + } else { + l = o->queryList( 0, conn.sender->name(), FALSE ); + if ( !l || !l->first() ) { + delete l; + continue; + } + sender = l->first(); + delete l; + } + if ( qstrcmp( conn.receiver->name(), o->name() ) == 0 ) { + receiver = o; + } else { + l = o->queryList( 0, conn.receiver->name(), FALSE ); + if ( !l || !l->first() ) { + delete l; + continue; + } + receiver = l->first(); + delete l; + } + TQString s = "2""%1"; + s = s.arg( conn.signal.data() ); + TQString s2 = "1""%1"; + s2 = s2.arg( conn.slot.data() ); + + TQStrList signalList = sender->metaObject()->signalNames( TRUE ); + TQStrList slotList = receiver->metaObject()->slotNames( TRUE ); + + // avoid warnings + if ( signalList.find( conn.signal ) == -1 || + slotList.find( conn.slot ) == -1 ) + continue; + + TQObject::connect( sender, s, receiver, s2 ); + } +} + +bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + if ( !onlyCustom ) { + TQStrList slotList = o->metaObject()->slotNames( TRUE ); + if ( slotList.find( slot ) != -1 ) + return TRUE; + + if ( ::tqqt_cast(o) ) { + o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); + slotList = o->metaObject()->slotNames( TRUE ); + if ( slotList.find( slot ) != -1 ) + return TRUE; + } + + //if ( ::tqqt_cast(o) ) { + if ( o->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); + for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { + TQCString s = (*it).function; + if ( !s.data() ) + continue; + if ( s == slot ) + return TRUE; + } + } + } + + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + Function f = *it; + if ( normalizeFunction( f.function ) == normalizeFunction( slot ) && f.type == "slot" ) + return TRUE; + } + + return FALSE; +} + +bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + TQValueList conns = connections( o ); + for ( TQValueList::Iterator it = conns.begin(); it != conns.end(); ++it ) { + if ( (*it).slot == slot ) + return TRUE; + } + return FALSE; +} + + +void MetaDataBase::addFunction( TQObject *o, const TQCString &function, const TQString &specifier, + const TQString &access, const TQString &type, const TQString &language, + const TQString &returnType ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + Function f; + f.function = function; + f.specifier = specifier; + f.access = access; + f.type = type; + f.language = language; + f.returnType = returnType; + TQValueList::Iterator it = r->functionList.find( f ); + if ( it != r->functionList.end() ) + r->functionList.remove( it ); + r->functionList.append( f ); + ( (FormWindow*)o )->formFile()->addFunctionCode( f ); +} + +void MetaDataBase::setFunctionList( TQObject *o, const TQValueList &functionList ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + r->functionList = functionList; +} + +void MetaDataBase::removeFunction( TQObject *o, const TQCString &function, const TQString &specifier, + const TQString &access, const TQString &type, const TQString &language, + const TQString &returnType ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + if ( MetaDataBase::normalizeFunction( (*it).function ) == + MetaDataBase::normalizeFunction( function ) && + (*it).specifier == specifier && + (*it).access == access && + (*it).type == type && + ( language.isEmpty() || (*it).language == language ) && + ( returnType.isEmpty() || (*it).returnType == returnType ) ) { + ( (FormWindow*)o )->formFile()->removeFunctionCode( *it ); + r->functionList.remove( it ); + break; + } + } +} + +void MetaDataBase::removeFunction( TQObject *o, const TQString &function ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + if ( normalizeFunction( (*it).function ) == normalizeFunction( function ) ) { + ( (FormWindow*)o )->formFile()->removeFunctionCode( *it ); + r->functionList.remove( it ); + break; + } + } +} + +TQValueList MetaDataBase::functionList( TQObject *o, bool onlyFunctions ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + if ( !onlyFunctions ) + return r->functionList; + TQValueList fList; + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + if ( (*it).type == "function" ) + fList.append( *it ); + } + return fList; +} + +TQValueList MetaDataBase::slotList( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + TQValueList slotList; + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + if ( (*it).type == "slot" ) + slotList.append( *it ); + } + return slotList; +} + +void MetaDataBase::changeFunction( TQObject *o, const TQString &function, const TQString &newName, + const TQString &returnType ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + Function f = *it; + if ( normalizeFunction( f.function ) == normalizeFunction( function ) ) { + (*it).function = newName; + if ( !returnType.isNull() ) + (*it).returnType = returnType; + return; + } + } +} + +void MetaDataBase::changeFunctionAttributes( TQObject *o, const TQString &oldName, const TQString &newName, + const TQString &specifier, const TQString &access, + const TQString &type, const TQString &language, + const TQString &returnType ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + Function f = *it; + if ( normalizeFunction( f.function ) == normalizeFunction( oldName ) ) { + (*it).function = newName; + (*it).specifier = specifier; + (*it).access = access; + (*it).type = type; + (*it).language = language; + (*it).returnType = returnType; + return; + } + } +} + +bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onlyCustom ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + if ( !onlyCustom ) { + TQStrList functionList = o->metaObject()->slotNames( TRUE ); + if ( functionList.find( function ) != -1 ) + return TRUE; + + if ( ::tqqt_cast(o) ) { + o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); + functionList = o->metaObject()->slotNames( TRUE ); + if ( functionList.find( function ) != -1 ) + return TRUE; + } + + //if ( ::tqqt_cast(o) ) { + if ( o->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); + for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { + TQCString s = (*it).function; + if ( !s.data() ) + continue; + if ( s == function ) + return TRUE; + } + } + } + + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + Function f = *it; + if ( normalizeFunction( f.function ) == normalizeFunction( function ) ) + return TRUE; + } + + return FALSE; +} + +TQString MetaDataBase::languageOfFunction( TQObject *o, const TQCString &function ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + + TQString fu = normalizeFunction( function ); + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + if ( fu == normalizeFunction( (*it).function ) ) + return (*it).language; + } + return TQString(); +} + +bool MetaDataBase::addCustomWidget( CustomWidget *wid ) +{ + setupDataBase(); + + for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { + if ( *wid == *w ) { + for ( TQValueList::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) { + if ( !w->hasSignal( *it ) ) + w->lstSignals.append( *it ); + } + for ( TQValueList::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) { + if ( !w->hasSlot( MetaDataBase::normalizeFunction( (*it2).function ).latin1() ) ) + w->lstSlots.append( *it2 ); + } + for ( TQValueList::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) { + if ( !w->hasProperty( (*it3).property ) ) + w->lstProperties.append( *it3 ); + } + delete wid; + return FALSE; + } + } + + + WidgetDatabaseRecord *r = new WidgetDatabaseRecord; + r->name = wid->className; + r->group = WidgetDatabase::widgetGroup( "Custom" ); + r->toolTip = wid->className; + r->icon = new TQIconSet( *wid->pixmap, *wid->pixmap ); + r->isContainer = wid->isContainer; + wid->id = WidgetDatabase::addCustomWidget( r ); + cWidgets->append( wid ); + return TRUE; +} + +void MetaDataBase::removeCustomWidget( CustomWidget *w ) +{ + cWidgets->removeRef( w ); +} + +TQPtrList *MetaDataBase::customWidgets() +{ + setupDataBase(); + return cWidgets; +} + +MetaDataBase::CustomWidget *MetaDataBase::customWidget( int id ) +{ + for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { + if ( id == w->id ) + return w; + } + return 0; +} + +bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid ) +{ + for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { + if ( w == wid ) + continue; + if ( wid->className == w->className ) + return TRUE; + } + return FALSE; +} + +bool MetaDataBase::hasCustomWidget( const TQString &className ) +{ + for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { + if ( w->className == className ) + return TRUE; + } + return FALSE; +} + +void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*) w ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + w, w->name(), w->className() ); + return; + } + + r->tabOrder = order; +} + +TQWidgetList MetaDataBase::tabOrder( TQWidget *w ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*) w ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + w, w->name(), w->className() ); + return TQWidgetList(); + } + + return r->tabOrder; +} + +void MetaDataBase::setIncludes( TQObject *o, const TQValueList &incs ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->includes = incs; +} + +TQValueList MetaDataBase::includes( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + + return r->includes; +} + +void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->forwards = fwds; +} + +TQStringList MetaDataBase::forwards( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQStringList(); + } + + return r->forwards; +} + +void MetaDataBase::setVariables( TQObject *o, const TQValueList &vars ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->variables = vars; +} + +void MetaDataBase::addVariable( TQObject *o, const TQString &name, const TQString &access ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + Variable v; + v.varName = name; + v.varAccess = access; + r->variables << v; +} + +void MetaDataBase::removeVariable( TQObject *o, const TQString &name ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + TQValueList::Iterator it = r->variables.begin(); + for ( ; it != r->variables.end(); ++it ) { + if ( (*it).varName == name ) { + r->variables.remove( it ); + break; + } + } +} + +TQValueList MetaDataBase::variables( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + + return r->variables; +} + +bool MetaDataBase::hasVariable( TQObject *o, const TQString &name ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + TQValueList::Iterator it = r->variables.begin(); + for ( ; it != r->variables.end(); ++it ) { + if ( extractVariableName( name ) == extractVariableName( (*it).varName ) ) + return TRUE; + } + return FALSE; +} + +TQString MetaDataBase::extractVariableName( const TQString &name ) +{ + TQString n = name.right( name.length() - name.findRev( ' ' ) - 1 ); + if ( n[ 0 ] == '*' || n[ 0 ] == '&' ) + n[ 0 ] = ' '; + if ( n[ (int)n.length() - 1 ] == ';' ) + n[ (int)n.length() - 1 ] = ' '; + return n.simplifyWhiteSpace(); +} + +void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->sigs.clear(); + + for ( TQStringList::ConstIterator it = sigs.begin(); it != sigs.end(); ++it ) { + TQString s = (*it).simplifyWhiteSpace(); + bool hasSemicolon = s.endsWith( ";" ); + if ( hasSemicolon ) + s = s.left( s.length() - 1 ); + int p = s.find( '(' ); + if ( p < 0 ) + p = s.length(); + int sp = s.find( ' ' ); + if ( sp >= 0 && sp < p ) { + s = s.mid( sp+1 ); + p -= sp + 1; + } + if ( p == (int) s.length() ) + s += "()"; + if ( hasSemicolon ) + s += ";"; + r->sigs << s; + } +} + +TQStringList MetaDataBase::signalList( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQStringList(); + } + + return r->sigs; +} + +void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->metaInfo = mi; +} + +MetaDataBase::MetaInfo MetaDataBase::metaInfo( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return MetaInfo(); + } + + return r->metaInfo; +} + + + + +MetaDataBase::CustomWidget::CustomWidget() +{ + className = "MyCustomWidget"; + includeFile = "mywidget.h"; + includePolicy = Local; + sizeHint = TQSize( -1, -1 ); + pixmap = new TQPixmap( BarIcon( "designer_customwidget.png", KDevDesignerPartFactory::instance() ) ); + id = -1; + sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ); + isContainer = FALSE; +} + +MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w ) +{ + className = w.className; + includeFile = w.includeFile; + includePolicy = w.includePolicy; + sizeHint = w.sizeHint; + if ( w.pixmap ) + pixmap = new TQPixmap( *w.pixmap ); + else + pixmap = 0; + id = w.id; + isContainer = w.isContainer; +} + +void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c ) +{ + setupDataBase(); + if ( w->isA( "PropertyObject" ) ) { + ( (PropertyObject*)w )->mdSetCursor( c ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)w ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + w, w->name(), w->className() ); + return; + } + + r->cursor = c; +} + +TQCursor MetaDataBase::cursor( TQWidget *w ) +{ + setupDataBase(); + if ( w->isA( "PropertyObject" ) ) + return ( (PropertyObject*)w )->mdCursor(); + MetaDataBaseRecord *r = db->find( (void*)w ); + if ( !r ) { + w->unsetCursor(); + return w->cursor(); + } + + return r->cursor; +} + +bool MetaDataBase::CustomWidget::operator==( const CustomWidget &w ) const +{ + return className == w.className; +} + +MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomWidget &w ) +{ + delete pixmap; + className = w.className; + includeFile = w.includeFile; + includePolicy = w.includePolicy; + sizeHint = w.sizeHint; + if ( w.pixmap ) + pixmap = new TQPixmap( *w.pixmap ); + else + pixmap = 0; + lstSignals = w.lstSignals; + lstSlots = w.lstSlots; + lstProperties = w.lstProperties; + id = w.id; + isContainer = w.isContainer; + return *this; +} + +bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const +{ + TQStrList sigList = TQWidget::staticMetaObject()->signalNames( TRUE ); + if ( sigList.find( signal ) != -1 ) + return TRUE; + for ( TQValueList::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) { + if ( normalizeFunction( *it ) == normalizeFunction( signal ) ) + return TRUE; + } + return FALSE; +} + +bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const +{ + TQStrList slotList = TQWidget::staticMetaObject()->slotNames( TRUE ); + if ( slotList.find( normalizeFunction( slot ) ) != -1 ) + return TRUE; + + for ( TQValueList::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) { + if ( normalizeFunction( (*it).function ) == normalizeFunction( slot ) ) + return TRUE; + } + return FALSE; +} + +bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const +{ + TQStrList propList = TQWidget::staticMetaObject()->propertyNames( TRUE ); + if ( propList.find( prop ) != -1 ) + return TRUE; + + for ( TQValueList::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) { + if ( (*it).property == prop ) + return TRUE; + } + return FALSE; +} + +void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &arg ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->pixmapArguments.remove( pixmap ); + r->pixmapArguments.insert( pixmap, arg ); +} + +TQString MetaDataBase::pixmapArgument( TQObject *o, int pixmap ) +{ + if ( !o ) + return TQString(); + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + + return *r->pixmapArguments.find( pixmap ); +} + +void MetaDataBase::clearPixmapArguments( TQObject *o ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->pixmapArguments.clear(); +} + + +void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg ) +{ + if ( !o ) + return; + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) { + ( (PropertyObject*)o )->mdSetPixmapKey( pixmap, arg ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->pixmapKeys.remove( pixmap ); + r->pixmapKeys.insert( pixmap, arg ); +} + +TQString MetaDataBase::pixmapKey( TQObject *o, int pixmap ) +{ + if ( !o ) + return TQString(); + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) + return ( (PropertyObject*)o )->mdPixmapKey( pixmap ); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + + TQString s = *r->pixmapKeys.find( pixmap ); + if ( !s.isNull() ) + return s; + if ( !o->isWidgetType() ) + return s; + TQWidget *w = (TQWidget*)o; + if ( w->icon() ) + return *r->pixmapKeys.find( w->icon()->serialNumber() ); + return s; +} + +void MetaDataBase::clearPixmapKeys( TQObject *o ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->pixmapKeys.clear(); +} + + + +void MetaDataBase::setColumnFields( TQObject *o, const TQMap &columnFields ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->columnFields = columnFields; +} + +TQMap MetaDataBase::columnFields( TQObject *o ) +{ + if ( !o ) + return TQMap(); + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQMap(); + } + + return r->columnFields; +} + +void MetaDataBase::setEditor( const TQStringList &langs ) +{ + editorLangList = langs; +} + +bool MetaDataBase::hasEditor( const TQString &lang ) +{ + return editorLangList.find( lang ) != editorLangList.end(); +} + +void MetaDataBase::setupInterfaceManagers( const TQString &plugDir ) +{ + if ( !languageInterfaceManager ) { + languageInterfaceManager = + new TQPluginManager( IID_Language, + TQApplication::libraryPaths(), +// kapp->dirs()->resourceDirs("qtplugins"), + plugDir ); + + langList = languageInterfaceManager->featureList(); + langList.remove( "C++" ); + langList << "C++"; + } +} + +TQStringList MetaDataBase::languages() +{ + return langList; +} + +TQString MetaDataBase::normalizeFunction( const TQString &f ) +{ + return Parser::cleanArgs( f ); +} + +LanguageInterface *MetaDataBase::languageInterface( const TQString &lang ) +{ + LanguageInterface* iface = 0; + languageInterfaceManager->queryInterface( lang, &iface ); + return iface; +} + +void MetaDataBase::clear( TQObject *o ) +{ + if ( !o ) + return; + setupDataBase(); + db->remove( (void*)o ); + for ( TQPtrDictIterator it( *( (FormWindow*)o )->widgets() ); it.current(); ++it ) + db->remove( (void*)it.current() ); +} + +void MetaDataBase::setBreakPoints( TQObject *o, const TQValueList &l ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->breakPoints = l; + + TQMap::Iterator it = r->breakPointConditions.begin(); + while ( it != r->breakPointConditions.end() ) { + int line = it.key(); + ++it; + if ( r->breakPoints.find( line ) == r->breakPoints.end() ) + r->breakPointConditions.remove( r->breakPointConditions.find( line ) ); + } +} + +TQValueList MetaDataBase::breakPoints( TQObject *o ) +{ + if ( !o ) + return TQValueList(); + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + + return r->breakPoints; +} + +void MetaDataBase::setBreakPointCondition( TQObject *o, int line, const TQString &condition ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + r->breakPointConditions.replace( line, condition ); +} + +TQString MetaDataBase::breakPointCondition( TQObject *o, int line ) +{ + if ( !o ) + return TQString(); + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + TQMap::Iterator it = r->breakPointConditions.find( line ); + if ( it == r->breakPointConditions.end() ) + return TQString(); + return *it; +} + +void MetaDataBase::setExportMacro( TQObject *o, const TQString ¯o ) +{ + if ( !o ) + return; + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) { + ( (PropertyObject*)o )->mdSetExportMacro( macro ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->exportMacro = macro; +} + +TQString MetaDataBase::exportMacro( TQObject *o ) +{ + if ( !o ) + return ""; + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) + return ( (PropertyObject*)o )->mdExportMacro(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return ""; + } + + return r->exportMacro; +} + +bool MetaDataBase::hasObject( TQObject *o ) +{ + return !!db->find( o ); +} diff --git a/kdevdesigner/designer/metadatabase.h b/kdevdesigner/designer/metadatabase.h new file mode 100644 index 00000000..352e10d7 --- /dev/null +++ b/kdevdesigner/designer/metadatabase.h @@ -0,0 +1,269 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef METADATABASE_H +#define METADATABASE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pixmapchooser.h" +#include "../interfaces/languageinterface.h" + +class TQObject; +class TQPixmap; +struct LanguageInterface; + +class MetaDataBase +{ +public: + struct Connection + { + TQObject *sender, *receiver; + TQCString signal, slot; + bool operator==( const Connection &c ) const { + return sender == c.sender && receiver == c.receiver && + signal == c.signal && slot == c.slot ; + } + }; + + struct Function + { + TQString returnType; + TQCString function; + TQString specifier; + TQString access; + TQString type; + TQString language; + bool operator==( const Function &f ) const { + return ( returnType == f.returnType && + function == f.function && + specifier == f.specifier && + access == f.access && + type == f.type && + language == f.language + ); + } + }; + + struct Property + { + TQCString property; + TQString type; + bool operator==( const Property &p ) const { + return property == p.property && + type == p.type; + } + }; + + struct CustomWidget + { + CustomWidget(); + CustomWidget( const CustomWidget &w ); + ~CustomWidget() { delete pixmap; } // inlined to work around 2.7.2.3 bug + bool operator==( const CustomWidget &w ) const; + CustomWidget &operator=( const CustomWidget &w ); + + bool hasSignal( const TQCString &signal ) const; + bool hasSlot( const TQCString &slot ) const; + bool hasProperty( const TQCString &prop ) const; + + enum IncludePolicy { Global, Local }; + TQString className; + TQString includeFile; + IncludePolicy includePolicy; + TQSize sizeHint; + TQSizePolicy sizePolicy; + TQPixmap *pixmap; + TQValueList lstSignals; + TQValueList lstSlots; + TQValueList lstProperties; + int id; + bool isContainer; + }; + + struct Include + { + Include() : header(), location(), implDecl( "in implementation" ) {} + TQString header; + TQString location; + bool operator==( const Include &i ) const { + return header == i.header && location == i.location; + } + TQString implDecl; + }; + + struct Variable + { + TQString varName; + TQString varAccess; + bool operator==( const Variable &v ) const { + return varName == v.varName && + varAccess == v.varAccess; + } + }; + + struct MetaInfo + { + MetaInfo() : classNameChanged( FALSE ) { } + TQString className; + bool classNameChanged; + TQString comment; + TQString author; + }; + + MetaDataBase(); + static void clearDataBase(); + + static void addEntry( TQObject *o ); + static void removeEntry( TQObject *o ); + static void setPropertyChanged( TQObject *o, const TQString &property, bool changed ); + static bool isPropertyChanged( TQObject *o, const TQString &property ); + static void setPropertyComment( TQObject *o, const TQString &property, const TQString &comment ); + static TQString propertyComment( TQObject *o, const TQString &property ); + static TQStringList changedProperties( TQObject *o ); + + static void setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ); + static TQVariant fakeProperty( TQObject * o, const TQString &property ); + static TQMap* fakeProperties( TQObject* o ); + + static void setSpacing( TQObject *o, int spacing ); + static int spacing( TQObject *o ); + static void setMargin( TQObject *o, int margin ); + static int margin( TQObject *o ); + + static void setResizeMode( TQObject *o, const TQString &mode ); + static TQString resizeMode( TQObject *o ); + + static void addConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot, bool addCode = TRUE ); + static void removeConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ); + static bool hasConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ); + static void setupConnections( TQObject *o, const TQValueList &conns ); + static TQValueList connections( TQObject *o ); + static TQValueList connections( TQObject *o, TQObject *sender, TQObject *receiver ); + static TQValueList connections( TQObject *o, TQObject *object ); + static void doConnections( TQObject *o ); + + static void addFunction( TQObject *o, const TQCString &function, const TQString &specifier, + const TQString &access, const TQString &type, const TQString &language, + const TQString &returnType ); + static void removeFunction( TQObject *o, const TQCString &function, const TQString &specifier, + const TQString &access, const TQString &type, const TQString &language, + const TQString &returnType ); + static void removeFunction( TQObject *o, const TQString &function ); + static TQValueList functionList( TQObject *o, bool onlyFunctions = FALSE ); + static TQValueList slotList( TQObject *o ); + static bool isSlotUsed( TQObject *o, const TQCString &slot ); + static bool hasFunction( TQObject *o, const TQCString &function, bool onlyCustom = FALSE ); + static bool hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom = FALSE ); + static void changeFunction( TQObject *o, const TQString &function, const TQString &newName, + const TQString &returnType ); + static void changeFunctionAttributes( TQObject *o, const TQString &oldName, const TQString &newName, + const TQString &specifier, const TQString &access, + const TQString &type, const TQString &language, + const TQString &returnType ); + static TQString languageOfFunction( TQObject *o, const TQCString &function ); + static void setFunctionList( TQObject *o, const TQValueList &functionList ); + + + static bool addCustomWidget( CustomWidget *w ); + static void removeCustomWidget( CustomWidget *w ); + static TQPtrList *customWidgets(); + static CustomWidget *customWidget( int id ); + static bool isWidgetNameUsed( CustomWidget *w ); + static bool hasCustomWidget( const TQString &className ); + + static void setTabOrder( TQWidget *w, const TQWidgetList &order ); + static TQWidgetList tabOrder( TQWidget *w ); + + static void setIncludes( TQObject *o, const TQValueList &incs ); + static TQValueList includes( TQObject *o ); + + static void setForwards( TQObject *o, const TQStringList &fwds ); + static TQStringList forwards( TQObject *o ); + + static void setVariables( TQObject *o, const TQValueList &vars ); + static void addVariable( TQObject *o, const TQString &name, const TQString &access ); + static void removeVariable( TQObject *o, const TQString &name ); + static TQValueList variables( TQObject *o ); + static bool hasVariable( TQObject *o, const TQString &name ); + static TQString extractVariableName( const TQString &name ); + + static void setSignalList( TQObject *o, const TQStringList &sigs ); + static TQStringList signalList( TQObject *o ); + + static void setMetaInfo( TQObject *o, MetaInfo mi ); + static MetaInfo metaInfo( TQObject *o ); + + static void setCursor( TQWidget *w, const TQCursor &c ); + static TQCursor cursor( TQWidget *w ); + + static void setPixmapArgument( TQObject *o, int pixmap, const TQString &arg ); + static TQString pixmapArgument( TQObject *o, int pixmap ); + static void clearPixmapArguments( TQObject *o ); + + static void setPixmapKey( TQObject *o, int pixmap, const TQString &arg ); + static TQString pixmapKey( TQObject *o, int pixmap ); + static void clearPixmapKeys( TQObject *o ); + + static void setColumnFields( TQObject *o, const TQMap &columnFields ); + static TQMap columnFields( TQObject *o ); + + static void setEditor( const TQStringList &langs ); + static bool hasEditor( const TQString &lang ); + + static void setupInterfaceManagers( const TQString &plugDir ); + static TQStringList languages(); + + static LanguageInterface *languageInterface( const TQString &lang ); + + static TQString normalizeFunction( const TQString &f ); + + static void clear( TQObject *o ); + + static void setBreakPoints( TQObject *o, const TQValueList &l ); + static void setBreakPointCondition( TQObject *o, int line, const TQString &condition ); + static TQValueList breakPoints( TQObject *o ); + static TQString breakPointCondition( TQObject *o, int line ); + + static void setExportMacro( TQObject *o, const TQString ¯o ); + static TQString exportMacro( TQObject *o ); + + static bool hasObject( TQObject *o ); + +}; + +#endif diff --git a/kdevdesigner/designer/multilineeditor.ui b/kdevdesigner/designer/multilineeditor.ui new file mode 100644 index 00000000..f0ff2129 --- /dev/null +++ b/kdevdesigner/designer/multilineeditor.ui @@ -0,0 +1,181 @@ + +MultiLineEditorBase +********************************************************************* +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + MultiLineEditorBase + + + + 0 + 0 + 598 + 307 + + + + Edit Text + + + <b>Multiline Edit</b><p>This is a simple richtext editor. To improve its usability it provides toolbar items for the most common html tags: by clicking on a toolbar item, the corresponding tag will be written to the editor, where you can insert your text. If you have already written some text and want to format it, hilight it and click on the desired button. To improve visualization this editor also supports a simple html-syntax-highlighting scheme. + + + + unnamed + + + 11 + + + 6 + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + OkButton + + + &OK + + + false + + + true + + + true + + + + + applyButton + + + &Apply + + + + + cancelButton + + + &Cancel + + + + + Spacer3 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + helpButton + + + &Help + + + + + + + + + + + menuBar + + + + + + + OkButton + clicked() + MultiLineEditorBase + okClicked() + + + applyButton + clicked() + MultiLineEditorBase + applyClicked() + + + cancelButton + clicked() + MultiLineEditorBase + cancelClicked() + + + + applyClicked() + okClicked() + cancelClicked() + + + diff --git a/kdevdesigner/designer/multilineeditorimpl.cpp b/kdevdesigner/designer/multilineeditorimpl.cpp new file mode 100644 index 00000000..ef06f77b --- /dev/null +++ b/kdevdesigner/designer/multilineeditorimpl.cpp @@ -0,0 +1,415 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "multilineeditorimpl.h" +#include "formwindow.h" +#include "command.h" +#include "mainwindow.h" +#include "richtextfontdialog.h" +#include "syntaxhighlighter_html.h" +#include "widgetfactory.h" + +#include +#include "kdevdesigner_part.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +ToolBarItem::ToolBarItem( TQWidget *parent, TQWidget *toolBar, + const TQString &label, const TQString &tagstr, + const TQIconSet &icon, const TQKeySequence &key ) + : TQAction( parent ) +{ + setIconSet( icon ); + setText( label ); + setAccel( key ); + addTo( toolBar ); + tag = tagstr; + connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( wasActivated() ) ); +} + +ToolBarItem::~ToolBarItem() +{ + +} + +void ToolBarItem::wasActivated() +{ + emit clicked( tag ); +} + +TextEdit::TextEdit( TQWidget *parent, const char *name ) + : TQTextEdit( parent, name ) +{ + setTextFormat( TQt::PlainText ); +} + +TQTextParagraph* TextEdit::paragraph() +{ + TQTextCursor *tc = new TQTextCursor( TQTextEdit::document() ); + return tc->paragraph(); +} + + +MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget, + FormWindow *fw, const TQString &text ) + : MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( FALSE ) +{ + callStatic = call_static; + + if ( callStatic ) + applyButton->hide(); + + textEdit = new TextEdit( centralWidget(), "textedit" ); + Layout4->insertWidget( 0, textEdit ); + + if ( richtextMode ) { + TQPopupMenu *stylesMenu = new TQPopupMenu( this ); + menuBar->insertItem( i18n( "&Styles" ), stylesMenu ); + + basicToolBar = new TQToolBar( i18n( "Basics" ), this, DockTop ); + + ToolBarItem *it = new ToolBarItem( this, basicToolBar, i18n( "Italic" ), + "i", BarIcon( "designer_textitalic.png", KDevDesignerPartFactory::instance() ), CTRL+Key_I ); + it->addTo( stylesMenu ); + connect( it, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *b = new ToolBarItem( this, basicToolBar, i18n( "Bold" ), + "b", BarIcon( "designer_textbold.png", KDevDesignerPartFactory::instance() ), CTRL+Key_B ); + b->addTo( stylesMenu ); + connect( b, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *ul = new ToolBarItem( this, basicToolBar, i18n( "Underline" ), + "u", BarIcon( "designer_textunderline.png" , KDevDesignerPartFactory::instance()), CTRL+Key_U ); + ul->addTo( stylesMenu ); + connect( ul, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *tt = new ToolBarItem( this, basicToolBar, i18n( "Typewriter" ), + "tt", BarIcon( "designer_textteletext.png", KDevDesignerPartFactory::instance() ) ); + tt->addTo( stylesMenu ); + connect( tt, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + basicToolBar->addSeparator(); + + TQPopupMenu *layoutMenu = new TQPopupMenu( this ); + menuBar->insertItem( i18n( "&Layout" ), layoutMenu ); + + TQAction *brAction = new TQAction( this ); + brAction->setIconSet( BarIcon( "designer_textlinebreak.png", KDevDesignerPartFactory::instance() ) ); + brAction->setText( i18n("Break" ) ); + brAction->addTo( basicToolBar ); + brAction->addTo( layoutMenu ); + connect( brAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( insertBR() ) ); + + ToolBarItem *p = new ToolBarItem( this, basicToolBar, i18n( "Paragraph" ), + "p", BarIcon( "designer_textparagraph.png", KDevDesignerPartFactory::instance() ) ); + p->addTo( layoutMenu ); + connect( p, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + layoutMenu->insertSeparator(); + basicToolBar->addSeparator(); + + ToolBarItem *al = new ToolBarItem( this, basicToolBar, i18n( "Align left" ), + "p align=\"left\"", BarIcon( "designer_textleft.png", KDevDesignerPartFactory::instance() ) ); + al->addTo( layoutMenu ); + connect( al, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *ac = new ToolBarItem( this, basicToolBar, i18n( "Align center" ), + "p align=\"center\"", BarIcon( "designer_textcenter.png", KDevDesignerPartFactory::instance() ) ); + ac->addTo( layoutMenu ); + connect( ac, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *ar = new ToolBarItem( this, basicToolBar, i18n( "Align right" ), + "p align=\"right\"", BarIcon( "designer_textright.png", KDevDesignerPartFactory::instance() ) ); + ar->addTo( layoutMenu ); + connect( ar, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *block = new ToolBarItem( this, basicToolBar, i18n( "Blockquote" ), + "blockquote", BarIcon( "designer_textjustify.png", KDevDesignerPartFactory::instance() ) ); + block->addTo( layoutMenu ); + connect( block, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + + TQPopupMenu *fontMenu = new TQPopupMenu( this ); + menuBar->insertItem( i18n( "&Font" ), fontMenu ); + + fontToolBar = new TQToolBar( "Fonts", this, DockTop ); + + TQAction *fontAction = new TQAction( this ); + fontAction->setIconSet( BarIcon( "designer_textfont.png", KDevDesignerPartFactory::instance() ) ); + fontAction->setText( i18n("Font" ) ); + fontAction->addTo( fontToolBar ); + fontAction->addTo( fontMenu ); + connect( fontAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( showFontDialog() ) ); + + + ToolBarItem *fp1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize +1" ), + "font size=\"+1\"", BarIcon( "designer_textlarger.png", KDevDesignerPartFactory::instance() ) ); + connect( fp1, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *fm1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize -1" ), + "font size=\"-1\"", BarIcon( "designer_textsmaller.png", KDevDesignerPartFactory::instance() ) ); + connect( fm1, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *h1 = new ToolBarItem( this, fontToolBar, i18n( "Headline 1" ), + "h1", BarIcon( "designer_texth1.png", KDevDesignerPartFactory::instance() ) ); + connect( h1, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *h2 = new ToolBarItem( this, fontToolBar, i18n( "Headline 2" ), + "h2", BarIcon( "designer_texth2.png", KDevDesignerPartFactory::instance() ) ); + connect( h2, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *h3 = new ToolBarItem( this, fontToolBar, i18n( "Headline 3" ), + "h3", BarIcon( "designer_texth3.png", KDevDesignerPartFactory::instance() ) ); + connect( h3, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + TQPopupMenu *optionsMenu = new TQPopupMenu( this ); + menuBar->insertItem( i18n( "O&ptions" ), optionsMenu ); + + optionsToolBar = new TQToolBar( "Options", this, DockTop ); + wrapAction = new TQAction( this ); + wrapAction->setToggleAction( TRUE ); + wrapAction->setIconSet( BarIcon( "designer_wordwrap.png", KDevDesignerPartFactory::instance() ) ); + wrapAction->setText( i18n( "Word Wrapping" ) ); + wrapAction->addTo( optionsToolBar ); + wrapAction->addTo( optionsMenu ); + connect( wrapAction, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( changeWrapMode( bool ) ) ); + + oldDoWrap = doWrap; + wrapAction->setOn( doWrap ); + + connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + textEdit->document()->setFormatter( new TQTextFormatterBreakInWords ); + textEdit->document()->setUseFormatCollection( FALSE ); + textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML ); + + if ( !callStatic && ::tqqt_cast(editWidget) ) { + mlined = (TQTextEdit*)editWidget; + mlined->setReadOnly( TRUE ); + + const TQMetaProperty *wordWrap = mlined->metaObject()->property( + mlined->metaObject()->findProperty( "wordWrap", TRUE ), TRUE ); + oldWrapMode = 0; + oldWrapString = "NoWrap"; + if ( wordWrap ) { + oldWrapMode = mlined->property( "wordWrap" ); + oldWrapString = TQString( wordWrap->valueToKey( oldWrapMode.toInt() ) ); + if ( oldWrapString != "NoWrap" ) + doWrap = TRUE; + } + textEdit->setAlignment( mlined->alignment() ); + textEdit->setWordWrap( mlined->wordWrap() ); + textEdit->setWrapColumnOrWidth( mlined->wrapColumnOrWidth() ); + textEdit->setWrapPolicy( mlined->wrapPolicy() ); + textEdit->setText( mlined->text() ); + if ( !mlined->text().isEmpty() ) + textEdit->selectAll(); + } else { + textEdit->setText( text ); + textEdit->selectAll(); + } + } else { + textEdit->setText( text ); + textEdit->selectAll(); + } + textEdit->setFocus(); +} + +int MultiLineEditor::exec() +{ + res = 1; + show(); + tqApp->enter_loop(); + return res; +} + +void MultiLineEditor::okClicked() +{ + applyClicked(); + close(); +} + +void MultiLineEditor::applyClicked() +{ + if ( !callStatic ) { + PopulateMultiLineEditCommand *cmd = new PopulateMultiLineEditCommand( i18n( "Set the Text of '%1'" ).arg( mlined->name() ), + formwindow, mlined, textEdit->text() ); + cmd->execute(); + formwindow->commandHistory()->addCommand( cmd ); + + if ( oldDoWrap != doWrap ) { + TQString pn( i18n( "Set 'wordWrap' of '%2'" ).arg( mlined->name() ) ); + SetPropertyCommand *propcmd; + if ( doWrap ) + propcmd = new SetPropertyCommand( pn, formwindow, + TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), + "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), + TQVariant( 1 ), "WidgetWidth", oldWrapString ); + else + propcmd = new SetPropertyCommand( pn, formwindow, + TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), + "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), + TQVariant( 0 ), "NoWrap", oldWrapString ); + + propcmd->execute(); + formwindow->commandHistory()->addCommand( propcmd, TRUE ); + } + textEdit->setFocus(); + } + else { + staticText = textEdit->text(); + } +} + +void MultiLineEditor::cancelClicked() +{ + res = 0; + close(); +} + +void MultiLineEditor::closeEvent( TQCloseEvent *e ) +{ + tqApp->exit_loop(); + MultiLineEditorBase::closeEvent( e ); +} + +void MultiLineEditor::insertTags( const TQString &tag ) +{ + int pfrom, pto, ifrom, ito; + TQString tagend( tag.simplifyWhiteSpace() ); + tagend.remove( tagend.find( ' ', 0 ), tagend.length() ); + if ( textEdit->hasSelectedText() ) { + textEdit->getSelection( &pfrom, &ifrom, &pto, &ito ); + TQString buf = textEdit->selectedText(); + buf = TQString( "<%1>%3" ).arg( tag ).arg( tagend ).arg( buf ); + textEdit->removeSelectedText(); + textEdit->insertAt( buf, pfrom, ifrom ); + textEdit->setCursorPosition( pto, ito + 2 + tag.length() ); + } + else { + int para, index; + textEdit->getCursorPosition( ¶, &index ); + textEdit->insert( TQString( "<%1>" ).arg( tag ).arg( tagend ) ); + index += 2 + tag.length(); + textEdit->setCursorPosition( para, index ); + } +} + +void MultiLineEditor::insertBR() +{ + textEdit->insert( "
    " ); +} + +void MultiLineEditor::showFontDialog() +{ + bool selText = FALSE; + int pfrom, pto, ifrom, ito; + if ( textEdit->hasSelectedText() ) { + textEdit->getSelection( &pfrom, &ifrom, &pto, &ito ); + selText = TRUE; + } + RichTextFontDialog *fd = new RichTextFontDialog( this ); + if ( fd->exec() == TQDialog::Accepted ) { + TQString size, font; + if ( fd->getSize() != "0" ) + size = "size=\"" + fd->getSize() + "\""; + TQString color; + if ( !fd->getColor().isEmpty() && fd->getColor() != "#000000" ) + color = "color=\"" + fd->getColor() + "\""; + if ( fd->getFont() != "default" ) + font = "face=\"" + fd->getFont() + "\""; + TQString tag( TQString( "font %1 %2 %3" ) + .arg( color ).arg( size ).arg( font ) ); + + if ( selText ) + textEdit->setSelection( pfrom, ifrom, pto, ito ); + insertTags( tag.simplifyWhiteSpace() ); + } + else if ( selText ) + textEdit->setSelection( pfrom, ifrom, pto, ito ); +} + +TQString MultiLineEditor::getStaticText() +{ + return staticText.stripWhiteSpace(); +} + +TQString MultiLineEditor::getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap ) +{ + MultiLineEditor medit( TRUE, richtextMode, parent, 0, 0, text ); + if ( richtextMode ) + medit.setUseWrapping( *useWrap ); + if ( medit.exec() == TQDialog::Accepted ) { + *useWrap = medit.useWrapping(); + return medit.getStaticText(); + } + return TQString(); +} + +void MultiLineEditor::changeWrapMode( bool b ) +{ + doWrap = b; + if ( doWrap && !callStatic ) { + if ( oldDoWrap ) + textEdit->setProperty( "wordWrap", oldWrapMode ); + else + textEdit->setWordWrap( TQTextEdit::WidgetWidth ); + } else { + textEdit->setWordWrap( TQTextEdit::NoWrap ); + } +} + +bool MultiLineEditor::useWrapping() const +{ + return doWrap; +} + +void MultiLineEditor::setUseWrapping( bool b ) +{ + doWrap = b; + wrapAction->setOn( doWrap ); +} diff --git a/kdevdesigner/designer/multilineeditorimpl.h b/kdevdesigner/designer/multilineeditorimpl.h new file mode 100644 index 00000000..34d47b3e --- /dev/null +++ b/kdevdesigner/designer/multilineeditorimpl.h @@ -0,0 +1,112 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef MULTILINEEDITORIMPL_H +#define MULTILINEEDITORIMPL_H + +#include +#include +#include +#include "multilineeditor.h" + +class FormWindow; +class TQToolBar; +class TQTextDocument; + +class TextEdit : public TQTextEdit +{ + Q_OBJECT + + +public: + TextEdit( TQWidget *parent = 0, const char *name = 0 ); + TQTextDocument *document() const { return TQTextEdit::document(); } + TQTextParagraph *paragraph(); + +}; + +class ToolBarItem : public TQAction +{ + Q_OBJECT + + +public: + ToolBarItem( TQWidget *parent, TQWidget *toolBar, + const TQString &label, const TQString &tagstr, + const TQIconSet &icon, const TQKeySequence &key = 0 ); + ~ToolBarItem(); +signals: + void clicked( const TQString &t ); + +protected slots: + void wasActivated(); +private: + TQString tag; +}; + + +class MultiLineEditor : public MultiLineEditorBase +{ + Q_OBJECT + + +public: + MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget, + FormWindow *fw, const TQString &text = TQString() ); + bool useWrapping() const; + void setUseWrapping( bool ); + static TQString getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap ); + int exec(); + +protected slots: + void okClicked(); + void applyClicked(); + void cancelClicked(); + void insertTags( const TQString& ); + void insertBR(); + void showFontDialog(); + void changeWrapMode( bool ); + + void closeEvent( TQCloseEvent *e ); + +private: + TQString getStaticText(); + TextEdit *textEdit; + TQTextEdit *mlined; + FormWindow *formwindow; + TQToolBar *basicToolBar; + TQToolBar *fontToolBar; + TQToolBar *optionsToolBar; + TQAction *wrapAction; + int res; + TQString staticText; + bool callStatic; + bool oldDoWrap, doWrap; + TQVariant oldWrapMode; + TQString oldWrapString; +}; + +#endif diff --git a/kdevdesigner/designer/myiconloader.cpp b/kdevdesigner/designer/myiconloader.cpp new file mode 100644 index 00000000..80bbc5ba --- /dev/null +++ b/kdevdesigner/designer/myiconloader.cpp @@ -0,0 +1,32 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program 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 program 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 "myiconloader.h" +#include "kdevdesigner_part.h" +#include + +TQPixmap BarIcon2( const TQString & name ) +{ + return BarIcon(name, KDevDesignerPartFactory::instance()); +} + +TQPixmap SmallIcon2( const TQString & name) +{ + return SmallIcon(name, KDevDesignerPartFactory::instance()); +} diff --git a/kdevdesigner/designer/myiconloader.h b/kdevdesigner/designer/myiconloader.h new file mode 100644 index 00000000..63a47eee --- /dev/null +++ b/kdevdesigner/designer/myiconloader.h @@ -0,0 +1,32 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program 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 program 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 MY_ICON_LOADER +#define MY_ICON_LOADER + +#include +#include + +class TDEInstance; + +TQPixmap BarIcon2 (const TQString &name); +TQPixmap SmallIcon2 (const TQString &name); + + +#endif diff --git a/kdevdesigner/designer/newform.ui b/kdevdesigner/designer/newform.ui new file mode 100644 index 00000000..81cb4fa5 --- /dev/null +++ b/kdevdesigner/designer/newform.ui @@ -0,0 +1,238 @@ + +NewFormBase +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + NewFormBase + + + + 0 + 0 + 557 + 436 + + + + New File + + + true + + + <b>New Form</b><p>Select a template for the new form and click the <b>OK</b>-button to create it.</p> + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + helpButton + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + true + + + true + + + Create a new form using the selected template. + + + + + buttonCancel + + + &Cancel + + + true + + + Close the dialog without creating a new form. + + + + + + + templateView + + + 120 + + + Adjust + + + false + + + true + + + Displays a list of the available templates. + + + + + labelProject + + + &Insert into: + + + projectCombo + + + + + projectCombo + + + + + Spacer2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + + + buttonOk + clicked() + NewFormBase + accept() + + + buttonCancel + clicked() + NewFormBase + reject() + + + projectCombo + activated(const TQString&) + NewFormBase + projectChanged(const TQString&) + + + templateView + currentChanged(TQIconViewItem*) + NewFormBase + itemChanged(TQIconViewItem*) + + + templateView + doubleClicked(TQIconViewItem*) + NewFormBase + accept() + + + templateView + returnPressed(TQIconViewItem*) + NewFormBase + accept() + + + + templateView + helpButton + buttonOk + buttonCancel + + + itemChanged( TQIconViewItem * ) + projectChanged( const TQString & ) + + + diff --git a/kdevdesigner/designer/newformimpl.cpp b/kdevdesigner/designer/newformimpl.cpp new file mode 100644 index 00000000..0cdc738b --- /dev/null +++ b/kdevdesigner/designer/newformimpl.cpp @@ -0,0 +1,414 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "newformimpl.h" +#include "mainwindow.h" +#include "metadatabase.h" +#include "project.h" +#include "formwindow.h" +#include "widgetfactory.h" +#include "widgetdatabase.h" +#include "actioneditorimpl.h" +#include "hierarchyview.h" +#include "resource.h" +#include "projectsettingsimpl.h" +#include "sourcefile.h" + +#include +#include "kdevdesigner_part.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int forms = 0; + +ProjectItem::ProjectItem( TQIconView *view, const TQString &text ) + : NewItem( view, text ) +{ +} + +void ProjectItem::insert( Project * ) +{ + MainWindow::self->createNewProject( lang ); +} + + + +FormItem::FormItem( TQIconView *view, const TQString &text ) + : NewItem( view, text ) +{ +} + +void FormItem::insert( Project *pro ) +{ + TQString n = "Form" + TQString::number( ++forms ); + FormWindow *fw = 0; + FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro ); + fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); + fw->setProject( pro ); + MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); + if ( fType == Widget ) { + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), + fw, n.latin1() ); + fw->setMainContainer( w ); + } else if ( fType == Dialog ) { + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); + fw->setMainContainer( w ); + } else if ( fType == Wizard ) { + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIZARD_OBJECT_NAME_STRING ), + fw, n.latin1() ); + fw->setMainContainer( w ); + } else if ( fType == MainWindow ) { + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQMAINWINDOW_OBJECT_NAME_STRING ), + fw, n.latin1() ); + fw->setMainContainer( w ); + } + + fw->setCaption( n ); + fw->resize( 600, 480 ); + MainWindow::self->insertFormWindow( fw ); + + TemplateWizardInterface *iface = + MainWindow::self->templateWizardInterface( fw->mainContainer()->className() ); + if ( iface ) { + iface->setup( fw->mainContainer()->className(), fw->mainContainer(), + fw->iFace(), MainWindow::self->designerInterface() ); + iface->release(); + } + + // the wizard might have changed a lot, lets update everything + MainWindow::self->actioneditor()->setFormWindow( fw ); + MainWindow::self->objectHierarchy()->setFormWindow( fw, TQT_TQOBJECT(fw) ); + MainWindow::self->objectHierarchy()->formDefinitionView()->refresh(); + MainWindow::self->objectHierarchy()->rebuild(); + fw->killAccels( TQT_TQOBJECT(fw) ); + fw->project()->setModified( TRUE ); + fw->setFocus(); + if ( !pro->isDummy() ) { + fw->setSavePixmapInProject( TRUE ); + fw->setSavePixmapInline( FALSE ); + } +} + + + +CustomFormItem::CustomFormItem( TQIconView *view, const TQString &text ) + : NewItem( view, text ) +{ +} + +static void unifyFormName( FormWindow *fw, TQWorkspace *qworkspace ) +{ + TQStringList lst; + TQWidgetList windows = qworkspace->windowList(); + for ( TQWidget *w =windows.first(); w; w = windows.next() ) { + if ( w == fw ) + continue; + lst << w->name(); + } + + if ( lst.findIndex( fw->name() ) == -1 ) + return; + TQString origName = fw->name(); + TQString n = origName; + int i = 1; + while ( lst.findIndex( n ) != -1 ) { + n = origName + TQString::number( i++ ); + } + fw->setName( n ); + fw->setCaption( n ); +} + +void CustomFormItem::insert( Project *pro ) +{ + TQString filename = templateFileName(); + if ( !filename.isEmpty() && TQFile::exists( filename ) ) { + Resource resource( MainWindow::self ); + FormFile *ff = new FormFile( filename, TRUE, pro ); + if ( !resource.load( ff ) ) { + TQMessageBox::information( MainWindow::self, i18n("Load Template"), + i18n("Could not load form description from template '%1'" ).arg( filename ) ); + delete ff; + return; + } + ff->setFileName( TQString() ); + if ( MainWindow::self->formWindow() ) { + MainWindow::self->formWindow()->setFileName( TQString() ); + unifyFormName( MainWindow::self->formWindow(), MainWindow::self->qWorkspace() ); + if ( !pro->isDummy() ) { + MainWindow::self->formWindow()->setSavePixmapInProject( TRUE ); + MainWindow::self->formWindow()->setSavePixmapInline( FALSE ); + } + } + } +} + + + +SourceFileItem::SourceFileItem( TQIconView *view, const TQString &text ) + : NewItem( view, text ), visible( TRUE ) +{ +} + +void SourceFileItem::insert( Project *pro ) +{ + SourceFile *f = new SourceFile( SourceFile::createUnnamedFileName( ext ), TRUE, pro ); + MainWindow::self->editSource( f ); +} + +void SourceFileItem::setProject( Project *pro ) +{ + TQIconView *iv = iconView(); + bool v = lang == pro->language(); + if ( !iv || v == visible ) + return; + visible = v; + if ( !visible ) + iv->takeItem( this ); + else + iv->insertItem( this ); +} + + + +SourceTemplateItem::SourceTemplateItem( TQIconView *view, const TQString &text ) + : NewItem( view, text ), visible( TRUE ) +{ +} + +void SourceTemplateItem::insert( Project *pro ) +{ + SourceTemplateInterface *siface = MainWindow::self->sourceTemplateInterface( text() ); + if ( !siface ) + return; + SourceTemplateInterface::Source src = siface->create( text(), MainWindow::self->designerInterface() ); + SourceFile *f = 0; + if ( src.type == SourceTemplateInterface::Source::Invalid ) + return; + if ( src.type == SourceTemplateInterface::Source::FileName ) + f = new SourceFile( src.filename, FALSE, pro ); + else + f = new SourceFile( SourceFile::createUnnamedFileName( src.extension ), TRUE, pro ); + if ( f->isAccepted()) { + f->setText( src.code ); + MainWindow::self->editSource( f ); + f->setModified( TRUE ); + } else { + delete f; + } +} + +void SourceTemplateItem::setProject( Project *pro ) +{ + TQIconView *iv = iconView(); + bool v = !pro->isDummy() && lang == pro->language(); + if ( !iv || v == visible ) + return; + visible = v; + if ( !visible ) + iv->takeItem( this ); + else + iv->insertItem( this ); +} + +void NewForm::insertTemplates( TQIconView *tView, + const TQString &templatePath ) +{ + TQStringList::Iterator it; + TQStringList languages = MetaDataBase::languages(); + if ( !MainWindow::self->singleProjectMode() ) { + for ( it = languages.begin(); it != languages.end(); ++it ) { + ProjectItem *pi = new ProjectItem( tView, i18n("%1 Project" ).arg( *it ) ); + allItems.append( pi ); + pi->setLanguage( *it ); + pi->setPixmap( BarIcon( "designer_project.png" , KDevDesignerPartFactory::instance()) ); + pi->setDragEnabled( FALSE ); + } + } + TQIconViewItem *cur = 0; + FormItem *fi = new FormItem( tView,i18n( "Dialog" ) ); + allItems.append( fi ); + fi->setFormType( FormItem::Dialog ); + fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) ); + fi->setDragEnabled( FALSE ); + cur = fi; + if ( !MainWindow::self->singleProjectMode() ) { + fi = new FormItem( tView,i18n( "Wizard" ) ); + allItems.append( fi ); + fi->setFormType( FormItem::Wizard ); + fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) ); + fi->setDragEnabled( FALSE ); + fi = new FormItem( tView, i18n( "Widget" ) ); + allItems.append( fi ); + fi->setFormType( FormItem::Widget ); + fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) ); + fi->setDragEnabled( FALSE ); + fi = new FormItem( tView, i18n( "Main Window" ) ); + allItems.append( fi ); + fi->setFormType( FormItem::MainWindow ); + fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) ); + fi->setDragEnabled( FALSE ); + + TQString templPath = templatePath; + TQStringList templRoots; + const char *qtdir = getenv( "QTDIR" ); + if(qtdir) + templRoots << qtdir; + templRoots << tqInstallPathData(); + if(qtdir) //try the tools/designer directory last! + templRoots << (TQString(qtdir) + "/tools/designer"); + for ( TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) { + TQString path = (*it) + "/templates"; + if ( TQFile::exists( path )) { + templPath = path; + break; + } + } + if ( !templPath.isEmpty() ) { + TQDir dir( templPath ); + const TQFileInfoList *filist = dir.entryInfoList( TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name ); + if ( filist ) { + TQFileInfoListIterator it( *filist ); + TQFileInfo *fi; + while ( ( fi = it.current() ) != 0 ) { + ++it; + if ( !fi->isFile() || fi->extension() != "ui" ) + continue; + TQString name = fi->baseName(); + name = name.replace( '_', ' ' ); + CustomFormItem *ci = new CustomFormItem( tView, name ); + allItems.append( ci ); + ci->setDragEnabled( FALSE ); + ci->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) ); + ci->setTemplateFile( fi->absFilePath() ); + } + } + } + } + + for ( it = languages.begin(); it != languages.end(); ++it ) { + LanguageInterface *iface = MetaDataBase::languageInterface( *it ); + if ( iface ) { + TQMap extensionMap; + iface->preferedExtensions( extensionMap ); + for ( TQMap::Iterator eit = extensionMap.begin(); + eit != extensionMap.end(); ++eit ) { + SourceFileItem * si = new SourceFileItem( tView, *eit ); + allItems.append( si ); + si->setExtension( eit.key() ); + si->setLanguage( *it ); + si->setPixmap( BarIcon( "designer_filenew.png", KDevDesignerPartFactory::instance() ) ); + si->setDragEnabled( FALSE ); + } + iface->release(); + } + } + + if ( !MainWindow::self->singleProjectMode() ) { + TQStringList sourceTemplates = MainWindow::self->sourceTemplates(); + for ( TQStringList::Iterator sit = sourceTemplates.begin(); sit != sourceTemplates.end(); ++sit ) { + SourceTemplateInterface *siface = MainWindow::self->sourceTemplateInterface( *sit ); + if ( !siface ) + continue; + SourceTemplateItem * si = new SourceTemplateItem( tView, *sit ); + allItems.append( si ); + si->setTemplate( *sit ); + si->setLanguage( siface->language( *sit ) ); + si->setPixmap( BarIcon( "designer_filenew.png", KDevDesignerPartFactory::instance() ) ); + si->setDragEnabled( FALSE ); + siface->release(); + } + } + + tView->viewport()->setFocus(); + tView->setCurrentItem( cur ); + + if ( MainWindow::self->singleProjectMode() ) + adjustSize(); +} + +NewForm::NewForm( TQIconView *templateView, const TQString &templatePath ) +{ + insertTemplates( templateView, templatePath ); + projectChanged( i18n( "" ) ); +} + +NewForm::NewForm( TQWidget *parent, const TQStringList& projects, + const TQString& currentProject, const TQString &templatePath ) + : NewFormBase( parent, 0, TRUE ) +{ + connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + + projectCombo->insertStringList( projects ); + projectCombo->setCurrentText( currentProject ); + + insertTemplates( templateView, templatePath ); + + projectChanged( projectCombo->currentText() ); +} + +void NewForm::accept() +{ + if ( !templateView->currentItem() ) + return; + Project *pro = MainWindow::self->findProject( projectCombo->currentText() ); + if ( !pro ) + return; + MainWindow::self->setCurrentProject( pro ); + NewFormBase::accept(); + ( (NewItem*)templateView->currentItem() )->insert( pro ); +} + +void NewForm::projectChanged( const TQString &project ) +{ + Project *pro = MainWindow::self->findProject( project ); + if ( !pro ) + return; + TQIconViewItem *i; + for ( i = allItems.first(); i; i = allItems.next() ) + ( (NewItem*)i )->setProject( pro ); + templateView->setCurrentItem( templateView->firstItem() ); + templateView->arrangeItemsInGrid( TRUE ); +} + +void NewForm::itemChanged( TQIconViewItem *item ) +{ + labelProject->setEnabled( item->rtti() != NewItem::ProjectType ); + projectCombo->setEnabled( item->rtti() != NewItem::ProjectType ); +} + +TQPtrList NewForm::allViewItems() +{ + return allItems; +} diff --git a/kdevdesigner/designer/newformimpl.h b/kdevdesigner/designer/newformimpl.h new file mode 100644 index 00000000..863f5b9d --- /dev/null +++ b/kdevdesigner/designer/newformimpl.h @@ -0,0 +1,165 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef NEWFORMIMPL_H +#define NEWFORMIMPL_H + +#include "newform.h" +#include + +class Project; + +class NewItem : public TQIconViewItem +{ +public: + enum Type { + ProjectType, + Form, + CustomForm, + SourceFileType, + SourceTemplateType + }; + + NewItem( TQIconView *view, const TQString &text ) + : TQIconViewItem( view, text ) {} + virtual void insert( Project *pro ) = 0; + virtual void setProject( Project * ) {} + +}; + +class ProjectItem : public NewItem +{ +public: + ProjectItem( TQIconView *view, const TQString &text ); + void insert( Project *pro ); + int rtti() const { return (int)ProjectType; } + + void setLanguage( const TQString &l ) { lang = l; } + TQString language() const { return lang; } + +private: + TQString lang; + +}; + +class FormItem : public NewItem +{ +public: + enum FormType { + Widget, + Dialog, + Wizard, + MainWindow + }; + + FormItem( TQIconView *view, const TQString &text ); + void insert( Project *pro ); + int rtti() const { return (int)Form; } + + void setFormType( FormType ft ) { fType = ft; } + FormType formType() const { return fType; } + +private: + FormType fType; + +}; + +class CustomFormItem : public NewItem +{ +public: + CustomFormItem( TQIconView *view, const TQString &text ); + void insert( Project *pro ); + int rtti() const { return (int)CustomForm; } + + void setTemplateFile( const TQString &tf ) { templFile = tf; } + TQString templateFileName() const { return templFile; } + +private: + TQString templFile; + +}; + +class SourceFileItem : public NewItem +{ +public: + SourceFileItem( TQIconView *view, const TQString &text ); + void insert( Project *pro ); + int rtti() const { return (int)SourceFileType; } + + void setExtension( const TQString &e ) { ext = e; } + TQString extension() const { return ext; } + void setLanguage( const TQString &l ) { lang = l; } + void setProject( Project *pro ); + +private: + TQString ext; + TQString lang; + bool visible; + +}; + +class SourceTemplateItem : public NewItem +{ +public: + SourceTemplateItem( TQIconView *view, const TQString &text ); + void insert( Project *pro ); + int rtti() const { return (int)SourceTemplateType; } + + void setTemplate( const TQString &t ) { templ = t; } + TQString tenplate() const { return templ; } + void setLanguage( const TQString &l ) { lang = l; } + void setProject( Project *pro ); + +private: + TQString templ; + TQString lang; + bool visible; + +}; + +class NewForm : public NewFormBase +{ + Q_OBJECT + + +public: + NewForm( TQIconView *templateView, const TQString &templatePath ); + NewForm( TQWidget *parent, const TQStringList& projects, + const TQString& currentProject, const TQString &templatePath ); + void insertTemplates( TQIconView*, const TQString& ); + void accept(); + TQPtrList allViewItems(); + +protected slots: + void projectChanged( const TQString &project ); + void itemChanged( TQIconViewItem *item ); + +private: + TQPtrList allItems; + +}; + +#endif diff --git a/kdevdesigner/designer/orderindicator.cpp b/kdevdesigner/designer/orderindicator.cpp new file mode 100644 index 00000000..2904cfbf --- /dev/null +++ b/kdevdesigner/designer/orderindicator.cpp @@ -0,0 +1,112 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include // HP-UX compiler need this here + +#include "orderindicator.h" +#include "formwindow.h" + +#include +#include +#include + +OrderIndicator::OrderIndicator( int i, TQWidget* w, FormWindow *fw ) + : TQWidget( fw, "order_indicator", WMouseNoMask ), formWindow( fw ) +{ + order = -1; + widget = w; + setBackgroundMode( NoBackground ); + setAutoMask( TRUE ); + setOrder( i, w ); +} + + +OrderIndicator::~OrderIndicator() +{ +} + + +void OrderIndicator::setOrder( int i, TQWidget* wid ) +{ + if ( widget != wid ) + return; + if ( !wid->isVisibleTo( formWindow ) ) { + hide(); + return; + } + + if ( order == i ) { + show(); + raise(); + return; + } + order = i; + int w = fontMetrics().width( TQString::number( i ) ) + 10; + int h = fontMetrics().lineSpacing() * 3 / 2; + TQFont f( font() ); + f.setBold( TRUE ); + setFont( f ); + resize( TQMAX( w, h ), h ); + update(); // in case the size didn't change + reposition(); + show(); + raise(); +} + +void OrderIndicator::reposition() +{ + TQPoint p =parentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) ); + move( p - TQPoint( width()/3, height()/3 ) ); +} + + +void OrderIndicator::paintEvent( TQPaintEvent * ) +{ + TQPainter p( this ); + p.setPen( white ); + p.setBrush( blue ); + p.drawEllipse( rect() ); + p.drawText( rect(), AlignCenter, TQString::number( order ) ); +} + + +void OrderIndicator::updateMask() +{ + TQBitmap bm( size() ); + bm.fill( color0 ); + { + TQPainter p( &bm, this ); + p.setPen( color1 ); + p.setBrush( color1 ); + p.drawEllipse( rect() ); + } + setMask( bm ); +} + +void OrderIndicator::mousePressEvent( TQMouseEvent *e ) +{ + TQApplication::sendEvent( widget, e ); +} diff --git a/kdevdesigner/designer/orderindicator.h b/kdevdesigner/designer/orderindicator.h new file mode 100644 index 00000000..33e486d4 --- /dev/null +++ b/kdevdesigner/designer/orderindicator.h @@ -0,0 +1,58 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef ORDERINDICATOR_H +#define ORDERINDICATOR_H + +#include + +class FormWindow; + +class OrderIndicator : public TQWidget +{ + Q_OBJECT + + +public: + OrderIndicator( int i, TQWidget* w, FormWindow* fw ); + ~OrderIndicator(); + + void setOrder( int i, TQWidget* w ); + void reposition(); + +protected: + void paintEvent( TQPaintEvent * ); + void mousePressEvent( TQMouseEvent *e ); + void updateMask(); + +private: + int order; + TQWidget* widget; + FormWindow *formWindow; + +}; + +#endif diff --git a/kdevdesigner/designer/outputwindow.cpp b/kdevdesigner/designer/outputwindow.cpp new file mode 100644 index 00000000..a23c14a7 --- /dev/null +++ b/kdevdesigner/designer/outputwindow.cpp @@ -0,0 +1,209 @@ +/********************************************************************** +** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "outputwindow.h" +#include "designerappiface.h" +#include "metadatabase.h" +#include "mainwindow.h" + +#include +#include +#include +#include +#include +#include +#include + +#include + +static TQTextEdit *debugoutput = 0; +bool debugToStderr = FALSE; + +TQtMsgHandler OutputWindow::oldMsgHandler = 0; + +OutputWindow::OutputWindow( TQWidget *parent ) + : TQTabWidget( parent, "output_window" ), debugView( 0 ), errorView( 0 ) +{ + setupDebug(); + setupError(); + iface = new DesignerOutputDockImpl( this ); +} + +OutputWindow::~OutputWindow() +{ + debugoutput = debugView = 0; + errorView = 0; + if ( !debugToStderr ) + tqInstallMsgHandler( oldMsgHandler ); + delete iface; +} + +void OutputWindow::shuttingDown() +{ + if ( !debugToStderr ) + tqInstallMsgHandler( oldMsgHandler ); +} + +void OutputWindow::setupError() +{ + errorView = new TQListView( this, "OutputWindow::errorView" ); + errorView->setSorting( -1 ); + connect( errorView, TQT_SIGNAL( currentChanged( TQListViewItem* ) ), + this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) ); + connect( errorView, TQT_SIGNAL( clicked( TQListViewItem* ) ), + this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) ); + + if ( MetaDataBase::languages().count() > 1 ) + addTab( errorView, i18n( "Warnings/Errors" ) ); + else + errorView->hide(); + errorView->addColumn( i18n( "Type" ) ); + errorView->addColumn( i18n( "Message" ) ); + errorView->addColumn( i18n( "Line" ) ); + errorView->addColumn( i18n( "Location" ) ); + errorView->setResizeMode( TQListView::LastColumn ); + errorView->setColumnWidth( 0, errorView->fontMetrics().width( "WARNING1234" ) ); + errorView->setColumnWidth( 1, errorView->fontMetrics().width( "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP" ) ); + errorView->setColumnWidth( 2, errorView->fontMetrics().width( "9999999" ) ); + errorView->setColumnAlignment( 2, TQt::AlignRight ); + errorView->setAllColumnsShowFocus( TRUE ); +} + +static void debugMessageOutput( TQtMsgType type, const char *msg ) +{ + TQString s( msg ); + s += "\n"; + + if ( type != TQtFatalMsg ) { + if ( debugoutput && debugoutput->isVisible() ) + debugoutput->append( s ); + else if ( OutputWindow::oldMsgHandler && OutputWindow::oldMsgHandler != debugMessageOutput ) + (*OutputWindow::oldMsgHandler)( type, msg ); + else + fputs( s.latin1(), stderr ); + } else { + fputs( s.latin1(), stderr ); + abort(); + } + + tqApp->flush(); +} + +void OutputWindow::setupDebug() +{ + debugoutput = debugView = new TQTextEdit( this, "OutputWindow::debugView" ); + //debugView->setReadOnly( TRUE ); + addTab( debugView, "Debug Output" ); + + if ( !debugToStderr ) + oldMsgHandler = tqInstallMsgHandler( debugMessageOutput ); +} + +void OutputWindow::setErrorMessages( const TQStringList &errors, const TQValueList &lines, + bool clear, const TQStringList &locations, + const TQObjectList &locationObjects ) +{ + if ( clear ) + errorView->clear(); + TQStringList::ConstIterator mit = errors.begin(); + TQValueList::ConstIterator lit = lines.begin(); + TQStringList::ConstIterator it = locations.begin(); + TQObjectList objects = (TQObjectList)locationObjects; + TQObject *o = objects.first(); + TQListViewItem *after = 0; + for ( ; lit != lines.end() && mit != errors.end(); ++lit, ++mit, ++it, o = objects.next() ) + after = new ErrorItem( errorView, after, *mit, *lit, *it, o ); + setCurrentPage( 1 ); +} + +DesignerOutputDock *OutputWindow::iFace() +{ + return iface; +} + +void OutputWindow::appendDebug( const TQString &text ) +{ + debugView->append( text + "\n" ); +} + +void OutputWindow::clearErrorMessages() +{ + errorView->clear(); +} + +void OutputWindow::clearDebug() +{ + debugView->clear(); +} + +void OutputWindow::showDebugTab() +{ + showPage( debugView ); +} + +void OutputWindow::currentErrorChanged( TQListViewItem *i ) +{ + if ( !i ) + return; + ErrorItem *ei = (ErrorItem*)i; + ei->setRead( TRUE ); + MainWindow::self->showSourceLine( ei->location(), ei->line() - 1, MainWindow::Error ); +} + + + +ErrorItem::ErrorItem( TQListView *parent, TQListViewItem *after, const TQString &message, int line, + const TQString &locationString, TQObject *locationObject ) + : TQListViewItem( parent, after ) +{ + setMultiLinesEnabled( TRUE ); + TQString m( message ); + type = m.startsWith( "Warning: " ) ? Warning : Error; + m = m.mid( m.find( ':' ) + 1 ); + setText( 0, type == Error ? "Error" : "Warning" ); + setText( 1, m ); + setText( 2, TQString::number( line ) ); + setText( 3, locationString ); + object = locationObject; + read = !after; + if ( !after ) { + parent->setSelected( this, TRUE ); + parent->setCurrentItem( this ); + } +} + +void ErrorItem::paintCell( TQPainter *p, const TQColorGroup & cg, + int column, int width, int alignment ) +{ + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Text, type == Error ? TQt::red : TQt::darkYellow ); + if ( !read ) { + TQFont f( p->font() ); + f.setBold( TRUE ); + p->setFont( f ); + } + TQListViewItem::paintCell( p, g, column, width, alignment ); +} diff --git a/kdevdesigner/designer/outputwindow.h b/kdevdesigner/designer/outputwindow.h new file mode 100644 index 00000000..79b3e79a --- /dev/null +++ b/kdevdesigner/designer/outputwindow.h @@ -0,0 +1,99 @@ +/********************************************************************** +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef OUTPUTWINDOW_H +#define OUTPUTWINDOW_H + +#include +#include +#include +#include + +struct DesignerOutputDock; +class TQTextEdit; +class TQListView; + +class ErrorItem : public TQListViewItem +{ +public: + enum Type { Error, Warning }; + + ErrorItem( TQListView *parent, TQListViewItem *after, const TQString &message, int line, + const TQString &locationString, TQObject *locationObject ); + + void paintCell( TQPainter *, const TQColorGroup & cg, + int column, int width, int alignment ); + + void setRead( bool b ) { read = b; repaint(); } + + TQObject *location() const { return object; } + int line() const { return text( 2 ).toInt(); } + +private: + TQObject *object; + Type type; + bool read; + +}; + +class OutputWindow : public TQTabWidget +{ + Q_OBJECT + + +public: + OutputWindow( TQWidget *parent ); + ~OutputWindow(); + + void setErrorMessages( const TQStringList &errors, const TQValueList &lines, + bool clear, const TQStringList &locations, + const TQObjectList &locationObjects ); + void appendDebug( const TQString& ); + void clearErrorMessages(); + void clearDebug(); + void showDebugTab(); + + DesignerOutputDock *iFace(); + + void shuttingDown(); + + static TQtMsgHandler oldMsgHandler; + +private slots: + void currentErrorChanged( TQListViewItem *i ); + +private: + void setupError(); + void setupDebug(); + + TQTextEdit *debugView; + TQListView *errorView; + + DesignerOutputDock *iface; + +}; + +#endif diff --git a/kdevdesigner/designer/paletteeditor.ui b/kdevdesigner/designer/paletteeditor.ui new file mode 100644 index 00000000..32b14b54 --- /dev/null +++ b/kdevdesigner/designer/paletteeditor.ui @@ -0,0 +1,496 @@ + +PaletteEditorBase +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + PaletteEditorBase + + + + 0 + 0 + 449 + 443 + + + + + 7 + 7 + + + + Edit Palette + + + + unnamed + + + 11 + + + 6 + + + + groupAutoPalette + + + + 5 + 4 + + + + Build Palette + + + AlignAuto + + + + unnamed + + + 11 + + + 6 + + + + labelMainColor + + + + 1 + 1 + + + + + 50 + 0 + + + + 1 + + + 0 + + + 0 + + + &3-D effects: + + + AlignAuto|AlignVCenter + + + buttonMainColor + + + + + buttonMainColor + + + + 0 + 0 + + + + StrongFocus + + + false + + + Choose a color + + + Choose the effect-color for the generated palette. + + + + + labelMainColor2 + + + + 1 + 1 + + + + + 50 + 0 + + + + 1 + + + 0 + + + 0 + + + Back&ground: + + + AlignAuto|AlignVCenter + + + buttonMainColor2 + + + + + buttonMainColor2 + + + + 0 + 0 + + + + StrongFocus + + + false + + + Choose a color + + + Choose the background color for the generated palette. + + + + + Spacer1 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + btnAdvanced + + + &Tune Palette... + + + + + + + GroupBox126 + + + + 5 + 7 + + + + Preview + + + + unnamed + + + 11 + + + 6 + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel1 + + + Select &palette: + + + paletteCombo + + + + + + Active Palette + + + + + Inactive Palette + + + + + Disabled Palette + + + + paletteCombo + + + + + + + previewFrame + + + + 7 + 7 + + + + + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + buttonHelp + + + &Help + + + true + + + + + Horizontal Spacing11 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + true + + + true + + + Close the dialog and apply all the changes. + + + + + buttonCancel + + + &Cancel + + + true + + + Close the dialog and discard any changes. + + + + + + + + + StyledButton +
    styledbutton.h
    + + 40 + 25 + + 0 + + 5 + 5 + + "image0" + clicked() + changed() + color + pixmap + scale +
    + + PreviewFrame +
    previewframe.h
    + + 200 + 200 + + 0 + + 5 + 5 + + "image1" +
    +
    + + + 789c9dd2cb8e9b301406e07d9e0225bba89a09601350d505302c5b7559a9eac23e6672b363620c0ca9faeef53949da2e2a55eab123f9e38f2f217e5e475f3e7f8cd6cf8bde0b7f8008f6c2456b3518337ffdf6e1fb62992451e8691ac5cb778be55304d1277b6e71fc12c6ab0d157222e61bd8e4c812196f6216535a13f318624a6764b2495842e99558249014c81e99c6294b69d3376291424ae9806431638cd28628183081f4489e70ce13e4852878c129ad905992f18cd291283295517a466ed32ddfa64847945bb595c80e99a739cf29d54499ab9c528b2c58c10b86344428540148400a26b8a0541241b482d215523299494a0551c9562ae409091c32e0c82351410b942aa4e22a53941e882d36e41ed966d8903b2215f215f99a6143b6442afaafff5aff485658622584a091941256948443d1cabbdd6ebf3f28753c09a9e9cdc1fe703c9e4ea19f689a0430fa4c8908082be093d08d016bbb0bbd5e7ceafade5b30de19d083b3fa9e008cd39b9fafd69495b473af7fcfb15325c1d61eea0afaf005ddf97b5295c658a866338f97591babef7340fa396c6c5ca9e7fe650807d0bf566b4262299986ba335a3b4a2cc84b69ac85b1b673037d8fabf95b023a9c09cc7530e104dd5419ed6e27083fb09a7c752db5a9bd31cde4ec634ed8a39aebbe337618c3f6fdc5dee6d8b0bb0d6b5b8b1fad43d78fe4e14e3f6aace8e29d9d736777fea3c686eee0138c9726d4d00c548df7a315ff750f7ebc5ffc04a0e5308d + + + 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 + + + + + buttonMainColor2 + clicked() + PaletteEditorBase + onChoose2ndMainColor() + + + paletteCombo + activated(int) + PaletteEditorBase + paletteSelected(int) + + + btnAdvanced + clicked() + PaletteEditorBase + onTune() + + + buttonOk + clicked() + PaletteEditorBase + accept() + + + buttonCancel + clicked() + PaletteEditorBase + reject() + + + buttonMainColor + changed() + PaletteEditorBase + onChooseMainColor() + + + buttonMainColor + clicked() + PaletteEditorBase + onChooseMainColor() + + + buttonMainColor2 + changed() + PaletteEditorBase + onChoose2ndMainColor() + + init() + destroy() + onTune() + onChoose2ndMainColor() + onChooseMainColor() + paletteSelected(int) + + + buttonOk + buttonCancel + buttonMainColor + buttonMainColor2 + btnAdvanced + paletteCombo + buttonHelp + +
    diff --git a/kdevdesigner/designer/paletteeditoradvanced.ui b/kdevdesigner/designer/paletteeditoradvanced.ui new file mode 100644 index 00000000..579f0e68 --- /dev/null +++ b/kdevdesigner/designer/paletteeditoradvanced.ui @@ -0,0 +1,748 @@ + +PaletteEditorAdvancedBase +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + PaletteEditorAdvancedBase + + + true + + + + 0 + 0 + 327 + 341 + + + + Tune Palette + + + true + + + <b>Edit Palette</b><p>Change the current widget or form's palette.</p><p>Use a generated palette or select colors for each color group and each color role.</p><p>The palette can be tested with different widget layouts in the preview section.</p> + + + + unnamed + + + 11 + + + 6 + + + + Layout14 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel1 + + + MShape + + + MShadow + + + Select &palette: + + + paletteCombo + + + + + + Active Palette + + + + + Inactive Palette + + + + + Disabled Palette + + + + paletteCombo + + + + + + + ButtonGroup1 + + + + 5 + 4 + + + + Auto + + + + unnamed + + + 11 + + + 6 + + + + checkBuildInactive + + + Build the &inactive palette from the active palette + + + true + + + + + checkBuildDisabled + + + Build the &disabled palette from the active palette + + + true + + + + + + + groupCentral + + + Central Color Roles + + + + unnamed + + + 11 + + + 6 + + + + + Background + + + + + Foreground + + + + + Button + + + + + Base + + + + + Text + + + + + BrightText + + + + + ButtonText + + + + + Highlight + + + + + HighlightText + + + + + Link + + + + + LinkVisited + + + + comboCentral + + + Choose the central color role + + + <b>Select a color role.</b><p>Available central color roles are: <ul> <li>Background - general background color.</li> <li>Foreground - general foreground color. </li> <li>Base - used as the background color for example, for text entry widgets; it is usually white or another light color. </li> <li>Text - the forground color used with Base. Usually this is the same as the Foreground, in which case it must provide good contrast both with the Background and with the Base. </li> <li>Button - general button background color; useful where buttons need a background different from Background, as in the Macintosh style. </li> <li>ButtonText - a foreground color used with the Button color. </li> <li>Highlight - a color used to indicate a selected or highlighted item. </li> <li>HighlightedText - a text color that contrasts to Highlight. </li> <li>BrightText - a text color that is very different from Foreground and contrasts well with, for example, black. </li> </ul> </p> + + + + + Layout32_2 + + + + unnamed + + + 0 + + + 6 + + + + Horizontal_Spacing1 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + labelPixmap + + + + 1 + 1 + + + + Choose pi&xmap: + + + buttonPixmap + + + + + buttonPixmap + + + + 0 + 0 + + + + TabFocus + + + true + + + Select a pixmap + + + Choose a pixmap file for the selected central color role. + + + + + labelCentral + + + + 1 + 1 + + + + + 0 + 0 + + + + &Select color: + + + buttonCentral + + + + + buttonCentral + + + + 0 + 0 + + + + TabFocus + + + false + + + Choose a color + + + Choose a color for the selected central color role. + + + + + + + + + groupEffect + + + 3-D Shadow Effects + + + + unnamed + + + 11 + + + 6 + + + + Layout32_3 + + + + unnamed + + + 0 + + + 6 + + + + checkBuildEffect + + + Build &from button color: + + + true + + + Generate shadings + + + Check to let 3D-effect colors be calculated from the button-color. + + + + + + Light + + + + + Midlight + + + + + Mid + + + + + Dark + + + + + Shadow + + + + comboEffect + + + Choose 3D-effect color role + + + <b>Select a color effect role.</b><p>Available effect roles are: <ul> <li>Light - lighter than Button color. </li> <li>Midlight - between Button and Light. </li> <li>Mid - between Button and Dark. </li> <li>Dark - darker than Button. </li> <li>Shadow - a very dark color. </li> </ul> + + + + + + + Layout31_2 + + + + unnamed + + + 0 + + + 6 + + + + Horizontal_Spacing3 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + labelEffect + + + + 1 + 1 + + + + + 0 + 0 + + + + Select co&lor: + + + buttonEffect + + + + + buttonEffect + + + + 0 + 0 + + + + TabFocus + + + false + + + Choose a color + + + Choose a color for the selected effect color role. + + + + + + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + buttonHelp + + + &Help + + + true + + + + + Horizontal_Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + true + + + true + + + Close the dialog and apply all the changes. + + + + + buttonCancel + + + &Cancel + + + true + + + Close the dialog and discard any changes. + + + + + + + + + StyledButton +
    styledbutton.h
    + + 40 + 25 + + 0 + + 5 + 5 + + "image0" + clicked() + changed() + color + pixmap + scale +
    +
    + + + 789c9dd2cb8e9b301406e07d9e0225bba89a09601350d505302c5b7559a9eac23e6672b363620c0ca9faeef53949da2e2a55eab123f9e38f2f217e5e475f3e7f8cd6cf8bde0b7f8008f6c2456b3518337ffdf6e1fb62992451e8691ac5cb778be55304d1277b6e71fc12c6ab0d157222e61bd8e4c812196f6216535a13f318624a6764b2495842e99558249014c81e99c6294b69d3376291424ae9806431638cd28628183081f4489e70ce13e4852878c129ad905992f18cd291283295517a466ed32ddfa64847945bb595c80e99a739cf29d54499ab9c528b2c58c10b86344428540148400a26b8a0541241b482d215523299494a0551c9562ae409091c32e0c82351410b942aa4e22a53941e882d36e41ed966d8903b2215f215f99a6143b6442afaafff5aff485658622584a091941256948443d1cabbdd6ebf3f28753c09a9e9cdc1fe703c9e4ea19f689a0430fa4c8908082be093d08d016bbb0bbd5e7ceafade5b30de19d083b3fa9e008cd39b9fafd69495b473af7fcfb15325c1d61eea0afaf005ddf97b5295c658a866338f97591babef7340fa396c6c5ca9e7fe650807d0bf566b4262299986ba335a3b4a2cc84b69ac85b1b673037d8fabf95b023a9c09cc7530e104dd5419ed6e27083fb09a7c752db5a9bd31cde4ec634ed8a39aebbe337618c3f6fdc5dee6d8b0bb0d6b5b8b1fad43d78fe4e14e3f6aace8e29d9d736777fea3c686eee0138c9726d4d00c548df7a315ff750f7ebc5ffc04a0e5308d + + + + + buttonOk + clicked() + PaletteEditorAdvancedBase + accept() + + + buttonCancel + clicked() + PaletteEditorAdvancedBase + reject() + + + paletteCombo + activated(int) + PaletteEditorAdvancedBase + paletteSelected(int) + + + comboCentral + activated(int) + PaletteEditorAdvancedBase + onCentral(int) + + + buttonPixmap + clicked() + PaletteEditorAdvancedBase + onChoosePixmap() + + + buttonCentral + clicked() + PaletteEditorAdvancedBase + onChooseCentralColor() + + + buttonEffect + clicked() + PaletteEditorAdvancedBase + onChooseEffectColor() + + + comboEffect + activated(int) + PaletteEditorAdvancedBase + onEffect(int) + + + checkBuildEffect + toggled(bool) + PaletteEditorAdvancedBase + onToggleBuildEffects(bool) + + + buttonHelp + clicked() + PaletteEditorAdvancedBase + showHelp() + + + checkBuildEffect + toggled(bool) + comboEffect + setDisabled(bool) + + + checkBuildEffect + toggled(bool) + buttonEffect + setDisabled(bool) + + + checkBuildInactive + toggled(bool) + PaletteEditorAdvancedBase + onToggleBuildInactive(bool) + + + checkBuildDisabled + toggled(bool) + PaletteEditorAdvancedBase + onToggleBuildDisabled(bool) + + init() + destroy() + onToggleBuildDisabled(bool) + onCentral(int) + onChooseCentralColor() + onChooseEffectColor() + onChoosePixmap() + onEffect(int) + onToggleBuildEffects(bool) + onToggleBuildInactive(bool) + paletteSelected(int) + showHelp() + + + buttonOk + buttonCancel + paletteCombo + checkBuildInactive + checkBuildDisabled + comboCentral + buttonPixmap + buttonCentral + checkBuildEffect + comboEffect + buttonEffect + buttonHelp + +
    diff --git a/kdevdesigner/designer/paletteeditoradvancedimpl.cpp b/kdevdesigner/designer/paletteeditoradvancedimpl.cpp new file mode 100644 index 00000000..903c1a4f --- /dev/null +++ b/kdevdesigner/designer/paletteeditoradvancedimpl.cpp @@ -0,0 +1,643 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "paletteeditoradvancedimpl.h" +#include "styledbutton.h" +#include "mainwindow.h" +#include "formwindow.h" + +#include +#include +#include +#include +#include +#include +#include + +/*! + Class used by PaletteEditor for bold combobox items +*/ + +class BoldListBoxText : public TQListBoxText +{ +public: + BoldListBoxText( TQString text, TQListBox* lb = 0 ); + +protected: + virtual void paint( TQPainter* ); +}; + +BoldListBoxText::BoldListBoxText( TQString text, TQListBox* lb ) + : TQListBoxText( lb ) +{ + setText( text ); +} + +void BoldListBoxText::paint( TQPainter* painter ) +{ + TQFont f = painter->font(); + f.setBold( TRUE ); + painter->setFont( f ); + + TQListBoxText::paint( painter ); +} + +PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent, + const char * name, bool modal, WFlags f ) + : PaletteEditorAdvancedBase( parent, name, modal, f ), formWindow( fw ), selectedPalette(0) +{ + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + + buttonPixmap->setEditor( StyledButton::PixmapEditor ); + + editPalette = TQApplication::palette(); + setPreviewPalette( editPalette ); + + buttonPixmap->setFormWindow( formWindow ); + + // force toggle event + checkBuildEffect->setChecked(FALSE); + checkBuildEffect->setChecked(TRUE); +} + +PaletteEditorAdvanced::~PaletteEditorAdvanced() +{ +} + +void PaletteEditorAdvanced::onToggleBuildInactive( bool v ) +{ + if (selectedPalette == 1) { + groupCentral->setDisabled(v); + groupEffect->setDisabled(v); + } + + if (v) { + buildInactive(); + updateStyledButtons(); + } +} + +void PaletteEditorAdvanced::onToggleBuildDisabled( bool v ) +{ + if (selectedPalette == 2) { + groupCentral->setDisabled(v); + groupEffect->setDisabled(v); + } + + if (v) { + buildDisabled(); + updateStyledButtons(); + } +} + +void PaletteEditorAdvanced::paletteSelected(int p) +{ + selectedPalette = p; + + if(p == 1) { // inactive + groupCentral->setDisabled(checkBuildInactive->isChecked()); + groupEffect->setDisabled(checkBuildInactive->isChecked()); + } + else if (p == 2) { // disabled + groupCentral->setDisabled(checkBuildDisabled->isChecked()); + groupEffect->setDisabled(checkBuildDisabled->isChecked()); + } + else { + groupCentral->setEnabled(TRUE); + groupEffect->setEnabled(TRUE); + } + updateStyledButtons(); +} + +void PaletteEditorAdvanced::onChooseCentralColor() +{ + switch(selectedPalette) { + case 0: + default: + mapToActiveCentralRole( buttonCentral->color() ); + break; + case 1: + mapToInactiveCentralRole( buttonCentral->color() ); + break; + case 2: + mapToDisabledCentralRole( buttonCentral->color() ); + break; + } + updateStyledButtons(); +} + +void PaletteEditorAdvanced::onChooseEffectColor() +{ + switch(selectedPalette) { + case 0: + default: + mapToActiveEffectRole( buttonEffect->color() ); + break; + case 1: + mapToInactiveEffectRole( buttonEffect->color() ); + break; + case 2: + mapToDisabledEffectRole( buttonEffect->color() ); + break; + } + updateStyledButtons(); +} + +void PaletteEditorAdvanced::onChoosePixmap() +{ + if (buttonPixmap->pixmap()) { + switch(selectedPalette) { + case 0: + default: + mapToActivePixmapRole( *buttonPixmap->pixmap() ); + break; + case 1: + mapToInactivePixmapRole( *buttonPixmap->pixmap() ); + break; + case 2: + mapToDisabledPixmapRole( *buttonPixmap->pixmap() ); + break; + } + } + updateStyledButtons(); +} + +void PaletteEditorAdvanced::onToggleBuildEffects( bool on ) +{ + if (!on) return; + buildActiveEffect(); + buildInactiveEffect(); + buildDisabledEffect(); +} + +TQColorGroup::ColorRole PaletteEditorAdvanced::centralFromItem( int item ) +{ + switch( item ) { + case 0: + return TQColorGroup::Background; + case 1: + return TQColorGroup::Foreground; + case 2: + return TQColorGroup::Button; + case 3: + return TQColorGroup::Base; + case 4: + return TQColorGroup::Text; + case 5: + return TQColorGroup::BrightText; + case 6: + return TQColorGroup::ButtonText; + case 7: + return TQColorGroup::Highlight; + case 8: + return TQColorGroup::HighlightedText; + case 9: + return TQColorGroup::Link; + case 10: + return TQColorGroup::LinkVisited; + default: + return TQColorGroup::NColorRoles; + } +} + +TQColorGroup::ColorRole PaletteEditorAdvanced::effectFromItem( int item ) +{ + switch( item ) { + case 0: + return TQColorGroup::Light; + case 1: + return TQColorGroup::Midlight; + case 2: + return TQColorGroup::Mid; + case 3: + return TQColorGroup::Dark; + case 4: + return TQColorGroup::Shadow; + default: + return TQColorGroup::NColorRoles; + } +} + +void PaletteEditorAdvanced::onCentral( int item ) +{ + TQPixmap* p = 0; + TQColor c; + + switch(selectedPalette) { + case 0: + default: + c = editPalette.active().color( centralFromItem(item) ); + p = editPalette.active().brush( centralFromItem(item) ).pixmap(); + break; + case 1: + c = editPalette.inactive().color( centralFromItem(item) ); + p = editPalette.inactive().brush( centralFromItem(item) ).pixmap(); + break; + case 2: + c = editPalette.disabled().color( centralFromItem(item) ); + p = editPalette.disabled().brush( centralFromItem(item) ).pixmap(); + break; + } + + buttonCentral->setColor(c); + + if (p) + buttonPixmap->setPixmap( *p ); + else + buttonPixmap->setPixmap( TQPixmap() ); +} + +void PaletteEditorAdvanced::onEffect( int item ) +{ + TQColor c; + switch(selectedPalette) { + case 0: + default: + c = editPalette.active().color( effectFromItem(item) ); + break; + case 1: + editPalette.inactive().color( effectFromItem(item) ); + break; + case 2: + editPalette.disabled().color( effectFromItem(item) ); + break; + } + buttonEffect->setColor(c); +} + +void PaletteEditorAdvanced::mapToActiveCentralRole( const TQColor& c ) +{ + TQColorGroup cg = editPalette.active(); + cg.setColor( centralFromItem(comboCentral->currentItem()), c ); + editPalette.setActive( cg ); + + buildActiveEffect(); + if(checkBuildInactive->isChecked()) + buildInactive(); + if(checkBuildDisabled->isChecked()) + buildDisabled(); + + setPreviewPalette( editPalette ); +} + +void PaletteEditorAdvanced::mapToActiveEffectRole( const TQColor& c ) +{ + TQColorGroup cg = editPalette.active(); + cg.setColor( effectFromItem(comboEffect->currentItem()), c ); + editPalette.setActive( cg ); + + if(checkBuildInactive->isChecked()) + buildInactive(); + if(checkBuildDisabled->isChecked()) + buildDisabled(); + + setPreviewPalette( editPalette ); +} + +void PaletteEditorAdvanced::mapToActivePixmapRole( const TQPixmap& pm ) +{ + TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); + TQColorGroup cg = editPalette.active(); + if ( !pm.isNull() ) + cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); + else + cg.setBrush( role, TQBrush( cg.color( role ) ) ); + editPalette.setActive( cg ); + + + buildActiveEffect(); + if(checkBuildInactive->isChecked()) + buildInactive(); + if(checkBuildDisabled->isChecked()) + buildDisabled(); + + setPreviewPalette( editPalette ); +} + +void PaletteEditorAdvanced::mapToInactiveCentralRole( const TQColor& c ) +{ + TQColorGroup cg = editPalette.inactive(); + cg.setColor( centralFromItem(comboCentral->currentItem()), c ); + editPalette.setInactive( cg ); + + buildInactiveEffect(); + + setPreviewPalette( editPalette ); +} + +void PaletteEditorAdvanced::mapToInactiveEffectRole( const TQColor& c ) +{ + TQColorGroup cg = editPalette.inactive(); + cg.setColor( effectFromItem(comboEffect->currentItem()), c ); + editPalette.setInactive( cg ); + + setPreviewPalette( editPalette ); +} + +void PaletteEditorAdvanced::mapToInactivePixmapRole( const TQPixmap& pm ) +{ + TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); + TQColorGroup cg = editPalette.inactive(); + if ( !pm.isNull() ) + cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); + else + cg.setBrush( role, TQBrush( cg.color( role ) ) ); + editPalette.setInactive( cg ); + + setPreviewPalette( editPalette ); +} + +void PaletteEditorAdvanced::mapToDisabledCentralRole( const TQColor& c ) +{ + TQColorGroup cg = editPalette.disabled(); + cg.setColor( centralFromItem(comboCentral->currentItem()), c ); + editPalette.setDisabled( cg ); + + buildDisabledEffect(); + + setPreviewPalette( editPalette ); +} + +void PaletteEditorAdvanced::mapToDisabledEffectRole( const TQColor& c ) +{ + TQColorGroup cg = editPalette.disabled(); + cg.setColor( effectFromItem(comboEffect->currentItem()), c ); + editPalette.setDisabled( cg ); + + setPreviewPalette( editPalette ); +} + +void PaletteEditorAdvanced::mapToDisabledPixmapRole( const TQPixmap& pm ) +{ + TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); + TQColorGroup cg = editPalette.disabled(); + if ( !pm.isNull() ) + cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); + else + cg.setBrush( role, TQBrush( cg.color( role ) ) ); + + editPalette.setDisabled( cg ); + + setPreviewPalette( editPalette ); +} + +void PaletteEditorAdvanced::buildActiveEffect() +{ + TQColorGroup cg = editPalette.active(); + TQColor btn = cg.color( TQColorGroup::Button ); + + TQPalette temp( btn, btn ); + + for (int i = 0; i<5; i++) + cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) ); + + editPalette.setActive( cg ); + setPreviewPalette( editPalette ); + + updateStyledButtons(); +} + +void PaletteEditorAdvanced::buildInactive() +{ + editPalette.setInactive( editPalette.active() ); + buildInactiveEffect(); +} + +void PaletteEditorAdvanced::buildInactiveEffect() +{ + TQColorGroup cg = editPalette.inactive(); + + TQColor light, midlight, mid, dark, shadow; + TQColor btn = cg.color( TQColorGroup::Button ); + + light = btn.light(150); + midlight = btn.light(115); + mid = btn.dark(150); + dark = btn.dark(); + shadow = black; + + cg.setColor( TQColorGroup::Light, light ); + cg.setColor( TQColorGroup::Midlight, midlight ); + cg.setColor( TQColorGroup::Mid, mid ); + cg.setColor( TQColorGroup::Dark, dark ); + cg.setColor( TQColorGroup::Shadow, shadow ); + + editPalette.setInactive( cg ); + setPreviewPalette( editPalette ); + updateStyledButtons(); +} + +void PaletteEditorAdvanced::buildDisabled() +{ + TQColorGroup cg = editPalette.active(); + cg.setColor( TQColorGroup::ButtonText, darkGray ); + cg.setColor( TQColorGroup::Foreground, darkGray ); + editPalette.setDisabled( cg ); + + buildDisabledEffect(); +} + +void PaletteEditorAdvanced::buildDisabledEffect() +{ + TQColorGroup cg = editPalette.disabled(); + + TQColor light, midlight, mid, dark, shadow; + TQColor btn = cg.color( TQColorGroup::Button ); + + light = btn.light(150); + midlight = btn.light(115); + mid = btn.dark(150); + dark = btn.dark(); + shadow = black; + + cg.setColor( TQColorGroup::Light, light ); + cg.setColor( TQColorGroup::Midlight, midlight ); + cg.setColor( TQColorGroup::Mid, mid ); + cg.setColor( TQColorGroup::Dark, dark ); + cg.setColor( TQColorGroup::Shadow, shadow ); + + editPalette.setDisabled( cg ); + setPreviewPalette( editPalette ); + updateStyledButtons(); +} + +void PaletteEditorAdvanced::setPreviewPalette( const TQPalette& pal ) +{ + TQColorGroup cg; + + switch (selectedPalette) { + case 0: + default: + cg = pal.active(); + break; + case 1: + cg = pal.inactive(); + break; + case 2: + cg = pal.disabled(); + break; + } + previewPalette.setActive( cg ); + previewPalette.setInactive( cg ); + previewPalette.setDisabled( cg ); +} + +void PaletteEditorAdvanced::updateStyledButtons() +{ + TQColor central, effect; + TQPixmap *pm = 0; + switch (selectedPalette) { + case 0: + default: + central = editPalette.active().color( centralFromItem( comboCentral->currentItem() ) ); + effect = editPalette.active().color( effectFromItem( comboEffect->currentItem() ) ); + pm = editPalette.active().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); + break; + case 1: + central = editPalette.inactive().color( centralFromItem( comboCentral->currentItem() ) ); + effect = editPalette.inactive().color( effectFromItem( comboEffect->currentItem() ) ); + pm = editPalette.inactive().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); + break; + case 2: + central = editPalette.disabled().color( centralFromItem( comboCentral->currentItem() ) ); + effect = editPalette.disabled().color( effectFromItem( comboEffect->currentItem() ) ); + pm = editPalette.disabled().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); + break; + } + + buttonCentral->setColor(central); + buttonEffect->setColor(effect); + if ( pm && !pm->isNull() ) + buttonPixmap->setPixmap( *pm ); + else + buttonPixmap->setPixmap(TQPixmap()); +} + +void PaletteEditorAdvanced::setPal( const TQPalette& pal ) +{ + editPalette = pal; + setPreviewPalette( pal ); + updateStyledButtons(); +} + +TQPalette PaletteEditorAdvanced::pal() const +{ + return editPalette; +} + +void PaletteEditorAdvanced::setupBackgroundMode( BackgroundMode mode ) +{ + int initRole = 0; + + switch( mode ) { + case PaletteBackground: + initRole = 0; + break; + case PaletteForeground: + initRole = 1; + break; + case PaletteButton: + initRole = 2; + break; + case PaletteBase: + initRole = 3; + break; + case PaletteText: + initRole = 4; + break; + case PaletteBrightText: + initRole = 5; + break; + case PaletteButtonText: + initRole = 6; + break; + case PaletteHighlight: + initRole = 7; + break; + case PaletteHighlightedText: + initRole = 8; + break; + case PaletteLight: + initRole = 9; + break; + case PaletteMidlight: + initRole = 10; + break; + case PaletteDark: + initRole = 11; + break; + case PaletteMid: + initRole = 12; + break; + case PaletteShadow: + initRole = 13; + break; + default: + initRole = -1; + break; + } + + if ( initRole <= -1 ) return; + + if (initRole > 8 ) { + comboEffect->setCurrentItem( initRole - 9 ); + if ( comboEffect->listBox() ) { + TQString text = comboEffect->currentText(); + comboEffect->listBox()->changeItem( new BoldListBoxText( text ), initRole - 9 ); + } + } + else { + comboCentral->setCurrentItem( initRole ); + if ( comboCentral->listBox() ) { + TQString text = comboCentral->currentText(); + comboCentral->listBox()->changeItem( new BoldListBoxText( text ), initRole ); + } + } +} + +TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init, + BackgroundMode mode, TQWidget* parent, + const char* name, FormWindow *fw ) +{ + PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, TRUE ); + dlg->setupBackgroundMode( mode ); + + if ( init != TQPalette() ) + dlg->setPal( init ); + int resultCode = dlg->exec(); + + TQPalette result = init; + if ( resultCode == TQDialog::Accepted ) { + if ( ok ) + *ok = TRUE; + result = dlg->pal(); + } else { + if ( ok ) + *ok = FALSE; + } + delete dlg; + return result; +} diff --git a/kdevdesigner/designer/paletteeditoradvancedimpl.h b/kdevdesigner/designer/paletteeditoradvancedimpl.h new file mode 100644 index 00000000..1fb59912 --- /dev/null +++ b/kdevdesigner/designer/paletteeditoradvancedimpl.h @@ -0,0 +1,97 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PALETTEEDITORADVANCEDIMPL_H +#define PALETTEEDITORADVANCEDIMPL_H + +#include "paletteeditoradvanced.h" + +class FormWindow; + +class PaletteEditorAdvanced : public PaletteEditorAdvancedBase +{ + Q_OBJECT + +public: + PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent=0, const char * name=0, + bool modal=FALSE, WFlags f=0 ); + ~PaletteEditorAdvanced(); + + static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground, + TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 ); + +protected slots: + void paletteSelected(int); + + void onCentral( int ); + void onEffect( int ); + + void onChooseCentralColor(); + void onChooseEffectColor(); + void onChoosePixmap(); + + void onToggleBuildEffects( bool ); + void onToggleBuildInactive( bool ); + void onToggleBuildDisabled( bool ); + +protected: + void mapToActiveCentralRole( const TQColor& ); + void mapToActiveEffectRole( const TQColor& ); + void mapToActivePixmapRole( const TQPixmap& ); + void mapToInactiveCentralRole( const TQColor& ); + void mapToInactiveEffectRole( const TQColor& ); + void mapToInactivePixmapRole( const TQPixmap& ); + void mapToDisabledCentralRole( const TQColor& ); + void mapToDisabledEffectRole( const TQColor& ); + void mapToDisabledPixmapRole( const TQPixmap& ); + + + void buildPalette(); + void buildActiveEffect(); + void buildInactive(); + void buildInactiveEffect(); + void buildDisabled(); + void buildDisabledEffect(); + +private: + void setPreviewPalette( const TQPalette& ); + void updateStyledButtons(); + void setupBackgroundMode( BackgroundMode ); + + TQPalette pal() const; + void setPal( const TQPalette& ); + + TQColorGroup::ColorRole centralFromItem( int ); + TQColorGroup::ColorRole effectFromItem( int ); + TQPalette editPalette; + TQPalette previewPalette; + + FormWindow *formWindow; + + int selectedPalette; +}; + +#endif diff --git a/kdevdesigner/designer/paletteeditorimpl.cpp b/kdevdesigner/designer/paletteeditorimpl.cpp new file mode 100644 index 00000000..ae0cf7fd --- /dev/null +++ b/kdevdesigner/designer/paletteeditorimpl.cpp @@ -0,0 +1,304 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "paletteeditorimpl.h" +#include "paletteeditoradvancedimpl.h" +#include "previewframe.h" +#include "styledbutton.h" +#include "mainwindow.h" +#include "formwindow.h" + +#include +#include +#include +#include + +PaletteEditor::PaletteEditor( FormWindow *fw, TQWidget * parent, const char * name, bool modal, WFlags f ) + : PaletteEditorBase( parent, name, modal, f ), formWindow( fw ) +{ + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + + editPalette = TQApplication::palette(); + setPreviewPalette( editPalette ); + + buttonMainColor->setColor( editPalette.active().color( TQColorGroup::Button ) ); + buttonMainColor2->setColor( editPalette.active().color( TQColorGroup::Background ) ); +} + +PaletteEditor::~PaletteEditor() +{ +} + +void PaletteEditor::onTune() +{ + bool ok; + TQPalette pal = PaletteEditorAdvanced::getPalette( &ok, editPalette, backgroundMode, this, "tune_palette", formWindow); + if (!ok) return; + + editPalette = pal; + setPreviewPalette( editPalette ); +} + +void PaletteEditor::onChooseMainColor() +{ + buildPalette(); +} + +void PaletteEditor::onChoose2ndMainColor() +{ + buildPalette(); +} + +void PaletteEditor::paletteSelected(int) +{ + setPreviewPalette(editPalette); +} + +TQColorGroup::ColorRole PaletteEditor::centralFromItem( int item ) +{ + switch( item ) + { + case 0: + return TQColorGroup::Background; + case 1: + return TQColorGroup::Foreground; + case 2: + return TQColorGroup::Button; + case 3: + return TQColorGroup::Base; + case 4: + return TQColorGroup::Text; + case 5: + return TQColorGroup::BrightText; + case 6: + return TQColorGroup::ButtonText; + case 7: + return TQColorGroup::Highlight; + case 8: + return TQColorGroup::HighlightedText; + default: + return TQColorGroup::NColorRoles; + } +} + +TQColorGroup::ColorRole PaletteEditor::effectFromItem( int item ) +{ + switch( item ) + { + case 0: + return TQColorGroup::Light; + case 1: + return TQColorGroup::Midlight; + case 2: + return TQColorGroup::Mid; + case 3: + return TQColorGroup::Dark; + case 4: + return TQColorGroup::Shadow; + default: + return TQColorGroup::NColorRoles; + } +} + +void PaletteEditor::buildPalette() +{ + int i; + TQColorGroup cg; + TQColor btn = buttonMainColor->color(); + TQColor back = buttonMainColor2->color(); + TQPalette automake( btn, back ); + + for (i = 0; i<9; i++) + cg.setColor( centralFromItem(i), automake.active().color( centralFromItem(i) ) ); + + editPalette.setActive( cg ); + buildActiveEffect(); + + cg = editPalette.inactive(); + + TQPalette temp( editPalette.active().color( TQColorGroup::Button ), + editPalette.active().color( TQColorGroup::Background ) ); + + for (i = 0; i<9; i++) + cg.setColor( centralFromItem(i), temp.inactive().color( centralFromItem(i) ) ); + + editPalette.setInactive( cg ); + buildInactiveEffect(); + + cg = editPalette.disabled(); + + for (i = 0; i<9; i++) + cg.setColor( centralFromItem(i), temp.disabled().color( centralFromItem(i) ) ); + + editPalette.setDisabled( cg ); + buildDisabledEffect(); + + updateStyledButtons(); +} + +void PaletteEditor::buildActiveEffect() +{ + TQColorGroup cg = editPalette.active(); + TQColor btn = cg.color( TQColorGroup::Button ); + + TQPalette temp( btn, btn ); + + for (int i = 0; i<5; i++) + cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) ); + + editPalette.setActive( cg ); + setPreviewPalette( editPalette ); + + updateStyledButtons(); +} + +void PaletteEditor::buildInactive() +{ + editPalette.setInactive( editPalette.active() ); + buildInactiveEffect(); +} + +void PaletteEditor::buildInactiveEffect() +{ + TQColorGroup cg = editPalette.inactive(); + + TQColor light, midlight, mid, dark, shadow; + TQColor btn = cg.color( TQColorGroup::Button ); + + light = btn.light(150); + midlight = btn.light(115); + mid = btn.dark(150); + dark = btn.dark(); + shadow = black; + + cg.setColor( TQColorGroup::Light, light ); + cg.setColor( TQColorGroup::Midlight, midlight ); + cg.setColor( TQColorGroup::Mid, mid ); + cg.setColor( TQColorGroup::Dark, dark ); + cg.setColor( TQColorGroup::Shadow, shadow ); + + editPalette.setInactive( cg ); + setPreviewPalette( editPalette ); + updateStyledButtons(); +} + +void PaletteEditor::buildDisabled() +{ + TQColorGroup cg = editPalette.active(); + cg.setColor( TQColorGroup::ButtonText, darkGray ); + cg.setColor( TQColorGroup::Foreground, darkGray ); + editPalette.setDisabled( cg ); + + buildDisabledEffect(); +} + +void PaletteEditor::buildDisabledEffect() +{ + TQColorGroup cg = editPalette.disabled(); + + TQColor light, midlight, mid, dark, shadow; + TQColor btn = cg.color( TQColorGroup::Button ); + + light = btn.light(150); + midlight = btn.light(115); + mid = btn.dark(150); + dark = btn.dark(); + shadow = black; + + cg.setColor( TQColorGroup::Light, light ); + cg.setColor( TQColorGroup::Midlight, midlight ); + cg.setColor( TQColorGroup::Mid, mid ); + cg.setColor( TQColorGroup::Dark, dark ); + cg.setColor( TQColorGroup::Shadow, shadow ); + + editPalette.setDisabled( cg ); + setPreviewPalette( editPalette ); + updateStyledButtons(); +} + +void PaletteEditor::setPreviewPalette( const TQPalette& pal ) +{ + TQColorGroup cg; + + switch (paletteCombo->currentItem()) { + case 0: + default: + cg = pal.active(); + break; + case 1: + cg = pal.inactive(); + break; + case 2: + cg = pal.disabled(); + break; + } + previewPalette.setActive( cg ); + previewPalette.setInactive( cg ); + previewPalette.setDisabled( cg ); + + previewFrame->setPreviewPalette(previewPalette); +} + +void PaletteEditor::updateStyledButtons() +{ + buttonMainColor->setColor( editPalette.active().color( TQColorGroup::Button )); + buttonMainColor2->setColor( editPalette.active().color( TQColorGroup::Background )); +} + +void PaletteEditor::setPal( const TQPalette& pal ) +{ + editPalette = pal; + setPreviewPalette( pal ); + updateStyledButtons(); +} + +TQPalette PaletteEditor::pal() const +{ + return editPalette; +} + +TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode, + TQWidget* parent, const char* name, FormWindow *fw ) +{ + PaletteEditor* dlg = new PaletteEditor( fw, parent, name, TRUE ); + dlg->setupBackgroundMode( mode ); + + if ( init != TQPalette() ) + dlg->setPal( init ); + int resultCode = dlg->exec(); + + TQPalette result = init; + if ( resultCode == TQDialog::Accepted ) { + if ( ok ) + *ok = TRUE; + result = dlg->pal(); + } else { + if ( ok ) + *ok = FALSE; + } + delete dlg; + return result; +} diff --git a/kdevdesigner/designer/paletteeditorimpl.h b/kdevdesigner/designer/paletteeditorimpl.h new file mode 100644 index 00000000..c1943a61 --- /dev/null +++ b/kdevdesigner/designer/paletteeditorimpl.h @@ -0,0 +1,77 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PALETTEEDITORIMPL_H +#define PALETTEEDITORIMPL_H + +#include "paletteeditor.h" + +class FormWindow; + +class PaletteEditor : public PaletteEditorBase +{ + Q_OBJECT + + +public: + PaletteEditor( FormWindow *fw, TQWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 ); + ~PaletteEditor(); + + static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground, + TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 ); + +protected slots: + void onChooseMainColor(); + void onChoose2ndMainColor(); + void onTune(); + void paletteSelected(int); + +protected: + void buildPalette(); + void buildActiveEffect(); + void buildInactive(); + void buildInactiveEffect(); + void buildDisabled(); + void buildDisabledEffect(); + +private: + void setPreviewPalette( const TQPalette& ); + void updateStyledButtons(); + void setupBackgroundMode( BackgroundMode mode ) { backgroundMode = mode; } + + TQPalette pal() const; + void setPal( const TQPalette& ); + + TQColorGroup::ColorRole centralFromItem( int ); + TQColorGroup::ColorRole effectFromItem( int ); + TQPalette editPalette; + TQPalette previewPalette; + + FormWindow *formWindow; + BackgroundMode backgroundMode; +}; + +#endif diff --git a/kdevdesigner/designer/pics/CMakeLists.txt b/kdevdesigner/designer/pics/CMakeLists.txt new file mode 100644 index 00000000..3b6367c0 --- /dev/null +++ b/kdevdesigner/designer/pics/CMakeLists.txt @@ -0,0 +1,85 @@ +################################################# +# +# (C) 2012 Slavek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +install( + FILES + designer_adjustsize.png designer_appicon.png designer_arrow.png + designer_background.png designer_book.png designer_buttongroup.png + designer_checkbox.png designer_combobox.png designer_connecttool.png + designer_cross.png designer_customwidget.png designer_d_adjustsize.png + designer_d_book.png designer_d_buttongroup.png designer_d_checkbox.png + designer_d_combobox.png designer_d_connecttool.png designer_d_customwidget.png + designer_d_databrowser.png designer_d_datatable.png designer_d_dataview.png + designer_d_dateedit.png designer_d_datetimeedit.png designer_d_dial.png + designer_d_down.png designer_d_editbreaklayout.png designer_d_editcopy.png + designer_d_editcut.png designer_d_editdelete.png designer_d_editgrid.png + designer_d_edithlayout.png designer_d_edithlayoutsplit.png + designer_d_editlower.png designer_d_editpaste.png designer_d_editraise.png + designer_d_editslots.png designer_d_editvlayout.png + designer_d_editvlayoutsplit.png designer_d_filenew.png designer_d_fileopen.png + designer_d_filesave.png designer_d_folder.png designer_d_form.png + designer_d_frame.png designer_d_groupbox.png designer_d_help.png + designer_d_home.png designer_d_iconview.png designer_d_image.png + designer_d_label.png designer_d_layout.png designer_d_lcdnumber.png + designer_d_left.png designer_d_line.png designer_d_lineedit.png + designer_d_listbox.png designer_d_listview.png designer_d_multilineedit.png + designer_d_newform.png designer_d_ordertool.png designer_d_pixlabel.png + designer_d_pointer.png designer_d_print.png designer_d_progress.png + designer_d_project.png designer_d_pushbutton.png designer_d_radiobutton.png + designer_d_redo.png designer_d_richtextedit.png designer_d_right.png + designer_d_scrollbar.png designer_d_searchfind.png designer_d_setbuddy.png + designer_d_slider.png designer_d_spacer.png designer_d_spinbox.png + designer_d_table.png designer_d_tabwidget.png designer_d_textbold.png + designer_d_textbrowser.png designer_d_textcenter.png designer_d_textedit.png + designer_d_textfont.png designer_d_texth1.png designer_d_texth2.png + designer_d_texth3.png designer_d_textitalic.png designer_d_textjustify.png + designer_d_textlarger.png designer_d_textleft.png designer_d_textlinebreak.png + designer_d_textparagraph.png designer_d_textright.png designer_d_textsmaller.png + designer_d_textteletext.png designer_d_textunderline.png designer_d_textview.png + designer_d_timeedit.png designer_d_toolbox.png designer_d_toolbutton.png + designer_d_undo.png designer_d_up.png designer_d_widgetstack.png + designer_d_wizarddata.png designer_d_wizarddialog.png designer_d_wordwrap.png + designer_databrowser.png designer_datatable.png designer_dataview.png + designer_dateedit.png designer_datetimeedit.png designer_dial.png + designer_down.png designer_editbreaklayout.png designer_editcopy.png + designer_editcut.png designer_editdelete.png designer_editgrid.png + designer_edithlayout.png designer_edithlayoutsplit.png designer_editlower.png + designer_editpaste.png designer_editraise.png designer_editslots.png + designer_editvlayout.png designer_editvlayoutsplit.png designer_filenew.png + designer_fileopen.png designer_filesave.png designer_folder.png + designer_form.png designer_frame.png designer_groupbox.png designer_hand.png + designer_help.png designer_home.png designer_hsplit.png designer_ibeam.png + designer_iconview.png designer_image.png designer_label.png designer_layout.png + designer_lcdnumber.png designer_left.png designer_line.png designer_lineedit.png + designer_listbox.png designer_listview.png designer_multilineedit.png + designer_newform.png designer_no.png designer_object.png designer_ordertool.png + designer_pixlabel.png designer_pointer.png designer_print.png + designer_progress.png designer_project.png designer_pushbutton.png + designer_qtlogo.png designer_radiobutton.png designer_redo.png + designer_resetproperty.png designer_richtextedit.png designer_right.png + designer_s_down.png designer_s_editcut.png designer_s_left.png + designer_s_right.png designer_s_up.png designer_scrollbar.png + designer_searchfind.png designer_setbuddy.png designer_sizeall.png + designer_sizeb.png designer_sizef.png designer_sizeh.png designer_sizev.png + designer_slider.png designer_spacer.png designer_spinbox.png designer_splash.png + designer_table.png designer_tabwidget.png designer_textbold.png + designer_textbrowser.png designer_textcenter.png designer_textedit.png + designer_textfont.png designer_texth1.png designer_texth2.png + designer_texth3.png designer_textitalic.png designer_textjustify.png + designer_textlarger.png designer_textleft.png designer_textlinebreak.png + designer_textparagraph.png designer_textright.png designer_textsmaller.png + designer_textteletext.png designer_textunderline.png designer_textview.png + designer_timeedit.png designer_toolbox.png designer_toolbutton.png + designer_undo.png designer_up.png designer_uparrow.png designer_vsplit.png + designer_wait.png designer_widgetstack.png designer_wizarddata.png + designer_wizarddialog.png designer_wordwrap.png + DESTINATION ${DATA_INSTALL_DIR}/kdevdesignerpart/pics +) diff --git a/kdevdesigner/designer/pics/Makefile.am b/kdevdesigner/designer/pics/Makefile.am new file mode 100644 index 00000000..8749186b --- /dev/null +++ b/kdevdesigner/designer/pics/Makefile.am @@ -0,0 +1,2 @@ +picsdirdir = $(kde_datadir)/kdevdesignerpart/pics +picsdir_DATA = designer_adjustsize.png designer_appicon.png designer_arrow.png designer_background.png designer_book.png designer_buttongroup.png designer_checkbox.png designer_combobox.png designer_connecttool.png designer_cross.png designer_customwidget.png designer_d_adjustsize.png designer_d_book.png designer_d_buttongroup.png designer_d_checkbox.png designer_d_combobox.png designer_d_connecttool.png designer_d_customwidget.png designer_d_databrowser.png designer_d_datatable.png designer_d_dataview.png designer_d_dateedit.png designer_d_datetimeedit.png designer_d_dial.png designer_d_down.png designer_d_editbreaklayout.png designer_d_editcopy.png designer_d_editcut.png designer_d_editdelete.png designer_d_editgrid.png designer_d_edithlayout.png designer_d_edithlayoutsplit.png designer_d_editlower.png designer_d_editpaste.png designer_d_editraise.png designer_d_editslots.png designer_d_editvlayout.png designer_d_editvlayoutsplit.png designer_d_filenew.png designer_d_fileopen.png designer_d_filesave.png designer_d_folder.png designer_d_form.png designer_d_frame.png designer_d_groupbox.png designer_d_help.png designer_d_home.png designer_d_iconview.png designer_d_image.png designer_d_label.png designer_d_layout.png designer_d_lcdnumber.png designer_d_left.png designer_d_line.png designer_d_lineedit.png designer_d_listbox.png designer_d_listview.png designer_d_multilineedit.png designer_d_newform.png designer_d_ordertool.png designer_d_pixlabel.png designer_d_pointer.png designer_d_print.png designer_d_progress.png designer_d_project.png designer_d_pushbutton.png designer_d_radiobutton.png designer_d_redo.png designer_d_richtextedit.png designer_d_right.png designer_d_scrollbar.png designer_d_searchfind.png designer_d_setbuddy.png designer_d_slider.png designer_d_spacer.png designer_d_spinbox.png designer_d_table.png designer_d_tabwidget.png designer_d_textbold.png designer_d_textbrowser.png designer_d_textcenter.png designer_d_textedit.png designer_d_textfont.png designer_d_texth1.png designer_d_texth2.png designer_d_texth3.png designer_d_textitalic.png designer_d_textjustify.png designer_d_textlarger.png designer_d_textleft.png designer_d_textlinebreak.png designer_d_textparagraph.png designer_d_textright.png designer_d_textsmaller.png designer_d_textteletext.png designer_d_textunderline.png designer_d_textview.png designer_d_timeedit.png designer_d_toolbox.png designer_d_toolbutton.png designer_d_undo.png designer_d_up.png designer_d_widgetstack.png designer_d_wizarddata.png designer_d_wizarddialog.png designer_d_wordwrap.png designer_databrowser.png designer_datatable.png designer_dataview.png designer_dateedit.png designer_datetimeedit.png designer_dial.png designer_down.png designer_editbreaklayout.png designer_editcopy.png designer_editcut.png designer_editdelete.png designer_editgrid.png designer_edithlayout.png designer_edithlayoutsplit.png designer_editlower.png designer_editpaste.png designer_editraise.png designer_editslots.png designer_editvlayout.png designer_editvlayoutsplit.png designer_filenew.png designer_fileopen.png designer_filesave.png designer_folder.png designer_form.png designer_frame.png designer_groupbox.png designer_hand.png designer_help.png designer_home.png designer_hsplit.png designer_ibeam.png designer_iconview.png designer_image.png designer_label.png designer_layout.png designer_lcdnumber.png designer_left.png designer_line.png designer_lineedit.png designer_listbox.png designer_listview.png designer_multilineedit.png designer_newform.png designer_no.png designer_object.png designer_ordertool.png designer_pixlabel.png designer_pointer.png designer_print.png designer_progress.png designer_project.png designer_pushbutton.png designer_qtlogo.png designer_radiobutton.png designer_redo.png designer_resetproperty.png designer_richtextedit.png designer_right.png designer_s_down.png designer_s_editcut.png designer_s_left.png designer_s_right.png designer_s_up.png designer_scrollbar.png designer_searchfind.png designer_setbuddy.png designer_sizeall.png designer_sizeb.png designer_sizef.png designer_sizeh.png designer_sizev.png designer_slider.png designer_spacer.png designer_spinbox.png designer_splash.png designer_table.png designer_tabwidget.png designer_textbold.png designer_textbrowser.png designer_textcenter.png designer_textedit.png designer_textfont.png designer_texth1.png designer_texth2.png designer_texth3.png designer_textitalic.png designer_textjustify.png designer_textlarger.png designer_textleft.png designer_textlinebreak.png designer_textparagraph.png designer_textright.png designer_textsmaller.png designer_textteletext.png designer_textunderline.png designer_textview.png designer_timeedit.png designer_toolbox.png designer_toolbutton.png designer_undo.png designer_up.png designer_uparrow.png designer_vsplit.png designer_wait.png designer_widgetstack.png designer_wizarddata.png designer_wizarddialog.png designer_wordwrap.png diff --git a/kdevdesigner/designer/pics/designer_adjustsize.png b/kdevdesigner/designer/pics/designer_adjustsize.png new file mode 100644 index 00000000..6ade1e22 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_adjustsize.png differ diff --git a/kdevdesigner/designer/pics/designer_appicon.png b/kdevdesigner/designer/pics/designer_appicon.png new file mode 100644 index 00000000..7aadcbad Binary files /dev/null and b/kdevdesigner/designer/pics/designer_appicon.png differ diff --git a/kdevdesigner/designer/pics/designer_arrow.png b/kdevdesigner/designer/pics/designer_arrow.png new file mode 100644 index 00000000..53921d83 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_arrow.png differ diff --git a/kdevdesigner/designer/pics/designer_background.png b/kdevdesigner/designer/pics/designer_background.png new file mode 100644 index 00000000..27d2e997 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_background.png differ diff --git a/kdevdesigner/designer/pics/designer_book.png b/kdevdesigner/designer/pics/designer_book.png new file mode 100644 index 00000000..dd850abb Binary files /dev/null and b/kdevdesigner/designer/pics/designer_book.png differ diff --git a/kdevdesigner/designer/pics/designer_buttongroup.png b/kdevdesigner/designer/pics/designer_buttongroup.png new file mode 100644 index 00000000..d89e28fd Binary files /dev/null and b/kdevdesigner/designer/pics/designer_buttongroup.png differ diff --git a/kdevdesigner/designer/pics/designer_checkbox.png b/kdevdesigner/designer/pics/designer_checkbox.png new file mode 100644 index 00000000..ab6f53e0 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_checkbox.png differ diff --git a/kdevdesigner/designer/pics/designer_combobox.png b/kdevdesigner/designer/pics/designer_combobox.png new file mode 100644 index 00000000..7d4890a7 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_combobox.png differ diff --git a/kdevdesigner/designer/pics/designer_connecttool.png b/kdevdesigner/designer/pics/designer_connecttool.png new file mode 100644 index 00000000..fca6748f Binary files /dev/null and b/kdevdesigner/designer/pics/designer_connecttool.png differ diff --git a/kdevdesigner/designer/pics/designer_cross.png b/kdevdesigner/designer/pics/designer_cross.png new file mode 100644 index 00000000..d5e9f0c7 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_cross.png differ diff --git a/kdevdesigner/designer/pics/designer_customwidget.png b/kdevdesigner/designer/pics/designer_customwidget.png new file mode 100644 index 00000000..ab790e1f Binary files /dev/null and b/kdevdesigner/designer/pics/designer_customwidget.png differ diff --git a/kdevdesigner/designer/pics/designer_d_adjustsize.png b/kdevdesigner/designer/pics/designer_d_adjustsize.png new file mode 100644 index 00000000..d61ca7af Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_adjustsize.png differ diff --git a/kdevdesigner/designer/pics/designer_d_book.png b/kdevdesigner/designer/pics/designer_d_book.png new file mode 100644 index 00000000..5517f0c4 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_book.png differ diff --git a/kdevdesigner/designer/pics/designer_d_buttongroup.png b/kdevdesigner/designer/pics/designer_d_buttongroup.png new file mode 100644 index 00000000..1e451a88 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_buttongroup.png differ diff --git a/kdevdesigner/designer/pics/designer_d_checkbox.png b/kdevdesigner/designer/pics/designer_d_checkbox.png new file mode 100644 index 00000000..1415eabb Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_checkbox.png differ diff --git a/kdevdesigner/designer/pics/designer_d_combobox.png b/kdevdesigner/designer/pics/designer_d_combobox.png new file mode 100644 index 00000000..5fb44eff Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_combobox.png differ diff --git a/kdevdesigner/designer/pics/designer_d_connecttool.png b/kdevdesigner/designer/pics/designer_d_connecttool.png new file mode 100644 index 00000000..76a3b5f5 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_connecttool.png differ diff --git a/kdevdesigner/designer/pics/designer_d_customwidget.png b/kdevdesigner/designer/pics/designer_d_customwidget.png new file mode 100644 index 00000000..5ea648fb Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_customwidget.png differ diff --git a/kdevdesigner/designer/pics/designer_d_databrowser.png b/kdevdesigner/designer/pics/designer_d_databrowser.png new file mode 100644 index 00000000..c1155c8c Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_databrowser.png differ diff --git a/kdevdesigner/designer/pics/designer_d_datatable.png b/kdevdesigner/designer/pics/designer_d_datatable.png new file mode 100644 index 00000000..7060dc3a Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_datatable.png differ diff --git a/kdevdesigner/designer/pics/designer_d_dataview.png b/kdevdesigner/designer/pics/designer_d_dataview.png new file mode 100644 index 00000000..c507d416 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_dataview.png differ diff --git a/kdevdesigner/designer/pics/designer_d_dateedit.png b/kdevdesigner/designer/pics/designer_d_dateedit.png new file mode 100644 index 00000000..162e63a8 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_dateedit.png differ diff --git a/kdevdesigner/designer/pics/designer_d_datetimeedit.png b/kdevdesigner/designer/pics/designer_d_datetimeedit.png new file mode 100644 index 00000000..83dc2fc3 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_datetimeedit.png differ diff --git a/kdevdesigner/designer/pics/designer_d_dial.png b/kdevdesigner/designer/pics/designer_d_dial.png new file mode 100644 index 00000000..a84869e4 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_dial.png differ diff --git a/kdevdesigner/designer/pics/designer_d_down.png b/kdevdesigner/designer/pics/designer_d_down.png new file mode 100644 index 00000000..57b407e4 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_down.png differ diff --git a/kdevdesigner/designer/pics/designer_d_editbreaklayout.png b/kdevdesigner/designer/pics/designer_d_editbreaklayout.png new file mode 100644 index 00000000..2a36d67d Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_editbreaklayout.png differ diff --git a/kdevdesigner/designer/pics/designer_d_editcopy.png b/kdevdesigner/designer/pics/designer_d_editcopy.png new file mode 100644 index 00000000..500758d4 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_editcopy.png differ diff --git a/kdevdesigner/designer/pics/designer_d_editcut.png b/kdevdesigner/designer/pics/designer_d_editcut.png new file mode 100644 index 00000000..8d50ae0a Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_editcut.png differ diff --git a/kdevdesigner/designer/pics/designer_d_editdelete.png b/kdevdesigner/designer/pics/designer_d_editdelete.png new file mode 100644 index 00000000..f4d0f7a1 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_editdelete.png differ diff --git a/kdevdesigner/designer/pics/designer_d_editgrid.png b/kdevdesigner/designer/pics/designer_d_editgrid.png new file mode 100644 index 00000000..ad2b87b9 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_editgrid.png differ diff --git a/kdevdesigner/designer/pics/designer_d_edithlayout.png b/kdevdesigner/designer/pics/designer_d_edithlayout.png new file mode 100644 index 00000000..dacaf82e Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_edithlayout.png differ diff --git a/kdevdesigner/designer/pics/designer_d_edithlayoutsplit.png b/kdevdesigner/designer/pics/designer_d_edithlayoutsplit.png new file mode 100644 index 00000000..00a96055 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_edithlayoutsplit.png differ diff --git a/kdevdesigner/designer/pics/designer_d_editlower.png b/kdevdesigner/designer/pics/designer_d_editlower.png new file mode 100644 index 00000000..a0a16b40 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_editlower.png differ diff --git a/kdevdesigner/designer/pics/designer_d_editpaste.png b/kdevdesigner/designer/pics/designer_d_editpaste.png new file mode 100644 index 00000000..d31071e9 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_editpaste.png differ diff --git a/kdevdesigner/designer/pics/designer_d_editraise.png b/kdevdesigner/designer/pics/designer_d_editraise.png new file mode 100644 index 00000000..5f7f04b9 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_editraise.png differ diff --git a/kdevdesigner/designer/pics/designer_d_editslots.png b/kdevdesigner/designer/pics/designer_d_editslots.png new file mode 100644 index 00000000..cd791b43 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_editslots.png differ diff --git a/kdevdesigner/designer/pics/designer_d_editvlayout.png b/kdevdesigner/designer/pics/designer_d_editvlayout.png new file mode 100644 index 00000000..ed202af7 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_editvlayout.png differ diff --git a/kdevdesigner/designer/pics/designer_d_editvlayoutsplit.png b/kdevdesigner/designer/pics/designer_d_editvlayoutsplit.png new file mode 100644 index 00000000..54ee44c0 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_editvlayoutsplit.png differ diff --git a/kdevdesigner/designer/pics/designer_d_filenew.png b/kdevdesigner/designer/pics/designer_d_filenew.png new file mode 100644 index 00000000..d5e7061b Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_filenew.png differ diff --git a/kdevdesigner/designer/pics/designer_d_fileopen.png b/kdevdesigner/designer/pics/designer_d_fileopen.png new file mode 100644 index 00000000..343f0039 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_fileopen.png differ diff --git a/kdevdesigner/designer/pics/designer_d_filesave.png b/kdevdesigner/designer/pics/designer_d_filesave.png new file mode 100644 index 00000000..5d1476d2 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_filesave.png differ diff --git a/kdevdesigner/designer/pics/designer_d_folder.png b/kdevdesigner/designer/pics/designer_d_folder.png new file mode 100644 index 00000000..4bed3caf Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_folder.png differ diff --git a/kdevdesigner/designer/pics/designer_d_form.png b/kdevdesigner/designer/pics/designer_d_form.png new file mode 100644 index 00000000..9f89d654 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_form.png differ diff --git a/kdevdesigner/designer/pics/designer_d_frame.png b/kdevdesigner/designer/pics/designer_d_frame.png new file mode 100644 index 00000000..09b21b21 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_frame.png differ diff --git a/kdevdesigner/designer/pics/designer_d_groupbox.png b/kdevdesigner/designer/pics/designer_d_groupbox.png new file mode 100644 index 00000000..e7e01083 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_groupbox.png differ diff --git a/kdevdesigner/designer/pics/designer_d_help.png b/kdevdesigner/designer/pics/designer_d_help.png new file mode 100644 index 00000000..8f9d1826 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_help.png differ diff --git a/kdevdesigner/designer/pics/designer_d_home.png b/kdevdesigner/designer/pics/designer_d_home.png new file mode 100644 index 00000000..b3906a4f Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_home.png differ diff --git a/kdevdesigner/designer/pics/designer_d_iconview.png b/kdevdesigner/designer/pics/designer_d_iconview.png new file mode 100644 index 00000000..a07b2b75 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_iconview.png differ diff --git a/kdevdesigner/designer/pics/designer_d_image.png b/kdevdesigner/designer/pics/designer_d_image.png new file mode 100644 index 00000000..f7cb29c3 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_image.png differ diff --git a/kdevdesigner/designer/pics/designer_d_label.png b/kdevdesigner/designer/pics/designer_d_label.png new file mode 100644 index 00000000..bfbd5b88 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_label.png differ diff --git a/kdevdesigner/designer/pics/designer_d_layout.png b/kdevdesigner/designer/pics/designer_d_layout.png new file mode 100644 index 00000000..090b4bb2 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_layout.png differ diff --git a/kdevdesigner/designer/pics/designer_d_lcdnumber.png b/kdevdesigner/designer/pics/designer_d_lcdnumber.png new file mode 100644 index 00000000..786747e6 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_lcdnumber.png differ diff --git a/kdevdesigner/designer/pics/designer_d_left.png b/kdevdesigner/designer/pics/designer_d_left.png new file mode 100644 index 00000000..50d03bbe Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_left.png differ diff --git a/kdevdesigner/designer/pics/designer_d_line.png b/kdevdesigner/designer/pics/designer_d_line.png new file mode 100644 index 00000000..25b0daeb Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_line.png differ diff --git a/kdevdesigner/designer/pics/designer_d_lineedit.png b/kdevdesigner/designer/pics/designer_d_lineedit.png new file mode 100644 index 00000000..9d34ce97 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_lineedit.png differ diff --git a/kdevdesigner/designer/pics/designer_d_listbox.png b/kdevdesigner/designer/pics/designer_d_listbox.png new file mode 100644 index 00000000..d80c7900 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_listbox.png differ diff --git a/kdevdesigner/designer/pics/designer_d_listview.png b/kdevdesigner/designer/pics/designer_d_listview.png new file mode 100644 index 00000000..c5d9be3e Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_listview.png differ diff --git a/kdevdesigner/designer/pics/designer_d_multilineedit.png b/kdevdesigner/designer/pics/designer_d_multilineedit.png new file mode 100644 index 00000000..a62e6622 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_multilineedit.png differ diff --git a/kdevdesigner/designer/pics/designer_d_newform.png b/kdevdesigner/designer/pics/designer_d_newform.png new file mode 100644 index 00000000..ace61302 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_newform.png differ diff --git a/kdevdesigner/designer/pics/designer_d_ordertool.png b/kdevdesigner/designer/pics/designer_d_ordertool.png new file mode 100644 index 00000000..61bdc7ef Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_ordertool.png differ diff --git a/kdevdesigner/designer/pics/designer_d_pixlabel.png b/kdevdesigner/designer/pics/designer_d_pixlabel.png new file mode 100644 index 00000000..21e1f492 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_pixlabel.png differ diff --git a/kdevdesigner/designer/pics/designer_d_pointer.png b/kdevdesigner/designer/pics/designer_d_pointer.png new file mode 100644 index 00000000..e6903eb6 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_pointer.png differ diff --git a/kdevdesigner/designer/pics/designer_d_print.png b/kdevdesigner/designer/pics/designer_d_print.png new file mode 100644 index 00000000..6a72a764 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_print.png differ diff --git a/kdevdesigner/designer/pics/designer_d_progress.png b/kdevdesigner/designer/pics/designer_d_progress.png new file mode 100644 index 00000000..25d857a6 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_progress.png differ diff --git a/kdevdesigner/designer/pics/designer_d_project.png b/kdevdesigner/designer/pics/designer_d_project.png new file mode 100644 index 00000000..b265eae0 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_project.png differ diff --git a/kdevdesigner/designer/pics/designer_d_pushbutton.png b/kdevdesigner/designer/pics/designer_d_pushbutton.png new file mode 100644 index 00000000..635f35cb Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_pushbutton.png differ diff --git a/kdevdesigner/designer/pics/designer_d_radiobutton.png b/kdevdesigner/designer/pics/designer_d_radiobutton.png new file mode 100644 index 00000000..e86eb8c1 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_radiobutton.png differ diff --git a/kdevdesigner/designer/pics/designer_d_redo.png b/kdevdesigner/designer/pics/designer_d_redo.png new file mode 100644 index 00000000..6e993cc6 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_redo.png differ diff --git a/kdevdesigner/designer/pics/designer_d_richtextedit.png b/kdevdesigner/designer/pics/designer_d_richtextedit.png new file mode 100644 index 00000000..ba7ada19 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_richtextedit.png differ diff --git a/kdevdesigner/designer/pics/designer_d_right.png b/kdevdesigner/designer/pics/designer_d_right.png new file mode 100644 index 00000000..9dbf2dd6 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_right.png differ diff --git a/kdevdesigner/designer/pics/designer_d_scrollbar.png b/kdevdesigner/designer/pics/designer_d_scrollbar.png new file mode 100644 index 00000000..9a818970 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_scrollbar.png differ diff --git a/kdevdesigner/designer/pics/designer_d_searchfind.png b/kdevdesigner/designer/pics/designer_d_searchfind.png new file mode 100644 index 00000000..e85e33fe Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_searchfind.png differ diff --git a/kdevdesigner/designer/pics/designer_d_setbuddy.png b/kdevdesigner/designer/pics/designer_d_setbuddy.png new file mode 100644 index 00000000..fe816aa2 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_setbuddy.png differ diff --git a/kdevdesigner/designer/pics/designer_d_slider.png b/kdevdesigner/designer/pics/designer_d_slider.png new file mode 100644 index 00000000..a1ad5d5b Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_slider.png differ diff --git a/kdevdesigner/designer/pics/designer_d_spacer.png b/kdevdesigner/designer/pics/designer_d_spacer.png new file mode 100644 index 00000000..15319d99 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_spacer.png differ diff --git a/kdevdesigner/designer/pics/designer_d_spinbox.png b/kdevdesigner/designer/pics/designer_d_spinbox.png new file mode 100644 index 00000000..cafbe012 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_spinbox.png differ diff --git a/kdevdesigner/designer/pics/designer_d_table.png b/kdevdesigner/designer/pics/designer_d_table.png new file mode 100644 index 00000000..a95bde12 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_table.png differ diff --git a/kdevdesigner/designer/pics/designer_d_tabwidget.png b/kdevdesigner/designer/pics/designer_d_tabwidget.png new file mode 100644 index 00000000..0f0bad0d Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_tabwidget.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textbold.png b/kdevdesigner/designer/pics/designer_d_textbold.png new file mode 100644 index 00000000..6e8a5cf5 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textbold.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textbrowser.png b/kdevdesigner/designer/pics/designer_d_textbrowser.png new file mode 100644 index 00000000..b4315f90 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textbrowser.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textcenter.png b/kdevdesigner/designer/pics/designer_d_textcenter.png new file mode 100644 index 00000000..7a66036d Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textcenter.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textedit.png b/kdevdesigner/designer/pics/designer_d_textedit.png new file mode 100644 index 00000000..69314141 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textedit.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textfont.png b/kdevdesigner/designer/pics/designer_d_textfont.png new file mode 100644 index 00000000..beb2112b Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textfont.png differ diff --git a/kdevdesigner/designer/pics/designer_d_texth1.png b/kdevdesigner/designer/pics/designer_d_texth1.png new file mode 100644 index 00000000..87d7e157 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_texth1.png differ diff --git a/kdevdesigner/designer/pics/designer_d_texth2.png b/kdevdesigner/designer/pics/designer_d_texth2.png new file mode 100644 index 00000000..e90437b2 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_texth2.png differ diff --git a/kdevdesigner/designer/pics/designer_d_texth3.png b/kdevdesigner/designer/pics/designer_d_texth3.png new file mode 100644 index 00000000..1c7eefe5 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_texth3.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textitalic.png b/kdevdesigner/designer/pics/designer_d_textitalic.png new file mode 100644 index 00000000..d2c07fad Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textitalic.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textjustify.png b/kdevdesigner/designer/pics/designer_d_textjustify.png new file mode 100644 index 00000000..3fb3cc34 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textjustify.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textlarger.png b/kdevdesigner/designer/pics/designer_d_textlarger.png new file mode 100644 index 00000000..ecc35f54 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textlarger.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textleft.png b/kdevdesigner/designer/pics/designer_d_textleft.png new file mode 100644 index 00000000..90dc0248 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textleft.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textlinebreak.png b/kdevdesigner/designer/pics/designer_d_textlinebreak.png new file mode 100644 index 00000000..4566f59e Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textlinebreak.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textparagraph.png b/kdevdesigner/designer/pics/designer_d_textparagraph.png new file mode 100644 index 00000000..a7ef75c7 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textparagraph.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textright.png b/kdevdesigner/designer/pics/designer_d_textright.png new file mode 100644 index 00000000..ee89b93b Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textright.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textsmaller.png b/kdevdesigner/designer/pics/designer_d_textsmaller.png new file mode 100644 index 00000000..d4251de0 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textsmaller.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textteletext.png b/kdevdesigner/designer/pics/designer_d_textteletext.png new file mode 100644 index 00000000..d80af143 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textteletext.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textunderline.png b/kdevdesigner/designer/pics/designer_d_textunderline.png new file mode 100644 index 00000000..cab0b788 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textunderline.png differ diff --git a/kdevdesigner/designer/pics/designer_d_textview.png b/kdevdesigner/designer/pics/designer_d_textview.png new file mode 100644 index 00000000..05ce9c69 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_textview.png differ diff --git a/kdevdesigner/designer/pics/designer_d_timeedit.png b/kdevdesigner/designer/pics/designer_d_timeedit.png new file mode 100644 index 00000000..955144ec Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_timeedit.png differ diff --git a/kdevdesigner/designer/pics/designer_d_toolbox.png b/kdevdesigner/designer/pics/designer_d_toolbox.png new file mode 100644 index 00000000..e1f84471 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_toolbox.png differ diff --git a/kdevdesigner/designer/pics/designer_d_toolbutton.png b/kdevdesigner/designer/pics/designer_d_toolbutton.png new file mode 100644 index 00000000..08e309a7 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_toolbutton.png differ diff --git a/kdevdesigner/designer/pics/designer_d_undo.png b/kdevdesigner/designer/pics/designer_d_undo.png new file mode 100644 index 00000000..22ac97f2 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_undo.png differ diff --git a/kdevdesigner/designer/pics/designer_d_up.png b/kdevdesigner/designer/pics/designer_d_up.png new file mode 100644 index 00000000..4c3ab7c9 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_up.png differ diff --git a/kdevdesigner/designer/pics/designer_d_widgetstack.png b/kdevdesigner/designer/pics/designer_d_widgetstack.png new file mode 100644 index 00000000..c62f8e15 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_widgetstack.png differ diff --git a/kdevdesigner/designer/pics/designer_d_wizarddata.png b/kdevdesigner/designer/pics/designer_d_wizarddata.png new file mode 100644 index 00000000..fb540b87 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_wizarddata.png differ diff --git a/kdevdesigner/designer/pics/designer_d_wizarddialog.png b/kdevdesigner/designer/pics/designer_d_wizarddialog.png new file mode 100644 index 00000000..b83ca7e6 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_wizarddialog.png differ diff --git a/kdevdesigner/designer/pics/designer_d_wordwrap.png b/kdevdesigner/designer/pics/designer_d_wordwrap.png new file mode 100644 index 00000000..8a299033 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_d_wordwrap.png differ diff --git a/kdevdesigner/designer/pics/designer_databrowser.png b/kdevdesigner/designer/pics/designer_databrowser.png new file mode 100644 index 00000000..1dd95782 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_databrowser.png differ diff --git a/kdevdesigner/designer/pics/designer_datatable.png b/kdevdesigner/designer/pics/designer_datatable.png new file mode 100644 index 00000000..5b3bfc76 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_datatable.png differ diff --git a/kdevdesigner/designer/pics/designer_dataview.png b/kdevdesigner/designer/pics/designer_dataview.png new file mode 100644 index 00000000..5f6aad33 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_dataview.png differ diff --git a/kdevdesigner/designer/pics/designer_dateedit.png b/kdevdesigner/designer/pics/designer_dateedit.png new file mode 100644 index 00000000..48286bec Binary files /dev/null and b/kdevdesigner/designer/pics/designer_dateedit.png differ diff --git a/kdevdesigner/designer/pics/designer_datetimeedit.png b/kdevdesigner/designer/pics/designer_datetimeedit.png new file mode 100644 index 00000000..68a56737 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_datetimeedit.png differ diff --git a/kdevdesigner/designer/pics/designer_dial.png b/kdevdesigner/designer/pics/designer_dial.png new file mode 100644 index 00000000..260033c2 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_dial.png differ diff --git a/kdevdesigner/designer/pics/designer_down.png b/kdevdesigner/designer/pics/designer_down.png new file mode 100644 index 00000000..3269deca Binary files /dev/null and b/kdevdesigner/designer/pics/designer_down.png differ diff --git a/kdevdesigner/designer/pics/designer_editbreaklayout.png b/kdevdesigner/designer/pics/designer_editbreaklayout.png new file mode 100644 index 00000000..badbb8e7 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_editbreaklayout.png differ diff --git a/kdevdesigner/designer/pics/designer_editcopy.png b/kdevdesigner/designer/pics/designer_editcopy.png new file mode 100644 index 00000000..2f931cb2 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_editcopy.png differ diff --git a/kdevdesigner/designer/pics/designer_editcut.png b/kdevdesigner/designer/pics/designer_editcut.png new file mode 100644 index 00000000..a911482d Binary files /dev/null and b/kdevdesigner/designer/pics/designer_editcut.png differ diff --git a/kdevdesigner/designer/pics/designer_editdelete.png b/kdevdesigner/designer/pics/designer_editdelete.png new file mode 100644 index 00000000..9f0491dd Binary files /dev/null and b/kdevdesigner/designer/pics/designer_editdelete.png differ diff --git a/kdevdesigner/designer/pics/designer_editgrid.png b/kdevdesigner/designer/pics/designer_editgrid.png new file mode 100644 index 00000000..f2b18e8a Binary files /dev/null and b/kdevdesigner/designer/pics/designer_editgrid.png differ diff --git a/kdevdesigner/designer/pics/designer_edithlayout.png b/kdevdesigner/designer/pics/designer_edithlayout.png new file mode 100644 index 00000000..1a2b1504 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_edithlayout.png differ diff --git a/kdevdesigner/designer/pics/designer_edithlayoutsplit.png b/kdevdesigner/designer/pics/designer_edithlayoutsplit.png new file mode 100644 index 00000000..cba102bc Binary files /dev/null and b/kdevdesigner/designer/pics/designer_edithlayoutsplit.png differ diff --git a/kdevdesigner/designer/pics/designer_editlower.png b/kdevdesigner/designer/pics/designer_editlower.png new file mode 100644 index 00000000..50605f27 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_editlower.png differ diff --git a/kdevdesigner/designer/pics/designer_editpaste.png b/kdevdesigner/designer/pics/designer_editpaste.png new file mode 100644 index 00000000..b1b7f853 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_editpaste.png differ diff --git a/kdevdesigner/designer/pics/designer_editraise.png b/kdevdesigner/designer/pics/designer_editraise.png new file mode 100644 index 00000000..f1572517 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_editraise.png differ diff --git a/kdevdesigner/designer/pics/designer_editslots.png b/kdevdesigner/designer/pics/designer_editslots.png new file mode 100644 index 00000000..b86bddb6 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_editslots.png differ diff --git a/kdevdesigner/designer/pics/designer_editvlayout.png b/kdevdesigner/designer/pics/designer_editvlayout.png new file mode 100644 index 00000000..f4cd3f9c Binary files /dev/null and b/kdevdesigner/designer/pics/designer_editvlayout.png differ diff --git a/kdevdesigner/designer/pics/designer_editvlayoutsplit.png b/kdevdesigner/designer/pics/designer_editvlayoutsplit.png new file mode 100644 index 00000000..0180cf5a Binary files /dev/null and b/kdevdesigner/designer/pics/designer_editvlayoutsplit.png differ diff --git a/kdevdesigner/designer/pics/designer_filenew.png b/kdevdesigner/designer/pics/designer_filenew.png new file mode 100644 index 00000000..9520080e Binary files /dev/null and b/kdevdesigner/designer/pics/designer_filenew.png differ diff --git a/kdevdesigner/designer/pics/designer_fileopen.png b/kdevdesigner/designer/pics/designer_fileopen.png new file mode 100644 index 00000000..30052901 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_fileopen.png differ diff --git a/kdevdesigner/designer/pics/designer_filesave.png b/kdevdesigner/designer/pics/designer_filesave.png new file mode 100644 index 00000000..c137165b Binary files /dev/null and b/kdevdesigner/designer/pics/designer_filesave.png differ diff --git a/kdevdesigner/designer/pics/designer_folder.png b/kdevdesigner/designer/pics/designer_folder.png new file mode 100644 index 00000000..bab6df0f Binary files /dev/null and b/kdevdesigner/designer/pics/designer_folder.png differ diff --git a/kdevdesigner/designer/pics/designer_form.png b/kdevdesigner/designer/pics/designer_form.png new file mode 100644 index 00000000..08268bf7 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_form.png differ diff --git a/kdevdesigner/designer/pics/designer_frame.png b/kdevdesigner/designer/pics/designer_frame.png new file mode 100644 index 00000000..c070b9c4 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_frame.png differ diff --git a/kdevdesigner/designer/pics/designer_groupbox.png b/kdevdesigner/designer/pics/designer_groupbox.png new file mode 100644 index 00000000..4025b4dc Binary files /dev/null and b/kdevdesigner/designer/pics/designer_groupbox.png differ diff --git a/kdevdesigner/designer/pics/designer_hand.png b/kdevdesigner/designer/pics/designer_hand.png new file mode 100644 index 00000000..ac01ee60 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_hand.png differ diff --git a/kdevdesigner/designer/pics/designer_help.png b/kdevdesigner/designer/pics/designer_help.png new file mode 100644 index 00000000..2ab2c25d Binary files /dev/null and b/kdevdesigner/designer/pics/designer_help.png differ diff --git a/kdevdesigner/designer/pics/designer_home.png b/kdevdesigner/designer/pics/designer_home.png new file mode 100644 index 00000000..806d11d2 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_home.png differ diff --git a/kdevdesigner/designer/pics/designer_hsplit.png b/kdevdesigner/designer/pics/designer_hsplit.png new file mode 100644 index 00000000..232faf14 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_hsplit.png differ diff --git a/kdevdesigner/designer/pics/designer_ibeam.png b/kdevdesigner/designer/pics/designer_ibeam.png new file mode 100644 index 00000000..6074c89f Binary files /dev/null and b/kdevdesigner/designer/pics/designer_ibeam.png differ diff --git a/kdevdesigner/designer/pics/designer_iconview.png b/kdevdesigner/designer/pics/designer_iconview.png new file mode 100644 index 00000000..13b8f153 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_iconview.png differ diff --git a/kdevdesigner/designer/pics/designer_image.png b/kdevdesigner/designer/pics/designer_image.png new file mode 100644 index 00000000..29854df6 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_image.png differ diff --git a/kdevdesigner/designer/pics/designer_label.png b/kdevdesigner/designer/pics/designer_label.png new file mode 100644 index 00000000..5d7d7b4c Binary files /dev/null and b/kdevdesigner/designer/pics/designer_label.png differ diff --git a/kdevdesigner/designer/pics/designer_layout.png b/kdevdesigner/designer/pics/designer_layout.png new file mode 100644 index 00000000..168eb1f8 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_layout.png differ diff --git a/kdevdesigner/designer/pics/designer_lcdnumber.png b/kdevdesigner/designer/pics/designer_lcdnumber.png new file mode 100644 index 00000000..64eda5e4 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_lcdnumber.png differ diff --git a/kdevdesigner/designer/pics/designer_left.png b/kdevdesigner/designer/pics/designer_left.png new file mode 100644 index 00000000..e58177f4 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_left.png differ diff --git a/kdevdesigner/designer/pics/designer_line.png b/kdevdesigner/designer/pics/designer_line.png new file mode 100644 index 00000000..5c64dfb5 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_line.png differ diff --git a/kdevdesigner/designer/pics/designer_lineedit.png b/kdevdesigner/designer/pics/designer_lineedit.png new file mode 100644 index 00000000..75fc890f Binary files /dev/null and b/kdevdesigner/designer/pics/designer_lineedit.png differ diff --git a/kdevdesigner/designer/pics/designer_listbox.png b/kdevdesigner/designer/pics/designer_listbox.png new file mode 100644 index 00000000..d467fc9f Binary files /dev/null and b/kdevdesigner/designer/pics/designer_listbox.png differ diff --git a/kdevdesigner/designer/pics/designer_listview.png b/kdevdesigner/designer/pics/designer_listview.png new file mode 100644 index 00000000..d71cc1c9 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_listview.png differ diff --git a/kdevdesigner/designer/pics/designer_multilineedit.png b/kdevdesigner/designer/pics/designer_multilineedit.png new file mode 100644 index 00000000..e2f08995 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_multilineedit.png differ diff --git a/kdevdesigner/designer/pics/designer_newform.png b/kdevdesigner/designer/pics/designer_newform.png new file mode 100644 index 00000000..37779c13 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_newform.png differ diff --git a/kdevdesigner/designer/pics/designer_no.png b/kdevdesigner/designer/pics/designer_no.png new file mode 100644 index 00000000..8bacc044 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_no.png differ diff --git a/kdevdesigner/designer/pics/designer_object.png b/kdevdesigner/designer/pics/designer_object.png new file mode 100644 index 00000000..cc4192ed Binary files /dev/null and b/kdevdesigner/designer/pics/designer_object.png differ diff --git a/kdevdesigner/designer/pics/designer_ordertool.png b/kdevdesigner/designer/pics/designer_ordertool.png new file mode 100644 index 00000000..ad122839 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_ordertool.png differ diff --git a/kdevdesigner/designer/pics/designer_pixlabel.png b/kdevdesigner/designer/pics/designer_pixlabel.png new file mode 100644 index 00000000..32b90d82 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_pixlabel.png differ diff --git a/kdevdesigner/designer/pics/designer_pointer.png b/kdevdesigner/designer/pics/designer_pointer.png new file mode 100644 index 00000000..67e38a36 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_pointer.png differ diff --git a/kdevdesigner/designer/pics/designer_print.png b/kdevdesigner/designer/pics/designer_print.png new file mode 100644 index 00000000..57e3e532 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_print.png differ diff --git a/kdevdesigner/designer/pics/designer_progress.png b/kdevdesigner/designer/pics/designer_progress.png new file mode 100644 index 00000000..44ae094e Binary files /dev/null and b/kdevdesigner/designer/pics/designer_progress.png differ diff --git a/kdevdesigner/designer/pics/designer_project.png b/kdevdesigner/designer/pics/designer_project.png new file mode 100644 index 00000000..6a0fb96f Binary files /dev/null and b/kdevdesigner/designer/pics/designer_project.png differ diff --git a/kdevdesigner/designer/pics/designer_pushbutton.png b/kdevdesigner/designer/pics/designer_pushbutton.png new file mode 100644 index 00000000..61f779ce Binary files /dev/null and b/kdevdesigner/designer/pics/designer_pushbutton.png differ diff --git a/kdevdesigner/designer/pics/designer_qtlogo.png b/kdevdesigner/designer/pics/designer_qtlogo.png new file mode 100644 index 00000000..4e1a1472 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_qtlogo.png differ diff --git a/kdevdesigner/designer/pics/designer_radiobutton.png b/kdevdesigner/designer/pics/designer_radiobutton.png new file mode 100644 index 00000000..10c1d8c3 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_radiobutton.png differ diff --git a/kdevdesigner/designer/pics/designer_redo.png b/kdevdesigner/designer/pics/designer_redo.png new file mode 100644 index 00000000..abdad26c Binary files /dev/null and b/kdevdesigner/designer/pics/designer_redo.png differ diff --git a/kdevdesigner/designer/pics/designer_resetproperty.png b/kdevdesigner/designer/pics/designer_resetproperty.png new file mode 100644 index 00000000..cc0d6a26 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_resetproperty.png differ diff --git a/kdevdesigner/designer/pics/designer_richtextedit.png b/kdevdesigner/designer/pics/designer_richtextedit.png new file mode 100644 index 00000000..73573a8a Binary files /dev/null and b/kdevdesigner/designer/pics/designer_richtextedit.png differ diff --git a/kdevdesigner/designer/pics/designer_right.png b/kdevdesigner/designer/pics/designer_right.png new file mode 100644 index 00000000..5f2f7036 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_right.png differ diff --git a/kdevdesigner/designer/pics/designer_s_down.png b/kdevdesigner/designer/pics/designer_s_down.png new file mode 100644 index 00000000..908e55e1 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_s_down.png differ diff --git a/kdevdesigner/designer/pics/designer_s_editcut.png b/kdevdesigner/designer/pics/designer_s_editcut.png new file mode 100644 index 00000000..7cf5a9eb Binary files /dev/null and b/kdevdesigner/designer/pics/designer_s_editcut.png differ diff --git a/kdevdesigner/designer/pics/designer_s_left.png b/kdevdesigner/designer/pics/designer_s_left.png new file mode 100644 index 00000000..e6e19f8f Binary files /dev/null and b/kdevdesigner/designer/pics/designer_s_left.png differ diff --git a/kdevdesigner/designer/pics/designer_s_right.png b/kdevdesigner/designer/pics/designer_s_right.png new file mode 100644 index 00000000..bfccda6b Binary files /dev/null and b/kdevdesigner/designer/pics/designer_s_right.png differ diff --git a/kdevdesigner/designer/pics/designer_s_up.png b/kdevdesigner/designer/pics/designer_s_up.png new file mode 100644 index 00000000..97705d47 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_s_up.png differ diff --git a/kdevdesigner/designer/pics/designer_scrollbar.png b/kdevdesigner/designer/pics/designer_scrollbar.png new file mode 100644 index 00000000..466c58de Binary files /dev/null and b/kdevdesigner/designer/pics/designer_scrollbar.png differ diff --git a/kdevdesigner/designer/pics/designer_searchfind.png b/kdevdesigner/designer/pics/designer_searchfind.png new file mode 100644 index 00000000..3f369fdb Binary files /dev/null and b/kdevdesigner/designer/pics/designer_searchfind.png differ diff --git a/kdevdesigner/designer/pics/designer_setbuddy.png b/kdevdesigner/designer/pics/designer_setbuddy.png new file mode 100644 index 00000000..c1edb89b Binary files /dev/null and b/kdevdesigner/designer/pics/designer_setbuddy.png differ diff --git a/kdevdesigner/designer/pics/designer_sizeall.png b/kdevdesigner/designer/pics/designer_sizeall.png new file mode 100644 index 00000000..fa2a266a Binary files /dev/null and b/kdevdesigner/designer/pics/designer_sizeall.png differ diff --git a/kdevdesigner/designer/pics/designer_sizeb.png b/kdevdesigner/designer/pics/designer_sizeb.png new file mode 100644 index 00000000..ac5235b0 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_sizeb.png differ diff --git a/kdevdesigner/designer/pics/designer_sizef.png b/kdevdesigner/designer/pics/designer_sizef.png new file mode 100644 index 00000000..28a30c29 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_sizef.png differ diff --git a/kdevdesigner/designer/pics/designer_sizeh.png b/kdevdesigner/designer/pics/designer_sizeh.png new file mode 100644 index 00000000..7b8abd3a Binary files /dev/null and b/kdevdesigner/designer/pics/designer_sizeh.png differ diff --git a/kdevdesigner/designer/pics/designer_sizev.png b/kdevdesigner/designer/pics/designer_sizev.png new file mode 100644 index 00000000..80b3d8b2 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_sizev.png differ diff --git a/kdevdesigner/designer/pics/designer_slider.png b/kdevdesigner/designer/pics/designer_slider.png new file mode 100644 index 00000000..525bd1ca Binary files /dev/null and b/kdevdesigner/designer/pics/designer_slider.png differ diff --git a/kdevdesigner/designer/pics/designer_spacer.png b/kdevdesigner/designer/pics/designer_spacer.png new file mode 100644 index 00000000..926e8afc Binary files /dev/null and b/kdevdesigner/designer/pics/designer_spacer.png differ diff --git a/kdevdesigner/designer/pics/designer_spinbox.png b/kdevdesigner/designer/pics/designer_spinbox.png new file mode 100644 index 00000000..7ae20630 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_spinbox.png differ diff --git a/kdevdesigner/designer/pics/designer_splash.png b/kdevdesigner/designer/pics/designer_splash.png new file mode 100644 index 00000000..d3b62a17 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_splash.png differ diff --git a/kdevdesigner/designer/pics/designer_table.png b/kdevdesigner/designer/pics/designer_table.png new file mode 100644 index 00000000..4bbd9c2d Binary files /dev/null and b/kdevdesigner/designer/pics/designer_table.png differ diff --git a/kdevdesigner/designer/pics/designer_tabwidget.png b/kdevdesigner/designer/pics/designer_tabwidget.png new file mode 100644 index 00000000..1254bb63 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_tabwidget.png differ diff --git a/kdevdesigner/designer/pics/designer_textbold.png b/kdevdesigner/designer/pics/designer_textbold.png new file mode 100644 index 00000000..7f4f7344 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textbold.png differ diff --git a/kdevdesigner/designer/pics/designer_textbrowser.png b/kdevdesigner/designer/pics/designer_textbrowser.png new file mode 100644 index 00000000..090e2f84 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textbrowser.png differ diff --git a/kdevdesigner/designer/pics/designer_textcenter.png b/kdevdesigner/designer/pics/designer_textcenter.png new file mode 100644 index 00000000..5c68b09c Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textcenter.png differ diff --git a/kdevdesigner/designer/pics/designer_textedit.png b/kdevdesigner/designer/pics/designer_textedit.png new file mode 100644 index 00000000..823d0818 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textedit.png differ diff --git a/kdevdesigner/designer/pics/designer_textfont.png b/kdevdesigner/designer/pics/designer_textfont.png new file mode 100644 index 00000000..a4de87a4 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textfont.png differ diff --git a/kdevdesigner/designer/pics/designer_texth1.png b/kdevdesigner/designer/pics/designer_texth1.png new file mode 100644 index 00000000..1c3aa2fd Binary files /dev/null and b/kdevdesigner/designer/pics/designer_texth1.png differ diff --git a/kdevdesigner/designer/pics/designer_texth2.png b/kdevdesigner/designer/pics/designer_texth2.png new file mode 100644 index 00000000..ba73121d Binary files /dev/null and b/kdevdesigner/designer/pics/designer_texth2.png differ diff --git a/kdevdesigner/designer/pics/designer_texth3.png b/kdevdesigner/designer/pics/designer_texth3.png new file mode 100644 index 00000000..1d9f8732 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_texth3.png differ diff --git a/kdevdesigner/designer/pics/designer_textitalic.png b/kdevdesigner/designer/pics/designer_textitalic.png new file mode 100644 index 00000000..68e2b44c Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textitalic.png differ diff --git a/kdevdesigner/designer/pics/designer_textjustify.png b/kdevdesigner/designer/pics/designer_textjustify.png new file mode 100644 index 00000000..6e746c80 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textjustify.png differ diff --git a/kdevdesigner/designer/pics/designer_textlarger.png b/kdevdesigner/designer/pics/designer_textlarger.png new file mode 100644 index 00000000..89960939 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textlarger.png differ diff --git a/kdevdesigner/designer/pics/designer_textleft.png b/kdevdesigner/designer/pics/designer_textleft.png new file mode 100644 index 00000000..72b27652 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textleft.png differ diff --git a/kdevdesigner/designer/pics/designer_textlinebreak.png b/kdevdesigner/designer/pics/designer_textlinebreak.png new file mode 100644 index 00000000..081a49e0 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textlinebreak.png differ diff --git a/kdevdesigner/designer/pics/designer_textparagraph.png b/kdevdesigner/designer/pics/designer_textparagraph.png new file mode 100644 index 00000000..dcd0b3ea Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textparagraph.png differ diff --git a/kdevdesigner/designer/pics/designer_textright.png b/kdevdesigner/designer/pics/designer_textright.png new file mode 100644 index 00000000..d7186722 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textright.png differ diff --git a/kdevdesigner/designer/pics/designer_textsmaller.png b/kdevdesigner/designer/pics/designer_textsmaller.png new file mode 100644 index 00000000..10953d9a Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textsmaller.png differ diff --git a/kdevdesigner/designer/pics/designer_textteletext.png b/kdevdesigner/designer/pics/designer_textteletext.png new file mode 100644 index 00000000..c0204636 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textteletext.png differ diff --git a/kdevdesigner/designer/pics/designer_textunderline.png b/kdevdesigner/designer/pics/designer_textunderline.png new file mode 100644 index 00000000..3477ccb3 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textunderline.png differ diff --git a/kdevdesigner/designer/pics/designer_textview.png b/kdevdesigner/designer/pics/designer_textview.png new file mode 100644 index 00000000..ec2270c3 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_textview.png differ diff --git a/kdevdesigner/designer/pics/designer_timeedit.png b/kdevdesigner/designer/pics/designer_timeedit.png new file mode 100644 index 00000000..01b37888 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_timeedit.png differ diff --git a/kdevdesigner/designer/pics/designer_toolbox.png b/kdevdesigner/designer/pics/designer_toolbox.png new file mode 100644 index 00000000..2ab71dc7 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_toolbox.png differ diff --git a/kdevdesigner/designer/pics/designer_toolbutton.png b/kdevdesigner/designer/pics/designer_toolbutton.png new file mode 100644 index 00000000..25d240a1 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_toolbutton.png differ diff --git a/kdevdesigner/designer/pics/designer_undo.png b/kdevdesigner/designer/pics/designer_undo.png new file mode 100644 index 00000000..839a823f Binary files /dev/null and b/kdevdesigner/designer/pics/designer_undo.png differ diff --git a/kdevdesigner/designer/pics/designer_up.png b/kdevdesigner/designer/pics/designer_up.png new file mode 100644 index 00000000..e4373122 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_up.png differ diff --git a/kdevdesigner/designer/pics/designer_uparrow.png b/kdevdesigner/designer/pics/designer_uparrow.png new file mode 100644 index 00000000..eefe4a00 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_uparrow.png differ diff --git a/kdevdesigner/designer/pics/designer_vsplit.png b/kdevdesigner/designer/pics/designer_vsplit.png new file mode 100644 index 00000000..b820c19f Binary files /dev/null and b/kdevdesigner/designer/pics/designer_vsplit.png differ diff --git a/kdevdesigner/designer/pics/designer_wait.png b/kdevdesigner/designer/pics/designer_wait.png new file mode 100644 index 00000000..5d8cfed2 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_wait.png differ diff --git a/kdevdesigner/designer/pics/designer_widgetstack.png b/kdevdesigner/designer/pics/designer_widgetstack.png new file mode 100644 index 00000000..c326de81 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_widgetstack.png differ diff --git a/kdevdesigner/designer/pics/designer_wizarddata.png b/kdevdesigner/designer/pics/designer_wizarddata.png new file mode 100644 index 00000000..9493e3b1 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_wizarddata.png differ diff --git a/kdevdesigner/designer/pics/designer_wizarddialog.png b/kdevdesigner/designer/pics/designer_wizarddialog.png new file mode 100644 index 00000000..a22dc88a Binary files /dev/null and b/kdevdesigner/designer/pics/designer_wizarddialog.png differ diff --git a/kdevdesigner/designer/pics/designer_wordwrap.png b/kdevdesigner/designer/pics/designer_wordwrap.png new file mode 100644 index 00000000..29513c32 Binary files /dev/null and b/kdevdesigner/designer/pics/designer_wordwrap.png differ diff --git a/kdevdesigner/designer/pixmapchooser.cpp b/kdevdesigner/designer/pixmapchooser.cpp new file mode 100644 index 00000000..92d68ac1 --- /dev/null +++ b/kdevdesigner/designer/pixmapchooser.cpp @@ -0,0 +1,231 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include // HP-UX compiler needs this here + +#include +#include +#include +#include +#include + +#include "kdevdesigner_part.h" + +#include "pixmapchooser.h" +#include "formwindow.h" +#if defined(DESIGNER) && !defined(RESOURCE) +#include "pixmapfunction.h" +#endif +#include "metadatabase.h" +#include "mainwindow.h" +#include "pixmapcollectioneditor.h" +#include "pixmapcollection.h" +#include "project.h" + +#include +#include +#include +#include +#include +#include + +#if defined(DESIGNER) +static ImageIconProvider *imageIconProvider = 0; +#endif + +PixmapView::PixmapView( TQWidget *parent ) + : TQScrollView( parent ) +{ + viewport()->setBackgroundMode( PaletteBase ); +} + +void PixmapView::setPixmap( const TQPixmap &pix ) +{ + pixmap = pix; + resizeContents( pixmap.size().width(), pixmap.size().height() ); + viewport()->repaint( FALSE ); +} + +void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch ) +{ + p->fillRect( cx, cy, cw, ch, colorGroup().brush( TQColorGroup::Base ) ); + p->drawPixmap( 0, 0, pixmap ); +} + +void PixmapView::previewUrl( const TQUrl &u ) +{ + if ( u.isLocalFile() ) { + TQString path = u.path(); + TQPixmap pix( path ); + if ( !pix.isNull() ) + setPixmap( pix ); + } else { + tqWarning( "Previewing remote files not supported." ); + } +} + +static void buildImageFormatList( TQString &filter, TQString &all ) +{ + all = tqApp->translate( "qChoosePixmap", "All Pixmaps (" ); + for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) { + TQString outputFormat = TQImageIO::outputFormats().at( i ); + TQString outputExtension; + if ( outputFormat != "JPEG" ) + outputExtension = outputFormat.lower(); + else + outputExtension = "jpg;*.jpeg"; + filter += TQString(tqApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" )). + arg( outputFormat ).arg( "*." + outputExtension); + all += "*." + outputExtension + ";"; + } + filter.prepend( all + tqApp->translate( "qChoosePixmap", ")\n" ) ); + filter += tqApp->translate( "qChoosePixmap", "All Files (*)" ); + +} +TQStringList qChoosePixmaps( TQWidget *parent ) +{ +/* if ( !imageIconProvider && !TQFileDialog::iconProvider() ) + TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); + + TQString filter; + TQString all; + buildImageFormatList( filter, all ); + + TQFileDialog fd( TQString(), filter, parent, 0, TRUE ); + fd.setMode( TQFileDialog::ExistingFiles ); + fd.setContentsPreviewEnabled( TRUE ); + PixmapView *pw = new PixmapView( &fd ); + fd.setContentsPreview( pw, pw ); + fd.setViewMode( TQFileDialog::List ); + fd.setPreviewMode( TQFileDialog::Contents ); + fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images..." ) ); + if ( fd.exec() == TQDialog::Accepted ) + return fd.selectedFiles(); + return TQStringList();*/ + TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading ); + KFileDialog dlg(TQString(), mimetypes.join(" "), parent, "filedialog", true); + dlg.setOperationMode( KFileDialog::Opening ); + dlg.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images..." ) ); + dlg.setMode( KFile::Files ); + KImageFilePreview *ip = new KImageFilePreview( &dlg ); + dlg.setPreviewWidget( ip ); + if (dlg.exec()) + return dlg.selectedFiles(); + return TQStringList(); +} + +TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, TQString *fn ) +{ +#if defined(DESIGNER) + if ( !fw || fw->savePixmapInline() ) { +/* if ( !imageIconProvider && !TQFileDialog::iconProvider() ) + TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); + + TQString filter; + TQString all; + buildImageFormatList( filter, all ); + + TQFileDialog fd( TQString(), filter, parent, 0, TRUE ); + fd.setContentsPreviewEnabled( TRUE ); + PixmapView *pw = new PixmapView( &fd ); + fd.setContentsPreview( pw, pw ); + fd.setViewMode( TQFileDialog::List ); + fd.setPreviewMode( TQFileDialog::Contents ); + fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Pixmap" ) ); + if ( fd.exec() == TQDialog::Accepted ) { + TQPixmap pix( fd.selectedFile() ); + if ( fn ) + *fn = fd.selectedFile(); + MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), fd.selectedFile() ); + return pix; + }*/ + TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading ); + KFileDialog dlg(TQString(), mimetypes.join(" "), parent, "filedialog", true); + dlg.setOperationMode( KFileDialog::Opening ); + dlg.setCaption( tqApp->translate( "qChoosePixmap", "Choose Pixmap" ) ); + dlg.setMode( KFile::File ); + KImageFilePreview *ip = new KImageFilePreview( &dlg ); + dlg.setPreviewWidget( ip ); + if (dlg.exec()) + { + TQPixmap pix( dlg.selectedURL().path() ); + if ( fn ) + *fn = dlg.selectedURL().path(); + MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dlg.selectedURL().path() ); + return pix; + } + } else if ( fw && fw->savePixmapInProject() ) { + PixmapCollectionEditor dia( parent, 0, TRUE ); + dia.setProject( fw->project() ); + dia.setChooserMode( TRUE ); + dia.setCurrentItem( MetaDataBase::pixmapKey( TQT_TQOBJECT(fw), old.serialNumber() ) ); + if ( dia.exec() == TQDialog::Accepted ) { + TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) ); + MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), pix.serialNumber(), dia.viewPixmaps->currentItem()->text() ); + return pix; + } + } else { + PixmapFunction dia( parent, 0, TRUE ); + TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" ); + dia.editArguments->setText( MetaDataBase::pixmapArgument( TQT_TQOBJECT(fw), old.serialNumber() ) ); + dia.editArguments->setFocus(); + if ( dia.exec() == TQDialog::Accepted ) { + TQPixmap pix; + // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that + pix.convertFromImage( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ).convertToImage() ); + + MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() ); + return pix; + } + } +#else + Q_UNUSED( parent ); + Q_UNUSED( fw ); + Q_UNUSED( old ); +#endif + return TQPixmap(); +} + +ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name ) + : TQFileIconProvider( TQT_TQOBJECT(parent), name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) ) +{ + fmts = TQImage::inputFormats(); +} + +ImageIconProvider::~ImageIconProvider() +{ +} + +const TQPixmap * ImageIconProvider::pixmap( const TQFileInfo &fi ) +{ + TQString ext = fi.extension().upper(); + if ( fmts.contains( ext ) ) { + return &imagepm; + } else { + return TQFileIconProvider::pixmap( fi ); + } +} diff --git a/kdevdesigner/designer/pixmapchooser.h b/kdevdesigner/designer/pixmapchooser.h new file mode 100644 index 00000000..c6523488 --- /dev/null +++ b/kdevdesigner/designer/pixmapchooser.h @@ -0,0 +1,74 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PIXMAPCHOOSER_H +#define PIXMAPCHOOSER_H + +#include +#include +#include +#include + +class FormWindow; + +class PixmapView : public TQScrollView, + public TQFilePreview +{ + Q_OBJECT + + +public: + PixmapView( TQWidget *parent ); + void setPixmap( const TQPixmap &pix ); + void drawContents( TQPainter *p, int, int, int, int ); + void previewUrl( const TQUrl &u ); + +private: + TQPixmap pixmap; + +}; + +class ImageIconProvider : public TQFileIconProvider +{ + Q_OBJECT + + +public: + ImageIconProvider( TQWidget *parent = 0, const char *name = 0 ); + ~ImageIconProvider(); + + const TQPixmap *pixmap( const TQFileInfo &fi ); + +private: + TQStrList fmts; + TQPixmap imagepm; + +}; + +TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw = 0, const TQPixmap &old = TQPixmap(), TQString *fn = 0 ); +TQStringList qChoosePixmaps( TQWidget *parent ); + +#endif diff --git a/kdevdesigner/designer/pixmapcollection.cpp b/kdevdesigner/designer/pixmapcollection.cpp new file mode 100644 index 00000000..880423a3 --- /dev/null +++ b/kdevdesigner/designer/pixmapcollection.cpp @@ -0,0 +1,180 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "pixmapcollection.h" +#include "project.h" +#include "mainwindow.h" +#include +#include +#include +#include +#include + +PixmapCollection::PixmapCollection( Project *pro ) + : project( pro ) +{ + iface = new DesignerPixmapCollectionImpl( this ); + mimeSourceFactory = new TQMimeSourceFactory(); +} + +PixmapCollection::~PixmapCollection() +{ + delete mimeSourceFactory; + delete iface; +} + +bool PixmapCollection::addPixmap( const Pixmap &pix, bool force ) +{ + Pixmap pixmap = pix; + savePixmap( pixmap ); + + if ( !force ) { + for ( TQValueList::Iterator it = pixList.begin(); it != pixList.end(); ++it ) { + if ( (*it).name == pixmap.name ) + return FALSE; + } + } + + pixList.append( pixmap ); + mimeSourceFactory->setPixmap( pixmap.name, pixmap.pix ); + project->setModified( TRUE ); + return TRUE; +} + +void PixmapCollection::removePixmap( const TQString &name ) +{ + for ( TQValueList::Iterator it = pixList.begin(); it != pixList.end(); ++it ) { + if ( (*it).name == name ) { + pixList.remove( it ); + break; + } + } + project->setModified( TRUE ); +} + +TQValueList PixmapCollection::pixmaps() const +{ + return pixList; +} + +TQString PixmapCollection::unifyName( const TQString &n ) +{ + TQString name = n; + bool restart = FALSE; + int added = 1; + + for ( TQValueList::Iterator it = pixList.begin(); it != pixList.end(); ++it ) { + if ( restart ) + it = pixList.begin(); + restart = FALSE; + if ( name == (*it).name ) { + name = n; + name += "_" + TQString::number( added ); + ++added; + restart = TRUE; + } + } + + return name; +} + +void PixmapCollection::setActive( bool b ) +{ + if ( b ) + TQMimeSourceFactory::defaultFactory()->addFactory( mimeSourceFactory ); + else + TQMimeSourceFactory::defaultFactory()->removeFactory( mimeSourceFactory ); +} + +TQPixmap PixmapCollection::pixmap( const TQString &name ) +{ + for ( TQValueList::Iterator it = pixList.begin(); it != pixList.end(); ++it ) { + if ( (*it).name == name ) + return (*it).pix; + } + return TQPixmap(); +} + +void PixmapCollection::savePixmap( Pixmap &pix ) +{ + if ( pix.absname == imageDir() + "/" + pix.name ) + return; // no need to save, it is already there + TQString rel = project->makeRelative( pix.absname ); + if ( rel[0] == '/' || ( rel[1] == ':' && rel[2] == '/' ) ) { // only save if file is outside the project + mkdir(); + pix.name = unifyName( TQFileInfo( pix.absname ).baseName() ) + ".png"; + pix.absname = imageDir() + "/" + pix.name; + pix.pix.save( pix.absname, "PNG" ); + } else if ( rel.isEmpty() ) { + mkdir(); + pix.name = unifyName( pix.name ); + pix.absname = imageDir() + "/" + pix.name; + pix.pix.save( pix.absname, "PNG" ); + } +} + +TQString PixmapCollection::imageDir() const +{ + return TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/images"; +} + +void PixmapCollection::mkdir() +{ + TQString f = project->fileName(); + TQDir d( TQFileInfo( f ).dirPath( TRUE ) ); + d.mkdir( "images" ); +} + +void PixmapCollection::load( const TQString& filename ) +{ + if ( filename.isEmpty() ) + return; + TQString absfile; + if ( filename[0] == '/' ) + absfile = filename; + else + absfile = TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/" + filename; + + TQPixmap pm( absfile ); + if ( pm.isNull() ) + return; + + Pixmap pix; + pix.name = TQFileInfo( absfile ).fileName(); + pix.absname = absfile; + pix.pix = pm; + addPixmap( pix, TRUE ); +} + +DesignerPixmapCollection *PixmapCollection::iFace() +{ + return iface; +} + +bool PixmapCollection::isEmpty() const +{ + return pixList.isEmpty(); +} diff --git a/kdevdesigner/designer/pixmapcollection.h b/kdevdesigner/designer/pixmapcollection.h new file mode 100644 index 00000000..10d630fc --- /dev/null +++ b/kdevdesigner/designer/pixmapcollection.h @@ -0,0 +1,80 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PIXMAPCOLLECTION_H +#define PIXMAPCOLLECTION_H + +#include +#include +#include +#include "designerappiface.h" + +class TQMimeSourceFactory; +class Project; + +class PixmapCollection +{ +public: + struct Pixmap + { + TQPixmap pix; + TQString name; + TQString absname; + TQ_DUMMY_COMPARISON_OPERATOR( Pixmap ) + }; + + PixmapCollection( Project *pro ); + ~PixmapCollection(); + + bool addPixmap( const Pixmap &pix, bool force = TRUE ); + void removePixmap( const TQString &name ); + TQPixmap pixmap( const TQString &name ); + + TQValueList pixmaps() const; + bool isEmpty() const; + + void setActive( bool b ); + + void load( const TQString& filename ); + + DesignerPixmapCollection *iFace(); + +private: + TQString unifyName( const TQString &n ); + void savePixmap( Pixmap &pix ); + + TQString imageDir() const; + void mkdir(); + +private: + TQValueList pixList; + TQMimeSourceFactory *mimeSourceFactory; + Project *project; + DesignerPixmapCollectionImpl *iface; + +}; + +#endif diff --git a/kdevdesigner/designer/pixmapcollectioneditor.ui b/kdevdesigner/designer/pixmapcollectioneditor.ui new file mode 100644 index 00000000..30f74183 --- /dev/null +++ b/kdevdesigner/designer/pixmapcollectioneditor.ui @@ -0,0 +1,218 @@ + +PixmapCollectionEditor +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + PixmapCollectionEditor + + + + 0 + 0 + 455 + 260 + + + + Manage Image Collection + + + + unnamed + + + 11 + + + 6 + + + + viewPixmaps + + + Adjust + + + false + + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + PushButton2 + + + &Add... + + + + + PushButton3 + + + &Delete + + + + + Spacer2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + true + + + + + buttonCancel + + + &Cancel + + + + + buttonClose + + + C&lose + + + true + + + + + + + + + PushButton2 + clicked() + PixmapCollectionEditor + addPixmap() + + + PushButton3 + clicked() + PixmapCollectionEditor + removePixmap() + + + viewPixmaps + currentChanged(TQIconViewItem*) + PixmapCollectionEditor + currentChanged(TQIconViewItem*) + + + buttonOk + clicked() + PixmapCollectionEditor + accept() + + + buttonCancel + clicked() + PixmapCollectionEditor + reject() + + + buttonClose + clicked() + PixmapCollectionEditor + accept() + + + + PushButton2 + PushButton3 + viewPixmaps + buttonClose + + + pixmapcollection.h + pixmapchooser.h + project.h + tqfileinfo.h + tqimage.h + tqpixmap.h + pixmapcollectioneditor.ui.h + + + class Project; + + + Project *project; + bool chooser; + + + init() + destroy() + addPixmap() + removePixmap() + updateView() + currentChanged(TQIconViewItem * i) + setChooserMode(bool c) + setCurrentItem(const TQString & name) + setProject(Project * pro) + scaledPixmap(const TQPixmap & p) + + + diff --git a/kdevdesigner/designer/pixmapcollectioneditor.ui.h b/kdevdesigner/designer/pixmapcollectioneditor.ui.h new file mode 100644 index 00000000..82bd7929 --- /dev/null +++ b/kdevdesigner/designer/pixmapcollectioneditor.ui.h @@ -0,0 +1,150 @@ +#include +/********************************************************************** +** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +void PixmapCollectionEditor::init() +{ + project = 0; + setChooserMode( FALSE ); +} + +void PixmapCollectionEditor::destroy() +{ +} + +void PixmapCollectionEditor::addPixmap() +{ + if ( !project ) + return; + + TQString f; + TQStringList pixmaps = qChoosePixmaps( this ); + if ( pixmaps.isEmpty() ) + return; + + TQString lastName; + for ( TQStringList::ConstIterator it = pixmaps.begin(); it != pixmaps.end(); ++it ) { + TQPixmap pm( *it ); + if ( pm.isNull() ) + continue; + PixmapCollection::Pixmap pixmap; + pixmap.pix = pm; + TQFileInfo fi ( *it ); + pixmap.name = fi.fileName(); + pixmap.absname = fi.filePath(); + if ( !project->pixmapCollection()->addPixmap( pixmap, FALSE ) ) + continue; + lastName = pixmap.name; + } + + updateView(); + TQIconViewItem *item = viewPixmaps->findItem( lastName ); + if ( item ) { + viewPixmaps->setCurrentItem( item ); + viewPixmaps->ensureItemVisible( item ); + } + +} + +void PixmapCollectionEditor::removePixmap() +{ + if ( !project || !viewPixmaps->currentItem() ) + return; + project->pixmapCollection()->removePixmap( viewPixmaps->currentItem()->text() ); + updateView(); +} + +void PixmapCollectionEditor::updateView() +{ + if ( !project ) + return; + + viewPixmaps->clear(); + + TQValueList pixmaps = project->pixmapCollection()->pixmaps(); + for ( TQValueList::Iterator it = pixmaps.begin(); it != pixmaps.end(); ++it ) { + // #### might need to scale down the pixmap + TQIconViewItem *item = new TQIconViewItem( viewPixmaps, (*it).name, scaledPixmap( (*it).pix ) ); + //item->setRenameEnabled( TRUE ); // this will be a bit harder to implement + item->setDragEnabled( FALSE ); + item->setDropEnabled( FALSE ); + } + viewPixmaps->setCurrentItem( viewPixmaps->firstItem() ); + currentChanged( viewPixmaps->firstItem() ); +} + +void PixmapCollectionEditor::currentChanged( TQIconViewItem * i ) +{ + buttonOk->setEnabled( !!i ); +} + +void PixmapCollectionEditor::setChooserMode( bool c ) +{ + chooser = c; + if ( chooser ) { + buttonClose->hide(); + buttonOk->show(); + buttonCancel->show(); + buttonOk->setEnabled( FALSE ); + buttonOk->setDefault( TRUE ); + connect( viewPixmaps, TQT_SIGNAL( doubleClicked( TQIconViewItem * ) ), buttonOk, TQT_SIGNAL( clicked() ) ); + connect( viewPixmaps, TQT_SIGNAL( returnPressed( TQIconViewItem * ) ), buttonOk, TQT_SIGNAL( clicked() ) ); + setCaption( i18n( "Choose Image" ) ); + } else { + buttonClose->show(); + buttonOk->hide(); + buttonCancel->hide(); + buttonClose->setDefault( TRUE ); + } + updateView(); +} + +void PixmapCollectionEditor::setCurrentItem( const TQString & name ) +{ + TQIconViewItem *i = viewPixmaps->findItem( name ); + if ( i ) { + viewPixmaps->setCurrentItem( i ); + currentChanged( i ); + } +} + +void PixmapCollectionEditor::setProject( Project * pro ) +{ + project = pro; + updateView(); +} + +TQPixmap PixmapCollectionEditor::scaledPixmap( const TQPixmap & p ) +{ + TQPixmap pix( p ); + if ( pix.width() < 50 && pix.height() < 50 ) + return pix; + TQImage img; + img = pix; + img = img.smoothScale( 50, 50 ); + pix.convertFromImage( img ); + return pix; +} diff --git a/kdevdesigner/designer/pixmapfunction.ui b/kdevdesigner/designer/pixmapfunction.ui new file mode 100644 index 00000000..760abe56 --- /dev/null +++ b/kdevdesigner/designer/pixmapfunction.ui @@ -0,0 +1,976 @@ + +PixmapFunction +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + PixmapFunction + + + + 0 + 0 + 305 + 120 + + + + Choose Pixmap + + + true + + + + unnamed + + + 11 + + + 6 + + + + TextLabel3 + + + &Enter arguments for loading the pixmap: + + + editArguments + + + + + Frame9 + + + StyledPanel + + + Sunken + + + 2 + + + + + + + + unnamed + + + 2 + + + 0 + + + + labelFunction + + + + + + 0 + 0 + 0 + + + 211 + 211 + 211 + + + 255 + 255 + 255 + + + 233 + 233 + 233 + + + 105 + 105 + 105 + + + 140 + 140 + 140 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 0 + + + + + 128 + 128 + 128 + + + 211 + 211 + 211 + + + 255 + 255 + 255 + + + 242 + 242 + 242 + + + 105 + 105 + 105 + + + 140 + 140 + 140 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 128 + 128 + 128 + + + 255 + 255 + 255 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + 211 + 211 + 211 + + + 255 + 255 + 255 + + + 242 + 242 + 242 + + + 105 + 105 + 105 + + + 140 + 140 + 140 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 0 + + + + + + QPixmap( + + + + + editArguments + + + + + + 0 + 0 + 0 + + + 211 + 211 + 211 + + + 255 + 255 + 255 + + + 233 + 233 + 233 + + + 105 + 105 + 105 + + + 140 + 140 + 140 + + + 0 + 170 + 0 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 211 + 211 + 211 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 0 + + + + + 128 + 128 + 128 + + + 211 + 211 + 211 + + + 255 + 255 + 255 + + + 242 + 242 + 242 + + + 105 + 105 + 105 + + + 140 + 140 + 140 + + + 0 + 170 + 0 + + + 255 + 255 + 255 + + + 128 + 128 + 128 + + + 255 + 255 + 255 + + + 211 + 211 + 211 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + 211 + 211 + 211 + + + 255 + 255 + 255 + + + 242 + 242 + 242 + + + 105 + 105 + 105 + + + 140 + 140 + 140 + + + 0 + 170 + 0 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 211 + 211 + 211 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 0 + + + + + + false + + + + + TextLabel5 + + + + + + 0 + 0 + 0 + + + 211 + 211 + 211 + + + 255 + 255 + 255 + + + 233 + 233 + 233 + + + 105 + 105 + 105 + + + 140 + 140 + 140 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 0 + + + + + 128 + 128 + 128 + + + 211 + 211 + 211 + + + 255 + 255 + 255 + + + 242 + 242 + 242 + + + 105 + 105 + 105 + + + 140 + 140 + 140 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 128 + 128 + 128 + + + 255 + 255 + 255 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + 211 + 211 + 211 + + + 255 + 255 + 255 + + + 242 + 242 + 242 + + + 105 + 105 + 105 + + + 140 + 140 + 140 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 0 + 0 + 0 + + + + + + ) + + + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + helpButton + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + true + + + true + + + + + buttonCancel + + + &Cancel + + + true + + + + + + + + + buttonOk + clicked() + PixmapFunction + accept() + + + buttonCancel + clicked() + PixmapFunction + reject() + + + + + klineedit.h + + diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp new file mode 100644 index 00000000..da6289dd --- /dev/null +++ b/kdevdesigner/designer/popupmenueditor.cpp @@ -0,0 +1,1469 @@ +/********************************************************************** +** Copyright (C) 2003 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "actiondnd.h" +#include "actioneditorimpl.h" +#include "command.h" +#include "formfile.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "metadatabase.h" +#include "pixmapchooser.h" +#include "popupmenueditor.h" +#include "menubareditor.h" + +#include + +// Drag Object Declaration ------------------------------------------- + +class PopupMenuEditorItemPtrDrag : public TQStoredDrag +{ +public: + PopupMenuEditorItemPtrDrag( PopupMenuEditorItem * item, TQWidget * parent = 0, + const char * name = 0 ); + ~PopupMenuEditorItemPtrDrag() {}; + static bool canDecode( TQDragMoveEvent * e ); + static bool decode( TQDropEvent * e, PopupMenuEditorItem ** i ); +}; + +// Drag Object Implementation --------------------------------------- + +PopupMenuEditorItemPtrDrag::PopupMenuEditorItemPtrDrag( PopupMenuEditorItem * item, + TQWidget * parent, const char * name ) + : TQStoredDrag( "qt/popupmenueditoritemptr", parent, name ) +{ + TQByteArray data( sizeof( TQ_LONG ) ); + TQDataStream stream( data, IO_WriteOnly ); + stream << ( TQ_LONG ) item; + setEncodedData( data ); +} + +bool PopupMenuEditorItemPtrDrag::canDecode( TQDragMoveEvent * e ) +{ + return e->provides( "qt/popupmenueditoritemptr" ); +} + +bool PopupMenuEditorItemPtrDrag::decode( TQDropEvent * e, PopupMenuEditorItem ** i ) +{ + TQByteArray data = e->encodedData( "qt/popupmenueditoritemptr" ); + TQDataStream stream( data, IO_ReadOnly ); + + if ( !data.size() ) + return FALSE; + + TQ_LONG p = 0; + stream >> p; + *i = ( PopupMenuEditorItem *) p; + + return TRUE; +} + +// PopupMenuEditorItem Implementation ----------------------------------- + +PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, TQObject * parent, const char * name ) + : TQObject( parent, name ), + a( 0 ), + s( 0 ), + m( menu ), + separator( FALSE ), + removable( FALSE ) +{ + init(); + a = new TQAction( this ); + TQObject::connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( selfDestruct() ) ); +} + + +PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * menu, + TQObject * parent, const char * name ) + : TQObject( parent, name ), + a( action ), + s( 0 ), + m( menu ), + separator( FALSE ), + removable( TRUE ) +{ + init(); + if ( /*a->name() == "qt_separator_action" ||*/ ::tqqt_cast(a) ) + separator = TRUE; + if ( a && !a->childrenListObject().isEmpty() ) + a->installEventFilter( this ); +} + +PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuEditor * menu, + TQObject * parent, const char * name ) + : TQObject( parent, name ), + a( item->a ), + s( 0 ), + m( menu ), + separator( item->separator ), + removable( item->removable ) +{ + init(); + if ( ::tqqt_cast(a) ) + a->installEventFilter( this ); +} + +PopupMenuEditorItem::~PopupMenuEditorItem() +{ + +} + +void PopupMenuEditorItem::init() +{ + if ( a ) { + TQObject::connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( selfDestruct() ) ); + if ( m && !isSeparator() ) { + s = new PopupMenuEditor( m->formWindow(), m ); + TQString n = "PopupMenuEditor"; + m->formWindow()->unify( TQT_TQOBJECT(s), n, TRUE ); + s->setName( n ); + MetaDataBase::addEntry( TQT_TQOBJECT(s) ); + } + } +} + +PopupMenuEditorItem::ItemType PopupMenuEditorItem::type() const +{ + if ( separator ) + return Separator; + else if ( a ) + return Action; + return Unknown; +} + +void PopupMenuEditorItem::setVisible( bool enable ) +{ + if ( a ) + a->setVisible( enable ); +} + +bool PopupMenuEditorItem::isVisible() const +{ + TQActionGroup *g = ::tqqt_cast(a); + if ( g ) + return ( g->isVisible() && g->usesDropDown() ); + else if ( a ) + return a->isVisible(); + return FALSE; +} + +void PopupMenuEditorItem::showMenu( int x, int y ) +{ + if ( ( !separator ) && s ) { + s->move( x, y ); + s->show(); + s->raise(); + } +} + +void PopupMenuEditorItem::hideMenu() +{ + if ( s ) { + s->hideSubMenu(); + s->hide(); + } +} + +void PopupMenuEditorItem::focusOnMenu() +{ + if ( s ) { + s->showSubMenu(); + s->setFocus(); + } +} + +int PopupMenuEditorItem::count() const +{ + if ( s ) { + return s->count(); + } else if ( ::tqqt_cast(a) ) { + const TQObjectList l = a->childrenListObject(); + if ( !l.isEmpty() ) + return l.count(); + } + return 0; +} + +bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event ) +{ + if ( ! ::tqqt_cast( o ) ) + return FALSE; + if ( event->type() == TQEvent::ChildInserted ) { + TQChildEvent * ce = ( TQChildEvent * ) event; + TQObject * c = TQT_TQOBJECT(ce->child()); + TQAction * action = ::tqqt_cast( c ); + if ( s->find( action ) != -1 ) // avoid duplicates + return FALSE; + TQActionGroup * actionGroup = ::tqqt_cast( c ); + if ( actionGroup ) + s->insert( actionGroup ); + else if ( action ) + s->insert( action ); + } + return FALSE; +} + +void PopupMenuEditorItem::selfDestruct() +{ + hideMenu(); + int i = m->find( s ); + if ( i != -1 && i < m->count() ) + m->remove( i ); // remove this item + a = 0; // the selfDestruct call was caused by the deletion of the action + delete this; +} + +// PopupMenuEditor Implementation ----------------------------------- + +PopupMenuEditorItem * PopupMenuEditor::draggedItem = 0; +int PopupMenuEditor::clipboardOperation = 0; +PopupMenuEditorItem * PopupMenuEditor::clipboardItem = 0; + +PopupMenuEditor::PopupMenuEditor( FormWindow * fw, TQWidget * parent, const char * name ) + : TQWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase | WResizeNoErase ), + formWnd( fw ), + parentMenu( parent ), + iconWidth( 0 ), + textWidth( 0 ), + accelWidth( 0 ), + arrowWidth( 30 ), + borderSize( 2 ), + currentField( 1 ), + currentIndex( 0 ) +{ + init(); +} + +PopupMenuEditor::PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu, + TQWidget * parent, const char * name ) + : TQWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase ), + formWnd( fw ), + parentMenu( parent ), + iconWidth( menu->iconWidth ), + textWidth( menu->textWidth ), + accelWidth( menu->accelWidth ), + arrowWidth( menu->arrowWidth ), + borderSize( menu->borderSize ), + currentField( menu->currentField ), + currentIndex( menu->currentIndex ) +{ + init(); + PopupMenuEditorItem * i; + for ( i = menu->itemList.first(); i; i = menu->itemList.next() ) { + PopupMenuEditorItem * n = new PopupMenuEditorItem( i, this ); + itemList.append( n ); + } +} + +PopupMenuEditor::~PopupMenuEditor() +{ + itemList.setAutoDelete( TRUE ); +} + +void PopupMenuEditor::init() +{ + reparent( ( TQMainWindow * ) formWnd->mainContainer(), pos() ); + + addItem.action()->setMenuText( i18n("new item") ); + addSeparator.action()->setMenuText( i18n("new separator") ); + + setAcceptDrops( TRUE ); + setFocusPolicy( TQ_StrongFocus ); + + lineEdit = new TQLineEdit( this ); + lineEdit->hide(); + lineEdit->setFrameStyle(TQFrame::Plain | TQFrame::NoFrame); + lineEdit->polish(); + lineEdit->setBackgroundOrigin(ParentOrigin); + lineEdit->setBackgroundMode(PaletteButton); + lineEdit->installEventFilter( this ); + + dropLine = new TQWidget( this, 0, TQt::WStyle_NoBorder | WStyle_StaysOnTop ); + dropLine->setBackgroundColor( TQt::red ); + dropLine->hide(); + + hide(); +} + +void PopupMenuEditor::insert( PopupMenuEditorItem * item, int index ) +{ + if ( !item ) + return; + if ( index == -1 ) { + itemList.append( item ); + if ( isVisible() ) + currentIndex = itemList.count() - 1; + } else { + itemList.insert( index, item ); + if ( isVisible() ) + currentIndex = index; + } + item->m = this; + item->s->parentMenu = this; + resizeToContents(); + if ( isVisible() && parentMenu ) + parentMenu->update(); // draw arrow in parent menu + emit inserted( item->action() ); +} + +void PopupMenuEditor::insert( TQAction * action, int index ) +{ + if ( !action ) + return; + insert( new PopupMenuEditorItem( action, this, 0, action->name() ), index ); +} + +void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index ) +{ + if ( !actionGroup ) + return; + bool dropdown = actionGroup->usesDropDown(); + PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, 0, + TQString( actionGroup->name() ) + "Menu" ); + TQActionGroup *g = 0; + TQObjectList *l = actionGroup->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE ); + TQObjectListIterator it( *l ); + insert( i, index ); + for ( ; it.current(); ++it ) { + g = ::tqqt_cast(it.current()); + if ( g ) { + if ( dropdown ) + i->s->insert( g ); + else + insert( g ); + } else { + i->s->insert( (TQAction*)it.current() ); + } + } + delete l; +} + +int PopupMenuEditor::find( const TQAction * action ) +{ + PopupMenuEditorItem * i = itemList.first(); + while ( i ) { + if ( i->action() == action ) + return itemList.at(); + i = itemList.next(); + } + return -1; +} + +int PopupMenuEditor::find( PopupMenuEditor * menu ) +{ + PopupMenuEditorItem * i = itemList.first(); + while ( i ) { + if ( i->subMenu() == menu ) + return itemList.at(); + i = itemList.next(); + } + return -1; +} + +int PopupMenuEditor::count() +{ + return itemList.count(); +} + +PopupMenuEditorItem * PopupMenuEditor::at( int index ) +{ + return itemList.at( index ); +} + +void PopupMenuEditor::exchange( int a, int b ) +{ + PopupMenuEditorItem * ia = itemList.at( a ); + PopupMenuEditorItem * ib = itemList.at( b ); + if ( !ia || !ib || + ia == &addItem || ia == &addSeparator || + ib == &addItem || ib == &addSeparator ) + return; // do nothing + itemList.replace( b, ia ); + itemList.replace( a, ib ); +} + +void PopupMenuEditor::cut( int index ) +{ + int idx = ( index == -1 ? currentIndex : index ); + + if ( clipboardItem && clipboardOperation == Cut ) + delete clipboardItem; + + clipboardOperation = Cut; + clipboardItem = itemList.at( idx ); + + if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) { + clipboardOperation = None; + clipboardItem = 0; + return; // do nothing + } + + RemoveActionFromPopupCommand * cmd = + new RemoveActionFromPopupCommand( i18n( "Cut Item" ), formWnd, this, idx ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void PopupMenuEditor::copy( int index ) +{ + int idx = ( index == -1 ? currentIndex : index ); + + if ( clipboardItem && clipboardOperation == Cut ) + delete clipboardItem; + + clipboardOperation = Copy; + clipboardItem = itemList.at( idx ); + + if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) { + clipboardOperation = None; + clipboardItem = 0; + } +} + +void PopupMenuEditor::paste( int index ) +{ + int idx = ( index == -1 ? currentIndex : index ); + + if ( clipboardItem && clipboardOperation ) { + PopupMenuEditorItem * n = new PopupMenuEditorItem( clipboardItem, this ); + AddActionToPopupCommand * cmd = + new AddActionToPopupCommand( i18n( "Paste Item" ), formWnd, this, n, idx ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + } +} + +void PopupMenuEditor::insertedActions( TQPtrList & list ) +{ + TQAction * a = 0; + PopupMenuEditorItem * i = itemList.first(); + + while ( i ) { + a = i->action(); + if ( a ) + list.append( a ); + i = itemList.next(); + } +} + +void PopupMenuEditor::show() +{ + resizeToContents(); + TQWidget::show(); +} + +void PopupMenuEditor::choosePixmap( int index ) +{ + int idx = ( index == -1 ? currentIndex : index ); + + PopupMenuEditorItem * i = 0; + TQAction * a = 0; + + if ( idx < (int)itemList.count() ) { + i = itemList.at( idx ); + a = i->action(); + } else { + createItem(); + } + + hide(); // qChoosePixmap hides the menu + TQIconSet icons( qChoosePixmap( 0, formWnd, 0, 0 ) ); + SetActionIconsCommand * cmd = + new SetActionIconsCommand( i18n( "Set Icon" ), formWnd, a, this, icons ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + show(); + setFocus(); +} + +void PopupMenuEditor::showLineEdit( int index ) +{ + int idx = ( index == -1 ? currentIndex : index ); + + PopupMenuEditorItem * i = 0; + + if ( idx >= (int)itemList.count() ) + i = &addItem; + else + i = itemList.at( idx ); + + // open edit currentField for item name + lineEdit->setText( i->action()->menuText() ); + lineEdit->selectAll(); + lineEdit->setGeometry( borderSize + iconWidth, borderSize + itemPos( i ), + textWidth, itemHeight( i ) ); + lineEdit->show(); + lineEdit->setFocus(); +} + +void PopupMenuEditor::setAccelerator( int key, TQt::ButtonState state, int index ) +{ + // FIXME: make this a command + + int idx = ( index == -1 ? currentIndex : index ); + + if ( key == TQt::Key_Shift || + key == TQt::Key_Control || + key == TQt::Key_Alt || + key == TQt::Key_Meta || + key == TQt::Key_unknown ) + return; // ignore these keys when they are pressed + + PopupMenuEditorItem * i = 0; + + if ( idx >= (int)itemList.count() ) + i = createItem(); + else + i = itemList.at( idx ); + + int shift = ( state & TQt::ShiftButton ? TQt::SHIFT : 0 ); + int ctrl = ( state & TQt::ControlButton ? TQt::CTRL : 0 ); + int alt = ( state & TQt::AltButton ? TQt::ALT : 0 ); + int meta = ( state & TQt::MetaButton ? TQt::META : 0 ); + + TQAction * a = i->action(); + TQKeySequence ks = a->accel(); + int keys[4] = { ks[0], ks[1], ks[2], ks[3] }; + int n = 0; + while ( n < 4 && ks[n++] ); + n--; + if ( n < 4 ) + keys[n] = key | shift | ctrl | alt | meta; + a->setAccel( TQKeySequence( keys[0], keys[1], keys[2], keys[3] ) ); + MetaDataBase::setPropertyChanged( a, "accel", TRUE ); + resizeToContents(); +} + +void PopupMenuEditor::resizeToContents() +{ + TQSize s = contentsSize(); + dropLine->resize( s.width(), 2 ); + s.rwidth() += borderSize * 2; + s.rheight() += borderSize * 2; + resize( s ); +} + +void PopupMenuEditor::showSubMenu() +{ + if ( currentIndex < (int)itemList.count() ) { + itemList.at( currentIndex )->showMenu( pos().x() + width() - borderSize * 3, + pos().y() + itemPos( at( currentIndex ) ) + + borderSize * 2 ); + setFocus(); // Keep focus in this widget + } +} + +void PopupMenuEditor::hideSubMenu() +{ + if ( currentIndex < (int)itemList.count() ) + itemList.at( currentIndex )->hideMenu(); +} + +void PopupMenuEditor::focusOnSubMenu() +{ + if ( currentIndex < (int)itemList.count() ) + itemList.at( currentIndex )->focusOnMenu(); +} + +// This function has no undo. It is only here to remove an item when its action was +// removed from the action editor. +// Use removeItem to put the command on the command stack. +void PopupMenuEditor::remove( int index ) +{ + int idx = ( index == -1 ? currentIndex : index ); + PopupMenuEditorItem * i = itemList.at( idx ); + if ( i && i->isRemovable() ) { + itemList.remove( idx ); + int n = itemList.count() + 1; + if ( currentIndex >= n ) + currentIndex = itemList.count() + 1; + emit removed( i->action() ); + resizeToContents(); + } +} + +PopupMenuEditorItem * PopupMenuEditor::createItem( TQAction * a ) +{ + ActionEditor * ae = (ActionEditor *) formWindow()->mainWindow()->child( 0, "ActionEditor" ); + if ( !a ) + a = ae->newActionEx(); + PopupMenuEditorItem * i = new PopupMenuEditorItem( a, this ); + TQString n = TQString( a->name() ) + "Item"; + formWindow()->unify( i, n, FALSE ); + i->setName( n ); + AddActionToPopupCommand * cmd = + new AddActionToPopupCommand( i18n( "Add Item" ), formWnd, this, i ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + return i; +} + +void PopupMenuEditor::removeItem( int index ) +{ + int idx = ( index == -1 ? currentIndex : index ); + if ( idx < (int)itemList.count() ) { + RemoveActionFromPopupCommand * cmd = new RemoveActionFromPopupCommand( i18n( "Remove Item" ), + formWnd, + this, + idx ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + if ( itemList.count() == 0 && parentMenu ) + parentMenu->update(); + resizeToContents(); + } +} + +PopupMenuEditorItem * PopupMenuEditor::currentItem() +{ + int count = itemList.count(); + if ( currentIndex < count ) + return itemList.at( currentIndex ); + else if ( currentIndex == count ) + return &addItem; + return &addSeparator; +} + +PopupMenuEditorItem * PopupMenuEditor::itemAt( int y ) +{ + PopupMenuEditorItem * i = itemList.first(); + int iy = 0; + + while ( i ) { + iy += itemHeight( i ); + if ( iy > y ) + return i; + i = itemList.next(); + } + iy += itemHeight( &addItem ); + if ( iy > y ) + return &addItem; + return &addSeparator; +} + +void PopupMenuEditor::setFocusAt( const TQPoint & pos ) +{ + hideSubMenu(); + lineEdit->hide(); + + currentIndex = 0; + int iy = 0; + PopupMenuEditorItem * i = itemList.first(); + + while ( i ) { + iy += itemHeight( i ); + if ( iy > pos.y() ) + break; + i = itemList.next(); + currentIndex++; + } + + iy += itemHeight( &addItem ); + if ( iy <= pos.y() ) + currentIndex++; + + if ( currentIndex < (int)itemList.count() ) { + if ( pos.x() < iconWidth ) + currentField = 0; + else if ( pos.x() < iconWidth + textWidth ) + currentField = 1; + else + currentField = 2; + } else { + currentField = 1; + } + + showSubMenu(); +} + +bool PopupMenuEditor::eventFilter( TQObject * o, TQEvent * e ) +{ + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit) && e->type() == TQEvent::FocusOut ) { + leaveEditMode( 0 ); + update(); + } + return TQWidget::eventFilter( o, e ); +} + +void PopupMenuEditor::paintEvent( TQPaintEvent * ) +{ + TQPainter p( this ); + p.save(); + TQRegion reg( rect() ); + TQRegion mid( borderSize, borderSize, + rect().width() - borderSize * 2, rect().height() - borderSize * 2 ); + reg -= mid; + p.setClipRegion( reg ); + style().tqdrawPrimitive( TQStyle::PE_PanelPopup, &p, rect(), colorGroup() ); + p.restore(); + drawItems( &p ); +} + +void PopupMenuEditor::mousePressEvent( TQMouseEvent * e ) +{ + mousePressPos = e->pos(); + setFocusAt( mousePressPos ); + e->accept(); + update(); +} + +void PopupMenuEditor::mouseDoubleClickEvent( TQMouseEvent * ) +{ + setFocusAt( mousePressPos ); + if ( currentItem() == &addSeparator ) { + PopupMenuEditorItem * i = createItem( new QSeparatorAction( 0 ) ); + i->setSeparator( TRUE ); + return; + } + if ( currentField == 0 ) { + choosePixmap(); + resizeToContents(); + } else if ( currentField == 1 ) { + showLineEdit(); + } +} + +void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) +{ + if ( e->state() & Qt::LeftButton ) { + if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) { + draggedItem = itemAt( mousePressPos.y() ); + if ( draggedItem == &addItem ) { + draggedItem = createItem(); + RenameActionCommand cmd( i18n( "Rename Item" ), formWnd, draggedItem->action(), + this, "Unnamed" ); + cmd.execute(); + // FIXME: start rename after drop + } else if ( draggedItem == &addSeparator ) { + draggedItem = createItem( new QSeparatorAction( 0 ) ); + draggedItem->setSeparator( TRUE ); + } + + PopupMenuEditorItemPtrDrag * d = + new PopupMenuEditorItemPtrDrag( draggedItem, this ); + + hideSubMenu(); + + draggedItem->setVisible( FALSE ); + resizeToContents(); + + // If the item is dropped in the same list, + // we will have two instances of the same pointer + // in the list. We use node instead. + int idx = itemList.find( draggedItem ); + TQLNode * node = itemList.currentNode(); + + d->dragCopy(); // dragevents and stuff happens + + if ( draggedItem ) { // item was not dropped + draggedItem->setVisible( TRUE ); + draggedItem = 0; + if ( hasFocus() ) { + hideSubMenu(); + resizeToContents(); + showSubMenu(); + } + } else { // item was dropped + itemList.takeNode( node )->setVisible( TRUE ); + if ( currentIndex > 0 && currentIndex > idx ) + --currentIndex; + // the drop might happen in another menu, so we'll resize + // and show the submenu there + } + } + } +} + +void PopupMenuEditor::dragEnterEvent( TQDragEnterEvent * e ) +{ + if ( e->provides( "qt/popupmenueditoritemptr" ) || + e->provides( "application/x-designer-actions" ) || + e->provides( "application/x-designer-actiongroup" ) ) { + e->accept(); + dropLine->show(); + } +} + +void PopupMenuEditor::dragLeaveEvent( TQDragLeaveEvent * ) +{ + dropLine->hide(); +} + +void PopupMenuEditor::dragMoveEvent( TQDragMoveEvent * e ) +{ + TQPoint pos = e->pos(); + dropLine->move( borderSize, snapToItem( pos.y() ) ); + + if ( currentItem() != itemAt( pos.y() ) ) { + hideSubMenu(); + setFocusAt( pos ); + showSubMenu(); + } +} + +void PopupMenuEditor::dropEvent( TQDropEvent * e ) +{ + if ( !( e->provides( "qt/popupmenueditoritemptr" ) || + e->provides( "application/x-designer-actions" ) || + e->provides( "application/x-designer-actiongroup" ) ) ) + return; + + // Hide the sub menu of the current item, but do it later + if ( currentIndex < (int)itemList.count() ) { + PopupMenuEditor *s = itemList.at( currentIndex )->s; + TQTimer::singleShot( 0, s, TQT_SLOT( hide() ) ); + } + + draggedItem = 0; + PopupMenuEditorItem * i = 0; + + if ( e->provides( "qt/popupmenueditoritemptr" ) ) { + PopupMenuEditorItemPtrDrag::decode( e, &i ); + } else { + if ( e->provides( "application/x-designer-actiongroup" ) ) { + TQActionGroup * g = ::tqqt_cast(ActionDrag::action()); + if ( g->usesDropDown() ) { + i = new PopupMenuEditorItem( g, this ); + TQString n = TQString( g->name() ) + "Item"; + formWindow()->unify( i, n, FALSE ); + i->setName( n ); + TQObjectList *l = g->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE ); + TQObjectListIterator it( *l ); + for ( ; it.current(); ++it ) { + g = ::tqqt_cast(it.current()); + if ( g ) + i->s->insert( g ); + else + i->s->insert( (TQAction*)it.current() ); + } + delete l; + } else { + dropInPlace( g, e->pos().y() ); + } + } else if ( e->provides( "application/x-designer-actions" ) ) { + TQAction *a = ::tqqt_cast(ActionDrag::action()); + i = new PopupMenuEditorItem( a, this ); + } + } + + if ( i ) { + dropInPlace( i, e->pos().y() ); + TQTimer::singleShot( 0, this, TQT_SLOT( resizeToContents() ) ); + } + + TQTimer::singleShot( 0, this, TQT_SLOT( showSubMenu() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( setFocus() ) ); + dropLine->hide(); + e->accept(); +} + +void PopupMenuEditor::keyPressEvent( TQKeyEvent * e ) +{ + if ( lineEdit->isHidden() ) { // In navigation mode + + switch ( e->key() ) { + + case TQt::Key_Delete: + hideSubMenu(); + removeItem(); + showSubMenu(); + break; + + case TQt::Key_Backspace: + clearCurrentField(); + break; + + case TQt::Key_Up: + navigateUp( e->state() & TQt::ControlButton ); + break; + + case TQt::Key_Down: + navigateDown( e->state() & TQt::ControlButton ); + break; + + case TQt::Key_Left: + navigateLeft(); + break; + + case TQt::Key_Right: + navigateRight(); + break; + + case TQt::Key_PageUp: + currentIndex = 0; + break; + + case TQt::Key_PageDown: + currentIndex = itemList.count(); + break; + + case TQt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_F2: + enterEditMode( e ); + // move on + case TQt::Key_Alt: + case TQt::Key_Shift: + case TQt::Key_Control: + // do nothing + return; + + case TQt::Key_Escape: + currentField = 0; + navigateLeft(); + break; + + case TQt::Key_C: + if ( e->state() & TQt::ControlButton && + currentIndex < (int)itemList.count() ) { + copy( currentIndex ); + break; + } + + case TQt::Key_X: + if ( e->state() & TQt::ControlButton && + currentIndex < (int)itemList.count() ) { + hideSubMenu(); + cut( currentIndex ); + showSubMenu(); + break; + } + + case TQt::Key_V: + if ( e->state() & TQt::ControlButton ) { + hideSubMenu(); + paste( currentIndex < (int)itemList.count() ? currentIndex + 1: itemList.count() ); + showSubMenu(); + break; + } + + default: + if ( currentItem()->isSeparator() ) + return; + if ( currentField == 1 ) { + showLineEdit(); + TQApplication::sendEvent( lineEdit, e ); + e->accept(); + return; + } else if ( currentField == 2 ) { + setAccelerator( e->key(), e->state() ); + showSubMenu(); + } + break; + + } + + } else { // In edit mode + switch ( e->key() ) { + case TQt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Escape: + leaveEditMode( e ); + e->accept(); + return; + } + } + update(); +} + +void PopupMenuEditor::focusInEvent( TQFocusEvent * ) +{ + showSubMenu(); + update(); + parentMenu->update(); +} + +void PopupMenuEditor::focusOutEvent( TQFocusEvent * ) +{ + TQWidget * fw = tqApp->focusWidget(); + if ( !fw || ( !::tqqt_cast(fw) && fw != lineEdit ) ) { + hideSubMenu(); + if ( fw && ::tqqt_cast(fw) ) + return; + TQWidget * w = this; + while ( w && w != fw && ::tqqt_cast(w) ) { // hide all popups + w->hide(); + w = ((PopupMenuEditor *)w)->parentEditor(); + } + } +} + +void PopupMenuEditor::drawItem( TQPainter * p, PopupMenuEditorItem * i, + const TQRect & r, int f ) const +{ + int x = r.x(); + int y = r.y(); + int h = r.height(); + + p->fillRect( r, colorGroup().brush( TQColorGroup::Background ) ); + + if ( i->isSeparator() ) { + style().tqdrawPrimitive( TQStyle::PE_Separator, p, + TQRect( r.x(), r.y() + 2, r.width(), 1 ), + colorGroup(), TQStyle::Style_Sunken | f ); + return; + } + + const TQAction * a = i->action(); + if ( a->isToggleAction() && a->isOn() ) { + style().tqdrawPrimitive( TQStyle::PE_CheckMark, p, + TQRect( x , y, iconWidth, h ), + colorGroup(), f ); + } else { + TQPixmap icon = a->iconSet().pixmap( TQIconSet::Automatic, TQIconSet::Normal ); + p->drawPixmap( x + ( iconWidth - icon.width() ) / 2, + y + ( h - icon.height() ) / 2, + icon ); + } + x += iconWidth; + p->drawText( x, y, textWidth, h, + TQPainter::AlignLeft | + TQPainter::AlignVCenter | + TQt::ShowPrefix | + TQt::SingleLine, + a->menuText() ); + + x += textWidth + borderSize * 3; + p->drawText( x, y, accelWidth, h, + TQPainter::AlignLeft | TQPainter::AlignVCenter, + a->accel() ); + if ( i->count() ) // Item has submenu + style().tqdrawPrimitive( TQStyle::PE_ArrowRight, p, + TQRect( r.width() - arrowWidth, r.y(), arrowWidth, r.height() ), + colorGroup(), f ); +} + +void PopupMenuEditor::drawWinFocusRect( TQPainter * p, const TQRect & r ) const +{ + if ( currentIndex < (int)itemList.count() && + ((PopupMenuEditor*)this)->itemList.at( currentIndex )->isSeparator() ) { + p->drawWinFocusRect( borderSize, r.y(), width() - borderSize * 2, r.height() ); + return; + } + int y = r.y(); + int h = r.height(); + if ( currentField == 0 ) + p->drawWinFocusRect( borderSize + 1, y, iconWidth - 2, h ); + else if ( currentField == 1 ) + p->drawWinFocusRect( borderSize + iconWidth, y, textWidth, h ); + else if ( currentField == 2 ) + p->drawWinFocusRect( borderSize + iconWidth + textWidth + + borderSize * 3, y, accelWidth, h ); +} + +void PopupMenuEditor::drawItems( TQPainter * p ) +{ + int flags = 0; + int idx = 0; + + TQColorGroup enabled = colorGroup(); + TQColorGroup disabled = palette().disabled(); + TQRect focus; + TQRect rect( borderSize, borderSize, width() - borderSize * 2, 0 ); + + PopupMenuEditorItem * i = itemList.first(); + while ( i ) { + if ( i->isVisible() ) { + rect.setHeight( itemHeight( i ) ); + if ( idx == currentIndex ) + focus = rect; + if ( i->action()->isEnabled() ) { + flags = TQStyle::Style_Enabled; + p->setPen( enabled.buttonText() ); + } else { + flags = TQStyle::Style_Default; + p->setPen( disabled.buttonText() ); + } + drawItem( p, i, rect, flags ); + rect.moveBy( 0, rect.height() ); + } + i = itemList.next(); + idx++; + } + + // Draw the "add item" and "add separator" items + p->setPen( darkBlue ); + rect.setHeight( itemHeight( &addItem ) ); + if ( idx == currentIndex ) + focus = rect; + drawItem( p, &addItem, rect, TQStyle::Style_Default ); + rect.moveBy( 0, rect.height() ); + idx++; + rect.setHeight( itemHeight( &addSeparator ) ); + if ( idx == currentIndex ) + focus = rect; + drawItem( p, &addSeparator, rect, TQStyle::Style_Default ); + idx++; + + if ( hasFocus() && !draggedItem ) + drawWinFocusRect( p, focus ); +} + +TQSize PopupMenuEditor::contentsSize() +{ + TQRect textRect = fontMetrics().boundingRect( addSeparator.action()->menuText() ); + textWidth = textRect.width(); + accelWidth = textRect.height(); // default size + iconWidth = textRect.height(); + + int w = 0; + int h = itemHeight( &addItem ) + itemHeight( &addSeparator ); + PopupMenuEditorItem * i = itemList.first(); + TQAction * a = 0; + while ( i ) { + if ( i->isVisible() ) { + if ( !i->isSeparator() ) { + a = i->action(); + w = a->iconSet().pixmap( TQIconSet::Automatic, TQIconSet::Normal ).rect().width() + + borderSize; // padding + iconWidth = TQMAX( iconWidth, w ); + w = fontMetrics().boundingRect( a->menuText() ).width(); + textWidth = TQMAX( textWidth, w ); + w = fontMetrics().boundingRect( a->accel() ).width() + 2; // added padding? + accelWidth = TQMAX( accelWidth, w ); + } + h += itemHeight( i ); + } + i = itemList.next(); + } + + int width = iconWidth + textWidth + borderSize * 3 + accelWidth + arrowWidth; + return TQSize( width, h ); +} + +int PopupMenuEditor::itemHeight( const PopupMenuEditorItem * item ) const +{ + if ( !item || ( item && !item->isVisible() ) ) + return 0; + if ( item->isSeparator() ) + return 4; // FIXME: hardcoded ( get from styles )r + int padding = + borderSize * 6; + TQAction * a = item->action(); + int h = a->iconSet().pixmap( TQIconSet::Automatic, TQIconSet::Normal ).rect().height(); + h = TQMAX( h, fontMetrics().boundingRect( a->menuText() ).height() + padding ); + h = TQMAX( h, fontMetrics().boundingRect( a->accel() ).height() + padding ); + return h; +} + +int PopupMenuEditor::itemPos( const PopupMenuEditorItem * item ) const +{ + PopupMenuEditor * that = ( PopupMenuEditor * ) this; + int y = 0; + PopupMenuEditorItem * i = that->itemList.first(); + while ( i ) { + if ( i == item ) + return y; + y += itemHeight( i ); + i = that->itemList.next(); + } + return y; +} + +int PopupMenuEditor::snapToItem( int y ) +{ + int iy = 0; + int dy = 0; + + PopupMenuEditorItem * i = itemList.first(); + + while ( i ) { + dy = itemHeight( i ); + if ( iy + dy / 2 > y ) + return iy; + iy += dy; + i = itemList.next(); + } + + return iy; +} + +void PopupMenuEditor::dropInPlace( PopupMenuEditorItem * i, int y ) +{ + int iy = 0; + int dy = 0; + int idx = 0; + + PopupMenuEditorItem * n = itemList.first(); + + while ( n ) { + dy = itemHeight( n ); + if ( iy + dy / 2 > y ) + break; + iy += dy; + idx++; + n = itemList.next(); + } + int same = itemList.findRef( i ); + AddActionToPopupCommand * cmd = new AddActionToPopupCommand( i18n( "Drop Item" ), formWnd, this, i, idx ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + currentIndex = ( same >= 0 && same < idx ) ? idx - 1 : idx; + currentField = 1; +} + +void PopupMenuEditor::dropInPlace( TQActionGroup * g, int y ) +{ + TQObjectList l = g->childrenListObject(); + if (l.isEmpty()) + return; + for ( int i = 0; i < (int)l.count(); ++i ) { + TQAction *a = ::tqqt_cast(l.at(i)); + TQActionGroup *g = ::tqqt_cast(l.at(i)); + if ( g ) + dropInPlace( g, y ); + else if ( a ) + dropInPlace( new PopupMenuEditorItem( a, this ), y ); + } +} + +void PopupMenuEditor::safeDec() +{ + do { + currentIndex--; + } while ( currentIndex > 0 && !currentItem()->isVisible() ); + if ( currentIndex == 0 && + !currentItem()->isVisible() && + parentMenu ) { + parentMenu->setFocus(); + } +} + +void PopupMenuEditor::safeInc() +{ + int max = itemList.count() + 1; + if ( currentIndex < max ) { + do { + currentIndex++; + } while ( currentIndex < max && !currentItem()->isVisible() ); // skip invisible items + } +} + +void PopupMenuEditor::clearCurrentField() +{ + if ( currentIndex >= (int)itemList.count() ) + return; // currentIndex is addItem or addSeparator + PopupMenuEditorItem * i = currentItem(); + hideSubMenu(); + if ( i->isSeparator() ) + return; + if ( currentField == 0 ) { + TQIconSet icons( 0 ); + SetActionIconsCommand * cmd = new SetActionIconsCommand( i18n( "Remove Icon" ), + formWnd, + i->action(), + this, + icons ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( currentField == 2 ) { + i->action()->setAccel( 0 ); + } + resizeToContents(); + showSubMenu(); + return; +} + +void PopupMenuEditor::navigateUp( bool ctrl ) +{ + if ( currentIndex > 0 ) { + hideSubMenu(); + if ( ctrl ) { + ExchangeActionInPopupCommand * cmd = + new ExchangeActionInPopupCommand( i18n( "Move Item Up" ), + formWnd, + this, + currentIndex, + currentIndex - 1 ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + safeDec(); + } else { + safeDec(); + } + showSubMenu(); + } else if ( parentMenu ) { + parentMenu->setFocus(); + parentMenu->update(); + } +} + +void PopupMenuEditor::navigateDown( bool ctrl ) +{ + hideSubMenu(); + if ( ctrl ) { + if ( currentIndex < ( (int)itemList.count() - 1 ) ) { // safe index + ExchangeActionInPopupCommand * cmd = + new ExchangeActionInPopupCommand( i18n( "Move Item Down" ), + formWnd, + this, + currentIndex, + currentIndex + 1 ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + safeInc(); + } + } else { // ! Ctrl + safeInc(); + } + if ( currentIndex >= (int)itemList.count() ) + currentField = 1; + showSubMenu(); +} + +void PopupMenuEditor::navigateLeft() +{ + if ( currentItem()->isSeparator() || + currentIndex >= (int)itemList.count() || + currentField == 0 ) { + if ( parentMenu ) { + hideSubMenu(); + parentMenu->setFocus(); + } else if ( !currentItem()->isSeparator() ) { + currentField = 2; + } + } else { + currentField--; + } +} + +void PopupMenuEditor::navigateRight() +{ + if ( !currentItem()->isSeparator() && + currentIndex < (int)itemList.count() ) { + if ( currentField == 2 ) { + focusOnSubMenu(); + } else { + currentField++; + currentField %= 3; + } + } +} + +void PopupMenuEditor::enterEditMode( TQKeyEvent * e ) +{ + PopupMenuEditorItem * i = currentItem(); + + if ( i == &addSeparator ) { + i = createItem( new QSeparatorAction( 0 ) ); + } else if ( i->isSeparator() ) { + return; + } else if ( currentField == 0 ) { + choosePixmap(); + } else if ( currentField == 1 ) { + showLineEdit(); + return; + } else {// currentField == 2 + setAccelerator( e->key(), e->state() ); + } + showSubMenu(); + return; +} + +void PopupMenuEditor::leaveEditMode( TQKeyEvent * e ) +{ + setFocus(); + lineEdit->hide(); + + PopupMenuEditorItem * i = 0; + if ( e && e->key() == TQt::Key_Escape ) { + update(); + return; + } + + if ( currentIndex >= (int)itemList.count() ) { + // new item was created + TQAction * a = formWnd->mainWindow()->actioneditor()->newActionEx(); + TQString actionText = lineEdit->text(); + actionText.replace("&&", "&"); + TQString menuText = lineEdit->text(); + a->setText( actionText ); + a->setMenuText( menuText ); + i = createItem( a ); + TQString n = constructName( i ); + formWindow()->unify( a, n, TRUE ); + a->setName( n ); + MetaDataBase::addEntry( a ); + MetaDataBase::setPropertyChanged( a, "menuText", TRUE ); + ActionEditor *ae = (ActionEditor*)formWindow()->mainWindow()->child( 0, "ActionEditor" ); + if ( ae ) + ae->updateActionName( a ); + } else { + i = itemList.at( currentIndex ); + RenameActionCommand * cmd = new RenameActionCommand( i18n( "Rename Item" ), + formWnd, + i->action(), + this, + lineEdit->text() ); + formWnd->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + resizeToContents(); + + if ( !i ) + return; + + if ( i->isSeparator() ) + hideSubMenu(); + else + showSubMenu(); +} + +TQString PopupMenuEditor::constructName( PopupMenuEditorItem *item ) +{ + TQString s; + TQString name = item->action()->menuText(); + TQWidget *e = parentEditor(); + PopupMenuEditor *p = ::tqqt_cast(e); + if ( p ) { + int idx = p->find( item->m ); + PopupMenuEditorItem * i = ( idx > -1 ? p->at( idx ) : 0 ); + s = ( i ? TQString( i->action()->name() ).remove( "Action" ) : TQString( "" ) ); + } else { + MenuBarEditor *b = ::tqqt_cast(e); + if ( b ) { + int idx = b->findItem( item->m ); + MenuBarEditorItem * i = ( idx > -1 ? b->item( idx ) : 0 ); + s = ( i ? i->menuText().lower() : TQString( "" ) ); + } + } + // replace illegal characters + + return ( RenameMenuCommand::makeLegal( s ) + + RenameMenuCommand::makeLegal( name ) + "Action" ); +} diff --git a/kdevdesigner/designer/popupmenueditor.h b/kdevdesigner/designer/popupmenueditor.h new file mode 100644 index 00000000..714ecf42 --- /dev/null +++ b/kdevdesigner/designer/popupmenueditor.h @@ -0,0 +1,237 @@ +/********************************************************************** +** Copyright (C) 2003 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef POPUPMENUEDITOR_H +#define POPUPMENUEDITOR_H + +#include +#include +#include + +class PopupMenuEditor; +class TQMenuItem; + +class PopupMenuEditorItem : public TQObject +{ + Q_OBJECT + + + friend class PopupMenuEditor; + + PopupMenuEditorItem( PopupMenuEditor * menu = 0, TQObject * parent = 0, const char * name = 0 ); + +public: + enum ItemType { + Unknown = -1, + Separator = 0, + Action = 1 + }; + + PopupMenuEditorItem( TQAction * action, PopupMenuEditor * menu, + TQObject * parent = 0, const char * name = 0 ); + PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuEditor * menu, + TQObject * parent = 0, const char * name = 0 ); + ~PopupMenuEditorItem(); + + void init(); + + ItemType type() const; + TQAction * action() const { return a; } + + void setVisible( bool enable ); + bool isVisible() const; + + void setSeparator( bool enable ) { separator = enable; } + bool isSeparator() const { return separator; } + + void setRemovable( bool enable ) { removable = enable; } + bool isRemovable() const { return removable; } + + void showMenu( int x, int y ); + void hideMenu(); + void focusOnMenu(); + PopupMenuEditor * subMenu() const { return s; } + + int count() const; + + bool eventFilter( TQObject *, TQEvent * event ); + +public slots: + void selfDestruct(); + +protected: + +private: + TQAction * a; + PopupMenuEditor * s; + PopupMenuEditor * m; + uint separator : 1; + uint removable : 1; +}; + +class FormWindow; +class MainWindow; +class TQLineEdit; + +#include + +class PopupMenuEditor : public TQWidget +{ + Q_OBJECT + + + friend class PopupMenuEditorItem; + friend class MenuBarEditor; + friend class Resource; + +public: + PopupMenuEditor( FormWindow * fw, TQWidget * parent = 0, const char * name = 0 ); + PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu, TQWidget * parent, const char * name = 0 ); + ~PopupMenuEditor(); + + void init(); + + void insert( PopupMenuEditorItem * item, int index = -1 ); + void insert( TQAction * action, int index = -1 ); + void insert( TQActionGroup * actionGroup, int index = -1 ); + int find( const TQAction * action ); + int find( PopupMenuEditor * menu ); + int count(); + PopupMenuEditorItem * at( int index ); + PopupMenuEditorItem * at( TQPoint pos ) { return itemAt( pos.y() ); } + void exchange( int a, int b ); + + void cut( int index ); + void copy( int index ); + void paste( int index ); + + void insertedActions( TQPtrList & list ); + + void show(); + void choosePixmap( int index = -1 ); + void showLineEdit( int index = -1); + void setAccelerator( int key, TQt::ButtonState state, int index = -1 ); + + FormWindow * formWindow() { return formWnd; } + bool isCreatingAccelerator() { return ( currentField == 2 ); } + + TQPtrList * items() { return &itemList; } + + TQWidget * parentEditor() { return parentMenu; } + +signals: + void inserted( TQAction * ); + void removed( TQAction * ); + +public slots: + + void cut() { cut( currentIndex ); } + void copy() { copy( currentIndex ); } + void paste() { paste( currentIndex ); } + + void remove( int index ); + void remove( TQAction * a ) { remove( find( a ) ); } + + void resizeToContents(); + void showSubMenu(); + void hideSubMenu(); + void focusOnSubMenu(); + +protected: + PopupMenuEditorItem * createItem( TQAction * a = 0 ); + void removeItem( int index = -1 ); + PopupMenuEditorItem * currentItem(); + PopupMenuEditorItem * itemAt( int y ); + void setFocusAt( const TQPoint & pos ); + + bool eventFilter( TQObject * o, TQEvent * e ); + void paintEvent( TQPaintEvent * e ); + void mousePressEvent( TQMouseEvent * e ); + void mouseDoubleClickEvent( TQMouseEvent * e ); + void mouseMoveEvent( TQMouseEvent * e ); + void dragEnterEvent( TQDragEnterEvent * e ); + void dragLeaveEvent( TQDragLeaveEvent * e ); + void dragMoveEvent( TQDragMoveEvent * e ); + void dropEvent( TQDropEvent * e ); + void keyPressEvent( TQKeyEvent * e ); + void focusInEvent( TQFocusEvent * e ); + void focusOutEvent( TQFocusEvent * e ); + + void drawItems( TQPainter * p ); + void drawItem( TQPainter * p, PopupMenuEditorItem * i, const TQRect & r, int f ) const; + void drawWinFocusRect( TQPainter * p, const TQRect & r ) const; + + TQSize contentsSize(); + int itemHeight( const PopupMenuEditorItem * item ) const; + int itemPos( const PopupMenuEditorItem * item ) const; + + int snapToItem( int y ); + void dropInPlace( PopupMenuEditorItem * i, int y ); + void dropInPlace( TQActionGroup * g, int y ); + + void safeDec(); + void safeInc(); + + void clearCurrentField(); + void navigateUp( bool ctrl ); + void navigateDown( bool ctrl ); + void navigateLeft(); + void navigateRight(); + void enterEditMode( TQKeyEvent * e ); + void leaveEditMode( TQKeyEvent * e ); + + TQString constructName( PopupMenuEditorItem *item ); + +private: + FormWindow * formWnd; + TQLineEdit * lineEdit; + TQWidget * dropLine; + TQPtrList itemList; + PopupMenuEditorItem addItem; + PopupMenuEditorItem addSeparator; + TQWidget * parentMenu; + + int iconWidth; + int textWidth; + int accelWidth; + int arrowWidth; + int borderSize; + + int currentField; + int currentIndex; + TQPoint mousePressPos; + static PopupMenuEditorItem * draggedItem; + + enum ClipboardOperation { + None = 0, + Cut = 1, + Copy = 2 + }; + static int clipboardOperation; + static PopupMenuEditorItem * clipboardItem; +}; + +#endif //POPUPMENUEDITOR_H diff --git a/kdevdesigner/designer/preferences.ui b/kdevdesigner/designer/preferences.ui new file mode 100644 index 00000000..363164ed --- /dev/null +++ b/kdevdesigner/designer/preferences.ui @@ -0,0 +1,648 @@ + +Preferences +********************************************************************* +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + Preferences + + + + 0 + 0 + 482 + 480 + + + + Preferences + + + true + + + <b>Preferences</b><p>Change the preferences of Qt Designer. There is always one tab with general preferences. There may be additional tabs, depending on which plugins are installed.</p> + + + + unnamed + + + 11 + + + 6 + + + + tabWidget + + + + pageGeneral + + + General + + + + unnamed + + + + groupBox4 + + + File Saving + + + + unnamed + + + + checkBoxAutoSave + + + Enable auto sa&ve + + + true + + + + + layout3 + + + + unnamed + + + + textLabelAutoSave + + + Auto save &interval: + + + timeEditAutoSave + + + + + timeEditAutoSave + + + + + + + + + + + + buttonGroup2 + + + Plu&gin Paths + + + + unnamed + + + + textEditPluginPaths + + + + + + + Spacer3 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + A splash screen is displayed when starting Qt Designer if this option is checked. + + + + + GroupBox5 + + + Ge&neral + + + + unnamed + + + 11 + + + 6 + + + + checkBoxWorkspace + + + Restore last &workspace on startup + + + true + + + Restore last workspace + + + The current workspace settings will be restored the next time you start Qt Designer if this option is checked. + + + + + checkBoxSplash + + + Show &splash screen on startup + + + true + + + Show Splashscreen + + + A splash screen is displayed when starting Qt Designer if this option is checked. + + + + + checkBoxStartDialog + + + Show start &dialog + + + true + + + + + checkAutoEdit + + + Disable data&base auto-edit in preview + + + true + + + + + checkBoxTextLabels + + + Show toolbutton lab&els + + + Text Labels + + + Text labels will be used in the toolbars if this is checked. + + + + + + + groupBoxGrid + + + G&rid + + + true + + + + + + + unnamed + + + 11 + + + 6 + + + + checkBoxSnapGrid + + + Sn&ap to grid + + + true + + + Snap to the grid + + + <b>Customize the grid-settings for all forms.</b><p>When <b>Snap to Grid</b> is checked, the widgets snap to the grid using the the X/Y resolution.</p> + + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + spinGridX + + + 50 + + + 5 + + + 10 + + + Grid resolution + + + <b>Customize the grid-settings for all forms.</b><p>When <b>Show Grid</b> is checked, a grid is shown on all forms using the X/Y resolution.</p> + + + + + spinGridY + + + 50 + + + 5 + + + 10 + + + Grid resolution + + + <b>Customize the grid-settings for all forms.</b><p>When <b>Show Grid</b> is checked, a grid is shown on all forms using the X/Y resolution.</p> + + + + + Label1 + + + Grid-&X: + + + spinGridX + + + + + Label1_2 + + + Grid-&Y: + + + spinGridY + + + + + + + + + ButtonGroup1 + + + Backgro&und + + + + unnamed + + + 11 + + + 6 + + + + buttonColor + + + false + + + + 0 + 0 + 0 + 0 + + + + TabFocus + + + false + + + Choose a color + + + Select a color in the color dialog. + + + + + radioColor + + + NoFocus + + + Co&lor + + + Use a background color + + + Use a background color. + + + + + radioPixmap + + + &Pixmap + + + true + + + Use a background pixmap + + + Use a background pixmap. + + + + + buttonPixmap + + + + 0 + 0 + 0 + 0 + + + + TabFocus + + + false + + + Select a pixmap + + + Choose a pixmap file. + + + + + + + + + + Layout6 + + + + unnamed + + + 0 + + + 6 + + + + helpButton + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + true + + + true + + + Close the dialog and apply all the changes. + + + + + buttonCancel + + + &Cancel + + + true + + + false + + + Close the dialog and discard any changes. + + + + + + + + + StyledButton +
    styledbutton.h
    + + 40 + 25 + + 0 + + 5 + 5 + 0 + 0 + + "image0" + clicked() + changed() + color + pixmap + scale +
    +
    + + + 789c9dd2cb8e9b301406e07d9e0225bba89a09601350d505302c5b7559a9eac23e6672b363620c0ca9faeef53949da2e2a55eab123f9e38f2f217e5e475f3e7f8cd6cf8bde0b7f8008f6c2456b3518337ffdf6e1fb62992451e8691ac5cb778be55304d1277b6e71fc12c6ab0d157222e61bd8e4c812196f6216535a13f318624a6764b2495842e99558249014c81e99c6294b69d3376291424ae9806431638cd28628183081f4489e70ce13e4852878c129ad905992f18cd291283295517a466ed32ddfa64847945bb595c80e99a739cf29d54499ab9c528b2c58c10b86344428540148400a26b8a0541241b482d215523299494a0551c9562ae409091c32e0c82351410b942aa4e22a53941e882d36e41ed966d8903b2215f215f99a6143b6442afaafff5aff485658622584a091941256948443d1cabbdd6ebf3f28753c09a9e9cdc1fe703c9e4ea19f689a0430fa4c8908082be093d08d016bbb0bbd5e7ceafade5b30de19d083b3fa9e008cd39b9fafd69495b473af7fcfb15325c1d61eea0afaf005ddf97b5295c658a866338f97591babef7340fa396c6c5ca9e7fe650807d0bf566b4262299986ba335a3b4a2cc84b69ac85b1b673037d8fabf95b023a9c09cc7530e104dd5419ed6e27083fb09a7c752db5a9bd31cde4ec634ed8a39aebbe337618c3f6fdc5dee6d8b0bb0d6b5b8b1fad43d78fe4e14e3f6aace8e29d9d736777fea3c686eee0138c9726d4d00c548df7a315ff750f7ebc5ffc04a0e5308d + + + + + buttonOk + clicked() + Preferences + accept() + + + buttonCancel + clicked() + Preferences + reject() + + + radioColor + toggled(bool) + buttonColor + setEnabled(bool) + + + radioPixmap + toggled(bool) + buttonPixmap + setEnabled(bool) + + + + buttonOk + buttonCancel + tabWidget + radioColor + radioPixmap + buttonColor + buttonPixmap + checkBoxSnapGrid + spinGridX + spinGridY + checkBoxWorkspace + checkBoxSplash + checkBoxStartDialog + checkAutoEdit + checkBoxTextLabels + helpButton + + + init() + destroy() + + + + styledbutton.h + styledbutton.h + +
    diff --git a/kdevdesigner/designer/previewframe.cpp b/kdevdesigner/designer/previewframe.cpp new file mode 100644 index 00000000..c26d51fc --- /dev/null +++ b/kdevdesigner/designer/previewframe.cpp @@ -0,0 +1,57 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include +#include + +#include "previewframe.h" + +PreviewFrame::PreviewFrame( TQWidget *parent, const char *name ) + : TQVBox( parent, name ) +{ + setMinimumSize(200, 200); + setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); + setLineWidth(1); + + PreviewWorkspace * w = new PreviewWorkspace( this ); + w->setEraseColor(colorGroup().dark()); + previewWidget = new PreviewWidget( w ); + previewWidget->move( 10, 10 ); +} + +void PreviewFrame::setPreviewPalette(TQPalette pal) +{ + previewWidget->setPalette(pal); +} + +void PreviewWorkspace::paintEvent( TQPaintEvent* ) +{ + TQPainter p ( this ); + p.setPen( TQPen( white ) ); + p.drawText ( 0, height() / 2, width(), height(), AlignHCenter, + "The moose in the noose\nate the goose who was loose." ); +} + diff --git a/kdevdesigner/designer/previewframe.h b/kdevdesigner/designer/previewframe.h new file mode 100644 index 00000000..1883a062 --- /dev/null +++ b/kdevdesigner/designer/previewframe.h @@ -0,0 +1,61 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PREVIEWFRAME_H +#define PREVIEWFRAME_H + +#include +#include + +#include "previewwidgetimpl.h" + +class PreviewWorkspace : public TQWorkspace +{ + Q_OBJECT + +public: + PreviewWorkspace( TQWidget* parent = 0, const char* name = 0 ) + : TQWorkspace( parent, name ) {} + ~PreviewWorkspace() {} + +protected: + void paintEvent( TQPaintEvent* ); +}; + +class PreviewFrame : public TQVBox +{ + Q_OBJECT + + +public: + PreviewFrame( TQWidget *parent = 0, const char *name = 0 ); + void setPreviewPalette(TQPalette); + +private: + PreviewWidget *previewWidget; +}; + +#endif diff --git a/kdevdesigner/designer/previewwidget.ui b/kdevdesigner/designer/previewwidget.ui new file mode 100644 index 00000000..3b792253 --- /dev/null +++ b/kdevdesigner/designer/previewwidget.ui @@ -0,0 +1,304 @@ + +PreviewWidgetBase +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + PreviewWidgetBase + + + + 0 + 0 + 378 + 236 + + + + + 1 + 1 + + + + Preview Window + + + + unnamed + + + 11 + + + 6 + + + + Layout6 + + + + unnamed + + + 0 + + + 6 + + + + Layout17 + + + + unnamed + + + 0 + + + 6 + + + + ButtonGroup1 + + + ButtonGroup + + + + unnamed + + + 11 + + + 6 + + + + RadioButton1 + + + RadioButton1 + + + true + + + + + RadioButton2 + + + RadioButton2 + + + + + RadioButton3 + + + RadioButton3 + + + + + + + ButtonGroup2 + + + ButtonGroup2 + + + + unnamed + + + 11 + + + 6 + + + + CheckBox1 + + + CheckBox1 + + + true + + + + + CheckBox2 + + + CheckBox2 + + + + + + + ProgressBar1 + + + 50 + + + + + + + Layout5 + + + + unnamed + + + 0 + + + 6 + + + + LineEdit1 + + + LineEdit + + + + + + ComboBox + + + + ComboBox1 + + + + + Layout13 + + + + unnamed + + + 0 + + + 6 + + + + SpinBox1 + + + + + PushButton1 + + + PushButton + + + + + + + ScrollBar1 + + + Horizontal + + + + + Slider1 + + + Horizontal + + + + + textView + + + + 32767 + 50 + + + + <p> +<a href="http://www.trolltech.com/">http://www.trolltech.com</a> +</p> +<p> +<a href="http://www.kde.org/">http://www.kde.org</a> +</p> + + + + + + + + + Spacer2 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + + init() + destroy() + + diff --git a/kdevdesigner/designer/previewwidgetimpl.cpp b/kdevdesigner/designer/previewwidgetimpl.cpp new file mode 100644 index 00000000..d574f9ae --- /dev/null +++ b/kdevdesigner/designer/previewwidgetimpl.cpp @@ -0,0 +1,65 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "tqobjectlist.h" +#include "previewwidgetimpl.h" + +PreviewWidget::PreviewWidget( TQWidget *parent, const char *name ) + : PreviewWidgetBase( parent, name ) +{ + // install event filter on child widgets + TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING); + TQObjectListIt it(*l); + TQObject * obj; + while ((obj = it.current()) != 0) { + ++it; + obj->installEventFilter(this); + ((TQWidget*)obj)->setFocusPolicy(TQ_NoFocus); + } +} + +void PreviewWidget::closeEvent(TQCloseEvent *e) +{ + e->ignore(); +} + +bool PreviewWidget::eventFilter(TQObject *, TQEvent *e) +{ + switch ( e->type() ) { + case TQEvent::MouseButtonPress: + case TQEvent::MouseButtonRelease: + case TQEvent::MouseButtonDblClick: + case TQEvent::MouseMove: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: + case TQEvent::Enter: + case TQEvent::Leave: + return TRUE; // ignore; + default: + break; + } + return FALSE; +} diff --git a/kdevdesigner/designer/previewwidgetimpl.h b/kdevdesigner/designer/previewwidgetimpl.h new file mode 100644 index 00000000..d8887bee --- /dev/null +++ b/kdevdesigner/designer/previewwidgetimpl.h @@ -0,0 +1,44 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PREVIEWWIDGETIMPL_H +#define PREVIEWWIDGETIMPL_H + +#include "previewwidget.h" + +class PreviewWidget : public PreviewWidgetBase +{ + Q_OBJECT + + +public: + PreviewWidget( TQWidget *parent = 0, const char *name = 0 ); + + void closeEvent(TQCloseEvent *); + bool eventFilter(TQObject *, TQEvent *); +}; + +#endif diff --git a/kdevdesigner/designer/project.cpp b/kdevdesigner/designer/project.cpp new file mode 100644 index 00000000..0ab26894 --- /dev/null +++ b/kdevdesigner/designer/project.cpp @@ -0,0 +1,1558 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +**1 This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "project.h" +#include "formwindow.h" +#include "designerappiface.h" +#include "../interfaces/languageinterface.h" +#include "pixmapcollection.h" +#ifndef TQT_NO_SQL +#include "dbconnectionimpl.h" +#endif +#include "resource.h" +#include +#include "outputwindow.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "mainwindow.h" +#include + +#ifndef TQT_NO_SQL +#include +#include +#include +#endif + +#include +#ifdef Q_OS_UNIX +# include +#endif + +#include + +#ifndef TQT_NO_SQL +DatabaseConnection::~DatabaseConnection() +{ + delete iface; +} + +bool DatabaseConnection::refreshCatalog() +{ +#ifndef TQT_NO_SQL + if ( loaded ) + return TRUE; + if ( !open() ) + return FALSE; + tbls = conn->tables( TQSql::TableType( TQSql::Tables | TQSql::Views ) ); + flds.clear(); + for ( TQStringList::Iterator it = tbls.begin(); it != tbls.end(); ++it ) { + TQSqlRecord fil = conn->record( *it ); + TQStringList lst; + for ( uint j = 0; j < fil.count(); ++j ) + lst << fil.field( j )->name(); + flds.insert( *it, lst ); + } + loaded = TRUE; + conn->close(); + return loaded; +#else + return FALSE; +#endif +} + +#ifndef TQT_NO_SQL +void DatabaseConnection::remove() +{ + if ( nm == "(default)" ) + TQSqlDatabase::removeDatabase( TQSqlDatabase::defaultConnection ); + else + TQSqlDatabase::removeDatabase( nm ); + // the above will effectively delete the current connection + conn = 0; +} +#endif + +bool DatabaseConnection::open( bool suppressDialog ) +{ +#ifndef TQT_NO_SQL + // register our name, if nec + if ( nm == "(default)" ) { + if ( !TQSqlDatabase::contains() ) // default doesn't exists? + conn = TQSqlDatabase::addDatabase( drv ); + else + conn = TQSqlDatabase::database(); + } else { + if ( !TQSqlDatabase::contains( nm ) ) + conn = TQSqlDatabase::addDatabase( drv, nm ); + else + conn = TQSqlDatabase::database( nm ); + } + conn->setDatabaseName( dbName ); + conn->setUserName( uname ); + conn->setPassword( pword ); + conn->setHostName( hname ); + conn->setPort( prt ); + bool success = conn->open(); + for( ; suppressDialog == FALSE ; ) { + bool done = FALSE; + if ( !success ) { + DatabaseConnectionEditor dia( this, 0 , 0 , TRUE ); + switch( dia.exec() ) { + case TQDialog::Accepted: + done = FALSE; + break; + case TQDialog::Rejected: + done = TRUE; + break; + } + } + if ( done ) + break; + conn->setUserName( uname ); + conn->setPassword( pword ); + conn->setHostName( hname ); + conn->setPort( prt ); + success = conn->open(); + if ( !success ) { + switch( TQMessageBox::warning( project->messageBoxParent(), i18n( "Connection" ), + i18n( "Could not connect to the database.\n" + "Press 'OK' to continue or 'Cancel' to " + "specify different\nconnection information.\n" ) + + TQString( "[" + conn->lastError().driverText() + "\n" + + conn->lastError().databaseText() + "]\n" ), + i18n( "&OK" ), + i18n( "&Cancel" ), TQString(), 0, 1 ) ) { + case 0: // OK or Enter + continue; + case 1: // Cancel or Escape + done = TRUE; + break; + } + } else + break; + if ( done ) + break; + } + if ( !success ) { + dbErr = conn->lastError().driverText() + "\n" + conn->lastError().databaseText(); + remove(); + } + return success; +#else + return FALSE; +#endif +} + +void DatabaseConnection::close() +{ + if ( !loaded ) + return; +#ifndef TQT_NO_SQL + if ( conn ) { + conn->close(); + } +#endif +} + +DesignerDatabase *DatabaseConnection::iFace() +{ + if ( !iface ) + iface = new DesignerDatabaseImpl( this ); + return iface; +} + +#endif + +//////// + +bool Project::isDummy() const +{ + return isDummyProject; +} + +Project::Project( const TQString &fn, const TQString &pName, + TQPluginManager *pm, bool isDummy, + const TQString &l ) + : proName( pName ), projectSettingsPluginManager( pm ), isDummyProject( isDummy ) +{ + modified = TRUE; + pixCollection = new PixmapCollection( this ); + iface = 0; + lang = l; + is_cpp = lang == "C++"; + cfg.insert( "(all)", "qt warn_on release" ); + templ = "app"; + setFileName( fn ); + if ( !pName.isEmpty() ) + proName = pName; + sourcefiles.setAutoDelete( TRUE ); + modified = FALSE; + objs.setAutoDelete( FALSE ); + fakeFormFiles.setAutoDelete( FALSE ); +} + +Project::~Project() +{ + if ( singleProjectMode() ) + removeTempProject(); + delete iface; + delete pixCollection; +} + +void Project::setModified( bool b ) +{ + modified = b; + emit projectModified(); +} + +#ifndef TQT_NO_SQL +DatabaseConnection *Project::databaseConnection( const TQString &name ) +{ + for ( DatabaseConnection *conn = dbConnections.first(); + conn; + conn = dbConnections.next() ) { + if ( conn->name() == name ) + return conn; + } + return 0; +} +#endif + +void Project::setFileName( const TQString &fn, bool doClear ) +{ + if ( fn == filename ) + return; + + if ( singleProjectMode() ) { + TQString qsa = TQString( getenv( "HOME" ) ) + TQString( "/.qsa" ); + if ( !TQFile::exists( qsa ) ) { + TQDir d; + d.mkdir( qsa ); + } + if ( fn == singleProFileName ) + return; + singleProFileName = fn; + static int counter = 0; + TQString str_counter = TQString::number( counter++ ); + str_counter = "/.qsa/" + str_counter; + LanguageInterface *iface = MetaDataBase::languageInterface( language() ); + filename = TQString( getenv( "HOME" ) + str_counter + TQString( "tmp_" ) + + TQFileInfo( fn ).baseName() + "/" + TQFileInfo( fn ).baseName() + ".pro" ); + removeTempProject(); + if ( iface && iface->supports( LanguageInterface::CompressProject ) ) { + filename = iface->uncompressProject( makeAbsolute( singleProFileName ), + TQString( getenv( "HOME" ) + + str_counter + TQString( "tmp_" ) + + TQFileInfo( fn ).baseName() ) ); + proName = makeAbsolute( singleProFileName ); + } + } else { + filename = fn; + if ( !filename.endsWith( ".pro" ) ) + filename += ".pro"; + proName = filename; + } + + + if ( proName.contains( '.' ) ) + proName = proName.left( proName.find( '.' ) ); + + if ( !doClear ) + return; + clear(); + if ( TQFile::exists( filename ) ) + parse(); +} + +TQString Project::fileName( bool singlePro ) const +{ + if ( singlePro ) + return singleProFileName; + return filename; +} + +TQString Project::databaseDescription() const +{ + return dbFile; +} + +TQString Project::projectName() const +{ + return proName; +} + +static TQString parse_part( const TQString &part ) +{ + TQString res; + bool inName = FALSE; + TQString currName; + for ( int i = 0; i < (int)part.length(); ++i ) { + TQChar c = part[ i ]; + if ( !inName ) { + if ( c != ' ' && c != '\t' && c != '\n' && c != '=' && c != '\\' && c != '+' ) + inName = TRUE; + else + continue; + } + if ( inName ) { + if ( c == '\n' ) + break; + res += c; + } + } + return res; +} + +TQStringList parse_multiline_part( const TQString &contents, const TQString &key, int *start = 0 ) +{ + if ( start ) + *start = -1; + TQString lastWord; + // Account for things like win32: SOURCES + int extraWhiteSpaceCount = 0; + int braceCount = 0; + for ( int i = 0; i < (int)contents.length(); ++i ) { + TQChar c( contents[ i ] ); + switch ( c ) { + case '{': + braceCount++; + lastWord = ""; + break; + case '}': + braceCount--; + lastWord = ""; + break; + case ' ': case '\t': + if (!key.startsWith(lastWord)) { + lastWord = ""; + extraWhiteSpaceCount = 0; + } else { + extraWhiteSpaceCount++; + } + break; + case '\\': case '\n': + lastWord = ""; + break; + default: + lastWord += c; + } + + // ### we should read the 'bla { SOURCES= ... }' stuff as well (braceCount > 0) + if ( lastWord == key && braceCount == 0 ) { + if ( start ) + *start = i - lastWord.length() - extraWhiteSpaceCount + 1; + TQStringList lst; + bool inName = FALSE; + TQString currName; + bool hadEqual = FALSE; + for ( ; i < (int)contents.length(); ++i ) { + c = contents[ i ]; + if ( !hadEqual && c != '=' ) + continue; + if ( !hadEqual ) { + hadEqual = TRUE; + continue; + } + if ( ( c.isLetter() || c.isDigit() || c == '.' || c == '/' || c == '_' || c == '\\' || + c == '\"' || c == '\'' || c == '=' || + c == '$' || c == '-' || c == '(' || c == ')' || c == ':' || c == '+' || c == ',' || c == '~' ) && + c != ' ' && c != '\t' && c != '\n' ) { + if ( !inName ) + currName = TQString(); + if ( c != '\\' || contents[i+1] != '\n' ) { + currName += c; + inName = TRUE; + } + } else { + if ( inName ) { + inName = FALSE; + if ( currName.simplifyWhiteSpace() != "\\" ) + lst.append( currName ); + } + if ( c == '\n' && i > 0 && contents[ (int)i - 1 ] != '\\' ) + break; + } + } + return lst; + } + } + + return TQStringList(); +} + +void Project::parse() +{ + TQFile f( filename ); + if ( !f.exists() || !f.open( IO_ReadOnly ) ) + return; + TQTextStream ts( &f ); + TQString contents = ts.read(); + f.close(); + + proName = TQFileInfo( filename ).baseName(); + + TQStringList::ConstIterator it; + + int i = contents.find( "LANGUAGE" ); + if ( i != -1 ) { + lang = ""; + is_cpp = FALSE; + TQString part = contents.mid( i + TQString( "LANGUAGE" ).length() ); + lang = parse_part( part ); + is_cpp = lang == "C++"; + } + + i = contents.find( "DBFILE" ); + if ( i != -1 ) { + dbFile = ""; + TQString part = contents.mid( i + TQString( "DBFILE" ).length() ); + dbFile = parse_part( part ); + } + + TQStringList uifiles = parse_multiline_part( contents, "FORMS" ); + uifiles += parse_multiline_part( contents, "INTERFACES" ); // compatibility + for ( it = uifiles.begin(); it != uifiles.end(); ++it ) { + if ( (*it).startsWith( "__APPOBJ" ) ) + continue; + (void) new FormFile( *it, FALSE, this ); + } + + + i = contents.find( "TEMPLATE" ); + if ( i != -1 ) { + templ = ""; + TQString part = contents.mid( i + TQString( "TEMPLATE" ).length() ); + templ = parse_part( part ); + } + + readPlatformSettings( contents, "CONFIG", cfg ); + readPlatformSettings( contents, "LIBS", lbs ); + readPlatformSettings( contents, "INCLUDEPATH", inclPath ); + readPlatformSettings( contents, "DEFINES", defs ); + readPlatformSettings( contents, "SOURCES", sources ); + readPlatformSettings( contents, "HEADERS", headers ); + + LanguageInterface *iface = MetaDataBase::languageInterface( lang ); + if ( iface ) { + TQStringList sourceKeys; + iface->sourceProjectKeys( sourceKeys ); + for ( TQStringList::Iterator it = sourceKeys.begin(); it != sourceKeys.end(); ++it ) { + TQStringList lst = parse_multiline_part( contents, *it ); + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) + (void) new SourceFile( *it, FALSE, this ); + } + } + + updateCustomSettings(); + + for ( it = csList.begin(); it != csList.end(); ++it ) { + i = contents.find( *it ); + if ( i != -1 ) { + TQString val = ""; + TQString part = contents.mid( i + TQString( *it ).length() ); + val = parse_part( part ); + customSettings.replace( *it, val ); + } + } + + loadConnections(); + + TQStringList images = parse_multiline_part( contents, "IMAGES" ); + + // ### remove that for the final - this is beta-compatibility + if ( images.isEmpty() && TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).exists() ) { + images = TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).entryList(); + for ( int i = 0; i < (int)images.count(); ++i ) + images[ i ].prepend( "images/" ); + modified = TRUE; + } + + for ( TQStringList::ConstIterator pit = images.begin(); pit != images.end(); ++pit ) + pixCollection->load( *pit ); +} + +void Project::clear() +{ + dbFile = ""; + proName = "unnamed"; + desc = ""; +} + +bool Project::removeSourceFile( SourceFile *sf ) +{ + if ( !sourcefiles.containsRef( sf ) ) + return FALSE; + if ( !sf->close() ) + return FALSE; + sourcefiles.removeRef( sf ); + modified = TRUE; + emit sourceFileRemoved( sf ); + return TRUE; +} + +void Project::setDatabaseDescription( const TQString &db ) +{ + dbFile = db; +} + +void Project::setDescription( const TQString &s ) +{ + desc = s; +} + +TQString Project::description() const +{ + return desc; +} + + +bool Project::isValid() const +{ + // #### do more checking here? + if ( filename.isEmpty() || proName.isEmpty() ) + return FALSE; + + return TRUE; +} + +TQString Project::makeAbsolute( const TQString &f ) +{ + if ( isDummy() ) + return f; + TQString encodedUrl = TQFileInfo( filename ).dirPath( TRUE ); + TQUrl::encode( encodedUrl ); + TQUrl u( encodedUrl, f ); + return u.path(); +} + +TQString Project::makeRelative( const TQString &f ) +{ + if ( isDummy() ) + return f; + TQString p = TQFileInfo( filename ).dirPath( TRUE ); + TQString f2 = f; + if ( f2.left( p.length() ) == p ) + f2.remove( 0, p.length() + 1 ); + return f2; +} + +static void remove_contents( TQString &contents, const TQString &s ) +{ + int i = contents.find( s ); + if ( i != -1 ) { + int start = i; + int end = contents.find( '\n', i ); + if ( end == -1 ) + end = contents.length() - 1; + contents.remove( start, end - start + 1 ); + } +} + +static void remove_multiline_contents( TQString &contents, const TQString &s, int *strt = 0 ) +{ + int i = contents.find( s ); + if ( strt ) + *strt = i; + int start = i; + bool lastWasBackspash = FALSE; + if ( i != -1 && ( i == 0 || contents[ i - 1 ] != '{' || contents[ i - 1 ] != ':' ) ) { + for ( ; i < (int)contents.length(); ++i ) { + if ( contents[ i ] == '\n' && !lastWasBackspash ) + break; + lastWasBackspash = ( contents[ i ] == '\\' || + lastWasBackspash && ( contents[ i ] == ' ' || contents[ i ] == '\t' ) ); + } + contents.remove( start, i - start + 1 ); + } +} + +void Project::save( bool onlyProjectFile ) +{ + bool anythingModified = FALSE; + + // save sources and forms + if ( !onlyProjectFile ) { + + saveConnections(); + + for ( SourceFile *sf = sourcefiles.first(); sf; sf = sourcefiles.next() ) { + anythingModified = anythingModified || sf->isModified(); + if ( !sf->save() ) + return; + } + + for ( FormFile *ff = formfiles.first(); ff; ff = formfiles.next() ) { + anythingModified = anythingModified || ff->isModified(); + if ( !ff->save() ) + return; + } + } + + if ( isDummy() || filename.isEmpty() ) + return; + + if ( !modified ) { + if ( singleProjectMode() ) { + LanguageInterface *iface = MetaDataBase::languageInterface( language() ); + if ( iface && iface->supports( LanguageInterface::CompressProject ) ) + iface->compressProject( makeAbsolute( filename ), singleProFileName, anythingModified ); + } + return; + } + + TQFile f( filename ); + TQString original = ""; + + // read the existing file + bool hasPreviousContents = FALSE; + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + original = ts.read(); + f.close(); + hasPreviousContents = TRUE; + remove_contents( original, "{SOURCES+=" ); // ### compatibility with early 3.0 betas + remove_contents( original, "DBFILE" ); + remove_contents( original, "LANGUAGE" ); + remove_contents( original, "TEMPLATE" ); + removePlatformSettings( original, "CONFIG" ); + removePlatformSettings( original, "DEFINES" ); + removePlatformSettings( original, "LIBS" ); + removePlatformSettings( original, "INCLUDEPATH" ); + removePlatformSettings( original, "SOURCES" ); + removePlatformSettings( original, "HEADERS" ); + remove_multiline_contents( original, "FORMS" ); + remove_multiline_contents( original, "INTERFACES" ); // compatibility + remove_multiline_contents( original, "IMAGES" ); + for ( TQStringList::Iterator it = csList.begin(); it != csList.end(); ++it ) + remove_contents( original, *it ); + } + + // the contents of the saved file + TQString contents; + + // template + contents += "TEMPLATE\t= " + templ + "\n"; + + // language + contents += "LANGUAGE\t= " + lang + "\n"; + contents += "\n"; + + // config + writePlatformSettings( contents, "CONFIG", cfg ); + LanguageInterface *iface = MetaDataBase::languageInterface( lang ); + if ( iface ) { + TQStringList sourceKeys; + iface->sourceProjectKeys( sourceKeys ); + for ( TQStringList::Iterator spit = sourceKeys.begin(); spit != sourceKeys.end(); ++spit ) + remove_multiline_contents( contents, *spit ); + } + contents += "\n"; + + // libs, defines, includes + writePlatformSettings( contents, "LIBS", lbs ); + writePlatformSettings( contents, "DEFINES", defs ); + writePlatformSettings( contents, "INCLUDEPATH", inclPath ); + writePlatformSettings( contents, "SOURCES", sources ); + writePlatformSettings( contents, "HEADERS", headers ); + + // unix + if ( !hasPreviousContents ) { + contents += + "unix {\n" + " UI_DIR = .ui\n" + " MOC_DIR = .moc\n" + " OBJECTS_DIR = .obj\n" + "}\n"; + } + contents += "\n"; + + // sources + if ( !sourcefiles.isEmpty() && iface ) { + TQMap sourceToKey; + for ( SourceFile *f = sourcefiles.first(); f; f = sourcefiles.next() ) { + TQString key = iface->projectKeyForExtension( TQFileInfo( f->fileName() ).extension() ); + TQStringList lst = sourceToKey[ key ]; + lst << makeRelative( f->fileName() ); + sourceToKey.replace( key, lst ); + } + + for ( TQMap::Iterator skit = sourceToKey.begin(); + skit != sourceToKey.end(); ++skit ) { + TQString part = skit.key() + "\t+= "; + TQStringList lst = *skit; + for ( TQStringList::Iterator sit = lst.begin(); sit != lst.end(); ++sit ) { + part += *sit; + part += ++sit != lst.end() ? " \\\n\t" : ""; + --sit; + } + part += "\n"; + contents += part; + } + } + + // forms and interfaces + if ( !formfiles.isEmpty() ) { + contents += "FORMS\t= "; + for ( TQPtrListIterator fit = formfiles; fit.current(); ++fit ) { + contents += fit.current()->fileName() + + (fit != formfiles.last() ? " \\\n\t" : ""); + } + contents += "\n"; + } + + // images + if ( !pixCollection->isEmpty() ) { + contents += "IMAGES\t= "; + TQValueList pixmaps = pixCollection->pixmaps(); + for ( TQValueList::Iterator it = pixmaps.begin(); + it != pixmaps.end(); ++it ) { + contents += makeRelative( (*it).absname ); + contents += ++it != pixmaps.end() ? " \\\n\t" : ""; + --it; + } + contents += "\n"; + } + + // database + if ( !dbFile.isEmpty() ) + contents += "DBFILE\t= " + dbFile + "\n"; + contents += "\n"; + + // custom settings + for ( TQStringList::Iterator it = csList.begin(); it != csList.end(); ++it ) { + TQString val = *customSettings.find( *it ); + if ( !val.isEmpty() ) + contents += *it + "\t= " + val + "\n"; + } + + if ( !f.open( IO_WriteOnly | IO_Translate ) ) { + TQMessageBox::warning( messageBoxParent(), + "Save Project Failed", "Couldn't write project file " + filename ); + return; + } + + TQTextStream os( &f ); + os << contents; + if (hasPreviousContents) + os << original; + + f.close(); + + setModified( FALSE ); + + if ( singleProjectMode() ) { + LanguageInterface *iface = MetaDataBase::languageInterface( language() ); + if ( iface && iface->supports( LanguageInterface::CompressProject ) ) + iface->compressProject( makeAbsolute( filename ), singleProFileName, TRUE ); + } +} + +#ifndef TQT_NO_SQL +TQPtrList Project::databaseConnections() const +{ + return dbConnections; +} +#endif + +#ifndef TQT_NO_SQL +void Project::setDatabaseConnections( const TQPtrList &lst ) +{ + dbConnections = lst; +} +#endif + +#ifndef TQT_NO_SQL +void Project::addDatabaseConnection( DatabaseConnection *conn ) +{ + dbConnections.append( conn ); + modified = TRUE; +} +#endif + +#ifndef TQT_NO_SQL +void Project::removeDatabaseConnection( const TQString &c ) +{ + for ( DatabaseConnection *conn = dbConnections.first(); conn; conn = dbConnections.next() ) { + if ( conn->name() == c ) { + conn->remove(); + dbConnections.removeRef( conn ); + delete conn; + return; + } + } +} +#endif + +#ifndef TQT_NO_SQL +TQStringList Project::databaseConnectionList() +{ + TQStringList lst; + for ( DatabaseConnection *conn = dbConnections.first(); conn; conn = dbConnections.next() ) + lst << conn->name(); + return lst; +} +#endif + +#ifndef TQT_NO_SQL +TQStringList Project::databaseTableList( const TQString &connection ) +{ + DatabaseConnection *conn = databaseConnection( connection ); + if ( !conn ) { + return TQStringList(); + } + return conn->tables(); +} +#endif + +#ifndef TQT_NO_SQL +TQStringList Project::databaseFieldList( const TQString &connection, const TQString &table ) +{ + DatabaseConnection *conn = databaseConnection( connection ); + if ( !conn ) + return TQStringList(); + return conn->fields( table ); +} +#endif + +#ifndef TQT_NO_SQL +static TQString makeIndent( int indent ) +{ + TQString s; + s.fill( ' ', indent * 4 ); + return s; +} +#endif + +#ifndef TQT_NO_SQL +static void saveSingleProperty( TQTextStream &ts, const TQString& name, const TQString& value, int indent ) +{ + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << value << "" << endl; + --indent; + ts << makeIndent( indent ) << "" << endl; +} +#endif + +void Project::saveConnections() +{ +#ifndef TQT_NO_SQL + if ( dbFile.isEmpty() ) { + TQFileInfo fi( fileName() ); + setDatabaseDescription( fi.baseName() + ".db" ); + } + + TQFile f( makeAbsolute( dbFile ) ); + + if ( dbConnections.isEmpty() ) { + if ( f.exists() ) + f.remove(); + setDatabaseDescription( "" ); + modified = TRUE; + return; + } + + /* .db xml */ + if ( f.open( IO_WriteOnly | IO_Translate ) ) { + TQTextStream ts( &f ); + ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) ); + ts << "" << endl; + + /* db connections */ + int indent = 0; + for ( DatabaseConnection *conn = dbConnections.first(); conn; conn = dbConnections.next() ) { + ts << makeIndent( indent ) << "" << endl; + ++indent; + saveSingleProperty( ts, "name", conn->name(), indent ); + saveSingleProperty( ts, "driver", conn->driver(), indent ); + saveSingleProperty( ts, "database", conn->database(), indent ); + saveSingleProperty( ts, "username", conn->username(), indent ); + saveSingleProperty( ts, "hostname", conn->hostname(), indent ); + saveSingleProperty( ts, "port", TQString::number( conn->port() ), indent ); + + /* connection tables */ + TQStringList tables = conn->tables(); + for ( TQStringList::Iterator it = tables.begin(); + it != tables.end(); ++it ) { + ts << makeIndent( indent ) << "" << endl; + ++indent; + saveSingleProperty( ts, "name", (*it), indent ); + + /* tables fields */ + TQStringList fields = conn->fields( *it ); + for ( TQStringList::Iterator it2 = fields.begin(); + it2 != fields.end(); ++it2 ) { + ts << makeIndent( indent ) << "" << endl; + ++indent; + saveSingleProperty( ts, "name", (*it2), indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + + --indent; + ts << makeIndent( indent ) << "
    " << endl; + } + + --indent; + ts << makeIndent( indent ) << "
    " << endl; + } + + ts << "
    " << endl; + f.close(); + } +#endif +} + +#ifndef TQT_NO_SQL +static TQDomElement loadSingleProperty( TQDomElement e, const TQString& name ) +{ + TQDomElement n; + for ( n = e.firstChild().toElement(); + !n.isNull(); + n = n.nextSibling().toElement() ) { + if ( n.tagName() == "property" && n.toElement().attribute("name") == name ) + return n; + } + return n; +} +#endif + +void Project::loadConnections() +{ +#ifndef TQT_NO_SQL + if ( dbFile.isEmpty() || !TQFile::exists( makeAbsolute( dbFile ) ) ) + return; + + TQFile f( makeAbsolute( dbFile ) ); + if ( f.open( IO_ReadOnly ) ) { + TQDomDocument doc; + TQString errMsg; + int errLine; + if ( doc.setContent( &f, &errMsg, &errLine ) ) { + TQDomElement e; + e = doc.firstChild().toElement(); + + /* connections */ + TQDomNodeList connections = e.toElement().elementsByTagName( "connection" ); + for ( uint i = 0; i < connections.length(); i++ ) { + TQDomElement connection = connections.item(i).toElement(); + TQDomElement connectionName = loadSingleProperty( connection, "name" ); + TQDomElement connectionDriver = loadSingleProperty( connection, "driver" ); + TQDomElement connectionDatabase = loadSingleProperty( connection, + "database" ); + TQDomElement connectionUsername = loadSingleProperty( connection, + "username" ); + TQDomElement connectionHostname = loadSingleProperty( connection, + "hostname" ); + TQDomElement connectionPort = loadSingleProperty( connection, + "port" ); + + DatabaseConnection *conn = new DatabaseConnection( this ); + conn->setName( connectionName.firstChild().firstChild().toText().data() ); + conn->setDriver( connectionDriver.firstChild().firstChild().toText().data() ); + conn->setDatabase( connectionDatabase.firstChild().firstChild().toText().data() ); + conn->setUsername( connectionUsername.firstChild().firstChild().toText().data() ); + conn->setHostname( connectionHostname.firstChild().firstChild().toText().data() ); + conn->setPort( TQString( connectionPort.firstChild().firstChild().toText().data() ).toInt() ); + + /* connection tables */ + TQDomNodeList tables = connection.toElement().elementsByTagName( "table" ); + for ( uint j = 0; j < tables.length(); j++ ) { + TQDomElement table = tables.item(j).toElement(); + TQDomElement tableName = loadSingleProperty( table, "name" ); + conn->addTable( tableName.firstChild().firstChild().toText().data() ); + + /* table fields */ + TQStringList fieldList; + TQDomNodeList fields = table.toElement().elementsByTagName( "field" ); + for ( uint k = 0; k < fields.length(); k++ ) { + TQDomElement field = fields.item(k).toElement(); + TQDomElement fieldName = loadSingleProperty( field, "name" ); + fieldList.append( fieldName.firstChild().firstChild().toText().data() ); + } + conn->setFields( tableName.firstChild().firstChild().toText().data(), + fieldList ); + } + + dbConnections.append( conn ); + } + } else { + tqDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); + } + f.close(); + } +#endif +} + +/*! Opens the database \a connection. The connection remains open and +can be closed again with closeDatabase(). +*/ + +bool Project::openDatabase( const TQString &connection, bool suppressDialog ) +{ +#ifndef TQT_NO_SQL + DatabaseConnection *conn = databaseConnection( connection ); + if ( connection.isEmpty() && !conn ) + conn = databaseConnection( "(default)" ); + if ( !conn ) + return FALSE; + bool b = conn->open( suppressDialog ); + return b; +#else + Q_UNUSED( connection ); + Q_UNUSED( suppressDialog ); + return FALSE; +#endif +} + +/*! Closes the database \a connection. +*/ +void Project::closeDatabase( const TQString &connection ) +{ +#ifndef TQT_NO_SQL + DatabaseConnection *conn = databaseConnection( connection ); + if ( connection.isEmpty() && !conn ) + conn = databaseConnection( "(default)" ); + if ( !conn ) + return; + conn->close(); +#else + Q_UNUSED( connection ); +#endif +} + +// void Project::formClosed( FormWindow *fw ) +// { +// formWindows.remove( fw ); +// } + +TQObjectList *Project::formList( bool resolveFakeObjects ) const +{ + TQObjectList *l = new TQObjectList; + for ( TQPtrListIterator forms(formfiles); forms.current(); ++forms ) { + FormFile* f = forms.current(); + if ( f->formWindow() ) { + if ( resolveFakeObjects && f->formWindow()->isFake() ) + l->append( objectForFakeForm( f->formWindow() ) ); + else + l->append( f->formWindow()->child( 0, TQWIDGET_OBJECT_NAME_STRING ) ); + } else if ( f->isFake() ) { + l->append( objectForFakeFormFile( f ) ); + } + } + return l; +} + +DesignerProject *Project::iFace() +{ + if ( !iface ) + iface = new DesignerProjectImpl( this ); + return iface; +} + +void Project::setLanguage( const TQString &l ) +{ + if ( l == lang ) + return; + lang = l; + is_cpp = lang == "C++"; + updateCustomSettings(); + modified = TRUE; +} + +TQString Project::language() const +{ + return lang; +} + +void Project::setCustomSetting( const TQString &key, const TQString &value ) +{ + customSettings.remove( key ); + customSettings.insert( key, value ); + modified = TRUE; +} + +TQString Project::customSetting( const TQString &key ) const +{ + return *customSettings.find( key ); +} + +void Project::updateCustomSettings() +{ + if ( !projectSettingsPluginManager ) + return; + +/* + ProjectSettingsInterface *iface = 0; + projectSettingsPluginManager->queryInterface( lang, (TQUnknownInterface**)&iface ); + if ( !iface ) + return; + csList = iface->projectSettings(); + iface->release(); +*/ + + TQInterfacePtr iface; + projectSettingsPluginManager->queryInterface( lang, &iface ); + if ( !iface ) + return; + csList = iface->projectSettings(); + customSettings.clear(); + +} + +void Project::setActive( bool b ) +{ + pixCollection->setActive( b ); +} + +void Project::addSourceFile( SourceFile *sf ) +{ + sourcefiles.append( sf ); + modified = TRUE; + emit sourceFileAdded( sf ); +} + + +SourceFile* Project::findSourceFile( const TQString& filename, SourceFile *ignore ) const +{ + TQPtrListIterator it(sourcefiles); + while ( it.current() ) { + if ( it.current() != ignore && it.current()->fileName() == filename ) + return it.current(); + ++it; + } + return 0; +} + +FormFile* Project::findFormFile( const TQString& filename, FormFile *ignore ) const +{ + TQPtrListIterator it(formfiles); + while ( it.current() ) { + if ( it.current() != ignore && it.current()->fileName() == filename ) + return it.current(); + ++it; + } + return 0; +} + +void Project::setIncludePath( const TQString &platform, const TQString &path ) +{ + if ( inclPath[platform] == path ) + return; + inclPath.replace( platform, path ); + modified = TRUE; +} + +void Project::setLibs( const TQString &platform, const TQString &path ) +{ + lbs.replace( platform, path ); +} + +void Project::setDefines( const TQString &platform, const TQString &path ) +{ + defs.replace( platform, path ); +} + +void Project::setConfig( const TQString &platform, const TQString &config ) +{ + cfg.replace( platform, config ); +} + +TQString Project::config( const TQString &platform ) const +{ + return cfg[ platform ]; +} + +TQString Project::libs( const TQString &platform ) const +{ + return lbs[ platform ]; +} + +TQString Project::defines( const TQString &platform ) const +{ + return defs[ platform ]; +} + +TQString Project::includePath( const TQString &platform ) const +{ + return inclPath[ platform ]; +} + +TQString Project::templte() const +{ + return templ; +} + +void Project::setTemplate( const TQString &t ) +{ + templ = t; +} + +void Project::readPlatformSettings( const TQString &contents, + const TQString &setting, + TQMap &res ) +{ + const TQString platforms[] = { "", "win32", "unix", "mac", TQString() }; + for ( int i = 0; platforms[ i ] != TQString(); ++i ) { + TQString p = platforms[ i ]; + if ( !p.isEmpty() ) + p += ":"; + TQStringList lst = parse_multiline_part( contents, p + setting ); + TQString s = lst.join( " " ); + TQString key = platforms[ i ]; + if ( key.isEmpty() ) + key = "(all)"; + res.replace( key, s ); + } +} + +void Project::removePlatformSettings( TQString &contents, const TQString &setting ) +{ + const TQString platforms[] = { "win32", "unix", "mac", "", TQString() }; + for ( int i = 0; platforms[ i ] != TQString(); ++i ) { + TQString p = platforms[ i ]; + if ( !p.isEmpty() ) + p += ":"; + remove_multiline_contents( contents, p + setting ); + } +} + +void Project::writePlatformSettings( TQString &contents, const TQString &setting, + const TQMap &input ) +{ + const TQString platforms[] = { "", "win32", "unix", "mac", TQString() }; + int i; + LanguageInterface *iface = MetaDataBase::languageInterface( lang ); + if (iface && (setting == "SOURCES" || setting == "HEADERS")) // The (all) part will be saved later on + i = 1; + else + i = 0; + for (; platforms[ i ] != TQString(); ++i ) { + TQString p = platforms[ i ]; + if ( !p.isEmpty() ) + p += ":"; + TQString key = platforms[ i ]; + if ( key.isEmpty() ) + key = "(all)"; + TQMap::ConstIterator it = input.find( key ); + if ( it == input.end() || (*it).isEmpty() ) + continue; + contents += p + setting + "\t+= " + *it + "\n"; + } +} + +void Project::addFormFile( FormFile *ff ) +{ + formfiles.append( ff ); + modified = TRUE; + emit formFileAdded( ff ); +} + +bool Project::removeFormFile( FormFile *ff ) +{ + if ( !formfiles.containsRef( ff ) ) + return FALSE; + if ( !ff->close() ) + return FALSE; + formfiles.removeRef( ff ); + modified = TRUE; + emit formFileRemoved( ff ); + return TRUE; +} + +void Project::addObject( TQObject *o ) +{ + bool wasModified = modified; + objs.append( o ); + FormFile *ff = new FormFile( "", FALSE, this, "qt_fakewindow" ); + ff->setFileName( "__APPOBJ" + TQString( o->name() ) + ".ui" ); + fakeFormFiles.insert( (void*)o, ff ); + MetaDataBase::addEntry( o ); + if ( hasGUI() ) { + TQWidget *parent = MainWindow::self ? MainWindow::self->qWorkspace() : 0; + FormWindow *fw = new FormWindow( ff, MainWindow::self, parent, "qt_fakewindow" ); + fw->setProject( this ); + if ( TQFile::exists( ff->absFileName() ) ) + Resource::loadExtraSource( ff, ff->absFileName(), + MetaDataBase::languageInterface( language() ), FALSE ); + if ( MainWindow::self ) + fw->setMainWindow( MainWindow::self ); + if ( MainWindow::self ) { + TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(), TQEvent::ChildInserted ); + connect( fw, + TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), + MainWindow::self, + TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) + ); + } + if ( fw->parentWidget() ) { + fw->parentWidget()->setFixedSize( 1, 1 ); + fw->show(); + } + } else { + if ( TQFile::exists( ff->absFileName() ) ) + Resource::loadExtraSource( ff, ff->absFileName(), + MetaDataBase::languageInterface( language() ), FALSE ); + } + emit objectAdded( o ); + modified = wasModified; +} + +void Project::setObjects( const TQObjectList &ol ) +{ + for ( TQObjectListIt it( ol ); it.current(); ++it ) + addObject( it.current() ); +} + +void Project::removeObject( TQObject *o ) +{ + bool wasModified = modified; + objs.removeRef( o ); + MetaDataBase::removeEntry( o ); + fakeFormFiles.remove( (void*)o ); + emit objectRemoved( o ); + modified = wasModified; +} + +TQObjectList Project::objects() const +{ + return objs; +} + +FormFile *Project::fakeFormFileFor( TQObject *o ) const +{ + return fakeFormFiles.find( (void*)o ); +} + +TQObject *Project::objectForFakeForm( FormWindow *fw ) const +{ + for ( TQPtrDictIterator it( fakeFormFiles ); it.current(); ++it ) { + if ( it.current()->formWindow() == fw || + it.current() == fw->formFile() ) + return (TQObject*)it.currentKey(); + } + return 0; +} + +TQObject *Project::objectForFakeFormFile( FormFile *ff ) const +{ + for ( TQPtrDictIterator it( fakeFormFiles ); it.current(); ++it ) { + if ( it.current() == ff ) + return (TQObject*)it.currentKey(); + } + return 0; +} + +void Project::removeTempProject() +{ + if ( !singleProjectMode() ) + return; + TQDir d( TQFileInfo( filename ).dirPath() ); + if ( !d.exists( TQFileInfo( filename ).dirPath() ) ) + return; + TQStringList files = d.entryList( TQDir::Files ); + TQStringList::Iterator it; + for ( it = files.begin(); it != files.end(); ++it ) { + d.remove( *it ); + } + if ( d.exists( TQFileInfo( filename ).dirPath() + "/images" ) ) { + d = TQDir( TQFileInfo( filename ).dirPath() + "/images" ); + files = d.entryList( TQDir::Files ); + for ( it = files.begin(); it != files.end(); ++it ) + d.remove( *it ); + d = TQDir( TQFileInfo( filename ).dirPath() ); + d.remove( "images" ); + } + d.remove( TQFileInfo( filename ).dirPath() ); +#if defined(Q_OS_UNIX) + // ##### implement for all platforms, ideally should be in TQt + ::rmdir( TQFile::encodeName( d.absPath() ) ); +#endif +} + +void Project::addAndEditFunction( const TQString &function, const TQString &functionBody, bool openDeveloper ) +{ + for ( SourceFile *f = sourcefiles.first(); f; f = sourcefiles.next() ) { + if ( TQFileInfo( f->fileName() ).baseName() == "main" ) { + TQValueList funcs; + LanguageInterface *iface = MetaDataBase::languageInterface( language() ); + if ( !iface ) + return; + iface->functions( f->text(), &funcs ); + TQString func = function; + int i = func.find( '(' ); + if ( i != -1 ) + func = func.left( i ); + + bool found = FALSE; + for ( TQValueList::Iterator it = funcs.begin(); + it != funcs.end(); ++it ) { + if ( (*it).name.left( (*it).name.find( '(' ) ) == func ) { + found = TRUE; + break; + } + } + + if ( !found ) { + TQString code = f->text(); + if ( functionBody.isEmpty() ) + code += "\n\n" + iface->createFunctionStart( "", func, "", "" ) + "()\n{\n\n}\n"; + else + code += "\n\n" + iface->createFunctionStart( "", func, "", "" ) + + "()\n" + functionBody + "\n"; + f->setText( code ); + if ( f->editor() ) + f->editor()->refresh( FALSE ); + } + + if ( openDeveloper ) { + if ( MainWindow::self ) + MainWindow::self->editSource( f ); + f->editor()->setFunction( func, "" ); + } + + break; + } + } +} + +bool Project::hasParentObject( TQObject *o ) +{ + for ( TQObject *p = objs.first(); p; p = objs.next() ) { + TQObject *c = p->child( o->name(), o->className() ); + if ( c ) + return TRUE; + } + return FALSE; +} + +TQString Project::qualifiedName( TQObject *o ) +{ + TQString name = o->name(); + TQObject *p = o->parent(); + while ( p ) { + name.prepend( TQString( p->name() ) + "." ); + if ( objs.findRef( p ) != -1 ) + break; + p = p->parent(); + } + return name; +} + +bool Project::singleProjectMode() const +{ + return !MainWindow::self || MainWindow::self->singleProjectMode(); +} + +TQWidget *Project::messageBoxParent() const +{ + return MainWindow::self; +} + +void Project::designerCreated() +{ + for ( FormFile *ff = formfiles.first(); ff; ff = formfiles.next() ) { + FormWindow *fw = ff->formWindow(); + if ( !fw || fw->mainWindow() ) + continue; + fw->setMainWindow( MainWindow::self ); + connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, + const TQString & ) ), + MainWindow::self, TQT_SLOT( updateUndoRedo( bool, bool, + const TQString &, const TQString & ) ) ); + fw->reparent( MainWindow::self->qWorkspace(), TQPoint( 0, 0 ), FALSE ); + TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(), + TQEvent::ChildInserted ); + fw->parentWidget()->setFixedSize( 1, 1 ); + fw->show(); + } +} + +void Project::formOpened( FormWindow *fw ) +{ + if ( fw->isFake() ) + return; + emit newFormOpened( fw ); +} + +TQString Project::locationOfObject( TQObject *o ) +{ + if ( !o ) + return TQString(); + + if ( MainWindow::self ) { + TQWidgetList windows = MainWindow::self->qWorkspace()->windowList(); + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + FormWindow *fw = ::tqqt_cast(w); + SourceEditor *se = ::tqqt_cast(w); + if ( fw ) { + if ( fw->isFake() ) + return objectForFakeForm( fw )->name() + TQString( " [Source]" ); + else + return fw->name() + TQString( " [Source]" ); + } else if ( se ) { + if ( !se->object() ) + continue; + if ( se->formWindow() ) + return se->formWindow()->name() + TQString( " [Source]" ); + else + return makeRelative( se->sourceFile()->fileName() ); + } + } + } + + if ( ::tqqt_cast(o) ) { + for ( TQPtrListIterator sources = sourceFiles(); + sources.current(); ++sources ) { + SourceFile* f = sources.current(); + if ( f == o ) + return makeRelative( f->fileName() ); + } + } + + extern TQMap *qwf_forms; + if ( !qwf_forms ) { + tqWarning( "Project::locationOfObject: qwf_forms is NULL!" ); + return TQString(); + } + + TQString s = makeRelative( *qwf_forms->find( (TQWidget*)o ) ); + s += " [Source]"; + return s; +} + +bool Project::hasGUI() const +{ + return tqApp->type() != TQApplication::Tty; +} diff --git a/kdevdesigner/designer/project.h b/kdevdesigner/designer/project.h new file mode 100644 index 00000000..3e80428f --- /dev/null +++ b/kdevdesigner/designer/project.h @@ -0,0 +1,274 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PROJECT_H +#define PROJECT_H + +#include + +#include +#include +#include +#include +#include +#include "../interfaces/projectsettingsiface.h" +#include "sourcefile.h" +#include "formfile.h" +#include +#include +#include "formfile.h" + +class TQObjectList; +struct DesignerProject; +struct DesignerDatabase; +class PixmapCollection; +class Project; + +#ifndef TQT_NO_SQL +class TQSqlDatabase; + +class DatabaseConnection +{ +public: + DatabaseConnection( Project *p ) : +#ifndef TQT_NO_SQL + conn( 0 ), +#endif + project( p ), loaded( FALSE ), iface( 0 ) {} + ~DatabaseConnection(); + + bool refreshCatalog(); + bool open( bool suppressDialog = TRUE ); + void close(); + DesignerDatabase *iFace(); + + bool isLoaded() const { return loaded; } + void setName( const TQString& n ) { nm = n; } + TQString name() const { return nm; } + void setDriver( const TQString& d ) { drv = d; } + TQString driver() const { return drv; } + void setDatabase( const TQString& db ) { dbName = db; } + TQString database() const { return dbName; } + void setUsername( const TQString& u ) { uname = u; } + TQString username() const { return uname; } + void setPassword( const TQString& p ) { pword = p; } + TQString password() const { return pword; } + void setHostname( const TQString& h ) { hname = h; } + TQString hostname() const { return hname; } + void setPort( int p ) { prt = p; } + int port() const { return prt; } + TQString lastError() const { return dbErr; } + void addTable( const TQString& t ) { tbls.append(t); } + void setFields( const TQString& t, const TQStringList& f ) { flds[t] = f; } + TQStringList tables() const { return tbls; } + TQStringList fields( const TQString& t ) { return flds[t]; } + TQMap fields() { return flds; } +#ifndef TQT_NO_SQL + TQSqlDatabase* connection() const { return conn; } + void remove(); +#endif + +private: + TQString nm; + TQString drv, dbName, uname, pword, hname; + TQString dbErr; + int prt; + TQStringList tbls; + TQMap flds; +#ifndef TQT_NO_SQL + TQSqlDatabase *conn; +#endif + Project *project; + bool loaded; + DesignerDatabase *iface; +}; + +#endif + +class Project : public TQObject +{ + Q_OBJECT + + friend class DatabaseConnection; + +public: + Project( const TQString &fn, const TQString &pName = TQString(), + TQPluginManager *pm = 0, bool isDummy = FALSE, + const TQString &l = "C++" ); + ~Project(); + + void setFileName( const TQString &fn, bool doClear = TRUE ); + TQString fileName( bool singlePro = FALSE ) const; + TQString projectName() const; + + void setDatabaseDescription( const TQString &db ); + TQString databaseDescription() const; + + void setDescription( const TQString &s ); + TQString description() const; + + void setLanguage( const TQString &l ); + TQString language() const; + + + bool isValid() const; + + // returns TRUE if this project is the project + bool isDummy() const; + + TQString makeAbsolute( const TQString &f ); + TQString makeRelative( const TQString &f ); + + void save( bool onlyProjectFile = FALSE ); + +#ifndef TQT_NO_SQL + TQPtrList databaseConnections() const; + void setDatabaseConnections( const TQPtrList &lst ); + void addDatabaseConnection( DatabaseConnection *conn ); + void removeDatabaseConnection( const TQString &conn ); + DatabaseConnection *databaseConnection( const TQString &name ); + TQStringList databaseConnectionList(); + TQStringList databaseTableList( const TQString &connection ); + TQStringList databaseFieldList( const TQString &connection, const TQString &table ); +#endif + void saveConnections(); + void loadConnections(); + + bool openDatabase( const TQString &connection, bool suppressDialog = TRUE ); + void closeDatabase( const TQString &connection ); + + TQObjectList *formList( bool resolveFakeObjects = FALSE ) const; + + DesignerProject *iFace(); + + void setCustomSetting( const TQString &key, const TQString &value ); + TQString customSetting( const TQString &key ) const; + + PixmapCollection *pixmapCollection() const { return pixCollection; } + + void setActive( bool b ); + + TQPtrListIterator sourceFiles() const { return TQPtrListIterator(sourcefiles); } + void addSourceFile( SourceFile *sf ); + bool removeSourceFile( SourceFile *sf ); + SourceFile* findSourceFile( const TQString& filename, SourceFile *ignore = 0 ) const; + + TQPtrListIterator formFiles() const { return TQPtrListIterator(formfiles); } + void addFormFile( FormFile *ff ); + bool removeFormFile( FormFile *ff ); + FormFile* findFormFile( const TQString& filename, FormFile *ignore = 0 ) const; + + void setIncludePath( const TQString &platform, const TQString &path ); + void setLibs( const TQString &platform, const TQString &path ); + void setDefines( const TQString &platform, const TQString &path ); + void setConfig( const TQString &platform, const TQString &config ); + void setTemplate( const TQString &t ); + + TQString config( const TQString &platform ) const; + TQString libs( const TQString &platform ) const; + TQString defines( const TQString &platform ) const; + TQString includePath( const TQString &platform ) const; + TQString templte() const; + + bool isModified() const { return !isDummy() && modified; } + void setModified( bool b ); + + void addObject( TQObject *o ); + void setObjects( const TQObjectList &ol ); + void removeObject( TQObject *o ); + TQObjectList objects() const; + FormFile *fakeFormFileFor( TQObject *o ) const; + TQObject *objectForFakeForm( FormWindow *fw ) const; + TQObject *objectForFakeFormFile( FormFile *ff ) const; + + void addAndEditFunction( const TQString &functionName, const TQString &functionBody, + bool openDeveloper ); + + void removeTempProject(); + bool hasParentObject( TQObject *o ); + TQString qualifiedName( TQObject *o ); + + bool isCpp() const { return is_cpp; } + + void designerCreated(); + + void formOpened( FormWindow *fw ); + + TQString locationOfObject( TQObject *o ); + + bool hasGUI() const; + +signals: + void projectModified(); + void sourceFileAdded( SourceFile* ); + void sourceFileRemoved( SourceFile* ); + void formFileAdded( FormFile* ); + void formFileRemoved( FormFile* ); + void objectAdded( TQObject * ); + void objectRemoved( TQObject * ); + void newFormOpened( FormWindow *fw ); + +private: + void parse(); + void clear(); + void updateCustomSettings(); + void readPlatformSettings( const TQString &contents, + const TQString &setting, + TQMap &res ); + void removePlatformSettings( TQString &contents, const TQString &setting ); + void writePlatformSettings( TQString &contents, const TQString &setting, + const TQMap &input ); + bool singleProjectMode() const; + TQWidget *messageBoxParent() const; + +private: + TQString filename; + TQString proName; + TQString desc; + TQString dbFile; +#ifndef TQT_NO_SQL + TQPtrList dbConnections; +#endif + TQString lang; + DesignerProject *iface; + TQMap customSettings; + TQStringList csList; + TQPluginManager *projectSettingsPluginManager; + PixmapCollection *pixCollection; + TQPtrList sourcefiles; + TQPtrList formfiles; + TQMap inclPath, defs, lbs, cfg, sources, headers; + TQString templ; + bool isDummyProject; + bool modified; + TQObjectList objs; + TQPtrDict fakeFormFiles; + TQString singleProFileName; + bool is_cpp; + +}; + +#endif diff --git a/kdevdesigner/designer/projectsettings.ui b/kdevdesigner/designer/projectsettings.ui new file mode 100644 index 00000000..d606a521 --- /dev/null +++ b/kdevdesigner/designer/projectsettings.ui @@ -0,0 +1,301 @@ + +ProjectSettingsBase +********************************************************************* +** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + ProjectSettingsBase + + + + 0 + 0 + 375 + 224 + + + + Project Settings + + + true + + + + unnamed + + + 11 + + + 6 + + + + tabWidget + + + + tabSettings + + + &Settings + + + + unnamed + + + + TextLabel1_2 + + + &Project file: + + + editProjectFile + + + + + TextLabel1_3 + + + &Language: + + + comboLanguage + + + + + buttonDatabaseFile_2 + + + ... + + + + + editDatabaseFile + + + + + TextLabel1_2_2_2 + + + &Database file: + + + editDatabaseFile + + + + + comboLanguage + + + false + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + editProjectFile + + + + + buttonProject + + + ... + + + + + + + Spacer3 + + + Vertical + + + Expanding + + + + 21 + 71 + + + + + + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + buttonHelp + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + true + + + true + + + Close the dialog and apply all the changes. + + + + + buttonCancel + + + &Cancel + + + true + + + Close the dialog and discard any changes. + + + + + + + + + buttonProject + clicked() + ProjectSettingsBase + chooseProjectFile() + + + buttonOk + clicked() + ProjectSettingsBase + okClicked() + + + buttonCancel + clicked() + ProjectSettingsBase + reject() + + + buttonHelp + clicked() + ProjectSettingsBase + helpClicked() + + + comboLanguage + activated(const TQString&) + ProjectSettingsBase + languageChanged(const TQString&) + + + + tabWidget + editProjectFile + comboLanguage + buttonHelp + buttonOk + buttonCancel + + + chooseDatabaseFile() + chooseProjectFile() + destroy() + helpClicked() + init() + languageChanged( const TQString & ) + okClicked() + + + diff --git a/kdevdesigner/designer/projectsettingsimpl.cpp b/kdevdesigner/designer/projectsettingsimpl.cpp new file mode 100644 index 00000000..99bb800d --- /dev/null +++ b/kdevdesigner/designer/projectsettingsimpl.cpp @@ -0,0 +1,126 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "projectsettingsimpl.h" +#include "project.h" +#include "formwindow.h" +#include "metadatabase.h" +#include "mainwindow.h" +#include "asciivalidator.h" +#include "mainwindow.h" +#include "sourcefile.h" +#include "workspace.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a ProjectSettings which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. + */ +ProjectSettings::ProjectSettings( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl ) + : ProjectSettingsBase( parent, name, modal, fl ), project( pro ) +{ + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + + editProjectFile->setFocus(); + + if ( project->isDummy() ) { + editProjectFile->setEnabled( FALSE ); + editProjectFile->setText( project->projectName() ); + } else { + if ( project->fileName().isEmpty() || project->fileName() == ".pro" ) { + editProjectFile->setText( tr( "unnamed.pro" ) ); + editProjectFile->selectAll(); + } else { + editProjectFile->setText( project->fileName() ); + } + } + + editDatabaseFile->setText( project->databaseDescription() ); + + comboLanguage->insertStringList( MetaDataBase::languages() ); + for ( int j = 0; j < (int)comboLanguage->count(); ++j ) { + if ( project->language() == comboLanguage->text( j ) ) { + comboLanguage->setCurrentItem( j ); + break; + } + } +} + +/* + * Destroys the object and frees any allocated resources + */ +ProjectSettings::~ProjectSettings() +{ +} + +void ProjectSettings::chooseDatabaseFile() +{ + TQString fn = KFileDialog::getSaveFileName( editDatabaseFile->text(), i18n( "*.db|Database Files\n*|All Files" ), this ); + if ( fn.isEmpty() ) + return; + editDatabaseFile->setText( fn ); +} + +void ProjectSettings::chooseProjectFile() +{ + TQString fn = KFileDialog::getSaveFileName( editDatabaseFile->text(), i18n( "*.pro|Project Files\n*|All Files" ), this ); + if ( fn.isEmpty() ) + return; + editProjectFile->setText( fn ); +} + +void ProjectSettings::helpClicked() +{ +} + +void ProjectSettings::okClicked() +{ + // ### check for validity + project->setFileName( editProjectFile->text(), FALSE ); + project->setDatabaseDescription( editDatabaseFile->text() ); + project->setLanguage( comboLanguage->text( comboLanguage->currentItem() ) ); + project->setModified( TRUE ); + accept(); +} + +void ProjectSettings::languageChanged( const TQString & ) +{ +} diff --git a/kdevdesigner/designer/projectsettingsimpl.h b/kdevdesigner/designer/projectsettingsimpl.h new file mode 100644 index 00000000..c1b7fb0c --- /dev/null +++ b/kdevdesigner/designer/projectsettingsimpl.h @@ -0,0 +1,57 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PROJECTSETTINGSIMPL_H +#define PROJECTSETTINGSIMPL_H + +#include "projectsettings.h" + +class Project; +class TQListViewItem; +class FormWindow; +class SourceFile; + +class ProjectSettings : public ProjectSettingsBase +{ + Q_OBJECT + + +public: + ProjectSettings( Project *pro, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ~ProjectSettings(); + +protected slots: + void chooseDatabaseFile(); + void chooseProjectFile(); + void helpClicked(); + void okClicked(); + void languageChanged( const TQString &lang ); + +private: + Project *project; +}; + +#endif diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp new file mode 100644 index 00000000..e7a5d387 --- /dev/null +++ b/kdevdesigner/designer/propertyeditor.cpp @@ -0,0 +1,4332 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include // HP-UX compiler needs this here + +#include "propertyeditor.h" +#include "formwindow.h" +#include "command.h" +#include "metadatabase.h" +#include "propertyobject.h" +#include +#include "widgetfactory.h" +#include "globaldefs.h" +#include "defs.h" +#include "asciivalidator.h" +#include "paletteeditorimpl.h" +#include "multilineeditorimpl.h" +#include "mainwindow.h" +#include "project.h" +#include "hierarchyview.h" +#include "database.h" +#include "menubareditor.h" + +#include +#include +#include +#include "kdevdesigner_part.h" + +#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 // FIXME: obsolete +#include +#include +#include + +#include + + +static TQFontDatabase *fontDataBase = 0; +TQString assistantPath(); + +#ifdef TQ_WS_MAC +#include +static void setupStyle(TQWidget *w) +{ + static TQStyle *windowsStyle = 0; + if(!windowsStyle) + windowsStyle = new TQWindowsStyle; + w->setStyle(windowsStyle); +} +#else +#define setupStyle(x) +#endif + +static void cleanupFontDatabase() +{ + delete fontDataBase; + fontDataBase = 0; +} + +static TQStringList getFontList() +{ + if ( !fontDataBase ) { + fontDataBase = new TQFontDatabase; + tqAddPostRoutine( cleanupFontDatabase ); + } + return fontDataBase->families(); +} + + +class PropertyWhatsThis : public TQWhatsThis +{ +public: + PropertyWhatsThis( PropertyList *l ); + TQString text( const TQPoint &pos ); + bool clicked( const TQString& href ); + +private: + PropertyList *propertyList; + +}; + +PropertyWhatsThis::PropertyWhatsThis( PropertyList *l ) + : TQWhatsThis( l->viewport() ), propertyList( l ) +{ +} + +TQString PropertyWhatsThis::text( const TQPoint &pos ) +{ + return propertyList->whatsThisAt( pos ); +} + +bool PropertyWhatsThis::clicked( const TQString& href ) +{ + if ( !href.isEmpty() ) { + TQAssistantClient *ac = MainWindow::self->assistantClient(); + ac->showPage( TQString( tqInstallPathDocs() ) + "/html/" + href ); + } + return FALSE; // do not hide window +} + + +/*! + \class PropertyItem propertyeditor.h + \brief Base class for all property items + + This is the base class for each property item for the + PropertyList. A simple property item has just a name and a value to + provide an editor for a datatype. But more complex datatypes might + provide an expandable item for editing single parts of the + datatype. See hasSubItems(), initChildren() for that. +*/ + +/*! If this item should be a child of another property item, specify + \a prop as the parent item. +*/ + +PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : TQListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName ) +{ + setSelectable( FALSE ); + open = FALSE; + setText( 0, propertyName ); + changed = FALSE; + setText( 1, "" ); + resetButton = 0; +} + +PropertyItem::~PropertyItem() +{ + if ( resetButton ) + delete resetButton->parentWidget(); + resetButton = 0; +} + +void PropertyItem::toggle() +{ +} + +void PropertyItem::updateBackColor() +{ + if ( itemAbove() && this != listview->firstChild() ) { + if ( ( ( PropertyItem*)itemAbove() )->backColor == *backColor1 ) + backColor = *backColor2; + else + backColor = *backColor1; + } else { + backColor = *backColor1; + } + if ( listview->firstChild() == this ) + backColor = *backColor1; +} + +TQColor PropertyItem::backgroundColor() +{ + updateBackColor(); + if ( (TQListViewItem*)this == listview->currentItem() ) + return *selectedBack; + return backColor; +} + +/*! If a subclass is a expandable item, this is called when the child +items should be created. +*/ + +void PropertyItem::createChildren() +{ +} + +/*! If a subclass is a expandable item, this is called when the child +items should be initialized. +*/ + +void PropertyItem::initChildren() +{ +} + +void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) +{ + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + g.setColor( TQColorGroup::Foreground, TQt::black ); + g.setColor( TQColorGroup::Text, TQt::black ); + int indent = 0; + if ( column == 0 ) { + indent = 20 + ( property ? 20 : 0 ); + p->fillRect( 0, 0, width, height(), backgroundColor() ); + p->save(); + p->translate( indent, 0 ); + } + + if ( isChanged() && column == 0 ) { + p->save(); + TQFont f = p->font(); + f.setBold( TRUE ); + p->setFont( f ); + } + + if ( !hasCustomContents() || column != 1 ) { + TQListViewItem::paintCell( p, g, column, width - indent, align ); + } else { + p->fillRect( 0, 0, width, height(), backgroundColor() ); + drawCustomContents( p, TQRect( 0, 0, width, height() ) ); + } + + if ( isChanged() && column == 0 ) + p->restore(); + if ( column == 0 ) + p->restore(); + if ( hasSubItems() && column == 0 ) { + p->save(); + p->setPen( cg.foreground() ); + p->setBrush( cg.base() ); + p->drawRect( 5, height() / 2 - 4, 9, 9 ); + p->drawLine( 7, height() / 2, 11, height() / 2 ); + if ( !isOpen() ) + p->drawLine( 9, height() / 2 - 2, 9, height() / 2 + 2 ); + p->restore(); + } + p->save(); + p->setPen( TQPen( cg.dark(), 1 ) ); + p->drawLine( 0, height() - 1, width, height() - 1 ); + p->drawLine( width - 1, 0, width - 1, height() ); + p->restore(); + + if ( listview->currentItem() == this && column == 0 && + !listview->hasFocus() && !listview->viewport()->hasFocus() ) + paintFocus( p, cg, TQRect( 0, 0, width, height() ) ); +} + +void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg, + int w, int y, int h ) +{ + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + TQListViewItem::paintBranches( p, g, w, y, h ); +} + +void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r ) +{ + p->save(); + TQApplication::style().tqdrawPrimitive(TQStyle::PE_Panel, p, r, cg, + TQStyle::Style_Sunken, TQStyleOption(1,1) ); + p->restore(); +} + +/*! Subclasses which are expandable items have to return TRUE + here. Default is FALSE. +*/ + +bool PropertyItem::hasSubItems() const +{ + return FALSE; +} + +/*! Returns the parent property item here if this is a child or 0 + otherwise. + */ + +PropertyItem *PropertyItem::propertyParent() const +{ + return property; +} + +bool PropertyItem::isOpen() const +{ + return open; +} + +void PropertyItem::setOpen( bool b ) +{ + if ( b == open ) + return; + open = b; + + if ( !open ) { + children.setAutoDelete( TRUE ); + children.clear(); + children.setAutoDelete( FALSE ); + tqApp->processEvents(); + listview->updateEditorSize(); + return; + } + + createChildren(); + initChildren(); + tqApp->processEvents(); + listview->updateEditorSize(); +} + +/*! Subclasses have to show the editor of the item here +*/ + +void PropertyItem::showEditor() +{ + createResetButton(); + resetButton->parentWidget()->show(); +} + +/*! Subclasses have to hide the editor of the item here +*/ + +void PropertyItem::hideEditor() +{ + createResetButton(); + resetButton->parentWidget()->hide(); +} + +/*! This is called to init the value of the item. Reimplement in + subclasses to init the editor +*/ + +void PropertyItem::setValue( const TQVariant &v ) +{ + val = v; +} + +TQVariant PropertyItem::value() const +{ + return val; +} + +bool PropertyItem::isChanged() const +{ + return changed; +} + +void PropertyItem::setChanged( bool b, bool updateDb ) +{ + if ( propertyParent() ) + return; + if ( changed == b ) + return; + changed = b; + repaint(); + if ( updateDb ) { + MetaDataBase::setPropertyChanged( listview->propertyEditor()->widget(), name(), changed ); + } + updateResetButtonState(); +} + +TQString PropertyItem::name() const +{ + return propertyName; +} + +void PropertyItem::createResetButton() +{ + if ( resetButton ) { + resetButton->parentWidget()->lower(); + return; + } + const TQPixmap DesignerResetPix = SmallIcon( "designer_resetproperty.png" , KDevDesignerPartFactory::instance()); + + TQHBox *hbox = new TQHBox( listview->viewport() ); + hbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + hbox->setLineWidth( 1 ); + resetButton = new TQPushButton( hbox ); + setupStyle( resetButton ); + resetButton->setPixmap( DesignerResetPix ); + resetButton->setFixedWidth( resetButton->sizeHint().width() ); + hbox->layout()->setAlignment( TQt::AlignRight ); + listview->addChild( hbox ); + hbox->hide(); + TQObject::connect( resetButton, TQT_SIGNAL( clicked() ), + listview, TQT_SLOT( resetProperty() ) ); + TQToolTip::add( resetButton, i18n( "Reset the property to its default value" ) ); + TQWhatsThis::add( resetButton, i18n( "Click this button to reset the property to its default value" ) ); + updateResetButtonState(); +} + +void PropertyItem::updateResetButtonState() +{ + if ( !resetButton ) + return; + if ( propertyParent() || !WidgetFactory::canResetProperty( listview->propertyEditor()->widget(), name() ) ) + resetButton->setEnabled( FALSE ); + else + resetButton->setEnabled( isChanged() ); +} + +/*! Call this to place/resize the item editor correctly (normally + call it from showEditor()) +*/ + +void PropertyItem::placeEditor( TQWidget *w ) +{ + createResetButton(); + TQRect r = listview->itemRect( this ); + if ( !r.size().isValid() ) { + listview->ensureItemVisible( this ); +#if defined(TQ_WS_WIN) + listview->repaintContents( FALSE ); +#endif + r = listview->itemRect( this ); + } + r.setX( listview->header()->sectionPos( 1 ) ); + r.setWidth( listview->header()->sectionSize( 1 ) - 1 ); + r.setWidth( r.width() - resetButton->width() - 2 ); + r = TQRect( listview->viewportToContents( r.topLeft() ), r.size() ); + w->resize( r.size() ); + listview->moveChild( w, r.x(), r.y() ); + resetButton->parentWidget()->resize( resetButton->sizeHint().width() + 10, r.height() ); + listview->moveChild( resetButton->parentWidget(), r.x() + r.width() - 8, r.y() ); + resetButton->setFixedHeight( TQMAX( 0, r.height() - 3 ) ); +} + +/*! This should be called by subclasses if the user changed the value + of the property and this value should be applied to the widget property +*/ + +void PropertyItem::notifyValueChange() +{ + if ( !propertyParent() ) { + listview->valueChanged( this ); + setChanged( TRUE ); + if ( hasSubItems() ) + initChildren(); + } else { + propertyParent()->childValueChanged( this ); + setChanged( TRUE ); + } +} + +/*! If a subclass is a expandable item reimplement this as this is + always called if a child item changed its value. So update the + display of the item here then. +*/ + +void PropertyItem::childValueChanged( PropertyItem * ) +{ +} + +/*! When adding a child item, call this (normally from addChildren() +*/ + +void PropertyItem::addChild( PropertyItem *i ) +{ + children.append( i ); +} + +int PropertyItem::childCount() const +{ + return children.count(); +} + +PropertyItem *PropertyItem::child( int i ) const +{ + // ARRRRRRRRG + return ( (PropertyItem*)this )->children.at( i ); +} + +/*! If the contents of the item is not displayable with a text, but + you want to draw it yourself (using drawCustomContents()), return + TRUE here. +*/ + +bool PropertyItem::hasCustomContents() const +{ + return FALSE; +} + +/*! + \sa hasCustomContents() +*/ + +void PropertyItem::drawCustomContents( TQPainter *, const TQRect & ) +{ +} + +TQString PropertyItem::currentItem() const +{ + return TQString(); +} + +int PropertyItem::currentIntItem() const +{ + return -1; +} + +void PropertyItem::setCurrentItem( const TQString & ) +{ +} + +void PropertyItem::setCurrentItem( int ) +{ +} + +int PropertyItem::currentIntItemFromObject() const +{ + return -1; +} + +TQString PropertyItem::currentItemFromObject() const +{ + return TQString(); +} + +void PropertyItem::setFocus( TQWidget *w ) +{ + if ( !tqApp->focusWidget() || + listview->propertyEditor()->formWindow() && + ( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->focusWidget()) ) && + !tqApp->focusWidget()->inherits( "Editor" ) ) ) + w->setFocus(); +} + +void PropertyItem::setText( int col, const TQString &t ) +{ + TQString txt( t ); + if ( col == 1 ) + txt = txt.replace( "\n", " " ); + TQListViewItem::setText( col, txt ); +} + +// -------------------------------------------------------------- + +PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool comment, bool multiLine, bool ascii, bool a ) + : PropertyItem( l, after, prop, propName ), withComment( comment ), + hasMultiLines( multiLine ), asciiOnly( ascii ), accel( a ) +{ + lin = 0; + box = 0; +} + +TQLineEdit *PropertyTextItem::lined() +{ + if ( lin ) + return lin; + if ( hasMultiLines ) { + box = new TQHBox( listview->viewport() ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + box->hide(); + } + + lin = 0; + if ( hasMultiLines ) + lin = new TQLineEdit( box ); + else + lin = new TQLineEdit( listview->viewport() ); + + if ( asciiOnly ) { + if ( PropertyItem::name() == "name" ) { + lin->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(lin), "ascii_validator" ) ); + if ( listview->propertyEditor()->formWindow()->isFake() ) + lin->setEnabled( FALSE ); + } else { + lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" + "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9" + "\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3" + "\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc" + "\xbd\xbe\xbf"), TQT_TQOBJECT(lin), "ascii_validator" ) ); + } + } if ( !hasMultiLines ) { + lin->hide(); + } else { + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getText() ) ); + lin->setFrame( FALSE ); + } + connect( lin, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( setValue() ) ); + connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( setValue() ) ); + if ( PropertyItem::name() == "name" || PropertyItem::name() == "itemName" ) + connect( lin, TQT_SIGNAL( returnPressed() ), + listview->propertyEditor()->formWindow()->commandHistory(), + TQT_SLOT( checkCompressedCommand() ) ); + lin->installEventFilter( listview ); + return lin; +} + +PropertyTextItem::~PropertyTextItem() +{ + delete (TQLineEdit*)lin; + lin = 0; + delete (TQHBox*)box; + box = 0; +} + +void PropertyTextItem::setChanged( bool b, bool updateDb ) +{ + PropertyItem::setChanged( b, updateDb ); + if ( withComment && childCount() > 0 ) + ( (PropertyTextItem*)PropertyItem::child( 0 ) )->lined()->setEnabled( b ); +} + +bool PropertyTextItem::hasSubItems() const +{ + return withComment; +} + +void PropertyTextItem::childValueChanged( PropertyItem *child ) +{ + if ( PropertyItem::name() != "name" ) + MetaDataBase::setPropertyComment( listview->propertyEditor()->widget(), + PropertyItem::name(), child->value().toString() ); + else + MetaDataBase::setExportMacro( listview->propertyEditor()->widget(), child->value().toString() ); + listview->propertyEditor()->formWindow()->commandHistory()->setModified( TRUE ); +} + +void PropertyTextItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin || lin->text().length() == 0 ) { + lined()->blockSignals( TRUE ); + lined()->setText( value().toString() ); + lined()->blockSignals( FALSE ); + } + + TQWidget* w; + if ( hasMultiLines ) + w = box; + else + w= lined(); + + placeEditor( w ); + if ( !w->isVisible() || !lined()->hasFocus() ) { + w->show(); + setFocus( lined() ); + } +} + +void PropertyTextItem::createChildren() +{ + PropertyTextItem *i = new PropertyTextItem( listview, this, this, + PropertyItem::name() == "name" ? + "export macro" : "comment", FALSE, FALSE, + PropertyItem::name() == "name" ); + i->lined()->setEnabled( isChanged() ); + addChild( i ); +} + +void PropertyTextItem::initChildren() +{ + if ( !childCount() ) + return; + PropertyItem *item = PropertyItem::child( 0 ); + if ( item ) { + if ( PropertyItem::name() != "name" ) + item->setValue( MetaDataBase::propertyComment( listview->propertyEditor()->widget(), + PropertyItem::name() ) ); + else + item->setValue( MetaDataBase::exportMacro( listview->propertyEditor()->widget() ) ); + } +} + +void PropertyTextItem::hideEditor() +{ + PropertyItem::hideEditor(); + TQWidget* w; + if ( hasMultiLines ) + w = box; + else + w = lined(); + + w->hide(); +} + +void PropertyTextItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + if ( lin ) { + lined()->blockSignals( TRUE ); + int oldCursorPos; + oldCursorPos = lin->cursorPosition(); + lined()->setText( v.toString() ); + if ( oldCursorPos < (int)lin->text().length() ) + lin->setCursorPosition( oldCursorPos ); + lined()->blockSignals( FALSE ); + } + setText( 1, v.toString() ); + PropertyItem::setValue( v ); +} + +void PropertyTextItem::setValue() +{ + setText( 1, lined()->text() ); + TQVariant v; + if ( accel ) { + v = TQVariant( TQKeySequence( lined()->text() ) ); + if ( v.toString().isNull() ) + return; // not yet valid input + } else { + v = lined()->text(); + } + PropertyItem::setValue( v ); + notifyValueChange(); +} + +void PropertyTextItem::getText() +{ + bool richText = !::tqqt_cast(listview->propertyEditor()->widget()) || + ( text( 0 ) == "whatsThis" ); + bool doWrap = FALSE; + TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap ); + if ( !txt.isEmpty() ) { + setText( 1, txt ); + PropertyItem::setValue( txt ); + notifyValueChange(); + lined()->blockSignals( TRUE ); + lined()->setText( txt ); + lined()->blockSignals( FALSE ); + } +} + +// -------------------------------------------------------------- + +PropertyDoubleItem::PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + lin = 0; +} + +TQLineEdit *PropertyDoubleItem::lined() +{ + if ( lin ) + return lin; + lin = new TQLineEdit( listview->viewport() ); + lin->setValidator( new TQDoubleValidator( TQT_TQOBJECT(lin), "double_validator" ) ); + + connect( lin, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( setValue() ) ); + connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( setValue() ) ); + lin->installEventFilter( listview ); + return lin; +} + +PropertyDoubleItem::~PropertyDoubleItem() +{ + delete (TQLineEdit*)lin; + lin = 0; +} + +void PropertyDoubleItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin ) { + lined()->blockSignals( TRUE ); + lined()->setText( TQString::number( value().toDouble() ) ); + lined()->blockSignals( FALSE ); + } + TQWidget* w = lined(); + + placeEditor( w ); + if ( !w->isVisible() || !lined()->hasFocus() ) { + w->show(); + setFocus( lined() ); + } +} + + +void PropertyDoubleItem::hideEditor() +{ + PropertyItem::hideEditor(); + TQWidget* w = lined(); + w->hide(); +} + +void PropertyDoubleItem::setValue( const TQVariant &v ) +{ + if ( value() == v ) + return; + if ( lin ) { + lined()->blockSignals( TRUE ); + int oldCursorPos; + oldCursorPos = lin->cursorPosition(); + lined()->setText( TQString::number( v.toDouble() ) ); + if ( oldCursorPos < (int)lin->text().length() ) + lin->setCursorPosition( oldCursorPos ); + lined()->blockSignals( FALSE ); + } + setText( 1, TQString::number( v.toDouble() ) ); + PropertyItem::setValue( v ); +} + +void PropertyDoubleItem::setValue() +{ + setText( 1, lined()->text() ); + TQVariant v = lined()->text().toDouble(); + PropertyItem::setValue( v ); + notifyValueChange(); +} + + +// -------------------------------------------------------------- + +PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + lin = 0; +} + +TQDateEdit *PropertyDateItem::lined() +{ + if ( lin ) + return lin; + lin = new TQDateEdit( listview->viewport() ); + TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) + o->installEventFilter( listview ); + delete l; + connect( lin, TQT_SIGNAL( valueChanged( const TQDate & ) ), + this, TQT_SLOT( setValue() ) ); + return lin; +} + +PropertyDateItem::~PropertyDateItem() +{ + delete (TQDateEdit*)lin; + lin = 0; +} + +void PropertyDateItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin ) { + lined()->blockSignals( TRUE ); + lined()->setDate( value().toDate() ); + lined()->blockSignals( FALSE ); + } + placeEditor( lin ); + if ( !lin->isVisible() ) { + lin->show(); + setFocus( lin ); + } +} + +void PropertyDateItem::hideEditor() +{ + PropertyItem::hideEditor(); + if ( lin ) + lin->hide(); +} + +void PropertyDateItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + if ( lin ) { + lined()->blockSignals( TRUE ); + if ( lined()->date() != v.toDate() ) + lined()->setDate( v.toDate() ); + lined()->blockSignals( FALSE ); + } + setText( 1, v.toDate().toString( ::Qt::ISODate ) ); + PropertyItem::setValue( v ); +} + +void PropertyDateItem::setValue() +{ + setText( 1, lined()->date().toString( ::Qt::ISODate ) ); + TQVariant v; + v = lined()->date(); + PropertyItem::setValue( v ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + lin = 0; +} + +TQTimeEdit *PropertyTimeItem::lined() +{ + if ( lin ) + return lin; + lin = new TQTimeEdit( listview->viewport() ); + connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ), + this, TQT_SLOT( setValue() ) ); + TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) + o->installEventFilter( listview ); + delete l; + return lin; +} + +PropertyTimeItem::~PropertyTimeItem() +{ + delete (TQTimeEdit*)lin; + lin = 0; +} + +void PropertyTimeItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin ) { + lined()->blockSignals( TRUE ); + lined()->setTime( value().toTime() ); + lined()->blockSignals( FALSE ); + } + placeEditor( lin ); + if ( !lin->isVisible() ) { + lin->show(); + setFocus( lin ); + } +} + +void PropertyTimeItem::hideEditor() +{ + PropertyItem::hideEditor(); + if ( lin ) + lin->hide(); +} + +void PropertyTimeItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + if ( lin ) { + lined()->blockSignals( TRUE ); + if ( lined()->time() != v.toTime() ) + lined()->setTime( v.toTime() ); + lined()->blockSignals( FALSE ); + } + setText( 1, v.toTime().toString( ::Qt::ISODate ) ); + PropertyItem::setValue( v ); +} + +void PropertyTimeItem::setValue() +{ + setText( 1, lined()->time().toString( ::Qt::ISODate ) ); + TQVariant v; + v = lined()->time(); + PropertyItem::setValue( v ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + lin = 0; +} + +TQDateTimeEdit *PropertyDateTimeItem::lined() +{ + if ( lin ) + return lin; + lin = new TQDateTimeEdit( listview->viewport() ); + connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ), + this, TQT_SLOT( setValue() ) ); + TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) + o->installEventFilter( listview ); + delete l; + return lin; +} + +PropertyDateTimeItem::~PropertyDateTimeItem() +{ + delete (TQDateTimeEdit*)lin; + lin = 0; +} + +void PropertyDateTimeItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin ) { + lined()->blockSignals( TRUE ); + lined()->setDateTime( value().toDateTime() ); + lined()->blockSignals( FALSE ); + } + placeEditor( lin ); + if ( !lin->isVisible() ) { + lin->show(); + setFocus( lin ); + } +} + +void PropertyDateTimeItem::hideEditor() +{ + PropertyItem::hideEditor(); + if ( lin ) + lin->hide(); +} + +void PropertyDateTimeItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + if ( lin ) { + lined()->blockSignals( TRUE ); + if ( lined()->dateTime() != v.toDateTime() ) + lined()->setDateTime( v.toDateTime() ); + lined()->blockSignals( FALSE ); + } + setText( 1, v.toDateTime().toString( ::Qt::ISODate ) ); + PropertyItem::setValue( v ); +} + +void PropertyDateTimeItem::setValue() +{ + setText( 1, lined()->dateTime().toString( ::Qt::ISODate ) ); + TQVariant v; + v = lined()->dateTime(); + PropertyItem::setValue( v ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + comb = 0; +} + +TQComboBox *PropertyBoolItem::combo() +{ + if ( comb ) + return comb; + comb = new TQComboBox( FALSE, listview->viewport() ); + comb->hide(); + comb->insertItem( i18n( "False" ) ); + comb->insertItem( i18n( "True" ) ); + connect( comb, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setValue() ) ); + comb->installEventFilter( listview ); + return comb; +} + +PropertyBoolItem::~PropertyBoolItem() +{ + delete (TQComboBox*)comb; + comb = 0; +} + +void PropertyBoolItem::toggle() +{ + bool b = value().toBool(); + setValue( TQVariant( !b, 0 ) ); + setValue(); +} + +void PropertyBoolItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !comb ) { + combo()->blockSignals( TRUE ); + if ( value().toBool() ) + combo()->setCurrentItem( 1 ); + else + combo()->setCurrentItem( 0 ); + combo()->blockSignals( FALSE ); + } + placeEditor( combo() ); + if ( !combo()->isVisible() || !combo()->hasFocus() ) { + combo()->show(); + setFocus( combo() ); + } +} + +void PropertyBoolItem::hideEditor() +{ + PropertyItem::hideEditor(); + combo()->hide(); +} + +void PropertyBoolItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + if ( comb ) { + combo()->blockSignals( TRUE ); + if ( v.toBool() ) + combo()->setCurrentItem( 1 ); + else + combo()->setCurrentItem( 0 ); + combo()->blockSignals( FALSE ); + } + TQString tmp = i18n( "True" ); + if ( !v.toBool() ) + tmp = i18n( "False" ); + setText( 1, tmp ); + PropertyItem::setValue( v ); +} + +void PropertyBoolItem::setValue() +{ + if ( !comb ) + return; + setText( 1, combo()->currentText() ); + bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE; + PropertyItem::setValue( TQVariant( b, 0 ) ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyIntItem::PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool s ) + : PropertyItem( l, after, prop, propName ), signedValue( s ) +{ + spinBx = 0; +} + +TQSpinBox *PropertyIntItem::spinBox() +{ + if ( spinBx ) + return spinBx; + if ( signedValue ) + spinBx = new TQSpinBox( -INT_MAX, INT_MAX, 1, listview->viewport() ); + else + spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() ); + spinBx->hide(); + spinBx->installEventFilter( listview ); + TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + if ( ol && ol->first() ) + ol->first()->installEventFilter( listview ); + delete ol; + connect( spinBx, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( setValue() ) ); + return spinBx; +} + +PropertyIntItem::~PropertyIntItem() +{ + delete (TQSpinBox*)spinBx; + spinBx = 0; +} + +void PropertyIntItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !spinBx ) { + spinBox()->blockSignals( TRUE ); + if ( signedValue ) + spinBox()->setValue( value().toInt() ); + else + spinBox()->setValue( value().toUInt() ); + spinBox()->blockSignals( FALSE ); + } + placeEditor( spinBox() ); + if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) { + spinBox()->show(); + setFocus( spinBox() ); + } +} + +void PropertyIntItem::hideEditor() +{ + PropertyItem::hideEditor(); + spinBox()->hide(); +} + +void PropertyIntItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + if ( spinBx ) { + spinBox()->blockSignals( TRUE ); + if ( signedValue ) + spinBox()->setValue( v.toInt() ); + else + spinBox()->setValue( v.toUInt() ); + spinBox()->blockSignals( FALSE ); + } + + if ( signedValue ) + setText( 1, TQString::number( v.toInt() ) ); + else + setText( 1, TQString::number( v.toUInt() ) ); + PropertyItem::setValue( v ); +} + +void PropertyIntItem::setValue() +{ + if ( !spinBx ) + return; + setText( 1, TQString::number( spinBox()->value() ) ); + if ( signedValue ) + PropertyItem::setValue( spinBox()->value() ); + else + PropertyItem::setValue( (uint)spinBox()->value() ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyLayoutItem::PropertyLayoutItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + spinBx = 0; +} + +PropertyLayoutItem::~PropertyLayoutItem() +{ + delete (TQSpinBox*)spinBx; + spinBx = 0; +} + +TQSpinBox* PropertyLayoutItem::spinBox() +{ + if ( spinBx ) + return spinBx; + spinBx = new TQSpinBox( -1, INT_MAX, 1, listview->viewport() ); + spinBx->setSpecialValueText( i18n( "default" ) ); + spinBx->hide(); + spinBx->installEventFilter( listview ); + TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + if ( ol && ol->first() ) + ol->first()->installEventFilter( listview ); + delete ol; + connect( spinBx, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( setValue() ) ); + return spinBx; +} + +void PropertyLayoutItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !spinBx ) { + spinBox()->blockSignals( TRUE ); + spinBox()->setValue( value().toInt() ); + spinBox()->blockSignals( TRUE ); + } + placeEditor( spinBox() ); + if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) { + spinBox()->show(); + setFocus( spinBox() ); + } +} + +void PropertyLayoutItem::hideEditor() +{ + PropertyItem::hideEditor(); + spinBox()->hide(); +} + +void PropertyLayoutItem::setValue( const TQVariant &v ) +{ + if ( spinBx ) { + spinBox()->blockSignals( TRUE ); + spinBox()->setValue( v.toInt() ); + spinBox()->blockSignals( FALSE ); + } + TQString s = v.toString(); + if ( v.toInt() == -1 ) + s = spinBox()->specialValueText(); + setText( 1, s ); + PropertyItem::setValue( v ); +} + +void PropertyLayoutItem::setValue() +{ + if ( !spinBx ) + return; + PropertyItem::setValue( spinBox()->value() ); + notifyValueChange(); +} + + +// -------------------------------------------------------------- + +PropertyListItem::PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool e ) + : PropertyItem( l, after, prop, propName ), editable( e ) +{ + comb = 0; + oldInt = -1; +} + +TQComboBox *PropertyListItem::combo() +{ + if ( comb ) + return comb; + comb = new TQComboBox( editable, listview->viewport() ); + comb->hide(); + connect( comb, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setValue() ) ); + comb->installEventFilter( listview ); + if ( editable ) { + TQObjectList *ol = comb->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + if ( ol && ol->first() ) + ol->first()->installEventFilter( listview ); + delete ol; + } + return comb; +} + +PropertyListItem::~PropertyListItem() +{ + delete (TQComboBox*)comb; + comb = 0; +} + +void PropertyListItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !comb ) { + combo()->blockSignals( TRUE ); + combo()->clear(); + combo()->insertStringList( value().toStringList() ); + combo()->blockSignals( FALSE ); + } + placeEditor( combo() ); + if ( !combo()->isVisible() || !combo()->hasFocus() ) { + combo()->show(); + setFocus( combo() ); + } +} + +void PropertyListItem::hideEditor() +{ + PropertyItem::hideEditor(); + combo()->hide(); +} + +void PropertyListItem::setValue( const TQVariant &v ) +{ + if ( comb ) { + combo()->blockSignals( TRUE ); + combo()->clear(); + combo()->insertStringList( v.toStringList() ); + combo()->blockSignals( FALSE ); + } + setText( 1, v.toStringList().first() ); + PropertyItem::setValue( v ); +} + +void PropertyListItem::setValue() +{ + if ( !comb ) + return; + setText( 1, combo()->currentText() ); + TQStringList lst; + for ( uint i = 0; i < combo()->listBox()->count(); ++i ) + lst << combo()->listBox()->item( i )->text(); + PropertyItem::setValue( lst ); + notifyValueChange(); + oldInt = currentIntItem(); + oldString = currentItem(); +} + +TQString PropertyListItem::currentItem() const +{ + return ( (PropertyListItem*)this )->combo()->currentText(); +} + +void PropertyListItem::setCurrentItem( const TQString &s ) +{ + if ( comb && currentItem().lower() == s.lower() ) + return; + + if ( !comb ) { + combo()->blockSignals( TRUE ); + combo()->clear(); + combo()->insertStringList( value().toStringList() ); + combo()->blockSignals( FALSE ); + } + for ( uint i = 0; i < combo()->listBox()->count(); ++i ) { + if ( combo()->listBox()->item( i )->text().lower() == s.lower() ) { + combo()->setCurrentItem( i ); + setText( 1, combo()->currentText() ); + break; + } + } + oldInt = currentIntItem(); + oldString = currentItem(); +} + +void PropertyListItem::addItem( const TQString &s ) +{ + combo()->insertItem( s ); +} + +void PropertyListItem::setCurrentItem( int i ) +{ + if ( comb && i == combo()->currentItem() ) + return; + + if ( !comb ) { + combo()->blockSignals( TRUE ); + combo()->clear(); + combo()->insertStringList( value().toStringList() ); + combo()->blockSignals( FALSE ); + } + combo()->setCurrentItem( i ); + setText( 1, combo()->currentText() ); + oldInt = currentIntItem(); + oldString = currentItem(); +} + +int PropertyListItem::currentIntItem() const +{ + return ( (PropertyListItem*)this )->combo()->currentItem(); +} + +int PropertyListItem::currentIntItemFromObject() const +{ + return oldInt; +} + +TQString PropertyListItem::currentItemFromObject() const +{ + return oldString; +} + +// -------------------------------------------------------------- + +PropertyCoordItem::PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, Type t ) + : PropertyItem( l, after, prop, propName ), typ( t ) +{ + lin = 0; + +} + +TQLineEdit *PropertyCoordItem::lined() +{ + if ( lin ) + return lin; + lin = new TQLineEdit( listview->viewport() ); + lin->setReadOnly( TRUE ); + lin->installEventFilter( listview ); + lin->hide(); + return lin; +} + +void PropertyCoordItem::createChildren() +{ + PropertyItem *i = this; + if ( typ == Rect || typ == Point ) { + i = new PropertyIntItem( listview, i, this, i18n( "x" ), TRUE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "y" ), TRUE ); + addChild( i ); + } + if ( typ == Rect || typ == Size ) { + i = new PropertyIntItem( listview, i, this, i18n( "width" ), TRUE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "height" ), TRUE ); + addChild( i ); + } +} + +void PropertyCoordItem::initChildren() +{ + PropertyItem *item = 0; + for ( int i = 0; i < childCount(); ++i ) { + item = PropertyItem::child( i ); + if ( item->name() == i18n( "x" ) ) { + if ( typ == Rect ) + item->setValue( val.toRect().x() ); + else if ( typ == Point ) + item->setValue( val.toPoint().x() ); + } else if ( item->name() == i18n( "y" ) ) { + if ( typ == Rect ) + item->setValue( val.toRect().y() ); + else if ( typ == Point ) + item->setValue( val.toPoint().y() ); + } else if ( item->name() == i18n( "width" ) ) { + if ( typ == Rect ) + item->setValue( val.toRect().width() ); + else if ( typ == Size ) + item->setValue( val.toSize().width() ); + } else if ( item->name() == i18n( "height" ) ) { + if ( typ == Rect ) + item->setValue( val.toRect().height() ); + else if ( typ == Size ) + item->setValue( val.toSize().height() ); + } + } +} + +PropertyCoordItem::~PropertyCoordItem() +{ + delete (TQLineEdit*)lin; + lin = 0; +} + +void PropertyCoordItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin ) + lined()->setText( text( 1 ) ); + placeEditor( lined() ); + if ( !lined()->isVisible() || !lined()->hasFocus() ) { + lined()->show(); + setFocus( lined() ); + } +} + +void PropertyCoordItem::hideEditor() +{ + PropertyItem::hideEditor(); + lined()->hide(); +} + +void PropertyCoordItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + TQString s; + if ( typ == Rect ) + s = "[ " + TQString::number( v.toRect().x() ) + ", " + TQString::number( v.toRect().y() ) + ", " + + TQString::number( v.toRect().width() ) + ", " + TQString::number( v.toRect().height() ) + " ]"; + else if ( typ == Point ) + s = "[ " + TQString::number( v.toPoint().x() ) + ", " + + TQString::number( v.toPoint().y() ) + " ]"; + else if ( typ == Size ) + s = "[ " + TQString::number( v.toSize().width() ) + ", " + + TQString::number( v.toSize().height() ) + " ]"; + setText( 1, s ); + if ( lin ) + lined()->setText( s ); + PropertyItem::setValue( v ); +} + +bool PropertyCoordItem::hasSubItems() const +{ + return TRUE; +} + +void PropertyCoordItem::childValueChanged( PropertyItem *child ) +{ + if ( typ == Rect ) { + TQRect r = value().toRect(); + if ( child->name() == i18n( "x" ) ) + r.moveBy( -r.x() + child->value().toInt(), 0 ); + else if ( child->name() == i18n( "y" ) ) + r.moveBy( 0, -r.y() + child->value().toInt() ); + else if ( child->name() == i18n( "width" ) ) + r.setWidth( child->value().toInt() ); + else if ( child->name() == i18n( "height" ) ) + r.setHeight( child->value().toInt() ); + setValue( r ); + } else if ( typ == Point ) { + TQPoint r = value().toPoint(); + if ( child->name() == i18n( "x" ) ) + r.setX( child->value().toInt() ); + else if ( child->name() == i18n( "y" ) ) + r.setY( child->value().toInt() ); + setValue( r ); + } else if ( typ == Size ) { + TQSize r = value().toSize(); + if ( child->name() == i18n( "width" ) ) + r.setWidth( child->value().toInt() ); + else if ( child->name() == i18n( "height" ) ) + r.setHeight( child->value().toInt() ); + setValue( r ); + } + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, Type t ) + : PropertyItem( l, after, prop, propName ), type( t ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + pixPrev = new TQLabel( box ); + pixPrev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Minimum ) ); + pixPrev->setBackgroundColor( pixPrev->colorGroup().color( TQColorGroup::Base ) ); + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + pixPrev->setFrameStyle( TQFrame::NoFrame ); + box->installEventFilter( listview ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getPixmap() ) ); +} + +PropertyPixmapItem::~PropertyPixmapItem() +{ + delete (TQHBox*)box; +} + +void PropertyPixmapItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() ) { + box->show(); + listView()->viewport()->setFocus(); + } +} + +void PropertyPixmapItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyPixmapItem::setValue( const TQVariant &v ) +{ + TQString s; + if ( type == Pixmap ) + pixPrev->setPixmap( v.toPixmap() ); + else if ( type == IconSet ) + pixPrev->setPixmap( v.toIconSet().pixmap() ); + else + pixPrev->setPixmap( v.toImage() ); + PropertyItem::setValue( v ); + repaint(); +} + +void PropertyPixmapItem::getPixmap() +{ + TQPixmap pix = qChoosePixmap( listview, listview->propertyEditor()->formWindow(), value().toPixmap() ); + if ( !pix.isNull() ) { + if ( type == Pixmap ) + setValue( pix ); + else if ( type == IconSet ) + setValue( TQIconSet( pix ) ); + else + setValue( pix.convertToImage() ); + + notifyValueChange(); + } +} + +bool PropertyPixmapItem::hasCustomContents() const +{ + return TRUE; +} + +void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r ) +{ + TQPixmap pix; + if ( type == Pixmap ) + pix = value().toPixmap(); + else if ( type == IconSet ) + pix = value().toIconSet().pixmap(); + else + pix = value().toImage(); + + if ( !pix.isNull() ) { + p->save(); + p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()), + (int)(p->worldMatrix().dy() + r.y()) ), + r.size() ) ); + p->drawPixmap( r.x(), r.y() + ( r.height() - pix.height() ) / 2, pix ); + p->restore(); + } +} + + +// -------------------------------------------------------------- + +PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool children ) + : PropertyItem( l, after, prop, propName ), withChildren( children ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + colorPrev = new TQFrame( box ); + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + colorPrev->setFrameStyle( TQFrame::Plain | TQFrame::Box ); + colorPrev->setLineWidth( 2 ); + TQPalette pal = colorPrev->palette(); + TQColorGroup cg = pal.active(); + cg.setColor( TQColorGroup::Foreground, cg.color( TQColorGroup::Base ) ); + pal.setActive( cg ); + pal.setInactive( cg ); + pal.setDisabled( cg ); + colorPrev->setPalette( pal ); + box->installEventFilter( listview ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getColor() ) ); +} + +void PropertyColorItem::createChildren() +{ + PropertyItem *i = this; + i = new PropertyIntItem( listview, i, this, i18n( "Red" ), TRUE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "Green" ), TRUE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "Blue" ), TRUE ); + addChild( i ); +} + +void PropertyColorItem::initChildren() +{ + PropertyItem *item = 0; + for ( int i = 0; i < childCount(); ++i ) { + item = PropertyItem::child( i ); + if ( item->name() == i18n( "Red" ) ) + item->setValue( val.toColor().red() ); + else if ( item->name() == i18n( "Green" ) ) + item->setValue( val.toColor().green() ); + else if ( item->name() == i18n( "Blue" ) ) + item->setValue( val.toColor().blue() ); + } +} + +PropertyColorItem::~PropertyColorItem() +{ + delete (TQHBox*)box; +} + +void PropertyColorItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() ) { + box->show(); + listView()->viewport()->setFocus(); + } +} + +void PropertyColorItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyColorItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + TQString s; + setText( 1, v.toColor().name() ); + colorPrev->setBackgroundColor( v.toColor() ); + PropertyItem::setValue( v ); +} + +bool PropertyColorItem::hasSubItems() const +{ + return withChildren; +} + +void PropertyColorItem::childValueChanged( PropertyItem *child ) +{ + TQColor c( val.toColor() ); + if ( child->name() == i18n( "Red" ) ) + c.setRgb( child->value().toInt(), c.green(), c.blue() ); + else if ( child->name() == i18n( "Green" ) ) + c.setRgb( c.red(), child->value().toInt(), c.blue() ); + else if ( child->name() == i18n( "Blue" ) ) + c.setRgb( c.red(), c.green(), child->value().toInt() ); + setValue( c ); + notifyValueChange(); +} + +void PropertyColorItem::getColor() +{ + TQColor c = TQColorDialog::getColor( val.asColor(), listview ); + if ( c.isValid() ) { + setValue( c ); + notifyValueChange(); + } +} + +bool PropertyColorItem::hasCustomContents() const +{ + return TRUE; +} + +void PropertyColorItem::drawCustomContents( TQPainter *p, const TQRect &r ) +{ + p->save(); + p->setPen( TQPen( black, 1 ) ); + p->setBrush( val.toColor() ); + p->drawRect( r.x() + 2, r.y() + 2, r.width() - 5, r.height() - 5 ); + p->restore(); +} + +// -------------------------------------------------------------- + +PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + lined = new TQLineEdit( box ); + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + lined->setFrame( FALSE ); + lined->setReadOnly( TRUE ); + box->setFocusProxy( lined ); + box->installEventFilter( listview ); + lined->installEventFilter( listview ); + button->installEventFilter( listview ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getFont() ) ); +} + +void PropertyFontItem::createChildren() +{ + PropertyItem *i = this; + i = new PropertyListItem( listview, i, this, i18n( "Family" ), FALSE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "Point Size" ), TRUE ); + addChild( i ); + i = new PropertyBoolItem( listview, i, this, i18n( "Bold" ) ); + addChild( i ); + i = new PropertyBoolItem( listview, i, this, i18n( "Italic" ) ); + addChild( i ); + i = new PropertyBoolItem( listview, i, this, i18n( "Underline" ) ); + addChild( i ); + i = new PropertyBoolItem( listview, i, this, i18n( "Strikeout" ) ); + addChild( i ); +} + +void PropertyFontItem::initChildren() +{ + PropertyItem *item = 0; + for ( int i = 0; i < childCount(); ++i ) { + item = PropertyItem::child( i ); + if ( item->name() == i18n( "Family" ) ) { + ( (PropertyListItem*)item )->setValue( getFontList() ); + ( (PropertyListItem*)item )->setCurrentItem( val.toFont().family() ); + } else if ( item->name() == i18n( "Point Size" ) ) + item->setValue( val.toFont().pointSize() ); + else if ( item->name() == i18n( "Bold" ) ) + item->setValue( TQVariant( val.toFont().bold(), 0 ) ); + else if ( item->name() == i18n( "Italic" ) ) + item->setValue( TQVariant( val.toFont().italic(), 0 ) ); + else if ( item->name() == i18n( "Underline" ) ) + item->setValue( TQVariant( val.toFont().underline(), 0 ) ); + else if ( item->name() == i18n( "Strikeout" ) ) + item->setValue( TQVariant( val.toFont().strikeOut(), 0 ) ); + } +} + +PropertyFontItem::~PropertyFontItem() +{ + delete (TQHBox*)box; +} + +void PropertyFontItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() || !lined->hasFocus() ) { + box->show(); + setFocus( lined ); + } +} + +void PropertyFontItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyFontItem::setValue( const TQVariant &v ) +{ + if ( value() == v ) + return; + + setText( 1, v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) ); + lined->setText( v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) ); + PropertyItem::setValue( v ); +} + +void PropertyFontItem::getFont() +{ + bool ok = FALSE; + TQFont f = TQFontDialog::getFont( &ok, val.toFont(), listview ); + if ( ok && f != val.toFont() ) { + setValue( f ); + notifyValueChange(); + } +} + +bool PropertyFontItem::hasSubItems() const +{ + return TRUE; +} + +void PropertyFontItem::childValueChanged( PropertyItem *child ) +{ + TQFont f = val.toFont(); + if ( child->name() == i18n( "Family" ) ) + f.setFamily( ( (PropertyListItem*)child )->currentItem() ); + else if ( child->name() == i18n( "Point Size" ) ) + f.setPointSize( child->value().toInt() ); + else if ( child->name() == i18n( "Bold" ) ) + f.setBold( child->value().toBool() ); + else if ( child->name() == i18n( "Italic" ) ) + f.setItalic( child->value().toBool() ); + else if ( child->name() == i18n( "Underline" ) ) + f.setUnderline( child->value().toBool() ); + else if ( child->name() == i18n( "Strikeout" ) ) + f.setStrikeOut( child->value().toBool() ); + setValue( f ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool wField ) + : PropertyItem( l, after, prop, propName ), withField( wField ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + lined = new TQLineEdit( box ); + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + lined->setFrame( FALSE ); + lined->setReadOnly( TRUE ); + box->setFocusProxy( lined ); + box->installEventFilter( listview ); + lined->installEventFilter( listview ); + button->installEventFilter( listview ); +} + +void PropertyDatabaseItem::createChildren() +{ + PropertyItem *i = this; + i = new PropertyListItem( listview, i, this, i18n( "Connection" ), TRUE ); + addChild( i ); + i = new PropertyListItem( listview, i, this, i18n( "Table" ), TRUE ); + addChild( i ); + if ( withField ) { + i = new PropertyListItem( listview, i, this, i18n( "Field" ), TRUE ); + addChild( i ); + } +} + +void PropertyDatabaseItem::initChildren() +{ +#ifndef TQT_NO_SQL + PropertyItem *item = 0; + TQStringList lst = value().toStringList(); + TQString conn, table; + for ( int i = 0; i < childCount(); ++i ) { + item = PropertyItem::child( i ); + if ( item->name() == i18n( "Connection" ) ) { + TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseConnectionList(); + if ( !cl.isEmpty() ) + item->setValue( cl ); + else if ( lst.count() > 0 ) + item->setValue( TQStringList( lst[ 0 ] ) ); + else if ( withField ) + item->setValue( TQStringList( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), + "database" ).toStringList()[ 0 ] ) ); + + if ( lst.count() > 0 && !lst[ 0 ].isEmpty() ) + item->setCurrentItem( lst[ 0 ] ); + else if ( !isChanged() && withField ) + item->setCurrentItem( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), + "database" ).toStringList()[ 0 ] ); + else + item->setCurrentItem( 0 ); + conn = item->currentItem(); + } else if ( item->name() == i18n( "Table" ) ) { + TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseTableList( conn ); + if ( !cl.isEmpty() ) + item->setValue( cl ); + else if ( lst.count() > 1 ) + item->setValue( TQStringList( lst[ 1 ] ) ); + else if ( withField ) { + TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); + if ( fakeLst.count() > 1 ) + item->setValue( fakeLst[ 1 ] ); + } + + if ( lst.count() > 1 && !lst[ 1 ].isEmpty() ) + item->setCurrentItem( lst[ 1 ] ); + else if ( !isChanged() && withField ) { + TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); + if ( fakeLst.count() > 1 ) + item->setCurrentItem( fakeLst[ 1 ] ); + else + item->setCurrentItem( 0 ); + } else + item->setCurrentItem( 0 ); + table = item->currentItem(); + } else if ( item->name() == i18n( "Field" ) ) { + TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseFieldList( conn, table ); + if ( !cl.isEmpty() ) + item->setValue( cl ); + else if ( lst.count() > 2 ) + item->setValue( TQStringList( lst[ 2 ] ) ); + if ( lst.count() > 2 && !lst[ 2 ].isEmpty() ) + item->setCurrentItem( lst[ 2 ] ); + else + item->setCurrentItem( 0 ); + } + } +#endif +} + +PropertyDatabaseItem::~PropertyDatabaseItem() +{ + delete (TQHBox*)box; +} + +void PropertyDatabaseItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() || !lined->hasFocus() ) { + box->show(); + setFocus( lined ); + } +} + +void PropertyDatabaseItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyDatabaseItem::setValue( const TQVariant &v ) +{ + if ( value() == v ) + return; + + TQStringList lst = v.toStringList(); + TQString s = lst.join( "." ); + setText( 1, s ); + lined->setText( s ); + PropertyItem::setValue( v ); +} + +bool PropertyDatabaseItem::hasSubItems() const +{ + return TRUE; +} + +void PropertyDatabaseItem::childValueChanged( PropertyItem *c ) +{ +#ifndef TQT_NO_SQL + TQStringList lst; + lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem() + << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem(); + if ( withField ) + lst << ( (PropertyListItem*)PropertyItem::child( 2 ) )->currentItem(); + if ( c == PropertyItem::child( 0 ) ) { // if the connection changed + lst[ 0 ] = ( (PropertyListItem*)c )->currentItem(); + PropertyItem::child( 1 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseTableList( lst[ 0 ] ) ); + if ( withField ) + PropertyItem::child( 2 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ) ); + } else if ( withField && c == PropertyItem::child( 1 ) ) { // if the table changed + lst[ 1 ] = ( (PropertyListItem*)c )->currentItem(); + if ( withField ) + PropertyItem::child( 2 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ) ); + } + lst.clear(); + lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem() + << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem(); + if ( withField ) + lst << ( (PropertyListItem*)PropertyItem::child( 2 ) )->currentItem(); + setValue( lst ); + notifyValueChange(); +#else + Q_UNUSED( c ); +#endif +} + +// -------------------------------------------------------------- + +PropertySizePolicyItem::PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + lin = 0; +} + +TQLineEdit *PropertySizePolicyItem::lined() +{ + if ( lin ) + return lin; + lin = new TQLineEdit( listview->viewport() ); + lin->hide(); + lin->setReadOnly( TRUE ); + return lin; +} + +void PropertySizePolicyItem::createChildren() +{ + TQStringList lst; + lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored"; + + PropertyItem *i = this; + i = new PropertyListItem( listview, i, this, i18n( "hSizeType" ), FALSE ); + i->setValue( lst ); + addChild( i ); + i = new PropertyListItem( listview, i, this, i18n( "vSizeType" ), FALSE ); + i->setValue( lst ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "horizontalStretch" ), TRUE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "verticalStretch" ), TRUE ); + addChild( i ); +} + +void PropertySizePolicyItem::initChildren() +{ + PropertyItem *item = 0; + TQSizePolicy sp = val.toSizePolicy(); + for ( int i = 0; i < childCount(); ++i ) { + item = PropertyItem::child( i ); + if ( item->name() == i18n( "hSizeType" ) ) + ( (PropertyListItem*)item )->setCurrentItem( size_type_to_int( sp.horData() ) ); + else if ( item->name() == i18n( "vSizeType" ) ) + ( (PropertyListItem*)item )->setCurrentItem( size_type_to_int( sp.verData() ) ); + else if ( item->name() == i18n( "horizontalStretch" ) ) + ( (PropertyIntItem*)item )->setValue( sp.horStretch() ); + else if ( item->name() == i18n( "verticalStretch" ) ) + ( (PropertyIntItem*)item )->setValue( sp.verStretch() ); + } +} + +PropertySizePolicyItem::~PropertySizePolicyItem() +{ + delete (TQLineEdit*)lin; +} + +void PropertySizePolicyItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( lined() ); + if ( !lined()->isVisible() || !lined()->hasFocus() ) { + lined()->show(); + listView()->viewport()->setFocus(); + } +} + +void PropertySizePolicyItem::hideEditor() +{ + PropertyItem::hideEditor(); + lined()->hide(); +} + +void PropertySizePolicyItem::setValue( const TQVariant &v ) +{ + if ( value() == v ) + return; + + TQString s = i18n( "%1/%2/%3/%4" ); + s = s.arg( size_type_to_string( v.toSizePolicy().horData() ) ). + arg( size_type_to_string( v.toSizePolicy().verData() ) ). + arg( v.toSizePolicy().horStretch() ). + arg( v.toSizePolicy().verStretch() ); + setText( 1, s ); + lined()->setText( s ); + PropertyItem::setValue( v ); +} + +void PropertySizePolicyItem::childValueChanged( PropertyItem *child ) +{ + TQSizePolicy sp = val.toSizePolicy(); + if ( child->name() == i18n( "hSizeType" ) ) + sp.setHorData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) ); + else if ( child->name() == i18n( "vSizeType" ) ) + sp.setVerData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) ); + else if ( child->name() == i18n( "horizontalStretch" ) ) + sp.setHorStretch( ( ( PropertyIntItem*)child )->value().toInt() ); + else if ( child->name() == i18n( "verticalStretch" ) ) + sp.setVerStretch( ( ( PropertyIntItem*)child )->value().toInt() ); + setValue( sp ); + notifyValueChange(); +} + +bool PropertySizePolicyItem::hasSubItems() const +{ + return TRUE; +} + +// -------------------------------------------------------------- + +PropertyPaletteItem::PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + palettePrev = new TQLabel( box ); + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + palettePrev->setFrameStyle( TQFrame::NoFrame ); + box->installEventFilter( listview ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getPalette() ) ); +} +PropertyPaletteItem::~PropertyPaletteItem() +{ + delete (TQHBox*)box; +} + +void PropertyPaletteItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() ) { + box->show(); + listView()->viewport()->setFocus(); + } +} + +void PropertyPaletteItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyPaletteItem::setValue( const TQVariant &v ) +{ + TQString s; + palettePrev->setPalette( v.toPalette() ); + PropertyItem::setValue( v ); + repaint(); +} + +void PropertyPaletteItem::getPalette() +{ + if ( !listview->propertyEditor()->widget()->isWidgetType() ) + return; + bool ok = FALSE; + TQWidget *w = (TQWidget*)listview->propertyEditor()->widget(); + if ( ::tqqt_cast(w) ) + w = ( (TQScrollView*)w )->viewport(); + TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(), +#if defined(TQT_NON_COMMERCIAL) + w->backgroundMode(), listview->topLevelWidget(), +#else + w->backgroundMode(), listview, +#endif + "choose_palette", listview->propertyEditor()->formWindow() ); + if ( !ok ) + return; + setValue( pal ); + notifyValueChange(); +} + +bool PropertyPaletteItem::hasCustomContents() const +{ + return TRUE; +} + +void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r ) +{ + TQPalette pal( value().toPalette() ); + p->save(); + p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()), + (int)(p->worldMatrix().dy() + r.y()) ), + r.size() ) ); + TQRect r2( r ); + r2.setX( r2.x() + 2 ); + r2.setY( r2.y() + 2 ); + r2.setWidth( r2.width() - 3 ); + r2.setHeight( r2.height() - 3 ); + p->setPen( TQPen( black, 1 ) ); + p->setBrush( pal.active().background() ); + p->drawRect( r2 ); + p->restore(); +} + +// -------------------------------------------------------------- + +PropertyCursorItem::PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + comb = 0; +} + +TQComboBox *PropertyCursorItem::combo() +{ + if ( comb ) + return comb; + comb = new TQComboBox( FALSE, listview->viewport() ); + comb->hide(); + TQBitmap cur; + + const TQPixmap ArrowPix = SmallIcon( "designer_arrow.png" , KDevDesignerPartFactory::instance()); + const TQPixmap UpArrowPix = SmallIcon( "designer_uparrow.png" , KDevDesignerPartFactory::instance()); + const TQPixmap CrossPix = SmallIcon( "designer_cross.png" , KDevDesignerPartFactory::instance()); + const TQPixmap WaitPix = SmallIcon( "designer_wait.png" , KDevDesignerPartFactory::instance()); + const TQPixmap IBeamPix = SmallIcon( "designer_ibeam.png" , KDevDesignerPartFactory::instance()); + const TQPixmap SizeVPix = SmallIcon( "designer_sizev.png" , KDevDesignerPartFactory::instance()); + const TQPixmap SizeHPix = SmallIcon( "designer_sizeh.png" , KDevDesignerPartFactory::instance()); + const TQPixmap SizeFPix = SmallIcon( "designer_sizef.png" , KDevDesignerPartFactory::instance()); + const TQPixmap SizeBPix = SmallIcon( "designer_sizeb.png" , KDevDesignerPartFactory::instance()); + const TQPixmap SizeAllPix = SmallIcon( "designer_sizeall.png" , KDevDesignerPartFactory::instance()); + const TQPixmap VSplitPix = SmallIcon( "designer_vsplit.png" , KDevDesignerPartFactory::instance()); + const TQPixmap HSplitPix = SmallIcon( "designer_hsplit.png" , KDevDesignerPartFactory::instance()); + const TQPixmap HandPix = SmallIcon( "designer_hand.png" , KDevDesignerPartFactory::instance()); + const TQPixmap NoPix = SmallIcon( "designer_no.png" , KDevDesignerPartFactory::instance()); + + comb->insertItem( ArrowPix, i18n("Arrow"), TQObject::ArrowCursor); + comb->insertItem( UpArrowPix, i18n("Up-Arrow"), TQObject::UpArrowCursor ); + comb->insertItem( CrossPix, i18n("Cross"), TQObject::CrossCursor ); + comb->insertItem( WaitPix, i18n("Waiting"), TQObject::WaitCursor ); + comb->insertItem( IBeamPix, i18n("iBeam"), TQObject::IbeamCursor ); + comb->insertItem( SizeVPix, i18n("SizeQt::Vertical"), TQObject::SizeVerCursor ); + comb->insertItem( SizeHPix, i18n("SizeQt::Horizontal"), TQObject::SizeHorCursor ); + comb->insertItem( SizeFPix, i18n("Size Slash"), TQObject::SizeBDiagCursor ); + comb->insertItem( SizeBPix, i18n("Size Backslash"), TQObject::SizeFDiagCursor ); + comb->insertItem( SizeAllPix, i18n("Size All"), TQObject::SizeAllCursor ); + cur = TQBitmap( 25, 25, 1 ); + cur.setMask( cur ); + comb->insertItem( cur, i18n("Blank"), TQObject::BlankCursor ); + comb->insertItem( VSplitPix, i18n("SplitQt::Vertical"), TQObject::SplitVCursor ); + comb->insertItem( HSplitPix, i18n("SplitQt::Horizontal"), TQObject::SplitHCursor ); + comb->insertItem( HandPix, i18n("Pointing Hand"), TQObject::PointingHandCursor ); + comb->insertItem( NoPix, i18n("Forbidden"), TQObject::ForbiddenCursor ); + + connect( comb, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setValue() ) ); + comb->installEventFilter( listview ); + return comb; +} + +PropertyCursorItem::~PropertyCursorItem() +{ + delete (TQComboBox*)comb; +} + +void PropertyCursorItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !comb ) { + combo()->blockSignals( TRUE ); + combo()->setCurrentItem( (int)value().toCursor().shape() ); + combo()->blockSignals( FALSE ); + } + placeEditor( combo() ); + if ( !combo()->isVisible() || !combo()->hasFocus() ) { + combo()->show(); + setFocus( combo() ); + } +} + +void PropertyCursorItem::hideEditor() +{ + PropertyItem::hideEditor(); + combo()->hide(); +} + +void PropertyCursorItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + combo()->blockSignals( TRUE ); + combo()->setCurrentItem( (int)v.toCursor().shape() ); + combo()->blockSignals( FALSE ); + setText( 1, combo()->currentText() ); + PropertyItem::setValue( v ); +} + +void PropertyCursorItem::setValue() +{ + if ( !comb ) + return; + if ( TQVariant( TQCursor( combo()->currentItem() ) ) == val ) + return; + setText( 1, combo()->currentText() ); + PropertyItem::setValue( TQCursor( combo()->currentItem() ) ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyKeysequenceItem::PropertyKeysequenceItem( PropertyList *l, + PropertyItem *after, + PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ), + k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( FALSE ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + sequence = new TQLineEdit( box ); + connect( sequence, TQT_SIGNAL(textChanged( const TQString & )), + this, TQT_SLOT(setValue()) ); + sequence->installEventFilter( this ); +} + +PropertyKeysequenceItem::~PropertyKeysequenceItem() +{ + delete (TQHBox*)box; +} + +void PropertyKeysequenceItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() ) { + box->show(); + sequence->setFocus(); + } +} + +void PropertyKeysequenceItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +bool PropertyKeysequenceItem::eventFilter( TQObject *o, TQEvent *e ) +{ + Q_UNUSED( o ); + if ( e->type() == TQEvent::KeyPress ) { + TQKeyEvent *k = (TQKeyEvent *)e; + if ( !mouseEnter && + (k->key() == TQObject::Key_Up || + k->key() == TQObject::Key_Down) ) + return FALSE; + handleKeyEvent( k ); + return TRUE; + } else if ( (e->type() == TQEvent::FocusIn) || + (e->type() == TQEvent::MouseButtonPress) ) { + mouseEnter = ( listview->lastEvent() == PropertyList::MouseEvent ) || + (e->type() == TQEvent::MouseButtonPress); + return TRUE; + } + + // Lets eat accelerators now.. + if ( e->type() == TQEvent::Accel || + e->type() == TQEvent::AccelOverride || + e->type() == TQEvent::KeyRelease ) + return TRUE; + return FALSE; +} + +void PropertyKeysequenceItem::handleKeyEvent( TQKeyEvent *e ) +{ + int nextKey = e->key(); + + if ( num > 3 || + nextKey == TQObject::Key_Control || + nextKey == TQObject::Key_Shift || + nextKey == TQObject::Key_Meta || + nextKey == TQObject::Key_Alt ) + return; + + nextKey |= translateModifiers( e->state() ); + switch( num ) { + case 0: + k1 = nextKey; + break; + case 1: + k2 = nextKey; + break; + case 2: + k3 = nextKey; + break; + case 3: + k4 = nextKey; + break; + default: + break; + } + num++; + TQKeySequence ks( k1, k2, k3, k4 ); + sequence->setText( ks ); +} + +int PropertyKeysequenceItem::translateModifiers( int state ) +{ + int result = 0; + if ( state & TQObject::ShiftButton ) + result |= TQObject::SHIFT; + if ( state & TQObject::ControlButton ) + result |= TQObject::CTRL; + if ( state & TQObject::MetaButton ) + result |= TQObject::META; + if ( state & TQObject::AltButton ) + result |= TQObject::ALT; + return result; +} + +void PropertyKeysequenceItem::setValue() +{ + TQVariant v; + v = TQVariant( TQKeySequence(sequence->text()) ); + if ( v.toString().isNull() ) + return; + setText( 1, sequence->text() ); + PropertyItem::setValue( v ); + if ( sequence->hasFocus() ) + notifyValueChange(); + setChanged( TRUE ); +} + +void PropertyKeysequenceItem::setValue( const TQVariant &v ) +{ + TQKeySequence ks = v.toKeySequence(); + if ( sequence ) { + sequence->setText( ks ); + } + num = ks.count(); + k1 = ks[0]; + k2 = ks[1]; + k3 = ks[2]; + k4 = ks[3]; + setText( 1, ks ); + PropertyItem::setValue( v ); +} + +// -------------------------------------------------------------- + +EnumPopup::EnumPopup( TQWidget *parent, const char *name, WFlags f ) + : TQFrame( parent, name, f ) +{ + setLineWidth( 1 ); + setFrameStyle( Panel | Plain ); + setPaletteBackgroundColor( TQt::white ); + popLayout = new TQVBoxLayout( this, 3 ); + checkBoxList.setAutoDelete( TRUE ); +} + +EnumPopup::~EnumPopup() +{ +} + +void EnumPopup::insertEnums( TQValueList lst ) +{ + while ( checkBoxList.count() ) + checkBoxList.removeFirst(); + + itemList = lst; + TQCheckBox *cb; + TQValueListConstIterator it = itemList.begin(); + for ( ; it != itemList.end(); ++it ) { + cb = new TQCheckBox( this ); + cb->setText( (*it).key ); + cb->setChecked( (*it).selected ); + if ( it == itemList.begin() ) + cb->setFocus(); + checkBoxList.append( cb ); + cb->resize( width(), cb->height() ); + popLayout->addWidget( cb ); + } +} + +void EnumPopup::keyPressEvent( TQKeyEvent *e ) +{ + if ( e->key() == Key_Escape ) { + hide(); + emit hidden(); + } else if ( e->key() == Key_Enter || e->key() == Key_Return ) { + closeWidget(); + } +} + +void EnumPopup::closeWidget() +{ + TQPtrListIterator it( checkBoxList ); + int i = 0; + while ( it.current() != 0 ) { + itemList[i].selected = (*it)->isChecked(); + ++it; + ++i; + } + close(); + emit closed(); +} + +TQValueList EnumPopup::enumList() const +{ + return itemList; +} + +EnumBox::EnumBox( TQWidget *parent, const char *name ) + : TQComboBox( parent, name ) +{ + pop = new EnumPopup( this, "popup", TQObject::WType_Popup ); + connect( pop, TQT_SIGNAL( hidden() ), this, TQT_SLOT( popupHidden() ) ); + connect( pop, TQT_SIGNAL( closed() ), this, TQT_SLOT( popupClosed() ) ); + popupShown = FALSE; + arrowDown = FALSE; +} + +void EnumBox::popupHidden() +{ + popupShown = FALSE; +} + +void EnumBox::popupClosed() +{ + popupShown = FALSE; + emit valueChanged(); +} + +void EnumBox::paintEvent( TQPaintEvent * ) +{ + TQPainter p( this ); + const TQColorGroup & g = colorGroup(); + p.setPen(g.text()); + + TQStyle::SFlags flags = TQStyle::Style_Default; + if (isEnabled()) + flags |= TQStyle::Style_Enabled; + if (hasFocus()) + flags |= TQStyle::Style_HasFocus; + + if ( width() < 5 || height() < 5 ) { + qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, FALSE, 2, + &g.brush( TQColorGroup::Button ) ); + return; + } + style().drawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g, + flags, TQStyle::SC_All, + (arrowDown ? + TQStyle::SC_ComboBoxArrow : + TQStyle::SC_None )); + + TQRect re = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, + TQStyle::SC_ComboBoxEditField ); + re = TQStyle::visualRect(re, this); + p.setClipRect( re ); + + if ( !str.isNull() ) { + p.save(); + p.setFont(font()); + TQFontMetrics fm(font()); + int x = re.x(), y = re.y() + fm.ascent(); + p.drawText( x, y, str ); + p.restore(); + } +} + +void EnumBox::insertEnums( TQValueList lst ) +{ + pop->insertEnums( lst ); +} + +TQValueList EnumBox::enumList() const +{ + return pop->enumList(); +} + +void EnumBox::popup() +{ + if ( popupShown ) { + pop->closeWidget(); + popupShown = FALSE; + return; + } + pop->move( ((TQWidget*)parent())->mapToGlobal( geometry().bottomLeft() ) ); + pop->setMinimumWidth( width() ); + emit aboutToShowPopup(); + pop->show(); + popupShown = TRUE; +} + +void EnumBox::mousePressEvent( TQMouseEvent *e ) +{ + if ( e->button() != Qt::LeftButton ) + return; + + TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, + TQStyle::SC_ComboBoxArrow); + arrowRect = TQStyle::visualRect(arrowRect, this); + + arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); + + if ( arrowRect.contains( e->pos() ) ) { + arrowDown = TRUE; + repaint( FALSE ); + } + + popup(); + TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) ); +} + +void EnumBox::keyPressEvent( TQKeyEvent *e ) +{ + if ( e->key() == Key_Space ) { + popup(); + TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) ); + } else if ( e->key() == Key_Enter || e->key() == Key_Return ) { + popup(); + } +} + +void EnumBox::restoreArrow() +{ + arrowDown = FALSE; + repaint( FALSE ); +} + +void EnumBox::setText( const TQString &text ) +{ + str = text; + repaint( FALSE ); +} + + + +PropertyEnumItem::PropertyEnumItem( PropertyList *l, + PropertyItem *after, + PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + box = new EnumBox( listview->viewport() ); + box->hide(); + box->installEventFilter( listview ); + connect( box, TQT_SIGNAL( aboutToShowPopup() ), this, TQT_SLOT( insertEnums() ) ); + connect( box, TQT_SIGNAL( valueChanged() ), this, TQT_SLOT( setValue() ) ); +} + +PropertyEnumItem::~PropertyEnumItem() +{ + delete (EnumBox*)box; +} + +void PropertyEnumItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() ) { + box->show(); + box->setText( enumString ); + listView()->viewport()->setFocus(); + } + box->setFocus(); +} + +void PropertyEnumItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyEnumItem::setValue( const TQVariant &v ) +{ + enumString = ""; + enumList.clear(); + TQStringList lst = v.toStringList(); + TQValueListConstIterator it = lst.begin(); + for ( ; it != lst.end(); ++it ) + enumList.append( EnumItem( *it, FALSE ) ); + enumList.first().selected = TRUE; + enumString = enumList.first().key; + box->setText( enumString ); + setText( 1, enumString ); + PropertyItem::setValue( v ); +} + +void PropertyEnumItem::insertEnums() +{ + box->insertEnums( enumList ); +} + +void PropertyEnumItem::setValue() +{ + enumList = box->enumList(); + enumString = ""; + TQValueListConstIterator it = enumList.begin(); + for ( ; it != enumList.end(); ++it ) { + if ( (*it).selected ) + enumString += "|" + (*it).key; + } + if ( !enumString.isEmpty() ) + enumString.replace( 0, 1, "" ); + + box->setText( enumString ); + setText( 1, enumString ); + notifyValueChange(); +} + +void PropertyEnumItem::setCurrentValues( TQStrList lst ) +{ + enumString =""; + TQStrList::ConstIterator it = lst.begin(); + TQValueList::Iterator eit = enumList.begin(); + for ( ; eit != enumList.end(); ++eit ) { + (*eit).selected = FALSE; + for ( it = lst.begin(); it != lst.end(); ++it ) { + if ( TQString( *it ) == (*eit).key ) { + (*eit).selected = TRUE; + enumString += "|" + (*eit).key; + break; + } + } + } + if ( !enumString.isEmpty() ) + enumString.replace( 0, 1, "" ); + box->setText( enumString ); + setText( 1, enumString ); +} + +TQString PropertyEnumItem::currentItem() const +{ + return enumString; +} + +TQString PropertyEnumItem::currentItemFromObject() const +{ + return enumString; +} + +// -------------------------------------------------------------- + +/*! + \class PropertyList propertyeditor.h + \brief PropertyList is a TQListView derived class which is used for editing widget properties + + This class is used for widget properties. It has to be child of a + PropertyEditor. + + To initialize it for editing a widget call setupProperties() which + iterates through the properties of the current widget (see + PropertyEditor::widget()) and builds the list. + + To update the item values, refetchData() can be called. + + If the value of an item has been changed by the user, and this + change should be applied to the widget's property, valueChanged() + has to be called. + + To set the value of an item, setPropertyValue() has to be called. +*/ + +PropertyList::PropertyList( PropertyEditor *e ) + : TQListView( e ), editor( e ) +{ + init_colors(); + + whatsThis = new PropertyWhatsThis( this ); + showSorted = FALSE; + header()->setMovingEnabled( FALSE ); + header()->setStretchEnabled( TRUE ); + setResizePolicy( TQScrollView::Manual ); + viewport()->setAcceptDrops( TRUE ); + viewport()->installEventFilter( this ); + addColumn( i18n( "Property" ) ); + addColumn( i18n( "Value" ) ); + connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ), + this, TQT_SLOT( updateEditorSize() ) ); + disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), + this, TQT_SLOT( changeSortColumn( int ) ) ); + connect( header(), TQT_SIGNAL( sectionClicked( int ) ), + this, TQT_SLOT( toggleSort() ) ); + connect( this, TQT_SIGNAL( pressed( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( itemPressed( TQListViewItem *, const TQPoint &, int ) ) ); + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQT_SLOT( toggleOpen( TQListViewItem * ) ) ); + setSorting( -1 ); + setHScrollBarMode( AlwaysOff ); + setVScrollBarMode( AlwaysOn ); + setColumnWidthMode( 1, Manual ); + mousePressed = FALSE; + pressItem = 0; + theLastEvent = MouseEvent; + header()->installEventFilter( this ); +} + +void PropertyList::toggleSort() +{ + showSorted = !showSorted; + editor->clear(); + editor->setup(); +} + +void PropertyList::resizeEvent( TQResizeEvent *e ) +{ + TQListView::resizeEvent( e ); + if ( currentItem() ) + ( ( PropertyItem* )currentItem() )->showEditor(); +} + +static TQVariant::Type type_to_variant( const TQString &s ) +{ + if ( s == "Invalid " ) + return TQVariant::Invalid; + if ( s == "Map" ) + return TQVariant::Map; + if ( s == "List" ) + return TQVariant::List; + if ( s == "String" ) + return TQVariant::String; + if ( s == "StringList" ) + return TQVariant::StringList; + if ( s == "Font" ) + return TQVariant::Font; + if ( s == "Pixmap" ) + return TQVariant::Pixmap; + if ( s == "Brush" ) + return TQVariant::Brush; + if ( s == "Rect" ) + return TQVariant::Rect; + if ( s == "Size" ) + return TQVariant::Size; + if ( s == "Color" ) + return TQVariant::Color; + if ( s == "Palette" ) + return TQVariant::Palette; + if ( s == "ColorGroup" ) + return TQVariant::ColorGroup; + if ( s == "IconSet" ) + return TQVariant::IconSet; + if ( s == "Point" ) + return TQVariant::Point; + if ( s == "Image" ) + return TQVariant::Image; + if ( s == "Int" ) + return TQVariant::Int; + if ( s == "UInt" ) + return TQVariant::UInt; + if ( s == "Bool" ) + return TQVariant::Bool; + if ( s == "Double" ) + return TQVariant::Double; + if ( s == "CString" ) + return TQVariant::CString; + if ( s == "PointArray" ) + return TQVariant::PointArray; + if ( s == "Region" ) + return TQVariant::Region; + if ( s == "Bitmap" ) + return TQVariant::Bitmap; + if ( s == "Cursor" ) + return TQVariant::Cursor; + if ( s == "SizePolicy" ) + return TQVariant::SizePolicy; + if ( s == "Date" ) + return TQVariant::Date; + if ( s == "Time" ) + return TQVariant::Time; + if ( s == "DateTime" ) + return TQVariant::DateTime; + return TQVariant::Invalid; +} + +#ifndef TQT_NO_SQL +static bool parent_is_data_aware( TQWidget *w ) +{ + TQWidget *p = w ? w->parentWidget() : 0; + while ( p && !p->isTopLevel() ) { + if ( ::tqqt_cast(p) || ::tqqt_cast(p) ) + return TRUE; + p = p->parentWidget(); + } + return FALSE; +} +#endif + +/*! Sets up the property list by adding an item for each designable +property of the widget which is just edited. +*/ + +void PropertyList::setupProperties() +{ + if ( !editor->widget() ) + return; + bool allProperties = !::tqqt_cast(editor->widget()); + TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties ); + PropertyItem *item = 0; + TQMap unique; + TQObject *w = editor->widget(); + TQStringList valueSet; + bool parentHasLayout = + w->isWidgetType() && + !editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->parentWidget() && + WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; + for ( TQPtrListIterator it( lst ); it.current(); ++it ) { + const TQMetaProperty* p = + editor->widget()->metaObject()-> + property( editor->widget()->metaObject()->findProperty( it.current(), allProperties), allProperties ); + if ( !p ) + continue; + if ( unique.contains( TQString::fromLatin1( it.current() ) ) ) + continue; + if ( ::tqqt_cast(editor->widget()) || + ::tqqt_cast(editor->widget()) ) { + if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "geometry" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumSize" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) + continue; + } + unique.insert( TQString::fromLatin1( it.current() ), TRUE ); + if ( editor->widget()->isWidgetType() && + editor->formWindow()->isMainContainer( TQT_TQOBJECT(editor->widget()) ) ) { + if ( qstrcmp( p->name(), "geometry" ) == 0 ) + continue; + } else { // hide some toplevel-only stuff + if ( qstrcmp( p->name(), "icon" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "iconText" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "caption" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "sizeIncrement" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "baseSize" ) == 0 ) + continue; + if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) + continue; + if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) { + if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "geometry" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumSize" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "enabled" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "paletteForegroundColor" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "paletteBackgroundColor" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "paletteBackgroundPixmap" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "palette" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "font" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "cursor" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "mouseTracking" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "focusPolicy" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "acceptDrops" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "autoMask" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "backgroundOrigin" ) == 0 ) + continue; + } + } + if ( ::tqqt_cast(w) ) { + if ( qstrcmp( p->name(), "usesDropDown" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "toggleAction" ) == 0 ) + continue; + } + if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in TQ_PROPERTY can take a function (isInButtonGroup() in this case) + if ( !editor->widget()->isWidgetType() || + !editor->widget()->parent() || + !::tqqt_cast(editor->widget()->parent()) ) + continue; + } + + bool isPropertyObject = w->isA( "PropertyObject" ); + + if ( ( p->designable(w) || + isPropertyObject && p->designable( ( (PropertyObject*)w )->widgetList().first() ) ) && + ( !isPropertyObject || qstrcmp( p->name(), "name" ) != 0 ) ) { + if ( p->isSetType() ) { + if ( TQString( p->name() ) == "alignment" ) { + TQStringList lst; + lst << p->valueToKey( AlignAuto ) + << p->valueToKey( AlignLeft ) + << p->valueToKey( AlignHCenter ) + << p->valueToKey( AlignRight ) + << p->valueToKey( AlignJustify ); + item = new PropertyListItem( this, item, 0, "hAlign", FALSE ); + item->setValue( lst ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) ) + item->setChanged( TRUE, FALSE ); + if ( !::tqqt_cast(editor->widget()) ) { + lst.clear(); + lst << p->valueToKey( AlignTop ) + << p->valueToKey( AlignVCenter ) + << p->valueToKey( AlignBottom ); + item = new PropertyListItem( this, item, 0, "vAlign", FALSE ); + item->setValue( lst ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) ) + item->setChanged( TRUE, FALSE ); + item = new PropertyBoolItem( this, item, 0, "wordwrap" ); + if ( ::tqqt_cast(w) ) + item->setVisible( FALSE ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) ) + item->setChanged( TRUE, FALSE ); + } + } else { + TQStrList lst( p->enumKeys() ); + TQStringList l; + TQPtrListIterator it( lst ); + while ( it.current() != 0 ) { + l << TQString(*it); + ++it; + } + item = new PropertyEnumItem( this, item, 0, p->name() ); + item->setValue( l ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) ) + item->setChanged( TRUE, FALSE ); + } + } else if ( p->isEnumType() ) { + TQStrList l = p->enumKeys(); + TQStringList lst; + for ( uint i = 0; i < l.count(); ++i ) { + TQString k = l.at( i ); + // filter out enum-masks + if ( k[0] == 'M' && k[1].category() == TQChar::Letter_Uppercase ) + continue; + lst << k; + } + item = new PropertyListItem( this, item, 0, p->name(), FALSE ); + item->setValue( lst ); + } else { + TQVariant::Type t = TQVariant::nameToType( p->type() ); + if ( !addPropertyItem( item, p->name(), t ) ) + continue; + } + } + if ( item && !p->isSetType() ) { + if ( valueSet.findIndex( item->name() ) == -1 ) { + setPropertyValue( item ); + valueSet << item->name(); + } + if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) ) + item->setChanged( TRUE, FALSE ); + } + } + + if ( !::tqqt_cast(w) && !::tqqt_cast(w) && !::tqqt_cast(w) && + w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { + item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" ) + || MetaDataBase::spacing( editor->widget() ) != -1 ) + layoutInitValue( item, TRUE ); + else + layoutInitValue( item ); + item = new PropertyLayoutItem( this, item, 0, "layoutMargin" ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutMargin" ) + || MetaDataBase::margin( editor->widget() ) != -1 ) + layoutInitValue( item, TRUE ); + else + layoutInitValue( item ); + TQWidget *widget = (TQWidget*)w; + if ( ( !::tqqt_cast(widget) && + widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) ) ) { + item = new PropertyListItem( this, item, 0, "resizeMode", FALSE ); + TQStringList lst; + lst << "Auto" << "FreeResize" << "Minimum" << "Fixed"; + item->setValue( lst ); + setPropertyValue( item ); + TQString resizeMod = MetaDataBase::resizeMode( editor->widget() ); + if ( !resizeMod.isEmpty() && + resizeMod != WidgetFactory::defaultCurrentItem( editor->widget(), "resizeMode" ) ) { + item->setChanged( TRUE, FALSE ); + MetaDataBase::setPropertyChanged( editor->widget(), "resizeMode", TRUE ); + } + } + } + + if ( !::tqqt_cast(w) && !::tqqt_cast(w) && + !::tqqt_cast(w) && !::tqqt_cast(w) ) { + item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) + item->setChanged( TRUE, FALSE ); + item = new PropertyTextItem( this, item, 0, "whatsThis", TRUE, TRUE ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "whatsThis" ) ) + item->setChanged( TRUE, FALSE ); + } + +#ifndef TQT_NO_SQL + if ( !::tqqt_cast(editor->widget()) && !::tqqt_cast(editor->widget()) && + !::tqqt_cast(editor->widget()) && parent_is_data_aware( ::tqqt_cast(editor->widget()) ) ) { + item = new PropertyDatabaseItem( this, item, 0, "database", TQT_BASE_OBJECT(editor->formWindow()->mainContainer()) != TQT_BASE_OBJECT(w) ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) + item->setChanged( TRUE, FALSE ); + } + + if ( ::tqqt_cast(editor->widget()) || ::tqqt_cast(editor->widget()) || + ::tqqt_cast(editor->widget()) ) { + item = new PropertyDatabaseItem( this, item, 0, "database", FALSE ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) + item->setChanged( TRUE, FALSE ); + item = new PropertyBoolItem( this, item, 0, "frameworkCode" ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "frameworkCode" ) ) + item->setChanged( TRUE, FALSE ); + } +#endif + + if ( w->isA("PropertyObject") ) { + const TQWidgetList wl = ( (PropertyObject*)w )->widgetList(); + TQPtrListIterator wIt( wl ); + while ( *wIt ) { + if ( (*wIt)->inherits("CustomWidget") ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)*wIt )->customWidget(); + setupCusWidgetProperties( cw, unique, item ); + } + ++wIt; + } + } else if ( w->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); + setupCusWidgetProperties( cw, unique, item ); + } + + setCurrentItem( firstChild() ); + + if ( showSorted ) { + setSorting( 0 ); + sort(); + setSorting( -1 ); + setCurrentItem( firstChild() ); + tqApp->processEvents(); + } + + updateEditorSize(); +} + +void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw, + TQMap &unique, + PropertyItem *&item ) +{ + if ( !cw ) + return; + + for ( TQValueList::Iterator it = + cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { + if ( unique.contains( TQString( (*it).property ) ) ) + continue; + unique.insert( TQString( (*it).property ), TRUE ); + addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), (*it).property ) ) + item->setChanged( TRUE, FALSE ); + } +} + +bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t ) +{ + if ( name == "buddy" ) { + PropertyListItem *itm = new PropertyListItem( this, item, 0, name, TRUE ); + TQPtrDict *widgets = editor->formWindow()->widgets(); + TQPtrDictIterator it( *widgets ); + TQStringList l; + l << ""; + while ( it.current() ) { + if ( editor->formWindow()->canBeBuddy( it.current() ) ) { + if ( l.find( it.current()->name() ) == l.end() ) + l << it.current()->name(); + } + ++it; + } + l.sort(); + itm->setValue( l ); + item = itm; + return TRUE; + } + + switch ( t ) { + case TQVariant::String: + item = new PropertyTextItem( this, item, 0, name, TRUE, + ::tqqt_cast(editor->widget()) || + ::tqqt_cast(editor->widget()) || + ::tqqt_cast(editor->widget()) ); + break; + case TQVariant::CString: + item = new PropertyTextItem( this, item, 0, + name, name == "name" && + TQT_BASE_OBJECT(editor->widget()) == TQT_BASE_OBJECT(editor->formWindow()->mainContainer()), + FALSE, TRUE ); + break; + case TQVariant::Bool: + item = new PropertyBoolItem( this, item, 0, name ); + break; + case TQVariant::Font: + item = new PropertyFontItem( this, item, 0, name ); + break; + case TQVariant::Int: + if ( name == "accel" ) + item = new PropertyTextItem( this, item, 0, name, FALSE, FALSE, FALSE, TRUE ); + else if ( name == "layoutSpacing" || name == "layoutMargin" ) + item = new PropertyLayoutItem( this, item, 0, name ); + else if ( name == "resizeMode" ) + item = new PropertyListItem( this, item, 0, name, TRUE ); + else + item = new PropertyIntItem( this, item, 0, name, TRUE ); + break; + case TQVariant::Double: + item = new PropertyDoubleItem( this, item, 0, name ); + break; + case TQVariant::KeySequence: + item = new PropertyKeysequenceItem( this, item, 0, name ); + break; + case TQVariant::UInt: + item = new PropertyIntItem( this, item, 0, name, FALSE ); + break; + case TQVariant::StringList: + item = new PropertyListItem( this, item, 0, name, TRUE ); + break; + case TQVariant::Rect: + item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect ); + break; + case TQVariant::Point: + item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Point ); + break; + case TQVariant::Size: + item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size ); + break; + case TQVariant::Color: + item = new PropertyColorItem( this, item, 0, name, TRUE ); + break; + case TQVariant::Pixmap: + item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Pixmap ); + break; + case TQVariant::IconSet: + item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::IconSet ); + break; + case TQVariant::Image: + item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Image ); + break; + case TQVariant::SizePolicy: + item = new PropertySizePolicyItem( this, item, 0, name ); + break; + case TQVariant::Palette: + item = new PropertyPaletteItem( this, item, 0, name ); + break; + case TQVariant::Cursor: + item = new PropertyCursorItem( this, item, 0, name ); + break; + case TQVariant::Date: + item = new PropertyDateItem( this, item, 0, name ); + break; + case TQVariant::Time: + item = new PropertyTimeItem( this, item, 0, name ); + break; + case TQVariant::DateTime: + item = new PropertyDateTimeItem( this, item, 0, name ); + break; + default: + return FALSE; + } + return TRUE; +} + +void PropertyList::paintEmptyArea( TQPainter *p, const TQRect &r ) +{ + p->fillRect( r, *backColor2 ); +} + +void PropertyList::setCurrentItem( TQListViewItem *i ) +{ + if ( !i ) + return; + + if ( currentItem() ) + ( (PropertyItem*)currentItem() )->hideEditor(); + TQListView::setCurrentItem( i ); + ( (PropertyItem*)currentItem() )->showEditor(); +} + +void PropertyList::updateEditorSize() +{ + if ( currentItem() ) + ( ( PropertyItem* )currentItem() )->showEditor(); +} + +/*! This has to be called if the value if \a i should be set as + property to the currently edited widget. +*/ + +void PropertyList::valueChanged( PropertyItem *i ) +{ + if ( !editor->widget() ) + return; + TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), + editor->widget(), editor, + i->name(), WidgetFactory::property( editor->widget(), i->name() ), + i->value(), i->currentItem(), i->currentItemFromObject() ); + + cmd->execute(); + editor->formWindow()->commandHistory()->addCommand( cmd, TRUE ); +} + +void PropertyList::layoutInitValue( PropertyItem *i, bool changed ) +{ + if ( !editor->widget() ) + return; + TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), + editor->widget(), editor, + i->name(), WidgetFactory::property( editor->widget(), i->name() ), + i->value(), i->currentItem(), i->currentItemFromObject() ); + cmd->execute(); + if ( i->value().toString() != "-1" ) + changed = TRUE; + i->setChanged( changed ); +} + +void PropertyList::itemPressed( TQListViewItem *i, const TQPoint &p, int c ) +{ + if ( !i ) + return; + PropertyItem *pi = (PropertyItem*)i; + if ( !pi->hasSubItems() ) + return; + + if ( c == 0 && viewport()->mapFromGlobal( p ).x() < 20 ) + toggleOpen( i ); +} + +void PropertyList::toggleOpen( TQListViewItem *i ) +{ + if ( !i ) + return; + PropertyItem *pi = (PropertyItem*)i; + if ( pi->hasSubItems() ) { + pi->setOpen( !pi->isOpen() ); + } else { + pi->toggle(); + } +} + +bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) +{ + if ( !o || !e ) + return TRUE; + + PropertyItem *i = (PropertyItem*)currentItem(); + if ( e->type() == TQEvent::KeyPress ) + theLastEvent = KeyEvent; + else if ( e->type() == TQEvent::MouseButtonPress ) + theLastEvent = MouseEvent; + + if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) &&e->type() == TQEvent::KeyPress ) { + TQKeyEvent *ke = (TQKeyEvent*)e; + if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) && + ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(viewport()) ) && + !( ke->state() & ControlButton ) ) { + TQApplication::sendEvent( this, (TQKeyEvent*)e ); + return TRUE; + } else if ( ( !::tqqt_cast(o) || + ( ::tqqt_cast(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) && + i && i->hasSubItems() ) { + if ( !i->isOpen() && + ( ke->key() == Key_Plus || + ke->key() == Key_Right )) + i->setOpen( TRUE ); + else if ( i->isOpen() && + ( ke->key() == Key_Minus || + ke->key() == Key_Left ) ) + i->setOpen( FALSE ); + } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqqt_cast(o) ) { + TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 ); + TQApplication::sendEvent( o, &ke2 ); + return TRUE; + } + } else if ( e->type() == TQEvent::FocusOut && ::tqqt_cast(o) && editor->formWindow() ) { + TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) ); + } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) { + TQMouseEvent *me; + PropertyListItem* i; + switch ( e->type() ) { + case TQEvent::MouseButtonPress: + me = (TQMouseEvent*)e; + i = (PropertyListItem*) itemAt( me->pos() ); + if ( i && ( ::tqqt_cast(i) || ::tqqt_cast(i) ) ) { + pressItem = i; + pressPos = me->pos(); + mousePressed = TRUE; + } + break; + case TQEvent::MouseMove: + me = (TQMouseEvent*)e; + if ( me && me->state() & Qt::LeftButton && mousePressed) { + + i = (PropertyListItem*) itemAt( me->pos() ); + if ( i && i == pressItem ) { + + if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){ + if ( ::tqqt_cast(i) ) { + TQColor col = i->value().asColor(); + TQColorDrag *drg = new TQColorDrag( col, this ); + TQPixmap pix( 25, 25 ); + pix.fill( col ); + TQPainter p( &pix ); + p.drawRect( 0, 0, pix.width(), pix.height() ); + p.end(); + drg->setPixmap( pix ); + mousePressed = FALSE; + drg->dragCopy(); + } + else if ( ::tqqt_cast(i) ) { + TQPixmap pix = i->value().asPixmap(); + if( !pix.isNull() ) { + TQImage img = pix.convertToImage(); + TQImageDrag *drg = new TQImageDrag( img, this ); + drg->setPixmap( pix ); + mousePressed = FALSE; + drg->dragCopy(); + } + } + } + } + } + break; + default: + break; + } + } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) ) { + if ( e->type() == TQEvent::ContextMenu ) { + ((TQContextMenuEvent *)e)->accept(); + TQPopupMenu menu( 0 ); + menu.setCheckable( TRUE ); + const int cat_id = 1; + const int alpha_id = 2; + menu.insertItem( i18n( "Sort &Categorized" ), cat_id ); + int alpha = menu.insertItem( i18n( "Sort &Alphabetically" ), alpha_id ); + if ( showSorted ) + menu.setItemChecked( alpha_id, TRUE ); + else + menu.setItemChecked( cat_id, TRUE ); + int res = menu.exec( ( (TQContextMenuEvent*)e )->globalPos() ); + if ( res != -1 ) { + bool newShowSorted = ( res == alpha ); + if ( showSorted != newShowSorted ) { + showSorted = newShowSorted; + editor->clear(); + editor->setup(); + } + } + return TRUE; + } + } + + return TQListView::eventFilter( o, e ); +} + +/*! This method re-initializes each item of the property list. +*/ + +void PropertyList::refetchData() +{ + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + PropertyItem *i = (PropertyItem*)it.current(); + if ( !i->propertyParent() ) + setPropertyValue( i ); + if ( i->hasSubItems() ) + i->initChildren(); + bool changed = MetaDataBase::isPropertyChanged( editor->widget(), i->name() ); + if ( ( i->name() == "layoutSpacing" || i->name() == "layoutMargin" ) ) { + if ( i->value().toString() != "-1" ) + i->setChanged( TRUE, FALSE ); + else + i->setChanged( FALSE, FALSE ); + } + else if ( changed != i->isChanged() ) + i->setChanged( changed, FALSE ); + } + updateEditorSize(); +} + +static void clearAlignList( TQStrList &l ) +{ + if ( l.count() == 1 ) + return; + if ( l.find( "AlignAuto" ) != -1 ) + l.remove( "AlignAuto" ); + if ( l.find( "WordBreak" ) != -1 ) + l.remove( "WordBreak" ); +} + +/*! This method initializes the value of the item \a i to the value + of the corresponding property. +*/ + +void PropertyList::setPropertyValue( PropertyItem *i ) +{ + const TQMetaProperty *p = + editor->widget()->metaObject()-> + property( editor->widget()->metaObject()->findProperty( i->name(), TRUE), TRUE ); + if ( !p ) { + if ( i->name() == "hAlign" ) { + int align = editor->widget()->property( "alignment" ).toInt(); + p = editor->widget()->metaObject()-> + property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + align &= ~AlignVertical_Mask; + TQStrList l = p->valueToKeys( align ); + clearAlignList( l ); + ( (PropertyListItem*)i )->setCurrentItem( l.last() ); + } else if ( i->name() == "vAlign" ) { + int align = editor->widget()->property( "alignment" ).toInt(); + p = editor->widget()->metaObject()-> + property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + align &= ~AlignHorizontal_Mask; + ( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() ); + } else if ( i->name() == "wordwrap" ) { + int align = editor->widget()->property( "alignment" ).toInt(); + if ( align & WordBreak ) + i->setValue( TQVariant( TRUE, 0 ) ); + else + i->setValue( TQVariant( FALSE, 0 ) ); + } else if ( i->name() == "layoutSpacing" ) { + ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); + } else if ( i->name() == "layoutMargin" ) { + ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); + } else if ( i->name() == "resizeMode" ) { + ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) )) ); + } else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) { + i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); + } else if ( editor->widget()->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)editor->widget() )->customWidget(); + if ( !cw ) + return; + i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); + } + return; + } + if ( p->isSetType() ) + ( (PropertyEnumItem*)i )->setCurrentValues( p->valueToKeys( editor->widget()->property( i->name() ).toInt() ) ); + else if ( p->isEnumType() ) + ( (PropertyListItem*)i )->setCurrentItem( p->valueToKey( editor->widget()->property( i->name() ).toInt() ) ); + else if ( qstrcmp( p->name(), "buddy" ) == 0 ) + ( (PropertyListItem*)i )->setCurrentItem( editor->widget()->property( i->name() ).toString() ); + else + i->setValue( editor->widget()->property( i->name() ) ); +} + +void PropertyList::setCurrentProperty( const TQString &n ) +{ + if ( currentItem() && currentItem()->text( 0 ) == n || + currentItem() && ( (PropertyItem*)currentItem() )->propertyParent() && + ( (PropertyItem*)currentItem() )->propertyParent()->text( 0 ) == n ) + return; + + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + if ( it.current()->text( 0 ) == n ) { + setCurrentItem( it.current() ); + break; + } + } +} + +PropertyEditor *PropertyList::propertyEditor() const +{ + return editor; +} + +void PropertyList::resetProperty() +{ + if ( !currentItem() ) + return; + PropertyItem *i = (PropertyItem*)currentItem(); + if ( !MetaDataBase::isPropertyChanged( editor->widget(), i->PropertyItem::name() ) ) + return; + TQString pn( i18n( "Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), + editor->widget(), editor, + i->name(), i->value(), + WidgetFactory::defaultValue( editor->widget(), i->name() ), + WidgetFactory::defaultCurrentItem( editor->widget(), i->name() ), + i->currentItem(), TRUE ); + cmd->execute(); + editor->formWindow()->commandHistory()->addCommand( cmd, FALSE ); + if ( i->hasSubItems() ) + i->initChildren(); +} + +void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e ) +{ + PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); + if( !i ) { + e->ignore(); + return; + } + + if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) + e->accept(); + else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) + e->accept(); + else + e->ignore(); +} + +void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e ) +{ + PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); + if( !i ) { + e->ignore(); + return; + } + + if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) + e->accept(); + else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) + e->accept(); + else + e->ignore(); +} + +void PropertyList::viewportDropEvent ( TQDropEvent *e ) +{ + PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); + if( !i ) { + e->ignore(); + return; + } + + if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) { + TQColor color; + TQColorDrag::decode( e, color ); + i->setValue( TQVariant( color ) ); + valueChanged( i ); + e->accept(); + } + else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) { + TQImage img; + TQImageDrag::decode( e, img ); + TQPixmap pm; + pm.convertFromImage( img ); + i->setValue( TQVariant( pm ) ); + valueChanged( i ); + e->accept(); + } + else + e->ignore(); +} + +TQString PropertyList::whatsThisAt( const TQPoint &p ) +{ + return whatsThisText( itemAt( p ) ); +} + +void PropertyList::showCurrentWhatsThis() +{ + if ( !currentItem() ) + return; + TQPoint p( 0, currentItem()->itemPos() ); + p = viewport()->mapToGlobal( contentsToViewport( p ) ); + TQWhatsThis::display( whatsThisText( currentItem() ), p, viewport() ); +} + +TQString PropertyList::whatsThisText( TQListViewItem *i ) +{ + if ( !i || !editor->widget() ) + return TQString(); + readPropertyDocs(); + if ( ( (PropertyItem*)i )->propertyParent() ) + i = ( (PropertyItem*)i )->propertyParent(); + + const TQMetaObject *mo = editor->widget()->metaObject(); + TQString prop = ( (PropertyItem*)i )->name(); + while ( mo ) { + TQString s; + s = TQString( mo->className() ) + "::" + prop; + TQMap::Iterator it; + if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) { + return *it; + } + mo = mo->superClass(); + } + + return i18n( "

    TQWidget::%1

    There is no documentation available for this property.

    " ).arg( prop ); +} + +void PropertyList::readPropertyDocs() +{ + if ( !propertyDocs.isEmpty() ) + return; + + TQString docFile = MainWindow::self->documentationPath() + "/propertydocs"; + TQFile f( docFile ); + if ( !f.open( IO_ReadOnly ) ) + return; + TQDomDocument doc; + TQString errMsg; + int errLine; + if ( !doc.setContent( &f, &errMsg, &errLine ) ) + return; + TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); + + for ( ; !e.isNull(); e = e.nextSibling().toElement() ) { + TQDomElement n = e.firstChild().toElement(); + TQString name; + TQString doc; + for ( ; !n.isNull(); n = n.nextSibling().toElement() ) { + if ( n.tagName() == "name" ) + name = n.firstChild().toText().data(); + else if ( n.tagName() == "doc" ) + doc = n.firstChild().toText().data(); + } + doc.insert( 0, "

    " + name + "

    " ); + propertyDocs.insert( name, doc ); + } +} + +PropertyList::LastEventType PropertyList::lastEvent() +{ + return theLastEvent; +} +// ------------------------------------------------------------ + +EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e ) + : HierarchyList( parent, fw, TRUE ), editor( e ) +{ + header()->hide(); + removeColumn( 1 ); + setRootIsDecorated( TRUE ); + connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), + this, TQT_SLOT( renamed( TQListViewItem * ) ) ); +} + +TQString clean_arguments( const TQString &s ) +{ + TQString slot = s; + TQString arg = slot.mid( slot.find( '(' ) + 1 ); + arg = arg.left( arg.findRev( ')' ) ); + TQStringList args = TQStringList::split( ',', arg ); + slot = slot.left( slot.find( '(' ) + 1 ); + int num = 0; + for ( TQStringList::Iterator it = args.begin(); it != args.end(); ++it, ++num ) { + TQString a = *it; + int i; + if ( ( i =a.find( ':' ) ) == -1 ) + slot += a.simplifyWhiteSpace(); + else + slot += a.mid( i + 1 ).simplifyWhiteSpace(); + if ( num < (int)args.count() - 1 ) + slot += ","; + } + + slot += ")"; + + return slot; +} + + +void EventList::setup() +{ + clear(); + + if ( !formWindow ) + return; + LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() ); + const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()); + TQStrList sigs; + if ( iface ) + { + sigs = iface->signalNames( editor->widget() ); + } + TQStrListIterator it( sigs ); + while ( it.current() ) { + HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (HierarchyItem*)0, + it.current(), TQString(), TQString() ); + eventItem->setOpen( TRUE ); + TQValueList conns = + MetaDataBase::connections( TQT_TQOBJECT(formWindow), TQT_TQOBJECT(editor->widget()), TQT_TQOBJECT(formWindow->mainContainer()) ); + HierarchyItem *item = 0; + for ( TQValueList::Iterator cit = conns.begin(); + cit != conns.end(); ++cit ) { + TQString s = it.current(); + if ( MetaDataBase::normalizeFunction( clean_arguments( TQString( (*cit).signal ) ) ) != + MetaDataBase::normalizeFunction( clean_arguments( s ) ) ) + continue; + item = new HierarchyItem( HierarchyItem::EventFunction, eventItem, item, + (*cit).slot, TQString(), TQString() ); + item->setPixmap( 0, DesignerEditSlotsPix ); + } + ++it; + } +} + +extern TQListViewItem *newItem; + +void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) +{ + TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) ); + if ( !i || i->parent() ) + return; + TQString s; + if ( !formWindow->project()->isCpp() ) { + TQString s1 = i->text( 0 ); + int pt = s1.find( "(" ); + if ( pt != -1 ) + s1 = s1.left( pt ); + s = TQString( editor->widget()->name() ) + "_" + s1; + } else { + s = TQString( editor->widget()->name() ) + "_" + i->text( 0 ); + } + + const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()); + insertEntry( i, DesignerEditSlotsPix , s ); +} + +void EventList::setCurrent( TQWidget * ) +{ +} + +void EventList::objectClicked( TQListViewItem *i ) +{ + if ( !i || !i->parent() ) + return; +// formWindow->clearSelection(false); + formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); +// formWindow->mainWindow()->editFunction( i->text( 0 ) ); +} + +void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) +{ + if ( !i ) + return; + TQPopupMenu menu; + const int NEW_ITEM = 1; + const int DEL_ITEM = 2; + menu.insertItem( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()), i18n( "New Signal Handler" ), NEW_ITEM ); + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), i18n( "Delete Signal Handler" ), DEL_ITEM ); + int res = menu.exec( pos ); + if ( res == NEW_ITEM ) { + TQString s; + if ( !formWindow->project()->isCpp() ) { + TQString s1 = ( i->parent() ? i->parent() : i )->text( 0 ); + int pt = s1.find( "(" ); + if ( pt != -1 ) + s1 = s1.left( pt ); + s = TQString( editor->widget()->name() ) + "_" + s1; + } else { + s = TQString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 ); + } + insertEntry( i->parent() ? i->parent() : i, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), s ); + } else if ( res == DEL_ITEM && i->parent() ) { + MetaDataBase::Connection conn; + conn.sender = editor->widget(); + conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); + conn.signal = i->parent()->text( 0 ); + conn.slot = i->text( 0 ); + delete i; + RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Connection" ), + formWindow, + conn ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + } +} + +void EventList::renamed( TQListViewItem *i ) +{ + if ( newItem == i ) + newItem = 0; + if ( !i->parent() ) + return; + TQListViewItem *itm = i->parent()->firstChild(); + bool del = FALSE; + while ( itm ) { + if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) { + del = TRUE; + break; + } + itm = itm->nextSibling(); + } + i->setRenameEnabled( 0, FALSE ); + if ( del ) { + delete i; + } else { + MetaDataBase::Connection conn; + conn.sender = editor->widget(); + conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); + conn.signal = i->parent()->text( 0 ); + conn.slot = i->text( 0 ); + AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Connection" ), + formWindow, + conn ); + formWindow->commandHistory()->addCommand( cmd ); + // #### we should look if the specified slot already + // exists and if we can connect to this one + TQString funcname = i->text( 0 ).latin1(); + if ( funcname.find( '(' ) == -1 ) { // try to create a signature + TQString sig = i->parent()->text( 0 ); + sig = sig.mid( sig.find( '(' ) + 1 ); + sig.remove( (int)sig.length() - 1, 1 ); + LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() ); + if ( iface ) + sig = iface->createArguments( sig.simplifyWhiteSpace() ); + funcname += "(" + sig + ")"; + } + + //normally add a function in kdevdesigner + AddFunctionCommand *cmd2 = new AddFunctionCommand( i18n( "Add Function" ), + formWindow, funcname.latin1(), "virtual", + "public", + "slot", formWindow->project()->language(), + "void" ); + +/* MetaDataBase::addFunction( formWindow, funcname.latin1(), "virtual", "public", + "slot", formWindow->project()->language(), "void" ); + editor->formWindow()->mainWindow()-> + editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), TRUE );*/ + cmd->execute(); + cmd2->execute(); + editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + editor->formWindow()->formFile()->setModified( TRUE ); + } +} + +void EventList::save( TQListViewItem *p ) +{ + TQStringList lst; + TQListViewItem *i = p->firstChild(); + while ( i ) { + lst << i->text( 0 ); + i = i->nextSibling(); + } +} + +// -------------------------------------------------------------- + +/*! + \class PropertyEditor propertyeditor.h + \brief PropertyEdior toplevel window + + This is the toplevel window of the property editor which contains a + listview for editing properties. +*/ + +PropertyEditor::PropertyEditor( TQWidget *parent ) + : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | + WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu ) +{ + setCaption( i18n( "Property Editor" ) ); + wid = 0; + formwindow = 0; + listview = new PropertyList( this ); + addTab( listview, i18n( "P&roperties" ) ); + eList = new EventList( this, formWindow(), this ); + addTab( eList, i18n( "Signa&l Handlers" ) ); +} + +TQObject *PropertyEditor::widget() const +{ + return wid; +} + +void PropertyEditor::setWidget( TQObject *w, FormWindow *fw ) +{ + if ( fw && fw->isFake() ) + w = fw->project()->objectForFakeForm( fw ); + eList->setFormWindow( fw ); + if ( w && w == wid ) { + // if there is no properties displayed then we really should show them. + // to do this check the number of properties in the list. + bool ret = (listview->childCount() > 0) ? TRUE : FALSE; + if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) { + TQListViewItemIterator it( listview ); + ret = FALSE; + while ( it.current() ) { + if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) { + ret = TRUE; + break; + } + ++it; + } + } + if ( ret ) + return; + } + + if ( !w || !fw ) { + setCaption( i18n( "Property Editor" ) ); + clear(); + wid = 0; + formwindow = 0; + return; + } + + wid = w; + formwindow = fw; + setCaption( i18n( "Property Editor (%1)" ).arg( formwindow->name() ) ); + listview->viewport()->setUpdatesEnabled( FALSE ); + listview->setUpdatesEnabled( FALSE ); + clear(); + listview->viewport()->setUpdatesEnabled( TRUE ); + listview->setUpdatesEnabled( TRUE ); + setup(); +} + +void PropertyEditor::clear() +{ + listview->setContentsPos( 0, 0 ); + listview->clear(); + eList->setContentsPos( 0, 0 ); + eList->clear(); +} + +void PropertyEditor::setup() +{ + if ( !formwindow || !wid ) + return; + listview->viewport()->setUpdatesEnabled( FALSE ); + listview->setupProperties(); + listview->viewport()->setUpdatesEnabled( TRUE ); + listview->updateEditorSize(); + + if ( !wid->isA( "PropertyObject" ) ) { + eList->viewport()->setUpdatesEnabled( FALSE ); + eList->setup(); + eList->viewport()->setUpdatesEnabled( TRUE ); + } +} + +void PropertyEditor::refetchData() +{ + listview->refetchData(); +} + +void PropertyEditor::emitWidgetChanged() +{ + if ( formwindow && wid ) + formwindow->widgetChanged( wid ); +} + +void PropertyEditor::closed( FormWindow *w ) +{ + if ( w == formwindow ) { + formwindow = 0; + wid = 0; + clear(); + } +} + +void PropertyEditor::closeEvent( TQCloseEvent *e ) +{ + emit hidden(); + e->accept(); +} + +PropertyList *PropertyEditor::propertyList() const +{ + return listview; +} + +FormWindow *PropertyEditor::formWindow() const +{ + return formwindow; +} + +TQString PropertyEditor::currentProperty() const +{ + if ( !wid ) + return TQString(); + if ( ( (PropertyItem*)listview->currentItem() )->propertyParent() ) + return ( (PropertyItem*)listview->currentItem() )->propertyParent()->name(); + return ( (PropertyItem*)listview->currentItem() )->name(); +} + +TQString PropertyEditor::classOfCurrentProperty() const +{ + if ( !wid ) + return TQString(); + TQObject *o = wid; + TQString curr = currentProperty(); + TQMetaObject *mo = o->metaObject(); + while ( mo ) { + TQStrList props = mo->propertyNames( FALSE ); + if ( props.find( curr.latin1() ) != -1 ) + return mo->className(); + mo = mo->superClass(); + } + return TQString(); +} + +TQMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const +{ + if ( !wid ) + return 0; + return wid->metaObject(); +} + +void PropertyEditor::resetFocus() +{ + if ( listview->currentItem() ) + ( (PropertyItem*)listview->currentItem() )->showEditor(); +} + +EventList *PropertyEditor::eventList() const +{ + return eList; +} + +void PropertyEditor::setPropertyEditorEnabled( bool b ) +{ + if ( !b ) + removePage( listview ); + else + insertTab( listview, i18n( "Property Editor" ), 0 ); + updateWindow(); +} + +void PropertyEditor::setSignalHandlersEnabled( bool b ) +{ + if ( !b ) + removePage( eList ); + else + insertTab( eList, i18n( "Signal Handlers" ), 0 ); + updateWindow(); +} + +void PropertyEditor::updateWindow() +{ + if ( isHidden() && count() ) { + parentWidget()->show(); + MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), TRUE ); + } else if ( isShown() && !count() ) { + parentWidget()->hide(); + MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), FALSE ); + } +} diff --git a/kdevdesigner/designer/propertyeditor.h b/kdevdesigner/designer/propertyeditor.h new file mode 100644 index 00000000..7b7eccd8 --- /dev/null +++ b/kdevdesigner/designer/propertyeditor.h @@ -0,0 +1,891 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PROPERTYEDITOR_H +#define PROPERTYEDITOR_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "hierarchyview.h" +#include "metadatabase.h" + +class PropertyList; +class PropertyEditor; +class TQPainter; +class TQColorGroup; +class TQLineEdit; +class TQPushButton; +class TQHBox; +class TQSpinBox; +class TQLabel; +class TQFrame; +class FormWindow; +class TQCloseEvent; +class TQResizeEvent; +class PropertyWhatsThis; +class TQDateEdit; +class TQTimeEdit; +class TQDateTimeEdit; + +class PropertyItem : public TQListViewItem +{ +public: + PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); + ~PropertyItem(); + + void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); + void paintBranches( TQPainter * p, const TQColorGroup & cg, + int w, int y, int h ); + void paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); + + virtual bool hasSubItems() const; + virtual void createChildren(); + virtual void initChildren(); + + bool isOpen() const; + void setOpen( bool b ); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + TQVariant value() const; + TQString name() const; + virtual void notifyValueChange(); + + virtual void setChanged( bool b, bool updateDb = TRUE ); + bool isChanged() const; + + virtual void placeEditor( TQWidget *w ); + + virtual PropertyItem *propertyParent() const; + virtual void childValueChanged( PropertyItem *child ); + + void addChild( PropertyItem *i ); + int childCount() const; + PropertyItem *child( int i ) const; + + virtual bool hasCustomContents() const; + virtual void drawCustomContents( TQPainter *p, const TQRect &r ); + + void updateBackColor(); + + void setup() { TQListViewItem::setup(); setHeight( TQListViewItem::height() + 2 ); } + + virtual TQString currentItem() const; + virtual int currentIntItem() const; + virtual void setCurrentItem( const TQString &s ); + virtual void setCurrentItem( int i ); + virtual int currentIntItemFromObject() const; + virtual TQString currentItemFromObject() const; + + void setFocus( TQWidget *w ); + + virtual void toggle(); + void setText( int col, const TQString &txt ); + +protected: + PropertyList *listview; + TQVariant val; + +private: + TQColor backgroundColor(); + void createResetButton(); + void updateResetButtonState(); + +private: + bool open, changed; + PropertyItem *property; + TQString propertyName; + TQPtrList children; + TQColor backColor; + TQPushButton *resetButton; + +}; + +class PropertyTextItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool comment, bool multiLine, bool ascii = FALSE, bool a = FALSE ); + ~PropertyTextItem(); + + virtual void createChildren(); + virtual void initChildren(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + virtual bool hasSubItems() const; + virtual void childValueChanged( PropertyItem *child ); + + virtual void setChanged( bool b, bool updateDb = TRUE ); + +private slots: + void setValue(); + void getText(); + +private: + TQLineEdit *lined(); + TQGuardedPtr lin; + TQGuardedPtr box; + TQPushButton *button; + bool withComment, hasMultiLines, asciiOnly, accel; + +}; + + +class PropertyBoolItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); + ~PropertyBoolItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + virtual void toggle(); + +private slots: + void setValue(); + +private: + TQComboBox *combo(); + TQGuardedPtr comb; + +}; + +class PropertyIntItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool s ); + ~PropertyIntItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + +private slots: + void setValue(); + +private: + TQSpinBox *spinBox(); + TQGuardedPtr spinBx; + bool signedValue; + +}; + +class PropertyLayoutItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyLayoutItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ); + ~PropertyLayoutItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + +private slots: + void setValue(); + +private: + TQSpinBox *spinBox(); + TQGuardedPtr spinBx; + +}; + +class PropertyDoubleItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ); + ~PropertyDoubleItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + +private slots: + void setValue(); + +private: + TQLineEdit *lined(); + TQGuardedPtr lin; +}; + +class PropertyListItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool editable ); + ~PropertyListItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + + TQString currentItem() const; + int currentIntItem() const; + void setCurrentItem( const TQString &s ); + void setCurrentItem( int i ); + int currentIntItemFromObject() const; + TQString currentItemFromObject() const; + void addItem( const TQString &s ); + +private slots: + void setValue(); + +private: + TQComboBox *combo(); + TQGuardedPtr comb; + int oldInt; + bool editable; + TQString oldString; + +}; + +class PropertyFontItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); + ~PropertyFontItem(); + + virtual void createChildren(); + virtual void initChildren(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + virtual bool hasSubItems() const; + virtual void childValueChanged( PropertyItem *child ); + +private slots: + void getFont(); + +private: + TQGuardedPtr lined; + TQGuardedPtr button; + TQGuardedPtr box; + +}; + +class PropertyCoordItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + enum Type { Rect, Size, Point }; + + PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, Type t ); + ~PropertyCoordItem(); + + virtual void createChildren(); + virtual void initChildren(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + virtual bool hasSubItems() const; + virtual void childValueChanged( PropertyItem *child ); + +private: + TQLineEdit *lined(); + TQGuardedPtr lin; + Type typ; + +}; + +class PropertyColorItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool children ); + ~PropertyColorItem(); + + virtual void createChildren(); + virtual void initChildren(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + virtual bool hasSubItems() const; + virtual void childValueChanged( PropertyItem *child ); + + virtual bool hasCustomContents() const; + virtual void drawCustomContents( TQPainter *p, const TQRect &r ); + +private slots: + void getColor(); + +private: + TQGuardedPtr box; + TQGuardedPtr colorPrev; + TQGuardedPtr button; + bool withChildren; + +}; + +class PropertyPixmapItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + enum Type { Pixmap, IconSet, Image }; + + PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, Type t ); + ~PropertyPixmapItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + + virtual bool hasCustomContents() const; + virtual void drawCustomContents( TQPainter *p, const TQRect &r ); + +private slots: + void getPixmap(); + +private: + TQGuardedPtr box; + TQGuardedPtr pixPrev; + TQPushButton *button; + Type type; + +}; + + +class PropertySizePolicyItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ); + ~PropertySizePolicyItem(); + + virtual void createChildren(); + virtual void initChildren(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + virtual bool hasSubItems() const; + virtual void childValueChanged( PropertyItem *child ); + +private: + TQLineEdit *lined(); + TQGuardedPtr lin; + +}; + +class PropertyPaletteItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ); + ~PropertyPaletteItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + + virtual bool hasCustomContents() const; + virtual void drawCustomContents( TQPainter *p, const TQRect &r ); + +private slots: + void getPalette(); + +private: + TQGuardedPtr box; + TQGuardedPtr palettePrev; + TQGuardedPtr button; + +}; + +class PropertyCursorItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ); + ~PropertyCursorItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + +private slots: + void setValue(); + +private: + TQComboBox *combo(); + TQGuardedPtr comb; + +}; + +class PropertyKeysequenceItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyKeysequenceItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ); + ~PropertyKeysequenceItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + +private slots: + void setValue(); + +private: + bool eventFilter( TQObject *o, TQEvent *e ); + void handleKeyEvent( TQKeyEvent *e ); + int translateModifiers( int state ); + + TQGuardedPtr sequence; + TQGuardedPtr box; + int k1,k2,k3,k4; + int num; + bool mouseEnter; +}; + +class PropertyDatabaseItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName, bool wField ); + ~PropertyDatabaseItem(); + + virtual void createChildren(); + virtual void initChildren(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + virtual bool hasSubItems() const; + virtual void childValueChanged( PropertyItem *child ); + +private: + TQGuardedPtr lined; + TQGuardedPtr button; + TQGuardedPtr box; + bool withField; + +}; + +struct EnumItem { + EnumItem( const TQString &k, bool s ) + : key( k ), selected( s ) {} + EnumItem() : key( TQString() ), selected( FALSE ) {} + bool operator==( const EnumItem &item ) const { + return key == item.key; + } + TQString key; + bool selected; +}; + +class EnumPopup : public TQFrame +{ + Q_OBJECT + + +public: + EnumPopup( TQWidget *parent, const char *name, WFlags f=0 ); + ~EnumPopup(); + void insertEnums( TQValueList lst ); + TQValueList enumList() const; + void closeWidget(); + +signals: + void closed(); + void hidden(); + +protected: + void keyPressEvent( TQKeyEvent *e ); + +private: + TQValueList itemList; + TQPtrList checkBoxList; + TQVBoxLayout *popLayout; +}; + +class EnumBox : public TQComboBox +{ + Q_OBJECT + + +public: + EnumBox( TQWidget *parent, const char *name = 0 ); + ~EnumBox() {} + void setText( const TQString &text ); + void insertEnums( TQValueList lst ); + TQValueList enumList() const; + +signals: + void aboutToShowPopup(); + void valueChanged(); + +protected: + void paintEvent( TQPaintEvent * ); + void mousePressEvent( TQMouseEvent *e ); + void keyPressEvent( TQKeyEvent *e ); + +protected slots: + void restoreArrow(); + void popupHidden(); + void popupClosed(); + +private: + void popup(); + bool arrowDown; + TQString str; + bool popupShown; + EnumPopup *pop; + +}; +class PropertyEnumItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyEnumItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ); + ~PropertyEnumItem(); + + void showEditor(); + void hideEditor(); + void setValue( const TQVariant &v ); + TQString currentItem() const; + TQString currentItemFromObject() const; + void setCurrentValues( TQStrList lst ); + +private slots: + void setValue(); + void insertEnums(); + +private: + TQGuardedPtr box; + TQValueList enumList; + TQString enumString; +}; + +class PropertyList : public TQListView +{ + Q_OBJECT + + +public: + PropertyList( PropertyEditor *e ); + + virtual void setupProperties(); + + virtual void setCurrentItem( TQListViewItem *i ); + virtual void valueChanged( PropertyItem *i ); + virtual void refetchData(); + virtual void setPropertyValue( PropertyItem *i ); + virtual void setCurrentProperty( const TQString &n ); + + void layoutInitValue( PropertyItem *i, bool changed = FALSE ); + PropertyEditor *propertyEditor() const; + TQString whatsThisAt( const TQPoint &p ); + void showCurrentWhatsThis(); + + enum LastEventType { KeyEvent, MouseEvent }; + LastEventType lastEvent(); + +public slots: + void updateEditorSize(); + void resetProperty(); + void toggleSort(); + +private slots: + void itemPressed( TQListViewItem *i, const TQPoint &p, int c ); + void toggleOpen( TQListViewItem *i ); + bool eventFilter( TQObject *o, TQEvent *e ); + +protected: + void resizeEvent( TQResizeEvent *e ); + void paintEmptyArea( TQPainter *p, const TQRect &r ); + bool addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t ); + + void viewportDragEnterEvent( TQDragEnterEvent * ); + void viewportDragMoveEvent ( TQDragMoveEvent * ); + void viewportDropEvent ( TQDropEvent * ); + +protected: + PropertyEditor *editor; + +private: + void readPropertyDocs(); + void setupCusWidgetProperties( MetaDataBase::CustomWidget *cw, + TQMap &unique, + PropertyItem *&item ); + TQString whatsThisText( TQListViewItem *i ); + +private: + PropertyListItem* pressItem; + TQPoint pressPos; + bool mousePressed; + bool showSorted; + TQMap propertyDocs; + PropertyWhatsThis *whatsThis; + LastEventType theLastEvent; +}; + +class EventList : public HierarchyList +{ + Q_OBJECT + + +public: + EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e ); + + void setup(); + void setCurrent( TQWidget *w ); + +protected: + void contentsMouseDoubleClickEvent( TQMouseEvent *e ); + +private: + void save( TQListViewItem *p ); + +private slots: + void objectClicked( TQListViewItem *i ); + void showRMBMenu( TQListViewItem *, const TQPoint & ); + void renamed( TQListViewItem *i ); + +private: + PropertyEditor *editor; + +}; + + +class PropertyEditor : public TQTabWidget +{ + Q_OBJECT + + +public: + PropertyEditor( TQWidget *parent ); + + TQObject *widget() const; + + void clear(); + void setup(); + + void emitWidgetChanged(); + void refetchData(); + + void closed( FormWindow *w ); + + PropertyList *propertyList() const; + FormWindow *formWindow() const; + EventList *eventList() const; + + TQString currentProperty() const; + TQString classOfCurrentProperty() const; + TQMetaObject* metaObjectOfCurrentProperty() const; + + void resetFocus(); + + void setPropertyEditorEnabled( bool b ); + void setSignalHandlersEnabled( bool b ); + +signals: + void hidden(); + +public slots: + void setWidget( TQObject *w, FormWindow *fw ); + +protected: + void closeEvent( TQCloseEvent *e ); + +private: + void updateWindow(); + +private: + TQObject *wid; + PropertyList *listview; + EventList *eList; + FormWindow *formwindow; + +}; + +class PropertyDateItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); + ~PropertyDateItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + +private slots: + void setValue(); + +private: + TQDateEdit *lined(); + TQGuardedPtr lin; + +}; + +class PropertyTimeItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); + ~PropertyTimeItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + +private slots: + void setValue(); + +private: + TQTimeEdit *lined(); + TQGuardedPtr lin; + +}; + +class PropertyDateTimeItem : public TQObject, + public PropertyItem +{ + Q_OBJECT + + +public: + PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); + ~PropertyDateTimeItem(); + + virtual void showEditor(); + virtual void hideEditor(); + + virtual void setValue( const TQVariant &v ); + +private slots: + void setValue(); + +private: + TQDateTimeEdit *lined(); + TQGuardedPtr lin; + +}; + +#endif diff --git a/kdevdesigner/designer/propertyobject.cpp b/kdevdesigner/designer/propertyobject.cpp new file mode 100644 index 00000000..1bd1883f --- /dev/null +++ b/kdevdesigner/designer/propertyobject.cpp @@ -0,0 +1,158 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "propertyobject.h" +#include "metadatabase.h" +#include +#include +#include +#include + +PropertyObject::PropertyObject( const TQWidgetList &objs ) + : TQObject(), objects( objs ), mobj( 0 ) +{ + TQPtrVector > v; + v.resize( objects.count() ); + v.setAutoDelete( TRUE ); + + for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { + const TQMetaObject *m = o->metaObject(); + TQPtrList *mol = new TQPtrList; + while ( m ) { + mol->insert( 0, m ); + m = m->superClass(); + } + v.insert( v.count(), mol ); + } + + int numObjects = objects.count(); + int minDepth = v[0]->count(); + int depth = minDepth; + + for ( int i = 0; i < numObjects; ++i ) { + depth = (int)v[i]->count(); + if ( depth < minDepth ) + minDepth = depth; + } + + const TQMetaObject *m = v[0]->at( --minDepth ); + + for ( int j = 0; j < numObjects; ++j ) { + if ( v[j]->at( minDepth ) != m ) { + m = v[0]->at( --minDepth ); + j = 0; + } + } + + mobj = m; + + Q_ASSERT( mobj ); +} + +bool PropertyObject::setProperty( const char *name, const TQVariant& value ) +{ + for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + o->setProperty( name, value ); + + return TRUE; +} + +TQVariant PropertyObject::property( const char *name ) const +{ + return ( (PropertyObject*)this )->objects.first()->property( name ); +} + +void PropertyObject::mdPropertyChanged( const TQString &property, bool changed ) +{ + for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + MetaDataBase::setPropertyChanged( o, property, changed ); +} + +bool PropertyObject::mdIsPropertyChanged( const TQString &property ) +{ + for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { + if ( MetaDataBase::isPropertyChanged( o, property ) ) + return TRUE; + } + return FALSE; +} + +void PropertyObject::mdSetPropertyComment( const TQString &property, const TQString &comment ) +{ + for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + MetaDataBase::setPropertyComment( o, property, comment ); +} + +TQString PropertyObject::mdPropertyComment( const TQString &property ) +{ + return MetaDataBase::propertyComment( TQT_TQOBJECT(objects.first()), property ); +} + +void PropertyObject::mdSetFakeProperty( const TQString &property, const TQVariant &value ) +{ + for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + MetaDataBase::setFakeProperty( o, property, value ); +} + +TQVariant PropertyObject::mdFakeProperty( const TQString &property ) +{ + return MetaDataBase::fakeProperty( TQT_TQOBJECT(objects.first()), property ); +} + +void PropertyObject::mdSetCursor( const TQCursor &c ) +{ + for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { + if ( o->isWidgetType() ) + MetaDataBase::setCursor( (TQWidget*)o, c ); + } +} + +TQCursor PropertyObject::mdCursor() +{ + return MetaDataBase::cursor( objects.first() ); +} + +void PropertyObject::mdSetPixmapKey( int pixmap, const TQString &arg ) +{ + for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + MetaDataBase::setPixmapKey( o, pixmap, arg ); +} + +TQString PropertyObject::mdPixmapKey( int pixmap ) +{ + return MetaDataBase::pixmapKey( TQT_TQOBJECT(objects.first()), pixmap ); +} + +void PropertyObject::mdSetExportMacro( const TQString ¯o ) +{ + for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + MetaDataBase::setExportMacro( o, macro ); +} + +TQString PropertyObject::mdExportMacro() +{ + return MetaDataBase::exportMacro( TQT_TQOBJECT(objects.first()) ); +} diff --git a/kdevdesigner/designer/propertyobject.h b/kdevdesigner/designer/propertyobject.h new file mode 100644 index 00000000..2590399a --- /dev/null +++ b/kdevdesigner/designer/propertyobject.h @@ -0,0 +1,43 @@ +#ifndef PROPERTYOBJECT_H +#define PROPERTYOBJECT_H + +#include +#include +#include + +class PropertyObject : public TQObject +{ +public: + TQMetaObject *metaObject() const { return (TQMetaObject*)mobj; } + const char *className() const { return "PropertyObject"; } + TQObject* qObject() { return (TQObject*)this; } +private: + static TQMetaObject *metaObj; + +public: + PropertyObject( const TQWidgetList &objs ); + + bool setProperty( const char *name, const TQVariant& value ); + TQVariant property( const char *name ) const; + + void mdPropertyChanged( const TQString &property, bool changed ); + bool mdIsPropertyChanged( const TQString &property ); + void mdSetPropertyComment( const TQString &property, const TQString &comment ); + TQString mdPropertyComment( const TQString &property ); + void mdSetFakeProperty( const TQString &property, const TQVariant &value ); + TQVariant mdFakeProperty( const TQString &property ); + void mdSetCursor( const TQCursor &c ); + TQCursor mdCursor(); + void mdSetPixmapKey( int pixmap, const TQString &arg ); + TQString mdPixmapKey( int pixmap ); + void mdSetExportMacro( const TQString ¯o ); + TQString mdExportMacro(); + TQWidgetList widgetList() const { return objects; } + +private: + TQWidgetList objects; + const TQMetaObject *mobj; + +}; + +#endif diff --git a/kdevdesigner/designer/qcompletionedit.cpp b/kdevdesigner/designer/qcompletionedit.cpp new file mode 100644 index 00000000..ed0c986e --- /dev/null +++ b/kdevdesigner/designer/qcompletionedit.cpp @@ -0,0 +1,210 @@ +/********************************************************************** +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qcompletionedit.h" +#include +#include +#include +#include + +QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name ) + : TQLineEdit( parent, name ), aAdd( FALSE ), caseSensitive( FALSE ) +{ + popup = new TQVBox( 0, 0, WType_Popup ); + popup->setFrameStyle( TQFrame::Box | TQFrame::Plain ); + popup->setLineWidth( 1 ); + popup->hide(); + + listbox = new TQListBox( popup ); + listbox->setFrameStyle( TQFrame::NoFrame ); + listbox->setLineWidth( 1 ); + listbox->installEventFilter( this ); + listbox->setHScrollBarMode( TQScrollView::AlwaysOn ); + listbox->setVScrollBarMode( TQScrollView::AlwaysOn ); + listbox->setCornerWidget( new TQSizeGrip( listbox, "completion sizegrip" ) ); + connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( textDidChange( const TQString & ) ) ); + popup->setFocusProxy( listbox ); + installEventFilter( this ); +} + +bool QCompletionEdit::autoAdd() const +{ + return aAdd; +} + +TQStringList QCompletionEdit::completionList() const +{ + return compList; +} + +void QCompletionEdit::setCompletionList( const TQStringList &l ) +{ + compList = l; +} + +void QCompletionEdit::setAutoAdd( bool add ) +{ + aAdd = add; +} + +void QCompletionEdit::textDidChange( const TQString &text ) +{ + if ( text.isEmpty() ) { + popup->close(); + return; + } + updateListBox(); + placeListBox(); +} + +void QCompletionEdit::placeListBox() +{ + if ( listbox->count() == 0 ) { + popup->close(); + return; + } + + popup->resize( TQMAX( listbox->sizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ), + listbox->sizeHint().height() + listbox->horizontalScrollBar()->height() + 4 ); + + TQPoint p( mapToGlobal( TQPoint( 0, 0 ) ) ); + if ( p.y() + height() + popup->height() <= TQApplication::desktop()->height() ) + popup->move( p.x(), p.y() + height() ); + else + popup->move( p.x(), p.y() - listbox->height() ); + popup->show(); + listbox->setCurrentItem( 0 ); + listbox->setSelected( 0, TRUE ); + setFocus(); +} + +void QCompletionEdit::updateListBox() +{ + listbox->clear(); + if ( compList.isEmpty() ) + return; + for ( TQStringList::Iterator it = compList.begin(); it != compList.end(); ++it ) { + if ( caseSensitive && (*it).left( text().length() ) == text() || + !caseSensitive && (*it).left( text().length() ).lower() == text().lower() ) + listbox->insertItem( *it ); + } +} + +bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) +{ + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(popup) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox->viewport()) ) { + if ( e->type() == TQEvent::KeyPress ) { + TQKeyEvent *ke = (TQKeyEvent*)e; + if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) { + if ( ke->key() == Key_Tab && listbox->count() > 1 && + listbox->currentItem() < (int)listbox->count() - 1 ) { + listbox->setCurrentItem( listbox->currentItem() + 1 ); + return TRUE; + } + popup->close(); + setFocus(); + blockSignals( TRUE ); + setText( listbox->currentText() ); + blockSignals( FALSE ); + emit chosen( text() ); + return TRUE; + } else if ( ke->key() == Key_Left || ke->key() == Key_Right || + ke->key() == Key_Up || ke->key() == Key_Down || + ke->key() == Key_Home || ke->key() == Key_End || + ke->key() == Key_Prior || ke->key() == Key_Next ) { + return FALSE; + } else if ( ke->key() == Key_Escape ) { + popup->close(); + setFocus(); + } else if ( ke->key() != Key_Shift && ke->key() != Key_Control && + ke->key() != Key_Alt ) { + updateListBox(); + if ( listbox->count() == 0 || text().length() == 0 ) { + popup->close(); + setFocus(); + } + TQApplication::sendEvent( this, e ); + return TRUE; + } + } else if ( e->type() == TQEvent::MouseButtonDblClick ) { + popup->close(); + setFocus(); + blockSignals( TRUE ); + setText( listbox->currentText() ); + blockSignals( FALSE ); + emit chosen( text() ); + return TRUE; + } + } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) { + if ( e->type() == TQEvent::KeyPress ) { + TQKeyEvent *ke = (TQKeyEvent*)e; + if ( ke->key() == Key_Up || + ke->key() == Key_Down || + ke->key() == Key_Prior || + ke->key() == Key_Next || + ke->key() == Key_Return || + ke->key() == Key_Enter || + ke->key() == Key_Tab || + ke->key() == Key_Escape ) { + TQApplication::sendEvent( listbox, e ); + return TRUE; + } + } + } + return TQLineEdit::eventFilter( o, e ); +} + +void QCompletionEdit::addCompletionEntry( const TQString &entry ) +{ + if ( compList.find( entry ) == compList.end() ) { + compList << entry; + compList.sort(); + } +} + +void QCompletionEdit::removeCompletionEntry( const TQString &entry ) +{ + TQStringList::Iterator it = compList.find( entry ); + if ( it != compList.end() ) + compList.remove( it ); +} + +void QCompletionEdit::setCaseSensitive( bool b ) +{ + caseSensitive = b; +} + +bool QCompletionEdit::isCaseSensitive() const +{ + return caseSensitive; +} + +void QCompletionEdit::clear() +{ + TQLineEdit::clear(); + compList.clear(); +} diff --git a/kdevdesigner/designer/qcompletionedit.h b/kdevdesigner/designer/qcompletionedit.h new file mode 100644 index 00000000..5c3f7fe1 --- /dev/null +++ b/kdevdesigner/designer/qcompletionedit.h @@ -0,0 +1,80 @@ +/********************************************************************** +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef TQCOMPLETIONEDIT_H +#define TQCOMPLETIONEDIT_H + +#include +#include + +class TQListBox; +class TQVBox; + +class QCompletionEdit : public TQLineEdit +{ + Q_OBJECT + + TQ_PROPERTY( bool autoAdd READ autoAdd WRITE setAutoAdd ) + TQ_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive ) + +public: + QCompletionEdit( TQWidget *parent = 0, const char *name = 0 ); + + bool autoAdd() const; + TQStringList completionList() const; + bool eventFilter( TQObject *o, TQEvent *e ); + bool isCaseSensitive() const; + +public slots: + void setCompletionList( const TQStringList &l ); + void setAutoAdd( bool add ); + void clear(); + void addCompletionEntry( const TQString &entry ); + void removeCompletionEntry( const TQString &entry ); + void setCaseSensitive( bool b ); + +signals: + void chosen( const TQString &text ); + +private slots: + void textDidChange( const TQString &text ); + +private: + void placeListBox(); + void updateListBox(); + +private: + bool aAdd; + TQStringList compList; + TQListBox *listbox; + TQVBox *popup; + bool caseSensitive; + +}; + + + +#endif diff --git a/kdevdesigner/designer/replacedialog.ui b/kdevdesigner/designer/replacedialog.ui new file mode 100644 index 00000000..27d01a58 --- /dev/null +++ b/kdevdesigner/designer/replacedialog.ui @@ -0,0 +1,318 @@ + +ReplaceDialog +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + ReplaceDialog + + + + 0 + 0 + 286 + 217 + + + + Replace Text + + + + unnamed + + + 11 + + + 6 + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel2 + + + R&eplace: + + + comboReplace + + + + + TextLabel1 + + + &Find: + + + comboFind + + + + + comboFind + + + + 7 + 0 + 0 + 0 + + + + true + + + + + comboReplace + + + + 7 + 0 + 0 + 0 + + + + true + + + + + + + Layout5 + + + + unnamed + + + 0 + + + 6 + + + + Spacer1 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonReplace + + + &Replace + + + true + + + + + buttonReplaceAll + + + Replace &All + + + + + PushButton2 + + + &Close + + + + + + + ButtonGroup1 + + + Options + + + + unnamed + + + 11 + + + 6 + + + + checkWords + + + &Whole words only + + + + + checkCase + + + Case &sensitive + + + + + checkBegin + + + Start at &beginning + + + + + + + ButtonGroup2 + + + Direction + + + + unnamed + + + 11 + + + 6 + + + + radioForward + + + Forwar&d + + + true + + + + + radioBackward + + + Bac&kward + + + + + + + + + buttonReplace + clicked() + ReplaceDialog + doReplace() + + + buttonReplaceAll + clicked() + ReplaceDialog + doReplaceAll() + + + PushButton2 + clicked() + ReplaceDialog + reject() + + + + comboFind + comboReplace + checkWords + checkCase + checkBegin + radioForward + radioBackward + buttonReplace + buttonReplaceAll + PushButton2 + + + ../interfaces/editorinterface.h + tqlineedit.h + replacedialog.ui.h + + + struct EditorInterface; + + + EditorInterface *editor; + TQObject *formWindow; + + + init() + destroy() + doReplace() + doReplaceAll() + setEditor( EditorInterface * e, TQObject * fw ) + + + diff --git a/kdevdesigner/designer/replacedialog.ui.h b/kdevdesigner/designer/replacedialog.ui.h new file mode 100644 index 00000000..63946525 --- /dev/null +++ b/kdevdesigner/designer/replacedialog.ui.h @@ -0,0 +1,75 @@ +/********************************************************************** +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + + +void ReplaceDialog::init() +{ + editor = 0; + formWindow = 0; +} + +void ReplaceDialog::destroy() +{ + if ( editor ) + editor->release(); + editor = 0; + formWindow = 0; +} + +void ReplaceDialog::doReplace() +{ + if ( !editor ) + return; + + if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(), + checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), FALSE ) ) + checkBegin->setChecked( TRUE ); + else + checkBegin->setChecked( FALSE ); +} + +void ReplaceDialog::doReplaceAll() +{ + if ( !editor ) + return; + + if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(), + checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), TRUE ) ) + checkBegin->setChecked( TRUE ); + else + checkBegin->setChecked( FALSE ); +} + +void ReplaceDialog::setEditor( EditorInterface * e, TQObject * fw ) +{ + if ( fw != formWindow ) + checkBegin->setChecked( TRUE ); + formWindow = fw; + if ( editor ) + editor->release(); + editor = e; + editor->addRef(); +} diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp new file mode 100644 index 00000000..a6285db5 --- /dev/null +++ b/kdevdesigner/designer/resource.cpp @@ -0,0 +1,3328 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "actiondnd.h" +#include "command.h" +#ifndef TQT_NO_SQL +#include "database.h" +#endif +#include "formfile.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "menubareditor.h" +#include "metadatabase.h" +#include "pixmapcollection.h" +#include "popupmenueditor.h" +#include "project.h" +#include "resource.h" +#include "widgetfactory.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef TQT_NO_TABLE +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "kdevdesigner_part.h" + +static TQString makeIndent( int indent ) +{ + TQString s; + s.fill( ' ', indent * 4 ); + return s; +} + +static TQString entitize( const TQString &s, bool attribute = FALSE ) +{ + TQString s2 = s; + s2 = s2.replace( "&", "&" ); + s2 = s2.replace( ">", ">" ); + s2 = s2.replace( "<", "<" ); + if ( attribute ) { + s2 = s2.replace( "\"", """ ); + s2 = s2.replace( "'", "'" ); + } + return s2; +} + +#ifdef TQ_WS_MACX +static struct { + int key; + const char* name; +} keyname[] = { + { TQt::Key_Space, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Space" ) }, + { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Esc" ) }, + { TQt::Key_Tab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Tab" ) }, + { TQt::Key_Backtab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backtab" ) }, + { TQt::Key_Backspace, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backspace" ) }, + { TQt::Key_Return, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Return" ) }, + { TQt::Key_Enter, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Enter" ) }, + { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Ins" ) }, + { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Del" ) }, + { TQt::Key_Pause, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Pause" ) }, + { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print" ) }, + { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "SysReq" ) }, + { TQt::Key_Home, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, + { TQt::Key_End, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "End" ) }, + { TQt::Key_Left, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Left" ) }, + { TQt::Key_Up, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Up" ) }, + { TQt::Key_Right, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Right" ) }, + { TQt::Key_Down, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Down" ) }, + { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgUp" ) }, + { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgDown" ) }, + { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "CapsLock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "NumLock" ) }, + { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "ScrollLock" ) }, + { TQt::Key_Menu, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Menu" ) }, + { TQt::Key_Help, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Help" ) }, + + // Multimedia keys + { TQt::Key_Back, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Back" ) }, + { TQt::Key_Forward, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Forward" ) }, + { TQt::Key_Stop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Stop" ) }, + { TQt::Key_Refresh, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Refresh" ) }, + { TQt::Key_VolumeDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Down" ) }, + { TQt::Key_VolumeMute, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Mute" ) }, + { TQt::Key_VolumeUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Up" ) }, + { TQt::Key_BassBoost, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Boost" ) }, + { TQt::Key_BassUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Up" ) }, + { TQt::Key_BassDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Down" ) }, + { TQt::Key_TrebleUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Up" ) }, + { TQt::Key_TrebleDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Down" ) }, + { TQt::Key_MediaPlay, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Play" ) }, + { TQt::Key_MediaStop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Stop" ) }, + { TQt::Key_MediaPrev, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Previous" ) }, + { TQt::Key_MediaNext, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Next" ) }, + { TQt::Key_MediaRecord, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Record" ) }, + { TQt::Key_HomePage, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, + { TQt::Key_Favorites, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Favorites" ) }, + { TQt::Key_Search, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Search" ) }, + { TQt::Key_Standby, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Standby" ) }, + { TQt::Key_OpenUrl, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Open URL" ) }, + { TQt::Key_LaunchMail, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Mail" ) }, + { TQt::Key_LaunchMedia, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Media" ) }, + { TQt::Key_Launch0, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (0)" ) }, + { TQt::Key_Launch1, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (1)" ) }, + { TQt::Key_Launch2, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (2)" ) }, + { TQt::Key_Launch3, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (3)" ) }, + { TQt::Key_Launch4, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (4)" ) }, + { TQt::Key_Launch5, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (5)" ) }, + { TQt::Key_Launch6, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (6)" ) }, + { TQt::Key_Launch7, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (7)" ) }, + { TQt::Key_Launch8, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (8)" ) }, + { TQt::Key_Launch9, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (9)" ) }, + { TQt::Key_LaunchA, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (A)" ) }, + { TQt::Key_LaunchB, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (B)" ) }, + { TQt::Key_LaunchC, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (C)" ) }, + { TQt::Key_LaunchD, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (D)" ) }, + { TQt::Key_LaunchE, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (E)" ) }, + { TQt::Key_LaunchF, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (F)" ) }, + + // -------------------------------------------------------------- + // More consistent namings + { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print Screen" ) }, + { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Up" ) }, + { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Down" ) }, + { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Caps Lock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Num Lock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Number Lock" ) }, + { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Scroll Lock" ) }, + { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Insert" ) }, + { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Delete" ) }, + { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Escape" ) }, + { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "System Request" ) }, + + { 0, 0 } +}; +#endif +static TQString platformNeutralKeySequence(const TQKeySequence &ks) +{ +#ifndef TQ_WS_MACX + return TQString(ks); +#else + uint k; + TQString str; + TQString p; + for (k = 0; k < ks.count(); ++k) { + int keycombo = ks[k]; + int basekey = keycombo & ~(TQt::SHIFT | TQt::CTRL | TQt::ALT | TQt::META); + if (keycombo & TQt::CTRL) + str += "Ctrl+"; + if (keycombo & TQt::ALT) + str += "Alt+"; + if (keycombo & TQt::META) + str += "Meta+"; + if (keycombo & TQt::SHIFT) + str += "Shift+"; + + // begin copy and paste from TQKeySequence :( + if (basekey & TQt::UNICODE_ACCEL) { + // Note: This character should NOT be upper()'ed, since + // the encoded string should indicate EXACTLY what the + // key represents! Hence a 'Ctrl+Shift+c' is posible to + // represent, but is clearly impossible to trigger... + p = TQChar(basekey & 0xffff); + } else if ( basekey >= TQt::Key_F1 && basekey <= TQt::Key_F35 ) { + p = TQAccel::tr( "F%1" ).arg(basekey - TQt::Key_F1 + 1); + } else if ( basekey > TQt::Key_Space && basekey <= TQt::Key_AsciiTilde ) { + p.sprintf( "%c", basekey ); + } else { + int i = 0; + while (keyname[i].name) { + if (basekey == keyname[i].key) { + p = TQAccel::tr(keyname[i].name); + break; + } + ++i; + } + // If we can't find the actual translatable keyname, + // fall back on the unicode representation of it... + // Or else characters like Key_aring may not get displayed + // ( Really depends on you locale ) + if ( !keyname[i].name ) + // Note: This character should NOT be upper()'ed, see above! + p = TQChar(basekey & 0xffff); + } + // end copy... + str += p + ", "; + } + str.truncate(str.length() - 2); + return str; +#endif +} + +static TQString mkBool( bool b ) +{ + return b? "true" : "false"; +} + +/*! + \class Resource resource.h + \brief Class for saving/loading, etc. forms + + This class is used for saving and loading forms, code generation, + transferring data of widgets over the clipboard, etc.. + +*/ + + +Resource::Resource() +{ + mainwindow = 0; + formwindow = 0; + toplevel = 0; + copying = FALSE; + pasting = FALSE; + hadGeometry = FALSE; + langIface = 0; + hasFunctions = FALSE; +} + +Resource::Resource( MainWindow* mw ) + : mainwindow( mw ) +{ + formwindow = 0; + toplevel = 0; + copying = FALSE; + pasting = FALSE; + hadGeometry = FALSE; + langIface = 0; + hasFunctions = FALSE; +} + +Resource::~Resource() +{ + if ( langIface ) + langIface->release(); +} + +void Resource::setWidget( FormWindow *w ) +{ + formwindow = w; + toplevel = w; +} + +TQWidget *Resource::widget() const +{ + return toplevel; +} + +bool Resource::load( FormFile *ff, Project *defProject ) +{ + if ( !ff || ff->absFileName().isEmpty() ) + return FALSE; + currFileName = ff->absFileName(); + mainContainerSet = FALSE; + + TQFile f( ff->absFileName() ); + f.open( IO_ReadOnly | IO_Translate ); + + bool b = load( ff, TQT_TQIODEVICE(&f), defProject ); + f.close(); + + return b; +} + +#undef signals +#undef slots + +bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) +{ + TQDomDocument doc; + TQString errMsg; + int errLine; + if ( !doc.setContent( dev, &errMsg, &errLine ) ) { + return FALSE; + } + + DomTool::fixDocument( doc ); + + TQWidget *p = mainwindow ? mainwindow->qWorkspace() : 0; + toplevel = formwindow = new FormWindow( ff, p, 0 ); + if ( defProject ) + formwindow->setProject( defProject ); + else if ( MainWindow::self ) + formwindow->setProject( MainWindow::self->currProject() ); + if ( mainwindow ) + formwindow->setMainWindow( mainwindow ); + MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) ); + + if ( !langIface ) { + TQString lang = "TQt Script"; + if ( mainwindow ) + lang = mainwindow->currProject()->language(); + langIface = MetaDataBase::languageInterface( lang ); + if ( langIface ) + langIface->addRef(); + } + + uiFileVersion = doc.firstChild().toElement().attribute("version"); + TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); + + TQDomElement forwards = e; + while ( forwards.tagName() != "forwards" && !forwards.isNull() ) + forwards = forwards.nextSibling().toElement(); + + TQDomElement includes = e; + while ( includes.tagName() != "includes" && !includes.isNull() ) + includes = includes.nextSibling().toElement(); + + TQDomElement variables = e; + while ( variables.tagName() != "variables" && !variables.isNull() ) + variables = variables.nextSibling().toElement(); + + TQDomElement signals = e; + while ( signals.tagName() != "signals" && !signals.isNull() ) + signals = signals.nextSibling().toElement(); + + TQDomElement slots = e; + while ( slots.tagName() != "slots" && !slots.isNull() ) + slots = slots.nextSibling().toElement(); + + TQDomElement functions = e; + while ( functions.tagName() != "functions" && !functions.isNull() ) + functions = functions.nextSibling().toElement(); + + TQDomElement connections = e; + while ( connections.tagName() != "connections" && !connections.isNull() ) + connections = connections.nextSibling().toElement(); + + TQDomElement imageCollection = e; + images.clear(); + while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) + imageCollection = imageCollection.nextSibling().toElement(); + + TQDomElement customWidgets = e; + while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() ) + customWidgets = customWidgets.nextSibling().toElement(); + + TQDomElement tabOrder = e; + while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() ) + tabOrder = tabOrder.nextSibling().toElement(); + + TQDomElement actions = e; + while ( actions.tagName() != "actions" && !actions.isNull() ) + actions = actions.nextSibling().toElement(); + + TQDomElement toolbars = e; + while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() ) + toolbars = toolbars.nextSibling().toElement(); + + TQDomElement menubar = e; + while ( menubar.tagName() != "menubar" && !menubar.isNull() ) + menubar = menubar.nextSibling().toElement(); + + TQDomElement widget; + while ( !e.isNull() ) { + if ( e.tagName() == "widget" ) { + widgets.clear(); + widget = e; + } else if ( e.tagName() == "include" ) { // compatibility with 2.x + MetaDataBase::Include inc; + inc.location = "global"; + if ( e.attribute( "location" ) == "local" ) + inc.location = "local"; + inc.implDecl = "in declaration"; + if ( e.attribute( "impldecl" ) == "in implementation" ) + inc.implDecl = "in implementation"; + inc.header = e.firstChild().toText().data(); + if ( inc.header.right( 5 ) != ".ui.h" ) { + metaIncludes.append( inc ); + } else { + if ( formwindow->formFile() ) + formwindow->formFile()->setCodeFileState( FormFile::Ok ); + } + } else if ( e.tagName() == "comment" ) { + metaInfo.comment = e.firstChild().toText().data(); + } else if ( e.tagName() == "forward" ) { // compatibility with old betas + metaForwards << e.firstChild().toText().data(); + } else if ( e.tagName() == "variable" ) { // compatibility with old betas + MetaDataBase::Variable v; + v.varName = e.firstChild().toText().data(); + v.varAccess = "protected"; + metaVariables << v; + } else if ( e.tagName() == "author" ) { + metaInfo.author = e.firstChild().toText().data(); + } else if ( e.tagName() == "class" ) { + metaInfo.className = e.firstChild().toText().data(); + } else if ( e.tagName() == "pixmapfunction" ) { + if ( formwindow ) { + formwindow->setSavePixmapInline( FALSE ); + formwindow->setSavePixmapInProject( FALSE ); + formwindow->setPixmapLoaderFunction( e.firstChild().toText().data() ); + } + } else if ( e.tagName() == "pixmapinproject" ) { + if ( formwindow ) { + formwindow->setSavePixmapInline( FALSE ); + formwindow->setSavePixmapInProject( TRUE ); + } + } else if ( e.tagName() == "exportmacro" ) { + exportMacro = e.firstChild().toText().data(); + } else if ( e.tagName() == "layoutdefaults" ) { + formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() ); + formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() ); + } else if ( e.tagName() == "layoutfunctions" ) { + formwindow->setSpacingFunction( e.attribute( "spacing" ) ); + formwindow->setMarginFunction( e.attribute( "margin" ) ); + if ( !formwindow->marginFunction().isEmpty() || !formwindow->spacingFunction().isEmpty() ) + formwindow->hasLayoutFunctions( TRUE ); + } + + e = e.nextSibling().toElement(); + } + + if ( !imageCollection.isNull() ) + loadImageCollection( imageCollection ); + if ( !customWidgets.isNull() ) + loadCustomWidgets( customWidgets, this ); + +#if defined (TQT_NON_COMMERCIAL) + bool previewMode = MainWindow::self ? MainWindow::self->isPreviewing() : FALSE; + TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self ); + if ( !w ) + return FALSE; + if ( previewMode ) + w->reparent( MainWindow::self, TQt::WType_TopLevel, w->pos(), TRUE ); +#else + if ( !createObject( widget, formwindow) ) + return FALSE; +#endif + + if ( !forwards.isNull() ) { + for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + if ( n.tagName() == "forward" ) + metaForwards << n.firstChild().toText().data(); + } + + if ( !includes.isNull() ) { + for ( TQDomElement n = includes.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + if ( n.tagName() == "include" ) { + if ( n.tagName() == "include" ) { + MetaDataBase::Include inc; + inc.location = "global"; + if ( n.attribute( "location" ) == "local" ) + inc.location = "local"; + inc.implDecl = "in declaration"; + if ( n.attribute( "impldecl" ) == "in implementation" ) + inc.implDecl = "in implementation"; + inc.header = n.firstChild().toText().data(); + if ( inc.header.right( 5 ) != ".ui.h" ) { + metaIncludes.append( inc ); + } else { + if ( formwindow->formFile() ) + formwindow->formFile()->setCodeFileState( FormFile::Ok ); + } + } + } + } + + if ( !variables.isNull() ) { + for ( TQDomElement n = variables.firstChild().toElement(); !n.isNull(); + n = n.nextSibling().toElement() ) { + if ( n.tagName() == "variable" ) { + MetaDataBase::Variable v; + v.varName = n.firstChild().toText().data(); + v.varAccess = n.attribute( "access", "protected" ); + if ( v.varAccess.isEmpty() ) + v.varAccess = "protected"; + metaVariables << v; + } + } + } + if ( !signals.isNull() ) { + for ( TQDomElement n = signals.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + if ( n.tagName() == "signal" ) + metaSignals << n.firstChild().toText().data(); + } + if ( !slots.isNull() ) { + for ( TQDomElement n = slots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + if ( n.tagName() == "slot" ) { + MetaDataBase::Function function; + function.specifier = n.attribute( "specifier", "virtual" ); + if ( function.specifier.isEmpty() ) + function.specifier = "virtual"; + function.access = n.attribute( "access", "public" ); + if ( function.access.isEmpty() ) + function.access = "public"; + function.language = n.attribute( "language", "C++" ); + function.returnType = n.attribute( "returnType", "void" ); + if ( function.returnType.isEmpty() ) + function.returnType = "void"; + function.type = "slot"; + function.function = n.firstChild().toText().data(); + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, + function.access, "slot", function.language, function.returnType ); + else + MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, + function.specifier, function.access, + "slot", function.language, + function.returnType ); + } + } + + if ( !functions.isNull() ) { + for ( TQDomElement n = functions.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { + if ( n.tagName() == "function" ) { + MetaDataBase::Function function; + function.specifier = n.attribute( "specifier", "virtual" ); + if ( function.specifier.isEmpty() ) + function.specifier = "virtual"; + function.access = n.attribute( "access", "public" ); + if ( function.access.isEmpty() ) + function.access = "public"; + function.type = n.attribute( "type", "function" ); + function.type = "function"; + function.language = n.attribute( "language", "C++" ); + function.returnType = n.attribute( "returnType", "void" ); + if ( function.returnType.isEmpty() ) + function.returnType = "void"; + function.function = n.firstChild().toText().data(); + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, + function.access, function.type, function.language, + function.returnType ); + else + MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, + function.specifier, function.access, + function.type, function.language, function.returnType ); + } + } + } + + if ( !actions.isNull() ) + loadActions( actions ); + if ( !toolbars.isNull() ) + loadToolBars( toolbars ); + if ( !menubar.isNull() ) + loadMenuBar( menubar ); + + if ( !connections.isNull() ) + loadConnections( connections ); + + if ( !tabOrder.isNull() ) + loadTabOrder( tabOrder ); + + if ( formwindow ) { + MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes ); + MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards ); + MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), metaVariables ); + MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals ); + metaInfo.classNameChanged = metaInfo.className != TQString( formwindow->name() ); + MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo ); + MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro ); + } + + loadExtraSource( formwindow->formFile(), currFileName, langIface, hasFunctions ); + + if ( mainwindow && formwindow ) + mainwindow->insertFormWindow( formwindow ); + + if ( formwindow ) { + formwindow->killAccels( TQT_TQOBJECT(formwindow) ); + if ( formwindow->layout() ) + formwindow->layout()->activate(); + if ( hadGeometry ) + formwindow->resize( formwindow->size().expandedTo( formwindow->minimumSize(). + expandedTo( formwindow->minimumSizeHint() ) ) ); + else + formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) ); + } + + return TRUE; +} + +static bool saveCode( const TQString &filename, const TQString &code ) +{ + TQFile f( filename ); + if ( f.open(IO_WriteOnly | IO_Translate) ) { + TQTextStream ts( &f ); + ts << code; + return TRUE; + } + return FALSE; +} + +bool Resource::save( const TQString& filename, bool formCodeOnly ) +{ + if ( !formwindow || filename.isEmpty() ) + return FALSE; + if (!langIface) { + TQString lang = "TQt Script"; + if ( mainwindow ) + lang = mainwindow->currProject()->language(); + langIface = MetaDataBase::languageInterface( lang ); + if ( langIface ) + langIface->addRef(); + } + if ( formCodeOnly && langIface ) { + if ( saveFormCode(formwindow->formFile(), langIface) ) + return TRUE; + bool breakout = FALSE; + FormFile *ff = formwindow->formFile(); + TQString codeFile = ff->project()->makeAbsolute( ff->codeFile() ); + TQString filter = langIface->fileFilterList().join("\n"); + while ( !breakout ) { + TQString fn = KFileDialog::getSaveFileName( codeFile, filter ); + breakout = fn.isEmpty(); + if ( !breakout ) { + if ( saveCode(fn, ff->code()) ) + return TRUE; + } + } + } + currFileName = filename; + + TQFile f( filename ); + if ( !f.open( IO_WriteOnly | IO_Translate ) ) + return FALSE; + bool b = save( TQT_TQIODEVICE(&f) ); + f.close(); + return b; +} + +bool Resource::save( TQIODevice* dev ) +{ + if ( !formwindow ) + return FALSE; + + if ( !langIface ) { + TQString lang = "C++"; + if ( mainwindow ) + lang = mainwindow->currProject()->language(); + langIface = MetaDataBase::languageInterface( lang ); + if ( langIface ) + langIface->addRef(); + } + + TQTextStream ts( dev ); + ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) ); + + ts << "" << endl; + saveMetaInfoBefore( ts, 0 ); + saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 ); + if ( ::tqqt_cast(formwindow->mainContainer()) ) { + saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); + saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); + } + if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) + saveCustomWidgets( ts, 0 ); + if ( ::tqqt_cast(formwindow->mainContainer()) ) + saveActions( formwindow->actionList(), ts, 0 ); + if ( !images.isEmpty() ) + saveImageCollection( ts, 0 ); + if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() || + !MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() ) + saveConnections( ts, 0 ); + saveTabOrder( ts, 0 ); + saveMetaInfoAfter( ts, 0 ); + saveIncludeHints( ts, 0 ); + ts << "" << endl; + bool ok = saveFormCode( formwindow->formFile(), langIface ); + images.clear(); + + return ok; +} + +TQString Resource::copy() +{ + if ( !formwindow ) + return TQString(); + + copying = TRUE; + TQString s; + TQTextOStream ts( &s ); + + ts << "" << endl; + TQWidgetList widgets = formwindow->selectedWidgets(); + TQWidgetList tmp( widgets ); + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + TQWidget *p = w->parentWidget(); + bool save = TRUE; + while ( p ) { + if ( tmp.findRef( p ) != -1 ) { + save = FALSE; + break; + } + p = p->parentWidget(); + } + if ( save ) + saveObject( TQT_TQOBJECT(w), 0, ts, 0 ); + } + if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) + saveCustomWidgets( ts, 0 ); + if ( !images.isEmpty() ) + saveImageCollection( ts, 0 ); + ts << "" << endl; + + return s; +} + + +void Resource::paste( const TQString &cb, TQWidget *parent ) +{ + if ( !formwindow ) + return; + mainContainerSet = TRUE; + + pasting = TRUE; + TQDomDocument doc; + TQString errMsg; + int errLine; + doc.setContent( cb, &errMsg, &errLine ); + + TQDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement(); + + TQDomElement imageCollection = firstWidget; + images.clear(); + while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) + imageCollection = imageCollection.nextSibling().toElement(); + + TQDomElement customWidgets = firstWidget; + while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() ) + customWidgets = customWidgets.nextSibling().toElement(); + + if ( !imageCollection.isNull() ) + loadImageCollection( imageCollection ); + if ( !customWidgets.isNull() ) + loadCustomWidgets( customWidgets, this ); + + TQWidgetList widgets; + formwindow->clearSelection( FALSE ); + formwindow->setPropertyShowingBlocked( TRUE ); + formwindow->clearSelection( FALSE ); + while ( !firstWidget.isNull() ) { + if ( firstWidget.tagName() == "widget" ) { + TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 ); + if ( !w ) + continue; + widgets.append( w ); + int x = w->x() + formwindow->grid().x(); + int y = w->y() + formwindow->grid().y(); + if ( w->x() + w->width() > parent->width() ) + x = TQMAX( 0, parent->width() - w->width() ); + if ( w->y() + w->height() > parent->height() ) + y = TQMAX( 0, parent->height() - w->height() ); + if ( x != w->x() || y != w->y() ) + w->move( x, y ); + formwindow->selectWidget( TQT_TQOBJECT(w) ); + } else if ( firstWidget.tagName() == "spacer" ) { + TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal ); + if ( !w ) + continue; + widgets.append( w ); + int x = w->x() + formwindow->grid().x(); + int y = w->y() + formwindow->grid().y(); + if ( w->x() + w->width() > parent->width() ) + x = TQMAX( 0, parent->width() - w->width() ); + if ( w->y() + w->height() > parent->height() ) + y = TQMAX( 0, parent->height() - w->height() ); + if ( x != w->x() || y != w->y() ) + w->move( x, y ); + formwindow->selectWidget( TQT_TQOBJECT(w) ); + } + firstWidget = firstWidget.nextSibling().toElement(); + } + formwindow->setPropertyShowingBlocked( FALSE ); + formwindow->emitShowProperties(); + + PasteCommand *cmd = new PasteCommand( i18n( "Paste" ), formwindow, widgets ); + formwindow->commandHistory()->addCommand( cmd ); +} + +void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ) +{ + if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() ) + return; + TQString closeTag; + const char* className = WidgetFactory::classNameOf( obj ); + int classID = WidgetDatabase::idFromClassName( className ); + bool isPlugin = WidgetDatabase::isCustomPluginWidget( classID ); + if ( obj->isWidgetType() ) { + if ( obj->isA("CustomWidget") || isPlugin ) { + usedCustomWidgets << TQString( className ); + includeHints << WidgetDatabase::includeFile( classID ); + } + + if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) ) + return; // we don't know anything about this thing + + TQString attributes; + if ( grid ) { + QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ]; + attributes += TQString(" row=\"") + TQString::number(item.row) + "\""; + attributes += TQString(" column=\"") + TQString::number(item.column) + "\""; + if ( item.rowspan * item.colspan != 1 ) { + attributes += TQString(" rowspan=\"") + TQString::number(item.rowspan) + "\""; + attributes += TQString(" colspan=\"") + TQString::number(item.colspan) + "\""; + } + } + + if ( qstrcmp( className, "Spacer" ) == 0 ) { + closeTag = makeIndent( indent ) + "\n"; + ts << makeIndent( indent ) << "" << endl; + ++indent; + } else { + closeTag = makeIndent( indent ) + "\n"; + ts << makeIndent( indent ) << "" << endl; + ++indent; + } + if ( WidgetFactory::hasItems(classID, obj) ) + saveItems( obj, ts, indent ); + saveObjectProperties( obj, ts, indent ); + } else { + // test for other objects we created. Nothing so far. + return; + } + + QDesignerWidgetStack* ws = 0; + + if ( ::tqqt_cast(obj) ) { + TQTabWidget* tw = (TQTabWidget*) obj; + TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING ); + TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); + TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar(); + for ( int i = 0; i < tb->count(); ++i ) { + TQTab *t = tb->tabAt( i ); + if ( !t ) + continue; + TQWidget *w = ws->widget( t->identifier() ); + if ( !w ) + continue; + if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ) == -1 ) + continue; // we don't know this widget + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( t->text() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + delete tmpl; + } else if ( (ws = ::tqqt_cast(obj)) != 0 ) { + for ( int i = 0; i < ws->count(); ++i ) { + TQWidget *w = ws->page( i ); + if ( !w ) + continue; + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + continue; // we don't know this widget + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << TQString::number(i) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + } else if ( ::tqqt_cast(obj) ) { + TQToolBox* tb = (TQToolBox*)obj; + for ( int i = 0; i < tb->count(); ++i ) { + TQWidget *w = tb->item( i ); + if ( !w ) + continue; + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + continue; // we don't know this widget + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + } else if ( ::tqqt_cast(obj) ) { + TQWizard* wiz = (TQWizard*)obj; + for ( int i = 0; i < wiz->pageCount(); ++i ) { + TQWidget *w = wiz->page( i ); + if ( !w ) + continue; + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + continue; // we don't know this widget + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( wiz->title( w ) ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + } else if ( ::tqqt_cast(obj) ) { + saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent ); + } else { + bool saved = FALSE; +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + if ( isPlugin ) { + WidgetInterface *iface = 0; + widgetManager()->queryInterface( className, &iface ); + if ( iface ) { + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( iface2 ) { + if ( iface2->supportsPages( className ) ) { + TQWidgetList containers = iface2->pages( className, (TQWidget*)obj ); + if ( !containers.isEmpty() ) { + saved = TRUE; + int i = 0; + for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) { + if ( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 ) + continue; // we don't know this widget + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) + << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" + << entitize( iface2->pageLabel( className, (TQWidget*)obj, i ) ) + << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( w, ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + } + } else { + saved = TRUE; + TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj ); + if ( obj != w ) { + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) + << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( w, ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + // Create a custom widget and then store it in the database + // so we can save the custom widgets. + MetaDataBase::CustomWidget *cw = new MetaDataBase::CustomWidget; + cw->className = className; + cw->includeFile = WidgetDatabase::includeFile( classID ); + TQStrList lst = w->metaObject()->signalNames( TRUE ); + for ( TQPtrListIterator it(lst); it.current(); ++it ) + cw->lstSignals.append(it.current()); + + int i; + int total = w->metaObject()->numProperties( TRUE ); + for ( i = 0; i < total; i++ ) { + const TQMetaProperty *p = w->metaObject()->property( i, TRUE ); + if ( p->designable(w) ) { + MetaDataBase::Property prop; + prop.property = p->name(); + TQString pType = p->type(); + // *sigh* designer types are not normal types + // Handle most cases, the ones it misses are + // probably too difficult to deal with anyway... + if ( pType.startsWith("Q") ) { + pType = pType.right( pType.length() - 1 ); + } else { + pType[0] = pType[0].upper(); + } + prop.type = pType; + cw->lstProperties.append( prop ); + } + } + + total = w->metaObject()->numSlots( TRUE ); + for ( i = 0; i < total; i++ ) { + const TQMetaData *md = w->metaObject()->slot( i, TRUE ); + MetaDataBase::Function funky; + // Find out if we have a return type. + if ( md->method->count > 0 ) { + const TQUParameter p = md->method->parameters[0]; + if ( p.inOut == TQUParameter::InOut ) + funky.returnType = p.type->desc(); + } + + funky.function = md->name; + funky.language = "C++"; + switch ( md->access ) { + case TQMetaData::Public: + funky.access = "public"; + break; + case TQMetaData::Protected: + funky.access = "protected"; + break; + case TQMetaData::Private: + funky.access = "private"; + break; + } + cw->lstSlots.append( funky ); + } + MetaDataBase::addCustomWidget( cw ); + } + iface2->release(); + } + iface->release(); + } + } +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + if ( !saved ) + saveChildrenOf( obj, ts, indent ); + } + + indent--; + ts << closeTag; +} + +void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) +{ + if ( ::tqqt_cast(obj) || ::tqqt_cast(obj) ) { + TQListBox *lb = 0; + if ( ::tqqt_cast(obj) ) + lb = (TQListBox*)obj; + else + lb = ( (TQComboBox*)obj )->listBox(); + + TQListBoxItem *i = lb->firstItem(); + for ( ; i; i = i->next() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQStringList text; + text << i->text(); + TQPtrList pixmaps; + if ( i->pixmap() ) + pixmaps.append( i->pixmap() ); + saveItem( text, pixmaps, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } else if ( ::tqqt_cast(obj) ) { + TQIconView *iv = (TQIconView*)obj; + + TQIconViewItem *i = iv->firstItem(); + for ( ; i; i = i->nextItem() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQStringList text; + text << i->text(); + TQPtrList pixmaps; + if ( i->pixmap() ) + pixmaps.append( i->pixmap() ); + saveItem( text, pixmaps, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } else if ( ::tqqt_cast(obj) ) { + TQListView *lv = (TQListView*)obj; + int i; + for ( i = 0; i < lv->header()->count(); ++i ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQStringList l; + l << lv->header()->label( i ); + TQPtrList pix; + pix.setAutoDelete( TRUE ); + if ( lv->header()->iconSet( i ) ) + pix.append( new TQPixmap( lv->header()->iconSet( i )->pixmap() ) ); + saveItem( l, pix, ts, indent ); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << mkBool( lv->header()->isClickEnabled( i ) )<< "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << mkBool( lv->header()->isResizeEnabled( i ) ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + saveItem( lv->firstChild(), ts, indent - 1 ); + } +#if !defined (TQT_NO_TABLE) + else if ( ::tqqt_cast(obj) ) { + TQTable *table = (TQTable*)obj; + int i; + TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); +# ifndef TQT_NO_SQL + bool isDataTable = ::tqqt_cast(table); +# else + bool isDataTable = false; +# endif + for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { + if ( !table->horizontalHeader()->label( i ).isNull() && + table->horizontalHeader()->label( i ).toInt() != i + 1 || + table->horizontalHeader()->iconSet( i ) || + isDataTable ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQStringList l; + l << table->horizontalHeader()->label( i ); + TQPtrList pix; + pix.setAutoDelete( TRUE ); + if ( table->horizontalHeader()->iconSet( i ) ) + pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) ); + saveItem( l, pix, ts, indent ); + if ( isDataTable && !columnFields.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( *columnFields.find( l[ 0 ] ) ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + for ( i = 0; i < table->verticalHeader()->count(); ++i ) { + if ( !table->verticalHeader()->label( i ).isNull() && + table->verticalHeader()->label( i ).toInt() != i + 1 || + table->verticalHeader()->iconSet( i ) ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQStringList l; + l << table->verticalHeader()->label( i ); + TQPtrList pix; + pix.setAutoDelete( TRUE ); + if ( table->verticalHeader()->iconSet( i ) ) + pix.append( new TQPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) ); + saveItem( l, pix, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + } +#endif +} + +void Resource::saveItem( TQListViewItem *i, TQTextStream &ts, int indent ) +{ + TQListView *lv = i->listView(); + while ( i ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + + TQPtrList pixmaps; + TQStringList textes; + for ( int c = 0; c < lv->columns(); ++c ) { + pixmaps.append( i->pixmap( c ) ); + textes << i->text( c ); + } + saveItem( textes, pixmaps, ts, indent ); + + if ( i->firstChild() ) + saveItem( i->firstChild(), ts, indent ); + + indent--; + ts << makeIndent( indent ) << "" << endl; + i = i->nextSibling(); + } +} + +void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname ) +{ + if ( p.isNull() ) { + ts << makeIndent( indent ) << "<" << tagname << ">" << endl; + return; + } + + if ( formwindow && formwindow->savePixmapInline() ) + ts << makeIndent( indent ) << "<" << tagname << ">" << saveInCollection( p ) << "" << endl; + else if ( formwindow && formwindow->savePixmapInProject() ) + ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() ) + << "" << endl; + else + ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() ) + << "" << endl; +} + +TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*/ ) +{ + TQString arg = e.firstChild().toText().data(); + + if ( formwindow && formwindow->savePixmapInline() ) { + TQImage img = loadFromCollection( arg ); + TQPixmap pix; + pix.convertFromImage( img ); + MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + return pix; + } else if ( formwindow && formwindow->savePixmapInProject() ) { + TQPixmap pix; + if ( mainwindow && mainwindow->currProject() ) { + pix = mainwindow->currProject()->pixmapCollection()->pixmap( arg ); + } else { + pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ); + // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that + pix.convertFromImage( pix.convertToImage() ); + } + + MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + return pix; + } + TQPixmap pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ); + // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that + pix.convertFromImage( pix.convertToImage() ); + MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + return pix; +} + +void Resource::saveItem( const TQStringList &text, + const TQPtrList &pixmaps, TQTextStream &ts, + int indent ) +{ + TQStringList::ConstIterator it = text.begin(); + for ( ; it != text.end(); ++it ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( *it ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + for ( int i = 0; i < (int)pixmaps.count(); ++i ) { + TQPixmap *p = ( (TQPtrList)pixmaps ).at( i ); + ts << makeIndent( indent ) << "" << endl; + indent++; + if ( p ) + savePixmap( *p, ts, indent ); + else + savePixmap( TQPixmap(), ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } +} + +void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) +{ + const TQObjectList l = obj->childrenListObject(); + if ( l.isEmpty() ) + return; // no children to save + + TQString closeTag; + // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer + TQLayout *layout = 0; + QDesignerGridLayout* grid = 0; + if ( !::tqqt_cast(obj) && + WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && + obj->isWidgetType() && + WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) { + WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout ); + switch ( lay ) { + case WidgetFactory::HBox: + closeTag = makeIndent( indent ) + ""; + ts << makeIndent( indent ) << "" << endl; + ++indent; + break; + case WidgetFactory::VBox: + closeTag = makeIndent( indent ) + ""; + ts << makeIndent( indent ) << "" << endl; + ++indent; + break; + case WidgetFactory::Grid: + closeTag = makeIndent( indent ) + ""; + ts << makeIndent( indent ) << "" << endl; + ++indent; + grid = (QDesignerGridLayout*) layout; + break; + default: + break; + } + + // save properties of layout + if ( lay != WidgetFactory::NoLayout ) + saveObjectProperties( TQT_TQOBJECT(layout), ts, indent ); + + } + + TQObject *o = 0; + for ( TQPtrListIterator it ( l ); ( o = it.current() ); ++it ) + if ( !TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) + saveObject( o, grid, ts, indent ); + if ( !closeTag.isEmpty() ) { + indent--; + ts << closeTag << endl; + } +} + +void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) +{ + TQStringList saved; + TQStringList changed; + changed = MetaDataBase::changedProperties( w ); + if ( w->isWidgetType() ) { + if ( ::tqqt_cast(w) ) { + if ( !changed.contains( "sizeHint" ) ) + changed << "sizeHint"; + if ( !changed.contains( "geometry" ) ) + changed << "geometry"; + } else { + TQToolButton *tb = ::tqqt_cast(w); + if ( tb && !tb->iconSet().isNull() ) { + changed << "iconSet"; + } + } + } else if ( ::tqqt_cast(w) ) { + if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) + changed << "spacing"; + if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) + changed << "margin"; + if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) != "Auto" + && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() ) + changed << "resizeMode"; + } + + if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + if ( changed.findIndex( "geometry" ) == -1 ) + changed << "geometry"; + if ( changed.findIndex( "caption" ) == -1 ) + changed << "caption"; + } + + if ( changed.isEmpty() ) + return; + + bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && + WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; + + TQStrList lst = w->metaObject()->propertyNames( !::tqqt_cast(w) ); + for ( TQPtrListIterator it( lst ); it.current(); ++it ) { + if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() ) + continue; + if ( saved.find( TQString::fromLatin1( it.current() ) ) != saved.end() ) + continue; + saved << TQString::fromLatin1( it.current() ); + const TQMetaProperty* p = w->metaObject()-> + property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE ); + if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) ) + continue; + if ( ::tqqt_cast(w) && qstrcmp( p->name(), "pixmap" ) == 0 && + ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) ) + continue; + if ( ::tqqt_cast(w) && + ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 || + qstrcmp( p->name(), "itemText" ) == 0 ) ) + continue; + if ( qstrcmp( p->name(), "name" ) == 0 ) + knownNames << w->property( "name" ).toString(); + if ( !p->isSetType() && !p->isEnumType() && !w->property( p->name() ).isValid() ) + continue; + ts << makeIndent( indent ) << "stdSet() ) + ts << " stdset=\"0\""; + ts << ">" << endl; + indent++; + if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqqt_cast(w) ) { + saveProperty( w, it.current(), "", TQVariant::String, ts, indent ); + } else if ( p->isSetType() ) { + saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); + } else if ( p->isEnumType() ) { + saveEnumProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); + } else { + saveProperty( w, it.current(), w->property( p->name() ), TQVariant::nameToType( p->type() ), ts, indent ); + } + indent--; + ts << makeIndent( indent ) << "
    " << endl; + } + + if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) { + TQMap* fakeProperties = MetaDataBase::fakeProperties( w ); + for ( TQMap::Iterator fake = fakeProperties->begin(); + fake != fakeProperties->end(); ++fake ) { + if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) { + if ( w->inherits("CustomWidget") ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); + if ( cw && !cw->hasProperty( fake.key().latin1() ) && fake.key() != "toolTip" && fake.key() != "whatsThis" ) + continue; + } + + ts << makeIndent( indent ) << "" << endl; + indent++; + saveProperty( w, fake.key(), *fake, (*fake).type(), ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + } +} + +void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) +{ + const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE ); + TQStrList l( p->valueToKeys( w->property( name ).toInt() ) ); + TQString v; + for ( uint i = 0; i < l.count(); ++i ) { + v += l.at( i ); + if ( i < l.count() - 1 ) + v += "|"; + } + ts << makeIndent( indent ) << "" << v << "" << endl; +} + +void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) +{ + const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE ); + ts << makeIndent( indent ) << "" << p->valueToKey( w->property( name ).toInt() ) << "" << endl; +} + +void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent ) +{ + if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" || + name == "layoutMargin" || name =="layoutSpacing" ) + return; + int num; + uint unum; + double dob; + TQString comment; + if ( w && formwindow->widgets()->find( (TQWidget*)w ) || formwindow->actionList().find( (TQAction*)w ) ) + comment = MetaDataBase::propertyComment( w, name ); + switch ( t ) { + case TQVariant::String: + if ( name == "resizeMode" ) { + TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + if ( !resmod.isNull() && resmod != "Auto" ) { + ts << makeIndent( indent ) << ""; + ts << resmod; + ts << "" << endl; + } + + } else { + ts << makeIndent( indent ) << "" << entitize( value.toString() ) << "" << endl; + if ( !comment.isEmpty() ) + ts << makeIndent( indent ) << "" << entitize( comment ) << "" << endl; + } + break; + case TQVariant::CString: + ts << makeIndent( indent ) << "" << entitize( value.toCString() ).latin1() << "" << endl; + break; + case TQVariant::Bool: + ts << makeIndent( indent ) << "" << mkBool( value.toBool() ) << "" << endl; + break; + case TQVariant::Int: + if ( ::tqqt_cast(w) ) { + num = -1; + if ( name == "spacing" ) + num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + else if ( name == "margin" ) + num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + if ( num != -1 ) + ts << makeIndent( indent ) << "" << TQString::number( num ) << "" << endl; + } else { + num = value.toInt(); + ts << makeIndent( indent ) << "" << TQString::number( num ) << "" << endl; + } + break; + case TQVariant::Double: + dob = value.toDouble(); + ts << makeIndent( indent ) << "" << TQString::number( dob ) << "" << endl; + break; + case TQVariant::KeySequence: + ts << makeIndent( indent ) << "" + << entitize(platformNeutralKeySequence(value.toKeySequence())) << "" << endl; + break; + case TQVariant::UInt: + unum = value.toUInt(); + ts << makeIndent( indent ) << "" << TQString::number( unum ) << "" << endl; + break; + case TQVariant::Rect: { + TQVariant v( value ); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().x() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().y() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().width() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().height() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Point: { + TQVariant v( value ); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << TQString::number( v.toPoint().x() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toPoint().y() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Size: { + TQVariant v( value ); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << TQString::number( v.toSize().width() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toSize().height() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Color: { + TQVariant v( value ); + ts << makeIndent( indent ) << "" << endl; + indent++; + saveColor( ts, indent, v.toColor() ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Font: { + TQVariant v( value ); + ts << makeIndent( indent ) << "" << endl; + TQFont f( tqApp->font() ); + if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() ) + f = ((TQWidget*)w)->parentWidget()->font(); + TQFont f2( v.toFont() ); + indent++; + if ( f.family() != f2.family() ) + ts << makeIndent( indent ) << "" << f2.family() << "" << endl; + if ( f.pointSize() != f2.pointSize() ) + ts << makeIndent( indent ) << "" << TQString::number( f2.pointSize() ) << "" << endl; + if ( f.bold() != f2.bold() ) + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.bold() ) << "" << endl; + if ( f.italic() != f2.italic() ) + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.italic() ) << "" << endl; + if ( f.underline() != f2.underline() ) + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.underline() ) << "" << endl; + if ( f.strikeOut() != f2.strikeOut() ) + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.strikeOut() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::SizePolicy: { + TQSizePolicy sp( value.toSizePolicy() ); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << (int)sp.horData() << "" << endl; + ts << makeIndent( indent ) << "" << (int)sp.verData() << "" << endl; + ts << makeIndent( indent ) << "" << (int)sp.horStretch() << "" << endl; + ts << makeIndent( indent ) << "" << (int)sp.verStretch() << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + break; + } + case TQVariant::Pixmap: + savePixmap( value.toPixmap(), ts, indent ); + break; + case TQVariant::IconSet: + savePixmap( value.toIconSet().pixmap(), ts, indent, "iconset" ); + break; + case TQVariant::Image: + ts << makeIndent( indent ) << "" << saveInCollection( value.toImage() ) << "" << endl; + break; + case TQVariant::Palette: { + TQPalette p( value.toPalette() ); + ts << makeIndent( indent ) << "" << endl; + indent++; + + ts << makeIndent( indent ) << "" << endl; + indent++; + saveColorGroup( ts, indent, p.active() ); + indent--; + ts << makeIndent( indent ) << "" << endl; + + ts << makeIndent( indent ) << "" << endl; + indent++; + saveColorGroup( ts, indent, p.disabled() ); + indent--; + ts << makeIndent( indent ) << "" << endl; + + ts << makeIndent( indent ) << "" << endl; + indent++; + saveColorGroup( ts, indent, p.inactive() ); + indent--; + ts << makeIndent( indent ) << "" << endl; + + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Cursor: + ts << makeIndent( indent ) << "" << value.toCursor().shape() << "" << endl; + break; + case TQVariant::StringList: { + TQStringList lst = value.toStringList(); + uint i = 0; + ts << makeIndent( indent ) << "" << endl; + indent++; + if ( !lst.isEmpty() ) { + for ( i = 0; i < lst.count(); ++i ) + ts << makeIndent( indent ) << "" << entitize( lst[ i ] ) << "" << endl; + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Date: { + TQDate d = value.toDate(); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << d.year() << "" << endl; + ts << makeIndent( indent ) << "" << d.month() << "" << endl; + ts << makeIndent( indent ) << "" << d.day() << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + break; + } + case TQVariant::Time: { + TQTime t = value.toTime(); + ts << makeIndent( indent ) << "" << endl; + break; + } + case TQVariant::DateTime: { + TQDateTime dt = value.toDateTime(); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << dt.date().year() << "" << endl; + ts << makeIndent( indent ) << "" << dt.date().month() << "" << endl; + ts << makeIndent( indent ) << "" << dt.date().day() << "" << endl; + ts << makeIndent( indent ) << "" << dt.time().hour() << "" << endl; + ts << makeIndent( indent ) << "" << dt.time().minute() << "" << endl; + ts << makeIndent( indent ) << "" << dt.time().second() << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + break; + } + default: + tqWarning( "saving the property %s of type %d not supported yet", name.latin1(), (int)t ); + } +} + +void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup &cg ) +{ + for( int r = 0 ; r < TQColorGroup::NColorRoles ; r++ ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) ); + indent--; + ts << makeIndent( indent ) << "" << endl; + TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap(); + if ( pm && !pm->isNull() ) + savePixmap( *pm, ts, indent ); + } +} + +void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c ) +{ + ts << makeIndent( indent ) << "" << TQString::number( c.red() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( c.green() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( c.blue() ) << "" << endl; +} + +TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout ) +{ + lastItem = 0; + TQDomElement n = e.firstChild().toElement(); + TQWidget *w = 0; // the widget that got created + TQObject *obj = 0; // gets the properties + + int row = e.attribute( "row" ).toInt(); + int col = e.attribute( "column" ).toInt(); + int rowspan = e.attribute( "rowspan" ).toInt(); + int colspan = e.attribute( "colspan" ).toInt(); + if ( rowspan < 1 ) + rowspan = 1; + if ( colspan < 1 ) + colspan = 1; + + TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + TQString parentClassName = WidgetFactory::classNameOf( parent ); + bool isPlugin = + WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( parentClassName ) ); + if ( isPlugin ) + tqWarning( "####### loading custom container widgets without page support not implemented!" ); + // ### TODO loading for custom container widgets without pages +#endif + if ( !className.isNull() ) { + obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE )); + if ( !obj ) { + TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ), + i18n( "Error loading %1.\n" + "The widget %2 could not be created." ). + arg( currFileName ).arg( className ) ); + return 0; + } + if ( !mainContainerSet ) { + if ( formwindow ) + formwindow->setMainContainer( (TQWidget*)obj ); + mainContainerSet = TRUE; + } + w = (TQWidget*)obj; + if ( ::tqqt_cast(w) ) + w = ( (TQMainWindow*)w )->centralWidget(); + if ( layout ) { + switch ( WidgetFactory::layoutType( layout ) ) { + case WidgetFactory::HBox: + ( (TQHBoxLayout*)layout )->addWidget( w ); + break; + case WidgetFactory::VBox: + ( (TQVBoxLayout*)layout )->addWidget( w ); + break; + case WidgetFactory::Grid: + ( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, + col, col + colspan - 1 ); + break; + default: + break; + } + } + + if ( !toplevel ) + toplevel = w; + layout = 0; + + if ( w && formwindow ) { + if ( !parent || + ( !::tqqt_cast(parent) && + !::tqqt_cast(parent) && + !::tqqt_cast(parent) && + !::tqqt_cast(parent) +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + && !isPlugin +#endif + ) ) + formwindow->insertWidget( w, pasting ); + else if ( parent && + ( ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + || isPlugin +#endif + ) ) + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + } + } + + TQDomElement sizePolicyElement; + TQObject *sizePolicyObject = 0; + + while ( !n.isNull() ) { + if ( n.tagName() == "spacer" ) { + createSpacer( n, w, layout, Qt::Horizontal ); + } else if ( n.tagName() == "widget" ) { + createObject( n, w, layout ); + } else if ( n.tagName() == "hbox" ) { + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox ); + obj = TQT_TQOBJECT(layout); + n = n.firstChild().toElement(); + continue; + } else if ( n.tagName() == "grid" ) { + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid ); + obj = TQT_TQOBJECT(layout); + n = n.firstChild().toElement(); + continue; + } else if ( n.tagName() == "vbox" ) { + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox ); + obj = TQT_TQOBJECT(layout); + n = n.firstChild().toElement(); + continue; + } else if ( n.tagName() == "property" && obj ) { + if ( n.attribute( "name" ) == "sizePolicy" ) { + // ### Evil hack ### Delay setting sizePolicy so it won't be overridden by other properties. + sizePolicyElement = n; + sizePolicyObject = obj; + } else { + setObjectProperty( obj, n.attribute( "name" ), n.firstChild().toElement() ); + } + } else if ( n.tagName() == "attribute" && w ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( ::tqqt_cast(parent) ) { + if ( attrib == "title" ) + ( (TQTabWidget*)parent )->insertTab( w, v.toString() ); + } else if ( ::tqqt_cast(parent) ) { + if ( attrib == "id" ) + ( (QDesignerWidgetStack*)parent )->insertPage( w, v.toInt() ); + } else if ( ::tqqt_cast(parent) ) { + if ( attrib == "label" ) + ( (TQToolBox*)parent )->addItem( w, v.toString() ); + } else if ( ::tqqt_cast(parent) ) { + if ( attrib == "title" ) + ( (TQWizard*)parent )->addPage( w, v.toString() ); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + } else if ( isPlugin ) { + if ( attrib == "label" ) { + WidgetInterface *iface = 0; + widgetManager()->queryInterface( parentClassName, &iface ); + if ( iface ) { + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( iface2 ) { + iface2->insertPage( parentClassName, + (TQWidget*)parent, v.toString(), -1, w ); + iface2->release(); + } + iface->release(); + } + } +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + } + } else if ( n.tagName() == "item" ) { + createItem( n, w ); + } else if ( n.tagName() == "column" || n.tagName() =="row" ) { + createColumn( n, w ); + } + + n = n.nextSibling().toElement(); + } + + // ### Evil hack ### See description above. + if ( !sizePolicyElement.isNull() ) { + setObjectProperty( sizePolicyObject, + sizePolicyElement.attribute( "name" ), + sizePolicyElement.firstChild().toElement() ); + } + + if ( w->isWidgetType() ) + widgets.insert( w->name(), w ); + + return TQT_TQOBJECT(w); +} + +void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) +{ + if ( !widget ) + return; + + if ( ::tqqt_cast(widget) && e.tagName() == "column" ) { + TQListView *lv = (TQListView*)widget; + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + bool hasPixmap = FALSE; + TQString txt; + bool clickable = TRUE, resizable = TRUE; + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + txt = v.toString(); + else if ( attrib == "pixmap" ) { + pix = loadPixmap( n.firstChild().toElement().toElement() ); + hasPixmap = !pix.isNull(); + } else if ( attrib == "clickable" ) + clickable = v.toBool(); + else if ( attrib == "resizable" ) + resizable = v.toBool(); + } + n = n.nextSibling().toElement(); + } + lv->addColumn( txt ); + int i = lv->header()->count() - 1; + if ( hasPixmap ) { + lv->header()->setLabel( i, pix, txt ); + } + if ( !clickable ) + lv->header()->setClickEnabled( clickable, i ); + if ( !resizable ) + lv->header()->setResizeEnabled( resizable, i ); + } +#ifndef TQT_NO_TABLE + else if ( ::tqqt_cast(widget) ) { + TQTable *table = (TQTable*)widget; + bool isRow; + if ( ( isRow = e.tagName() == "row" ) ) + table->setNumRows( table->numRows() + 1 ); + else + table->setNumCols( table->numCols() + 1 ); + + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + bool hasPixmap = FALSE; + TQString txt; + TQString field; + TQMap fieldMap = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + txt = v.toString(); + else if ( attrib == "pixmap" ) { + hasPixmap = !n.firstChild().firstChild().toText().data().isEmpty(); + if ( hasPixmap ) + pix = loadPixmap( n.firstChild().toElement() ); + } else if ( attrib == "field" ) + field = v.toString(); + } + n = n.nextSibling().toElement(); + } + + int i = isRow ? table->numRows() - 1 : table->numCols() - 1; + TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); + if ( hasPixmap ) + h->setLabel( i, pix, txt ); + else + h->setLabel( i, txt ); + if ( !isRow && !field.isEmpty() ) + fieldMap.insert( txt, field ); + MetaDataBase::setColumnFields( TQT_TQOBJECT(table), fieldMap ); + } +#endif +} + +void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ) +{ + TQDomElement n = e; + hasPixmap = FALSE; + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + txt = v.toString(); + else if ( attrib == "pixmap" ) { + pix = loadPixmap( n.firstChild().toElement() ); + hasPixmap = !pix.isNull(); + } + } + n = n.nextSibling().toElement(); + } +} + +void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) +{ + if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ), TQT_TQOBJECT(widget) ) ) + return; + + if ( ::tqqt_cast(widget) || ::tqqt_cast(widget) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + bool hasPixmap = FALSE; + TQString txt; + loadItem( n, pix, txt, hasPixmap ); + TQListBox *lb = 0; + if ( ::tqqt_cast(widget) ) + lb = (TQListBox*)widget; + else + lb = ( (TQComboBox*)widget)->listBox(); + if ( hasPixmap ) { + new TQListBoxPixmap( lb, pix, txt ); + } else { + new TQListBoxText( lb, txt ); + } + } else if ( ::tqqt_cast(widget) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + bool hasPixmap = FALSE; + TQString txt; + loadItem( n, pix, txt, hasPixmap ); + TQIconView *iv = (TQIconView*)widget; + if ( hasPixmap ) + new TQIconViewItem( iv, txt, pix ); + else + new TQIconViewItem( iv, txt ); + } else if ( ::tqqt_cast(widget) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + TQValueList pixmaps; + TQStringList textes; + TQListViewItem *item = 0; + TQListView *lv = (TQListView*)widget; + if ( i ) + item = new TQListViewItem( i, lastItem ); + else + item = new TQListViewItem( lv, lastItem ); + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + textes << v.toString(); + else if ( attrib == "pixmap" ) { + TQString s = v.toString(); + if ( s.isEmpty() ) { + pixmaps << TQPixmap(); + } else { + pix = loadPixmap( n.firstChild().toElement() ); + pixmaps << pix; + } + } + } else if ( n.tagName() == "item" ) { + item->setOpen( TRUE ); + createItem( n, widget, item ); + } + + n = n.nextSibling().toElement(); + } + + for ( int i = 0; i < lv->columns(); ++i ) { + item->setText( i, textes[ i ] ); + item->setPixmap( i, pixmaps[ i ] ); + } + lastItem = item; + } +} + +TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ) +{ + TQDomElement n = e.firstChild().toElement(); + int row = e.attribute( "row" ).toInt(); + int col = e.attribute( "column" ).toInt(); + int rowspan = e.attribute( "rowspan" ).toInt(); + int colspan = e.attribute( "colspan" ).toInt(); + if ( rowspan < 1 ) + rowspan = 1; + if ( colspan < 1 ) + colspan = 1; + + Spacer *spacer = (Spacer*) WidgetFactory::create( WidgetDatabase::idFromClassName("Spacer"), + parent, "spacer", FALSE); + spacer->setOrientation( o ); + spacer->setInteraciveMode( FALSE ); + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) + setObjectProperty( TQT_TQOBJECT(spacer), n.attribute( "name" ), n.firstChild().toElement() ); + n = n.nextSibling().toElement(); + } + spacer->setInteraciveMode( TRUE ); + if ( formwindow ) + formwindow->insertWidget( spacer, pasting ); + if ( layout ) { + if ( ::tqqt_cast(layout) ) + ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); + else + ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, + spacer->alignment() ); + } + return spacer; +} + +/*! + Attention: this function has to be in sync with Uic::setObjectProperty(). If you change one, change both. +*/ +void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e ) +{ + const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE ); + + if ( !::tqqt_cast(obj) ) {// no layouts in metadatabase... (RS) + if ( obj->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget(); + if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" ) + return; + } + MetaDataBase::setPropertyChanged( obj, prop, TRUE ); + } + + TQVariant defVarient; + if ( e.tagName() == "font" ) { + TQFont f( tqApp->font() ); + if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() ) + f = ( (TQWidget*)obj )->parentWidget()->font(); + defVarient = TQVariant( f ); + } + + TQString comment; + TQVariant v( DomTool::elementToVariant( e, defVarient, comment ) ); + + if ( !comment.isEmpty() ) { + MetaDataBase::addEntry( obj ); + MetaDataBase::setPropertyComment( obj, prop, comment ); + } + + if ( e.tagName() == "pixmap" ) { + TQPixmap pix = loadPixmap( e ); + if ( pix.isNull() ) + return; + v = TQVariant( pix ); + } else if ( e.tagName() == "iconset" ) { + TQPixmap pix = loadPixmap( e, "iconset" ); + if ( pix.isNull() ) + return; + v = TQVariant( TQIconSet( pix ) ); + } else if ( e.tagName() == "image" ) { + v = TQVariant( loadFromCollection( v.toString() ) ); + } + + if ( !p ) { + MetaDataBase::setFakeProperty( obj, prop, v ); + if ( obj->isWidgetType() ) { + if ( prop == "database" && TQT_TQOBJECT(obj) != TQT_TQOBJECT(toplevel) ) { + TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList(); + if ( lst.count() > 2 ) + dbControls.insert( obj->name(), lst[ 2 ] ); + else if ( lst.count() == 2 ) + dbTables.insert( obj->name(), lst ); + } + return; + } + } + + if ( e.tagName() == "palette" ) { + TQDomElement n = e.firstChild().toElement(); + TQPalette p; + while ( !n.isNull() ) { + TQColorGroup cg; + if ( n.tagName() == "active" ) { + cg = loadColorGroup( n ); + p.setActive( cg ); + } else if ( n.tagName() == "inactive" ) { + cg = loadColorGroup( n ); + p.setInactive( cg ); + } else if ( n.tagName() == "disabled" ) { + cg = loadColorGroup( n ); + p.setDisabled( cg ); + } + n = n.nextSibling().toElement(); + } + v = TQPalette( p ); + } else if ( e.tagName() == "enum" && p && p->isEnumType() && prop != "resizeMode" ) { + TQString key( v.toString() ); + int vi = p->keyToValue( key ); + if ( p->valueToKey( vi ) != key ) + return; // ignore invalid properties + v = TQVariant( vi ); + } else if ( e.tagName() == "set" && p && p->isSetType() ) { + TQString keys( v.toString() ); + TQStringList lst = TQStringList::split( '|', keys ); + TQStrList l; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) + l.append( *it ); + v = TQVariant( p->keysToValue( l ) ); + } + + if ( prop == "caption" ) { + TQCString s1 = v.toCString(); + TQString s2 = v.toString(); + if ( !s2.isEmpty() ) + formwindow->setCaption( s2 ); + else if ( !s1.isEmpty() ) + formwindow->setCaption( s1 ); + } + if ( prop == "icon" ) { + formwindow->setIcon( v.toPixmap() ); + TQString pmk = MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), v.toPixmap().serialNumber() ); + MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), + formwindow->icon()->serialNumber(), pmk ); + } + + if ( prop == "geometry" ) { + if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) { + hadGeometry = TRUE; + toplevel->resize( v.toRect().size() ); + return; + } else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + hadGeometry = TRUE; + formwindow->resize( v.toRect().size() ); + return; + } + } + + if ( ::tqqt_cast(obj) ) { + if ( prop == "spacing" ) { + MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); + return; + } else if ( prop == "margin" ) { + MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); + return; + } else if ( e.tagName() == "enum" && prop == "resizeMode" ) { + MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toString() ); + return; + } + } + + if ( prop == "name" ) { + if ( pasting ) { + TQString s = v.toString(); + formwindow->unify( TQT_TQOBJECT(obj), s, TRUE ); + obj->setName( s ); + return; + } else if ( formwindow && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + formwindow->setName( v.toCString() ); + } + } + + if ( prop == "sizePolicy" ) { + TQSizePolicy sp = v.toSizePolicy(); + sp.setHeightForWidth( ( (TQWidget*)obj )->sizePolicy().hasHeightForWidth() ); + } + + if ( prop == "cursor" ) + MetaDataBase::setCursor( (TQWidget*)obj, v.toCursor() ); + + obj->setProperty( prop, v ); +} + + +TQString Resource::saveInCollection( const TQImage &img ) +{ + TQString imgName = "none"; + TQValueList::Iterator it = images.begin(); + for ( ; it != images.end(); ++it ) { + if ( img == ( *it ).img ) { + imgName = ( *it ).name; + break; + } + } + + if ( imgName == "none" ) { + Image i; + imgName = "image" + TQString::number( images.count() ); + i.name = imgName; + i.img = img; + images.append( i ); + } + return imgName; +} + +void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent ) +{ + TQByteArray ba; + TQBuffer buf( ba ); + buf.open( IO_WriteOnly | IO_Translate ); + TQString format; + bool compress = FALSE; + if (img.hasAlphaBuffer()) { + format = "PNG"; + } else { + format = img.depth() > 1 ? "XPM" : "XBM"; + compress = TRUE; + } + TQImageIO iio( &buf, format ); + iio.setImage( img ); + iio.write(); + buf.close(); + TQByteArray bazip = ba; + int i = 0; + if (compress) { + bazip = tqCompress( ba ); + format += ".GZ"; + // The first 4 bytes in tqCompress() are the length of the unzipped + // format. The XPM.GZ format does not use these. + i = 4; + } + ulong len = bazip.size(); + ts << makeIndent( indent ) << ""; + static const char hexchars[] = "0123456789abcdef"; + for (; i < (int)len; ++i ) { + uchar s = (uchar) bazip[i]; + ts << hexchars[s >> 4]; + ts << hexchars[s & 0x0f]; + } + ts << "" << endl; +} + +void Resource::saveImageCollection( TQTextStream &ts, int indent ) +{ + ts << makeIndent( indent ) << "" << endl; + indent++; + + TQValueList::Iterator it = images.begin(); + for ( ; it != images.end(); ++it ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + saveImageData( (*it).img, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +static TQImage loadImageData( TQDomElement &n2 ) +{ + TQImage img; + TQString data = n2.firstChild().toText().data(); + const int lengthOffset = 4; + int baSize = data.length() / 2 + lengthOffset; + uchar *ba = new uchar[ baSize ]; + for ( int i = lengthOffset; i < baSize; ++i ) { + char h = data[ 2 * (i-lengthOffset) ].latin1(); + char l = data[ 2 * (i-lengthOffset) + 1 ].latin1(); + uchar r = 0; + if ( h <= '9' ) + r += h - '0'; + else + r += h - 'a' + 10; + r = r << 4; + if ( l <= '9' ) + r += l - '0'; + else + r += l - 'a' + 10; + ba[ i ] = r; + } + TQString format = n2.attribute( "format", "PNG" ); + if ( format == "XPM.GZ" || format == "XBM.GZ" ) { + ulong len = n2.attribute( "length" ).toULong(); + if ( len < data.length() * 5 ) + len = data.length() * 5; + // tqUncompress() expects the first 4 bytes to be the expected length of + // the uncompressed data + ba[0] = ( len & 0xff000000 ) >> 24; + ba[1] = ( len & 0x00ff0000 ) >> 16; + ba[2] = ( len & 0x0000ff00 ) >> 8; + ba[3] = ( len & 0x000000ff ); + TQByteArray baunzip = tqUncompress( ba, baSize ); + img.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.find('.')) ); + } else { + img.loadFromData( (const uchar*)ba+lengthOffset, baSize-lengthOffset, format ); + } + delete [] ba; + return img; +} + +void Resource::loadImageCollection( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "image" ) { + Image img; + img.name = n.attribute( "name" ); + TQDomElement n2 = n.firstChild().toElement(); + while ( !n2.isNull() ) { + if ( n2.tagName() == "data" ) + img.img = loadImageData( n2 ); + n2 = n2.nextSibling().toElement(); + } + images.append( img ); + n = n.nextSibling().toElement(); + } + } +} + +TQImage Resource::loadFromCollection( const TQString &name ) +{ + TQValueList::Iterator it = images.begin(); + for ( ; it != images.end(); ++it ) { + if ( ( *it ).name == name ) + return ( *it ).img; + } + return TQImage(); +} + +void Resource::saveConnections( TQTextStream &ts, int indent ) +{ + TQValueList connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) ); + if ( connections.isEmpty() ) + return; + ts << makeIndent( indent ) << "" << endl; + indent++; + TQValueList::Iterator it = connections.begin(); + for ( ; it != connections.end(); ++it ) { + MetaDataBase::Connection conn = *it; + if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 && + qstrcmp( conn.sender->name(), "this" ) != 0 ) || + ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 && + qstrcmp( conn.receiver->name(), "this" ) != 0 ) ) + continue; + if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) && + !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) ) + continue; + + if ( conn.sender->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)conn.sender )->customWidget(); + if ( cw && !cw->hasSignal( conn.signal ) ) + continue; + } + + if ( conn.receiver->inherits( "CustomWidget" ) && !formwindow->isMainContainer( conn.receiver ) ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)conn.receiver )->customWidget(); + if ( cw && !cw->hasSlot( MetaDataBase::normalizeFunction( conn.slot ).latin1() ) ) + continue; + } + + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( conn.sender->name() ) << "" << endl; + ts << makeIndent( indent ) << "" << entitize( conn.signal ) << "" << endl; + ts << makeIndent( indent ) << "" << entitize( conn.receiver->name() ) << "" << endl; + ts << makeIndent( indent ) << "" << entitize( MetaDataBase::normalizeFunction( conn.slot ) ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + TQString lang = formwindow->project()->language(); + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +void Resource::loadConnections( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "connection" ) { + TQString lang = n.attribute( "language", "C++" ); + TQDomElement n2 = n.firstChild().toElement(); + MetaDataBase::Connection conn; + while ( !n2.isNull() ) { + if ( n2.tagName() == "sender" ) { + conn.sender = 0; + TQString name = n2.firstChild().toText().data(); + if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { + conn.sender = TQT_TQOBJECT(toplevel); + } else { + if ( name == "this" ) + name = toplevel->name(); + TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + if ( l ) { + if ( l->first() ) + conn.sender = l->first(); + delete l; + l = 0; + } + if ( !conn.sender ) + conn.sender = formwindow->findAction( name ); + } + } else if ( n2.tagName() == "signal" ) { + conn.signal = n2.firstChild().toText().data(); + } else if ( n2.tagName() == "receiver" ) { + conn.receiver = 0; + TQString name = n2.firstChild().toText().data(); + if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { + conn.receiver = TQT_TQOBJECT(toplevel); + } else { + TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + if ( l ) { + if ( l->first() ) + conn.receiver = l->first(); + delete l; + l = 0; + } + if ( !conn.receiver ) + conn.receiver = formwindow->findAction( name ); + } + } else if ( n2.tagName() == "slot" ) { + conn.slot = n2.firstChild().toText().data(); + } + n2 = n2.nextSibling().toElement(); + } + if ( formwindow ) { + if ( TQT_BASE_OBJECT(conn.sender) == TQT_BASE_OBJECT(formwindow) ) + conn.sender = TQT_TQOBJECT(formwindow->mainContainer()); + if ( TQT_BASE_OBJECT(conn.receiver) == TQT_BASE_OBJECT(formwindow) ) + conn.receiver = TQT_TQOBJECT(formwindow->mainContainer()); + } + if ( conn.sender && conn.receiver ) { + if ( lang == "C++" ) { + MetaDataBase::addConnection( TQT_TQOBJECT(formwindow ? formwindow : toplevel), + conn.sender, conn.signal, conn.receiver, conn.slot ); + } + } + } else if ( n.tagName() == "slot" ) { // compatibility with 2.x + MetaDataBase::Function slot; + slot.specifier = n.attribute( "specifier", "virtual" ); + if ( slot.specifier.isEmpty() ) + slot.specifier = "virtual"; + slot.access = n.attribute( "access", "public" ); + if ( slot.access.isEmpty() ) + slot.access = "public"; + slot.language = n.attribute( "language", "C++" ); + slot.returnType = n.attribute( "returnType", "void" ); + if ( slot.returnType.isEmpty() ) + slot.returnType = "void"; + slot.function = n.firstChild().toText().data(); + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), slot.function, TRUE ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), slot.function, slot.specifier, + slot.access, "slot", slot.language, slot.returnType ); + else + MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), slot.function, slot.function, + slot.specifier, slot.access, + "slot", slot.language, slot.returnType ); + } + n = n.nextSibling().toElement(); + } +} + +void Resource::saveCustomWidgets( TQTextStream &ts, int indent ) +{ + ts << makeIndent( indent ) << "" << endl; + indent++; + + TQPtrList *lst = MetaDataBase::customWidgets(); + for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { + if ( usedCustomWidgets.findIndex( w->className ) == -1 ) + continue; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << w->className << "" << endl; + ts << makeIndent( indent ) << "
    includePolicy == MetaDataBase::CustomWidget::Local ? "local" : "global" ) + << "\">" << w->includeFile << "
    " << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << w->sizeHint.width() << "" << endl; + ts << makeIndent( indent ) << "" << w->sizeHint.height() << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << (int)w->isContainer << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << (int)w->sizePolicy.horData() << "" << endl; + ts << makeIndent( indent ) << "" << (int)w->sizePolicy.verData() << "" << endl; + ts << makeIndent( indent ) << "" << (int)w->sizePolicy.horStretch() << "" << endl; + ts << makeIndent( indent ) << "" << (int)w->sizePolicy.verStretch() << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << saveInCollection( w->pixmap->convertToImage() ) << "" << endl; + if ( !w->lstSignals.isEmpty() ) { + for ( TQValueList::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) + ts << makeIndent( indent ) << "" << entitize( *it ) << "" << endl; + } + if ( !w->lstSlots.isEmpty() ) { + for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) + ts << makeIndent( indent ) << "" << entitize( (*it).function ) << "" << endl; + } + if ( !w->lstProperties.isEmpty() ) { + for ( TQValueList::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it ) + ts << makeIndent( indent ) << "" << entitize( (*it).property ) << "" << endl; + } + indent--; + ts << makeIndent( indent ) << "
    " << endl; + } + + + indent--; + ts << makeIndent( indent ) << "
    " << endl; +} + +void Resource::loadCustomWidgets( const TQDomElement &e, Resource *r ) +{ + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "customwidget" ) { + TQDomElement n2 = n.firstChild().toElement(); + MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget; + while ( !n2.isNull() ) { + if ( n2.tagName() == "class" ) { + w->className = n2.firstChild().toText().data(); + } else if ( n2.tagName() == "header" ) { + w->includeFile = n2.firstChild().toText().data(); + TQString s = n2.attribute( "location" ); + if ( s != "local" ) + w->includePolicy = MetaDataBase::CustomWidget::Global; + else + w->includePolicy = MetaDataBase::CustomWidget::Local; + } else if ( n2.tagName() == "sizehint" ) { + TQDomElement n3 = n2.firstChild().toElement(); + while ( !n3.isNull() ) { + if ( n3.tagName() == "width" ) + w->sizeHint.setWidth( n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "height" ) + w->sizeHint.setHeight( n3.firstChild().toText().data().toInt() ); + n3 = n3.nextSibling().toElement(); + } + } else if ( n2.tagName() == "sizepolicy" ) { + TQDomElement n3 = n2.firstChild().toElement(); + while ( !n3.isNull() ) { + if ( n3.tagName() == "hordata" ) + w->sizePolicy.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "verdata" ) + w->sizePolicy.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "horstretch" ) + w->sizePolicy.setHorStretch( n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "verstretch" ) + w->sizePolicy.setVerStretch( n3.firstChild().toText().data().toInt() ); + n3 = n3.nextSibling().toElement(); + } + } else if ( n2.tagName() == "pixmap" ) { + TQPixmap pix; + if ( r ) { + pix = r->loadPixmap( n2 ); + } else { + TQDomElement n3 = n2.firstChild().toElement(); + TQImage img; + while ( !n3.isNull() ) { + if ( n3.tagName() == "data" ) { + img = loadImageData( n3 ); + } + n3 = n3.nextSibling().toElement(); + } + pix.convertFromImage( img ); + } + w->pixmap = new TQPixmap( pix ); + } else if ( n2.tagName() == "signal" ) { + w->lstSignals.append( n2.firstChild().toText().data().latin1() ); + } else if ( n2.tagName() == "container" ) { + w->isContainer = (bool)n2.firstChild().toText().data().toInt(); + } else if ( n2.tagName() == "slot" ) { + MetaDataBase::Function function; + function.function = n2.firstChild().toText().data().latin1(); + function.access = n2.attribute( "access" ); + function.type = "slot"; + w->lstSlots.append( function ); + } else if ( n2.tagName() == "property" ) { + MetaDataBase::Property property; + property.property = n2.firstChild().toText().data().latin1(); + property.type = n2.attribute( "type" ); + w->lstProperties.append( property ); + } + n2 = n2.nextSibling().toElement(); + } + MetaDataBase::addCustomWidget( w ); + } + n = n.nextSibling().toElement(); + } +} + +void Resource::saveTabOrder( TQTextStream &ts, int indent ) +{ + TQWidgetList l = MetaDataBase::tabOrder( toplevel ); + if ( l.isEmpty() ) + return; + + ts << makeIndent( indent ) << "" << endl; + indent++; + + for ( TQWidget *w = l.first(); w; w = l.next() ) { + if ( w->testWState( TQt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 ) + continue; + ts << makeIndent( indent ) << "" << w->name() << "" << endl; + } + + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +void Resource::loadTabOrder( const TQDomElement &e ) +{ + TQWidget *last = 0; + TQDomElement n = e.firstChild().toElement(); + TQWidgetList widgets; + while ( !n.isNull() ) { + if ( n.tagName() == "tabstop" ) { + TQString name = n.firstChild().toText().data(); + if ( name.isEmpty() ) + continue; + TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + if ( l ) { + if ( l->first() ) { + TQWidget *w = (TQWidget*)l->first(); + widgets.append( w ); + if ( last ) + toplevel->setTabOrder( last, w ); + last = w; + } + delete l; + } + } + n = n.nextSibling().toElement(); + } + + if ( !widgets.isEmpty() ) + MetaDataBase::setTabOrder( toplevel, widgets ); +} + +void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) +{ + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); + TQString cn; + if ( info.classNameChanged && !info.className.isEmpty() ) + cn = info.className; + else + cn = formwindow->name(); + ts << makeIndent( indent ) << "" << entitize( cn ) << "" << endl; + if ( !info.comment.isEmpty() ) + ts << makeIndent( indent ) << "" << entitize( info.comment ) << "" << endl; + if ( !info.author.isEmpty() ) + ts << makeIndent( indent ) << "" << entitize( info.author ) << "" << endl; +} + +void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) +{ + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); + if ( !langIface || formwindow->project()->isCpp() ) { + TQValueList includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) ); + TQString extensionInclude; + bool needExtensionInclude = FALSE; + if ( langIface && + formwindow->formFile()->hasFormCode() && + formwindow->formFile()->codeFileState() != FormFile::Deleted ) { + extensionInclude = TQFileInfo( currFileName ).fileName() + langIface->formCodeExtension(); + needExtensionInclude = TRUE; + } + if ( !includes.isEmpty() || needExtensionInclude ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + + for ( TQValueList::Iterator it = includes.begin(); it != includes.end(); ++it ) { + ts << makeIndent( indent ) << "" << (*it).header << "" << endl; + if ( needExtensionInclude ) + needExtensionInclude = (*it).header != extensionInclude; + } + + if ( needExtensionInclude ) + ts << makeIndent( indent ) << "" + << extensionInclude << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + TQStringList forwards = MetaDataBase::forwards( TQT_TQOBJECT(formwindow) ); + if ( !forwards.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + for ( TQStringList::Iterator it2 = forwards.begin(); it2 != forwards.end(); ++it2 ) + ts << makeIndent( indent ) << "" << entitize( *it2 ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + TQValueList varLst = MetaDataBase::variables( TQT_TQOBJECT(formwindow) ); + if ( !varLst.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + + TQValueList::Iterator it = varLst.begin(); + for ( ; it != varLst.end(); ++it ) { + ts << makeIndent( indent ) << "" << entitize( (*it).varName ) << "
    " << endl; + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } + TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) ); + if ( !sigs.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + for ( TQStringList::Iterator it3 = sigs.begin(); it3 != sigs.end(); ++it3 ) + ts << makeIndent( indent ) << "" << entitize( *it3 ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + TQValueList slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ); + if ( !slotList.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQString lang = formwindow->project()->language(); + TQValueList::Iterator it = slotList.begin(); + for ( ; it != slotList.end(); ++it ) { + MetaDataBase::Function function = *it; + ts << makeIndent( indent ) << "" << entitize( function.function ) << "" << endl; + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formwindow), TRUE ); + if ( !functionList.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQString lang = formwindow->project()->language(); + TQValueList::Iterator it = functionList.begin(); + for ( ; it != functionList.end(); ++it ) { + MetaDataBase::Function function = *it; + ts << makeIndent( indent ) << "" << entitize( function.function ) << "
    " << endl; + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + + if ( formwindow && formwindow->savePixmapInline() ) + ; + else if ( formwindow && formwindow->savePixmapInProject() ) + ts << makeIndent( indent ) << "" << endl; + else + ts << makeIndent( indent ) << "" << formwindow->pixmapLoaderFunction() << "" << endl; + if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() ) + ts << makeIndent( indent ) << "" << exportMacro << "" << endl; + if ( formwindow ) { + ts << makeIndent( indent ) << "layoutDefaultSpacing() + << "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << endl; + if ( formwindow->hasLayoutFunctions() ) { + TQString s = ""; + TQString m = ""; + if ( !formwindow->spacingFunction().isEmpty() ) + s = TQString( " spacing=\"%1\"" ).arg( formwindow->spacingFunction() ); + if ( !formwindow->marginFunction().isEmpty() ) + m = TQString( " margin=\"%1\"" ).arg( formwindow->marginFunction() ); + ts << makeIndent( indent ) << "" << endl; + } + } +} + +void Resource::saveIncludeHints( TQTextStream &ts, int indent ) +{ + if ( includeHints.isEmpty() ) + return; + ts << makeIndent( indent ) << "" << endl; + indent++; + for ( TQStringList::Iterator it = includeHints.begin(); it != includeHints.end(); ++it ) + ts << makeIndent( indent ) << "" << *it << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +TQColorGroup Resource::loadColorGroup( const TQDomElement &e ) +{ + TQColorGroup cg; + int r = -1; + TQDomElement n = e.firstChild().toElement(); + TQColor col; + while ( !n.isNull() ) { + if ( n.tagName() == "color" ) { + r++; + cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) ); + } else if ( n.tagName() == "pixmap" ) { + TQPixmap pix = loadPixmap( n ); + cg.setBrush( (TQColorGroup::ColorRole)r, TQBrush( col, pix ) ); + } + n = n.nextSibling().toElement(); + } + return cg; +} + +void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent ) +{ + TQObjectList clo = a->childrenListObject(); + if ( clo.isEmpty() ) + return; + TQObjectListIt it( clo ); + while ( it.current() ) { + TQObject *o = it.current(); + ++it; + if ( !::tqqt_cast(o) ) + continue; + TQAction *ac = (TQAction*)o; + bool isGroup = ::tqqt_cast(ac); + if ( isGroup ) + ts << makeIndent( indent ) << "" << endl; + else + ts << makeIndent( indent ) << "" << endl; + indent++; + saveObjectProperties( ac, ts, indent ); + indent--; + if ( isGroup ) { + indent++; + saveChildActions( ac, ts, indent ); + indent--; + } + if ( isGroup ) + ts << makeIndent( indent ) << "" << endl; + else + ts << makeIndent( indent ) << "" << endl; + } +} + +void Resource::saveActions( const TQPtrList &actions, TQTextStream &ts, int indent ) +{ + if ( actions.isEmpty() ) + return; + ts << makeIndent( indent ) << "" << endl; + indent++; + TQPtrListIterator it( actions ); + while ( it.current() ) { + TQAction *a = it.current(); + bool isGroup = ::tqqt_cast(a); + if ( isGroup ) + ts << makeIndent( indent ) << "" << endl; + else + ts << makeIndent( indent ) << "" << endl; + indent++; + saveObjectProperties( a, ts, indent ); + indent--; + if ( isGroup ) { + indent++; + saveChildActions( a, ts, indent ); + indent--; + } + if ( isGroup ) + ts << makeIndent( indent ) << "" << endl; + else + ts << makeIndent( indent ) << "" << endl; + ++it; + } + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) +{ + TQDomElement n = e; + TQAction *a = 0; + if ( n.tagName() == "action" ) { + a = new QDesignerAction( parent ); + MetaDataBase::addEntry( a ); + TQDomElement n2 = n.firstChild().toElement(); + bool hasMenuText = FALSE; + while ( !n2.isNull() ) { + if ( n2.tagName() == "property" ) { + TQDomElement n3(n2); // don't modify n2 + TQString prop = n3.attribute( "name" ); + if (prop == "menuText") + hasMenuText = TRUE; + TQDomElement value(n3.firstChild().toElement()); + setObjectProperty( a, prop, value ); + if (!hasMenuText && uiFileVersion < "3.3" && prop == "text") + setObjectProperty( a, "menuText", value ); + } + n2 = n2.nextSibling().toElement(); + } + if ( !::tqqt_cast(parent) ) + formwindow->actionList().append( a ); + } else if ( n.tagName() == "actiongroup" ) { + a = new QDesignerActionGroup( parent ); + MetaDataBase::addEntry( a ); + TQDomElement n2 = n.firstChild().toElement(); + bool hasMenuText = FALSE; + while ( !n2.isNull() ) { + if ( n2.tagName() == "property" ) { + TQDomElement n3(n2); // don't modify n2 + TQString prop = n3.attribute( "name" ); + if (prop == "menuText") + hasMenuText = TRUE; + TQDomElement value = n3.firstChild().toElement(); + setObjectProperty( a, prop, value ); + if (!hasMenuText && uiFileVersion < "3.3" && prop == "text") + setObjectProperty( a, "menuText", value ); + } else if ( n2.tagName() == "action" || + n2.tagName() == "actiongroup" ) { + loadChildAction( a, n2 ); + } + n2 = n2.nextSibling().toElement(); + } + if ( !::tqqt_cast(parent) ) + formwindow->actionList().append( a ); + } +} + +void Resource::loadActions( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "action" ) { + loadChildAction( TQT_TQOBJECT(formwindow), n ); + } else if ( n.tagName() == "actiongroup" ) { + loadChildAction( TQT_TQOBJECT(formwindow), n ); + } + n = n.nextSibling().toElement(); + } +} + +void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) +{ + ts << makeIndent( indent ) << "" << endl; + indent++; + + TQPtrList tbList; + for ( int i = 0; i <= (int)TQt::DockMinimized; ++i ) { + tbList = mw->toolBars( (TQt::Dock)i ); + if ( tbList.isEmpty() ) + continue; + for ( TQToolBar *tb = tbList.first(); tb; tb = tbList.next() ) { + if ( tb->isHidden() ) + continue; + ts << makeIndent( indent ) << "" << endl; + indent++; + saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); + TQPtrList actionList = ( (QDesignerToolBar*)tb )->insertedActions(); + for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { + if ( ::tqqt_cast(a) ) { + ts << makeIndent( indent ) << "" << endl; + } else { + if ( ::tqqt_cast(a) && !( (QDesignerAction*)a )->supportsMenu() ) { + TQWidget *w = ( (QDesignerAction*)a )->widget(); + ts << makeIndent( indent ) << "" << endl; + indent++; + const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + if ( w->isA( "CustomWidget" ) ) + usedCustomWidgets << TQString( className ); + if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) + saveItems( TQT_TQOBJECT(w), ts, indent ); + saveObjectProperties( TQT_TQOBJECT(w), ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } else { + ts << makeIndent( indent ) << "name() << "\"/>" << endl; + } + } + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) +{ + MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); + if ( !mb ) + return; + ts << makeIndent( indent ) << "" << endl; + indent++; + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mb), "name", TRUE ); // FIXME: remove + saveObjectProperties( TQT_TQOBJECT(mb), ts, indent ); + + for ( int i = 0; i < (int)mb->count(); ++i ) { + MenuBarEditorItem *m = mb->item( i ); + if ( !m ) + continue; + if ( m->isSeparator() ) { + ts << makeIndent( indent ) << "" << endl; + } else { + ts << makeIndent( indent ) << "menuText() ) + << "\" name=\"" << entitize( m->menu()->name() ) << "\">" << endl; + indent++; + savePopupMenu( m->menu(), mw, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStream &ts, int indent ) +{ + for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) { + TQAction *a = i->action(); + if ( ::tqqt_cast(a) ) + ts << makeIndent( indent ) << "" << endl; + else if ( ::tqqt_cast(a) ) + ts << makeIndent( indent ) << "name() << "\"/>" << endl; + else if ( ::tqqt_cast(a) ) + ts << makeIndent( indent ) << "name() << "\"/>" << endl; + PopupMenuEditor *s = i->subMenu(); + if ( s && s->count() ) { + TQString n = s->name(); + ts << makeIndent( indent ) << "menuText() ) + << "\" name=\"" << entitize( n ) + << "\" accel=\"" << entitize( a->accel() ) + << "\">" << endl; + indent++; + savePopupMenu( s, mw, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } +} + +void Resource::loadToolBars( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() ); + QDesignerToolBar *tb = 0; + while ( !n.isNull() ) { + if ( n.tagName() == "toolbar" ) { + TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt(); + tb = new QDesignerToolBar( mw, dock ); + TQDomElement n2 = n.firstChild().toElement(); + while ( !n2.isNull() ) { + if ( n2.tagName() == "action" ) { + TQAction *a = formwindow->findAction( n2.attribute( "name" ) ); + if ( a ) { + a->addTo( tb ); + tb->addAction( a ); + } + } else if ( n2.tagName() == "separator" ) { + TQAction *a = new QSeparatorAction( 0 ); + a->addTo( tb ); + tb->addAction( a ); + } else if ( n2.tagName() == "widget" ) { + TQWidget *w = (TQWidget*)createObject( n2, tb ); + QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) ); + a->addTo( tb ); + tb->addAction( a ); + tb->installEventFilters( w ); + } else if ( n2.tagName() == "property" ) { + setObjectProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); + } + n2 = n2.nextSibling().toElement(); + } + } + n = n.nextSibling().toElement(); + } +} + +void Resource::loadMenuBar( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + TQMainWindow *mw = (TQMainWindow*)formwindow->mainContainer(); + MenuBarEditor *mb = new MenuBarEditor( formwindow, mw ); + MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); + while ( !n.isNull() ) { + if ( n.tagName() == "item" ) { + PopupMenuEditor * popup = new PopupMenuEditor( formwindow, mw ); + loadPopupMenu( popup, n ); + popup->setName( n.attribute( "name" ) ); + mb->insertItem( n.attribute( "text" ), popup ); + MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); + } else if ( n.tagName() == "property" ) { + setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); + } else if ( n.tagName() == "separator" ) { + mb->insertSeparator(); + } + n = n.nextSibling().toElement(); + } +} + +void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e ) +{ + MetaDataBase::addEntry( TQT_TQOBJECT(p) ); + TQDomElement n = e.firstChild().toElement(); + TQAction *a = 0; + while ( !n.isNull() ) { + if ( n.tagName() == "action" || n.tagName() == "actiongroup") { + a = formwindow->findAction( n.attribute( "name" ) ); + if ( a ) + p->insert( a ); + } + if ( n.tagName() == "item" ) { + PopupMenuEditorItem *i = p->at( p->find( a ) ); + if ( i ) { + TQString name = n.attribute( "name" ); + formwindow->unify( i, name, TRUE ); + i->setName( name ); + MetaDataBase::addEntry( i ); + loadPopupMenu( i->subMenu(), n ); + } + } else if ( n.tagName() == "separator" ) { + a = new QSeparatorAction( 0 ); + p->insert( a ); + } + n = n.nextSibling().toElement(); + } +} + +bool Resource::saveFormCode( FormFile *formfile, LanguageInterface * /*langIface*/ ) +{ + TQString lang = formfile->project()->language(); + if ( formfile->hasTempFileName() || + formfile->code().isEmpty() || + !formfile->hasFormCode() || + !formfile->isModified(FormFile::WFormCode) ) + return TRUE; // There is no code to be saved. + return saveCode( formfile->project()->makeAbsolute(formfile->codeFile()), + formfile->code() ); +} + +void Resource::loadExtraSource( FormFile *formfile, const TQString &currFileName, + LanguageInterface *langIface, bool hasFunctions ) +{ + TQString lang = "TQt Script"; + if ( MainWindow::self ) + lang = MainWindow::self->currProject()->language(); + LanguageInterface *iface = langIface; + if ( hasFunctions || !iface ) + return; + TQValueList functions; + TQStringList forwards; + TQStringList includesImpl; + TQStringList includesDecl; + TQStringList vars; + TQValueList connections; + + iface->loadFormCode( formfile->formName(), + currFileName + iface->formCodeExtension(), + functions, + vars, + connections ); + + TQFile f( formfile->project()->makeAbsolute( formfile->codeFile() ) ); + TQString code; + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + code = ts.read(); + } + formfile->setCode( code ); + + if ( !MainWindow::self || !MainWindow::self->currProject()->isCpp() ) + MetaDataBase::setupConnections( formfile, connections ); + + for ( TQValueList::Iterator fit = functions.begin(); + fit != functions.end(); ++fit ) { + + if ( MetaDataBase::hasFunction( formfile->formWindow() ? + (TQObject*)formfile->formWindow() : + (TQObject*)formfile, + (*fit).name.latin1() ) ) { + TQString access = (*fit).access; + if ( !MainWindow::self || !MainWindow::self->currProject()->isCpp() ) + MetaDataBase::changeFunction( formfile->formWindow() ? + (TQObject*)formfile->formWindow() : + (TQObject*)formfile, + (*fit).name, + (*fit).name, + TQString() ); + } else { + TQString access = (*fit).access; + if ( access.isEmpty() ) + access = "protected"; + TQString type = "function"; + if ( (*fit).returnType == "void" ) + type = "slot"; + MetaDataBase::addFunction( formfile->formWindow() ? + (TQObject*)formfile->formWindow() : + (TQObject*)formfile, + (*fit).name.latin1(), "virtual", (*fit).access, + type, lang, (*fit).returnType ); + } + } +} diff --git a/kdevdesigner/designer/resource.h b/kdevdesigner/designer/resource.h new file mode 100644 index 00000000..06598254 --- /dev/null +++ b/kdevdesigner/designer/resource.h @@ -0,0 +1,165 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef RESOURCE_H +#define RESOURCE_H + +#include +#include +#include +#include +#include +#include "actiondnd.h" + +#include "metadatabase.h" + +class TQWidget; +class TQObject; +class TQLayout; +class TQStyle; +class TQPalette; +class FormWindow; +class MainWindow; +class TQDomElement; +class QDesignerGridLayout; +class TQListViewItem; +class TQMainWindow; +struct LanguageInterface; +class FormFile; +class Project; +class PopupMenuEditor; + +class Resource +{ +public: + struct Image { + TQImage img; + TQString name; + bool operator==( const Image &i ) const { + return ( i.name == name && + i.img == img ); + } + }; + + Resource(); + Resource( MainWindow* mw ); + ~Resource(); + + void setWidget( FormWindow *w ); + TQWidget *widget() const; + + bool load( FormFile *ff, Project *defProject = 0 ); + bool load( FormFile *ff, TQIODevice*, Project *defProject = 0 ); + TQString copy(); + + bool save( const TQString& filename, bool formCodeOnly = FALSE); + bool save( TQIODevice* ); + void paste( const TQString &cb, TQWidget *parent ); + + static void saveImageData( const TQImage &img, TQTextStream &ts, int indent ); + static void loadCustomWidgets( const TQDomElement &e, Resource *r ); + static void loadExtraSource( FormFile *formfile, const TQString &currFileName, + LanguageInterface *langIface, bool hasFunctions ); + static bool saveFormCode( FormFile *formfile, LanguageInterface *langIface ); + +private: + void saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ); + void saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ); + void saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ); + void saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent ); + void saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent ); + void saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent ); + void saveProperty( const TQVariant &value, TQTextStream &ts, int indent ); + void saveItems( TQObject *obj, TQTextStream &ts, int indent ); + void saveItem( const TQStringList &text, const TQPtrList &pixmaps, TQTextStream &ts, int indent ); + void saveItem( TQListViewItem *i, TQTextStream &ts, int indent ); + void saveConnections( TQTextStream &ts, int indent ); + void saveCustomWidgets( TQTextStream &ts, int indent ); + void saveTabOrder( TQTextStream &ts, int indent ); + void saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup &cg ); + void saveColor( TQTextStream &ts, int indent, const TQColor &c ); + void saveMetaInfoBefore( TQTextStream &ts, int indent ); + void saveMetaInfoAfter( TQTextStream &ts, int indent ); + void saveIncludeHints( TQTextStream &ts, int indent ); + void savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname = "pixmap" ); + void saveActions( const TQPtrList &actions, TQTextStream &ts, int indent ); + void saveChildActions( TQAction *a, TQTextStream &ts, int indent ); + void saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ); + void saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ); + void savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStream &ts, int indent ); + + TQObject *createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout = 0 ); + TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ); + void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 ); + void createColumn( const TQDomElement &e, TQWidget *widget ); + void setObjectProperty( TQObject* widget, const TQString &prop, const TQDomElement &e); + TQString saveInCollection( const TQImage &img ); + TQString saveInCollection( const TQPixmap &pix ) { return saveInCollection( pix.convertToImage() ); } + TQImage loadFromCollection( const TQString &name ); + void saveImageCollection( TQTextStream &ts, int indent ); + void loadImageCollection( const TQDomElement &e ); + void loadConnections( const TQDomElement &e ); + void loadTabOrder( const TQDomElement &e ); + void loadItem( const TQDomElement &n, TQPixmap &pix, TQString &txt, bool &hasPixmap ); + void loadActions( const TQDomElement &n ); + void loadChildAction( TQObject *parent, const TQDomElement &e ); + void loadToolBars( const TQDomElement &n ); + void loadMenuBar( const TQDomElement &n ); + void loadPopupMenu( PopupMenuEditor *pm, const TQDomElement &e ); + TQColorGroup loadColorGroup( const TQDomElement &e ); + TQPixmap loadPixmap( const TQDomElement &e, const TQString &tagname = "pixmap" ); + +private: + MainWindow *mainwindow; + FormWindow *formwindow; + TQWidget* toplevel; + TQValueList images; + bool copying, pasting; + bool mainContainerSet; + TQStringList knownNames; + TQStringList usedCustomWidgets; + TQListViewItem *lastItem; + + TQValueList metaIncludes; + TQValueList metaVariables; + TQStringList metaForwards; + TQStringList metaSignals; + MetaDataBase::MetaInfo metaInfo; + TQMap dbControls; + TQMap dbTables; + TQMap widgets; + TQString exportMacro; + bool hadGeometry; + TQMap > langConnections; + TQString currFileName; + LanguageInterface *langIface; + bool hasFunctions; + TQStringList includeHints; + + TQString uiFileVersion; +}; + +#endif diff --git a/kdevdesigner/designer/richtextfontdialog.ui b/kdevdesigner/designer/richtextfontdialog.ui new file mode 100644 index 00000000..d7d6c5a7 --- /dev/null +++ b/kdevdesigner/designer/richtextfontdialog.ui @@ -0,0 +1,347 @@ + +RichTextFontDialog +********************************************************************* +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + RichTextFontDialog + + + + 0 + 0 + 255 + 158 + + + + Font Properties + + + true + + + + unnamed + + + 11 + + + 6 + + + + Layout6 + + + + unnamed + + + 0 + + + 6 + + + + + default + + + + fontCombo + + + + + TextLabel1_2 + + + &Font: + + + fontCombo + + + + + TextLabel2 + + + Rel. &size: + + + fontSizeCombo + + + + + Spacer13 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + TextLabel1 + + + C&olor: + + + colorButton + + + + + + 0 + + + + + -4 + + + + + -3 + + + + + -2 + + + + + -1 + + + + + +1 + + + + + +2 + + + + + +3 + + + + + +4 + + + + fontSizeCombo + + + true + + + AtTop + + + + + colorButton + + + + 0 + 0 + 0 + 0 + + + + + 40 + 20 + + + + + 0 + 0 + 0 + + + + TabFocus + + + + + + + + + + Spacer14 + + + Vertical + + + Expanding + + + + 20 + 16 + + + + + + Line1 + + + HLine + + + Sunken + + + Horizontal + + + + + Layout15 + + + + unnamed + + + 0 + + + 6 + + + + Spacer12 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + okButton + + + &OK + + + + + cancelButton + + + &Cancel + + + + + + + + + colorButton + clicked() + RichTextFontDialog + selectColor() + + + okButton + clicked() + RichTextFontDialog + accept() + + + cancelButton + clicked() + RichTextFontDialog + reject() + + + + fontCombo + fontSizeCombo + colorButton + okButton + cancelButton + + + richtextfontdialog.ui.h + + + QString font + QColor color + QString size + + + init() + selectColor() + accept() + reject() + getSize() + getColor() + getFont() + + + diff --git a/kdevdesigner/designer/richtextfontdialog.ui.h b/kdevdesigner/designer/richtextfontdialog.ui.h new file mode 100644 index 00000000..27a11a21 --- /dev/null +++ b/kdevdesigner/designer/richtextfontdialog.ui.h @@ -0,0 +1,49 @@ +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +** +** If you wish to add, delete or rename slots use TQt Designer which will +** update this file, preserving your code. Create an init() slot in place of +** a constructor, and a destroy() slot in place of a destructor. +*****************************************************************************/ +#include +#include + +void RichTextFontDialog::init() +{ + TQFontDatabase *db = new TQFontDatabase(); + fontCombo->insertStringList( db->families() ); +} + +void RichTextFontDialog::selectColor() +{ + color = TQColorDialog::getColor( "", this ); + if( color.isValid() ) + colorButton->setPaletteBackgroundColor( color ); +} + +void RichTextFontDialog::accept() +{ + size = fontSizeCombo->currentText(); + font = fontCombo->currentText(); + done( Accepted ); +} + +void RichTextFontDialog::reject() +{ + done( Rejected ); +} + +TQString RichTextFontDialog::getSize() +{ + return size; +} + +TQString RichTextFontDialog::getColor() +{ + return color.name(); +} + +TQString RichTextFontDialog::getFont() +{ + return font; +} diff --git a/kdevdesigner/designer/sizehandle.cpp b/kdevdesigner/designer/sizehandle.cpp new file mode 100644 index 00000000..d60f223b --- /dev/null +++ b/kdevdesigner/designer/sizehandle.cpp @@ -0,0 +1,388 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include // HP-UX compiler needs this here + +#include "sizehandle.h" +#include "formwindow.h" +#include "widgetfactory.h" + +#include +#include +#include +#include + +SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s ) + : TQWidget( parent ) +{ + active = TRUE; + setBackgroundMode( active ? PaletteText : PaletteDark ); + setFixedSize( 6, 6 ); + widget = 0; + dir =d ; + setMouseTracking( FALSE ); + formWindow = parent; + sel = s; + updateCursor(); +} + +void SizeHandle::updateCursor() +{ + if ( !active ) { + setCursor( arrowCursor ); + return; + } + + switch ( dir ) { + case LeftTop: + setCursor( sizeFDiagCursor ); + break; + case Top: + setCursor( sizeVerCursor ); + break; + case RightTop: + setCursor( sizeBDiagCursor ); + break; + case Right: + setCursor( sizeHorCursor ); + break; + case RightBottom: + setCursor( sizeFDiagCursor ); + break; + case Bottom: + setCursor( sizeVerCursor ); + break; + case LeftBottom: + setCursor( sizeBDiagCursor ); + break; + case Left: + setCursor( sizeHorCursor ); + break; + } +} + +void SizeHandle::setActive( bool a ) +{ + active = a; + setBackgroundMode( active ? PaletteText : PaletteDark ); + updateCursor(); +} + +void SizeHandle::setWidget( TQWidget *w ) +{ + widget = w; +} + +void SizeHandle::paintEvent( TQPaintEvent * ) +{ + if ( ( (FormWindow*)parentWidget() )->currentWidget() != widget ) + return; + TQPainter p( this ); + p.setPen( blue ); + p.drawRect( 0, 0, width(), height() ); +} + +void SizeHandle::mousePressEvent( TQMouseEvent *e ) +{ + if ( !widget || e->button() != Qt::LeftButton || !active ) + return; + oldPressPos = e->pos(); + geom = origGeom = TQRect( widget->pos(), widget->size() ); +} + +void SizeHandle::mouseMoveEvent( TQMouseEvent *e ) +{ + if ( !widget || ( e->state() & Qt::LeftButton ) != Qt::LeftButton || !active ) + return; + TQPoint rp = mapFromGlobal( e->globalPos() ); + TQPoint d = oldPressPos - rp; + oldPressPos = rp; + TQPoint checkPos = widget->parentWidget()->mapFromGlobal( e->globalPos() ); + TQRect pr = widget->parentWidget()->rect(); + + // ##### move code around a bit to reduce duplicated code here + switch ( dir ) { + case LeftTop: { + if ( checkPos.x() > pr.width() - 2 * width() || checkPos.y() > pr.height() - 2 * height() ) + return; + int w = geom.width() + d.x(); + geom.setWidth( w ); + w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); + int h = geom.height() + d.y(); + geom.setHeight( h ); + h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); + int dx = widget->width() - w; + int dy = widget->height() - h; + trySetGeometry( widget, widget->x() + dx, widget->y() + dy, w, h ); + } break; + case Top: { + if ( checkPos.y() > pr.height() - 2 * height() ) + return; + int h = geom.height() + d.y(); + geom.setHeight( h ); + h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); + int dy = widget->height() - h; + trySetGeometry( widget, widget->x(), widget->y() + dy, widget->width(), h ); + } break; + case RightTop: { + if ( checkPos.x() < 2 * width() || checkPos.y() > pr.height() - 2 * height() ) + return; + int h = geom.height() + d.y(); + geom.setHeight( h ); + h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); + int dy = widget->height() - h; + int w = geom.width() - d.x(); + geom.setWidth( w ); + w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); + trySetGeometry( widget, widget->x(), widget->y() + dy, w, h ); + } break; + case Right: { + if ( checkPos.x() < 2 * width() ) + return; + int w = geom.width() - d.x(); + geom.setWidth( w ); + w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); + tryResize( widget, w, widget->height() ); + } break; + case RightBottom: { + if ( checkPos.x() < 2 * width() || checkPos.y() < 2 * height() ) + return; + int w = geom.width() - d.x(); + geom.setWidth( w ); + w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); + int h = geom.height() - d.y(); + geom.setHeight( h ); + h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); + tryResize( widget, w, h ); + } break; + case Bottom: { + if ( checkPos.y() < 2 * height() ) + return; + int h = geom.height() - d.y(); + geom.setHeight( h ); + h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); + tryResize( widget, widget->width(), h ); + } break; + case LeftBottom: { + if ( checkPos.x() > pr.width() - 2 * width() || checkPos.y() < 2 * height() ) + return; + int w = geom.width() + d.x(); + geom.setWidth( w ); + w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); + int dx = widget->width() - w; + int h = geom.height() - d.y(); + geom.setHeight( h ); + h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); + trySetGeometry( widget, widget->x() + dx, widget->y(), w, h ); + } break; + case Left: { + if ( checkPos.x() > pr.width() - 2 * width() ) + return; + int w = geom.width() + d.x(); + geom.setWidth( w ); + w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); + int dx = widget->width() - w; + trySetGeometry( widget, widget->x() + dx, widget->y(), w, widget->height() ); + } break; + } + + TQPoint p = pos(); + sel->updateGeometry(); + oldPressPos += ( p - pos() ); + + formWindow->sizePreview()->setText( i18n( "%1/%2" ).arg( widget->width() ).arg( widget->height() ) ); + formWindow->sizePreview()->adjustSize(); + TQRect lg( formWindow->mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), + formWindow->sizePreview()->size() ); + formWindow->checkPreviewGeometry( lg ); + formWindow->sizePreview()->setGeometry( lg ); + formWindow->sizePreview()->show(); + formWindow->sizePreview()->raise(); + if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) + formWindow->updateChildSelections( widget ); +} + +void SizeHandle::mouseReleaseEvent( TQMouseEvent *e ) +{ + if ( e->button() != Qt::LeftButton || !active ) + return; + + formWindow->sizePreview()->hide(); + if ( geom != widget->geometry() ) + formWindow->commandHistory()->addCommand( new ResizeCommand( i18n( "Resize" ), + formWindow, + widget, origGeom, + widget->geometry() ) ); + formWindow->emitUpdateProperties( TQT_TQOBJECT(widget) ); +} + +void SizeHandle::trySetGeometry( TQWidget *w, int x, int y, int width, int height ) +{ + int minw = TQMAX( w->minimumSizeHint().width(), w->minimumSize().width() ); + minw = TQMAX( minw, 2 * formWindow->grid().x() ); + int minh = TQMAX( w->minimumSizeHint().height(), w->minimumSize().height() ); + minh = TQMAX( minh, 2 * formWindow->grid().y() ); + if ( TQMAX( minw, width ) > w->maximumWidth() || + TQMAX( minh, height ) > w->maximumHeight() ) + return; + if ( width < minw && x != w->x() ) + x -= minw - width; + if ( height < minh && y != w->y() ) + y -= minh - height; + w->setGeometry( x, y, TQMAX( minw, width ), TQMAX( minh, height ) ); +} + +void SizeHandle::tryResize( TQWidget *w, int width, int height ) +{ + int minw = TQMAX( w->minimumSizeHint().width(), w->minimumSize().width() ); + minw = TQMAX( minw, 16 ); + int minh = TQMAX( w->minimumSizeHint().height(), w->minimumSize().height() ); + minh = TQMAX( minh, 16 ); + w->resize( TQMAX( minw, width ), TQMAX( minh, height ) ); +} + +// ------------------------------------------------------------------------ + +WidgetSelection::WidgetSelection( FormWindow *parent, TQPtrDict *selDict ) + : selectionDict( selDict ) +{ + formWindow = parent; + for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { + handles.insert( i, new SizeHandle( formWindow, (SizeHandle::Direction)i, this ) ); + } + hide(); +} + +void WidgetSelection::setWidget( TQWidget *w, bool updateDict ) +{ + if ( !w ) { + hide(); + if ( updateDict ) + selectionDict->remove( wid ); + wid = 0; + return; + } + + wid = w; + bool active = !wid->parentWidget() || WidgetFactory::layoutType( wid->parentWidget() ) == WidgetFactory::NoLayout; + for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { + SizeHandle *h = handles[ i ]; + if ( h ) { + h->setWidget( wid ); + h->setActive( active ); + } + } + updateGeometry(); + show(); + if ( updateDict ) + selectionDict->insert( w, this ); +} + +bool WidgetSelection::isUsed() const +{ + return wid != 0; +} + +void WidgetSelection::updateGeometry() +{ + if ( !wid || !wid->parentWidget() ) + return; + + TQPoint p = wid->parentWidget()->mapToGlobal( wid->pos() ); + p = formWindow->mapFromGlobal( p ); + TQRect r( p, wid->size() ); + + int w = 6; + int h = 6; + + for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { + SizeHandle *hndl = handles[ i ]; + if ( !hndl ) + continue; + switch ( i ) { + case SizeHandle::LeftTop: + hndl->move( r.x() - w / 2, r.y() - h / 2 ); + break; + case SizeHandle::Top: + hndl->move( r.x() + r.width() / 2 - w / 2, r.y() - h / 2 ); + break; + case SizeHandle::RightTop: + hndl->move( r.x() + r.width() - w / 2, r.y() - h / 2 ); + break; + case SizeHandle::Right: + hndl->move( r.x() + r.width() - w / 2, r.y() + r.height() / 2 - h / 2 ); + break; + case SizeHandle::RightBottom: + hndl->move( r.x() + r.width() - w / 2, r.y() + r.height() - h / 2 ); + break; + case SizeHandle::Bottom: + hndl->move( r.x() + r.width() / 2 - w / 2, r.y() + r.height() - h / 2 ); + break; + case SizeHandle::LeftBottom: + hndl->move( r.x() - w / 2, r.y() + r.height() - h / 2 ); + break; + case SizeHandle::Left: + hndl->move( r.x() - w / 2, r.y() + r.height() / 2 - h / 2 ); + break; + default: + break; + } + } +} + +void WidgetSelection::hide() +{ + for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { + SizeHandle *h = handles[ i ]; + if ( h ) + h->hide(); + } +} + +void WidgetSelection::show() +{ + for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { + SizeHandle *h = handles[ i ]; + if ( h ) { + h->show(); + h->raise(); + } + } +} + +void WidgetSelection::update() +{ + for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { + SizeHandle *h = handles[ i ]; + if ( h ) + h->update(); + } +} + +TQWidget *WidgetSelection::widget() const +{ + return wid; +} diff --git a/kdevdesigner/designer/sizehandle.h b/kdevdesigner/designer/sizehandle.h new file mode 100644 index 00000000..44917884 --- /dev/null +++ b/kdevdesigner/designer/sizehandle.h @@ -0,0 +1,98 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef SIZEHANDLE_H +#define SIZEHANDLE_H + +#include +#include +#include + +class TQMouseEvent; +class FormWindow; +class WidgetSelection; +class TQPaintEvent; + +class SizeHandle : public TQWidget +{ + Q_OBJECT + + +public: + enum Direction { LeftTop, Top, RightTop, Right, RightBottom, Bottom, LeftBottom, Left }; + + SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s ); + void setWidget( TQWidget *w ); + void setActive( bool a ); + void updateCursor(); + + void setEnabled( bool ) {} + +protected: + void paintEvent( TQPaintEvent *e ); + void mousePressEvent( TQMouseEvent *e ); + void mouseMoveEvent( TQMouseEvent *e ); + void mouseReleaseEvent( TQMouseEvent *e ); + +private: + void trySetGeometry( TQWidget *w, int x, int y, int width, int height ); + void tryResize( TQWidget *w, int width, int height ); + +private: + TQWidget *widget; + Direction dir; + TQPoint oldPressPos; + FormWindow *formWindow; + WidgetSelection *sel; + TQRect geom, origGeom; + bool active; + +}; + +class WidgetSelection +{ +public: + WidgetSelection( FormWindow *parent, TQPtrDict *selDict ); + + void setWidget( TQWidget *w, bool updateDict = TRUE ); + bool isUsed() const; + + void updateGeometry(); + void hide(); + void show(); + void update(); + + TQWidget *widget() const; + +protected: + TQIntDict handles; + TQWidget *wid; + FormWindow *formWindow; + TQPtrDict *selectionDict; + +}; + +#endif diff --git a/kdevdesigner/designer/sourceeditor.cpp b/kdevdesigner/designer/sourceeditor.cpp new file mode 100644 index 00000000..2850e20e --- /dev/null +++ b/kdevdesigner/designer/sourceeditor.cpp @@ -0,0 +1,320 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ +#include + +#include "sourceeditor.h" + +#include "formwindow.h" +#include "metadatabase.h" +#include "project.h" +#include "mainwindow.h" +#include "../interfaces/languageinterface.h" +#include +#include "project.h" +#include "sourcefile.h" +#include "hierarchyview.h" +#include +#include +#include "kdevdesigner_part.h" + +SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageInterface *liface ) + : TQVBox( parent, 0, WDestructiveClose ), iFace( iface ), lIface( liface ), obj( 0 ), pro( 0 ) +{ + iFace->addRef(); + lIface->addRef(); + editor = iFace->editor( MainWindow::self->areEditorsReadOnly(), + this, MainWindow::self->designerInterface() ); + iFace->onBreakPointChange( TQT_TQOBJECT(MainWindow::self), TQT_SLOT( breakPointsChanged() ) ); + resize( 600, 400 ); + setIcon( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) ); +} + +SourceEditor::~SourceEditor() +{ + saveBreakPoints(); + editor = 0; + if ( formWindow() ) { + formWindow()->formFile()->setCodeEdited( FALSE ); + formWindow()->formFile()->setEditor( 0 ); + } else if ( sourceFile() ) { + sourceFile()->setEditor( 0 ); + if ( MainWindow::self->objectHierarchy()->sourceEditor() == this ) + MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 ); + } + iFace->release(); + lIface->release(); + MainWindow::self->editorClosed( this ); +} + +void SourceEditor::setObject( TQObject *o, Project *p ) +{ + if ( sourceFile() ) + sourceFile()->setEditor( 0 ); + if ( formWindow() ) { + formWindow()->formFile()->setCodeEdited( FALSE ); + formWindow()->formFile()->setEditor( 0 ); + } + if ( ::tqqt_cast(o) ) + ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE ); + save(); + bool changed = FALSE; + if ( &(*obj) != o ) { + saveBreakPoints(); + changed = TRUE; + } + obj = o; + pro = p; + if ( formWindow() ) { + if ( formWindow()->isFake() ) + setCaption( formWindow()->project()->objectForFakeForm( formWindow() )->name() ); + else + setCaption( obj->name() ); + } else { + setCaption( sourceFile()->fileName() ); + } + if ( sourceFile() ) + sourceFile()->setEditor( this ); + else if ( formWindow() ) + formWindow()->formFile()->setEditor( this ); + iFace->setText( sourceOfObject( obj, lang, iFace, lIface ) ); + if ( pro && formWindow() ) { + if ( formWindow()->isFake() ) + iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); + else + iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); + } else { + iFace->setContext( 0 ); + } + if ( changed || sourceFile() ) + iFace->setBreakPoints( MetaDataBase::breakPoints( o ) ); + MainWindow::self->objectHierarchy()->showClasses( this ); +} + +TQString SourceEditor::sourceOfObject( TQObject *o, const TQString &, + EditorInterface *, LanguageInterface * ) +{ + TQString txt; + if ( !o ) + return txt; + if ( ::tqqt_cast(o) ) + txt = ( (FormWindow*)o )->formFile()->code(); + else if ( ::tqqt_cast(o) ) + txt = ( (SourceFile*)o )->text(); + return txt; +} + +void SourceEditor::setFunction( const TQString &func, const TQString &clss ) +{ + iFace->scrollTo( lIface->createFunctionStart( obj->name(), func, "", "" ), clss ); +} + +void SourceEditor::setClass( const TQString &clss ) +{ + iFace->scrollTo( clss, TQString() ); +} + +void SourceEditor::closeEvent( TQCloseEvent *e ) +{ + e->accept(); + if ( !obj ) + return; + if ( formWindow() ) { + save(); + formWindow()->formFile()->cm = formWindow()->formFile()->isModified(); + } else { + if ( !sourceFile()->closeEvent() ) + e->ignore(); + } +} + +void SourceEditor::save() +{ + if ( !obj ) + return; + if ( formWindow() ) + formWindow()->formFile()->syncCode(); + else if ( sourceFile() && sourceFile()->editor() ) + sourceFile()->setText( iFace->text() ); +} + +TQString SourceEditor::language() const +{ + return lang; +} + +void SourceEditor::setLanguage( const TQString &l ) +{ + lang = l; +} + +void SourceEditor::editCut() +{ + iFace->cut(); +} + +void SourceEditor::editCopy() +{ + iFace->copy(); +} + +void SourceEditor::editPaste() +{ + iFace->paste(); +} + +bool SourceEditor::editIsUndoAvailable() +{ + return iFace->isUndoAvailable(); +} + +bool SourceEditor::editIsRedoAvailable() +{ + return iFace->isRedoAvailable(); +} + +void SourceEditor::editUndo() +{ + iFace->undo(); +} + +void SourceEditor::editRedo() +{ + iFace->redo(); +} + +void SourceEditor::editSelectAll() +{ + iFace->selectAll(); +} + +void SourceEditor::configChanged() +{ + iFace->readSettings(); +} + +void SourceEditor::setModified( bool b ) +{ + iFace->setModified( b ); +} + +void SourceEditor::refresh( bool allowSave ) +{ + if ( allowSave ) + save(); + bool oldMod = iFace->isModified(); + iFace->setText( sourceOfObject( obj, lang, iFace, lIface ) ); + iFace->setModified( oldMod ); +} + +void SourceEditor::resetContext() +{ + if ( pro && formWindow() ) { + if ( formWindow()->isFake() ) + iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); + else + iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); + } else { + iFace->setContext( 0 ); + } +} + +void SourceEditor::setFocus() +{ + if ( formWindow() ) + formWindow()->formFile()->setCodeEdited( TRUE ); + if ( editor ) + editor->setFocus(); +} + +int SourceEditor::numLines() const +{ + return iFace->numLines(); +} + +void SourceEditor::saveBreakPoints() +{ + if ( !obj ) + return; + TQValueList l; + iFace->breakPoints( l ); + MetaDataBase::setBreakPoints( obj, l ); +} + +void SourceEditor::clearStep() +{ + iFace->clearStep(); +} + +void SourceEditor::clearStackFrame() +{ + iFace->clearStackFrame(); +} + +void SourceEditor::resetBreakPoints() +{ + iFace->setBreakPoints( MetaDataBase::breakPoints( obj ) ); +} + +TQString SourceEditor::text() const +{ + return iFace->text(); +} + +bool SourceEditor::isModified() const +{ + return iFace->isModified(); +} + +void SourceEditor::checkTimeStamp() +{ + if ( formWindow() ) + formWindow()->formFile()->checkTimeStamp(); + else if ( sourceFile() ) + sourceFile()->checkTimeStamp(); +} + +bool SourceEditor::saveAs() +{ + if ( formWindow() ) + return formWindow()->formFile()->saveAs(); + else if ( sourceFile() ) + return sourceFile()->saveAs(); + return FALSE; +} + +SourceFile *SourceEditor::sourceFile() const +{ + if ( !::tqqt_cast((TQObject *)obj) ) + return 0; + return (SourceFile*)(TQObject*)obj; +} + +FormWindow *SourceEditor::formWindow() const +{ + if ( !::tqqt_cast((TQObject *)obj) ) + return 0; + return (FormWindow*)(TQObject*)obj; +} diff --git a/kdevdesigner/designer/sourceeditor.h b/kdevdesigner/designer/sourceeditor.h new file mode 100644 index 00000000..3dde636e --- /dev/null +++ b/kdevdesigner/designer/sourceeditor.h @@ -0,0 +1,107 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef SOURCEEDITOR_H +#define SOURCEEDITOR_H + +#include "../interfaces/editorinterface.h" +#include +#include + +class FormWindow; +class TQCloseEvent; +struct LanguageInterface; +class Project; +class SourceFile; + +class SourceEditor : public TQVBox +{ + Q_OBJECT + + +public: + SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageInterface *liface ); + ~SourceEditor(); + + void setObject( TQObject *fw, Project *p ); + TQObject *object() const { return obj; } + Project *project() const { return pro; } + void setFunction( const TQString &func, const TQString &clss = TQString() ); + void setClass( const TQString &clss ); + void save(); + bool saveAs(); + void setModified( bool b ); + bool isModified() const; + + static TQString sourceOfObject( TQObject *fw, const TQString &lang, EditorInterface *iface, LanguageInterface *lIface ); + + TQString language() const; + void setLanguage( const TQString &l ); + + void editCut(); + void editCopy(); + void editPaste(); + bool editIsUndoAvailable(); + bool editIsRedoAvailable(); + void editUndo(); + void editRedo(); + void editSelectAll(); + + void configChanged(); + void refresh( bool allowSave ); + void resetContext(); + + EditorInterface *editorInterface() const { return iFace; } + + void setFocus(); + int numLines() const; + void saveBreakPoints(); + void clearStep(); + void clearStackFrame(); + void resetBreakPoints(); + + TQString text() const; + + void checkTimeStamp(); + + SourceFile *sourceFile() const; + FormWindow *formWindow() const; + +protected: + void closeEvent( TQCloseEvent *e ); + + +private: + EditorInterface *iFace; + LanguageInterface *lIface; + TQGuardedPtr obj; + Project *pro; + TQString lang; + TQGuardedPtr editor; + +}; + +#endif diff --git a/kdevdesigner/designer/sourcefile.cpp b/kdevdesigner/designer/sourcefile.cpp new file mode 100644 index 00000000..3d848bbf --- /dev/null +++ b/kdevdesigner/designer/sourcefile.cpp @@ -0,0 +1,298 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "sourcefile.h" +#include +#include +#include "designerappiface.h" +#include "sourceeditor.h" +#include "metadatabase.h" +#include "../interfaces/languageinterface.h" +#include +#include +#include "mainwindow.h" +#include "workspace.h" +#include + +#include +#include + +SourceFile::SourceFile( const TQString &fn, bool temp, Project *p ) + : filename( fn ), ed( 0 ), fileNameTemp( temp ), + timeStamp( 0, p->makeAbsolute( fn ) ), pro( p ), pkg( FALSE ) + , accepted( TRUE ) +{ + iface = 0; + + if ( !temp ) + accepted = checkFileName( TRUE ); + + if (accepted) { + load(); + pro->addSourceFile( this ); + MetaDataBase::addEntry( this ); + } + +} + +SourceFile::~SourceFile() +{ + if (iface) + delete iface; +} + +TQString SourceFile::text() const +{ + return txt; +} + +void SourceFile::setText( const TQString &s ) +{ + txt = s; +} + +bool SourceFile::save( bool ignoreModified ) +{ + if ( fileNameTemp ) + return saveAs(); + if ( !ignoreModified && !isModified() ) + return TRUE; + if ( ed ) + ed->save(); + + if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) { + TQString fn( pro->makeAbsolute( filename ) ); +#if defined(Q_OS_WIN32) + fn += ".bak"; +#else + fn += "~"; +#endif + TQFile f( pro->makeAbsolute( filename ) ); + if ( f.open( IO_ReadOnly ) ) { + TQFile f2( fn ); + if ( f2.open( IO_WriteOnly | IO_Translate ) ) { + TQCString data( f.size() ); + f.readBlock( data.data(), f.size() ); + f2.writeBlock( data ); + } + } + } + + TQFile f( pro->makeAbsolute( filename ) ); + if ( !f.open( IO_WriteOnly | IO_Translate ) ) + return saveAs(); + + TQTextStream ts( &f ); + ts << txt; + timeStamp.update(); + setModified( FALSE ); + return TRUE; +} + +bool SourceFile::saveAs( bool ignoreModified ) +{ + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + TQString filter; + if ( iface ) + filter = iface->fileFilterList().join("\n"); + + TQString old = filename; + TQString initFn = pro->makeAbsolute( filename ); + if ( ignoreModified ) { + TQString dir = TQStringList::split( ':', project()->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first(); + initFn = TQFileInfo( initFn ).fileName(); + initFn.prepend( dir + "/" ); + } + TQString fn = KFileDialog::getSaveFileName( initFn, filter ); + if ( fn.isEmpty() ) + return FALSE; + fileNameTemp = FALSE; + filename = pro->makeRelative( fn ); + if ( !checkFileName( TRUE ) ) { + filename = old; + return FALSE; + } + pro->setModified( TRUE ); + timeStamp.setFileName( pro->makeAbsolute( filename ) ); + if ( ed ) + ed->setCaption( i18n( "Edit %1" ).arg( filename ) ); + setModified( TRUE ); + if ( pro->isDummy() ) { + TQObject *o = ed->parent(); + while ( o && !o->isA( "MainWindow" ) ) + o = o->parent(); + if ( o ) + ((MainWindow *)o)->addRecentlyOpenedFile( fn ); + } + return save( ignoreModified ); +} + +bool SourceFile::load() +{ + TQFile f( pro->makeAbsolute( filename ) ); + if ( !f.open( IO_ReadOnly ) ) + return FALSE; + TQTextStream ts( &f ); + txt = ts.read(); + timeStamp.update(); + return TRUE; +} + +DesignerSourceFile *SourceFile::iFace() +{ + if ( !iface ) + iface = new DesignerSourceFileImpl( this ); + return iface; +} + +void SourceFile::setEditor( SourceEditor *e ) +{ + ed = e; +} + +bool SourceFile::isModified() const +{ + if ( !ed ) + return FALSE; + return ed->isModified(); +} + +static TQMap *extensionCounter; +TQString SourceFile::createUnnamedFileName( const TQString &extension ) +{ + if ( !extensionCounter ) + extensionCounter = new TQMap; + int count = -1; + TQMap::Iterator it; + if ( ( it = extensionCounter->find( extension ) ) != extensionCounter->end() ) { + count = *it; + ++count; + extensionCounter->replace( extension, count ); + } else { + count = 1; + extensionCounter->insert( extension, count ); + } + + return "unnamed" + TQString::number( count ) + "." + extension; +} + +void SourceFile::setModified( bool m ) +{ + if ( !ed ) + return; + ed->setModified( m ); +} + +bool SourceFile::closeEvent() +{ + if ( !isModified() && fileNameTemp ) { + pro->removeSourceFile( this ); + return TRUE; + } + + if ( !isModified() ) + return TRUE; + + if ( ed ) + ed->save(); + + switch ( TQMessageBox::warning( MainWindow::self, i18n( "Save Code" ), + i18n( "Save changes to '%1'?" ).arg( filename ), + i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { + case 0: // save + if ( !save() ) + return FALSE; + break; + case 1: // don't save + load(); + if ( ed ) + ed->editorInterface()->setText( txt ); + if ( fileNameTemp ) { + pro->removeSourceFile( this ); + return TRUE; + } + if ( MainWindow::self ) + MainWindow::self->workspace()->update(); + break; + case 2: // cancel + return FALSE; + default: + break; + } + setModified( FALSE ); + return TRUE; +} + +bool SourceFile::close() +{ + if ( !ed ) + return TRUE; + return ed->close(); +} + +Project *SourceFile::project() const +{ + return pro; +} + +void SourceFile::checkTimeStamp() +{ + if ( timeStamp.isUpToDate() ) + return; + timeStamp.update(); + if ( TQMessageBox::information( MainWindow::self, i18n( "TQt Designer" ), + i18n( "File '%1' has been changed outside TQt Designer.\n" + "Do you want to reload it?" ).arg( filename ), + i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { + load(); + if ( ed ) + ed->editorInterface()->setText( txt ); + } +} + +bool SourceFile::checkFileName( bool allowBreak ) +{ + SourceFile *sf = pro->findSourceFile( filename, this ); + if ( sf ) + TQMessageBox::warning( MainWindow::self, i18n( "Invalid Filename" ), + i18n( "The project already contains a source file with \n" + "filename '%1'. Please choose a new filename." ).arg( filename ) ); + while ( sf ) { + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + TQString filter; + if ( iface ) + filter = iface->fileFilterList().join("\n"); + TQString fn; + while ( fn.isEmpty() ) { + fn = KFileDialog::getSaveFileName( pro->makeAbsolute( filename ), filter ); + if ( allowBreak && fn.isEmpty() ) + return FALSE; + } + filename = pro->makeRelative( fn ); + sf = pro->findSourceFile( filename, this ); + } + return TRUE; +} diff --git a/kdevdesigner/designer/sourcefile.h b/kdevdesigner/designer/sourcefile.h new file mode 100644 index 00000000..ef4d31db --- /dev/null +++ b/kdevdesigner/designer/sourcefile.h @@ -0,0 +1,87 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef SOURCEFILE_H +#define SOURCEFILE_H + +#include +#include "timestamp.h" + +struct DesignerSourceFile; +class SourceEditor; +class Project; + +class SourceFile : public TQObject +{ + Q_OBJECT + + +public: + SourceFile( const TQString &fn, bool temp, Project *p ); + ~SourceFile(); + + void setText( const TQString &s ); + void setModified( bool m ); + + bool save( bool ignoreModified = FALSE ); + bool saveAs( bool ignoreModified = FALSE ); + bool load(); + bool close(); + bool closeEvent(); + Project *project() const; + + TQString text() const; + TQString fileName() const { return filename; } + bool isModified() const; + + void checkTimeStamp(); + + DesignerSourceFile *iFace(); + + void setEditor( SourceEditor *e ); + SourceEditor *editor() const { return ed; } + + static TQString createUnnamedFileName( const TQString &extension ); + + bool isAccepted() const { return accepted; } + +private: + bool checkFileName( bool allowBreak ); + +private: + TQString filename; + TQString txt; + DesignerSourceFile *iface; + SourceEditor *ed; + bool fileNameTemp; + TimeStamp timeStamp; + Project *pro; + bool pkg; + bool accepted; + +}; + +#endif diff --git a/kdevdesigner/designer/startdialog.ui b/kdevdesigner/designer/startdialog.ui new file mode 100644 index 00000000..383fdfda --- /dev/null +++ b/kdevdesigner/designer/startdialog.ui @@ -0,0 +1,324 @@ + +StartDialogBase +********************************************************************* +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + StartDialogBase + + + + 0 + 0 + 576 + 420 + + + + + 5 + 5 + 0 + 0 + + + + Qt Designer - New/Open + + + true + + + + unnamed + + + 11 + + + 6 + + + + tabWidget + + + + Widget8 + + + &New File/Project + + + + unnamed + + + 11 + + + 6 + + + + templateView + + + 120 + + + Adjust + + + false + + + + + + + tab + + + &Open File/Project + + + + unnamed + + + 11 + + + 6 + + + + + + Widget9 + + + &Recently Opened + + + + unnamed + + + 11 + + + 6 + + + + recentView + + + WheelFocus + + + 120 + + + Adjust + + + false + + + + + fileInfoLabel + + + + 2 + 5 + 0 + 0 + + + + + + + + + + + + checkShowInFuture + + + &Do not show this dialog in the future + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + buttonHelp + + + &Help + + + 4144 + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 0 + 20 + + + + + + buttonOk + + + &OK + + + 0 + + + true + + + true + + + + + buttonCancel + + + &Cancel + + + 0 + + + true + + + + + + + + + buttonOk + clicked() + StartDialogBase + accept() + + + buttonCancel + clicked() + StartDialogBase + reject() + + + templateView + doubleClicked(TQIconViewItem*) + StartDialogBase + accept() + + + templateView + returnPressed(TQIconViewItem*) + StartDialogBase + accept() + + + recentView + doubleClicked(TQIconViewItem*) + StartDialogBase + accept() + + + recentView + onItem(TQIconViewItem*) + StartDialogBase + recentItemChanged(TQIconViewItem*) + + + recentView + onViewport() + StartDialogBase + clearFileInfo() + + + recentView + returnPressed(TQIconViewItem*) + StartDialogBase + accept() + + + recentView + selectionChanged(TQIconViewItem*) + StartDialogBase + recentItemChanged(TQIconViewItem*) + + + + recentItemChanged( TQIconViewItem * ) + clearFileInfo() + accept() + reject() + + + diff --git a/kdevdesigner/designer/startdialogimpl.cpp b/kdevdesigner/designer/startdialogimpl.cpp new file mode 100644 index 00000000..adff44fd --- /dev/null +++ b/kdevdesigner/designer/startdialogimpl.cpp @@ -0,0 +1,182 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "kdevdesigner_part.h" + +#include "mainwindow.h" +#include "startdialogimpl.h" +#include "designerapp.h" + +#include + +FileDialog::FileDialog( const TQString &dir, TQWidget *parent ) + : TQFileDialog( dir, TQString(), parent ) +{ +} + +void FileDialog::accept() +{ + emit fileSelected(); +} + + +StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath ) + : StartDialogBase( parent, 0 ) +{ + newForm = new NewForm( templateView, templatePath ); + recentFiles.clear(); + initFileOpen(); + showInFuture = TRUE; + + connect( buttonHelp, TQT_SIGNAL( clicked() ), + MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( recentView, TQT_SIGNAL( doubleClicked(TQIconViewItem*) ), + this, TQT_SLOT( accept() ) ); + connect( recentView, TQT_SIGNAL( returnPressed(TQIconViewItem*) ), + this, TQT_SLOT( accept() ) ); + connect( fd, TQT_SIGNAL( fileSelected() ), this, TQT_SLOT( accept() ) ); +} + +void StartDialog::accept() +{ + hide(); + showInFuture = !checkShowInFuture->isChecked(); // means don't show it anymore + + int tabindex = tabWidget->currentPageIndex(); + TQString filename; + if( !tabindex ) { + if ( !templateView->currentItem() ) + return; + Project *pro = MainWindow::self->findProject( i18n( "" ) ); + if ( !pro ) + return; + MainWindow::self->setCurrentProject( pro ); + ( (NewItem*)templateView->currentItem() )->insert( pro ); + } else if ( tabindex == 1 ) { + filename = fd->selectedFile(); + } else if ( tabindex == 2 ) { + filename = recentFiles[recentView->currentItem()->index()]; + } + if ( tabindex ) { + if ( !filename.isEmpty() ) { + TQFileInfo fi( filename ); + if ( fi.extension() == "pro" ) + MainWindow::self->openProject( filename ); + else + MainWindow::self->fileOpen( "", "", filename ); + } + } + + done( Accepted ); +} + +void StartDialog::reject() +{ + done( Rejected ); +} + +void StartDialog::recentItemChanged( TQIconViewItem *item ) +{ + TQString msg( recentFiles[item->index()] ); + TQFileInfo f( recentFiles[item->index()] ); + uint s = f.size(); + TQString unit( "B" ); + if( s > 1024 ) { + s /= 1024; + unit = "KB"; + } + if ( s > 1024 ) { + s /= 1024; + unit = "MB"; + } + TQDateTime dt( f.lastModified() ); + TQString date( dt.toString( "MMMM dd hh:mm" )); + msg = TQString( "%1 (%2 %3) %4" ).arg(msg).arg(s).arg(unit).arg(date); + fileInfoLabel->setText( msg ); +} + +void StartDialog::clearFileInfo() +{ + fileInfoLabel->clear(); +} + +void StartDialog::setRecentlyFiles( TQStringList &files ) +{ + insertRecentItems( files, FALSE ); +} + +void StartDialog::setRecentlyProjects( TQStringList &projects ) +{ + insertRecentItems( projects, TRUE ); +} + +void StartDialog::insertRecentItems( TQStringList &files, bool isProject ) +{ + TQString iconName = "designer_newform.png"; + if ( isProject ) + iconName = "designer_project.png"; + TQIconViewItem *item; + TQStringList::iterator it = files.begin(); + for( ; it != files.end(); ++it ) { + TQFileInfo fi( *it ); + item = new TQIconViewItem( recentView, fi.fileName() ); + recentFiles[recentView->index( item )] = *it; + item->setPixmap( BarIcon( iconName, KDevDesignerPartFactory::instance() ) ); + item->setDragEnabled( FALSE ); + } +} + +void StartDialog::initFileOpen() +{ + TQString encode = TQDir::currentDirPath(); + TQUrl::encode( encode ); + fd = new FileDialog( encode, this ); + TQPoint point( 0, 0 ); + fd->reparent( tab, point ); + + TQObjectList *l = fd->queryList( TQPUSHBUTTON_OBJECT_NAME_STRING ); + TQObjectListIt it( *l ); + TQObject *obj; + while ( (obj = it.current()) != 0 ) { + ++it; + ((TQPushButton*)obj)->hide(); + } + delete l; + + fd->setSizeGripEnabled ( FALSE ); + tabLayout->addWidget( fd ); + + TQPluginManager manager( IID_ImportFilter, TQApplication::libraryPaths(), + MainWindow::self->pluginDirectory() ); + TQStringList filterlist; + filterlist << i18n( "Designer Files (*.ui *.pro)" ); + filterlist << i18n( "TQt User-Interface Files (*.ui)" ); + filterlist << i18n( "QMAKE Project Files (*.pro)" ); + + TQStringList list = manager.featureList(); + for ( TQStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 ) + filterlist << *it2; + + filterlist << i18n( "All Files (*)" ); + TQString filters = filterlist.join( ";;" ); + fd->setFilters( filters ); + + fd->show(); +} diff --git a/kdevdesigner/designer/startdialogimpl.h b/kdevdesigner/designer/startdialogimpl.h new file mode 100644 index 00000000..8fb574d0 --- /dev/null +++ b/kdevdesigner/designer/startdialogimpl.h @@ -0,0 +1,82 @@ +/********************************************************************** +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef STARTDIALOGIMPL_H +#define STARTDIALOGIMPL_H + +#include +#include +#include +#include +#include +#include + +#include "newformimpl.h" +#include "startdialog.h" + +class FileDialog : public TQFileDialog +{ + Q_OBJECT + + +public: + FileDialog( const TQString &dir, TQWidget *parent ); + +protected slots: + void accept(); + +signals: + void fileSelected(); +}; + + +class StartDialog : public StartDialogBase +{ + Q_OBJECT + + +public: + StartDialog( TQWidget *parent, const TQString &templatePath ); + void setRecentlyFiles( TQStringList& ); + void setRecentlyProjects( TQStringList& ); + bool showDialogInFuture() const { return showInFuture; } + +protected slots: + void recentItemChanged( TQIconViewItem *item ); + void clearFileInfo(); + void accept(); + void reject(); + +private: + void initFileOpen(); + void insertRecentItems( TQStringList &files, bool isProject ); + NewForm *newForm; + FileDialog *fd; + TQMap recentFiles; + bool showInFuture; +}; + +#endif diff --git a/kdevdesigner/designer/styledbutton.cpp b/kdevdesigner/designer/styledbutton.cpp new file mode 100644 index 00000000..82c9ddb8 --- /dev/null +++ b/kdevdesigner/designer/styledbutton.cpp @@ -0,0 +1,295 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include // HP-UX compiler needs this here +#include "styledbutton.h" +#include "formwindow.h" +#include "pixmapchooser.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +StyledButton::StyledButton(TQWidget* parent, const char* name) + : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( FALSE ) +{ + setMinimumSize( minimumSizeHint() ); + setAcceptDrops( TRUE ); + + connect( this, TQT_SIGNAL(clicked()), TQT_SLOT(onEditor())); + + setEditor( ColorEditor ); +} + +StyledButton::StyledButton( const TQBrush& b, TQWidget* parent, const char* name, WFlags f ) + : TQButton( parent, name, f ), spix( 0 ), s( 0 ), formWindow( 0 ) +{ + col = b.color(); + pix = b.pixmap(); + setMinimumSize( minimumSizeHint() ); +} + +StyledButton::~StyledButton() +{ +} + +void StyledButton::setEditor( EditorType e ) +{ + if ( edit == e ) + return; + + edit = e; + update(); +} + +StyledButton::EditorType StyledButton::editor() const +{ + return edit; +} + +void StyledButton::setColor( const TQColor& c ) +{ + col = c; + update(); +} + +void StyledButton::setPixmap( const TQPixmap & pm ) +{ + if ( !pm.isNull() ) { + delete pix; + pix = new TQPixmap( pm ); + } else { + delete pix; + pix = 0; + } + scalePixmap(); +} + +TQColor StyledButton::color() const +{ + return col; +} + +TQPixmap* StyledButton::pixmap() const +{ + return pix; +} + +bool StyledButton::scale() const +{ + return s; +} + +void StyledButton::setScale( bool on ) +{ + if ( s == on ) + return; + + s = on; + scalePixmap(); +} + +TQSize StyledButton::sizeHint() const +{ + return TQSize( 50, 25 ); +} + +TQSize StyledButton::minimumSizeHint() const +{ + return TQSize( 50, 25 ); +} + +void StyledButton::scalePixmap() +{ + delete spix; + + if ( pix ) { + spix = new TQPixmap( 6*width()/8, 6*height()/8 ); + TQImage img = pix->convertToImage(); + + spix->convertFromImage( s? img.smoothScale( 6*width()/8, 6*height()/8 ) : img ); + } else { + spix = 0; + } + + update(); +} + +void StyledButton::resizeEvent( TQResizeEvent* e ) +{ + scalePixmap(); + TQButton::resizeEvent( e ); +} + +void StyledButton::drawButton( TQPainter *paint ) +{ + style().tqdrawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(), + isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Raised); + drawButtonLabel(paint); + + if (hasFocus()) + style().tqdrawPrimitive(TQStyle::PE_FocusRect, paint, + style().subRect(TQStyle::SR_PushButtonFocusRect, this), + colorGroup(), TQStyle::Style_Default); +} + +void StyledButton::drawButtonLabel( TQPainter *paint ) +{ + TQColor pen = isEnabled() ? + hasFocus() ? palette().active().buttonText() : palette().inactive().buttonText() + : palette().disabled().buttonText(); + paint->setPen( pen ); + + if(!isEnabled()) { + paint->setBrush( TQBrush( colorGroup().button() ) ); + } + else if ( edit == PixmapEditor && spix ) { + paint->setBrush( TQBrush( col, *spix ) ); + paint->setBrushOrigin( width()/8, height()/8 ); + } else + paint->setBrush( TQBrush( col ) ); + + paint->drawRect( width()/8, height()/8, 6*width()/8, 6*height()/8 ); +} + +void StyledButton::onEditor() +{ + switch (edit) { + case ColorEditor: { + TQColor c = TQColorDialog::getColor( palette().active().background(), this ); + if ( c.isValid() ) { + setColor( c ); + emit changed(); + } + } break; + case PixmapEditor: { + TQPixmap p; + if ( pixmap() ) + p = qChoosePixmap( this, formWindow, *pixmap() ); + else + p = qChoosePixmap( this, formWindow, TQPixmap() ); + if ( !p.isNull() ) { + setPixmap( p ); + emit changed(); + } + } break; + default: + break; + } +} + +void StyledButton::mousePressEvent(TQMouseEvent* e) +{ + TQButton::mousePressEvent(e); + mousePressed = TRUE; + pressPos = e->pos(); +} + +void StyledButton::mouseMoveEvent(TQMouseEvent* e) +{ + TQButton::mouseMoveEvent( e ); +#ifndef TQT_NO_DRAGANDDROP + if ( !mousePressed ) + return; + if ( ( pressPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() ) { + if ( edit == ColorEditor ) { + TQColorDrag *drg = new TQColorDrag( col, this ); + TQPixmap pix( 25, 25 ); + pix.fill( col ); + TQPainter p( &pix ); + p.drawRect( 0, 0, pix.width(), pix.height() ); + p.end(); + drg->setPixmap( pix ); + mousePressed = FALSE; + drg->dragCopy(); + } + else if ( edit == PixmapEditor && pix && !pix->isNull() ) { + TQImage img = pix->convertToImage(); + TQImageDrag *drg = new TQImageDrag( img, this ); + if(spix) + drg->setPixmap( *spix ); + mousePressed = FALSE; + drg->dragCopy(); + } + } +#endif +} + +#ifndef TQT_NO_DRAGANDDROP +void StyledButton::dragEnterEvent( TQDragEnterEvent *e ) +{ + setFocus(); + if ( edit == ColorEditor && TQColorDrag::canDecode( e ) ) + e->accept(); + else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) ) + e->accept(); + else + e->ignore(); +} + +void StyledButton::dragLeaveEvent( TQDragLeaveEvent * ) +{ + if ( hasFocus() ) + parentWidget()->setFocus(); +} + +void StyledButton::dragMoveEvent( TQDragMoveEvent *e ) +{ + if ( edit == ColorEditor && TQColorDrag::canDecode( e ) ) + e->accept(); + else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) ) + e->accept(); + else + e->ignore(); +} + +void StyledButton::dropEvent( TQDropEvent *e ) +{ + if ( edit == ColorEditor && TQColorDrag::canDecode( e ) ) { + TQColor color; + TQColorDrag::decode( e, color ); + setColor(color); + emit changed(); + e->accept(); + } + else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) ) { + TQImage img; + TQImageDrag::decode( e, img ); + TQPixmap pm; + pm.convertFromImage(img); + setPixmap(pm); + emit changed(); + e->accept(); + } else { + e->ignore(); + } +} +#endif // TQT_NO_DRAGANDDROP diff --git a/kdevdesigner/designer/styledbutton.h b/kdevdesigner/designer/styledbutton.h new file mode 100644 index 00000000..8065fe84 --- /dev/null +++ b/kdevdesigner/designer/styledbutton.h @@ -0,0 +1,104 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef STYLEDBUTTON_H +#define STYLEDBUTTON_H + +#include +#include + +class TQColor; +class TQBrush; +class FormWindow; + +class StyledButton : public TQButton +{ + Q_OBJECT + + + TQ_PROPERTY( TQColor color READ color WRITE setColor ) + TQ_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap ) + TQ_PROPERTY( EditorType editor READ editor WRITE setEditor ) + TQ_PROPERTY( bool scale READ scale WRITE setScale ) + + TQ_ENUMS( EditorType ) + +public: + enum EditorType { ColorEditor, PixmapEditor }; + + StyledButton( TQWidget* parent = 0, const char* name = 0 ); + StyledButton( const TQBrush& b, TQWidget* parent = 0, const char* name = 0, WFlags f = 0 ); + ~StyledButton(); + + void setEditor( EditorType ); + EditorType editor() const; + + void setColor( const TQColor& ); + void setPixmap( const TQPixmap& ); + + TQPixmap* pixmap() const; + TQColor color() const; + + void setScale( bool ); + bool scale() const; + + TQSize sizeHint() const; + TQSize minimumSizeHint() const; + + void setFormWindow( FormWindow *fw ) { formWindow = fw; } + +public slots: + virtual void onEditor(); + +signals: + void changed(); + +protected: + void mousePressEvent(TQMouseEvent*); + void mouseMoveEvent(TQMouseEvent*); +#ifndef TQT_NO_DRAGANDDROP + void dragEnterEvent ( TQDragEnterEvent * ); + void dragMoveEvent ( TQDragMoveEvent * ); + void dragLeaveEvent ( TQDragLeaveEvent * ); + void dropEvent ( TQDropEvent * ); +#endif // TQT_NO_DRAGANDDROP + void drawButton( TQPainter* ); + void drawButtonLabel( TQPainter* ); + void resizeEvent( TQResizeEvent* ); + void scalePixmap(); + +private: + TQPixmap* pix; + TQPixmap* spix; // the pixmap scaled down to fit into the button + TQColor col; + EditorType edit; + bool s; + FormWindow *formWindow; + TQPoint pressPos; + bool mousePressed; +}; + +#endif //STYLEDBUTTON_H diff --git a/kdevdesigner/designer/syntaxhighlighter_html.cpp b/kdevdesigner/designer/syntaxhighlighter_html.cpp new file mode 100644 index 00000000..5bb681f9 --- /dev/null +++ b/kdevdesigner/designer/syntaxhighlighter_html.cpp @@ -0,0 +1,160 @@ +/********************************************************************** +** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "syntaxhighlighter_html.h" +#include "tqstring.h" +#include "tqmap.h" +#include "tqapplication.h" + + +SyntaxHighlighter_HTML::SyntaxHighlighter_HTML() + : TQTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 ) +{ + TQFont f( tqApp->font() ); + + addFormat(Standard, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Text))); + addFormat(Keyword, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Dark))); + addFormat(Attribute, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Link))); + addFormat(AttribValue, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::LinkVisited))); +} + +SyntaxHighlighter_HTML::~SyntaxHighlighter_HTML() +{ +} + +void SyntaxHighlighter_HTML::process( TQTextDocument *doc, TQTextParagraph *string, int, bool invalidate ) +{ + + TQTextFormat *formatStandard = format( Standard ); + TQTextFormat *formatKeyword = format( Keyword ); + TQTextFormat *formatAttribute = format( Attribute ); + TQTextFormat *formatAttribValue = format( AttribValue ); + + const int StateStandard = 0; + const int StateTag = 1; + const int StateAttribute = 2; + const int StateAttribVal = 3; + + TQString buffer = ""; + + int state = StateStandard; + + + if ( string->prev() ) { + if ( string->prev()->endState() == -1 ) + process( doc, string->prev(), 0, FALSE ); + state = string->prev()->endState(); + } + + + int i = 0; + for ( ;; ) { + TQChar c = string->at( i )->c; + + if ( c == '<' ) { + if ( state != StateStandard ) + string->setFormat( i - buffer.length(), buffer.length(), formatStandard, FALSE ); + buffer = c; + state = StateTag; + string->setFormat( i, 1, formatKeyword, FALSE ); + } + else if ( c == '>' && ( state != StateStandard ) ) { + string->setFormat( i, 1, formatKeyword, FALSE ); + buffer = ""; + state = StateStandard; + } + else if ( c == ' ' && state == StateTag ) { + buffer += c; + string->setFormat( i, 1, formatStandard, FALSE ); + state = StateAttribute; + } + else if ( c == '=' && state == StateAttribute ) { + buffer += c; + string->setFormat( i, 1, formatStandard, FALSE ); + state = StateAttribute; + } + else if ( c == '\"' && state == StateAttribute ) { + buffer += c; + string->setFormat( i, 1, formatStandard, FALSE ); + state = StateAttribVal; + } + else if ( c == '\"' && state == StateAttribVal ) { + buffer += c; + string->setFormat( i, 1, formatStandard, FALSE ); + state = StateAttribute; + } + else if ( state == StateAttribute ) { + buffer += c; + string->setFormat( i, 1, formatAttribute, FALSE ); + } + else if ( state == StateAttribVal ) { + buffer += c; + string->setFormat( i, 1, formatAttribValue, FALSE ); + } + else if ( state == StateTag ) { + string->setFormat( i, 1, formatKeyword, FALSE ); + buffer += c; + } + else if ( state == StateStandard ) { + string->setFormat( i, 1, formatStandard, FALSE ); + } + + i++; + if ( i >= string->length() ) + break; + } + + string->setEndState( state ); + string->setFirstPreProcess( FALSE ); + + if ( invalidate && string->next() && + !string->next()->firstPreProcess() && string->next()->endState() != -1 ) { + TQTextParagraph *p = string->next(); + while ( p ) { + if ( p->endState() == -1 ) + return; + p->setEndState( -1 ); + p = p->next(); + } + } +} + +TQTextFormat *SyntaxHighlighter_HTML::format( int id ) +{ + if ( lastFormatId == id && lastFormat ) + return lastFormat; + + TQTextFormat *f = formats[ id ]; + lastFormat = f ? f : formats[ 0 ]; + lastFormatId = id; + return lastFormat; +} + +void SyntaxHighlighter_HTML::addFormat( int id, TQTextFormat *f ) +{ + formats.insert( id, f ); +} diff --git a/kdevdesigner/designer/syntaxhighlighter_html.h b/kdevdesigner/designer/syntaxhighlighter_html.h new file mode 100644 index 00000000..efd1a616 --- /dev/null +++ b/kdevdesigner/designer/syntaxhighlighter_html.h @@ -0,0 +1,57 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef SYNTAXHIGHLIGHTER_HTML_H +#define SYNTAXHIGHLIGHTER_HTML_H + +#include + +class SyntaxHighlighter_HTML : public TQTextPreProcessor +{ +public: + + enum HTML { + Standard = 1, + Keyword, + Attribute, + AttribValue + }; + + SyntaxHighlighter_HTML(); + virtual ~SyntaxHighlighter_HTML(); + void process( TQTextDocument *doc, TQTextParagraph *string, int start, bool invalidate = TRUE ); + TQTextFormat *format( int id ); + +private: + void addFormat( int id, TQTextFormat *f ); + + TQTextFormat *lastFormat; + int lastFormatId; + TQIntDict formats; + +}; + +#endif diff --git a/kdevdesigner/designer/tableeditor.ui b/kdevdesigner/designer/tableeditor.ui new file mode 100644 index 00000000..deacf5d4 --- /dev/null +++ b/kdevdesigner/designer/tableeditor.ui @@ -0,0 +1,828 @@ + +TableEditorBase +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + TableEditorBase + + + + 0 + 0 + 484 + 406 + + + + Edit Table + + + true + + + + unnamed + + + 11 + + + 6 + + + + table + + + 1 + + + 1 + + + true + + + + + Layout11 + + + + unnamed + + + 0 + + + 6 + + + + buttonHelp + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + true + + + true + + + Close the dialog and apply all the changes. + + + + + buttonApply + + + &Apply + + + true + + + Apply all changes. + + + + + buttonCancel + + + &Cancel + + + true + + + Close the dialog and discard any changes. + + + + + + + TabWidget + + + + columns_tab + + + Co&lumns + + + + unnamed + + + 11 + + + 6 + + + + Spacer3 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + listColumns + + + + + Spacer2 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + buttonColumnUp + + + + + + "designer_s_up.png" + + + Move up + + + <b>Move the selected item up.</b><p>The top-most column will be the first column of the list.</p> + + + + + buttonColumnDown + + + + + + "designer_s_down.png" + + + Move down + + + <b>Move the selected item down.</b><p>The top-most column will be the first column of the list.</p> + + + + + buttonDeleteColumn + + + &Delete Column + + + + + buttonNewColumn + + + &New Column + + + + + Layout6 + + + + unnamed + + + 0 + + + 6 + + + + labelTable + + + Table: + + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + labelColumnPixmap + + + Label4 + + + + + buttonDeleteColPixmap + + + + 30 + 22 + + + + + + + "designer_s_editcut.png" + + + Delete Pixmap + + + <b>Delete the selected item's pixmap.</b><p>The pixmap in the current column of the selected item will be deleted.</p> + + + + + buttonChooseColPixmap + + + + 30 + 22 + + + + ... + + + Select a Pixmap + + + <b>Select a pixmap file for the item.</b><p>The pixmap will be changed in the current column of the selected item.</p> + + + + + + + TextLabel2 + + + &Label: + + + editColumnText + + + + + Label2 + + + Pixmap: + + + itemChoosePixmap + + + + + labelFields + + + &Field: + + + comboFields + + + + + editColumnText + + + + + comboFields + + + true + + + + + labelTableValue + + + <no table> + + + + + + + + + rows_tab + + + &Rows + + + + unnamed + + + 11 + + + 6 + + + + Spacer3_2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonRowUp + + + + + + "designer_s_up.png" + + + Move up + + + <b>Move the selected item up.</b><p>The top-most column will be the first column of the list.</p> + + + + + listRows + + + + + buttonRowDown + + + + + + "designer_s_down.png" + + + Move down + + + <b>Move the selected item down.</b><p>The top-most column will be the first column of the list.</p> + + + + + Spacer2_2 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + buttonNewRow + + + &New Row + + + + + buttonDeleteRow + + + &Delete Row + + + + + Layout7_2 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel2_3 + + + &Label: + + + editRowText + + + + + Label2_2 + + + Pixmap: + + + itemChoosePixmap + + + + + Layout2_2 + + + + unnamed + + + 0 + + + 6 + + + + labelRowPixmap + + + Label4 + + + + + buttonDeleteRowPixmap + + + + 30 + 22 + + + + + + + "designer_s_editcut.png" + + + Delete Pixmap + + + <b>Delete the selected item's pixmap.</b><p>The pixmap in the current column of the selected item will be deleted.</p> + + + + + buttonChooseRowPixmap + + + + 30 + 22 + + + + ... + + + Select a Pixmap + + + <b>Select a pixmap file for the item.</b><p>The pixmap will be changed in the current column of the selected item.</p> + + + + + + + editRowText + + + + + + + + + + + + buttonApply + clicked() + TableEditorBase + applyClicked() + + + buttonOk + clicked() + TableEditorBase + okClicked() + + + listColumns + currentChanged(TQListBoxItem*) + TableEditorBase + currentColumnChanged(TQListBoxItem*) + + + listColumns + selectionChanged(TQListBoxItem*) + TableEditorBase + currentColumnChanged(TQListBoxItem*) + + + editColumnText + textChanged(const TQString&) + TableEditorBase + columnTextChanged(const TQString&) + + + buttonNewColumn + clicked() + TableEditorBase + newColumnClicked() + + + buttonDeleteColumn + clicked() + TableEditorBase + deleteColumnClicked() + + + buttonColumnUp + clicked() + TableEditorBase + columnUpClicked() + + + buttonColumnDown + clicked() + TableEditorBase + columnDownClicked() + + + comboFields + activated(const TQString&) + TableEditorBase + currentFieldChanged(const TQString&) + + + listRows + selectionChanged(TQListBoxItem*) + TableEditorBase + currentRowChanged(TQListBoxItem*) + + + listRows + currentChanged(TQListBoxItem*) + TableEditorBase + currentRowChanged(TQListBoxItem*) + + + buttonNewRow + clicked() + TableEditorBase + newRowClicked() + + + buttonDeleteRow + clicked() + TableEditorBase + deleteRowClicked() + + + buttonRowUp + clicked() + TableEditorBase + rowUpClicked() + + + buttonRowDown + clicked() + TableEditorBase + rowDownClicked() + + + buttonChooseRowPixmap + clicked() + TableEditorBase + chooseRowPixmapClicked() + + + buttonDeleteColPixmap + clicked() + TableEditorBase + deleteColPixmapClicked() + + + editRowText + textChanged(const TQString&) + TableEditorBase + rowTextChanged(const TQString&) + + + buttonCancel + clicked() + TableEditorBase + reject() + + + buttonChooseColPixmap + clicked() + TableEditorBase + chooseColPixmapClicked() + + + buttonDeleteRowPixmap + clicked() + TableEditorBase + deleteRowPixmapClicked() + + + + buttonOk + buttonCancel + table + TabWidget + listColumns + buttonNewColumn + buttonDeleteColumn + comboFields + editColumnText + buttonDeleteColPixmap + buttonChooseColPixmap + buttonColumnUp + buttonColumnDown + buttonApply + listRows + buttonNewRow + buttonDeleteRow + editRowText + buttonDeleteRowPixmap + buttonChooseRowPixmap + buttonRowUp + buttonRowDown + buttonHelp + + + tqtable.h + + + init() + destroy() + applyClicked() + chooseRowPixmapClicked() + columnTextChanged( const TQString & ) + columnUpClicked() + currentColumnChanged( TQListBoxItem * ) + currentFieldChanged( const TQString & ) + currentRowChanged( TQListBoxItem * ) + deleteColPixmapClicked() + deleteColumnClicked() + deleteRowClicked() + deleteRowPixmapClicked() + newColumnClicked() + newRowClicked() + chooseColPixmapClicked() + okClicked() + rowDownClicked() + rowTextChanged( const TQString & ) + rowUpClicked() + columnDownClicked() + + + myiconloader.h + +BarIcon2 + + + diff --git a/kdevdesigner/designer/tableeditorimpl.cpp b/kdevdesigner/designer/tableeditorimpl.cpp new file mode 100644 index 00000000..060611f6 --- /dev/null +++ b/kdevdesigner/designer/tableeditorimpl.cpp @@ -0,0 +1,494 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "tableeditorimpl.h" +#ifndef TQT_NO_TABLE +#include +#endif +#include "formwindow.h" +#include +#include +#include +#include +#include +#include +#include "pixmapchooser.h" +#include "command.h" +#include +#include +#include +#include "project.h" +#include "metadatabase.h" +#include "mainwindow.h" + +#include + +TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl ) + : TableEditorBase( parent, name, modal, fl ), +#ifndef TQT_NO_TABLE + editTable( (TQTable*)editWidget ), +#endif + formWindow( fw ) +{ + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); +#ifndef TQT_NO_TABLE + labelColumnPixmap->setText( "" ); + labelRowPixmap->setText( "" ); + +#ifndef TQT_NO_SQL + if ( !::tqqt_cast(editTable) ) +#endif + { + labelFields->hide(); + comboFields->hide(); + labelTable->hide(); + labelTableValue->hide(); + } +#ifndef TQT_NO_SQL + if ( ::tqqt_cast(editTable) ) { + // ## why does this behave weird? + // TabWidget->removePage( rows_tab ); + // rows_tab->hide(); + // ## do this in the meantime... + TabWidget->setTabEnabled( rows_tab, FALSE ); + } + + if ( formWindow->project() && ::tqqt_cast(editTable) ) { + TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(editTable), "database" ).toStringList(); + if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) { + TQStringList fields; + fields << ""; + fields += formWindow->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ); + comboFields->insertStringList( fields ); + } + if ( !lst[ 1 ].isEmpty() ) + labelTableValue->setText( lst[ 1 ] ); + } +#endif + + readFromTable(); +#endif +} + +TableEditor::~TableEditor() +{ +} + +void TableEditor::columnDownClicked() +{ + if ( listColumns->currentItem() == -1 || + listColumns->currentItem() == (int)listColumns->count() - 1 || + listColumns->count() < 2 ) + return; + saveFieldMap(); + int index = listColumns->currentItem() + 1; + TQListBoxItem *i = listColumns->item( listColumns->currentItem() ); + listColumns->takeItem( i ); + listColumns->insertItem( i, index ); + listColumns->setCurrentItem( i ); + readColumns(); + restoreFieldMap(); + currentColumnChanged( i ); +} + +void TableEditor::columnTextChanged( const TQString &s ) +{ + if ( listColumns->currentItem() == -1 ) + return; + listColumns->blockSignals( TRUE ); + listColumns->changeItem( s, listColumns->currentItem() ); + listColumns->blockSignals( FALSE ); +#ifndef TQT_NO_TABLE + if ( table->horizontalHeader()->iconSet( listColumns->currentItem() ) ) + table->horizontalHeader()->setLabel( listColumns->currentItem(), + *table->horizontalHeader()->iconSet( listColumns->currentItem() ), s ); + else + table->horizontalHeader()->setLabel( listColumns->currentItem(), s ); +#endif +} + +void TableEditor::columnUpClicked() +{ + if ( listColumns->currentItem() <= 0 || + listColumns->count() < 2 ) + return; + saveFieldMap(); + int index = listColumns->currentItem() - 1; + TQListBoxItem *i = listColumns->item( listColumns->currentItem() ); + listColumns->takeItem( i ); + listColumns->insertItem( i, index ); + listColumns->setCurrentItem( i ); + readColumns(); + restoreFieldMap(); + currentColumnChanged( i ); +} + +void TableEditor::currentColumnChanged( TQListBoxItem *i ) +{ + if ( !i ) + return; + editColumnText->blockSignals( TRUE ); + editColumnText->setText( i->text() ); + if ( i->pixmap() ) + labelColumnPixmap->setPixmap( *i->pixmap() ); + else + labelColumnPixmap->setText( "" ); + editColumnText->blockSignals( FALSE ); + +#ifndef TQT_NO_SQL + if ( ::tqqt_cast(editTable) ) { + TQString s = *fieldMap.find( listColumns->index( i ) ); + if ( s.isEmpty() ) + comboFields->setCurrentItem( 0 ); + else if ( comboFields->listBox()->findItem( s ) ) + comboFields->setCurrentItem( comboFields->listBox()->index( comboFields->listBox()->findItem( s ) ) ); + else + comboFields->lineEdit()->setText( s ); + } +#endif +} + +void TableEditor::currentFieldChanged( const TQString &s ) +{ + if ( listColumns->currentItem() == -1 ) + return; + fieldMap.remove( listColumns->currentItem() ); + fieldMap.insert( listColumns->currentItem(), s ); + editColumnText->blockSignals( TRUE ); //## necessary + TQString newColText = s.mid(0,1).upper() + s.mid(1); + editColumnText->setText( newColText ); + columnTextChanged( newColText ); + editColumnText->blockSignals( FALSE ); +} + +void TableEditor::currentRowChanged( TQListBoxItem *i ) +{ + if ( !i ) + return; + editRowText->blockSignals( TRUE ); + editRowText->setText( i->text() ); + if ( i->pixmap() ) + labelRowPixmap->setPixmap( *i->pixmap() ); + else + labelRowPixmap->setText( "" ); + editRowText->blockSignals( FALSE ); +} + +void TableEditor::deleteColumnClicked() +{ + if ( listColumns->currentItem() == -1 ) + return; +#ifndef TQT_NO_TABLE + table->setNumCols( table->numCols() - 1 ); + delete listColumns->item( listColumns->currentItem() ); + readColumns(); + if ( listColumns->firstItem() ) { + listColumns->setCurrentItem( listColumns->firstItem() ); + listColumns->setSelected( listColumns->firstItem(), TRUE ); + } +#endif +} + +void TableEditor::deleteRowClicked() +{ + if ( listRows->currentItem() == -1 ) + return; +#ifndef TQT_NO_TABLE + table->setNumRows( table->numRows() - 1 ); + delete listRows->item( listRows->currentItem() ); + readRows(); + if ( listRows->firstItem() ) { + listRows->setCurrentItem( listRows->firstItem() ); + listRows->setSelected( listRows->firstItem(), TRUE ); + } +#endif +} + +void TableEditor::newColumnClicked() +{ +#ifndef TQT_NO_TABLE + table->setNumCols( table->numCols() + 1 ); + TQMap m; + for ( int i = 0; i < table->numCols() - 1; ++i ) + m.insert( table->horizontalHeader()->label( i ), TRUE ); + int n = table->numCols() - 1; + TQString t = TQString::number( n ); + while ( m.find( t ) != m.end() ) + t = TQString::number( ++n ); + table->horizontalHeader()->setLabel( table->numCols() - 1, t ); + listColumns->insertItem( t ); + TQListBoxItem *item = listColumns->item( listColumns->count() - 1 ); + listColumns->setCurrentItem( item ); + listColumns->setSelected( item, TRUE ); +#ifndef TQT_NO_SQL + if ( ::tqqt_cast(editTable) ) { + comboFields->setFocus(); + } else +#endif + { + editColumnText->setFocus(); + editColumnText->selectAll(); + } +#endif +} + +void TableEditor::newRowClicked() +{ +#ifndef TQT_NO_TABLE + table->setNumRows( table->numRows() + 1 ); + TQMap m; + for ( int i = 0; i < table->numRows() - 1; ++i ) + m.insert( table->verticalHeader()->label( i ), TRUE ); + int n = table->numRows() - 1; + TQString t = TQString::number( n ); + while ( m.find( t ) != m.end() ) + t = TQString::number( ++n ); + table->verticalHeader()->setLabel( table->numRows() - 1, t ); + listRows->insertItem( t ); + TQListBoxItem *item = listRows->item( listRows->count() - 1 ); + listRows->setCurrentItem( item ); + listRows->setSelected( item, TRUE ); +#endif +} + +void TableEditor::okClicked() +{ + applyClicked(); + accept(); +} + +void TableEditor::rowDownClicked() +{ + if ( listRows->currentItem() == -1 || + listRows->currentItem() == (int)listRows->count() - 1 || + listRows->count() < 2 ) + return; + int index = listRows->currentItem() + 1; + TQListBoxItem *i = listRows->item( listRows->currentItem() ); + listRows->takeItem( i ); + listRows->insertItem( i, index ); + listRows->setCurrentItem( i ); + readRows(); +} + +void TableEditor::rowTextChanged( const TQString &s ) +{ + if ( listRows->currentItem() == -1 ) + return; +#ifndef TQT_NO_TABLE + listRows->changeItem( s, listRows->currentItem() ); + if ( table->verticalHeader()->iconSet( listRows->currentItem() ) ) + table->verticalHeader()->setLabel( listRows->currentItem(), + *table->verticalHeader()->iconSet( listRows->currentItem() ), s ); + else + table->verticalHeader()->setLabel( listRows->currentItem(), s ); +#endif +} + +void TableEditor::rowUpClicked() +{ + if ( listRows->currentItem() <= 0 || + listRows->count() < 2 ) + return; + int index = listRows->currentItem() - 1; + TQListBoxItem *i = listRows->item( listRows->currentItem() ); + listRows->takeItem( i ); + listRows->insertItem( i, index ); + listRows->setCurrentItem( i ); + readRows(); +} + +void TableEditor::applyClicked() +{ + TQValueList rows; + TQValueList cols; + + int i = 0; +#ifndef TQT_NO_TABLE + for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { + PopulateTableCommand::Column col; + col.text = table->horizontalHeader()->label( i ); + if ( table->horizontalHeader()->iconSet( i ) ) + col.pix = table->horizontalHeader()->iconSet( i )->pixmap(); + col.field = *fieldMap.find( i ); + cols.append( col ); + } + for ( i = 0; i < table->verticalHeader()->count(); ++i ) { + PopulateTableCommand::Row row; + row.text = table->verticalHeader()->label( i ); + if ( table->verticalHeader()->iconSet( i ) ) + row.pix = table->verticalHeader()->iconSet( i )->pixmap(); + rows.append( row ); + } + PopulateTableCommand *cmd = new PopulateTableCommand( i18n( "Edit the Rows and Columns of '%1' " ).arg( editTable->name() ), + formWindow, editTable, rows, cols ); + cmd->execute(); + formWindow->commandHistory()->addCommand( cmd ); +#endif +} + +void TableEditor::chooseRowPixmapClicked() +{ + if ( listRows->currentItem() == -1 ) + return; + TQPixmap pix; + if ( listRows->item( listRows->currentItem() )->pixmap() ) + pix = qChoosePixmap( this, formWindow, *listRows->item( listRows->currentItem() )->pixmap() ); + else + pix = qChoosePixmap( this, formWindow, TQPixmap() ); + + if ( pix.isNull() ) + return; + +#ifndef TQT_NO_TABLE + table->verticalHeader()->setLabel( listRows->currentItem(), pix, table->verticalHeader()->label( listRows->currentItem() ) ); + listRows->changeItem( pix, listRows->currentText(), listRows->currentItem() ); +#endif +} + +void TableEditor::deleteRowPixmapClicked() +{ + if ( listRows->currentItem() == -1 ) + return; +#ifndef TQT_NO_TABLE + table->verticalHeader()->setLabel( listRows->currentItem(), TQPixmap(), table->verticalHeader()->label( listRows->currentItem() ) ); + listRows->changeItem( listRows->currentText(), listRows->currentItem() ); +#endif +} + +void TableEditor::chooseColPixmapClicked() +{ + if ( listColumns->currentItem() == -1 ) + return; + TQPixmap pix; + if ( listColumns->item( listColumns->currentItem() )->pixmap() ) + pix = qChoosePixmap( this, formWindow, *listColumns->item( listColumns->currentItem() )->pixmap() ); + else + pix = qChoosePixmap( this, formWindow, TQPixmap() ); + + if ( pix.isNull() ) + return; +#ifndef TQT_NO_TABLE + table->horizontalHeader()->setLabel( listColumns->currentItem(), pix, table->horizontalHeader()->label( listColumns->currentItem() ) ); + listColumns->changeItem( pix, listColumns->currentText(), listColumns->currentItem() ); +#endif +} + +void TableEditor::deleteColPixmapClicked() +{ + if ( listColumns->currentItem() == -1 ) + return; +#ifndef TQT_NO_TABLE + table->horizontalHeader()->setLabel( listColumns->currentItem(), TQPixmap(), table->horizontalHeader()->label( listColumns->currentItem() ) ); + listColumns->changeItem( listColumns->currentText(), listColumns->currentItem() ); +#endif +} + +void TableEditor::readFromTable() +{ +#ifndef TQT_NO_TABLE + TQHeader *cols = editTable->horizontalHeader(); + table->setNumCols( cols->count() ); + TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(editTable) ); + for ( int i = 0; i < cols->count(); ++i ) { + if ( editTable->horizontalHeader()->iconSet( i ) ) { + table->horizontalHeader()->setLabel( i, *editTable->horizontalHeader()->iconSet( i ), + editTable->horizontalHeader()->label( i ) ); + listColumns->insertItem( editTable->horizontalHeader()->iconSet( i )->pixmap(), + editTable->horizontalHeader()->label( i ) ); + } else { + table->horizontalHeader()->setLabel( i, editTable->horizontalHeader()->label( i ) ); + listColumns->insertItem( editTable->horizontalHeader()->label( i ) ); + } + TQString cf = *columnFields.find( editTable->horizontalHeader()->label( i ) ); + fieldMap.insert( i, cf ); + } + + if ( listColumns->firstItem() ) { + listColumns->setCurrentItem( listColumns->firstItem() ); + listColumns->setSelected( listColumns->firstItem(), TRUE ); + } + + TQHeader *rows = editTable->verticalHeader(); + table->setNumRows( rows->count() ); + for ( int j = 0; j < rows->count(); ++j ) { + if ( editTable->verticalHeader()->iconSet( j ) ) { + table->verticalHeader()->setLabel( j, *editTable->verticalHeader()->iconSet( j ), + editTable->verticalHeader()->label( j ) ); + listRows->insertItem( editTable->verticalHeader()->iconSet( j )->pixmap(), + editTable->verticalHeader()->label( j ) ); + } else { + table->verticalHeader()->setLabel( j, editTable->verticalHeader()->label( j ) ); + listRows->insertItem( editTable->verticalHeader()->label( j ) ); + } + } + + if ( listRows->firstItem() ) { + listRows->setCurrentItem( listRows->firstItem() ); + listRows->setSelected( listRows->firstItem(), TRUE ); + } +#endif +} + +void TableEditor::readColumns() +{ + int j = 0; +#ifndef TQT_NO_TABLE + for ( TQListBoxItem *i = listColumns->firstItem(); i; i = i->next(), ++j ) { + if ( i->pixmap() ) + table->horizontalHeader()->setLabel( j, *i->pixmap(), i->text() ); + else + table->horizontalHeader()->setLabel( j, i->text() ); + } +#endif +} + +void TableEditor::readRows() +{ + int j = 0; +#ifndef TQT_NO_TABLE + for ( TQListBoxItem *i = listRows->firstItem(); i; i = i->next(), ++j ) { + if ( i->pixmap() ) + table->verticalHeader()->setLabel( j, *i->pixmap(), i->text() ); + else + table->verticalHeader()->setLabel( j, i->text() ); + } +#endif +} + +void TableEditor::saveFieldMap() +{ + tmpFieldMap.clear(); + for ( TQMap::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it ) + tmpFieldMap.insert( listColumns->item( it.key() ), *it ); +} + +void TableEditor::restoreFieldMap() +{ + fieldMap.clear(); + for ( TQMap::Iterator it = tmpFieldMap.begin(); it != tmpFieldMap.end(); ++it ) + fieldMap.insert( listColumns->index( it.key() ), *it ); +} diff --git a/kdevdesigner/designer/tableeditorimpl.h b/kdevdesigner/designer/tableeditorimpl.h new file mode 100644 index 00000000..7729f33e --- /dev/null +++ b/kdevdesigner/designer/tableeditorimpl.h @@ -0,0 +1,83 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef TABLEEDITORIMPL_H +#define TABLEEDITORIMPL_H + +#include "tableeditor.h" +#include + +class TQListBoxItem; +class TQTable; +class FormWindow; + +class TableEditor : public TableEditorBase +{ + Q_OBJECT + + +public: + TableEditor( TQWidget* parent = 0, TQWidget *editWidget = 0, FormWindow *fw = 0, + const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ~TableEditor(); + +protected slots: + void columnDownClicked(); + void columnTextChanged( const TQString & ); + void columnUpClicked(); + void currentColumnChanged( TQListBoxItem * ); + void currentFieldChanged( const TQString & ); + void currentRowChanged( TQListBoxItem * ); + void deleteColumnClicked(); + void deleteRowClicked(); + void newColumnClicked(); + void newRowClicked(); + void okClicked(); + void rowDownClicked(); + void rowTextChanged( const TQString & ); + void rowUpClicked(); + void applyClicked(); + void chooseRowPixmapClicked(); + void deleteRowPixmapClicked(); + void chooseColPixmapClicked(); + void deleteColPixmapClicked(); + +private: + void readFromTable(); + void readColumns(); + void readRows(); + void saveFieldMap(); + void restoreFieldMap(); + +private: + TQTable *editTable; + FormWindow *formWindow; + TQMap fieldMap; + TQMap tmpFieldMap; + +}; + +#endif // TABLEEDITOR_H diff --git a/kdevdesigner/designer/timestamp.cpp b/kdevdesigner/designer/timestamp.cpp new file mode 100644 index 00000000..553d9e3f --- /dev/null +++ b/kdevdesigner/designer/timestamp.cpp @@ -0,0 +1,86 @@ + /********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "timestamp.h" +#include +#include + +class TQTimer; + +TimeStamp::TimeStamp( TQObject *parent, const TQString &f ) + : TQObject( parent ), filename( f ), autoCheck( FALSE ) +{ + timer = new TQTimer( this ); + connect( timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( autoCheckTimeStamp() ) ); + update(); +} + +void TimeStamp::setFileName( const TQString &f ) +{ + filename = f; + update(); +} + +TQString TimeStamp::fileName() const +{ + return filename; +} + +void TimeStamp::setAutoCheckEnabled( bool a ) +{ + autoCheck = a; + if ( autoCheck ) + timer->start( 5000 ); + else + timer->stop(); +} + +void TimeStamp::update() +{ + TQFile f( filename ); + if ( !f.exists() ) + return; + lastTimeStamp = TQFileInfo( f ).lastModified(); +} + +bool TimeStamp::isUpToDate() const +{ + TQFile f( filename ); + if ( !f.exists() ) + return TRUE; + return lastTimeStamp == TQFileInfo( f ).lastModified(); +} + +bool TimeStamp::isAutoCheckEnabled() const +{ + return autoCheck; +} + +void TimeStamp::autoCheckTimeStamp() +{ + if ( !isUpToDate() ) + emit timeStampChanged(); +} diff --git a/kdevdesigner/designer/timestamp.h b/kdevdesigner/designer/timestamp.h new file mode 100644 index 00000000..078a925d --- /dev/null +++ b/kdevdesigner/designer/timestamp.h @@ -0,0 +1,64 @@ + /********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef TIMESTAMP_H +#define TIMESTAMP_H + +#include +#include +#include + +class TimeStamp : public TQObject +{ + Q_OBJECT + + +public: + TimeStamp( TQObject *parent, const TQString &f ); + + void setFileName( const TQString &f ); + TQString fileName() const; + void setAutoCheckEnabled( bool a ); + void update(); + + bool isUpToDate() const; + bool isAutoCheckEnabled() const; + +signals: + void timeStampChanged(); + +private slots: + void autoCheckTimeStamp(); + +private: + TQDateTime lastTimeStamp; + TQString filename; + bool autoCheck; + TQTimer *timer; + +}; + +#endif diff --git a/kdevdesigner/designer/variabledialog.ui b/kdevdesigner/designer/variabledialog.ui new file mode 100644 index 00000000..b5971ce9 --- /dev/null +++ b/kdevdesigner/designer/variabledialog.ui @@ -0,0 +1,294 @@ + +VariableDialogBase +********************************************************************* +** Copyright (C) 2002 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + VariableDialogBase + + + + 0 + 0 + 276 + 320 + + + + Edit Variables + + + + unnamed + + + 11 + + + 6 + + + + + Variable + + + true + + + true + + + + + Access + + + true + + + true + + + + varView + + + StyledPanel + + + Sunken + + + true + + + LastColumn + + + + + deleteButton + + + &Delete + + + + + propBox + + + Variable Properties + + + + unnamed + + + 11 + + + 6 + + + + TextLabel2 + + + Acc&ess: + + + accessCombo + + + + + TextLabel1 + + + &Variable: + + + varName + + + + + varName + + + + + + public + + + + + protected + + + + + private + + + + accessCombo + + + + + + + addButton + + + &Add + + + + + Spacer2 + + + Horizontal + + + Expanding + + + + 0 + 21 + + + + + + cancelButton + + + &Cancel + + + + + okButton + + + &OK + + + + + Spacer3 + + + Horizontal + + + Expanding + + + + 0 + 21 + + + + + + + + cancelButton + clicked() + VariableDialogBase + reject() + + + addButton + clicked() + VariableDialogBase + addVariable() + + + okButton + clicked() + VariableDialogBase + okClicked() + + + varName + textChanged(const TQString&) + VariableDialogBase + nameChanged() + + + deleteButton + clicked() + VariableDialogBase + deleteVariable() + + + accessCombo + activated(int) + VariableDialogBase + accessChanged() + + + varView + currentChanged(TQListViewItem*) + VariableDialogBase + currentItemChanged(TQListViewItem*) + + + varView + selectionChanged(TQListViewItem*) + VariableDialogBase + currentItemChanged(TQListViewItem*) + + + + varView + addButton + deleteButton + varName + accessCombo + okButton + cancelButton + + + addVariable() + deleteVariable() + accessChanged() + nameChanged() + okClicked() + currentItemChanged( TQListViewItem * i ) + + + diff --git a/kdevdesigner/designer/variabledialogimpl.cpp b/kdevdesigner/designer/variabledialogimpl.cpp new file mode 100644 index 00000000..d2d7ef67 --- /dev/null +++ b/kdevdesigner/designer/variabledialogimpl.cpp @@ -0,0 +1,180 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include +#include +#include +#include +#include + +#include "metadatabase.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "hierarchyview.h" +#include "command.h" +#include "variabledialogimpl.h" + +#include + + +VariableDialog::VariableDialog( FormWindow *fw, TQWidget *parent ) + : VariableDialogBase( parent ), formWindow( fw ) +{ + varView->setSorting( -1 ); + TQValueList varLst = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); + TQValueList::Iterator it = varLst.begin(); + for ( ; it != varLst.end(); ++it ) { + TQListViewItem *i = new TQListViewItem( varView ); + i->setText( 0, (*it).varName ); + i->setText( 1, (*it).varAccess ); + } + + if ( varView->firstChild() ) + varView->setCurrentItem( varView->firstChild() ); + else + propBox->setEnabled( FALSE ); +} + +VariableDialog::~VariableDialog() +{ +} + +void VariableDialog::setCurrentItem( TQString text ) +{ + TQListViewItem *i = varView->findItem( text, 0 ); + if ( i ) + varView->setCurrentItem( i ); +} + +void VariableDialog::okClicked() +{ + TQValueList lst; + + TQListViewItemIterator it( varView ); + while ( it.current() != 0 ) { + MetaDataBase::Variable v; + v.varName = it.current()->text( 0 ).simplifyWhiteSpace(); + if ( v.varName[ (int)v.varName.length() - 1 ] != ';' ) + v.varName += ";"; + v.varAccess = it.current()->text( 1 ); + lst << v; + ++it; + } + + if ( !lst.isEmpty() ) { + TQValueList invalidLst; + TQValueList::Iterator it1 = lst.begin(); + TQValueList::Iterator it2; + for ( ; it1 != lst.end(); ++it1 ) { + it2 = it1; + ++it2; + for ( ; it2 != lst.end(); ++it2 ) { + if ( MetaDataBase::extractVariableName( (*it1).varName ) == + MetaDataBase::extractVariableName( (*it2).varName ) ) { + invalidLst << (*it1); + break; + } + } + } + if ( !invalidLst.isEmpty() ) { + if ( TQMessageBox::information( this, i18n( "Edit Variables" ), + i18n( "One variable has been declared twice.\n" + "Remove this variable?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { + for ( it2 = invalidLst.begin(); it2 != invalidLst.end(); ++it2 ) { + it = varView->firstChild(); + while ( it.current() != 0 ) { + if ( MetaDataBase::extractVariableName( (*it)->text( 0 ).simplifyWhiteSpace() ) == + MetaDataBase::extractVariableName( (*it2).varName ) ) { + delete (*it); + break; + } + ++it; + } + } + } + formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + return; + } + } + Command *cmd = new SetVariablesCommand( i18n( "Edit Variables" ), formWindow, lst ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + accept(); +} + +void VariableDialog::addVariable() +{ + TQListViewItem *i = new TQListViewItem( varView, varView->lastItem() ); + i->setText( 0, "int newVariable" ); + i->setText( 1, "protected" ); + varView->setCurrentItem( i ); + varView->setSelected( i, TRUE ); + varName->setFocus(); + varName->selectAll(); +} + +void VariableDialog::deleteVariable() +{ + TQListViewItem *i = varView->selectedItem(); + if ( !i ) + return; + delete i; + i = 0; + if ( varView->firstChild() ) + varView->setSelected( varView->firstChild(), TRUE ); +} + +void VariableDialog::currentItemChanged( TQListViewItem *i ) +{ + if ( !i ) { + varName->clear(); + accessCombo->setCurrentItem( 1 ); + propBox->setEnabled( FALSE ); + return; + } + varName->setText( i->text( 0 ) ); + if ( i->text( 1 ) == "public" ) + accessCombo->setCurrentItem( 0 ); + else if ( i->text( 1 ) == "protected" ) + accessCombo->setCurrentItem( 1 ); + else + accessCombo->setCurrentItem( 2 ); + propBox->setEnabled( TRUE ); +} + +void VariableDialog::nameChanged() +{ + if ( !varView->currentItem() ) + return; + varView->currentItem()->setText( 0, varName->text() ); +} + +void VariableDialog::accessChanged() +{ + if ( !varView->currentItem() ) + return; + varView->currentItem()->setText( 1, accessCombo->currentText() ); +} diff --git a/kdevdesigner/designer/variabledialogimpl.h b/kdevdesigner/designer/variabledialogimpl.h new file mode 100644 index 00000000..65295073 --- /dev/null +++ b/kdevdesigner/designer/variabledialogimpl.h @@ -0,0 +1,57 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef VARIABLEDIALOGIMPL_H +#define VARIABLEDIALOGIMPL_H + +#include "variabledialog.h" + +class FormWindow; +class TQListView; + +class VariableDialog : public VariableDialogBase +{ + Q_OBJECT + +public: + VariableDialog( FormWindow *fw, TQWidget* parent = 0 ); + ~VariableDialog(); + + void setCurrentItem( TQString text ); + +protected slots: + void okClicked(); + void addVariable(); + void deleteVariable(); + void nameChanged(); + void accessChanged(); + void currentItemChanged( TQListViewItem *i ); + +private: + FormWindow *formWindow; +}; + +#endif diff --git a/kdevdesigner/designer/widgetaction.cpp b/kdevdesigner/designer/widgetaction.cpp new file mode 100644 index 00000000..c2ce0721 --- /dev/null +++ b/kdevdesigner/designer/widgetaction.cpp @@ -0,0 +1,58 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "widgetaction.h" +#include +#include +#include "mainwindow.h" +#include +#include + +static TQStyle *windowsStyle = 0; + +void WidgetAction::addedTo( TQWidget *w, TQWidget *container ) +{ + if ( ::tqqt_cast(w) && ::tqqt_cast(container->parent()->parent()) ) { + if ( !windowsStyle ) + windowsStyle = TQStyleFactory::create( "windows" ); + w->setStyle( windowsStyle ); + ( (TQToolButton*)w )->setUsesTextLabel( TRUE ); + ( (TQToolButton*)w )->setTextPosition( TQToolButton::Right ); + w->setBackgroundMode( container->backgroundMode() ); + } +} + +WidgetAction::~WidgetAction() +{ + if ( MainWindow::self ) + MainWindow::self->toolActions.removeRef( this ); +} + +void WidgetAction::init( const TQString &g ) +{ + MainWindow::self->toolActions.append( this ); + grp = g; +} diff --git a/kdevdesigner/designer/widgetaction.h b/kdevdesigner/designer/widgetaction.h new file mode 100644 index 00000000..161bc8a0 --- /dev/null +++ b/kdevdesigner/designer/widgetaction.h @@ -0,0 +1,66 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef WIDGETACTION_H +#define WIDGETACTION_H + +#include + +class WidgetAction : public TQAction +{ + Q_OBJECT + + +public: + WidgetAction( const TQString &grp, TQObject* parent, + const char* name = 0, bool toggle = FALSE ) + : TQAction( parent, name, toggle ) { init( grp ); } + WidgetAction( const TQString &grp, const TQString& text, + const TQIconSet& icon, const TQString& menuText, TQKeySequence accel, + TQObject* parent, const char* name = 0, bool toggle = FALSE ) + : TQAction( text, icon, menuText, accel, parent, name, toggle ) { init( grp ); } + WidgetAction( const TQString &grp, const TQString& text, + const TQString& menuText, TQKeySequence accel, TQObject* parent, + const char* name = 0, bool toggle = FALSE ) + : TQAction( text, menuText, accel, parent, name, toggle ) { init( grp ); } + ~WidgetAction(); + +#if !defined(TQ_NO_USING_KEYWORD) + using TQAction::addedTo; +#endif + void addedTo( TQWidget *, TQWidget * ); + + TQString group() const { return grp; } + +private: + void init( const TQString &g ); + +private: + TQString grp; + +}; + +#endif diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp new file mode 100644 index 00000000..9d04535a --- /dev/null +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -0,0 +1,1805 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include // HP-UX compiler need this here +#include "widgetfactory.h" +#include +#include "metadatabase.h" +#include "mainwindow.h" +#include "formwindow.h" +#include "propertyeditor.h" +#include "tqlayout.h" +#include "listboxeditorimpl.h" +#include "listvieweditorimpl.h" +#include "iconvieweditorimpl.h" +#include "formwindow.h" +#include "multilineeditorimpl.h" +#include "../interfaces/widgetinterface.h" +#ifndef TQT_NO_TABLE +#include "tableeditorimpl.h" +#endif +#include "project.h" +#include "menubareditor.h" +#include "popupmenueditor.h" + +#include "kdevdesigner_part.h" + +#include + +#include + +#include +#include +#include +#ifndef TQT_NO_TABLE +#include +#endif +#ifndef TQT_NO_SQL +#include +#endif +#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 +#ifndef TQT_NO_SQL +#include "database.h" +#endif + +#define NO_STATIC_COLORS +#include +#include + +#include + +FormWindow *find_formwindow( TQWidget *w ) +{ + if ( !w ) + return 0; + for (;;) { + if ( ::tqqt_cast(w) ) + return (FormWindow*)w; + if ( !w->parentWidget() ) + return 0; + w = w->parentWidget(); + } +} + +void TQLayoutWidget::paintEvent( TQPaintEvent* ) +{ + TQPainter p ( this ); + p.setPen( red ); + p.drawRect( rect() ); +} + + +QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name ) + : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE ) +{ + tabBar()->setAcceptDrops( TRUE ); + tabBar()->installEventFilter( this ); +} + +int QDesignerTabWidget::currentPage() const +{ + return tabBar()->currentTab(); +} + +void QDesignerTabWidget::setCurrentPage( int i ) +{ + tabBar()->setCurrentTab( i ); +} + +TQString QDesignerTabWidget::pageTitle() const +{ + return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() ); +} + +void QDesignerTabWidget::setPageTitle( const TQString& title ) +{ + changeTab( TQTabWidget::currentPage(), title ); +} + +void QDesignerTabWidget::setPageName( const TQCString& name ) +{ + if ( TQTabWidget::currentPage() ) + TQTabWidget::currentPage()->setName( name ); +} + +TQCString QDesignerTabWidget::pageName() const +{ + if ( !TQTabWidget::currentPage() ) + return 0; + return TQTabWidget::currentPage()->name(); +} + +int QDesignerTabWidget::count() const +{ + return tabBar()->count(); +} + +bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) +{ + if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return FALSE; + + switch ( e->type() ) { + case TQEvent::MouseButtonPress: { + mousePressed = TRUE; + TQMouseEvent *me = (TQMouseEvent*)e; + pressPoint = me->pos(); + } + break; + case TQEvent::MouseMove: { + TQMouseEvent *me = (TQMouseEvent*)e; + if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > TQApplication::startDragDistance() ) { + TQTextDrag *drg = new TQTextDrag( TQString::number( (long) this ) , this ); + mousePressed = FALSE; + dragPage = TQTabWidget::currentPage(); + dragLabel = TQTabWidget::tabLabel( dragPage ); + + int index = indexOf( dragPage ); + + removePage( dragPage ); + if ( !drg->dragMove() ) { + insertTab( dragPage, dragLabel, index ); + showPage( dragPage ); + } + if ( dropIndicator ) + dropIndicator->hide(); + } + } + break; + case TQEvent::DragLeave: { + if ( dropIndicator ) + dropIndicator->hide(); + } + break; + case TQEvent::DragMove: { + TQDragEnterEvent *de = (TQDragEnterEvent*) e; + if ( TQTextDrag::canDecode( de ) ) { + TQString text; + TQTextDrag::decode( de, text ); + if ( text == TQString::number( (long)this ) ) + de->accept(); + else + return FALSE; + } + + int index = 0; + TQRect rect; + for ( ; index < tabBar()->count(); index++ ) { + if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) { + rect = tabBar()->tabAt( index )->rect(); + break; + } + } + + if ( index == tabBar()->count() -1 ) { + TQRect rect2 = rect; + rect2.setLeft( rect2.left() + rect2.width() / 2 ); + if ( rect2.contains( de->pos() ) ) + index++; + } + + if ( ! dropIndicator ) { + dropIndicator = new TQWidget( this ); + dropIndicator->setBackgroundColor( red ); + } + + TQPoint pos; + if ( index == tabBar()->count() ) + pos = tabBar()->mapToParent( TQPoint( rect.x() + rect.width(), rect.y() ) ); + else + pos = tabBar()->mapToParent( TQPoint( rect.x(), rect.y() ) ); + + dropIndicator->setGeometry( pos.x(), pos.y() , 3, rect.height() ); + dropIndicator->show(); + } + break; + case TQEvent::Drop: { + TQDragEnterEvent *de = (TQDragEnterEvent*) e; + if ( TQTextDrag::canDecode( de ) ) { + TQString text; + TQTextDrag::decode( de, text ); + if ( text == TQString::number( (long)this ) ) { + + int newIndex = 0; + for ( ; newIndex < tabBar()->count(); newIndex++ ) { + if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) ) + break; + } + + if ( newIndex == tabBar()->count() -1 ) { + TQRect rect2 = tabBar()->tabAt( newIndex )->rect(); + rect2.setLeft( rect2.left() + rect2.width() / 2 ); + if ( rect2.contains( de->pos() ) ) + newIndex++; + } + + int oldIndex = 0; + for ( ; oldIndex < tabBar()->count(); oldIndex++ ) { + if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) ) + break; + } + + FormWindow *fw = find_formwindow( this ); + MoveTabPageCommand *cmd = + new MoveTabPageCommand( i18n( "Move Tab Page" ), fw, this, + dragPage, dragLabel, newIndex, oldIndex ); + fw->commandHistory()->addCommand( cmd ); + cmd->execute(); + de->accept(); + } + } + } + break; + default: + break; + } + return FALSE; +} + + +QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *parent, const char *name ) + : TQWidgetStack( parent, name ) +{ + prev = new TQToolButton( TQt::LeftArrow, this, "designer_wizardstack_button" ); + prev->setAutoRaise( TRUE ); + prev->setAutoRepeat( TRUE ); + prev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); + next = new TQToolButton( TQt::RightArrow, this, "designer_wizardstack_button" ); + next->setAutoRaise( TRUE ); + next->setAutoRepeat( TRUE ); + next->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); + connect( prev, TQT_SIGNAL( clicked() ), this, TQT_SLOT( prevPage() ) ); + connect( next, TQT_SIGNAL( clicked() ), this, TQT_SLOT( nextPage() ) ); + updateButtons(); +} + +void QDesignerWidgetStack::updateButtons() +{ + prev->setGeometry( width() - 31, 1, 15, 15 ); + next->setGeometry( width() - 16, 1, 15, 15 ); + prev->show(); + next->show(); + prev->raise(); + next->raise(); +} + +void QDesignerWidgetStack::prevPage() +{ + setCurrentPage( currentPage() - 1 ); +} + +void QDesignerWidgetStack::nextPage() +{ + setCurrentPage( currentPage() + 1 ); +} + +int QDesignerWidgetStack::currentPage() const +{ + QDesignerWidgetStack* that = (QDesignerWidgetStack*) this; + return that->pages.find( visibleWidget() ); +} + +void QDesignerWidgetStack::setCurrentPage( int i ) +{ + // help next/prev page commands + if ( i < 0 ) + i += count(); + if ( i >= count() ) + i -= count(); + + if ( i < 0 || i >= count() ) + return; + raiseWidget( pages.at( i ) ); + updateButtons(); +} + +TQCString QDesignerWidgetStack::pageName() const +{ + if ( !visibleWidget() ) + return 0; + return visibleWidget()->name(); +} + +void QDesignerWidgetStack::setPageName( const TQCString& name ) +{ + if ( visibleWidget() ) + visibleWidget()->setName( name ); +} + +int QDesignerWidgetStack::count() const +{ + return pages.count(); +} + +TQWidget* QDesignerWidgetStack::page( int i ) const +{ + if ( i < 0 || i >= count() ) + return 0; + QDesignerWidgetStack* that = (QDesignerWidgetStack*) this; + return that->pages.at( i ); +} + + +int QDesignerWidgetStack::insertPage( TQWidget *p, int i ) +{ + if ( i < 0 ) + pages.append( p ); + else + pages.insert( (uint) i, p ); + addWidget( p ); + p->show(); + raiseWidget( p ); + TQApplication::sendPostedEvents(); + updateButtons(); + return pages.find( p ); +} + +int QDesignerWidgetStack::removePage( TQWidget *p ) +{ + int i = pages.find( p ); + pages.remove( p ); + removeWidget( p ); + setCurrentPage( 0 ); + updateButtons(); + return i; +} + + +int QDesignerWizard::currentPageNum() const +{ + for ( int i = 0; i < pageCount(); ++i ) { + if ( page( i ) == currentPage() ) + return i; + } + return 0; +} + + + + + +void QDesignerWizard::setCurrentPage( int i ) +{ + if ( i < currentPageNum() ) { + while ( i < currentPageNum() ) { + if ( currentPageNum() == 0 ) + break; + back(); + } + + } else { + while ( i > currentPageNum() ) { + if ( currentPageNum() == pageCount() - 1 ) + break; + next(); + } + } +} + +TQString QDesignerWizard::pageTitle() const +{ + return title( currentPage() ); +} + +void QDesignerWizard::setPageTitle( const TQString& title ) +{ + setTitle( currentPage(), title ); +} + +void QDesignerWizard::setPageName( const TQCString& name ) +{ + if ( TQWizard::currentPage() ) + TQWizard::currentPage()->setName( name ); +} + +TQCString QDesignerWizard::pageName() const +{ + if ( !TQWizard::currentPage() ) + return 0; + return TQWizard::currentPage()->name(); +} + +int QDesignerWizard::pageNum( TQWidget *p ) +{ + for ( int i = 0; i < pageCount(); ++i ) { + if ( page( i ) == p ) + return i; + } + return -1; +} + +void QDesignerWizard::addPage( TQWidget *p, const TQString &t ) +{ + TQWizard::addPage( p, t ); + if ( removedPages.find( p ) ) + removedPages.remove( p ); +} + +void QDesignerWizard::removePage( TQWidget *p ) +{ + TQWizard::removePage( p ); + removedPages.insert( p, p ); +} + +void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index ) +{ + TQWizard::insertPage( p, t, index ); + if ( removedPages.find( p ) ) + removedPages.remove( p ); +} + +TQMap< int, TQMap< TQString, TQVariant> > *defaultProperties = 0; +TQMap< int, TQStringList > *changedProperties = 0; + +/*! + \class WidgetFactory widgetfactory.h + \brief Set of static functions for creating widgets, layouts and do other stuff + + The widget factory offers functions to create widgets, create and + delete layouts find out other details - all based on the + WidgetDatabase's data. So the functions that use ids use the same + ids as in the WidgetDatabase. +*/ + + +void WidgetFactory::saveDefaultProperties( TQObject *w, int id ) +{ + TQMap< TQString, TQVariant> propMap; + TQStrList lst = w->metaObject()->propertyNames( TRUE ); + for ( uint i = 0; i < lst.count(); ++i ) { + TQVariant var = w->property( lst.at( i ) ); + if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 ) + var = TQVariant( TQPixmap() ); + else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 ) + var = TQVariant( TQIconSet() ); + propMap.replace( lst.at( i ), var ); + } + defaultProperties->replace( id, propMap ); +} + +void WidgetFactory::saveChangedProperties( TQObject *w, int id ) +{ + TQStringList l = MetaDataBase::changedProperties( w ); + changedProperties->insert( id, l ); +} + +/*! Creates a widget of the type which is registered as \a id as + child of \a parent. The \a name is optional. If \a init is TRUE, the + widget is initialized with some defaults, else the plain widget is + created. +*/ + +TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) +{ + TQString n = WidgetDatabase::className( id ); + if ( n.isEmpty() ) + return 0; + + if ( !defaultProperties ) { + defaultProperties = new TQMap< int, TQMap< TQString, TQVariant> >(); + changedProperties = new TQMap< int, TQStringList >(); + } + + TQWidget *w = 0; + TQString str = WidgetDatabase::createWidgetName( id ); + const char *s = str.latin1(); + w = createWidget( n, parent, name ? name : s, init, r, orient ); + if ( ::tqqt_cast(w) ) + ( (TQScrollView*)w )->disableSizeHintCaching(); + if ( !w && WidgetDatabase::isCustomWidget( id ) ) + w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) ); + if ( !w ) + return 0; + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + + if ( !defaultProperties->contains( id ) ) + saveDefaultProperties( TQT_TQOBJECT(w), id ); + if ( !changedProperties->contains( id ) ) + saveChangedProperties( TQT_TQOBJECT(w), id ); + + return w; +} + +/*! Creates a layout on the widget \a widget of the type \a type + which can be \c HBox, \c VBox or \c Grid. +*/ + +TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, LayoutType type ) +{ + int spacing = MainWindow::self->currentLayoutDefaultSpacing(); + int margin = 0; + + int metaspacing = MetaDataBase::spacing( TQT_TQOBJECT(widget) ); + int metamargin = MetaDataBase::margin( TQT_TQOBJECT(widget) ); + + if ( ::tqqt_cast(widget) && + ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || + widget && ::tqqt_cast(widget->parentWidget()) ) ) + margin = MainWindow::self->currentLayoutDefaultMargin(); + + if ( !layout && ::tqqt_cast(widget) ) + widget = ((TQTabWidget*)widget)->currentPage(); + + if ( !layout && ::tqqt_cast(widget) ) + widget = ((TQWizard*)widget)->currentPage(); + + if ( !layout && ::tqqt_cast(widget) ) + widget = ((TQMainWindow*)widget)->centralWidget(); + + if ( !layout && ::tqqt_cast(widget) ) + widget = ((TQWidgetStack*)widget)->visibleWidget(); + + if ( !layout && ::tqqt_cast(widget) ) + widget = ((TQToolBox*)widget)->currentItem(); + + MetaDataBase::addEntry( TQT_TQOBJECT(widget) ); + + TQLayout *l = 0; + int align = 0; + if ( !layout && ::tqqt_cast(widget) ) { + TQGroupBox *gb = (TQGroupBox*)widget; + gb->setColumnLayout( 0, Qt::Vertical ); + layout = gb->layout(); + layout->setMargin( 0 ); + layout->setSpacing( 0 ); + switch ( type ) { + case HBox: + l = new TQHBoxLayout( layout ); + break; + case VBox: + l = new TQVBoxLayout( layout ); + break; + case Grid: + l = new QDesignerGridLayout( layout ); + break; + default: + return 0; + } + align = TQt::AlignTop; + MetaDataBase::setMargin( TQT_TQOBJECT(gb), metamargin ); + MetaDataBase::setSpacing( TQT_TQOBJECT(gb), metaspacing ); + } else { + if ( layout ) { + switch ( type ) { + case HBox: + l = new TQHBoxLayout( layout ); + break; + case VBox: + l = new TQVBoxLayout( layout ); + break; + case Grid: + l = new QDesignerGridLayout( layout ); + break; + default: + return 0; + } + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + l->setSpacing( spacing ); + l->setMargin( margin ); + } else { + switch ( type ) { + case HBox: + l = new TQHBoxLayout( widget ); + break; + case VBox: + l = new TQVBoxLayout( widget ); + break; + case Grid: + l = new QDesignerGridLayout( widget ); + break; + default: + return 0; + } + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + if ( widget ) { + MetaDataBase::setMargin( TQT_TQOBJECT(widget), metamargin ); + MetaDataBase::setSpacing( TQT_TQOBJECT(widget), metaspacing ); + } else { + l->setMargin( margin ); + l->setSpacing( spacing ); + } + } + } + l->setAlignment( align ); + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + return l; +} + +void WidgetFactory::deleteLayout( TQWidget *widget ) +{ + if ( !widget ) + return; + + if ( ::tqqt_cast(widget) ) + widget = ((TQTabWidget*)widget)->currentPage(); + if ( ::tqqt_cast(widget) ) + widget = ((TQWizard*)widget)->currentPage(); + if ( ::tqqt_cast(widget) ) + widget = ((TQMainWindow*)widget)->centralWidget(); + if ( ::tqqt_cast(widget) ) + widget = ((TQWidgetStack*)widget)->visibleWidget(); + if ( ::tqqt_cast(widget) ) + widget = ((TQToolBox*)widget)->currentItem(); + delete widget->layout(); +} + +/*! Factory functions for creating a widget of the type \a className + as child of \a parent with the name \a name. + + If \a init is TRUE, some initial default properties are set. This + has to be in sync with the initChangedProperties() function! +*/ + +TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, + const TQRect *r, Qt::Orientation orient ) +{ + if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { + TQPushButton *b = 0; + if ( init ) { + b = new QDesignerPushButton( parent, name ); + b->setText( TQString::fromLatin1( name ) ); + } else { + b = new QDesignerPushButton( parent, name ); + } + TQWidget *w = find_formwindow( b ); + b->setAutoDefault( w && ::tqqt_cast(((FormWindow*)w)->mainContainer()) ); + return b; + } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { + if ( init ) { + QDesignerToolButton *tb = new QDesignerToolButton( parent, name ); + if ( ::tqqt_cast(widgetOfContainer(parent))) { + tb->setUsesTextLabel(TRUE); + tb->setTextLabel("..."); + tb->setAutoRaise(TRUE); + tb->setTextPosition(TQToolButton::BesideIcon); + } else { + tb->setText( "..." ); + } + return tb; + } + return new QDesignerToolButton( parent, name ); + } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { + if ( init ) { + QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name ); + cb->setText( TQString::fromLatin1( name ) ); + return cb; + } + return new QDesignerCheckBox( parent, name ); + } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { + if ( init ) { + QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name ); + rb->setText( TQString::fromLatin1( name ) ); + return rb; + } + return new QDesignerRadioButton( parent, name ); + } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { + if ( init ) + return new TQGroupBox( TQString::fromLatin1( name ), parent, name ); + return new TQGroupBox( parent, name ); + } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { + if ( init ) + return new TQButtonGroup( TQString::fromLatin1( name ), parent, name ); + return new TQButtonGroup( parent, name ); + } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { +#if !defined(TQT_NO_ICONVIEW) + TQIconView* iv = new TQIconView( parent, name ); + if ( init ) + (void) new TQIconViewItem( iv, i18n( "New Item" ) ); + return iv; +#else + return 0; +#endif + } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { +#if !defined(TQT_NO_TABLE) + if ( init ) + return new TQTable( 3, 3, parent, name ); + return new TQTable( parent, name ); +#else + return 0; +#endif +#ifndef TQT_NO_SQL + } else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { + return new TQDataTable( parent, name ); +#endif //TQT_NO_SQL + } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { + return new TQDateEdit( parent, name ); + } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { + return new TQTimeEdit( parent, name ); + } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { + return new TQDateTimeEdit( parent, name ); + } + else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { + TQListBox* lb = new TQListBox( parent, name ); + if ( init ) { + lb->insertItem( i18n( "New Item" ) ); + lb->setCurrentItem( 0 ); + } + return lb; + } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { + TQListView *lv = new TQListView( parent, name ); + lv->setSorting( -1 ); + if ( init ) { + lv->addColumn( i18n( "Column 1" ) ); + lv->setCurrentItem( new TQListViewItem( lv, i18n( "New Item" ) ) ); + } + return lv; + } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) + return new TQLineEdit( parent, name ); + else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) + return new TQSpinBox( parent, name ); + else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) + return new TQSplitter( parent, name ); + else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) + return new TQMultiLineEdit( parent, name ); + else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) + return new TQTextEdit( parent, name ); + else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" ) { + QDesignerLabel *l = new QDesignerLabel( parent, name ); + if ( init ) { + l->setText( TQString::fromLatin1( name ) ); + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "text", TRUE ); + } + return l; + } else if ( className == "PixmapLabel" ) { + QDesignerLabel *l = new QDesignerLabel( parent, name ); + if ( init ) { + l->setPixmap( BarIcon( "designer_qtlogo.png", KDevDesignerPartFactory::instance() ) ); + l->setScaledContents( TRUE ); + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "pixmap", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "scaledContents", TRUE ); + } + return l; + } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + return new TQLayoutWidget( parent, name ); + else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { + TQTabWidget *tw = new QDesignerTabWidget( parent, name ); + if ( init ) { + FormWindow *fw = find_formwindow( parent ); + TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); + tw->addTab( w, i18n("Tab 1") ); + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); + tw->addTab( w, i18n("Tab 2") ); + MetaDataBase::addEntry( TQT_TQOBJECT(tw) ); + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + } + return tw; + } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { + QDesignerWidgetStack *ws = new QDesignerWidgetStack( parent, name ); + if ( init ) { + FormWindow *fw = find_formwindow( parent ); + TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" ); + ws->insertPage( w ); + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( TQT_TQOBJECT(ws) ); + } + return ws; + } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { + return new TQComboBox( FALSE, parent, name ); + } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { + if ( parent && + ( ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) ) ) { + FormWindow *fw = find_formwindow( parent ); + if ( fw ) { + QDesignerWidget *dw = new QDesignerWidget( fw, parent, name ); + MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + return dw; + } + } + return new TQWidget( parent, name ); + } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { + TQDialog *dia = 0; + if ( ::tqqt_cast(parent) ) + dia = new QDesignerDialog( (FormWindow*)parent, parent, name ); + else + dia = new TQDialog( parent, name ); +#if defined(TQT_NON_COMMERCIAL) + if ( ::tqqt_cast(parent) ) +#else + if ( parent ) +#endif + dia->reparent( parent, TQPoint( 0, 0 ), TRUE ); + return dia; + } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { + TQWizard *wiz = new QDesignerWizard( parent, name ); +#if defined(TQT_NON_COMMERCIAL) + if ( ::tqqt_cast(parent) ) +#else + if ( parent ) +#endif + wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); + if ( init && ::tqqt_cast(parent) ) { + QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); + MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + wiz->addPage( dw, i18n( "Page" ) ); + TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) ); + } + return wiz; + } else if ( className == "Spacer" ) { + Spacer *s = new Spacer( parent, name ); + MetaDataBase::addEntry( TQT_TQOBJECT(s) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "sizeType", TRUE ); + if ( !r ) + return s; + if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) + s->setOrientation( orient ); + else if ( r->width() < r->height() ) + s->setOrientation( Qt::Vertical ); + else + s->setOrientation( Qt::Horizontal ); + return s; + } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) + return new TQLCDNumber( parent, name ); + else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) + return new TQProgressBar( parent, name ); + else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) + return new TQTextView( parent, name ); + else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) + return new TQTextBrowser( parent, name ); + else if ( className == TQDIAL_OBJECT_NAME_STRING ) + return new TQDial( parent, name ); + else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { + TQSlider *s = new TQSlider( parent, name ); + if ( !r ) + return s; + if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) + s->setOrientation( orient ); + else if ( r->width() > r->height() ) + s->setOrientation( Qt::Horizontal ); + MetaDataBase::addEntry( TQT_TQOBJECT(s) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); + return s; + } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { + TQScrollBar *s = new TQScrollBar( parent, name ); + if ( !r ) + return s; + if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) + s->setOrientation( orient ); + else if ( r->width() > r->height() ) + s->setOrientation( Qt::Horizontal ); + MetaDataBase::addEntry( TQT_TQOBJECT(s) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); + return s; + } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { + if ( !init ) + return new TQFrame( parent, name ); + TQFrame *f = new TQFrame( parent, name ); + f->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised ); + return f; + } else if ( className == "Line" ) { + Line *l = new Line( parent, name ); + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "orientation", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShadow", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShape", TRUE ); + if ( !r ) + return l; + if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) + l->setOrientation( orient ); + else if ( r->width() < r->height() ) + l->setOrientation( Qt::Vertical ); + return l; + } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { + TQMainWindow *mw = new TQMainWindow( parent, name, 0 ); + mw->setDockEnabled( TQt::DockMinimized, FALSE ); + QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" ); + mw->setDockMenuEnabled( FALSE ); + MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + mw->setCentralWidget( dw ); + (void)mw->statusBar(); + dw->show(); + return mw; + } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { + if ( !init ) + return new QDesignerToolBox( parent, name ); + TQToolBox *tb = new QDesignerToolBox( parent, name ); + FormWindow *fw = find_formwindow( parent ); + TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) : + new TQWidget( tb, "page1" ); + tb->addItem( w, i18n("Page 1") ); + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new TQWidget( tb, "page2" ); + tb->addItem( w, i18n("Page 2") ); + MetaDataBase::addEntry( TQT_TQOBJECT(tb) ); + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + return tb; + } +#ifndef TQT_NO_SQL + else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { + TQWidget *w = new QDesignerDataBrowser( parent, name ); + if ( parent ) + w->reparent( parent, TQPoint( 0, 0 ), TRUE ); + return w; + } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { + TQWidget *w = new QDesignerDataView( parent, name ); + if ( parent ) + w->reparent( parent, TQPoint( 0, 0 ), TRUE ); + return w; + } +#endif + + WidgetInterface *iface = 0; + widgetManager()->queryInterface( className, &iface ); + if ( !iface ) + return 0; + + TQWidget *w = iface->create( className, parent, name ); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + if ( init && WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( className ) ) ) { + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( iface2 ) { + iface2->addPage( className, w, "Page", -1 ); + iface2->release(); + } + } +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + iface->release(); + return w; +} + + + +/*! Find out which type the layout of the widget is. Returns \c HBox, + \c VBox, \c Grid or \c NoLayout. \a layout points to this + TQWidget::layout() of \a w or to 0 after the function call. +*/ + +WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&layout ) +{ + layout = 0; + + if ( ::tqqt_cast(w) ) + w = ((TQTabWidget*)w)->currentPage(); + if ( ::tqqt_cast(w) ) + w = ((TQWizard*)w)->currentPage(); + if ( ::tqqt_cast(w) ) + w = ((TQMainWindow*)w)->centralWidget(); + if ( ::tqqt_cast(w) ) + w = ((TQWidgetStack*)w)->visibleWidget(); + if ( ::tqqt_cast(w) ) + w = ((TQToolBox*)w)->currentItem(); + + if ( ::tqqt_cast(w) ) + return ( (TQSplitter*)w )->orientation() ==Qt::Horizontal ? HBox : VBox; + + if ( !w || !w->layout() ) + return NoLayout; + TQLayout *lay = w->layout(); + + if ( ::tqqt_cast(w) ) { + TQObjectList *l = TQT_TQOBJECT(lay)->queryList( TQLAYOUT_OBJECT_NAME_STRING ); + if ( l && l->first() ) + lay = (TQLayout*)l->first(); + delete l; + } + layout = lay; + + if ( ::tqqt_cast(lay) ) + return HBox; + else if ( ::tqqt_cast(lay) ) + return VBox; + else if ( ::tqqt_cast(lay) ) + return Grid; + return NoLayout; +} + +/*! + \overload +*/ +WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout ) +{ + if ( ::tqqt_cast(layout) ) + return HBox; + else if ( ::tqqt_cast(layout) ) + return VBox; + else if ( ::tqqt_cast(layout) ) + return Grid; + return NoLayout; +} + +/*! + \overload +*/ +WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w ) +{ + TQLayout *l = 0; + return layoutType( w, l ); +} + + +TQWidget *WidgetFactory::layoutParent( TQLayout *layout ) +{ + TQObject *o = TQT_TQOBJECT(layout); + while ( o ) { + if ( o->isWidgetType() ) + return (TQWidget*)o; + o = o->parent(); + } + return 0; +} + +/*! Returns the widget into which children should be inserted when \a + w is a container known to the designer. + + Usually that is \a w itself, sometimes it is different (e.g. a + tabwidget is known to the designer as a container but the child + widgets should be inserted into the current page of the + tabwidget. So in this case this function returns the current page of + the tabwidget.) + */ +TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) +{ + if ( !w ) + return w; + if ( ::tqqt_cast(w) ) + return ((TQTabWidget*)w)->currentPage(); + if ( ::tqqt_cast(w) ) + return ((TQWizard*)w)->currentPage(); + if ( ::tqqt_cast(w) ) + return ((TQWidgetStack*)w)->visibleWidget(); + if ( ::tqqt_cast(w) ) + return ((TQToolBox*)w)->currentItem(); + if ( ::tqqt_cast(w) ) + return ((TQMainWindow*)w)->centralWidget(); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ) + return w; + WidgetInterface *iface = 0; + widgetManager()->queryInterface( classNameOf( w ), &iface ); + if ( !iface ) + return w; + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( !iface2 ) + return w; + TQWidget *c = iface2->containerOfWidget( w->className(), w ); + iface2->release(); + iface->release(); + if ( c ) + return c; +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + return w; +} + +/*! Returns the actual designer widget of the container \a w. This is + normally \a w itself, but might be a parent or grand parent of \a w + (e.g. when working with a tabwidget and \a w is the container which + contains and layouts childs, but the actual widget known to the + designer is the tabwidget which is the parent of \a w. So this + function returns the tabwidget then.) +*/ + +TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) +{ + if ( w && ::tqqt_cast(w->parentWidget()) ) + w = w->parentWidget(); + if ( w->parentWidget() && w->parentWidget()->parentWidget() && + w->parentWidget()->parentWidget()->parentWidget() && + ::tqqt_cast(w->parentWidget()->parentWidget()->parentWidget()) ) + return w->parentWidget()->parentWidget()->parentWidget(); + while ( w ) { + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ); + if ( WidgetDatabase::isContainer( id ) || + w && ::tqqt_cast(w->parentWidget()) ) + return w; + w = w->parentWidget(); + } + return w; +} + +/*! + Returns whether \a o is a passive interactor or not. + */ + +bool WidgetFactory::lastWasAPassiveInteractor = FALSE; +TQGuardedPtr *WidgetFactory::lastPassiveInteractor = new TQGuardedPtr(); + +bool WidgetFactory::isPassiveInteractor( TQObject* o ) +{ + if ( lastPassiveInteractor && *lastPassiveInteractor && (TQObject*)(*lastPassiveInteractor) == o ) + return lastWasAPassiveInteractor; + lastWasAPassiveInteractor = FALSE; + (*lastPassiveInteractor) = o; + if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things + return ( lastWasAPassiveInteractor = TRUE ); + + if ( ::tqqt_cast(o) ) + return ( lastWasAPassiveInteractor = TRUE ); + else if ( ::tqqt_cast(o) ) + return ( lastWasAPassiveInteractor = TRUE ); + else if ( ::tqqt_cast(o) && + ( ::tqqt_cast(o->parent()) || ::tqqt_cast(o->parent()) ) ) + return ( lastWasAPassiveInteractor = TRUE ); + else if ( ::tqqt_cast(o) && ::tqqt_cast(o->parent()) ) + return ( lastWasAPassiveInteractor = TRUE ); + else if ( ::tqqt_cast(o) && ::tqqt_cast(o->parent()) ) + return ( lastWasAPassiveInteractor = TRUE ); +// else if ( ::tqqt_cast(o) ) + else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) ) + return ( lastWasAPassiveInteractor = TRUE ); +// else if ( ::tqqt_cast(o) ) + else if ( o->inherits( TQHIDEDOCK_OBJECT_NAME_STRING ) ) + return ( lastWasAPassiveInteractor = TRUE ); + else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 ) + return ( lastWasAPassiveInteractor = TRUE ); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + if ( !o->isWidgetType() ) + return ( lastWasAPassiveInteractor = FALSE ); + WidgetInterface *iface = 0; + TQWidget *w = (TQWidget*)o; + while ( !iface && w && !::tqqt_cast(w) ) { + widgetManager()->queryInterface( classNameOf( w ), &iface ); + w = w->parentWidget(); + } + if ( !iface ) + return ( lastWasAPassiveInteractor = FALSE ); + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( !iface2 ) + return ( lastWasAPassiveInteractor = FALSE ); + TQWidget *fw = MainWindow::self->isAFormWindowChild( (TQWidget*)o ); + if ( !fw ) + return ( lastWasAPassiveInteractor = FALSE ); + TQWidget *dw = ( (FormWindow*)fw )->designerWidget( (TQWidget*)o ); + if ( !dw ) + return ( lastWasAPassiveInteractor = FALSE ); + lastWasAPassiveInteractor = iface2->isPassiveInteractor( dw->className(), (TQWidget*)o ); + iface2->release(); + iface->release(); +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + return lastWasAPassiveInteractor; +} + + +/*! + Returns the class name of object \a o that should be used for externally (i.e. for saving) + */ +const char* WidgetFactory::classNameOf( TQObject* o ) +{ + if ( o->isA( "PropertyObject" ) ) + return o->className(); + if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className()))) + return o->className(); + else if ( ::tqqt_cast(o) ) + return TQTABWIDGET_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQWIDGETSTACK_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return "TQWeDoNotWantToBreakTabWidget"; + else if ( ::tqqt_cast(o) ) + return TQDIALOG_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQWIDGET_OBJECT_NAME_STRING; + else if ( o->inherits( "CustomWidget" ) ) + return ( (CustomWidget*)o )->realClassName().latin1(); + else if ( ::tqqt_cast(o) ) + return TQLABEL_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQWIZARD_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQPUSHBUTTON_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQTOOLBUTTON_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQRADIOBUTTON_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQCHECKBOX_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQMENUBAR_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQTOOLBAR_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQACTION_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQACTIONGROUP_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQPOPUPMENU_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQTOOLBOX_OBJECT_NAME_STRING; +#ifndef TQT_NO_SQL + else if ( ::tqqt_cast(o) ) + return TQDATABROWSER_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQDATAVIEW_OBJECT_NAME_STRING; +#endif + return o->className(); +} + +TQString WidgetFactory::defaultSignal( TQObject *w ) +{ + if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) + return "toggled"; + else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) + return "clicked"; + else if ( ::tqqt_cast(w) ) + return "linkClicked"; + else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) + return "textChanged"; + else if ( ::tqqt_cast(w) || ::tqqt_cast(w) || + ::tqqt_cast(w) || ::tqqt_cast(w) ) + return "selectionChanged"; + else if ( ::tqqt_cast(w) ) + return "selected"; + else if ( ::tqqt_cast(w) ) + return "currentChanged"; + else if ( ::tqqt_cast(w) ) + return "aboutToShow"; + else if ( ::tqqt_cast(w) || ::tqqt_cast(w) || + ::tqqt_cast(w) || ::tqqt_cast(w) || + ::tqqt_cast(w) || ::tqqt_cast(w) || + ::tqqt_cast(w) ) + return "valueChanged"; + else if ( ::tqqt_cast(w) ) + return "activated"; + return TQString(); +} + +/*! As some properties are set by default when creating a widget this + functions markes this properties as changed. Has to be in sync with + createWidget()! +*/ + +void WidgetFactory::initChangedProperties( TQObject *o ) +{ + if ( MainWindow::self && MainWindow::self->currProject() && + MainWindow::self->currProject()->fakeFormFileFor( o ) ) + return; + MetaDataBase::setPropertyChanged( o, "name", TRUE ); + if ( !::tqqt_cast(o) && !::tqqt_cast(o) ) + MetaDataBase::setPropertyChanged( o, "geometry", TRUE ); + + if ( ::tqqt_cast(o) || + ::tqqt_cast(o) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) { + if (::tqqt_cast(o) && ::tqqt_cast(widgetOfContainer((TQWidget*)o->parent()))) { + MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE ); + MetaDataBase::setPropertyChanged( o, "textLabel", TRUE ); + MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE ); + MetaDataBase::setPropertyChanged( o, "textPosition", TRUE ); + } else { + MetaDataBase::setPropertyChanged( o, "text", TRUE ); + } + } + else if ( ::tqqt_cast(o) ) + MetaDataBase::setPropertyChanged( o, "title", TRUE ); + else if ( o->isA( TQFRAME_OBJECT_NAME_STRING ) ) { + MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); + MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); + } else if ( ::tqqt_cast(o) || ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE ); + MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); + MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); + } else if ( ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); + } else if ( ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemIconSet", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE ); +#ifndef TQT_NO_TABLE + } else if ( ::tqqt_cast(o) ) { +# ifndef TQT_NO_SQL + if (!::tqqt_cast(o) ) +# endif + { + MetaDataBase::setPropertyChanged( o, "numRows", TRUE ); + MetaDataBase::setPropertyChanged( o, "numCols", TRUE ); + TQTable *t = (TQTable*)o; + for ( int i = 0; i < 3; ++i ) { + t->horizontalHeader()->setLabel( i, TQString::number( i + 1 ) ); + t->verticalHeader()->setLabel( i, TQString::number( i + 1 ) ); + } + } +#endif + } else if ( ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "orientation", TRUE ); + } else if ( ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "label", TRUE ); + } else if ( ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemText", TRUE ); + } +} + +bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) +{ + TQString className = WidgetDatabase::className( id ); + + if ( className.contains( "ListBox" ) ) + return TRUE; + if ( className.contains( "ComboBox" ) ) + return TRUE; + if ( className.contains( "ListView" ) ) + return TRUE; + if ( className.contains( "IconView" ) ) + return TRUE; + if ( className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) + return TRUE; + if ( ::tqqt_cast(editorWidget) != 0 ) + return TRUE; + + return FALSE; +} + +bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) +{ + TQString className = WidgetDatabase::className( id ); + + if ( className.contains( "ListBox" ) || className.contains( "ListView" ) || + className.contains( "IconView" ) || className.contains( "ComboBox" ) || + ::tqqt_cast(editorWidget) != 0 ) + return TRUE; + + return FALSE; +} + +void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) +{ + TQString className = WidgetDatabase::className( id ); + + if ( className.contains( "ListBox" ) ) { + if ( !::tqqt_cast(editWidget) ) + return; + ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw ); + e->exec(); + delete e; + return; + } + + if ( className.contains( "ComboBox" ) ) { + if ( !::tqqt_cast(editWidget) ) + return; + TQComboBox *cb = (TQComboBox*)editWidget; + ListBoxEditor *e = new ListBoxEditor( parent, cb->listBox(), fw ); + e->exec(); + delete e; + cb->update(); + return; + } + + if ( className.contains( "ListView" ) ) { + if ( !::tqqt_cast(editWidget) ) + return; + TQListView *lv = (TQListView*)editWidget; + ListViewEditor *e = new ListViewEditor( parent, lv, fw ); + e->exec(); + delete e; + return; + } + + if ( className.contains( "IconView" ) ) { + if ( !::tqqt_cast(editWidget) ) + return; + IconViewEditor *e = new IconViewEditor( parent, editWidget, fw ); + e->exec(); + delete e; + return; + } + + if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING ) { + MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw ); + e->exec(); + delete e; + return; + } +#ifndef TQT_NO_TABLE + if (::tqqt_cast(editWidget) != 0) { + TableEditor *e = new TableEditor( parent, editWidget, fw ); + e->exec(); + delete e; + return; + } +#endif +} + +bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName ) +{ + if ( propName == "name" || propName == "geometry" ) + return FALSE; + TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); + return l.findIndex( propName ) == -1; +} + +bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName ) +{ + const TQMetaProperty *p = w->metaObject()->property( w->metaObject()-> + findProperty( propName, TRUE ), TRUE ); + if (!p ) + return FALSE; + return p->reset( w ); +} + +TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) +{ + if ( propName == "wordwrap" ) { + int v = defaultValue( w, "alignment" ).toInt(); + return TQVariant( ( v & WordBreak ) == WordBreak, 0 ); + } else if ( propName == "toolTip" || propName == "whatsThis" ) { + return TQVariant( TQString::fromLatin1( "" ) ); + } else if ( w->inherits( "CustomWidget" ) ) { + return TQVariant(); + } else if ( propName == "frameworkCode" ) { + return TQVariant( TRUE, 0 ); + } else if ( propName == "layoutMargin" || propName == "layoutSpacing" ) { + return TQVariant( -1 ); + } + + return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName ); +} + +TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName ) +{ + const TQMetaProperty *p = w->metaObject()-> + property( w->metaObject()->findProperty( propName, TRUE ), TRUE ); + if ( !p ) { + int v = defaultValue( w, "alignment" ).toInt(); + if ( propName == "hAlign" ) { + if ( ( v & AlignAuto ) == AlignAuto ) + return "AlignAuto"; + if ( ( v & AlignLeft ) == AlignLeft ) + return "AlignLeft"; + if ( ( v & AlignCenter ) == AlignCenter || ( v & AlignHCenter ) == AlignHCenter ) + return "AlignHCenter"; + if ( ( v & AlignRight ) == AlignRight ) + return "AlignRight"; + if ( ( v & AlignJustify ) == AlignJustify ) + return "AlignJustify"; + } else if ( propName == "vAlign" ) { + if ( ( v & AlignTop ) == AlignTop ) + return "AlignTop"; + if ( ( v & AlignCenter ) == AlignCenter || ( v & AlignVCenter ) == AlignVCenter ) + return "AlignVCenter"; + if ( ( v & AlignBottom ) == AlignBottom ) + return "AlignBottom"; + } else if ( propName == "resizeMode" ) { + return "Auto"; + } + return TQString(); + + } + return p->valueToKey( defaultValue( w, propName ).toInt() ); +} + +TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w ) +{ + if ( !w ) + return 0; + return new CustomWidget( parent, name, w ); +} + +TQVariant WidgetFactory::property( TQObject *w, const char *name ) +{ + int id = w->metaObject()->findProperty( name, TRUE ); + const TQMetaProperty* p = w->metaObject()->property( id, TRUE ); + if ( !p || !p->isValid() ) + return MetaDataBase::fakeProperty( w, name ); + return w->property( name ); +} + +void QDesignerLabel::updateBuddy() +{ + + if ( myBuddy.isEmpty() ) + return; + + TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, FALSE, TRUE ); + if ( !l || !l->first() ) { + delete l; + return; + } + + TQLabel::setBuddy( (TQWidget*)l->first() ); + delete l; +} + + +void QDesignerWidget::resizeEvent( TQResizeEvent* e) +{ + if ( need_frame ) { + TQPainter p(this); + p.setPen( backgroundColor() ); + p.drawRect( TQRect( TQPoint(0,0), e->oldSize() ) ); + } +} + +void QDesignerWidget::paintEvent( TQPaintEvent *e ) +{ + if ( need_frame ) { + TQPainter p(this); + p.setPen( backgroundColor().dark() ); + p.drawRect( rect() ); + } + formwindow->paintGrid( this, e ); +} + +void QDesignerDialog::paintEvent( TQPaintEvent *e ) +{ + formwindow->paintGrid( this, e ); +} + +TQSizePolicy TQLayoutWidget::sizePolicy() const +{ + return sp; +} + +bool TQLayoutWidget::event( TQEvent *e ) +{ + if ( e && ( e->type() == TQEvent::ChildInserted || + e->type() == TQEvent::ChildRemoved || + e->type() == TQEvent::LayoutHint || + e->type() == TQEvent::Reparent ) ) + updateSizePolicy(); + return TQWidget::event( e ); +} + +/* + This function must be called on TQLayoutWidget creation and whenever + the TQLayoutWidget's parent layout changes (e.g., from a TQHBoxLayout + to a TQVBoxLayout), because of the (illogical) way layouting works. +*/ +void TQLayoutWidget::updateSizePolicy() +{ + if ( childrenListObject().isEmpty() || childrenListObject().count() == 0 ) { + sp = TQWidget::sizePolicy(); + return; + } + + /* + TQSizePolicy::MayShrink & friends are private. Here we assume the + following: + + Fixed = 0 + Maximum = MayShrink + Minimum = MayGrow + Preferred = MayShrink | MayGrow + */ + + int ht = (int) TQSizePolicy::Preferred; + int vt = (int) TQSizePolicy::Preferred; + + if ( layout() ) { + /* + parentLayout is set to the parent layout if there is one and if it is + top level, in which case layouting is illogical. + */ + TQLayout *parentLayout = 0; + if ( parent() && parent()->isWidgetType() ) { + parentLayout = ((TQWidget *)parent())->layout(); + if ( parentLayout && + ::tqqt_cast(parentLayout->mainWidget()) ) + parentLayout = 0; + } + + TQObjectListIt it( childrenListObject() ); + TQObject *o; + + if ( ::tqqt_cast(layout()) ) { + if ( ::tqqt_cast(parentLayout) ) + vt = TQSizePolicy::Minimum; + else + vt = TQSizePolicy::Fixed; + + while ( ( o = it.current() ) ) { + ++it; + if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) + continue; + TQWidget *w = (TQWidget*)o; + + if ( !w->sizePolicy().mayGrowHorizontally() ) + ht &= ~TQSizePolicy::Minimum; + if ( !w->sizePolicy().mayShrinkHorizontally() ) + ht &= ~TQSizePolicy::Maximum; + if ( w->sizePolicy().mayGrowVertically() ) + vt |= TQSizePolicy::Minimum; + if ( w->sizePolicy().mayShrinkVertically() ) + vt |= TQSizePolicy::Maximum; + } + } else if ( ::tqqt_cast(layout()) ) { + if ( ::tqqt_cast(parentLayout) ) + ht = TQSizePolicy::Minimum; + else + ht = TQSizePolicy::Fixed; + + while ( ( o = it.current() ) ) { + ++it; + if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) + continue; + TQWidget *w = (TQWidget*)o; + + if ( w->sizePolicy().mayGrowHorizontally() ) + ht |= TQSizePolicy::Minimum; + if ( w->sizePolicy().mayShrinkHorizontally() ) + ht |= TQSizePolicy::Maximum; + if ( !w->sizePolicy().mayGrowVertically() ) + vt &= ~TQSizePolicy::Minimum; + if ( !w->sizePolicy().mayShrinkVertically() ) + vt &= ~TQSizePolicy::Maximum; + } + } else if ( ::tqqt_cast(layout()) ) { + ht = TQSizePolicy::Fixed; + vt = TQSizePolicy::Fixed; + if ( parentLayout ) { + if ( ::tqqt_cast(parentLayout) ) + ht = TQSizePolicy::Minimum; + else if ( ::tqqt_cast(parentLayout) ) + vt = TQSizePolicy::Minimum; + } + + while ( ( o = it.current() ) ) { + ++it; + if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) + continue; + TQWidget *w = (TQWidget*)o; + + if ( w->sizePolicy().mayGrowHorizontally() ) + ht |= TQSizePolicy::Minimum; + if ( w->sizePolicy().mayShrinkHorizontally() ) + ht |= TQSizePolicy::Maximum; + if ( w->sizePolicy().mayGrowVertically() ) + vt |= TQSizePolicy::Minimum; + if ( w->sizePolicy().mayShrinkVertically() ) + vt |= TQSizePolicy::Maximum; + } + } +#ifdef USE_QT4 + if ( layout()->expanding() & TQSizePolicy::Horizontally ) +#else // USE_QT4 + if ( layout()->expanding() & TQSizePolicy::Horizontally ) +#endif // USE_QT4 + ht = TQSizePolicy::Expanding; +#ifdef USE_QT4 + if ( layout()->expanding() & TQSizePolicy::Vertically ) +#else // USE_QT4 + if ( layout()->expanding() & TQSizePolicy::Vertically ) +#endif // USE_QT4 + vt = TQSizePolicy::Expanding; + + layout()->invalidate(); + } + + sp = TQSizePolicy( (TQSizePolicy::SizeType) ht, (TQSizePolicy::SizeType) vt ); + updateGeometry(); +} + +void CustomWidget::paintEvent( TQPaintEvent *e ) +{ + if ( ::tqqt_cast(parentWidget()) ) { + ( (FormWindow*)parentWidget() )->paintGrid( this, e ); + } else { + TQPainter p( this ); + p.fillRect( rect(), colorGroup().dark() ); + p.setPen( colorGroup().light() ); + p.drawText( 2, 2, width() - 4, height() - 4, TQt::AlignAuto | TQt::AlignTop, cusw->className ); + p.drawPixmap( ( width() - cusw->pixmap->width() ) / 2, + ( height() - cusw->pixmap->height() ) / 2, + *cusw->pixmap ); + } +} + + +CustomWidgetFactory::CustomWidgetFactory() +{ +} + +TQWidget *CustomWidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name ) const +{ + MetaDataBase::CustomWidget *w = MetaDataBase::customWidget( WidgetDatabase::idFromClassName( className ) ); + if ( !w ) + return 0; + return WidgetFactory::createCustomWidget( parent, name, w ); +} + + +QDesignerToolBox::QDesignerToolBox( TQWidget *parent, const char *name ) + : TQToolBox( parent, name ) +{ +} + +TQString QDesignerToolBox::itemLabel() const +{ + return TQToolBox::itemLabel( currentIndex() ); +} + +void QDesignerToolBox::setItemLabel( const TQString &l ) +{ + TQToolBox::setItemLabel( currentIndex(), l ); +} + +TQCString QDesignerToolBox::itemName() const +{ + return currentItem() ? currentItem()->name() : 0; +} + +void QDesignerToolBox::setItemName( const TQCString &n ) +{ + if (currentItem()) + currentItem()->setName( n ); +} + + +TQt::BackgroundMode QDesignerToolBox::itemBackgroundMode() const +{ + return (item(0) ? item(0)->backgroundMode() : PaletteBackground); +} + +void QDesignerToolBox::setItemBackgroundMode( BackgroundMode bmode ) +{ + for (int i = 0; i < count(); ++i) { + TQWidget *w = item(i); + w->setBackgroundMode( bmode ); + w->update(); + } +} + +void QDesignerToolBox::itemInserted( int index ) +{ + if (count() > 1) + item(index)->setBackgroundMode(item(index>0?0:1)->backgroundMode()); +} diff --git a/kdevdesigner/designer/widgetfactory.h b/kdevdesigner/designer/widgetfactory.h new file mode 100644 index 00000000..feebe9c7 --- /dev/null +++ b/kdevdesigner/designer/widgetfactory.h @@ -0,0 +1,515 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef WIDGETFACTORY_H +#define WIDGETFACTORY_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "metadatabase.h" +#include "tqwidgetfactory.h" + +class TQWidget; +class TQLayout; +class FormWindow; + +class CustomWidgetFactory : public TQWidgetFactory +{ +public: + CustomWidgetFactory(); + TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name ) const; + +}; + +class WidgetFactory : public TQt +{ + friend class CustomWidgetFactory; + +public: + enum LayoutType { + HBox, + VBox, + Grid, + NoLayout + }; + + static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = TRUE, + const TQRect *rect = 0, Orientation orient = TQt::Horizontal ); + static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type ); + static void deleteLayout( TQWidget *widget ); + + static LayoutType layoutType( TQWidget *w ); + static LayoutType layoutType( TQWidget *w, TQLayout *&layout ); + static LayoutType layoutType( TQLayout *layout ); + static TQWidget *layoutParent( TQLayout *layout ); + + static TQWidget* containerOfWidget( TQWidget *w ); + static TQWidget* widgetOfContainer( TQWidget *w ); + + static bool isPassiveInteractor( TQObject* o ); + static const char* classNameOf( TQObject* o ); + + static void initChangedProperties( TQObject *o ); + + static bool hasSpecialEditor( int id, TQObject *editorWidget ); + static bool hasItems( int id, TQObject *editorWidget ); + static void editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw ); + + static bool canResetProperty( TQObject *w, const TQString &propName ); + static bool resetProperty( TQObject *w, const TQString &propName ); + static TQVariant defaultValue( TQObject *w, const TQString &propName ); + static TQString defaultCurrentItem( TQObject *w, const TQString &propName ); + + static TQVariant property( TQObject *w, const char *name ); + static void saveDefaultProperties( TQObject *w, int id ); + static void saveChangedProperties( TQObject *w, int id ); + + static TQString defaultSignal( TQObject *w ); + +private: + static TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, + const TQRect *r = 0, Orientation orient = TQt::Horizontal ); + static TQWidget *createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w ); + + static TQGuardedPtr *lastPassiveInteractor; + static bool lastWasAPassiveInteractor; +}; + + +class QDesignerTabWidget : public TQTabWidget +{ + Q_OBJECT + + TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true ) + TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) + TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) +public: + QDesignerTabWidget( TQWidget *parent, const char *name ); + + int currentPage() const; + void setCurrentPage( int i ); + TQString pageTitle() const; + void setPageTitle( const TQString& title ); + TQCString pageName() const; + void setPageName( const TQCString& name ); + + int count() const; + TQTabBar *tabBar() const { return TQTabWidget::tabBar(); } + + bool eventFilter( TQObject*, TQEvent* ); + +private: + TQPoint pressPoint; + TQWidget *dropIndicator; + TQWidget *dragPage; + TQString dragLabel; + bool mousePressed; +}; + +class QDesignerWidgetStack : public TQWidgetStack +{ + Q_OBJECT + + TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true ) + TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) +public: + QDesignerWidgetStack( TQWidget *parent, const char *name ); + + int currentPage() const; + void setCurrentPage( int i ); + TQCString pageName() const; + void setPageName( const TQCString& name ); + + int count() const; + TQWidget* page( int i ) const; + + int insertPage( TQWidget *p, int i = -1 ); + int removePage( TQWidget *p ); + +public slots: + void updateButtons(); + +protected: + void resizeEvent( TQResizeEvent *e ) { + TQWidgetStack::resizeEvent( e ); + updateButtons(); + } + + void showEvent( TQShowEvent *e ) { + TQWidgetStack::showEvent( e ); + updateButtons(); + } + +private slots: + void prevPage(); + void nextPage(); + +private: + TQPtrList pages; + TQToolButton *prev, *next; + +}; + +class QDesignerWizard : public TQWizard +{ + Q_OBJECT + + TQ_PROPERTY( int currentPage READ currentPageNum WRITE setCurrentPage STORED false DESIGNABLE true ) + TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) + TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) + TQ_OVERRIDE( bool modal READ isModal WRITE setModal ) + +public: + QDesignerWizard( TQWidget *parent, const char *name ) + : TQWizard( parent, name ), modal(FALSE) {} + + int currentPageNum() const; + void setCurrentPage( int i ); + TQString pageTitle() const; + void setPageTitle( const TQString& title ); + TQCString pageName() const; + void setPageName( const TQCString& name ); + int pageNum( TQWidget *page ); + void addPage( TQWidget *p, const TQString & ); + void removePage( TQWidget *p ); + void insertPage( TQWidget *p, const TQString &t, int index ); + bool isPageRemoved( TQWidget *p ) { return (removedPages.find( p ) != 0); } + + bool isModal() const { return modal; } + void setModal(bool b) { modal = b; } + + void reject() {} + +private: + struct Page + { + Page( TQWidget *a, const TQString &b ) : p( a ), t( b ) {} + Page() : p( 0 ), t( TQString() ) {} + TQWidget *p; + TQString t; + }; + TQPtrDict removedPages; + bool modal; + +}; + +class TQLayoutWidget : public TQWidget +{ + Q_OBJECT + + +public: + TQLayoutWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ), sp( sizePolicy() ) {} + + TQSizePolicy sizePolicy() const; + void updateSizePolicy(); + +protected: + void paintEvent( TQPaintEvent * ); + bool event( TQEvent * ); + TQSizePolicy sp; + +}; + + +class CustomWidget : public TQWidget +{ + Q_OBJECT + + +public: + CustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *cw ) + : TQWidget( parent, name ), cusw( cw ) { + alwaysExpand = parentWidget() && parentWidget()->inherits( "FormWindow" ); + setSizePolicy( cw->sizePolicy ); + if ( !alwaysExpand ) + setBackgroundMode( PaletteDark ); + } + + TQSize sizeHint() const { + TQSize sh = cusw->sizeHint; + if ( sh.isValid() ) + return sh; + return TQWidget::sizeHint(); + } + + TQString realClassName() { return cusw->className; } + MetaDataBase::CustomWidget *customWidget() const { return cusw; } + +protected: + void paintEvent( TQPaintEvent *e ); + + MetaDataBase::CustomWidget *cusw; + bool alwaysExpand; + +}; + + +class Line : public TQFrame +{ + Q_OBJECT + + + TQ_PROPERTY( Orientation orientation READ orientation WRITE setOrientation ) + TQ_OVERRIDE( int frameWidth DESIGNABLE false ) + TQ_OVERRIDE( Shape frameShape DESIGNABLE false ) + TQ_OVERRIDE( TQRect frameRect DESIGNABLE false ) + TQ_OVERRIDE( TQRect contentsRect DESIGNABLE false ) +public: + Line( TQWidget *parent, const char *name ) + : TQFrame( parent, name, WMouseNoMask ) { + setFrameStyle( HLine | Sunken ); + } + + void setOrientation( Orientation orient ) { + if ( orient ==TQt::Horizontal ) + setFrameShape( HLine ); + else + setFrameShape( VLine ); + } + Orientation orientation() const { + return frameShape() == HLine ?TQt::Horizontal :TQt::Vertical; + } +}; + +class QDesignerLabel : public TQLabel +{ + Q_OBJECT + + + TQ_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget ) + +public: + QDesignerLabel( TQWidget *parent = 0, const char *name = 0 ) + : TQLabel( parent, name ) { myBuddy = 0; } + + void setBuddyWidget( const TQCString &b ) { + myBuddy = b; + updateBuddy(); + } + TQCString buddyWidget() const { + return myBuddy; + }; + +protected: + void showEvent( TQShowEvent *e ) { + TQLabel::showEvent( e ); + updateBuddy(); + } + + +private: + void updateBuddy(); + + TQCString myBuddy; + +}; + +class QDesignerWidget : public TQWidget +{ + Q_OBJECT + + +public: + QDesignerWidget( FormWindow *fw, TQWidget *parent, const char *name ) + : TQWidget( parent, name, WResizeNoErase ), formwindow( fw ) { + need_frame = parent && parent->inherits("QDesignerWidgetStack" ); + } + +protected: + void resizeEvent( TQResizeEvent* e); + void paintEvent( TQPaintEvent *e ); + +private: + FormWindow *formwindow; + uint need_frame : 1; + +}; + +class QDesignerDialog : public TQDialog +{ + Q_OBJECT + + TQ_OVERRIDE( bool modal READ isModal WRITE setModal ) + +public: + QDesignerDialog( FormWindow *fw, TQWidget *parent, const char *name ) + : TQDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ), modal(FALSE) {} + + bool isModal() const { return modal; } + void setModal(bool b) { modal = b; } + +protected: + void paintEvent( TQPaintEvent *e ); + +private: + FormWindow *formwindow; + bool modal; + +}; + +class QDesignerToolButton : public TQToolButton +{ + Q_OBJECT + + TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) + +public: + QDesignerToolButton( TQWidget *parent, const char *name ) + : TQToolButton( parent, name ) {} + + bool isInButtonGroup() const { + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + } + int buttonGroupId() const { + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + } + void setButtonGroupId( int id ) { + if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); + } + } +}; + +class QDesignerRadioButton : public TQRadioButton +{ + Q_OBJECT + + TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) + +public: + QDesignerRadioButton( TQWidget *parent, const char *name ) + : TQRadioButton( parent, name ) {} + + bool isInButtonGroup() const { + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + } + int buttonGroupId() const { + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + } + void setButtonGroupId( int id ) { + if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); + } + } + +}; + +class QDesignerPushButton : public TQPushButton +{ + Q_OBJECT + + TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) + +public: + QDesignerPushButton( TQWidget *parent, const char *name ) + : TQPushButton( parent, name ) {} + + bool isInButtonGroup() const { + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + } + int buttonGroupId() const { + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + } + void setButtonGroupId( int id ) { + if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); + } + } + +}; + +class QDesignerCheckBox : public TQCheckBox +{ + Q_OBJECT + + TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) + +public: + QDesignerCheckBox( TQWidget *parent, const char *name ) + : TQCheckBox( parent, name ) {} + + bool isInButtonGroup() const { + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + } + int buttonGroupId() const { + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + } + void setButtonGroupId( int id ) { + if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); + } + } + +}; + +class QDesignerToolBox : public TQToolBox +{ + Q_OBJECT + + TQ_PROPERTY( TQString itemLabel READ itemLabel WRITE setItemLabel STORED false DESIGNABLE true ) + TQ_PROPERTY( TQCString itemName READ itemName WRITE setItemName STORED false DESIGNABLE true ) + TQ_PROPERTY( BackgroundMode itemBackgroundMode READ itemBackgroundMode WRITE setItemBackgroundMode STORED false DESIGNABLE true ) + +public: + QDesignerToolBox( TQWidget *parent, const char *name ); + + TQString itemLabel() const; + void setItemLabel( const TQString &l ); + TQCString itemName() const; + void setItemName( const TQCString &n ); + BackgroundMode itemBackgroundMode() const; + void setItemBackgroundMode( BackgroundMode ); + +protected: + void itemInserted( int index ); +}; + +#endif diff --git a/kdevdesigner/designer/wizardeditor.ui b/kdevdesigner/designer/wizardeditor.ui new file mode 100644 index 00000000..84302d09 --- /dev/null +++ b/kdevdesigner/designer/wizardeditor.ui @@ -0,0 +1,342 @@ + +WizardEditorBase +********************************************************************* +** Copyright (C) 2001 Trolltech AS. All rights reserved. +** +** This file is part of Qt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about Qt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +********************************************************************* + + + WizardEditorBase + + + + 0 + 0 + 396 + 233 + + + + Wizard Page Editor + + + + unnamed + + + 11 + + + 6 + + + + Layout19 + + + + unnamed + + + 0 + + + 6 + + + + Layout14 + + + + unnamed + + + 0 + + + 2 + + + + pagesLabel + + + Wizard pages: + + + + + listBox + + + + + + + Layout18 + + + + unnamed + + + 0 + + + 6 + + + + buttonAdd + + + A&dd + + + + + buttonRemove + + + &Remove + + + + + Spacer11 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + buttonUp + + + + + + "designer_s_up.png" + + + + + buttonDown + + + + + + "designer_s_down.png" + + + + + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + buttonHelp + + + &Help + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + true + + + true + + + Close the dialog and apply all the changes. + + + + + buttonApply + + + &Apply + + + true + + + Apply all changes. + + + + + buttonCancel + + + &Cancel + + + true + + + Close the dialog and discard any changes. + + + + + + + + + buttonHelp + clicked() + WizardEditorBase + helpClicked() + + + buttonApply + clicked() + WizardEditorBase + applyClicked() + + + buttonUp + clicked() + WizardEditorBase + upClicked() + + + buttonDown + clicked() + WizardEditorBase + downClicked() + + + buttonAdd + clicked() + WizardEditorBase + addClicked() + + + buttonRemove + clicked() + WizardEditorBase + removeClicked() + + + listBox + selected(int) + WizardEditorBase + itemSelected(int) + + + listBox + highlighted(int) + WizardEditorBase + itemHighlighted(int) + + + buttonOk + clicked() + WizardEditorBase + okClicked() + + + buttonCancel + clicked() + WizardEditorBase + cancelClicked() + + + + init() + destroy() + addClicked() + applyClicked() + cancelClicked() + downClicked() + helpClicked() + itemHighlighted(int) + itemSelected(int) + okClicked() + removeClicked() + upClicked() + + + myiconloader.h + +BarIcon2 + + + diff --git a/kdevdesigner/designer/wizardeditorimpl.cpp b/kdevdesigner/designer/wizardeditorimpl.cpp new file mode 100644 index 00000000..c4c4f83d --- /dev/null +++ b/kdevdesigner/designer/wizardeditorimpl.cpp @@ -0,0 +1,253 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "wizardeditorimpl.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "command.h" +#include "listboxdnd.h" +#include "listboxrename.h" + +#include +#include +#include +#include + +#include + +WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw ) + : WizardEditorBase( parent, 0 ), formwindow( fw ), wizard( w ), draggedItem( 0 ) +{ + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + fillListBox(); + + // Add drag and drop + ListBoxDnd *listBoxDnd = new ListBoxDnd( listBox ); + listBoxDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move ); + TQObject::connect( listBoxDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), + listBoxDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) ); + + TQObject::connect( listBoxDnd, TQT_SIGNAL( dragged( TQListBoxItem * ) ), + this, TQT_SLOT( itemDragged( TQListBoxItem * ) ) ); + TQObject::connect( listBoxDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), + this, TQT_SLOT( itemDropped( TQListBoxItem * ) ) ); + + // Add in-place rename + new ListBoxRename( listBox ); +} + +WizardEditor::~WizardEditor() +{ + commands.setAutoDelete( TRUE ); +} + +void WizardEditor::okClicked() +{ + applyClicked(); + accept(); +} + +void WizardEditor::cancelClicked() +{ + reject(); +} + +void WizardEditor::applyClicked() +{ + if ( commands.isEmpty() ) return; + + // schedule macro command + MacroCommand* cmd = new MacroCommand( i18n( "Edit Wizard Pages" ), formwindow, commands ); + formwindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + + // clear command list + commands.clear(); + + // fix wizard buttons + for ( int i = 0; i < wizard->pageCount(); i++ ) { + + TQWidget * page = wizard->page( i ); + if ( i == 0 ) { // first page + + wizard->setBackEnabled( page, FALSE ); + wizard->setNextEnabled( page, TRUE ); + } + else if ( i == wizard->pageCount() - 1 ) { // last page + + wizard->setBackEnabled( page, TRUE ); + wizard->setNextEnabled( page, FALSE ); + } + else { + + wizard->setBackEnabled( page, TRUE ); + wizard->setNextEnabled( page, TRUE ); + } + wizard->setFinishEnabled( page, FALSE ); + } + + // update listbox + int index = listBox->currentItem(); + fillListBox(); + listBox->setCurrentItem( index ); + + // show current page + wizard->showPage( wizard->page( 0 ) ); +} + +void WizardEditor::helpClicked() +{ + +} + +void WizardEditor::addClicked() +{ + int index = listBox->currentItem() + 1; + // update listbox + listBox->insertItem( i18n( "Page" ), index ); + + // schedule add command + AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ).arg( wizard->name() ), + formwindow, wizard, "Page", index, FALSE); + commands.append( cmd ); + + // update buttons + updateButtons(); +} + +void WizardEditor::removeClicked() +{ + if ( listBox->count() < 2 ) return; + + int index = listBox->currentItem(); + + // update listbox + listBox->removeItem( index ); + + // schedule remove command + DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ) + .arg( listBox->text( index ) ).arg( wizard->name() ), + formwindow, wizard, index, FALSE ); + commands.append( cmd ); + + // update buttons + updateButtons(); +} + +void WizardEditor::upClicked() +{ + int index1 = listBox->currentItem(); + int index2 = index1 - 1; + + // swap listbox items + TQString item1 = listBox->text( index1 ); + listBox->removeItem( index1 ); + listBox->insertItem( item1, index2 ); + listBox->setCurrentItem( index2 ); + + // schedule swap command + SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n( "Swap Pages %1 and %2 of %3" ).arg( index1 ).arg( index2 ) + .arg( wizard->name() ), formwindow, wizard, index1, index2); + commands.append( cmd ); + + // update buttons + updateButtons(); +} + +void WizardEditor::downClicked() +{ + int index1 = listBox->currentItem(); + int index2 = index1 + 1; + + // swap listbox items + TQString item1 = listBox->text( index1 ); + listBox->removeItem( index1 ); + listBox->insertItem( item1, index2 ); + listBox->setCurrentItem( index2 ); + + // schedule swap command + SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n( "Swap Pages %1 and %2 of %3" ).arg( index1 ).arg( index2 ).arg( wizard->name() ), formwindow, wizard, index2, index1); + commands.append( cmd ); + + // update buttons + updateButtons(); +} + +void WizardEditor::fillListBox() +{ + listBox->clear(); + + if ( !wizard ) return; + for ( int i = 0; i < wizard->pageCount(); i++ ) + listBox->insertItem( wizard->title( wizard->page( i ) ) ); + + updateButtons(); +} + +void WizardEditor::itemHighlighted( int ) +{ + updateButtons(); +} + +void WizardEditor::itemSelected( int index ) +{ + if ( index < 0 ) return; + // Called when TQt::Key_Enter was pressed. + // ListBoxRename has renamed the list item, so we only need to rename the page to the same name. + TQString pn( i18n( "Rename page %1 of %2" ).arg( wizard->title( wizard->page( index ) ) ).arg( wizard->name() ) ); + RenameWizardPageCommand *cmd = new RenameWizardPageCommand( pn, formwindow, wizard, index, listBox->text( index ) ); + commands.append( cmd ); +} + +void WizardEditor::updateButtons() +{ + int index = listBox->currentItem(); + + buttonUp->setEnabled( index > 0 ); + buttonDown->setEnabled( index < (int)listBox->count() - 1 ); + buttonRemove->setEnabled( index >= 0 ); + + if ( listBox->count() < 2 ) + buttonRemove->setEnabled( FALSE ); +} + +void WizardEditor::itemDragged( TQListBoxItem * i ) +{ + // Store item index + draggedItem = listBox->index( i ); +} + +void WizardEditor::itemDropped( TQListBoxItem * i ) +{ + if ( draggedItem < 0 ) return; + // The reorder the pages acording to the listBox list of items + // Assumes that only one item has been moved. + int droppedItem = listBox->index( i ); + + //tqDebug( "Moving page %d -> %d", draggedItem, droppedItem ); + MoveWizardPageCommand *cmd = new MoveWizardPageCommand( i18n( "Move Page %1 to %2 in %3" ).arg( draggedItem ).arg( droppedItem ).arg( wizard->name() ), formwindow, wizard, draggedItem, droppedItem ); + commands.append( cmd ); +} diff --git a/kdevdesigner/designer/wizardeditorimpl.h b/kdevdesigner/designer/wizardeditorimpl.h new file mode 100644 index 00000000..f49a6b6c --- /dev/null +++ b/kdevdesigner/designer/wizardeditorimpl.h @@ -0,0 +1,75 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef WIZARDEDITORIMPL_H +#define WIZARDEDITORIMPL_H + +class TQWizard; +class FormWindow; + +#include + +#include "wizardeditor.h" +#include "command.h" + +class WizardEditor : public WizardEditorBase +{ + Q_OBJECT + + +public: + WizardEditor( TQWidget *parent, TQWizard *wizard, FormWindow *fw ); + ~WizardEditor(); + +protected slots: + void okClicked(); + void applyClicked(); + void cancelClicked(); + void helpClicked(); + + void addClicked(); + void removeClicked(); + void upClicked(); + void downClicked(); + + void itemHighlighted( int ); + void itemSelected( int ); + + void itemDragged( TQListBoxItem * ); + void itemDropped( TQListBoxItem * ); + +private: + void updateButtons(); + void fillListBox(); + +private: + FormWindow *formwindow; + TQWizard *wizard; + TQPtrList commands; + int draggedItem; +}; + +#endif diff --git a/kdevdesigner/designer/workspace.cpp b/kdevdesigner/designer/workspace.cpp new file mode 100644 index 00000000..b806cc6c --- /dev/null +++ b/kdevdesigner/designer/workspace.cpp @@ -0,0 +1,711 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include // HP-UX compiler needs this here +#include "workspace.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "globaldefs.h" +#include "command.h" +#include "project.h" +#include "pixmapcollection.h" +#include "sourcefile.h" +#include "sourceeditor.h" +#include "propertyeditor.h" + +#include +#include "kdevdesigner_part.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "qcompletionedit.h" + +#include + +WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p ) + : TQListViewItem( parent ) +{ + init(); + project = p; + t = ProjectType; + setPixmap( 0, SmallIcon( "designer_folder.png" , KDevDesignerPartFactory::instance()) ); + setExpandable( FALSE ); +} + +WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf ) + : TQListViewItem( parent ) +{ + init(); + sourceFile = sf; + t = SourceFileType; + setPixmap( 0, SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) ); +} + +WorkspaceItem::WorkspaceItem( TQListViewItem *parent, TQObject *o, Project *p ) + : TQListViewItem( parent ) +{ + init(); + object = o; + project = p; + t = ObjectType; + setPixmap( 0, SmallIcon( "designer_object.png" , KDevDesignerPartFactory::instance()) ); + TQObject::connect( p->fakeFormFileFor( o ), TQT_SIGNAL( somethingChanged(FormFile*) ), + listView(), TQT_SLOT( update() ) ); +} + +WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type ) + : TQListViewItem( parent ) +{ + init(); + formFile = ff; + t = type; + if ( type == FormFileType ) { + setPixmap( 0, SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) ); + TQObject::connect( ff, TQT_SIGNAL( somethingChanged(FormFile*) ), listView(), TQT_SLOT( update(FormFile*) ) ); + if ( formFile->supportsCodeFile() ) { + (void) new WorkspaceItem( this, formFile, FormSourceType ); + } + } else if ( type == FormSourceType ) { + setPixmap( 0, SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) ); + } +} + + +void WorkspaceItem::init() +{ + autoOpen = FALSE; + useOddColor = FALSE; + project = 0; + sourceFile = 0; + formFile = 0; +} + +void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) +{ + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + g.setColor( TQColorGroup::Foreground, TQt::black ); + + if ( type() == FormSourceType && + ( !formFile->hasFormCode() || ( formFile->codeFileState() == FormFile::Deleted && formFile->formWindow() ) ) && + parent() && parent()->parent() && ( (WorkspaceItem*)parent()->parent() )->project && + ( (WorkspaceItem*)parent()->parent() )->project->isCpp() ) { + g.setColor( TQColorGroup::Text, listView()->palette().disabled().color( TQColorGroup::Text) ); + g.setColor( TQColorGroup::HighlightedText, listView()->palette().disabled().color( TQColorGroup::Text) ); + } else { + g.setColor( TQColorGroup::Text, TQt::black ); + } + p->save(); + + if ( isModified() ) { + TQFont f = p->font(); + f.setBold( TRUE ); + p->setFont( f ); + } + + TQListViewItem::paintCell( p, g, column, width, align ); + p->setPen( TQPen( cg.dark(), 1 ) ); + if ( column == 0 ) + p->drawLine( 0, 0, 0, height() - 1 ); + if ( listView()->firstChild() != this ) { + if ( nextSibling() != itemBelow() && itemBelow()->depth() < depth() ) { + int d = depth() - itemBelow()->depth(); + p->drawLine( -listView()->treeStepSize() * d, height() - 1, 0, height() - 1 ); + } + } + p->drawLine( 0, height() - 1, width, height() - 1 ); + p->drawLine( width - 1, 0, width - 1, height() ); + p->restore(); +} + +TQString WorkspaceItem::text( int column ) const +{ + if ( column != 0 ) + return TQListViewItem::text( column ); + switch( t ) { + case ProjectType: + if ( project->isDummy() ) { + return i18n("" ); + } else if ( MainWindow::self->singleProjectMode() ) { + return TQFileInfo( project->fileName() ).baseName(); + } + return project->makeRelative( project->fileName() ); + case FormFileType: + if ( !MainWindow::self->singleProjectMode() ) + return formFile->formName() + ": " + formFile->fileName(); + return formFile->formName(); + case FormSourceType: + if ( !MainWindow::self->singleProjectMode() ) + return formFile->codeFile(); + return formFile->formName() + " [Source]"; + case SourceFileType: + return sourceFile->fileName(); + case ObjectType: + if ( !project->hasParentObject( object ) ) + return object->name(); + return project->qualifiedName( object ); + } + + return TQString(); // shut up compiler +} + +void WorkspaceItem::fillCompletionList( TQStringList& completion ) +{ + switch( t ) { + case ProjectType: + break; + case FormFileType: + completion += formFile->formName(); + completion += formFile->fileName(); + break; + case FormSourceType: + completion += formFile->codeFile(); + break; + case SourceFileType: + completion += sourceFile->fileName(); + break; + case ObjectType: + completion += object->name(); + } +} + +bool WorkspaceItem::checkCompletion( const TQString& completion ) +{ + switch( t ) { + case ProjectType: + break; + case FormFileType: + return completion == formFile->formName() + || completion == formFile->fileName(); + case FormSourceType: + return completion == formFile->codeFile(); + case SourceFileType: + return completion == sourceFile->fileName(); + case ObjectType: + return completion == object->name(); + } + return FALSE; +} + + +bool WorkspaceItem::isModified() const +{ + switch( t ) { + case ProjectType: + return project->isModified(); + case FormFileType: + return formFile->isModified( FormFile::WFormWindow ); + case FormSourceType: + return formFile->isModified( FormFile::WFormCode ); + case SourceFileType: + return sourceFile->isModified(); + case ObjectType: + return project->fakeFormFileFor( object )->isModified(); + break; + } + return FALSE; // shut up compiler +} + +TQString WorkspaceItem::key( int column, bool ) const +{ + TQString key = text( column ); + if ( t == FormFileType ) + key.prepend( "0" ); + else if ( t == ObjectType ) + key.prepend( "a" ); + else + key.prepend( "A" ); + return key; +} + +TQColor WorkspaceItem::backgroundColor() +{ + bool b = useOddColor; + if ( t == FormSourceType && parent() ) + b = ( ( WorkspaceItem*)parent() )->useOddColor; + return b ? *backColor2 : *backColor1; +} + + +void WorkspaceItem::setOpen( bool b ) +{ + TQListViewItem::setOpen( b ); + autoOpen = FALSE; +} + +void WorkspaceItem::setAutoOpen( bool b ) +{ + TQListViewItem::setOpen( b ); + autoOpen = b; +} + +Workspace::Workspace( TQWidget *parent, MainWindow *mw ) + : TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | + WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ), + project( 0 ), completionDirty( FALSE ) +{ + init_colors(); + + setDefaultRenameAction( Accept ); + blockNewForms = FALSE; + bufferEdit = 0; + header()->setStretchEnabled( TRUE ); + header()->hide(); + setSorting( 0 ); + setResizePolicy( TQScrollView::Manual ); +#ifndef TQ_WS_MAC + TQPalette p( palette() ); + p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) ); + (void)*selectedBack; // hack + setPalette( p ); +#endif + addColumn( i18n( "Files" ) ); + setAllColumnsShowFocus( TRUE ); + connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ), + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQT_SLOT( itemDoubleClicked( TQListViewItem * ) ) ), + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ), + setHScrollBarMode( AlwaysOff ); + setVScrollBarMode( AlwaysOn ); + viewport()->setAcceptDrops( TRUE ); + setAcceptDrops( TRUE ); + setColumnWidthMode( 1, Manual ); +} + + +void Workspace::projectDestroyed( TQObject* o ) +{ + if ( o == project ) { + project = 0; + clear(); + } +} + +void Workspace::setCurrentProject( Project *pro ) +{ + if ( project == pro ) + return; + if ( project ) { + disconnect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); + disconnect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); + disconnect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); + disconnect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); + disconnect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) ); + disconnect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) ); + disconnect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) ); + } + project = pro; + connect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); + connect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); + connect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); + connect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); + connect( project, TQT_SIGNAL( destroyed(TQObject*) ), this, TQT_SLOT( projectDestroyed(TQObject*) ) ); + connect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) ); + connect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) ); + connect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) ); + clear(); + + if ( bufferEdit ) + bufferEdit->clear(); + + projectItem = new WorkspaceItem( this, project ); + + projectItem->setOpen( TRUE ); + + for ( TQPtrListIterator sources = project->sourceFiles(); + sources.current(); ++sources ) { + SourceFile* f = sources.current(); + (void) new WorkspaceItem( projectItem, f ); + } + + for ( TQPtrListIterator forms = project->formFiles(); + forms.current(); ++forms ) { + FormFile* f = forms.current(); + if ( f->isFake() ) + continue; + + (void) new WorkspaceItem( projectItem, f ); + } + + TQObjectList l = project->objects(); + TQObjectListIt objs( l ); + for ( ;objs.current(); ++objs ) { + TQObject* o = objs.current(); + (void) new WorkspaceItem( projectItem, o, project ); + } + + updateColors(); + completionDirty = TRUE; +} + +void Workspace::sourceFileAdded( SourceFile* sf ) +{ + (void) new WorkspaceItem( projectItem, sf ); + updateColors(); +} + +void Workspace::sourceFileRemoved( SourceFile* sf ) +{ + delete findItem( sf ); + updateColors(); +} + +void Workspace::formFileAdded( FormFile* ff ) +{ + if ( ff->isFake() ) + return; + (void) new WorkspaceItem( projectItem, ff ); + updateColors(); +} + +void Workspace::formFileRemoved( FormFile* ff ) +{ + delete findItem( ff ); + updateColors(); +} + +void Workspace::objectAdded( TQObject *o ) +{ + (void) new WorkspaceItem( projectItem, o, project ); + updateColors(); +} + +void Workspace::objectRemoved( TQObject *o ) +{ + delete findItem( o ); + updateColors(); +} + +void Workspace::update() +{ + completionDirty = TRUE; + triggerUpdate(); +} + +void Workspace::update( FormFile* ff ) +{ + TQListViewItem* i = findItem( ff ); + if ( i ) { + i->repaint(); + if ( (i = i->firstChild()) ) + i->repaint(); + } +} + + +void Workspace::activeFormChanged( FormWindow *fw ) +{ + WorkspaceItem *i = findItem( fw->formFile() ); + if ( i ) { + setCurrentItem( i ); + setSelected( i, TRUE ); + if ( !i->isOpen() ) + i->setAutoOpen( TRUE ); + } + + closeAutoOpenItems(); + +} + +void Workspace::activeEditorChanged( SourceEditor *se ) +{ + if ( !se->object() ) + return; + + if ( se->formWindow() ) { + WorkspaceItem *i = findItem( se->formWindow()->formFile() ); + if ( i && i->firstChild() ) { + if ( !i->isOpen() ) + i->setAutoOpen( TRUE ); + setCurrentItem( i->firstChild() ); + setSelected( i->firstChild(), TRUE ); + } + } else { + WorkspaceItem *i = findItem( se->sourceFile() ); + if ( i ) { + setCurrentItem( i ); + setSelected( i, TRUE ); + } + } + + closeAutoOpenItems(); +} + +WorkspaceItem *Workspace::findItem( FormFile* ff) +{ + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + if ( ( (WorkspaceItem*)it.current() )->formFile == ff ) + return (WorkspaceItem*)it.current(); + } + return 0; +} + +WorkspaceItem *Workspace::findItem( SourceFile *sf ) +{ + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + if ( ( (WorkspaceItem*)it.current() )->sourceFile == sf ) + return (WorkspaceItem*)it.current(); + } + return 0; +} + +WorkspaceItem *Workspace::findItem( TQObject *o ) +{ + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + if ( ( (WorkspaceItem*)it.current() )->object == o ) + return (WorkspaceItem*)it.current(); + } + return 0; +} + +void Workspace::closeAutoOpenItems() +{ + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + WorkspaceItem* i = (WorkspaceItem*) it.current(); + WorkspaceItem* ip = (WorkspaceItem*) i->parent(); + if ( i->type() == WorkspaceItem::FormSourceType ) { + if ( !i->isSelected() && !ip->isSelected() + && ip->isAutoOpen() ) { + ip->setAutoOpen( FALSE ); + } + } + } +} + + +void Workspace::closeEvent( TQCloseEvent *e ) +{ + e->accept(); +} + +void Workspace::itemDoubleClicked( TQListViewItem *i ) +{ + if ( ( (WorkspaceItem*)i)->type()== WorkspaceItem::ProjectType ) + i->setOpen( TRUE ); +} + +void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& ) +{ + if ( !i || button != Qt::LeftButton ) + return; + + closeAutoOpenItems(); + + WorkspaceItem* wi = (WorkspaceItem*)i; + switch( wi->type() ) { + case WorkspaceItem::ProjectType: + break; // ### TODO + case WorkspaceItem::FormFileType: + wi->formFile->showFormWindow(); + break; + case WorkspaceItem::FormSourceType: + wi->formFile->showEditor( FALSE ); + break; + case WorkspaceItem::SourceFileType: + mainWindow->editSource( wi->sourceFile ); + break; + case WorkspaceItem::ObjectType: + project->fakeFormFileFor( wi->object )->formWindow()->setFocus(); + mainWindow->propertyeditor()->setWidget( wi->object, + project->fakeFormFileFor( wi->object )->formWindow() ); + mainWindow->objectHierarchy()-> + setFormWindow( project->fakeFormFileFor( wi->object )->formWindow(), wi->object ); + project->fakeFormFileFor( wi->object )->showEditor(); + break; + } +} + +void Workspace::contentsDropEvent( TQDropEvent *e ) +{ + if ( !TQUriDrag::canDecode( e ) ) { + e->ignore(); + } else { + TQStringList files; + TQUriDrag::decodeLocalFiles( e, files ); + if ( !files.isEmpty() ) { + for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) { + TQString fn = *it; + mainWindow->fileOpen( "", "", fn ); + } + } + } +} + +void Workspace::contentsDragEnterEvent( TQDragEnterEvent *e ) +{ + if ( !TQUriDrag::canDecode( e ) ) + e->ignore(); + else + e->accept(); +} + +void Workspace::contentsDragMoveEvent( TQDragMoveEvent *e ) +{ + if ( !TQUriDrag::canDecode( e ) ) + e->ignore(); + else + e->accept(); +} + +void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) +{ + if ( !i ) + return; + WorkspaceItem* wi = (WorkspaceItem*)i; + enum { OPEN_SOURCE, REMOVE_SOURCE, OPEN_FORM, REMOVE_FORM, + OPEN_FORM_SOURCE, REMOVE_FORM_SOURCE, OPEN_OBJECT_SOURCE }; + TQPopupMenu menu( this ); + menu.setCheckable( TRUE ); + switch ( wi->type() ) { + case WorkspaceItem::SourceFileType: + menu.insertItem( i18n( "&Open Source File" ), OPEN_SOURCE ); + menu.insertSeparator(); + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), + i18n( "&Remove Source File From Project" ), REMOVE_SOURCE ); + break; + case WorkspaceItem::FormFileType: + menu.insertItem( i18n( "&Open Form" ), OPEN_FORM ); + menu.insertSeparator(); + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), + i18n( "&Remove Form From Project" ), REMOVE_FORM ); + break; + case WorkspaceItem::FormSourceType: + menu.insertItem( i18n( "&Open Form Source" ), OPEN_FORM_SOURCE ); + menu.insertSeparator(); + if ( project->isCpp() ) + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), + i18n( "&Remove Source File From Form" ), REMOVE_FORM_SOURCE ); + else + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), + i18n( "&Remove Form From Project" ), REMOVE_FORM ); + break; + case WorkspaceItem::ProjectType: + MainWindow::self->popupProjectMenu( pos ); + return; + case WorkspaceItem::ObjectType: + menu.insertItem( i18n( "&Open Source" ), OPEN_OBJECT_SOURCE ); + break; + } + + switch ( menu.exec( pos ) ) { + case REMOVE_SOURCE: + project->removeSourceFile( wi->sourceFile ); + break; + case REMOVE_FORM: + project->removeFormFile( wi->formFile ); + break; + case REMOVE_FORM_SOURCE: + ( (WorkspaceItem*)i )->formFile->setModified( TRUE ); + ( (WorkspaceItem*)i )->formFile->setCodeFileState( FormFile::Deleted ); + delete ( (WorkspaceItem*)i )->formFile->editor(); + break; + case OPEN_OBJECT_SOURCE: + case OPEN_SOURCE: + case OPEN_FORM: + case OPEN_FORM_SOURCE: + itemClicked( Qt::LeftButton, i, pos ); + break; + } +} + +bool Workspace::eventFilter( TQObject *o, TQEvent * e ) +{ + // Reggie, on what type of events do we have to execute updateBufferEdit() + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(bufferEdit) && e->type() != TQEvent::ChildRemoved ) + updateBufferEdit(); + return TQListView::eventFilter( o, e ); +} + +void Workspace::setBufferEdit( QCompletionEdit *edit ) +{ + bufferEdit = edit; + connect( bufferEdit, TQT_SIGNAL( chosen( const TQString & ) ), + this, TQT_SLOT( bufferChosen( const TQString & ) ) ); + bufferEdit->installEventFilter( this ); +} + +void Workspace::updateBufferEdit() +{ + if ( !bufferEdit || !completionDirty || !MainWindow::self) + return; + completionDirty = FALSE; + TQStringList completion = MainWindow::self->projectFileNames(); + TQListViewItemIterator it( this ); + while ( it.current() ) { + ( (WorkspaceItem*)it.current())->fillCompletionList( completion ); + ++it; + } + completion.sort(); + bufferEdit->setCompletionList( completion ); +} + +void Workspace::bufferChosen( const TQString &buffer ) +{ + if ( bufferEdit ) + bufferEdit->setText( "" ); + + if ( MainWindow::self->projectFileNames().contains( buffer ) ) { + MainWindow::self->setCurrentProjectByFilename( buffer ); + return; + } + + TQListViewItemIterator it( this ); + while ( it.current() ) { + if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) { + itemClicked( Qt::LeftButton, it.current(), TQPoint() ); + break; + } + ++it; + } +} + +void Workspace::updateColors() +{ + TQListViewItem* i = firstChild(); + if ( i ) + i = i->firstChild(); + bool b = TRUE; + while ( i ) { + WorkspaceItem* wi = ( WorkspaceItem*) i; + i = i->nextSibling(); + wi->useOddColor = b; + b = !b; + } +} diff --git a/kdevdesigner/designer/workspace.h b/kdevdesigner/designer/workspace.h new file mode 100644 index 00000000..052a1b87 --- /dev/null +++ b/kdevdesigner/designer/workspace.h @@ -0,0 +1,152 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef WORKSPACE_H +#define WORKSPACE_H + +#include + +class FormWindow; +class TQResizeEvent; +class TQCloseEvent; +class TQDropEvent; +class TQDragMoveEvent; +class TQDragEnterEvent; +class MainWindow; +class Project; +class SourceFile; +class FormFile; +class QCompletionEdit; +class SourceEditor; + +class WorkspaceItem : public TQListViewItem +{ +public: + enum Type { ProjectType, FormFileType, FormSourceType, SourceFileType, ObjectType }; + + WorkspaceItem( TQListView *parent, Project* p ); + WorkspaceItem( TQListViewItem *parent, SourceFile* sf ); + WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type t = FormFileType ); + WorkspaceItem( TQListViewItem *parent, TQObject *o, Project *p ); + + void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); + + Type type() const { return t; } + + bool isModified() const; + + TQString text( int ) const; + + void fillCompletionList( TQStringList& completion ); + bool checkCompletion( const TQString& completion ); + + TQString key( int, bool ) const; // column sorting key + + Project* project; + SourceFile* sourceFile; + FormFile* formFile; + TQObject *object; + + void setOpen( bool ); + + void setAutoOpen( bool ); + bool isAutoOpen() const { return isOpen() && autoOpen; } + + bool useOddColor; + +private: + void init(); + bool autoOpen; + TQColor backgroundColor(); + Type t; +}; + +class Workspace : public TQListView +{ + Q_OBJECT + + +public: + Workspace( TQWidget *parent , MainWindow *mw ); + + void setCurrentProject( Project *pro ); + + void contentsDropEvent( TQDropEvent *e ); + void contentsDragEnterEvent( TQDragEnterEvent *e ); + void contentsDragMoveEvent( TQDragMoveEvent *e ); + + void setBufferEdit( QCompletionEdit *edit ); + +public slots: + + void update(); + void update( FormFile* ); + + void activeFormChanged( FormWindow *fw ); + void activeEditorChanged( SourceEditor *se ); + +protected: + void closeEvent( TQCloseEvent *e ); + bool eventFilter( TQObject *, TQEvent * ); + + +private slots: + void itemClicked( int, TQListViewItem *i, const TQPoint& pos ); + void itemDoubleClicked( TQListViewItem *i ); + void rmbClicked( TQListViewItem *i, const TQPoint& pos ); + void bufferChosen( const TQString &buffer ); + + void projectDestroyed( TQObject* ); + + void sourceFileAdded( SourceFile* ); + void sourceFileRemoved( SourceFile* ); + + void formFileAdded( FormFile* ); + void formFileRemoved( FormFile* ); + + void objectAdded( TQObject* ); + void objectRemoved( TQObject * ); + +private: + WorkspaceItem *findItem( FormFile *ff ); + WorkspaceItem *findItem( SourceFile *sf ); + WorkspaceItem *findItem( TQObject *o ); + + void closeAutoOpenItems(); + +private: + MainWindow *mainWindow; + Project *project; + WorkspaceItem *projectItem; + QCompletionEdit *bufferEdit; + bool blockNewForms; + void updateBufferEdit(); + bool completionDirty; + void updateColors(); + +}; + +#endif diff --git a/kdevdesigner/interfaces/actioninterface.h b/kdevdesigner/interfaces/actioninterface.h new file mode 100644 index 00000000..cf217ee7 --- /dev/null +++ b/kdevdesigner/interfaces/actioninterface.h @@ -0,0 +1,78 @@ + /********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef ACTIONINTERFACE_H +#define ACTIONINTERFACE_H + +#include + +class TQAction; +class TQObject; + +// {bb206e09-84e5-4777-9fce-706babfab931} +#ifndef IID_Action +#define IID_Action TQUuid( 0xbb206e09, 0x84e5, 0x4777, 0x9f, 0xce, 0x70, 0x6b, 0xab, 0xfa, 0xb9, 0x31 ) +#endif + +/*! To add actions to the TQt Designer menubars and toolbars, implement + this interface. You have to implement the create(), group() and + connectTo() functions. + + You also have to implement the function featureList() (\sa + TQFeatureListInterface) to return the names of all actions + which this interface provides. +*/ + +class ActionInterface : public TQFeatureListInterface +{ +public: + enum Location { + Toolbar, + Menu + }; + + /*! This functions is called to create the action with the name \a + name. \a parent should be used as parent of the action. + + In the implementation return the TQAction object for the action + \a name. + */ + virtual TQAction* create( const TQString &name, TQObject* parent = 0 ) = 0; + + /*! In the implementation of the interface return the name of the + group of the action \a name. + */ + virtual TQString group( const TQString &name ) const = 0; + + /*! In the implementation of the interface return whether the + action \a name should appear in the location \a l */ + virtual bool location( const TQString &name, Location l ) const = 0; + + /*! \internal */ + virtual void connectTo( TQUnknownInterface *appInterface ) = 0; +}; + +#endif diff --git a/kdevdesigner/interfaces/classbrowserinterface.h b/kdevdesigner/interfaces/classbrowserinterface.h new file mode 100644 index 00000000..99dc4911 --- /dev/null +++ b/kdevdesigner/interfaces/classbrowserinterface.h @@ -0,0 +1,63 @@ + /********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef CLASSBROWSERINTERFACE_H +#define CLASSBROWSERINTERFACE_H + +// +// W A R N I N G -- PRIVATE INTERFACES +// -------------------------------------- +// +// This file and the interfaces declared in the file are not +// public. It exists for internal purpose. This header file and +// interfaces may change from version to version (even binary +// incompatible) without notice, or even be removed. +// +// We mean it. +// +// + +#include +#include +class TQListView; + +// {4ede3c32-ae96-4b7a-9e38-9f1d93592391} +#ifndef IID_ClassBrowser +#define IID_ClassBrowser TQUuid( 0x4ede3c32, 0xae96, 0x4b7a, 0x9e, 0x38, 0x9f, 0x1d, 0x93, 0x59, 0x23, 0x91 ) +#endif + +struct ClassBrowserInterface : public TQUnknownInterface +{ + enum Type { Class, Function }; + + virtual TQListView *createClassBrowser( TQWidget *parent ) const = 0; + virtual void update( const TQString &code ) const = 0; + virtual void clear() const = 0; + + virtual void onClick( TQObject *receiver, const char *slot ) = 0; +}; + +#endif diff --git a/kdevdesigner/interfaces/designerinterface.h b/kdevdesigner/interfaces/designerinterface.h new file mode 100644 index 00000000..d5aeebf6 --- /dev/null +++ b/kdevdesigner/interfaces/designerinterface.h @@ -0,0 +1,261 @@ + /********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef DESIGNERINTERFACE_H +#define DESIGNERINTERFACE_H + +// +// W A R N I N G -- PRIVATE INTERFACES +// -------------------------------------- +// +// This file and the interfaces declared in the file are not +// public. It exists for internal purpose. This header file and +// interfaces may change from version to version (even binary +// incompatible) without notice, or even be removed. +// +// We mean it. +// +// + +#include +#include +#include +#include +#include +#include +#include + +struct DesignerProject; +struct DesignerDatabase; +struct DesignerFormWindow; +struct DesignerDock; +struct DesignerOutputDock; +struct DesignerOutput; +struct DesignerOutputError; +struct DesignerPixmapCollection; +struct DesignerSourceFile; + +class TQDockWindow; +class TQWidget; +class TQObject; +class TQAction; +class TQIconSet; +class TQSqlDatabase; + +// {0e661da-f45c-4830-af47-03ec53eb1633} +#ifndef IID_Designer +#define IID_Designer TQUuid( 0xa0e661da, 0xf45c, 0x4830, 0xaf, 0x47, 0x3, 0xec, 0x53, 0xeb, 0x16, 0x33 ) +#endif + +/*! These are the interfaces implemented by the TQt Designer which should + be used by plugins to access and use functionality of the TQt Designer. +*/ + +struct DesignerInterface : public TQUnknownInterface +{ + virtual DesignerProject *currentProject() const = 0; + virtual DesignerFormWindow *currentForm() const = 0; + virtual DesignerSourceFile *currentSourceFile() const = 0; + virtual TQPtrList projectList() const = 0; + virtual void showStatusMessage( const TQString &, int ms = 0 ) const = 0; + virtual DesignerDock *createDock() const = 0; + virtual DesignerOutputDock *outputDock() const = 0; + virtual void setModified( bool b, TQWidget *window ) = 0; + virtual void updateFunctionList() = 0; + + virtual void onProjectChange( TQObject *receiver, const char *slot ) = 0; + virtual void onFormChange( TQObject *receiver, const char *slot ) = 0; + + virtual bool singleProjectMode() const = 0; + virtual void showError( TQWidget *widget, int line, const TQString &message ) = 0; + virtual void runFinished() = 0; + virtual void showStackFrame( TQWidget *w, int line ) = 0; + virtual void showDebugStep( TQWidget *w, int line ) = 0; + virtual void runProjectPrecondition() = 0; + virtual void runProjectPostcondition( TQObjectList *l ) = 0; + + }; + +struct DesignerProject +{ + virtual TQPtrList formList() const = 0; + virtual TQStringList formNames() const = 0; + virtual TQString formFileName( const TQString &form ) const = 0; + virtual void addForm( DesignerFormWindow * ) = 0; + virtual void removeForm( DesignerFormWindow * ) = 0; + virtual TQString fileName() const = 0; + virtual void setFileName( const TQString & ) = 0; + virtual TQString projectName() const = 0; + virtual void setProjectName( const TQString & ) = 0; + virtual TQString databaseFile() const = 0; + virtual void setDatabaseFile( const TQString & ) = 0; + virtual void setupDatabases() const = 0; + virtual TQPtrList databaseConnections() const = 0; + virtual void addDatabase( DesignerDatabase * ) = 0; + virtual void removeDatabase( DesignerDatabase * ) = 0; + virtual void save() const = 0; + virtual void setLanguage( const TQString & ) = 0; + virtual TQString language() const = 0; + virtual void setCustomSetting( const TQString &key, const TQString &value ) = 0; + virtual TQString customSetting( const TQString &key ) const = 0; + virtual DesignerPixmapCollection *pixmapCollection() const = 0; + virtual void breakPoints( TQMap > &bps ) const = 0; + virtual TQString breakPointCondition( TQObject *o, int line ) const = 0; + virtual void setBreakPointCondition( TQObject *o, int line, const TQString &condition ) = 0; + virtual void clearAllBreakpoints() const = 0; + virtual void setIncludePath( const TQString &platform, const TQString &path ) = 0; + virtual void setLibs( const TQString &platform, const TQString &path ) = 0; + virtual void setDefines( const TQString &platform, const TQString &path ) = 0; + virtual void setConfig( const TQString &platform, const TQString &config ) = 0; + virtual void setTemplate( const TQString &t ) = 0; + virtual TQString config( const TQString &platform ) const = 0; + virtual TQString libs( const TQString &platform ) const = 0; + virtual TQString defines( const TQString &platform ) const = 0; + virtual TQString includePath( const TQString &platform ) const = 0; + virtual TQString templte() const = 0; + virtual bool isGenericObject( TQObject *o ) const = 0; + +}; + +struct DesignerDatabase +{ + virtual TQString name() const = 0; + virtual void setName( const TQString & ) = 0; + virtual TQString driver() const = 0; + virtual void setDriver( const TQString & ) = 0; + virtual TQString database() const = 0; + virtual void setDatabase( const TQString & ) = 0; + virtual TQString userName() const = 0; + virtual void setUserName( const TQString & ) = 0; + virtual TQString password() const = 0; + virtual void setPassword( const TQString & ) = 0; + virtual TQString hostName() const = 0; + virtual void setHostName( const TQString & ) = 0; + virtual TQStringList tables() const = 0; + virtual void setTables( const TQStringList & ) = 0; + virtual TQMap fields() const = 0; + virtual void setFields( const TQMap & ) = 0; + virtual void open( bool suppressDialog = FALSE ) const = 0; + virtual void close() const = 0; + virtual TQSqlDatabase* connection() = 0; + +}; + +struct DesignerPixmapCollection +{ + virtual void addPixmap( const TQPixmap &p, const TQString &name, bool force ) = 0; + virtual TQPixmap pixmap( const TQString &name ) const = 0; +}; + +struct DesignerFormWindow +{ + virtual TQString name() const = 0; + virtual void setName( const TQString &n ) = 0; + virtual TQString fileName() const = 0; + virtual void setFileName( const TQString & ) = 0; + virtual void save() const = 0; + virtual bool isModified() const = 0; + virtual void insertWidget( TQWidget * ) = 0; + virtual void removeWidget( TQWidget * ) = 0; + virtual TQWidget *create( const char *className, TQWidget *parent, const char *name ) = 0; + virtual TQWidgetList widgets() const = 0; + virtual void undo() = 0; + virtual void redo() = 0; + virtual void cut() = 0; + virtual void copy() = 0; + virtual void paste() = 0; + virtual void adjustSize() = 0; + virtual void editConnections() = 0; + virtual void checkAccels() = 0; + virtual void layoutH() = 0; + virtual void layoutV() = 0; + virtual void layoutHSplit() = 0; + virtual void layoutVSplit() = 0; + virtual void layoutG() = 0; + virtual void layoutHContainer( TQWidget* w ) = 0; + virtual void layoutVContainer( TQWidget* w ) = 0; + virtual void layoutGContainer( TQWidget* w ) = 0; + virtual void breakLayout() = 0; + virtual void selectWidget( TQWidget * w ) = 0; + virtual void selectAll() = 0; + virtual void clearSelection() = 0; + virtual bool isWidgetSelected( TQWidget * ) const = 0; + virtual TQWidgetList selectedWidgets() const = 0; + virtual TQWidget *currentWidget() const = 0; + virtual TQWidget *form() const = 0; + virtual void setCurrentWidget( TQWidget * ) = 0; + virtual TQPtrList actionList() const = 0; + virtual TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel, + TQObject* parent, const char* name = 0, bool toggle = FALSE ) = 0; + virtual void addAction( TQAction * ) = 0; + virtual void removeAction( TQAction * ) = 0; + virtual void preview() const = 0; + virtual void addFunction( const TQCString &slot, const TQString &specifier, const TQString &access, + const TQString &type, const TQString &language, const TQString &returnType ) = 0; + virtual void addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot ) = 0; + virtual void setProperty( TQObject *o, const char *property, const TQVariant &value ) = 0; + virtual TQVariant property( TQObject *o, const char *property ) const = 0; + virtual void setPropertyChanged( TQObject *o, const char *property, bool changed ) = 0; + virtual bool isPropertyChanged( TQObject *o, const char *property ) const = 0; + virtual void setColumnFields( TQObject *o, const TQMap & ) = 0; + virtual TQStringList implementationIncludes() const = 0; + virtual TQStringList declarationIncludes() const = 0; + virtual void setImplementationIncludes( const TQStringList &lst ) = 0; + virtual void setDeclarationIncludes( const TQStringList &lst ) = 0; + virtual TQStringList forwardDeclarations() const = 0; + virtual void setForwardDeclarations( const TQStringList &lst ) = 0; + virtual TQStringList signalList() const = 0; + virtual void setSignalList( const TQStringList &lst ) = 0; + virtual void addMenu( const TQString &text, const TQString &name ) = 0; + virtual void addMenuAction( const TQString &menu, TQAction *a ) = 0; + virtual void addMenuSeparator( const TQString &menu ) = 0; + virtual void addToolBar( const TQString &text, const TQString &name ) = 0; + virtual void addToolBarAction( const TQString &tb, TQAction *a ) = 0; + virtual void addToolBarSeparator( const TQString &tb ) = 0; + + virtual void onModificationChange( TQObject *receiver, const char *slot ) = 0; +}; + +struct DesignerSourceFile +{ + virtual TQString fileName() const = 0; +}; + +struct DesignerDock +{ + virtual TQDockWindow *dockWindow() const = 0; +}; + +struct DesignerOutputDock +{ + virtual TQWidget *addView( const TQString &pageName ) = 0; + virtual void appendDebug( const TQString & ) = 0; + virtual void clearDebug() = 0; + virtual void appendError( const TQString &, int ) = 0; + virtual void clearError() = 0; +}; + +#endif diff --git a/kdevdesigner/interfaces/editorinterface.h b/kdevdesigner/interfaces/editorinterface.h new file mode 100644 index 00000000..29055324 --- /dev/null +++ b/kdevdesigner/interfaces/editorinterface.h @@ -0,0 +1,102 @@ + /********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef EDITORINTERFACE_H +#define EDITORINTERFACE_H + +// +// W A R N I N G -- PRIVATE INTERFACES +// -------------------------------------- +// +// This file and the interfaces declared in the file are not +// public. It exists for internal purpose. This header file and +// interfaces may change from version to version (even binary +// incompatible) without notice, or even be removed. +// +// We mean it. +// +// + +#include +#include +#include + +class TQWidget; +class TQObjectList; +class TQObject; + +// {8668161a-6037-4220-86b6-ccaa20127df8} +#ifndef IID_Editor +#define IID_Editor TQUuid( 0x8668161a, 0x6037, 0x4220, 0x86, 0xb6, 0xcc, 0xaa, 0x20, 0x12, 0x7d, 0xf8 ) +#endif + +struct EditorInterface : public TQUnknownInterface +{ + enum Mode + { + Editing, + Debugging + }; + + virtual TQWidget *editor( bool readOnly, + TQWidget *parent, + TQUnknownInterface *designerIface ) = 0; + + virtual void setText( const TQString &txt ) = 0; + virtual TQString text() const = 0; + virtual bool isUndoAvailable() const = 0; + virtual bool isRedoAvailable() const = 0; + virtual void undo() = 0; + virtual void redo() = 0; + virtual void cut() = 0; + virtual void copy() = 0; + virtual void paste() = 0; + virtual void selectAll() = 0; + virtual bool find( const TQString &expr, bool cs, bool wo, bool forward, bool startAtCursor ) = 0; + virtual bool replace( const TQString &find, const TQString &replace, bool cs, bool wo, bool forward, bool startAtCursor, bool replaceAll ) = 0; + virtual void gotoLine( int line ) = 0; + virtual void indent() = 0; + virtual void scrollTo( const TQString &txt, const TQString &first ) = 0; + virtual void splitView() = 0; + virtual void setContext( TQObject *this_ ) = 0; + virtual void setError( int line ) = 0; + virtual void setStep( int line ) = 0; + virtual void setStackFrame( int line ) = 0; + virtual void clearStep() = 0; + virtual void clearStackFrame() = 0; + virtual void readSettings() = 0; + virtual void setModified( bool m ) = 0; + virtual bool isModified() const = 0; + virtual int numLines() const = 0; + virtual void breakPoints( TQValueList &l ) const = 0; + virtual void setBreakPoints( const TQValueList &l ) = 0; + virtual void setMode( Mode m ) = 0; + + virtual void onBreakPointChange( TQObject *receiver, const char *slot ) = 0; + +}; + +#endif diff --git a/kdevdesigner/interfaces/filterinterface.h b/kdevdesigner/interfaces/filterinterface.h new file mode 100644 index 00000000..6af54bcb --- /dev/null +++ b/kdevdesigner/interfaces/filterinterface.h @@ -0,0 +1,68 @@ + /********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef FILTERINTERFACE_H +#define FILTERINTERFACE_H + +#include + +// {ea8cb381-59b5-44a8-bae5-9bea8295762a} +#ifndef IID_ImportFilter +#define IID_ImportFilter TQUuid( 0xea8cb381, 0x59b5, 0x44a8, 0xba, 0xe5, 0x9b, 0xea, 0x82, 0x95, 0x76, 0x2a ) +#endif + +/*! If you write a filter plugin to import dialogs or other user + interfaces from a different format than .ui into the TQt Designer, + implement this interface in that plugin. + + You also have to implement the function featureList() (\sa + TQFeatureListInterface) and return there all filters (names of it) + which this interface provides. +*/ + +struct ImportFilterInterface : public TQFeatureListInterface +{ + /*! This function is called by TQt Designer to open the file \a + filename using the filter \a filter. TQt Designer expects to get + back one or more .ui files, which it can open then. In the + implementation of the interface you have to return these + filenames, which the filter created, in this function.*/ + virtual TQStringList import( const TQString &filter, const TQString &filename ) = 0; +}; + +// *************** INTERNAL ************************* + +// {c32a07e0-b006-471e-afca-d227457a1280} +#ifndef IID_ExportFilterInterface +#define IID_ExportFilterInterface TQUuid( 0xc32a07e0, 0xb006, 0x471e, 0xaf, 0xca, 0xd2, 0x27, 0x45, 0x7a, 0x12, 0x80 ) +#endif + +struct ExportFilterInterface : public TQFeatureListInterface +{ +// virtual TQStringList export( const TQString& filter, const TQString& filename ) = 0; +}; + +#endif diff --git a/kdevdesigner/interfaces/interpreterinterface.h b/kdevdesigner/interfaces/interpreterinterface.h new file mode 100644 index 00000000..45ba9e12 --- /dev/null +++ b/kdevdesigner/interfaces/interpreterinterface.h @@ -0,0 +1,59 @@ + /********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef INTERPRETERINTERFACE_H +#define INTERPRETERINTERFACE_H + +// +// W A R N I N G -- PRIVATE INTERFACES +// -------------------------------------- +// +// This file and the interfaces declared in the file are not +// public. It exists for internal purpose. This header file and +// interfaces may change from version to version (even binary +// incompatible) without notice, or even be removed. +// +// We mean it. +// +// + +#include + +class TQObject; + +// {11cad9ec-4e3c-418b-8e90-e1b8c0c1f48f} +#ifndef IID_Interpreter +#define IID_Interpreter TQUuid( 0x11cad9ec, 0x4e3c, 0x418b, 0x8e, 0x90, 0xe1, 0xb8, 0xc0, 0xc1, 0xf4, 0x8f ) +#endif + +struct InterpreterInterface : public TQUnknownInterface +{ + virtual void setBreakPoints( TQObject *obj, const TQValueList &lst ) = 0; +}; + + + +#endif diff --git a/kdevdesigner/interfaces/languageinterface.h b/kdevdesigner/interfaces/languageinterface.h new file mode 100644 index 00000000..9d1f7e3d --- /dev/null +++ b/kdevdesigner/interfaces/languageinterface.h @@ -0,0 +1,131 @@ + /********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef LANGUAGEINTERFACE_H +#define LANGUAGEINTERFACE_H + +// +// W A R N I N G -- PRIVATE INTERFACES +// -------------------------------------- +// +// This file and the interfaces declared in the file are not +// public. It exists for internal purpose. This header file and +// interfaces may change from version to version (even binary +// incompatible) without notice, or even be removed. +// +// We mean it. +// +// + +#include +#include +#include +#include +#include + +// {f208499a-6f69-4883-9219-6e936e55a330} +#ifndef IID_Language +#define IID_Language TQUuid( 0xf208499a, 0x6f69, 0x4883, 0x92, 0x19, 0x6e, 0x93, 0x6e, 0x55, 0xa3, 0x30 ) +#endif + +struct LanguageInterface : public TQUnknownInterface +{ + struct Function + { + TQString name; + TQString body; + TQString returnType; + TQString comments; + int start; + int end; + TQString access; + bool operator==( const Function &f ) const { + return ( name == f.name && + body == f.body && + returnType == f.returnType && + comments == f.comments ); + } + }; + + struct Connection + { + TQString sender; + TQString signal; + TQString slot; + bool operator==( const Connection &c ) const { + return ( sender == c.sender && + signal == c.signal && + slot == c.slot ); + } + }; + + enum Support + { + ReturnType, + ConnectionsToCustomSlots, + CompressProject + }; + + virtual void functions( const TQString &code, TQValueList *funcs ) const = 0; + virtual void connections( const TQString &code, TQValueList *connections ) const = 0; + virtual TQString createFunctionStart( const TQString &className, const TQString &func, + const TQString &returnType, const TQString &access ) = 0; + virtual TQString createArguments( const TQString &cpp_signature ) = 0; + virtual TQString createEmptyFunction() = 0; + virtual TQStringList definitions() const = 0; + virtual TQStringList definitionEntries( const TQString &definition, TQUnknownInterface *designerIface ) const = 0; + virtual void setDefinitionEntries( const TQString &definition, const TQStringList &entries, TQUnknownInterface *designerIface ) = 0; + virtual bool supports( Support s ) const = 0; + virtual TQStringList fileFilterList() const = 0; + virtual TQStringList fileExtensionList() const = 0; + virtual void preferedExtensions( TQMap &extensionMap ) const = 0; + virtual TQString projectKeyForExtension( const TQString &extension ) const = 0; + virtual void sourceProjectKeys( TQStringList &keys ) const = 0; + virtual TQString cleanSignature( const TQString &sig ) = 0; + virtual void loadFormCode( const TQString &form, const TQString &filename, + TQValueList &functions, + TQStringList &vars, + TQValueList &connections ) = 0; + virtual TQString formCodeExtension() const = 0; + + virtual bool canConnect( const TQString &signal, const TQString &slot ) = 0; + + virtual void compressProject( const TQString &projectFile, const TQString &compressedFile, + bool withWarning ) = 0; + virtual TQString uncompressProject( const TQString &projectFile, const TQString &destDir ) = 0; + virtual TQString aboutText() const = 0; + + virtual void addConnection( const TQString &sender, const TQString &signal, + const TQString &receiver, const TQString &slot, + TQString *code ) = 0; + virtual void removeConnection( const TQString &sender, const TQString &signal, + const TQString &receiver, const TQString &slot, + TQString *code ) = 0; + virtual TQStrList signalNames( TQObject *obj ) const = 0; + +}; + +#endif diff --git a/kdevdesigner/interfaces/preferenceinterface.h b/kdevdesigner/interfaces/preferenceinterface.h new file mode 100644 index 00000000..5b356c4b --- /dev/null +++ b/kdevdesigner/interfaces/preferenceinterface.h @@ -0,0 +1,68 @@ + /********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PREFERENCEINTERFACE_H +#define PREFERENCEINTERFACE_H + +// +// W A R N I N G -- PRIVATE INTERFACES +// -------------------------------------- +// +// This file and the interfaces declared in the file are not +// public. It exists for internal purpose. This header file and +// interfaces may change from version to version (even binary +// incompatible) without notice, or even be removed. +// +// We mean it. +// +// + +#include +#include +#include + +// {5c168ee7-4bee-469f-9995-6afdb04ce5a2} +#ifndef IID_Preference +#define IID_Preference TQUuid( 0x5c168ee7, 0x4bee, 0x469f, 0x99, 0x95, 0x6a, 0xfd, 0xb0, 0x4c, 0xe5, 0xa2 ) +#endif + +struct PreferenceInterface : public TQUnknownInterface +{ + struct Preference + { + TQWidget *tab; + TQString title; + TQObject *receiver; + const char *init_slot; + const char *accept_slot; + }; + + virtual Preference *preference() = 0; + virtual void connectTo( TQUnknownInterface *appInterface ) = 0; + virtual void deletePreferenceObject( Preference * ) = 0; +}; + +#endif diff --git a/kdevdesigner/interfaces/projectsettingsiface.h b/kdevdesigner/interfaces/projectsettingsiface.h new file mode 100644 index 00000000..e47f8ae7 --- /dev/null +++ b/kdevdesigner/interfaces/projectsettingsiface.h @@ -0,0 +1,69 @@ + /********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PROJECTSETTINGSIFACE_H +#define PROJECTSETTINGSIFACE_H + +// +// W A R N I N G -- PRIVATE INTERFACES +// -------------------------------------- +// +// This file and the interfaces declared in the file are not +// public. It exists for internal purpose. This header file and +// interfaces may change from version to version (even binary +// incompatible) without notice, or even be removed. +// +// We mean it. +// +// + +#include +#include +#include + +// {d332785d-17fb-4894-84fe-50dbd0ad9512} +#ifndef IID_ProjectSettings +#define IID_ProjectSettings TQUuid( 0xd332785d, 0x17fb, 0x4894, 0x84, 0xfe, 0x50, 0xdb, 0xd0, 0xad, 0x95, 0x12 ) +#endif + +struct ProjectSettingsInterface : public TQUnknownInterface +{ + struct ProjectSettings + { + TQWidget *tab; + TQString title; + TQObject *receiver; + const char *init_slot; + const char *accept_slot; + }; + + virtual ProjectSettings *projectSetting() = 0; + virtual TQStringList projectSettings() const = 0; + virtual void connectTo( TQUnknownInterface *appInterface ) = 0; + virtual void deleteProjectSettingsObject( ProjectSettings * ) = 0; +}; + +#endif diff --git a/kdevdesigner/interfaces/sourcetemplateiface.h b/kdevdesigner/interfaces/sourcetemplateiface.h new file mode 100644 index 00000000..8d914625 --- /dev/null +++ b/kdevdesigner/interfaces/sourcetemplateiface.h @@ -0,0 +1,65 @@ + /********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef SOURCETEMPLATEIFACE_H +#define SOURCETEMPLATEIFACE_H + +// +// W A R N I N G -- PRIVATE INTERFACES +// -------------------------------------- +// +// This file and the interfaces declared in the file are not +// public. It exists for internal purpose. This header file and +// interfaces may change from version to version (even binary +// incompatible) without notice, or even be removed. +// +// We mean it. +// +// + +#include +#include + +// {1b3446a4-1c71-424b-8789-1f34eb5697d8} +#ifndef IID_SourceTemplate +#define IID_SourceTemplate TQUuid( 0x1b3446a4, 0x1c71, 0x424b, 0x87, 0x89, 0x1f, 0x34, 0xeb, 0x56, 0x97, 0xd8 ) +#endif + +struct SourceTemplateInterface : public TQFeatureListInterface +{ + struct Source + { + TQString code; + enum Type { FileName, Unnamed, Invalid } type; + TQString filename; + TQString extension; + }; + virtual Source create( const TQString &templ, TQUnknownInterface *appIface ) = 0; + virtual TQString language( const TQString &templ ) const = 0; + +}; + +#endif diff --git a/kdevdesigner/interfaces/templatewizardiface.h b/kdevdesigner/interfaces/templatewizardiface.h new file mode 100644 index 00000000..be1c57f1 --- /dev/null +++ b/kdevdesigner/interfaces/templatewizardiface.h @@ -0,0 +1,60 @@ + /********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef TEMPLATEWIZARDIFACE_H +#define TEMPLATEWIZARDIFACE_H + +// +// W A R N I N G -- PRIVATE INTERFACES +// -------------------------------------- +// +// This file and the interfaces declared in the file are not +// public. It exists for internal purpose. This header file and +// interfaces may change from version to version (even binary +// incompatible) without notice, or even be removed. +// +// We mean it. +// +// + +#include + +class TQWidget; +struct DesignerFormWindow; + +// {983d3eab-fea3-49cc-97ad-d8cc89b7c17b} +#ifndef IID_TemplateWizard +#define IID_TemplateWizard TQUuid( 0x983d3eab, 0xfea3, 0x49cc, 0x97, 0xad, 0xd8, 0xcc, 0x89, 0xb7, 0xc1, 0x7b ) +#endif + +class TemplateWizardInterface : public TQFeatureListInterface +{ +public: + virtual void setup( const TQString &templ, TQWidget *widget, DesignerFormWindow *fw, TQUnknownInterface *appIface ) = 0; + +}; + +#endif diff --git a/kdevdesigner/interfaces/widgetinterface.h b/kdevdesigner/interfaces/widgetinterface.h new file mode 100644 index 00000000..5f0312f8 --- /dev/null +++ b/kdevdesigner/interfaces/widgetinterface.h @@ -0,0 +1,35 @@ + /********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef WIDGETINTERFACE_H +#define WIDGETINTERFACE_H + +#include + +#define WidgetInterface TQWidgetFactoryInterface +#define IID_Widget IID_TQWidgetFactory + +#endif diff --git a/kdevdesigner/plugins/Makefile.am b/kdevdesigner/plugins/Makefile.am new file mode 100644 index 00000000..defe80c4 --- /dev/null +++ b/kdevdesigner/plugins/Makefile.am @@ -0,0 +1,8 @@ +INCLUDES = -I$(top_srcdir)/interfaces $(all_includes) +METASOURCES = AUTO +kdevdesignerdir = $(kde_moduledir)/plugins/kdevdesigner +kdevdesigner_LTLIBRARIES = libkdevdesigner_lang.la +libkdevdesigner_lang_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevdesigner_lang_la_SOURCES = languageinterfaceimpl.cpp +libkdevdesigner_lang_la_LIBADD = $(LIB_QT) + diff --git a/kdevdesigner/plugins/languageinterfaceimpl.cpp b/kdevdesigner/plugins/languageinterfaceimpl.cpp new file mode 100644 index 00000000..2e4f9f20 --- /dev/null +++ b/kdevdesigner/plugins/languageinterfaceimpl.cpp @@ -0,0 +1,237 @@ +/********************************************************************** +** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "languageinterfaceimpl.h" +#include +#include "../interfaces/designerinterface.h" +#include +//#include "yyreg.h" +#include + +LanguageInterfaceImpl::LanguageInterfaceImpl( TQUnknownInterface *outer ) + : parent( outer ), ref( 0 ) +{ +} + +ulong LanguageInterfaceImpl::addRef() +{ + return parent ? parent->addRef() : ref++; +} + +ulong LanguageInterfaceImpl::release() +{ + if ( parent ) + return parent->release(); + if ( !--ref ) { + delete this; + return 0; + } + return ref; +} + +TQRESULT LanguageInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInterface** iface ) +{ + if ( parent ) + return parent->queryInterface( uuid, iface ); + + *iface = 0; + if ( uuid == IID_TQUnknown ) + *iface = (TQUnknownInterface*)this; + else if ( uuid == IID_Language ) + *iface = (LanguageInterface*)this; + else + return TQE_NOINTERFACE; + + (*iface)->addRef(); + return TQS_OK; +} + + +class NormalizeObject : public TQObject +{ +public: + NormalizeObject() : TQObject() {} + static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); } +}; + +void LanguageInterfaceImpl::functions( const TQString &code, TQValueList *functionMap ) const +{ +/* TQValueList l; + extractCppFunctions( code, &l ); + for ( TQValueList::Iterator it = l.begin(); it != l.end(); ++it ) { + Function func; + func.name = (*it).prototype(); + func.name.remove( 0, (*it).returnType().length() ); + if ( func.name.find( "::" ) == -1 ) + continue; + func.name.remove( (uint)0, func.name.find( "::" ) + 2 ); + func.body = (*it).body(); + func.returnType = (*it).returnType(); + func.start = (*it).functionStartLineNum(); + func.end = (*it).closingBraceLineNum(); + functionMap->append( func ); + }*/ +} + +TQString LanguageInterfaceImpl::createFunctionStart( const TQString &className, const TQString &func, + const TQString &returnType, + const TQString & ) +{ + return returnType + " " + className + "::" + func; +} + +TQStringList LanguageInterfaceImpl::definitions() const +{ + TQStringList lst; + lst << "Includes (in Implementation)" << "Includes (in Declaration)" << "Forward Declarations" << "Signals"; + return lst; +} + +TQStringList LanguageInterfaceImpl::definitionEntries( const TQString &definition, TQUnknownInterface *designerIface ) const +{ + DesignerInterface *iface = 0; + designerIface->queryInterface( IID_Designer, (TQUnknownInterface**) &iface ); + if ( !iface ) + return TQStringList(); + DesignerFormWindow *fw = iface->currentForm(); + if ( !fw ) + return TQStringList(); + TQStringList lst; + if ( definition == "Includes (in Implementation)" ) { + lst = fw->implementationIncludes(); + } else if ( definition == "Includes (in Declaration)" ) { + lst = fw->declarationIncludes(); + } else if ( definition == "Forward Declarations" ) { + lst = fw->forwardDeclarations(); + } else if ( definition == "Signals" ) { + lst = fw->signalList(); + } + iface->release(); + return lst; +} + +void LanguageInterfaceImpl::setDefinitionEntries( const TQString &definition, const TQStringList &entries, TQUnknownInterface *designerIface ) +{ + DesignerInterface *iface = 0; + designerIface->queryInterface( IID_Designer, (TQUnknownInterface**) &iface ); + if ( !iface ) + return; + DesignerFormWindow *fw = iface->currentForm(); + if ( !fw ) + return; + if ( definition == "Includes (in Implementation)" ) { + fw->setImplementationIncludes( entries ); + } else if ( definition == "Includes (in Declaration)" ) { + fw->setDeclarationIncludes( entries ); + } else if ( definition == "Forward Declarations" ) { + fw->setForwardDeclarations( entries ); + } else if ( definition == "Signals" ) { + fw->setSignalList( entries ); + } + iface->release(); +} + +TQString LanguageInterfaceImpl::createEmptyFunction() +{ + return "{\n\n}\n"; +} + +bool LanguageInterfaceImpl::supports( Support s ) const +{ + if ( s == ReturnType ) + return TRUE; + if ( s == ConnectionsToCustomSlots ) + return TRUE; + return FALSE; +} + +TQStringList LanguageInterfaceImpl::fileFilterList() const +{ + TQStringList f; + f << "C++ Files (*.cpp *.C *.cxx *.c++ *.ocl *.c *.h *.H *.hpp *.hxx)"; + return f; + +} +TQStringList LanguageInterfaceImpl::fileExtensionList() const +{ + TQStringList f; + f << "cpp" << "ocl" << "C" << "cxx" << "c++" << "c" <<"h" << "H" << "hpp" << "hxx"; + return f; +} + +TQString LanguageInterfaceImpl::projectKeyForExtension( const TQString &extension ) const +{ + if ( extension[ 0 ] == 'c' || extension[ 0 ] == 'C' ) + return "SOURCES"; + return "HEADERS"; +} + +void LanguageInterfaceImpl::sourceProjectKeys( TQStringList &keys ) const +{ + keys << "HEADERS" << "SOURCES"; +} + + class CheckObject : public TQObject +{ +public: + CheckObject() {} + bool checkConnectArgs( const char *signal, const char *member ) { return TQObject::checkConnectArgs( signal, 0, member ); } + +}; + +bool LanguageInterfaceImpl::canConnect( const TQString &signal, const TQString &slot ) +{ + CheckObject o; + return o.checkConnectArgs( signal.latin1(), slot.latin1() ); +} + +void LanguageInterfaceImpl::loadFormCode( const TQString &, const TQString &filename, + TQValueList &functions, + TQStringList &, + TQValueList & ) +{ + TQFile f( filename ); + if ( !f.open( IO_ReadOnly ) ) + return; + TQTextStream ts( &f ); + TQString code( ts.read() ); + this->functions( code, &functions ); +} + +void LanguageInterfaceImpl::preferedExtensions( TQMap &extensionMap ) const +{ + extensionMap.insert( "cpp", "C++ Source File" ); + extensionMap.insert( "h", "C++ Header File" ); +} + +TQStrList LanguageInterfaceImpl::signalNames( TQObject *obj ) const +{ + TQStrList sigs; + sigs = obj->metaObject()->signalNames( TRUE ); + sigs.remove( "destroyed()" ); + return sigs; +} diff --git a/kdevdesigner/plugins/languageinterfaceimpl.h b/kdevdesigner/plugins/languageinterfaceimpl.h new file mode 100644 index 00000000..b9db9997 --- /dev/null +++ b/kdevdesigner/plugins/languageinterfaceimpl.h @@ -0,0 +1,83 @@ +/********************************************************************** +** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef LANGUAGEINTERFACEIMPL_H +#define LANGUAGEINTERFACEIMPL_H + +#include "../interfaces/languageinterface.h" + +class LanguageInterfaceImpl : public LanguageInterface +{ +public: + LanguageInterfaceImpl( TQUnknownInterface *outer = 0 ); + + ulong addRef(); + ulong release(); + + TQRESULT queryInterface( const TQUuid&, TQUnknownInterface** ); + + void functions( const TQString &code, TQValueList *funcs ) const; + void connections( const TQString &, TQValueList * ) const {}; + TQString createFunctionStart( const TQString &className, const TQString &func, + const TQString &returnType, const TQString &access ); + TQStringList definitions() const; + TQStringList definitionEntries( const TQString &definition, TQUnknownInterface *designerIface ) const; + void setDefinitionEntries( const TQString &definition, const TQStringList &entries, TQUnknownInterface *designerIface ); + TQString createArguments( const TQString & ) { return TQString(); } + TQString createEmptyFunction(); + bool supports( Support s ) const; + TQStringList fileFilterList() const; + TQStringList fileExtensionList() const; + void preferedExtensions( TQMap &extensionMap ) const; + void sourceProjectKeys( TQStringList &keys ) const; + TQString projectKeyForExtension( const TQString &extension ) const; + TQString cleanSignature( const TQString &sig ) { return sig; } // #### implement me + void loadFormCode( const TQString &, const TQString &, + TQValueList &, + TQStringList &, + TQValueList & ); + TQString formCodeExtension() const { return ".h"; } + bool canConnect( const TQString &signal, const TQString &slot ); + void compressProject( const TQString &, const TQString &, bool ) {} + TQString uncompressProject( const TQString &, const TQString & ) { return TQString(); } + TQString aboutText() const { return ""; } + + void addConnection( const TQString &, const TQString &, + const TQString &, const TQString &, + TQString * ) {} + void removeConnection( const TQString &, const TQString &, + const TQString &, const TQString &, + TQString * ) {} + TQStrList signalNames( TQObject *obj ) const; + +private: + TQUnknownInterface *parent; + ulong ref; + +}; + +#endif diff --git a/kdevdesigner/shared/CMakeLists.txt b/kdevdesigner/shared/CMakeLists.txt new file mode 100644 index 00000000..46c5e8f6 --- /dev/null +++ b/kdevdesigner/shared/CMakeLists.txt @@ -0,0 +1,26 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/interfaces/external + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + + +##### shared (static) ######################## + +tde_add_library( shared STATIC_PIC + SOURCES + domtool.cpp parser.cpp ui2uib.cpp uib.cpp + widgetdatabase.cpp +) diff --git a/kdevdesigner/shared/Makefile.am b/kdevdesigner/shared/Makefile.am new file mode 100644 index 00000000..ea86ae94 --- /dev/null +++ b/kdevdesigner/shared/Makefile.am @@ -0,0 +1,6 @@ +KDE_CXXFLAGS = -UQT_NO_ASCII_CAST +INCLUDES = -I$(top_srcdir)/lib/interfaces/external $(all_includes) +METASOURCES = AUTO +libshared_la_LDFLAGS = $(all_libraries) +noinst_LTLIBRARIES = libshared.la +libshared_la_SOURCES = domtool.cpp parser.cpp ui2uib.cpp uib.cpp widgetdatabase.cpp diff --git a/kdevdesigner/shared/domtool.cpp b/kdevdesigner/shared/domtool.cpp new file mode 100644 index 00000000..f8ed4ec5 --- /dev/null +++ b/kdevdesigner/shared/domtool.cpp @@ -0,0 +1,453 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "domtool.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +/*! + \class DomTool domtool.h + \brief Tools for the dom + + A collection of static functions used by Resource (part of the + designer) and Uic. + +*/ + +/*! + Returns the contents of property \a name of object \a e as + variant or the variant passed as \a defValue if the property does + not exist. + + \sa hasProperty() +*/ +TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment ) +{ + TQDomElement n; + for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { + if ( n.tagName() == "property" ) { + if ( n.attribute( "name" ) != name ) + continue; + return elementToVariant( n.firstChild().toElement(), defValue, comment ); + } + } + return defValue; +} + + +/*! + \overload + */ +TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue ) +{ + TQString comment; + return readProperty( e, name, defValue, comment ); +} + +/*! + Returns wheter object \a e defines property \a name or not. + + \sa readProperty() + */ +bool DomTool::hasProperty( const TQDomElement& e, const TQString& name ) +{ + TQDomElement n; + for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { + if ( n.tagName() == "property" ) { + if ( n.attribute( "name" ) != name ) + continue; + return TRUE; + } + } + return FALSE; +} + +TQStringList DomTool::propertiesOfType( const TQDomElement& e, const TQString& type ) +{ + TQStringList result; + TQDomElement n; + for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { + if ( n.tagName() == "property" ) { + TQDomElement n2 = n.firstChild().toElement(); + if ( n2.tagName() == type ) + result += n.attribute( "name" ); + } + } + return result; +} + + +TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue ) +{ + TQString dummy; + return elementToVariant( e, defValue, dummy ); +} + +/*! + Interprets element \a e as variant and returns the result of the interpretation. + */ +TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment ) +{ + TQVariant v; + if ( e.tagName() == "rect" ) { + TQDomElement n3 = e.firstChild().toElement(); + int x = 0, y = 0, w = 0, h = 0; + while ( !n3.isNull() ) { + if ( n3.tagName() == "x" ) + x = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "y" ) + y = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "width" ) + w = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "height" ) + h = n3.firstChild().toText().data().toInt(); + n3 = n3.nextSibling().toElement(); + } + v = TQVariant( TQRect( x, y, w, h ) ); + } else if ( e.tagName() == "point" ) { + TQDomElement n3 = e.firstChild().toElement(); + int x = 0, y = 0; + while ( !n3.isNull() ) { + if ( n3.tagName() == "x" ) + x = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "y" ) + y = n3.firstChild().toText().data().toInt(); + n3 = n3.nextSibling().toElement(); + } + v = TQVariant( TQPoint( x, y ) ); + } else if ( e.tagName() == "size" ) { + TQDomElement n3 = e.firstChild().toElement(); + int w = 0, h = 0; + while ( !n3.isNull() ) { + if ( n3.tagName() == "width" ) + w = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "height" ) + h = n3.firstChild().toText().data().toInt(); + n3 = n3.nextSibling().toElement(); + } + v = TQVariant( TQSize( w, h ) ); + } else if ( e.tagName() == "color" ) { + v = TQVariant( readColor( e ) ); + } else if ( e.tagName() == "font" ) { + TQDomElement n3 = e.firstChild().toElement(); + TQFont f( defValue.toFont() ); + while ( !n3.isNull() ) { + if ( n3.tagName() == "family" ) + f.setFamily( n3.firstChild().toText().data() ); + else if ( n3.tagName() == "pointsize" ) + f.setPointSize( n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "bold" ) + f.setBold( n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "italic" ) + f.setItalic( n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "underline" ) + f.setUnderline( n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "strikeout" ) + f.setStrikeOut( n3.firstChild().toText().data().toInt() ); + n3 = n3.nextSibling().toElement(); + } + v = TQVariant( f ); + } else if ( e.tagName() == "string" ) { + v = TQVariant( e.firstChild().toText().data() ); + TQDomElement n = e; + n = n.nextSibling().toElement(); + if ( n.tagName() == "comment" ) + comment = n.firstChild().toText().data(); + } else if ( e.tagName() == "cstring" ) { + v = TQVariant( TQCString( e.firstChild().toText().data().ascii() ) ); + } else if ( e.tagName() == "number" ) { + bool ok = TRUE; + v = TQVariant( e.firstChild().toText().data().toInt( &ok ) ); + if ( !ok ) + v = TQVariant( e.firstChild().toText().data().toDouble() ); + } else if ( e.tagName() == "bool" ) { + TQString t = e.firstChild().toText().data(); + v = TQVariant( t == "true" || t == "1", 0 ); + } else if ( e.tagName() == "pixmap" ) { + v = TQVariant( e.firstChild().toText().data() ); + } else if ( e.tagName() == "iconset" ) { + v = TQVariant( e.firstChild().toText().data() ); + } else if ( e.tagName() == "image" ) { + v = TQVariant( e.firstChild().toText().data() ); + } else if ( e.tagName() == "enum" ) { + v = TQVariant( e.firstChild().toText().data() ); + } else if ( e.tagName() == "set" ) { + v = TQVariant( e.firstChild().toText().data() ); + } else if ( e.tagName() == "sizepolicy" ) { + TQDomElement n3 = e.firstChild().toElement(); + TQSizePolicy sp; + while ( !n3.isNull() ) { + if ( n3.tagName() == "hsizetype" ) + sp.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "vsizetype" ) + sp.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "horstretch" ) + sp.setHorStretch( n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "verstretch" ) + sp.setVerStretch( n3.firstChild().toText().data().toInt() ); + n3 = n3.nextSibling().toElement(); + } + v = TQVariant( sp ); + } else if ( e.tagName() == "cursor" ) { + v = TQVariant( TQCursor( e.firstChild().toText().data().toInt() ) ); + } else if ( e.tagName() == "stringlist" ) { + TQStringList lst; + TQDomElement n; + for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + lst << n.firstChild().toText().data(); + v = TQVariant( lst ); + } else if ( e.tagName() == "date" ) { + TQDomElement n3 = e.firstChild().toElement(); + int y, m, d; + y = m = d = 0; + while ( !n3.isNull() ) { + if ( n3.tagName() == "year" ) + y = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "month" ) + m = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "day" ) + d = n3.firstChild().toText().data().toInt(); + n3 = n3.nextSibling().toElement(); + } + v = TQVariant( TQDate( y, m, d ) ); + } else if ( e.tagName() == "time" ) { + TQDomElement n3 = e.firstChild().toElement(); + int h, m, s; + h = m = s = 0; + while ( !n3.isNull() ) { + if ( n3.tagName() == "hour" ) + h = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "minute" ) + m = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "second" ) + s = n3.firstChild().toText().data().toInt(); + n3 = n3.nextSibling().toElement(); + } + v = TQVariant( TQTime( h, m, s ) ); + } else if ( e.tagName() == "datetime" ) { + TQDomElement n3 = e.firstChild().toElement(); + int h, mi, s, y, mo, d ; + h = mi = s = y = mo = d = 0; + while ( !n3.isNull() ) { + if ( n3.tagName() == "hour" ) + h = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "minute" ) + mi = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "second" ) + s = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "year" ) + y = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "month" ) + mo = n3.firstChild().toText().data().toInt(); + else if ( n3.tagName() == "day" ) + d = n3.firstChild().toText().data().toInt(); + n3 = n3.nextSibling().toElement(); + } + v = TQVariant( TQDateTime( TQDate( y, mo, d ), TQTime( h, mi, s ) ) ); + } + return v; +} + + +/*! Returns the color which is returned in the dom element \a e. + */ + +TQColor DomTool::readColor( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + int r= 0, g = 0, b = 0; + while ( !n.isNull() ) { + if ( n.tagName() == "red" ) + r = n.firstChild().toText().data().toInt(); + else if ( n.tagName() == "green" ) + g = n.firstChild().toText().data().toInt(); + else if ( n.tagName() == "blue" ) + b = n.firstChild().toText().data().toInt(); + n = n.nextSibling().toElement(); + } + + return TQColor( r, g, b ); +} + +/*! + Returns the contents of attribute \a name of object \a e as + variant or the variant passed as \a defValue if the attribute does + not exist. + + \sa hasAttribute() + */ +TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment ) +{ + TQDomElement n; + for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { + if ( n.tagName() == "attribute" ) { + if ( n.attribute( "name" ) != name ) + continue; + return elementToVariant( n.firstChild().toElement(), defValue, comment ); + } + } + return defValue; +} + +/*! + \overload +*/ +TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue ) +{ + TQString comment; + return readAttribute( e, name, defValue, comment ); +} + +/*! + Returns wheter object \a e defines attribute \a name or not. + + \sa readAttribute() + */ +bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name ) +{ + TQDomElement n; + for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { + if ( n.tagName() == "attribute" ) { + if ( n.attribute( "name" ) != name ) + continue; + return TRUE; + } + } + return FALSE; +} + +static bool toBool( const TQString& s ) +{ + return s == "true" || s.toInt() != 0; +} + +/*! + Convert TQt 2.x format to TQt 3.0 format if necessary +*/ +void DomTool::fixDocument( TQDomDocument& doc ) +{ + TQDomElement e; + TQDomNode n; + TQDomNodeList nl; + int i = 0; + + e = doc.firstChild().toElement(); + if ( e.tagName() != "UI" ) + return; + + // latest version, don't do anything + if ( e.hasAttribute("version") && e.attribute("version").toDouble() > 3.0 ) + return; + + nl = doc.elementsByTagName( "property" ); + + // in 3.0, we need to fix a spelling error + if ( e.hasAttribute("version") && e.attribute("version").toDouble() == 3.0 ) { + for ( i = 0; i < (int) nl.length(); i++ ) { + TQDomElement el = nl.item(i).toElement(); + TQString s = el.attribute( "name" ); + if ( s == "resizeable" ) { + el.removeAttribute( "name" ); + el.setAttribute( "name", "resizable" ); + } + } + return; + } + + + // in versions smaller than 3.0 we need to change more + e.setAttribute( "version", 3.0 ); + + e.setAttribute("stdsetdef", 1 ); + for ( i = 0; i < (int) nl.length(); i++ ) { + e = nl.item(i).toElement(); + TQString name; + TQDomElement n2 = e.firstChild().toElement(); + if ( n2.tagName() == "name" ) { + name = n2.firstChild().toText().data(); + if ( name == "resizeable" ) + e.setAttribute( "name", "resizable" ); + else + e.setAttribute( "name", name ); + e.removeChild( n2 ); + } + bool stdset = toBool( e.attribute( "stdset" ) ); + if ( stdset || name == "toolTip" || name == "whatsThis" || + name == "buddy" || + e.parentNode().toElement().tagName() == "item" || + e.parentNode().toElement().tagName() == "spacer" || + e.parentNode().toElement().tagName() == "column" + ) + e.removeAttribute( "stdset" ); + else + e.setAttribute( "stdset", 0 ); + } + + nl = doc.elementsByTagName( "attribute" ); + for ( i = 0; i < (int) nl.length(); i++ ) { + e = nl.item(i).toElement(); + TQString name; + TQDomElement n2 = e.firstChild().toElement(); + if ( n2.tagName() == "name" ) { + name = n2.firstChild().toText().data(); + e.setAttribute( "name", name ); + e.removeChild( n2 ); + } + } + + nl = doc.elementsByTagName( "image" ); + for ( i = 0; i < (int) nl.length(); i++ ) { + e = nl.item(i).toElement(); + TQString name; + TQDomElement n2 = e.firstChild().toElement(); + if ( n2.tagName() == "name" ) { + name = n2.firstChild().toText().data(); + e.setAttribute( "name", name ); + e.removeChild( n2 ); + } + } + + nl = doc.elementsByTagName( "widget" ); + for ( i = 0; i < (int) nl.length(); i++ ) { + e = nl.item(i).toElement(); + TQString name; + TQDomElement n2 = e.firstChild().toElement(); + if ( n2.tagName() == "class" ) { + name = n2.firstChild().toText().data(); + e.setAttribute( "class", name ); + e.removeChild( n2 ); + } + } + +} + diff --git a/kdevdesigner/shared/domtool.h b/kdevdesigner/shared/domtool.h new file mode 100644 index 00000000..efa67f09 --- /dev/null +++ b/kdevdesigner/shared/domtool.h @@ -0,0 +1,53 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef DOMTOOL_H +#define DOMTOOL_H + +#include +#include + +class TQDomElement; +class TQDomDocument; + +class DomTool : public TQt +{ +public: + static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue ); + static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment ); + static bool hasProperty( const TQDomElement& e, const TQString& name ); + static TQStringList propertiesOfType( const TQDomElement& e, const TQString& type ); + static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue ); + static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment ); + static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue ); + static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment ); + static bool hasAttribute( const TQDomElement& e, const TQString& name ); + static TQColor readColor( const TQDomElement &e ); + static void fixDocument( TQDomDocument& ); +}; + + +#endif // DOMTOOL_H diff --git a/kdevdesigner/shared/globaldefs.h b/kdevdesigner/shared/globaldefs.h new file mode 100644 index 00000000..655545c6 --- /dev/null +++ b/kdevdesigner/shared/globaldefs.h @@ -0,0 +1,62 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef GLOBALDEFS_H +#define GLOBALDEFS_H + +#include +#include + +#define BOXLAYOUT_DEFAULT_MARGIN 11 +#define BOXLAYOUT_DEFAULT_SPACING 6 + +#ifndef NO_STATIC_COLORS +static TQColor *backColor1 = 0; +static TQColor *backColor2 = 0; +static TQColor *selectedBack = 0; + +static void init_colors() +{ + if ( backColor1 ) + return; + +#if 0 // a calculated alternative for backColor1 + TQColorGroup myCg = tqApp->palette().active(); + int h1, s1, v1; + int h2, s2, v2; + myCg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 ); + myCg.color( TQColorGroup::Background ).hsv( &h2, &s2, &v2 ); + TQColor c( h1, s1, ( v1 + v2 ) / 2, TQColor::Hsv ); +#endif + + backColor1 = new TQColor( 250, 248, 235 ); + backColor2 = new TQColor( 255, 255, 255 ); + selectedBack = new TQColor( 230, 230, 230 ); +} + +#endif + +#endif diff --git a/kdevdesigner/shared/parser.cpp b/kdevdesigner/shared/parser.cpp new file mode 100644 index 00000000..1fb2c5a7 --- /dev/null +++ b/kdevdesigner/shared/parser.cpp @@ -0,0 +1,72 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "parser.h" +#include +#include + +class NormalizeObject : public TQObject +{ +public: + NormalizeObject() : TQObject() {} + static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); } +}; + +TQString Parser::cleanArgs( const TQString &func ) +{ + TQString slot( func ); + int begin = slot.find( "(" ) + 1; + TQString args = slot.mid( begin ); + args = args.left( args.find( ")" ) ); + TQStringList lst = TQStringList::split( ',', args ); + TQString res = slot.left( begin ); + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { + if ( it != lst.begin() ) + res += ","; + TQString arg = *it; + int pos = 0; + if ( ( pos = arg.find( "&" ) ) != -1 ) { + arg = arg.left( pos + 1 ); + } else if ( ( pos = arg.find( "*" ) ) != -1 ) { + arg = arg.left( pos + 1 ); + } else { + arg = arg.simplifyWhiteSpace(); + if ( ( pos = arg.find( ':' ) ) != -1 ) + arg = arg.left( pos ).simplifyWhiteSpace() + ":" + arg.mid( pos + 1 ).simplifyWhiteSpace(); + TQStringList l = TQStringList::split( ' ', arg ); + if ( l.count() == 2 ) { + if ( l[ 0 ] != "const" && l[ 0 ] != "unsigned" && l[ 0 ] != "var" ) + arg = l[ 0 ]; + } else if ( l.count() == 3 ) { + arg = l[ 0 ] + " " + l[ 1 ]; + } + } + res += arg; + } + res += ")"; + + return TQString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) ); +} diff --git a/kdevdesigner/shared/parser.h b/kdevdesigner/shared/parser.h new file mode 100644 index 00000000..abec9963 --- /dev/null +++ b/kdevdesigner/shared/parser.h @@ -0,0 +1,39 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef PARSER_H +#define PARSER_H + +#include + +class Parser +{ +public: + static TQString cleanArgs( const TQString &func ); + +}; + +#endif diff --git a/kdevdesigner/shared/ui2uib.cpp b/kdevdesigner/shared/ui2uib.cpp new file mode 100644 index 00000000..5cff46e0 --- /dev/null +++ b/kdevdesigner/shared/ui2uib.cpp @@ -0,0 +1,893 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "ui2uib.h" +#include "uib.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + The .uib file format is the binary counterpart of the .ui file + format. It is generated by the ui2uib converter and understood by + TQWidgetFactory; in a future version, it might also be understood + by a uib2ui converter. Experiments show that .uib files are about + 2.5 times faster to load and 6 times smaller than .ui files. + + The .uib format, unlike the .ui format, is internal to Trolltech + and is not officially documented; it is assumed that anybody who + needs to understand the file format can read the ui2uib and + TQWidgetFactory source code, with some guidance. And here's some + guidance. + + A .uib file starts with a 32-bit magic number that allows + TQWidgetFactory to determine the file type. The magic number is + followed by '\n' (0x0a) and '\r' (0x0d), which ensure that the + file wasn't corrupted during transfer between different + platforms. For example, transferring a .ui file from Windows to + Unix using FTP with type ASCII will produce a file with '\r\n\r' + in place of '\n\r'. This is followed by the TQDataStream format + version number used. + + The rest of the file is made up of blocks, each of which starts + with a block type (Block_XXX) and a block length. Block_Intro and + Block_Widget are mandatory; the others are optional. + TQWidgetFactory makes certain assumptions about the order of the + blocks; for example, it expects Block_String before any other + block that refers to a string and Block_Images before + Block_Widget. The order generated by ui2uib is one of the orders + that make sense. Just after the last block, a Block_End marker + indicates the end of the file. + + The division of .uib files into blocks corresponds grossly to the + division of .ui files in top-level XML elements. Thus, + Block_Widget corresponds to and Block_Toolbars to + . The internal organization of each block also mimics + the organization of the corresponding XML elements. + + These are the major differences, all of which contribute to + making .uib files more compact: + + 1. The strings are gathered in Block_Strings, a string-table. + When a string is needed later, it is referenced by a 32-bit + index into that table. The UicStringTable class makes the + whole process of inserting and looking up strings very + simple. The advantage of this scheme is that if a string is + used more than once, it is stored only once. Also, the + string-table is preinitialized with very common strings, so + that these need not be stored along with .uib files. + + 2. TQObjects are referred to by index in a table rather than by + name. The table itself is not stored in the .uib file; it is + rather build dynamically by ui2uib and TQWidgetFactory as new + objects are specified. In ui2uib, the table is represented by + a UibIndexMap object; in TQWidgetFactory, a plain array of + TQObject pointers suffices. + + 3. The data is packed to take as little place as possible, + without slowing down TQLayoutFactory too much. For example, an + index into the string-table is a 32-bit integer, but in + practice it is rarely above 65534, so only 16 bits are used + for them; when an index above 65534 is met, the index is + saved as 65535 followed by the 32-bit index, for a total of + 48 bits. + + 4. The name of a signal or slot and its signature are saved + separately. That way, if a signal 'foo(const TQString&)' is + connected to a slot 'bar(const TQString&)', the string-table + will only contain 'foo', 'bar', and '(const TQString&)', + instead of the longer 'foo(const TQString&)' and 'bar(const + TQString&)'. The signatures are normalized beforehand to + ensure that trivial spacing problems don't result in multiple + string-table entries. + + 5. In a signal-to-slot connection, a sender, signal, receiver, + or slot is not repeated if it's the same as for the previous + connection. Bit flags indicate what is repeated and what is + specified. + + 6. Some of the information stored in a .ui file is useful only + by uic, not to TQLayoutFactory. That information is, for now, + not taken along in the .uib file. Likewise, needless + TQLayoutWidget objects are not taken along. + + The arbitrary constants related to the .uib file formats are + defined in uib.h. Constants such as Block_Actions and + Object_SubWidget are given values such as 'A' and 'W' to make + .uib files easier to read in a hexadecimal editor. + + The file format isn't designed to be extensible. Any extension + that prevents an older version of TQLayoutWidget of reading the + file correctly must have a different magic number. The plan is to + use UibMagic + 1 for version 2, UibMagic + 2 for version 3, etc. +*/ + +static TQCString layoutForTag( const TQString& tag ) +{ + if ( tag == "grid" ) { + return TQGRIDLAYOUT_OBJECT_NAME_STRING; + } else if ( tag == "hbox" ) { + return TQHBOXLAYOUT_OBJECT_NAME_STRING; + } else if ( tag == "vbox" ) { + return TQVBOXLAYOUT_OBJECT_NAME_STRING; + } else { + return TQLAYOUT_OBJECT_NAME_STRING; + } +} + +class UibHack : public TQObject +{ +public: + static TQString normalize( const TQString& member ) { + return TQString::fromUtf8( TQObject::normalizeSignalSlot(member.utf8()) ); + } +}; + +class UibIndexMap +{ +public: + UibIndexMap() : next( 0 ) { } + + void insert( const TQString& name ) { setName( insert(), name ); } + int insert() { return next++; } + void setName( int no, const TQString& name ); + + int find( const TQString& name, int deflt = -1 ) const; + int count() const { return next; } + +private: + TQMap nameMap; + TQMap conflicts; + int next; +}; + +void UibIndexMap::setName( int no, const TQString& name ) +{ + if ( !name.isEmpty() ) { + if ( *nameMap.insert(name, no, FALSE) != no ) + conflicts.insert( name, 0 ); + } +} + +int UibIndexMap::find( const TQString& name, int deflt ) const +{ + TQMap::ConstIterator no = nameMap.find( name ); + if ( no == nameMap.end() || conflicts.contains(name) ) { + return deflt; + } else { + return *no; + } +} + +static void packUInt16( TQDataStream& out, TQ_UINT16 n ) +{ + if ( n < 255 ) { + out << (TQ_UINT8) n; + } else { + out << (TQ_UINT8) 255; + out << n; + } +} + +static void packUInt32( TQDataStream& out, TQ_UINT32 n ) +{ + if ( n < 65535 ) { + out << (TQ_UINT16) n; + } else { + out << (TQ_UINT16) 65535; + out << n; + } +} + +static void packByteArray( TQDataStream& out, const TQByteArray& array ) +{ + packUInt32( out, array.size() ); + out.writeRawBytes( array.data(), array.size() ); +} + +static void packCString( UibStrTable& strings, TQDataStream& out, + const char *cstr ) +{ + packUInt32( out, strings.insertCString(cstr) ); +} + +static void packString( UibStrTable& strings, TQDataStream& out, + const TQString& str ) +{ + packUInt32( out, strings.insertString(str) ); +} + +static void packStringSplit( UibStrTable& strings, TQDataStream& out, + const TQString& str, TQChar sep ) +{ + int pos = str.find( sep ); + if ( pos == -1 ) + pos = str.length(); + packString( strings, out, str.left(pos) ); + packString( strings, out, str.mid(pos) ); +} + +static void packVariant( UibStrTable& strings, TQDataStream& out, + TQVariant value, TQString tag = "" ) +{ + TQStringList::ConstIterator s; + + TQ_UINT8 type = value.type(); + if ( tag == "pixmap" ) { + type = TQVariant::Pixmap; + } else if ( tag == "image" ) { + type = TQVariant::Image; + } else if ( tag == "iconset" ) { + type = TQVariant::IconSet; + } + out << type; + + switch ( type ) { + case TQVariant::String: + case TQVariant::Pixmap: + case TQVariant::Image: + case TQVariant::IconSet: + packString( strings, out, value.asString() ); + break; + case TQVariant::StringList: + packUInt16( out, value.asStringList().count() ); + s = value.asStringList().begin(); + while ( s != value.asStringList().end() ) { + packString( strings, out, *s ); + ++s; + } + break; + case TQVariant::Font: + out << value.asFont(); + break; + case TQVariant::Rect: + packUInt16( out, value.asRect().x() ); + packUInt16( out, value.asRect().y() ); + packUInt16( out, value.asRect().width() ); + packUInt16( out, value.asRect().height() ); + break; + case TQVariant::Size: + packUInt16( out, value.asSize().width() ); + packUInt16( out, value.asSize().height() ); + break; + case TQVariant::Color: + out << value.asColor(); + break; + case TQVariant::Point: + packUInt16( out, value.asPoint().x() ); + packUInt16( out, value.asPoint().y() ); + break; + case TQVariant::Int: + packUInt32( out, value.asInt() ); + break; + case TQVariant::Bool: + out << (TQ_UINT8) value.asBool(); + break; + case TQVariant::Double: + out << value.asDouble(); + break; + case TQVariant::CString: + packCString( strings, out, value.asCString() ); + break; + case TQVariant::Cursor: + out << value.asCursor(); + break; + case TQVariant::Date: + out << value.asDate(); + break; + case TQVariant::Time: + out << value.asTime(); + break; + case TQVariant::DateTime: + out << value.asDateTime(); + break; + default: + out << value; + } +} + +static void outputProperty( TQMap& buddies, int objectNo, + UibStrTable& strings, TQDataStream& out, + TQDomElement elem ) +{ + TQCString name = elem.attribute( "name" ).latin1(); + TQDomElement f = elem.firstChild().toElement(); + TQString tag = f.tagName(); + TQString comment; + TQVariant value; + + if ( name == "resizeable" ) + name = "resizable"; + + if ( tag == "font" ) { + TQString family; + TQ_UINT16 pointSize = 65535; + TQ_UINT8 fontFlags = 0; + + TQDomElement g = f.firstChild().toElement(); + while ( !g.isNull() ) { + TQString text = g.firstChild().toText().data(); + if ( g.tagName() == "family" ) { + fontFlags |= Font_Family; + family = text; + } else if ( g.tagName() == "pointsize" ) { + fontFlags |= Font_PointSize; + pointSize = (TQ_UINT16) text.toUInt(); + } else { + if ( g.firstChild().toText().data().toInt() != 0 ) { + if ( g.tagName() == "bold" ) { + fontFlags |= Font_Bold; + } else if ( g.tagName() == "italic" ) { + fontFlags |= Font_Italic; + } else if ( g.tagName() == "underline" ) { + fontFlags |= Font_Underline; + } else if ( g.tagName() == "strikeout" ) { + fontFlags |= Font_StrikeOut; + } + } + } + g = g.nextSibling().toElement(); + } + + out << (TQ_UINT8) Object_FontProperty; + packCString( strings, out, name ); + out << fontFlags; + if ( fontFlags & Font_Family ) + packString( strings, out, family ); + if ( fontFlags & Font_PointSize ) + packUInt16( out, pointSize ); + } else if ( tag == "palette" ) { + out << (TQ_UINT8) Object_PaletteProperty; + packCString( strings, out, name ); + + TQDomElement g = f.firstChild().toElement(); + while ( !g.isNull() ) { + TQDomElement h = g.firstChild().toElement(); + while ( !h.isNull() ) { + value = DomTool::elementToVariant( h, TQt::gray ); + if ( h.tagName() == "color" ) { + out << (TQ_UINT8) Palette_Color; + out << value.asColor(); + } else if ( h.tagName() == "pixmap" ) { + out << (TQ_UINT8) Palette_Pixmap; + packVariant( strings, out, value, "pixmap" ); + } + h = h.nextSibling().toElement(); + } + + if ( g.tagName() == "active" ) { + out << (TQ_UINT8) Palette_Active; + } else if ( g.tagName() == "inactive" ) { + out << (TQ_UINT8) Palette_Inactive; + } else { + out << (TQ_UINT8) Palette_Disabled; + } + g = g.nextSibling().toElement(); + } + out << (TQ_UINT8) Palette_End; + } else { + value = DomTool::elementToVariant( f, value, comment ); + if ( value.isValid() ) { + if ( name == "buddy" ) { + buddies[objectNo] += value.asString(); + } else { + if ( tag == "string" ) { + out << (TQ_UINT8) Object_TextProperty; + packCString( strings, out, name ); + packCString( strings, out, value.asString().utf8() ); + packCString( strings, out, comment.utf8() ); + } else { + out << (TQ_UINT8) Object_VariantProperty; + packCString( strings, out, name ); + packVariant( strings, out, value, tag ); + } + } + } + } +} + +static void outputGridCell( TQDataStream& out, TQDomElement elem ) +{ + int column = elem.attribute( "column", "0" ).toInt(); + int row = elem.attribute( "row", "0" ).toInt(); + int colspan = elem.attribute( "colspan", "1" ).toInt(); + int rowspan = elem.attribute( "rowspan", "1" ).toInt(); + if ( colspan < 1 ) + colspan = 1; + if ( rowspan < 1 ) + rowspan = 1; + + if ( column != 0 || row != 0 || colspan != 1 || rowspan != 1 ) { + out << (TQ_UINT8) Object_GridCell; + packUInt16( out, column ); + packUInt16( out, row ); + packUInt16( out, colspan ); + packUInt16( out, rowspan ); + } +} + +static int outputObject( TQMap& buddies, + UibIndexMap& objects, UibStrTable& strings, + TQDataStream& out, TQDomElement elem, + TQCString className = "" ); + +static void outputLayoutWidgetsSubLayout( TQMap& buddies, + UibIndexMap& objects, + UibStrTable& strings, + TQDataStream& out, TQDomElement elem ) +{ + int subLayoutNo = -1; + TQCString name; + TQDomElement nameElem; + + TQDomElement f = elem.firstChild().toElement(); + while ( !f.isNull() ) { + TQString tag = f.tagName(); + if ( tag == "grid" || tag == "hbox" || tag == "vbox" ) { + out << (TQ_UINT8) Object_SubLayout; + subLayoutNo = outputObject( buddies, objects, strings, out, f, + layoutForTag(tag) ); + } else if ( tag == "property" ) { + if ( f.attribute("name") == "name" ) { + name = DomTool::elementToVariant( f, name ).asCString(); + nameElem = f; + } + } + f = f.nextSibling().toElement(); + } + + if ( subLayoutNo != -1 ) { + /* + Remove the sub-layout's Object_End marker, append the grid + cell and the correct name property, and put the Object_End + marker back. + */ + out.device()->at( out.device()->at() - 1 ); + outputGridCell( out, elem ); + outputProperty( buddies, subLayoutNo, strings, out, nameElem ); + out << (TQ_UINT8) Object_End; + + objects.setName( subLayoutNo, name ); + } +} + +static int outputObject( TQMap& buddies, + UibIndexMap& objects, UibStrTable& strings, + TQDataStream& out, TQDomElement elem, + TQCString className ) +{ + bool isTQObject = !className.isEmpty(); + + if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) + out << (TQ_UINT8) elem.attribute( "dock", "0" ).toInt(); + if ( className == TQWIDGET_OBJECT_NAME_STRING ) + className = elem.attribute( "class", className ).latin1(); + + int objectNo = -1; + if ( isTQObject ) { + packCString( strings, out, className ); + objectNo = objects.insert(); + } + + outputGridCell( out, elem ); + + // optimization: insert '&Foo' into string-table before 'Foo' + if ( className == TQACTION_OBJECT_NAME_STRING || className == TQACTIONGROUP_OBJECT_NAME_STRING ) { + TQVariant value = DomTool::readProperty( elem, "menuText", TQVariant() ); + if ( value.asString().startsWith("&") ) + strings.insertString( value.asString() ); + } + + TQDomElement f = elem.firstChild().toElement(); + while ( !f.isNull() ) { + TQString tag = f.tagName(); + if ( tag == "action" ) { + if ( elem.tagName() == "item" || elem.tagName() == "toolbar" ) { + TQString actionName = f.attribute( "name" ); + int no = objects.find( actionName ); + if ( no != -1 ) { + out << (TQ_UINT8) Object_ActionRef; + packUInt16( out, no ); + } + } else { + out << (TQ_UINT8) Object_SubAction; + outputObject( buddies, objects, strings, out, f, TQACTION_OBJECT_NAME_STRING ); + } + } else if ( tag == "actiongroup" ) { + out << (TQ_UINT8) Object_SubAction; + outputObject( buddies, objects, strings, out, f, TQACTIONGROUP_OBJECT_NAME_STRING ); + } else if ( tag == "attribute" ) { + out << (TQ_UINT8) Object_Attribute; + outputProperty( buddies, objectNo, strings, out, f ); + } else if ( tag == "column" ) { + out << (TQ_UINT8) Object_Column; + outputObject( buddies, objects, strings, out, f ); + } else if ( tag == "event" ) { + out << (TQ_UINT8) Object_Event; + packCString( strings, out, f.attribute("name").latin1() ); + packVariant( strings, out, + TQStringList::split(',', f.attribute("functions")) ); + } else if ( tag == "grid" || tag == "hbox" || tag == "vbox" ) { + out << (TQ_UINT8) Object_SubLayout; + outputObject( buddies, objects, strings, out, f, + layoutForTag(tag) ); + } else if ( tag == "item" ) { + if ( elem.tagName() == "menubar" ) { + out << (TQ_UINT8) Object_MenuItem; + packCString( strings, out, f.attribute("name").latin1() ); + packCString( strings, out, f.attribute("text").utf8() ); + outputObject( buddies, objects, strings, out, f ); + } else { + out << (TQ_UINT8) Object_Item; + outputObject( buddies, objects, strings, out, f ); + } + } else if ( tag == "property" ) { + outputProperty( buddies, objectNo, strings, out, f ); + } else if ( tag == "row" ) { + out << (TQ_UINT8) Object_Row; + outputObject( buddies, objects, strings, out, f ); + } else if ( tag == "separator" ) { + out << (TQ_UINT8) Object_Separator; + } else if ( tag == "spacer" ) { + out << (TQ_UINT8) Object_Spacer; + outputObject( buddies, objects, strings, out, f ); + } else if ( tag == "widget" ) { + if ( f.attribute("class") == TQLAYOUTWIDGET_OBJECT_NAME_STRING && + elem.tagName() != "widget" ) { + outputLayoutWidgetsSubLayout( buddies, objects, strings, out, + f ); + } else { + out << (TQ_UINT8) Object_SubWidget; + outputObject( buddies, objects, strings, out, f, TQWIDGET_OBJECT_NAME_STRING ); + } + } + f = f.nextSibling().toElement(); + } + out << (TQ_UINT8) Object_End; + if ( isTQObject ) + objects.setName( objectNo, + DomTool::readProperty(elem, "name", "").asString() ); + return objectNo; +} + +static void outputBlock( TQDataStream& out, BlockTag tag, + const TQByteArray& data ) +{ + if ( !data.isEmpty() ) { + out << (TQ_UINT8) tag; + packByteArray( out, data ); + } +} + +void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) +{ + TQByteArray introBlock; + TQByteArray actionsBlock; + TQByteArray buddiesBlock; + TQByteArray connectionsBlock; + TQByteArray functionsBlock; + TQByteArray imagesBlock; + TQByteArray menubarBlock; + TQByteArray slotsBlock; + TQByteArray tabstopsBlock; + TQByteArray toolbarsBlock; + TQByteArray variablesBlock; + TQByteArray widgetBlock; + + TQDomElement actionsElem; + TQDomElement connectionsElem; + TQDomElement imagesElem; + TQDomElement menubarElem; + TQDomElement tabstopsElem; + TQDomElement toolbarsElem; + TQDomElement widgetElem; + + TQMap buddies; + UibStrTable strings; + UibIndexMap objects; + int widgetNo = -1; + TQCString className; + TQ_INT16 defaultMargin = -32768; + TQ_INT16 defaultSpacing = -32768; + TQ_UINT8 introFlags = 0; + + TQDomElement elem = doc.firstChild().toElement().firstChild().toElement(); + while ( !elem.isNull() ) { + TQString tag = elem.tagName(); + + switch ( tag[0].latin1() ) { + case 'a': + if ( tag == "actions" ) + actionsElem = elem; + break; + case 'c': + if ( tag == "class" ) { + className = elem.firstChild().toText().data().latin1(); + } else if ( tag == "connections" ) { + connectionsElem = elem; + } + break; + case 'f': + if ( tag == "functions" ) { + TQDataStream out2( functionsBlock, IO_WriteOnly ); + TQDomElement f = elem.firstChild().toElement(); + while ( !f.isNull() ) { + if ( f.tagName() == "function" ) { + packStringSplit( strings, out2, + f.attribute("name").latin1(), '(' ); + packString( strings, out2, + f.firstChild().toText().data() ); + } + f = f.nextSibling().toElement(); + } + } + break; + case 'i': + if ( tag == "images" ) { + TQDataStream out2( imagesBlock, IO_WriteOnly ); + TQDomElement f = elem.firstChild().toElement(); + while ( !f.isNull() ) { + if ( f.tagName() == "image" ) { + TQString name = f.attribute( "name" ); + TQDomElement g = f.firstChild().toElement(); + if ( g.tagName() == "data" ) { + TQString format = g.attribute( "format", "PNG" ); + TQString hex = g.firstChild().toText().data(); + int n = hex.length() / 2; + TQByteArray data( n ); + for ( int i = 0; i < n; i++ ) + data[i] = (char) hex.mid( 2 * i, 2 ) + .toUInt( 0, 16 ); + + packString( strings, out2, name ); + packString( strings, out2, format ); + packUInt32( out2, g.attribute("length").toInt() ); + packByteArray( out2, data ); + } + } + f = f.nextSibling().toElement(); + } + } + break; + case 'l': + if ( tag == "layoutdefaults" ) { + TQString margin = elem.attribute( "margin" ); + if ( !margin.isEmpty() ) + defaultMargin = margin.toInt(); + TQString spacing = elem.attribute( "spacing" ); + if ( !spacing.isEmpty() ) + defaultSpacing = spacing.toInt(); + } + break; + case 'm': + if ( tag == "menubar" ) + menubarElem = elem; + break; + case 'p': + if ( tag == "pixmapinproject" ) + introFlags |= Intro_Pixmapinproject; + break; + case 's': + if ( tag == "slots" ) { + TQDataStream out2( slotsBlock, IO_WriteOnly ); + TQDomElement f = elem.firstChild().toElement(); + while ( !f.isNull() ) { + if ( f.tagName() == "slot" ) { + TQString language = f.attribute( "language", "C++" ); + TQString slot = UibHack::normalize( + f.firstChild().toText().data() ); + packString( strings, out2, language ); + packStringSplit( strings, out2, slot, '(' ); + } + f = f.nextSibling().toElement(); + } + } + break; + case 't': + if ( tag == "tabstops" ) { + tabstopsElem = elem; + } else if ( tag == "toolbars" ) { + toolbarsElem = elem; + } + break; + case 'v': + if ( tag == "variable" ) { + TQDataStream out2( variablesBlock, IO_WriteOnly | IO_Append ); + packString( strings, out2, elem.firstChild().toText().data() ); + } else if ( tag == "variables" ) { + TQDataStream out2( variablesBlock, IO_WriteOnly ); + TQDomElement f = elem.firstChild().toElement(); + while ( !f.isNull() ) { + if ( f.tagName() == "variable" ) + packString( strings, out2, + f.firstChild().toText().data() ); + f = f.nextSibling().toElement(); + } + } + break; + case 'w': + if ( tag == "widget" ) + widgetElem = elem; + } + elem = elem.nextSibling().toElement(); + } + + { + TQDataStream out2( widgetBlock, IO_WriteOnly ); + widgetNo = outputObject( buddies, objects, strings, out2, widgetElem, + TQWIDGET_OBJECT_NAME_STRING ); + } + + if ( !tabstopsElem.isNull() ) { + TQDataStream out2( tabstopsBlock, IO_WriteOnly ); + TQDomElement f = tabstopsElem.firstChild().toElement(); + while ( !f.isNull() ) { + if ( f.tagName() == "tabstop" ) { + TQString widgetName = f.firstChild().toText().data(); + int no = objects.find( widgetName ); + if ( no != -1 ) + packUInt16( out2, no ); + } + f = f.nextSibling().toElement(); + } + } + + if ( !actionsElem.isNull() ) { + TQDataStream out2( actionsBlock, IO_WriteOnly ); + outputObject( buddies, objects, strings, out2, actionsElem ); + } + + if ( !menubarElem.isNull() ) { + TQDataStream out2( menubarBlock, IO_WriteOnly ); + outputObject( buddies, objects, strings, out2, menubarElem, + TQMENUBAR_OBJECT_NAME_STRING ); + } + + if ( !toolbarsElem.isNull() ) { + TQDataStream out2( toolbarsBlock, IO_WriteOnly ); + TQDomElement f = toolbarsElem.firstChild().toElement(); + while ( !f.isNull() ) { + if ( f.tagName() == "toolbar" ) + outputObject( buddies, objects, strings, out2, f, TQTOOLBAR_OBJECT_NAME_STRING ); + f = f.nextSibling().toElement(); + } + } + + if ( !buddies.isEmpty() ) { + TQDataStream out2( buddiesBlock, IO_WriteOnly ); + TQMap::ConstIterator a = buddies.begin(); + while ( a != buddies.end() ) { + TQStringList::ConstIterator b = (*a).begin(); + while ( b != (*a).end() ) { + int no = objects.find( *b ); + if ( no != -1 ) { + packUInt16( out2, a.key() ); + packUInt16( out2, no ); + } + ++b; + } + ++a; + } + } + + if ( !connectionsElem.isNull() ) { + TQString prevLanguage = "C++"; + int prevSenderNo = 0; + TQString prevSignal = "clicked()"; + int prevReceiverNo = 0; + TQString prevSlot = "accept()"; + + TQDataStream out2( connectionsBlock, IO_WriteOnly ); + TQDomElement f = connectionsElem.firstChild().toElement(); + while ( !f.isNull() ) { + if ( f.tagName() == "connection" ) { + TQMap argMap; + + TQDomElement g = f.firstChild().toElement(); + while ( !g.isNull() ) { + argMap[g.tagName()] = g.firstChild().toText().data(); + g = g.nextSibling().toElement(); + } + + TQString language = f.attribute( "language", "C++" ); + int senderNo = objects.find( argMap["sender"], widgetNo ); + int receiverNo = objects.find( argMap["receiver"], widgetNo ); + TQString signal = UibHack::normalize( argMap["signal"] ); + TQString slot = UibHack::normalize( argMap["slot"] ); + + TQ_UINT8 connectionFlags = 0; + if ( language != prevLanguage ) + connectionFlags |= Connection_Language; + if ( senderNo != prevSenderNo ) + connectionFlags |= Connection_Sender; + if ( signal != prevSignal ) + connectionFlags |= Connection_Signal; + if ( receiverNo != prevReceiverNo ) + connectionFlags |= Connection_Receiver; + if ( slot != prevSlot ) + connectionFlags |= Connection_Slot; + out2 << connectionFlags; + + if ( connectionFlags & Connection_Language ) + packString( strings, out2, language ); + if ( connectionFlags & Connection_Sender ) + packUInt16( out2, senderNo ); + if ( connectionFlags & Connection_Signal ) + packStringSplit( strings, out2, signal, '(' ); + if ( connectionFlags & Connection_Receiver ) + packUInt16( out2, receiverNo ); + if ( connectionFlags & Connection_Slot ) + packStringSplit( strings, out2, slot, '(' ); + + prevLanguage = language; + prevSenderNo = senderNo; + prevSignal = signal; + prevReceiverNo = receiverNo; + prevSlot = slot; + } else if ( f.tagName() == "slot" ) { + // ### + } + f = f.nextSibling().toElement(); + } + } + + { + TQDataStream out2( introBlock, IO_WriteOnly ); + out2 << introFlags; + out2 << defaultMargin; + out2 << defaultSpacing; + packUInt16( out2, objects.count() ); + packCString( strings, out2, className ); + } + + out << UibMagic; + out << (TQ_UINT8) '\n'; + out << (TQ_UINT8) '\r'; + out << (TQ_UINT8) out.version(); + outputBlock( out, Block_Strings, strings.block() ); + outputBlock( out, Block_Intro, introBlock ); + outputBlock( out, Block_Images, imagesBlock ); + outputBlock( out, Block_Widget, widgetBlock ); + outputBlock( out, Block_Slots, slotsBlock ); + outputBlock( out, Block_Tabstops, tabstopsBlock ); + outputBlock( out, Block_Actions, actionsBlock ); + outputBlock( out, Block_Menubar, menubarBlock ); + outputBlock( out, Block_Toolbars, toolbarsBlock ); + outputBlock( out, Block_Variables, variablesBlock ); + outputBlock( out, Block_Functions, functionsBlock ); + outputBlock( out, Block_Buddies, buddiesBlock ); + outputBlock( out, Block_Connections, connectionsBlock ); + out << (TQ_UINT8) Block_End; +} diff --git a/kdevdesigner/shared/ui2uib.h b/kdevdesigner/shared/ui2uib.h new file mode 100644 index 00000000..81041e6e --- /dev/null +++ b/kdevdesigner/shared/ui2uib.h @@ -0,0 +1,35 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef UI2UIB_H +#define UI2UIB_H + +class TQDataStream; +class TQDomDocument; + +void convertUiToUib( TQDomDocument& doc, TQDataStream& out ); + +#endif diff --git a/kdevdesigner/shared/uib.cpp b/kdevdesigner/shared/uib.cpp new file mode 100644 index 00000000..7072626a --- /dev/null +++ b/kdevdesigner/shared/uib.cpp @@ -0,0 +1,42 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "uib.h" + +static const char commonStrings[] = + "\0()\0(bool)\0(const TQString&)\0(int)\0C++\0Layout1\0PNG\0TQCheckBox\0" + "TQComboBox\0TQDialog\0TQFrame\0TQGridLayout\0TQGroupBox\0TQHBoxLayout\0TQLabel\0" + "TQLineEdit\0TQListView\0TQPushButton\0TQRadioButton\0TQVBoxLayout\0TQWidget\0" + "TextLabel1\0XPM.GZ\0accept\0autoDefault\0buddy\0caption\0clicked\0" + "default\0destroy\0frameShadow\0frameShape\0geometry\0init\0margin\0" + "maximumSize\0minimumSize\0name\0reject\0sizePolicy\0spacing\0text\0title\0" + "toolTip\0unnamed\0whatsThis"; + +UibStrTable::UibStrTable() + : out( table, IO_WriteOnly ), start( sizeof(commonStrings) ) +{ + out.writeRawBytes( commonStrings, start ); +} diff --git a/kdevdesigner/shared/uib.h b/kdevdesigner/shared/uib.h new file mode 100644 index 00000000..e6a6b05f --- /dev/null +++ b/kdevdesigner/shared/uib.h @@ -0,0 +1,152 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef UIB_H +#define UIB_H + +#include + +const TQ_UINT32 UibMagic = 0xb77c61d8; + +enum BlockTag { Block_End = '$', Block_Actions = 'A', Block_Buddies = 'B', + Block_Connections = 'C', Block_Functions = 'F', + Block_Images = 'G', Block_Intro = 'I', Block_Menubar = 'M', + Block_Slots = 'S', Block_Strings = 'Z', Block_Tabstops = 'T', + Block_Toolbars = 'O', Block_Variables = 'V', + Block_Widget = 'W' }; + +enum ObjectTag { Object_End = '$', Object_ActionRef = 'X', + Object_Attribute = 'B', Object_Column = 'C', + Object_Event = 'E', Object_FontProperty = 'F', + Object_GridCell = 'G', Object_Item = 'I', + Object_MenuItem = 'M', Object_PaletteProperty = 'P', + Object_Row = 'R', Object_Separator = 'S', Object_Spacer = 'Y', + Object_SubAction = 'A', Object_SubLayout = 'L', + Object_SubWidget = 'W', Object_TextProperty = 'T', + Object_VariantProperty = 'V' }; + +enum PaletteTag { Palette_End = '$', Palette_Active = 'A', + Palette_Inactive = 'I', Palette_Disabled = 'D', + Palette_Color = 'C', Palette_Pixmap = 'P' }; + +enum IntroFlag { Intro_Pixmapinproject = 0x1 }; + +enum FontFlag { Font_Family = 0x1, Font_PointSize = 0x2, Font_Bold = 0x4, + Font_Italic = 0x8, Font_Underline = 0x10, + Font_StrikeOut = 0x20 }; + +enum ConnectionFlag { Connection_Language = 0x1, Connection_Sender = 0x2, + Connection_Signal = 0x4, Connection_Receiver = 0x8, + Connection_Slot = 0x10 }; + +class UibStrTable +{ +public: + UibStrTable(); + + inline int insertCString( const char *cstr ); + inline int insertString( const TQString& str ); + inline void readBlock( TQDataStream& in, int size ); + + inline const char *asCString( int offset ) const; + inline TQString asString( int offset ) const; + inline TQByteArray block() const; + +private: + TQCString table; + TQDataStream out; + int start; +}; + +/* + uic uses insertCString(), insertString(), and block(); + TQWidgetFactory uses readBlock(), asCString(), and asString(). By + implementing these functions inline, we ensure that the binaries + don't contain needless code. +*/ + +inline int UibStrTable::insertCString( const char *cstr ) +{ + if ( cstr == 0 || cstr[0] == 0 ) { + return 0; + } else { + int nextPos = table.size(); + int len = strlen( cstr ); + int i; + for ( i = 0; i < nextPos - len; i++ ) { + if ( memcmp(table.data() + i, cstr, len + 1) == 0 ) + return i; + } + for ( i = 0; i < len + 1; i++ ) + out << (TQ_UINT8) cstr[i]; + return nextPos; + } +} + +inline int UibStrTable::insertString( const TQString& str ) +{ + if ( str.contains('\0') || str[0] == TQChar(0x7f) ) { + int nextPos = table.size(); + out << (TQ_UINT8) 0x7f; + out << str; + return nextPos; + } else { + return insertCString( str.utf8() ); + } +} + +inline void UibStrTable::readBlock( TQDataStream& in, int size ) +{ + table.resize( start + size ); + in.readRawBytes( table.data() + start, size ); +} + +inline TQString UibStrTable::asString( int offset ) const +{ + if ( table[offset] == 0x7f ) { + TQDataStream in( table, IO_ReadOnly ); + in.device()->at( offset + 1 ); + TQString str; + in >> str; + return str; + } else { + return TQString::fromUtf8( asCString(offset) ); + } +} + +inline const char *UibStrTable::asCString( int offset ) const +{ + return table.data() + offset; +} + +inline TQByteArray UibStrTable::block() const +{ + TQByteArray block; + block.duplicate( table.data() + start, table.size() - start ); + return block; +} + +#endif diff --git a/kdevdesigner/shared/widgetdatabase.cpp b/kdevdesigner/shared/widgetdatabase.cpp new file mode 100644 index 00000000..be4b6091 --- /dev/null +++ b/kdevdesigner/shared/widgetdatabase.cpp @@ -0,0 +1,960 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "widgetdatabase.h" +#include "../interfaces/widgetinterface.h" + +#include "../designer/kdevdesigner_part.h" + +#include +#include + +#include +#define NO_STATIC_COLORS +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +const int dbsize = 300; +const int dbcustom = 200; +const int dbdictsize = 211; +static WidgetDatabaseRecord* db[ dbsize ]; +static TQDict *className2Id = 0; +static int dbcount = 0; +static int dbcustomcount = 200; +static TQStrList *wGroups; +static TQStrList *invisibleGroups; +static bool whatsThisLoaded = FALSE; +static TQPluginManager *widgetPluginManager = 0; +static bool plugins_set_up = FALSE; +static bool was_in_setup = FALSE; + +TQCleanupHandler > cleanup_manager; + +WidgetDatabaseRecord::WidgetDatabaseRecord() +{ + isForm = FALSE; + isContainer = FALSE; + icon = 0; + nameCounter = 0; + isCommon = FALSE; + isPlugin = FALSE; +} + +WidgetDatabaseRecord::~WidgetDatabaseRecord() +{ + delete icon; +} + + +/*! + \class WidgetDatabase widgetdatabase.h + \brief The WidgetDatabase class holds information about widgets + + The WidgetDatabase holds information about widgets like toolTip(), + iconSet(), ... It works Id-based, so all access functions take the + widget id as parameter. To get the id for a widget (classname), use + idFromClassName(). + + All access functions are static. Having multiple widgetdatabases in + one application doesn't make sense anyway and so you don't need more + than an instance of the widgetdatabase. + + For creating widgets, layouts, etc. see WidgetFactory. +*/ + +/*! + Creates widget database. Does nothing. +*/ + +WidgetDatabase::WidgetDatabase() +{ +} + +/*! Sets up the widget database. If the static widgetdatabase already + exists, the functions returns immediately. +*/ + +void WidgetDatabase::setupDataBase( int id ) +{ + was_in_setup = TRUE; +#ifndef UIC + Q_UNUSED( id ) + if ( dbcount ) + return; +#else + if ( dbcount && id != -2 ) + return; + if ( dbcount && !plugins_set_up ) { + setupPlugins(); + return; + } + if ( dbcount && plugins_set_up) + return; +#endif + + wGroups = new TQStrList; + invisibleGroups = new TQStrList; + invisibleGroups->append( "Forms" ); + invisibleGroups->append( "Temp" ); + className2Id = new TQDict( dbdictsize ); + className2Id->setAutoDelete( TRUE ); + + WidgetDatabaseRecord *r = 0; + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_pushbutton.png"; + r->name = TQPUSHBUTTON_OBJECT_NAME_STRING; + r->group = widgetGroup( "Buttons" ); + r->toolTip = "Push Button"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_toolbutton.png"; + r->name = TQTOOLBUTTON_OBJECT_NAME_STRING; + r->group = widgetGroup( "Buttons" ); + r->toolTip = "Tool Button"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_radiobutton.png"; + r->name = TQRADIOBUTTON_OBJECT_NAME_STRING; + r->group = widgetGroup( "Buttons" ); + r->toolTip = "Radio Button"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_checkbox.png"; + r->name = TQCHECKBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Buttons" ); + r->toolTip = "Check Box"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_groupbox.png"; + r->name = TQGROUPBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Group Box"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_buttongroup.png"; + r->name = TQBUTTONGROUP_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Button Group"; + r->isContainer = TRUE; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_frame.png"; + r->name = TQFRAME_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Frame"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_tabwidget.png"; + r->name = TQTABWIDGET_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Tabwidget"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_widgetstack.png"; + r->name = TQWIDGETSTACK_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Widget Stack"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_toolbox.png"; + r->name = TQTOOLBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Tool Box"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_listbox.png"; + r->name = TQLISTBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Views" ); + r->toolTip = "List Box"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_listview.png"; + r->name = TQLISTVIEW_OBJECT_NAME_STRING; + r->group = widgetGroup( "Views" ); + r->toolTip = "List View"; + + append( r ); + +#if !defined(TQT_NO_ICONVIEW) || defined(UIC) + r = new WidgetDatabaseRecord; + r->iconSet = "designer_iconview.png"; + r->name = TQICONVIEW_OBJECT_NAME_STRING; + r->group = widgetGroup( "Views" ); + r->toolTip = "Icon View"; + + append( r ); +#endif + +#if !defined(TQT_NO_TABLE) + r = new WidgetDatabaseRecord; + r->iconSet = "designer_table.png"; + r->name = TQTABLE_OBJECT_NAME_STRING; + r->group = widgetGroup( "Views" ); + r->toolTip = "Table"; + + append( r ); +#endif + +#if !defined(TQT_NO_SQL) + r = new WidgetDatabaseRecord; + r->iconSet = "designer_datatable.png"; + r->includeFile = "tqdatatable.h"; + r->name = TQDATATABLE_OBJECT_NAME_STRING; + r->group = widgetGroup( "Database" ); + r->toolTip = "Data Table"; + + append( r ); +#endif + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_lineedit.png"; + r->name = TQLINEEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Line Edit"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_spinbox.png"; + r->name = TQSPINBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Spin Box"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_dateedit.png"; + r->name = TQDATEEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Date Edit"; + r->includeFile = "tqdatetimeedit.h"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_timeedit.png"; + r->name = TQTIMEEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Time Edit"; + r->includeFile = "tqdatetimeedit.h"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_datetimeedit.png"; + r->name = TQDATETIMEEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Date-Time Edit"; + r->includeFile = "tqdatetimeedit.h"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_multilineedit.png"; + r->name = TQMULTILINEEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Temp" ); + r->toolTip = "Multi Line Edit"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_richtextedit.png"; + r->name = TQTEXTEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Rich Text Edit"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_combobox.png"; + r->name = TQCOMBOBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Combo Box"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_slider.png"; + r->name = TQSLIDER_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Slider"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_scrollbar.png"; + r->name = TQSCROLLBAR_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Scrollbar"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_dial.png"; + r->name = TQDIAL_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Dial"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_label.png"; + r->name = TQLABEL_OBJECT_NAME_STRING; + r->group = widgetGroup( "Temp" ); + r->toolTip = "Label"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_label.png"; + r->name = "TextLabel"; + r->group = widgetGroup( "Display" ); + r->toolTip = "Text Label"; + r->whatsThis = "The Text Label provides a widget to display static text."; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_pixlabel.png"; + r->name = "PixmapLabel"; + r->group = widgetGroup( "Display" ); + r->toolTip = "Pixmap Label"; + r->whatsThis = "The Pixmap Label provides a widget to display pixmaps."; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_lcdnumber.png"; + r->name = TQLCDNUMBER_OBJECT_NAME_STRING; + r->group = widgetGroup( "Display" ); + r->toolTip = "LCD Number"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_line.png"; + r->name = "Line"; + r->group = widgetGroup( "Display" ); + r->toolTip = "Line"; + r->includeFile = "tqframe.h"; + r->whatsThis = "The Line widget provides horizontal and vertical lines."; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_progress.png"; + r->name = TQPROGRESSBAR_OBJECT_NAME_STRING; + r->group = widgetGroup( "Display" ); + r->toolTip = "Progress Bar"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_textview.png"; + r->name = TQTEXTVIEW_OBJECT_NAME_STRING; + r->group = widgetGroup( "Temp" ); + r->toolTip = "Text View"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_textbrowser.png"; + r->name = TQTEXTBROWSER_OBJECT_NAME_STRING; + r->group = widgetGroup( "Display" ); + r->toolTip = "Text Browser"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_spacer.png"; + r->name = "Spacer"; + r->group = widgetGroup( "Temp" ); + r->toolTip = "Spacer"; + r->whatsThis = "The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of layouts."; + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = TQWIDGET_OBJECT_NAME_STRING; + r->isForm = TRUE; + r->group = widgetGroup( "Forms" ); + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = TQDIALOG_OBJECT_NAME_STRING; + r->group = widgetGroup( "Forms" ); + r->isForm = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = TQWIZARD_OBJECT_NAME_STRING; + r->group = widgetGroup( "Forms" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = "TQDesignerWizard"; + r->group = widgetGroup( "Forms" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = TQLAYOUTWIDGET_OBJECT_NAME_STRING; + r->group = widgetGroup( "Temp" ); + r->includeFile = ""; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = TQSPLITTER_OBJECT_NAME_STRING; + r->group = widgetGroup( "Temp" ); + r->includeFile = "tqsplitter.h"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_tabwidget.png"; + r->name = "TQDesignerTabWidget"; + r->group = widgetGroup( "Temp" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_tabwidget.png"; + r->name = "TQDesignerWidget"; + r->group = widgetGroup( "Temp" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_tabwidget.png"; + r->name = "TQDesignerDialog"; + r->group = widgetGroup( "Temp" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = TQMAINWINDOW_OBJECT_NAME_STRING; + r->includeFile = "tqmainwindow.h"; + r->group = widgetGroup( "Temp" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = "TQDesignerAction"; + r->includeFile = "tqaction.h"; + r->group = widgetGroup( "Temp" ); + r->isContainer = FALSE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = "TQDesignerActionGroup"; + r->includeFile = "tqaction.h"; + r->group = widgetGroup( "Temp" ); + r->isContainer = FALSE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = TQSCROLLVIEW_OBJECT_NAME_STRING; + r->includeFile = "tqscrollview.h"; + r->group = widgetGroup( "Temp" ); + r->isContainer = TRUE; + + append( r ); + +#ifndef TQT_NO_SQL + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = TQDATABROWSER_OBJECT_NAME_STRING; + r->includeFile = "tqdatabrowser.h"; + r->group = widgetGroup( "Database" ); + r->toolTip = "Data Browser"; + r->iconSet = "designer_databrowser.png"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = TQDATAVIEW_OBJECT_NAME_STRING; + r->includeFile = "tqdataview.h"; + r->group = widgetGroup( "Database" ); + r->toolTip = "Data View"; + r->iconSet = "designer_dataview.png"; + r->isContainer = TRUE; + + append( r ); +#endif + +#ifndef UIC + setupPlugins(); +#endif +} + +void WidgetDatabase::setupPlugins() +{ + if ( plugins_set_up ) + return; + plugins_set_up = TRUE; + TQStringList widgets = widgetManager()->featureList(); + for ( TQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) { + if ( hasWidget( *it ) ) + continue; + WidgetDatabaseRecord *r = new WidgetDatabaseRecord; + WidgetInterface *iface = 0; + widgetManager()->queryInterface( *it, &iface ); + if ( !iface ) + continue; + +#ifndef UIC + TQIconSet icon = iface->iconSet( *it ); + if ( !icon.pixmap().isNull() ) + r->icon = new TQIconSet( icon ); +#endif + TQString grp = iface->group( *it ); + if ( grp.isEmpty() ) + grp = "3rd party widgets"; + r->group = widgetGroup( grp ); + r->toolTip = iface->toolTip( *it ); + r->whatsThis = iface->whatsThis( *it ); + r->includeFile = iface->includeFile( *it ); + r->isContainer = iface->isContainer( *it ); + r->name = *it; + r->isPlugin = TRUE; + append( r ); + iface->release(); + } +} + +/*! + Returns the number of elements in the widget database. +*/ + +int WidgetDatabase::count() +{ + setupDataBase( -1 ); + return dbcount; +} + +/*! + Returns the id at which the ids of custom widgets start. +*/ + +int WidgetDatabase::startCustom() +{ + setupDataBase( -1 ); + return dbcustom; +} + +/*! + Returns the iconset which represents the class registered as \a id. +*/ + +TQIconSet WidgetDatabase::iconSet( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQIconSet(); +#if !defined(UIC) && !defined(RESOURCE) + if ( !r->icon ) { + if ( r->iconSet.isEmpty() ) + return TQIconSet(); + TQPixmap pix = BarIcon( r->iconSet, KDevDesignerPartFactory::instance() ); + if ( pix.isNull() ) + pix = TQPixmap( r->iconSet ); + r->icon = new TQIconSet( pix ); + } + return *r->icon; +#else + return TQIconSet(); +#endif +} + +/*! + Returns the classname of the widget which is registered as \a id. +*/ + +TQString WidgetDatabase::className( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQString(); + return r->name; +} + +/*! + Returns the group the widget registered as \a id belongs to. +*/ + +TQString WidgetDatabase::group( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQString(); + return r->group; +} + +/*! + Returns the tooltip text of the widget which is registered as \a id. +*/ + +TQString WidgetDatabase::toolTip( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQString(); + return r->toolTip; +} + +/*! + Returns the what's this? text of the widget which is registered as \a id. +*/ + +TQString WidgetDatabase::whatsThis( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQString(); + return r->whatsThis; +} + +/*! + Returns the include file if the widget which is registered as \a id. +*/ + +TQString WidgetDatabase::includeFile( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQString(); + if ( r->includeFile.isNull() ) + return r->name.lower() + ".h"; + return r->includeFile; +} + +/*! Returns whether the widget registered as \a id is a form. +*/ +bool WidgetDatabase::isForm( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return FALSE; + return r->isForm; +} + +/*! Returns whether the widget registered as \a id can have children. +*/ + +bool WidgetDatabase::isContainer( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return FALSE; + return r->isContainer || r->isForm; +} + +bool WidgetDatabase::isCommon( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return FALSE; + return r->isCommon; +} + +TQString WidgetDatabase::createWidgetName( int id ) +{ + setupDataBase( id ); + TQString n = className( id ); + if ( n == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + n = "Layout"; + if ( n[ 0 ] == 'Q' && n[ 1 ].lower() != n[ 1 ] ) + n = n.mid( 1 ); + int colonColon = n.findRev( "::" ); + if ( colonColon != -1 ) + n = n.mid( colonColon + 2 ); + + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return n; + n += TQString::number( ++r->nameCounter ); + n[0] = n[0].lower(); + return n; +} + +/*! Returns the id for \a name or -1 if \a name is unknown. + */ +int WidgetDatabase::idFromClassName( const TQString &name ) +{ + setupDataBase( -1 ); + if ( name.isEmpty() ) + return 0; + int *i = className2Id->find( name ); + if ( i ) + return *i; + if ( name == "FormWindow" ) + return idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ); +#ifdef UIC + setupDataBase( -2 ); + i = className2Id->find( name ); + if ( i ) + return *i; +#endif + return -1; +} + +bool WidgetDatabase::hasWidget( const TQString &name ) +{ + return className2Id->find( name ) != 0; +} + +WidgetDatabaseRecord *WidgetDatabase::at( int index ) +{ + if ( index < 0 ) + return 0; + if ( index >= dbcustom && index < dbcustomcount ) + return db[ index ]; + if ( index < dbcount ) + return db[ index ]; + return 0; +} + +void WidgetDatabase::insert( int index, WidgetDatabaseRecord *r ) +{ + if ( index < 0 || index >= dbsize ) + return; + db[ index ] = r; + className2Id->insert( r->name, new int( index ) ); + if ( index < dbcustom ) + dbcount = TQMAX( dbcount, index ); +} + +void WidgetDatabase::append( WidgetDatabaseRecord *r ) +{ + if ( !was_in_setup ) + setupDataBase( -1 ); + insert( dbcount++, r ); +} + +TQString WidgetDatabase::widgetGroup( const TQString &g ) +{ + if ( wGroups->find( g.ascii() ) == -1 ) + wGroups->append( g.ascii() ); + return g; +} + +bool WidgetDatabase::isGroupEmpty( const TQString &grp ) +{ + WidgetDatabaseRecord *r = 0; + for ( int i = 0; i < dbcount; ++i ) { + if ( !( r = db[ i ] ) ) + continue; + if ( r->group == grp ) + return FALSE; + } + return TRUE; +} + +TQString WidgetDatabase::widgetGroup( int i ) +{ + setupDataBase( -1 ); + if ( i >= 0 && i < (int)wGroups->count() ) + return wGroups->at( i ); + return TQString(); +} + +int WidgetDatabase::numWidgetGroups() +{ + setupDataBase( -1 ); + return wGroups->count(); +} + +bool WidgetDatabase::isGroupVisible( const TQString &g ) +{ + setupDataBase( -1 ); + return invisibleGroups->find( g.ascii() ) == -1; +} + +int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r ) +{ + insert( dbcustomcount++, r ); + return dbcustomcount - 1; +} + +void WidgetDatabase::customWidgetClassNameChanged( const TQString &oldName, + const TQString &newName ) +{ + int id = idFromClassName( oldName ); + if ( id == -1 ) + return; + WidgetDatabaseRecord *r = db[ id ]; + r->name = newName; + className2Id->remove( oldName ); + className2Id->insert( newName, new int( id ) ); +} + +bool WidgetDatabase::isCustomWidget( int id ) +{ + if ( id >= dbcustom && id < dbcustomcount ) + return TRUE; + return FALSE; +} + +bool WidgetDatabase::isCustomPluginWidget( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return FALSE; + return r->isPlugin; +} + +bool WidgetDatabase::isWhatsThisLoaded() +{ + return whatsThisLoaded; +} + +void WidgetDatabase::loadWhatsThis( const TQString &docPath ) +{ + TQString whatsthisFile = docPath + "/whatsthis"; + TQFile f( whatsthisFile ); + if ( !f.open( IO_ReadOnly ) ) + return; + TQTextStream ts( &f ); + while ( !ts.atEnd() ) { + TQString s = ts.readLine(); + TQStringList l = TQStringList::split( " | ", s ); + int id = idFromClassName( l[ 1 ] ); + WidgetDatabaseRecord *r = at( id ); + if ( r ) + r->whatsThis = l[ 0 ]; + } + whatsThisLoaded = TRUE; +} + + +// ### TQt 3.1: make these publically accessible via TQWidgetDatabase API +#if defined(UIC) +bool dbnounload = FALSE; +TQStringList *dbpaths = 0; +#else +extern TQString *qwf_plugin_dir; +#endif + + +TQPluginManager *widgetManager() +{ + if ( !widgetPluginManager ) { + TQString pluginDir = "/designer"; +#if !defined(UIC) + if ( qwf_plugin_dir ) + pluginDir = *qwf_plugin_dir; +#endif + widgetPluginManager = new TQPluginManager( IID_Widget, TQApplication::libraryPaths(), pluginDir ); + cleanup_manager.add( &widgetPluginManager ); +#if defined(UIC) + if ( dbnounload ) + widgetPluginManager->setAutoUnload( FALSE ); + if ( dbpaths ) { + TQStringList::ConstIterator it = dbpaths->begin(); + for ( ; it != dbpaths->end(); ++it ) + widgetPluginManager->addLibraryPath( *it ); + } +#endif + } + return widgetPluginManager; +} diff --git a/kdevdesigner/shared/widgetdatabase.h b/kdevdesigner/shared/widgetdatabase.h new file mode 100644 index 00000000..5395f2ef --- /dev/null +++ b/kdevdesigner/shared/widgetdatabase.h @@ -0,0 +1,96 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef WIDGETDATABASE_H +#define WIDGETDATABASE_H + +#include +#include +#include "../interfaces/widgetinterface.h" // up here for GCC 2.7.* compatibility +#include + + +extern TQPluginManager *widgetManager(); + +struct WidgetDatabaseRecord +{ + WidgetDatabaseRecord(); + ~WidgetDatabaseRecord(); + TQString iconSet, name, group, toolTip, whatsThis, includeFile; + uint isContainer : 1; + uint isForm : 1; + uint isCommon : 1; + uint isPlugin : 1; + TQIconSet *icon; + int nameCounter; +}; + +class WidgetDatabase : public TQt +{ +public: + WidgetDatabase(); + static void setupDataBase( int id ); + static void setupPlugins(); + + static int count(); + static int startCustom(); + + static TQIconSet iconSet( int id ); + static TQString className( int id ); + static TQString group( int id ); + static TQString toolTip( int id ); + static TQString whatsThis( int id ); + static TQString includeFile( int id ); + static bool isForm( int id ); + static bool isContainer( int id ); + static bool isCommon( int id ); + + static int idFromClassName( const TQString &name ); + static TQString createWidgetName( int id ); + + static WidgetDatabaseRecord *at( int index ); + static void insert( int index, WidgetDatabaseRecord *r ); + static void append( WidgetDatabaseRecord *r ); + + static TQString widgetGroup( const TQString &g ); + static TQString widgetGroup( int i ); + static int numWidgetGroups(); + static bool isGroupVisible( const TQString &g ); + static bool isGroupEmpty( const TQString &grp ); + + static int addCustomWidget( WidgetDatabaseRecord *r ); + static bool isCustomWidget( int id ); + static bool isCustomPluginWidget( int id ); + + static bool isWhatsThisLoaded(); + static void loadWhatsThis( const TQString &docPath ); + + static bool hasWidget( const TQString &name ); + static void customWidgetClassNameChanged( const TQString &oldName, const TQString &newName ); + +}; + +#endif diff --git a/kdevdesigner/src/CMakeLists.txt b/kdevdesigner/src/CMakeLists.txt new file mode 100644 index 00000000..c232cd2f --- /dev/null +++ b/kdevdesigner/src/CMakeLists.txt @@ -0,0 +1,36 @@ +################################################# +# +# (C) 2010-2011 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} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES kdevdesigner.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +install( FILES kdevdesigner_shell.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdesigner ) + + +##### kdevdesigner (executable) ################# + +tde_add_executable( kdevdesigner AUTOMOC + SOURCES main.cpp kdevdesigner.cpp + LINK tdeparts-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/kdevdesigner/src/Makefile.am b/kdevdesigner/src/Makefile.am new file mode 100644 index 00000000..e5e68a98 --- /dev/null +++ b/kdevdesigner/src/Makefile.am @@ -0,0 +1,47 @@ +# set the include path for X, qt and KDE +INCLUDES = $(all_includes) + +# these are the headers for your project +noinst_HEADERS = kdevdesigner.h + +# let automoc handle all of the meta source files (moc) +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kdevdesigner.pot + + +# this Makefile creates both a KPart application and a KPart +######################################################################### +# APPLICATION SECTION +######################################################################### +# this is the program that gets installed. it's name is used for all +# of the other Makefile.am variables +bin_PROGRAMS = kdevdesigner + +# the application source, library search path, and link libraries +kdevdesigner_SOURCES = main.cpp kdevdesigner.cpp +kdevdesigner_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +kdevdesigner_LDADD = $(LIB_TDEPARTS) + +# this is where the desktop file will go +#shelldesktopdir = $(kde_appsdir)/Development +#shelldesktop_DATA = kdevdesigner.desktop +xdg_apps_DATA = kdevdesigner.desktop + +# this is where the shell's XML-GUI resource file goes +shellrcdir = $(kde_datadir)/kdevdesigner +shellrc_DATA = kdevdesigner_shell.rc + +######################################################################### +# KPART SECTION +######################################################################### + +# the Part's source, library search path, and link libraries + + +# this is where the desktop file will go +partdesktopdir = $(kde_servicesdir) + +# this is where the part's XML-GUI resource file goes +partrcdir = $(kde_datadir)/kdevdesignerpart diff --git a/kdevdesigner/src/kdevdesigner.cpp b/kdevdesigner/src/kdevdesigner.cpp new file mode 100644 index 00000000..f846e99b --- /dev/null +++ b/kdevdesigner/src/kdevdesigner.cpp @@ -0,0 +1,216 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program 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 program 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 "kdevdesigner.h" + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +KDevDesigner::KDevDesigner() + : KParts::MainWindow( 0L, "KDevDesigner" ) +{ + // set the shell's ui resource file + setXMLFile("kdevdesigner_shell.rc"); + + // then, setup our actions + setupActions(); + + // and a status bar + statusBar()->show(); + + // this routine will find and load our Part. it finds the Part by + // name which is a bad idea usually.. but it's alright in this + // case since our Part is made for this Shell + KLibFactory *factory = KLibLoader::self()->factory("libkdevdesignerpart"); + if (factory) + { + // now that the Part is loaded, we cast it to a Part to get + // our hands on it + TQStringList args; + args.append("in shell"); + m_part = static_cast(factory->create(TQT_TQOBJECT(this), + "kdevdesigner_part", "KParts::ReadWritePart", args)); + + if (m_part) + { + // tell the KParts::MainWindow that this is indeed the main widget + setCentralWidget(m_part->widget()); + + // and integrate the part's GUI with the shell's + createGUI(m_part); + } + } + else + { + // if we couldn't find our Part, we exit since the Shell by + // itself can't do anything useful + KMessageBox::error(this, i18n("Could not find the KDevDesigner part.")); + kapp->quit(); + // we return here, cause kapp->quit() only means "exit the + // next time we enter the event loop... + return; + } + + // apply the saved mainwindow settings, if any, and ask the mainwindow + // to automatically save settings if changed: window size, toolbar + // position, icon size, etc. + setAutoSaveSettings(); +} + +KDevDesigner::~KDevDesigner() +{ +} + +void KDevDesigner::load(const KURL& url) +{ + m_part->openURL( url ); +} + +void KDevDesigner::setupActions() +{ +/* KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());*/ + + KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); + + m_toolbarAction = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowToolbar()), actionCollection()); + m_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection()); + + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); +} + +void KDevDesigner::saveProperties(TDEConfig* /*config*/) +{ + // the 'config' object points to the session managed + // config file. anything you write here will be available + // later when this app is restored +} + +void KDevDesigner::readProperties(TDEConfig* /*config*/) +{ + // the 'config' object points to the session managed + // config file. this function is automatically called whenever + // the app is being restored. read in here whatever you wrote + // in 'saveProperties' +} + +void KDevDesigner::fileNew() +{ + // this slot is called whenever the File->New menu is selected, + // the New shortcut is pressed (usually CTRL+N) or the New toolbar + // button is clicked + + // About this function, the style guide ( + // http://developer.kde.org/documentation/standards/kde/style/basics/index.html ) + // says that it should open a new window if the document is _not_ + // in its initial state. This is what we do here.. + if ( ! m_part->url().isEmpty() || m_part->isModified() ) + { + (new KDevDesigner)->show(); + }; +} + + +void KDevDesigner::optionsShowToolbar() +{ + // this is all very cut and paste code for showing/hiding the + // toolbar + if (m_toolbarAction->isChecked()) + toolBar()->show(); + else + toolBar()->hide(); +} + +void KDevDesigner::optionsShowStatusbar() +{ + // this is all very cut and paste code for showing/hiding the + // statusbar + if (m_statusbarAction->isChecked()) + statusBar()->show(); + else + statusBar()->hide(); +} + +void KDevDesigner::optionsConfigureKeys() +{ + KKeyDialog::configureKeys(m_part->actionCollection(), "kdevdesigner_part.rc"); +} + +void KDevDesigner::optionsConfigureToolbars() +{ + saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); + + // use the standard toolbar editor + KEditToolbar dlg(factory()); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + this, TQT_SLOT(applyNewToolbarConfig())); + dlg.exec(); +} + +void KDevDesigner::applyNewToolbarConfig() +{ + applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); +} + +void KDevDesigner::fileOpen() +{ + // this slot is called whenever the File->Open menu is selected, + // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar + // button is clicked + KURL url = + KFileDialog::getOpenURL( TQString(), TQString(), this ); + + if (url.isEmpty() == false) + { + // About this function, the style guide ( + // http://developer.kde.org/documentation/standards/kde/style/basics/index.html ) + // says that it should open a new window if the document is _not_ + // in its initial state. This is what we do here.. + if ( m_part->url().isEmpty() && ! m_part->isModified() ) + { + // we open the file in this window... + load( url ); + } + else + { + // we open the file in a new window... + KDevDesigner* newWin = new KDevDesigner; + newWin->load( url ); + newWin->show(); + } + } +} + +#include "kdevdesigner.moc" diff --git a/kdevdesigner/src/kdevdesigner.desktop b/kdevdesigner/src/kdevdesigner.desktop new file mode 100644 index 00000000..1cd245f1 --- /dev/null +++ b/kdevdesigner/src/kdevdesigner.desktop @@ -0,0 +1,96 @@ +[Desktop Entry] +Name=TDevelop Designer +Name[el]=Σχεδιαστής TDevelop +Name[es]=Diseñador de TDevelop +Name[et]=TDevelopi Disainer +Name[eu]=TDevelop disenatzailea +Name[fa]=طراح TDevelop +Name[fr]=Concepteur TDevelop +Name[ga]=Dearthóir TDevelop +Name[it]=Designer di TDevelop +Name[ja]=TDevelop デザイナー +Name[ms]=Pereka TDevelop +Name[nds]=TDevelop-Maker +Name[ne]=केडीई विकास डिजाइनर +Name[pl]=Projektant TDevelop +Name[pt]=Desenhador do TDevelop +Name[pt_BR]=Designer do TDevelop +Name[sk]=TDevelop Dizajnér +Name[sl]=Snovalnik TDevelop +Name[sv]=TDevelop designer +Name[ta]=கேமேம்பாட்டு வடிவமைப்பாளர் +Name[tg]=Дизайнгари TDevelop +Name[zh_CN]=TDevelop 设计师 +Name[zh_TW]=TDevelop 設計器 +GenericName=Interface Designer +GenericName[br]=Ergrafer etrefas +GenericName[ca]=Dissenyador de interfícies +GenericName[cy]=Dylunydd Rhyngwyneb +GenericName[de]=Oberflächen-Designer +GenericName[el]=Σχεδιαστής διασυνδέσεων +GenericName[es]=Diseñador de interfaces +GenericName[et]=Liidesedisainer +GenericName[eu]=Interfazeen diseinatzailea +GenericName[fa]=طراح واسط +GenericName[fr]=Concepteur d'interfaces graphiques +GenericName[ga]=Dearthóir Comhéadain +GenericName[gl]=Deseñador de interfaces +GenericName[hu]=Felülettervező +GenericName[it]=Interfaccia del Designer +GenericName[ja]=インターフェースデザイナー +GenericName[lt]=Sąsajos redaktorius +GenericName[ms]=Pereka Antaramuka +GenericName[nds]=Böversietmaker +GenericName[ne]=इन्टरफेस डिजाइनर +GenericName[pl]=Projektowanie interfejsu +GenericName[pt]=Editor de Interfaces +GenericName[pt_BR]=Desenhador de Interface +GenericName[ru]=Дизайнер пользовательского интерфейса +GenericName[rw]=Umuhanzi w'Imigaragarire +GenericName[sk]=Interface Dizajnér +GenericName[sl]=Snovalnik vmesnikov +GenericName[sr]=Дизајнер интерфејса +GenericName[sr@Latn]=Dizajner interfejsa +GenericName[sv]=Gränssnittsdesign +GenericName[tr]=Arayüz Tasarlayıcısı +GenericName[zh_CN]=界面设计师 +GenericName[zh_TW]=介面設計器 +Exec=kdevdesigner %i -caption "%c" +Icon=kdevdesigner +Type=Application +DocPath=kdevdesigner/index.html +Comment=GUI Designer for Qt/TDE +Comment[ca]=Dissenyador de IGU per Qt/TDE +Comment[da]=Grafisk brugerfladedesigner til Qt/TDE +Comment[de]=Auf Qt-Designer basierender GUI-Designer +Comment[el]=Σχεδιαστής GUI για Qt/TDE +Comment[es]=Diseñador de interfaces para Qt/TDE +Comment[et]=Qt/TDE graafilise kasutajaliidese disainer +Comment[eu]=GUI diseinatzailea Qt/TDE-rako +Comment[fa]=طراح ونک برای Qt/TDE +Comment[fr]=Concepteur d'interfaces graphiques pour Qt / TDE +Comment[ga]=Dearthóir Comhéadan Grafach le haghaidh Qt/TDE +Comment[gl]=Deseñador GUI para Qt/TDE +Comment[hu]=Qt/TDE felülettervező +Comment[it]=Designer di GUI per Qt/TDE +Comment[ja]=Qt/TDE のための GUI デザイナー +Comment[ms]=Pereka GUI untuk Qt/TDE +Comment[nds]=Böversietmaker för Qt/TDE +Comment[ne]=Qt/TDE का लागि जी यू आई डिजाइनर +Comment[nl]=GUI Designer voor Qt/TDE +Comment[pl]=Projektant graficznego interfejsu użytkownika dla Qt/TDE +Comment[pt]=Editor de Interfaces para Qt/TDE +Comment[pt_BR]=Designer de GUI para o Qt/TDE +Comment[ru]=Среда создания графических форм Qt/TDE +Comment[sk]=GUI Dizajnér pre Qt/TDE +Comment[sl]=Snovalnik grafičnega vmesnika za Qt/TDE +Comment[sr]=Дизајнер GUI-ја за Qt/TDE +Comment[sr@Latn]=Dizajner GUI-ja za Qt/TDE +Comment[sv]=Grafisk gränssnittsdesign för Qt och TDE +Comment[ta]=Qtக்கான GUI வடிவமைப்பாளர் +Comment[tg]=Муҳит барои сохтани Qt/TDE ба шакли графикӣ +Comment[tr]=Qt/TDE için Arayüz Tasarlayıcısı +Comment[zh_CN]=Qt/TDE 的 GUI 设计师 +Comment[zh_TW]=Qt/TDE 的使用者介面設計器 +Terminal=false +Categories=Qt;TDE;Development;GUIDesigner;X-TDE-TDevelopIDE; diff --git a/kdevdesigner/src/kdevdesigner.h b/kdevdesigner/src/kdevdesigner.h new file mode 100644 index 00000000..a497dc5c --- /dev/null +++ b/kdevdesigner/src/kdevdesigner.h @@ -0,0 +1,97 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program 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 program 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 _KDEVDESIGNER_H_ +#define _KDEVDESIGNER_H_ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +class TDEToggleAction; + +/** + * This is the application "Shell". It has a menubar, toolbar, and + * statusbar but relies on the "Part" to do all the real work. + * + * @short Application Shell + * @author Alexander Dymo + * @version 0.1 + */ +class KDevDesigner : public KParts::MainWindow +{ + Q_OBJECT + +public: + /** + * Default Constructor + */ + KDevDesigner(); + + /** + * Default Destructor + */ + virtual ~KDevDesigner(); + + /** + * Use this method to load whatever file/URL you have + */ + void load(const KURL& url); + +protected: + /** + * This method is called when it is time for the app to save its + * properties for session management purposes. + */ + void saveProperties(TDEConfig *); + + /** + * This method is called when this app is restored. The TDEConfig + * object points to the session management config file that was saved + * with @ref saveProperties + */ + void readProperties(TDEConfig *); + +private slots: + void fileNew(); + void fileOpen(); + void optionsShowToolbar(); + void optionsShowStatusbar(); + void optionsConfigureKeys(); + void optionsConfigureToolbars(); + + void applyNewToolbarConfig(); + +private: + void setupAccel(); + void setupActions(); + +private: + KParts::ReadWritePart *m_part; + + TDEToggleAction *m_toolbarAction; + TDEToggleAction *m_statusbarAction; +}; + +#endif // _KDEVDESIGNER_H_ diff --git a/kdevdesigner/src/kdevdesigner_shell.rc b/kdevdesigner/src/kdevdesigner_shell.rc new file mode 100644 index 00000000..1bb33a25 --- /dev/null +++ b/kdevdesigner/src/kdevdesigner_shell.rc @@ -0,0 +1,37 @@ + + + + &File + + + + + &Edit + + + &Project + + + &Tools + + + &Layout + + + &Window + + + + &Settings + + + + + + + + + + + + diff --git a/kdevdesigner/src/main.cpp b/kdevdesigner/src/main.cpp new file mode 100644 index 00000000..f70b9285 --- /dev/null +++ b/kdevdesigner/src/main.cpp @@ -0,0 +1,94 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program 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 program 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 "kdevdesigner.h" +#include +#include +#include +#include +#include + +static const char description[] = + I18N_NOOP("TDE GUI Designer"); + +static const char version[] = "0.2"; + +static TDECmdLineOptions options[] = +{ + { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, + TDECmdLineLastOption +}; + +int main(int argc, char **argv) +{ + TDEAboutData about("kdevdesigner", I18N_NOOP("KDevDesigner"), version, description, + TDEAboutData::License_GPL, "KDevDesigner Copyright: (C) 2004-2005 Alexander Dymo\nTQt Designer Copyright: (C) 2000-2005 Trolltech AS All Rights Reserved", 0, 0); + about.addAuthor( "Trolltech AS", "TQt Designer code (Free Edition)" ); + about.addAuthor( "Alexander Dymo", "Port to KDE, partification", "adymo@kdevelop.org" ); + TDECmdLineArgs::init(argc, argv, &about); + TDECmdLineArgs::addCmdLineOptions( options ); + TDEApplication app; + + // see if we are starting with session management + if (app.isRestored()) + { + RESTORE(KDevDesigner); + } + else + { + // no session.. just start up normally + TQSplashScreen * splash = 0; + TQString splashFile = locate("data", "tdevelop/pics/kdevdesigner-splash.png"); + if (!splashFile.isNull()) + { + TQPixmap pm; + pm.load(splashFile); + splash = new TQSplashScreen( pm ); + splash->show(); + } + + app.processEvents(); + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + if ( args->count() == 0 ) + { + KDevDesigner *widget = new KDevDesigner; + widget->show(); + } + else + { + int i = 0; + for (; i < args->count(); i++ ) + { + KDevDesigner *widget = new KDevDesigner; + widget->show(); + widget->load( args->url( i ) ); + } + } + args->clear(); + if (splash) + delete splash; + } + + return app.exec(); +} diff --git a/kdevdesigner/uilib/CMakeLists.txt b/kdevdesigner/uilib/CMakeLists.txt new file mode 100644 index 00000000..3aa1c78f --- /dev/null +++ b/kdevdesigner/uilib/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_SOURCE_DIR}/kdevdesigner/shared + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + + +##### kdevqui (static) ########################## + +set( SRCS database.cpp qwidgetfactory.cpp ) + +tde_moc( SRCS database2.h ) + +tde_add_library( kdevqui STATIC_PIC + SOURCES ${SRCS} +) diff --git a/kdevdesigner/uilib/Makefile.am b/kdevdesigner/uilib/Makefile.am new file mode 100644 index 00000000..0480cd50 --- /dev/null +++ b/kdevdesigner/uilib/Makefile.am @@ -0,0 +1,9 @@ +KDE_CXXFLAGS=-UQT_NO_ASCII_CAST + +INCLUDES = -I$(top_srcdir)/kdevdesigner/shared $(all_includes) +METASOURCES = AUTO + +noinst_LTLIBRARIES = libkdevqui.la +libkdevqui_la_SOURCES = database.cpp qwidgetfactory.cpp + +libkdevqui_la_LDFLAGS = $(all_libraries) diff --git a/kdevdesigner/uilib/database.cpp b/kdevdesigner/uilib/database.cpp new file mode 100644 index 00000000..2b1956a9 --- /dev/null +++ b/kdevdesigner/uilib/database.cpp @@ -0,0 +1,122 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#if defined(DESIGNER) +#include "database.h" +#else +#include "database2.h" +#endif + +#ifndef TQT_NO_SQL + +#if defined(DESIGNER) +#include "formwindow.h" +#include "mainwindow.h" +#endif + +#include +#include +#include +#include + +DatabaseSupport::DatabaseSupport() +{ + con = 0; + frm = 0; + parent = 0; +} + +void DatabaseSupport::initPreview( const TQString &connection, const TQString &table, TQObject *o, + const TQMap &databaseControls ) +{ + tbl = table; + dbControls = databaseControls; + parent = o; + + if ( connection != "(default)" ) + con = TQSqlDatabase::database( connection ); + else + con = TQSqlDatabase::database(); + frm = new TQSqlForm( o, table.ascii() ); + for ( TQMap::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) { + TQObject *chld = parent->child( it.key().ascii(), TQWIDGET_OBJECT_NAME_STRING ); + if ( !chld ) + continue; + frm->insert( (TQWidget*)chld, *it ); + } +} + +TQDesignerDataBrowser::TQDesignerDataBrowser( TQWidget *parent, const char *name ) + : TQDataBrowser( parent, name ) +{ +} + +bool TQDesignerDataBrowser::event( TQEvent* e ) +{ + bool b = TQDataBrowser::event( e ); +#if defined(DESIGNER) + if ( MainWindow::self->isPreviewing() ) { +#endif + if ( e->type() == TQEvent::Show ) { + if ( con ) { + TQSqlCursor* cursor = new TQSqlCursor( tbl, TRUE, con ); + setSqlCursor( cursor, TRUE ); + setForm( frm ); + refresh(); + first(); + } + return TRUE; + } +#if defined(DESIGNER) + } +#endif + return b; +} + +TQDesignerDataView::TQDesignerDataView( TQWidget *parent, const char *name ) + : TQDataView( parent, name ) +{ +} + +bool TQDesignerDataView::event( TQEvent* e ) +{ + bool b = TQDataView::event( e ); +#if defined(DESIGNER) + if ( MainWindow::self->isPreviewing() ) { +#endif + if ( e->type() == TQEvent::Show ) { + setForm( frm ); + readFields(); + return TRUE; + } +#if defined(DESIGNER) + } +#endif + return b; +} + + +#endif diff --git a/kdevdesigner/uilib/database2.h b/kdevdesigner/uilib/database2.h new file mode 100644 index 00000000..865a7f8f --- /dev/null +++ b/kdevdesigner/uilib/database2.h @@ -0,0 +1,90 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef DATABASE2_H +#define DATABASE2_H + +#include "tqfeatures.h" + +#ifndef TQT_NO_SQL +#include +#include +#include +#include + +class TQSqlDatabase; +class TQSqlForm; + +class DatabaseSupport2 +{ +public: + DatabaseSupport2(); + virtual ~DatabaseSupport2() {} + + void initPreview( const TQString &connection, const TQString &table, TQObject *o, + const TQMap &databaseControls ); + +protected: + TQSqlDatabase* con; + TQSqlForm* frm; + TQString tbl; + TQMap dbControls; + TQObject *parent; + +}; + +class QDesignerDataBrowser2 : public TQDataBrowser, public DatabaseSupport2 +{ + Q_OBJECT + + +public: + QDesignerDataBrowser2( TQWidget *parent, const char *name ); + +protected: + bool event( TQEvent* e ); +}; + +class QDesignerDataView2 : public TQDataView, public DatabaseSupport2 +{ + Q_OBJECT + + +public: + QDesignerDataView2( TQWidget *parent, const char *name ); + +protected: + bool event( TQEvent* e ); + +}; + +#define DatabaseSupport DatabaseSupport2 +#define TQDesignerDataBrowser QDesignerDataBrowser2 +#define TQDesignerDataView QDesignerDataView2 + +#endif + +#endif diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp new file mode 100644 index 00000000..56649616 --- /dev/null +++ b/kdevdesigner/uilib/qwidgetfactory.cpp @@ -0,0 +1,2606 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "qwidgetfactory.h" + +#include "../interfaces/languageinterface.h" +#include "../interfaces/widgetinterface.h" + +#include +#include "database2.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef TQT_NO_SQL +#include +#include +#include +#endif + +// include all TQt widgets we support +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef TQT_NO_TABLE +#include +#endif +#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 + +class TQWidgetFactoryPrivate +{ +public: + TQCString translationContext; + TQListViewItem *lastItem; + TQDict customWidgets; +}; + +static TQPtrList widgetFactories; +static TQPluginManager *languageInterfaceManager = 0; +static TQPluginManager *widgetInterfaceManager = 0; + +static TQMap *availableWidgetMap = 0; +static TQStringList *availableWidgetList = 0; + +TQMap *qwf_forms = 0; +TQString *qwf_language = 0; +bool qwf_execute_code = TRUE; +bool qwf_stays_on_top = FALSE; +TQString qwf_currFileName = ""; +TQObject *qwf_form_object = 0; +TQString *qwf_plugin_dir = 0; + +static void setupPluginDir() +{ + if ( !qwf_plugin_dir ) + qwf_plugin_dir = new TQString( "/designer" ); +} + +static void setupWidgetListAndMap() +{ + if ( availableWidgetMap ) + return; + setupPluginDir(); + availableWidgetList = new TQStringList; + (*availableWidgetList) << TQPUSHBUTTON_OBJECT_NAME_STRING << TQTOOLBUTTON_OBJECT_NAME_STRING << TQCHECKBOX_OBJECT_NAME_STRING << TQRADIOBUTTON_OBJECT_NAME_STRING + << TQGROUPBOX_OBJECT_NAME_STRING << TQBUTTONGROUP_OBJECT_NAME_STRING << TQICONVIEW_OBJECT_NAME_STRING << TQTABLE_OBJECT_NAME_STRING + << TQLISTBOX_OBJECT_NAME_STRING << TQLISTVIEW_OBJECT_NAME_STRING << TQLINEEDIT_OBJECT_NAME_STRING << TQSPINBOX_OBJECT_NAME_STRING + << TQMULTILINEEDIT_OBJECT_NAME_STRING << TQLABEL_OBJECT_NAME_STRING << "TextLabel" << "PixmapLabel" + << TQLAYOUTWIDGET_OBJECT_NAME_STRING << TQTABWIDGET_OBJECT_NAME_STRING << TQCOMBOBOX_OBJECT_NAME_STRING + << TQWIDGET_OBJECT_NAME_STRING << TQDIALOG_OBJECT_NAME_STRING << TQWIZARD_OBJECT_NAME_STRING << TQLCDNUMBER_OBJECT_NAME_STRING; + // put less stress on the compiler by limiting the template nesting depth + (*availableWidgetList) << TQPROGRESSBAR_OBJECT_NAME_STRING << TQTEXTVIEW_OBJECT_NAME_STRING << TQTEXTBROWSER_OBJECT_NAME_STRING + << TQDIAL_OBJECT_NAME_STRING << TQSLIDER_OBJECT_NAME_STRING << TQFRAME_OBJECT_NAME_STRING << "Line" << TQTEXTEDIT_OBJECT_NAME_STRING + << TQDATEEDIT_OBJECT_NAME_STRING << TQTIMEEDIT_OBJECT_NAME_STRING << TQDATETIMEEDIT_OBJECT_NAME_STRING << TQSCROLLBAR_OBJECT_NAME_STRING + << TQPOPUPMENU_OBJECT_NAME_STRING << TQWIDGETSTACK_OBJECT_NAME_STRING << TQMAINWINDOW_OBJECT_NAME_STRING + << TQDATATABLE_OBJECT_NAME_STRING << TQDATABROWSER_OBJECT_NAME_STRING << TQDATAVIEW_OBJECT_NAME_STRING + << TQVBOX_OBJECT_NAME_STRING << TQHBOX_OBJECT_NAME_STRING << TQGRID_OBJECT_NAME_STRING << TQTOOLBOX_OBJECT_NAME_STRING; + + if ( !widgetInterfaceManager ) + widgetInterfaceManager = + new TQPluginManager( IID_Widget, TQApplication::libraryPaths(), *qwf_plugin_dir ); + + TQStringList l = widgetInterfaceManager->featureList(); + TQStringList::Iterator it; + for ( it = l.begin(); it != l.end(); ++it ) + (*availableWidgetList) << *it; + + availableWidgetMap = new TQMap; + for ( it = availableWidgetList->begin(); it != availableWidgetList->end(); ++it ) + availableWidgetMap->insert( *it, TRUE ); +} + +static TQImage loadImageData( const TQString& format, ulong len, TQByteArray data ) +{ + TQImage img; + if ( format == "XPM.GZ" || format == "XBM.GZ" ) { + if ( len < data.size() * 10 ) + len = data.size() * 10; + // tqUncompress() expects the first 4 bytes to be the expected length of + // the uncompressed data + TQByteArray dataTmp( data.size() + 4 ); + memcpy( dataTmp.data()+4, data.data(), data.size() ); + dataTmp[0] = ( len & 0xff000000 ) >> 24; + dataTmp[1] = ( len & 0x00ff0000 ) >> 16; + dataTmp[2] = ( len & 0x0000ff00 ) >> 8; + dataTmp[3] = ( len & 0x000000ff ); + TQByteArray baunzip = tqUncompress( dataTmp ); + len = baunzip.size(); + img.loadFromData( (const uchar*)baunzip.data(), len, format.left(format.find('.')).ascii() ); + } else { + img.loadFromData( (const uchar*)data.data(), data.size(), format.ascii() ); + } + return img; +} + +static TQSizePolicy::SizeType stringToSizeType( const TQString& str ) +{ + if ( str == "Fixed" ) { + return TQSizePolicy::Fixed; + } else if ( str == "Minimum" ) { + return TQSizePolicy::Minimum; + } else if ( str == "Maximum" ) { + return TQSizePolicy::Maximum; + } else if ( str == "Preferred" ) { + return TQSizePolicy::Preferred; + } else if ( str == "MinimumExpanding" ) { + return TQSizePolicy::MinimumExpanding; + } else if ( str == "Expanding" ) { + return TQSizePolicy::Expanding; + } else { + return TQSizePolicy::Ignored; + } +} + + +/*! + \class TQWidgetFactory + + \brief The TQWidgetFactory class provides for the dynamic creation of widgets + from TQt Designer .ui files. + + This class basically offers two things: + + \list + + \i Dynamically creating widgets from \link designer-manual.book TQt + Designer\endlink user interface description files. + You can do this using the static function TQWidgetFactory::create(). + This function also performs signal and slot connections, tab + ordering, etc., as defined in the .ui file, and returns the + top-level widget in the .ui file. After creating the widget you can + use TQObject::child() and TQObject::queryList() to access child + widgets of this returned widget. + + \i Adding additional widget factories to be able to create custom + widgets. See createWidget() for details. + + \endlist + + This class is not included in the TQt library itself. To use it you + must link against \c libqui.so (Unix) or \c qui.lib (Windows), which is + built into \c INSTALL/lib if you built \e{TQt Designer} (\c INSTALL is + the directory where TQt is installed ). + + See the "Creating Dynamic Dialogs from .ui Files" section of the \link + designer-manual.book TQt Designer manual\endlink for an example. See + also the \l{TQWidgetPlugin} class and the \link plugins-howto.html + Plugins documentation\endlink. +*/ + +/*! Constructs a TQWidgetFactory. */ + +TQWidgetFactory::TQWidgetFactory() + : d( new TQWidgetFactoryPrivate() ), dbControls( 0 ), + usePixmapCollection( FALSE ), defMargin( 11 ), defSpacing( 6 ) +{ + widgetFactories.setAutoDelete( TRUE ); + d->customWidgets.setAutoDelete( TRUE ); +} + +/*! \fn TQWidgetFactory::~TQWidgetFactory() + Destructor. +*/ +TQWidgetFactory::~TQWidgetFactory() +{ + delete d; +} + +/*! + + Loads the \e{TQt Designer} user interface description file \a uiFile + and returns the top-level widget in that description. \a parent and + \a name are passed to the constructor of the top-level widget. + + This function also performs signal and slot connections, tab + ordering, etc., as described in the .ui file. In \e{TQt Designer} it + is possible to add custom slots to a form and connect to them. If + you want these connections to be made, you must create a class + derived from TQObject, which implements all these slots. Then pass an + instance of the object as \a connector to this function. If you do + this, the connections to the custom slots will be done using the \a + connector as slot. + + If something fails, 0 is returned. + + The ownership of the returned widget is passed to the caller. +*/ + +TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector, + TQWidget *parent, const char *name ) +{ + setupPluginDir(); + TQFile f( uiFile ); + bool failed = FALSE; + if ( !f.open( IO_ReadOnly ) ) + failed = TRUE; + if ( failed && tqApp->type() == TQApplication::Tty ) { + // for TQSA: If we have no GUI, we have no form definition + // files, but just the code. So try if only the code exists. + f.setName( uiFile + ".qs" ); + failed = !f.open( IO_ReadOnly ); + } + if ( failed ) + return 0; + + qwf_currFileName = uiFile; + TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&f), connector, parent, name ); + if ( !qwf_forms ) + qwf_forms = new TQMap; + qwf_forms->insert( w, uiFile ); + return w; +} + +#undef slots + +/*! \overload + Loads the user interface description from device \a dev. + */ + +TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *parent, const char *name ) +{ + setupPluginDir(); + TQWidget *w = 0; + TQDomDocument doc; + TQString errMsg; + int errLine; + + TQWidgetFactory *widgetFactory = new TQWidgetFactory; + widgetFactory->toplevel = 0; + + // If we have no GUI, we only want to load the code + if ( tqApp->type() != TQApplication::Tty ) { + TQIODevice::Offset start = dev->at(); + TQ_UINT32 magic; + TQDataStream in( dev ); + in >> magic; + if ( magic == UibMagic ) { + w = widgetFactory->createFromUibFile( in, connector, parent, name ); + } else { + in.unsetDevice(); + dev->at( start ); + if ( doc.setContent( dev, &errMsg, &errLine ) ) { + w = widgetFactory->createFromUiFile( doc, connector, parent, name ); + } else { + // tqDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); + } + } + if ( !w ) { + delete widgetFactory; + return 0; + } + } + + if ( !languageInterfaceManager ) + languageInterfaceManager = + new TQPluginManager( IID_Language, TQApplication::libraryPaths(), *qwf_plugin_dir ); + widgetFactory->loadExtraSource(); + + if ( widgetFactory->toplevel ) { +#ifndef TQT_NO_SQL + TQMap::Iterator cit = widgetFactory->sqlWidgetConnections.begin(); + for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) { + if ( widgetFactory->noDatabaseWidgets.find( cit.key()->name() ) != + widgetFactory->noDatabaseWidgets.end() ) + continue; + if ( cit.key()->inherits( "QDesignerDataBrowser2" ) ) + ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, + TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); + else if ( cit.key()->inherits( "QDesignerDataView2" ) ) + ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, + TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); + } + + for ( TQMap::Iterator it = widgetFactory->dbTables.begin(); + it != widgetFactory->dbTables.end(); ++it ) { + TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key().ascii(), TQDATATABLE_OBJECT_NAME_STRING ); + if ( !table ) + continue; + if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != + widgetFactory->noDatabaseWidgets.end() ) + continue; + TQValueList fieldMap = *widgetFactory->fieldMaps.find( table ); + TQString conn = (*it)[ 0 ]; + TQSqlCursor* c = 0; + TQSqlDatabase *db = 0; + if ( conn.isEmpty() || conn == "(default)" ) { + db = TQSqlDatabase::database(); + c = new TQSqlCursor( (*it)[ 1 ] ); + } else { + db = TQSqlDatabase::database( conn ); + c = new TQSqlCursor( (*it)[ 1 ], TRUE, db ); + } + if ( db ) { + table->setSqlCursor( c, fieldMap.isEmpty(), TRUE ); + table->refresh( TQDataTable::RefreshAll ); + } + } +#endif + } + + for ( TQMap::Iterator it = widgetFactory->buddies.begin(); + it != widgetFactory->buddies.end(); ++it ) { + TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key().ascii(), TQLABEL_OBJECT_NAME_STRING ); + TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( (*it).ascii(), TQWIDGET_OBJECT_NAME_STRING ); + if ( label && buddy ) + label->setBuddy( buddy ); + } + + delete widgetFactory; + + TQApplication::sendPostedEvents(); + + return w; +} + +TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connector, + TQWidget *parent, const char *name ) +{ + DomTool::fixDocument( doc ); + + uiFileVersion = doc.firstChild().toElement().attribute("version"); + TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); + + TQDomElement variables = e; + while ( variables.tagName() != "variables" && !variables.isNull() ) + variables = variables.nextSibling().toElement(); + + TQDomElement slots = e; + while ( slots.tagName() != "slots" && !slots.isNull() ) + slots = slots.nextSibling().toElement(); + + TQDomElement connections = e; + while ( connections.tagName() != "connections" && !connections.isNull() ) + connections = connections.nextSibling().toElement(); + + TQDomElement imageCollection = e; + while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) + imageCollection = imageCollection.nextSibling().toElement(); + + TQDomElement tabOrder = e; + while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() ) + tabOrder = tabOrder.nextSibling().toElement(); + + TQDomElement actions = e; + while ( actions.tagName() != "actions" && !actions.isNull() ) + actions = actions.nextSibling().toElement(); + + TQDomElement toolbars = e; + while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() ) + toolbars = toolbars.nextSibling().toElement(); + + TQDomElement menubar = e; + while ( menubar.tagName() != "menubar" && !menubar.isNull() ) + menubar = menubar.nextSibling().toElement(); + + TQDomElement functions = e; + while ( functions.tagName() != "functions" && !functions.isNull() ) + functions = functions.nextSibling().toElement(); + + TQDomElement widget; + while ( !e.isNull() ) { + if ( e.tagName() == "class" ) { + d->translationContext = e.firstChild().toText().data().ascii(); + } else if ( e.tagName() == "widget" ) { + widget = e; + } else if ( e.tagName() == "pixmapinproject" ) { + usePixmapCollection = TRUE; + } else if ( e.tagName() == "layoutdefaults" ) { + defSpacing = e.attribute( "spacing", TQString::number( defSpacing ) ).toInt(); + defMargin = e.attribute( "margin", TQString::number( defMargin ) ).toInt(); + } + e = e.nextSibling().toElement(); + } + + if ( !imageCollection.isNull() ) + loadImageCollection( imageCollection ); + + createWidgetInternal( widget, parent, 0, widget.attribute("class", TQWIDGET_OBJECT_NAME_STRING) ); + TQWidget *w = toplevel; + if ( !w ) + return 0; + + if ( !actions.isNull() ) + loadActions( actions ); + if ( !toolbars.isNull() ) + loadToolBars( toolbars ); + if ( !menubar.isNull() ) + loadMenuBar( menubar ); + + if ( !connections.isNull() ) + loadConnections( connections, connector ); + if ( w && name && tqstrlen( name ) > 0 ) + w->setName( name ); + + if ( !tabOrder.isNull() ) + loadTabOrder( tabOrder ); + +#if 0 + if ( !functions.isNull() ) // compatibiliy with early 3.0 betas + loadFunctions( functions ); +#endif + + return w; +} + +void TQWidgetFactory::unpackUInt16( TQDataStream& in, TQ_UINT16& n ) +{ + TQ_UINT8 half; + in >> half; + if ( half == 255 ) { + in >> n; + } else { + n = half; + } +} + +void TQWidgetFactory::unpackUInt32( TQDataStream& in, TQ_UINT32& n ) +{ + TQ_UINT16 half; + in >> half; + if ( half == 65535 ) { + in >> n; + } else { + n = half; + } +} + +void TQWidgetFactory::unpackByteArray( TQDataStream& in, TQByteArray& array ) +{ + TQ_UINT32 size; + unpackUInt32( in, size ); + array.resize( size ); + in.readRawBytes( array.data(), size ); +} + +void TQWidgetFactory::unpackCString( const UibStrTable& strings, TQDataStream& in, + TQCString& cstr ) +{ + TQ_UINT32 n; + unpackUInt32( in, n ); + cstr = strings.asCString( n ); +} + +void TQWidgetFactory::unpackString( const UibStrTable& strings, TQDataStream& in, + TQString& str ) +{ + TQ_UINT32 n; + unpackUInt32( in, n ); + str = strings.asString( n ); +} + +void TQWidgetFactory::unpackStringSplit( const UibStrTable& strings, + TQDataStream& in, TQString& str ) +{ + TQString remainder; + unpackString( strings, in, str ); + unpackString( strings, in, remainder ); + str += remainder; +} + +void TQWidgetFactory::unpackVariant( const UibStrTable& strings, TQDataStream& in, + TQVariant& value ) +{ + TQString imageName; + TQ_UINT32 number; + TQ_UINT16 count; + TQ_UINT16 x; + TQ_UINT16 y; + TQ_UINT16 width; + TQ_UINT16 height; + TQ_UINT8 bit; + TQ_UINT8 type; + + in >> type; + + switch ( type ) { + case TQVariant::String: + unpackString( strings, in, value.asString() ); + break; + case TQVariant::Pixmap: + unpackString( strings, in, imageName ); + if ( imageName.isEmpty() ) { + value.asPixmap() = TQPixmap(); + } else { + value.asPixmap() = loadPixmap( imageName ); + } + break; + case TQVariant::Image: + unpackString( strings, in, imageName ); + if ( imageName.isEmpty() ) { + value.asImage() = TQImage(); + } else { + value.asImage() = loadFromCollection( imageName ); + } + break; + case TQVariant::IconSet: + unpackString( strings, in, imageName ); + if ( imageName.isEmpty() ) { + value.asIconSet() = TQIconSet(); + } else { + value.asIconSet() = TQIconSet( loadPixmap(imageName) ); + } + break; + case TQVariant::StringList: + unpackUInt16( in, count ); + while ( count-- ) { + TQString str; + unpackString( strings, in, str ); + value.asStringList().append( str ); + } + break; + case TQVariant::Rect: + unpackUInt16( in, x ); + unpackUInt16( in, y ); + unpackUInt16( in, width ); + unpackUInt16( in, height ); + value = TQRect( x, y, width, height ); + break; + case TQVariant::Size: + unpackUInt16( in, width ); + unpackUInt16( in, height ); + value = TQSize( width, height ); + break; + case TQVariant::Color: + in >> value.asColor(); + break; + case TQVariant::Point: + unpackUInt16( in, x ); + unpackUInt16( in, y ); + value = TQPoint( x, y ); + break; + case TQVariant::Int: + unpackUInt32( in, number ); + value = (int) number; + break; + case TQVariant::Bool: + in >> bit; + value = TQVariant( bit != 0, 0 ); + break; + case TQVariant::Double: + in >> value.asDouble(); + break; + case TQVariant::CString: + unpackCString( strings, in, value.asCString() ); + break; + case TQVariant::Cursor: + in >> value.asCursor(); + break; + case TQVariant::Date: + in >> value.asDate(); + break; + case TQVariant::Time: + in >> value.asTime(); + break; + case TQVariant::DateTime: + in >> value.asDateTime(); + break; + default: + in >> value; + } +} + +void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in, + TQLayout *parent ) +{ + TQCString name; + TQVariant value; + TQCString comment; + TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred; + bool vertical = FALSE; + int w = 0; + int h = 0; + TQ_UINT16 column = 0; + TQ_UINT16 row = 0; + TQ_UINT16 colspan = 1; + TQ_UINT16 rowspan = 1; + TQ_UINT8 objectTag; + + in >> objectTag; + while ( !in.atEnd() && objectTag != Object_End ) { + switch ( objectTag ) { + case Object_GridCell: + unpackUInt16( in, column ); + unpackUInt16( in, row ); + unpackUInt16( in, colspan ); + unpackUInt16( in, rowspan ); + break; + case Object_VariantProperty: + unpackCString( strings, in, name ); + unpackVariant( strings, in, value ); + + if ( name == "orientation" ) { + vertical = ( value == "Vertical" ); + } else if ( name == "sizeHint" ) { + w = value.toSize().width(); + h = value.toSize().height(); + } else if ( name == "sizeType" ) { + sizeType = stringToSizeType( value.toString() ); + } + break; + default: + tqFatal( "Corrupt" ); + } + in >> objectTag; + } + + if ( parent != 0 ) { + TQSpacerItem *spacer; + if ( vertical ) { + spacer = new TQSpacerItem( w, h, TQSizePolicy::Minimum, sizeType ); + } else { + spacer = new TQSpacerItem( w, h, sizeType, TQSizePolicy::Minimum ); + } + + if ( parent->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + ((TQGridLayout *) parent)->addMultiCell( spacer, row, + row + rowspan - 1, column, column + colspan - 1, + vertical ? TQt::AlignHCenter : TQt::AlignVCenter ); + } else { + parent->addItem( spacer ); + } + } +} + +void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings, + TQDataStream& in, TQObject *parent, + bool isRow ) +{ + TQString text; + TQPixmap pixmap; + TQString field; + bool clickable = TRUE; + bool resizable = TRUE; + + TQCString name; + TQVariant value; + TQCString comment; + TQString str; + TQ_UINT8 objectTag; + + in >> objectTag; + while ( !in.atEnd() && objectTag != Object_End ) { + switch ( objectTag ) { + case Object_TextProperty: + unpackCString( strings, in, name ); + unpackCString( strings, in, value.asCString() ); + unpackCString( strings, in, comment ); + str = translate( value.asCString().data(), comment.data() ); + + if ( name == "field" ) { + field = str; + } else if ( name == "text" ) { + text = str; + } + break; + case Object_VariantProperty: + unpackCString( strings, in, name ); + unpackVariant( strings, in, value ); + + if ( name == "clickable" ) { + clickable = value.toBool(); + } else if ( name == "pixmap" ) { + pixmap = value.asPixmap(); + } else if ( name == "resizable" ) { + resizable = value.toBool(); + } + break; + default: + tqFatal( "Corrupt" ); + } + in >> objectTag; + } + + if ( parent != 0 ) { + if ( parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) { + createListViewColumn( (TQListView *) parent, text, pixmap, clickable, + resizable ); +#ifndef TQT_NO_TABLE + } else if ( parent->inherits(TQTABLE_OBJECT_NAME_STRING) ) { + createTableColumnOrRow( (TQTable *) parent, text, pixmap, field, + isRow ); +#endif + } + } +} + +void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, + TQObject *parent, TQListViewItem *parentItem ) +{ + TQStringList texts; + TQValueList pixmaps; + TQCString name; + TQVariant value; + TQCString comment; + TQ_UINT8 objectTag; + + TQListView *listView = 0; + if ( parent != 0 && parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) + parent = TQT_TQOBJECT((TQListView *) parent); + TQListViewItem *item = 0; + if ( listView != 0 ) { + if ( parentItem == 0 ) { + item = new TQListViewItem( listView, d->lastItem ); + } else { + item = new TQListViewItem( parentItem, d->lastItem ); + } + d->lastItem = item; + } + + in >> objectTag; + while ( !in.atEnd() && objectTag != Object_End ) { + switch ( objectTag ) { + case Object_Item: + if ( listView != 0 ) + d->lastItem->setOpen( TRUE ); + inputItem( strings, in, parent, item ); + break; + case Object_TextProperty: + unpackCString( strings, in, name ); + unpackCString( strings, in, value.asCString() ); + unpackCString( strings, in, comment ); + + if ( name == "text" ) + texts << translate( value.asCString().data(), comment.data() ); + break; + case Object_VariantProperty: + unpackCString( strings, in, name ); + unpackVariant( strings, in, value ); + + if ( name == "pixmap" ) + pixmaps << value.asPixmap(); + break; + default: + tqFatal( "Corrupt" ); + } + in >> objectTag; + } + + if ( listView != 0 ) { + int i = 0; + TQStringList::ConstIterator t = texts.begin(); + while ( t != texts.end() ) { + item->setText( i, *t ); + ++i; + ++t; + } + + int j = 0; + TQValueList::ConstIterator p = pixmaps.begin(); + while ( p != pixmaps.end() ) { + item->setPixmap( j, *p ); + ++j; + ++p; + } + } else { + TQString text = texts.last(); + TQPixmap pixmap = pixmaps.last(); + + if ( parent != 0 ) { + if ( parent->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || + parent->inherits(TQLISTBOX_OBJECT_NAME_STRING) ) { + TQListBox *listBox = (TQListBox *) parent->tqt_cast( TQLISTBOX_OBJECT_NAME_STRING ); + if ( listBox == 0 ) + listBox = ((TQComboBox *) parent)->listBox(); + + if ( pixmap.isNull() ) { + (void) new TQListBoxText( listBox, text ); + } else { + (void) new TQListBoxPixmap( listBox, pixmap, text ); + } + #ifndef TQT_NO_ICONVIEW + } else if ( parent->inherits(TQICONVIEW_OBJECT_NAME_STRING) ) { + (void) new TQIconViewItem( (TQIconView *) parent, text, pixmap ); + #endif + } + } + } +} + +void TQWidgetFactory::inputMenuItem( TQObject **objects, + const UibStrTable& strings, TQDataStream& in, + TQMenuBar *menuBar ) +{ + TQCString name; + TQCString text; + TQ_UINT16 actionNo; + TQ_UINT8 objectTag; + + unpackCString( strings, in, name ); + unpackCString( strings, in, text ); + + TQPopupMenu *popupMenu = new TQPopupMenu( menuBar->parentWidget(), name ); + + in >> objectTag; + while ( !in.atEnd() && objectTag != Object_End ) { + switch ( objectTag ) { + case Object_ActionRef: + unpackUInt16( in, actionNo ); + ((TQAction *) objects[actionNo])->addTo( popupMenu ); + break; + case Object_Separator: + popupMenu->insertSeparator(); + break; + default: + tqFatal( "Corrupt" ); + } + in >> objectTag; + } + menuBar->insertItem( translate(text.data()), popupMenu ); +} + +TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, + const UibStrTable& strings, + TQDataStream& in, TQWidget *ancestorWidget, + TQObject *parent, TQCString className ) +{ + TQObject *obj = 0; + TQWidget *widget = 0; + TQLayout *layout = 0; + TQWidget *parentWidget = 0; + TQLayout *parentLayout = 0; + + bool isTQObject = !className.isEmpty(); + if ( isTQObject ) { + if ( parent != 0 ) { + if ( parent->isWidgetType() ) { + if ( parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) ) { + parentWidget = ((TQMainWindow *) parent)->centralWidget(); + } else { + parentWidget = (TQWidget *) parent; + } + } else if ( parent->inherits(TQLAYOUT_OBJECT_NAME_STRING) ) { + parentLayout = (TQLayout *) parent; + parentWidget = ancestorWidget; + } + } + + if ( className == TQACTION_OBJECT_NAME_STRING ) { + unpackCString( strings, in, className ); + if ( className == TQACTIONGROUP_OBJECT_NAME_STRING ) { + obj = new TQActionGroup( parent ); + } else { + obj = new TQAction( parent ); + } + } else if ( className == TQLAYOUT_OBJECT_NAME_STRING ) { + unpackCString( strings, in, className ); + LayoutType type = Grid; + if ( className == TQHBOXLAYOUT_OBJECT_NAME_STRING ) { + type = HBox; + } else if ( className == TQVBOXLAYOUT_OBJECT_NAME_STRING ) { + type = VBox; + } + if ( parentLayout != 0 && parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + layout = createLayout( 0, 0, type ); + } else { + layout = createLayout( parentWidget, parentLayout, type ); + } + obj = TQT_TQOBJECT(layout); + } else if ( className == TQMENUBAR_OBJECT_NAME_STRING ) { + unpackCString( strings, in, className ); + widget = ((TQMainWindow *) parent)->menuBar(); + obj = TQT_TQOBJECT(widget); + } else if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) { + TQ_UINT8 dock; + in >> dock; + unpackCString( strings, in, className ); + widget = new TQToolBar( TQString(), (TQMainWindow *) parent, + (TQt::Dock) dock ); + obj = TQT_TQOBJECT(widget); + } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { + unpackCString( strings, in, className ); + widget = createWidget( className, parentWidget, 0 ); + obj = TQT_TQOBJECT(widget); + } + + if ( widget != 0 ) + ancestorWidget = widget; + d->lastItem = 0; + objects[numObjects++] = obj; + } + + TQCString name; + TQVariant value; + TQCString comment; + TQString str; + TQ_UINT16 actionNo; + int metAttribute = 0; + TQ_UINT16 column = 0; + TQ_UINT16 row = 0; + TQ_UINT16 colspan = 1; + TQ_UINT16 rowspan = 1; + TQ_UINT8 paletteTag; + TQ_UINT8 objectTag; + + in >> objectTag; + while ( !in.atEnd() && objectTag != Object_End ) { + switch ( objectTag ) { + case Object_ActionRef: + unpackUInt16( in, actionNo ); + ((TQAction *) objects[actionNo])->addTo( (TQToolBar *) widget ); + break; + case Object_Attribute: + metAttribute = 2; + break; + case Object_Column: + inputColumnOrRow( strings, in, obj, FALSE ); + break; + case Object_Event: + unpackCString( strings, in, name ); + unpackVariant( strings, in, value ); + // ### do something with value.asStringList() + break; + case Object_FontProperty: + { + TQFont font; + TQString family; + TQ_UINT16 pointSize; + TQ_UINT8 fontFlags; + + unpackCString( strings, in, name ); + in >> fontFlags; + + if ( fontFlags & Font_Family ) { + unpackString( strings, in, family ); + font.setFamily( family ); + } + if ( fontFlags & Font_PointSize ) { + unpackUInt16( in, pointSize ); + font.setPointSize( pointSize ); + } + if ( fontFlags & Font_Bold ) + font.setBold( TRUE ); + if ( fontFlags & Font_Italic ) + font.setItalic( TRUE ); + if ( fontFlags & Font_Underline ) + font.setUnderline( TRUE ); + if ( fontFlags & Font_StrikeOut ) + font.setStrikeOut( TRUE ); + + if ( obj != 0 ) + setProperty( obj, name, font ); + } + break; + case Object_GridCell: + unpackUInt16( in, column ); + unpackUInt16( in, row ); + unpackUInt16( in, colspan ); + unpackUInt16( in, rowspan ); + break; + case Object_Item: + inputItem( strings, in, obj ); + break; + case Object_MenuItem: + inputMenuItem( objects, strings, in, (TQMenuBar *) widget ); + break; + case Object_PaletteProperty: + { + TQPalette palette; + TQColorGroup colorGroup; + TQColor color; + int role = -1; + + unpackCString( strings, in, name ); + + in >> paletteTag; + while ( !in.atEnd() && paletteTag != Palette_End ) { + switch ( paletteTag ) { + case Palette_Active: + palette.setActive( colorGroup ); + role = -1; + break; + case Palette_Inactive: + palette.setInactive( colorGroup ); + role = -1; + break; + case Palette_Disabled: + palette.setDisabled( colorGroup ); + role = -1; + break; + case Palette_Color: + role++; + in >> color; + colorGroup.setColor( (TQColorGroup::ColorRole) role, + color ); + break; + case Palette_Pixmap: + unpackVariant( strings, in, value ); + colorGroup.setBrush( (TQColorGroup::ColorRole) role, + TQBrush(color, value.asPixmap()) ); + break; + default: + tqFatal( "Corrupt" ); + } + in >> paletteTag; + } + if ( obj != 0 ) + setProperty( obj, name, palette ); + } + break; + case Object_Row: + inputColumnOrRow( strings, in, obj, TRUE ); + break; + case Object_Spacer: + inputSpacer( strings, in, layout ); + break; + case Object_Separator: + ((TQToolBar *) widget)->addSeparator(); + break; + case Object_SubAction: + inputObject( objects, numObjects, strings, in, parentWidget, + obj != 0 ? obj : parent, TQACTION_OBJECT_NAME_STRING ); + break; + case Object_SubLayout: + inputObject( objects, numObjects, strings, in, parentWidget, obj, + TQLAYOUT_OBJECT_NAME_STRING ); + break; + case Object_SubWidget: + inputObject( objects, numObjects, strings, in, parentWidget, obj, + TQWIDGET_OBJECT_NAME_STRING ); + break; + case Object_TextProperty: + unpackCString( strings, in, name ); + unpackCString( strings, in, value.asCString() ); + unpackCString( strings, in, comment ); + str = translate( value.asCString().data(), comment.data() ); + + if ( metAttribute > 0 ) { + if ( name == "title" ) { + if ( parent != 0 ) { + if ( parent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) ) { + ((TQTabWidget *) parent)->insertTab( widget, str ); + } else if ( parent->inherits(TQWIZARD_OBJECT_NAME_STRING) ) { + ((TQWizard *) parent)->addPage( widget, str ); + } + } + } + } else { + if ( obj != 0 ) + setProperty( obj, name, str ); + } + break; + case Object_VariantProperty: + unpackCString( strings, in, name ); + unpackVariant( strings, in, value ); + + if ( metAttribute > 0 ) { + if ( name == "id" ) { + if ( parent != 0 && parent->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING) ) + ((TQWidgetStack *) parent)->addWidget( widget, value.toInt() ); + } + } else { + if ( obj != 0 ) + setProperty( obj, name, value ); + } + break; + default: + tqFatal( "Corrupt" ); + } + in >> objectTag; + metAttribute--; + } + + if ( parentLayout != 0 ) { + if ( widget != 0 ) { + if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + ((TQGridLayout *) parentLayout)->addMultiCellWidget( + widget, row, row + rowspan - 1, column, + column + colspan - 1 ); + } else { + ((TQBoxLayout *) parentLayout)->addWidget( widget ); + } + } else if ( layout != 0 ) { + if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + ((TQGridLayout *) parentLayout)->addMultiCellLayout( + layout, row, row + rowspan - 1, column, + column + colspan - 1 ); + } + } + } + return obj; +} + +TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, + TQObject * /* connector */ , TQWidget *parent, const char *name ) +{ +#define END_OF_BLOCK() \ + ( in.atEnd() || in.device()->at() >= nextBlock ) + + TQ_UINT8 lf; + TQ_UINT8 cr; + in >> lf; + in >> cr; + if ( lf != '\n' || cr != '\r' ) { + tqWarning( "File corrupted" ); + return 0; + } + + TQ_UINT8 qdatastreamVersion; + in >> qdatastreamVersion; + if ( (int) qdatastreamVersion > in.version() ) { + tqWarning( "Incompatible version of TQt" ); + return 0; + } + in.setVersion( qdatastreamVersion ); + + UibStrTable strings; + TQObject **objects = 0; + int numObjects = 0; + + TQ_UINT8 blockType; + TQ_UINT32 blockSize; + + in >> blockType; + while ( !in.atEnd() && blockType != Block_End ) { + unpackUInt32( in, blockSize ); + TQIODevice::Offset nextBlock = in.device()->at() + blockSize; + + switch ( blockType ) { + case Block_Actions: + inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel) ); + break; + case Block_Buddies: + { + TQ_UINT16 labelNo; + TQ_UINT16 buddyNo; + + do { + unpackUInt16( in, labelNo ); + unpackUInt16( in, buddyNo ); + TQLabel *label = + (TQLabel *) objects[labelNo]->tqt_cast( TQLABEL_OBJECT_NAME_STRING ); + if ( label != 0 ) + label->setBuddy( (TQWidget *) objects[buddyNo] ); + } while ( !END_OF_BLOCK() ); + } + break; + case Block_Connections: + { + TQString language = "C++"; + TQ_UINT16 senderNo = 0; + TQString signal = "clicked()"; + TQ_UINT16 receiverNo = 0; + TQString slot = "accept()"; + TQ_UINT8 connectionFlags; + + do { + in >> connectionFlags; + if ( connectionFlags & Connection_Language ) + unpackString( strings, in, language ); + if ( connectionFlags & Connection_Sender ) + unpackUInt16( in, senderNo ); + if ( connectionFlags & Connection_Signal ) + unpackStringSplit( strings, in, signal ); + if ( connectionFlags & Connection_Receiver ) + unpackUInt16( in, receiverNo ); + if ( connectionFlags & Connection_Slot ) + unpackStringSplit( strings, in, slot ); + // ### +#if 0 + tqWarning( "connect( %p, %s, %p, %s )", objects[senderNo], + signal.latin1(), objects[receiverNo], + slot.latin1() ); +#endif + } while ( !END_OF_BLOCK() ); + } + break; + case Block_Functions: + // ### + tqWarning( "Block_Functions not supported" ); + in.device()->at( nextBlock ); + break; + case Block_Images: + { + TQString format; + TQ_UINT32 length; + TQByteArray data; + Image image; + + do { + unpackString( strings, in, image.name ); + unpackString( strings, in, format ); + unpackUInt32( in, length ); + unpackByteArray( in, data ); + image.img = loadImageData( format, length, data ); + images += image; + } while ( !END_OF_BLOCK() ); + } + break; + case Block_Intro: + { + TQ_INT16 defaultMargin; + TQ_INT16 defaultSpacing; + TQ_UINT16 maxObjects; + TQ_UINT8 introFlags; + + in >> introFlags; + in >> defaultMargin; + in >> defaultSpacing; + unpackUInt16( in, maxObjects ); + unpackCString( strings, in, d->translationContext ); + + if ( introFlags & Intro_Pixmapinproject ) + usePixmapCollection = TRUE; + if ( defaultMargin != -32768 ) + defMargin = defaultMargin; + if ( defaultSpacing != -32768 ) + defSpacing = defaultSpacing; + objects = new TQObject *[maxObjects]; + } + break; + case Block_Menubar: + inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel), + TQMENUBAR_OBJECT_NAME_STRING ); + break; + case Block_Slots: + { + TQString language; + TQString slot; + + do { + unpackString( strings, in, language ); + unpackStringSplit( strings, in, slot ); + } while ( !END_OF_BLOCK() ); + } + break; + case Block_Strings: + strings.readBlock( in, blockSize ); + break; + case Block_Tabstops: + { + TQ_UINT16 beforeNo; + TQ_UINT16 afterNo; + + unpackUInt16( in, beforeNo ); + while ( !END_OF_BLOCK() ) { + unpackUInt16( in, afterNo ); + toplevel->setTabOrder( (TQWidget *) objects[beforeNo], + (TQWidget *) objects[afterNo] ); + beforeNo = afterNo; + } + } + break; + case Block_Toolbars: + do { + inputObject( objects, numObjects, strings, in, toplevel, + TQT_TQOBJECT(toplevel), TQTOOLBAR_OBJECT_NAME_STRING ); + } while ( !END_OF_BLOCK() ); + break; + case Block_Variables: + // ### + tqWarning( "Block_Variables not supported" ); + in.device()->at( nextBlock ); + break; + case Block_Widget: + toplevel = (TQWidget *) + inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(parent), + TQWIDGET_OBJECT_NAME_STRING ); + if ( toplevel != 0 ) + toplevel->setName( name ); + break; + default: + tqWarning( "Version error" ); + return 0; + } + in >> blockType; + } + delete[] objects; + return toplevel; +} + +/*! Installs a widget factory \a factory, which normally contains + additional widgets that can then be created using a TQWidgetFactory. + See createWidget() for further details. +*/ + +void TQWidgetFactory::addWidgetFactory( TQWidgetFactory *factory ) +{ + widgetFactories.append( factory ); +} + +/*! + Creates a widget of the type \a className passing \a parent and \a + name to its constructor. + + If \a className is a widget in the TQt library, it is directly + created by this function. If the widget isn't in the TQt library, + each of the installed widget plugins is asked, in turn, to create + the widget. As soon as a plugin says it can create the widget it + is asked to do so. It may occur that none of the plugins can + create the widget, in which case each installed widget factory is + asked to create the widget (see addWidgetFactory()). If the widget + cannot be created by any of these means, 0 is returned. + + If you have a custom widget, and want it to be created using the + widget factory, there are two approaches you can use: + + \list 1 + + \i Write a widget plugin. This allows you to use the widget in + \e{TQt Designer} and in this TQWidgetFactory. See the widget plugin + documentation for further details. (See the "Creating Custom + Widgets with Plugins" section of the \link designer-manual.book TQt + Designer manual\endlink for an example. + + \i Subclass TQWidgetFactory. Then reimplement this function to + create and return an instance of your custom widget if \a + className equals the name of your widget, otherwise return 0. Then + at the beginning of your program where you want to use the widget + factory to create widgets do a: + \code + TQWidgetFactory::addWidgetFactory( new MyWidgetFactory ); + \endcode + where MyWidgetFactory is your TQWidgetFactory subclass. + + \endlist +*/ + +TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *parent, + const char *name ) const +{ + // create widgets we know + if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { + return new TQPushButton( parent, name ); + } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { + return new TQToolButton( parent, name ); + } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { + return new TQCheckBox( parent, name ); + } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { + return new TQRadioButton( parent, name ); + } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { + return new TQGroupBox( parent, name ); + } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { + return new TQButtonGroup( parent, name ); + } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { +#if !defined(TQT_NO_ICONVIEW) + return new TQIconView( parent, name ); +#endif + } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { +#if !defined(TQT_NO_TABLE) + return new TQTable( parent, name ); +#endif + } else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { + return new TQListBox( parent, name ); + } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { + return new TQListView( parent, name ); + } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) { + return new TQLineEdit( parent, name ); + } else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) { + return new TQSpinBox( parent, name ); + } else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) { + return new TQMultiLineEdit( parent, name ); + } else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" || className == "PixmapLabel" ) { + return new TQLabel( parent, name ); + } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { + return new TQWidget( parent, name ); + } else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { + return new TQTabWidget( parent, name ); + } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { + return new TQComboBox( FALSE, parent, name ); + } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { + if ( !qwf_stays_on_top ) + return new TQWidget( parent, name ); + return new TQWidget( parent, name, TQt::WStyle_StaysOnTop ); + } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { + if ( !qwf_stays_on_top ) + return new TQDialog( parent, name ); + return new TQDialog( parent, name, FALSE, TQt::WStyle_StaysOnTop ); + } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { + return new TQWizard( parent, name ); + } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) { + return new TQLCDNumber( parent, name ); + } else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) { + return new TQProgressBar( parent, name ); + } else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) { + return new TQTextView( parent, name ); + } else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) { + return new TQTextBrowser( parent, name ); + } else if ( className == TQDIAL_OBJECT_NAME_STRING ) { + return new TQDial( parent, name ); + } else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { + return new TQSlider( parent, name ); + } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { + return new TQFrame( parent, name ); + } else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) { + return new TQSplitter( parent, name ); + } else if ( className == "Line" ) { + TQFrame *f = new TQFrame( parent, name ); + f->setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); + return f; + } else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) { + return new TQTextEdit( parent, name ); + } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { + return new TQDateEdit( parent, name ); + } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { + return new TQTimeEdit( parent, name ); + } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { + return new TQDateTimeEdit( parent, name ); + } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { + return new TQScrollBar( parent, name ); + } else if ( className == TQPOPUPMENU_OBJECT_NAME_STRING ) { + return new TQPopupMenu( parent, name ); + } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { + return new TQWidgetStack( parent, name ); + } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { + return new TQToolBox( parent, name ); + } else if ( className == TQVBOX_OBJECT_NAME_STRING ) { + return new TQVBox( parent, name ); + } else if ( className == TQHBOX_OBJECT_NAME_STRING ) { + return new TQHBox( parent, name ); + } else if ( className == TQGRID_OBJECT_NAME_STRING ) { + return new TQGrid( 4, parent, name ); + } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { + TQMainWindow *mw = 0; + if ( !qwf_stays_on_top ) + mw = new TQMainWindow( parent, name ); + else + mw = new TQMainWindow( parent, name, TQt::WType_TopLevel | TQt::WStyle_StaysOnTop ); + mw->setCentralWidget( new TQWidget( mw, "qt_central_widget" ) ); + mw->centralWidget()->show(); + (void)mw->statusBar(); + return mw; + + } +#if !defined(TQT_NO_SQL) + else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { + return new TQDataTable( parent, name ); + } else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { + return new QDesignerDataBrowser2( parent, name ); + } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { + return new QDesignerDataView2( parent, name ); + } +#endif + + setupPluginDir(); + // try to create it using the loaded widget plugins + if ( !widgetInterfaceManager ) + widgetInterfaceManager = + new TQPluginManager( IID_Widget, TQApplication::libraryPaths(), + *qwf_plugin_dir ); + + TQInterfacePtr iface = 0; + widgetInterfaceManager->queryInterface( className, &iface ); + if ( iface ) { + TQWidget *w = iface->create( className, parent, name ); + if ( w ) { + d->customWidgets.replace( className.latin1(), new bool(TRUE) ); + return w; + } + } + + // hope we have a factory which can do it + for ( TQWidgetFactory* f = widgetFactories.first(); f; f = widgetFactories.next() ) { + TQWidget *w = f->createWidget( className, parent, name ); + if ( w ) + return w; + } + + // no success + return 0; +} + +/*! Returns the names of the widgets, which this facory can create. */ + +TQStringList TQWidgetFactory::widgets() +{ + setupWidgetListAndMap(); + return *availableWidgetList; +} + +/*! Returns whether this widget factory can create the widget \a + widget */ + +bool TQWidgetFactory::supportsWidget( const TQString &widget ) +{ + setupWidgetListAndMap(); + return ( availableWidgetMap->find( widget ) != availableWidgetMap->end() ); +} + +TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent, + TQLayout* layout, const TQString &classNameArg ) +{ + d->lastItem = 0; + TQDomElement n = e.firstChild().toElement(); + TQWidget *w = 0; // the widget that got created + TQObject *obj = 0; // gets the properties + + TQString className = classNameArg; + + int row = e.attribute( "row" ).toInt(); + int col = e.attribute( "column" ).toInt(); + int rowspan = e.attribute( "rowspan" ).toInt(); + int colspan = e.attribute( "colspan" ).toInt(); + if ( rowspan < 1 ) + rowspan = 1; + if ( colspan < 1 ) + colspan = 1; + + bool isTQLayoutWidget = FALSE; + + if ( !className.isEmpty() ) { + if ( !layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { + className = TQWIDGET_OBJECT_NAME_STRING; + isTQLayoutWidget = TRUE; + } + if ( layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { + // hide layout widgets + w = parent; + } else { + obj = TQT_TQOBJECT(TQWidgetFactory::createWidget( className, parent, 0 )); + if ( !obj ) + return 0; + w = (TQWidget*)obj; + if ( !toplevel ) + toplevel = w; + if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) + w = ( (TQMainWindow*)w )->centralWidget(); + if ( layout ) { + switch( layoutType( layout ) ) { + case HBox: + ( (TQHBoxLayout*)layout )->addWidget( w ); + break; + case VBox: + ( (TQVBoxLayout*)layout )->addWidget( w ); + break; + case Grid: + ( (TQGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, + col, col + colspan - 1 ); + break; + default: + break; + } + } + + layout = 0; + } + } +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + TQString parentClassName = parent ? parent->className() : 0; + bool isPlugin = parent ? !!d->customWidgets.find( parent->className() ) : FALSE; + if ( isPlugin ) + tqWarning( "####### loading custom container widgets without page support not implemented!" ); + // ### TODO loading for custom container widgets without pages +#endif + + int idx = 0; + while ( !n.isNull() ) { + if ( n.tagName() == "spacer" ) { + createSpacer( n, layout ); + } else if ( n.tagName() == "widget" ) { + TQMap< TQString, TQString> *oldDbControls = dbControls; + createWidgetInternal( n, w, layout, n.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) ); + dbControls = oldDbControls; + } else if ( n.tagName() == "hbox" ) { + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + layout = createLayout( 0, 0, TQWidgetFactory::HBox, isTQLayoutWidget ); + else + layout = createLayout( w, layout, TQWidgetFactory::HBox, isTQLayoutWidget ); + obj = TQT_TQOBJECT(layout); + n = n.firstChild().toElement(); + if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, + row + rowspan - 1, col, col + colspan - 1 ); + continue; + } else if ( n.tagName() == "grid" ) { + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + layout = createLayout( 0, 0, TQWidgetFactory::Grid, isTQLayoutWidget ); + else + layout = createLayout( w, layout, TQWidgetFactory::Grid, isTQLayoutWidget ); + obj = TQT_TQOBJECT(layout); + n = n.firstChild().toElement(); + if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, + row + rowspan - 1, col, col + colspan - 1 ); + continue; + } else if ( n.tagName() == "vbox" ) { + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + layout = createLayout( 0, 0, TQWidgetFactory::VBox, isTQLayoutWidget ); + else + layout = createLayout( w, layout, TQWidgetFactory::VBox, isTQLayoutWidget ); + obj = TQT_TQOBJECT(layout); + n = n.firstChild().toElement(); + if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, + row + rowspan - 1, col, col + colspan - 1 ); + continue; + } else if ( n.tagName() == "property" && obj ) { + setProperty( obj, n.attribute( "name" ), n.firstChild().toElement() ); + } else if ( n.tagName() == "attribute" && w ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( parent ) { + if ( parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) { + if ( attrib == "title" ) + ( (TQTabWidget*)parent )->insertTab( w, translate( v.toString() ) ); + } else if ( parent->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) { + if ( attrib == "id" ) + ( (TQWidgetStack*)parent )->addWidget( w, v.toInt() ); + } else if ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) { + if ( attrib == "label" ) + ( (TQToolBox*)parent )->addItem( w, v.toString() ); + } else if ( parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) { + if ( attrib == "title" ) + ( (TQWizard*)parent )->addPage( w, translate( v.toString() ) ); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + } else if ( isPlugin ) { + if ( attrib == "label" ) { + WidgetInterface *iface = 0; + widgetInterfaceManager->queryInterface( parentClassName, &iface ); + if ( iface ) { + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, + (TQUnknownInterface**)&iface2 ); + if ( iface2 ) { + iface2->insertPage( parentClassName, + (TQWidget*)parent, translate( v.toString() ), -1, w ); + iface2->release(); + } + iface->release(); + } + } +#endif + } + } + } else if ( n.tagName() == "item" ) { + createItem( n, w ); + } else if ( n.tagName() == "column" || n.tagName() == "row" ) { + createColumn( n, w ); + } + + n = n.nextSibling().toElement(); + idx++; + } + + return w; +} + +TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout, + LayoutType type, bool isTQLayoutWidget ) +{ + int spacing = defSpacing; + int margin = defMargin; + + if ( layout || !widget || isTQLayoutWidget ) + margin = 0; + + if ( !layout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) + widget = ((TQTabWidget*)widget)->currentPage(); + + if ( !layout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) + widget = ((TQWizard*)widget)->currentPage(); + + if ( !layout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) + widget = ((TQWidgetStack*)widget)->visibleWidget(); + + if ( !layout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) + widget = ((TQToolBox*)widget)->currentItem(); + + TQLayout *l = 0; + int align = 0; + if ( !layout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) { + TQGroupBox *gb = (TQGroupBox*)widget; + gb->setColumnLayout( 0, Qt::Vertical ); + layout = gb->layout(); + layout->setMargin( 0 ); + layout->setSpacing( 0 ); + align = TQt::AlignTop; + } + if ( layout ) { + switch ( type ) { + case HBox: + l = new TQHBoxLayout( layout ); + break; + case VBox: + l = new TQVBoxLayout( layout ); + break; + case Grid: + l = new TQGridLayout( layout ); + break; + default: + return 0; + } + } else { + switch ( type ) { + case HBox: + l = new TQHBoxLayout( widget ); + break; + case VBox: + l = new TQVBoxLayout( widget ); + break; + case Grid: + l = new TQGridLayout( widget ); + break; + default: + return 0; + } + } + l->setAlignment( align ); + l->setMargin( margin ); + l->setSpacing( spacing ); + return l; +} + +TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *layout ) const +{ + if ( layout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) ) + return HBox; + else if ( layout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) ) + return VBox; + else if ( layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + return Grid; + return NoLayout; +} + +void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, + TQVariant value ) +{ + int offset = obj->metaObject()->findProperty( prop.ascii(), TRUE ); + + if ( offset != -1 ) { + if ( prop == "geometry" && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) { + toplevel->resize( value.toRect().size() ); + } else if ( prop == "accel" ) { + obj->setProperty( prop.ascii(), TQVariant(value.toKeySequence()) ); + } else { + if ( value.type() == TQVariant::String || + value.type() == TQVariant::CString ) { + const TQMetaProperty *metaProp = + obj->metaObject()->property( offset, TRUE ); + if ( metaProp != 0 && metaProp->isEnumType() ) { + if ( metaProp->isSetType() ) { + TQStrList flagsCStr; + TQStringList flagsStr = + TQStringList::split( '|', value.asString() ); + TQStringList::ConstIterator f = flagsStr.begin(); + while ( f != flagsStr.end() ) { + flagsCStr.append( (*f).ascii() ); + ++f; + } + value = TQVariant( metaProp->keysToValue(flagsCStr) ); + } else { + TQCString key = value.toCString(); + value = TQVariant( metaProp->keyToValue(key) ); + } + } + } + obj->setProperty( prop.ascii(), value ); + } + } else { + if ( obj->isWidgetType() ) { + if ( prop == "toolTip" ) { + if ( !value.toString().isEmpty() ) + TQToolTip::add( (TQWidget*)obj, translate( value.toString() ) ); + } else if ( prop == "whatsThis" ) { + if ( !value.toString().isEmpty() ) + TQWhatsThis::add( (TQWidget*)obj, translate( value.toString() ) ); + } else if ( prop == "buddy" ) { + buddies.insert( obj->name(), value.toCString() ); + } else if ( prop == "buttonGroupId" ) { + if ( obj->inherits( TQBUTTON_OBJECT_NAME_STRING ) && obj->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) + ( (TQButtonGroup*)obj->parent() )->insert( (TQButton*)obj, value.toInt() ); +#ifndef TQT_NO_SQL + } else if ( prop == "database" && !obj->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) + && !obj->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) ) { + const TQStringList& lst = value.asStringList(); + if ( lst.count() > 2 ) { + if ( dbControls ) + dbControls->insert( obj->name(), lst[ 2 ] ); + } else if ( lst.count() == 2 ) { + dbTables.insert( obj->name(), lst ); + } + } else if ( prop == "database" ) { + const TQStringList& lst = value.asStringList(); + if ( lst.count() == 2 && obj->inherits( TQWIDGET_OBJECT_NAME_STRING ) ) { + SqlWidgetConnection conn( lst[ 0 ], lst[ 1 ] ); + sqlWidgetConnections.insert( (TQWidget*)obj, conn ); + dbControls = conn.dbControls; + } +#endif + } else if ( prop == "frameworkCode" ) { + if ( value.isValid() && !value.toBool() ) + noDatabaseWidgets << obj->name(); + } + } + } +} + +void TQWidgetFactory::setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e ) +{ + TQString comment; + TQVariant value( DomTool::elementToVariant( e, TQVariant(), comment ) ); + + if ( e.tagName() == "string" ) { + value = translate( value.asString(), comment ); + } else if ( e.tagName() == "pixmap" ) { + TQPixmap pix = loadPixmap( value.toString() ); + if ( !pix.isNull() ) + value = pix; + } else if ( e.tagName() == "iconset" ) { + TQPixmap pix = loadPixmap( value.toString() ); + if ( !pix.isNull() ) + value = TQIconSet( pix ); + } else if ( e.tagName() == "image" ) { + value = loadFromCollection( value.toString() ); + } else if ( e.tagName() == "palette" ) { + TQDomElement n = e.firstChild().toElement(); + TQPalette p; + while ( !n.isNull() ) { + TQColorGroup cg; + if ( n.tagName() == "active" ) { + cg = loadColorGroup( n ); + p.setActive( cg ); + } else if ( n.tagName() == "inactive" ) { + cg = loadColorGroup( n ); + p.setInactive( cg ); + } else if ( n.tagName() == "disabled" ) { + cg = loadColorGroup( n ); + p.setDisabled( cg ); + } + n = n.nextSibling().toElement(); + } + value = p; + } + setProperty( widget, prop, value ); +} + +void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout ) +{ + TQDomElement n = e.firstChild().toElement(); + int row = e.attribute( "row" ).toInt(); + int col = e.attribute( "column" ).toInt(); + int rowspan = e.attribute( "rowspan" ).toInt(); + int colspan = e.attribute( "colspan" ).toInt(); + + Qt::Orientation orient = Qt::Horizontal; + int w = 0, h = 0; + TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred; + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString prop = n.attribute( "name" ); + if ( prop == "orientation" ) { + if ( n.firstChild().firstChild().toText().data() == "Horizontal" ) + orient = Qt::Horizontal; + else + orient = Qt::Vertical; + } else if ( prop == "sizeType" ) { + sizeType = stringToSizeType( n.firstChild().firstChild().toText().data() ); + } else if ( prop == "sizeHint" ) { + w = n.firstChild().firstChild().firstChild().toText().data().toInt(); + h = n.firstChild().firstChild().nextSibling().firstChild().toText().data().toInt(); + } + } + n = n.nextSibling().toElement(); + } + + if ( rowspan < 1 ) + rowspan = 1; + if ( colspan < 1 ) + colspan = 1; + TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum, + orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum ); + if ( layout ) { + if ( layout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) + ( (TQBoxLayout*)layout )->addItem( item ); + else + ( (TQGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1, + orient == Qt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter ); + } +} + +static TQImage loadImageData( TQDomElement &n2 ) +{ + TQString format = n2.attribute( "format", "PNG" ); + TQString hex = n2.firstChild().toText().data(); + int n = hex.length() / 2; + TQByteArray data( n ); + for ( int i = 0; i < n; i++ ) + data[i] = (char) hex.mid( 2 * i, 2 ).toUInt( 0, 16 ); + return loadImageData( format, n2.attribute("length").toULong(), data ); +} + +void TQWidgetFactory::loadImageCollection( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "image" ) { + Image img; + img.name = n.attribute( "name" ); + TQDomElement n2 = n.firstChild().toElement(); + while ( !n2.isNull() ) { + if ( n2.tagName() == "data" ) + img.img = loadImageData( n2 ); + n2 = n2.nextSibling().toElement(); + } + images.append( img ); + n = n.nextSibling().toElement(); + } + } +} + +TQImage TQWidgetFactory::loadFromCollection( const TQString &name ) +{ + TQValueList::Iterator it = images.begin(); + for ( ; it != images.end(); ++it ) { + if ( ( *it ).name == name ) + return ( *it ).img; + } + return TQImage(); +} + +TQPixmap TQWidgetFactory::loadPixmap( const TQString& name ) +{ + TQPixmap pix; + if ( usePixmapCollection ) { + const TQMimeSource *m = TQMimeSourceFactory::defaultFactory()->data( name ); + if ( m ) + TQImageDrag::decode( m, pix ); + } else { + pix.convertFromImage( loadFromCollection(name) ); + } + return pix; +} + +TQPixmap TQWidgetFactory::loadPixmap( const TQDomElement &e ) +{ + return loadPixmap( e.firstChild().toText().data() ); +} + +TQColorGroup TQWidgetFactory::loadColorGroup( const TQDomElement &e ) +{ + TQColorGroup cg; + int r = -1; + TQDomElement n = e.firstChild().toElement(); + TQColor col; + while ( !n.isNull() ) { + if ( n.tagName() == "color" ) { + r++; + cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) ); + } else if ( n.tagName() == "pixmap" ) { + TQPixmap pix = loadPixmap( n ); + cg.setBrush( (TQColorGroup::ColorRole)r, TQBrush( col, pix ) ); + } + n = n.nextSibling().toElement(); + } + return cg; +} + +struct Connection +{ + TQObject *sender, *receiver; + TQCString signal, slot; + bool operator==( const Connection &c ) const { + return sender == c.sender && receiver == c.receiver && + signal == c.signal && slot == c.slot ; + } + + Connection() : sender( 0 ), receiver( 0 ) { } +}; + +class NormalizeObject : public TQObject +{ +public: + NormalizeObject() : TQObject() {} + static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); } +}; + +void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connector ) +{ + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "connection" ) { + TQString lang = n.attribute( "language", "C++" ); + TQDomElement n2 = n.firstChild().toElement(); + Connection conn; + while ( !n2.isNull() ) { + if ( n2.tagName() == "sender" ) { + TQString name = n2.firstChild().toText().data(); + if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { + conn.sender = TQT_TQOBJECT(toplevel); + } else { + if ( name == "this" ) + name = toplevel->name(); + TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE ); + if ( l ) { + if ( l->first() ) + conn.sender = l->first(); + delete l; + } + } + if ( !conn.sender ) + conn.sender = findAction( name ); + } else if ( n2.tagName() == "signal" ) { + conn.signal = n2.firstChild().toText().data().ascii(); + } else if ( n2.tagName() == "receiver" ) { + TQString name = n2.firstChild().toText().data(); + if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { + conn.receiver = TQT_TQOBJECT(toplevel); + } else { + TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE ); + if ( l ) { + if ( l->first() ) + conn.receiver = l->first(); + delete l; + } + } + } else if ( n2.tagName() == "slot" ) { + conn.slot = n2.firstChild().toText().data().ascii(); + } + n2 = n2.nextSibling().toElement(); + } + + conn.signal = NormalizeObject::normalizeSignalSlot( conn.signal ); + conn.slot = NormalizeObject::normalizeSignalSlot( conn.slot ); + + if ( !conn.sender || !conn.receiver ) { + n = n.nextSibling().toElement(); + continue; + } + + TQObject *sender = 0, *receiver = 0; + TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE ); + if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) { + sender = TQT_TQOBJECT(toplevel); + } else { + if ( !l || !l->first() ) { + delete l; + n = n.nextSibling().toElement(); + continue; + } + sender = l->first(); + delete l; + } + if ( !sender ) + sender = findAction( conn.sender->name() ); + + if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) { + receiver = TQT_TQOBJECT(toplevel); + } else { + l = toplevel->queryList( 0, conn.receiver->name(), FALSE ); + if ( !l || !l->first() ) { + delete l; + n = n.nextSibling().toElement(); + continue; + } + receiver = l->first(); + delete l; + } + + TQString s = "2""%1"; + s = s.arg( conn.signal.data() ); + TQString s2 = "1""%1"; + s2 = s2.arg( conn.slot.data() ); + + TQStrList signalList = sender->metaObject()->signalNames( TRUE ); + TQStrList slotList = receiver->metaObject()->slotNames( TRUE ); + + // if this is a connection to a custom slot and we have a connector, try this as receiver + if ( slotList.find( conn.slot ) == -1 && (TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel)) && connector ) { + slotList = connector->metaObject()->slotNames( TRUE ); + receiver = connector; + } + + // avoid warnings + if ( signalList.find( conn.signal ) == -1 || + slotList.find( conn.slot ) == -1 ) { + n = n.nextSibling().toElement(); + continue; + } + TQObject::connect( sender, s.ascii(), receiver, s2.ascii() ); + } + n = n.nextSibling().toElement(); + } +} + +void TQWidgetFactory::loadTabOrder( const TQDomElement &e ) +{ + TQWidget *last = 0; + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "tabstop" ) { + TQString name = n.firstChild().toText().data(); + TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE ); + if ( l ) { + if ( l->first() ) { + TQWidget *w = (TQWidget*)l->first(); + if ( last ) + toplevel->setTabOrder( last, w ); + last = w; + } + delete l; + } + } + n = n.nextSibling().toElement(); + } +} + +void TQWidgetFactory::createListViewColumn( TQListView *lv, const TQString& txt, + const TQPixmap& pix, bool clickable, + bool resizable ) +{ + if ( pix.isNull() ) { + lv->addColumn( txt ); + } else { + lv->addColumn( pix, txt ); + } + + int i = lv->header()->count() - 1; + if ( !pix.isNull() ) + lv->header()->setLabel( i, pix, txt ); + if ( !clickable ) + lv->header()->setClickEnabled( clickable, i ); + if ( !resizable ) + lv->header()->setResizeEnabled( resizable, i ); +} + +#ifndef TQT_NO_TABLE +void TQWidgetFactory::createTableColumnOrRow( TQTable *table, const TQString& txt, + const TQPixmap& pix, + const TQString& field, bool isRow ) +{ +#ifndef TQT_NO_SQL + bool isSql = table->inherits( TQDATATABLE_OBJECT_NAME_STRING ); +#endif + if ( isRow ) + table->setNumRows( table->numRows() + 1 ); + else { +#ifndef TQT_NO_SQL + if ( !isSql ) +#endif + table->setNumCols( table->numCols() + 1 ); + } + + TQValueList fieldMap; + if ( fieldMaps.find( table ) != fieldMaps.end() ) { + fieldMap = *fieldMaps.find( table ); + fieldMaps.remove( table ); + } + + int i = isRow ? table->numRows() - 1 : table->numCols() - 1; + TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); + if ( !pix.isNull() ) { +#ifndef TQT_NO_SQL + if ( isSql ) + ((TQDataTable*)table)->addColumn( field, txt, -1, pix ); + else +#endif + h->setLabel( i, pix, txt ); + } else { +#ifndef TQT_NO_SQL + if ( isSql ) + ((TQDataTable*)table)->addColumn( field, txt ); + else +#endif + h->setLabel( i, txt ); + } + if ( !isRow && !field.isEmpty() ) { + fieldMap.append( Field( txt, pix, field ) ); + fieldMaps.insert( table, fieldMap ); + } + +} +#endif + +void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget ) +{ + if ( widget->inherits( TQLISTVIEW_OBJECT_NAME_STRING ) && e.tagName() == "column" ) { + TQListView *lv = (TQListView*)widget; + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + TQString txt; + bool clickable = TRUE, resizable = TRUE; + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + txt = translate( v.toString() ); + else if ( attrib == "pixmap" ) + pix = loadPixmap( n.firstChild().toElement().toElement() ); + else if ( attrib == "clickable" ) + clickable = v.toBool(); + else if ( attrib == "resizable" || attrib == "resizeable" ) + resizable = v.toBool(); + } + n = n.nextSibling().toElement(); + } + createListViewColumn( lv, txt, pix, clickable, resizable ); + } +#ifndef TQT_NO_TABLE + else if ( widget->inherits( TQTABLE_OBJECT_NAME_STRING ) ) { + TQTable *table = (TQTable*)widget; + + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + TQString txt; + TQString field; + + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + txt = translate( v.toString() ); + else if ( attrib == "pixmap" ) { + if ( !n.firstChild().firstChild().toText().data().isEmpty() ) + pix = loadPixmap( n.firstChild().toElement().toElement() ); + } else if ( attrib == "field" ) + field = translate( v.toString() ); + } + n = n.nextSibling().toElement(); + } + createTableColumnOrRow( table, txt, pix, field, e.tagName() == "row" ); + } +#endif +} + +void TQWidgetFactory::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ) +{ + TQDomElement n = e; + hasPixmap = FALSE; + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + txt = translate( v.toString() ); + else if ( attrib == "pixmap" ) { + pix = loadPixmap( n.firstChild().toElement() ); + hasPixmap = !pix.isNull(); + } + } + n = n.nextSibling().toElement(); + } +} + +void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) +{ + if ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) || widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + bool hasPixmap = FALSE; + TQString txt; + loadItem( n, pix, txt, hasPixmap ); + TQListBox *lb = 0; + if ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) ) + lb = (TQListBox*)widget; + else + lb = ( (TQComboBox*)widget)->listBox(); + if ( hasPixmap ) { + new TQListBoxPixmap( lb, pix, txt ); + } else { + new TQListBoxText( lb, txt ); + } +#ifndef TQT_NO_ICONVIEW + } else if ( widget->inherits( TQICONVIEW_OBJECT_NAME_STRING ) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + bool hasPixmap = FALSE; + TQString txt; + loadItem( n, pix, txt, hasPixmap ); + + TQIconView *iv = (TQIconView*)widget; + new TQIconViewItem( iv, txt, pix ); +#endif + } else if ( widget->inherits( TQLISTVIEW_OBJECT_NAME_STRING ) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + TQValueList pixmaps; + TQStringList textes; + TQListViewItem *item = 0; + TQListView *lv = (TQListView*)widget; + if ( i ) + item = new TQListViewItem( i, d->lastItem ); + else + item = new TQListViewItem( lv, d->lastItem ); + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + textes << translate( v.toString() ); + else if ( attrib == "pixmap" ) { + TQString s = v.toString(); + if ( s.isEmpty() ) { + pixmaps << TQPixmap(); + } else { + pix = loadPixmap( n.firstChild().toElement() ); + pixmaps << pix; + } + } + } else if ( n.tagName() == "item" ) { + item->setOpen( TRUE ); + createItem( n, widget, item ); + } + + n = n.nextSibling().toElement(); + } + + for ( int i = 0; i < lv->columns(); ++i ) { + item->setText( i, textes[ i ] ); + item->setPixmap( i, pixmaps[ i ] ); + } + d->lastItem = item; + } +} + + + +void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e ) +{ + TQDomElement n = e; + TQAction *a = 0; + bool hasMenuText = FALSE; + if ( n.tagName() == "action" ) { + a = new TQAction( parent ); + TQDomElement n2 = n.firstChild().toElement(); + + while ( !n2.isNull() ) { + if ( n2.tagName() == "property" ) { + TQString prop(n2.attribute("name")); + if (prop == "menuText") + hasMenuText = TRUE; + setProperty( a, prop, n2.firstChild().toElement() ); + } + n2 = n2.nextSibling().toElement(); + } + if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) ) + actionList.append( a ); + } else if ( n.tagName() == "actiongroup" ) { + a = new TQActionGroup( parent ); + TQDomElement n2 = n.firstChild().toElement(); + while ( !n2.isNull() ) { + if ( n2.tagName() == "property" ) { + TQString prop(n2.attribute("name")); + if (prop == "menuText") + hasMenuText = TRUE; + setProperty( a, prop, n2.firstChild().toElement() ); + } else if ( n2.tagName() == "action" || + n2.tagName() == "actiongroup" ) { + loadChildAction( a, n2 ); + + } + n2 = n2.nextSibling().toElement(); + } + if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) ) + actionList.append( a ); + } + + if (a && !hasMenuText && !a->text().isEmpty() && uiFileVersion < "3.3") + a->setMenuText(a->text()); +} + +void TQWidgetFactory::loadActions( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "action" ) { + loadChildAction( TQT_TQOBJECT(toplevel), n ); + } else if ( n.tagName() == "actiongroup" ) { + loadChildAction( TQT_TQOBJECT(toplevel), n ); + } + n = n.nextSibling().toElement(); + } +} + +void TQWidgetFactory::loadToolBars( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + TQMainWindow *mw = ( (TQMainWindow*)toplevel ); + TQToolBar *tb = 0; + while ( !n.isNull() ) { + if ( n.tagName() == "toolbar" ) { + TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt(); + tb = new TQToolBar( TQString(), mw, dock ); + tb->setLabel( n.attribute( "label" ) ); + tb->setName( n.attribute( "name" ).ascii() ); + TQDomElement n2 = n.firstChild().toElement(); + while ( !n2.isNull() ) { + if ( n2.tagName() == "action" ) { + TQAction *a = findAction( n2.attribute( "name" ) ); + if ( a ) + a->addTo( tb ); + } else if ( n2.tagName() == "separator" ) { + tb->addSeparator(); + } else if ( n2.tagName() == "widget" ) { + (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) ); + } else if ( n2.tagName() == "property" ) { + setProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); + } + n2 = n2.nextSibling().toElement(); + } + } + n = n.nextSibling().toElement(); + } +} + +void TQWidgetFactory::loadMenuBar( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + TQMainWindow *mw = ( (TQMainWindow*)toplevel ); + TQMenuBar *mb = mw->menuBar(); + while ( !n.isNull() ) { + if ( n.tagName() == "item" ) { + TQPopupMenu *popup = new TQPopupMenu( mw ); + loadPopupMenu( popup, n ); + popup->setName( n.attribute( "name" ).ascii() ); + mb->insertItem( translate( n.attribute( "text" ) ), popup ); + } else if ( n.tagName() == "property" ) { + setProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); + } else if ( n.tagName() == "separator" ) { + mb->insertSeparator(); + } + n = n.nextSibling().toElement(); + } +} + +void TQWidgetFactory::loadPopupMenu( TQPopupMenu *p, const TQDomElement &e ) +{ + TQMainWindow *mw = ( (TQMainWindow*)toplevel ); + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "action" ) { + TQAction *a = findAction( n.attribute( "name" ) ); + TQDomElement n2 = n.nextSibling().toElement(); + if ( n2.tagName() == "item") { // load submenu + TQPopupMenu *popup = new TQPopupMenu( mw ); + popup->setName( n2.attribute( "name" ).ascii() ); + if ( a ) { + p->setAccel( a->accel(), p->insertItem( a->iconSet(), + translate( n2.attribute( "text" ).utf8().data() ), + popup ) ); + } else { + p->insertItem( translate( n2.attribute( "text" ).utf8().data() ), popup ); + } + loadPopupMenu( popup, n2 ); + n = n2; + } else { + if ( a ) { + a->addTo( p ); + } + } + a = 0; + } else if ( n.tagName() == "separator" ) { + p->insertSeparator(); + } + n = n.nextSibling().toElement(); + } +} + +// compatibility with early 3.0 betas +// ### remove for 4.0 +void TQWidgetFactory::loadFunctions( const TQDomElement & ) +{ +} + +TQAction *TQWidgetFactory::findAction( const TQString &name ) +{ + for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { + if ( TQString( a->name() ) == name ) + return a; + TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING ); + if ( ac ) + return ac; + } + return 0; +} + +/*! + If you use a pixmap collection (which is the default for new + projects) rather than saving the pixmaps within the .ui XML file, + you must load the pixmap collection. TQWidgetFactory looks in the + default TQMimeSourceFactory for the pixmaps. Either add it there + manually, or call this function and specify the directory where + the images can be found, as \a dir. This is normally the + directory called \c images in the project's directory. +*/ + +void TQWidgetFactory::loadImages( const TQString &dir ) +{ + TQDir d( dir ); + TQStringList l = d.entryList( TQDir::Files ); + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) + TQMimeSourceFactory::defaultFactory()->setPixmap( *it, TQPixmap( d.path() + "/" + *it, "PNG" ) ); + +} + +void TQWidgetFactory::loadExtraSource() +{ + if ( !qwf_language || !languageInterfaceManager ) + return; + TQString lang = *qwf_language; + LanguageInterface *iface = 0; + languageInterfaceManager->queryInterface( lang, &iface ); + if ( !iface ) + return; + TQFile f( qwf_currFileName + iface->formCodeExtension() ); + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + code = ts.read(); + } +} + +TQString TQWidgetFactory::translate( const TQString& sourceText, const TQString& comment ) +{ + return tqApp->translate( d->translationContext, sourceText.utf8(), comment.utf8(), + TQApplication::UnicodeUTF8 ); +} + +TQString TQWidgetFactory::translate( const char *sourceText, const char *comment ) +{ + return tqApp->translate( d->translationContext, sourceText, comment, + TQApplication::UnicodeUTF8 ); +} diff --git a/kdevdesigner/uilib/qwidgetfactory.h b/kdevdesigner/uilib/qwidgetfactory.h new file mode 100644 index 00000000..8f2b1427 --- /dev/null +++ b/kdevdesigner/uilib/qwidgetfactory.h @@ -0,0 +1,178 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef TQWIDGETFACTORY_H +#define TQWIDGETFACTORY_H + +#include +#include +#include +#include +#include +#include +#include + +class TQDomDocument; +class TQDomElement; +class TQLayout; +class TQListView; +class TQListViewItem; +class TQMenuBar; +class TQTable; +class TQWidget; +class TQWidgetFactoryPrivate; +class UibStrTable; + +class TQWidgetFactory +{ +public: + TQWidgetFactory(); + virtual ~TQWidgetFactory(); + + static TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 ); + static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 ); + static void addWidgetFactory( TQWidgetFactory *factory ); + static void loadImages( const TQString &dir ); + + virtual TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name ) const; + static TQStringList widgets(); + static bool supportsWidget( const TQString &widget ); + +private: + enum LayoutType { HBox, VBox, Grid, NoLayout }; + void loadImageCollection( const TQDomElement &e ); + void loadConnections( const TQDomElement &e, TQObject *connector ); + void loadTabOrder( const TQDomElement &e ); + TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg ); + TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type, bool isTQLayoutWidget = FALSE ); + LayoutType layoutType( TQLayout *l ) const; + void setProperty( TQObject* widget, const TQString &prop, TQVariant value ); + void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e ); + void createSpacer( const TQDomElement &e, TQLayout *layout ); + TQImage loadFromCollection( const TQString &name ); + TQPixmap loadPixmap( const TQString &name ); + TQPixmap loadPixmap( const TQDomElement &e ); + TQColorGroup loadColorGroup( const TQDomElement &e ); + void createListViewColumn( TQListView *lv, const TQString& txt, + const TQPixmap& pix, bool clickable, + bool resizable ); +#ifndef TQT_NO_TABLE + void createTableColumnOrRow( TQTable *table, const TQString& txt, + const TQPixmap& pix, const TQString& field, + bool isRow ); +#endif + void createColumn( const TQDomElement &e, TQWidget *widget ); + void loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ); + void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 ); + void loadChildAction( TQObject *parent, const TQDomElement &e ); + void loadActions( const TQDomElement &e ); + void loadToolBars( const TQDomElement &e ); + void loadMenuBar( const TQDomElement &e ); + void loadPopupMenu( TQPopupMenu *p, const TQDomElement &e ); + void loadFunctions( const TQDomElement &e ); + TQAction *findAction( const TQString &name ); + void loadExtraSource(); + TQString translate( const char *sourceText, const char *comment = "" ); + TQString translate( const TQString& sourceText, const TQString& comment = TQString() ); + + void unpackUInt16( TQDataStream& in, TQ_UINT16& n ); + void unpackUInt32( TQDataStream& in, TQ_UINT32& n ); + void unpackByteArray( TQDataStream& in, TQByteArray& array ); + void unpackCString( const UibStrTable& strings, TQDataStream& in, + TQCString& cstr ); + void unpackString( const UibStrTable& strings, TQDataStream& in, + TQString& str ); + void unpackStringSplit( const UibStrTable& strings, TQDataStream& in, + TQString& str ); + void unpackVariant( const UibStrTable& strings, TQDataStream& in, + TQVariant& value ); + void inputSpacer( const UibStrTable& strings, TQDataStream& in, + TQLayout *parent ); + void inputColumnOrRow( const UibStrTable& strings, TQDataStream& in, + TQObject *parent, bool isRow ); + void inputItem( const UibStrTable& strings, TQDataStream& in, + TQObject *parent, TQListViewItem *parentItem = 0 ); + void inputMenuItem( TQObject **objects, const UibStrTable& strings, + TQDataStream& in, TQMenuBar *menuBar ); + TQObject *inputObject( TQObject **objects, int& numObjects, + const UibStrTable& strings, TQDataStream& in, + TQWidget *ancestorWidget, TQObject *parent, + TQCString className = "" ); + TQWidget *createFromUiFile( TQDomDocument doc, TQObject *connector, + TQWidget *parent, const char *name ); + TQWidget *createFromUibFile( TQDataStream& in, TQObject *connector, + TQWidget *parent, const char *name ); + +private: + struct Image { + TQImage img; + TQString name; + bool operator==( const Image &i ) const { + return ( i.name == name && + i.img == img ); + } + }; + + struct Field + { + Field() {} + Field( const TQString &s1, const TQPixmap &p, const TQString &s2 ) : name( s1 ), pix( p ), field( s2 ) {} + TQString name; + TQPixmap pix; + TQString field; + TQ_DUMMY_COMPARISON_OPERATOR( Field ) + }; + + struct SqlWidgetConnection + { + SqlWidgetConnection() {} + SqlWidgetConnection( const TQString &c, const TQString &t ) + : conn( c ), table( t ), dbControls( new TQMap() ) {} + TQString conn; + TQString table; + TQMap *dbControls; + TQ_DUMMY_COMPARISON_OPERATOR( SqlWidgetConnection ) + }; + + TQValueList images; + TQWidget *toplevel; + TQWidgetFactoryPrivate *d; + TQMap *dbControls; + TQMap dbTables; + TQMap sqlWidgetConnections; + TQMap buddies; + TQMap > fieldMaps; + TQPtrList actionList; + TQMap languageSlots; + TQStringList noDatabaseWidgets; + bool usePixmapCollection; + int defMargin; + int defSpacing; + TQString code; + TQString uiFileVersion; +}; + +#endif diff --git a/kdevprj2tdevelop b/kdevprj2tdevelop new file mode 100755 index 00000000..09d3ebaa --- /dev/null +++ b/kdevprj2tdevelop @@ -0,0 +1,299 @@ +#!/usr/bin/perl + +if ($#ARGV != 0) { + die "Need one argument"; +} + +$filename = $ARGV[0]; +unless ($filename =~ /\.kdevprj/) { + die "Not a .kdevprj file"; +} + + +$ingeneral = 0; +$inlfvgroups = 0; + +open(FILE, "<$filename") || die "File not found"; +while () { + if (/\[General\]/) { + $ingeneral = 1; + $inlfvgroups = 0; + $inbin = 0; + } elsif (/\[LFV Groups\]/) { + $ingeneral = 0; + $inlfvgroups = 1; + $inbin = 0; + } elsif (/\[Config for BinMakefileAm\]/) { + $ingeneral = 0; + $inlfvgroups = 0; + $inbin = 1; + } elsif (/\[(.*)\]/) { + push(@sourcefiles, $1); + $ingeneral = 0; + $inlfvgroups = 0; + $inbin = 0; + } + + if ($ingeneral) { + if (/^author=(.*)/) { + $author = $1; + } elsif (/^configure_args=(.*)/) { + $configure_args = $1; + } elsif (/^email=(.*)/) { + $email = $1; + } elsif (/^make_options=(.*)/) { + $make_options = $1; + if ($makeoptions =~ /-n/) { + $dontact = "true"; + } + if ($makeoptions =~ /-j([0-9]+)/) { + $numberofjobs = $1; + } + if ($makeoptions =~ /-f/) { + $abortonerror = "true"; + } + } elsif (/^project_name=(.*)/) { + $project_name = $1; + } elsif (/^project_type=(.*)/) { + $project_type = $1; + } elsif (/^sub_dir=([^\/]*)/) { + $subdir = $1; + } + } + + if ($inlfvgroups) { + if (/^groups=(.*)/) { + $lfvgroups = $1; + } elsif (/(.*)=(.*)/) { + $group = $1; + $pattern = $2; + $pattern =~ s/^(.*),$/$1/; + $lfvgrouppattern{$group} = $pattern; + } + } + + if ($inbin) { + if (/^bin_program=(.*)/) { + $bin_program = $1; + } elsif (/^path_to_bin_program=(.*)/) { + $path_to_bin_program = $1; + $path_to_bin_program =~ s#^\./(.*)$#$1#; + $path_to_bin_program =~ s#^(.*)/#$1#; + $path_to_bin_program = $path_to_bin_program . "/"; + } elsif (/^cflags=(.*)/) { + $cflags = $1; + } elsif (/^cxxflags=(.*)/) { + $cxxflags = $1; + } + } + +} +close FILE; + +# Choose language support +$primarylanguage = "C++"; +if ($project_type eq "normal_c" + || $project_type eq "normal_gnome") { + $primarylanguage = "C"; +} + +# Choose project management +$projectmanagement = "KDevCustomProject"; +if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ + || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/) { + $projectmanagement = "KDevTDEAutoProject"; +} +if ($project_type =~ /normal_cpp/) { + $projectmanagement = "KDevAutoProject"; +} + +# Keywords +if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ + || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/) { + $keywords = $keywords . ",KDE"; +} +if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ + || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/ + || $project_type =~ /normal_qt|normal_qt2|mdi_qt2|mdi_qextmdi/) { + $keywords = $keywords . ",Qt"; +} + + +## +## Let's go: write project file +## + +$projectfilename = $filename; +$projectfilename =~ s/^(.*)\.kdevprj$/$1.tdevelop/; +open(FILE, ">$projectfilename"); + +print FILE < + + + $author + $email + $projectmanagement + $primarylanguage + +EOF + +foreach $key (split(/,/, $keywords)) { + next if ($key eq ""); + print FILE <$key +EOF +} + +print FILE < + +EOF + +# auto project specific + +if ($projectmanagement eq "KDevAutoProject" || $projectmanagement eq "KDevTDEAutoProject") { + print FILE < + + $path_to_bin_program$bin_program + + + $configure_args + + + $abortonerror + $numberofjobs + $dontact + + + + $cflags + $cxxflags + + +EOF +} + +if ($project_management eq "KDevCustomProject") { + print FILE < + + $path_to_bin_program/$bin_program + + + $abortonerror + $numberofjobs + $dontact + + + +EOF +} + + +# file view +print FILE < + +EOF + +for $group (split /,/, $lfvgroups) { + next if ($group eq ""); + $pattern = $lfvgrouppattern{$group}; + $pattern =~ s/,/;/g; + print FILE < +EOF +} + +print FILE < + + + + gtk + gnustep + python + php + perl + + +EOF + +if ($projectmanagement eq "KDevAutoProject" + || $projectmanagement eq "KDevTDEAutoProject") { + print FILE < + + libtool + + +EOF +} + +print FILE < +EOF +close FILE; + + +## +## Write file list +## + +if ($projectmanagement eq "KDevCustomProject") { + $filelistfilename = $filename; + $filelistfilename =~ s/^(.*).kdevprj$/$1.filelist/; + open(FILE, ">$filelistfilename"); + for $file (@sourcefiles) { + print FILE "$file\n"; + } + close FILE; +} + + +## +## Convert templates +## + +$projectdir = ""; +if ($filename =~ m#(.*/)[^/]*#) { + $projectdir = $1; +} + +$oldtemplatedir = "${projectdir}$subdir/templates"; + +if (open(FILE, "$oldtemplatedir/cpp_template")) { + mkdir "${projectdir}templates"; + if (open(OFILE, ">${projectdir}templates/cpp")) { + while() { + s/\|EMAIL\|/\$EMAIL\$/; + s/\|AUTHOR\|/\$AUTHOR\$/; + s/\|VERSION\|/\$VERSION\$/; + s/\|DATE\|/\$DATE\$/; + s/\|YEAR\|/\$YEAR\$/; + s/\|FILENAME\|/\$FILENAME\$/; + print OFILE $_; + } + close OFILE; + } + close FILE; +} + +if (open(FILE, "$oldtemplatedir/header_template")) { + mkdir "${projectdir}templates"; + if (open(OFILE, ">${projectdir}templates/h")) { + while() { + s/\|EMAIL\|/\$EMAIL\$/; + s/\|AUTHOR\|/\$AUTHOR\$/; + s/\|VERSION\|/\$VERSION\$/; + s/\|DATE\|/\$DATE\$/; + s/\|YEAR\|/\$YEAR\$/; + s/\|FILENAME\|/\$FILENAME\$/; + print OFILE $_; + } + close OFILE; + } + close FILE; +} diff --git a/languages/ada/CMakeLists.txt b/languages/ada/CMakeLists.txt index 5b5d412b..e8d351b9 100644 --- a/languages/ada/CMakeLists.txt +++ b/languages/ada/CMakeLists.txt @@ -33,13 +33,13 @@ link_directories( ##### other data ################################ -install( FILES tdevadasupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevadasupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevadasupport ) +install( FILES kdevadasupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevadasupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevadasupport ) -##### libtdevadasupport (module) ################ +##### libkdevadasupport (module) ################ -tde_add_kpart( libtdevadasupport AUTOMOC +tde_add_kpart( libkdevadasupport AUTOMOC SOURCES adasupportpart.cpp problemreporter.cpp backgroundparser.cpp addclassdlg.ui addclass.cpp configproblemreporter.ui diff --git a/languages/ada/Makefile.am b/languages/ada/Makefile.am index 61536e92..d45a2add 100644 --- a/languages/ada/Makefile.am +++ b/languages/ada/Makefile.am @@ -7,11 +7,11 @@ INCLUDES = -I$(top_srcdir)/lib/antlr -I$(top_srcdir)/lib/interfaces \ SUBDIRS = app_templates file_templates doc -kde_module_LTLIBRARIES = libtdevadasupport.la -libtdevadasupport_la_LDFLAGS = $(LEXLIB) $(all_libraries) $(KDE_PLUGIN) -libtdevadasupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la +kde_module_LTLIBRARIES = libkdevadasupport.la +libkdevadasupport_la_LDFLAGS = $(LEXLIB) $(all_libraries) $(KDE_PLUGIN) +libkdevadasupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la -libtdevadasupport_la_SOURCES = adasupportpart.cpp problemreporter.cpp backgroundparser.cpp addclassdlg.ui addclass.cpp configproblemreporter.ui ada_utils.cpp adasupport.cpp AdaLexer.cpp AdaParser.cpp AdaTreeParserSuper.cpp AdaStoreWalker.cpp +libkdevadasupport_la_SOURCES = adasupportpart.cpp problemreporter.cpp backgroundparser.cpp addclassdlg.ui addclass.cpp configproblemreporter.ui ada_utils.cpp adasupport.cpp AdaLexer.cpp AdaParser.cpp AdaTreeParserSuper.cpp AdaStoreWalker.cpp METASOURCES = AUTO @@ -33,9 +33,9 @@ genparser: antlr ada.g && antlr ada.tree.g && antlr -glib ada.tree.g ada.store.g servicedir = $(kde_servicesdir) -service_DATA = tdevadasupport.desktop +service_DATA = kdevadasupport.desktop -rcdir = $(kde_datadir)/tdevadasupport -rc_DATA = tdevadasupport.rc +rcdir = $(kde_datadir)/kdevadasupport +rc_DATA = kdevadasupport.rc KDE_OPTIONS = nofinal diff --git a/languages/ada/adasupportpart.cpp b/languages/ada/adasupportpart.cpp index 53c4af48..aac02610 100644 --- a/languages/ada/adasupportpart.cpp +++ b/languages/ada/adasupportpart.cpp @@ -18,11 +18,11 @@ #include #include -#include "tdevgenericfactory.h" -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" +#include "kdevgenericfactory.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" #include "codemodel.h" #include "adasupportpart.h" #include "problemreporter.h" @@ -33,15 +33,15 @@ #include "AdaStoreWalker.hpp" #include "AdaAST.hpp" -#include +#include enum { KDEV_DB_VERSION = 6 }; enum { KDEV_PCS_VERSION = 6 }; -typedef TDevGenericFactory AdaSupportPartFactory; +typedef KDevGenericFactory AdaSupportPartFactory; -static const TDevPluginInfo data("tdevadasupport"); -K_EXPORT_COMPONENT_FACTORY (libtdevadasupport, AdaSupportPartFactory (data)) +static const KDevPluginInfo data("kdevadasupport"); +K_EXPORT_COMPONENT_FACTORY (libkdevadasupport, AdaSupportPartFactory (data)) struct AdaSupportPartData { @@ -51,7 +51,7 @@ struct AdaSupportPartData { }; AdaSupportPart::AdaSupportPart (TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport (&data, parent, name ? name : "AdaSupportPart"), d (new AdaSupportPartData()) + : KDevLanguageSupport (&data, parent, name ? name : "AdaSupportPart"), d (new AdaSupportPartData()) { setInstance (AdaSupportPartFactory::instance ()); @@ -93,9 +93,9 @@ AdaSupportPart::~AdaSupportPart () } -TDevLanguageSupport::Features AdaSupportPart::features () +KDevLanguageSupport::Features AdaSupportPart::features () { - return TDevLanguageSupport::Features + return KDevLanguageSupport::Features ( // TBD: Classes | Functions | Namespaces); } diff --git a/languages/ada/adasupportpart.h b/languages/ada/adasupportpart.h index 32160b38..eb9e2630 100644 --- a/languages/ada/adasupportpart.h +++ b/languages/ada/adasupportpart.h @@ -2,7 +2,7 @@ #ifndef __ADASUPPORTPART_H__ #define __ADASUPPORTPART_H__ -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include @@ -10,7 +10,7 @@ class AdaSupportPartData; class KDialogBase; class TQStringList; -class AdaSupportPart : public TDevLanguageSupport +class AdaSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/ada/app_templates/adahello/CMakeLists.txt b/languages/ada/app_templates/adahello/CMakeLists.txt index ba3a3eb5..cbd00e6e 100644 --- a/languages/ada/app_templates/adahello/CMakeLists.txt +++ b/languages/ada/app_templates/adahello/CMakeLists.txt @@ -15,8 +15,8 @@ add_custom_target( adahello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/adahello.tar.gz adahello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - adahello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + adahello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ada/app_templates/adahello/Makefile.am b/languages/ada/app_templates/adahello/Makefile.am index 5cc49953..5a970c91 100644 --- a/languages/ada/app_templates/adahello/Makefile.am +++ b/languages/ada/app_templates/adahello/Makefile.am @@ -1,10 +1,10 @@ dataFiles = main.adb app.tdevelop ada-Makefile app.tdevelop.filelist ### no need to change below: -template_DATA = adahello.tdevtemplate +template_DATA = adahello.kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard adahello.tar.gz: $(TAR) -cf adahello.tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 adahello.tar diff --git a/languages/ada/app_templates/adahello/adahello.kdevtemplate b/languages/ada/app_templates/adahello/adahello.kdevtemplate new file mode 100644 index 00000000..0cc09da2 --- /dev/null +++ b/languages/ada/app_templates/adahello/adahello.kdevtemplate @@ -0,0 +1,132 @@ +# KDE Config File +[General] +Name=Simple Hello world program +Name[ca]=Simple programa Hello world +Name[da]=Simpelt Goddag verden program +Name[de]=Ein einfaches "Hello World"-Programm +Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» sencillo +Name[et]=Lihtne "Tere, maailm" programm +Name[eu]="Kaixo mundua" programa sinplea +Name[fa]=برنامۀ سادۀ Hello world +Name[fr]=Programme « Bonjour monde » simple +Name[ga]=Ríomhchlár simplí "Hello World" +Name[gl]=Programa sinxelo Ola mundo +Name[hu]=Egyszerű Hello world program +Name[it]=Semplice programma di "Hello world" +Name[ja]=簡単な Hello world プログラム +Name[ms]=Program Hello World mudah +Name[nds]=En eenfach "Moin Welt"-Programm +Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम +Name[nl]=Eenvoudig 'Hello World' programma +Name[pl]=Prosty program witaj świecie +Name[pt]=Programa simples Olá Mundo +Name[pt_BR]=Programa simples Olá Mundo +Name[ru]=Простая программа Hello world +Name[sk]=Jednoduchý "Ahoj svet" program +Name[sl]=Preprost program Hello world +Name[sr]=Једноставан „Здраво свете“ програм +Name[sr@Latn]=Jednostavan „Zdravo svete“ program +Name[sv]=Enkelt Hello world-program +Name[tr]=Basit Merhaba dünya programı +Name[zh_CN]=简单的 Hello world 程序 +Name[zh_TW]=簡單的 Hello world 程式 +Icon=adahello.png +Category=Ada +Comment=Generates a simple Hello world program in Ada +Comment[ca]=Genera un simple programa de Hello world en Ada +Comment[da]=Genererer et simpelt Goddag verden program i Ada +Comment[de]=Erstellt ein einfaches "Hello World"-Program in Ada +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε Ada +Comment[es]=Genera un programa «Hola mundo» sencillo en Ada +Comment[et]=Lihtsa "Tere, maailm" programmi loomine ADA-s +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Adan +Comment[fa]=یک برنامۀ سادۀ Hello world در آدا تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Ada +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí "Hello World" in Ada +Comment[gl]=Xera un programa sinxelo Hello world en Ada +Comment[hu]=Létrehoz egy egyszerű Hello world programot ADA nyelven +Comment[it]=Genera un semplice programma di "Hello world" in Ada +Comment[ja]=Ada で簡単な Hello world プログラムを作成します +Comment[ms]=Menjana program Hello World mudah dalam Ada +Comment[nds]=Stellt in Ada en eenfach "Moin Welt"-Programm op +Comment[ne]=एडामा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig Hello World programma in Ada +Comment[pl]=Generuje prosty program Witaj świecie w Adzie +Comment[pt]=Gera um programa simples de Olá Mundo em Ada +Comment[pt_BR]=Gera um programa simples de Olá Mundo em Ada +Comment[ru]=Создание простой программы Hello world на Ada +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Ada +Comment[sl]=Ustvari preprost program Hello world v Adi +Comment[sr]=Прави једноставан „Здраво свете“ у Ada-и +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Ada-i +Comment[sv]=Skapar ett enkelt Hello world-program i Ada +Comment[tr]=Ada dilinde basit bir Merhaba Dünya programı üretir. +Comment[zh_CN]=以 Ada 语言生成简单的 Hello world 程序 +Comment[zh_TW]=產生 Ada 的 Hello world 程式 +FileTemplates=adb,AdaStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.adb +Archive=adahello.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/ada-Makefile +Dest=%{dest}/Makefile + +[FILE3] +Type=install +Source=%{src}/app.tdevelop.filelist +Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE4] +Type=install +Source=%{src}/main.adb +Dest=%{dest}/src/%{APPNAMELC}.adb + +[MSG] +Type=message +Comment=A simple "Hello world" program in ADA was created in %{dest} +Comment[ca]=Un simple programa de "Hello world" en ADA ha estat creat en %{dest} +Comment[da]=Et simpelt "Goddag verden" program i ADA blev oprettet i %{dest} +Comment[de]=Ein einfaches "Hello world" Programm in Ada wurde in %{dest} erstellt +Comment[el]=Ένα απλό πρόγραμμα "Γεια σου Κόσμε" σε ADA δημιουργήθηκε στο %{dest} +Comment[es]=Un programa «Hola mundo» sencillo en ADA ha sido creado en %{dest} +Comment[et]=Lihtne "Tere, maailm" programm ADA-s loodi asukohta %{dest} +Comment[eu]="Kaixo mundua" programa sinple bat sortu da ADAn hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ «Hello world» در آدا در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » simple en ADA a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" ADA i %{dest} +Comment[gl]=Creouse un programa sinxelo "Ola mundo" en ADA en %{dest} +Comment[hu]=Létrejött egy egyszerű Hello world program ADA nyelven itt: %{dest} +Comment[it]=È stato creato un semplice programma di "Hello world" in ADA in %{dest} +Comment[ja]=Ada で記述された "Hello world" プログラムを %{dest} に作成しました +Comment[ms]=Program "Hello World" mudah dalam ada telah dicipta dalam %{dest} +Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Ada opstellt +Comment[ne]=एउटा साधारण "हेल्लो वोल्ड" कार्यक्रम एडामा %{dest} सिर्जना गरिएको थियो +Comment[nl]=Een eenvoudig "Hello World" programma in Ada is aangemaakt in %{dest} +Comment[pl]=Prosty program "Witaj świecie" w języku ADA został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples "Olá mundo" em ADA em %{dest} +Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em ADA em %{dest} +Comment[ru]=Простая программа "Hello world" на ADA создана в %{dest} +Comment[sk]=Jednoduchý "Ahoj svet" program v Ada bol vytvorený v %{dest} +Comment[sl]=Preprost program »Hello world« v jeziku ADA je bil ustvarjen v %{dest} +Comment[sr]=Једноставан „Здраво свете“ програм у Ada-и је направљен у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo svete“ program u Ada-i je napravljen u %{dest} +Comment[sv]=Ett enkelt "Hello world"-program in Ada skapades i %{dest} +Comment[tr]=ADA'da basit bir "Merhaba Dünya" programı %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了 Ada 语言的“Hello world”程序 +Comment[zh_TW]=Ada 的 Hello world 程式已產生在 ${dest} diff --git a/languages/ada/app_templates/adahello/adahello.tdevtemplate b/languages/ada/app_templates/adahello/adahello.tdevtemplate deleted file mode 100644 index 810315a6..00000000 --- a/languages/ada/app_templates/adahello/adahello.tdevtemplate +++ /dev/null @@ -1,132 +0,0 @@ -# KDE Config File -[General] -Name=Simple Hello world program -Name[ca]=Simple programa Hello world -Name[da]=Simpelt Goddag verden program -Name[de]=Ein einfaches "Hello World"-Programm -Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» sencillo -Name[et]=Lihtne "Tere, maailm" programm -Name[eu]="Kaixo mundua" programa sinplea -Name[fa]=برنامۀ سادۀ Hello world -Name[fr]=Programme « Bonjour monde » simple -Name[ga]=Ríomhchlár simplí "Hello World" -Name[gl]=Programa sinxelo Ola mundo -Name[hu]=Egyszerű Hello world program -Name[it]=Semplice programma di "Hello world" -Name[ja]=簡単な Hello world プログラム -Name[ms]=Program Hello World mudah -Name[nds]=En eenfach "Moin Welt"-Programm -Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम -Name[nl]=Eenvoudig 'Hello World' programma -Name[pl]=Prosty program witaj świecie -Name[pt]=Programa simples Olá Mundo -Name[pt_BR]=Programa simples Olá Mundo -Name[ru]=Простая программа Hello world -Name[sk]=Jednoduchý "Ahoj svet" program -Name[sl]=Preprost program Hello world -Name[sr]=Једноставан „Здраво свете“ програм -Name[sr@Latn]=Jednostavan „Zdravo svete“ program -Name[sv]=Enkelt Hello world-program -Name[tr]=Basit Merhaba dünya programı -Name[zh_CN]=简单的 Hello world 程序 -Name[zh_TW]=簡單的 Hello world 程式 -Icon=adahello.png -Category=Ada -Comment=Generates a simple Hello world program in Ada -Comment[ca]=Genera un simple programa de Hello world en Ada -Comment[da]=Genererer et simpelt Goddag verden program i Ada -Comment[de]=Erstellt ein einfaches "Hello World"-Program in Ada -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε Ada -Comment[es]=Genera un programa «Hola mundo» sencillo en Ada -Comment[et]=Lihtsa "Tere, maailm" programmi loomine ADA-s -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Adan -Comment[fa]=یک برنامۀ سادۀ Hello world در آدا تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en Ada -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí "Hello World" in Ada -Comment[gl]=Xera un programa sinxelo Hello world en Ada -Comment[hu]=Létrehoz egy egyszerű Hello world programot ADA nyelven -Comment[it]=Genera un semplice programma di "Hello world" in Ada -Comment[ja]=Ada で簡単な Hello world プログラムを作成します -Comment[ms]=Menjana program Hello World mudah dalam Ada -Comment[nds]=Stellt in Ada en eenfach "Moin Welt"-Programm op -Comment[ne]=एडामा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig Hello World programma in Ada -Comment[pl]=Generuje prosty program Witaj świecie w Adzie -Comment[pt]=Gera um programa simples de Olá Mundo em Ada -Comment[pt_BR]=Gera um programa simples de Olá Mundo em Ada -Comment[ru]=Создание простой программы Hello world на Ada -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Ada -Comment[sl]=Ustvari preprost program Hello world v Adi -Comment[sr]=Прави једноставан „Здраво свете“ у Ada-и -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Ada-i -Comment[sv]=Skapar ett enkelt Hello world-program i Ada -Comment[tr]=Ada dilinde basit bir Merhaba Dünya programı üretir. -Comment[zh_CN]=以 Ada 语言生成简单的 Hello world 程序 -Comment[zh_TW]=產生 Ada 的 Hello world 程式 -FileTemplates=adb,AdaStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.adb -Archive=adahello.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/ada-Makefile -Dest=%{dest}/Makefile - -[FILE3] -Type=install -Source=%{src}/app.tdevelop.filelist -Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE4] -Type=install -Source=%{src}/main.adb -Dest=%{dest}/src/%{APPNAMELC}.adb - -[MSG] -Type=message -Comment=A simple "Hello world" program in ADA was created in %{dest} -Comment[ca]=Un simple programa de "Hello world" en ADA ha estat creat en %{dest} -Comment[da]=Et simpelt "Goddag verden" program i ADA blev oprettet i %{dest} -Comment[de]=Ein einfaches "Hello world" Programm in Ada wurde in %{dest} erstellt -Comment[el]=Ένα απλό πρόγραμμα "Γεια σου Κόσμε" σε ADA δημιουργήθηκε στο %{dest} -Comment[es]=Un programa «Hola mundo» sencillo en ADA ha sido creado en %{dest} -Comment[et]=Lihtne "Tere, maailm" programm ADA-s loodi asukohta %{dest} -Comment[eu]="Kaixo mundua" programa sinple bat sortu da ADAn hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ «Hello world» در آدا در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » simple en ADA a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" ADA i %{dest} -Comment[gl]=Creouse un programa sinxelo "Ola mundo" en ADA en %{dest} -Comment[hu]=Létrejött egy egyszerű Hello world program ADA nyelven itt: %{dest} -Comment[it]=È stato creato un semplice programma di "Hello world" in ADA in %{dest} -Comment[ja]=Ada で記述された "Hello world" プログラムを %{dest} に作成しました -Comment[ms]=Program "Hello World" mudah dalam ada telah dicipta dalam %{dest} -Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Ada opstellt -Comment[ne]=एउटा साधारण "हेल्लो वोल्ड" कार्यक्रम एडामा %{dest} सिर्जना गरिएको थियो -Comment[nl]=Een eenvoudig "Hello World" programma in Ada is aangemaakt in %{dest} -Comment[pl]=Prosty program "Witaj świecie" w języku ADA został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples "Olá mundo" em ADA em %{dest} -Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em ADA em %{dest} -Comment[ru]=Простая программа "Hello world" на ADA создана в %{dest} -Comment[sk]=Jednoduchý "Ahoj svet" program v Ada bol vytvorený v %{dest} -Comment[sl]=Preprost program »Hello world« v jeziku ADA je bil ustvarjen v %{dest} -Comment[sr]=Једноставан „Здраво свете“ програм у Ada-и је направљен у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo svete“ program u Ada-i je napravljen u %{dest} -Comment[sv]=Ett enkelt "Hello world"-program in Ada skapades i %{dest} -Comment[tr]=ADA'da basit bir "Merhaba Dünya" programı %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了 Ada 语言的“Hello world”程序 -Comment[zh_TW]=Ada 的 Hello world 程式已產生在 ${dest} diff --git a/languages/ada/app_templates/adahello/app.tdevelop b/languages/ada/app_templates/adahello/app.tdevelop index 83815aa1..a94f7e34 100644 --- a/languages/ada/app_templates/adahello/app.tdevelop +++ b/languages/ada/app_templates/adahello/app.tdevelop @@ -4,14 +4,14 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Ada Ada Code - + build / @@ -25,8 +25,8 @@ make - - + + bash bash_bugs @@ -73,12 +73,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/ada/doc/CMakeLists.txt b/languages/ada/doc/CMakeLists.txt index 32d4281c..62b3ef26 100644 --- a/languages/ada/doc/CMakeLists.txt +++ b/languages/ada/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES ada.toc ada_bugs_gcc.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/ada/doc/Makefile.am b/languages/ada/doc/Makefile.am index da0655f6..ff5f8a32 100644 --- a/languages/ada/doc/Makefile.am +++ b/languages/ada/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = ada.toc ada_bugs_gcc.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/ada/file_templates/CMakeLists.txt b/languages/ada/file_templates/CMakeLists.txt index 7eb47fdc..21d16b69 100644 --- a/languages/ada/file_templates/CMakeLists.txt +++ b/languages/ada/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES adb ads - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/ada/file_templates/Makefile.am b/languages/ada/file_templates/Makefile.am index 4635979e..58bbd907 100644 --- a/languages/ada/file_templates/Makefile.am +++ b/languages/ada/file_templates/Makefile.am @@ -1,3 +1,3 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = adb ads diff --git a/languages/ada/kdevadasupport.desktop b/languages/ada/kdevadasupport.desktop new file mode 100644 index 00000000..f1ae3bf1 --- /dev/null +++ b/languages/ada/kdevadasupport.desktop @@ -0,0 +1,87 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Ada Language Support +Comment[ca]=Suport per al llenguatge Ada +Comment[da]=Ada sprogunderstøttelse +Comment[de]=Sprachunterstützung für Ada +Comment[el]=Υποστήριξη γλώσσας Ada +Comment[es]=Soporte para lenguaje Ada +Comment[et]=ADA keele toetus +Comment[eu]=Ada lenguaiaren euskarria +Comment[fa]=پشتیبانی زبان آدا +Comment[fr]=Prise en charge du langage ADA +Comment[ga]=Tacaíocht Ada +Comment[gl]=Soporte da linguaxe Ada +Comment[hi]=एडीए भाषा समर्थन +Comment[hu]=Ada nyelvi támogatás +Comment[is]=Stuðningur við Ada forritunarmálið +Comment[it]=Supporto al linguaggio Ada +Comment[ja]=Ada 言語サポート +Comment[ms]=Sokongan Bahasa Ada +Comment[nds]=Spraakünnerstütten för Ada +Comment[ne]=एडा भाषा समर्थन +Comment[nl]=Ondersteuning voor Ada +Comment[pl]=Obsługa języka Ada +Comment[pt]=Suporte à Linguagem Ada +Comment[pt_BR]=Suporte à Linguagem Ada +Comment[ru]=Поддержка языка Ada +Comment[sk]=Podpora jazyka Ada +Comment[sl]=Podpora jeziku ada +Comment[sr]=Ada језичка подршка +Comment[sr@Latn]=Ada jezička podrška +Comment[sv]=Stöd för språket Ada +Comment[ta]=அடா மொழி ஆதரவு +Comment[tg]=Ёри намудани забони Ada +Comment[tr]=Ada Dil Desteği +Comment[zh_CN]=Ada 语言支持 +Comment[zh_TW]=Ada 語言支援 +Name=KDevAdaSupport +Name[da]=TDevelop Ada-understøttelse +Name[de]=Unterstützung für Ada (TDevelop) +Name[hi]=के-डेव-एडीए-समर्थन +Name[nds]=Ada-Ünnerstütten för TDevelop +Name[ne]=केडीई विकास एडा समर्थन +Name[pl]=KDevObsługaAdy +Name[sk]=KDevAdaPodpora +Name[sv]=TDevelop Ada-stöd +Name[ta]=கெடெவ் அடா ஆதரவு +Name[zh_TW]=TDevelop Ada 支援 +GenericName=Ada Language Support +GenericName[ca]=Suport per al llenguatge Ada +GenericName[da]=Ada sprogunderstøttelse +GenericName[de]=Sprachunterstützung für Ada +GenericName[el]=Υποστήριξη γλώσσας Ada +GenericName[es]=Soporte para lenguaje Ada +GenericName[et]=ADA keele toetus +GenericName[eu]=Ada lenguaiaren euskarria +GenericName[fa]=پشتیبانی زبان آدا +GenericName[fr]=Prise en charge du langage ADA +GenericName[ga]=Tacaíocht Ada +GenericName[gl]=Soporte da linguaxe Ada +GenericName[hi]=एडीए भाषा समर्थन +GenericName[hu]=Ada-támogatás +GenericName[it]=Supporto al linguaggio Ada +GenericName[ja]=Ada 言語サポート +GenericName[ms]=Sokongan Bahasa Ada +GenericName[nds]=Ünnerstütten för de Spraak Ada +GenericName[ne]=एडा भाषा समर्थन +GenericName[nl]=Ondersteuning voor Ada +GenericName[pl]=Obsługa języka Ada +GenericName[pt]=Suporte à Linguagem Ada +GenericName[pt_BR]=Suporte à Linguagem Ada +GenericName[ru]=Поддержка языка Ada +GenericName[sk]=Podpora jazyka Ada +GenericName[sl]=Podpora jeziku ada +GenericName[sr]=Ada језичка подршка +GenericName[sr@Latn]=Ada jezička podrška +GenericName[sv]=Stöd för språket Ada +GenericName[ta]=அடா மொழி ஆதரவு +GenericName[tg]=Ёри намудани забони Ada +GenericName[tr]=Ada Dil Desteği +GenericName[zh_CN]=Ada 语言支持 +GenericName[zh_TW]=Ada 語言支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevadasupport +X-TDevelop-Version=5 +X-TDevelop-Language=Ada diff --git a/languages/ada/kdevadasupport.rc b/languages/ada/kdevadasupport.rc new file mode 100644 index 00000000..23b705db --- /dev/null +++ b/languages/ada/kdevadasupport.rc @@ -0,0 +1,11 @@ + + + + &Tools + + + + + + + diff --git a/languages/ada/problemreporter.cpp b/languages/ada/problemreporter.cpp index cfd9acc7..6bac0253 100644 --- a/languages/ada/problemreporter.cpp +++ b/languages/ada/problemreporter.cpp @@ -19,8 +19,8 @@ #include "problemreporter.h" #include "adasupportpart.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" #include "configproblemreporter.h" #include "backgroundparser.h" diff --git a/languages/ada/tdevadasupport.desktop b/languages/ada/tdevadasupport.desktop deleted file mode 100644 index 6bee2461..00000000 --- a/languages/ada/tdevadasupport.desktop +++ /dev/null @@ -1,87 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Ada Language Support -Comment[ca]=Suport per al llenguatge Ada -Comment[da]=Ada sprogunderstøttelse -Comment[de]=Sprachunterstützung für Ada -Comment[el]=Υποστήριξη γλώσσας Ada -Comment[es]=Soporte para lenguaje Ada -Comment[et]=ADA keele toetus -Comment[eu]=Ada lenguaiaren euskarria -Comment[fa]=پشتیبانی زبان آدا -Comment[fr]=Prise en charge du langage ADA -Comment[ga]=Tacaíocht Ada -Comment[gl]=Soporte da linguaxe Ada -Comment[hi]=एडीए भाषा समर्थन -Comment[hu]=Ada nyelvi támogatás -Comment[is]=Stuðningur við Ada forritunarmálið -Comment[it]=Supporto al linguaggio Ada -Comment[ja]=Ada 言語サポート -Comment[ms]=Sokongan Bahasa Ada -Comment[nds]=Spraakünnerstütten för Ada -Comment[ne]=एडा भाषा समर्थन -Comment[nl]=Ondersteuning voor Ada -Comment[pl]=Obsługa języka Ada -Comment[pt]=Suporte à Linguagem Ada -Comment[pt_BR]=Suporte à Linguagem Ada -Comment[ru]=Поддержка языка Ada -Comment[sk]=Podpora jazyka Ada -Comment[sl]=Podpora jeziku ada -Comment[sr]=Ada језичка подршка -Comment[sr@Latn]=Ada jezička podrška -Comment[sv]=Stöd för språket Ada -Comment[ta]=அடா மொழி ஆதரவு -Comment[tg]=Ёри намудани забони Ada -Comment[tr]=Ada Dil Desteği -Comment[zh_CN]=Ada 语言支持 -Comment[zh_TW]=Ada 語言支援 -Name=KDevAdaSupport -Name[da]=TDevelop Ada-understøttelse -Name[de]=Unterstützung für Ada (TDevelop) -Name[hi]=के-डेव-एडीए-समर्थन -Name[nds]=Ada-Ünnerstütten för TDevelop -Name[ne]=केडीई विकास एडा समर्थन -Name[pl]=KDevObsługaAdy -Name[sk]=KDevAdaPodpora -Name[sv]=TDevelop Ada-stöd -Name[ta]=கெடெவ் அடா ஆதரவு -Name[zh_TW]=TDevelop Ada 支援 -GenericName=Ada Language Support -GenericName[ca]=Suport per al llenguatge Ada -GenericName[da]=Ada sprogunderstøttelse -GenericName[de]=Sprachunterstützung für Ada -GenericName[el]=Υποστήριξη γλώσσας Ada -GenericName[es]=Soporte para lenguaje Ada -GenericName[et]=ADA keele toetus -GenericName[eu]=Ada lenguaiaren euskarria -GenericName[fa]=پشتیبانی زبان آدا -GenericName[fr]=Prise en charge du langage ADA -GenericName[ga]=Tacaíocht Ada -GenericName[gl]=Soporte da linguaxe Ada -GenericName[hi]=एडीए भाषा समर्थन -GenericName[hu]=Ada-támogatás -GenericName[it]=Supporto al linguaggio Ada -GenericName[ja]=Ada 言語サポート -GenericName[ms]=Sokongan Bahasa Ada -GenericName[nds]=Ünnerstütten för de Spraak Ada -GenericName[ne]=एडा भाषा समर्थन -GenericName[nl]=Ondersteuning voor Ada -GenericName[pl]=Obsługa języka Ada -GenericName[pt]=Suporte à Linguagem Ada -GenericName[pt_BR]=Suporte à Linguagem Ada -GenericName[ru]=Поддержка языка Ada -GenericName[sk]=Podpora jazyka Ada -GenericName[sl]=Podpora jeziku ada -GenericName[sr]=Ada језичка подршка -GenericName[sr@Latn]=Ada jezička podrška -GenericName[sv]=Stöd för språket Ada -GenericName[ta]=அடா மொழி ஆதரவு -GenericName[tg]=Ёри намудани забони Ada -GenericName[tr]=Ada Dil Desteği -GenericName[zh_CN]=Ada 语言支持 -GenericName[zh_TW]=Ada 語言支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevadasupport -X-TDevelop-Version=5 -X-TDevelop-Language=Ada diff --git a/languages/ada/tdevadasupport.rc b/languages/ada/tdevadasupport.rc deleted file mode 100644 index 23b705db..00000000 --- a/languages/ada/tdevadasupport.rc +++ /dev/null @@ -1,11 +0,0 @@ - - - - &Tools - - - - - - - diff --git a/languages/bash/CMakeLists.txt b/languages/bash/CMakeLists.txt index eca8c096..9998693d 100644 --- a/languages/bash/CMakeLists.txt +++ b/languages/bash/CMakeLists.txt @@ -29,13 +29,13 @@ link_directories( ##### other data ################################ -install( FILES tdevbashsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevbashsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevbashsupport ) +install( FILES kdevbashsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevbashsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevbashsupport ) -##### libtdevbashsupport (module) ############### +##### libkdevbashsupport (module) ############### -tde_add_kpart( libtdevbashsupport AUTOMOC +tde_add_kpart( libkdevbashsupport AUTOMOC SOURCES bashsupport_part.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/languages/bash/Makefile.am b/languages/bash/Makefile.am index 2f750d63..5916563a 100644 --- a/languages/bash/Makefile.am +++ b/languages/bash/Makefile.am @@ -5,16 +5,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ $(all_includes) SUBDIRS = app_templates doc -kde_module_LTLIBRARIES = libtdevbashsupport.la -libtdevbashsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevbashsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevbashsupport.la +libkdevbashsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevbashsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevbashsupport_la_SOURCES = bashsupport_part.cpp +libkdevbashsupport_la_SOURCES = bashsupport_part.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevbashsupport.desktop +service_DATA = kdevbashsupport.desktop -rcdir = $(kde_datadir)/tdevbashsupport -rc_DATA = tdevbashsupport.rc +rcdir = $(kde_datadir)/kdevbashsupport +rc_DATA = kdevbashsupport.rc diff --git a/languages/bash/app_templates/bashhello/CMakeLists.txt b/languages/bash/app_templates/bashhello/CMakeLists.txt index 0c002f83..69abf15c 100644 --- a/languages/bash/app_templates/bashhello/CMakeLists.txt +++ b/languages/bash/app_templates/bashhello/CMakeLists.txt @@ -15,8 +15,8 @@ add_custom_target( bashhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/bashhello.tar.gz bashhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - bashhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + bashhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/bash/app_templates/bashhello/Makefile.am b/languages/bash/app_templates/bashhello/Makefile.am index ed84d271..b26692b4 100644 --- a/languages/bash/app_templates/bashhello/Makefile.am +++ b/languages/bash/app_templates/bashhello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.sh app.tdevelop templateName = bashhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/bash/app_templates/bashhello/app.tdevelop b/languages/bash/app_templates/bashhello/app.tdevelop index bbc04992..cab08799 100644 --- a/languages/bash/app_templates/bashhello/app.tdevelop +++ b/languages/bash/app_templates/bashhello/app.tdevelop @@ -11,22 +11,22 @@ KDevdistpart - TDevDebugger + KDevDebugger - + src *.sh *~ - - + + - - + + ada ada_bugs_gcc @@ -73,10 +73,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/bash/app_templates/bashhello/bashhello.kdevtemplate b/languages/bash/app_templates/bashhello/bashhello.kdevtemplate new file mode 100644 index 00000000..b9e7bd11 --- /dev/null +++ b/languages/bash/app_templates/bashhello/bashhello.kdevtemplate @@ -0,0 +1,111 @@ +# KDE Config File +[General] +Name=Simple Bash Shell Script +Name[ca]=Simple script de l'intèrpret de comandaments Bash +Name[da]=Simpelt Bash skal-script +Name[de]=Ein einfaches Shell-Skript für Bash +Name[el]=Απλό σενάριο κελύφους Bash +Name[es]=Guión sencillo para el intérprete de órdenes Bash +Name[et]=Lihtne bash'i shelliskript +Name[eu]=Bash shell-aren script sinplea +Name[fa]=دست‌نوشتۀ سادۀ پوستۀ Bash +Name[fr]=Script shell Bash simple +Name[ga]=Script Shimplí Bhlaoisce Bash +Name[gl]=Script sinxelo en Bash Shell +Name[hu]=Egyszerű Bash-szkript +Name[it]=Semplice script shell Bash +Name[ja]=簡単な Bash シェルスクリプト +Name[nds]=En eenfach Konsoolskript för Bash +Name[ne]=साधारण ब्यास शेल स्क्रिप्ट +Name[nl]=Eenvoudig Bash-shellscript +Name[pl]=Prosty skrypt powłoki Bash +Name[pt]=Programa Simples da 'Shell' Bash +Name[pt_BR]=Programa Simples da 'Shell' Bash +Name[ru]=Простой скрипт Bash +Name[sk]=Jednoduchý skript pre Bash Shell +Name[sl]=Preprost skript za lupino Bash +Name[sr]=Једноставна скрипта шкољке Bash +Name[sr@Latn]=Jednostavna skripta školjke Bash +Name[sv]=Enkelt Bash-skalskript +Name[tr]=Basit Bash Kabuk Betiği +Name[zh_CN]=简单的 Bash Shell 脚本 +Name[zh_TW]=簡單的 Bash shell 文稿 +Category=Shell +Category[fr]=Interprteur BASH +Comment=This generates a simplistic 'Hello world' program in Bash shell +Comment[ca]=Genera un simple programa de 'Hello world' en l'intèrpret de comandaments Bash +Comment[da]=Dette genererer et simplistisk 'Goddag verden' program i en Bash skal +Comment[de]=Generiert ein einfaches "Hello world"-Programm für die Bash-Shell +Comment[el]=Αυτό δημιουργεί ένα απλό πρόγραμμα 'Γεια σου κόσμε' στο κέλυφος Bash +Comment[es]=Genera un sencillo programa «Hola mundo» para el intérprete de órdenes Bash +Comment[et]=Lihtsa "Tere, maailm" programmi loomine bash'i shellis +Comment[eu]=Honek "Kaixo mundua" programa sinple bat sortzen du Bash shell-erako +Comment[fa]=یک برنامۀ سادۀ «Hello world» در پوستۀ Bash تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » des plus simples en shell Bash +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i mblaosc Bash +Comment[gl]=Xera un programa sinxelo 'Ola mundo' en Bash shell +Comment[hu]=Létrehoz egy egyszerű Hello world programot a Bash parancsértelmezőhöz +Comment[it]=Questo genera un semplice programma shell di "Hello world" in Bash +Comment[ja]=簡単な Hello world プログラムを Bash シェルで記述します +Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm för de Bash-Konsool op +Comment[ne]=यसले ब्यास शेलमा साधारण 'हेल्डो वोल्डकार' कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Dit genereert een eenvoudig "Hello World" programma in Bash-shell +Comment[pl]=Generuje prosty program 'Witaj świecie' jako skrypt powłoki Bash +Comment[pt]=Isto gera um programa simplista 'Olá mundo' para a linha de comandos Bash +Comment[pt_BR]=Isto gera um programa simplista 'Olá mundo' para a linha de comandos Bash +Comment[ru]=Создание простой программы 'Hello world' на Bash +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Bash Shell +Comment[sl]=Ustvari preprost program 'Dobrodošel svet' v lupini Bash +Comment[sr]=Ово прави једноставан „Здраво свете“ програм за шкољку Bash +Comment[sr@Latn]=Ovo pravi jednostavan „Zdravo svete“ program za školjku Bash +Comment[sv]=Detta skapar ett förenklat 'Hello world'-program för Bash-skalet +Comment[tr]=Bu, Bash kabuğunda basit bir "Merhaba Dünya" programı üretir. +Comment[zh_CN]=这将生成 Bash shell 中可以使用的“Hello world”程序 +Comment[zh_TW]=這會產生一個簡單的 Bash shell 的 hello world 程式 +FileTemplates=sh,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.sh +Archive=bashhello.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app.sh +Dest=%{dest}/%{APPNAMELC}.sh + +[MSG] +Type=message +Comment=A simple bash shell script project was created in %{dest} +Comment[ca]=Un simple script de l'intèrpret de comandaments Bash ha estat creat en %{dest} +Comment[da]=Et simpelt bash skalscript-projekt blev oprettet i %{dest} +Comment[de]=Ein einfaches Shell-Skript-Projekt für Bash wurde in %{dest} erstellt +Comment[el]=Ένα απλό σενάριο κελύφους bash δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo proyecto de guión de intérprete de órdenes ha sido creado en %{dest} +Comment[et]=Lihtne bash'i shelliskript loodi asukohta %{dest} +Comment[eu]=Bash shell-erako proiektu sinple bat sortu da hemen:%{dest} +Comment[fa]=یک پروژۀ دست‌نوشتۀ پوستۀ bash ساده در %{dest} ایجاد شد +Comment[fr]=Un projet de script shell Bash simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh tionscadal simplí bash i %{dest} +Comment[gl]=Creouse un proxecto de script sinxelo en bash shell en %{dest} +Comment[hu]=Létrejött egy egyszerű Bash-szkript (projekt) itt: %{dest} +Comment[it]=È stato creato un semplice progetto di script shell in Bash in %{dest} +Comment[ja]=簡単な bash シェルスクリプトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach Konsoolskript-Projekt för Bash opstellt +Comment[ne]=एउटा साधारण शेल स्क्रिप्ट परियोजना %{dest} मा सिर्जना गरिएको थियो +Comment[nl]=Een eenvoudig Bash-shellscript is aangemaakt in %{dest} +Comment[pl]=Prosty skrypt powłoki został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples "Olá mundo" em Bash em %{dest} +Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em Bash em %{dest} +Comment[ru]=Простая программа "Hello world" на Bash создана в %{dest} +Comment[sk]=Jednoduchý Bash Shell projekt bol vytvorený v %{dest} +Comment[sl]=Projekt s preprostim skriptom za lupino Bash je bil ustvarjen v %{dest} +Comment[sr]=Пројекат једноставне скрипте за шкољку Bash направљен је у %{dest} +Comment[sr@Latn]=Projekat jednostavne skripte za školjku Bash napravljen je u %{dest} +Comment[sv]=Ett enkelt Bash skalskriptprojekt skapades i %{dest} +Comment[tr]=Basit bir bash betik projesi %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了简单的 Bash Shell 脚本工程 +Comment[zh_TW]=Bash shell 的 Hello world 程式已產生在 ${dest} diff --git a/languages/bash/app_templates/bashhello/bashhello.tdevtemplate b/languages/bash/app_templates/bashhello/bashhello.tdevtemplate deleted file mode 100644 index b9e7bd11..00000000 --- a/languages/bash/app_templates/bashhello/bashhello.tdevtemplate +++ /dev/null @@ -1,111 +0,0 @@ -# KDE Config File -[General] -Name=Simple Bash Shell Script -Name[ca]=Simple script de l'intèrpret de comandaments Bash -Name[da]=Simpelt Bash skal-script -Name[de]=Ein einfaches Shell-Skript für Bash -Name[el]=Απλό σενάριο κελύφους Bash -Name[es]=Guión sencillo para el intérprete de órdenes Bash -Name[et]=Lihtne bash'i shelliskript -Name[eu]=Bash shell-aren script sinplea -Name[fa]=دست‌نوشتۀ سادۀ پوستۀ Bash -Name[fr]=Script shell Bash simple -Name[ga]=Script Shimplí Bhlaoisce Bash -Name[gl]=Script sinxelo en Bash Shell -Name[hu]=Egyszerű Bash-szkript -Name[it]=Semplice script shell Bash -Name[ja]=簡単な Bash シェルスクリプト -Name[nds]=En eenfach Konsoolskript för Bash -Name[ne]=साधारण ब्यास शेल स्क्रिप्ट -Name[nl]=Eenvoudig Bash-shellscript -Name[pl]=Prosty skrypt powłoki Bash -Name[pt]=Programa Simples da 'Shell' Bash -Name[pt_BR]=Programa Simples da 'Shell' Bash -Name[ru]=Простой скрипт Bash -Name[sk]=Jednoduchý skript pre Bash Shell -Name[sl]=Preprost skript za lupino Bash -Name[sr]=Једноставна скрипта шкољке Bash -Name[sr@Latn]=Jednostavna skripta školjke Bash -Name[sv]=Enkelt Bash-skalskript -Name[tr]=Basit Bash Kabuk Betiği -Name[zh_CN]=简单的 Bash Shell 脚本 -Name[zh_TW]=簡單的 Bash shell 文稿 -Category=Shell -Category[fr]=Interprteur BASH -Comment=This generates a simplistic 'Hello world' program in Bash shell -Comment[ca]=Genera un simple programa de 'Hello world' en l'intèrpret de comandaments Bash -Comment[da]=Dette genererer et simplistisk 'Goddag verden' program i en Bash skal -Comment[de]=Generiert ein einfaches "Hello world"-Programm für die Bash-Shell -Comment[el]=Αυτό δημιουργεί ένα απλό πρόγραμμα 'Γεια σου κόσμε' στο κέλυφος Bash -Comment[es]=Genera un sencillo programa «Hola mundo» para el intérprete de órdenes Bash -Comment[et]=Lihtsa "Tere, maailm" programmi loomine bash'i shellis -Comment[eu]=Honek "Kaixo mundua" programa sinple bat sortzen du Bash shell-erako -Comment[fa]=یک برنامۀ سادۀ «Hello world» در پوستۀ Bash تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » des plus simples en shell Bash -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i mblaosc Bash -Comment[gl]=Xera un programa sinxelo 'Ola mundo' en Bash shell -Comment[hu]=Létrehoz egy egyszerű Hello world programot a Bash parancsértelmezőhöz -Comment[it]=Questo genera un semplice programma shell di "Hello world" in Bash -Comment[ja]=簡単な Hello world プログラムを Bash シェルで記述します -Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm för de Bash-Konsool op -Comment[ne]=यसले ब्यास शेलमा साधारण 'हेल्डो वोल्डकार' कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Dit genereert een eenvoudig "Hello World" programma in Bash-shell -Comment[pl]=Generuje prosty program 'Witaj świecie' jako skrypt powłoki Bash -Comment[pt]=Isto gera um programa simplista 'Olá mundo' para a linha de comandos Bash -Comment[pt_BR]=Isto gera um programa simplista 'Olá mundo' para a linha de comandos Bash -Comment[ru]=Создание простой программы 'Hello world' на Bash -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Bash Shell -Comment[sl]=Ustvari preprost program 'Dobrodošel svet' v lupini Bash -Comment[sr]=Ово прави једноставан „Здраво свете“ програм за шкољку Bash -Comment[sr@Latn]=Ovo pravi jednostavan „Zdravo svete“ program za školjku Bash -Comment[sv]=Detta skapar ett förenklat 'Hello world'-program för Bash-skalet -Comment[tr]=Bu, Bash kabuğunda basit bir "Merhaba Dünya" programı üretir. -Comment[zh_CN]=这将生成 Bash shell 中可以使用的“Hello world”程序 -Comment[zh_TW]=這會產生一個簡單的 Bash shell 的 hello world 程式 -FileTemplates=sh,ShellStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.sh -Archive=bashhello.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.sh -Dest=%{dest}/%{APPNAMELC}.sh - -[MSG] -Type=message -Comment=A simple bash shell script project was created in %{dest} -Comment[ca]=Un simple script de l'intèrpret de comandaments Bash ha estat creat en %{dest} -Comment[da]=Et simpelt bash skalscript-projekt blev oprettet i %{dest} -Comment[de]=Ein einfaches Shell-Skript-Projekt für Bash wurde in %{dest} erstellt -Comment[el]=Ένα απλό σενάριο κελύφους bash δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo proyecto de guión de intérprete de órdenes ha sido creado en %{dest} -Comment[et]=Lihtne bash'i shelliskript loodi asukohta %{dest} -Comment[eu]=Bash shell-erako proiektu sinple bat sortu da hemen:%{dest} -Comment[fa]=یک پروژۀ دست‌نوشتۀ پوستۀ bash ساده در %{dest} ایجاد شد -Comment[fr]=Un projet de script shell Bash simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh tionscadal simplí bash i %{dest} -Comment[gl]=Creouse un proxecto de script sinxelo en bash shell en %{dest} -Comment[hu]=Létrejött egy egyszerű Bash-szkript (projekt) itt: %{dest} -Comment[it]=È stato creato un semplice progetto di script shell in Bash in %{dest} -Comment[ja]=簡単な bash シェルスクリプトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach Konsoolskript-Projekt för Bash opstellt -Comment[ne]=एउटा साधारण शेल स्क्रिप्ट परियोजना %{dest} मा सिर्जना गरिएको थियो -Comment[nl]=Een eenvoudig Bash-shellscript is aangemaakt in %{dest} -Comment[pl]=Prosty skrypt powłoki został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples "Olá mundo" em Bash em %{dest} -Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em Bash em %{dest} -Comment[ru]=Простая программа "Hello world" на Bash создана в %{dest} -Comment[sk]=Jednoduchý Bash Shell projekt bol vytvorený v %{dest} -Comment[sl]=Projekt s preprostim skriptom za lupino Bash je bil ustvarjen v %{dest} -Comment[sr]=Пројекат једноставне скрипте за шкољку Bash направљен је у %{dest} -Comment[sr@Latn]=Projekat jednostavne skripte za školjku Bash napravljen je u %{dest} -Comment[sv]=Ett enkelt Bash skalskriptprojekt skapades i %{dest} -Comment[tr]=Basit bir bash betik projesi %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了简单的 Bash Shell 脚本工程 -Comment[zh_TW]=Bash shell 的 Hello world 程式已產生在 ${dest} diff --git a/languages/bash/bashsupport_part.cpp b/languages/bash/bashsupport_part.cpp index 7cfd9889..9f1be201 100644 --- a/languages/bash/bashsupport_part.cpp +++ b/languages/bash/bashsupport_part.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include @@ -22,25 +22,25 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include -typedef TDevGenericFactory BashSupportFactory; -static const TDevPluginInfo data("tdevbashsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevbashsupport, BashSupportFactory( data ) ) +typedef KDevGenericFactory BashSupportFactory; +static const KDevPluginInfo data("kdevbashsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevbashsupport, BashSupportFactory( data ) ) BashSupportPart::BashSupportPart(TQObject *parent, const char *name, const TQStringList& ) -: TDevLanguageSupport (&data, parent, name ? name : "BashSupportPart" ) +: KDevLanguageSupport (&data, parent, name ? name : "BashSupportPart" ) { setInstance(BashSupportFactory::instance()); - setXMLFile("tdevbashsupport.rc"); + setXMLFile("kdevbashsupport.rc"); TDEAction *action; action = new TDEAction( i18n("&Run"), "exec",Key_F9,this, TQT_SLOT(slotRun()),actionCollection(), "build_execute" ); @@ -182,12 +182,12 @@ void BashSupportPart::savedFile(const KURL &fileName) void BashSupportPart::startApplication(const TQString &program) { kdDebug() << "starting application" << program << endl; - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, TRUE); } -TDevLanguageSupport::Features BashSupportPart::features() +KDevLanguageSupport::Features BashSupportPart::features() { return Features(Variables | Functions); } diff --git a/languages/bash/bashsupport_part.h b/languages/bash/bashsupport_part.h index b1fff80e..284e4f4c 100644 --- a/languages/bash/bashsupport_part.h +++ b/languages/bash/bashsupport_part.h @@ -3,8 +3,8 @@ */ -#ifndef __TDEVPART_BASHSUPPORT_H__ -#define __TDEVPART_BASHSUPPORT_H__ +#ifndef __KDEVPART_BASHSUPPORT_H__ +#define __KDEVPART_BASHSUPPORT_H__ #include @@ -13,8 +13,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -47,7 +47,7 @@ class BashCodeCompletion : TQObject KTextEditor::ViewCursorInterface *m_cursorInterface; }; -class BashSupportPart : public TDevLanguageSupport +class BashSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/bash/doc/CMakeLists.txt b/languages/bash/doc/CMakeLists.txt index 09ad4e33..0d2d2a83 100644 --- a/languages/bash/doc/CMakeLists.txt +++ b/languages/bash/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES bash.toc bash_bugs.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/bash/doc/Makefile.am b/languages/bash/doc/Makefile.am index ab1c4f52..1474d939 100644 --- a/languages/bash/doc/Makefile.am +++ b/languages/bash/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = bash.toc bash_bugs.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/bash/kdevbashsupport.desktop b/languages/bash/kdevbashsupport.desktop new file mode 100644 index 00000000..91a98e3e --- /dev/null +++ b/languages/bash/kdevbashsupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Bash Support +Comment[ca]=Suport per a Bash +Comment[da]=Bash understøttelse +Comment[de]=Unterstützung für Bash +Comment[el]=Υποστήριξη Bash +Comment[es]=Soporte para Bash +Comment[et]=Bash'i toetus +Comment[eu]=Bash-en euskarria +Comment[fa]=پشتیبانی Bash +Comment[fr]=Prise en charge de BASH +Comment[ga]=Tacaíocht Bash +Comment[gl]=Soporte de Bash +Comment[hi]=बैश समर्थन +Comment[hu]=Bash-támogatás +Comment[is]=Bash stuðnigur +Comment[it]=Supporto per Bash +Comment[ja]=Bash サポート +Comment[nds]=Bash-Ünnerstütten +Comment[ne]=ब्यास समर्थन +Comment[nl]=Ondersteuning voor Bash +Comment[pl]=Obsługa bash-a +Comment[pt]=Suporte a Bash +Comment[pt_BR]=Suporte ao Bash +Comment[ru]=Поддержка языка Bash +Comment[sk]=Podpora Bash +Comment[sl]=Podpora bash +Comment[sr]=Bash подршка +Comment[sr@Latn]=Bash podrška +Comment[sv]=Bash-stöd +Comment[ta]=பாஷ் ஆதரவு +Comment[tg]=Ёри намудани забони Bash +Comment[tr]=Bash Desteği +Comment[zh_CN]=Bash 支持 +Comment[zh_TW]=Bash 支援 +Name=KDevBashSupport +Name[da]=TDevelop Bash-understøttelse +Name[de]=Unterstützung für Bash (TDevelop) +Name[hi]=के-डेव-बैश-समर्थन +Name[nds]=Bash-Ünnerstütten för TDevelop +Name[ne]=केडीई विकास ब्यास समर्थन +Name[pl]=KDevObsługaBasha +Name[sk]=KDevBashPodpora +Name[sv]=TDevelop Bash-stöd +Name[ta]=கெடெவ்பாஷ் ஆதரவு +Name[zh_TW]=TDevelop Bash 支援 +GenericName=Bash Support +GenericName[ca]=Suport per a Bash +GenericName[da]=Bash-understøttelse +GenericName[de]=Unterstützung für Bash +GenericName[el]=Υποστήριξη Bash +GenericName[es]=Soporte para Bash +GenericName[et]=Bash'i toetus +GenericName[eu]=Bash-en euskarria +GenericName[fa]=پشتیبانی Bash +GenericName[fr]=Prise en charge de BASH +GenericName[ga]=Tacaíocht Bash +GenericName[gl]=Soporte de Bash +GenericName[hi]=बैश समर्थन +GenericName[hu]=Bash-támogatás +GenericName[it]=Supporto Bash +GenericName[ja]=Bash サポート +GenericName[nds]=Ünnerstütten för Bash +GenericName[ne]=ब्यास समर्थन +GenericName[nl]=Ondersteuning voor Bash +GenericName[pl]=Obsługa bash-a +GenericName[pt]=Suporte de Bash +GenericName[pt_BR]=Suporte ao Bash +GenericName[ru]=Поддержка языка Bash +GenericName[sk]=Podpora Bash +GenericName[sl]=Podpora bash +GenericName[sr]=Bash подршка +GenericName[sr@Latn]=Bash podrška +GenericName[sv]=Bash-stöd +GenericName[ta]=பாஷ் ஆதரவு +GenericName[tg]=Ёри намудани забони Bash +GenericName[tr]=Bash Desteği +GenericName[zh_CN]=Bash 支持 +GenericName[zh_TW]=Bash 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevbashsupport +X-TDevelop-Version=5 +X-TDevelop-Language=Bash diff --git a/languages/bash/kdevbashsupport.rc b/languages/bash/kdevbashsupport.rc new file mode 100644 index 00000000..d4592d6b --- /dev/null +++ b/languages/bash/kdevbashsupport.rc @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/languages/bash/tdevbashsupport.desktop b/languages/bash/tdevbashsupport.desktop deleted file mode 100644 index 854201e7..00000000 --- a/languages/bash/tdevbashsupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Bash Support -Comment[ca]=Suport per a Bash -Comment[da]=Bash understøttelse -Comment[de]=Unterstützung für Bash -Comment[el]=Υποστήριξη Bash -Comment[es]=Soporte para Bash -Comment[et]=Bash'i toetus -Comment[eu]=Bash-en euskarria -Comment[fa]=پشتیبانی Bash -Comment[fr]=Prise en charge de BASH -Comment[ga]=Tacaíocht Bash -Comment[gl]=Soporte de Bash -Comment[hi]=बैश समर्थन -Comment[hu]=Bash-támogatás -Comment[is]=Bash stuðnigur -Comment[it]=Supporto per Bash -Comment[ja]=Bash サポート -Comment[nds]=Bash-Ünnerstütten -Comment[ne]=ब्यास समर्थन -Comment[nl]=Ondersteuning voor Bash -Comment[pl]=Obsługa bash-a -Comment[pt]=Suporte a Bash -Comment[pt_BR]=Suporte ao Bash -Comment[ru]=Поддержка языка Bash -Comment[sk]=Podpora Bash -Comment[sl]=Podpora bash -Comment[sr]=Bash подршка -Comment[sr@Latn]=Bash podrška -Comment[sv]=Bash-stöd -Comment[ta]=பாஷ் ஆதரவு -Comment[tg]=Ёри намудани забони Bash -Comment[tr]=Bash Desteği -Comment[zh_CN]=Bash 支持 -Comment[zh_TW]=Bash 支援 -Name=KDevBashSupport -Name[da]=TDevelop Bash-understøttelse -Name[de]=Unterstützung für Bash (TDevelop) -Name[hi]=के-डेव-बैश-समर्थन -Name[nds]=Bash-Ünnerstütten för TDevelop -Name[ne]=केडीई विकास ब्यास समर्थन -Name[pl]=KDevObsługaBasha -Name[sk]=KDevBashPodpora -Name[sv]=TDevelop Bash-stöd -Name[ta]=கெடெவ்பாஷ் ஆதரவு -Name[zh_TW]=TDevelop Bash 支援 -GenericName=Bash Support -GenericName[ca]=Suport per a Bash -GenericName[da]=Bash-understøttelse -GenericName[de]=Unterstützung für Bash -GenericName[el]=Υποστήριξη Bash -GenericName[es]=Soporte para Bash -GenericName[et]=Bash'i toetus -GenericName[eu]=Bash-en euskarria -GenericName[fa]=پشتیبانی Bash -GenericName[fr]=Prise en charge de BASH -GenericName[ga]=Tacaíocht Bash -GenericName[gl]=Soporte de Bash -GenericName[hi]=बैश समर्थन -GenericName[hu]=Bash-támogatás -GenericName[it]=Supporto Bash -GenericName[ja]=Bash サポート -GenericName[nds]=Ünnerstütten för Bash -GenericName[ne]=ब्यास समर्थन -GenericName[nl]=Ondersteuning voor Bash -GenericName[pl]=Obsługa bash-a -GenericName[pt]=Suporte de Bash -GenericName[pt_BR]=Suporte ao Bash -GenericName[ru]=Поддержка языка Bash -GenericName[sk]=Podpora Bash -GenericName[sl]=Podpora bash -GenericName[sr]=Bash подршка -GenericName[sr@Latn]=Bash podrška -GenericName[sv]=Bash-stöd -GenericName[ta]=பாஷ் ஆதரவு -GenericName[tg]=Ёри намудани забони Bash -GenericName[tr]=Bash Desteği -GenericName[zh_CN]=Bash 支持 -GenericName[zh_TW]=Bash 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevbashsupport -X-TDevelop-Version=5 -X-TDevelop-Language=Bash diff --git a/languages/bash/tdevbashsupport.rc b/languages/bash/tdevbashsupport.rc deleted file mode 100644 index d4592d6b..00000000 --- a/languages/bash/tdevbashsupport.rc +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/languages/cpp/CMakeLists.txt b/languages/cpp/CMakeLists.txt index 3da1e579..8d1c569a 100644 --- a/languages/cpp/CMakeLists.txt +++ b/languages/cpp/CMakeLists.txt @@ -45,17 +45,17 @@ link_directories( ##### other data ################################ -install( FILES tdevcppsupport.desktop tdevcsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevcppsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport ) -install( FILES cpptemplates DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev/templates ) -install( FILES configuration DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport ) +install( FILES kdevcppsupport.desktop kdevcsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevcppsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport ) +install( FILES cpptemplates DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev/templates ) +install( FILES configuration DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport ) -##### libtdevcppsupport (module) ################ +##### libkdevcppsupport (module) ################ -tde_add_kpart( libtdevcppsupport AUTOMOC +tde_add_kpart( libkdevcppsupport AUTOMOC SOURCES - TDevCppSupportIface.cpp TDevCppSupportIface.skel + KDevCppSupportIface.cpp KDevCppSupportIface.skel addattributedialog.cpp addattributedialogbase.ui addmethoddialog.cpp addmethoddialogbase.ui ast_utils.cpp backgroundparser.cpp ccconfigwidget.cpp @@ -72,7 +72,7 @@ tde_add_kpart( libtdevcppsupport AUTOMOC creategettersetterdialog.cpp creategettersetterdialog.h createpcsdialog.cpp createpcsdialogbase.ui doxydoc.cpp includefiles.cpp includepathresolver.cpp - tdevdriver.cpp problemreporter.cpp qtbuildconfig.cpp + kdevdriver.cpp problemreporter.cpp qtbuildconfig.cpp qtdesignercppintegration.cpp setuphelper.cpp simplecontext.cpp simpletype.cpp simpletypecatalog.cpp simpletypefunction.cpp simpletypenamespace.cpp @@ -80,7 +80,7 @@ tde_add_kpart( libtdevcppsupport AUTOMOC subclassingdlg.cpp subclassingdlgbase.ui tag_creator.cpp typedesc.cpp LINK - lang_interfaces-shared tdevcppparser-shared - tdevcatalog-shared designerintegration-shared + lang_interfaces-shared kdevcppparser-shared + kdevcatalog-shared designerintegration-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/cpp/KDevCppSupportIface.cpp b/languages/cpp/KDevCppSupportIface.cpp new file mode 100644 index 00000000..793516ca --- /dev/null +++ b/languages/cpp/KDevCppSupportIface.cpp @@ -0,0 +1,24 @@ + +#include "KDevCppSupportIface.h" +#include "cppsupportpart.h" + +KDevCppSupportIface::KDevCppSupportIface( CppSupportPart* cppSupport ) + : TQObject( cppSupport ), DCOPObject( "KDevCppSupport" ), m_cppSupport( cppSupport ) +{ +} + +KDevCppSupportIface::~KDevCppSupportIface() +{ +} + +void KDevCppSupportIface::addClass() +{ + m_cppSupport->slotNewClass(); +} + +void KDevCppSupportIface::parseProject() +{ + m_cppSupport->parseProject(); +} + +#include "KDevCppSupportIface.moc" diff --git a/languages/cpp/KDevCppSupportIface.h b/languages/cpp/KDevCppSupportIface.h new file mode 100644 index 00000000..cbf8b4f9 --- /dev/null +++ b/languages/cpp/KDevCppSupportIface.h @@ -0,0 +1,28 @@ + +#ifndef KDEVCPPSUPPORTIFACE_H +#define KDEVCPPSUPPORTIFACE_H + +#include +#include + +class CppSupportPart; + +class KDevCppSupportIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP +public: + KDevCppSupportIface( CppSupportPart* cppSupport ); + ~KDevCppSupportIface(); + +k_dcop: + void addClass(); + void parseProject(); + +private: + CppSupportPart* m_cppSupport; +}; + +#endif +// kate: indent-mode csands; tab-width 4; diff --git a/languages/cpp/Makefile.am b/languages/cpp/Makefile.am index dc4974c3..7c506ac1 100644 --- a/languages/cpp/Makefile.am +++ b/languages/cpp/Makefile.am @@ -10,14 +10,14 @@ INCLUDES = -I$(top_srcdir)/languages/lib/designer_integration \ -I$(top_builddir)/languages/lib/designer_integration -I$(top_builddir)/bdb/build_unix -I$(top_srcdir)/bdb/include \ $(all_includes) -kde_module_LTLIBRARIES = libtdevcppsupport.la -libtdevcppsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevcppsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/catalog/libtdevcatalog.la $(top_builddir)/lib/cppparser/libtdevcppparser.la \ +kde_module_LTLIBRARIES = libkdevcppsupport.la +libkdevcppsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevcppsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/catalog/libkdevcatalog.la $(top_builddir)/lib/cppparser/libkdevcppparser.la \ $(top_builddir)/languages/lib/interfaces/liblang_interfaces.la \ - $(top_builddir)/languages/lib/designer_integration/libdesignerintegration.la $(top_builddir)/lib/interfaces/libtdevinterfaces.la + $(top_builddir)/languages/lib/designer_integration/libdesignerintegration.la $(top_builddir)/lib/interfaces/libkdevinterfaces.la -libtdevcppsupport_la_SOURCES = TDevCppSupportIface.cpp TDevCppSupportIface.skel \ +libkdevcppsupport_la_SOURCES = KDevCppSupportIface.cpp KDevCppSupportIface.skel \ addattributedialog.cpp addattributedialogbase.ui addmethoddialog.cpp addmethoddialogbase.ui \ ast_utils.cpp backgroundparser.cpp ccconfigwidget.cpp ccconfigwidgetbase.ui \ classgeneratorconfig.cpp classgeneratorconfigbase.ui codeinformationrepository.cpp \ @@ -27,7 +27,7 @@ libtdevcppsupport_la_SOURCES = TDevCppSupportIface.cpp TDevCppSupportIface.skel cppsupportfactory.cpp cppsupportpart.cpp creategettersetter.ui \ creategettersetterconfiguration.cpp creategettersetterconfiguration.h creategettersetterdialog.cpp \ creategettersetterdialog.h createpcsdialog.cpp createpcsdialogbase.ui doxydoc.cpp includefiles.cpp \ - includepathresolver.cpp tdevdriver.cpp problemreporter.cpp qtbuildconfig.cpp \ + includepathresolver.cpp kdevdriver.cpp problemreporter.cpp qtbuildconfig.cpp \ qtdesignercppintegration.cpp setuphelper.cpp simplecontext.cpp simpletype.cpp simpletypecatalog.cpp \ simpletypefunction.cpp simpletypenamespace.cpp store_walker.cpp storeconverter.cpp \ stringhelpers.cpp subclassingdlg.cpp subclassingdlgbase.ui tag_creator.cpp typedesc.cpp @@ -35,15 +35,15 @@ libtdevcppsupport_la_SOURCES = TDevCppSupportIface.cpp TDevCppSupportIface.skel METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevcppsupport.desktop tdevcsupport.desktop +service_DATA = kdevcppsupport.desktop kdevcsupport.desktop -rcdir = $(kde_datadir)/tdevcppsupport -rc_DATA = tdevcppsupport.rc +rcdir = $(kde_datadir)/kdevcppsupport +rc_DATA = kdevcppsupport.rc -templatedir = ${kde_datadir}/tdevabbrev/templates +templatedir = ${kde_datadir}/kdevabbrev/templates template_DATA = cpptemplates -configurationdir = ${kde_datadir}/tdevcppsupport +configurationdir = ${kde_datadir}/kdevcppsupport configuration_DATA = configuration AM_CXXFLAGS = -DAST_DEBUG @@ -51,8 +51,8 @@ AM_CXXFLAGS = -DAST_DEBUG #bin_PROGRAMS = r++ #r___LDFLAGS = $(all_libraries) #r___SOURCES = main.cpp -#r___DEPENDENCIES = libtdevcppsupport.la -#r___LDADD = libtdevcppsupport.la $(top_builddir)/lib/catalog/libtdevcatalog.la $(top_builddir)/lib/cppparser/libtdevcppparser.la +#r___DEPENDENCIES = libkdevcppsupport.la +#r___LDADD = libkdevcppsupport.la $(top_builddir)/lib/catalog/libkdevcatalog.la $(top_builddir)/lib/cppparser/libkdevcppparser.la noinst_HEADERS = cppevaluation.h cppimplementationwidget.h \ cppsplitheadersourceconfig.h declarationinfo.h expressioninfo.h includefiles.h includepathresolver.h \ qtdesignercppintegration.h setuphelper.h simplecontext.h simpletypecatalog.h simpletypefunction.h \ diff --git a/languages/cpp/README.dox b/languages/cpp/README.dox index 527e50ab..460c4cc7 100644 --- a/languages/cpp/README.dox +++ b/languages/cpp/README.dox @@ -4,7 +4,7 @@ Provides C/C++ language support for KDevelop. Well the first thing you should read is lib/catalog it contains the source of the persistant class store after that languages/cpp/tag_creator.* it is the component that stores the informations collected by the c++ parser into the PCS -then you can play with TDevPCSImporter the code of the dialog is in languages/cpp/createpcsdialog* and languages/cpp/pcsimporter/* +then you can play with KDevPCSImporter the code of the dialog is in languages/cpp/createpcsdialog* and languages/cpp/pcsimporter/* and of course lib/interfaces/kdevpcsimporter.* and if you want play with the c++ parser go to lib/cppparser/, the best is to start to read driver.* diff --git a/languages/cpp/TDevCppSupportIface.cpp b/languages/cpp/TDevCppSupportIface.cpp deleted file mode 100644 index 54977c4c..00000000 --- a/languages/cpp/TDevCppSupportIface.cpp +++ /dev/null @@ -1,24 +0,0 @@ - -#include "TDevCppSupportIface.h" -#include "cppsupportpart.h" - -TDevCppSupportIface::TDevCppSupportIface( CppSupportPart* cppSupport ) - : TQObject( cppSupport ), DCOPObject( "TDevCppSupport" ), m_cppSupport( cppSupport ) -{ -} - -TDevCppSupportIface::~TDevCppSupportIface() -{ -} - -void TDevCppSupportIface::addClass() -{ - m_cppSupport->slotNewClass(); -} - -void TDevCppSupportIface::parseProject() -{ - m_cppSupport->parseProject(); -} - -#include "TDevCppSupportIface.moc" diff --git a/languages/cpp/TDevCppSupportIface.h b/languages/cpp/TDevCppSupportIface.h deleted file mode 100644 index c94509ba..00000000 --- a/languages/cpp/TDevCppSupportIface.h +++ /dev/null @@ -1,28 +0,0 @@ - -#ifndef TDEVCPPSUPPORTIFACE_H -#define TDEVCPPSUPPORTIFACE_H - -#include -#include - -class CppSupportPart; - -class TDevCppSupportIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP -public: - TDevCppSupportIface( CppSupportPart* cppSupport ); - ~TDevCppSupportIface(); - -k_dcop: - void addClass(); - void parseProject(); - -private: - CppSupportPart* m_cppSupport; -}; - -#endif -// kate: indent-mode csands; tab-width 4; diff --git a/languages/cpp/addattributedialog.cpp b/languages/cpp/addattributedialog.cpp index 705678cd..6a9a1fbc 100644 --- a/languages/cpp/addattributedialog.cpp +++ b/languages/cpp/addattributedialog.cpp @@ -23,7 +23,7 @@ #include "backgroundparser.h" #include "cppsupport_utils.h" -#include +#include #include diff --git a/languages/cpp/addmethoddialog.cpp b/languages/cpp/addmethoddialog.cpp index f9e9c602..c9593844 100644 --- a/languages/cpp/addmethoddialog.cpp +++ b/languages/cpp/addmethoddialog.cpp @@ -24,8 +24,8 @@ #include "cppsupport_utils.h" #include "domutil.h" -#include -#include +#include +#include #include #include @@ -236,7 +236,7 @@ void AddMethodDialog::accept() TQFileInfo fileInfo( implementationFile ); if ( !TQFile::exists( fileInfo.absFilePath() ) ) { - if ( TDevCreateFile * createFileSupp = m_cppSupport->extension( "TDevelop/CreateFile" ) ) + if ( KDevCreateFile * createFileSupp = m_cppSupport->extension( "TDevelop/CreateFile" ) ) createFileSupp->createNewFile( fileInfo.extension(), fileInfo.dirPath( true ), fileInfo.baseName() ); } diff --git a/languages/cpp/app_templates/CMakeLists.txt b/languages/cpp/app_templates/CMakeLists.txt index 2ed5ec56..52229fc6 100644 --- a/languages/cpp/app_templates/CMakeLists.txt +++ b/languages/cpp/app_templates/CMakeLists.txt @@ -9,14 +9,14 @@ # ################################################# -add_subdirectory( tdeapp ) +add_subdirectory( kapp ) add_subdirectory( kpartapp ) add_subdirectory( kpartplugin ) add_subdirectory( tdecmodule ) add_subdirectory( kicker ) add_subdirectory( tdeioslave ) -add_subdirectory( tdevpart ) -add_subdirectory( tdevpart2 ) +add_subdirectory( kdevpart ) +add_subdirectory( kdevpart2 ) add_subdirectory( chello ) add_subdirectory( cpphello ) add_subdirectory( tdescreensaver ) @@ -32,11 +32,11 @@ add_subdirectory( khello2 ) add_subdirectory( kateplugin ) add_subdirectory( kateplugin2 ) add_subdirectory( qtopiaapp ) -add_subdirectory( tdedcop ) +add_subdirectory( kdedcop ) add_subdirectory( wxhello ) add_subdirectory( cppsdlhello ) add_subdirectory( tdeconfig35 ) -add_subdirectory( tdevlang ) +add_subdirectory( kdevlang ) add_subdirectory( noatunvisual ) add_subdirectory( noatunui ) add_subdirectory( kmod ) @@ -64,7 +64,7 @@ add_subdirectory( qmakeempty ) add_subdirectory( automakeempty ) add_subdirectory( makefileempty ) add_subdirectory( qtopia4app ) -add_subdirectory( tde4app ) +add_subdirectory( kde4app ) install( FILES c.appwizard @@ -75,5 +75,5 @@ install( FILES DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE ) install( FILES - tdecpp.appwizard + kdecpp.appwizard DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE ) diff --git a/languages/cpp/app_templates/Makefile.am b/languages/cpp/app_templates/Makefile.am index e594ce4e..8350118d 100644 --- a/languages/cpp/app_templates/Makefile.am +++ b/languages/cpp/app_templates/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = tdeapp kpartapp kpartplugin tdecmodule kicker tdeioslave tdevpart tdevpart2 chello cpphello tdescreensaver kofficepart chello_gba dcopservice konqnavpanel qmakesimple qmakeapp qt4makeapp khello khello2 kateplugin kateplugin2 qtopiaapp tdedcop wxhello cppsdlhello tdeconfig35 tdevlang noatunvisual noatunui kmod tdefileplugin clanlib opieapp opieapplet opieinput opiemenu opienet opietoday kxt gtk2mmapp cppcurseshello win32hello win32gui cmakesimple cmakesimplec cmakelibcpp cmakelibc kscons_kxt kscons_tdemdi qt4hello qmakeempty automakeempty makefileempty qtopia4app tde4app +SUBDIRS = kapp kpartapp kpartplugin tdecmodule kicker tdeioslave kdevpart kdevpart2 chello cpphello tdescreensaver kofficepart chello_gba dcopservice konqnavpanel qmakesimple qmakeapp qt4makeapp khello khello2 kateplugin kateplugin2 qtopiaapp kdedcop wxhello cppsdlhello tdeconfig35 kdevlang noatunvisual noatunui kmod tdefileplugin clanlib opieapp opieapplet opieinput opiemenu opienet opietoday kxt gtk2mmapp cppcurseshello win32hello win32gui cmakesimple cmakesimplec cmakelibcpp cmakelibc kscons_kxt kscons_tdemdi qt4hello qmakeempty automakeempty makefileempty qtopia4app kde4app profilescdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CIDE profilesc_DATA = c.appwizard @@ -6,5 +6,5 @@ profilesc_DATA = c.appwizard profilescppdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE profilescpp_DATA = cpp.appwizard -profilestdecppdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE -profilestdecpp_DATA = tdecpp.appwizard +profileskdecppdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE +profileskdecpp_DATA = kdecpp.appwizard diff --git a/languages/cpp/app_templates/automakeempty/CMakeLists.txt b/languages/cpp/app_templates/automakeempty/CMakeLists.txt index 8757cdce..6785106a 100644 --- a/languages/cpp/app_templates/automakeempty/CMakeLists.txt +++ b/languages/cpp/app_templates/automakeempty/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( automakeempty.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/automakeempty.tar.gz automakeempty.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - automakeempty.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + automakeempty.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/automakeempty/Makefile.am b/languages/cpp/app_templates/automakeempty/Makefile.am index 8c6ceb16..06f9a94c 100644 --- a/languages/cpp/app_templates/automakeempty/Makefile.am +++ b/languages/cpp/app_templates/automakeempty/Makefile.am @@ -3,10 +3,10 @@ dataFiles = automakeempty-Makefile.am automakeempty-Makefile.cvs \ templateName = automakeempty ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/automakeempty/app.tdevelop b/languages/cpp/app_templates/automakeempty/app.tdevelop index f30a3dfc..ab12095d 100644 --- a/languages/cpp/app_templates/automakeempty/app.tdevelop +++ b/languages/cpp/app_templates/automakeempty/app.tdevelop @@ -11,7 +11,7 @@ Code - + @@ -33,8 +33,8 @@ -O0 -g3 - - + + ada ada_bugs_gcc @@ -79,23 +79,23 @@ TDE Libraries (Doxygen) - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/automakeempty/automakeempty.kdevtemplate b/languages/cpp/app_templates/automakeempty/automakeempty.kdevtemplate new file mode 100644 index 00000000..a1ced086 --- /dev/null +++ b/languages/cpp/app_templates/automakeempty/automakeempty.kdevtemplate @@ -0,0 +1,99 @@ +# TDE Config File +[General] +Name=Empty Autotools Template +Name[ca]=Plantilla Autotools buida +Name[da]=Tom Autotools-skabelon +Name[de]=Leere Autotools-Vorlage +Name[el]=Κενό πρότυπο των Autotools +Name[es]=Plantilla Autotools vacía +Name[et]=Tühi autotoolsi mall +Name[hu]=Üres Autotools sablon +Name[it]=Modello di autotools vuoto +Name[nds]=Leddig Vörlaag för Automake un sien Kanuten +Name[nl]=Leeg Autotools-sjabloon +Name[pl]=Pusty szablon Autotools +Name[pt]=Modelo de Autotools Vazio +Name[pt_BR]=Modelo de Autotools Vazio +Name[ru]=Пустой шаблон autotools +Name[sk]=Prázdna šablóna Autotools +Name[sr]=Празан шаблон Autotools-а +Name[sr@Latn]=Prazan šablon Autotools-a +Name[sv]=Tom mall för Autotools +Name[zh_TW]=空的 Autotools 樣板 +Icon=automakeempty.png +Category=C++/Automake project +Comment=Generate an empty Automake based application +Comment[ca]=Genera una aplicació buida basada en Automake +Comment[da]=Opretter et tomt Automake-baseret program +Comment[de]=Erstellt eine leere auf Automake basierende Anwendung +Comment[el]=Δημιουργία μίας κενής εφαρμογής βασισμένης στο Automake +Comment[es]=Genera una aplicación vacía basada en Automake +Comment[et]=Tühja rakenduse loomine Automake'i põhjal +Comment[hu]=Létrehoz egy üres Automake-alapú alkalmazást +Comment[it]=Genera un'applicazione basata su un Automake vuoto +Comment[nds]=Stellt en leddig Programm op, dat op Automake opbuut +Comment[nl]=Genereer een leeg op Automake gebaseerd programma +Comment[pl]=Generuje pusty program używający Automake +Comment[pt]=Gera uma aplicação vazia baseada no Automake +Comment[pt_BR]=Gera uma aplicação vazia baseada no Automake +Comment[ru]=Создать пустое приложение, использующее Automake +Comment[sk]=Vygeneruje prázdnu aplikáciu založenú na Automake +Comment[sr]=Прави празан програм на основу Automake-а +Comment[sr@Latn]=Pravi prazan program na osnovu Automake-a +Comment[sv]=Skapar ett tomt Automake-baserat program +Comment[zh_TW]=產生一個空的使用 Automake 的應用程式 +FileTemplates=h,CStyle,cpp,CStyle +Archive=automakeempty.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE2] +Type=install +Source=%{src}/automakeempty-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/automakeempty-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[MSG] +Type=message +Comment=An Automake based application was created in %{dest} +Comment[ca]=S'ha creat una aplicació basada en Automake en %{dest} +Comment[da]=Et Automake-baseret program blev oprettet i %{dest} +Comment[de]=Eine auf Automake basierende Anwendung wurde in %{dest} erstellt. +Comment[el]=Μία εφαρμογή βασισμένη στο Automake δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación basada en Automake ha sido creada en %{dest} +Comment[et]=Rakendus Automake'i põhjal loodi asukohta %{dest} +Comment[hu]=Létrejött egy Automake-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione basata su automake in %{dest} +Comment[nds]=In %{dest} wöör en op Automake opbuut Programm opstellt +Comment[nl]=Een Automake-gebaseerd programma is aangemaakt in %{dest} +Comment[pl]=Program używający Automake został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação baseada no Automake em %{dest} +Comment[pt_BR]=Foi criada uma aplicação baseada no Automake em %{dest} +Comment[ru]=Использующее Automake приложение создано в %{dest} +Comment[sk]=Aplikácia založená na Automake bola vytvorená v %{dest} +Comment[sr]=Програм на основи Automake-а направљен је у %{dest} +Comment[sr@Latn]=Program na osnovi Automake-a napravljen je u %{dest} +Comment[sv]=Ett Automake-baserat program skapades i %{dest} +Comment[zh_TW]=一個以 Automake 為基礎的應用程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/automakeempty/automakeempty.tdevtemplate b/languages/cpp/app_templates/automakeempty/automakeempty.tdevtemplate deleted file mode 100644 index 6581b4fa..00000000 --- a/languages/cpp/app_templates/automakeempty/automakeempty.tdevtemplate +++ /dev/null @@ -1,99 +0,0 @@ -# TDE Config File -[General] -Name=Empty Autotools Template -Name[ca]=Plantilla Autotools buida -Name[da]=Tom Autotools-skabelon -Name[de]=Leere Autotools-Vorlage -Name[el]=Κενό πρότυπο των Autotools -Name[es]=Plantilla Autotools vacía -Name[et]=Tühi autotoolsi mall -Name[hu]=Üres Autotools sablon -Name[it]=Modello di autotools vuoto -Name[nds]=Leddig Vörlaag för Automake un sien Kanuten -Name[nl]=Leeg Autotools-sjabloon -Name[pl]=Pusty szablon Autotools -Name[pt]=Modelo de Autotools Vazio -Name[pt_BR]=Modelo de Autotools Vazio -Name[ru]=Пустой шаблон autotools -Name[sk]=Prázdna šablóna Autotools -Name[sr]=Празан шаблон Autotools-а -Name[sr@Latn]=Prazan šablon Autotools-a -Name[sv]=Tom mall för Autotools -Name[zh_TW]=空的 Autotools 樣板 -Icon=automakeempty.png -Category=C++/Automake project -Comment=Generate an empty Automake based application -Comment[ca]=Genera una aplicació buida basada en Automake -Comment[da]=Opretter et tomt Automake-baseret program -Comment[de]=Erstellt eine leere auf Automake basierende Anwendung -Comment[el]=Δημιουργία μίας κενής εφαρμογής βασισμένης στο Automake -Comment[es]=Genera una aplicación vacía basada en Automake -Comment[et]=Tühja rakenduse loomine Automake'i põhjal -Comment[hu]=Létrehoz egy üres Automake-alapú alkalmazást -Comment[it]=Genera un'applicazione basata su un Automake vuoto -Comment[nds]=Stellt en leddig Programm op, dat op Automake opbuut -Comment[nl]=Genereer een leeg op Automake gebaseerd programma -Comment[pl]=Generuje pusty program używający Automake -Comment[pt]=Gera uma aplicação vazia baseada no Automake -Comment[pt_BR]=Gera uma aplicação vazia baseada no Automake -Comment[ru]=Создать пустое приложение, использующее Automake -Comment[sk]=Vygeneruje prázdnu aplikáciu založenú na Automake -Comment[sr]=Прави празан програм на основу Automake-а -Comment[sr@Latn]=Pravi prazan program na osnovu Automake-a -Comment[sv]=Skapar ett tomt Automake-baserat program -Comment[zh_TW]=產生一個空的使用 Automake 的應用程式 -FileTemplates=h,CStyle,cpp,CStyle -Archive=automakeempty.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE2] -Type=install -Source=%{src}/automakeempty-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/automakeempty-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[MSG] -Type=message -Comment=An Automake based application was created in %{dest} -Comment[ca]=S'ha creat una aplicació basada en Automake en %{dest} -Comment[da]=Et Automake-baseret program blev oprettet i %{dest} -Comment[de]=Eine auf Automake basierende Anwendung wurde in %{dest} erstellt. -Comment[el]=Μία εφαρμογή βασισμένη στο Automake δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación basada en Automake ha sido creada en %{dest} -Comment[et]=Rakendus Automake'i põhjal loodi asukohta %{dest} -Comment[hu]=Létrejött egy Automake-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione basata su automake in %{dest} -Comment[nds]=In %{dest} wöör en op Automake opbuut Programm opstellt -Comment[nl]=Een Automake-gebaseerd programma is aangemaakt in %{dest} -Comment[pl]=Program używający Automake został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação baseada no Automake em %{dest} -Comment[pt_BR]=Foi criada uma aplicação baseada no Automake em %{dest} -Comment[ru]=Использующее Automake приложение создано в %{dest} -Comment[sk]=Aplikácia založená na Automake bola vytvorená v %{dest} -Comment[sr]=Програм на основи Automake-а направљен је у %{dest} -Comment[sr@Latn]=Program na osnovi Automake-a napravljen je u %{dest} -Comment[sv]=Ett Automake-baserat program skapades i %{dest} -Comment[zh_TW]=一個以 Automake 為基礎的應用程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/chello/CMakeLists.txt b/languages/cpp/app_templates/chello/CMakeLists.txt index 9df341e8..5d792072 100644 --- a/languages/cpp/app_templates/chello/CMakeLists.txt +++ b/languages/cpp/app_templates/chello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( chello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/chello.tar.gz chello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - chello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + chello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/chello/Makefile.am b/languages/cpp/app_templates/chello/Makefile.am index 3c77d4fb..0a51e6fd 100644 --- a/languages/cpp/app_templates/chello/Makefile.am +++ b/languages/cpp/app_templates/chello/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.c src-Makefile.am c-Makefile.am c-Makefile.cvs \ templateName = chello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} ${dataFiles} ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/chello/app.tdevelop b/languages/cpp/app_templates/chello/app.tdevelop index 825cf9a3..41866d9f 100644 --- a/languages/cpp/app_templates/chello/app.tdevelop +++ b/languages/cpp/app_templates/chello/app.tdevelop @@ -11,7 +11,7 @@ Code - + src/%{APPNAMELC} debug @@ -37,8 +37,8 @@ -O0 -g3 %{CFLAGS} - - + + ada ada_bugs_gcc @@ -85,23 +85,23 @@ TDE Libraries (Doxygen) - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/chello/chello.kdevtemplate b/languages/cpp/app_templates/chello/chello.kdevtemplate new file mode 100644 index 00000000..6dc5fb77 --- /dev/null +++ b/languages/cpp/app_templates/chello/chello.kdevtemplate @@ -0,0 +1,253 @@ +# TDE Config File +[General] +Name=Simple Hello world program +Name[ca]=Simple programa Hello world +Name[da]=Simpelt Goddag verden program +Name[de]=Ein einfaches "Hello World"-Programm +Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» sencillo +Name[et]=Lihtne "Tere, maailm" programm +Name[eu]="Kaixo mundua" programa sinplea +Name[fa]=برنامۀ سادۀ Hello world +Name[fr]=Programme « Bonjour monde » simple +Name[ga]=Ríomhchlár simplí "Hello World" +Name[gl]=Programa sinxelo Ola mundo +Name[hu]=Egyszerű Hello world program +Name[it]=Semplice programma di "Hello world" +Name[ja]=簡単な Hello world プログラム +Name[ms]=Program Hello World mudah +Name[nds]=En eenfach "Moin Welt"-Programm +Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम +Name[nl]=Eenvoudig 'Hello World' programma +Name[pl]=Prosty program witaj świecie +Name[pt]=Programa simples Olá Mundo +Name[pt_BR]=Programa simples Olá Mundo +Name[ru]=Простая программа Hello world +Name[sk]=Jednoduchý "Ahoj svet" program +Name[sl]=Preprost program Hello world +Name[sr]=Једноставан „Здраво свете“ програм +Name[sr@Latn]=Jednostavan „Zdravo svete“ program +Name[sv]=Enkelt Hello world-program +Name[tr]=Basit Merhaba dünya programı +Name[zh_CN]=简单的 Hello world 程序 +Name[zh_TW]=簡單的 Hello world 程式 +Icon=chello.png +Category=C +Comment=Generates a simple Hello world program in C +Comment[ca]=Genera un simple programa de Hello world en C +Comment[da]=Genererer et simpelt Goddag verden program i C +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C +Comment[es]=Genera un sencillo programa «Hola mundo» en C +Comment[et]=Lihtsa "Tere, maailm" programmi loomine C-s +Comment[eu]="Kaixo mundua" programa sinplea bat sortzen du C lengoaian +Comment[fa]=یک برنامۀ سادۀ Hello world در سی تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en C +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C +Comment[gl]=Xera un programa sinxelo Ola mundo en C +Comment[hu]=Létrehoz egy egyszerű Hello world programot C nyelven +Comment[it]=Genera un semplice programma di "Hello world" in C +Comment[ja]=簡単な Hello world プログラムを C で記述します +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C op +Comment[ne]=सी मा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig Hello World programma in C +Comment[pl]=Tworzy prosty program 'Witaj świecie' w języku C +Comment[pt]=Gera um programa simples de Olá mundo em C +Comment[pt_BR]=Gera um programa simples de Olá mundo em C +Comment[ru]=Создание простого приложения Hello world на C +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C +Comment[sl]=Ustvari preprost program Hello world v C-ju +Comment[sr]=Прави једноставан „Здраво свете“ програм у C-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C-u +Comment[sv]=Skapar ett enkelt Hello world-program i C +Comment[tr]=C'de basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成 C 语言的 Hello world 程序 +Comment[zh_TW]=產生 C 語言的 Hello world 程式 +FileTemplates=h,CStyle,c,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.c +Archive=chello.tar.gz + +[LIBS] +Type = value +ValueType=QString +Value= OPT_LIBS +Comment= Optional libraries to link to. +Comment[ca]= Biblioteques opcionals per enllaçar. +Comment[da]= Mulige biblioteker at linke til. +Comment[de]= Optionale Bibliotheken, die eingebunden werden sollen. +Comment[el]= Προαιρετικές βιβλιοθήκες για σύνδεση με αυτές. +Comment[es]=Bibliotecas opcionales para enlazar. +Comment[et]=Täiendavad lingitavad teegid. +Comment[eu]= Estekatzeko aukerako liburutegiak. +Comment[fa]= کتابخانه‌های اختیاری برای پیوند کردن. +Comment[fr]=Bibliothèques optionnelles à lier. +Comment[ga]= Comhadlanna roghnacha ar féidir nascadh leo. +Comment[gl]= Librerías opcionais a enlazar. +Comment[hu]=Linkelési programkönyvtárak (opcionális). +Comment[it]= librerie opzionali da collegare. +Comment[ja]=リンクする他のライブラリ +Comment[nds]= Optschonaal Bibliotheken, na de linkt warrn schall +Comment[ne]= लिङ्क सिर्जना गर्न वैकल्पिक लाइब्रेरी +Comment[nl]=Optionele bibliotheken om naar te linken +Comment[pl]= Opcjonalne biblioteki, z którymi ma być łączony. +Comment[pt]= Bibliotecas opcionais com as quais compilar. +Comment[pt_BR]= Bibliotecas opcionais com as quais compilar. +Comment[ru]=Дополнительные библиотеки для сборки. +Comment[sk]=Voliteľné knižnice pre linkovanie. +Comment[sl]=Dodatne knjižnice, do katerih se naj poveže. +Comment[sr]=Опционе библиотеке за повезивање. +Comment[sr@Latn]=Opcione biblioteke za povezivanje. +Comment[sv]= Valfria bibliotek att länka till. +Comment[tr]=Bağlanılacak isteğe bağlı kütüphaneler. +Comment[zh_CN]=可选的链接库。 +Comment[zh_TW]=要連結的函式庫 +Default= -lm + +[INCLUDES] +Type = value +ValueType=QString +Value= OPT_INCS +Comment= Optional include path. +Comment[ca]= Ruta opcional per a incloure. +Comment[da]= Mulig include-sti. +Comment[de]= Optionaler Include-Pfad. +Comment[el]= Προαιρετική διαδρομή ενσωμάτωσης. +Comment[es]=Ruta opcional para incluir. +Comment[et]=Täiendavate päisefailide asukoht. +Comment[eu]= Aukerako goiburuen bide-izena. +Comment[fa]=include path اختیاری. +Comment[fr]=Chemin d'inclusion optionnel. +Comment[ga]= Conair roghnach ceanntásca. +Comment[gl]= Ruta opcional de cabeceiras. +Comment[hu]=Include fájlok könyvtárai (opcionális). +Comment[it]= percorso opzionale di inclusione. +Comment[ja]=ヘッダファイルを読み込む他のパス +Comment[nds]= Optschonaal Koppdatei-Padd +Comment[ne]= मार्ग सहितको विकल्प +Comment[nl]=Optioneel Include-pad +Comment[pl]= Opcjonalna ścieżka do plików dołączanych. +Comment[pt]= Localização opcional dos ficheiros de inclusão. +Comment[pt_BR]= Localização opcional dos ficheiros de inclusão. +Comment[ru]=Дополнительные пути для заголовочных файлов. +Comment[sk]=Voliteľná cesta pre include. +Comment[sl]=Neobvezna pot za vstavke. +Comment[sr]=Опциона путања за укључивања. +Comment[sr@Latn]=Opciona putanja za uključivanja. +Comment[sv]= Valfri sökväg till deklarationsfiler. +Comment[tr]=İsteğe bağlı include yolu. +Comment[zh_CN]=可选的包含路径。 +Comment[zh_TW]=引入檔路徑 +Default= -I/usr/include + +[CFLAGS] +Type = value +ValueType=QString +Value= CFLAGS +Comment= Optional CFLAGS to define in the makefile. +Comment[ca]= CFLAGS opcionals per a definir en el fitxer de make. +Comment[da]= Mulige CFLAGS at definere i makefile. +Comment[de]= Optionale CFLAGS, die im Makefile definiert werden. +Comment[el]= Προαιρετικές CFLAGS για ορισμό μέσα στο makefile. +Comment[es]=CFLAGS opcionales a definir en el makefile. +Comment[et]=Täiendavad Makefile'is defineeritavad CFLAGS'id. +Comment[eu]= Aukerako makefile-ean definitzeko CFLAGS-ak. +Comment[fa]= CFLAGS اختیاری برای تعریف در makefile. +Comment[fr]=CFLAGS optionnels à définir dans le Makefile. +Comment[ga]= CFLAGS roghnacha le socrú sa makefile. +Comment[gl]= CFLAGS opcionais a definir no makefile. +Comment[hu]=A Makefile-hoz definiálható CFLAGS információ (opcionális). +Comment[it]= CFLAGS opzionale da definire nel makefile. +Comment[ja]=Makefile に定義する他の CFLAGS +Comment[nds]= Optschonaal CFLAGS, de in de "Make"-Datei fastleggt warrt. +Comment[ne]= मेकफाइलमा परिभाषित गर्न CFLAGS विकल्प +Comment[nl]=Optionele CFLAGS om te definiëren in het makefile. +Comment[pl]= Opcjonalna wartość zmiennej CFLAGS do zdefiniowania w pliku makefile. +Comment[pt]= CFLAGS opcionais a definir na Makefile. +Comment[pt_BR]= CFLAGS opcionais a definir na Makefile. +Comment[ru]=Дополнительные параметры CFLAGS для Makefile. +Comment[sk]=Voliteľné nastavenie CFLAGS v makefile. +Comment[sl]=Dodaten CFLAGS za definicijo v datoteki makefile. +Comment[sr]=Опциона CFLAGS дефинисана у справифајлу. +Comment[sr@Latn]=Opciona CFLAGS definisana u spravifajlu. +Comment[sv]= Valfria CFLAGS att definiera i byggfilen. +Comment[tr]=Makefile'da tanımlanacak isteğe bağlı CFLAGS değerleri +Comment[zh_CN]=在 Makefile 中定义的可选 CFLAGS。 +Comment[zh_TW]=makefile 中定義的 CFLAGS +Default= + +[MGS] +Type=message +Comment=A simple C project was created in %{dest}. +Comment[ca]=A simple projecte en C ha estat creat en %{dest}. +Comment[da]=Et simpelt C projekt blev oprette i %{dest}. +Comment[de]=Ein einfaches C-Project wurde in %{dest} erstellt. +Comment[el]=Ένα απλό έργο C δημιουργήθηκε στο %{dest}. +Comment[es]=Un sencillo proyecto de C ha sido creado en %{dest}. +Comment[et]=Lihtne C-projekt loodi asukohta %{dest}. +Comment[eu]=C proiektu sinple bat sortu da hemen: %{dest}. +Comment[fa]=یک پروژۀ سادۀ سی در %{dest} ایجاد شد. +Comment[fr]=Un projet en langage C simple a été créé dans %{dest}. +Comment[ga]=Cruthaíodh tionscadal simplí C i %{dest} +Comment[gl]=Creouse un proxecto sinxelo en C en %{dest}. +Comment[hu]=Létrejött egy egyszerű C-projekt itt: %{dest}. +Comment[it]=È stato creato un semplice progetto C in %{dest}. +Comment[ja]=簡単な C プロジェクトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach C-Projekt opstellt. +Comment[ne]=एउटा साधारण सी परियोजना %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig C-project is aangemaakt in %{dest}. +Comment[pl]=Prosty projekt w języku C został utworzony w %{dest}. +Comment[pt]=Foi criado um programa simples "Olá mundo" em C em %{dest}. +Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em C em %{dest}. +Comment[ru]=Простое приложение "Hello world" на C создано в %{dest} +Comment[sk]=Jednoduchý C projekt bol vytvorený v %{dest}. +Comment[sl]=Preprost projekt v C-ju je bil ustvarjen v %{dest}. +Comment[sr]=Једноставан пројекат у C-у направљен је у %{dest}. +Comment[sr@Latn]=Jednostavan projekat u C-u napravljen je u %{dest}. +Comment[sv]=Ett enkelt C-projekt skapades i %{dest}. +Comment[tr]=Basit bir C projesi %{dest} içinde oluşturuldu. +Comment[zh_CN]=在 %{dest} 中创建了简单的 C 工程。 +Comment[zh_TW]=一個簡單的 C 專案已建立在 %{dest}。 +Archive=chello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/c-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/c-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/main.c +Dest=%{dest}/src/%{APPNAMELC}.c + diff --git a/languages/cpp/app_templates/chello/chello.tdevtemplate b/languages/cpp/app_templates/chello/chello.tdevtemplate deleted file mode 100644 index 1368d851..00000000 --- a/languages/cpp/app_templates/chello/chello.tdevtemplate +++ /dev/null @@ -1,253 +0,0 @@ -# TDE Config File -[General] -Name=Simple Hello world program -Name[ca]=Simple programa Hello world -Name[da]=Simpelt Goddag verden program -Name[de]=Ein einfaches "Hello World"-Programm -Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» sencillo -Name[et]=Lihtne "Tere, maailm" programm -Name[eu]="Kaixo mundua" programa sinplea -Name[fa]=برنامۀ سادۀ Hello world -Name[fr]=Programme « Bonjour monde » simple -Name[ga]=Ríomhchlár simplí "Hello World" -Name[gl]=Programa sinxelo Ola mundo -Name[hu]=Egyszerű Hello world program -Name[it]=Semplice programma di "Hello world" -Name[ja]=簡単な Hello world プログラム -Name[ms]=Program Hello World mudah -Name[nds]=En eenfach "Moin Welt"-Programm -Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम -Name[nl]=Eenvoudig 'Hello World' programma -Name[pl]=Prosty program witaj świecie -Name[pt]=Programa simples Olá Mundo -Name[pt_BR]=Programa simples Olá Mundo -Name[ru]=Простая программа Hello world -Name[sk]=Jednoduchý "Ahoj svet" program -Name[sl]=Preprost program Hello world -Name[sr]=Једноставан „Здраво свете“ програм -Name[sr@Latn]=Jednostavan „Zdravo svete“ program -Name[sv]=Enkelt Hello world-program -Name[tr]=Basit Merhaba dünya programı -Name[zh_CN]=简单的 Hello world 程序 -Name[zh_TW]=簡單的 Hello world 程式 -Icon=chello.png -Category=C -Comment=Generates a simple Hello world program in C -Comment[ca]=Genera un simple programa de Hello world en C -Comment[da]=Genererer et simpelt Goddag verden program i C -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C -Comment[es]=Genera un sencillo programa «Hola mundo» en C -Comment[et]=Lihtsa "Tere, maailm" programmi loomine C-s -Comment[eu]="Kaixo mundua" programa sinplea bat sortzen du C lengoaian -Comment[fa]=یک برنامۀ سادۀ Hello world در سی تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en C -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C -Comment[gl]=Xera un programa sinxelo Ola mundo en C -Comment[hu]=Létrehoz egy egyszerű Hello world programot C nyelven -Comment[it]=Genera un semplice programma di "Hello world" in C -Comment[ja]=簡単な Hello world プログラムを C で記述します -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C op -Comment[ne]=सी मा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig Hello World programma in C -Comment[pl]=Tworzy prosty program 'Witaj świecie' w języku C -Comment[pt]=Gera um programa simples de Olá mundo em C -Comment[pt_BR]=Gera um programa simples de Olá mundo em C -Comment[ru]=Создание простого приложения Hello world на C -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C -Comment[sl]=Ustvari preprost program Hello world v C-ju -Comment[sr]=Прави једноставан „Здраво свете“ програм у C-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C-u -Comment[sv]=Skapar ett enkelt Hello world-program i C -Comment[tr]=C'de basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成 C 语言的 Hello world 程序 -Comment[zh_TW]=產生 C 語言的 Hello world 程式 -FileTemplates=h,CStyle,c,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.c -Archive=chello.tar.gz - -[LIBS] -Type = value -ValueType=QString -Value= OPT_LIBS -Comment= Optional libraries to link to. -Comment[ca]= Biblioteques opcionals per enllaçar. -Comment[da]= Mulige biblioteker at linke til. -Comment[de]= Optionale Bibliotheken, die eingebunden werden sollen. -Comment[el]= Προαιρετικές βιβλιοθήκες για σύνδεση με αυτές. -Comment[es]=Bibliotecas opcionales para enlazar. -Comment[et]=Täiendavad lingitavad teegid. -Comment[eu]= Estekatzeko aukerako liburutegiak. -Comment[fa]= کتابخانه‌های اختیاری برای پیوند کردن. -Comment[fr]=Bibliothèques optionnelles à lier. -Comment[ga]= Comhadlanna roghnacha ar féidir nascadh leo. -Comment[gl]= Librerías opcionais a enlazar. -Comment[hu]=Linkelési programkönyvtárak (opcionális). -Comment[it]= librerie opzionali da collegare. -Comment[ja]=リンクする他のライブラリ -Comment[nds]= Optschonaal Bibliotheken, na de linkt warrn schall -Comment[ne]= लिङ्क सिर्जना गर्न वैकल्पिक लाइब्रेरी -Comment[nl]=Optionele bibliotheken om naar te linken -Comment[pl]= Opcjonalne biblioteki, z którymi ma być łączony. -Comment[pt]= Bibliotecas opcionais com as quais compilar. -Comment[pt_BR]= Bibliotecas opcionais com as quais compilar. -Comment[ru]=Дополнительные библиотеки для сборки. -Comment[sk]=Voliteľné knižnice pre linkovanie. -Comment[sl]=Dodatne knjižnice, do katerih se naj poveže. -Comment[sr]=Опционе библиотеке за повезивање. -Comment[sr@Latn]=Opcione biblioteke za povezivanje. -Comment[sv]= Valfria bibliotek att länka till. -Comment[tr]=Bağlanılacak isteğe bağlı kütüphaneler. -Comment[zh_CN]=可选的链接库。 -Comment[zh_TW]=要連結的函式庫 -Default= -lm - -[INCLUDES] -Type = value -ValueType=QString -Value= OPT_INCS -Comment= Optional include path. -Comment[ca]= Ruta opcional per a incloure. -Comment[da]= Mulig include-sti. -Comment[de]= Optionaler Include-Pfad. -Comment[el]= Προαιρετική διαδρομή ενσωμάτωσης. -Comment[es]=Ruta opcional para incluir. -Comment[et]=Täiendavate päisefailide asukoht. -Comment[eu]= Aukerako goiburuen bide-izena. -Comment[fa]=include path اختیاری. -Comment[fr]=Chemin d'inclusion optionnel. -Comment[ga]= Conair roghnach ceanntásca. -Comment[gl]= Ruta opcional de cabeceiras. -Comment[hu]=Include fájlok könyvtárai (opcionális). -Comment[it]= percorso opzionale di inclusione. -Comment[ja]=ヘッダファイルを読み込む他のパス -Comment[nds]= Optschonaal Koppdatei-Padd -Comment[ne]= मार्ग सहितको विकल्प -Comment[nl]=Optioneel Include-pad -Comment[pl]= Opcjonalna ścieżka do plików dołączanych. -Comment[pt]= Localização opcional dos ficheiros de inclusão. -Comment[pt_BR]= Localização opcional dos ficheiros de inclusão. -Comment[ru]=Дополнительные пути для заголовочных файлов. -Comment[sk]=Voliteľná cesta pre include. -Comment[sl]=Neobvezna pot za vstavke. -Comment[sr]=Опциона путања за укључивања. -Comment[sr@Latn]=Opciona putanja za uključivanja. -Comment[sv]= Valfri sökväg till deklarationsfiler. -Comment[tr]=İsteğe bağlı include yolu. -Comment[zh_CN]=可选的包含路径。 -Comment[zh_TW]=引入檔路徑 -Default= -I/usr/include - -[CFLAGS] -Type = value -ValueType=QString -Value= CFLAGS -Comment= Optional CFLAGS to define in the makefile. -Comment[ca]= CFLAGS opcionals per a definir en el fitxer de make. -Comment[da]= Mulige CFLAGS at definere i makefile. -Comment[de]= Optionale CFLAGS, die im Makefile definiert werden. -Comment[el]= Προαιρετικές CFLAGS για ορισμό μέσα στο makefile. -Comment[es]=CFLAGS opcionales a definir en el makefile. -Comment[et]=Täiendavad Makefile'is defineeritavad CFLAGS'id. -Comment[eu]= Aukerako makefile-ean definitzeko CFLAGS-ak. -Comment[fa]= CFLAGS اختیاری برای تعریف در makefile. -Comment[fr]=CFLAGS optionnels à définir dans le Makefile. -Comment[ga]= CFLAGS roghnacha le socrú sa makefile. -Comment[gl]= CFLAGS opcionais a definir no makefile. -Comment[hu]=A Makefile-hoz definiálható CFLAGS információ (opcionális). -Comment[it]= CFLAGS opzionale da definire nel makefile. -Comment[ja]=Makefile に定義する他の CFLAGS -Comment[nds]= Optschonaal CFLAGS, de in de "Make"-Datei fastleggt warrt. -Comment[ne]= मेकफाइलमा परिभाषित गर्न CFLAGS विकल्प -Comment[nl]=Optionele CFLAGS om te definiëren in het makefile. -Comment[pl]= Opcjonalna wartość zmiennej CFLAGS do zdefiniowania w pliku makefile. -Comment[pt]= CFLAGS opcionais a definir na Makefile. -Comment[pt_BR]= CFLAGS opcionais a definir na Makefile. -Comment[ru]=Дополнительные параметры CFLAGS для Makefile. -Comment[sk]=Voliteľné nastavenie CFLAGS v makefile. -Comment[sl]=Dodaten CFLAGS za definicijo v datoteki makefile. -Comment[sr]=Опциона CFLAGS дефинисана у справифајлу. -Comment[sr@Latn]=Opciona CFLAGS definisana u spravifajlu. -Comment[sv]= Valfria CFLAGS att definiera i byggfilen. -Comment[tr]=Makefile'da tanımlanacak isteğe bağlı CFLAGS değerleri -Comment[zh_CN]=在 Makefile 中定义的可选 CFLAGS。 -Comment[zh_TW]=makefile 中定義的 CFLAGS -Default= - -[MGS] -Type=message -Comment=A simple C project was created in %{dest}. -Comment[ca]=A simple projecte en C ha estat creat en %{dest}. -Comment[da]=Et simpelt C projekt blev oprette i %{dest}. -Comment[de]=Ein einfaches C-Project wurde in %{dest} erstellt. -Comment[el]=Ένα απλό έργο C δημιουργήθηκε στο %{dest}. -Comment[es]=Un sencillo proyecto de C ha sido creado en %{dest}. -Comment[et]=Lihtne C-projekt loodi asukohta %{dest}. -Comment[eu]=C proiektu sinple bat sortu da hemen: %{dest}. -Comment[fa]=یک پروژۀ سادۀ سی در %{dest} ایجاد شد. -Comment[fr]=Un projet en langage C simple a été créé dans %{dest}. -Comment[ga]=Cruthaíodh tionscadal simplí C i %{dest} -Comment[gl]=Creouse un proxecto sinxelo en C en %{dest}. -Comment[hu]=Létrejött egy egyszerű C-projekt itt: %{dest}. -Comment[it]=È stato creato un semplice progetto C in %{dest}. -Comment[ja]=簡単な C プロジェクトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach C-Projekt opstellt. -Comment[ne]=एउटा साधारण सी परियोजना %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig C-project is aangemaakt in %{dest}. -Comment[pl]=Prosty projekt w języku C został utworzony w %{dest}. -Comment[pt]=Foi criado um programa simples "Olá mundo" em C em %{dest}. -Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em C em %{dest}. -Comment[ru]=Простое приложение "Hello world" на C создано в %{dest} -Comment[sk]=Jednoduchý C projekt bol vytvorený v %{dest}. -Comment[sl]=Preprost projekt v C-ju je bil ustvarjen v %{dest}. -Comment[sr]=Једноставан пројекат у C-у направљен је у %{dest}. -Comment[sr@Latn]=Jednostavan projekat u C-u napravljen je u %{dest}. -Comment[sv]=Ett enkelt C-projekt skapades i %{dest}. -Comment[tr]=Basit bir C projesi %{dest} içinde oluşturuldu. -Comment[zh_CN]=在 %{dest} 中创建了简单的 C 工程。 -Comment[zh_TW]=一個簡單的 C 專案已建立在 %{dest}。 -Archive=chello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/c-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/c-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/main.c -Dest=%{dest}/src/%{APPNAMELC}.c - diff --git a/languages/cpp/app_templates/chello_gba/CMakeLists.txt b/languages/cpp/app_templates/chello_gba/CMakeLists.txt index 6810ed53..b11230fe 100644 --- a/languages/cpp/app_templates/chello_gba/CMakeLists.txt +++ b/languages/cpp/app_templates/chello_gba/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( chellogba.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/chellogba.tar.gz chellogba.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - chellogba.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + chellogba.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/chello_gba/Makefile.am b/languages/cpp/app_templates/chello_gba/Makefile.am index afaf8c0b..fbc6c2b4 100644 --- a/languages/cpp/app_templates/chello_gba/Makefile.am +++ b/languages/cpp/app_templates/chello_gba/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.c font.raw.c master.pal.c src-Makefile.am c-Makefile.am \ templateName = chellogba ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/chello_gba/app.tdevelop b/languages/cpp/app_templates/chello_gba/app.tdevelop index 3c38bcf4..2f59c978 100644 --- a/languages/cpp/app_templates/chello_gba/app.tdevelop +++ b/languages/cpp/app_templates/chello_gba/app.tdevelop @@ -11,10 +11,10 @@ GBA - TDevDebugger + KDevDebugger - + src/%{APPNAMELC} @@ -33,11 +33,11 @@ -nostartfiles - - + + src/%{APPNAMELC}.gba - - + + ada ada_bugs_gcc @@ -84,17 +84,17 @@ TDE Libraries (Doxygen) - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/chello_gba/chellogba.kdevtemplate b/languages/cpp/app_templates/chello_gba/chellogba.kdevtemplate new file mode 100644 index 00000000..ef89357f --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/chellogba.kdevtemplate @@ -0,0 +1,173 @@ +# TDE Config File +[General] +Name=Hello world program +Name[ca]=Programa Hello world +Name[da]=Goddag verden program +Name[de]="Hello World"-Programm +Name[el]=Πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» +Name[et]="Tere,maailm" programm +Name[eu]="Kaixo mundua" programa +Name[fa]=برنامۀ Hello world +Name[fr]=Programme « Bonjour monde » +Name[ga]=Ríomhchlár "Hello world" +Name[gl]=Programa Ola mundo +Name[it]=Programma di "Hello world" +Name[ja]=Hello world プログラム +Name[nds]="Moin Welt"-Programm +Name[ne]=हेल्डो वोल्ड कार्यक्रम +Name[nl]=Hello World-programma +Name[pl]=Program 'Witaj świecie' +Name[pt]=Programa 'Olá mundo' +Name[pt_BR]=Programa 'Olá mundo' +Name[ru]=Программа Hello world +Name[sk]=Ahoj svet program +Name[sl]=Program Hello world +Name[sr]=Програм „Здраво свете“ +Name[sr@Latn]=Program „Zdravo svete“ +Name[sv]=Hello world-program +Name[tr]=Merhaba Dünya Programı +Name[zh_CN]=Hello world 程序 +Name[zh_TW]=Hello world 程式 +Icon=chellogba.png +Category=C/GBA +Comment=Generates a simple "Hello world" program for the Gameboy Advance. You will need the "devkitadvance" to compile it. See README.devel for more details. +Comment[ca]=Genera un simple programa de "Hello world" per a la Gameboy Advance. Necessitareu "devkitadvance" per a compilar-lo. Consulteu el README.devel per a més detalls. +Comment[da]=Genererer et simpelt "Goddag verden" program for Gameboy Advance. Du vil skulle bruge "devkitadvance" for at kompilere det. Se README.devel for flere detaljer. +Comment[de]=Erstellt ein einfaches "Hello world"-Programm für den Gameboy Advance. Sie benötigen zum Kompilieren das "devkitadvance". Weitere Einzelheiten finden Sie in der Datei README.devel. +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα "Γεια σου κόσμε" για το Gameboy Advance. Θα χρειαστείτε το "devkitadvance" για τη μεταγλώττισή του. Ανατρέξτε στο README.devel για περισσότερες πληροφορίες. +Comment[es]=Genera un sencillo programa «Hola mundo» para Gameboy Advance. Necesitará «devkitadvance» para compilarlo. Vea README.devel para más detalles. +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Gameboy Advance'i jaoks. Kompileerimiseks on vajalik "devkitadvance". Täpsemalt räägib sellest fail README.devel. +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Gameboy Advance-erako. "devkitadvance" behar duzu konpilatzeko. Ikusi README.devel xehetasun gehiagorako. +Comment[fa]=یک برنامۀ سادۀ «Hello world» برای Gameboy Advance تولید می‌کند. برای ترجمۀ آن به »devkitadvance« نیاز دارید. برای جزئیات بیشتر، README.devel را ببینید. +Comment[fr]=Génère un programme « Bonjour monde » simple pour la Gameboy Advance. Vous aurez besoin de « devkitadvance » pour le compiler. Consultez le fichier README.devel pour plus de détails. +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" le haghaidh an Gameboy Advance. Tá gá le "devkitadvance" chun é a thiomsú. Féach ar README.devel chun tuilleadh sonraí a fháil. +Comment[gl]=Xera un programa sinxelo "Ola mundo" para Gameboy Advance. Necesitará "devkitadvance" para compilalo. Consulte README.devel para máis detalles. +Comment[hu]=Létrehoz egy egyszerű Hello world programot a Gameboy Advance-hoz. Lefordításához szükség van a "devkitadvance" csomag telepítésére. További információ a README.devel fájlban található. +Comment[it]=Genera un semplice programma di "Hello world" per il Gameboy Advance. Serve il "devkitadvance" per compilarlo. Guarda un po' README.devel per ulteriori dettagli. +Comment[ja]=Gameboy Advance のための Hello world プログラムを作成します。コンパイルするには devkitadvance が必要です。詳しくは README.devel をご覧ください。 +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm för "Gameboy Advance" op. För't Kompileren deit "devkitadvance" noot. Mehr Enkelheiten laat sik binnen "README.devel" finnen. +Comment[ne]=गेमब्याए एडभान्सका लागि साधारण "हेल्लो वोल्ड नमस्कार" उत्पन्न गर्दछ । यसलाई कम्पाइल गर्न तपाईँलाई "devkitadvance" आवश्यक पर्दछ । बढी जानकारीका लागि README.devel हेर्नुहोस् । +Comment[nl]=Genereert een eenvoudig "Hello World" programma voor de Gameboy Advance. U hebt "devkitadvance" nodig om het te kunnen compileren. Zie het bestand README.devel voor meer informatie. +Comment[pl]=Generuje prosty program "Witaj świecie" na konsolę Gameboy Advance. Do skompilowania go potrzebny jest "devkitadvance". Więcej informacji można znaleźć w pliku README.devel. +Comment[pt]=Gera um programa simples "Olá mundo" para o Gameboy Advance. Irá necessitar do "devkitadvance" para o compilar. Veja o README.devel para mais detalhes. +Comment[pt_BR]=Gera um programa simples "Olá mundo" para o Gameboy Advance. Irá necessitar do "devkitadvance" para o compilar. Veja o README.devel para mais detalhes. +Comment[ru]=Создание простой программы "Hello world" на Gameboy Advance. Вам необходима программа "devkitadvance" для её сборки. Прочтите файл README.devel. +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program pre Gameboy Advance.Budete potrebovať "devkitadvance" na to, aby ste ho skompilovali.Pozrite súbor README.devel pre viac detailov. +Comment[sl]=Ustvari preprost program »Pozdravljen svet« za Gameboy Advance. Za prevajanje boste potrebovali »devkitadvance«. Podrobnosti si lahko ogledate v README.devel. +Comment[sr]=Прави једноставан „Здраво свете“ програм за Gameboy Advance. Требаће вам „devkitadvance“ да бисте га превели. Погледајте README.devel за више детаља. +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program za Gameboy Advance. Trebaće vam „devkitadvance“ da biste ga preveli. Pogledajte README.devel za više detalja. +Comment[sv]=Skapar ett enkelt "Hello world"-program för Gameboy Advance. Du behöver "devkitadvance" för att kompilera det. Se filen README.devel för mer information. +Comment[tr]=Gameboy Advance için basit bir "Merhaba Dünya" programı üretir. Derlemek için "devkitadvance" paketine ihtiyacınız olacak. Daha fazla bilgi için README.devel dosyasına bakın. +Comment[zh_CN]=生成 Gameboy Advance 下的“Hello world”程序。您需要“devkitadvane”才能编译。请查看 README.devel 中的细节。 +Comment[zh_TW]=產生一個簡單的 Gameboy Advance 的 Hello world 程式。您需要 "devkitadvance" 來編譯。詳情請參考 README.devel。 +ShowFileAfterGeneration=README.devel +FileTemplates=h,CStyle,c,CStyle +ShowFilesAfterGeneration=%{dest}/src/main.c +Archive=chellogba.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/README.devel +Dest=%{dest}/README.devel + +[FILE3] +Type=install +Source=%{src}/c-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE4] +Type=install +Source=%{src}/c-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE5] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE6] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE7] +Type=install +Source=%{src}/main.c +Dest=%{dest}/src/main.c + +[FILE8] +Type=install +Source=%{src}/main.h +Dest=%{dest}/src/main.h + +[FILE9] +Type=install +Source=%{src}/gba.h +Dest=%{dest}/src/gba.h + +[FILE10] +Type=install +Source=%{src}/font.bmp +Dest=%{dest}/src/font.bmp + +[FILE11] +Type=install +Source=%{src}/font.raw.c +Dest=%{dest}/src/font.raw.c + +[FILE12] +Type=install +Source=%{src}/master.pal.c +Dest=%{dest}/src/master.pal.c + +[MSG] +Type=message +Comment=A Hello World program was created in %{dest} +Comment[ca]=A programa de Hello World ha estat creat en %{dest} +Comment[da]=Et Goddag verden program blev oprettet i %{dest} +Comment[de]=Ein "Hello World"-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε δημιουργήθηκε στο %{dest} +Comment[es]=Un programa «Hola mundo» ha sido creado en %{dest} +Comment[et]="Tere, maailm" programm loodi asukohta %{dest} +Comment[eu]="Kaixo mundua" programa bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ Hello World در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár "Hello World" i %{dest} +Comment[gl]=Creouse un programa Ola mundo en %{dest} +Comment[hu]=Létrejött egy Hello World program itt: %{dest} +Comment[it]=È stato creato un programma di "Hello World" in %{dest} +Comment[ja]=Hello World プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en "Moin Welt"-Programm opstellt +Comment[ne]=एउटा हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een Hello World-programma is aangemaakt in %{dest} +Comment[pl]=Program 'Witaj świecie' utworzony w %{dest}. +Comment[pt]=Foi criado um programa Olá Mundo em %{dest} +Comment[pt_BR]=Foi criado um programa Olá Mundo em %{dest} +Comment[ru]=Простое приложение Hello World создано в %{dest} +Comment[sk]=Ahoj svet program bol vytvorený v %{dest} +Comment[sl]=Program »Pozdravljen svet« je bil ustvarjen v %{dest} +Comment[sr]=„Здраво свете“ је направљен у %{dest} +Comment[sr@Latn]=„Zdravo svete“ je napravljen u %{dest} +Comment[sv]=Ett Hello World-program skapades i %{dest} +Comment[tr]=Bir Merhaba Dünya programı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 Hello world 程序 +Comment[zh_TW]=一個 Hello World 程式已經建立在 %{dest} diff --git a/languages/cpp/app_templates/chello_gba/chellogba.tdevtemplate b/languages/cpp/app_templates/chello_gba/chellogba.tdevtemplate deleted file mode 100644 index e6ea8c90..00000000 --- a/languages/cpp/app_templates/chello_gba/chellogba.tdevtemplate +++ /dev/null @@ -1,173 +0,0 @@ -# TDE Config File -[General] -Name=Hello world program -Name[ca]=Programa Hello world -Name[da]=Goddag verden program -Name[de]="Hello World"-Programm -Name[el]=Πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» -Name[et]="Tere,maailm" programm -Name[eu]="Kaixo mundua" programa -Name[fa]=برنامۀ Hello world -Name[fr]=Programme « Bonjour monde » -Name[ga]=Ríomhchlár "Hello world" -Name[gl]=Programa Ola mundo -Name[it]=Programma di "Hello world" -Name[ja]=Hello world プログラム -Name[nds]="Moin Welt"-Programm -Name[ne]=हेल्डो वोल्ड कार्यक्रम -Name[nl]=Hello World-programma -Name[pl]=Program 'Witaj świecie' -Name[pt]=Programa 'Olá mundo' -Name[pt_BR]=Programa 'Olá mundo' -Name[ru]=Программа Hello world -Name[sk]=Ahoj svet program -Name[sl]=Program Hello world -Name[sr]=Програм „Здраво свете“ -Name[sr@Latn]=Program „Zdravo svete“ -Name[sv]=Hello world-program -Name[tr]=Merhaba Dünya Programı -Name[zh_CN]=Hello world 程序 -Name[zh_TW]=Hello world 程式 -Icon=chellogba.png -Category=C/GBA -Comment=Generates a simple "Hello world" program for the Gameboy Advance. You will need the "devkitadvance" to compile it. See README.devel for more details. -Comment[ca]=Genera un simple programa de "Hello world" per a la Gameboy Advance. Necessitareu "devkitadvance" per a compilar-lo. Consulteu el README.devel per a més detalls. -Comment[da]=Genererer et simpelt "Goddag verden" program for Gameboy Advance. Du vil skulle bruge "devkitadvance" for at kompilere det. Se README.devel for flere detaljer. -Comment[de]=Erstellt ein einfaches "Hello world"-Programm für den Gameboy Advance. Sie benötigen zum Kompilieren das "devkitadvance". Weitere Einzelheiten finden Sie in der Datei README.devel. -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα "Γεια σου κόσμε" για το Gameboy Advance. Θα χρειαστείτε το "devkitadvance" για τη μεταγλώττισή του. Ανατρέξτε στο README.devel για περισσότερες πληροφορίες. -Comment[es]=Genera un sencillo programa «Hola mundo» para Gameboy Advance. Necesitará «devkitadvance» para compilarlo. Vea README.devel para más detalles. -Comment[et]=Lihtsa "Tere, maailm" programmi loomine Gameboy Advance'i jaoks. Kompileerimiseks on vajalik "devkitadvance". Täpsemalt räägib sellest fail README.devel. -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Gameboy Advance-erako. "devkitadvance" behar duzu konpilatzeko. Ikusi README.devel xehetasun gehiagorako. -Comment[fa]=یک برنامۀ سادۀ «Hello world» برای Gameboy Advance تولید می‌کند. برای ترجمۀ آن به »devkitadvance« نیاز دارید. برای جزئیات بیشتر، README.devel را ببینید. -Comment[fr]=Génère un programme « Bonjour monde » simple pour la Gameboy Advance. Vous aurez besoin de « devkitadvance » pour le compiler. Consultez le fichier README.devel pour plus de détails. -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" le haghaidh an Gameboy Advance. Tá gá le "devkitadvance" chun é a thiomsú. Féach ar README.devel chun tuilleadh sonraí a fháil. -Comment[gl]=Xera un programa sinxelo "Ola mundo" para Gameboy Advance. Necesitará "devkitadvance" para compilalo. Consulte README.devel para máis detalles. -Comment[hu]=Létrehoz egy egyszerű Hello world programot a Gameboy Advance-hoz. Lefordításához szükség van a "devkitadvance" csomag telepítésére. További információ a README.devel fájlban található. -Comment[it]=Genera un semplice programma di "Hello world" per il Gameboy Advance. Serve il "devkitadvance" per compilarlo. Guarda un po' README.devel per ulteriori dettagli. -Comment[ja]=Gameboy Advance のための Hello world プログラムを作成します。コンパイルするには devkitadvance が必要です。詳しくは README.devel をご覧ください。 -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm för "Gameboy Advance" op. För't Kompileren deit "devkitadvance" noot. Mehr Enkelheiten laat sik binnen "README.devel" finnen. -Comment[ne]=गेमब्याए एडभान्सका लागि साधारण "हेल्लो वोल्ड नमस्कार" उत्पन्न गर्दछ । यसलाई कम्पाइल गर्न तपाईँलाई "devkitadvance" आवश्यक पर्दछ । बढी जानकारीका लागि README.devel हेर्नुहोस् । -Comment[nl]=Genereert een eenvoudig "Hello World" programma voor de Gameboy Advance. U hebt "devkitadvance" nodig om het te kunnen compileren. Zie het bestand README.devel voor meer informatie. -Comment[pl]=Generuje prosty program "Witaj świecie" na konsolę Gameboy Advance. Do skompilowania go potrzebny jest "devkitadvance". Więcej informacji można znaleźć w pliku README.devel. -Comment[pt]=Gera um programa simples "Olá mundo" para o Gameboy Advance. Irá necessitar do "devkitadvance" para o compilar. Veja o README.devel para mais detalhes. -Comment[pt_BR]=Gera um programa simples "Olá mundo" para o Gameboy Advance. Irá necessitar do "devkitadvance" para o compilar. Veja o README.devel para mais detalhes. -Comment[ru]=Создание простой программы "Hello world" на Gameboy Advance. Вам необходима программа "devkitadvance" для её сборки. Прочтите файл README.devel. -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program pre Gameboy Advance.Budete potrebovať "devkitadvance" na to, aby ste ho skompilovali.Pozrite súbor README.devel pre viac detailov. -Comment[sl]=Ustvari preprost program »Pozdravljen svet« za Gameboy Advance. Za prevajanje boste potrebovali »devkitadvance«. Podrobnosti si lahko ogledate v README.devel. -Comment[sr]=Прави једноставан „Здраво свете“ програм за Gameboy Advance. Требаће вам „devkitadvance“ да бисте га превели. Погледајте README.devel за више детаља. -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program za Gameboy Advance. Trebaće vam „devkitadvance“ da biste ga preveli. Pogledajte README.devel za više detalja. -Comment[sv]=Skapar ett enkelt "Hello world"-program för Gameboy Advance. Du behöver "devkitadvance" för att kompilera det. Se filen README.devel för mer information. -Comment[tr]=Gameboy Advance için basit bir "Merhaba Dünya" programı üretir. Derlemek için "devkitadvance" paketine ihtiyacınız olacak. Daha fazla bilgi için README.devel dosyasına bakın. -Comment[zh_CN]=生成 Gameboy Advance 下的“Hello world”程序。您需要“devkitadvane”才能编译。请查看 README.devel 中的细节。 -Comment[zh_TW]=產生一個簡單的 Gameboy Advance 的 Hello world 程式。您需要 "devkitadvance" 來編譯。詳情請參考 README.devel。 -ShowFileAfterGeneration=README.devel -FileTemplates=h,CStyle,c,CStyle -ShowFilesAfterGeneration=%{dest}/src/main.c -Archive=chellogba.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/README.devel -Dest=%{dest}/README.devel - -[FILE3] -Type=install -Source=%{src}/c-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE4] -Type=install -Source=%{src}/c-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE5] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE6] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE7] -Type=install -Source=%{src}/main.c -Dest=%{dest}/src/main.c - -[FILE8] -Type=install -Source=%{src}/main.h -Dest=%{dest}/src/main.h - -[FILE9] -Type=install -Source=%{src}/gba.h -Dest=%{dest}/src/gba.h - -[FILE10] -Type=install -Source=%{src}/font.bmp -Dest=%{dest}/src/font.bmp - -[FILE11] -Type=install -Source=%{src}/font.raw.c -Dest=%{dest}/src/font.raw.c - -[FILE12] -Type=install -Source=%{src}/master.pal.c -Dest=%{dest}/src/master.pal.c - -[MSG] -Type=message -Comment=A Hello World program was created in %{dest} -Comment[ca]=A programa de Hello World ha estat creat en %{dest} -Comment[da]=Et Goddag verden program blev oprettet i %{dest} -Comment[de]=Ein "Hello World"-Programm wurde in %{dest} erstellt. -Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε δημιουργήθηκε στο %{dest} -Comment[es]=Un programa «Hola mundo» ha sido creado en %{dest} -Comment[et]="Tere, maailm" programm loodi asukohta %{dest} -Comment[eu]="Kaixo mundua" programa bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ Hello World در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár "Hello World" i %{dest} -Comment[gl]=Creouse un programa Ola mundo en %{dest} -Comment[hu]=Létrejött egy Hello World program itt: %{dest} -Comment[it]=È stato creato un programma di "Hello World" in %{dest} -Comment[ja]=Hello World プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en "Moin Welt"-Programm opstellt -Comment[ne]=एउटा हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een Hello World-programma is aangemaakt in %{dest} -Comment[pl]=Program 'Witaj świecie' utworzony w %{dest}. -Comment[pt]=Foi criado um programa Olá Mundo em %{dest} -Comment[pt_BR]=Foi criado um programa Olá Mundo em %{dest} -Comment[ru]=Простое приложение Hello World создано в %{dest} -Comment[sk]=Ahoj svet program bol vytvorený v %{dest} -Comment[sl]=Program »Pozdravljen svet« je bil ustvarjen v %{dest} -Comment[sr]=„Здраво свете“ је направљен у %{dest} -Comment[sr@Latn]=„Zdravo svete“ je napravljen u %{dest} -Comment[sv]=Ett Hello World-program skapades i %{dest} -Comment[tr]=Bir Merhaba Dünya programı %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 Hello world 程序 -Comment[zh_TW]=一個 Hello World 程式已經建立在 %{dest} diff --git a/languages/cpp/app_templates/clanlib/CMakeLists.txt b/languages/cpp/app_templates/clanlib/CMakeLists.txt index c8fdfe2d..e0b99cc2 100644 --- a/languages/cpp/app_templates/clanlib/CMakeLists.txt +++ b/languages/cpp/app_templates/clanlib/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( clanlib.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/clanlib.tar.gz clanlib.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - clanlib.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + clanlib.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/clanlib/Makefile.am b/languages/cpp/app_templates/clanlib/Makefile.am index b6aa9150..84e0459b 100644 --- a/languages/cpp/app_templates/clanlib/Makefile.am +++ b/languages/cpp/app_templates/clanlib/Makefile.am @@ -3,10 +3,10 @@ dataFiles = src-Makefile.am app-Makefile.am main.cpp app.tdevelop \ templateName = clanlib ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/clanlib/app.tdevelop b/languages/cpp/app_templates/clanlib/app.tdevelop index 15418279..d2e9e430 100644 --- a/languages/cpp/app_templates/clanlib/app.tdevelop +++ b/languages/cpp/app_templates/clanlib/app.tdevelop @@ -12,7 +12,7 @@ ClanLib - + src/%{APPNAMELC} debug @@ -43,8 +43,8 @@ - - + + ada ada_bugs_gcc @@ -90,17 +90,17 @@ TDE Libraries (Doxygen) - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/clanlib/clanlib.kdevtemplate b/languages/cpp/app_templates/clanlib/clanlib.kdevtemplate new file mode 100644 index 00000000..1b39badc --- /dev/null +++ b/languages/cpp/app_templates/clanlib/clanlib.kdevtemplate @@ -0,0 +1,138 @@ +# TDE Config File +[General] +Name=Simple ClanLib application +Name[ca]=Una simple aplicació de ClanLib +Name[da]=Simpelt ClanLib program +Name[de]=Eine einfache ClanLib-Anwendung +Name[el]=Μια απλή εφαρμογή ClanLib +Name[es]=Una sencilla aplicación de ClanLib +Name[et]=Lihtne ClanLib rakendus +Name[eu]=ClanLib aplikazio simple bat +Name[fa]=کاربرد سادۀ ClanLib +Name[fr]=Application ClanLib simple +Name[ga]=Feidhmchlár simplí ClanLib +Name[gl]=Aplicación sinxela ClanLib +Name[hu]=Egyszerű Clanlib-alkalmazás +Name[it]=semplice applicazione ClanLib +Name[ja]=簡単な ClanLib アプリケーション +Name[nds]=En eenfach ClanLib-Programm +Name[ne]=साधारण ClanLib अनुप्रयोग +Name[nl]=Eenvoudige ClanLib-toepassing +Name[pl]=Prosty program używający ClanLib +Name[pt]=Aplicação simples da ClanLib +Name[pt_BR]=Aplicação simples da ClanLib +Name[ru]=Простое приложение ClanLib +Name[sk]=Jednoduchá ClanLib aplikácia +Name[sl]=Preprost program ClanLib +Name[sr]=Једноставан ClanLib програм +Name[sr@Latn]=Jednostavan ClanLib program +Name[sv]=Enkelt ClanLib-program +Name[tr]=Basit ClanLib uygulaması +Name[zh_CN]=简单的 ClanLib 应用程序 +Name[zh_TW]=簡單的 ClanLib 應用程式 +Category=C++ +Icon=clanlib.png +Comment=Generates a simple ClanLib application. +Comment[ca]=Genera una simple aplicació de ClanLib. +Comment[da]=Genererer et simpelt ClanLib program +Comment[de]=Erstellt eine einfache ClanLib-Anwendung. +Comment[el]=Δημιουργεί μια απλή εφαρμογή ClanLib. +Comment[es]=Genera una sencilla aplicación de ClanLib. +Comment[et]=Lihtsa ClanLib'i rakenduse loomine. +Comment[eu]=ClanLib aplikazio simple bat sortzen du. +Comment[fa]=یک کاربرد سادۀ ClanLib تولید می‌کند. +Comment[fr]=Génère une application ClanLib simple. +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí ClanLib. +Comment[gl]=Xera una aplicación sinxela ClanLib. +Comment[hu]=Létrehoz egy egyszerű Clanlib-alkalmazást. +Comment[it]=Genera una semplice applicazione ClanLib. +Comment[ja]=簡単な ClanLib アプリケーションを作成します +Comment[nds]=Stellt en eenfach ClanLib-Programm op. +Comment[ne]=साधारण ClanLib अनुप्रयोग सिर्जना गर्दछ । +Comment[nl]=Genereert een eenvoudige ClanLib-toepassing +Comment[pl]=Generuje prosty program używający ClanLib. +Comment[pt]=Gera uma aplicação simples com o ClanLib. +Comment[pt_BR]=Gera uma aplicação simples com o ClanLib. +Comment[ru]=Создание простого приложения ClanLib. +Comment[sk]=Vygeneruje jednoduchú ClanLib aplikáciu. +Comment[sl]=Ustvari preprost program ClanLib. +Comment[sr]=Прави једноставан ClanLib програм. +Comment[sr@Latn]=Pravi jednostavan ClanLib program. +Comment[sv]=Skapar ett enkelt ClanLib-program. +Comment[tr]=Basit bir ClanLib uygulaması yaratır. +Comment[zh_CN]=生成简单的 ClanLib 应用程序。 +Comment[zh_TW]=產生簡單的 ClanLib 應用程式。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/main.cpp +Archive=clanlib.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/app-configure.in +Dest=%{dest}/configure.in + +[FILE4] +Type=install +Source=%{src}/app-autogen.sh +Dest=%{dest}/autogen.sh + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[MSG] +Type=message +Comment=A simple clanlib application was created in %{dest} +Comment[ca]=Una simple aplicació de clanlib ha estat creada en %{dest} +Comment[da]=Et simpelt clanlib program blev oprettet i %{dest} +Comment[de]=Eine einfache ClanLib-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια απλή εφαρμογή clanlib δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación de ClanLib sencilla ha sido creada en %{dest} +Comment[et]=Lihtne ClanLib'i rakendus loodi asukohta %{dest} +Comment[eu]=clanlib aplikazio simple bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد سادۀ clanlib در %{dest} ایجاد شد +Comment[fr]=Une application Clanlib simple a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár simplí clanlib i %{dest} +Comment[gl]=Creouse una apliación sinxela clanlib en %{dest} +Comment[hu]=Létrejött egy egyszerű Clanlib-alkalmazás itt: %{dest} +Comment[it]=È stata creata una semplice applicazione clanlib in %{dest} +Comment[ja]=簡単な clanlib アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach ClanLib-Programm opstellt +Comment[ne]=साधारण clanlib अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een voorbeeld ClanLib-toepassing is aangemaakt in %{dest} +Comment[pl]=Prosty program używający ClanLib został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação simples da ClanLib em %{dest} +Comment[pt_BR]=Foi criada uma aplicação simples da ClanLib em %{dest} +Comment[ru]=Простое приложение ClanLib создано в %{dest} +Comment[sk]=Jednoduchá ClanLib aplikácia bola vytvorená v %{dest} +Comment[sl]=Preprost program clanlib je bil ustvarjen v %{dest} +Comment[sr]=Једноставан clanlib програм је направљен у %{dest} +Comment[sr@Latn]=Jednostavan clanlib program je napravljen u %{dest} +Comment[sv]=Ett enkelt ClanLib-program skapades i %{dest} +Comment[zh_CN]=在 %{dest} 中创建了一个简单的 clanlib 程序 +Comment[zh_TW]=一個簡單的 clanlib 應用程式已經建立在 %{dest} diff --git a/languages/cpp/app_templates/clanlib/clanlib.tdevtemplate b/languages/cpp/app_templates/clanlib/clanlib.tdevtemplate deleted file mode 100644 index 89243557..00000000 --- a/languages/cpp/app_templates/clanlib/clanlib.tdevtemplate +++ /dev/null @@ -1,138 +0,0 @@ -# TDE Config File -[General] -Name=Simple ClanLib application -Name[ca]=Una simple aplicació de ClanLib -Name[da]=Simpelt ClanLib program -Name[de]=Eine einfache ClanLib-Anwendung -Name[el]=Μια απλή εφαρμογή ClanLib -Name[es]=Una sencilla aplicación de ClanLib -Name[et]=Lihtne ClanLib rakendus -Name[eu]=ClanLib aplikazio simple bat -Name[fa]=کاربرد سادۀ ClanLib -Name[fr]=Application ClanLib simple -Name[ga]=Feidhmchlár simplí ClanLib -Name[gl]=Aplicación sinxela ClanLib -Name[hu]=Egyszerű Clanlib-alkalmazás -Name[it]=semplice applicazione ClanLib -Name[ja]=簡単な ClanLib アプリケーション -Name[nds]=En eenfach ClanLib-Programm -Name[ne]=साधारण ClanLib अनुप्रयोग -Name[nl]=Eenvoudige ClanLib-toepassing -Name[pl]=Prosty program używający ClanLib -Name[pt]=Aplicação simples da ClanLib -Name[pt_BR]=Aplicação simples da ClanLib -Name[ru]=Простое приложение ClanLib -Name[sk]=Jednoduchá ClanLib aplikácia -Name[sl]=Preprost program ClanLib -Name[sr]=Једноставан ClanLib програм -Name[sr@Latn]=Jednostavan ClanLib program -Name[sv]=Enkelt ClanLib-program -Name[tr]=Basit ClanLib uygulaması -Name[zh_CN]=简单的 ClanLib 应用程序 -Name[zh_TW]=簡單的 ClanLib 應用程式 -Category=C++ -Icon=clanlib.png -Comment=Generates a simple ClanLib application. -Comment[ca]=Genera una simple aplicació de ClanLib. -Comment[da]=Genererer et simpelt ClanLib program -Comment[de]=Erstellt eine einfache ClanLib-Anwendung. -Comment[el]=Δημιουργεί μια απλή εφαρμογή ClanLib. -Comment[es]=Genera una sencilla aplicación de ClanLib. -Comment[et]=Lihtsa ClanLib'i rakenduse loomine. -Comment[eu]=ClanLib aplikazio simple bat sortzen du. -Comment[fa]=یک کاربرد سادۀ ClanLib تولید می‌کند. -Comment[fr]=Génère une application ClanLib simple. -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí ClanLib. -Comment[gl]=Xera una aplicación sinxela ClanLib. -Comment[hu]=Létrehoz egy egyszerű Clanlib-alkalmazást. -Comment[it]=Genera una semplice applicazione ClanLib. -Comment[ja]=簡単な ClanLib アプリケーションを作成します -Comment[nds]=Stellt en eenfach ClanLib-Programm op. -Comment[ne]=साधारण ClanLib अनुप्रयोग सिर्जना गर्दछ । -Comment[nl]=Genereert een eenvoudige ClanLib-toepassing -Comment[pl]=Generuje prosty program używający ClanLib. -Comment[pt]=Gera uma aplicação simples com o ClanLib. -Comment[pt_BR]=Gera uma aplicação simples com o ClanLib. -Comment[ru]=Создание простого приложения ClanLib. -Comment[sk]=Vygeneruje jednoduchú ClanLib aplikáciu. -Comment[sl]=Ustvari preprost program ClanLib. -Comment[sr]=Прави једноставан ClanLib програм. -Comment[sr@Latn]=Pravi jednostavan ClanLib program. -Comment[sv]=Skapar ett enkelt ClanLib-program. -Comment[tr]=Basit bir ClanLib uygulaması yaratır. -Comment[zh_CN]=生成简单的 ClanLib 应用程序。 -Comment[zh_TW]=產生簡單的 ClanLib 應用程式。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/main.cpp -Archive=clanlib.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/app-configure.in -Dest=%{dest}/configure.in - -[FILE4] -Type=install -Source=%{src}/app-autogen.sh -Dest=%{dest}/autogen.sh - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[MSG] -Type=message -Comment=A simple clanlib application was created in %{dest} -Comment[ca]=Una simple aplicació de clanlib ha estat creada en %{dest} -Comment[da]=Et simpelt clanlib program blev oprettet i %{dest} -Comment[de]=Eine einfache ClanLib-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια απλή εφαρμογή clanlib δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación de ClanLib sencilla ha sido creada en %{dest} -Comment[et]=Lihtne ClanLib'i rakendus loodi asukohta %{dest} -Comment[eu]=clanlib aplikazio simple bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد سادۀ clanlib در %{dest} ایجاد شد -Comment[fr]=Une application Clanlib simple a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár simplí clanlib i %{dest} -Comment[gl]=Creouse una apliación sinxela clanlib en %{dest} -Comment[hu]=Létrejött egy egyszerű Clanlib-alkalmazás itt: %{dest} -Comment[it]=È stata creata una semplice applicazione clanlib in %{dest} -Comment[ja]=簡単な clanlib アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach ClanLib-Programm opstellt -Comment[ne]=साधारण clanlib अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een voorbeeld ClanLib-toepassing is aangemaakt in %{dest} -Comment[pl]=Prosty program używający ClanLib został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação simples da ClanLib em %{dest} -Comment[pt_BR]=Foi criada uma aplicação simples da ClanLib em %{dest} -Comment[ru]=Простое приложение ClanLib создано в %{dest} -Comment[sk]=Jednoduchá ClanLib aplikácia bola vytvorená v %{dest} -Comment[sl]=Preprost program clanlib je bil ustvarjen v %{dest} -Comment[sr]=Једноставан clanlib програм је направљен у %{dest} -Comment[sr@Latn]=Jednostavan clanlib program je napravljen u %{dest} -Comment[sv]=Ett enkelt ClanLib-program skapades i %{dest} -Comment[zh_CN]=在 %{dest} 中创建了一个简单的 clanlib 程序 -Comment[zh_TW]=一個簡單的 clanlib 應用程式已經建立在 %{dest} diff --git a/languages/cpp/app_templates/cmakelibc/CMakeLists.txt b/languages/cpp/app_templates/cmakelibc/CMakeLists.txt index df6ec7b7..841853d8 100644 --- a/languages/cpp/app_templates/cmakelibc/CMakeLists.txt +++ b/languages/cpp/app_templates/cmakelibc/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( cmakelibc.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cmakelibc.tar.gz cmakelibc.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cmakelibc.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cmakelibc.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cmakelibc/Makefile.am b/languages/cpp/app_templates/cmakelibc/Makefile.am index f4fb8bb2..c10e704a 100644 --- a/languages/cpp/app_templates/cmakelibc/Makefile.am +++ b/languages/cpp/app_templates/cmakelibc/Makefile.am @@ -2,10 +2,10 @@ dataFiles = test.c lib.h lib.c cmakelibc.png CMakeLists.txt CMakeLists.txt.src templateName = cmakelibc ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cmakelibc/cmakelibc.kdevtemplate b/languages/cpp/app_templates/cmakelibc/cmakelibc.kdevtemplate new file mode 100644 index 00000000..c05eaec4 --- /dev/null +++ b/languages/cpp/app_templates/cmakelibc/cmakelibc.kdevtemplate @@ -0,0 +1,139 @@ +# TDE Config File +[General] +Name=A shared library template +Name[ca]=Una plantilla de biblioteca compartida +Name[da]=En delt biblitekskabelon +Name[de]=Vorlage für eine Shared Library +Name[el]=Ένα πρότυπο κοινόχρηστης βιβλιοθήκης +Name[es]=Una plantilla de biblioteca compartida +Name[et]=Jagatud teegi mall +Name[eu]=Liburutegi partekatu baten txantiloia +Name[fa]=قالب کتابخانۀ مشترک +Name[fr]=Un modèle de bibliothèque partagée +Name[ga]=Teimpléad comhleabharlainne +Name[gl]=Plantilla de biblioteca compartida +Name[hu]=Osztott programkönyvtár-sablon +Name[it]=Un modello di libreria condivisa +Name[ja]=共有ライブラリのテンプレート +Name[nds]=Vörlaag för deelt Bibliotheek +Name[ne]=साझेदारी गरिएको लाइब्रेरी टेम्प्लेट +Name[nl]=Een gedeelde-bibliotheek-sjabloon +Name[pl]=Szablon współdzielonej biblioteki +Name[pt]=Um modelo de uma biblioteca dinâmica +Name[pt_BR]=Um modelo de uma biblioteca dinâmica +Name[ru]=Шаблон разделяемой библиотеки +Name[sk]=Šablóna pre zdieľanú knižnicu +Name[sl]=Predloga deljene knjižnice +Name[sr]=Шаблон дељене библиотеке +Name[sr@Latn]=Šablon deljene biblioteke +Name[sv]=En mall för ett delat bibliotek +Name[tr]=Bir paylaşılan kütüphane şablonu +Name[zh_CN]=共享库模板 +Name[zh_TW]=共享函式庫樣本 +Icon=cmakelibc.png +Category=C/CMake based projects +FileTemplates=h,CStyle,c,CStyle +Comment=Generates a shared library template including a test application in C. It compiles using the CMake build tool instead of the automake/autoconf/libtool combination. It requires cmake 2.1 (available from cmake cvs) or the upcoming cmake 2.2 release. +Comment[ca]=Genera una plantilla de biblioteca compartida incloguen una aplicació de prova en C. Es compila usant l'eina de construcció CMake en comptes de la combinació automake/autoconf/libtool. Requereix cmake 2.1 (disponible en el cvs de cmake) o la propera versió 2.2. +Comment[da]=Genererer en delt skabelon for et bibliotek inklusive et testprogram i C. Det kompilerer ved brug af CMake's byggeværktøj i stedet for automake/autoconf/libtool kombinationen. Det kræver cmake 2.1 (tilgængelig fra cmake cvs) eller den fremtidige cmake 2.2 udgivelse. +Comment[de]=Erstellt eine Vorlage für eine Shared Library inklusive einer Testanwendung in C. Der Kompiliervorgang wird mit CMake anstelle der Kombination automake/autoconf/libtool durchgeführt und erfordert CMake 2.1 (das über das CVS-Archiv von CMake verfügbar ist) oder die kommende Version 2.2 von CMake. +Comment[el]=Δημιουργεί ένα πρότυπο κοινόχρηστης βιβλιοθήκης που περιλαμβάνει και μια εφαρμογή δοκιμής σε C. Μεταγλωττίζεται χρησιμοποιώντας το εργαλείο κατασκευής CMake στη θέση του συνδυασμού automake/autoconf/libtool. Χρειάζεται το cmake 2.1 (διαθέσιμο από το cmake cvs) ή την επερχόμενη έκδοση cmake 2.2. +Comment[es]=Genera una plantilla de biblioteca compartida incluyendo una aplicación de prueba en C. Se compila usando la herramienta CMake en lugar de la combinación automake/autoconf/libtool. Requiere cmake 2.1 (disponible en el cvs de cmake) o la próxima cmake 2.2. +Comment[et]=Jagatud teegi malli loomine, kaasa arvatud testrakendus C-s. See kompileeritakse CMake'i ehitamistööriistaga, mitte automake/autoconf/libtool'i kombinatsiooniga. Selleks on vajalik CMake 2.1 (saadaval CMake'i CVSis) või peatne CMake'i versioon 2.2. +Comment[eu]=Liburutegi partekatu baten txantiloia sortzen du C lengoaian idatzitako probarako aplikazio batekin. CMake tresna erabiliz konpilatzen du automake/autoconf/libtool taldea erabili ordez. cmake 2.1 behar du (cmake cvs-an eskuragarri) edo hurrengo cmake 2.2. +Comment[fa]=یک قالب کتابخانۀ مشترک شامل کاربرد آزمایشی در سی تولید می‌کند. با استفاده از ابزار ساختن CMake به جای ترکیب automake/autoconf/libtool، ترجمه می‌کند. به cmake 2.1 )از cmake cvs قابل دسترس است( یا نشر cmake 2.2 در آیندۀ نزدیک، نیاز دارد. +Comment[fr]=Génère un modèle de bibliothèque partagée comprenant une application de test en C. La compilation s'effectue à l'aide de l'outil de construction CMake au lieu de la combinaison automake / autoconf / libtool. Nécessite CMake 2.1 (disponible sur le CVS de CMake) ou la version 2.2 de CMake à venir. +Comment[ga]=Cruthaigh teimpléad comhleabharlainne le feidhmchlár tástála i C. Tiomsaítear é le huirlis tógála CMake in ionad automake/autoconf/libtool. Tá cmake 2.1 de dhíth (ar fáil ó cmake cvs) nó leagan 2.2 cmake atá le teacht. +Comment[gl]=Xera unha plantilla de biblioteca compartida e máis unha aplicación de proba en C. Compílase usando a ferramenta CMake no lugar da combinación automake/autoconf/libtool. Require cmake 2.1 (dispoñíbel no cvs de cmake) ou a próxima versión cmake 2.2. +Comment[hu]=Létrehoz egy alap osztott programkönyvtárat és egy hozzá tartozó tesztprogramot C nyelven. A fordítási környezet a CMake-re fog alapulni (az automake/autoconf/libtool kombináció helyett). A CMake 2.1 (elérhető a CMake CVS-ben) vagy a rövidesen megjelenő CMake 2.2 szükséges hozzá. +Comment[it]=Genera un modello di libreria condivisa includente un'applicazione test in C. Compila usando CMake invece della combinazione automake/autoconf/libtool. Richiede cmake 2.1 (disponibile dal CVS di cmake) o la versione a venire di cmake 2.2. +Comment[ja]=共有ライブラリのテンプレートを作成します。同時に C でテストアプリケーションも作成します。コンパイルには、automake/autoconf/libtool ではなく CMake (2.1 または 2.2) が必要です。 +Comment[nds]=Stellt en Vörlaag för en deelt Bibliotheek mit en Testprogramm in C op. Dat Kompileren bruukt ansteed vun de "automake/autoconf/libtool"-Kombinatschoon "CMake" in de Verschoon 2.1 (ut dat cmake-CVS) oder 2.2 (de tokamen Utgaav). +Comment[ne]=C मा परीक्षण अनुप्रयोग सहितको साझेदारी टेम्प्लेट उत्पन्न गर्दछ । यसले automake/autoconf/libtool संयोजनको सट्टामा CMake निर्माण उपकरण प्रयोग गरेर कम्पाइल गर्दछ । यसका लागि cmake 2.1 (cmake cvs बाट उपलब्ध हुन्छ) वा अब आउने cmake 2.2 उत्पादन आवश्यक पर्दछ । +Comment[nl]=Genereert een gedeelde-bibliotheek-sjabloon inclusief een testtoepassing in C. Het compileert met behulp van de CMake build tool in plaats van de combinatie automake/autoconf/libtool. Het vereist cmake 2.1 (beschikbaar in het cvs van cmake) of de aankomende cmake 2.2-uitgave. +Comment[pl]=Generuje szablon współdzielonej biblioteki zawierający także program testowy w języku C. Kompilacja odbywa sie za pomocą narzędzia CMake zamiast kombinacji automake/autoconf/libtool. Wymaga cmake 2.1 (dostępnego z cvs-u cmake) lub nadchodzącej wersji 2.2. +Comment[pt]=Gera um modelo de uma biblioteca dinâmica, que inclui uma aplicação de testes em C. Ele é compilado com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. +Comment[pt_BR]=Gera um modelo de uma biblioteca dinâmica, que inclui uma aplicação de testes em C. Ele é compilado com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. +Comment[ru]=Создание шаблона разделяемой библиотеки, включая тестовую программу на C. Для сборки потребуется CMake вместо комбинации automake/autoconf/libtool. Потребуется cmake 2.1 (из CVS cmake) или релиз cmake 2.2. +Comment[sk]=Vygeneruje šablónu pre zdieľanú knižnicu vrátane testovacej aplikácie v C.Kompiluje sa pomocou nástroja CMake namiesto kombinácie automake/autoconf/libtool.Vyžaduje cmake 2.1 (dostupné v cmake cvs) alebo nadchádzajúci cmake 2.2 release. +Comment[sl]=Ustvari predlogo za deljeno knjižnico in testni program v C. Za prevajanje se namesto kombinacije automake/autoconf/libtool uporabi orodje za gradnjo CMake. Potreben je CMake 2.1 ali CMake 2.2. +Comment[sr]=Прави шаблон дељене библиотеке, укључујући и пробни програм у C-у. Преводи се помоћу алата CMake уместо комбинације Automake/Autoconf/Libtool. Захтева CMake 2.1 (доступан у CVS-у CMake-а) или надолазеће издање CMake 2.2. +Comment[sr@Latn]=Pravi šablon deljene biblioteke, uključujući i probni program u C-u. Prevodi se pomoću alata CMake umesto kombinacije Automake/Autoconf/Libtool. Zahteva CMake 2.1 (dostupan u CVS-u CMake-a) ili nadolazeće izdanje CMake 2.2. +Comment[sv]=Skapar en mall för ett delat bibliotek inklusive ett testprogram i C. Det kompileras med byggverktyget CMake istället för kombinationen automake/autoconf/libtool. Det kräver cmake 2.1 (tillgängligt från cmake CVS-arkiv) eller den förestående utgåvan av cmake 2.2. +Comment[tr]=C'de bir test uygulaması içeren bir paylaşılan kütüphane uygulaması yaratır. automake/autoconf/libtool birleşimini değil, CMake aracını kullanarak derlenir. cmake 2.1( cmake cvs'inden edinilebilir) veya yakında gelecek olan 2.2 sürümüne ihtiyaç duyar. +Comment[zh_CN]=生成一个共享库模板,其中包含一个 C 的测试应用程序。该模板使用 CMake 编译工具编译,而不是使用 automake/autoconf/libtool 的组合。该模板需要 cmake 2.1 (可从 cmake cvs 中获得)或即将发布的 cmake 2.2 版本。 +Comment[zh_TW]=產生一個共享函式庫樣本,包括一個 C 的測試程式。它要用 CMake 建立工具來編譯,而不是用 automake/autoconf/libtool 等。它需要 cmake 2.1(可以從 cmake cvs 中取得),或是以後的版本。 +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.c +Archive=cmakelibc.tar.gz + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/CMakeLists.txt +Dest=%{dest}/CMakeLists.txt + +[FILE2] +Type=install +EscapeXML=true +Source=%{src}/CMakeLists.txt.src +Dest=%{dest}/src/CMakeLists.txt + +[FILE3] +Type=install +EscapeXML=true +Source=%{src}/test.c +Dest=%{dest}/src/%{APPNAMELC}test.c + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/lib.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE5] +Type=install +EscapeXML=true +Source=%{src}/lib.c +Dest=%{dest}/src/%{APPNAMELC}.c + +[CMAKE] +Type=finishcmd +Command=cmake ./ -GTDevelop3 +Directory=%{dest} + +[MSG] +Type=message +Comment=A CMake based shared library template was created in %{dest} +Comment[ca]=Una plantilla de biblioteca compartida basada en CMake ha estat creada en %{dest} +Comment[da]=En CMake baseret skabelon for et delt bibliotek blev oprettet i %{dest} +Comment[de]=Eine auf CMake basierende Vorlage für eine Shared Library wurde in %{dest} erstellt. +Comment[el]=Ένα πρότυπο κοινόχρηστης βιβλιοθήκης βασισμένο στο CMake δημιουργήθηκε στο %{dest} +Comment[es]=Una plantilla de biblioteca compartida basada en CMake ha sido creada en %{dest} +Comment[et]=Jagatud teegi mall CMake'i põhjal loodi asukohta %{dest} +Comment[eu]=CMake-en oinarritutako liburutegi partekatu baten txantiloia sortu da hemen: %{dest} +Comment[fa]=یک قالب کتابخانۀ مشترک بر مبنای CMake در %{dest} ایجاد شد +Comment[fr]=Un modèle de bibliothèque partagée basée sur CMake a été créé dans %{dest} +Comment[ga]=Cruthaíodh teimpléad comhleabharlainne bunaithe ar CMake i %{dest} +Comment[gl]=Creouse una plantilla de biblioteca compartida baseada en CMake en %{dest} +Comment[hu]=Létrejött egy CMake-alapú osztott programkönyvtár-sablon itt: %{dest} +Comment[it]=È stato creato un modello di librerie condivise basate su CMake in %{dest} +Comment[ja]=CMake ベースの共有ライブラリテンプレートを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op CMake opbuut Vörlaag för en deelt Bibliotheek opstellt +Comment[ne]=एउटा CMake आधारित साझेदारी लाइब्रेरी टेम्प्लेट %{dest} मा सिर्जना गरियो +Comment[nl]=Een op Cmake gebaseerde bibliotheeksjabloon is aangemaakt in %{dest} +Comment[pl]=Używający CMake szablon biblioteki współdzielonej został utworzony w %{dest} +Comment[pt]=Foi criado um modelo de uma biblioteca dinâmica do CMake em %{dest} +Comment[pt_BR]=Foi criado um modelo de uma biblioteca dinâmica do CMake em %{dest} +Comment[ru]=Основанный на CMake шаблон разделяемой библиотеки создан в %{dest} +Comment[sk]=Šablóna zdieľanej knižnice založenej na CMake bola vytvorená v %{dest} +Comment[sl]=Predloga deljene knjižnice, ki uporablja CMake, je bila ustvarjena v %{dest} +Comment[sr]=Шаблон дељене библиотеке на основу CMake-а направљен је у %{dest} +Comment[sr@Latn]=Šablon deljene biblioteke na osnovu CMake-a napravljen je u %{dest} +Comment[sv]=En CMake-baserad mall för ett delat bibliotek skapades i %{dest} +Comment[tr]=CMake tabanlı paylaşılan kütüphane şablonu %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了基于 CMake 的共享库 +Comment[zh_TW]=以 CMake 為基礎的共享函式庫樣本已建立在 %{dest} diff --git a/languages/cpp/app_templates/cmakelibc/cmakelibc.tdevtemplate b/languages/cpp/app_templates/cmakelibc/cmakelibc.tdevtemplate deleted file mode 100644 index c05eaec4..00000000 --- a/languages/cpp/app_templates/cmakelibc/cmakelibc.tdevtemplate +++ /dev/null @@ -1,139 +0,0 @@ -# TDE Config File -[General] -Name=A shared library template -Name[ca]=Una plantilla de biblioteca compartida -Name[da]=En delt biblitekskabelon -Name[de]=Vorlage für eine Shared Library -Name[el]=Ένα πρότυπο κοινόχρηστης βιβλιοθήκης -Name[es]=Una plantilla de biblioteca compartida -Name[et]=Jagatud teegi mall -Name[eu]=Liburutegi partekatu baten txantiloia -Name[fa]=قالب کتابخانۀ مشترک -Name[fr]=Un modèle de bibliothèque partagée -Name[ga]=Teimpléad comhleabharlainne -Name[gl]=Plantilla de biblioteca compartida -Name[hu]=Osztott programkönyvtár-sablon -Name[it]=Un modello di libreria condivisa -Name[ja]=共有ライブラリのテンプレート -Name[nds]=Vörlaag för deelt Bibliotheek -Name[ne]=साझेदारी गरिएको लाइब्रेरी टेम्प्लेट -Name[nl]=Een gedeelde-bibliotheek-sjabloon -Name[pl]=Szablon współdzielonej biblioteki -Name[pt]=Um modelo de uma biblioteca dinâmica -Name[pt_BR]=Um modelo de uma biblioteca dinâmica -Name[ru]=Шаблон разделяемой библиотеки -Name[sk]=Šablóna pre zdieľanú knižnicu -Name[sl]=Predloga deljene knjižnice -Name[sr]=Шаблон дељене библиотеке -Name[sr@Latn]=Šablon deljene biblioteke -Name[sv]=En mall för ett delat bibliotek -Name[tr]=Bir paylaşılan kütüphane şablonu -Name[zh_CN]=共享库模板 -Name[zh_TW]=共享函式庫樣本 -Icon=cmakelibc.png -Category=C/CMake based projects -FileTemplates=h,CStyle,c,CStyle -Comment=Generates a shared library template including a test application in C. It compiles using the CMake build tool instead of the automake/autoconf/libtool combination. It requires cmake 2.1 (available from cmake cvs) or the upcoming cmake 2.2 release. -Comment[ca]=Genera una plantilla de biblioteca compartida incloguen una aplicació de prova en C. Es compila usant l'eina de construcció CMake en comptes de la combinació automake/autoconf/libtool. Requereix cmake 2.1 (disponible en el cvs de cmake) o la propera versió 2.2. -Comment[da]=Genererer en delt skabelon for et bibliotek inklusive et testprogram i C. Det kompilerer ved brug af CMake's byggeværktøj i stedet for automake/autoconf/libtool kombinationen. Det kræver cmake 2.1 (tilgængelig fra cmake cvs) eller den fremtidige cmake 2.2 udgivelse. -Comment[de]=Erstellt eine Vorlage für eine Shared Library inklusive einer Testanwendung in C. Der Kompiliervorgang wird mit CMake anstelle der Kombination automake/autoconf/libtool durchgeführt und erfordert CMake 2.1 (das über das CVS-Archiv von CMake verfügbar ist) oder die kommende Version 2.2 von CMake. -Comment[el]=Δημιουργεί ένα πρότυπο κοινόχρηστης βιβλιοθήκης που περιλαμβάνει και μια εφαρμογή δοκιμής σε C. Μεταγλωττίζεται χρησιμοποιώντας το εργαλείο κατασκευής CMake στη θέση του συνδυασμού automake/autoconf/libtool. Χρειάζεται το cmake 2.1 (διαθέσιμο από το cmake cvs) ή την επερχόμενη έκδοση cmake 2.2. -Comment[es]=Genera una plantilla de biblioteca compartida incluyendo una aplicación de prueba en C. Se compila usando la herramienta CMake en lugar de la combinación automake/autoconf/libtool. Requiere cmake 2.1 (disponible en el cvs de cmake) o la próxima cmake 2.2. -Comment[et]=Jagatud teegi malli loomine, kaasa arvatud testrakendus C-s. See kompileeritakse CMake'i ehitamistööriistaga, mitte automake/autoconf/libtool'i kombinatsiooniga. Selleks on vajalik CMake 2.1 (saadaval CMake'i CVSis) või peatne CMake'i versioon 2.2. -Comment[eu]=Liburutegi partekatu baten txantiloia sortzen du C lengoaian idatzitako probarako aplikazio batekin. CMake tresna erabiliz konpilatzen du automake/autoconf/libtool taldea erabili ordez. cmake 2.1 behar du (cmake cvs-an eskuragarri) edo hurrengo cmake 2.2. -Comment[fa]=یک قالب کتابخانۀ مشترک شامل کاربرد آزمایشی در سی تولید می‌کند. با استفاده از ابزار ساختن CMake به جای ترکیب automake/autoconf/libtool، ترجمه می‌کند. به cmake 2.1 )از cmake cvs قابل دسترس است( یا نشر cmake 2.2 در آیندۀ نزدیک، نیاز دارد. -Comment[fr]=Génère un modèle de bibliothèque partagée comprenant une application de test en C. La compilation s'effectue à l'aide de l'outil de construction CMake au lieu de la combinaison automake / autoconf / libtool. Nécessite CMake 2.1 (disponible sur le CVS de CMake) ou la version 2.2 de CMake à venir. -Comment[ga]=Cruthaigh teimpléad comhleabharlainne le feidhmchlár tástála i C. Tiomsaítear é le huirlis tógála CMake in ionad automake/autoconf/libtool. Tá cmake 2.1 de dhíth (ar fáil ó cmake cvs) nó leagan 2.2 cmake atá le teacht. -Comment[gl]=Xera unha plantilla de biblioteca compartida e máis unha aplicación de proba en C. Compílase usando a ferramenta CMake no lugar da combinación automake/autoconf/libtool. Require cmake 2.1 (dispoñíbel no cvs de cmake) ou a próxima versión cmake 2.2. -Comment[hu]=Létrehoz egy alap osztott programkönyvtárat és egy hozzá tartozó tesztprogramot C nyelven. A fordítási környezet a CMake-re fog alapulni (az automake/autoconf/libtool kombináció helyett). A CMake 2.1 (elérhető a CMake CVS-ben) vagy a rövidesen megjelenő CMake 2.2 szükséges hozzá. -Comment[it]=Genera un modello di libreria condivisa includente un'applicazione test in C. Compila usando CMake invece della combinazione automake/autoconf/libtool. Richiede cmake 2.1 (disponibile dal CVS di cmake) o la versione a venire di cmake 2.2. -Comment[ja]=共有ライブラリのテンプレートを作成します。同時に C でテストアプリケーションも作成します。コンパイルには、automake/autoconf/libtool ではなく CMake (2.1 または 2.2) が必要です。 -Comment[nds]=Stellt en Vörlaag för en deelt Bibliotheek mit en Testprogramm in C op. Dat Kompileren bruukt ansteed vun de "automake/autoconf/libtool"-Kombinatschoon "CMake" in de Verschoon 2.1 (ut dat cmake-CVS) oder 2.2 (de tokamen Utgaav). -Comment[ne]=C मा परीक्षण अनुप्रयोग सहितको साझेदारी टेम्प्लेट उत्पन्न गर्दछ । यसले automake/autoconf/libtool संयोजनको सट्टामा CMake निर्माण उपकरण प्रयोग गरेर कम्पाइल गर्दछ । यसका लागि cmake 2.1 (cmake cvs बाट उपलब्ध हुन्छ) वा अब आउने cmake 2.2 उत्पादन आवश्यक पर्दछ । -Comment[nl]=Genereert een gedeelde-bibliotheek-sjabloon inclusief een testtoepassing in C. Het compileert met behulp van de CMake build tool in plaats van de combinatie automake/autoconf/libtool. Het vereist cmake 2.1 (beschikbaar in het cvs van cmake) of de aankomende cmake 2.2-uitgave. -Comment[pl]=Generuje szablon współdzielonej biblioteki zawierający także program testowy w języku C. Kompilacja odbywa sie za pomocą narzędzia CMake zamiast kombinacji automake/autoconf/libtool. Wymaga cmake 2.1 (dostępnego z cvs-u cmake) lub nadchodzącej wersji 2.2. -Comment[pt]=Gera um modelo de uma biblioteca dinâmica, que inclui uma aplicação de testes em C. Ele é compilado com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. -Comment[pt_BR]=Gera um modelo de uma biblioteca dinâmica, que inclui uma aplicação de testes em C. Ele é compilado com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. -Comment[ru]=Создание шаблона разделяемой библиотеки, включая тестовую программу на C. Для сборки потребуется CMake вместо комбинации automake/autoconf/libtool. Потребуется cmake 2.1 (из CVS cmake) или релиз cmake 2.2. -Comment[sk]=Vygeneruje šablónu pre zdieľanú knižnicu vrátane testovacej aplikácie v C.Kompiluje sa pomocou nástroja CMake namiesto kombinácie automake/autoconf/libtool.Vyžaduje cmake 2.1 (dostupné v cmake cvs) alebo nadchádzajúci cmake 2.2 release. -Comment[sl]=Ustvari predlogo za deljeno knjižnico in testni program v C. Za prevajanje se namesto kombinacije automake/autoconf/libtool uporabi orodje za gradnjo CMake. Potreben je CMake 2.1 ali CMake 2.2. -Comment[sr]=Прави шаблон дељене библиотеке, укључујући и пробни програм у C-у. Преводи се помоћу алата CMake уместо комбинације Automake/Autoconf/Libtool. Захтева CMake 2.1 (доступан у CVS-у CMake-а) или надолазеће издање CMake 2.2. -Comment[sr@Latn]=Pravi šablon deljene biblioteke, uključujući i probni program u C-u. Prevodi se pomoću alata CMake umesto kombinacije Automake/Autoconf/Libtool. Zahteva CMake 2.1 (dostupan u CVS-u CMake-a) ili nadolazeće izdanje CMake 2.2. -Comment[sv]=Skapar en mall för ett delat bibliotek inklusive ett testprogram i C. Det kompileras med byggverktyget CMake istället för kombinationen automake/autoconf/libtool. Det kräver cmake 2.1 (tillgängligt från cmake CVS-arkiv) eller den förestående utgåvan av cmake 2.2. -Comment[tr]=C'de bir test uygulaması içeren bir paylaşılan kütüphane uygulaması yaratır. automake/autoconf/libtool birleşimini değil, CMake aracını kullanarak derlenir. cmake 2.1( cmake cvs'inden edinilebilir) veya yakında gelecek olan 2.2 sürümüne ihtiyaç duyar. -Comment[zh_CN]=生成一个共享库模板,其中包含一个 C 的测试应用程序。该模板使用 CMake 编译工具编译,而不是使用 automake/autoconf/libtool 的组合。该模板需要 cmake 2.1 (可从 cmake cvs 中获得)或即将发布的 cmake 2.2 版本。 -Comment[zh_TW]=產生一個共享函式庫樣本,包括一個 C 的測試程式。它要用 CMake 建立工具來編譯,而不是用 automake/autoconf/libtool 等。它需要 cmake 2.1(可以從 cmake cvs 中取得),或是以後的版本。 -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.c -Archive=cmakelibc.tar.gz - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/CMakeLists.txt -Dest=%{dest}/CMakeLists.txt - -[FILE2] -Type=install -EscapeXML=true -Source=%{src}/CMakeLists.txt.src -Dest=%{dest}/src/CMakeLists.txt - -[FILE3] -Type=install -EscapeXML=true -Source=%{src}/test.c -Dest=%{dest}/src/%{APPNAMELC}test.c - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/lib.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE5] -Type=install -EscapeXML=true -Source=%{src}/lib.c -Dest=%{dest}/src/%{APPNAMELC}.c - -[CMAKE] -Type=finishcmd -Command=cmake ./ -GTDevelop3 -Directory=%{dest} - -[MSG] -Type=message -Comment=A CMake based shared library template was created in %{dest} -Comment[ca]=Una plantilla de biblioteca compartida basada en CMake ha estat creada en %{dest} -Comment[da]=En CMake baseret skabelon for et delt bibliotek blev oprettet i %{dest} -Comment[de]=Eine auf CMake basierende Vorlage für eine Shared Library wurde in %{dest} erstellt. -Comment[el]=Ένα πρότυπο κοινόχρηστης βιβλιοθήκης βασισμένο στο CMake δημιουργήθηκε στο %{dest} -Comment[es]=Una plantilla de biblioteca compartida basada en CMake ha sido creada en %{dest} -Comment[et]=Jagatud teegi mall CMake'i põhjal loodi asukohta %{dest} -Comment[eu]=CMake-en oinarritutako liburutegi partekatu baten txantiloia sortu da hemen: %{dest} -Comment[fa]=یک قالب کتابخانۀ مشترک بر مبنای CMake در %{dest} ایجاد شد -Comment[fr]=Un modèle de bibliothèque partagée basée sur CMake a été créé dans %{dest} -Comment[ga]=Cruthaíodh teimpléad comhleabharlainne bunaithe ar CMake i %{dest} -Comment[gl]=Creouse una plantilla de biblioteca compartida baseada en CMake en %{dest} -Comment[hu]=Létrejött egy CMake-alapú osztott programkönyvtár-sablon itt: %{dest} -Comment[it]=È stato creato un modello di librerie condivise basate su CMake in %{dest} -Comment[ja]=CMake ベースの共有ライブラリテンプレートを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en op CMake opbuut Vörlaag för en deelt Bibliotheek opstellt -Comment[ne]=एउटा CMake आधारित साझेदारी लाइब्रेरी टेम्प्लेट %{dest} मा सिर्जना गरियो -Comment[nl]=Een op Cmake gebaseerde bibliotheeksjabloon is aangemaakt in %{dest} -Comment[pl]=Używający CMake szablon biblioteki współdzielonej został utworzony w %{dest} -Comment[pt]=Foi criado um modelo de uma biblioteca dinâmica do CMake em %{dest} -Comment[pt_BR]=Foi criado um modelo de uma biblioteca dinâmica do CMake em %{dest} -Comment[ru]=Основанный на CMake шаблон разделяемой библиотеки создан в %{dest} -Comment[sk]=Šablóna zdieľanej knižnice založenej na CMake bola vytvorená v %{dest} -Comment[sl]=Predloga deljene knjižnice, ki uporablja CMake, je bila ustvarjena v %{dest} -Comment[sr]=Шаблон дељене библиотеке на основу CMake-а направљен је у %{dest} -Comment[sr@Latn]=Šablon deljene biblioteke na osnovu CMake-a napravljen je u %{dest} -Comment[sv]=En CMake-baserad mall för ett delat bibliotek skapades i %{dest} -Comment[tr]=CMake tabanlı paylaşılan kütüphane şablonu %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了基于 CMake 的共享库 -Comment[zh_TW]=以 CMake 為基礎的共享函式庫樣本已建立在 %{dest} diff --git a/languages/cpp/app_templates/cmakelibcpp/CMakeLists.txt b/languages/cpp/app_templates/cmakelibcpp/CMakeLists.txt index cbd6bd5f..26d7f3e2 100644 --- a/languages/cpp/app_templates/cmakelibcpp/CMakeLists.txt +++ b/languages/cpp/app_templates/cmakelibcpp/CMakeLists.txt @@ -18,10 +18,10 @@ add_custom_target( cmakelibcpp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cmakelibcpp.tar.gz cmakelibcpp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cmakelibcpp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cmakelibcpp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cmakelibcpp/Makefile.am b/languages/cpp/app_templates/cmakelibcpp/Makefile.am index 0c3b275e..395bb107 100644 --- a/languages/cpp/app_templates/cmakelibcpp/Makefile.am +++ b/languages/cpp/app_templates/cmakelibcpp/Makefile.am @@ -2,10 +2,10 @@ dataFiles = test.cpp lib.h lib.cpp cmakelibcpp.png CMakeLists.txt CMakeLists.txt templateName = cmakelibcpp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.kdevtemplate b/languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.kdevtemplate new file mode 100644 index 00000000..653a5ec0 --- /dev/null +++ b/languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.kdevtemplate @@ -0,0 +1,139 @@ +# TDE Config File +[General] +Name=A shared library template +Name[ca]=Una plantilla de biblioteca compartida +Name[da]=En delt biblitekskabelon +Name[de]=Vorlage für eine Shared Library +Name[el]=Ένα πρότυπο κοινόχρηστης βιβλιοθήκης +Name[es]=Una plantilla de biblioteca compartida +Name[et]=Jagatud teegi mall +Name[eu]=Liburutegi partekatu baten txantiloia +Name[fa]=قالب کتابخانۀ مشترک +Name[fr]=Un modèle de bibliothèque partagée +Name[ga]=Teimpléad comhleabharlainne +Name[gl]=Plantilla de biblioteca compartida +Name[hu]=Osztott programkönyvtár-sablon +Name[it]=Un modello di libreria condivisa +Name[ja]=共有ライブラリのテンプレート +Name[nds]=Vörlaag för deelt Bibliotheek +Name[ne]=साझेदारी गरिएको लाइब्रेरी टेम्प्लेट +Name[nl]=Een gedeelde-bibliotheek-sjabloon +Name[pl]=Szablon współdzielonej biblioteki +Name[pt]=Um modelo de uma biblioteca dinâmica +Name[pt_BR]=Um modelo de uma biblioteca dinâmica +Name[ru]=Шаблон разделяемой библиотеки +Name[sk]=Šablóna pre zdieľanú knižnicu +Name[sl]=Predloga deljene knjižnice +Name[sr]=Шаблон дељене библиотеке +Name[sr@Latn]=Šablon deljene biblioteke +Name[sv]=En mall för ett delat bibliotek +Name[tr]=Bir paylaşılan kütüphane şablonu +Name[zh_CN]=共享库模板 +Name[zh_TW]=共享函式庫樣本 +Icon=cmakelibcpp.png +Category=C++/CMake based projects +FileTemplates=h,CStyle,cpp,CStyle +Comment=Generates a shared library template including a test application in C++. It compiles using the CMake build tool instead of the automake/autoconf/libtool combination. It requires cmake 2.1 (available from cmake cvs) or the upcoming cmake 2.2 release. +Comment[ca]=Genera una plantilla de biblioteca compartida incloguen una aplicació de prova en C++. Es compila usant l'eina de construcció CMake en comptes de la combinació automake/autoconf/libtool. Requereix cmake 2.1 (disponible en el cvs de cmake) o la propera versió 2.2. +Comment[da]=Genererer skabelon for delt bibliotek inklusive et testprogram i C++. Det kompileres ved brug af CMake byggeværktøjet i stedet for automake/autoconf/libtool kombinationen. Det kræver cmake 2.1 (tilgængelig fra cmake cvs) eller den fremtidige cmake 2.2 udgivelse. +Comment[de]=Erstellt eine Vorlage für eine Shared Library inklusive einer Testanwendung in C++. Der Kompiliervorgang wird mit CMake anstelle der Kombination automake/autoconf/libtool durchgeführt und erfordert CMake 2.1 (das über das CVS-Archiv von CMake verfügbar ist) oder die kommende Version 2.2 von CMake. +Comment[el]=Δημιουργεί ένα πρότυπο κοινόχρηστης βιβλιοθήκης που περιλαμβάνει και μια εφαρμογή δοκιμής σε C++. Μεταγλωττίζεται χρησιμοποιώντας το εργαλείο κατασκευής CMake στη θέση του συνδυασμού automake/autoconf/libtool. Χρειάζεται το cmake 2.1 (διαθέσιμο από το cmake cvs) ή την επερχόμενη έκδοση cmake 2.2. +Comment[es]=Genera una plantilla de biblioteca compartida incluyendo una aplicación de prueba en C++. Se compila usando la herramienta CMake en lugar de la combinación automake/autoconf/libtool. Requiere cmake 2.1 (disponible en el cvs de cmake) o la próxima cmake 2.2. +Comment[et]=Jagatud teegi malli loomine, kaasa arvatud testrakendus C++-s. See kompileeritakse CMake'i ehitamistööriistaga, mitte automake/autoconf/libtool'i kombinatsiooniga. Selleks on vajalik CMake 2.1 (saadaval CMake'i CVSis) või peatne CMake'i versioon 2.2. +Comment[eu]=Liburutegi partekatu baten txantiloia sortzen du C++ lengoaian idatzitako probarako aplikazio batekin. CMake tresna erabiliz konpilatzen du automake/autoconf/libtool taldea erabili ordez. cmake 2.1 behar du (cmake cvs-an eskuragarri) edo hurrengo cmake 2.2. +Comment[fa]=یک قالب کتابخانۀ مشترک شامل کاربرد آزمایشی در C++ تولید می‌کند. با استفاده از ابزار ساختن CMake به جای ترکیب automake/autoconf/libtool، ترجمه می‌کند. به cmake 2.1 )از cmake cvs قابل دسترس است( یا نشر cmake 2.2 در آیندۀ نزدیک، نیاز دارد. +Comment[fr]=Génère un modèle de bibliothèque partagée incluant une application de test en C++. La compilation s'effectue à l'aide de l'outil de construction CMake au lieu de la combinaison automake / autoconf / libtool. Nécessite CMake 2.1 (disponible sur le CVS de CMake) ou la version 2.2 de CMake à venir. +Comment[ga]=Cruthaigh teimpléad comhleabharlainne le feidhmchlár tástála i C++. Tiomsaítear é le huirlis tógála CMake in ionad automake/autoconf/libtool. Tá cmake 2.1 de dhíth (ar fáil ó cmake cvs) nó leagan 2.2 cmake atá le teacht. +Comment[gl]=Xera unha plantilla de biblioteca compartida e máis unha aplicación de proba en C++. Compílase usando a ferramenta CMake no lugar da combinación automake/autoconf/libtool. Require cmake 2.1 (dispoñíbel no cvs de cmake) ou a próxima versión cmake 2.2. +Comment[hu]=Létrehoz egy alap osztott programkönyvtárat és egy hozzá tartozó tesztprogramot C++ nyelven. A fordítási környezet a CMake-re fog alapulni (az automake/autoconf/libtool kombináció helyett). A CMake 2.1 (elérhető a CMake CVS-ben) vagy a rövidesen megjelenő CMake 2.2 szükséges hozzá. +Comment[it]=Genera un modello di libreria condivisa che include una applicazione test in C++. Compila usando CMake invece della combinazione automake/autoconf/libtool. Richiede cmake 2.1 (disponibile dal CVS di cmake) o la versione a venire cmake 2.2. +Comment[ja]=共有ライブラリのテンプレートを作成します。同時に C++ でテストアプリケーションも作成します。コンパイルには、automake/autoconf/libtool ではなく CMake (2.1 または 2.2) が必要です。 +Comment[nds]=Stellt en Vörlaag för en deelt Bibliotheek mit en Testprogramm in C++ op. Dat Kompileren bruukt ansteed vun de "automake/autoconf/libtool"-Kombinatschoon "CMake" in de Verschoon 2.1 (ut dat cmake-CVS) oder 2.2 (de tokamen Utgaav). +Comment[ne]=C++ मा परीक्षण अनुप्रयोग सहितको साझेदारी टेम्प्लेट उत्पन्न गर्दछ । यसले automake/autoconf/libtool संयोजनको सट्टामा CMake निर्माण उपकरण प्रयोग गरेर कम्पाइल गर्दछ । यसका लागि cmake 2.1 (cmake cvs बाट उपलब्ध हुन्छ) वा अब आउने cmake 2.2 उत्पादन आवश्यक पर्दछ । +Comment[nl]=Genereert een gedeelde-bibliotheek-sjabloon inclusief een testtoepassing in C++. Het compileert met behulp van de CMake build tool in plaats van de combinatie automake/autoconf/libtool. Het vereist cmake 2.1 (uit het cvs van cmake) of de aankomende cmake 2.2-uitgave. +Comment[pl]=Generuje szablon współdzielonej biblioteki zawierający także program testowy w języku C++. Kompilacja odbywa sie za pomocą narzędzia CMake zamiast kombinacji automake/autoconf/libtool. Wymaga cmake 2.1 (dostępnego z cvs-u cmake) lub nadchodzącej wersji 2.2. +Comment[pt]=Gera um modelo de uma biblioteca dinâmica, que inclui uma aplicação de testes em C++. Ele é compilado com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. +Comment[pt_BR]=Gera um modelo de uma biblioteca dinâmica, que inclui uma aplicação de testes em C++. Ele é compilado com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. +Comment[ru]=Создание шаблона разделяемой библиотеки, включая тестовую программу на C++. Для сборки потребуется CMake вместо комбинации automake/autoconf/libtool. Потребуется cmake 2.1 (из CVS cmake) или релиз cmake 2.2. +Comment[sk]=Vygeneruje šablónu zdieľanej knižnice vrátane testovacej aplikácie v C++.Kompiluje sa pomocou nástroja CMake namiesto kombinácie automake/autoconf/libtool.Vyžaduje cmake 2.1 (dostupné v cmake cvs) alebo nadchádzajúci cmake 2.2 release. +Comment[sl]=Ustvari predlogo za deljeno knjižnico in testni program v C++. Za prevajanje se namesto kombinacije automake/autoconf/libtool uporabi orodje za gradnjo CMake. Potreben je CMake 2.1 ali CMake 2.2. +Comment[sr]=Прави шаблон дељене библиотеке укључујући и пробни програм у C++-у. Преводи се помоћу алата CMake уместо комбинације Automake/Autoconf/Libtool. Захтева CMake 2.1 (доступан у CVS-у CMake-а) или надолазеће издање CMake 2.2. +Comment[sr@Latn]=Pravi šablon deljene biblioteke uključujući i probni program u C++-u. Prevodi se pomoću alata CMake umesto kombinacije Automake/Autoconf/Libtool. Zahteva CMake 2.1 (dostupan u CVS-u CMake-a) ili nadolazeće izdanje CMake 2.2. +Comment[sv]=Skapar en mall för ett delat bibliotek inklusive ett testprogram i C++. Det kompileras med byggverktyget CMake istället för kombinationen automake/autoconf/libtool. Det kräver cmake 2.1 (tillgängligt från cmake CVS-arkiv) eller den förestående utgåvan av cmake 2.2. +Comment[tr]=C++'da bir test uygulaması içeren bir paylaşılan kütüphane uygulaması yaratır. automake/autoconf/libtool birleşimini değil, CMake aracını kullanarak derlenir. cmake 2.1( cmake cvs'inden edinilebilir) veya yakında gelecek olan 2.2 sürümüne ihtiyaç duyar. +Comment[zh_CN]=生成一个共享库模板,其中包含一个 C++ 的测试应用程序。该模板使用 CMake 编译工具编译,而不是使用 automake/autoconf/libtool 的组合。该模板需要 cmake 2.1 (可从 cmake cvs 中获得)或即将发布的 cmake 2.2 版本。 +Comment[zh_TW]=產生一個包括 C++ 測試程式的共享函式庫樣本。它要用 CMake 建立工具來編譯,而不是用 automake/autoconf/libtool 等。它需要 cmake 2.1(可以從 cmake cvs 中取得),或是以後的版本。 +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=cmakelibcpp.tar.gz + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/CMakeLists.txt +Dest=%{dest}/CMakeLists.txt + +[FILE2] +Type=install +EscapeXML=true +Source=%{src}/CMakeLists.txt.src +Dest=%{dest}/src/CMakeLists.txt + +[FILE3] +Type=install +EscapeXML=true +Source=%{src}/test.cpp +Dest=%{dest}/src/%{APPNAMELC}test.cpp + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/lib.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE5] +Type=install +EscapeXML=true +Source=%{src}/lib.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[CMAKE] +Type=finishcmd +Command=cmake ./ -GTDevelop3 +Directory=%{dest} + +[MSG] +Type=message +Comment=A CMake based shared library template was created in %{dest} +Comment[ca]=Una plantilla de biblioteca compartida basada en CMake ha estat creada en %{dest} +Comment[da]=En CMake baseret skabelon for et delt bibliotek blev oprettet i %{dest} +Comment[de]=Eine auf CMake basierende Vorlage für eine Shared Library wurde in %{dest} erstellt. +Comment[el]=Ένα πρότυπο κοινόχρηστης βιβλιοθήκης βασισμένο στο CMake δημιουργήθηκε στο %{dest} +Comment[es]=Una plantilla de biblioteca compartida basada en CMake ha sido creada en %{dest} +Comment[et]=Jagatud teegi mall CMake'i põhjal loodi asukohta %{dest} +Comment[eu]=CMake-en oinarritutako liburutegi partekatu baten txantiloia sortu da hemen: %{dest} +Comment[fa]=یک قالب کتابخانۀ مشترک بر مبنای CMake در %{dest} ایجاد شد +Comment[fr]=Un modèle de bibliothèque partagée basée sur CMake a été créé dans %{dest} +Comment[ga]=Cruthaíodh teimpléad comhleabharlainne bunaithe ar CMake i %{dest} +Comment[gl]=Creouse una plantilla de biblioteca compartida baseada en CMake en %{dest} +Comment[hu]=Létrejött egy CMake-alapú osztott programkönyvtár-sablon itt: %{dest} +Comment[it]=È stato creato un modello di librerie condivise basate su CMake in %{dest} +Comment[ja]=CMake ベースの共有ライブラリテンプレートを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op CMake opbuut Vörlaag för en deelt Bibliotheek opstellt +Comment[ne]=एउटा CMake आधारित साझेदारी लाइब्रेरी टेम्प्लेट %{dest} मा सिर्जना गरियो +Comment[nl]=Een op Cmake gebaseerde bibliotheeksjabloon is aangemaakt in %{dest} +Comment[pl]=Używający CMake szablon biblioteki współdzielonej został utworzony w %{dest} +Comment[pt]=Foi criado um modelo de uma biblioteca dinâmica do CMake em %{dest} +Comment[pt_BR]=Foi criado um modelo de uma biblioteca dinâmica do CMake em %{dest} +Comment[ru]=Основанный на CMake шаблон разделяемой библиотеки создан в %{dest} +Comment[sk]=Šablóna zdieľanej knižnice založenej na CMake bola vytvorená v %{dest} +Comment[sl]=Predloga deljene knjižnice, ki uporablja CMake, je bila ustvarjena v %{dest} +Comment[sr]=Шаблон дељене библиотеке на основу CMake-а направљен је у %{dest} +Comment[sr@Latn]=Šablon deljene biblioteke na osnovu CMake-a napravljen je u %{dest} +Comment[sv]=En CMake-baserad mall för ett delat bibliotek skapades i %{dest} +Comment[tr]=CMake tabanlı paylaşılan kütüphane şablonu %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了基于 CMake 的共享库 +Comment[zh_TW]=以 CMake 為基礎的共享函式庫樣本已建立在 %{dest} diff --git a/languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.tdevtemplate b/languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.tdevtemplate deleted file mode 100644 index 653a5ec0..00000000 --- a/languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.tdevtemplate +++ /dev/null @@ -1,139 +0,0 @@ -# TDE Config File -[General] -Name=A shared library template -Name[ca]=Una plantilla de biblioteca compartida -Name[da]=En delt biblitekskabelon -Name[de]=Vorlage für eine Shared Library -Name[el]=Ένα πρότυπο κοινόχρηστης βιβλιοθήκης -Name[es]=Una plantilla de biblioteca compartida -Name[et]=Jagatud teegi mall -Name[eu]=Liburutegi partekatu baten txantiloia -Name[fa]=قالب کتابخانۀ مشترک -Name[fr]=Un modèle de bibliothèque partagée -Name[ga]=Teimpléad comhleabharlainne -Name[gl]=Plantilla de biblioteca compartida -Name[hu]=Osztott programkönyvtár-sablon -Name[it]=Un modello di libreria condivisa -Name[ja]=共有ライブラリのテンプレート -Name[nds]=Vörlaag för deelt Bibliotheek -Name[ne]=साझेदारी गरिएको लाइब्रेरी टेम्प्लेट -Name[nl]=Een gedeelde-bibliotheek-sjabloon -Name[pl]=Szablon współdzielonej biblioteki -Name[pt]=Um modelo de uma biblioteca dinâmica -Name[pt_BR]=Um modelo de uma biblioteca dinâmica -Name[ru]=Шаблон разделяемой библиотеки -Name[sk]=Šablóna pre zdieľanú knižnicu -Name[sl]=Predloga deljene knjižnice -Name[sr]=Шаблон дељене библиотеке -Name[sr@Latn]=Šablon deljene biblioteke -Name[sv]=En mall för ett delat bibliotek -Name[tr]=Bir paylaşılan kütüphane şablonu -Name[zh_CN]=共享库模板 -Name[zh_TW]=共享函式庫樣本 -Icon=cmakelibcpp.png -Category=C++/CMake based projects -FileTemplates=h,CStyle,cpp,CStyle -Comment=Generates a shared library template including a test application in C++. It compiles using the CMake build tool instead of the automake/autoconf/libtool combination. It requires cmake 2.1 (available from cmake cvs) or the upcoming cmake 2.2 release. -Comment[ca]=Genera una plantilla de biblioteca compartida incloguen una aplicació de prova en C++. Es compila usant l'eina de construcció CMake en comptes de la combinació automake/autoconf/libtool. Requereix cmake 2.1 (disponible en el cvs de cmake) o la propera versió 2.2. -Comment[da]=Genererer skabelon for delt bibliotek inklusive et testprogram i C++. Det kompileres ved brug af CMake byggeværktøjet i stedet for automake/autoconf/libtool kombinationen. Det kræver cmake 2.1 (tilgængelig fra cmake cvs) eller den fremtidige cmake 2.2 udgivelse. -Comment[de]=Erstellt eine Vorlage für eine Shared Library inklusive einer Testanwendung in C++. Der Kompiliervorgang wird mit CMake anstelle der Kombination automake/autoconf/libtool durchgeführt und erfordert CMake 2.1 (das über das CVS-Archiv von CMake verfügbar ist) oder die kommende Version 2.2 von CMake. -Comment[el]=Δημιουργεί ένα πρότυπο κοινόχρηστης βιβλιοθήκης που περιλαμβάνει και μια εφαρμογή δοκιμής σε C++. Μεταγλωττίζεται χρησιμοποιώντας το εργαλείο κατασκευής CMake στη θέση του συνδυασμού automake/autoconf/libtool. Χρειάζεται το cmake 2.1 (διαθέσιμο από το cmake cvs) ή την επερχόμενη έκδοση cmake 2.2. -Comment[es]=Genera una plantilla de biblioteca compartida incluyendo una aplicación de prueba en C++. Se compila usando la herramienta CMake en lugar de la combinación automake/autoconf/libtool. Requiere cmake 2.1 (disponible en el cvs de cmake) o la próxima cmake 2.2. -Comment[et]=Jagatud teegi malli loomine, kaasa arvatud testrakendus C++-s. See kompileeritakse CMake'i ehitamistööriistaga, mitte automake/autoconf/libtool'i kombinatsiooniga. Selleks on vajalik CMake 2.1 (saadaval CMake'i CVSis) või peatne CMake'i versioon 2.2. -Comment[eu]=Liburutegi partekatu baten txantiloia sortzen du C++ lengoaian idatzitako probarako aplikazio batekin. CMake tresna erabiliz konpilatzen du automake/autoconf/libtool taldea erabili ordez. cmake 2.1 behar du (cmake cvs-an eskuragarri) edo hurrengo cmake 2.2. -Comment[fa]=یک قالب کتابخانۀ مشترک شامل کاربرد آزمایشی در C++ تولید می‌کند. با استفاده از ابزار ساختن CMake به جای ترکیب automake/autoconf/libtool، ترجمه می‌کند. به cmake 2.1 )از cmake cvs قابل دسترس است( یا نشر cmake 2.2 در آیندۀ نزدیک، نیاز دارد. -Comment[fr]=Génère un modèle de bibliothèque partagée incluant une application de test en C++. La compilation s'effectue à l'aide de l'outil de construction CMake au lieu de la combinaison automake / autoconf / libtool. Nécessite CMake 2.1 (disponible sur le CVS de CMake) ou la version 2.2 de CMake à venir. -Comment[ga]=Cruthaigh teimpléad comhleabharlainne le feidhmchlár tástála i C++. Tiomsaítear é le huirlis tógála CMake in ionad automake/autoconf/libtool. Tá cmake 2.1 de dhíth (ar fáil ó cmake cvs) nó leagan 2.2 cmake atá le teacht. -Comment[gl]=Xera unha plantilla de biblioteca compartida e máis unha aplicación de proba en C++. Compílase usando a ferramenta CMake no lugar da combinación automake/autoconf/libtool. Require cmake 2.1 (dispoñíbel no cvs de cmake) ou a próxima versión cmake 2.2. -Comment[hu]=Létrehoz egy alap osztott programkönyvtárat és egy hozzá tartozó tesztprogramot C++ nyelven. A fordítási környezet a CMake-re fog alapulni (az automake/autoconf/libtool kombináció helyett). A CMake 2.1 (elérhető a CMake CVS-ben) vagy a rövidesen megjelenő CMake 2.2 szükséges hozzá. -Comment[it]=Genera un modello di libreria condivisa che include una applicazione test in C++. Compila usando CMake invece della combinazione automake/autoconf/libtool. Richiede cmake 2.1 (disponibile dal CVS di cmake) o la versione a venire cmake 2.2. -Comment[ja]=共有ライブラリのテンプレートを作成します。同時に C++ でテストアプリケーションも作成します。コンパイルには、automake/autoconf/libtool ではなく CMake (2.1 または 2.2) が必要です。 -Comment[nds]=Stellt en Vörlaag för en deelt Bibliotheek mit en Testprogramm in C++ op. Dat Kompileren bruukt ansteed vun de "automake/autoconf/libtool"-Kombinatschoon "CMake" in de Verschoon 2.1 (ut dat cmake-CVS) oder 2.2 (de tokamen Utgaav). -Comment[ne]=C++ मा परीक्षण अनुप्रयोग सहितको साझेदारी टेम्प्लेट उत्पन्न गर्दछ । यसले automake/autoconf/libtool संयोजनको सट्टामा CMake निर्माण उपकरण प्रयोग गरेर कम्पाइल गर्दछ । यसका लागि cmake 2.1 (cmake cvs बाट उपलब्ध हुन्छ) वा अब आउने cmake 2.2 उत्पादन आवश्यक पर्दछ । -Comment[nl]=Genereert een gedeelde-bibliotheek-sjabloon inclusief een testtoepassing in C++. Het compileert met behulp van de CMake build tool in plaats van de combinatie automake/autoconf/libtool. Het vereist cmake 2.1 (uit het cvs van cmake) of de aankomende cmake 2.2-uitgave. -Comment[pl]=Generuje szablon współdzielonej biblioteki zawierający także program testowy w języku C++. Kompilacja odbywa sie za pomocą narzędzia CMake zamiast kombinacji automake/autoconf/libtool. Wymaga cmake 2.1 (dostępnego z cvs-u cmake) lub nadchodzącej wersji 2.2. -Comment[pt]=Gera um modelo de uma biblioteca dinâmica, que inclui uma aplicação de testes em C++. Ele é compilado com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. -Comment[pt_BR]=Gera um modelo de uma biblioteca dinâmica, que inclui uma aplicação de testes em C++. Ele é compilado com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. -Comment[ru]=Создание шаблона разделяемой библиотеки, включая тестовую программу на C++. Для сборки потребуется CMake вместо комбинации automake/autoconf/libtool. Потребуется cmake 2.1 (из CVS cmake) или релиз cmake 2.2. -Comment[sk]=Vygeneruje šablónu zdieľanej knižnice vrátane testovacej aplikácie v C++.Kompiluje sa pomocou nástroja CMake namiesto kombinácie automake/autoconf/libtool.Vyžaduje cmake 2.1 (dostupné v cmake cvs) alebo nadchádzajúci cmake 2.2 release. -Comment[sl]=Ustvari predlogo za deljeno knjižnico in testni program v C++. Za prevajanje se namesto kombinacije automake/autoconf/libtool uporabi orodje za gradnjo CMake. Potreben je CMake 2.1 ali CMake 2.2. -Comment[sr]=Прави шаблон дељене библиотеке укључујући и пробни програм у C++-у. Преводи се помоћу алата CMake уместо комбинације Automake/Autoconf/Libtool. Захтева CMake 2.1 (доступан у CVS-у CMake-а) или надолазеће издање CMake 2.2. -Comment[sr@Latn]=Pravi šablon deljene biblioteke uključujući i probni program u C++-u. Prevodi se pomoću alata CMake umesto kombinacije Automake/Autoconf/Libtool. Zahteva CMake 2.1 (dostupan u CVS-u CMake-a) ili nadolazeće izdanje CMake 2.2. -Comment[sv]=Skapar en mall för ett delat bibliotek inklusive ett testprogram i C++. Det kompileras med byggverktyget CMake istället för kombinationen automake/autoconf/libtool. Det kräver cmake 2.1 (tillgängligt från cmake CVS-arkiv) eller den förestående utgåvan av cmake 2.2. -Comment[tr]=C++'da bir test uygulaması içeren bir paylaşılan kütüphane uygulaması yaratır. automake/autoconf/libtool birleşimini değil, CMake aracını kullanarak derlenir. cmake 2.1( cmake cvs'inden edinilebilir) veya yakında gelecek olan 2.2 sürümüne ihtiyaç duyar. -Comment[zh_CN]=生成一个共享库模板,其中包含一个 C++ 的测试应用程序。该模板使用 CMake 编译工具编译,而不是使用 automake/autoconf/libtool 的组合。该模板需要 cmake 2.1 (可从 cmake cvs 中获得)或即将发布的 cmake 2.2 版本。 -Comment[zh_TW]=產生一個包括 C++ 測試程式的共享函式庫樣本。它要用 CMake 建立工具來編譯,而不是用 automake/autoconf/libtool 等。它需要 cmake 2.1(可以從 cmake cvs 中取得),或是以後的版本。 -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=cmakelibcpp.tar.gz - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/CMakeLists.txt -Dest=%{dest}/CMakeLists.txt - -[FILE2] -Type=install -EscapeXML=true -Source=%{src}/CMakeLists.txt.src -Dest=%{dest}/src/CMakeLists.txt - -[FILE3] -Type=install -EscapeXML=true -Source=%{src}/test.cpp -Dest=%{dest}/src/%{APPNAMELC}test.cpp - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/lib.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE5] -Type=install -EscapeXML=true -Source=%{src}/lib.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[CMAKE] -Type=finishcmd -Command=cmake ./ -GTDevelop3 -Directory=%{dest} - -[MSG] -Type=message -Comment=A CMake based shared library template was created in %{dest} -Comment[ca]=Una plantilla de biblioteca compartida basada en CMake ha estat creada en %{dest} -Comment[da]=En CMake baseret skabelon for et delt bibliotek blev oprettet i %{dest} -Comment[de]=Eine auf CMake basierende Vorlage für eine Shared Library wurde in %{dest} erstellt. -Comment[el]=Ένα πρότυπο κοινόχρηστης βιβλιοθήκης βασισμένο στο CMake δημιουργήθηκε στο %{dest} -Comment[es]=Una plantilla de biblioteca compartida basada en CMake ha sido creada en %{dest} -Comment[et]=Jagatud teegi mall CMake'i põhjal loodi asukohta %{dest} -Comment[eu]=CMake-en oinarritutako liburutegi partekatu baten txantiloia sortu da hemen: %{dest} -Comment[fa]=یک قالب کتابخانۀ مشترک بر مبنای CMake در %{dest} ایجاد شد -Comment[fr]=Un modèle de bibliothèque partagée basée sur CMake a été créé dans %{dest} -Comment[ga]=Cruthaíodh teimpléad comhleabharlainne bunaithe ar CMake i %{dest} -Comment[gl]=Creouse una plantilla de biblioteca compartida baseada en CMake en %{dest} -Comment[hu]=Létrejött egy CMake-alapú osztott programkönyvtár-sablon itt: %{dest} -Comment[it]=È stato creato un modello di librerie condivise basate su CMake in %{dest} -Comment[ja]=CMake ベースの共有ライブラリテンプレートを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en op CMake opbuut Vörlaag för en deelt Bibliotheek opstellt -Comment[ne]=एउटा CMake आधारित साझेदारी लाइब्रेरी टेम्प्लेट %{dest} मा सिर्जना गरियो -Comment[nl]=Een op Cmake gebaseerde bibliotheeksjabloon is aangemaakt in %{dest} -Comment[pl]=Używający CMake szablon biblioteki współdzielonej został utworzony w %{dest} -Comment[pt]=Foi criado um modelo de uma biblioteca dinâmica do CMake em %{dest} -Comment[pt_BR]=Foi criado um modelo de uma biblioteca dinâmica do CMake em %{dest} -Comment[ru]=Основанный на CMake шаблон разделяемой библиотеки создан в %{dest} -Comment[sk]=Šablóna zdieľanej knižnice založenej na CMake bola vytvorená v %{dest} -Comment[sl]=Predloga deljene knjižnice, ki uporablja CMake, je bila ustvarjena v %{dest} -Comment[sr]=Шаблон дељене библиотеке на основу CMake-а направљен је у %{dest} -Comment[sr@Latn]=Šablon deljene biblioteke na osnovu CMake-a napravljen je u %{dest} -Comment[sv]=En CMake-baserad mall för ett delat bibliotek skapades i %{dest} -Comment[tr]=CMake tabanlı paylaşılan kütüphane şablonu %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了基于 CMake 的共享库 -Comment[zh_TW]=以 CMake 為基礎的共享函式庫樣本已建立在 %{dest} diff --git a/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt b/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt index 88bb2d36..b69d898f 100644 --- a/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt +++ b/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( cmakeqt3app.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cmakeqt3app.tar.gz cmakeqt3app.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cmakeqt3app.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cmakeqt3app.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cmakeqt3app/Makefile.am b/languages/cpp/app_templates/cmakeqt3app/Makefile.am index e42bdcbf..24bd6c35 100644 --- a/languages/cpp/app_templates/cmakeqt3app/Makefile.am +++ b/languages/cpp/app_templates/cmakeqt3app/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.cpp cmakeqt3app.cpp cmakeqt3app.h cmakeqt3app.png \ templateName = cmakeqt3app ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.kdevtemplate b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.kdevtemplate new file mode 100644 index 00000000..50afb48a --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.kdevtemplate @@ -0,0 +1,126 @@ +# TDE Config File +[General] +Name=Qt3 Application +Name[br]=Meziant Qt3 +Name[ca]=Aplicació Qt3 +Name[da]=Qt3-Program +Name[de]=Qt3-Anwendung +Name[el]=Εφαρμογή Qt3 +Name[es]=Aplicación Qt3 +Name[et]=Qt3 rakendus +Name[fr]=Application Qt3 +Name[hu]=Qt3-alapú alkalmazások +Name[it]=Applicazione Qt3 +Name[ja]=Qt3 アプリケーション +Name[nds]=Qt3-Programm +Name[nl]=Qt3-toepassing +Name[pl]=Program Qt3 +Name[pt]=Aplicação do Qt3 +Name[pt_BR]=Aplicação do Qt3 +Name[ru]=Приложение Qt 3 +Name[sk]=Qt3 aplikácia +Name[sr]=Qt3 програм +Name[sr@Latn]=Qt3 program +Name[sv]=Qt3-program +Name[zh_TW]=Qt3 應用程式 +Icon=cmakeqt3app.png +Category=C++/CMake based projects +Comment=Generate a CMake based Qt3 application +Comment[ca]=Genera una aplicació Qt3 basada en CMake +Comment[da]=Opretter et CMake-baseret Qt3-program +Comment[de]=Erstellt eine auf CMake basierende Qt3-Anwendung +Comment[el]=Δημιουργία μιας εφαρμογής Qt3 με βάση το CMake +Comment[es]=Genera una aplicación Qt3 basada en CMake +Comment[et]=Qt3 rakenduse loomine CMake'i põhjal +Comment[fr]=Génère une application Qt3 basée sur CMake +Comment[hu]=Létrehoz egy CMake-alapú Qt3-alkalmazást +Comment[it]=Genera un'applicazione Qt3 basata su CMake +Comment[ja]=CMake ベースの Qt3 アプリケーションを作成 +Comment[nds]=Stellt en op CMake opbuut Qt3-Programm op +Comment[nl]=Genereer een CMake-gebaseerde Qt3-toepassing +Comment[pl]=Generuje program Qt3 używający CMake +Comment[pt]=Gera uma aplicação em Qt3 baseada no CMake +Comment[pt_BR]=Gera uma aplicação em Qt3 baseada no CMake +Comment[ru]=Создание основанного на CMake приложения Qt 3 +Comment[sk]=Vygeneruje Qt3 aplikáciu založenú na CMake +Comment[sr]=Прави Qt3 програм на основу CMake-а +Comment[sr@Latn]=Pravi Qt3 program na osnovu CMake-a +Comment[sv]=Skapar ett CMake-baserat Qt3-program +Comment[zh_TW]=產生使用 CMake 的 Qt3 應用程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=cmakeqt3app.tar.gz + +[FILE1] +Type=install +Source=%{src}/CMakeLists.txt +Dest=%{dest}/CMakeLists.txt + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE2] +Type=install +Source=%{src}/CMakeLists.txt.src +Dest=%{dest}/src/CMakeLists.txt + +[FILE3] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE4] +Type=install +Source=%{src}/cmakeqt3app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE5] +Type=install +Source=%{src}/cmakeqt3app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE6] +Type=install +Source=%{src}/fileopen.xpm +Dest=%{dest}/src/fileopen.xpm + +[FILE7] +Type=install +Source=%{src}/filesave.xpm +Dest=%{dest}/src/filesave.xpm + +[FILE8] +Type=install +Source=%{src}/fileprint.xpm +Dest=%{dest}/src/fileprint.xpm + +[CMAKE] +Type=finishcmd +Command=cmake ./ -GTDevelop3 +Directory=%{dest} + +[MSG] +Type=message +Comment=A CMake based Qt3 application was created in %{dest} +Comment[ca]=Una aplicació Qt3 basada en CMake ha estat creada en %{dest} +Comment[da]=Et CMake-baseret Qt3-program blev oprettet i %{dest} +Comment[de]=Eine auf CMake basierende Qt3-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή Qt3 βασισμένη στο Qmake δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación Qt3 basada en CMake ha sido creada en %{dest} +Comment[et]=Qt3 rakendus CMake'i põhjal loodi asukohta %{dest} +Comment[fr]=Une application Qt3 basée sur CMake a été créée dans %{dest} +Comment[hu]=Létrejött egy CMake-alapú Qt3-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Qt3 basata su CMake in %{dest} +Comment[ja]=CMake ベースの Qt3 アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op CMake opbuut Qt3-Programm opstellt +Comment[nl]=Een Cmake-gebaseerde Qt3-toepassing is aangemaakt in %{dest} +Comment[pl]=Program Qt3 oparty na CMake został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do Qt3 baseada no CMake em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do Qt3 baseada no CMake em %{dest} +Comment[ru]=Использующее CMake приложение Qt 3 создано в %{dest} +Comment[sk]=Qt3 aplikácia založená na CMake bola vytvorená v %{dest} +Comment[sr]=Qt3 програм на основу CMake-а направљен је у %{dest} +Comment[sr@Latn]=Qt3 program na osnovu CMake-a napravljen je u %{dest} +Comment[sv]=Ett CMake-baserat Qt3-program skapades i %{dest} +Comment[zh_TW]=一個以 Cmake 為基礎的 Qt3 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.tdevtemplate b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.tdevtemplate deleted file mode 100644 index 50afb48a..00000000 --- a/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.tdevtemplate +++ /dev/null @@ -1,126 +0,0 @@ -# TDE Config File -[General] -Name=Qt3 Application -Name[br]=Meziant Qt3 -Name[ca]=Aplicació Qt3 -Name[da]=Qt3-Program -Name[de]=Qt3-Anwendung -Name[el]=Εφαρμογή Qt3 -Name[es]=Aplicación Qt3 -Name[et]=Qt3 rakendus -Name[fr]=Application Qt3 -Name[hu]=Qt3-alapú alkalmazások -Name[it]=Applicazione Qt3 -Name[ja]=Qt3 アプリケーション -Name[nds]=Qt3-Programm -Name[nl]=Qt3-toepassing -Name[pl]=Program Qt3 -Name[pt]=Aplicação do Qt3 -Name[pt_BR]=Aplicação do Qt3 -Name[ru]=Приложение Qt 3 -Name[sk]=Qt3 aplikácia -Name[sr]=Qt3 програм -Name[sr@Latn]=Qt3 program -Name[sv]=Qt3-program -Name[zh_TW]=Qt3 應用程式 -Icon=cmakeqt3app.png -Category=C++/CMake based projects -Comment=Generate a CMake based Qt3 application -Comment[ca]=Genera una aplicació Qt3 basada en CMake -Comment[da]=Opretter et CMake-baseret Qt3-program -Comment[de]=Erstellt eine auf CMake basierende Qt3-Anwendung -Comment[el]=Δημιουργία μιας εφαρμογής Qt3 με βάση το CMake -Comment[es]=Genera una aplicación Qt3 basada en CMake -Comment[et]=Qt3 rakenduse loomine CMake'i põhjal -Comment[fr]=Génère une application Qt3 basée sur CMake -Comment[hu]=Létrehoz egy CMake-alapú Qt3-alkalmazást -Comment[it]=Genera un'applicazione Qt3 basata su CMake -Comment[ja]=CMake ベースの Qt3 アプリケーションを作成 -Comment[nds]=Stellt en op CMake opbuut Qt3-Programm op -Comment[nl]=Genereer een CMake-gebaseerde Qt3-toepassing -Comment[pl]=Generuje program Qt3 używający CMake -Comment[pt]=Gera uma aplicação em Qt3 baseada no CMake -Comment[pt_BR]=Gera uma aplicação em Qt3 baseada no CMake -Comment[ru]=Создание основанного на CMake приложения Qt 3 -Comment[sk]=Vygeneruje Qt3 aplikáciu založenú na CMake -Comment[sr]=Прави Qt3 програм на основу CMake-а -Comment[sr@Latn]=Pravi Qt3 program na osnovu CMake-a -Comment[sv]=Skapar ett CMake-baserat Qt3-program -Comment[zh_TW]=產生使用 CMake 的 Qt3 應用程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=cmakeqt3app.tar.gz - -[FILE1] -Type=install -Source=%{src}/CMakeLists.txt -Dest=%{dest}/CMakeLists.txt - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE2] -Type=install -Source=%{src}/CMakeLists.txt.src -Dest=%{dest}/src/CMakeLists.txt - -[FILE3] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE4] -Type=install -Source=%{src}/cmakeqt3app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE5] -Type=install -Source=%{src}/cmakeqt3app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE6] -Type=install -Source=%{src}/fileopen.xpm -Dest=%{dest}/src/fileopen.xpm - -[FILE7] -Type=install -Source=%{src}/filesave.xpm -Dest=%{dest}/src/filesave.xpm - -[FILE8] -Type=install -Source=%{src}/fileprint.xpm -Dest=%{dest}/src/fileprint.xpm - -[CMAKE] -Type=finishcmd -Command=cmake ./ -GTDevelop3 -Directory=%{dest} - -[MSG] -Type=message -Comment=A CMake based Qt3 application was created in %{dest} -Comment[ca]=Una aplicació Qt3 basada en CMake ha estat creada en %{dest} -Comment[da]=Et CMake-baseret Qt3-program blev oprettet i %{dest} -Comment[de]=Eine auf CMake basierende Qt3-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή Qt3 βασισμένη στο Qmake δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación Qt3 basada en CMake ha sido creada en %{dest} -Comment[et]=Qt3 rakendus CMake'i põhjal loodi asukohta %{dest} -Comment[fr]=Une application Qt3 basée sur CMake a été créée dans %{dest} -Comment[hu]=Létrejött egy CMake-alapú Qt3-alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione Qt3 basata su CMake in %{dest} -Comment[ja]=CMake ベースの Qt3 アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en op CMake opbuut Qt3-Programm opstellt -Comment[nl]=Een Cmake-gebaseerde Qt3-toepassing is aangemaakt in %{dest} -Comment[pl]=Program Qt3 oparty na CMake został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do Qt3 baseada no CMake em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do Qt3 baseada no CMake em %{dest} -Comment[ru]=Использующее CMake приложение Qt 3 создано в %{dest} -Comment[sk]=Qt3 aplikácia založená na CMake bola vytvorená v %{dest} -Comment[sr]=Qt3 програм на основу CMake-а направљен је у %{dest} -Comment[sr@Latn]=Qt3 program na osnovu CMake-a napravljen je u %{dest} -Comment[sv]=Ett CMake-baserat Qt3-program skapades i %{dest} -Comment[zh_TW]=一個以 Cmake 為基礎的 Qt3 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/cmakesimple/CMakeLists.txt b/languages/cpp/app_templates/cmakesimple/CMakeLists.txt index d5e417c3..621dd48a 100644 --- a/languages/cpp/app_templates/cmakesimple/CMakeLists.txt +++ b/languages/cpp/app_templates/cmakesimple/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( cmakesimple.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cmakesimple.tar.gz cmakesimple.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cmakesimple.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cmakesimple.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cmakesimple/Makefile.am b/languages/cpp/app_templates/cmakesimple/Makefile.am index e6ff1e4d..243ed01d 100644 --- a/languages/cpp/app_templates/cmakesimple/Makefile.am +++ b/languages/cpp/app_templates/cmakesimple/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.cpp cmakesimple.png CMakeLists.txt README templateName = cmakesimple ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cmakesimple/cmakesimple.kdevtemplate b/languages/cpp/app_templates/cmakesimple/cmakesimple.kdevtemplate new file mode 100644 index 00000000..14df4c4c --- /dev/null +++ b/languages/cpp/app_templates/cmakesimple/cmakesimple.kdevtemplate @@ -0,0 +1,112 @@ +# TDE Config File +[General] +Name=Hello world program +Name[ca]=Programa Hello world +Name[da]=Goddag verden program +Name[de]="Hello World"-Programm +Name[el]=Πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» +Name[et]="Tere,maailm" programm +Name[eu]="Kaixo mundua" programa +Name[fa]=برنامۀ Hello world +Name[fr]=Programme « Bonjour monde » +Name[ga]=Ríomhchlár "Hello world" +Name[gl]=Programa Ola mundo +Name[it]=Programma di "Hello world" +Name[ja]=Hello world プログラム +Name[nds]="Moin Welt"-Programm +Name[ne]=हेल्डो वोल्ड कार्यक्रम +Name[nl]=Hello World-programma +Name[pl]=Program 'Witaj świecie' +Name[pt]=Programa 'Olá mundo' +Name[pt_BR]=Programa 'Olá mundo' +Name[ru]=Программа Hello world +Name[sk]=Ahoj svet program +Name[sl]=Program Hello world +Name[sr]=Програм „Здраво свете“ +Name[sr@Latn]=Program „Zdravo svete“ +Name[sv]=Hello world-program +Name[tr]=Merhaba Dünya Programı +Name[zh_CN]=Hello world 程序 +Name[zh_TW]=Hello world 程式 +Icon=cmakesimple.png +Category=C++/CMake based projects +Comment=Generates a simple Hello world program in C++ using the CMake build tool instead of the automake/autoconf/libtool combination. It requires cmake 2.1 or cmake 2.2. +Comment[ca]=Genera un simple programa de Hello world en C++ usant l'eina de construcció CMake en comptes de la combinació automake/autoconf/libtool. Requereix cmake 2.1 o cmake 2.2. +Comment[da]=Genererer et simpelt Goddag verden program i C++ ved brug af CMake byggeværktøjet i stedet for automake/autoconf/libtool kombinationen. Det kræver cmake 2.1eller cmake 2.2. +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++. Der Kompiliervorgang wird mit CMake anstelle der Kombination automake/autoconf/libtool durchgeführt und erfordert CMake 2.1 (das über das CVS-Archiv von CMake verfügbar ist) oder die kommende Version 2.2 von CMake. +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα 'Γεια σου Κόσμε' σε C++, χρησιμοποιώντας το εργαλείο κατασκευής CMake αντί του συνδυασμού automake/autoconf/libtool. Χρειάζεται το cmake 2.1 ή το cmake 2.2. +Comment[es]=Genera un sencillo programa «Hola mundo» en C++ usando la herramienta CMake en lugar de la combinación automake/autoconf/libtool. Requiere cmake 2.1 o cmake 2.2. +Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s. See kompileeritakse CMake'i ehitamistööriistaga, mitte automake/autoconf/libtool'i kombinatsiooniga. Selleks on vajalik CMake 2.1 või 2.2. +Comment[fr]=Génère un programme « Bonjour monde » simple en C++ à l'aide de l'outil de construction CMake au lieu de la combinaison automake / autoconf / libtool. Nécessite cmake 2.1 (disponible sur le CVS de CMake) ou cmake 2.2. +Comment[hu]=Létrehoz egy egyszerű 'Hello world' programot C++ nyelven a CMake segítségével (az automake/autoconf/libtool kombináció helyett). CMake 2.1 vagy 2.2 szükséges hozzá. +Comment[it]=Genera un semplice programma di "Hello world" in C++ che usa CMake invece della combinazione automake/autoconf/libtool. Si richiede cmake 2.1 o la versione 2.2. +Comment[ja]=ビルドに automake/autoconf/libtool ではなく CMake を使った簡単な Hello World プログラムを C++ で作成します。CMake 2.1 または 2.2 が必要です。 +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C++ op, mit "CMake" ansteed vun de "automake/autoconf/libtool"-Reeg. Nödig is Verschoon 2.1 oder 2.2 vun CMake. +Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ met behulp van de CMake build tool in plaats van de combinatie automake/autoconf/libtool. Het vereist cmake 2.1 of cmake 2.2. +Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C++. Kompilacja odbywa sie za pomocą narzędzia CMake zamiast kombinacji automake/autoconf/libtool. Wymaga cmake w wersji 2.1 lub 2.2. +Comment[pt]=Gera um programa simples Olá Mundo em C++, com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 ou do cmake 2.2. +Comment[pt_BR]=Gera um programa simples Olá Mundo em C++, com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 ou do cmake 2.2. +Comment[ru]=Создание простого приложения Hello world на C++. Для сборки потребуется CMake вместо комбинации automake/autoconf/libtool. Потребуется cmake версии 2.1 или 2.2. +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C++ s využitím nástroja CMake namiesto kombinácie automake/autoconf/libtool. Vyžaduje cmake 2.1 alebo cmake 2.2. +Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у користећи алат CMake уместо комбинације Automake/Autoconf/Libtool. Захтева CMake 2.1 или 2.2. +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u koristeći alat CMake umesto kombinacije Automake/Autoconf/Libtool. Zahteva CMake 2.1 ili 2.2. +Comment[sv]=Skapar ett enkelt Hello world-program i C++ med användning av byggverktyget CMake istället för kombinationen automake/autoconf/libtool. Det kräver cmake 2.1 eller cmake 2.2. +Comment[zh_TW]=它產生一個簡單的 C++ Hello world 程式。它要用 CMake 建立工具來編譯,而不是用 automake/autoconf/libtool 等。它需要 cmake 2.1 或是 2.2 版以上。 +#FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/main.cpp,%{dest}/README +Archive=cmakesimple.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/CMakeLists.txt +Dest=%{dest}/CMakeLists.txt + +[FILE2] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/main.cpp + +[FILE3] +Type=install +Source=%{src}/README +Dest=%{dest}/README + +[CMAKE] +Type=finishcmd +Command=cmake ./ -GTDevelop3 +Directory=%{dest} + +[MSG] +Type=message +Comment=A CMake based hello world program was created in %{dest} +Comment[ca]=Un programa de hello world basat en CMake ha estat creat en %{dest} +Comment[da]=Et CMake-baseret Goddag verden program blev oprettet i %{dest} +Comment[de]=Ein auf CMake basierendes "Hello World"-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε βασισμένο στο CMake δημιουργήθηκε στο %{dest} +Comment[es]=Un programa «Hola mundo» basado en CMake ha sido creado en %{dest} +Comment[et]="Tere, maailm" programm CMake'i põhjal loodi asukohta %{dest} +Comment[eu]=CMake-en oinarritutako "kaixo mundua" programa bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ Hello World بر مبنای CMake در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » basé sur CMake a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár "Hello World" bunaithe ar CMake i %{dest} +Comment[gl]=Creouse un programa Ola mundo baseado en CMake en %{dest} +Comment[hu]=Létrejött egy CMake-alapú Hello world program itt: %{dest} +Comment[it]=È stato creato un programma di "hello world" basato su CMake in %{dest} +Comment[ja]=CMake ベースの hello world プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op CMake opbuut "Moin Welt"-Programm opstellt +Comment[ne]=CMake आधारित हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een CMake-gebaseerd Hello World-programma is aangemaakt in %{dest} +Comment[pl]=Używający CMake program 'Witaj świecie' został utworzony w %{dest} +Comment[pt]=Foi criado um programa Olá Mundo baseado no CMake em %{dest} +Comment[pt_BR]=Foi criado um programa Olá Mundo baseado no CMake em %{dest} +Comment[ru]=Основанное на CMake приложение создано в %{dest} +Comment[sk]=Ahoj svet program založený na nástroji CMake bol vytvorený v %{dest} +Comment[sl]=Program hello world na osnovi CMake je bil ustvarjen v %{dest} +Comment[sr]=„Здраво свете“ на основу CMake-а направљен је у %{dest} +Comment[sr@Latn]=„Zdravo svete“ na osnovu CMake-a napravljen je u %{dest} +Comment[sv]=Ett CMake-baserat Hello world-program skapades i %{dest} +Comment[tr]=Bir CMake tabanlı Merhaba Dünya programı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个基于 CMake 的 hello world 程序 +Comment[zh_TW]=以 CMake 為基礎的 hello world 程式已建立在 %{dest} diff --git a/languages/cpp/app_templates/cmakesimple/cmakesimple.tdevtemplate b/languages/cpp/app_templates/cmakesimple/cmakesimple.tdevtemplate deleted file mode 100644 index 14df4c4c..00000000 --- a/languages/cpp/app_templates/cmakesimple/cmakesimple.tdevtemplate +++ /dev/null @@ -1,112 +0,0 @@ -# TDE Config File -[General] -Name=Hello world program -Name[ca]=Programa Hello world -Name[da]=Goddag verden program -Name[de]="Hello World"-Programm -Name[el]=Πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» -Name[et]="Tere,maailm" programm -Name[eu]="Kaixo mundua" programa -Name[fa]=برنامۀ Hello world -Name[fr]=Programme « Bonjour monde » -Name[ga]=Ríomhchlár "Hello world" -Name[gl]=Programa Ola mundo -Name[it]=Programma di "Hello world" -Name[ja]=Hello world プログラム -Name[nds]="Moin Welt"-Programm -Name[ne]=हेल्डो वोल्ड कार्यक्रम -Name[nl]=Hello World-programma -Name[pl]=Program 'Witaj świecie' -Name[pt]=Programa 'Olá mundo' -Name[pt_BR]=Programa 'Olá mundo' -Name[ru]=Программа Hello world -Name[sk]=Ahoj svet program -Name[sl]=Program Hello world -Name[sr]=Програм „Здраво свете“ -Name[sr@Latn]=Program „Zdravo svete“ -Name[sv]=Hello world-program -Name[tr]=Merhaba Dünya Programı -Name[zh_CN]=Hello world 程序 -Name[zh_TW]=Hello world 程式 -Icon=cmakesimple.png -Category=C++/CMake based projects -Comment=Generates a simple Hello world program in C++ using the CMake build tool instead of the automake/autoconf/libtool combination. It requires cmake 2.1 or cmake 2.2. -Comment[ca]=Genera un simple programa de Hello world en C++ usant l'eina de construcció CMake en comptes de la combinació automake/autoconf/libtool. Requereix cmake 2.1 o cmake 2.2. -Comment[da]=Genererer et simpelt Goddag verden program i C++ ved brug af CMake byggeværktøjet i stedet for automake/autoconf/libtool kombinationen. Det kræver cmake 2.1eller cmake 2.2. -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++. Der Kompiliervorgang wird mit CMake anstelle der Kombination automake/autoconf/libtool durchgeführt und erfordert CMake 2.1 (das über das CVS-Archiv von CMake verfügbar ist) oder die kommende Version 2.2 von CMake. -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα 'Γεια σου Κόσμε' σε C++, χρησιμοποιώντας το εργαλείο κατασκευής CMake αντί του συνδυασμού automake/autoconf/libtool. Χρειάζεται το cmake 2.1 ή το cmake 2.2. -Comment[es]=Genera un sencillo programa «Hola mundo» en C++ usando la herramienta CMake en lugar de la combinación automake/autoconf/libtool. Requiere cmake 2.1 o cmake 2.2. -Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s. See kompileeritakse CMake'i ehitamistööriistaga, mitte automake/autoconf/libtool'i kombinatsiooniga. Selleks on vajalik CMake 2.1 või 2.2. -Comment[fr]=Génère un programme « Bonjour monde » simple en C++ à l'aide de l'outil de construction CMake au lieu de la combinaison automake / autoconf / libtool. Nécessite cmake 2.1 (disponible sur le CVS de CMake) ou cmake 2.2. -Comment[hu]=Létrehoz egy egyszerű 'Hello world' programot C++ nyelven a CMake segítségével (az automake/autoconf/libtool kombináció helyett). CMake 2.1 vagy 2.2 szükséges hozzá. -Comment[it]=Genera un semplice programma di "Hello world" in C++ che usa CMake invece della combinazione automake/autoconf/libtool. Si richiede cmake 2.1 o la versione 2.2. -Comment[ja]=ビルドに automake/autoconf/libtool ではなく CMake を使った簡単な Hello World プログラムを C++ で作成します。CMake 2.1 または 2.2 が必要です。 -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C++ op, mit "CMake" ansteed vun de "automake/autoconf/libtool"-Reeg. Nödig is Verschoon 2.1 oder 2.2 vun CMake. -Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ met behulp van de CMake build tool in plaats van de combinatie automake/autoconf/libtool. Het vereist cmake 2.1 of cmake 2.2. -Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C++. Kompilacja odbywa sie za pomocą narzędzia CMake zamiast kombinacji automake/autoconf/libtool. Wymaga cmake w wersji 2.1 lub 2.2. -Comment[pt]=Gera um programa simples Olá Mundo em C++, com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 ou do cmake 2.2. -Comment[pt_BR]=Gera um programa simples Olá Mundo em C++, com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 ou do cmake 2.2. -Comment[ru]=Создание простого приложения Hello world на C++. Для сборки потребуется CMake вместо комбинации automake/autoconf/libtool. Потребуется cmake версии 2.1 или 2.2. -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C++ s využitím nástroja CMake namiesto kombinácie automake/autoconf/libtool. Vyžaduje cmake 2.1 alebo cmake 2.2. -Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у користећи алат CMake уместо комбинације Automake/Autoconf/Libtool. Захтева CMake 2.1 или 2.2. -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u koristeći alat CMake umesto kombinacije Automake/Autoconf/Libtool. Zahteva CMake 2.1 ili 2.2. -Comment[sv]=Skapar ett enkelt Hello world-program i C++ med användning av byggverktyget CMake istället för kombinationen automake/autoconf/libtool. Det kräver cmake 2.1 eller cmake 2.2. -Comment[zh_TW]=它產生一個簡單的 C++ Hello world 程式。它要用 CMake 建立工具來編譯,而不是用 automake/autoconf/libtool 等。它需要 cmake 2.1 或是 2.2 版以上。 -#FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/main.cpp,%{dest}/README -Archive=cmakesimple.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/CMakeLists.txt -Dest=%{dest}/CMakeLists.txt - -[FILE2] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/main.cpp - -[FILE3] -Type=install -Source=%{src}/README -Dest=%{dest}/README - -[CMAKE] -Type=finishcmd -Command=cmake ./ -GTDevelop3 -Directory=%{dest} - -[MSG] -Type=message -Comment=A CMake based hello world program was created in %{dest} -Comment[ca]=Un programa de hello world basat en CMake ha estat creat en %{dest} -Comment[da]=Et CMake-baseret Goddag verden program blev oprettet i %{dest} -Comment[de]=Ein auf CMake basierendes "Hello World"-Programm wurde in %{dest} erstellt. -Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε βασισμένο στο CMake δημιουργήθηκε στο %{dest} -Comment[es]=Un programa «Hola mundo» basado en CMake ha sido creado en %{dest} -Comment[et]="Tere, maailm" programm CMake'i põhjal loodi asukohta %{dest} -Comment[eu]=CMake-en oinarritutako "kaixo mundua" programa bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ Hello World بر مبنای CMake در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » basé sur CMake a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár "Hello World" bunaithe ar CMake i %{dest} -Comment[gl]=Creouse un programa Ola mundo baseado en CMake en %{dest} -Comment[hu]=Létrejött egy CMake-alapú Hello world program itt: %{dest} -Comment[it]=È stato creato un programma di "hello world" basato su CMake in %{dest} -Comment[ja]=CMake ベースの hello world プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en op CMake opbuut "Moin Welt"-Programm opstellt -Comment[ne]=CMake आधारित हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een CMake-gebaseerd Hello World-programma is aangemaakt in %{dest} -Comment[pl]=Używający CMake program 'Witaj świecie' został utworzony w %{dest} -Comment[pt]=Foi criado um programa Olá Mundo baseado no CMake em %{dest} -Comment[pt_BR]=Foi criado um programa Olá Mundo baseado no CMake em %{dest} -Comment[ru]=Основанное на CMake приложение создано в %{dest} -Comment[sk]=Ahoj svet program založený na nástroji CMake bol vytvorený v %{dest} -Comment[sl]=Program hello world na osnovi CMake je bil ustvarjen v %{dest} -Comment[sr]=„Здраво свете“ на основу CMake-а направљен је у %{dest} -Comment[sr@Latn]=„Zdravo svete“ na osnovu CMake-a napravljen je u %{dest} -Comment[sv]=Ett CMake-baserat Hello world-program skapades i %{dest} -Comment[tr]=Bir CMake tabanlı Merhaba Dünya programı %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个基于 CMake 的 hello world 程序 -Comment[zh_TW]=以 CMake 為基礎的 hello world 程式已建立在 %{dest} diff --git a/languages/cpp/app_templates/cmakesimplec/CMakeLists.txt b/languages/cpp/app_templates/cmakesimplec/CMakeLists.txt index 70e65075..4d07a4d6 100644 --- a/languages/cpp/app_templates/cmakesimplec/CMakeLists.txt +++ b/languages/cpp/app_templates/cmakesimplec/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( cmakesimplec.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cmakesimplec.tar.gz cmakesimplec.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cmakesimplec.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cmakesimplec.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cmakesimplec/Makefile.am b/languages/cpp/app_templates/cmakesimplec/Makefile.am index df69719d..f5a1c3e7 100644 --- a/languages/cpp/app_templates/cmakesimplec/Makefile.am +++ b/languages/cpp/app_templates/cmakesimplec/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.c cmakesimplec.png CMakeLists.txt templateName = cmakesimplec ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cmakesimplec/cmakesimplec.kdevtemplate b/languages/cpp/app_templates/cmakesimplec/cmakesimplec.kdevtemplate new file mode 100644 index 00000000..25837634 --- /dev/null +++ b/languages/cpp/app_templates/cmakesimplec/cmakesimplec.kdevtemplate @@ -0,0 +1,115 @@ +# TDE Config File +[General] +Name=Hello world program +Name[ca]=Programa Hello world +Name[da]=Goddag verden program +Name[de]="Hello World"-Programm +Name[el]=Πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» +Name[et]="Tere,maailm" programm +Name[eu]="Kaixo mundua" programa +Name[fa]=برنامۀ Hello world +Name[fr]=Programme « Bonjour monde » +Name[ga]=Ríomhchlár "Hello world" +Name[gl]=Programa Ola mundo +Name[it]=Programma di "Hello world" +Name[ja]=Hello world プログラム +Name[nds]="Moin Welt"-Programm +Name[ne]=हेल्डो वोल्ड कार्यक्रम +Name[nl]=Hello World-programma +Name[pl]=Program 'Witaj świecie' +Name[pt]=Programa 'Olá mundo' +Name[pt_BR]=Programa 'Olá mundo' +Name[ru]=Программа Hello world +Name[sk]=Ahoj svet program +Name[sl]=Program Hello world +Name[sr]=Програм „Здраво свете“ +Name[sr@Latn]=Program „Zdravo svete“ +Name[sv]=Hello world-program +Name[tr]=Merhaba Dünya Programı +Name[zh_CN]=Hello world 程序 +Name[zh_TW]=Hello world 程式 +Icon=cmakesimplec.png +Category=C/CMake based projects +Comment=Generates a simple Hello world program in C using the CMake build tool instead of the automake/autoconf/libtool combination. It requires cmake 2.1 (available from cmake cvs) or the upcoming cmake 2.2 release. +Comment[ca]=Genera un simple programa de Hello world en C usant l'eina de construcció CMake en comptes de la combinació automake/autoconf/libtool. Requereix cmake 2.1 (disponible en el cvs de cmake) o la propera versió 2.2. +Comment[da]=Genererer et simpelt Goddag verden program i C ved brug af CMake byggeværktøjet i stedet for automake/autoconf/libtool kombinationen. Det kræver cmake 2.1 (tilgængelig fra cmake cvs) eller den fremtidige cmake 2.2 udgivelse. +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C. Der Kompiliervorgang wird mit CMake anstelle der Kombination automake/autoconf/libtool durchgeführt und erfordert CMake 2.1 (das über das CVS-Archiv von CMake verfügbar ist) oder die kommende Version 2.2 von CMake. +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C, χρησιμοποιώντας το εργαλείο κατασκευής CMake στη θέση του συνδυασμού automake/autoconf/libtool. Χρειάζεται το cmake 2.1 (διαθέσιμο από το cmake cvs) ή την επερχόμενη έκδοση cmake 2.2. +Comment[es]=Genera un sencillo programa «Hola mundo» en C usando la herramienta CMake en lugar de la combinación automake/autoconf/libtool. Requiere cmake 2.1 (disponible en el cvs de cmake) o la próxima cmake 2.2. +Comment[et]=Lihtsa "Tere, maailm" programmi loomine C-s. See kompileeritakse CMake'i ehitamistööriistaga, mitte automake/autoconf/libtool'i kombinatsiooniga. Selleks on vajalik CMake 2.1 (saadaval CMake'i CVSis) või peatne CMake'i versioon 2.2. +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du C lengoaian. CMake tresna erabiliz konpilatzen du automake/autoconf/libtool taldea erabili ordez. cmake 2.1 behar du (cmake cvs-an eskuragarri) edo hurrengo cmake 2.2. +Comment[fa]=یک برنامۀ سادۀ Hello world در سی تولید می‌کند. با استفاده از ابزار ساختن CMake به جای ترکیب automake/autoconf/libtool، ترجمه می‌کند.به cmake 2.1 دارد )از cmake cvs قابل دسترس است( یا نشر cmake 2.2 در آیندۀ نزدیک، نیاز دارد. +Comment[fr]=Génère un programme « Bonjour monde » simple en C à l'aide de l'outil de construction CMake au lieu de la combinaison automake / autoconf / libtool. Nécessite cmake 2.1 (disponible sur le CVS de CMake) ou la version 2.2 de CMake à venir. +Comment[ga]=Cruthaigh ríomhchlár simplí "Hello World" i C a thiomsaítear le huirlis tógála CMake in ionad automake/autoconf/libtool. Tá cmake 2.1 de dhíth (ar fáil ó cmake cvs) nó leagan 2.2 cmake atá le teacht. +Comment[gl]=Xera un program sinxelo Ola mundo en C usando a ferramenta de compilación CMake no lugar da combinación automake/autoconf/libtool. Require cmake 2.1 (dispoñíbel no cvs de cmake) ou a próxima versión cmake 2.2. +Comment[hu]=Létrehoz egy egyszerű Hello world programot C nyelven a CMake fordítóeszköz segítségével (az automake/autoconf/libtool kombináció helyett). CMake 2.1 (a CMake CVS-ben elérhető) vagy a rövidesen megjelenő CMake 2.2 szükséges hozzá. +Comment[it]=Genera un semplice programma di "Hello world" in C che usa CMake invece della combinazione automake/autoconf/libtool. Si richiede cmake 2.1 (disponibile dal CVS di cmake) o la versione a venire cmake 2.2. +Comment[ja]=ビルドに automake/autoconf/libtool ではなく CMake を使った簡単な Hello World プログラムを C で作成します。CMake 2.1 または 2.2 が必要です。 +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C op mit "CMake" in de Verschoon 2.1 (ut dat cmake-CVS) oder 2.2 (de tokamen Utgaav) ansteed vun de "automake/autoconf/libtool"-Kombinatschoon. +Comment[ne]= automake/autoconf/libtool संयोजनको सट्टामा CMake निर्माण उपकरण प्रयोग गरेर C मा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ । यसलाई cmake 2.1 (cmake cvs बाट उपलब्ध हुन्छ) वा आउदै गरेको cmake 2.2 उत्पादन आवश्यक हुन्छ । +Comment[nl]=Genereert een eenvoudig Hello World-programma in C met behulp van de CMake build tool in plaats van de combinatie automake/autoconf/libtool. Het vereist cmake 2.1 (uit het cvs van cmake) of de aankomende cmake 2.2-uitgave. +Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C. Kompilacja odbywa sie za pomocą narzędzia CMake zamiast kombinacji automake/autoconf/libtool. Wymaga cmake 2.1 (dostępnego z cvs-u cmake) lub nadchodzącej wersji 2.2. +Comment[pt]=Gera um programa simples Olá Mundo em C, com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. +Comment[pt_BR]=Gera um programa simples Olá Mundo em C, com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. +Comment[ru]=Создание простого приложения Hello world на C. Для сборки потребуется CMake вместо комбинации automake/autoconf/libtool. Потребуется cmake 2.1 (из CVS cmake) или релиз cmake 2.2. +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C s využitím nástrojaCMake namiesto kombinácie automake/autoconf/libtool.Vyžaduje cmake 2.1 (dostupné v cmake cvs) alebo nadchádzajúci cmake 2.2 release. +Comment[sl]=Ustvari preprost program »Pozdravljen svet« v C. Za prevajanje se namesto kombinacije automake/autoconf/libtool uporabi orodje za gradnjo CMake. Potreben je CMake 2.1 ali CMake 2.2. +Comment[sr]=Прави једноставан „Здраво свете“ програм у C-у користећи алат CMake уместо комбинације Automake/Autoconf/Libtool. Захтева CMake 2.1 (доступан у CVS-у CMake-а) или надолазеће издање CMake 2.2. +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C-u koristeći alat CMake umesto kombinacije Automake/Autoconf/Libtool. Zahteva CMake 2.1 (dostupan u CVS-u CMake-a) ili nadolazeće izdanje CMake 2.2. +Comment[sv]=Skapar ett enkelt Hello world-program i C med användning av byggverktyget CMake istället för kombinationen automake/autoconf/libtool. Det kräver cmake 2.1 (tillgängligt från cmake CVS-arkiv) eller den förestående utgåvan av cmake 2.2. +Comment[tr]=automake/autoconf/libtool birleşimi yerine CMake aracını kullanarak C'de basit bir Merhaba Dünya programı yaratır. cmake 2.1( cmake cvs'inden edinilebilir) veya yakında gelecek olan 2.2 sürümüne ihtiyaç duyar. +Comment[zh_CN]=生成一个 C 的 Hello world 程序。该程序使用 CMake 编译工具编译,而不是使用 automake/autoconf/libtool 的组合。该程序需要 cmake 2.1 (可从 cmake cvs 中获得)或即将发布的 cmake 2.2 版本。 +Comment[zh_TW]=它產生一個簡單的 C 的 Hello world 程式。它要用 CMake 建立工具來編譯,而不是用 automake/autoconf/libtool 等。它需要 cmake 2.1(可以從 cmake cvs 中取得),或是以後的版本。 +#FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/main.c +Archive=cmakesimplec.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/CMakeLists.txt +Dest=%{dest}/CMakeLists.txt + +[FILE2] +Type=install +Source=%{src}/main.c +Dest=%{dest}/main.c + +[CMAKE] +Type=finishcmd +Command=cmake ./ -GTDevelop3 +Directory=%{dest} + +[MSG] +Type=message +Comment=A CMake based hello world program was created in %{dest} +Comment[ca]=Un programa de hello world basat en CMake ha estat creat en %{dest} +Comment[da]=Et CMake-baseret Goddag verden program blev oprettet i %{dest} +Comment[de]=Ein auf CMake basierendes "Hello World"-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε βασισμένο στο CMake δημιουργήθηκε στο %{dest} +Comment[es]=Un programa «Hola mundo» basado en CMake ha sido creado en %{dest} +Comment[et]="Tere, maailm" programm CMake'i põhjal loodi asukohta %{dest} +Comment[eu]=CMake-en oinarritutako "kaixo mundua" programa bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ Hello World بر مبنای CMake در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » basé sur CMake a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár "Hello World" bunaithe ar CMake i %{dest} +Comment[gl]=Creouse un programa Ola mundo baseado en CMake en %{dest} +Comment[hu]=Létrejött egy CMake-alapú Hello world program itt: %{dest} +Comment[it]=È stato creato un programma di "hello world" basato su CMake in %{dest} +Comment[ja]=CMake ベースの hello world プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op CMake opbuut "Moin Welt"-Programm opstellt +Comment[ne]=CMake आधारित हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een CMake-gebaseerd Hello World-programma is aangemaakt in %{dest} +Comment[pl]=Używający CMake program 'Witaj świecie' został utworzony w %{dest} +Comment[pt]=Foi criado um programa Olá Mundo baseado no CMake em %{dest} +Comment[pt_BR]=Foi criado um programa Olá Mundo baseado no CMake em %{dest} +Comment[ru]=Основанное на CMake приложение создано в %{dest} +Comment[sk]=Ahoj svet program založený na nástroji CMake bol vytvorený v %{dest} +Comment[sl]=Program hello world na osnovi CMake je bil ustvarjen v %{dest} +Comment[sr]=„Здраво свете“ на основу CMake-а направљен је у %{dest} +Comment[sr@Latn]=„Zdravo svete“ na osnovu CMake-a napravljen je u %{dest} +Comment[sv]=Ett CMake-baserat Hello world-program skapades i %{dest} +Comment[tr]=Bir CMake tabanlı Merhaba Dünya programı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个基于 CMake 的 hello world 程序 +Comment[zh_TW]=以 CMake 為基礎的 hello world 程式已建立在 %{dest} diff --git a/languages/cpp/app_templates/cmakesimplec/cmakesimplec.tdevtemplate b/languages/cpp/app_templates/cmakesimplec/cmakesimplec.tdevtemplate deleted file mode 100644 index 25837634..00000000 --- a/languages/cpp/app_templates/cmakesimplec/cmakesimplec.tdevtemplate +++ /dev/null @@ -1,115 +0,0 @@ -# TDE Config File -[General] -Name=Hello world program -Name[ca]=Programa Hello world -Name[da]=Goddag verden program -Name[de]="Hello World"-Programm -Name[el]=Πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» -Name[et]="Tere,maailm" programm -Name[eu]="Kaixo mundua" programa -Name[fa]=برنامۀ Hello world -Name[fr]=Programme « Bonjour monde » -Name[ga]=Ríomhchlár "Hello world" -Name[gl]=Programa Ola mundo -Name[it]=Programma di "Hello world" -Name[ja]=Hello world プログラム -Name[nds]="Moin Welt"-Programm -Name[ne]=हेल्डो वोल्ड कार्यक्रम -Name[nl]=Hello World-programma -Name[pl]=Program 'Witaj świecie' -Name[pt]=Programa 'Olá mundo' -Name[pt_BR]=Programa 'Olá mundo' -Name[ru]=Программа Hello world -Name[sk]=Ahoj svet program -Name[sl]=Program Hello world -Name[sr]=Програм „Здраво свете“ -Name[sr@Latn]=Program „Zdravo svete“ -Name[sv]=Hello world-program -Name[tr]=Merhaba Dünya Programı -Name[zh_CN]=Hello world 程序 -Name[zh_TW]=Hello world 程式 -Icon=cmakesimplec.png -Category=C/CMake based projects -Comment=Generates a simple Hello world program in C using the CMake build tool instead of the automake/autoconf/libtool combination. It requires cmake 2.1 (available from cmake cvs) or the upcoming cmake 2.2 release. -Comment[ca]=Genera un simple programa de Hello world en C usant l'eina de construcció CMake en comptes de la combinació automake/autoconf/libtool. Requereix cmake 2.1 (disponible en el cvs de cmake) o la propera versió 2.2. -Comment[da]=Genererer et simpelt Goddag verden program i C ved brug af CMake byggeværktøjet i stedet for automake/autoconf/libtool kombinationen. Det kræver cmake 2.1 (tilgængelig fra cmake cvs) eller den fremtidige cmake 2.2 udgivelse. -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C. Der Kompiliervorgang wird mit CMake anstelle der Kombination automake/autoconf/libtool durchgeführt und erfordert CMake 2.1 (das über das CVS-Archiv von CMake verfügbar ist) oder die kommende Version 2.2 von CMake. -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C, χρησιμοποιώντας το εργαλείο κατασκευής CMake στη θέση του συνδυασμού automake/autoconf/libtool. Χρειάζεται το cmake 2.1 (διαθέσιμο από το cmake cvs) ή την επερχόμενη έκδοση cmake 2.2. -Comment[es]=Genera un sencillo programa «Hola mundo» en C usando la herramienta CMake en lugar de la combinación automake/autoconf/libtool. Requiere cmake 2.1 (disponible en el cvs de cmake) o la próxima cmake 2.2. -Comment[et]=Lihtsa "Tere, maailm" programmi loomine C-s. See kompileeritakse CMake'i ehitamistööriistaga, mitte automake/autoconf/libtool'i kombinatsiooniga. Selleks on vajalik CMake 2.1 (saadaval CMake'i CVSis) või peatne CMake'i versioon 2.2. -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du C lengoaian. CMake tresna erabiliz konpilatzen du automake/autoconf/libtool taldea erabili ordez. cmake 2.1 behar du (cmake cvs-an eskuragarri) edo hurrengo cmake 2.2. -Comment[fa]=یک برنامۀ سادۀ Hello world در سی تولید می‌کند. با استفاده از ابزار ساختن CMake به جای ترکیب automake/autoconf/libtool، ترجمه می‌کند.به cmake 2.1 دارد )از cmake cvs قابل دسترس است( یا نشر cmake 2.2 در آیندۀ نزدیک، نیاز دارد. -Comment[fr]=Génère un programme « Bonjour monde » simple en C à l'aide de l'outil de construction CMake au lieu de la combinaison automake / autoconf / libtool. Nécessite cmake 2.1 (disponible sur le CVS de CMake) ou la version 2.2 de CMake à venir. -Comment[ga]=Cruthaigh ríomhchlár simplí "Hello World" i C a thiomsaítear le huirlis tógála CMake in ionad automake/autoconf/libtool. Tá cmake 2.1 de dhíth (ar fáil ó cmake cvs) nó leagan 2.2 cmake atá le teacht. -Comment[gl]=Xera un program sinxelo Ola mundo en C usando a ferramenta de compilación CMake no lugar da combinación automake/autoconf/libtool. Require cmake 2.1 (dispoñíbel no cvs de cmake) ou a próxima versión cmake 2.2. -Comment[hu]=Létrehoz egy egyszerű Hello world programot C nyelven a CMake fordítóeszköz segítségével (az automake/autoconf/libtool kombináció helyett). CMake 2.1 (a CMake CVS-ben elérhető) vagy a rövidesen megjelenő CMake 2.2 szükséges hozzá. -Comment[it]=Genera un semplice programma di "Hello world" in C che usa CMake invece della combinazione automake/autoconf/libtool. Si richiede cmake 2.1 (disponibile dal CVS di cmake) o la versione a venire cmake 2.2. -Comment[ja]=ビルドに automake/autoconf/libtool ではなく CMake を使った簡単な Hello World プログラムを C で作成します。CMake 2.1 または 2.2 が必要です。 -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C op mit "CMake" in de Verschoon 2.1 (ut dat cmake-CVS) oder 2.2 (de tokamen Utgaav) ansteed vun de "automake/autoconf/libtool"-Kombinatschoon. -Comment[ne]= automake/autoconf/libtool संयोजनको सट्टामा CMake निर्माण उपकरण प्रयोग गरेर C मा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ । यसलाई cmake 2.1 (cmake cvs बाट उपलब्ध हुन्छ) वा आउदै गरेको cmake 2.2 उत्पादन आवश्यक हुन्छ । -Comment[nl]=Genereert een eenvoudig Hello World-programma in C met behulp van de CMake build tool in plaats van de combinatie automake/autoconf/libtool. Het vereist cmake 2.1 (uit het cvs van cmake) of de aankomende cmake 2.2-uitgave. -Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C. Kompilacja odbywa sie za pomocą narzędzia CMake zamiast kombinacji automake/autoconf/libtool. Wymaga cmake 2.1 (dostępnego z cvs-u cmake) lub nadchodzącej wersji 2.2. -Comment[pt]=Gera um programa simples Olá Mundo em C, com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. -Comment[pt_BR]=Gera um programa simples Olá Mundo em C, com a ferramenta CMake em vez da combinação automake/autoconf/libtool. Necessita do cmake 2.1 (disponível no CVS do 'cmake') ou da próxima versão cmake 2.2. -Comment[ru]=Создание простого приложения Hello world на C. Для сборки потребуется CMake вместо комбинации automake/autoconf/libtool. Потребуется cmake 2.1 (из CVS cmake) или релиз cmake 2.2. -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C s využitím nástrojaCMake namiesto kombinácie automake/autoconf/libtool.Vyžaduje cmake 2.1 (dostupné v cmake cvs) alebo nadchádzajúci cmake 2.2 release. -Comment[sl]=Ustvari preprost program »Pozdravljen svet« v C. Za prevajanje se namesto kombinacije automake/autoconf/libtool uporabi orodje za gradnjo CMake. Potreben je CMake 2.1 ali CMake 2.2. -Comment[sr]=Прави једноставан „Здраво свете“ програм у C-у користећи алат CMake уместо комбинације Automake/Autoconf/Libtool. Захтева CMake 2.1 (доступан у CVS-у CMake-а) или надолазеће издање CMake 2.2. -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C-u koristeći alat CMake umesto kombinacije Automake/Autoconf/Libtool. Zahteva CMake 2.1 (dostupan u CVS-u CMake-a) ili nadolazeće izdanje CMake 2.2. -Comment[sv]=Skapar ett enkelt Hello world-program i C med användning av byggverktyget CMake istället för kombinationen automake/autoconf/libtool. Det kräver cmake 2.1 (tillgängligt från cmake CVS-arkiv) eller den förestående utgåvan av cmake 2.2. -Comment[tr]=automake/autoconf/libtool birleşimi yerine CMake aracını kullanarak C'de basit bir Merhaba Dünya programı yaratır. cmake 2.1( cmake cvs'inden edinilebilir) veya yakında gelecek olan 2.2 sürümüne ihtiyaç duyar. -Comment[zh_CN]=生成一个 C 的 Hello world 程序。该程序使用 CMake 编译工具编译,而不是使用 automake/autoconf/libtool 的组合。该程序需要 cmake 2.1 (可从 cmake cvs 中获得)或即将发布的 cmake 2.2 版本。 -Comment[zh_TW]=它產生一個簡單的 C 的 Hello world 程式。它要用 CMake 建立工具來編譯,而不是用 automake/autoconf/libtool 等。它需要 cmake 2.1(可以從 cmake cvs 中取得),或是以後的版本。 -#FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/main.c -Archive=cmakesimplec.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/CMakeLists.txt -Dest=%{dest}/CMakeLists.txt - -[FILE2] -Type=install -Source=%{src}/main.c -Dest=%{dest}/main.c - -[CMAKE] -Type=finishcmd -Command=cmake ./ -GTDevelop3 -Directory=%{dest} - -[MSG] -Type=message -Comment=A CMake based hello world program was created in %{dest} -Comment[ca]=Un programa de hello world basat en CMake ha estat creat en %{dest} -Comment[da]=Et CMake-baseret Goddag verden program blev oprettet i %{dest} -Comment[de]=Ein auf CMake basierendes "Hello World"-Programm wurde in %{dest} erstellt. -Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε βασισμένο στο CMake δημιουργήθηκε στο %{dest} -Comment[es]=Un programa «Hola mundo» basado en CMake ha sido creado en %{dest} -Comment[et]="Tere, maailm" programm CMake'i põhjal loodi asukohta %{dest} -Comment[eu]=CMake-en oinarritutako "kaixo mundua" programa bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ Hello World بر مبنای CMake در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » basé sur CMake a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár "Hello World" bunaithe ar CMake i %{dest} -Comment[gl]=Creouse un programa Ola mundo baseado en CMake en %{dest} -Comment[hu]=Létrejött egy CMake-alapú Hello world program itt: %{dest} -Comment[it]=È stato creato un programma di "hello world" basato su CMake in %{dest} -Comment[ja]=CMake ベースの hello world プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en op CMake opbuut "Moin Welt"-Programm opstellt -Comment[ne]=CMake आधारित हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een CMake-gebaseerd Hello World-programma is aangemaakt in %{dest} -Comment[pl]=Używający CMake program 'Witaj świecie' został utworzony w %{dest} -Comment[pt]=Foi criado um programa Olá Mundo baseado no CMake em %{dest} -Comment[pt_BR]=Foi criado um programa Olá Mundo baseado no CMake em %{dest} -Comment[ru]=Основанное на CMake приложение создано в %{dest} -Comment[sk]=Ahoj svet program založený na nástroji CMake bol vytvorený v %{dest} -Comment[sl]=Program hello world na osnovi CMake je bil ustvarjen v %{dest} -Comment[sr]=„Здраво свете“ на основу CMake-а направљен је у %{dest} -Comment[sr@Latn]=„Zdravo svete“ na osnovu CMake-a napravljen je u %{dest} -Comment[sv]=Ett CMake-baserat Hello world-program skapades i %{dest} -Comment[tr]=Bir CMake tabanlı Merhaba Dünya programı %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个基于 CMake 的 hello world 程序 -Comment[zh_TW]=以 CMake 為基礎的 hello world 程式已建立在 %{dest} diff --git a/languages/cpp/app_templates/cppcurseshello/CMakeLists.txt b/languages/cpp/app_templates/cppcurseshello/CMakeLists.txt index bfdd6d10..ccb2dd4a 100644 --- a/languages/cpp/app_templates/cppcurseshello/CMakeLists.txt +++ b/languages/cpp/app_templates/cppcurseshello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( cppcurseshello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cppcurseshello.tar.gz cppcurseshello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cppcurseshello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cppcurseshello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cppcurseshello/Makefile.am b/languages/cpp/app_templates/cppcurseshello/Makefile.am index 17175bfa..ef3623f6 100644 --- a/languages/cpp/app_templates/cppcurseshello/Makefile.am +++ b/languages/cpp/app_templates/cppcurseshello/Makefile.am @@ -3,10 +3,10 @@ dataFiles = main.cpp src-Makefile.am cpp-Makefile.am cpp-Makefile.cvs\ templateName = cppcurseshello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cppcurseshello/app.tdevelop b/languages/cpp/app_templates/cppcurseshello/app.tdevelop index d771aedf..98919071 100644 --- a/languages/cpp/app_templates/cppcurseshello/app.tdevelop +++ b/languages/cpp/app_templates/cppcurseshello/app.tdevelop @@ -11,7 +11,7 @@ Code - + src/%{APPNAMELC} debug @@ -37,8 +37,8 @@ -O0 -g3 - - + + ada ada_bugs_gcc @@ -83,23 +83,23 @@ TDE Libraries (Doxygen) - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/cppcurseshello/cppcurseshello.kdevtemplate b/languages/cpp/app_templates/cppcurseshello/cppcurseshello.kdevtemplate new file mode 100644 index 00000000..27f85c21 --- /dev/null +++ b/languages/cpp/app_templates/cppcurseshello/cppcurseshello.kdevtemplate @@ -0,0 +1,143 @@ +# TDE Config File +[General] +Name=Simple ncurses Hello world program +Name[ca]=Simple programa de Hello world per a ncurses +Name[da]=Simpelt ncurses Goddag verden program +Name[de]=Einfaches auf NCurses basierendes "Hello World"-Programm +Name[el]=Απλό ncurses πρόγραμμα Γεια σου κόσμε +Name[es]=Programa «Hola mundo» sencillo en ncurses +Name[et]=Lihtne "Tere, maailm" programm ncurses'i põhjal +Name[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat +Name[fa]=برنامۀ سادۀ ncurses Hello world +Name[fr]=Programme « Bonjour monde » simple en ncurses +Name[ga]=Ríomhchlár simplí "Hello World" le ncurses +Name[gl]=Programa sinxelo ncurses Ola mundo +Name[hu]=Egyszerű, Ncurses-alapú Hello world program +Name[it]=Semplice programma "Hello world" realizzato con ncurses +Name[ja]=ncurses を使った簡単な Hello World プログラム +Name[nds]=Eenfach ncurses-"Moin Welt"-Programm +Name[ne]=साधारण ncurses हेल्लो वोल्ड कार्यक्रम +Name[nl]=Een eenvoudig ncurses Hello World-programma +Name[pl]=Prosty program 'Witaj świecie' używający ncurses +Name[pt]=Programa simples Olá Mundo em ncurses +Name[pt_BR]=Programa simples Olá Mundo em ncurses +Name[ru]=Простое приложение Hello world на ncurses +Name[sk]=Jednoduchý "Ahoj svet" ncurses program +Name[sl]=Preprost program Hello world na osnovi ncurses +Name[sr]=Једноставан „Здраво свете“ програм за ncurses +Name[sr@Latn]=Jednostavan „Zdravo svete“ program za ncurses +Name[sv]=Enkelt ncurses Hello world-program +Name[tr]=Basit ncurses Merhaba Dünya programı +Name[zh_CN]=简单的 ncurses Hello world 程序 +Name[zh_TW]=簡單的 ncurses Hello world 程式 +Icon= +Category=C++ +Comment=Generates a simple ncurses based Hello world program in C++ +Comment[ca]=Genera un simple programa de Hello world en C++ i basat en ncurses +Comment[da]=Genererer et simpelt ncurses baseret Goddag verden program in C++ +Comment[de]=Erstellt ein einfaches, auf NCurses basierendes "Hello World"-Programm in C++ +Comment[el]=Δημιουργεί ένα απλό βασισμένο σε ncurses πρόγραμμα Γεια σου κόσμε σε C++ +Comment[es]=Genera un sencillo programa «Hola mundo» en C++ basado en ncurses +Comment[et]=Lihtsa "Tere, maailm" programmi loomine ncurses'i põhjal C++-s +Comment[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat C++ lengoaian +Comment[fa]=یک برنامۀ سادۀ Hello world در C++ بر مبنای ncurses تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple basé sur ncurses en C++ +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" bunaithe ar ncurses, i C++ +Comment[gl]=Xera un programa sinxelo Ola mundo baseado en ncurses en C++ +Comment[hu]=Létrehoz egy egyszerű, Ncurses-alapú Hello world programot C++-ban +Comment[it]=Genera un semplice programma di "Hello world" in C++ realizzato con ncurses +Comment[ja]=ncurses を使った簡単な Hello World プログラムを C++ で作成します +Comment[nds]=Stellt en eenfach op "ncurses" opbuut "Moin Welt"-Programm in C++ op +Comment[ne]=C++ मा हेल्लो वोल्ड कार्यक्रम आधारित साधारण ncurses उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig ncurses-gebaseerd Hello World-programma in C++ +Comment[pl]=Generuje prosty program 'Witaj świecie' używający ncurses i języka C++. +Comment[pt]=Gera um programa simples Olá Mundo em C++, baseado no 'ncurses' +Comment[pt_BR]=Gera um programa simples Olá Mundo em C++, baseado no 'ncurses' +Comment[ru]=Создание простого приложения Hello world на ncurses и C++ +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" ncurses program v C++ +Comment[sl]=Ustvari preprost program Hello world na osnovi ncurses v C++ +Comment[sr]=Прави једноставан „Здраво свете“ програм на основу ncurses, у C++-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program na osnovu ncurses, u C++-u +Comment[sv]=Skapar ett enkelt ncurses-baserat Hello world-program i C++ +Comment[tr]=C++'da ncurses tabanlı basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成一个基于 ncurses 的 C++ Hello world 程序 +Comment[zh_TW]=產生一個簡單的用 C++ 語言與 ncurses 函式庫的 Hello world 程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=cppcurseshello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/cpp-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/cpp-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/app-configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=A simple hello world program using ncurses was created in %{dest} +Comment[ca]=Un simple programa de hello world usant ncurses ha estat creat en %{dest} +Comment[da]=Et simpelt Goddag verden program ved brug af ncurses blev oprettet i %{dest} +Comment[de]=Ein einfaches "Hello World"-Programm unter Verwendung von NCurses wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα Γεια σου Κόσμε χρησιμοποιώντας το ncurses δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa «Hola mundo» que usa ncurses ha sido creado en %{dest} +Comment[et]=Lihtne "Tere, maailm" programm ncurses'i põhjas loodi asukohta %{dest} +Comment[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ hello world با استفاده از ncurses در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » simple utilisant ncurses a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" le ncurses i %{dest} +Comment[gl]=Creouse un programa sinxelo ola mundo usando ncurses en in %{dest} +Comment[hu]=Létrejött egy egyszerű, Ncurses-alapú Hello world program itt: %{dest} +Comment[it]=È stato creato un programma di "hello world" che usa ncurses in %{dest} +Comment[ja]=ncurses を使った簡単な Hello World プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm opstellt, dat "ncurses" bruukt +Comment[ne]=ncurses प्रयोग गरेर एउटा हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig Hallo Wereld-programma gebruikmakend van ncurses is aangemaakt in %{dest} +Comment[pl]=Prosty program 'Witaj świecie' używający ncurses został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples Olá Mundo que usa o ncurses em %{dest} +Comment[pt_BR]=Foi criado um programa simples Olá Mundo que usa o ncurses em %{dest} +Comment[ru]=Простое приложение Hello world на ncurses создано в %{dest} +Comment[sk]=Jednoduchý "Ahoj svet" ncurses program bol vytvorený v %{dest} +Comment[sl]=Preprost program Hello world na osnovi ncurses je bil ustvarjen v %{dest} +Comment[sr]=Једноставан „Здраво свете“ на основу ncurses направљен је у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo svete“ na osnovu ncurses napravljen je u %{dest} +Comment[sv]=Ett enkelt Hello world-program som använder ncurses skapades i %{dest} +Comment[tr]=ncurses kullanan basit bir merhaba dünya programı %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了一个使用 ncurses 的 hello world 程序 +Comment[zh_TW]=一個簡單的使用 ncurses 函式庫的 hello world 程式已建立在 %{dest} diff --git a/languages/cpp/app_templates/cppcurseshello/cppcurseshello.tdevtemplate b/languages/cpp/app_templates/cppcurseshello/cppcurseshello.tdevtemplate deleted file mode 100644 index 5bd7ebe2..00000000 --- a/languages/cpp/app_templates/cppcurseshello/cppcurseshello.tdevtemplate +++ /dev/null @@ -1,143 +0,0 @@ -# TDE Config File -[General] -Name=Simple ncurses Hello world program -Name[ca]=Simple programa de Hello world per a ncurses -Name[da]=Simpelt ncurses Goddag verden program -Name[de]=Einfaches auf NCurses basierendes "Hello World"-Programm -Name[el]=Απλό ncurses πρόγραμμα Γεια σου κόσμε -Name[es]=Programa «Hola mundo» sencillo en ncurses -Name[et]=Lihtne "Tere, maailm" programm ncurses'i põhjal -Name[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat -Name[fa]=برنامۀ سادۀ ncurses Hello world -Name[fr]=Programme « Bonjour monde » simple en ncurses -Name[ga]=Ríomhchlár simplí "Hello World" le ncurses -Name[gl]=Programa sinxelo ncurses Ola mundo -Name[hu]=Egyszerű, Ncurses-alapú Hello world program -Name[it]=Semplice programma "Hello world" realizzato con ncurses -Name[ja]=ncurses を使った簡単な Hello World プログラム -Name[nds]=Eenfach ncurses-"Moin Welt"-Programm -Name[ne]=साधारण ncurses हेल्लो वोल्ड कार्यक्रम -Name[nl]=Een eenvoudig ncurses Hello World-programma -Name[pl]=Prosty program 'Witaj świecie' używający ncurses -Name[pt]=Programa simples Olá Mundo em ncurses -Name[pt_BR]=Programa simples Olá Mundo em ncurses -Name[ru]=Простое приложение Hello world на ncurses -Name[sk]=Jednoduchý "Ahoj svet" ncurses program -Name[sl]=Preprost program Hello world na osnovi ncurses -Name[sr]=Једноставан „Здраво свете“ програм за ncurses -Name[sr@Latn]=Jednostavan „Zdravo svete“ program za ncurses -Name[sv]=Enkelt ncurses Hello world-program -Name[tr]=Basit ncurses Merhaba Dünya programı -Name[zh_CN]=简单的 ncurses Hello world 程序 -Name[zh_TW]=簡單的 ncurses Hello world 程式 -Icon= -Category=C++ -Comment=Generates a simple ncurses based Hello world program in C++ -Comment[ca]=Genera un simple programa de Hello world en C++ i basat en ncurses -Comment[da]=Genererer et simpelt ncurses baseret Goddag verden program in C++ -Comment[de]=Erstellt ein einfaches, auf NCurses basierendes "Hello World"-Programm in C++ -Comment[el]=Δημιουργεί ένα απλό βασισμένο σε ncurses πρόγραμμα Γεια σου κόσμε σε C++ -Comment[es]=Genera un sencillo programa «Hola mundo» en C++ basado en ncurses -Comment[et]=Lihtsa "Tere, maailm" programmi loomine ncurses'i põhjal C++-s -Comment[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat C++ lengoaian -Comment[fa]=یک برنامۀ سادۀ Hello world در C++ بر مبنای ncurses تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple basé sur ncurses en C++ -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" bunaithe ar ncurses, i C++ -Comment[gl]=Xera un programa sinxelo Ola mundo baseado en ncurses en C++ -Comment[hu]=Létrehoz egy egyszerű, Ncurses-alapú Hello world programot C++-ban -Comment[it]=Genera un semplice programma di "Hello world" in C++ realizzato con ncurses -Comment[ja]=ncurses を使った簡単な Hello World プログラムを C++ で作成します -Comment[nds]=Stellt en eenfach op "ncurses" opbuut "Moin Welt"-Programm in C++ op -Comment[ne]=C++ मा हेल्लो वोल्ड कार्यक्रम आधारित साधारण ncurses उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig ncurses-gebaseerd Hello World-programma in C++ -Comment[pl]=Generuje prosty program 'Witaj świecie' używający ncurses i języka C++. -Comment[pt]=Gera um programa simples Olá Mundo em C++, baseado no 'ncurses' -Comment[pt_BR]=Gera um programa simples Olá Mundo em C++, baseado no 'ncurses' -Comment[ru]=Создание простого приложения Hello world на ncurses и C++ -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" ncurses program v C++ -Comment[sl]=Ustvari preprost program Hello world na osnovi ncurses v C++ -Comment[sr]=Прави једноставан „Здраво свете“ програм на основу ncurses, у C++-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program na osnovu ncurses, u C++-u -Comment[sv]=Skapar ett enkelt ncurses-baserat Hello world-program i C++ -Comment[tr]=C++'da ncurses tabanlı basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成一个基于 ncurses 的 C++ Hello world 程序 -Comment[zh_TW]=產生一個簡單的用 C++ 語言與 ncurses 函式庫的 Hello world 程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=cppcurseshello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/cpp-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/cpp-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/app-configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=A simple hello world program using ncurses was created in %{dest} -Comment[ca]=Un simple programa de hello world usant ncurses ha estat creat en %{dest} -Comment[da]=Et simpelt Goddag verden program ved brug af ncurses blev oprettet i %{dest} -Comment[de]=Ein einfaches "Hello World"-Programm unter Verwendung von NCurses wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα Γεια σου Κόσμε χρησιμοποιώντας το ncurses δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa «Hola mundo» que usa ncurses ha sido creado en %{dest} -Comment[et]=Lihtne "Tere, maailm" programm ncurses'i põhjas loodi asukohta %{dest} -Comment[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ hello world با استفاده از ncurses در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » simple utilisant ncurses a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" le ncurses i %{dest} -Comment[gl]=Creouse un programa sinxelo ola mundo usando ncurses en in %{dest} -Comment[hu]=Létrejött egy egyszerű, Ncurses-alapú Hello world program itt: %{dest} -Comment[it]=È stato creato un programma di "hello world" che usa ncurses in %{dest} -Comment[ja]=ncurses を使った簡単な Hello World プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm opstellt, dat "ncurses" bruukt -Comment[ne]=ncurses प्रयोग गरेर एउटा हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig Hallo Wereld-programma gebruikmakend van ncurses is aangemaakt in %{dest} -Comment[pl]=Prosty program 'Witaj świecie' używający ncurses został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples Olá Mundo que usa o ncurses em %{dest} -Comment[pt_BR]=Foi criado um programa simples Olá Mundo que usa o ncurses em %{dest} -Comment[ru]=Простое приложение Hello world на ncurses создано в %{dest} -Comment[sk]=Jednoduchý "Ahoj svet" ncurses program bol vytvorený v %{dest} -Comment[sl]=Preprost program Hello world na osnovi ncurses je bil ustvarjen v %{dest} -Comment[sr]=Једноставан „Здраво свете“ на основу ncurses направљен је у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo svete“ na osnovu ncurses napravljen je u %{dest} -Comment[sv]=Ett enkelt Hello world-program som använder ncurses skapades i %{dest} -Comment[tr]=ncurses kullanan basit bir merhaba dünya programı %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了一个使用 ncurses 的 hello world 程序 -Comment[zh_TW]=一個簡單的使用 ncurses 函式庫的 hello world 程式已建立在 %{dest} diff --git a/languages/cpp/app_templates/cpphello/CMakeLists.txt b/languages/cpp/app_templates/cpphello/CMakeLists.txt index 9227cfcd..d77effea 100644 --- a/languages/cpp/app_templates/cpphello/CMakeLists.txt +++ b/languages/cpp/app_templates/cpphello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( cpphello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cpphello.tar.gz cpphello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cpphello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cpphello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cpphello/Makefile.am b/languages/cpp/app_templates/cpphello/Makefile.am index 930a46e5..2ba017c2 100644 --- a/languages/cpp/app_templates/cpphello/Makefile.am +++ b/languages/cpp/app_templates/cpphello/Makefile.am @@ -3,10 +3,10 @@ dataFiles = main.cpp src-Makefile.am cpp-Makefile.am cpp-Makefile.cvs \ templateName = cpphello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cpphello/app.tdevelop b/languages/cpp/app_templates/cpphello/app.tdevelop index d771aedf..98919071 100644 --- a/languages/cpp/app_templates/cpphello/app.tdevelop +++ b/languages/cpp/app_templates/cpphello/app.tdevelop @@ -11,7 +11,7 @@ Code - + src/%{APPNAMELC} debug @@ -37,8 +37,8 @@ -O0 -g3 - - + + ada ada_bugs_gcc @@ -83,23 +83,23 @@ TDE Libraries (Doxygen) - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/cpphello/cpphello.kdevtemplate b/languages/cpp/app_templates/cpphello/cpphello.kdevtemplate new file mode 100644 index 00000000..ee529159 --- /dev/null +++ b/languages/cpp/app_templates/cpphello/cpphello.kdevtemplate @@ -0,0 +1,145 @@ +# TDE Config File +[General] +Name=Simple Hello world program +Name[ca]=Simple programa Hello world +Name[da]=Simpelt Goddag verden program +Name[de]=Ein einfaches "Hello World"-Programm +Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» sencillo +Name[et]=Lihtne "Tere, maailm" programm +Name[eu]="Kaixo mundua" programa sinplea +Name[fa]=برنامۀ سادۀ Hello world +Name[fr]=Programme « Bonjour monde » simple +Name[ga]=Ríomhchlár simplí "Hello World" +Name[gl]=Programa sinxelo Ola mundo +Name[hu]=Egyszerű Hello world program +Name[it]=Semplice programma di "Hello world" +Name[ja]=簡単な Hello world プログラム +Name[ms]=Program Hello World mudah +Name[nds]=En eenfach "Moin Welt"-Programm +Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम +Name[nl]=Eenvoudig 'Hello World' programma +Name[pl]=Prosty program witaj świecie +Name[pt]=Programa simples Olá Mundo +Name[pt_BR]=Programa simples Olá Mundo +Name[ru]=Простая программа Hello world +Name[sk]=Jednoduchý "Ahoj svet" program +Name[sl]=Preprost program Hello world +Name[sr]=Једноставан „Здраво свете“ програм +Name[sr@Latn]=Jednostavan „Zdravo svete“ program +Name[sv]=Enkelt Hello world-program +Name[tr]=Basit Merhaba dünya programı +Name[zh_CN]=简单的 Hello world 程序 +Name[zh_TW]=簡單的 Hello world 程式 +Icon=cpphello.png +Category=C++ +Comment=Generates a simple Hello world program in C++ +Comment[ca]=Genera un simple programa de Hello world en C++ +Comment[da]=Genererer et simpelt Goddag verden program in C++ +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++ +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C++ +Comment[es]=Genera un sencillo programa «Hola mundo» en C++ +Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du C++ lengoaian +Comment[fa]=یک برنامۀ سادۀ Hello world در C++ تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en C++ +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C++ +Comment[gl]=Xera un programa sinxelo Ola mundo en C++ +Comment[hu]=Létrehoz egy egyszerű Hello world programot C++-ban +Comment[it]=Genera un semplice programma di "Hello world" in C++ +Comment[ja]=簡単な Hello World プログラムを C++ で作成します +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C++ op +Comment[ne]=C++ मा एउटा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ +Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C++ +Comment[pt]=Gera um programa simples Olá Mundo em C++ +Comment[pt_BR]=Gera um programa simples Olá Mundo em C++ +Comment[ru]=Создание простого приложения Hello world на C++ +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C++ +Comment[sl]=Ustvari preprost program Hello world v C++ +Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u +Comment[sv]=Skapar ett enkelt Hello world-program i C++ +Comment[tr]=C++'da basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成 C++ 的 Hello world 程序 +Comment[zh_TW]=產生一個簡單的 C++ 的 Hello world 程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=cpphello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/cpp-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/cpp-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=A Simple Hello World program was created in %{dest} +Comment[ca]=Un simple programa de Hello World ha estat creat en %{dest} +Comment[da]=Et simpelt Goddag verden program blev oprettet i %{dest} +Comment[de]=Ein einfaches "Hello World"-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα Γεια σου Κόσμε δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa «Hola mundo» ha sido creado en %{dest} +Comment[et]=Lihtne "Tere, maailm" programm loodi asukohta %{dest} +Comment[eu]="Kaixo mundua" programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ Hello World در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" i %{dest} +Comment[gl]=Creouse un programa sinxelo Ola mundo en %{dest} +Comment[hu]=Létrejött egy egyszerű Hello world program itt: %{dest} +Comment[it]=È stato creato un semplice programma di "Hello World" in %{dest} +Comment[ja]=簡単な Hello World プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm opstellt +Comment[ne]=एउटा साधारण हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig Hello World-programma is aangemaakt in %{dest} +Comment[pl]=Prosty program 'Witaj świecie' został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples Olá Mundo em %{dest} +Comment[pt_BR]=Foi criado um programa simples Olá Mundo em %{dest} +Comment[ru]=Простое приложение Hello world на C++ создано в %{dest} +Comment[sk]=Jednoduchý "Ahoj svet" program bol vytvorený v %{dest} +Comment[sl]=Preprost program Hello World je bil ustvarjen v %{dest} +Comment[sr]=Једноставан „Здраво свете“ програм направљен је у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo svete“ program napravljen je u %{dest} +Comment[sv]=Ett enkelt Hello world-program skapades i %{dest} +Comment[tr]=Basit bir Merhaba Dünya programı %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了 Hello world 程序 +Comment[zh_TW]=一個簡單的 Hello World 程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/cpphello/cpphello.tdevtemplate b/languages/cpp/app_templates/cpphello/cpphello.tdevtemplate deleted file mode 100644 index 1b4fc2fc..00000000 --- a/languages/cpp/app_templates/cpphello/cpphello.tdevtemplate +++ /dev/null @@ -1,145 +0,0 @@ -# TDE Config File -[General] -Name=Simple Hello world program -Name[ca]=Simple programa Hello world -Name[da]=Simpelt Goddag verden program -Name[de]=Ein einfaches "Hello World"-Programm -Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» sencillo -Name[et]=Lihtne "Tere, maailm" programm -Name[eu]="Kaixo mundua" programa sinplea -Name[fa]=برنامۀ سادۀ Hello world -Name[fr]=Programme « Bonjour monde » simple -Name[ga]=Ríomhchlár simplí "Hello World" -Name[gl]=Programa sinxelo Ola mundo -Name[hu]=Egyszerű Hello world program -Name[it]=Semplice programma di "Hello world" -Name[ja]=簡単な Hello world プログラム -Name[ms]=Program Hello World mudah -Name[nds]=En eenfach "Moin Welt"-Programm -Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम -Name[nl]=Eenvoudig 'Hello World' programma -Name[pl]=Prosty program witaj świecie -Name[pt]=Programa simples Olá Mundo -Name[pt_BR]=Programa simples Olá Mundo -Name[ru]=Простая программа Hello world -Name[sk]=Jednoduchý "Ahoj svet" program -Name[sl]=Preprost program Hello world -Name[sr]=Једноставан „Здраво свете“ програм -Name[sr@Latn]=Jednostavan „Zdravo svete“ program -Name[sv]=Enkelt Hello world-program -Name[tr]=Basit Merhaba dünya programı -Name[zh_CN]=简单的 Hello world 程序 -Name[zh_TW]=簡單的 Hello world 程式 -Icon=cpphello.png -Category=C++ -Comment=Generates a simple Hello world program in C++ -Comment[ca]=Genera un simple programa de Hello world en C++ -Comment[da]=Genererer et simpelt Goddag verden program in C++ -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++ -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C++ -Comment[es]=Genera un sencillo programa «Hola mundo» en C++ -Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du C++ lengoaian -Comment[fa]=یک برنامۀ سادۀ Hello world در C++ تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en C++ -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C++ -Comment[gl]=Xera un programa sinxelo Ola mundo en C++ -Comment[hu]=Létrehoz egy egyszerű Hello world programot C++-ban -Comment[it]=Genera un semplice programma di "Hello world" in C++ -Comment[ja]=簡単な Hello World プログラムを C++ で作成します -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C++ op -Comment[ne]=C++ मा एउटा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ -Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C++ -Comment[pt]=Gera um programa simples Olá Mundo em C++ -Comment[pt_BR]=Gera um programa simples Olá Mundo em C++ -Comment[ru]=Создание простого приложения Hello world на C++ -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C++ -Comment[sl]=Ustvari preprost program Hello world v C++ -Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u -Comment[sv]=Skapar ett enkelt Hello world-program i C++ -Comment[tr]=C++'da basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成 C++ 的 Hello world 程序 -Comment[zh_TW]=產生一個簡單的 C++ 的 Hello world 程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=cpphello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/cpp-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/cpp-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=A Simple Hello World program was created in %{dest} -Comment[ca]=Un simple programa de Hello World ha estat creat en %{dest} -Comment[da]=Et simpelt Goddag verden program blev oprettet i %{dest} -Comment[de]=Ein einfaches "Hello World"-Programm wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα Γεια σου Κόσμε δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa «Hola mundo» ha sido creado en %{dest} -Comment[et]=Lihtne "Tere, maailm" programm loodi asukohta %{dest} -Comment[eu]="Kaixo mundua" programa sinple bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ Hello World در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" i %{dest} -Comment[gl]=Creouse un programa sinxelo Ola mundo en %{dest} -Comment[hu]=Létrejött egy egyszerű Hello world program itt: %{dest} -Comment[it]=È stato creato un semplice programma di "Hello World" in %{dest} -Comment[ja]=簡単な Hello World プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm opstellt -Comment[ne]=एउटा साधारण हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig Hello World-programma is aangemaakt in %{dest} -Comment[pl]=Prosty program 'Witaj świecie' został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples Olá Mundo em %{dest} -Comment[pt_BR]=Foi criado um programa simples Olá Mundo em %{dest} -Comment[ru]=Простое приложение Hello world на C++ создано в %{dest} -Comment[sk]=Jednoduchý "Ahoj svet" program bol vytvorený v %{dest} -Comment[sl]=Preprost program Hello World je bil ustvarjen v %{dest} -Comment[sr]=Једноставан „Здраво свете“ програм направљен је у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo svete“ program napravljen je u %{dest} -Comment[sv]=Ett enkelt Hello world-program skapades i %{dest} -Comment[tr]=Basit bir Merhaba Dünya programı %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了 Hello world 程序 -Comment[zh_TW]=一個簡單的 Hello World 程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/cppsdlhello/CMakeLists.txt b/languages/cpp/app_templates/cppsdlhello/CMakeLists.txt index 46e4a57f..b5e16259 100644 --- a/languages/cpp/app_templates/cppsdlhello/CMakeLists.txt +++ b/languages/cpp/app_templates/cppsdlhello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( cppsdlhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cppsdlhello.tar.gz cppsdlhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cppsdlhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cppsdlhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cppsdlhello/Makefile.am b/languages/cpp/app_templates/cppsdlhello/Makefile.am index 3743cf77..c0357370 100644 --- a/languages/cpp/app_templates/cppsdlhello/Makefile.am +++ b/languages/cpp/app_templates/cppsdlhello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.cpp src-Makefile.am cpp-Makefile.am cpp-Makefile.cvs configur templateName = cppsdlhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cppsdlhello/app.tdevelop b/languages/cpp/app_templates/cppsdlhello/app.tdevelop index 39760184..3a60526f 100644 --- a/languages/cpp/app_templates/cppsdlhello/app.tdevelop +++ b/languages/cpp/app_templates/cppsdlhello/app.tdevelop @@ -12,7 +12,7 @@ SDL - + src/%{APPNAMELC} debug @@ -43,8 +43,8 @@ -lSDL - - + + ada ada_bugs_gcc @@ -87,17 +87,17 @@ TDE Libraries (Doxygen) - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/cppsdlhello/cppsdlhello.kdevtemplate b/languages/cpp/app_templates/cppsdlhello/cppsdlhello.kdevtemplate new file mode 100644 index 00000000..5e559acb --- /dev/null +++ b/languages/cpp/app_templates/cppsdlhello/cppsdlhello.kdevtemplate @@ -0,0 +1,150 @@ +# TDE Config File +[General] +Name=Simple SDL program +Name[ca]=Simple programa per a SDL +Name[da]=Simpelt SDL-program +Name[de]=Einfaches SDL-Programm +Name[el]=Απλό πρόγραμμα SDL +Name[es]=Programa SDL sencillo +Name[et]=Lihtne SDL programm +Name[eu]=SDL programa sinplea +Name[fa]=برنامۀ سادۀ SDL +Name[fr]=Programme SDL simple +Name[ga]=Ríomhchlár simplí SDL +Name[gl]=Programa sinxelo SDL +Name[hu]=Egyszerű SDL-alkalmazás +Name[it]=Semplice programma SDL +Name[ja]=簡単な SDL プログラム +Name[nds]=Eenfach SDL-Programm +Name[ne]=साधारण SDL कार्यक्रम +Name[nl]=Eenvoudig SDL-programma +Name[pl]=Prosty program używający SDL +Name[pt]=Programa simples do SDL +Name[pt_BR]=Programa simples do SDL +Name[ru]=Простое приложение SDL +Name[sk]=Jednoduchý SDL program +Name[sl]=Preprost program SDL +Name[sr]=Једноставан SDL програм +Name[sr@Latn]=Jednostavan SDL program +Name[sv]=Enkelt SDL-program +Name[tg]=Барноманависии SDL +Name[tr]=Basit bir SDL Programı +Name[zh_CN]=简单的 SDL 程序 +Name[zh_TW]=簡單的 SDL 程式 +Icon=cppsdl.png +Category=C++ +Comment=Generates a simple SDL program in C++ +Comment[ca]=Genera un simple programa en SDL en C++ +Comment[da]=Genererer et simpelt SDL program i C++ +Comment[de]=Erstellt ein einfaches SDL-Programm in C++ +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα SDL σε C++ +Comment[es]=Genera un sencillo programa SDL en C++ +Comment[et]=Lihtsa SDL programmi loomise C++-s +Comment[eu]=SDL programa sinple bat sortzen du C++ lengoaian +Comment[fa]=یک برنامۀ سادۀ SDL در C++ تولید می‌کند +Comment[fr]=Génère un programme SDL simple en C++ +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí SDL i C++ +Comment[gl]=Xera un programa sinxelo SDL en C++ +Comment[hu]=Létrehoz egy egyszerű SDL-alkalmazást C++-ban +Comment[it]=Genera un semplice programma SDL in C++ +Comment[ja]=簡単な SDL プログラムを C++ で作成します +Comment[nds]=Stellt en eenfach SDL-Programm in C++ op +Comment[ne]= C++ मा साधारण SDL कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig SDL-programma in C++ +Comment[pl]=Generuje prosty program używający SDL w C++ +Comment[pt]=Gera um programa simples de SDL em C++ +Comment[pt_BR]=Gera um programa simples de SDL em C++ +Comment[ru]=Создание простого приложения SDL на C++ +Comment[sk]=Vygeneruje jednoduchý SDL program v C++ +Comment[sl]=Ustvari preprost program SDL v C++ +Comment[sr]=Прави једноставан SDL програм у C++-у +Comment[sr@Latn]=Pravi jednostavan SDL program u C++-u +Comment[sv]=Skapar ett enkelt SDL-program i C++ +Comment[tr]=C++'da basit bir SDL programı yaratır +Comment[zh_CN]=生成 C++ 的简单 SDL 程序 +Comment[zh_TW]=產生一個簡單的 C++ SDL 程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=cppsdlhello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/cpp-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/cpp-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[FILE5] +Type=install +Source=%{src}/acinclude.m4 +Dest=%{dest}/acinclude.m4 + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE6] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE7] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + + +[MSG] +Type=message +Comment=A simple SDL program was created in %{dest} +Comment[ca]=Un simple programa en SDL ha estat creat en %{dest} +Comment[da]=Et simpelt SDL-program blev oprettet i %{dest} +Comment[de]=Ein einfaches SDL-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα SDL δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa SDL ha sido creado en %{dest} +Comment[et]=Lihtne SDL programm loodi asukohta %{dest} +Comment[eu]=SDL programa sinple bat soru da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ SDL در %{dest} ایجاد شد +Comment[fr]=Un programme SDL simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár simplí SDL i %{dest} +Comment[gl]=Creouse un programa sinxelo SDL en %{dest} +Comment[hu]=Létrejött egy egyszerű SDL-alkalmazás itt: %{dest} +Comment[it]=È stato creato un semplice programma SDL in %{dest} +Comment[ja]=簡単な SDL プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach SDL-Programm opstellt +Comment[ne]=एउटा साधारण SDL कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig SDL-programma is aangemaakt in %{dest} +Comment[pl]=Prosty program używający SDL został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação simples em SDL em %{dest} +Comment[pt_BR]=Foi criada uma aplicação simples em SDL em %{dest} +Comment[ru]=Простое приложение SDL создано в %{dest} +Comment[sk]=Jednoduchý SDL program bol vytvorený v %{dest} +Comment[sl]=Preprost program SDL je bil ustvarjen v %{dest} +Comment[sr]=Једноставан SDL програм направљен је у %{dest} +Comment[sr@Latn]=Jednostavan SDL program napravljen je u %{dest} +Comment[sv]=Ett enkelt SDL-program skapades i %{dest} +Comment[tr]=Basit bir SDL programı %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了简单的 SDL 程序 +Comment[zh_TW]=一個簡單的 SDL 程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/cppsdlhello/cppsdlhello.tdevtemplate b/languages/cpp/app_templates/cppsdlhello/cppsdlhello.tdevtemplate deleted file mode 100644 index e99f52ab..00000000 --- a/languages/cpp/app_templates/cppsdlhello/cppsdlhello.tdevtemplate +++ /dev/null @@ -1,150 +0,0 @@ -# TDE Config File -[General] -Name=Simple SDL program -Name[ca]=Simple programa per a SDL -Name[da]=Simpelt SDL-program -Name[de]=Einfaches SDL-Programm -Name[el]=Απλό πρόγραμμα SDL -Name[es]=Programa SDL sencillo -Name[et]=Lihtne SDL programm -Name[eu]=SDL programa sinplea -Name[fa]=برنامۀ سادۀ SDL -Name[fr]=Programme SDL simple -Name[ga]=Ríomhchlár simplí SDL -Name[gl]=Programa sinxelo SDL -Name[hu]=Egyszerű SDL-alkalmazás -Name[it]=Semplice programma SDL -Name[ja]=簡単な SDL プログラム -Name[nds]=Eenfach SDL-Programm -Name[ne]=साधारण SDL कार्यक्रम -Name[nl]=Eenvoudig SDL-programma -Name[pl]=Prosty program używający SDL -Name[pt]=Programa simples do SDL -Name[pt_BR]=Programa simples do SDL -Name[ru]=Простое приложение SDL -Name[sk]=Jednoduchý SDL program -Name[sl]=Preprost program SDL -Name[sr]=Једноставан SDL програм -Name[sr@Latn]=Jednostavan SDL program -Name[sv]=Enkelt SDL-program -Name[tg]=Барноманависии SDL -Name[tr]=Basit bir SDL Programı -Name[zh_CN]=简单的 SDL 程序 -Name[zh_TW]=簡單的 SDL 程式 -Icon=cppsdl.png -Category=C++ -Comment=Generates a simple SDL program in C++ -Comment[ca]=Genera un simple programa en SDL en C++ -Comment[da]=Genererer et simpelt SDL program i C++ -Comment[de]=Erstellt ein einfaches SDL-Programm in C++ -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα SDL σε C++ -Comment[es]=Genera un sencillo programa SDL en C++ -Comment[et]=Lihtsa SDL programmi loomise C++-s -Comment[eu]=SDL programa sinple bat sortzen du C++ lengoaian -Comment[fa]=یک برنامۀ سادۀ SDL در C++ تولید می‌کند -Comment[fr]=Génère un programme SDL simple en C++ -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí SDL i C++ -Comment[gl]=Xera un programa sinxelo SDL en C++ -Comment[hu]=Létrehoz egy egyszerű SDL-alkalmazást C++-ban -Comment[it]=Genera un semplice programma SDL in C++ -Comment[ja]=簡単な SDL プログラムを C++ で作成します -Comment[nds]=Stellt en eenfach SDL-Programm in C++ op -Comment[ne]= C++ मा साधारण SDL कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig SDL-programma in C++ -Comment[pl]=Generuje prosty program używający SDL w C++ -Comment[pt]=Gera um programa simples de SDL em C++ -Comment[pt_BR]=Gera um programa simples de SDL em C++ -Comment[ru]=Создание простого приложения SDL на C++ -Comment[sk]=Vygeneruje jednoduchý SDL program v C++ -Comment[sl]=Ustvari preprost program SDL v C++ -Comment[sr]=Прави једноставан SDL програм у C++-у -Comment[sr@Latn]=Pravi jednostavan SDL program u C++-u -Comment[sv]=Skapar ett enkelt SDL-program i C++ -Comment[tr]=C++'da basit bir SDL programı yaratır -Comment[zh_CN]=生成 C++ 的简单 SDL 程序 -Comment[zh_TW]=產生一個簡單的 C++ SDL 程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=cppsdlhello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/cpp-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/cpp-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[FILE5] -Type=install -Source=%{src}/acinclude.m4 -Dest=%{dest}/acinclude.m4 - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE6] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE7] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - - -[MSG] -Type=message -Comment=A simple SDL program was created in %{dest} -Comment[ca]=Un simple programa en SDL ha estat creat en %{dest} -Comment[da]=Et simpelt SDL-program blev oprettet i %{dest} -Comment[de]=Ein einfaches SDL-Programm wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα SDL δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa SDL ha sido creado en %{dest} -Comment[et]=Lihtne SDL programm loodi asukohta %{dest} -Comment[eu]=SDL programa sinple bat soru da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ SDL در %{dest} ایجاد شد -Comment[fr]=Un programme SDL simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár simplí SDL i %{dest} -Comment[gl]=Creouse un programa sinxelo SDL en %{dest} -Comment[hu]=Létrejött egy egyszerű SDL-alkalmazás itt: %{dest} -Comment[it]=È stato creato un semplice programma SDL in %{dest} -Comment[ja]=簡単な SDL プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach SDL-Programm opstellt -Comment[ne]=एउटा साधारण SDL कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig SDL-programma is aangemaakt in %{dest} -Comment[pl]=Prosty program używający SDL został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação simples em SDL em %{dest} -Comment[pt_BR]=Foi criada uma aplicação simples em SDL em %{dest} -Comment[ru]=Простое приложение SDL создано в %{dest} -Comment[sk]=Jednoduchý SDL program bol vytvorený v %{dest} -Comment[sl]=Preprost program SDL je bil ustvarjen v %{dest} -Comment[sr]=Једноставан SDL програм направљен је у %{dest} -Comment[sr@Latn]=Jednostavan SDL program napravljen je u %{dest} -Comment[sv]=Ett enkelt SDL-program skapades i %{dest} -Comment[tr]=Basit bir SDL programı %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了简单的 SDL 程序 -Comment[zh_TW]=一個簡單的 SDL 程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/dcopservice/CMakeLists.txt b/languages/cpp/app_templates/dcopservice/CMakeLists.txt index d2e5458b..c3a2397b 100644 --- a/languages/cpp/app_templates/dcopservice/CMakeLists.txt +++ b/languages/cpp/app_templates/dcopservice/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( dcopservice.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/dcopservice.tar.gz dcopservice.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - dcopservice.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + dcopservice.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/dcopservice/Makefile.am b/languages/cpp/app_templates/dcopservice/Makefile.am index 35b114d2..dddb4916 100644 --- a/languages/cpp/app_templates/dcopservice/Makefile.am +++ b/languages/cpp/app_templates/dcopservice/Makefile.am @@ -4,10 +4,10 @@ dataFiles = dcopservice.desktop dcopservice.png dcopservice.h \ templateName = dcopservice ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/dcopservice/dcopservice.kdevtemplate b/languages/cpp/app_templates/dcopservice/dcopservice.kdevtemplate new file mode 100644 index 00000000..a4c08a28 --- /dev/null +++ b/languages/cpp/app_templates/dcopservice/dcopservice.kdevtemplate @@ -0,0 +1,202 @@ +# TDE Config File +[General] +Name=TDE DCOP Service +Name[br]=Servij DCOP TDE +Name[ca]=Servei DCOP per al TDE +Name[da]=TDE DCOP-service +Name[de]=TDE-DCOP-Dienst +Name[el]=Υπηρεσία TDE DCOP +Name[es]=Servicio DCOP de TDE +Name[et]=TDE DCOP-teenus +Name[eu]=TDE-ren DCOP zerbitzua +Name[fa]=خدمت TDE DCOP +Name[fr]=Service DCOP TDE +Name[ga]=Seirbhís DCOP TDE +Name[gl]=Servicio DCOP de TDE +Name[hu]=TDE DCOP-szolgáltatás +Name[it]=Servizio DCOP di TDE +Name[ja]=TDE DCOP サービス +Name[nds]=TDE-DCOP-Deenst +Name[ne]=TDE DCOP सेवा +Name[nl]=TDE DCOP-service +Name[pl]=Usługa TDE DCOP +Name[pt]=Serviço de DCOP do TDE +Name[pt_BR]=Serviço de DCOP do TDE +Name[ru]=Сервис DCOP +Name[sk]=TDE DCOP služba +Name[sl]=Storitev DCOP za TDE +Name[sr]=TDE DCOP сервис +Name[sr@Latn]=TDE DCOP servis +Name[sv]=TDE:s DCOP-tjänst +Name[tg]=Хизмати TDE DCOP +Name[tr]=TDE DCOP Hizmeti +Name[zh_CN]=TDE DCOP 服务 +Name[zh_TW]=TDE DCOP 服務 +Icon=kdcop.png +Category=C++/TDE +Comment=Generates a framework for a TDE DCOP service and client access library. +Comment[ca]=Genera una infraestructura per a un servei DCOP de TDE i la biblioteca d'accés del client. +Comment[da]=Genererer et skelet for en TDE dcop-tjeneste og klientadgangsbibliotek. +Comment[de]=Erstellt das Grundgerüst für einen TDE-DCOP-Dienst und eine Bibliothek für den Client-Zugriff. +Comment[el]=Δημιουργεί ένα πλαίσιο για μια υπηρεσία TDE DCOP και μια βιβλιοθήκη πρόσβασης πελάτη. +Comment[es]=Genera una infraestructura para un servicio DCOP de TDE y una biblioteca de acceso cliente. +Comment[et]=TDE DCOP-teenuse raamistiku ja kliendi ligipääsu teegi loomine. +Comment[eu]=TDE-ren DCOP zerbitzu baterako lan-marko bat eta bezero liburutegi bat sortzen ditu. +Comment[fa]=چارچوبی برای خدمت TDE DCOP و کتابخانۀ دستیابی کارخواه تولید می‌کند. +Comment[fr]=Génère une infrastructure pour un service DCOP TDE et une bibliothèque d'accès client. +Comment[ga]=Cruthaigh creatlach do sheirbhís DCOP TDE agus leabharlann rochtana cliaint. +Comment[gl]=Xera un contorno de traballo para un servizo DCOP de TDE e unha biblioteca de acceso para clientes. +Comment[hu]=Létrehoz egy alap TDE DCOP-szolgáltatást és klienselérési programkönyvtárat. +Comment[it]=Genera l'infrastruttura per un servizio DCOP di TDE e una libreria per l'accesso da client. +Comment[ja]=TDE DCOP サービスとクライアントアクセスライブラリのためのフレームワークを作成します +Comment[nds]=Stellt en Rahmenwark för en TDE-DCOP-Deenst un en Clienttogriep-Bibliotheek op. +Comment[ne]=TDE DCOP सेवा र ग्राहक पहुँच लाइब्रेरीका लागि फ्रेमवर्क उत्पन्न गर्दछ । +Comment[nl]=Genereert een framework voor een TDE DCOP-service- en client-bibliotheek. +Comment[pl]=Generuje schemat dla usługi TDE DCOP i biblioteki dostępu użytkownika. +Comment[pt]=Gera a plataforma para um serviço de DCOP do TDE e a biblioteca de acesso dos clientes. +Comment[pt_BR]=Gera a plataforma para um serviço de DCOP do TDE e a biblioteca de acesso dos clientes. +Comment[ru]=Создание сервиса DCOP и библиотеки клиента. +Comment[sk]=Vygeneruje framework pre TDE DCOP službu a klientskú prístupovú knižnicu. +Comment[sr]=Прави једноставан радни оквир за TDE DCOP сервис и приступну библиотеку клијента. +Comment[sr@Latn]=Pravi jednostavan radni okvir za TDE DCOP servis i pristupnu biblioteku klijenta. +Comment[sv]=Skapar ett ramverk för en TDE DCOP-tjänst och klientåtkomstbibliotek. +Comment[tr]=Bir TDE DCOP hizmeti ve istemci erişim kütüphanesi için bir çatı yaratır. +Comment[zh_CN]=生成一个 TDE DCOP 服务和客户访问库的框架。 +Comment[zh_TW]=產生一個 TDE DCOP 服務的架構,以及客戶端存取的函式庫。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=dcopservice.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/dcopservice.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/dcopservice.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/dcopservice.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/dcopservice.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE15] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[MSG] +Type=message +Comment=A TDE DCOP Service was created in %{dest} +Comment[ca]=Un servei DCOP de TDE ha estat creada en %{dest} +Comment[da]=En TDE DCOP tjeneste blev oprettet i %{dest} +Comment[de]=Ein TDE-DCOP-Dienst wurde in %{dest} erstellt. +Comment[el]=Μια υπηρεσία TDE DCOP δημιουργήθηκε στο %{dest} +Comment[es]=Un servicio DCOP de TDE ha sido creado en %{dest} +Comment[et]=TDE DCOP-teenus loodi asukohta %{dest} +Comment[eu]=TDE-ren DCOP zerbitzu bat sortu da hemen: %{dest} +Comment[fa]=یک خدمت TDE DCOP در %{dest} ایجاد شد +Comment[fr]=Un service DCOP TDE a été créé dans %{dest} +Comment[ga]=Cruthaíodh Seirbhís DCOP TDE i %{dest} +Comment[gl]=Creouse un servizo DCOP de TDE en %{dest} +Comment[hu]=Létrejött egy TDE DCOP-szolgáltatás itt: %{dest} +Comment[it]=È stato creato un servizio DCOP di TDE in %{dest} +Comment[ja]=TDE DCOP サービスを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDE-DCOP-Deenst opstellt +Comment[ne]=TDE DCOP सेवा %{dest} मा सिर्जना गरियो +Comment[nl]=Een DCOP-service is aangemaakt in %{dest} +Comment[pl]=Usługa TDE DCOP została utworzona w %{dest} +Comment[pt]=Foi criado um serviço de DCOP do TDE em %{dest} +Comment[pt_BR]=Foi criado um serviço de DCOP do TDE em %{dest} +Comment[ru]=Сервис DCOP создан в %{dest} +Comment[sk]=TDE DCOP služba bola vytvorená v %{dest} +Comment[sl]=Storitev DCOP za TDE je bila ustvarjena v %{dest} +Comment[sr]=TDE DCOP сервис направљен је у %{dest} +Comment[sr@Latn]=TDE DCOP servis napravljen je u %{dest} +Comment[sv]=En TDE DCOP-tjänst skapades i %{dest} +Comment[tr]=Bir TDE DCOP Hizmeti %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了一个 TDE DCOP 服务 +Comment[zh_TW]=TDE DCOP 服務已建立於 %{dest} diff --git a/languages/cpp/app_templates/dcopservice/dcopservice.tdevelop b/languages/cpp/app_templates/dcopservice/dcopservice.tdevelop index dfdea3b8..59569583 100644 --- a/languages/cpp/app_templates/dcopservice/dcopservice.tdevelop +++ b/languages/cpp/app_templates/dcopservice/dcopservice.tdevelop @@ -14,15 +14,15 @@ tdeioslave - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - - + + debug @@ -43,15 +43,15 @@ -O0 -g3 - - + + - - + + ada ada_bugs_gcc @@ -88,22 +88,22 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/dcopservice/dcopservice.tdevtemplate b/languages/cpp/app_templates/dcopservice/dcopservice.tdevtemplate deleted file mode 100644 index 0174747d..00000000 --- a/languages/cpp/app_templates/dcopservice/dcopservice.tdevtemplate +++ /dev/null @@ -1,202 +0,0 @@ -# TDE Config File -[General] -Name=TDE DCOP Service -Name[br]=Servij DCOP TDE -Name[ca]=Servei DCOP per al TDE -Name[da]=TDE DCOP-service -Name[de]=TDE-DCOP-Dienst -Name[el]=Υπηρεσία TDE DCOP -Name[es]=Servicio DCOP de TDE -Name[et]=TDE DCOP-teenus -Name[eu]=TDE-ren DCOP zerbitzua -Name[fa]=خدمت TDE DCOP -Name[fr]=Service DCOP TDE -Name[ga]=Seirbhís DCOP TDE -Name[gl]=Servicio DCOP de TDE -Name[hu]=TDE DCOP-szolgáltatás -Name[it]=Servizio DCOP di TDE -Name[ja]=TDE DCOP サービス -Name[nds]=TDE-DCOP-Deenst -Name[ne]=TDE DCOP सेवा -Name[nl]=TDE DCOP-service -Name[pl]=Usługa TDE DCOP -Name[pt]=Serviço de DCOP do TDE -Name[pt_BR]=Serviço de DCOP do TDE -Name[ru]=Сервис DCOP -Name[sk]=TDE DCOP služba -Name[sl]=Storitev DCOP za TDE -Name[sr]=TDE DCOP сервис -Name[sr@Latn]=TDE DCOP servis -Name[sv]=TDE:s DCOP-tjänst -Name[tg]=Хизмати TDE DCOP -Name[tr]=TDE DCOP Hizmeti -Name[zh_CN]=TDE DCOP 服务 -Name[zh_TW]=TDE DCOP 服務 -Icon=kdcop.png -Category=C++/TDE -Comment=Generates a framework for a TDE DCOP service and client access library. -Comment[ca]=Genera una infraestructura per a un servei DCOP de TDE i la biblioteca d'accés del client. -Comment[da]=Genererer et skelet for en TDE dcop-tjeneste og klientadgangsbibliotek. -Comment[de]=Erstellt das Grundgerüst für einen TDE-DCOP-Dienst und eine Bibliothek für den Client-Zugriff. -Comment[el]=Δημιουργεί ένα πλαίσιο για μια υπηρεσία TDE DCOP και μια βιβλιοθήκη πρόσβασης πελάτη. -Comment[es]=Genera una infraestructura para un servicio DCOP de TDE y una biblioteca de acceso cliente. -Comment[et]=TDE DCOP-teenuse raamistiku ja kliendi ligipääsu teegi loomine. -Comment[eu]=TDE-ren DCOP zerbitzu baterako lan-marko bat eta bezero liburutegi bat sortzen ditu. -Comment[fa]=چارچوبی برای خدمت TDE DCOP و کتابخانۀ دستیابی کارخواه تولید می‌کند. -Comment[fr]=Génère une infrastructure pour un service DCOP TDE et une bibliothèque d'accès client. -Comment[ga]=Cruthaigh creatlach do sheirbhís DCOP TDE agus leabharlann rochtana cliaint. -Comment[gl]=Xera un contorno de traballo para un servizo DCOP de TDE e unha biblioteca de acceso para clientes. -Comment[hu]=Létrehoz egy alap TDE DCOP-szolgáltatást és klienselérési programkönyvtárat. -Comment[it]=Genera l'infrastruttura per un servizio DCOP di TDE e una libreria per l'accesso da client. -Comment[ja]=TDE DCOP サービスとクライアントアクセスライブラリのためのフレームワークを作成します -Comment[nds]=Stellt en Rahmenwark för en TDE-DCOP-Deenst un en Clienttogriep-Bibliotheek op. -Comment[ne]=TDE DCOP सेवा र ग्राहक पहुँच लाइब्रेरीका लागि फ्रेमवर्क उत्पन्न गर्दछ । -Comment[nl]=Genereert een framework voor een TDE DCOP-service- en client-bibliotheek. -Comment[pl]=Generuje schemat dla usługi TDE DCOP i biblioteki dostępu użytkownika. -Comment[pt]=Gera a plataforma para um serviço de DCOP do TDE e a biblioteca de acesso dos clientes. -Comment[pt_BR]=Gera a plataforma para um serviço de DCOP do TDE e a biblioteca de acesso dos clientes. -Comment[ru]=Создание сервиса DCOP и библиотеки клиента. -Comment[sk]=Vygeneruje framework pre TDE DCOP službu a klientskú prístupovú knižnicu. -Comment[sr]=Прави једноставан радни оквир за TDE DCOP сервис и приступну библиотеку клијента. -Comment[sr@Latn]=Pravi jednostavan radni okvir za TDE DCOP servis i pristupnu biblioteku klijenta. -Comment[sv]=Skapar ett ramverk för en TDE DCOP-tjänst och klientåtkomstbibliotek. -Comment[tr]=Bir TDE DCOP hizmeti ve istemci erişim kütüphanesi için bir çatı yaratır. -Comment[zh_CN]=生成一个 TDE DCOP 服务和客户访问库的框架。 -Comment[zh_TW]=產生一個 TDE DCOP 服務的架構,以及客戶端存取的函式庫。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=dcopservice.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/dcopservice.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/dcopservice.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/dcopservice.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/dcopservice.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE15] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[MSG] -Type=message -Comment=A TDE DCOP Service was created in %{dest} -Comment[ca]=Un servei DCOP de TDE ha estat creada en %{dest} -Comment[da]=En TDE DCOP tjeneste blev oprettet i %{dest} -Comment[de]=Ein TDE-DCOP-Dienst wurde in %{dest} erstellt. -Comment[el]=Μια υπηρεσία TDE DCOP δημιουργήθηκε στο %{dest} -Comment[es]=Un servicio DCOP de TDE ha sido creado en %{dest} -Comment[et]=TDE DCOP-teenus loodi asukohta %{dest} -Comment[eu]=TDE-ren DCOP zerbitzu bat sortu da hemen: %{dest} -Comment[fa]=یک خدمت TDE DCOP در %{dest} ایجاد شد -Comment[fr]=Un service DCOP TDE a été créé dans %{dest} -Comment[ga]=Cruthaíodh Seirbhís DCOP TDE i %{dest} -Comment[gl]=Creouse un servizo DCOP de TDE en %{dest} -Comment[hu]=Létrejött egy TDE DCOP-szolgáltatás itt: %{dest} -Comment[it]=È stato creato un servizio DCOP di TDE in %{dest} -Comment[ja]=TDE DCOP サービスを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDE-DCOP-Deenst opstellt -Comment[ne]=TDE DCOP सेवा %{dest} मा सिर्जना गरियो -Comment[nl]=Een DCOP-service is aangemaakt in %{dest} -Comment[pl]=Usługa TDE DCOP została utworzona w %{dest} -Comment[pt]=Foi criado um serviço de DCOP do TDE em %{dest} -Comment[pt_BR]=Foi criado um serviço de DCOP do TDE em %{dest} -Comment[ru]=Сервис DCOP создан в %{dest} -Comment[sk]=TDE DCOP služba bola vytvorená v %{dest} -Comment[sl]=Storitev DCOP za TDE je bila ustvarjena v %{dest} -Comment[sr]=TDE DCOP сервис направљен је у %{dest} -Comment[sr@Latn]=TDE DCOP servis napravljen je u %{dest} -Comment[sv]=En TDE DCOP-tjänst skapades i %{dest} -Comment[tr]=Bir TDE DCOP Hizmeti %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了一个 TDE DCOP 服务 -Comment[zh_TW]=TDE DCOP 服務已建立於 %{dest} diff --git a/languages/cpp/app_templates/generichello/Makefile.am b/languages/cpp/app_templates/generichello/Makefile.am index 5f5bf6ed..75bad862 100644 --- a/languages/cpp/app_templates/generichello/Makefile.am +++ b/languages/cpp/app_templates/generichello/Makefile.am @@ -5,10 +5,10 @@ templateName = cppgenerichello # png-filename differs from archive file name ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/generichello/app.prj b/languages/cpp/app_templates/generichello/app.prj index c6466824..a1eeca82 100644 --- a/languages/cpp/app_templates/generichello/app.prj +++ b/languages/cpp/app_templates/generichello/app.prj @@ -1,8 +1,8 @@ - + gcc -o %{APPNAMELC} %{APPNAMELC}.cpp - + diff --git a/languages/cpp/app_templates/generichello/app.tdevelop b/languages/cpp/app_templates/generichello/app.tdevelop index a719a726..63f5ce16 100644 --- a/languages/cpp/app_templates/generichello/app.tdevelop +++ b/languages/cpp/app_templates/generichello/app.tdevelop @@ -4,14 +4,14 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevGenericProject + KDevGenericProject C++ C++ Code - + ShellScript %{APPNAMELC}.prj @@ -39,23 +39,23 @@ -O0 -g3 - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/generichello/generichello.kdevtemplate b/languages/cpp/app_templates/generichello/generichello.kdevtemplate new file mode 100644 index 00000000..f30eea5b --- /dev/null +++ b/languages/cpp/app_templates/generichello/generichello.kdevtemplate @@ -0,0 +1,92 @@ +# TDE Config File +[General] +Name=C++ program (shell script build system) +Name[ca]=Programa C++ (sistema de construcció basat en scripts de shell) +Name[da]=C++ program (skalscript byggesystem) +Name[de]=C++-Programm (Shell-Skript basiertes Erstellungssystem) +Name[el]=Πρόγραμμα C++ (σύστημα κατασκευής σενάριο κελύφους) +Name[es]=Programa en C++ (con sistema de construcción basado en guión de órdenes) +Name[et]=C++ programm (shelliskripti ehitussüsteem) +Name[eu]=C++ programa (shell script-en bidez eraikia) +Name[fa]=برنامۀ ++C )سیستم ساخت دست‌نوشتۀ پوسته( +Name[fr]=Programme C++ (système de construction en script shell) +Name[ga]=Ríomhchlár C++ (córas tógála bunaithe ar scripteanna blaoisce +Name[gl]=Programa C++ (sistema de compilación shell script) +Name[hu]=C++-program (parancssoros fordítási szkripttel) +Name[it]=Programma C++ (sistema di compilazione con script di shell) +Name[ja]=C++ プログラム (シェルスクリプトベースのビルドシステム) +Name[nds]=C++-Programm (Konsoolskript-Opstellsystem) +Name[ne]=C++ कार्यक्रम (शेल स्क्रिप्ट निर्माण प्रणाली) +Name[nl]=C++-programma (shellscript build system) +Name[pl]=Program w C++ (system budowania za pomocą skryptów powłoki) +Name[pt]=Programa em C++ (sistema de compilação em 'shell script') +Name[pt_BR]=Programa em C++ (sistema de compilação em 'shell script') +Name[ru]=Приложение C++ (сборка на скриптах командной оболочки) +Name[sk]=C++ program (shell skript build system) +Name[sl]=Program v C++ (sistem grajenja lupinskega skripta) +Name[sr]=C++ програм (скрипта шкољке као систем за градњу) +Name[sr@Latn]=C++ program (skripta školjke kao sistem za gradnju) +Name[sv]=C++ program (skalskript byggsystem) +Name[tr]=C++ programı (kabuk betiği kurulum sistemi) +Name[zh_CN]=C++ 程序(Shell 脚本创建系统) +Name[zh_TW]=C++ 程式(shell 文稿建立系統) +Icon=cpphello.png +Category=C++/Generic +Comment=Generates a simple Hello world program in C++ +Comment[ca]=Genera un simple programa de Hello world en C++ +Comment[da]=Genererer et simpelt Goddag verden program in C++ +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++ +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C++ +Comment[es]=Genera un sencillo programa «Hola mundo» en C++ +Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du C++ lengoaian +Comment[fa]=یک برنامۀ سادۀ Hello world در C++ تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en C++ +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C++ +Comment[gl]=Xera un programa sinxelo Ola mundo en C++ +Comment[hu]=Létrehoz egy egyszerű Hello world programot C++-ban +Comment[it]=Genera un semplice programma di "Hello world" in C++ +Comment[ja]=簡単な Hello World プログラムを C++ で作成します +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C++ op +Comment[ne]=C++ मा एउटा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ +Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C++ +Comment[pt]=Gera um programa simples Olá Mundo em C++ +Comment[pt_BR]=Gera um programa simples Olá Mundo em C++ +Comment[ru]=Создание простого приложения Hello world на C++ +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C++ +Comment[sl]=Ustvari preprost program Hello world v C++ +Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u +Comment[sv]=Skapar ett enkelt Hello world-program i C++ +Comment[tr]=C++'da basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成 C++ 的 Hello world 程序 +Comment[zh_TW]=產生一個簡單的 C++ 的 Hello world 程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=generichello.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app.prj +Dest=%{dest}/%{APPNAMELC}.prj + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE3] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + diff --git a/languages/cpp/app_templates/generichello/generichello.tdevtemplate b/languages/cpp/app_templates/generichello/generichello.tdevtemplate deleted file mode 100644 index 27f78afe..00000000 --- a/languages/cpp/app_templates/generichello/generichello.tdevtemplate +++ /dev/null @@ -1,92 +0,0 @@ -# TDE Config File -[General] -Name=C++ program (shell script build system) -Name[ca]=Programa C++ (sistema de construcció basat en scripts de shell) -Name[da]=C++ program (skalscript byggesystem) -Name[de]=C++-Programm (Shell-Skript basiertes Erstellungssystem) -Name[el]=Πρόγραμμα C++ (σύστημα κατασκευής σενάριο κελύφους) -Name[es]=Programa en C++ (con sistema de construcción basado en guión de órdenes) -Name[et]=C++ programm (shelliskripti ehitussüsteem) -Name[eu]=C++ programa (shell script-en bidez eraikia) -Name[fa]=برنامۀ ++C )سیستم ساخت دست‌نوشتۀ پوسته( -Name[fr]=Programme C++ (système de construction en script shell) -Name[ga]=Ríomhchlár C++ (córas tógála bunaithe ar scripteanna blaoisce -Name[gl]=Programa C++ (sistema de compilación shell script) -Name[hu]=C++-program (parancssoros fordítási szkripttel) -Name[it]=Programma C++ (sistema di compilazione con script di shell) -Name[ja]=C++ プログラム (シェルスクリプトベースのビルドシステム) -Name[nds]=C++-Programm (Konsoolskript-Opstellsystem) -Name[ne]=C++ कार्यक्रम (शेल स्क्रिप्ट निर्माण प्रणाली) -Name[nl]=C++-programma (shellscript build system) -Name[pl]=Program w C++ (system budowania za pomocą skryptów powłoki) -Name[pt]=Programa em C++ (sistema de compilação em 'shell script') -Name[pt_BR]=Programa em C++ (sistema de compilação em 'shell script') -Name[ru]=Приложение C++ (сборка на скриптах командной оболочки) -Name[sk]=C++ program (shell skript build system) -Name[sl]=Program v C++ (sistem grajenja lupinskega skripta) -Name[sr]=C++ програм (скрипта шкољке као систем за градњу) -Name[sr@Latn]=C++ program (skripta školjke kao sistem za gradnju) -Name[sv]=C++ program (skalskript byggsystem) -Name[tr]=C++ programı (kabuk betiği kurulum sistemi) -Name[zh_CN]=C++ 程序(Shell 脚本创建系统) -Name[zh_TW]=C++ 程式(shell 文稿建立系統) -Icon=cpphello.png -Category=C++/Generic -Comment=Generates a simple Hello world program in C++ -Comment[ca]=Genera un simple programa de Hello world en C++ -Comment[da]=Genererer et simpelt Goddag verden program in C++ -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++ -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C++ -Comment[es]=Genera un sencillo programa «Hola mundo» en C++ -Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du C++ lengoaian -Comment[fa]=یک برنامۀ سادۀ Hello world در C++ تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en C++ -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C++ -Comment[gl]=Xera un programa sinxelo Ola mundo en C++ -Comment[hu]=Létrehoz egy egyszerű Hello world programot C++-ban -Comment[it]=Genera un semplice programma di "Hello world" in C++ -Comment[ja]=簡単な Hello World プログラムを C++ で作成します -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C++ op -Comment[ne]=C++ मा एउटा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ -Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C++ -Comment[pt]=Gera um programa simples Olá Mundo em C++ -Comment[pt_BR]=Gera um programa simples Olá Mundo em C++ -Comment[ru]=Создание простого приложения Hello world на C++ -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C++ -Comment[sl]=Ustvari preprost program Hello world v C++ -Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u -Comment[sv]=Skapar ett enkelt Hello world-program i C++ -Comment[tr]=C++'da basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成 C++ 的 Hello world 程序 -Comment[zh_TW]=產生一個簡單的 C++ 的 Hello world 程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=generichello.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.prj -Dest=%{dest}/%{APPNAMELC}.prj - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE3] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - diff --git a/languages/cpp/app_templates/gnome2mmapp/Makefile.am b/languages/cpp/app_templates/gnome2mmapp/Makefile.am index a0d9505e..9d73ddd6 100644 --- a/languages/cpp/app_templates/gnome2mmapp/Makefile.am +++ b/languages/cpp/app_templates/gnome2mmapp/Makefile.am @@ -7,10 +7,10 @@ dataFiles = acconfig.h autogen.sh gnome2mm.glade main_window.cc \ templateName = gnome2mmapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/gnome2mmapp/app.tdevelop b/languages/cpp/app_templates/gnome2mmapp/app.tdevelop index 177611f0..19fbacb7 100644 --- a/languages/cpp/app_templates/gnome2mmapp/app.tdevelop +++ b/languages/cpp/app_templates/gnome2mmapp/app.tdevelop @@ -12,7 +12,7 @@ GNOME - + src/%{APPNAMELC} debug @@ -39,8 +39,8 @@ -O0 -g3 - - + + @@ -48,22 +48,22 @@ - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.kdevtemplate b/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.kdevtemplate new file mode 100644 index 00000000..f692d342 --- /dev/null +++ b/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.kdevtemplate @@ -0,0 +1,186 @@ +# TDE Config File +[General] +Name=GNOME-- Application framework +Name[ca]=Infraestructura d'aplicació per a GNOME +Name[da]=GNOME-- Programskelet +Name[de]="GNOME--"-Anwendungsgrundgerüst +Name[el]=GNOME-- Πλαίσιο εφαρμογής +Name[es]=Infraestructura para aplicación GNOME-- +Name[et]=GNOME-- rakenduse raamistik +Name[eu]=GNOME-- Aplikazioen lan-markoa +Name[fa]=چارچوب کاربرد GNOME-- +Name[fr]=Infrastructure d'application GNOME-- +Name[ga]=Creatlach feidhmchláir GNOME-- +Name[gl]=Entorno de traballo para aplicación GNOME +Name[hu]=GNOME - Alkalmazás-keretrendszer +Name[it]=Infrastruttura per applicazioni GNOME-- +Name[ja]=GNOME-- アプリケーションフレームワーク +Name[nds]=Programmrahmenwark för "GNOME--" +Name[ne]=GNOME-- अनुप्रयोग फ्रेमवर्क +Name[nl]=GNOME-- Applicationframework +Name[pl]=GNOME-- Szablon programu +Name[pt]=Plataforma de aplicações GNOME-- +Name[pt_BR]=Plataforma de aplicações GNOME-- +Name[ru]=Приложение GNOME-- +Name[sk]=GNOME-- aplikačný framework +Name[sl]=Ogrodje programa za GNOME-- +Name[sr]=Радни оквир GNOME-- програма +Name[sr@Latn]=Radni okvir GNOME-- programa +Name[sv]=GNOME-- programramverk +Name[tr]=GNOME-- Uygulama Çatısı +Name[zh_CN]=GNOME-- 应用程序框架 +Name[zh_TW]=GNOME-- 應用程式框架 +Category=C++/GTK+ +Icon=gnome2mmapp.png +Comment=Generates a simple GNOME-- application. Gnomemm, Gtkmm >= 1.2.8 and < 1.3.0 should be installed. To edit glade file glade-- (http://home.wtal.de/petig/Gtk/) is required. +Comment[ca]=Genera una simple aplicació GNOME. Gnomemm, Gtkmm >= 1.2.8 i < 1.3.0 haurien d'estar instal·lats. Per editar el fitxer glade es requereix (http://home.wtal.de/petig/Gtk/). +Comment[da]=Genererer et simpelt GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 og < 1.3.0 skal være installeret. For at redigere glade file glade-- kræves (http://home.wtal.de/petig/Gtk/). +Comment[de]=Erstellt eine einfache GNOME-Anwendung. Gnomemm, Gtkmm >= 1.2.8 und < 1.3.0 sollten installiert sein. Zum Bearbeiten der glade-Datei ist glade-- (http://home.wtal.de/petig/Gtk/) erforderlich. +Comment[el]=Δημιουργεί μια απλή εφαρμογή GNOME. Τα Gnomemm, Gtkmm >= 1.2.8 και < 1.3.0 πρέπει να είναι εγκατεστημένα. Για την επεξεργασία του αρχείου glade απαιτείται το glade (http://home.wtal.de/petig/Gtk/). +Comment[es]=Genera una sencilla aplicación GNOME--. Debe tener instalados Gnomemm, Gtkmm >= 1.2.8 y < 1.3.0. Para editar archivos glade se necesita glade-- (http://home.wtal.de/petig/Gtk/). +Comment[et]=Lihtsa GNOME-- rakenduse loomine. Paigaldatud peavad olema Gnomemm, Gtkmm >= 1.2.8 ja < 1.3.0. Glade-faili redigeerimiseks on vajalik glade-- (http://home.wtal.de/petig/Gtk/). +Comment[eu]=GNOME-- applicazio sinple bat sortzen du. Gnomemm, Gtkmm >= 1.2.8 and < 1.3.0 instalatu behar dira. Glade fitxategia editatzeko glade-- (http://home.wtal.de/petig/Gtk/) behar da. +Comment[fa]=یک کاربرد سادۀ GNOME-- تولید می‌کند. Gnomemm، Gtkmm >= ۱.۲.۸ و < ۱.۳.۰ باید نصب شده باشد. برای ویرایش پروندۀ glade، glade-- (http://home.wtal.de/petig/Gtk/) نیاز است. +Comment[fr]=Génère une application GNOME-- simple. Gnomemm et Gtkmm >= 1.2.8 et < 1.3.0 devront être installés. Pour modifier le fichier glade, glade-- (http://home.wtal.de/petig/Gtk/) est requis. +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí GNOME--. Ba chóir Gnomemm, Gtkmm >= 1.2.8 agus < 1.3.0 a bheith suiteáilte. Chun comhad glade a chur in eagar, tá glade-- (http://home.wtal.de/petig/Gtk/) de dhíth ort. +Comment[gl]=Xera una aplicación sinxela GNOME. Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0 deben estar instalados. Para editar un arquivo glade é necesario glade-- (http://home.wtal.de/petig/Gtk/). +Comment[hu]=Létrehoz egy egyszerű GNOME--os -alkalmazást. A Gnomemm, a Gtkmm (>= 1.2.8 és < 1.3.0) szükséges hozzá. Glade-fájl szerkesztéséhez a glade-- (http://home.wtal.de/petig/Gtk/) is szükséges. +Comment[it]=Genera una semplice applicazione GNOME--. Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0 dovrebbero essere installati. Si richiede glade per modificare i file di glade -- (http://home.wtal.de/petig/Gtk/). +Comment[ja]=簡単な GNOME-- アプリケーションを作成します。Gnomemm, Gtkmm >= 1.2.8 かつ < 1.3.0 が必要です。glade ファイルを編集するには glade-- (http://home.wtal.de/petig/Gtk/) が必要です。 +Comment[nds]=Stellt en eenfach "GNOME--"-Programm op. "Gnomemm", "Gtkmm" >= 1.2.8 un < 1.3.0 schöölt installeert wesen. För't Bewerken vun de glade-Datei deit "glade--" (http://home.wtal.de/petig/Gtk/) noot. +Comment[ne]=साधारण जिनोम-- अनुप्रयोग उत्पन्न गर्दछ । Gnomemm, Gtkmm >= 1.2.8 र < 1.3.0 स्थापना गर्नु पर्दछ । ग्लेड फाइल सम्पादन गर्नका लागि ग्लेड-- (http://home.wtal.de/petig/Gtk/) आवश्यक पर्दछ । +Comment[nl]=Genereert een eenvoudige GNOME-- toepassing. Gnomemm, Gtkmm >= 1.2.8 en < 1.3.0 dienen te zijn geïnstalleerd. Voor het bewerken van glade file is glade-- (http://home.wtal.de/petig/Gtk/) nodig. +Comment[pl]=Generuje prosty program dla środowiska GNOME--. Gnomemm i Gtkmm w wersji >= 1.2.8 i < 1.3.0 powinny być zainstalowane. Do edycji pliku glade konieczny jest program glade-- (http://home.wtal.de/petig/Gtk/). +Comment[pt]=Gera uma aplicação simples em GNOME--. Deverão estar instalados o Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). +Comment[pt_BR]=Gera uma aplicação simples em GNOME--. Deverão estar instalados o Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). +Comment[ru]=Создание простого приложения GNOME--. Требуются Gnomemm, Gtkmm >= 1.2.8 и < 1.3.0. Для редактирования файла glade нужна соответствующая программа (http://home.wtal.de/petig/Gtk/). +Comment[sk]=Vygeneruje jednoduchú GNOME-- aplikáciu. Vyžaduje nainštalovanéGnomemm, Gtkmm >= 1.2.8 a < 1.3.0. Na editovanie glade súboru he potrebnýglade-- (http://home.wtal.de/petig/Gtk/). +Comment[sr]=Прави једноставан GNOME-- програм. Gnomemm, Gtkmm >= 1.2.8 и < 1.3.0 требало би да су инсталирани. Да бисте уређивали glade фајл, неопходан је glade-- (http://home.wtal.de/petig/Gtk/). +Comment[sr@Latn]=Pravi jednostavan GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 i < 1.3.0 trebalo bi da su instalirani. Da biste uređivali glade fajl, neophodan je glade-- (http://home.wtal.de/petig/Gtk/). +Comment[sv]=Skapar ett enkelt GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 och < 1.3.0 måste vara installerat. För att redigera glade-filer krävs glade-- (http://home.wtal.de/petig/Gtk/). +Comment[tr]=Basit bir GNOME-- uygulaması yaratır. Gnomemm, Gtkmm>=1.28 ve <1.3.0 yüklü olmalıdır. Glade dosyasını düzenlemek için glade-- (http://home.wtal.de/petig/Gtk/) gereklidir. +Comment[zh_CN]=生成简单的 GNOME-- 应用程序。必须安装 Gnomemm、1.2.8 到 1.3.0 之间的 Gtkmm。要编辑 glade 文件,需要使用 glade-- (http://home.wtal.de/petig/Gtk/)。 +Comment[zh_TW]=產生一個簡單的 GNOME-- 應用程式。要先安裝 Gnomemm,Gtkmm 版本 >= 1.2.8 且 < 1.3.0。要編輯 glade 檔則要先安裝 glade-- (http://home.wtal.de/petig/Gtk/)。 +FileTemplates=hh,CStyle,cc,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=gnome2mmapp.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNOME2] +Type=include +File=%{tdevelop}/template-common/gnome2.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[FILE4] +Type=install +Source=%{src}/acconfig.h +Dest=%{dest}/acconfig.h + +[FILE5] +Type=install +Source=%{src}/config.h +Dest=%{dest}/config.h + +[FILE6] +Type=install +Source=%{src}/autogen.sh +Dest=%{dest}/autogen.sh + +[FILE7] +Type=install +Source=%{src}/gnome2mm.glade +Dest=%{dest}/%{APPNAMELC}.glade + +[FILE8] +Type=install +Source=%{src}/gnome2mm.gladep +Dest=%{dest}/%{APPNAMELC}.gladep + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE9] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE10] +Type=install +Source=%{src}/gnome2mm.cc +Dest=%{dest}/src/%{APPNAMELC}.cc + +[FILE11] +Type=install +Source=%{src}/main_window.hh +Dest=%{dest}/src/main_window.hh + +[FILE12] +Type=install +Source=%{src}/main_window.cc +Dest=%{dest}/src/main_window.cc + +[FILE13] +Type=install +Source=%{src}/main_window_glade.hh +Dest=%{dest}/src/main_window_glade.hh + +[FILE14] +Type=install +Source=%{src}/main_window_glade.cc +Dest=%{dest}/src/main_window_glade.cc + +[MSG] +Type=message +Comment=A GNOME-- application framework was created in %{dest} +Comment[ca]=Una infraestructura d'aplicació per a GNOME ha estat creada en %{dest} +Comment[da]=Et GNOME-- programskelet blev oprettet i %{dest} +Comment[de]=Ein GNOME-Anwendungsgerüst wurde in %{dest} erstellt. +Comment[el]=Ένα πλαίσιο εφαρμογής GNOME δημιουργήθηκε στο %{dest} +Comment[es]=Una infraestructura de aplicación GNOME-- ha sido creada en %{dest} +Comment[et]=GNOME-- rakenduse raamistik loodi asukohta %{dest} +Comment[eu]=GNOME-- applicazioen lan-marko bat sortu da hemen: %{dest} +Comment[fa]=یک چارچوب کاربرد GNOME-- در %{dest} ایجاد شد +Comment[fr]=Une infrastructure d'application GNOME-- a été créée dans %{dest} +Comment[ga]=Cruthaíodh creatlach feidhmchláir GNOME-- i %{dest} +Comment[gl]=Creouse un contorno de traballo para aplicación GNOME en %{dest} +Comment[hu]=Létrejött egy GNOME-s alkalmazás-keretrendszer itt: %{dest} +Comment[it]=È stato creata l'infrastruttura per un'applicazione GNOME in %{dest} +Comment[ja]=GNOME-- アプリケーションフレームワークを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Programmrahmenwark för "GNOME--" opstellt +Comment[ne]= जिनोम-- अनुप्रयोग फ्रेमवर्क %{dest} मा सिर्जना गरियो +Comment[nl]=Een GNOME-- applicationframework is aangemaakt in %{dest} +Comment[pl]=Szablon programu dla GNOME-- został utworzony w %{dest} +Comment[pt]=Foi criada a plataforma de uma aplicação GNOME-- em %{dest} +Comment[pt_BR]=Foi criada a plataforma de uma aplicação GNOME-- em %{dest} +Comment[ru]=Простое приложение GNOME-- создано в %{dest} +Comment[sk]=GNOME-- aplikačný framework bol vytvorený v %{dest} +Comment[sl]=Ogrodje programa za GNOME-- je bilo ustvarjeno v %{dest} +Comment[sr]=Радни оквир GNOME-- програма направљен је у %{dest} +Comment[sr@Latn]=Radni okvir GNOME-- programa napravljen je u %{dest} +Comment[sv]=Ett GNOME-- programramverk skapades i %{dest} +Comment[tr]=Bir GNOME-- uygulama çatısı %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了 GNOME-- 应用程序框架 +Comment[zh_TW]=GNOME-- 應用程式框架已建立於 %{dest} diff --git a/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.tdevtemplate b/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.tdevtemplate deleted file mode 100644 index 363ffd5a..00000000 --- a/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.tdevtemplate +++ /dev/null @@ -1,186 +0,0 @@ -# TDE Config File -[General] -Name=GNOME-- Application framework -Name[ca]=Infraestructura d'aplicació per a GNOME -Name[da]=GNOME-- Programskelet -Name[de]="GNOME--"-Anwendungsgrundgerüst -Name[el]=GNOME-- Πλαίσιο εφαρμογής -Name[es]=Infraestructura para aplicación GNOME-- -Name[et]=GNOME-- rakenduse raamistik -Name[eu]=GNOME-- Aplikazioen lan-markoa -Name[fa]=چارچوب کاربرد GNOME-- -Name[fr]=Infrastructure d'application GNOME-- -Name[ga]=Creatlach feidhmchláir GNOME-- -Name[gl]=Entorno de traballo para aplicación GNOME -Name[hu]=GNOME - Alkalmazás-keretrendszer -Name[it]=Infrastruttura per applicazioni GNOME-- -Name[ja]=GNOME-- アプリケーションフレームワーク -Name[nds]=Programmrahmenwark för "GNOME--" -Name[ne]=GNOME-- अनुप्रयोग फ्रेमवर्क -Name[nl]=GNOME-- Applicationframework -Name[pl]=GNOME-- Szablon programu -Name[pt]=Plataforma de aplicações GNOME-- -Name[pt_BR]=Plataforma de aplicações GNOME-- -Name[ru]=Приложение GNOME-- -Name[sk]=GNOME-- aplikačný framework -Name[sl]=Ogrodje programa za GNOME-- -Name[sr]=Радни оквир GNOME-- програма -Name[sr@Latn]=Radni okvir GNOME-- programa -Name[sv]=GNOME-- programramverk -Name[tr]=GNOME-- Uygulama Çatısı -Name[zh_CN]=GNOME-- 应用程序框架 -Name[zh_TW]=GNOME-- 應用程式框架 -Category=C++/GTK+ -Icon=gnome2mmapp.png -Comment=Generates a simple GNOME-- application. Gnomemm, Gtkmm >= 1.2.8 and < 1.3.0 should be installed. To edit glade file glade-- (http://home.wtal.de/petig/Gtk/) is required. -Comment[ca]=Genera una simple aplicació GNOME. Gnomemm, Gtkmm >= 1.2.8 i < 1.3.0 haurien d'estar instal·lats. Per editar el fitxer glade es requereix (http://home.wtal.de/petig/Gtk/). -Comment[da]=Genererer et simpelt GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 og < 1.3.0 skal være installeret. For at redigere glade file glade-- kræves (http://home.wtal.de/petig/Gtk/). -Comment[de]=Erstellt eine einfache GNOME-Anwendung. Gnomemm, Gtkmm >= 1.2.8 und < 1.3.0 sollten installiert sein. Zum Bearbeiten der glade-Datei ist glade-- (http://home.wtal.de/petig/Gtk/) erforderlich. -Comment[el]=Δημιουργεί μια απλή εφαρμογή GNOME. Τα Gnomemm, Gtkmm >= 1.2.8 και < 1.3.0 πρέπει να είναι εγκατεστημένα. Για την επεξεργασία του αρχείου glade απαιτείται το glade (http://home.wtal.de/petig/Gtk/). -Comment[es]=Genera una sencilla aplicación GNOME--. Debe tener instalados Gnomemm, Gtkmm >= 1.2.8 y < 1.3.0. Para editar archivos glade se necesita glade-- (http://home.wtal.de/petig/Gtk/). -Comment[et]=Lihtsa GNOME-- rakenduse loomine. Paigaldatud peavad olema Gnomemm, Gtkmm >= 1.2.8 ja < 1.3.0. Glade-faili redigeerimiseks on vajalik glade-- (http://home.wtal.de/petig/Gtk/). -Comment[eu]=GNOME-- applicazio sinple bat sortzen du. Gnomemm, Gtkmm >= 1.2.8 and < 1.3.0 instalatu behar dira. Glade fitxategia editatzeko glade-- (http://home.wtal.de/petig/Gtk/) behar da. -Comment[fa]=یک کاربرد سادۀ GNOME-- تولید می‌کند. Gnomemm، Gtkmm >= ۱.۲.۸ و < ۱.۳.۰ باید نصب شده باشد. برای ویرایش پروندۀ glade، glade-- (http://home.wtal.de/petig/Gtk/) نیاز است. -Comment[fr]=Génère une application GNOME-- simple. Gnomemm et Gtkmm >= 1.2.8 et < 1.3.0 devront être installés. Pour modifier le fichier glade, glade-- (http://home.wtal.de/petig/Gtk/) est requis. -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí GNOME--. Ba chóir Gnomemm, Gtkmm >= 1.2.8 agus < 1.3.0 a bheith suiteáilte. Chun comhad glade a chur in eagar, tá glade-- (http://home.wtal.de/petig/Gtk/) de dhíth ort. -Comment[gl]=Xera una aplicación sinxela GNOME. Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0 deben estar instalados. Para editar un arquivo glade é necesario glade-- (http://home.wtal.de/petig/Gtk/). -Comment[hu]=Létrehoz egy egyszerű GNOME--os -alkalmazást. A Gnomemm, a Gtkmm (>= 1.2.8 és < 1.3.0) szükséges hozzá. Glade-fájl szerkesztéséhez a glade-- (http://home.wtal.de/petig/Gtk/) is szükséges. -Comment[it]=Genera una semplice applicazione GNOME--. Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0 dovrebbero essere installati. Si richiede glade per modificare i file di glade -- (http://home.wtal.de/petig/Gtk/). -Comment[ja]=簡単な GNOME-- アプリケーションを作成します。Gnomemm, Gtkmm >= 1.2.8 かつ < 1.3.0 が必要です。glade ファイルを編集するには glade-- (http://home.wtal.de/petig/Gtk/) が必要です。 -Comment[nds]=Stellt en eenfach "GNOME--"-Programm op. "Gnomemm", "Gtkmm" >= 1.2.8 un < 1.3.0 schöölt installeert wesen. För't Bewerken vun de glade-Datei deit "glade--" (http://home.wtal.de/petig/Gtk/) noot. -Comment[ne]=साधारण जिनोम-- अनुप्रयोग उत्पन्न गर्दछ । Gnomemm, Gtkmm >= 1.2.8 र < 1.3.0 स्थापना गर्नु पर्दछ । ग्लेड फाइल सम्पादन गर्नका लागि ग्लेड-- (http://home.wtal.de/petig/Gtk/) आवश्यक पर्दछ । -Comment[nl]=Genereert een eenvoudige GNOME-- toepassing. Gnomemm, Gtkmm >= 1.2.8 en < 1.3.0 dienen te zijn geïnstalleerd. Voor het bewerken van glade file is glade-- (http://home.wtal.de/petig/Gtk/) nodig. -Comment[pl]=Generuje prosty program dla środowiska GNOME--. Gnomemm i Gtkmm w wersji >= 1.2.8 i < 1.3.0 powinny być zainstalowane. Do edycji pliku glade konieczny jest program glade-- (http://home.wtal.de/petig/Gtk/). -Comment[pt]=Gera uma aplicação simples em GNOME--. Deverão estar instalados o Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). -Comment[pt_BR]=Gera uma aplicação simples em GNOME--. Deverão estar instalados o Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). -Comment[ru]=Создание простого приложения GNOME--. Требуются Gnomemm, Gtkmm >= 1.2.8 и < 1.3.0. Для редактирования файла glade нужна соответствующая программа (http://home.wtal.de/petig/Gtk/). -Comment[sk]=Vygeneruje jednoduchú GNOME-- aplikáciu. Vyžaduje nainštalovanéGnomemm, Gtkmm >= 1.2.8 a < 1.3.0. Na editovanie glade súboru he potrebnýglade-- (http://home.wtal.de/petig/Gtk/). -Comment[sr]=Прави једноставан GNOME-- програм. Gnomemm, Gtkmm >= 1.2.8 и < 1.3.0 требало би да су инсталирани. Да бисте уређивали glade фајл, неопходан је glade-- (http://home.wtal.de/petig/Gtk/). -Comment[sr@Latn]=Pravi jednostavan GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 i < 1.3.0 trebalo bi da su instalirani. Da biste uređivali glade fajl, neophodan je glade-- (http://home.wtal.de/petig/Gtk/). -Comment[sv]=Skapar ett enkelt GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 och < 1.3.0 måste vara installerat. För att redigera glade-filer krävs glade-- (http://home.wtal.de/petig/Gtk/). -Comment[tr]=Basit bir GNOME-- uygulaması yaratır. Gnomemm, Gtkmm>=1.28 ve <1.3.0 yüklü olmalıdır. Glade dosyasını düzenlemek için glade-- (http://home.wtal.de/petig/Gtk/) gereklidir. -Comment[zh_CN]=生成简单的 GNOME-- 应用程序。必须安装 Gnomemm、1.2.8 到 1.3.0 之间的 Gtkmm。要编辑 glade 文件,需要使用 glade-- (http://home.wtal.de/petig/Gtk/)。 -Comment[zh_TW]=產生一個簡單的 GNOME-- 應用程式。要先安裝 Gnomemm,Gtkmm 版本 >= 1.2.8 且 < 1.3.0。要編輯 glade 檔則要先安裝 glade-- (http://home.wtal.de/petig/Gtk/)。 -FileTemplates=hh,CStyle,cc,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=gnome2mmapp.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNOME2] -Type=include -File=%{tdevelop}/template-common/gnome2.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[FILE4] -Type=install -Source=%{src}/acconfig.h -Dest=%{dest}/acconfig.h - -[FILE5] -Type=install -Source=%{src}/config.h -Dest=%{dest}/config.h - -[FILE6] -Type=install -Source=%{src}/autogen.sh -Dest=%{dest}/autogen.sh - -[FILE7] -Type=install -Source=%{src}/gnome2mm.glade -Dest=%{dest}/%{APPNAMELC}.glade - -[FILE8] -Type=install -Source=%{src}/gnome2mm.gladep -Dest=%{dest}/%{APPNAMELC}.gladep - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE9] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE10] -Type=install -Source=%{src}/gnome2mm.cc -Dest=%{dest}/src/%{APPNAMELC}.cc - -[FILE11] -Type=install -Source=%{src}/main_window.hh -Dest=%{dest}/src/main_window.hh - -[FILE12] -Type=install -Source=%{src}/main_window.cc -Dest=%{dest}/src/main_window.cc - -[FILE13] -Type=install -Source=%{src}/main_window_glade.hh -Dest=%{dest}/src/main_window_glade.hh - -[FILE14] -Type=install -Source=%{src}/main_window_glade.cc -Dest=%{dest}/src/main_window_glade.cc - -[MSG] -Type=message -Comment=A GNOME-- application framework was created in %{dest} -Comment[ca]=Una infraestructura d'aplicació per a GNOME ha estat creada en %{dest} -Comment[da]=Et GNOME-- programskelet blev oprettet i %{dest} -Comment[de]=Ein GNOME-Anwendungsgerüst wurde in %{dest} erstellt. -Comment[el]=Ένα πλαίσιο εφαρμογής GNOME δημιουργήθηκε στο %{dest} -Comment[es]=Una infraestructura de aplicación GNOME-- ha sido creada en %{dest} -Comment[et]=GNOME-- rakenduse raamistik loodi asukohta %{dest} -Comment[eu]=GNOME-- applicazioen lan-marko bat sortu da hemen: %{dest} -Comment[fa]=یک چارچوب کاربرد GNOME-- در %{dest} ایجاد شد -Comment[fr]=Une infrastructure d'application GNOME-- a été créée dans %{dest} -Comment[ga]=Cruthaíodh creatlach feidhmchláir GNOME-- i %{dest} -Comment[gl]=Creouse un contorno de traballo para aplicación GNOME en %{dest} -Comment[hu]=Létrejött egy GNOME-s alkalmazás-keretrendszer itt: %{dest} -Comment[it]=È stato creata l'infrastruttura per un'applicazione GNOME in %{dest} -Comment[ja]=GNOME-- アプリケーションフレームワークを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Programmrahmenwark för "GNOME--" opstellt -Comment[ne]= जिनोम-- अनुप्रयोग फ्रेमवर्क %{dest} मा सिर्जना गरियो -Comment[nl]=Een GNOME-- applicationframework is aangemaakt in %{dest} -Comment[pl]=Szablon programu dla GNOME-- został utworzony w %{dest} -Comment[pt]=Foi criada a plataforma de uma aplicação GNOME-- em %{dest} -Comment[pt_BR]=Foi criada a plataforma de uma aplicação GNOME-- em %{dest} -Comment[ru]=Простое приложение GNOME-- создано в %{dest} -Comment[sk]=GNOME-- aplikačný framework bol vytvorený v %{dest} -Comment[sl]=Ogrodje programa za GNOME-- je bilo ustvarjeno v %{dest} -Comment[sr]=Радни оквир GNOME-- програма направљен је у %{dest} -Comment[sr@Latn]=Radni okvir GNOME-- programa napravljen je u %{dest} -Comment[sv]=Ett GNOME-- programramverk skapades i %{dest} -Comment[tr]=Bir GNOME-- uygulama çatısı %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了 GNOME-- 应用程序框架 -Comment[zh_TW]=GNOME-- 應用程式框架已建立於 %{dest} diff --git a/languages/cpp/app_templates/gtk2mmapp/CMakeLists.txt b/languages/cpp/app_templates/gtk2mmapp/CMakeLists.txt index 75d52e80..45544ac9 100644 --- a/languages/cpp/app_templates/gtk2mmapp/CMakeLists.txt +++ b/languages/cpp/app_templates/gtk2mmapp/CMakeLists.txt @@ -21,9 +21,9 @@ add_custom_target( gtk2mmapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/gtk2mmapp.tar.gz gtk2mmapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - gtk2mmapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + gtk2mmapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/gtk2mmapp/Makefile.am b/languages/cpp/app_templates/gtk2mmapp/Makefile.am index 422f7b00..c44ba568 100644 --- a/languages/cpp/app_templates/gtk2mmapp/Makefile.am +++ b/languages/cpp/app_templates/gtk2mmapp/Makefile.am @@ -7,10 +7,10 @@ dataFiles = acconfig.h autogen.sh gtk2mm.glade main_window.cc \ templateName = gtk2mmapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/gtk2mmapp/app.tdevelop b/languages/cpp/app_templates/gtk2mmapp/app.tdevelop index f9335dad..6f691439 100644 --- a/languages/cpp/app_templates/gtk2mmapp/app.tdevelop +++ b/languages/cpp/app_templates/gtk2mmapp/app.tdevelop @@ -12,7 +12,7 @@ GTK - + src/%{APPNAMELC} debug @@ -39,8 +39,8 @@ -O0 -g3 - - + + @@ -48,8 +48,8 @@ - - + + ada ada_bugs_gcc @@ -92,22 +92,22 @@ TDE Libraries (Doxygen) - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.kdevtemplate b/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.kdevtemplate new file mode 100644 index 00000000..a8948d26 --- /dev/null +++ b/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.kdevtemplate @@ -0,0 +1,174 @@ +# TDE Config File +[General] +Name=Gtk-- Application framework +Name[ca]=Infraestructura d'aplicació per a Gtk-- +Name[da]=Gtk-- programskelet +Name[de]="Gtk--"-Anwendungsgrundgerüst +Name[el]=Gtk-- πλαίσιο εφαρμογής +Name[es]=Infraestructura de aplicación Gtk-- +Name[et]=Gtk-- rakenduse raamistik +Name[eu]=Gtk-- Applicazioen lan-markoa +Name[fa]=چارچوب کاربرد Gtk-- +Name[fr]=Infrastructure d'application Gtk-- +Name[ga]=Creatlach feidhmchláir Gtk-- +Name[hu]=Gtk-- - alkalmazás-keretrendszer +Name[it]=Infrastruttura per un'applicazione Gtk-- +Name[ja]=Gtk-- アプリケーションフレームワーク +Name[nds]="Gtk--"-Programmrahmenwark +Name[ne]=Gtk-- अनुप्रयोग फ्रेमवर्क +Name[nl]=Gtk-- Applicationframework +Name[pl]=Szablon programu Gtk-- +Name[pt]=Plataforma de aplicações em Gtk-- +Name[pt_BR]=Plataforma de aplicações em Gtk-- +Name[ru]=Приложение Gtk-- +Name[sk]=Gtk-- aplikačný framework +Name[sl]=Ogrodje programa za Gtk-- +Name[sr]=Радни оквир Gtk-- програма +Name[sr@Latn]=Radni okvir Gtk-- programa +Name[sv]=Gtk-- programramverk +Name[tr]=Gtk-- Uygulama Çatısı +Name[zh_CN]=Gtk-- 应用程序框架 +Name[zh_TW]=Gtk-- 應用程式框架 +Category=C++/GTK+ +Icon=gtk2mmapp.png +Comment=Generates a simple Gtk-- application. Gtkmm >= 2.8.0 should be installed. To edit glade file glade-- (http://home.wtal.de/petig/Gtk/) is required. +Comment[ca]=Genera una simple aplicació Gtk. Gtkmm >= 2.8.0 hauria d'estar instal·lat. Per editar el fitxer glade es requereix glade-- (http://home.wtal.de/petig/Gtk/). +Comment[da]=Genererer et simpelt Gtk-- program. Gtkmm >= 2.8.0 skal være installeret. For at redigere glade file glade-- kræves (http://home.wtal.de/petig/Gtk/). +Comment[de]=Erstellt eine einfache Gtk-Anwendung. Gtkmm >= 1.2.8 und < 1.3.0 sollte installiert sein. Zum Bearbeiten der glade-Datei ist glade-- (http://home.wtal.de/petig/Gtk/) erforderlich. +Comment[el]=Δημιουργεί μια απλή εφαρμογή Gtk. Το Gtkmm >= 2.8.0 πρέπει να είναι εγκατεστημένο. Για την επεξεργασία του αρχείου glade απαιτείται το glade (http://home.wtal.de/petig/Gtk/). +Comment[es]=Genera una sencilla aplicación Gtk--. Debe tener instalado Gtkmm >= 2.8.0. Para editar archivos glade se necesita glade-- (http://home.wtal.de/petig/Gtk/). +Comment[et]=Lihtsa Gtk-- rakenduse loomine. Paigaldatud peab olema Gtkmm >= 2.8.0. Glade-faili redigeerimiseks on vajalik glade-- (http://home.wtal.de/petig/Gtk/). +Comment[fr]=Génère une application Gtk-- simple. Gtkmm >= 2.8.0 devra être installé. Pour modifier le fichier glade, glade-- (http://home.wtal.de/petig/Gtk/) est requis. +Comment[hu]=Létrehoz egy egyszerű Gtk---alapú alkalmazást. Gtkmm >= 2.8.0 szükséges hozzá. Glade-fájl szerkesztéséhez glade-- (http://home.wtal.de/petig/Gtk/) szükséges. +Comment[it]=Genera una semplice applicazione Gtk--. Dovrebbe essere installato Gtkmm >= 2.8.0. Per modificare il file di glade bisogna avere glade-- installato (http://home.wtal.de/petig/Gtk/). +Comment[ja]=簡単な Gtk-- アプリケーションを作成します。Gtkmm >= 2.8.0 が必要です。Glade ファイルを編集するには glade (http://home.wtal.de/petig/Gtk/) が必要です。 +Comment[nds]=Stellt en eenfach "Gtk--"-Programm op. Gtkmm >= 2.8.0 schull installeert wesen. För't Bewerken vun de glade-Datei deit "glade--" (http://home.wtal.de/petig/Gtk/) noot. +Comment[nl]=Genereert een eenvoudige Gtk-- toepassing. Gtkmm >= 2.8.0 dient te zijn geïnstalleerd. Om het glade-bestand te kunnen bewerken hebt u glade-- (http://home.wtal.de/petig/Gtk/) nodig. +Comment[pl]=Generuje prosty program Gtk--. Powinno być zainstalowane Gtkmm w wersji >= 2.8.0. Do modyfikacji plików glade konieczne jest glade-- (http://home.wtal.de/petig/Gtk/). +Comment[pt]=Gera uma aplicação simples em Gtk--. Deverá estar instalado o Gtkmm >= 2.8.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). +Comment[pt_BR]=Gera uma aplicação simples em Gtk--. Deverá estar instalado o Gtkmm >= 2.8.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). +Comment[ru]=Создание простого приложения Gtk--. Требуется Gtkmm >= 1.2.8 и < 1.3.0. Для редактирования файла glade нужна соответствующая программа (http://home.wtal.de/petig/Gtk/). +Comment[sk]=Vygeneruje jednoduchú Gtk-- aplikáciu. Vyžaduje nainštalované Gtkmm >= 2.8.0. Na editovanie glade súboru he potrebný glade-- (http://home.wtal.de/petig/Gtk/). +Comment[sr]=Прави једноставан Gtk-- програм. Gtkmm >= 2.8.0 требало би да је инсталиран. Да бисте уређивали glade фајл, неопходан је glade-- (http://home.wtal.de/petig/Gtk/). +Comment[sr@Latn]=Pravi jednostavan Gtk-- program. Gtkmm >= 2.8.0 trebalo bi da je instaliran. Da biste uređivali glade fajl, neophodan je glade-- (http://home.wtal.de/petig/Gtk/). +Comment[sv]=Skapar ett enkelt Gtk-- program. Gtkmm >= 2.8.0 måste vara installerat. För att redigera glade-filer krävs glade-- (http://home.wtal.de/petig/Gtk/). +Comment[zh_TW]=產生一個簡單的 Gtk-- 應用程式。要先安裝 Gtkmm 版本 >= 2.8.0。要編輯 glade 檔則要先安裝 glade-- (http://home.wtal.de/petig/Gtk/)。 +FileTemplates=hh,CStyle,cc,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=gtk2mmapp.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[FILE4] +Type=install +Source=%{src}/acconfig.h +Dest=%{dest}/acconfig.h + +[FILE5] +Type=install +Source=%{src}/config.h +Dest=%{dest}/config.h + +[FILE6] +Type=install +Source=%{src}/autogen.sh +Dest=%{dest}/autogen.sh + +[FILE7] +Type=install +Source=%{src}/gtk2mm.glade +Dest=%{dest}/%{APPNAMELC}.glade + +[FILE8] +Type=install +Source=%{src}/gtk2mm.gladep +Dest=%{dest}/%{APPNAMELC}.gladep + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE9] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE10] +Type=install +Source=%{src}/gtk2mm.cc +Dest=%{dest}/src/%{APPNAMELC}.cc + +[FILE11] +Type=install +Source=%{src}/main_window.hh +Dest=%{dest}/src/main_window.hh + +[FILE12] +Type=install +Source=%{src}/main_window.cc +Dest=%{dest}/src/main_window.cc + +[FILE13] +Type=install +Source=%{src}/main_window_glade.hh +Dest=%{dest}/src/main_window_glade.hh + +[FILE14] +Type=install +Source=%{src}/main_window_glade.cc +Dest=%{dest}/src/main_window_glade.cc + +[MSG] +Type=message +Comment=A Gtk-- application framework was created in %{dest} +Comment[ca]=Una infraestructura d'aplicació Gtk-- ha estat creada en %{dest} +Comment[da]=Et Gtk-- programskelet blev oprettet i %{dest} +Comment[de]=Ein Gtk-Anwendungsgerüst wurde in %{dest} erstellt. +Comment[el]=Ένα πλαίσιο εφαρμογής Gtk δημιουργήθηκε στο %{dest} +Comment[es]=Una infraestructura de aplicación Gtk-- ha sido creada en %{dest} +Comment[et]=Gtk-- rakenduse raamistik loodi asukohta %{dest} +Comment[eu]=Gtk-- aplikazioen lan-marko bat sortu da hemen: %{dest} +Comment[fa]=یک چارچوب کاربرد Gtk-- در %{dest} ایجاد شد +Comment[fr]=Une infrastructure d'application Gtk-- a été créée dans %{dest} +Comment[ga]=Cruthaíodh creatlach feidhmchláir Gtk-- i %{dest} +Comment[gl]=Creouse un contorno de traballo para aplicación Gtk en %{dest} +Comment[hu]=Létrejött egy Gtk-s alkalmazás-keretrendszer itt: %{dest} +Comment[it]=È stata creata l'infrastruttura per un'applicazione Gtk-- in %{dest} +Comment[ja]=Gtk-- アプリケーションフレームワークを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en "Gtk-- "-Programmrahmenwark opstellt +Comment[ne]=Gtk-- अनुप्रयोग फ्रेमवर्क %{dest} मा सिर्जना गरियो +Comment[nl]=Een Gtk-- toepassing is aangemaakt in %{dest} +Comment[pl]=Szablon programu Gtk-- został utworzony w %{dest} +Comment[pt]=Foi criada a plataforma de uma aplicação Gtk-- em %{dest} +Comment[pt_BR]=Foi criada a plataforma de uma aplicação Gtk-- em %{dest} +Comment[ru]=Приложение Gtk-- создано в %{dest} +Comment[sk]=Gtk-- aplikačný framework bol vytvorený v %{dest} +Comment[sl]=Ogrodje za program v Gtk-- je bil ustvarjen v %{dest} +Comment[sr]=Радни оквир Gtk-- програма направљен је у %{dest} +Comment[sr@Latn]=Radni okvir Gtk-- programa napravljen je u %{dest} +Comment[sv]=Ett Gtk-- programramverk skapades i %{dest} +Comment[tr]=Bir Gtk-- uygulama çatısı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个 Gtk-- 应用程序框架 +Comment[zh_TW]=一個 Gtk-- 應用程式框架已建立於 %{dest} diff --git a/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.tdevtemplate b/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.tdevtemplate deleted file mode 100644 index 4559f2d8..00000000 --- a/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.tdevtemplate +++ /dev/null @@ -1,174 +0,0 @@ -# TDE Config File -[General] -Name=Gtk-- Application framework -Name[ca]=Infraestructura d'aplicació per a Gtk-- -Name[da]=Gtk-- programskelet -Name[de]="Gtk--"-Anwendungsgrundgerüst -Name[el]=Gtk-- πλαίσιο εφαρμογής -Name[es]=Infraestructura de aplicación Gtk-- -Name[et]=Gtk-- rakenduse raamistik -Name[eu]=Gtk-- Applicazioen lan-markoa -Name[fa]=چارچوب کاربرد Gtk-- -Name[fr]=Infrastructure d'application Gtk-- -Name[ga]=Creatlach feidhmchláir Gtk-- -Name[hu]=Gtk-- - alkalmazás-keretrendszer -Name[it]=Infrastruttura per un'applicazione Gtk-- -Name[ja]=Gtk-- アプリケーションフレームワーク -Name[nds]="Gtk--"-Programmrahmenwark -Name[ne]=Gtk-- अनुप्रयोग फ्रेमवर्क -Name[nl]=Gtk-- Applicationframework -Name[pl]=Szablon programu Gtk-- -Name[pt]=Plataforma de aplicações em Gtk-- -Name[pt_BR]=Plataforma de aplicações em Gtk-- -Name[ru]=Приложение Gtk-- -Name[sk]=Gtk-- aplikačný framework -Name[sl]=Ogrodje programa za Gtk-- -Name[sr]=Радни оквир Gtk-- програма -Name[sr@Latn]=Radni okvir Gtk-- programa -Name[sv]=Gtk-- programramverk -Name[tr]=Gtk-- Uygulama Çatısı -Name[zh_CN]=Gtk-- 应用程序框架 -Name[zh_TW]=Gtk-- 應用程式框架 -Category=C++/GTK+ -Icon=gtk2mmapp.png -Comment=Generates a simple Gtk-- application. Gtkmm >= 2.8.0 should be installed. To edit glade file glade-- (http://home.wtal.de/petig/Gtk/) is required. -Comment[ca]=Genera una simple aplicació Gtk. Gtkmm >= 2.8.0 hauria d'estar instal·lat. Per editar el fitxer glade es requereix glade-- (http://home.wtal.de/petig/Gtk/). -Comment[da]=Genererer et simpelt Gtk-- program. Gtkmm >= 2.8.0 skal være installeret. For at redigere glade file glade-- kræves (http://home.wtal.de/petig/Gtk/). -Comment[de]=Erstellt eine einfache Gtk-Anwendung. Gtkmm >= 1.2.8 und < 1.3.0 sollte installiert sein. Zum Bearbeiten der glade-Datei ist glade-- (http://home.wtal.de/petig/Gtk/) erforderlich. -Comment[el]=Δημιουργεί μια απλή εφαρμογή Gtk. Το Gtkmm >= 2.8.0 πρέπει να είναι εγκατεστημένο. Για την επεξεργασία του αρχείου glade απαιτείται το glade (http://home.wtal.de/petig/Gtk/). -Comment[es]=Genera una sencilla aplicación Gtk--. Debe tener instalado Gtkmm >= 2.8.0. Para editar archivos glade se necesita glade-- (http://home.wtal.de/petig/Gtk/). -Comment[et]=Lihtsa Gtk-- rakenduse loomine. Paigaldatud peab olema Gtkmm >= 2.8.0. Glade-faili redigeerimiseks on vajalik glade-- (http://home.wtal.de/petig/Gtk/). -Comment[fr]=Génère une application Gtk-- simple. Gtkmm >= 2.8.0 devra être installé. Pour modifier le fichier glade, glade-- (http://home.wtal.de/petig/Gtk/) est requis. -Comment[hu]=Létrehoz egy egyszerű Gtk---alapú alkalmazást. Gtkmm >= 2.8.0 szükséges hozzá. Glade-fájl szerkesztéséhez glade-- (http://home.wtal.de/petig/Gtk/) szükséges. -Comment[it]=Genera una semplice applicazione Gtk--. Dovrebbe essere installato Gtkmm >= 2.8.0. Per modificare il file di glade bisogna avere glade-- installato (http://home.wtal.de/petig/Gtk/). -Comment[ja]=簡単な Gtk-- アプリケーションを作成します。Gtkmm >= 2.8.0 が必要です。Glade ファイルを編集するには glade (http://home.wtal.de/petig/Gtk/) が必要です。 -Comment[nds]=Stellt en eenfach "Gtk--"-Programm op. Gtkmm >= 2.8.0 schull installeert wesen. För't Bewerken vun de glade-Datei deit "glade--" (http://home.wtal.de/petig/Gtk/) noot. -Comment[nl]=Genereert een eenvoudige Gtk-- toepassing. Gtkmm >= 2.8.0 dient te zijn geïnstalleerd. Om het glade-bestand te kunnen bewerken hebt u glade-- (http://home.wtal.de/petig/Gtk/) nodig. -Comment[pl]=Generuje prosty program Gtk--. Powinno być zainstalowane Gtkmm w wersji >= 2.8.0. Do modyfikacji plików glade konieczne jest glade-- (http://home.wtal.de/petig/Gtk/). -Comment[pt]=Gera uma aplicação simples em Gtk--. Deverá estar instalado o Gtkmm >= 2.8.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). -Comment[pt_BR]=Gera uma aplicação simples em Gtk--. Deverá estar instalado o Gtkmm >= 2.8.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). -Comment[ru]=Создание простого приложения Gtk--. Требуется Gtkmm >= 1.2.8 и < 1.3.0. Для редактирования файла glade нужна соответствующая программа (http://home.wtal.de/petig/Gtk/). -Comment[sk]=Vygeneruje jednoduchú Gtk-- aplikáciu. Vyžaduje nainštalované Gtkmm >= 2.8.0. Na editovanie glade súboru he potrebný glade-- (http://home.wtal.de/petig/Gtk/). -Comment[sr]=Прави једноставан Gtk-- програм. Gtkmm >= 2.8.0 требало би да је инсталиран. Да бисте уређивали glade фајл, неопходан је glade-- (http://home.wtal.de/petig/Gtk/). -Comment[sr@Latn]=Pravi jednostavan Gtk-- program. Gtkmm >= 2.8.0 trebalo bi da je instaliran. Da biste uređivali glade fajl, neophodan je glade-- (http://home.wtal.de/petig/Gtk/). -Comment[sv]=Skapar ett enkelt Gtk-- program. Gtkmm >= 2.8.0 måste vara installerat. För att redigera glade-filer krävs glade-- (http://home.wtal.de/petig/Gtk/). -Comment[zh_TW]=產生一個簡單的 Gtk-- 應用程式。要先安裝 Gtkmm 版本 >= 2.8.0。要編輯 glade 檔則要先安裝 glade-- (http://home.wtal.de/petig/Gtk/)。 -FileTemplates=hh,CStyle,cc,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=gtk2mmapp.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[FILE4] -Type=install -Source=%{src}/acconfig.h -Dest=%{dest}/acconfig.h - -[FILE5] -Type=install -Source=%{src}/config.h -Dest=%{dest}/config.h - -[FILE6] -Type=install -Source=%{src}/autogen.sh -Dest=%{dest}/autogen.sh - -[FILE7] -Type=install -Source=%{src}/gtk2mm.glade -Dest=%{dest}/%{APPNAMELC}.glade - -[FILE8] -Type=install -Source=%{src}/gtk2mm.gladep -Dest=%{dest}/%{APPNAMELC}.gladep - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE9] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE10] -Type=install -Source=%{src}/gtk2mm.cc -Dest=%{dest}/src/%{APPNAMELC}.cc - -[FILE11] -Type=install -Source=%{src}/main_window.hh -Dest=%{dest}/src/main_window.hh - -[FILE12] -Type=install -Source=%{src}/main_window.cc -Dest=%{dest}/src/main_window.cc - -[FILE13] -Type=install -Source=%{src}/main_window_glade.hh -Dest=%{dest}/src/main_window_glade.hh - -[FILE14] -Type=install -Source=%{src}/main_window_glade.cc -Dest=%{dest}/src/main_window_glade.cc - -[MSG] -Type=message -Comment=A Gtk-- application framework was created in %{dest} -Comment[ca]=Una infraestructura d'aplicació Gtk-- ha estat creada en %{dest} -Comment[da]=Et Gtk-- programskelet blev oprettet i %{dest} -Comment[de]=Ein Gtk-Anwendungsgerüst wurde in %{dest} erstellt. -Comment[el]=Ένα πλαίσιο εφαρμογής Gtk δημιουργήθηκε στο %{dest} -Comment[es]=Una infraestructura de aplicación Gtk-- ha sido creada en %{dest} -Comment[et]=Gtk-- rakenduse raamistik loodi asukohta %{dest} -Comment[eu]=Gtk-- aplikazioen lan-marko bat sortu da hemen: %{dest} -Comment[fa]=یک چارچوب کاربرد Gtk-- در %{dest} ایجاد شد -Comment[fr]=Une infrastructure d'application Gtk-- a été créée dans %{dest} -Comment[ga]=Cruthaíodh creatlach feidhmchláir Gtk-- i %{dest} -Comment[gl]=Creouse un contorno de traballo para aplicación Gtk en %{dest} -Comment[hu]=Létrejött egy Gtk-s alkalmazás-keretrendszer itt: %{dest} -Comment[it]=È stata creata l'infrastruttura per un'applicazione Gtk-- in %{dest} -Comment[ja]=Gtk-- アプリケーションフレームワークを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en "Gtk-- "-Programmrahmenwark opstellt -Comment[ne]=Gtk-- अनुप्रयोग फ्रेमवर्क %{dest} मा सिर्जना गरियो -Comment[nl]=Een Gtk-- toepassing is aangemaakt in %{dest} -Comment[pl]=Szablon programu Gtk-- został utworzony w %{dest} -Comment[pt]=Foi criada a plataforma de uma aplicação Gtk-- em %{dest} -Comment[pt_BR]=Foi criada a plataforma de uma aplicação Gtk-- em %{dest} -Comment[ru]=Приложение Gtk-- создано в %{dest} -Comment[sk]=Gtk-- aplikačný framework bol vytvorený v %{dest} -Comment[sl]=Ogrodje za program v Gtk-- je bil ustvarjen v %{dest} -Comment[sr]=Радни оквир Gtk-- програма направљен је у %{dest} -Comment[sr@Latn]=Radni okvir Gtk-- programa napravljen je u %{dest} -Comment[sv]=Ett Gtk-- programramverk skapades i %{dest} -Comment[tr]=Bir Gtk-- uygulama çatısı %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个 Gtk-- 应用程序框架 -Comment[zh_TW]=一個 Gtk-- 應用程式框架已建立於 %{dest} diff --git a/languages/cpp/app_templates/kapp/CMakeLists.txt b/languages/cpp/app_templates/kapp/CMakeLists.txt new file mode 100644 index 00000000..bfe6d93d --- /dev/null +++ b/languages/cpp/app_templates/kapp/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_custom_target( kapp.tar.gz ALL + COMMAND tar zcf kapp.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + app.cpp app.h pref.cpp pref.h appview.cpp appview.h + appiface.h app_client.cpp main.cpp appui.rc src-Makefile.am + kapp.png app.tdevelop subdirs README +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kapp.tar.gz kapp.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kapp/Makefile.am b/languages/cpp/app_templates/kapp/Makefile.am new file mode 100644 index 00000000..145551d3 --- /dev/null +++ b/languages/cpp/app_templates/kapp/Makefile.am @@ -0,0 +1,19 @@ +dataFiles = app.cpp app.h pref.cpp pref.h appview.cpp appview.h \ + appiface.h app_client.cpp main.cpp appui.rc src-Makefile.am \ + kapp.png app.tdevelop subdirs README + +templateName = kapp + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/cpp/app_templates/kapp/README b/languages/cpp/app_templates/kapp/README new file mode 100644 index 00000000..7720e6b4 --- /dev/null +++ b/languages/cpp/app_templates/kapp/README @@ -0,0 +1,81 @@ +----------------------------------------------- +Kde application framework template quickstart +Author: Thomas Nagy +Date: 2004-03-22 +----------------------------------------------- + +This README file explains you basic things for starting with +this application template. + + +** Building and installing ** + +* Build the configure script by "make -f Makefile.cvs" + +* To clean, use "make clean", and to clean everything +(remove the makefiles, etc), use "make distclean" + +* To distribute your program, try "make dist". +This will make a compact tarball archive of your release with the +necessary scripts inside. + +* Modifying the auto-tools scripts +for automake scripts there is an excellent tutorial there : +http://developer.kde.org/documentation/other/makefile_am_howto.html + +* Simplify your life : install the project in your home directory for +testing purposes. +./configure --prefix=/home/user/dummyfolder/ +In the end when you finished the development you can +rm -rf /home/user/dummyfolder/ +without fear. + + +** Technologies ** + +* Build the menus of your application easily +kde applications now use an xml file (*ui.rc file) to build the menus. +This allow a great customization of the application. However, when +programming the menu is shown only after a "make install" + +For more details, consult : +http://devel-home.kde.org/~larrosa/tutorial/p9.html +http://developer.kde.org/documentation/tutorials/xmlui/preface.html + +* Use TDEConfig XT to create your configuration dialogs and make +them more maintainable. + +For more details, consult : +http://developer.kde.org/documentation/tutorials/tdeconfigxt/tdeconfigxt.html + +* With KParts, you can embed other kde components in your program, or make your program +embeddable in other apps. For example, the kmplayer kpart can be called to play videos +in your app. + +For more details, consult : +http://www-106.ibm.com/developerworks/library/l-tdeparts/ +http://developer.kde.org/documentation/tutorials/dot/writing-plugins.html +http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html + +* With dcop, you can control your app from other applications +Make sure to include K_DCOP and a kdcop: section in your .h file +http://developer.kde.org/documentation/tutorials/dot/dcopiface/dcop-interface.html + + +** Documentation ** + +* For the translations : +1. Download a patched gettext which can be found at: + http://public.kde.planetmirror.com/pub/kde/devel/gettext-kde/ +2. Install that gettext in ~/bin/ +3. cd ~/yourproject, export PATH=~/bin:$PATH, export +TDEDIR=/where_your_TDE3_is +4. make -f admin/Makefile.common package-messages +5. make package-messages +6. Translate the po files (not the pot!!) with kbabel or xemacs + +* Do not forget to write the documentation for your kde app +edit the documentation template index.docbook in doc/ + + + diff --git a/languages/cpp/app_templates/kapp/app.cpp b/languages/cpp/app_templates/kapp/app.cpp new file mode 100644 index 00000000..774efe8e --- /dev/null +++ b/languages/cpp/app_templates/kapp/app.cpp @@ -0,0 +1,247 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" +#include "pref.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +%{APPNAME}::%{APPNAME}() + : TDEMainWindow( 0, "%{APPNAME}" ), + m_view(new %{APPNAME}View(this)), + m_printer(0) +{ + // accept dnd + setAcceptDrops(true); + + // tell the TDEMainWindow that this is indeed the main widget + setCentralWidget(m_view); + + // then, setup our actions + setupActions(); + + // and a status bar + statusBar()->show(); + + // Apply the create the main window and ask the mainwindow to + // automatically save settings if changed: window size, toolbar + // position, icon size, etc. Also to add actions for the statusbar + // toolbar, and keybindings if necessary. + setupGUI(); + + // allow the view to change the statusbar and caption + connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)), + this, TQT_SLOT(changeStatusbar(const TQString&))); + connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)), + this, TQT_SLOT(changeCaption(const TQString&))); + +} + +%{APPNAME}::~%{APPNAME}() +{ +} + +void %{APPNAME}::load(const KURL& url) +{ + TQString target; + // the below code is what you should normally do. in this + // example case, we want the url to our own. you probably + // want to use this code instead for your app + + #if 0 + // download the contents + if (TDEIO::NetAccess::download(url, target)) + { + // set our caption + setCaption(url); + + // load in the file (target is always local) + loadFile(target); + + // and remove the temp file + TDEIO::NetAccess::removeTempFile(target); + } + #endif + + setCaption(url.prettyURL()); + m_view->openURL(url); +} + +void %{APPNAME}::setupActions() +{ + KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); + KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection()); + KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); + KStdAction::print(this, TQT_SLOT(filePrint()), actionCollection()); + KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); + + KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); + + // this doesn't do anything useful. it's just here to illustrate + // how to insert a custom menu and menu item + TDEAction *custom = new TDEAction(i18n("Cus&tom Menuitem"), 0, + this, TQT_SLOT(optionsPreferences()), + actionCollection(), "custom_action"); +} + +void %{APPNAME}::saveProperties(TDEConfig *config) +{ + // the 'config' object points to the session managed + // config file. anything you write here will be available + // later when this app is restored + + if (!m_view->currentURL().isEmpty()) { +#if KDE_IS_VERSION(3,1,3) + config->writePathEntry("lastURL", m_view->currentURL()); +#else + config->writeEntry("lastURL", m_view->currentURL()); +#endif + } +} + +void %{APPNAME}::readProperties(TDEConfig *config) +{ + // the 'config' object points to the session managed + // config file. this function is automatically called whenever + // the app is being restored. read in here whatever you wrote + // in 'saveProperties' + + TQString url = config->readPathEntry("lastURL"); + + if (!url.isEmpty()) + m_view->openURL(KURL(url)); +} + +void %{APPNAME}::dragEnterEvent(TQDragEnterEvent *event) +{ + // accept uri drops only + event->accept(KURLDrag::canDecode(event)); +} + +void %{APPNAME}::dropEvent(TQDropEvent *event) +{ + // this is a very simplistic implementation of a drop event. we + // will only accept a dropped URL. the TQt dnd code can do *much* + // much more, so please read the docs there + KURL::List urls; + + // see if we can decode a URI.. if not, just ignore it + if (KURLDrag::decode(event, urls) && !urls.isEmpty()) + { + // okay, we have a URI.. process it + const KURL &url = urls.first(); + + // load in the file + load(url); + } +} + +void %{APPNAME}::fileNew() +{ + // this slot is called whenever the File->New menu is selected, + // the New shortcut is pressed (usually CTRL+N) or the New toolbar + // button is clicked + + // create a new window + (new %{APPNAME})->show(); +} + +void %{APPNAME}::fileOpen() +{ + // this slot is called whenever the File->Open menu is selected, + // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar + // button is clicked +/* + // this brings up the generic open dialog + KURL url = KURLRequesterDlg::getURL(TQString(), this, i18n("Open Location") ); +*/ + // standard filedialog + KURL url = KFileDialog::getOpenURL(TQString(), TQString(), this, i18n("Open Location")); + if (!url.isEmpty()) + m_view->openURL(url); +} + +void %{APPNAME}::fileSave() +{ + // this slot is called whenever the File->Save menu is selected, + // the Save shortcut is pressed (usually CTRL+S) or the Save toolbar + // button is clicked + + // save the current file +} + +void %{APPNAME}::fileSaveAs() +{ + // this slot is called whenever the File->Save As menu is selected, + KURL file_url = KFileDialog::getSaveURL(); + if (!file_url.isEmpty() && file_url.isValid()) + { + // save your info, here + } +} + +void %{APPNAME}::filePrint() +{ + // this slot is called whenever the File->Print menu is selected, + // the Print shortcut is pressed (usually CTRL+P) or the Print toolbar + // button is clicked + if (!m_printer) m_printer = new KPrinter; + if (m_printer->setup(this)) + { + // setup the printer. with TQt, you always "print" to a + // TQPainter.. whether the output medium is a pixmap, a screen, + // or paper + TQPainter p; + p.begin(m_printer); + + // we let our view do the actual printing + TQPaintDeviceMetrics metrics(m_printer); + m_view->print(&p, metrics.height(), metrics.width()); + + // and send the result to the printer + p.end(); + } +} + +void %{APPNAME}::optionsPreferences() +{ + // popup some sort of preference dialog, here + %{APPNAME}Preferences dlg; + if (dlg.exec()) + { + // redo your settings + } +} + +void %{APPNAME}::changeStatusbar(const TQString& text) +{ + // display the text on the statusbar + statusBar()->message(text); +} + +void %{APPNAME}::changeCaption(const TQString& text) +{ + // display the text on the caption + setCaption(text); +} +#include "%{APPNAMELC}.moc" diff --git a/languages/cpp/app_templates/kapp/app.desktop b/languages/cpp/app_templates/kapp/app.desktop new file mode 100644 index 00000000..5c7ab928 --- /dev/null +++ b/languages/cpp/app_templates/kapp/app.desktop @@ -0,0 +1,44 @@ +[Desktop Entry] +Name=%{APPNAME} +Exec=%{APPNAMELC} %i -caption "%c" +Icon=%{APPNAMELC} +Type=Application +DocPath=%{APPNAMELC}/%{APPNAMELC}.html +Comment=A TDE KPart Application +Comment[br]=Ur meziant Kpart evit TDE +Comment[ca]=Una aplicació KPart per al TDE +Comment[cy]=Cymhwysiad KPart TDE +Comment[da]=Et TDE KPart-program +Comment[de]=Eine auf der Komponententechnik KPart basierende TDE-Anwendung +Comment[el]=Μια εφαρμογή KPart του TDE +Comment[es]=Una aplicación KPart de TDE +Comment[et]=TDE KPart rakendus +Comment[eu]=TDE KPart aplikazio bat +Comment[fa]=یک کاربرد TDE KPart +Comment[fr]=Une application KPart pour TDE +Comment[ga]=Feidhmchlár KPart TDE +Comment[gl]=Unha aplicación KPart de TDE +Comment[hi]=एक केडीई के-पार्ट अनुप्रयोग +Comment[hu]=KPart-alapú TDE-alkalmazás +Comment[is]=TDE KPart forrit +Comment[it]=Applicazione KPart di TDE +Comment[ja]=TDE KPart アプリケーション +Comment[lt]=TDE KPart programa +Comment[nds]=En KPart-Deelprogramm för TDE +Comment[ne]=एउटा केडीई KPart अनुप्रयोग +Comment[nl]=Een TDE KPart-toepassing +Comment[pl]=Osadzalny element KPart TDE +Comment[pt]=Uma Aplicação KPart do TDE +Comment[pt_BR]=Um Aplicativo KPart do TDE +Comment[ru]=Приложение KPart для TDE +Comment[sk]=TDE KPart aplikácia +Comment[sl]=Program KPart za TDE +Comment[sr]=TDE KPart програм +Comment[sr@Latn]=TDE KPart program +Comment[sv]=Ett TDE Kpart-program +Comment[ta]=கெடி கெபார்ட் பயன்பாடு +Comment[tg]=Ба кор андохтани KPart барои TDE +Comment[tr]=Bir TDE KPart Uygulaması +Comment[zh_CN]=一个 TDE KPart 应用程序 +Comment[zh_TW]=TDE KPart 應用程式 +Terminal=false diff --git a/languages/cpp/app_templates/kapp/app.h b/languages/cpp/app_templates/kapp/app.h new file mode 100644 index 00000000..5f39dd11 --- /dev/null +++ b/languages/cpp/app_templates/kapp/app.h @@ -0,0 +1,90 @@ +%{H_TEMPLATE} + +#ifndef _%{APPNAMEUC}_H_ +#define _%{APPNAMEUC}_H_ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +#include "%{APPNAMELC}view.h" + +class KPrinter; +class KURL; + +/** + * This class serves as the main window for %{APPNAME}. It handles the + * menus, toolbars, and status bars. + * + * @short Main window class + * @author %{AUTHOR} <%{EMAIL}> + * @version %{VERSION} + */ +class %{APPNAME} : public TDEMainWindow +{ + Q_OBJECT + +public: + /** + * Default Constructor + */ + %{APPNAME}(); + + /** + * Default Destructor + */ + virtual ~%{APPNAME}(); + + /** + * Use this method to load whatever file/URL you have + */ + void load(const KURL& url); + +protected: + /** + * Overridden virtuals for TQt drag 'n drop (XDND) + */ + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); + +protected: + /** + * This function is called when it is time for the app to save its + * properties for session management purposes. + */ + void saveProperties(TDEConfig *); + + /** + * This function is called when this app is restored. The TDEConfig + * object points to the session management config file that was saved + * with @ref saveProperties + */ + void readProperties(TDEConfig *); + + +private slots: + void fileNew(); + void fileOpen(); + void fileSave(); + void fileSaveAs(); + void filePrint(); + void optionsPreferences(); + + void changeStatusbar(const TQString& text); + void changeCaption(const TQString& text); + +private: + void setupAccel(); + void setupActions(); + +private: + %{APPNAME}View *m_view; + + KPrinter *m_printer; +}; + +#endif // _%{APPNAMEUC}_H_ + diff --git a/languages/cpp/app_templates/kapp/app.kdevses b/languages/cpp/app_templates/kapp/app.kdevses new file mode 100644 index 00000000..dcd1c8c1 --- /dev/null +++ b/languages/cpp/app_templates/kapp/app.kdevses @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/languages/cpp/app_templates/kapp/app.tdevelop b/languages/cpp/app_templates/kapp/app.tdevelop new file mode 100644 index 00000000..6a53f237 --- /dev/null +++ b/languages/cpp/app_templates/kapp/app.tdevelop @@ -0,0 +1,168 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + C++ + Code + Qt + TDE + + . + false + + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + + + src/%{APPNAMELC} + debug + + + src/%{APPNAMELC} + false + + + + + + + false + 1 + false + + + + + optimized + kdevgccoptions + kdevgppoptions + kdevg77options + -O2 -g0 + + + --enable-debug=full + debug + kdevgccoptions + kdevgppoptions + kdevg77options + -O0 -g3 + + + + + + + + + + + + + false + *.o,*.lo,CVS + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + w3c-svg + sw + w3c-uaag10 + wxwidgets_bugs + + + qmake User Guide + + + + + libtool + + + true + false + false + true + + + false + true + + + + + + + + + + + + -f + + -dP + + -f + -u3 -p + + + + + + + false + + + .h + .cpp + true + + + + true + 2 + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/kapp/app_client.cpp b/languages/cpp/app_templates/kapp/app_client.cpp new file mode 100644 index 00000000..ce92c875 --- /dev/null +++ b/languages/cpp/app_templates/kapp/app_client.cpp @@ -0,0 +1,26 @@ +%{CPP_TEMPLATE} + +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + TDEApplication app(argc, argv, "%{APPNAMELC}_client", false); + + // get our DCOP client and attach so that we may use it + DCOPClient *client = app.dcopClient(); + client->attach(); + + // do a 'send' for now + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); + if (argc > 1) + ds << TQString(argv[1]); + else + ds << TQString("http://www.kde.org"); + client->send("%{APPNAMELC}", "%{APPNAME}Iface", "openURL(TQString)", data); + + return app.exec(); +} diff --git a/languages/cpp/app_templates/kapp/appiface.h b/languages/cpp/app_templates/kapp/appiface.h new file mode 100644 index 00000000..9fa7cd1b --- /dev/null +++ b/languages/cpp/app_templates/kapp/appiface.h @@ -0,0 +1,17 @@ +%{H_TEMPLATE} + +#ifndef _%{APPNAMEUC}IFACE_H_ +#define _%{APPNAMEUC}IFACE_H_ + +#include + +class %{APPNAME}Iface : virtual public DCOPObject +{ + K_DCOP +public: + +k_dcop: + virtual void openURL(TQString url) = 0; +}; + +#endif // _%{APPNAMEUC}IFACE_H_ diff --git a/languages/cpp/app_templates/kapp/appui.rc b/languages/cpp/app_templates/kapp/appui.rc new file mode 100644 index 00000000..ceb4f14e --- /dev/null +++ b/languages/cpp/app_templates/kapp/appui.rc @@ -0,0 +1,8 @@ + + + + C&ustom + + + + diff --git a/languages/cpp/app_templates/kapp/appview.cpp b/languages/cpp/app_templates/kapp/appview.cpp new file mode 100644 index 00000000..16c05a3f --- /dev/null +++ b/languages/cpp/app_templates/kapp/appview.cpp @@ -0,0 +1,107 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}view.h" + +#include +#include + +#include + +#include +#include +#include +#include +#include + +%{APPNAME}View::%{APPNAME}View(TQWidget *parent) + : TQWidget(parent), + DCOPObject("%{APPNAME}Iface") +{ + // setup our layout manager to automatically add our widgets + TQHBoxLayout *top_layout = new TQHBoxLayout(this); + top_layout->setAutoAdd(true); + + // we want to look for all components that satisfy our needs. the + // trader will actually search through *all* registered TDE + // applications and components -- not just KParts. So we have to + // specify two things: a service type and a constraint + // + // the service type is like a mime type. we say that we want all + // applications and components that can handle HTML -- 'text/html' + // + // however, by itself, this will return such things as Netscape.. + // not what we wanted. so we constrain it by saying that the + // string 'KParts/ReadOnlyPart' must be found in the ServiceTypes + // field. with this, only components of the type we want will be + // returned. + TDETrader::OfferList offers = TDETrader::self()->query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes"); + + KLibFactory *factory = 0; + // in theory, we only care about the first one.. but let's try all + // offers just in case the first can't be loaded for some reason + TDETrader::OfferList::Iterator it(offers.begin()); + for( ; it != offers.end(); ++it) + { + KService::Ptr ptr = (*it); + + // we now know that our offer can handle HTML and is a part. + // since it is a part, it must also have a library... let's try to + // load that now + factory = KLibLoader::self()->factory( ptr->library() ); + if (factory) + { + m_html = static_cast(factory->create(this, ptr->name(), "KParts::ReadOnlyPart")); + break; + } + } + + // if our factory is invalid, then we never found our component + // and we might as well just exit now + if (!factory) + { + KMessageBox::error(this, i18n("Could not find a suitable HTML component")); + return; + } + + connect(m_html, TQT_SIGNAL(setWindowCaption(const TQString&)), + this, TQT_SLOT(slotSetTitle(const TQString&))); + connect(m_html, TQT_SIGNAL(setStatusBarText(const TQString&)), + this, TQT_SLOT(slotOnURL(const TQString&))); + +} + +%{APPNAME}View::~%{APPNAME}View() +{ +} + +void %{APPNAME}View::print(TQPainter *p, int height, int width) +{ + // do the actual printing, here + // p->drawText(etc..) +} + +TQString %{APPNAME}View::currentURL() +{ + return m_html->url().url(); +} + +void %{APPNAME}View::openURL(TQString url) +{ + openURL(KURL(url)); +} + +void %{APPNAME}View::openURL(const KURL& url) +{ + m_html->openURL(url); +} + +void %{APPNAME}View::slotOnURL(const TQString& url) +{ + emit signalChangeStatusbar(url); +} + +void %{APPNAME}View::slotSetTitle(const TQString& title) +{ + emit signalChangeCaption(title); +} +#include "%{APPNAMELC}view.moc" diff --git a/languages/cpp/app_templates/kapp/appview.h b/languages/cpp/app_templates/kapp/appview.h new file mode 100644 index 00000000..79513a9d --- /dev/null +++ b/languages/cpp/app_templates/kapp/appview.h @@ -0,0 +1,78 @@ +%{H_TEMPLATE} + +#ifndef _%{APPNAMEUC}VIEW_H_ +#define _%{APPNAMEUC}VIEW_H_ + +#include +#include +#include <%{APPNAMELC}iface.h> + +class TQPainter; +class KURL; + +/** + * This is the main view class for %{APPNAME}. Most of the non-menu, + * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go + * here. + * + * This %{APPNAMELC} uses an HTML component as an example. + * + * @short Main view + * @author %{AUTHOR} <%{EMAIL}> + * @version %{VERSION} + */ +class %{APPNAME}View : public TQWidget, public %{APPNAME}Iface +{ + Q_OBJECT + +public: + /** + * Default constructor + */ + %{APPNAME}View(TQWidget *parent); + + /** + * Destructor + */ + virtual ~%{APPNAME}View(); + + /** + * Random 'get' function + */ + TQString currentURL(); + + /** + * Random 'set' function accessed by DCOP + */ + virtual void openURL(TQString url); + + /** + * Random 'set' function + */ + virtual void openURL(const KURL& url); + + /** + * Print this view to any medium -- paper or not + */ + void print(TQPainter *, int height, int width); + +signals: + /** + * Use this signal to change the content of the statusbar + */ + void signalChangeStatusbar(const TQString& text); + + /** + * Use this signal to change the content of the caption + */ + void signalChangeCaption(const TQString& text); + +private slots: + void slotOnURL(const TQString& url); + void slotSetTitle(const TQString& title); + +private: + KParts::ReadOnlyPart *m_html; +}; + +#endif // _%{APPNAMEUC}VIEW_H_ diff --git a/languages/cpp/app_templates/kapp/kapp.kdevtemplate b/languages/cpp/app_templates/kapp/kapp.kdevtemplate new file mode 100644 index 00000000..86675a50 --- /dev/null +++ b/languages/cpp/app_templates/kapp/kapp.kdevtemplate @@ -0,0 +1,253 @@ +# TDE Config File +[General] +Name=Application framework +Name[ca]=Infraestructura d'aplicacions +Name[da]=Programskelet +Name[de]=Anwendungsgrundgerüst +Name[el]=Πλαίσιο εφαρμογής +Name[es]=Infraestructura de aplicación +Name[et]=Rakenduse raamistik +Name[eu]=Aplikazioen lan-markoa +Name[fa]=چارچوب کاربرد +Name[fr]=Infrastructure d'application +Name[ga]=Creatlach feidhmchláir +Name[gl]=Entorno de traballo para aplicación +Name[hu]=Alkalmazás-keretrendszer +Name[it]=Infrastruttura applicativa +Name[ja]=アプリケーションフレームワーク +Name[nds]=Programmrahmenwark +Name[ne]=अनुप्रयोग फ्रेमवर्क +Name[nl]=Applicationframework +Name[pl]=Szablon programu +Name[pt]=Plataforma de aplicações +Name[pt_BR]=Plataforma de aplicações +Name[ru]=Приложение TDE +Name[sk]=Aplikačný framework +Name[sl]=Ogrodje programa +Name[sr]=Радни оквир програма +Name[sr@Latn]=Radni okvir programa +Name[sv]=Programramverk +Name[tr]=Uygulama Çatısı +Name[zh_CN]=应用程序框架 +Name[zh_TW]=應用程式框架 +Icon=kapp.png +Category=C++/TDE +Comment=Generates a simple TDE application with one toplevel window, menus and toolbars. A DCOP interface is also provided, so that your application can provide a scripting interface +Comment[ca]=Genera una simple aplicació per al TDE amb una finestra principal, menús i barres d'eines. També es proveeix la interfície DCOP, de manera que la vostra aplicació podrà proveir d'una interfície per a scripts +Comment[da]=Genererer et simpelt TDE program med et vindue på topniveau, menuer og værktøjslinjer. Der sørges også for en DCOP-grænseflade, så dit program kan sørge for en script-grænseflade +Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. Dazu kommt eine DCOP-Schnittstelle, so dass Ihre Anwendung eine Schnittstelle für Skripte anbieten kann. +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα ανώτερο παράθυρο, μενού και γραμμές εργαλείων. Μια διασύνδεση DCOP προσφέρεται επίσης, έτσι ώστε η εφαρμογή σας να προσφέρει ένα περιβάλλον γραφής σεναρίων +Comment[es]=Genera una sencilla aplicación de TDE con una ventana de nivel superior, menús y barras de herramientas. También se proporciona una interfaz DCOP para que su aplicación pueda proporcionar una interfaz para guiones de órdenes. +Comment[et]=Lihtsa TDE rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. Lisatakse ka DCOP-liides, mis võimaldab pakkuda rakenduses ka skriptikeelte tuge. +Comment[eu]=TDE aplikazio sinple bat sortzen du menu eta tresna-barradun goi-mailako lehio batekin. DCOP interfaze bat ere eskeintzen zaio aplikazioari, zure aplikazioak script interfaze bat izan dezan +Comment[fa]=یک کاربرد سادۀ TDE با یک پنجرۀ سطح بالا، گزینگان و میله ابزارها تولید می‌کند. همچنین یک واسط DCOP فراهم است. بنابراین، کاربرد شما یک واسط دست‌نوشته‌ای را می‌تواند فراهم کند +Comment[fr]=Génère une application TDE simple comprenant une fenêtre de premier niveau, des menus et des barres d'outils. Une interface DCOP est également prévue, afin que votre application puisse offrir une interface de scriptage +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le príomhfhuinneog amháin, roghchláir agus barraí uirlisí. Soláthraítear comhéadan DCOP freisin, d'fhonn is féidir comhéadan scriptithe a chur ar fáil +Comment[gl]=Xera unha aplicación TDE sinxela cunha xanela principal, menús e barras de ferramentas. Tamén se proporciona unha interface DCOP de modo que a súa aplicación poida proveer unha interface de scripting. +Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy főablakkal, menükkel és eszköztárakkal. DCOP-felület is létre lesz hozva, ezért az alkalmazás szkriptelési felületet is biztosíthat. +Comment[it]=Genera una semplice applicazione TDE con una finestra toplevel, menu e barre degli strumenti. È anche fornita un'interfaccia DCOP così l'applicazione avrà un'interfaccia per lo scripting +Comment[ja]=簡単な TDE アプリケーションを作成します。アプリケーションには、トップレベルのウィンドウ、メニュー、ツールバーがあります。スクリプト化をサポートするために DCOP のインターフェースも用意してあります。 +Comment[nds]=Stellt en eenfach TDE-Programm mit een böverst Finster, Menüs un Warktüüchbalkens op. Ok warrt noch en DCOP-Koppelsteed praatstellt, so dat Dien Programm en Skriptkoppelsteed anbeden kann +Comment[ne]=एउटा उच्चतह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । DCOP पनि प्रदान गरिन्छ, जसले गर्दा तपाईँको अनुप्रयोगले स्क्रिप्टिङ इन्टरफेस प्रदान गर्न सक्दछ +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één toplevel window, menu's en toolbars. Er wordt ook een DCOP-interface aangeleverd, zodat uw toepassing een scripting interface kan aanleveren. +Comment[pl]=Generuje prosty program dla TDE z oknem, menu i paskami narzędzi. Dostępny jest także interfejs DCOP, więc Twoje programy mogą zawierać interfejs do skryptów +Comment[pt]=Gera uma aplicação simples do TDE com uma janela de topo, menus e barras de ferramentas. Também é oferecida uma interface de DCOP, para que a sua aplicação possa fornecer uma interface de programação +Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela de topo, menus e barras de ferramentas. Também é oferecida uma interface de DCOP, para que a sua aplicação possa fornecer uma interface de programação +Comment[ru]=Создание простого приложения TDE с окном, меню и панелями инструментов. Кроме того, в нём содержится интерфейс DCOP для автоматизации работы с помощью пользовательских скриптов +Comment[sk]=Vygenruje jednoduchú TDE aplikáciu s jedným oknom, menu apanelom nástrojov. Taktiež bude poskytnuté DCOP rozhranie, takže aj aplikáciamôže poskytnúť skriptovacie rozhranie +Comment[sr]=Прави једноставан TDE програм, са једним прозором највишег нивоа, менијима и тракама са алатом. Дат је и DCOP интерфејс, тако да ваш програм може да омогући скриптовање +Comment[sr@Latn]=Pravi jednostavan TDE program, sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. Dat je i DCOP interfejs, tako da vaš program može da omogući skriptovanje +Comment[sv]=Skapar ett enkelt TDE-program med ett toppnivåfönster, menyer och verktygsrader. Ett DCOP-gränssnitt tillhandahålls också, så att programmet kan tillhandahålla ett skriptgränssnitt. +Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir TDE uygulaması yaratır. Bir DCOP arayüzü sağlanır, böylece uygulama bir betik arayüzü sağlayabilir. +Comment[zh_CN]=生成一个带一个顶层窗口、菜单和工具栏的简单 TDE 应用程序。另外还提供了 DCOP 接口,这样您的应用也可同时提供脚本接口。 +Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含頂層視窗、選單與工具列。另外提供一個 DCOP 介面,讓您的應用程式可以提供文稿介面。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}view.cpp,%{dest}/src/README +Archive=kapp.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE17] +Type=install +Source=%{src}/appview.cpp +Dest=%{dest}/src/%{APPNAMELC}view.cpp + +[FILE18] +Type=install +Source=%{src}/appview.h +Dest=%{dest}/src/%{APPNAMELC}view.h + +[FILE19] +Type=install +Source=%{src}/appiface.h +Dest=%{dest}/src/%{APPNAMELC}iface.h + +[FILE20] +Type=install +Source=%{src}/app_client.cpp +Dest=%{dest}/src/%{APPNAMELC}_client.cpp + +[FILE21] +Type=install +Source=%{src}/pref.cpp +Dest=%{dest}/src/pref.cpp + +[FILE22] +Type=install +Source=%{src}/pref.h +Dest=%{dest}/src/pref.h + +[FILE23] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE24] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE25] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[MSG] +Type=message +Comment=A TDE Application was created at %{dest} +Comment[ca]=Una aplicació per al TDE ha estat creada a %{dest} +Comment[da]=Et TDE program blev oprettet i %{dest} +Comment[de]=Eine TDE-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή TDE δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación de TDE ha sido creada en %{dest} +Comment[et]=TDE rakendus loodi asukohta %{dest} +Comment[eu]=A TDE aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد TDE در %{dest} فراهم شد +Comment[fr]=Une application TDE a été créée dans %{dest} +Comment[ga]=Cruthaíodh Feidhmchlár TDE ag %{dest} +Comment[gl]=Creouse unha aplicación TDE en %{dest} +Comment[hu]=Létrejött egy TDE-s alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDE in %{dest} +Comment[ja]=TDE アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDE-Programm opstellt +Comment[ne]=TDE अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDE-toepassing is aangemaakt in %{dest} +Comment[pl]=Program dla TDE został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDE em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDE em %{dest} +Comment[ru]=Приложение TDE создано в %{dest} +Comment[sk]=TDE aplikácia bola vytvorená v %{dest} +Comment[sl]=Program za TDE je bil ustvarjen v %{dest} +Comment[sr]=TDE програм је направљен у %{dest} +Comment[sr@Latn]=TDE program je napravljen u %{dest} +Comment[sv]=Ett TDE-program skapades i %{dest} +Comment[tr]=Bir TDE Uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 TDE 应用程序 +Comment[zh_TW]=一個 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kapp/kapp.png b/languages/cpp/app_templates/kapp/kapp.png new file mode 100644 index 00000000..a421a664 Binary files /dev/null and b/languages/cpp/app_templates/kapp/kapp.png differ diff --git a/languages/cpp/app_templates/kapp/main.cpp b/languages/cpp/app_templates/kapp/main.cpp new file mode 100644 index 00000000..8c2cc07f --- /dev/null +++ b/languages/cpp/app_templates/kapp/main.cpp @@ -0,0 +1,61 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" +#include +#include +#include +#include +#include + +static const char description[] = + I18N_NOOP("A TDE Application"); + +static const char version[] = "%{VERSION}"; + +static TDECmdLineOptions options[] = +{ + { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, + TDECmdLineLastOption +}; + +int main(int argc, char **argv) +{ + TDEAboutData about("%{APPNAMELC}", I18N_NOOP("%{APPNAME}"), version, description, + TDEAboutData::License_%{LICENSE}, "(C) %{YEAR} %{AUTHOR}", 0, 0, "%{EMAIL}"); + about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" ); + TDECmdLineArgs::init(argc, argv, &about); + TDECmdLineArgs::addCmdLineOptions(options); + TDEApplication app; + + // register ourselves as a dcop client + app.dcopClient()->registerAs(app.name(), false); + + // see if we are starting with session management + if (app.isRestored()) + { + RESTORE(%{APPNAME}); + } + else + { + // no session.. just start up normally + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + if (args->count() == 0) + { + %{APPNAME} *widget = new %{APPNAME}; + widget->show(); + } + else + { + int i = 0; + for (; i < args->count(); i++) + { + %{APPNAME} *widget = new %{APPNAME}; + widget->show(); + widget->load(args->url(i)); + } + } + args->clear(); + } + + return app.exec(); +} diff --git a/languages/cpp/app_templates/kapp/pref.cpp b/languages/cpp/app_templates/kapp/pref.cpp new file mode 100644 index 00000000..669f591c --- /dev/null +++ b/languages/cpp/app_templates/kapp/pref.cpp @@ -0,0 +1,42 @@ +%{CPP_TEMPLATE} + +#include "pref.h" + +#include + +#include +#include + +%{APPNAME}Preferences::%{APPNAME}Preferences() + : KDialogBase(TreeList, i18n("%{APPNAME} Preferences"), + Help|Default|Ok|Apply|Cancel, Ok) +{ + // this is the base class for your preferences dialog. it is now + // a Treelist dialog.. but there are a number of other + // possibilities (including Tab, Swallow, and just Plain) + TQFrame *frame; + frame = addPage(i18n("First Page"), i18n("Page One Options")); + m_pageOne = new %{APPNAME}PrefPageOne(frame); + + frame = addPage(i18n("Second Page"), i18n("Page Two Options")); + m_pageTwo = new %{APPNAME}PrefPageTwo(frame); +} + +%{APPNAME}PrefPageOne::%{APPNAME}PrefPageOne(TQWidget *parent) + : TQFrame(parent) +{ + TQHBoxLayout *layout = new TQHBoxLayout(this); + layout->setAutoAdd(true); + + new TQLabel(i18n("Add something here"), this); +} + +%{APPNAME}PrefPageTwo::%{APPNAME}PrefPageTwo(TQWidget *parent) + : TQFrame(parent) +{ + TQHBoxLayout *layout = new TQHBoxLayout(this); + layout->setAutoAdd(true); + + new TQLabel(i18n("Add something here"), this); +} +#include "pref.moc" diff --git a/languages/cpp/app_templates/kapp/pref.h b/languages/cpp/app_templates/kapp/pref.h new file mode 100644 index 00000000..b2aae436 --- /dev/null +++ b/languages/cpp/app_templates/kapp/pref.h @@ -0,0 +1,40 @@ +%{H_TEMPLATE} + +#ifndef _%{APPNAMEUC}PREF_H_ +#define _%{APPNAMEUC}PREF_H_ + +#include +#include + +class %{APPNAME}PrefPageOne; +class %{APPNAME}PrefPageTwo; + +class %{APPNAME}Preferences : public KDialogBase +{ + Q_OBJECT + +public: + %{APPNAME}Preferences(); + +private: + %{APPNAME}PrefPageOne *m_pageOne; + %{APPNAME}PrefPageTwo *m_pageTwo; +}; + +class %{APPNAME}PrefPageOne : public TQFrame +{ + Q_OBJECT + +public: + %{APPNAME}PrefPageOne(TQWidget *parent = 0); +}; + +class %{APPNAME}PrefPageTwo : public TQFrame +{ + Q_OBJECT + +public: + %{APPNAME}PrefPageTwo(TQWidget *parent = 0); +}; + +#endif // _%{APPNAMEUC}PREF_H_ diff --git a/languages/cpp/app_templates/kapp/src-Makefile.am b/languages/cpp/app_templates/kapp/src-Makefile.am new file mode 100644 index 00000000..8125665b --- /dev/null +++ b/languages/cpp/app_templates/kapp/src-Makefile.am @@ -0,0 +1,43 @@ +## Makefile.am for %{APPNAMELC} + +# this is the program that gets installed. it's name is used for all +# of the other Makefile.am variables +bin_PROGRAMS = %{APPNAMELC} %{APPNAMELC}_client + +# set the include path for X, qt and TDE +INCLUDES = $(all_includes) + +# the library search path. +%{APPNAMELC}_LDFLAGS = $(KDE_RPATH) $(all_libraries) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) $(LIB_TDEIO) + +# the libraries to link against. +%{APPNAMELC}_LDADD = $(LIB_TDEFILE) $(LIB_TDEPRINT) + +# which sources should be compiled for %{APPNAMELC} +%{APPNAMELC}_SOURCES = main.cpp %{APPNAMELC}.cpp %{APPNAMELC}view.cpp \ + pref.cpp %{APPNAMELC}iface.skel + +# these are the headers for your project +noinst_HEADERS = %{APPNAMELC}.h %{APPNAMELC}view.h pref.h + +# client stuff +%{APPNAMELC}_client_LDFLAGS = $(KDE_RPATH) $(all_libraries) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) $(LIB_TDEIO) +%{APPNAMELC}_client_LDADD = $(LIB_TDECORE) +%{APPNAMELC}_client_SOURCES = %{APPNAMELC}_client.cpp + +# let automoc handle all of the meta source files ((moc)) +METASOURCES = AUTO + +messages: rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot + +KDE_ICON = AUTO + +# this is where the kdelnk file will go +kdelnkdir = $(kde_appsdir)/Utilities +kdelnk_DATA = %{APPNAMELC}.desktop + +# this is where the XML-GUI resource file goes +rcdir = $(kde_datadir)/%{APPNAMELC} +rc_DATA = %{APPNAMELC}ui.rc diff --git a/languages/cpp/app_templates/kapp/subdirs b/languages/cpp/app_templates/kapp/subdirs new file mode 100644 index 00000000..0e678106 --- /dev/null +++ b/languages/cpp/app_templates/kapp/subdirs @@ -0,0 +1,3 @@ +doc +po +src diff --git a/languages/cpp/app_templates/kateplugin/CMakeLists.txt b/languages/cpp/app_templates/kateplugin/CMakeLists.txt index 2361b5e9..354218ad 100644 --- a/languages/cpp/app_templates/kateplugin/CMakeLists.txt +++ b/languages/cpp/app_templates/kateplugin/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( kateplugin.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kateplugin.tar.gz kateplugin.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kateplugin.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kateplugin.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kateplugin/Makefile.am b/languages/cpp/app_templates/kateplugin/Makefile.am index 75b44829..81c1a586 100644 --- a/languages/cpp/app_templates/kateplugin/Makefile.am +++ b/languages/cpp/app_templates/kateplugin/Makefile.am @@ -5,10 +5,10 @@ dataFiles = src-Makefile.am plugin_app.cpp plugin_app.h\ plugin.tdevelop subdirs plugin.desktop ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kateplugin/kateplugin.kdevtemplate b/languages/cpp/app_templates/kateplugin/kateplugin.kdevtemplate new file mode 100644 index 00000000..3c308223 --- /dev/null +++ b/languages/cpp/app_templates/kateplugin/kateplugin.kdevtemplate @@ -0,0 +1,213 @@ +# TDE Config File +[General] +Name=Kate plugin +Name[br]=Lugent Kate +Name[ca]=Connector per a Kate +Name[de]=Kate-Modul +Name[el]=Πρόσθετο Kate +Name[es]=Complemento para Kate +Name[eu]=Kate plugina +Name[fa]=وصلۀ Kate +Name[fr]=Module externe pour Kate +Name[ga]=Breiseán Kate +Name[gl]=Extensión para Kate +Name[hu]=Kate-bővítőmodul +Name[it]=Plugin per Kate +Name[ja]=Kate プラグイン +Name[nds]=Kate-Moduul +Name[ne]=केट प्लगइन +Name[nl]=Kate-plugin +Name[pl]=Wtyczka do Kate +Name[pt]='Plugin' do Kate +Name[pt_BR]='Plugin' do Kate +Name[ru]=Модуль Kate +Name[sk]=Kate modul +Name[sl]=Vstavek za Kate +Name[sr]=Прикључак за Kate +Name[sr@Latn]=Priključak za Kate +Name[sv]=Kate-insticksprogram +Name[tr]=Kate eklentisi +Name[zh_CN]=Kate 插件 +Name[zh_TW]=Kate 外掛程式 +Icon=kateplugin.png +Category=C++/TDE +Comment=Generates a plugin for Kate the text editor. +Comment[ca]=Genera un connector per a l'editor de text Kate. +Comment[da]=Genererer et plugin for teksteditoren kate +Comment[de]=Erstellt ein Modul für den Texteditor Kate +Comment[el]=Δημιουργεί ένα πρόσθετο για το Kate τον επεξεργαστή κειμένου. +Comment[es]=Genera un complemento para el editor de texto Kate. +Comment[et]=Plugina loomine tekstiredaktorile Kate. +Comment[eu]=Plugin bat sortzen du Kate testu-editorearentzat. +Comment[fa]=وصله‌ای برای ویرایشگر متن Kate تولید می‌کند. +Comment[fr]=Génère un module externe pour l'éditeur de texte Kate. +Comment[ga]=Cruthaíonn sé seo breiseán le haghaidh eagarthóir téacs Kate. +Comment[gl]=Xera unha extensión para o editor de textos Kate. +Comment[hu]=Létrehoz egy bővítőmodult a Kate szövegszerkesztőhöz. +Comment[it]=Genera un plugin per l'editor di testo Kate. +Comment[ja]=Kate テキストエディタのためのプラグインを作成します +Comment[nds]=Stellt en Moduul för den Texteditor "Kate" op. +Comment[ne]=केट पाठ सम्पादकका लागि प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Genereert een plugin voor de Kate-teksteditor +Comment[pl]=Generuje wtyczkę do edytora tekstu Kate +Comment[pt]=Gera um 'plugin' para o Kate, o editor de texto. +Comment[pt_BR]=Gera um 'plugin' para o Kate, o editor de texto. +Comment[ru]=Создание модуля для текстового редактора Kate. +Comment[sk]=Vygeneruje modul pre textový editor Kate. +Comment[sl]=Ustvari vstavek za urejevalnik besedil Kate. +Comment[sr]=Прави прикључак за уређивач текста Kate. +Comment[sr@Latn]=Pravi priključak za uređivač teksta Kate. +Comment[sv]=Skapar ett insticksprogram för texteditorn Kate. +Comment[tr]=Kate metin düzenleyicisi için bir eklenti yaratır. +Comment[zh_CN]=生成 Kate 文本编辑器的插件。 +Comment[zh_TW]=產生一個 Kate 文字編輯器的外掛程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp +Archive=kateplugin.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/plugin.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE13] +Type=install +Source=%{src}/plugin_app.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp + +[FILE14] +Type=install +Source=%{src}/plugin_app.h +Dest=%{dest}/src/plugin_%{APPNAMELC}.h + +[FILE15] +Type=install +EscapeXML=true +Source=%{src}/plugin_app.rc +Dest=%{dest}/src/plugin_%{APPNAMELC}.rc + +[FILE16] +Type=install +Source=%{src}/hi16-action-plugin.png +Dest=%{dest}/src/hi16-action-plugin.png +Process=false + +[FILE17] +Type=install +Source=%{src}/hi22-action-plugin.png +Dest=%{dest}/src/hi32-action-plugin.png +Process=false + +[MSG] +Type=message +Comment=A plugin for Kate was created at %{dest} +Comment[ca]=Un connector per a Kate ha estat creat a %{dest} +Comment[da]=Et plugin for Kate blev oprettet på %{dest} +Comment[de]=Ein Modul für Kate wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο για το Kate δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para Kate ha sido creado en %{dest} +Comment[et]=Kate plugin loodi asukohta %{dest} +Comment[eu]=Kate plugin bat sortu da hemen: %{dest} +Comment[fa]=وصله‌ای برای Kate در %{dest} ایجاد شد +Comment[fr]=Un module externe pour Kate a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán Kate ag %{dest} +Comment[gl]=Creouse unha extensión para Kate en %{dest} +Comment[hu]=Létrejött egy Kate-bővítőmodul itt: %{dest} +Comment[it]=È stato creato un plugin per Kate in %{dest} +Comment[ja]=Kate のプラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Moduul för "Kate" opstellt +Comment[ne]=केटका लागि प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een plugin voor Kate is aangemaakt in %{dest} +Comment[pl]=Wtyczka dla Kate została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' para o Kate em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' para o Kate em %{dest} +Comment[ru]=Модуль Kate создан в %{dest} +Comment[sk]=Modul pre Kate bol vytvorený v %{dest} +Comment[sl]=Vstavek za Kate je bil ustvarjen v %{dest} +Comment[sr]=Прикључак за Kate направљен је у %{dest} +Comment[sr@Latn]=Priključak za Kate napravljen je u %{dest} +Comment[sv]=Ett insticksprogram för Kate skapades i %{dest} +Comment[tr]=Kate için bir eklenti %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 Kate 的插件 +Comment[zh_TW]=一個 Kate 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kateplugin/kateplugin.tdevtemplate b/languages/cpp/app_templates/kateplugin/kateplugin.tdevtemplate deleted file mode 100644 index a3dc2dc8..00000000 --- a/languages/cpp/app_templates/kateplugin/kateplugin.tdevtemplate +++ /dev/null @@ -1,213 +0,0 @@ -# TDE Config File -[General] -Name=Kate plugin -Name[br]=Lugent Kate -Name[ca]=Connector per a Kate -Name[de]=Kate-Modul -Name[el]=Πρόσθετο Kate -Name[es]=Complemento para Kate -Name[eu]=Kate plugina -Name[fa]=وصلۀ Kate -Name[fr]=Module externe pour Kate -Name[ga]=Breiseán Kate -Name[gl]=Extensión para Kate -Name[hu]=Kate-bővítőmodul -Name[it]=Plugin per Kate -Name[ja]=Kate プラグイン -Name[nds]=Kate-Moduul -Name[ne]=केट प्लगइन -Name[nl]=Kate-plugin -Name[pl]=Wtyczka do Kate -Name[pt]='Plugin' do Kate -Name[pt_BR]='Plugin' do Kate -Name[ru]=Модуль Kate -Name[sk]=Kate modul -Name[sl]=Vstavek za Kate -Name[sr]=Прикључак за Kate -Name[sr@Latn]=Priključak za Kate -Name[sv]=Kate-insticksprogram -Name[tr]=Kate eklentisi -Name[zh_CN]=Kate 插件 -Name[zh_TW]=Kate 外掛程式 -Icon=kateplugin.png -Category=C++/TDE -Comment=Generates a plugin for Kate the text editor. -Comment[ca]=Genera un connector per a l'editor de text Kate. -Comment[da]=Genererer et plugin for teksteditoren kate -Comment[de]=Erstellt ein Modul für den Texteditor Kate -Comment[el]=Δημιουργεί ένα πρόσθετο για το Kate τον επεξεργαστή κειμένου. -Comment[es]=Genera un complemento para el editor de texto Kate. -Comment[et]=Plugina loomine tekstiredaktorile Kate. -Comment[eu]=Plugin bat sortzen du Kate testu-editorearentzat. -Comment[fa]=وصله‌ای برای ویرایشگر متن Kate تولید می‌کند. -Comment[fr]=Génère un module externe pour l'éditeur de texte Kate. -Comment[ga]=Cruthaíonn sé seo breiseán le haghaidh eagarthóir téacs Kate. -Comment[gl]=Xera unha extensión para o editor de textos Kate. -Comment[hu]=Létrehoz egy bővítőmodult a Kate szövegszerkesztőhöz. -Comment[it]=Genera un plugin per l'editor di testo Kate. -Comment[ja]=Kate テキストエディタのためのプラグインを作成します -Comment[nds]=Stellt en Moduul för den Texteditor "Kate" op. -Comment[ne]=केट पाठ सम्पादकका लागि प्लगइन उत्पन्न गर्दछ । -Comment[nl]=Genereert een plugin voor de Kate-teksteditor -Comment[pl]=Generuje wtyczkę do edytora tekstu Kate -Comment[pt]=Gera um 'plugin' para o Kate, o editor de texto. -Comment[pt_BR]=Gera um 'plugin' para o Kate, o editor de texto. -Comment[ru]=Создание модуля для текстового редактора Kate. -Comment[sk]=Vygeneruje modul pre textový editor Kate. -Comment[sl]=Ustvari vstavek za urejevalnik besedil Kate. -Comment[sr]=Прави прикључак за уређивач текста Kate. -Comment[sr@Latn]=Pravi priključak za uređivač teksta Kate. -Comment[sv]=Skapar ett insticksprogram för texteditorn Kate. -Comment[tr]=Kate metin düzenleyicisi için bir eklenti yaratır. -Comment[zh_CN]=生成 Kate 文本编辑器的插件。 -Comment[zh_TW]=產生一個 Kate 文字編輯器的外掛程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp -Archive=kateplugin.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/plugin.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE13] -Type=install -Source=%{src}/plugin_app.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp - -[FILE14] -Type=install -Source=%{src}/plugin_app.h -Dest=%{dest}/src/plugin_%{APPNAMELC}.h - -[FILE15] -Type=install -EscapeXML=true -Source=%{src}/plugin_app.rc -Dest=%{dest}/src/plugin_%{APPNAMELC}.rc - -[FILE16] -Type=install -Source=%{src}/hi16-action-plugin.png -Dest=%{dest}/src/hi16-action-plugin.png -Process=false - -[FILE17] -Type=install -Source=%{src}/hi22-action-plugin.png -Dest=%{dest}/src/hi32-action-plugin.png -Process=false - -[MSG] -Type=message -Comment=A plugin for Kate was created at %{dest} -Comment[ca]=Un connector per a Kate ha estat creat a %{dest} -Comment[da]=Et plugin for Kate blev oprettet på %{dest} -Comment[de]=Ein Modul für Kate wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο για το Kate δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para Kate ha sido creado en %{dest} -Comment[et]=Kate plugin loodi asukohta %{dest} -Comment[eu]=Kate plugin bat sortu da hemen: %{dest} -Comment[fa]=وصله‌ای برای Kate در %{dest} ایجاد شد -Comment[fr]=Un module externe pour Kate a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán Kate ag %{dest} -Comment[gl]=Creouse unha extensión para Kate en %{dest} -Comment[hu]=Létrejött egy Kate-bővítőmodul itt: %{dest} -Comment[it]=È stato creato un plugin per Kate in %{dest} -Comment[ja]=Kate のプラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Moduul för "Kate" opstellt -Comment[ne]=केटका लागि प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een plugin voor Kate is aangemaakt in %{dest} -Comment[pl]=Wtyczka dla Kate została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' para o Kate em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' para o Kate em %{dest} -Comment[ru]=Модуль Kate создан в %{dest} -Comment[sk]=Modul pre Kate bol vytvorený v %{dest} -Comment[sl]=Vstavek za Kate je bil ustvarjen v %{dest} -Comment[sr]=Прикључак за Kate направљен је у %{dest} -Comment[sr@Latn]=Priključak za Kate napravljen je u %{dest} -Comment[sv]=Ett insticksprogram för Kate skapades i %{dest} -Comment[tr]=Kate için bir eklenti %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 Kate 的插件 -Comment[zh_TW]=一個 Kate 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kateplugin/plugin.tdevelop b/languages/cpp/app_templates/kateplugin/plugin.tdevelop index c96d48cc..799ac6d5 100644 --- a/languages/cpp/app_templates/kateplugin/plugin.tdevelop +++ b/languages/cpp/app_templates/kateplugin/plugin.tdevelop @@ -13,15 +13,15 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - - + + src/lib%{APPNAMELC}plugin.la debug @@ -43,8 +43,8 @@ -O0 -g3 - - + + @@ -52,8 +52,8 @@ - - + + ada ada_bugs_gcc @@ -90,24 +90,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kateplugin2/CMakeLists.txt b/languages/cpp/app_templates/kateplugin2/CMakeLists.txt index 1546b2b7..c4a47fba 100644 --- a/languages/cpp/app_templates/kateplugin2/CMakeLists.txt +++ b/languages/cpp/app_templates/kateplugin2/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( kateplugin2.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kateplugin2.tar.gz kateplugin2.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kateplugin2.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kateplugin2.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kateplugin2/Makefile.am b/languages/cpp/app_templates/kateplugin2/Makefile.am index 99969725..b12a6477 100644 --- a/languages/cpp/app_templates/kateplugin2/Makefile.am +++ b/languages/cpp/app_templates/kateplugin2/Makefile.am @@ -5,10 +5,10 @@ dataFiles = src-Makefile.am plugin_app.cpp plugin_app.h \ templateName = kateplugin2 ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kateplugin2/kateplugin2.kdevtemplate b/languages/cpp/app_templates/kateplugin2/kateplugin2.kdevtemplate new file mode 100644 index 00000000..3da42f23 --- /dev/null +++ b/languages/cpp/app_templates/kateplugin2/kateplugin2.kdevtemplate @@ -0,0 +1,214 @@ +# TDE Config File +[General] +Name=Kate plugin with config page +Name[ca]=Connector per a Kate amb pàgina de configuració +Name[da]=Kate plugin med indstillingsside +Name[de]=Kate-Modul mit Einstellungsseite +Name[el]=Πρόσθετο Kate με σελίδα ρύθμισης +Name[es]=Complemento para Kate con página de configuración +Name[et]=Kate plugin seadistustedialoogiga +Name[eu]=Konfigurazio orridun Kate plugina +Name[fa]=وصلۀ Kate با صفحۀ پیکربندی +Name[fr]=Module externe pour Kate comprenant une page de configuration +Name[ga]=Breiseán Kate le leathanach cumraíochta +Name[gl]=Extensión para Kate con páxina de configuración +Name[hu]=Kate-bővítőmodul beállítólappal +Name[it]=Plugin per Kate con pagina di configurazione +Name[ja]=設定ページのある Kate プラグイン +Name[nds]=Kate-Moduul mit Instellensiet +Name[ne]=कन्फिग पृष्ठसँग केट प्लगइन +Name[nl]=Kate-plugin met config page +Name[pl]=Wtyczka do Kate ze stroną konfiguracyjną +Name[pt]='Plugin' do Kate com página de configuração +Name[pt_BR]='Plugin' do Kate com página de configuração +Name[ru]=Модуль Kate с диалогом настройки +Name[sk]=Kate modul s konfiguračnou stránkou +Name[sl]=Vstavek z nastavitveno stranjo za Kate +Name[sr]=Прикључак за Kate са страном за подешавања +Name[sr@Latn]=Priključak za Kate sa stranom za podešavanja +Name[sv]=Kate-insticksprogram med inställningssida +Name[tr]=Ayar sayfası olan bir Kate eklentisi +Name[zh_CN]=带配置页的 Kate 插件 +Name[zh_TW]=Kate 外掛程式,內含設定頁面 +Icon=kateplugin2.png +Category=C++/TDE +Comment=Generates a plugin with config page for Kate the text editor. +Comment[ca]=Genera un connector amb pàgina de configuració per a l'editor de text Kate. +Comment[da]=Generere et plugin med indstillingsside for teksteditoren Kate. +Comment[de]=Erstellt ein Modul mit Konfigurationsseite für den Texteditor Kate. +Comment[el]=Δημιουργεί ένα πρόσθετο με σελίδα ρύθμισης για το Kate τον επεξεργαστή κειμένου. +Comment[es]=Genera un complemento con página de configuración para el editor de texto Kate. +Comment[et]=Seadistustedialoogiga plugina loomine tekstiredaktorile Kate. +Comment[eu]=Konfigurazio orridun Kate plugin bat sortzen du. +Comment[fa]=وصله‌ای با صفحۀ پیکربندی ویرایشگر متن Kate تولید می‌کند. +Comment[fr]=Génère un module externe comprenant une page de configuration pour l'éditeur de texte Kate. +Comment[ga]=Cruthaíodh breiseán le leathanach cumraíochta le haghaidh eagarthóra téacs Kate. +Comment[gl]=Xera unha extensión con páxina de configuración para o editor de textos Kate. +Comment[hu]=Létrehoz egy bővítőmodult beállítólappal a Kate szövegszerkesztőhöz. +Comment[it]=Genera un plugin con pagina di configurazione per l'editor di testo Kate. +Comment[ja]=テキストエディタ Kate のための設定ページのあるプラグインを作成します。 +Comment[nds]=Stellt en Moduul mit Instellensiet för den Texteditor "Kate" op. +Comment[ne]=केट पाठ सम्पादकका लागि कन्फिग पृष्ठसँग प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Genereert een plugin met een config page voor de Kate-teksteditor +Comment[pl]=Generuje wtyczke wraz ze stroną konfiguracyjną do edytora tekstu Kate. +Comment[pt]=Gera um 'plugin' com uma página de configuração para o Kate, o editor de texto. +Comment[pt_BR]=Gera um 'plugin' com uma página de configuração para o Kate, o editor de texto. +Comment[ru]=Создание модуля для текстового редактора Kate с диалогом настройки. +Comment[sk]=Vygeneruje modul s konfiguračnou stránkou pre textový editor Kate. +Comment[sl]=Ustvari vstavek z nastavitveno stranjo za urejevalnik besedil Kate. +Comment[sr]=Прави прикључак са страном за подешавање за уређивач текста Kate. +Comment[sr@Latn]=Pravi priključak sa stranom za podešavanje za uređivač teksta Kate. +Comment[sv]=Skapar ett insticksprogram för texteditorn Kate med en inställningssida. +Comment[tr]=Kate metin düzenleyicisi için ayar sayfası olan bir eklenti yaratır. +Comment[zh_CN]=生成带配置页的 Kate 文本编辑器插件。 +Comment[zh_TW]=產生一個 Kate 文字編輯器的外掛程式,內含設定頁面。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp +Archive=kateplugin2.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/plugin.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE13] +Type=install +Source=%{src}/plugin_app.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp + +[FILE14] +Type=install +Source=%{src}/plugin_app.h +Dest=%{dest}/src/plugin_%{APPNAMELC}.h + +[FILE15] +Type=install +EscapeXML=true +Source=%{src}/plugin_app.rc +Dest=%{dest}/src/plugin_%{APPNAMELC}.rc + +[FILE16] +Type=install +Source=%{src}/hi16-action-plugin.png +Dest=%{dest}/src/hi16-action-plugin.png +Process=false + +[FILE17] +Type=install +Source=%{src}/hi22-action-plugin.png +Dest=%{dest}/src/hi32-action-plugin.png +Process=false + +[MSG] +Type=message +Comment=A plugin for Kate with a config page was created in %{dest} +Comment[ca]=Un connector per a Kate amb pàgina de configuració ha estat creat en %{dest} +Comment[da]=Et plugin for Kate med en indstillingsside blev oprettet i %{dest} +Comment[de]=Ein Modul für Kate mit Konfigurationsseite wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο για το Kate με μια σελίδα ρύθμισης δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para Kate con una página de configuración ha sido creado en %{dest} +Comment[et]=Seadistustedialoogiga Kate plugin loodi asukohta %{dest} +Comment[eu]=Konfigurazio orridun Kate plugin bat sortu da hemen:%{dest} +Comment[fa]=وصله‌ای برای Kate با یک صفحۀ پیکربندی در %{dest} ایجاد شد +Comment[fr]=Un module externe pour Kate comprenant une page de configuration a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán Kate le leathanach cumraíochta i %{dest} +Comment[gl]=Creouse unha extensión para Kate con páxina de configuración en %{dest} +Comment[hu]=Létrejött egy Kate-bővítőmodul (beállítólappal) itt: %{dest} +Comment[it]=È stato creato un plugin per Kate con pagina di configurazione in %{dest} +Comment[ja]=設定ページのある Kate プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Moduul för Kate mit Instellensiet opstellt +Comment[ne]=कन्फिग पृष्ठसँग केटका लागि प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een plugin voor Kate met een config page is aangemaakt in %{dest} +Comment[pl]=Wtyczka do Kate wraz ze stroną konfiguracyjną została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' para o Kate, com uma página de configuração, em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' para o Kate, com uma página de configuração, em %{dest} +Comment[ru]=Модуль Kate с диалогом настройки создан в %{dest} +Comment[sk]=Modul pre Kate s konfiguračnou stránkou bol vytvorený v %{dest} +Comment[sl]=Vstavek z nastavitveno stranjo za Kate je bil ustvarjen v %{dest} +Comment[sr]=Прикључак за Kate са страном за подешавања направљен је у %{dest} +Comment[sr@Latn]=Priključak za Kate sa stranom za podešavanja napravljen je u %{dest} +Comment[sv]=Ett insticksprogram för Kate med en inställningssida skapades i %{dest} +Comment[tr]=Kate için ayar sayfası olan bir eklenti %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个带配置页的 Kate 插件 +Comment[zh_TW]=一個內含設定頁面的 Kate 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kateplugin2/kateplugin2.tdevtemplate b/languages/cpp/app_templates/kateplugin2/kateplugin2.tdevtemplate deleted file mode 100644 index 236c6a9a..00000000 --- a/languages/cpp/app_templates/kateplugin2/kateplugin2.tdevtemplate +++ /dev/null @@ -1,214 +0,0 @@ -# TDE Config File -[General] -Name=Kate plugin with config page -Name[ca]=Connector per a Kate amb pàgina de configuració -Name[da]=Kate plugin med indstillingsside -Name[de]=Kate-Modul mit Einstellungsseite -Name[el]=Πρόσθετο Kate με σελίδα ρύθμισης -Name[es]=Complemento para Kate con página de configuración -Name[et]=Kate plugin seadistustedialoogiga -Name[eu]=Konfigurazio orridun Kate plugina -Name[fa]=وصلۀ Kate با صفحۀ پیکربندی -Name[fr]=Module externe pour Kate comprenant une page de configuration -Name[ga]=Breiseán Kate le leathanach cumraíochta -Name[gl]=Extensión para Kate con páxina de configuración -Name[hu]=Kate-bővítőmodul beállítólappal -Name[it]=Plugin per Kate con pagina di configurazione -Name[ja]=設定ページのある Kate プラグイン -Name[nds]=Kate-Moduul mit Instellensiet -Name[ne]=कन्फिग पृष्ठसँग केट प्लगइन -Name[nl]=Kate-plugin met config page -Name[pl]=Wtyczka do Kate ze stroną konfiguracyjną -Name[pt]='Plugin' do Kate com página de configuração -Name[pt_BR]='Plugin' do Kate com página de configuração -Name[ru]=Модуль Kate с диалогом настройки -Name[sk]=Kate modul s konfiguračnou stránkou -Name[sl]=Vstavek z nastavitveno stranjo za Kate -Name[sr]=Прикључак за Kate са страном за подешавања -Name[sr@Latn]=Priključak za Kate sa stranom za podešavanja -Name[sv]=Kate-insticksprogram med inställningssida -Name[tr]=Ayar sayfası olan bir Kate eklentisi -Name[zh_CN]=带配置页的 Kate 插件 -Name[zh_TW]=Kate 外掛程式,內含設定頁面 -Icon=kateplugin2.png -Category=C++/TDE -Comment=Generates a plugin with config page for Kate the text editor. -Comment[ca]=Genera un connector amb pàgina de configuració per a l'editor de text Kate. -Comment[da]=Generere et plugin med indstillingsside for teksteditoren Kate. -Comment[de]=Erstellt ein Modul mit Konfigurationsseite für den Texteditor Kate. -Comment[el]=Δημιουργεί ένα πρόσθετο με σελίδα ρύθμισης για το Kate τον επεξεργαστή κειμένου. -Comment[es]=Genera un complemento con página de configuración para el editor de texto Kate. -Comment[et]=Seadistustedialoogiga plugina loomine tekstiredaktorile Kate. -Comment[eu]=Konfigurazio orridun Kate plugin bat sortzen du. -Comment[fa]=وصله‌ای با صفحۀ پیکربندی ویرایشگر متن Kate تولید می‌کند. -Comment[fr]=Génère un module externe comprenant une page de configuration pour l'éditeur de texte Kate. -Comment[ga]=Cruthaíodh breiseán le leathanach cumraíochta le haghaidh eagarthóra téacs Kate. -Comment[gl]=Xera unha extensión con páxina de configuración para o editor de textos Kate. -Comment[hu]=Létrehoz egy bővítőmodult beállítólappal a Kate szövegszerkesztőhöz. -Comment[it]=Genera un plugin con pagina di configurazione per l'editor di testo Kate. -Comment[ja]=テキストエディタ Kate のための設定ページのあるプラグインを作成します。 -Comment[nds]=Stellt en Moduul mit Instellensiet för den Texteditor "Kate" op. -Comment[ne]=केट पाठ सम्पादकका लागि कन्फिग पृष्ठसँग प्लगइन उत्पन्न गर्दछ । -Comment[nl]=Genereert een plugin met een config page voor de Kate-teksteditor -Comment[pl]=Generuje wtyczke wraz ze stroną konfiguracyjną do edytora tekstu Kate. -Comment[pt]=Gera um 'plugin' com uma página de configuração para o Kate, o editor de texto. -Comment[pt_BR]=Gera um 'plugin' com uma página de configuração para o Kate, o editor de texto. -Comment[ru]=Создание модуля для текстового редактора Kate с диалогом настройки. -Comment[sk]=Vygeneruje modul s konfiguračnou stránkou pre textový editor Kate. -Comment[sl]=Ustvari vstavek z nastavitveno stranjo za urejevalnik besedil Kate. -Comment[sr]=Прави прикључак са страном за подешавање за уређивач текста Kate. -Comment[sr@Latn]=Pravi priključak sa stranom za podešavanje za uređivač teksta Kate. -Comment[sv]=Skapar ett insticksprogram för texteditorn Kate med en inställningssida. -Comment[tr]=Kate metin düzenleyicisi için ayar sayfası olan bir eklenti yaratır. -Comment[zh_CN]=生成带配置页的 Kate 文本编辑器插件。 -Comment[zh_TW]=產生一個 Kate 文字編輯器的外掛程式,內含設定頁面。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp -Archive=kateplugin2.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/plugin.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE13] -Type=install -Source=%{src}/plugin_app.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp - -[FILE14] -Type=install -Source=%{src}/plugin_app.h -Dest=%{dest}/src/plugin_%{APPNAMELC}.h - -[FILE15] -Type=install -EscapeXML=true -Source=%{src}/plugin_app.rc -Dest=%{dest}/src/plugin_%{APPNAMELC}.rc - -[FILE16] -Type=install -Source=%{src}/hi16-action-plugin.png -Dest=%{dest}/src/hi16-action-plugin.png -Process=false - -[FILE17] -Type=install -Source=%{src}/hi22-action-plugin.png -Dest=%{dest}/src/hi32-action-plugin.png -Process=false - -[MSG] -Type=message -Comment=A plugin for Kate with a config page was created in %{dest} -Comment[ca]=Un connector per a Kate amb pàgina de configuració ha estat creat en %{dest} -Comment[da]=Et plugin for Kate med en indstillingsside blev oprettet i %{dest} -Comment[de]=Ein Modul für Kate mit Konfigurationsseite wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο για το Kate με μια σελίδα ρύθμισης δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para Kate con una página de configuración ha sido creado en %{dest} -Comment[et]=Seadistustedialoogiga Kate plugin loodi asukohta %{dest} -Comment[eu]=Konfigurazio orridun Kate plugin bat sortu da hemen:%{dest} -Comment[fa]=وصله‌ای برای Kate با یک صفحۀ پیکربندی در %{dest} ایجاد شد -Comment[fr]=Un module externe pour Kate comprenant une page de configuration a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán Kate le leathanach cumraíochta i %{dest} -Comment[gl]=Creouse unha extensión para Kate con páxina de configuración en %{dest} -Comment[hu]=Létrejött egy Kate-bővítőmodul (beállítólappal) itt: %{dest} -Comment[it]=È stato creato un plugin per Kate con pagina di configurazione in %{dest} -Comment[ja]=設定ページのある Kate プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Moduul för Kate mit Instellensiet opstellt -Comment[ne]=कन्फिग पृष्ठसँग केटका लागि प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een plugin voor Kate met een config page is aangemaakt in %{dest} -Comment[pl]=Wtyczka do Kate wraz ze stroną konfiguracyjną została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' para o Kate, com uma página de configuração, em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' para o Kate, com uma página de configuração, em %{dest} -Comment[ru]=Модуль Kate с диалогом настройки создан в %{dest} -Comment[sk]=Modul pre Kate s konfiguračnou stránkou bol vytvorený v %{dest} -Comment[sl]=Vstavek z nastavitveno stranjo za Kate je bil ustvarjen v %{dest} -Comment[sr]=Прикључак за Kate са страном за подешавања направљен је у %{dest} -Comment[sr@Latn]=Priključak za Kate sa stranom za podešavanja napravljen je u %{dest} -Comment[sv]=Ett insticksprogram för Kate med en inställningssida skapades i %{dest} -Comment[tr]=Kate için ayar sayfası olan bir eklenti %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个带配置页的 Kate 插件 -Comment[zh_TW]=一個內含設定頁面的 Kate 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kateplugin2/plugin.tdevelop b/languages/cpp/app_templates/kateplugin2/plugin.tdevelop index 01c48bfc..831365dc 100644 --- a/languages/cpp/app_templates/kateplugin2/plugin.tdevelop +++ b/languages/cpp/app_templates/kateplugin2/plugin.tdevelop @@ -13,15 +13,15 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - - + + src/lib%{APPNAMELC}plugin.la @@ -44,8 +44,8 @@ -O0 -g3 - - + + @@ -53,8 +53,8 @@ - - + + ada ada_bugs_gcc @@ -91,24 +91,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kde4app/CMakeLists.txt b/languages/cpp/app_templates/kde4app/CMakeLists.txt new file mode 100644 index 00000000..0399f045 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/CMakeLists.txt @@ -0,0 +1,29 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_custom_target( kde4app.tar.gz ALL + COMMAND tar zcf kde4app.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + kapp4.cpp kapp4.h prefs_base.ui kapp4view.cpp + kapp4view.h kapp4view_base.ui main.cpp kde4appui.rc + kde4app-CMakeLists.txt kapp4.desktop kapp4.kcfg + settings.kcfgc kde4app.png README kde4app.tdevelop + kde4app.tdevelop.filelist +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kde4app.tar.gz kde4app.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kde4app.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kde4app/Makefile.am b/languages/cpp/app_templates/kde4app/Makefile.am new file mode 100644 index 00000000..455acd8d --- /dev/null +++ b/languages/cpp/app_templates/kde4app/Makefile.am @@ -0,0 +1,19 @@ +dataFiles = kapp4.cpp kapp4.h prefs_base.ui kapp4view.cpp kapp4view.h kapp4view_base.ui \ + main.cpp kde4appui.rc CMakeLists.txt kapp4.desktop kapp4.kcfg settings.kcfgc \ + kde4app.png README kde4app.tdevelop kde4app.tdevelop.filelist + +templateName = kde4app + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz diff --git a/languages/cpp/app_templates/kde4app/README b/languages/cpp/app_templates/kde4app/README new file mode 100644 index 00000000..8180d28c --- /dev/null +++ b/languages/cpp/app_templates/kde4app/README @@ -0,0 +1,15 @@ +!!!!!ATTENTION!!!!! + +Before starting the build you may need to setup the KDE4 environment variables. +To do this open Project->Project Options and then look at the "Run" and the "Make" +pages. Each of these two has an environment variables widget in which you have +to fill in the right values for the variables already listed. + +After setting up the variables you'll also need to run cmake inside the build +directory. This can not be done by tdevelop as a KDE4 environment is needed +when running cmake to find KDE4. Open the integrated konsole and change to the build +subdirectory. Then setup a KDE4 environment and run "cmake ../". + +More information how to setup a KDE4 development environment can be found on +http://techbase.kde.org/Getting_Started/Increased_Productivity_in_KDE4_with_Scripts + diff --git a/languages/cpp/app_templates/kde4app/kapp4.cpp b/languages/cpp/app_templates/kde4app/kapp4.cpp new file mode 100644 index 00000000..d224123c --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kapp4.cpp @@ -0,0 +1,90 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" +#include "%{APPNAMELC}view.h" +#include "settings.h" + +#include +#include + +#include +#include + +#include +#include +#include + +#include + +%{APPNAME}::%{APPNAME}() + : KXmlGuiWindow(), + m_view(new %{APPNAME}View(this)), + m_printer(0) +{ + // accept dnd + setAcceptDrops(true); + + // tell the KXmlGuiWindow that this is indeed the main widget + setCentralWidget(m_view); + + // then, setup our actions + setupActions(); + + // add a status bar + statusBar()->show(); + + // a call to KXmlGuiWindow::setupGUI() populates the GUI + // with actions, using KXMLGUI. + // It also applies the saved mainwindow settings, if any, and ask the + // mainwindow to automatically save settings if changed: window size, + // toolbar position, icon size, etc. + setupGUI(); +} + +%{APPNAME}::~%{APPNAME}() +{ +} + +void %{APPNAME}::setupActions() +{ + TDEStandardAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); + TDEStandardAction::quit(tqApp, TQT_SLOT(quit()), actionCollection()); + + TDEStandardAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); + + // custom menu and menu item - the slot is in the class %{APPNAME}View + TDEAction *custom = new TDEAction(TDEIcon("colorize"), i18n("Swi&tch Colors"), this); + actionCollection()->addAction( TQLatin1String("switch_action"), custom ); + connect(custom, TQT_SIGNAL(triggered(bool)), m_view, TQT_SLOT(switchColors())); +} + +void %{APPNAME}::fileNew() +{ + // this slot is called whenever the File->New menu is selected, + // the New shortcut is pressed (usually CTRL+N) or the New toolbar + // button is clicked + + // create a new window + (new %{APPNAME})->show(); +} + +void %{APPNAME}::optionsPreferences() +{ + // The preference dialog is derived from prefs_base.ui + // + // compare the names of the widgets in the .ui file + // to the names of the variables in the .kcfg file + //avoid to have 2 dialogs shown + if ( TDEConfigDialog::showDialog( "settings" ) ) { + return; + } + TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self()); + TQWidget *generalSettingsDlg = new TQWidget; + ui_prefs_base.setupUi(generalSettingsDlg); + dialog->addPage(generalSettingsDlg, i18n("General"), "package_setting"); + connect(dialog, TQT_SIGNAL(settingsChanged(TQString)), m_view, TQT_SLOT(settingsChanged())); + dialog->setAttribute( TQt::WA_DeleteOnClose ); + dialog->show(); +} + +#include "%{APPNAMELC}.moc" diff --git a/languages/cpp/app_templates/kde4app/kapp4.desktop b/languages/cpp/app_templates/kde4app/kapp4.desktop new file mode 100644 index 00000000..18cdcbe5 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kapp4.desktop @@ -0,0 +1,30 @@ +[Desktop Entry] +Name=KApp4 +Name[nds]=KProg4 +Name[sv]=KDE 4-program +Name[zh_TW]=KApp4 程式 +Exec=kapp4 %i -caption "%c" +Icon=kapp4 +Type=Application +DocPath=kapp4/kapp4.html +GenericName=A KDE4 Application +GenericName[ca]=Una aplicació del KDE4 +GenericName[da]=Et KDE4-program +GenericName[de]=Eine KDE 4-Anwendung +GenericName[el]=Μία εφαρμογή του KDE4 +GenericName[es]=Una aplicación para KDE4 +GenericName[et]=KDE4 rakendus +GenericName[hu]=KDE4-alapú alkalmazás +GenericName[it]=Applicazione KDE4 +GenericName[nds]=En KDE4-Programm +GenericName[nl]=Een KDE4-programma +GenericName[pl]=Program dla KDE4 +GenericName[pt]=Uma Aplicação do KDE4 +GenericName[pt_BR]=Uma Aplicação do KDE4 +GenericName[ru]=Приложение KDE 4 +GenericName[sk]=KDE4 aplikácia +GenericName[sr]=KDE4 програм +GenericName[sr@Latn]=KDE4 program +GenericName[sv]=Ett KDE 4-program +GenericName[zh_TW]=KDE4 應用程式 +Terminal=false diff --git a/languages/cpp/app_templates/kde4app/kapp4.h b/languages/cpp/app_templates/kde4app/kapp4.h new file mode 100644 index 00000000..3c209de2 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kapp4.h @@ -0,0 +1,54 @@ +%{H_TEMPLATE} +#ifndef %{APPNAMEUC}_H +#define %{APPNAMEUC}_H + + +#include + +#include "ui_prefs_base.h" + +class %{APPNAME}View; +class KPrinter; +class TDEToggleAction; +class KUrl; + +/** + * This class serves as the main window for %{APPNAME}. It handles the + * menus, toolbars, and status bars. + * + * @short Main window class + * @author Andreas Pakulat + * @version 0.1 + */ +class %{APPNAME} : public KXmlGuiWindow +{ + Q_OBJECT + +public: + /** + * Default Constructor + */ + %{APPNAME}(); + + /** + * Default Destructor + */ + virtual ~%{APPNAME}(); + +private slots: + void fileNew(); + void optionsPreferences(); + +private: + void setupActions(); + +private: + Ui::prefs_base ui_prefs_base ; + %{APPNAME}View *m_view; + + KPrinter *m_printer; + TDEToggleAction *m_toolbarAction; + TDEToggleAction *m_statusbarAction; +}; + +#endif // _%{APPNAMELC}_H_ diff --git a/languages/cpp/app_templates/kde4app/kapp4.kcfg b/languages/cpp/app_templates/kde4app/kapp4.kcfg new file mode 100644 index 00000000..6040f769 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kapp4.kcfg @@ -0,0 +1,21 @@ + + + + + + + black + + + + yellow + + + + 2 + + + diff --git a/languages/cpp/app_templates/kde4app/kapp4view.cpp b/languages/cpp/app_templates/kde4app/kapp4view.cpp new file mode 100644 index 00000000..af95aa15 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kapp4view.cpp @@ -0,0 +1,42 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}view.h" +#include "settings.h" + +#include +#include + +%{APPNAME}View::%{APPNAME}View(TQWidget *) +{ + ui_%{APPNAMELC}view_base.setupUi(this); + settingsChanged(); + setAutoFillBackground(true); +} + +%{APPNAME}View::~%{APPNAME}View() +{ + +} + +void %{APPNAME}View::switchColors() +{ + // switch the foreground/background colors of the label + TQColor color = Settings::col_background(); + Settings::setCol_background( Settings::col_foreground() ); + Settings::setCol_foreground( color ); + + settingsChanged(); +} + +void %{APPNAME}View::settingsChanged() +{ + TQPalette pal; + pal.setColor( TQPalette::Window, Settings::col_background()); + pal.setColor( TQPalette::WindowText, Settings::col_foreground()); + ui_%{APPNAMELC}view_base.kcfg_sillyLabel->setPalette( pal ); + + // i18n : internationalization + ui_%{APPNAMELC}view_base.kcfg_sillyLabel->setText( i18n("This project is %1 days old",Settings::val_time()) ); + emit signalChangeStatusbar( i18n("Settings changed") ); +} + +#include "%{APPNAMELC}view.moc" diff --git a/languages/cpp/app_templates/kde4app/kapp4view.h b/languages/cpp/app_templates/kde4app/kapp4view.h new file mode 100644 index 00000000..855a2144 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kapp4view.h @@ -0,0 +1,56 @@ +%{H_TEMPLATE} +#ifndef %{APPNAMELC}VIEW_H +#define %{APPNAMELC}VIEW_H + +#include + +#include "ui_%{APPNAMELC}view_base.h" + +class TQPainter; +class KUrl; + +/** + * This is the main view class for %{APPNAME}. Most of the non-menu, + * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go + * here. + * + * @short Main view + * @author %{AUTHOR} <%{EMAIL}> + * @version %{VERSION} + */ + +class %{APPNAME}View : public TQWidget, public Ui::%{APPNAMELC}view_base +{ + Q_OBJECT + +public: + /** + * Default constructor + */ + %{APPNAME}View(TQWidget *parent); + + /** + * Destructor + */ + virtual ~%{APPNAME}View(); + +private: + Ui::%{APPNAMELC}view_base ui_%{APPNAMELC}view_base; + +signals: + /** + * Use this signal to change the content of the statusbar + */ + void signalChangeStatusbar(const TQString& text); + + /** + * Use this signal to change the content of the caption + */ + void signalChangeCaption(const TQString& text); + +private slots: + void switchColors(); + void settingsChanged(); +}; + +#endif // %{APPNAME}VIEW_H diff --git a/languages/cpp/app_templates/kde4app/kapp4view_base.ui b/languages/cpp/app_templates/kde4app/kapp4view_base.ui new file mode 100644 index 00000000..6738a789 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kapp4view_base.ui @@ -0,0 +1,213 @@ + +%{APPNAMELC}view_base + + + + 0 + 0 + 315 + 233 + + + + %{APPNAMELC}_base + + + true + + + + 11 + + + 11 + + + 11 + + + 11 + + + 6 + + + 6 + + + + + + + + + + 255 + 255 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + 255 + 255 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + 119 + 119 + 119 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + Sans Serif + 12 + + + + true + + + hello, world + + + true + + + Qt::AlignCenter + + + false + + + + + + + qPixmapFromMimeSource + + + diff --git a/languages/cpp/app_templates/kde4app/kde4app-CMakeLists.txt b/languages/cpp/app_templates/kde4app/kde4app-CMakeLists.txt new file mode 100644 index 00000000..db1f4bab --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kde4app-CMakeLists.txt @@ -0,0 +1,31 @@ +project(%{APPNAME}) +find_package(KDE4 REQUIRED) +include (KDE4Defaults) +include_directories( ${KDE4_INCLUDES} ${QT_INCLUDES} ) + +set(%{APPNAMELC}_SRCS + %{APPNAMELC}.cpp + main.cpp + %{APPNAMELC}view.cpp + ) + +#kde4_automoc(${%{APPNAMELC}_SRCS}) + +kde4_add_ui_files(%{APPNAMELC}_SRCS %{APPNAMELC}view_base.ui prefs_base.ui) + +kde4_add_kcfg_files(%{APPNAMELC}_SRCS settings.kcfgc ) + +kde4_add_executable(%{APPNAMELC} ${%{APPNAMELC}_SRCS}) + +target_link_libraries(%{APPNAMELC} ${KDE4_TDEUI_LIBS} ) + +install(TARGETS %{APPNAMELC} DESTINATION ${BIN_INSTALL_DIR} ) + + +########### install files ############### + +install( FILES %{APPNAMELC}.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +install( FILES %{APPNAMELC}.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) +install( FILES %{APPNAMELC}ui.rc DESTINATION ${DATA_INSTALL_DIR}/%{APPNAMELC} ) + + diff --git a/languages/cpp/app_templates/kde4app/kde4app.kdevtemplate b/languages/cpp/app_templates/kde4app/kde4app.kdevtemplate new file mode 100644 index 00000000..1516e92e --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kde4app.kdevtemplate @@ -0,0 +1,155 @@ +# KDE Config File +[General] +Name=KDE4 Application framework +Name[ca]=Entorn de treball d'aplicacions pel KDE4 +Name[da]=KDE4 program-framework +Name[de]=KDE 4-Anwendungsgrundgerüst +Name[el]=Πλαίσιο εφαρμογής του KDE4 +Name[es]=Infraestructura de aplicación para KDE4 +Name[et]=KDE4 rakenduse raamistik +Name[hu]=Keretrendszer KDE4-alapú alkalmazáshoz +Name[it]=Infrastruttura per applicazioni KDE4 +Name[nds]=KDE4-Programmrahmenwark +Name[nl]=KDE4-programmaframewerk +Name[pl]=Szablon programu dla KDE4 +Name[pt]=Plataforma de aplicações do KDE4 +Name[pt_BR]=Plataforma de aplicações do KDE4 +Name[ru]=Инструментарий для создания приложений KDE 4 +Name[sk]=KDE4 aplikačný framework +Name[sr]=Радни оквир KDE4 програма +Name[sr@Latn]=Radni okvir KDE4 programa +Name[sv]=KDE 4-programramverk +Name[zh_TW]=KDE4 應用程式框架 +Icon=kde4app.png +Category=C++/KDE4 +Comment=Generates a simple KDE4 application with one toplevel window, menus and toolbars. +Comment[ca]=Genera una aplicació senzilla per al KDE4 amb una finestra principal, menús i barres d'eines. +Comment[da]=Genererer et simpelt KDE4-program med et vindue på topniveau, menuer og værktøjslinjer. +Comment[de]=Erstellt eine einfache KDE 4-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. +Comment[el]=Δημιουργεί μια απλή εφαρμογή του KDE4 με ένα ανώτερο παράθυρο, μενού, και γραμμές εργαλείων. +Comment[es]=Genera una sencilla aplicación para KDE4 con una ventana principal, menús y barras de herramientas. +Comment[et]=Lihtsa KDE4 rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. +Comment[hu]=Létrehoz egy egyszerű KDE4-alkalmazást egy főablakkal, menükkel és eszköztárakkal. +Comment[it]=Genera una semplice applicazione KDE4 con una finestra toplevel, menu e barre degli strumenti. +Comment[nds]=Stellt en eenfach KDE4-Programm mit een böverst Finster, Menüs un Warktüüchbalkens op. +Comment[nl]=Genereert een eenvoudig KDE4-programma met een topniveauvenster, menu's en werkbalken. +Comment[pl]=Generuje prosty program dla KDE4 posiadający okno, menu i paski narzędzi. +Comment[pt]=Gera uma aplicação para KDE4 simples, com uma janela de topo, menus e barras de ferramentas. +Comment[pt_BR]=Gera uma aplicação para KDE4 simples, com uma janela de topo, menus e barras de ferramentas. +Comment[ru]=Создание простого приложения KDE 4 с одним окном верхнего уровня, меню и панелями инструментов. +Comment[sk]=Vygeneruje jednoduchú KDE4 aplikáciu s jedným oknom, menu a panelom nástrojov. +Comment[sr]=Прави једноставан KDE4 програм са једним прозором највишег нивоа, менијима и тракама са алатом. +Comment[sr@Latn]=Pravi jednostavan KDE4 program sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. +Comment[sv]=Skapar ett enkelt KDE 4-program med ett toppnivåfönster, menyer och verktygsrader. +Comment[zh_TW]=產生一個簡單的 KDE4 應用程式,內含頂層視窗、選單與工具列。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/README +Archive=kde4app.tar.gz + +[FILE1] +Type=install +Source=%{src}/CMakeLists.txt +Dest=%{dest}/CMakeLists.txt + +[FILE2] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/main.cpp + +[FILE3] +Type=install +Source=%{src}/kapp4.cpp +Dest=%{dest}/%{APPNAMELC}.cpp + +[FILE4] +Type=install +Source=%{src}/kapp4.h +Dest=%{dest}/%{APPNAMELC}.h + +[FILE5] +Type=install +Source=%{src}/kapp4view.cpp +Dest=%{dest}/%{APPNAMELC}view.cpp + + +[FILE6] +Type=install +Source=%{src}/kapp4view.h +Dest=%{dest}/%{APPNAMELC}view.h + + +[FILE7] +Type=install +Source=%{src}/kde4appui.rc +Dest=%{dest}/%{APPNAMELC}ui.rc + + +[FILE8] +Type=install +Source=%{src}/kapp4view_base.ui +Dest=%{dest}/%{APPNAMELC}view_base.ui + + +[FILE9] +Type=install +Source=%{src}/kapp4.desktop +Dest=%{dest}/%{APPNAMELC}.desktop + +[FILE10] +Type=install +Source=%{src}/kapp4.kcfg +Dest=%{dest}/%{APPNAMELC}.kcfg + + +[FILE11] +Type=install +Source=%{src}/prefs_base.ui +Dest=%{dest}/prefs_base.ui + + +[FILE12] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/settings.kcfgc + +[FILE13] +Type=install +Source=%{src}/README +Dest=%{dest}/README + +[FILE14] +Type=install +Source=%{src}/kde4app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE15] +Type=install +Source=%{src}/kde4app.tdevelop.filelist +Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist + +[MKDIR1] +Type=mkdir +Dir=%{dest}/build + +[MSG] +Type=message +Comment=A KDE4 Application was created at %{dest} +Comment[ca]=S'ha creat una aplicació per al KDE4 a %{dest} +Comment[da]=Et KDE4-program blev oprettet i %{dest} +Comment[de]=Eine KDE 4-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή KDE4 δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación para KDE4 ha sido creada en %{dest} +Comment[et]=KDE4 rakendus loodi asukohta %{dest} +Comment[hu]=Létrejött egy KDE4-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione KDE4 in %{dest} +Comment[nds]=In %{dest} wöör en KDE4-Programm opstellt +Comment[nl]=Een KDE4-toepassing is aangemaakt in %{dest} +Comment[pl]=Program dla KDE4 został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do KDE4 em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do KDE4 em %{dest} +Comment[ru]=Приложение KDE 4 создано в %{dest} +Comment[sk]=KDE4 aplikácia bola vytvorená v %{dest} +Comment[sr]=KDE4 програм је направљен у %{dest} +Comment[sr@Latn]=KDE4 program je napravljen u %{dest} +Comment[sv]=Ett KDE 4-program skapades i %{dest} +Comment[zh_TW]=一個 KDE4 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kde4app/kde4app.png b/languages/cpp/app_templates/kde4app/kde4app.png new file mode 100644 index 00000000..a421a664 Binary files /dev/null and b/languages/cpp/app_templates/kde4app/kde4app.png differ diff --git a/languages/cpp/app_templates/kde4app/kde4app.tdevelop b/languages/cpp/app_templates/kde4app/kde4app.tdevelop new file mode 100644 index 00000000..d332fa06 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kde4app.tdevelop @@ -0,0 +1,205 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevCustomProject + C++ + + C++ + Code + Qt + KDE + + %{APPNAMELC} + . + false + + + + + + + + + + + + + false + *.o,*.lo,CVS + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + w3c-svg + sw + w3c-uaag10 + wxwidgets_bugs + + + qmake User Guide + + + + + libtool + + + true + false + false + true + + + false + true + + + + + + + + + + + + -f + + -dP + + -f + -u3 -p + + + + + + + false + + + .h + .cpp + true + + + + + %{dest}/build/%{APPNAMELC} + + false + false + + + + + + + + + false + false + + true + %{dest} + executable + + + make + %{dest}/build + + + false + 1 + 0 + false + make + + + default + + + + + + + + + + + + + *.h + *.cpp + CMakeLists.txt + *.desktop + *.kcfg* + *.ui + Doxyfile + *.dox + *.rc + *.cmake + + + 0 + + + + default + + + + + + build + + + + + true + 4 + 4 + ExternalDesigner + /usr/bin/designer-qt4 + /usr/lib/qt4 + + + + true + 2 + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/kde4app/kde4app.tdevelop.filelist b/languages/cpp/app_templates/kde4app/kde4app.tdevelop.filelist new file mode 100644 index 00000000..5235563f --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kde4app.tdevelop.filelist @@ -0,0 +1,13 @@ +# KDevelop Custom Project File List +CMakeLists.txt +main.cpp +prefs_base.ui +settings.kcfgc +%{APPNAMELC}.cpp +%{APPNAMELC}.desktop +%{APPNAMELC}.h +%{APPNAMELC}.kcfg +%{APPNAMELC}ui.rc +%{APPNAMELC}view.cpp +%{APPNAMELC}view.h +%{APPNAMELC}view_base.ui diff --git a/languages/cpp/app_templates/kde4app/kde4appui.rc b/languages/cpp/app_templates/kde4app/kde4appui.rc new file mode 100644 index 00000000..406bccc6 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kde4appui.rc @@ -0,0 +1,8 @@ + + + + &Move + + + + diff --git a/languages/cpp/app_templates/kde4app/main.cpp b/languages/cpp/app_templates/kde4app/main.cpp new file mode 100644 index 00000000..5c83921b --- /dev/null +++ b/languages/cpp/app_templates/kde4app/main.cpp @@ -0,0 +1,55 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" +#include +#include +#include +#include + +static const char description[] = + I18N_NOOP("A KDE 4 Application"); + +static const char version[] = "%{VERSION}"; + +int main(int argc, char **argv) +{ + TDEAboutData about("%{APPNAMELC}", 0, ki18n("%{APPNAME}"), version, ki18n(description), + TDEAboutData::License_%{LICENSE}, ki18n("(C) %{YEAR} %{AUTHOR}"), KLocalizedString(), 0, "%{EMAIL}"); + about.addAuthor( ki18n("%{AUTHOR}"), KLocalizedString(), "%{EMAIL}" ); + TDECmdLineArgs::init(argc, argv, &about); + + TDECmdLineOptions options; + options.add("+[URL]", ki18n( "Document to open" )); + TDECmdLineArgs::addCmdLineOptions(options); + TDEApplication app; + + %{APPNAME} *widget = new %{APPNAME}; + + // see if we are starting with session management + if (app.isSessionRestored()) + { + RESTORE(%{APPNAME}); + } + else + { + // no session.. just start up normally + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + if (args->count() == 0) + { + //%{APPNAMELC} *widget = new %{APPNAMELC}; + widget->show(); + } + else + { + int i = 0; + for (; i < args->count(); i++) + { + //%{APPNAMELC} *widget = new %{APPNAMELC}; + widget->show(); + } + } + args->clear(); + } + + return app.exec(); +} diff --git a/languages/cpp/app_templates/kde4app/prefs_base.ui b/languages/cpp/app_templates/kde4app/prefs_base.ui new file mode 100644 index 00000000..87a191f1 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/prefs_base.ui @@ -0,0 +1,155 @@ + + prefs_base + + + + 0 + 0 + 282 + 156 + + + + + + + Background color: + + + false + + + + + + + Choose a new background color + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Change the <span style=" font-weight:600;">background</span> color by clicking here and choose the new <span style=" color:#ff0000;">color</span> in the <span style=" font-style:italic;">color dialog</span>.</p></body></html> + + + + + + + + + + Project age: + + + false + + + + + + + Foreground color: + + + false + + + + + + + Choose a new foreground color + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Change the <span style=" font-weight:600;">foreground</span> color by clicking here and choose the new <span style=" color:#ff0000;">color</span> in the <span style=" font-style:italic;">color dialog</span>.</p></body></html> + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 41 + 20 + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 41 + 20 + + + + + + + + Set the project age (in days) + + + Change the project age (in days) by choosing a new number of days. + + + 1 + + + 2 + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 41 + 20 + + + + + + + + qPixmapFromMimeSource + + + KColorButton + QPushButton +
    kcolorbutton.h
    +
    +
    + + kcolorbutton.h + + + +
    diff --git a/languages/cpp/app_templates/kde4app/settings.kcfgc b/languages/cpp/app_templates/kde4app/settings.kcfgc new file mode 100644 index 00000000..402fad09 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/settings.kcfgc @@ -0,0 +1,6 @@ +# Code generation options for tdeconfig_compiler +File=%{APPNAMELC}.kcfg +ClassName=Settings +Singleton=true +Mutators=col_background,col_foreground +# will create the necessary code for setting those variables diff --git a/languages/cpp/app_templates/kdecpp.appwizard b/languages/cpp/app_templates/kdecpp.appwizard new file mode 100644 index 00000000..14bcbeaa --- /dev/null +++ b/languages/cpp/app_templates/kdecpp.appwizard @@ -0,0 +1,2 @@ +[General] +List=kdedcop,tdeioslave,kxt,kdevlang,kmake,kapp,tdeconfig35,kdevlang,kdevpart,kateplugin,kdevpart2,kopart,noatunui,kateplugin2,tdefileplugin,konqnavpanel,noatunvisual,dcopservice,khello,kpartapp,khello2,kpartplugin,tdecmodule,kicker,tdescreensaver,kscons_kxt,kscons_tdemdi diff --git a/languages/cpp/app_templates/kdedcop/CMakeLists.txt b/languages/cpp/app_templates/kdedcop/CMakeLists.txt new file mode 100644 index 00000000..0b7e9a3f --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_custom_target( kdedcop.tar.gz ALL + COMMAND tar zcf kdedcop.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + app.cpp app.h app_iface.h app.tdevelop main.cpp + mainclass.cpp mainclass.h kdedcop.png src-Makefile.am + subdirs +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kdedcop.tar.gz kdedcop.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kdedcop.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kdedcop/Makefile.am b/languages/cpp/app_templates/kdedcop/Makefile.am new file mode 100644 index 00000000..21c39778 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/Makefile.am @@ -0,0 +1,18 @@ +dataFiles = app.cpp app.h app_iface.h app.tdevelop main.cpp mainclass.cpp \ + mainclass.h kdedcop.png src-Makefile.am subdirs + +templateName = kdedcop + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/cpp/app_templates/kdedcop/app.cpp b/languages/cpp/app_templates/kdedcop/app.cpp new file mode 100644 index 00000000..5c2fa627 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/app.cpp @@ -0,0 +1,21 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" + +#include + +#include +#include + +%{APPNAME}::%{APPNAME}() + : TDEMainWindow( 0, "%{APPNAME}" ) +{ + m_mainClass = new MainClass(); +} + +%{APPNAME}::~%{APPNAME}() +{ + if (m_mainClass) delete m_mainClass; +} + +#include "%{APPNAMELC}.moc" diff --git a/languages/cpp/app_templates/kdedcop/app.h b/languages/cpp/app_templates/kdedcop/app.h new file mode 100644 index 00000000..814fccad --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/app.h @@ -0,0 +1,37 @@ +%{H_TEMPLATE} + +#ifndef _%{APPNAMEUC}_H_ +#define _%{APPNAMEUC}_H_ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#include "mainclass.h" + +/** + * @short Application Main Window + * @author %{AUTHOR} <%{EMAIL}> + * @version 0.1 + */ +class %{APPNAME} : public TDEMainWindow +{ + Q_OBJECT + +public: + /** + * Default Constructor + */ + %{APPNAME}(); + + /** + * Default Destructor + */ + virtual ~%{APPNAME}(); +private: + MainClass *m_mainClass; +}; + +#endif // _%{APPNAMEUC}_H_ diff --git a/languages/cpp/app_templates/kdedcop/app.tdevelop b/languages/cpp/app_templates/kdedcop/app.tdevelop new file mode 100644 index 00000000..991381c5 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/app.tdevelop @@ -0,0 +1,116 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + C++ + Code + Qt + TDE + DCOP + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + + + + src/%{APPNAMELC} + debug + + + src/%{APPNAMELC} + + + + optimized + kdevgccoptions + kdevgppoptions + kdevg77options + -O2 -g0 + + + --enable-debug=full + debug + kdevgccoptions + kdevgppoptions + kdevg77options + -O0 -g3 + + + + + + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + w3c-svg + sw + w3c-uaag10 + wxwidgets_bugs + + + qmake User Guide + + + + + libtool + + + + + + + + + + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/kdedcop/app_iface.h b/languages/cpp/app_templates/kdedcop/app_iface.h new file mode 100644 index 00000000..7049c712 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/app_iface.h @@ -0,0 +1,19 @@ +%{H_TEMPLATE} + +#include + +class DCOPDemoIface : virtual public DCOPObject +{ + K_DCOP + k_dcop: + + + // Here you should place your DCOP interface. + // Below are four example methods. + virtual TQString strVal() const = 0; + virtual int intVal() const = 0; + + virtual void setIntVal( int num ) = 0; + virtual void setStrVal( const TQString &str ) = 0; + +}; diff --git a/languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate b/languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate new file mode 100644 index 00000000..ff6a91c1 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate @@ -0,0 +1,227 @@ +# TDE Config File +[General] +Name=Simple DCOP server +Name[ca]=Simple servidor DCOP +Name[da]=Simpel DCOP-server +Name[de]=Einfacher DCOP-Server +Name[el]=Απλός εξυπηρετητής DCOP +Name[es]=Sencillo servidor DCOP +Name[et]=Lihtne DCOP-server +Name[eu]=DCOP zerbitzari sinple bat +Name[fa]=کارساز سادۀ DCOP +Name[fr]=Serveur DCOP simple +Name[ga]=Freastalaí simplí DCOP +Name[gl]=Servidor sinxelo DCOP +Name[hu]=Egyszerű DCOP-kiszolgáló +Name[it]=Semplice server DCOP +Name[ja]=簡単な DCOP サーバ +Name[nds]=Eenfach DCOP-Server +Name[ne]=साधारण DCOP सर्भर +Name[nl]=Eenvoudige DCOP-server +Name[pl]=Prosty serwer DCOP +Name[pt]=Servidor de DCOP simples +Name[pt_BR]=Servidor de DCOP simples +Name[ru]=Сервер DCOP +Name[sk]=Jednoduchý DCOP server +Name[sl]=Preprost strežnik DCOP +Name[sr]=Једноставан DCOP сервер +Name[sr@Latn]=Jednostavan DCOP server +Name[sv]=Enkel DCOP-server +Name[tr]=Basit DCOP Sunucusu +Name[zh_CN]=简单的 DCOP 服务器 +Name[zh_TW]=簡單的 DCOP 伺服器 +Icon=kdedcop.png +Category=C++/TDE +Comment=Generates a basic TDE DCOP server. This is an ideal starting point for a DCOP server that does not require a GUI interface. +Comment[ca]=Genera un servidor bàsic DCOP per al TDE. Aquest és un idoni punt de partida per a un servidor DCOP que no requereixi d'una IGU. +Comment[da]=Genererer en basal TDE DCOP-server. Dette er et ideelt startpunkt for en DCOP-server der ikke kræver en GUI-grænseflade. +Comment[de]=Erstellt einen einfachen TDE-DCOP-Server. Dies ist ein idealer Ausgangspunkt für einen DCOP-Server, der keine Benutzeroberfläche erfordert. +Comment[el]=Δημιουργεί ένα βασικό εξυπηρετητή TDE DCOP. Αυτό είναι ένα ιδανικό σημείο αρχής για έναν εξυπηρετητή DCOP ο οποίος δε χρειάζεται ένα γραφικό περιβάλλον. +Comment[es]=Genera un servidor básico DCOP para TDE. Es un punto de comienzo ideal para un servidor DCOP que no requiera una interfaz gráfica. +Comment[et]=Lihtsa TDE DCOP-serveri loomine. See on ideaalne algus DCOP-serverile, mis ei eelda graafilist kasutajaliidest. +Comment[eu]=DCOP zerbitzari sinple bat sortzen du. Hau GUI interfazerik behar ez duen DCOP zerbitzari baterako hasierako puntu aparta da. +Comment[fa]=یک کارساز پایۀ TDE DCOP تولید می‌کند. این یک نقطۀ شروع دلخواه برای یک کارساز DCOP است، که نیازی به یک واسط ونک ندارد. +Comment[fr]=Génère un serveur DCOP TDE de base. C'est un bon point de départ pour un serveur DCOP qui ne requiert pas d'interface graphique. +Comment[gl]=Xera un servidor básico DCOP para TDE. Este é un punto de comezo ideal para un servidor DCOP que non require unha interface GUI. +Comment[hu]=Létrehoz egy egyszerű TDE DCOP-os kiszolgálót. Jó kiindulópont grafikus felület nélküli DCOP-kiszolgáló készítéséhez. +Comment[it]=Genera un semplice server DCOP per TDE. È un punto di partenza ideale per un server DCOP che non richiede un'interfaccia GUI. +Comment[ja]=基本的な TDE DCOP サーバを作成します。GUI を必要としない DCOP サーバの理想的な開始点です。 +Comment[nds]=Stellt en eenfach DCOP-Server op. Dat is en goot Anfang för en DCOP-Server ahn Böversiet. +Comment[ne]=आधारभूत TDE DCOP सर्भर उत्पन्न गर्दछ । यो DCOP सर्भरका लागि उपयुक्त सुरुआत बिन्दु हो जसलाई जी यू आई इन्टरफेस आवश्यक पर्दैन । +Comment[nl]=Genereert een basis TDE DCOP-server. Dit is een ideaal startpunt voor een DCOP-server die geen GUI-interface vereist. +Comment[pl]=Generuje prosty serwer TDE DCOP. Dobry punkt startu dla serwera DCOP, który nie potrzebuje interfejsu graficznego. +Comment[pt]=Gera um servidor básico de DCOP para o TDE. Este é um ponto de partida ideal para um servidor de DCOP que não necessite de uma interface gráfica. +Comment[pt_BR]=Gera um servidor básico de DCOP para o TDE. Este é um ponto de partida ideal para um servidor de DCOP que não necessite de uma interface gráfica. +Comment[ru]=Создание простого сервера DCOP. Идеальная стартовая точка для разработки сервера DCOP без графического интерфейса. +Comment[sk]=Vygeneruje základný TDE DCOP server. Toto je ideálny štartovací bod pre DCOP server, ktorý nepotrebuje GUI rozhranie. +Comment[sl]=Ustvari osnovni strežnik DCOP za TDE. To je idealno začetno mesto za strežnik DCOP, ki ne potrebuje grafičnega vmesnika. +Comment[sr]=Прави основан TDE DCOP сервер. Ово је идеална почетна тачка за DCOP сервер који не захтева GUI. +Comment[sr@Latn]=Pravi osnovan TDE DCOP server. Ovo je idealna početna tačka za DCOP server koji ne zahteva GUI. +Comment[sv]=Skapar en grundläggande TDE DCOP-server. Detta är en idealisk utgångspunkt för en DCOP-server som inte kräver ett grafiskt användargränssnitt. +Comment[tr]=Basit bir TDE DCOP sunucusu yaratır. Bu grafik arayüz gerektirmeyen bir DCOP sunucusuna başlamak için uygun bir noktadır. +Comment[zh_CN]=生成简单的 TDE DCOP 服务器。这是不需要图形界面的 DCOP 服务器的良好开端。 +Comment[zh_TW]=產生一個基本的 TDE DCOP 伺服器。這個是開發一個不需使用者介面的 DCOP 伺服器的一個好起點。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/main.cpp +Archive=kdedcop.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE17] +Type=install +Source=%{src}/mainclass.cpp +Dest=%{dest}/src/mainclass.cpp + +[FILE18] +Type=install +Source=%{src}/mainclass.h +Dest=%{dest}/src/mainclass.h + +[FILE19] +Type=install +Source=%{src}/app_iface.h +Dest=%{dest}/src/%{APPNAMELC}_iface.h + +[FILE20] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[MSG] +Type=message +Comment=A simple DCOP server was created in %{dest} +Comment[ca]=Un simple servidor DCOP ha estat creat en %{dest} +Comment[da]=En simpel DCOP-server blev oprettet i %{dest} +Comment[de]=Ein einfacher DCOP-Server wurde in %{dest} erstellt. +Comment[el]=Ένας απλός εξυπηρετητής DCOP δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo servidor DCOP ha sido creado en %{dest} +Comment[et]=Lihtne DCOP-server loodi asukohta %{dest} +Comment[eu]=DCOP zerbitzari sinple bat sortu da hemen: %{dest} +Comment[fa]=یک کارساز سادۀ DCOP در %{dest} ایجاد شد +Comment[fr]=Un serveur DCOP simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh freastalaí simplí DCOP i %{dest} +Comment[gl]=Creouse un servidor DCOP sinxelo en %{dest} +Comment[hu]=Létrejött egy egyszerű DCOP-kiszolgáló itt: %{dest} +Comment[it]=È stato creato un semplice server DCOP in %{dest} +Comment[ja]=簡単な DCOP サーバを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach DCOP-Server opstellt +Comment[ne]=साधारण DCOP सर्भर %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudige DCOP-server is aangemaakt in %{dest} +Comment[pl]=Prosty serwer DCOP został utworzony w %{dest} +Comment[pt]=Foi criado um servidor de DCOP simples em %{dest} +Comment[pt_BR]=Foi criado um servidor de DCOP simples em %{dest} +Comment[ru]=Простой сервер DCOP создан в %{dest} +Comment[sk]=Jednoduchý DCOP server bol vytvorený v %{dest} +Comment[sl]=Preprost strežnik DCOP je bil ustvarjen v %{dest} +Comment[sr]=Једноставан DCOP сервер направљен је у %{dest} +Comment[sr@Latn]=Jednostavan DCOP server napravljen je u %{dest} +Comment[sv]=En enkel DCOP-server skapades i %{dest} +Comment[tr]=Basit bir DCOP sunucusu %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了简单的 DCOP 服务器 +Comment[zh_TW]=一個簡單的 DCOP 伺服器已建立於 %{dest} diff --git a/languages/cpp/app_templates/kdedcop/kdedcop.png b/languages/cpp/app_templates/kdedcop/kdedcop.png new file mode 100644 index 00000000..1d25362b Binary files /dev/null and b/languages/cpp/app_templates/kdedcop/kdedcop.png differ diff --git a/languages/cpp/app_templates/kdedcop/main.cpp b/languages/cpp/app_templates/kdedcop/main.cpp new file mode 100644 index 00000000..283ab5cf --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/main.cpp @@ -0,0 +1,52 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" +#include +#include +#include +#include + +static const char description[] = + I18N_NOOP("A TDE KPart Application"); + +static const char version[] = "0.1"; + +static TDECmdLineOptions options[] = +{ +// { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, + TDECmdLineLastOption +}; + +int main(int argc, char **argv) +{ + TDEAboutData about("%{APPNAMELC}", I18N_NOOP("%{APPNAME}"), version, description, + TDEAboutData::License_%{LICENSE}, "(C) %{YEAR} %{AUTHOR}", 0, 0, "%{EMAIL}"); + about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" ); + TDECmdLineArgs::init(argc, argv, &about); + TDECmdLineArgs::addCmdLineOptions( options ); + TDEApplication app; + %{APPNAME} *mainWin = 0; + + if (app.isRestored()) + { + RESTORE(%{APPNAME}); + } + else + { + // no session.. just start up normally + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + /// @todo do something with the command line args here + + mainWin = new %{APPNAME}(); + app.setMainWidget( mainWin ); + mainWin->show(); + + args->clear(); + } + + int ret = app.exec(); + + delete mainWin; + return ret; +} diff --git a/languages/cpp/app_templates/kdedcop/mainclass.cpp b/languages/cpp/app_templates/kdedcop/mainclass.cpp new file mode 100644 index 00000000..a5e0d6a5 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/mainclass.cpp @@ -0,0 +1,31 @@ +%{CPP_TEMPLATE} + +#include "mainclass.h" + + +MainClass::MainClass() + : DCOPDemoIface(), + DCOPObject("mainclass"), /* this is the object name DCOP will expose */ + m_intValue(0) +{ +} + +MainClass::~MainClass() +{ +} + +void MainClass::setStrVal(const TQString & str) { + m_strValue = str; +} + +void MainClass::setIntVal(int val) { + m_intValue = val; +} + +TQString MainClass::strVal() const { + return m_strValue; +} + +int MainClass::intVal() const { + return m_intValue; +} diff --git a/languages/cpp/app_templates/kdedcop/mainclass.h b/languages/cpp/app_templates/kdedcop/mainclass.h new file mode 100644 index 00000000..13504f82 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/mainclass.h @@ -0,0 +1,32 @@ +%{H_TEMPLATE} + +#ifndef MAINCLASS_H +#define MAINCLASS_H + +#include "%{APPNAMELC}_iface.h" + +/** + * + * @author %{AUTHOR} + **/ +class MainClass : virtual public DCOPDemoIface +{ +public: + MainClass(); + + ~MainClass(); + + + // Here is the implementation of the example DCOP interface methods. + virtual void setStrVal(const TQString &); + virtual void setIntVal(int); + virtual TQString strVal() const; + virtual int intVal() const; + +private: + TQString m_strValue; + int m_intValue; + +}; + +#endif diff --git a/languages/cpp/app_templates/kdedcop/src-Makefile.am b/languages/cpp/app_templates/kdedcop/src-Makefile.am new file mode 100644 index 00000000..19ddf2fb --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/src-Makefile.am @@ -0,0 +1,23 @@ +## Makefile.am for %{APPNAMELC} + +# set the include path for X, qt and TDE +INCLUDES = $(all_includes) + +# these are the headers for your project +noinst_HEADERS = %{APPNAMELC}.h + +# let automoc handle all of the meta source files ((moc)) +METASOURCES = AUTO + +messages: rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot + +# this is the program that gets installed. it's name is used for all +# of the other Makefile.am variables +bin_PROGRAMS = %{APPNAMELC} + +# the application source, library search path, and link libraries +%{APPNAMELC}_SOURCES = main.cpp %{APPNAMELC}.cpp %{APPNAMELC}_iface.skel mainclass.cpp +%{APPNAMELC}_LDFLAGS = $(KDE_RPATH) $(all_libraries) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) +%{APPNAMELC}_LDADD = $(LIB_TDEUI) diff --git a/languages/cpp/app_templates/kdedcop/subdirs b/languages/cpp/app_templates/kdedcop/subdirs new file mode 100644 index 00000000..0e678106 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/subdirs @@ -0,0 +1,3 @@ +doc +po +src diff --git a/languages/cpp/app_templates/kdevlang/CMakeLists.txt b/languages/cpp/app_templates/kdevlang/CMakeLists.txt new file mode 100644 index 00000000..483f85d9 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_custom_target( kdevlang.tar.gz ALL + COMMAND tar zcf kdevlang.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + src-Makefile.am kdevlang_part.cpp kdevlang_part.h + kdevlang.rc kdevlang.desktop app.tdevelop + kdevlang-configure.in.in README.dox +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kdevlang.tar.gz kdevlang.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kdevlang.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kdevlang/Makefile.am b/languages/cpp/app_templates/kdevlang/Makefile.am new file mode 100644 index 00000000..7afa5be8 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/Makefile.am @@ -0,0 +1,17 @@ +dataFiles = src-Makefile.am kdevlang_part.cpp kdevlang_part.h kdevlang.rc \ + kdevlang.desktop app.tdevelop kdevlang-configure.in.in README.dox +templateName = kdevlang + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/cpp/app_templates/kdevlang/README.dox b/languages/cpp/app_templates/kdevlang/README.dox new file mode 100644 index 00000000..7069f3a5 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/README.dox @@ -0,0 +1,55 @@ +/** \class %{APPNAME} +Put a brief description here, the brief description ends at the first dot. +Put a more detailed description of your part in these lines. It can span +over several lines. You can even use some html commands in these lines like: +This is code, html links link text, +and images. + +\authors %{AUTHOR} +\authors 2nd author full name +... +\authors nth author full name + +\maintainer %{AUTHOR} +\maintainer 2nd maintainer full name +... +\maintainer nth maintainer full name + +\feature Describe the first feature +\feature Describe the second feature +... +\feature Describe the last feature + +\bug bugs in +YOUR_COMPONENT_NAME at Bugzilla database +\bug Describe a the 1st bug that you know of, but probably hasn't been reported yet. +.. +\bug Describe a the nth bug that you know of, but probably hasn't been reported yet. + +\requirement Describe a the 1st requirement of your part. +\requirement Describe a the 2nd requirement of your part. +... +\requirement Describe a the nth requirement of your part. + +\todo Describe a the 1st TODO of your part. +\todo Describe a the 2nd TODO of your part. +... +\todo Describe a the nth TODO of your part. + +\faq First frequenly asked question about your part ? Answer. +\faq Second frequenly asked question about your part ? Answer. +... +\faq Last frequenly asked question about your part ? Answer. + +\note First note text. +\note Second note text. +... +\note Last note text. + +\warning First warning text. +\warning Second warning text. +... +\warning Last warning text. + +*/ diff --git a/languages/cpp/app_templates/kdevlang/app.tdevelop b/languages/cpp/app_templates/kdevlang/app.tdevelop new file mode 100644 index 00000000..3f477a08 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/app.tdevelop @@ -0,0 +1,115 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + C++ + Code + Qt + TDE + KDevelop + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + + + + src/%{APPNAMELC} + + + src/%{APPNAMELC} + + + + optimized + kdevgccoptions + kdevgppoptions + kdevg77options + -O2 -g0 + + + --enable-debug=full + debug + kdevgccoptions + kdevgppoptions + kdevg77options + -O0 -g3 + + + + + + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + w3c-svg + sw + w3c-uaag10 + wxwidgets_bugs + + + qmake User Guide + + + + + libtool + + + + + + + + + + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/kdevlang/kdevlang-configure.in.in b/languages/cpp/app_templates/kdevlang/kdevlang-configure.in.in new file mode 100644 index 00000000..2e3823b0 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang-configure.in.in @@ -0,0 +1,10 @@ +#MIN_CONFIG(3.0.0) + +AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION}) +AC_C_BIGENDIAN +AC_CHECK_TDEMAXPATHLEN + +KDE_CHECK_HEADERS([tdevelop/kdevcore.h]) +KDE_CHECK_LIB([tdevelop],main, + [LIBTDEVELOP="-ltdevelop"]) +AC_SUBST(LIBTDEVELOP) diff --git a/languages/cpp/app_templates/kdevlang/kdevlang.desktop b/languages/cpp/app_templates/kdevlang/kdevlang.desktop new file mode 100644 index 00000000..93bb3c3b --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=%{APPNAME} +Comment[pt]=%{APPNAME$} +Name=KDev%{APPNAME} +Name[nds]=KDev%{ProgNaam} +Name[sv]=TDevelop %{APPNAME} +Name[ta]=கெடெவ்%{APPNAME} +Icon=tdevelop +ServiceTypes=TDevelop/LanguageSupport +X-TDevelop-Language=ChangeMe +X-TDE-Library=libkdev%{APPNAMELC} +X-TDevelop-Version=3 diff --git a/languages/cpp/app_templates/kdevlang/kdevlang.kdevtemplate b/languages/cpp/app_templates/kdevlang/kdevlang.kdevtemplate new file mode 100644 index 00000000..6d852324 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang.kdevtemplate @@ -0,0 +1,157 @@ +# TDE Config File +[General] +Name=TDevelop Language Support Plugin (Standalone build) +Name[ca]=Connector per al suport de llenguatge a TDevelop (de construcció aïllada) +Name[da]=TDevelop plugin for sprogstøttet (alenestående bygning) +Name[de]=TDevelop-Modul für Sprachunterstützung (Unabhängige Erstellung) +Name[el]=Πρόσθετο υποστήριξης γλώσσας του TDevelop (αυτόνομη κατασκευή) +Name[es]=Complemento de implementación de lenguaje para TDevelop (construcción independiente) +Name[et]=TDevelopi keeletoetuse plugin (autonoomne) +Name[eu]=TDevelop-en lengoaien euskarrien interfazea (eraikuntza autonomoak) +Name[fa]=وصلۀ پشتیبانی زبان TDevelop )ساخت خوداتکا( +Name[fr]=Module externe de prise en charge de langage de TDevelop (construction autonome) +Name[ga]=Breiseán Tacaíochta Teanga le haghaidh TDevelop (Tógáil Shaorsheasaimh) +Name[gl]=Extensión de soporte de linguaxes para TDevelop (compilación independente) +Name[hu]=TDevelop nyelvtámogató modul (önálló) +Name[it]=Plugin di supporto per linguaggio di TDevelop (compilazione indipendente) +Name[ja]=TDevelop 言語サポートプラグイン (スタンダローンビルド) +Name[nds]=TDevelop-Moduul för Spraakünnerstütten (Enkelprogramm) +Name[ne]=केडीई विकास भाषा समर्थन प्लगइन (स्ट्यान्डअलोन निर्माण) +Name[nl]=TDEvelop Taalondersteuning Plugin (Standalone build) +Name[pl]=Wtyczka TDevelopa do obsługi języka (budowana oddzielnie) +Name[pt]='Plugin' de Suporte a Linguagens do TDevelop (compilação autónoma) +Name[pt_BR]='Plugin' de Suporte a Linguagens do TDevelop (compilação autónoma) +Name[ru]=Интерфейс языковой поддержки для TDevelop (внешний) +Name[sk]=TDevelop modul pre jazykovú podporu (samostatný build) +Name[sl]=Vstavek jezikovne podpore za TDevelop (samostojna izgradnja) +Name[sr]=TDevelop-ов интерфејс за језичку подршку (самостална градња) +Name[sr@Latn]=TDevelop-ov interfejs za jezičku podršku (samostalna gradnja) +Name[sv]=TDevelop-insticksprogram för språkstöd (att bygga fristående) +Name[tr]=TDevelop Dil Desteği Eklentisi (Kendi başına çalışabilen kurulum) +Name[zh_CN]=TDevelop 语言支持插件(独立编译) +Name[zh_TW]=TDevelop 語言支援外掛程式(單獨建立) +Category=C++/TDevelop/ +Comment=This generates a language support plugin for TDevelop, to be built outside of the TDevelop source tree. +Comment[ca]=Genera un connector per al suport de llenguatge a TDevelop, per a que es construeixi fora de l'arbre de fonts de TDevelop. +Comment[da]=Dette genererer en sprogstøtte-plugin for TDevelop, der skal bygges udenfor TDevelop's kildetræ. +Comment[de]=Hiermit wird ein Sprachunterstützungsmodul für TDevelop generiert, das außerhalb des Quelltextbaumes von TDevelop erstellt wird. +Comment[el]=Αυτό δημιουργεί ένα πρόσθετο υποστήριξης γλώσσας για το TDevelop, για την κατασκευή του έξω από το δέντρο πηγαίου κώδικα του TDevelop. +Comment[es]=Genera un complemento de implementación de lenguaje para TDevelop, para ser construido fuera del árbol de código fuente de TDevelop. +Comment[et]=TDevelopi keeletoetuse plugina loomine, mida saab ehitada väljaspool TDevelopi lähtekoodipuud. +Comment[eu]=Honek TDevelop-en lengoai-euskarrirako plugin bat sortzen du, TDevelop-en iturburu zuhaitzetik at eraikitzeko. +Comment[fa]=یک وصلۀ پشتیبان برای TDevelop تولید می‌کند، تا در بیرون درخت منبع TDevelop ساخته شود. +Comment[fr]=Génère un module externe de prise en charge de langage pour TDevelop, à construire en dehors de l'arborescence des sources de TDevelop. +Comment[gl]=Isto xera unha extensión de soporte de linguaxes para TDevelop que se compilará fóra da árbore de código de TDevelop. +Comment[hu]=Létrehoz egy nyelvtámogató modult a TDevelophoz, mely a TDevelopos forráskönyvtáron kívül fordítható le. +Comment[it]=Genera un plugin di supporto per linguaggio per TDevelop, deve essere compilato fuori dell'albero sorgente di TDevelop. +Comment[nds]=Dit stellt en Spraakünnerstütten-Moduul för TDevelop op, dat buten den TDevelop-Bornboom kompileert warrt. +Comment[ne]=यसले केडीई विकासका लागि केडीई विकास स्रोत ट्रीको बाहिर निर्माण गर्न, भाषा समर्थन प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Dit genereert een taalondersteuningsplugin voor TDEvelop, welke buiten de TDevelop sourcetree wordt gebouwd. +Comment[pl]=Generuje wtyczkę do obsługi języka w TDevelopie. Wtyczka jest budowana poza drzewem źródłowym TDevelopa. +Comment[pt]=Isto gera um 'plugin' de suporte de linguagens para o TDevelop, que possa ser compilado fora da árvore de código do TDevelop. +Comment[pt_BR]=Isto gera um 'plugin' de suporte de linguagens para o TDevelop, que possa ser compilado fora da árvore de código do TDevelop. +Comment[ru]=Создание интерфейса языковой поддержки для TDevelop со сборкой вне исходного кода TDevelop. +Comment[sk]=Vygeneruje modul pre jazykovú podporu pre TDevelop, tak aby ho bolo možné kompilovať mimo zdrojového stromu TDevelop. +Comment[sr]=Ово прави прикључак за језичку подршку за TDevelop, који се гради ван TDevelop-овог изворног стабла. +Comment[sr@Latn]=Ovo pravi priključak za jezičku podršku za TDevelop, koji se gradi van TDevelop-ovog izvornog stabla. +Comment[sv]=Detta skapar ett TDevelop-insticksprogram för språkstöd, att bygga utanför TDevelops källkodsträd. +Comment[tr]=Bu TDevelop için, TDevelop kaynak ağacının dışında olacak, bir dil desteği eklentisi yaratır. +Comment[zh_CN]=这将生成 TDevelop 的语言支持插件,可以在 TDevelop 源代码树之外编译。 +Comment[zh_TW]=產生一個 TDevelop 語言支援外掛程式,建立在 TDevelop 程式源碼樹之外。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}_part.cpp +Archive=kdevlang.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE5] +Type=install +Source=%{src}/kdevlang-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE6] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE7] +Type=install +Source=%{src}/kdevlang_part.cpp +Dest=%{dest}/src/%{APPNAMELC}_part.cpp + +[FILE8] +Type=install +Source=%{src}/kdevlang_part.h +Dest=%{dest}/src/%{APPNAMELC}_part.h + +[FILE9] +Type=install +EscapeXML=true +Source=%{src}/kdevlang.rc +Dest=%{dest}/src/kdev%{APPNAMELC}.rc + +[FILE10] +Type=install +Source=%{src}/kdevlang.desktop +Dest=%{dest}/src/kdev%{APPNAMELC}.desktop + +[FILE11] +Type=install +Source=%{src}/README.dox +Dest=%{dest}/src/README.dox + +[MSG] +Type=message +Comment=A language plugin for TDevelop for standalone build was created in %{dest} +Comment[ca]=Un connector per a llenguatge a TDevelop i de construcció aïllada ha estat creat en %{dest} +Comment[da]=Et sprog-plugin for TDevelop for alenestående bygning blev oprettet i %{dest} +Comment[de]=Ein Sprachunterstützungsmodul für TDevelop (unabhängige Erstellung) wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο γλώσσας για το TDevelop για αυτόνομη κατασκευή δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento de lenguaje para TDevelop de construcción independiente ha sido creado en %{dest} +Comment[et]=TDevelopi autonoomne keeleplugin loodi asukohta %{dest} +Comment[eu]=TDevelop-en hizkuntza plugin autonomo bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ زبان برای TDevelop جهت ساخت خوداتکا در %{dest} ایجاد شد +Comment[fr]=Un module externe de langage pour TDevelop à construire de façon autonome a été créé dans %{dest} +Comment[gl]=Creouse unha extensión de linguaxe para TDevelop a compilar de forma independente en %{dest} +Comment[hu]=Létrejött egy TDevelopos nyelvtámogató modul (önálló lefordításra) itt: %{dest} +Comment[it]=È stato creato un plugin di linguaggio per TDevelop per compilazione indipendente %{dest} +Comment[nds]=In %{dest} wöör en Spraakünnerstütten-Moduul för TDevelop (Enkelprogramm) opstellt +Comment[ne]=स्ट्यान्डअलोन निर्माण गर्न केडीई विकासका लागि भाषा प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een taalplugin voor TDevelop voor standalone build is aangemaakt in %{dest} +Comment[pl]=Wtyczka języka dla TDevelopa do budowy oddzielnie została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' de linguagens de compilação autónoma para o TDevelop em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' de linguagens de compilação autónoma para o TDevelop em %{dest} +Comment[ru]=Внешний интерфейс языковой поддержки для TDevelop создан в %{dest} +Comment[sk]=Modul pre jazykovú podporu pre TDevelop bol vutvorený v %{dest} +Comment[sr]=Језички прикључак за TDevelop за самосталну градњу направљен је у %{dest} +Comment[sr@Latn]=Jezički priključak za TDevelop za samostalnu gradnju napravljen je u %{dest} +Comment[sv]=Ett TDevelop-insticksprogram för språkstöd att bygga fristående skapades i %{dest} +Comment[tr]=Kendi başına çalışabilen bir TDevelop dil eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个独立编译的 TDevelop 语言插件 +Comment[zh_TW]=一個單獨建立的 TDevelop 語言外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kdevlang/kdevlang.png b/languages/cpp/app_templates/kdevlang/kdevlang.png new file mode 100644 index 00000000..840a953c Binary files /dev/null and b/languages/cpp/app_templates/kdevlang/kdevlang.png differ diff --git a/languages/cpp/app_templates/kdevlang/kdevlang.rc b/languages/cpp/app_templates/kdevlang/kdevlang.rc new file mode 100644 index 00000000..b4e153fa --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang.rc @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/languages/cpp/app_templates/kdevlang/kdevlang_part.cpp b/languages/cpp/app_templates/kdevlang/kdevlang_part.cpp new file mode 100644 index 00000000..559a931b --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang_part.cpp @@ -0,0 +1,154 @@ +%{CPP_TEMPLATE} + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//#include "%{APPNAMELC}_widget.h" +#include "%{APPNAMELC}_part.h" + +typedef KGenericFactory<%{APPNAME}Part> %{APPNAME}Factory; +K_EXPORT_COMPONENT_FACTORY( libkdev%{APPNAMELC}, %{APPNAME}Factory( "kdev%{APPNAMELC}" ) ); +static const KDevPluginInfo data("kdev%{APPNAMELC}"); + +%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList& ) +: KDevLanguageSupport(&data, parent, name ? name : "%{APPNAME}Part" ) +{ + setInstance(%{APPNAME}Factory::instance()); + setXMLFile("kdevlang_%{APPNAMELC}.rc"); + + + m_build = new TDEAction( i18n("&Run"), "exec",Key_F9,this, TQT_SLOT(slotRun()),actionCollection(), "build_execute" ); + + kdDebug() << "Creating %{APPNAMELC} Part" << endl; + + connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), + this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); + connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); + connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); + connect( partController(), TQT_SIGNAL(savedFile(const KURL&)), this, TQT_SLOT(savedFile(const KURL&)) ); + connect(partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(slotActivePartChanged(KParts::Part *))); +} + + +%{APPNAME}Part::~%{APPNAME}Part() +{ + delete m_build; +} + +KDevLanguageSupport::Features %{APPNAME}Part::features() +{ + return Features(Variables | Functions); +} +KMimeType::List %{APPNAME}Part::mimeTypes() +{ + KMimeType::List list; + + KMimeType::Ptr mime = KMimeType::mimeType( "application/x-shellscript" ); + if( mime ) + list << mime; + + return list; +} +void %{APPNAME}Part::slotRun() +{ + // Execute the application here. +} +void %{APPNAME}Part::projectConfigWidget(KDialogBase *dlg) +{ + Q_UNUSED( dlg ); + // Create your config dialog here. +} +void %{APPNAME}Part::projectOpened() +{ + kdDebug(9014) << "projectOpened()" << endl; + + connect( project(), TQT_SIGNAL(addedFilesToProject(const TQStringList &)), + this, TQT_SLOT(addedFilesToProject(const TQStringList &)) ); + connect( project(), TQT_SIGNAL(removedFilesFromProject(const TQStringList &)), + this, TQT_SLOT(removedFilesFromProject(const TQStringList &)) ); + + // We want to parse only after all components have been + // properly initialized + TQTimer::singleShot(0, this, TQT_SLOT(parse())); +} +void %{APPNAME}Part::projectClosed() +{ + +} +void %{APPNAME}Part::savedFile(const KURL &fileName) +{ + + + if (project()->allFiles().contains(fileName.path().mid ( project()->projectDirectory().length() + 1 ))) + { + kdDebug(9014) << "parse file " << fileName.path() << endl; + emit addedSourceInfo( fileName.path() ); + } +} +void %{APPNAME}Part::addedFilesToProject(const TQStringList &fileList) +{ + kdDebug(9014) << "addedFilesToProject()" << endl; + + TQStringList::ConstIterator it; + + for ( it = fileList.begin(); it != fileList.end(); ++it ) + { + kdDebug(9014) << "maybe parse " << project()->projectDirectory() + "/" + ( *it ) << endl; + } + + emit updatedSourceInfo(); +} +void %{APPNAME}Part::removedFilesFromProject(const TQStringList &fileList) +{ + + + TQStringList::ConstIterator it; + + for ( it = fileList.begin(); it != fileList.end(); ++it ) + { + TQString fileName = project()->projectDirectory() + "/" + ( *it ); + if( codeModel()->hasFile(fileName) ) + { + kdDebug(9014) << "removed " << fileName << endl; + emit aboutToRemoveSourceInfo( fileName ); + codeModel()->removeFile( codeModel()->fileByName(fileName) ); + } + } + +} +void %{APPNAME}Part::parse() +{ + kdDebug(9014) << "initialParse()" << endl; + + if (project()) + { + kapp->setOverrideCursor(waitCursor); + TQStringList files = project()->allFiles(); + for (TQStringList::Iterator it = files.begin(); it != files.end() ;++it) + { + kdDebug(9014) << "maybe parse " << project()->projectDirectory() + "/" + (*it) << endl; + } + emit updatedSourceInfo(); + kapp->restoreOverrideCursor(); + } else { + kdDebug(9014) << "No project" << endl; + } +} +void %{APPNAME}Part::slotActivePartChanged(KParts::Part *part) +{ + kdDebug() << "Changeing active part..." << endl; +} + +#include "%{APPNAMELC}_part.moc" diff --git a/languages/cpp/app_templates/kdevlang/kdevlang_part.h b/languages/cpp/app_templates/kdevlang/kdevlang_part.h new file mode 100644 index 00000000..1cce0fa6 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang_part.h @@ -0,0 +1,44 @@ +%{H_TEMPLATE} + +#ifndef __TDEVPART_%{APPNAMEUC}_H__ +#define __TDEVPART_%{APPNAMEUC}_H__ + + +#include +#include +#include +#include +#include + +class TDEAction; + +/* + Please read the README.dox file for more info about this part + */ +class %{APPNAME}Part : public KDevLanguageSupport +{ + Q_OBJECT + + public: + %{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &); + ~%{APPNAME}Part(); + protected: + virtual Features features(); + virtual KMimeType::List mimeTypes(); + + private slots: + void slotRun(); + void projectConfigWidget(KDialogBase *dlg); + void projectOpened(); + void projectClosed(); + void savedFile(const KURL &fileName); + void addedFilesToProject(const TQStringList &fileList); + void removedFilesFromProject(const TQStringList &fileList); + void parse(); + void slotActivePartChanged(KParts::Part *part); + private: + TDEAction *m_build; +}; + + +#endif diff --git a/languages/cpp/app_templates/kdevlang/src-Makefile.am b/languages/cpp/app_templates/kdevlang/src-Makefile.am new file mode 100644 index 00000000..18b7a21a --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/src-Makefile.am @@ -0,0 +1,14 @@ +AM_CPPFLAGS = -I$(kde_includes)/tdevelop/interfaces -I$(kde_includes)/tdevelop/util -I$(kde_includes)/kinterfacedesigner $(all_includes) + +kde_module_LTLIBRARIES = libkdev%{APPNAMELC}.la +libkdev%{APPNAMELC}_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) +libkdev%{APPNAMELC}_la_LIBADD = -ltdevelop +libkdev%{APPNAMELC}_la_SOURCES = %{APPNAMELC}_part.cpp + +METASOURCES = AUTO + +servicedir = $(kde_servicesdir) +service_DATA = kdev%{APPNAMELC}.desktop + +rcdir = $(kde_datadir)/kdev%{APPNAMELC} +rc_DATA = kdev%{APPNAMELC}.rc diff --git a/languages/cpp/app_templates/kdevpart/CMakeLists.txt b/languages/cpp/app_templates/kdevpart/CMakeLists.txt new file mode 100644 index 00000000..53293ea9 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/CMakeLists.txt @@ -0,0 +1,29 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_custom_target( kdevpart.tar.gz ALL + COMMAND tar zcf kdevpart.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + src-Makefile.am kdevpart_part.cpp kdevpart_part.h + kdevpart_widget.h kdevpart_widget.cpp kdevpart_part.rc + kdevpart.desktop app.tdevelop README.dox + globalconfigbase.ui globalconfig.h globalconfig.cpp + projectconfigbase.ui projectconfig.h projectconfig.cpp +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kdevpart.tar.gz kdevpart.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kdevpart.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kdevpart/Makefile.am b/languages/cpp/app_templates/kdevpart/Makefile.am new file mode 100644 index 00000000..11c12dfe --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/Makefile.am @@ -0,0 +1,19 @@ +dataFiles = src-Makefile.am kdevpart_part.cpp kdevpart_part.h \ + kdevpart_widget.h kdevpart_widget.cpp kdevpart_part.rc \ + kdevpart.desktop app.tdevelop README.dox globalconfigbase.ui globalconfig.h \ + globalconfig.cpp projectconfigbase.ui projectconfig.h projectconfig.cpp +templateName = kdevpart + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/cpp/app_templates/kdevpart/README.dox b/languages/cpp/app_templates/kdevpart/README.dox new file mode 100644 index 00000000..7069f3a5 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/README.dox @@ -0,0 +1,55 @@ +/** \class %{APPNAME} +Put a brief description here, the brief description ends at the first dot. +Put a more detailed description of your part in these lines. It can span +over several lines. You can even use some html commands in these lines like: +This is code, html links link text, +and images. + +\authors %{AUTHOR} +\authors 2nd author full name +... +\authors nth author full name + +\maintainer %{AUTHOR} +\maintainer 2nd maintainer full name +... +\maintainer nth maintainer full name + +\feature Describe the first feature +\feature Describe the second feature +... +\feature Describe the last feature + +\bug bugs in +YOUR_COMPONENT_NAME at Bugzilla database +\bug Describe a the 1st bug that you know of, but probably hasn't been reported yet. +.. +\bug Describe a the nth bug that you know of, but probably hasn't been reported yet. + +\requirement Describe a the 1st requirement of your part. +\requirement Describe a the 2nd requirement of your part. +... +\requirement Describe a the nth requirement of your part. + +\todo Describe a the 1st TODO of your part. +\todo Describe a the 2nd TODO of your part. +... +\todo Describe a the nth TODO of your part. + +\faq First frequenly asked question about your part ? Answer. +\faq Second frequenly asked question about your part ? Answer. +... +\faq Last frequenly asked question about your part ? Answer. + +\note First note text. +\note Second note text. +... +\note Last note text. + +\warning First warning text. +\warning Second warning text. +... +\warning Last warning text. + +*/ diff --git a/languages/cpp/app_templates/kdevpart/app.tdevelop b/languages/cpp/app_templates/kdevpart/app.tdevelop new file mode 100644 index 00000000..d16492cd --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/app.tdevelop @@ -0,0 +1,116 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + C++ + Code + Qt + TDE + KDevelop + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + + + + src/%{APPNAMELC} + debug + + + src/%{APPNAMELC} + + + + optimized + kdevgccoptions + kdevgppoptions + kdevg77options + -O2 -g0 + + + --enable-debug=full + debug + kdevgccoptions + kdevgppoptions + kdevg77options + -O0 -g3 + + + + + + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + w3c-svg + sw + w3c-uaag10 + wxwidgets_bugs + + + qmake User Guide + + + + + libtool + + + + + + + + + + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/kdevpart/globalconfig.cpp b/languages/cpp/app_templates/kdevpart/globalconfig.cpp new file mode 100644 index 00000000..cddf3e7e --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/globalconfig.cpp @@ -0,0 +1,15 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}globalconfig.h" + +#include "%{APPNAMELC}part.h" + +%{APPNAME}GlobalConfig::%{APPNAME}GlobalConfig(%{APPNAME}Part *part, TQWidget *parent, const char *name) + : %{APPNAME}GlobalConfigBase(parent, name), m_part(part) +{ +} + +void %{APPNAME}GlobalConfig::accept() +{ +} + +#include "%{APPNAMELC}globalconfig.moc" diff --git a/languages/cpp/app_templates/kdevpart/globalconfig.h b/languages/cpp/app_templates/kdevpart/globalconfig.h new file mode 100644 index 00000000..723dbae2 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/globalconfig.h @@ -0,0 +1,23 @@ +%{H_TEMPLATE} +#ifndef %{APPNAMEUC}_GLOBAL_CONFIG_H +#define %{APPNAMEUC}_GLOBAL_CONFIG_H + +#include "%{APPNAMELC}globalconfigbase.h" + +class %{APPNAME}Part; + +class %{APPNAME}GlobalConfig: public %{APPNAME}GlobalConfigBase +{ + Q_OBJECT + +public: + %{APPNAME}GlobalConfig(%{APPNAME}Part *part, TQWidget *parent = 0, const char *name = 0); + +public slots: + void accept(); + +private: + %{APPNAME}Part *m_part; +}; + +#endif diff --git a/languages/cpp/app_templates/kdevpart/globalconfigbase.ui b/languages/cpp/app_templates/kdevpart/globalconfigbase.ui new file mode 100644 index 00000000..588f9dc9 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/globalconfigbase.ui @@ -0,0 +1,20 @@ + +%{APPNAME}GlobalConfigBase + + + %{APPNAME}GlobalConfigBase + + + + 0 + 0 + 600 + 480 + + + + %{APPNAME} + + + + diff --git a/languages/cpp/app_templates/kdevpart/kdevpart.desktop b/languages/cpp/app_templates/kdevpart/kdevpart.desktop new file mode 100644 index 00000000..a3029ac6 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart.desktop @@ -0,0 +1,83 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Name=KDev%{APPNAME} +Name[nds]=KDev%{ProgNaam} +Name[sv]=TDevelop %{APPNAME} +Name[ta]=கெடெவ்%{APPNAME} +GenericName=%{APPNAME} Plugin +GenericName[br]=Lugent %{APPNAME} +GenericName[ca]=Connector per a %{APPNAME} +GenericName[da]=%{APPNAME} plugin +GenericName[de]=%{APPNAME}-Modul +GenericName[el]=Πρόσθετο %{APPNAME} +GenericName[es]=Complemento %{APPNAME} +GenericName[et]=%{APPNAME} plugin +GenericName[eu]=%{APPNAME} plugina +GenericName[fa]=وصلۀ %{APPNAME} +GenericName[fr]=Module externe pour %{APPNAME} +GenericName[ga]=Breiseán %{APPNAME} +GenericName[gl]=Extensión %{APPNAME} +GenericName[hu]=%{APPNAME}-bővítőmodul +GenericName[it]=Plugin %{APPNAME} +GenericName[ja]=%{APPNAME} プラグイン +GenericName[nds]=%{APPNAME}-Moduul +GenericName[ne]=%{APPNAME} प्लगइन +GenericName[nl]=%{APPNAME}-plugin +GenericName[pl]=Wtyczka %{APPNAME} +GenericName[pt]='Plugin' %{APPNAME} +GenericName[pt_BR]=Plug-in do %{APPNAME} +GenericName[ru]=Модуль %{APPNAME} +GenericName[sk]=%{APPNAME} modul +GenericName[sl]=Vstavek za %{APPNAME} +GenericName[sr]=%{APPNAME} прикључак +GenericName[sr@Latn]=%{APPNAME} priključak +GenericName[sv]=%{APPNAME} insticksprogram +GenericName[tr]=%{APPNAME} Eklentisi +GenericName[zh_CN]=%{APPNAME} 插件 +GenericName[zh_TW]=%{APPNAME} 外掛程式 +Comment=%{APPNAME} Description +Comment[br]=Deskrivadur %{APPNAME} +Comment[ca]=Descripció per a %{APPNAME} +Comment[da]=%{APPNAME} beskrivelse +Comment[de]=%{APPNAME} Beschreibung +Comment[el]=Περιγραφή %{APPNAME} +Comment[es]=Descripción de %{APPNAME} +Comment[et]=%{APPNAME} kirjeldus +Comment[eu]=%{APPNAME} deskribapena +Comment[fa]=توصیف %{APPNAME} +Comment[fr]=Description pour %{APPNAME} +Comment[ga]=Cur Síos %{APPNAME} +Comment[gl]=Descripción de %{APPNAME} +Comment[hu]=%{APPNAME} leírása +Comment[it]=Descrizione %{APPNAME} +Comment[ja]=%{APPNAME} 概説 +Comment[nds]=%{APPNAME}-Beschrieven +Comment[ne]=%{APPNAME} वर्णन +Comment[nl]=%{APPNAME} omschrijving +Comment[pl]=Opis %{APPNAME} +Comment[pt]=Descrição de %{APPNAME$} +Comment[pt_BR]=Descrição do %{APPNAME} +Comment[ru]=Описание %{APPNAME} +Comment[sk]=%{APPNAME} popis +Comment[sl]=Opis za %{APPNAME} +Comment[sr]=Опис за %{APPNAME} +Comment[sr@Latn]=Opis za %{APPNAME} +Comment[sv]=%{APPNAME} beskrivning +Comment[tr]=%{APPNAME} Tanımı +Comment[zh_CN]=%{APPNAME} 描述 +Comment[zh_TW]=%{APPNAME} 描述 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin + +X-TDevelop-Plugin-Version=1 +X-TDevelop-Plugin-Homepage= +X-TDevelop-Plugin-BugsEmailAddress=%{EMAIL} +X-TDevelop-Plugin-Copyright=(C) by %{AUTHOR} + +X-TDevelop-Args= + +X-TDevelop-Scope=%{SCOPE} +X-TDE-Library=libkdev%{APPNAMELC} +X-TDevelop-Version=3 +X-TDevelop-Properties=%{PROPS} diff --git a/languages/cpp/app_templates/kdevpart/kdevpart.kdevtemplate b/languages/cpp/app_templates/kdevpart/kdevpart.kdevtemplate new file mode 100644 index 00000000..c1860597 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart.kdevtemplate @@ -0,0 +1,242 @@ +# TDE Config File +[General] +Name=TDevelop Plugin (TDevelop source tree build) +Name[ca]=Connector per a TDevelop (de construcció a l'arbre de fonts de TDevelop) +Name[da]=TDevelop Plugin (TDevelop kildetræ bygning) +Name[de]=TDevelop-Modul (Erstellung im TDevelop-Quelltextbaum) +Name[el]=Πρόσθετο TDevelop (κατασκευή με το δέντρο πηγαίου κώδικα του TDevelop) +Name[es]=Complemento para TDevelop (construcción en árbol de código fuente de TDevelop) +Name[et]=TDevelopi plugin (Kdevelopi lähtekoodipuus) +Name[eu]=TDevelop plugina (TDevelop-en iturburu zuhaitzean erakitzeko) +Name[fa]=وصلۀ TDevelop )ساخت درخت منبع TDevelop( +Name[fr]=Module externe de TDevelop (construction dans l'arborescence des sources de TDevelop) +Name[gl]=Extensión para TDevelop (compilación na árbore de código de TDevelop) +Name[hu]=TDevelop-bővítőmodul (TDevelopos forráskönyvtáron belül) +Name[it]=Plugin di TDevelop (compila l'albero sorgente di TDevelop) +Name[ja]=TDevelop プラグイン (TDevelop ソースツリービルド) +Name[nds]=TDevelop-Moduul (TDevelop-Bornboomprogramm) +Name[ne]=केडीई विकास प्लगइन (केडीई विकास स्रोत ट्री निर्माण) +Name[nl]=TDevelop-plugin (TDevelop source tree build) +Name[pl]=Wtyczka TDevelopa (budowa w drzewie źródłowym TDevelopa) +Name[pt]='Plugin' do TDevelop (compilação na árvore de código do TDevelop) +Name[pt_BR]='Plugin' do TDevelop (compilação na árvore de código do TDevelop) +Name[ru]=Модуль TDevelop (в исходном коде TDevelop) +Name[sk]=TDevelop modul (TDevelop zdrojový strom build) +Name[sr]=Прикључак за TDevelop (градња у изворном стаблу TDevelop-а) +Name[sr@Latn]=Priključak za TDevelop (gradnja u izvornom stablu TDevelop-a) +Name[sv]=TDevelop-insticksprogram (att bygga i TDevelops källkodsträd) +Name[tr]=TDevelop Eklentisi (TDevelop kaynak ağacı kurulumu) +Name[zh_CN]=TDevelop 插件(TDevelop 源代码树编译) +Name[zh_TW]=TDevelop 外掛程式(TDevelop 程式源碼樹內建立) +Category=C++/TDevelop/ +Comment=This generates a plugin for TDevelop, for building within the TDevelop source tree +Comment[ca]=Genera un connector per a TDevelop, per a que es construeixi en l'arbre de fonts de TDevelop +Comment[da]=Dette genererer et plugin for TDevelop, til at bygges indenfor TDevelop's kildetræ +Comment[de]=Hiermit wird ein Modul für TDevelop erstellt, dessen Erstellung innerhalb des Quelltextbaumes von TDevelop erfolgt. +Comment[el]=Αυτό δημιουργεί ένα πρόσθετο για το TDevelop, για κατασκευή του μέσα στο δέντρο πηγαίου κώδικα του TDevelop +Comment[es]=Genera un complemento para TDevelop, para ser construido en el árbol de código fuente de TDevelop +Comment[et]=TDevelopi plugina loomine, mis ehitatakse TDevelopi lähtekoodipuus. +Comment[eu]=Honek TDevelop-erako plugin bat sortzen du, TDevelop-en iturburu-zuhaitzean eraikitzeko +Comment[fa]=وصله‌ای برای TDevelop، برای ساختن در درخت منبع TDevelop تولید می‌کند +Comment[fr]=Génère un module externe pour TDevelop, à construire dans l'arborescence des sources de TDevelop +Comment[gl]=Isto xera unha extensión para TDevelop que se compilará dentro da árbore de código de TDevelop +Comment[hu]=Létrehoz egy TDevelop-bővítőmodult, mely a TDevelopos forráskönyvtáron belül fordítható le +Comment[it]=Genera un plugin per TDevelop, per compilarlo assieme all'albero sorgente di TDevelop +Comment[nds]=Dit stellt en TDevelop-Moduul för't Kompileren binnen den TDevelop-Bornboom op +Comment[ne]=यसले केडीई विकास स्रोत ट्री भित्र निर्माण गर्न, केडीई विकासका लागि प्लगइन उत्पन्न गर्दछ +Comment[nl]=Dit genereert een plugin voor TDevelop, om te bouwen binnen de TDevelop sourcetree +Comment[pl]=Generuje wtyczkę do TDevelopa, która jest budowana w jego drzewie źródłowym +Comment[pt]=Isto gera um 'plugin' para o TDevelop, para uma compilação dentro da árvore de código do TDevelop +Comment[pt_BR]=Isto gera um 'plugin' para o TDevelop, para uma compilação dentro da árvore de código do TDevelop +Comment[ru]=Создание модуля TDevelop в исходном коде TDevelop +Comment[sk]=Vygeneruje modul pre TDevelop, ktorý sa bude kompilovať v rámci TDevelop zdrojového stromu +Comment[sr]=Ово прави прикључак за TDevelop, за градњу у оквиру TDevelop-овог изворног стабла +Comment[sr@Latn]=Ovo pravi priključak za TDevelop, za gradnju u okviru TDevelop-ovog izvornog stabla +Comment[sv]=Det här skapar ett insticksprogram för TDevelop, att byggas inne i TDevelops källkodsträd. +Comment[tr]=Bu TDevelop için, TDevelop kaynak ağacınında olacak, bir eklenti yaratır. +Comment[zh_CN]=这将生成 TDevelop 的插件,该插件需要与 TDevelop 源代码树一起编译 +Comment[zh_TW]=產生一個 TDevelop 外掛程式,建立於 TDevelop 程式源碼樹內。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}part.cpp +Archive=kdevpart.tar.gz + +[SCOPE] +Type = value +ValueType=QString +Value= SCOPE +Comment= The scope of a plugin (Global, Project, Core) +Comment[ca]= L'àmbit d'un connector (Global, Project, Core) +Comment[da]= Et plugins omfang (Globalt, Projekt, Kerne) +Comment[de]= Gültigkeitsbereich eines Moduls (Global, Projekt, Kern) +Comment[el]= Η εμβέλεια ενός πρόσθετου (Καθολική, Έργο, Πυρήνας) +Comment[es]=El alcance de un complemento (global, proyecto, núcleo) +Comment[et]=Plugina skoop (globaalne, projekt, tuum) +Comment[eu]= Pluginaren barrutia (Globala, Projektua, Nukleoa) +Comment[fa]=دامنۀ یک وصله )سراسری، پروژه، هسته( +Comment[fr]= La portée d'un module externe (globale, projet, core) +Comment[ga]= Scóip an bhreiseáin (Comhchoiteann, Tionscadal, Ceartlár) +Comment[gl]=Ámbito da extensión (Global, Proxecto, Núcleo) +Comment[hu]=A modul hatóköre (globális, projektszintű, alap) +Comment[it]=Il contesto di un plugin (Globale, Progetto, Core) +Comment[nds]= Dat Rebeet vun en Moduul (Globaal, Projekt, Karn) +Comment[ne]= प्लगइनको क्षेत्र (विश्वव्यापी, परियोजना, कोर) +Comment[nl]=Het bereik van een plugin (globaal, project, core) +Comment[pl]=Przynależność wtyczki (globalna, projekt, część główna) +Comment[pt]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) +Comment[pt_BR]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) +Comment[ru]=Тип модуля (Global, Project, Core) +Comment[sk]=Rozsah module (globálny, projektový, jadrový) +Comment[sr]=Опсег прикључка (глобални, пројекат, језгро) +Comment[sr@Latn]=Opseg priključka (globalni, projekat, jezgro) +Comment[sv]=Insticksprogrammets omfattning (Global, Projekt, Kärna) +Comment[tr]=Bir eklentinin alanı (Genel, Proje, İç) +Comment[zh_CN]=插件的范围(全局、工程、核心) +Comment[zh_TW]=外掛程式的範圍(全域、專案、核心) +Default= Global + +[PROPS] +Type = value +ValueType=QString +Value= PROPS +Comment= The list of supported TDevelop properties +Comment[ca]= La llista de propietats suportades del TDevelop +Comment[da]= Listen af understøttede TDevelop-egenskaber +Comment[de]= Die Liste der unterstützten TDevelop-Eigenschaften +Comment[el]= Η λίστα των υποστηριζόμενων ιδιοτήτων του TDevelop +Comment[es]=La lista de propiedades de TDevelop soportadas +Comment[et]= TDevelopi toetatud omaduste nimekiri +Comment[eu]= Onartzen diren TDevelop-en propietateen zerrenda +Comment[fa]=فهرست ویژگیهای پشتیبانی‌شدۀ TDevelop +Comment[fr]= La liste des propriétés de TDevelop prises en charge +Comment[ga]= Liosta d'airíonna TDevelop a dtacaítear leo +Comment[gl]=Lista das propiedades de TDevelop soportadas +Comment[hu]=A támogatott TDevelop-tulajdonságok +Comment[it]=Lista delle proprietà supportate da TDevelop +Comment[nds]= De List mit ünnerstütt TDevelop-Egenschappen +Comment[ne]= केडीई विकास समर्थन गर्ने गुणको सूची +Comment[nl]=De lijst met ondersteunde TDevelop-properties +Comment[pl]= Lista obsługiwanych właściwości TDevelopa +Comment[pt]= A lista de propriedades do TDevelop suportadas +Comment[pt_BR]= A lista de propriedades do TDevelop suportadas +Comment[ru]=Список поддерживаемых типов модулей для TDevelop +Comment[sk]=Zoznam podporovaných vlastností TDevelop +Comment[sl]=Seznam podprtih lastnosti TDevelop +Comment[sr]=Листа подржаних TDevelop-ових својстава +Comment[sr@Latn]=Lista podržanih TDevelop-ovih svojstava +Comment[sv]=Listan med egenskaper i TDevelop som stöds +Comment[tr]=Desteklenen TDevelop özellikleri +Comment[zh_CN]=列出支持的 TDevelop 属性 +Comment[zh_TW]=支援的 TDevelop 屬性列表 +Default= + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/kdevpart_part.cpp +Dest=%{dest}/%{APPNAMELC}part.cpp + +[FILE4] +Type=install +Source=%{src}/kdevpart_part.h +Dest=%{dest}/%{APPNAMELC}part.h + +[FILE5] +Type=install +Source=%{src}/kdevpart_widget.cpp +Dest=%{dest}/%{APPNAMELC}widget.cpp + +[FILE6] +Type=install +Source=%{src}/kdevpart_widget.h +Dest=%{dest}/%{APPNAMELC}widget.h + +[FILE7] +Type=install +EscapeXML=true +Source=%{src}/kdevpart_part.rc +Dest=%{dest}/kdev%{APPNAMELC}.rc + +[FILE71] +Type=install +EscapeXML=true +Source=%{src}/globalconfigbase.ui +Dest=%{dest}/%{APPNAMELC}globalconfigbase.ui + +[FILE711] +Type=install +Source=%{src}/globalconfig.h +Dest=%{dest}/%{APPNAMELC}globalconfig.h + +[FILE712] +Type=install +Source=%{src}/globalconfig.cpp +Dest=%{dest}/%{APPNAMELC}globalconfig.cpp + +[FILE72] +Type=install +EscapeXML=true +Source=%{src}/projectconfigbase.ui +Dest=%{dest}/%{APPNAMELC}projectconfigbase.ui + +[FILE721] +Type=install +Source=%{src}/projectconfig.h +Dest=%{dest}/%{APPNAMELC}projectconfig.h + +[FILE722] +Type=install +Source=%{src}/projectconfig.cpp +Dest=%{dest}/%{APPNAMELC}projectconfig.cpp + +[FILE8] +Type=install +Source=%{src}/kdevpart.desktop +Dest=%{dest}/kdev%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{src}/README.dox +Dest=%{dest}/README.dox + +[MSG] +Type=message +Comment=A TDevelop plugin was created in %{dest} +Comment[ca]=Un connector per a TDevelop ha estat creat en %{dest} +Comment[da]=Et TDevelop plugin blev oprettet i %{dest} +Comment[de]=Ein TDevelop-Modul wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο του TDevelop δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para TDevelop ha sido creado en %{dest} +Comment[et]=TDevelopi plugin loodi asukohta %{dest} +Comment[eu]=TDevelop plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ TDevelop در %{dest} ایجاد شد +Comment[fr]=Un module externe pour TDevelop a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán TDevelop i %{dest} +Comment[gl]=Creouse unha extensión para TDevelop en %{dest} +Comment[hu]=Létrejött egy TDevelop-bővítőmodul itt: %{dest} +Comment[it]=È stato creato un plugin per TDevelop in %{dest} +Comment[ja]=TDevelop プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDevelop-Moduul opstellt +Comment[ne]=केडीई विकास प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Er is een TDevelop-plugin aangemaakt in %{dest} +Comment[pl]=Wtyczka do TDevelopa została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' do TDevelop em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' do TDevelop em %{dest} +Comment[ru]=Модуль TDevelop создан в %{dest} +Comment[sk]=TDevelop modul bol vytvorený v %{dest} +Comment[sl]=Vstavek za TDevelop je bil ustvarjen v %{dest} +Comment[sr]=Прикључак за TDevelop направљен је у %{dest} +Comment[sr@Latn]=Priključak za TDevelop napravljen je u %{dest} +Comment[sv]=Ett insticksprogram för TDevelop skapades i %{dest} +Comment[tr]=Bir TDevelop eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 TDevelop 插件 +Comment[zh_TW]=一個 TDevelop 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kdevpart/kdevpart.png b/languages/cpp/app_templates/kdevpart/kdevpart.png new file mode 100644 index 00000000..840a953c Binary files /dev/null and b/languages/cpp/app_templates/kdevpart/kdevpart.png differ diff --git a/languages/cpp/app_templates/kdevpart/kdevpart_part.cpp b/languages/cpp/app_templates/kdevpart/kdevpart_part.cpp new file mode 100644 index 00000000..aa950c8a --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart_part.cpp @@ -0,0 +1,183 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}part.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "%{APPNAMELC}widget.h" +#include "%{APPNAMELC}globalconfig.h" +#include "%{APPNAMELC}projectconfig.h" + +typedef KDevGenericFactory<%{APPNAME}Part> %{APPNAME}Factory; +KDevPluginInfo data("kdev%{APPNAMELC}"); +K_EXPORT_COMPONENT_FACTORY( libkdev%{APPNAMELC}, %{APPNAME}Factory( data ) ); + +#define GLOBALDOC_OPTIONS 1 +#define PROJECTDOC_OPTIONS 2 + +%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &/*args*/) + : KDevPlugin(&data, parent, name ? name : "%{APPNAME}Part") +{ + setInstance(%{APPNAME}Factory::instance()); + setXMLFile("kdev%{APPNAMELC}.rc"); + + m_widget = new %{APPNAME}Widget(this); + m_widget->setCaption("widget caption"); + m_widget->setIcon(SmallIcon(info()->icon())); + + TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); + + // now you decide what should happen to the widget. Take a look at kdevcore.h + // or at other plugins how to embed it. + + // if you want to embed your widget as an outputview, simply uncomment + // the following line. + // mainWindow()->embedOutputView( m_widget, "name that should appear", "enter a tooltip" ); + + // if you want to embed your widget as a selectview (at the left), simply uncomment + // the following line. + // mainWindow()->embedSelectView( m_widget, "name that should appear", "enter a tooltip" ); + + // if you want to embed your widget as a selectview (at the right), simply uncomment + // the following line. + // mainWindow()->embedSelectViewRight( m_widget, "name that should appear", "enter a tooltip" ); + + setupActions(); + + m_configProxy = new ConfigWidgetProxy(core()); + m_configProxy->createGlobalConfigPage(i18n("%{APPNAME}"), GLOBALDOC_OPTIONS, info()->icon()); + m_configProxy->createProjectConfigPage(i18n("%{APPNAME}"), PROJECTDOC_OPTIONS, info()->icon()); + connect(m_configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), + this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int))); + + connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); + connect(core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened())); + connect(core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); + + + TQTimer::singleShot(0, this, TQT_SLOT(init())); +} + +%{APPNAME}Part::~%{APPNAME}Part() +{ +// if you embed a widget, you need to tell the mainwindow when you remove it +// if ( m_widget ) +// { +// mainWindow()->removeView( m_widget ); +// } + delete m_widget; + delete m_configProxy; +} + +void %{APPNAME}Part::init() +{ +// delayed initialization stuff goes here +} + +void %{APPNAME}Part::setupActions() +{ +// create XMLGUI actions here + action = new TDEAction(i18n("&Do Something..."), 0, + this, TQT_SLOT(doSomething()), actionCollection(), "plugin_action" ); + action->setToolTip(i18n("Do something")); + action->setWhatsThis(i18n("Do something

    Describe here what does this action do.")); +} + +void %{APPNAME}Part::insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo) +{ +// create configuraton dialogs here + switch (pageNo) + { + case GLOBALDOC_OPTIONS: + { + %{APPNAME}GlobalConfig *w = new %{APPNAME}GlobalConfig(this, page, "global config"); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); + break; + } + case PROJECTDOC_OPTIONS: + { + %{APPNAME}ProjectConfig *w = new %{APPNAME}ProjectConfig(this, page, "project config"); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); + break; + } + } +} + +void %{APPNAME}Part::contextMenu(TQPopupMenu *popup, const Context *context) +{ +// put actions into the context menu here + if (context->hasType(Context::EditorContext)) + { + // editor context menu + const EditorContext *econtext = static_cast(context); + + // use context and plug actions here + action->plug(popup); + + // or create menu items on the fly + // int id = -1; + // id = popup->insertItem(i18n("Do Something Here"), + // this, TQT_SLOT(doSomething()) ); + // popup->setWhatsThis(id, i18n("Do something here

    Describe here what does this action do." + } + else if (context->hasType(Context::FileContext)) + { + // file context menu + const FileContext *fcontext = static_cast(context); + + //use context and plug actions here + } + else if (context->hasType(Context::ProjectModelItemContext)) + { + // project tree context menu + const ProjectModelItemContext *pcontext = static_cast(context); + + // use context and plug actions here + } + else if (context->hasType(Context::CodeModelItemContext)) + { + // class tree context menu + const CodeModelItemContext *mcontext = static_cast(context); + + // use context and plug actions here + } + else if (context->hasType(Context::DocumentationContext)) + { + // documentation viewer context menu + const DocumentationContext *dcontext = static_cast(context); + + // use context and plug actions here + } +} + +void %{APPNAME}Part::projectOpened() +{ +// do something when the project is opened +} + +void %{APPNAME}Part::projectClosed() +{ +// do something when the project is closed +} + +void %{APPNAME}Part::doSomething() +{ +// do something useful here instead of showing the message box + KMessageBox::information(m_widget, i18n("This action does nothing."), i18n("%{APPNAME} Plugin")); +} + +#include "%{APPNAMELC}part.moc" diff --git a/languages/cpp/app_templates/kdevpart/kdevpart_part.h b/languages/cpp/app_templates/kdevpart/kdevpart_part.h new file mode 100644 index 00000000..9414d448 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart_part.h @@ -0,0 +1,46 @@ +%{H_TEMPLATE} +#ifndef TDEV%{APPNAMEUC}_H +#define TDEV%{APPNAMEUC}_H + +#include + +#include + +class TQPopupMenu; +class TDEAction; +class KDialogBase; +class Context; +class ConfigWidgetProxy; +class %{APPNAME}Widget; + +/** +Please read the README.dox file for more info about this part +*/ +class %{APPNAME}Part: public KDevPlugin +{ + Q_OBJECT + +public: + %{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &args); + ~%{APPNAME}Part(); + +private slots: + void init(); + + void insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo); + void contextMenu(TQPopupMenu *popup, const Context *context); + void projectOpened(); + void projectClosed(); + + void doSomething(); + +private: + void setupActions(); + + TDEAction *action; + + TQGuardedPtr<%{APPNAME}Widget> m_widget; + ConfigWidgetProxy *m_configProxy; +}; + +#endif diff --git a/languages/cpp/app_templates/kdevpart/kdevpart_part.rc b/languages/cpp/app_templates/kdevpart/kdevpart_part.rc new file mode 100644 index 00000000..a38ee14e --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart_part.rc @@ -0,0 +1,11 @@ + + + +

    &Tools + + + + + + + diff --git a/languages/cpp/app_templates/kdevpart/kdevpart_widget.cpp b/languages/cpp/app_templates/kdevpart/kdevpart_widget.cpp new file mode 100644 index 00000000..65bb996e --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart_widget.cpp @@ -0,0 +1,21 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}widget.h" + +#include +#include +#include + +#include + +#include "%{APPNAMELC}part.h" + +%{APPNAME}Widget::%{APPNAME}Widget(%{APPNAME}Part *part) + : TQWidget(0, "%{APPNAMELC} widget"), m_part(part) +{ +} + +%{APPNAME}Widget::~%{APPNAME}Widget() +{ +} + +#include "%{APPNAMELC}widget.moc" diff --git a/languages/cpp/app_templates/kdevpart/kdevpart_widget.h b/languages/cpp/app_templates/kdevpart/kdevpart_widget.h new file mode 100644 index 00000000..e54abd4d --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart_widget.h @@ -0,0 +1,24 @@ +%{H_TEMPLATE} +#ifndef %{APPNAMEUC}_WIDGET_H +#define %{APPNAMEUC}_WIDGET_H + +#include +#include + +class KDevProject; +class %{APPNAME}Part; + +class %{APPNAME}Widget: public TQWidget +{ + Q_OBJECT + +public: + %{APPNAME}Widget(%{APPNAME}Part *part); + ~%{APPNAME}Widget(); + +private: + %{APPNAME}Part *m_part; +}; + + +#endif diff --git a/languages/cpp/app_templates/kdevpart/projectconfig.cpp b/languages/cpp/app_templates/kdevpart/projectconfig.cpp new file mode 100644 index 00000000..42a9f3e7 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/projectconfig.cpp @@ -0,0 +1,15 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}projectconfig.h" + +#include "%{APPNAMELC}part.h" + +%{APPNAME}ProjectConfig::%{APPNAME}ProjectConfig(%{APPNAME}Part *part, TQWidget *parent, const char *name) + : %{APPNAME}ProjectConfigBase(parent, name), m_part(part) +{ +} + +void %{APPNAME}ProjectConfig::accept() +{ +} + +#include "%{APPNAMELC}projectconfig.moc" diff --git a/languages/cpp/app_templates/kdevpart/projectconfig.h b/languages/cpp/app_templates/kdevpart/projectconfig.h new file mode 100644 index 00000000..49d4f089 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/projectconfig.h @@ -0,0 +1,23 @@ +%{H_TEMPLATE} +#ifndef %{APPNAMEUC}_PROJECT_CONFIG_H +#define %{APPNAMEUC}_PROJECT_CONFIG_H + +#include "%{APPNAMELC}projectconfigbase.h" + +class %{APPNAME}Part; + +class %{APPNAME}ProjectConfig: public %{APPNAME}ProjectConfigBase +{ + Q_OBJECT + +public: + %{APPNAME}ProjectConfig(%{APPNAME}Part *part, TQWidget *parent = 0, const char *name = 0); + +public slots: + void accept(); + +private: + %{APPNAME}Part *m_part; +}; + +#endif diff --git a/languages/cpp/app_templates/kdevpart/projectconfigbase.ui b/languages/cpp/app_templates/kdevpart/projectconfigbase.ui new file mode 100644 index 00000000..30849e54 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/projectconfigbase.ui @@ -0,0 +1,20 @@ + +%{APPNAME}ProjectConfigBase + + + %{APPNAME}ProjectConfigBase + + + + 0 + 0 + 600 + 480 + + + + %{APPNAME} + + + + diff --git a/languages/cpp/app_templates/kdevpart/src-Makefile.am b/languages/cpp/app_templates/kdevpart/src-Makefile.am new file mode 100644 index 00000000..5fe18f43 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/src-Makefile.am @@ -0,0 +1,20 @@ +INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) + +kde_module_LTLIBRARIES = libkdev%{APPNAMELC}.la +libkdev%{APPNAMELC}_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) $(KDE_PLUGIN) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) +libkdev%{APPNAMELC}_la_LIBADD = $(top_builddir)/lib/libtdevelop.la + +libkdev%{APPNAMELC}_la_SOURCES = %{APPNAMELC}part.cpp %{APPNAMELC}widget.cpp \ + %{APPNAMELC}globalconfigbase.ui %{APPNAMELC}globalconfig.cpp \ + %{APPNAMELC}projectconfigbase.ui %{APPNAMELC}projectconfig.cpp + +METASOURCES = AUTO + +appsharedir = $(kde_datadir)/kdev%{APPNAMELC} +appshare_DATA = + +servicedir = $(kde_servicesdir) +service_DATA = kdev%{APPNAMELC}.desktop + +rcdir = $(kde_datadir)/kdev%{APPNAMELC} +rc_DATA = kdev%{APPNAMELC}.rc diff --git a/languages/cpp/app_templates/kdevpart2/CMakeLists.txt b/languages/cpp/app_templates/kdevpart2/CMakeLists.txt new file mode 100644 index 00000000..080603a8 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/CMakeLists.txt @@ -0,0 +1,30 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_custom_target( kdevpart2.tar.gz ALL + COMMAND tar zcf kdevpart2.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + src-Makefile.am kdevpart_part.cpp kdevpart_part.h + kdevpart_widget.h kdevpart_widget.cpp kdevpart_part.rc + kdevpart.desktop app.tdevelop kdevpart-configure.in.in + README.dox subdirs globalconfigbase.ui globalconfig.h + globalconfig.cpp projectconfigbase.ui projectconfig.h + projectconfig.cpp +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kdevpart2.tar.gz kdevpart2.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kdevpart2.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kdevpart2/Makefile.am b/languages/cpp/app_templates/kdevpart2/Makefile.am new file mode 100644 index 00000000..436f919c --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/Makefile.am @@ -0,0 +1,21 @@ +dataFiles = src-Makefile.am kdevpart_part.cpp kdevpart_part.h\ + kdevpart_widget.h kdevpart_widget.cpp \ + kdevpart_part.rc kdevpart.desktop app.tdevelop \ + kdevpart-configure.in.in README.dox subdirs globalconfigbase.ui globalconfig.h \ + globalconfig.cpp projectconfigbase.ui projectconfig.h projectconfig.cpp + +templateName = kdevpart2 + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/cpp/app_templates/kdevpart2/README.dox b/languages/cpp/app_templates/kdevpart2/README.dox new file mode 100644 index 00000000..7069f3a5 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/README.dox @@ -0,0 +1,55 @@ +/** \class %{APPNAME} +Put a brief description here, the brief description ends at the first dot. +Put a more detailed description of your part in these lines. It can span +over several lines. You can even use some html commands in these lines like: +This is code, html links link text, +and images. + +\authors %{AUTHOR} +\authors 2nd author full name +... +\authors nth author full name + +\maintainer %{AUTHOR} +\maintainer 2nd maintainer full name +... +\maintainer nth maintainer full name + +\feature Describe the first feature +\feature Describe the second feature +... +\feature Describe the last feature + +\bug bugs in +YOUR_COMPONENT_NAME at Bugzilla database +\bug Describe a the 1st bug that you know of, but probably hasn't been reported yet. +.. +\bug Describe a the nth bug that you know of, but probably hasn't been reported yet. + +\requirement Describe a the 1st requirement of your part. +\requirement Describe a the 2nd requirement of your part. +... +\requirement Describe a the nth requirement of your part. + +\todo Describe a the 1st TODO of your part. +\todo Describe a the 2nd TODO of your part. +... +\todo Describe a the nth TODO of your part. + +\faq First frequenly asked question about your part ? Answer. +\faq Second frequenly asked question about your part ? Answer. +... +\faq Last frequenly asked question about your part ? Answer. + +\note First note text. +\note Second note text. +... +\note Last note text. + +\warning First warning text. +\warning Second warning text. +... +\warning Last warning text. + +*/ diff --git a/languages/cpp/app_templates/kdevpart2/app.tdevelop b/languages/cpp/app_templates/kdevpart2/app.tdevelop new file mode 100644 index 00000000..1b7aab6e --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/app.tdevelop @@ -0,0 +1,148 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + C++ + Code + Qt + TDE + KDevelop + + + + + src/%{APPNAMELC} + debug + + + src/%{APPNAMELC} + executable + + + + optimized + kdevgccoptions + kdevgppoptions + kdevg77options + -O2 -g0 + + + --enable-debug=full + debug + kdevgccoptions + kdevgppoptions + kdevg77options + -O0 -g3 + + + + + + + + + + + + + + + + + + + + false + true + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + w3c-svg + sw + w3c-uaag10 + wxwidgets_bugs + + + qmake User Guide + + + + + libtool + + + + + + + + + + + + -f + + + + -dP + -f + -C -d -P + -u3 -p + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + true + true + true + false + true + true + 250 + 400 + + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/kdevpart2/globalconfig.cpp b/languages/cpp/app_templates/kdevpart2/globalconfig.cpp new file mode 100644 index 00000000..cddf3e7e --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/globalconfig.cpp @@ -0,0 +1,15 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}globalconfig.h" + +#include "%{APPNAMELC}part.h" + +%{APPNAME}GlobalConfig::%{APPNAME}GlobalConfig(%{APPNAME}Part *part, TQWidget *parent, const char *name) + : %{APPNAME}GlobalConfigBase(parent, name), m_part(part) +{ +} + +void %{APPNAME}GlobalConfig::accept() +{ +} + +#include "%{APPNAMELC}globalconfig.moc" diff --git a/languages/cpp/app_templates/kdevpart2/globalconfig.h b/languages/cpp/app_templates/kdevpart2/globalconfig.h new file mode 100644 index 00000000..723dbae2 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/globalconfig.h @@ -0,0 +1,23 @@ +%{H_TEMPLATE} +#ifndef %{APPNAMEUC}_GLOBAL_CONFIG_H +#define %{APPNAMEUC}_GLOBAL_CONFIG_H + +#include "%{APPNAMELC}globalconfigbase.h" + +class %{APPNAME}Part; + +class %{APPNAME}GlobalConfig: public %{APPNAME}GlobalConfigBase +{ + Q_OBJECT + +public: + %{APPNAME}GlobalConfig(%{APPNAME}Part *part, TQWidget *parent = 0, const char *name = 0); + +public slots: + void accept(); + +private: + %{APPNAME}Part *m_part; +}; + +#endif diff --git a/languages/cpp/app_templates/kdevpart2/globalconfigbase.ui b/languages/cpp/app_templates/kdevpart2/globalconfigbase.ui new file mode 100644 index 00000000..588f9dc9 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/globalconfigbase.ui @@ -0,0 +1,20 @@ + +%{APPNAME}GlobalConfigBase + + + %{APPNAME}GlobalConfigBase + + + + 0 + 0 + 600 + 480 + + + + %{APPNAME} + + + + diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart-configure.in.in b/languages/cpp/app_templates/kdevpart2/kdevpart-configure.in.in new file mode 100644 index 00000000..55f2f614 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart-configure.in.in @@ -0,0 +1,10 @@ +#MIN_CONFIG(3.0.0) + +AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION}) +AC_C_BIGENDIAN +AC_CHECK_TDEMAXPATHLEN + +KDE_CHECK_HEADERS([tdevelop/interfaces/kdevcore.h]) +KDE_CHECK_LIB([tdevelop],main, + [LIBTDEVELOP="-ltdevelop"]) +AC_SUBST(LIBTDEVELOP) diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart.desktop b/languages/cpp/app_templates/kdevpart2/kdevpart.desktop new file mode 100644 index 00000000..a3029ac6 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart.desktop @@ -0,0 +1,83 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Name=KDev%{APPNAME} +Name[nds]=KDev%{ProgNaam} +Name[sv]=TDevelop %{APPNAME} +Name[ta]=கெடெவ்%{APPNAME} +GenericName=%{APPNAME} Plugin +GenericName[br]=Lugent %{APPNAME} +GenericName[ca]=Connector per a %{APPNAME} +GenericName[da]=%{APPNAME} plugin +GenericName[de]=%{APPNAME}-Modul +GenericName[el]=Πρόσθετο %{APPNAME} +GenericName[es]=Complemento %{APPNAME} +GenericName[et]=%{APPNAME} plugin +GenericName[eu]=%{APPNAME} plugina +GenericName[fa]=وصلۀ %{APPNAME} +GenericName[fr]=Module externe pour %{APPNAME} +GenericName[ga]=Breiseán %{APPNAME} +GenericName[gl]=Extensión %{APPNAME} +GenericName[hu]=%{APPNAME}-bővítőmodul +GenericName[it]=Plugin %{APPNAME} +GenericName[ja]=%{APPNAME} プラグイン +GenericName[nds]=%{APPNAME}-Moduul +GenericName[ne]=%{APPNAME} प्लगइन +GenericName[nl]=%{APPNAME}-plugin +GenericName[pl]=Wtyczka %{APPNAME} +GenericName[pt]='Plugin' %{APPNAME} +GenericName[pt_BR]=Plug-in do %{APPNAME} +GenericName[ru]=Модуль %{APPNAME} +GenericName[sk]=%{APPNAME} modul +GenericName[sl]=Vstavek za %{APPNAME} +GenericName[sr]=%{APPNAME} прикључак +GenericName[sr@Latn]=%{APPNAME} priključak +GenericName[sv]=%{APPNAME} insticksprogram +GenericName[tr]=%{APPNAME} Eklentisi +GenericName[zh_CN]=%{APPNAME} 插件 +GenericName[zh_TW]=%{APPNAME} 外掛程式 +Comment=%{APPNAME} Description +Comment[br]=Deskrivadur %{APPNAME} +Comment[ca]=Descripció per a %{APPNAME} +Comment[da]=%{APPNAME} beskrivelse +Comment[de]=%{APPNAME} Beschreibung +Comment[el]=Περιγραφή %{APPNAME} +Comment[es]=Descripción de %{APPNAME} +Comment[et]=%{APPNAME} kirjeldus +Comment[eu]=%{APPNAME} deskribapena +Comment[fa]=توصیف %{APPNAME} +Comment[fr]=Description pour %{APPNAME} +Comment[ga]=Cur Síos %{APPNAME} +Comment[gl]=Descripción de %{APPNAME} +Comment[hu]=%{APPNAME} leírása +Comment[it]=Descrizione %{APPNAME} +Comment[ja]=%{APPNAME} 概説 +Comment[nds]=%{APPNAME}-Beschrieven +Comment[ne]=%{APPNAME} वर्णन +Comment[nl]=%{APPNAME} omschrijving +Comment[pl]=Opis %{APPNAME} +Comment[pt]=Descrição de %{APPNAME$} +Comment[pt_BR]=Descrição do %{APPNAME} +Comment[ru]=Описание %{APPNAME} +Comment[sk]=%{APPNAME} popis +Comment[sl]=Opis za %{APPNAME} +Comment[sr]=Опис за %{APPNAME} +Comment[sr@Latn]=Opis za %{APPNAME} +Comment[sv]=%{APPNAME} beskrivning +Comment[tr]=%{APPNAME} Tanımı +Comment[zh_CN]=%{APPNAME} 描述 +Comment[zh_TW]=%{APPNAME} 描述 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin + +X-TDevelop-Plugin-Version=1 +X-TDevelop-Plugin-Homepage= +X-TDevelop-Plugin-BugsEmailAddress=%{EMAIL} +X-TDevelop-Plugin-Copyright=(C) by %{AUTHOR} + +X-TDevelop-Args= + +X-TDevelop-Scope=%{SCOPE} +X-TDE-Library=libkdev%{APPNAMELC} +X-TDevelop-Version=3 +X-TDevelop-Properties=%{PROPS} diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart2.kdevtemplate b/languages/cpp/app_templates/kdevpart2/kdevpart2.kdevtemplate new file mode 100644 index 00000000..5aeda5d1 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart2.kdevtemplate @@ -0,0 +1,276 @@ +# TDE Config File +[General] +Name=TDevelop Plugin (Standalone build) +Name[ca]=Connector per a TDevelop (de construcció aïllada) +Name[da]=TDevelop plugin (Alenestående) +Name[de]=TDevelop-Modul (Unabhängige Erstellung) +Name[el]=Πρόσθετο TDevelop (Αυτόνομη κατασκευή) +Name[es]=Complemento para TDevelop (construcción independiente) +Name[et]=TDevelopi plugin (autonoomne) +Name[eu]=TDevelop plugin-a (eraikuntza autonomoak) +Name[fa]=وصلۀ TDevelop )ساخت خوداتکا( +Name[fr]=Module externe pour TDevelop (construction autonome) +Name[ga]=Breiseán TDevelop (Tógáil Shaorsheasaimh) +Name[gl]=Extensión para TDevelop (compilación independente) +Name[hu]=TDevelop-bővítőmodul (önálló) +Name[it]=Plugin di TDevelop (compilazione indipendente) +Name[ja]=TDevelop プラグイン (スタンダローンビルド) +Name[nds]=TDevelop-Moduul (Enkelprogramm) +Name[ne]=केडीई विकास प्लगइन (स्ट्यान्डअलोन निर्माण) +Name[nl]=TDevelop-plugin (standalone build) +Name[pl]=Wtyczka do TDevelopa (budowana oddzielnie) +Name[pt]='Plugin' do TDevelop (compilação autónoma) +Name[pt_BR]='Plugin' do TDevelop (compilação autónoma) +Name[ru]=Модуль TDevelop (внешний) +Name[sk]=TDevelop modul (samostatný build) +Name[sl]=Vstavek za TDevelop (samostojna izgradnja) +Name[sr]=Прикључак за TDevelop +Name[sr@Latn]=Priključak za TDevelop +Name[sv]=TDevelop-insticksprogram (att bygga fristående) +Name[tr]=TDevelop Eklentisi (Kendi başına çalışabilen) +Name[zh_CN]=TDevelop 插件(独立编译) +Name[zh_TW]=TDevelop 外掛程式(單獨建立) +Category=C++/TDevelop/ +Comment=This generates a KPart for TDevelop, to be built outside of the TDevelop source tree. +Comment[ca]=Genera una KPart per a TDevelop, per a que es construeixi fora de l'arbre de fonts de TDevelop. +Comment[da]=Dette genererer en KPart for TDevelop, til at bygges udenfor TDevelop's kildetræ. +Comment[de]=Hiermit wird eine Komponente (KPart) für TDevelop generiert, die außerhalb des Quelltextbaumes von TDevelop erstellt wird. +Comment[el]=Αυτό δημιουργεί ένα KPart για το TDevelop, για κατασκευή του έξω από το δέντρο πηγαίου κώδικα του TDevelop. +Comment[es]=Genera un KPart para TDevelop, para ser construido fuera del árbol de código fuente de TDevelop. +Comment[et]=TDevelopi KPart'i loomine, mida saab ehitada väljaspool TDevelopi lähtekoodipuud. +Comment[eu]=Honek TDevelop-en KPart bat sortzen du, TDevelop-en iturburu-zuhaitzetik at eraikitzeko. +Comment[fa]=یک KPart برای TDevelop، برای ساخته شدن در بیرون درخت منبع پروژه تولید می‌کند. +Comment[fr]=Génère un KPart pour TDevelop, à construire en dehors de l'arborescence des sources de TDevelop. +Comment[gl]=Isto xera un KPart para TDevelop que se compilará fóra da árbore de código de TDevelop. +Comment[hu]=Létrehoz egy TDevelop-bővítőmodult, mely a TDevelopos forráskönyvtáron kívül fordítható le. +Comment[it]=Genera un KPart per TDevelop, da compilare al di fuori dell'albero sorgente di TDevelop. +Comment[nds]=Dit stellt en KPart-Komponent för TDevelop op, dat buten den TDevelop-Bornboom kompileert warrt. +Comment[ne]=यसले केडीई विकास स्रोत ट्री बाहिर निर्माण हुने, केडीई विकासका लागि केडीई भाग उत्पन्न गर्दछ । +Comment[nl]=Dit genereert een KPart voor TDevelop, welke buiten de TDevelop sourcetree wordt gebouwd. +Comment[pl]=Generuje KPart dla TDevelopa budowane poza jego drzewem źródłowym. +Comment[pt]=Isto gera uma KPart para o TDevelop, de modo a ser compilada fora da árvore de código do TDevelop. +Comment[pt_BR]=Isto gera uma KPart para o TDevelop, de modo a ser compilada fora da árvore de código do TDevelop. +Comment[ru]=Создание компонента KPart для TDevelop со сборкой вне исходного кода TDevelop. +Comment[sk]=Vygenruje KPart pre TDevelop, tak aby ho bolo možné kompilovať mimo zdrojový strom TDevelop. +Comment[sr]=Ово прави KPart за TDevelop, за градњу изван TDevelop-овог изворног стабла. +Comment[sr@Latn]=Ovo pravi KPart za TDevelop, za gradnju izvan TDevelop-ovog izvornog stabla. +Comment[sv]=Detta skapar ett TDevelop-delprogram, att bygga utanför TDevelops källkodsträd. +Comment[tr]=Bu, TDevelop için, TDevelop kaynak ağacının dışında yapılacak, bir KPart yaratır. +Comment[zh_CN]=这将生成一个 TDevelop 的 KPart,可以在 TDevelop 源代码树之外编译。 +Comment[zh_TW]=產生一個 TDevelop 的 KPart 元件,建立在 TDevelop 程式源碼樹之外。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}_part.cpp +Archive=kdevpart2.tar.gz + +[SCOPE] +Type = value +ValueType=QString +Value= SCOPE +Comment= The scope of a plugin (Global, Project, Core) +Comment[ca]= L'àmbit d'un connector (Global, Project, Core) +Comment[da]= Et plugins omfang (Globalt, Projekt, Kerne) +Comment[de]= Gültigkeitsbereich eines Moduls (Global, Projekt, Kern) +Comment[el]= Η εμβέλεια ενός πρόσθετου (Καθολική, Έργο, Πυρήνας) +Comment[es]=El alcance de un complemento (global, proyecto, núcleo) +Comment[et]=Plugina skoop (globaalne, projekt, tuum) +Comment[eu]= Pluginaren barrutia (Globala, Projektua, Nukleoa) +Comment[fa]=دامنۀ یک وصله )سراسری، پروژه، هسته( +Comment[fr]= La portée d'un module externe (globale, projet, core) +Comment[ga]= Scóip an bhreiseáin (Comhchoiteann, Tionscadal, Ceartlár) +Comment[gl]=Ámbito da extensión (Global, Proxecto, Núcleo) +Comment[hu]=A modul hatóköre (globális, projektszintű, alap) +Comment[it]=Il contesto di un plugin (Globale, Progetto, Core) +Comment[nds]= Dat Rebeet vun en Moduul (Globaal, Projekt, Karn) +Comment[ne]= प्लगइनको क्षेत्र (विश्वव्यापी, परियोजना, कोर) +Comment[nl]=Het bereik van een plugin (globaal, project, core) +Comment[pl]=Przynależność wtyczki (globalna, projekt, część główna) +Comment[pt]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) +Comment[pt_BR]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) +Comment[ru]=Тип модуля (Global, Project, Core) +Comment[sk]=Rozsah module (globálny, projektový, jadrový) +Comment[sr]=Опсег прикључка (глобални, пројекат, језгро) +Comment[sr@Latn]=Opseg priključka (globalni, projekat, jezgro) +Comment[sv]=Insticksprogrammets omfattning (Global, Projekt, Kärna) +Comment[tr]=Bir eklentinin alanı (Genel, Proje, İç) +Comment[zh_CN]=插件的范围(全局、工程、核心) +Comment[zh_TW]=外掛程式的範圍(全域、專案、核心) +Default= Global + +[PROPS] +Type = value +ValueType=QString +Value= PROPS +Comment= The list of supported TDevelop properties +Comment[ca]= La llista de propietats suportades del TDevelop +Comment[da]= Listen af understøttede TDevelop-egenskaber +Comment[de]= Die Liste der unterstützten TDevelop-Eigenschaften +Comment[el]= Η λίστα των υποστηριζόμενων ιδιοτήτων του TDevelop +Comment[es]=La lista de propiedades de TDevelop soportadas +Comment[et]= TDevelopi toetatud omaduste nimekiri +Comment[eu]= Onartzen diren TDevelop-en propietateen zerrenda +Comment[fa]=فهرست ویژگیهای پشتیبانی‌شدۀ TDevelop +Comment[fr]= La liste des propriétés de TDevelop prises en charge +Comment[ga]= Liosta d'airíonna TDevelop a dtacaítear leo +Comment[gl]=Lista das propiedades de TDevelop soportadas +Comment[hu]=A támogatott TDevelop-tulajdonságok +Comment[it]=Lista delle proprietà supportate da TDevelop +Comment[nds]= De List mit ünnerstütt TDevelop-Egenschappen +Comment[ne]= केडीई विकास समर्थन गर्ने गुणको सूची +Comment[nl]=De lijst met ondersteunde TDevelop-properties +Comment[pl]= Lista obsługiwanych właściwości TDevelopa +Comment[pt]= A lista de propriedades do TDevelop suportadas +Comment[pt_BR]= A lista de propriedades do TDevelop suportadas +Comment[ru]=Список поддерживаемых типов модулей для TDevelop +Comment[sk]=Zoznam podporovaných vlastností TDevelop +Comment[sl]=Seznam podprtih lastnosti TDevelop +Comment[sr]=Листа подржаних TDevelop-ових својстава +Comment[sr@Latn]=Lista podržanih TDevelop-ovih svojstava +Comment[sv]=Listan med egenskaper i TDevelop som stöds +Comment[tr]=Desteklenen TDevelop özellikleri +Comment[zh_CN]=列出支持的 TDevelop 属性 +Comment[zh_TW]=支援的 TDevelop 屬性列表 +Default= + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE5] +Type=install +Source=%{src}/kdevpart-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE6] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE7] +Type=install +Source=%{src}/kdevpart_part.cpp +Dest=%{dest}/src/%{APPNAMELC}part.cpp + +[FILE71] +Type=install +EscapeXML=true +Source=%{src}/globalconfigbase.ui +Dest=%{dest}/src/%{APPNAMELC}globalconfigbase.ui + +[FILE711] +Type=install +Source=%{src}/globalconfig.h +Dest=%{dest}/src/%{APPNAMELC}globalconfig.h + +[FILE712] +Type=install +Source=%{src}/globalconfig.cpp +Dest=%{dest}/src/%{APPNAMELC}globalconfig.cpp + +[FILE72] +Type=install +EscapeXML=true +Source=%{src}/projectconfigbase.ui +Dest=%{dest}/src/%{APPNAMELC}projectconfigbase.ui + +[FILE721] +Type=install +Source=%{src}/projectconfig.h +Dest=%{dest}/src/%{APPNAMELC}projectconfig.h + +[FILE722] +Type=install +Source=%{src}/projectconfig.cpp +Dest=%{dest}/src/%{APPNAMELC}projectconfig.cpp + +[FILE8] +Type=install +Source=%{src}/kdevpart_part.h +Dest=%{dest}/src/%{APPNAMELC}part.h + +[FILE9] +Type=install +Source=%{src}/kdevpart_widget.cpp +Dest=%{dest}/src/%{APPNAMELC}widget.cpp + +[FILE10] +Type=install +Source=%{src}/kdevpart_widget.h +Dest=%{dest}/src/%{APPNAMELC}widget.h + +[FILE11] +Type=install +EscapeXML=true +Source=%{src}/kdevpart_part.rc +Dest=%{dest}/src/kdev%{APPNAMELC}.rc + +[FILE12] +Type=install +Source=%{src}/kdevpart.desktop +Dest=%{dest}/src/kdev%{APPNAMELC}.desktop + +[FILE13] +Type=install +Source=%{src}/README.dox +Dest=%{dest}/src/README.dox + +[MSG] +Type=message +Comment=A TDevelop plugin was created in %{dest} +Comment[ca]=Un connector per a TDevelop ha estat creat en %{dest} +Comment[da]=Et TDevelop plugin blev oprettet i %{dest} +Comment[de]=Ein TDevelop-Modul wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο του TDevelop δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para TDevelop ha sido creado en %{dest} +Comment[et]=TDevelopi plugin loodi asukohta %{dest} +Comment[eu]=TDevelop plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ TDevelop در %{dest} ایجاد شد +Comment[fr]=Un module externe pour TDevelop a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán TDevelop i %{dest} +Comment[gl]=Creouse unha extensión para TDevelop en %{dest} +Comment[hu]=Létrejött egy TDevelop-bővítőmodul itt: %{dest} +Comment[it]=È stato creato un plugin per TDevelop in %{dest} +Comment[ja]=TDevelop プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDevelop-Moduul opstellt +Comment[ne]=केडीई विकास प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Er is een TDevelop-plugin aangemaakt in %{dest} +Comment[pl]=Wtyczka do TDevelopa została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' do TDevelop em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' do TDevelop em %{dest} +Comment[ru]=Модуль TDevelop создан в %{dest} +Comment[sk]=TDevelop modul bol vytvorený v %{dest} +Comment[sl]=Vstavek za TDevelop je bil ustvarjen v %{dest} +Comment[sr]=Прикључак за TDevelop направљен је у %{dest} +Comment[sr@Latn]=Priključak za TDevelop napravljen je u %{dest} +Comment[sv]=Ett insticksprogram för TDevelop skapades i %{dest} +Comment[tr]=Bir TDevelop eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 TDevelop 插件 +Comment[zh_TW]=一個 TDevelop 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart2.png b/languages/cpp/app_templates/kdevpart2/kdevpart2.png new file mode 100644 index 00000000..840a953c Binary files /dev/null and b/languages/cpp/app_templates/kdevpart2/kdevpart2.png differ diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart_part.cpp b/languages/cpp/app_templates/kdevpart2/kdevpart_part.cpp new file mode 100644 index 00000000..aa950c8a --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart_part.cpp @@ -0,0 +1,183 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}part.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "%{APPNAMELC}widget.h" +#include "%{APPNAMELC}globalconfig.h" +#include "%{APPNAMELC}projectconfig.h" + +typedef KDevGenericFactory<%{APPNAME}Part> %{APPNAME}Factory; +KDevPluginInfo data("kdev%{APPNAMELC}"); +K_EXPORT_COMPONENT_FACTORY( libkdev%{APPNAMELC}, %{APPNAME}Factory( data ) ); + +#define GLOBALDOC_OPTIONS 1 +#define PROJECTDOC_OPTIONS 2 + +%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &/*args*/) + : KDevPlugin(&data, parent, name ? name : "%{APPNAME}Part") +{ + setInstance(%{APPNAME}Factory::instance()); + setXMLFile("kdev%{APPNAMELC}.rc"); + + m_widget = new %{APPNAME}Widget(this); + m_widget->setCaption("widget caption"); + m_widget->setIcon(SmallIcon(info()->icon())); + + TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); + + // now you decide what should happen to the widget. Take a look at kdevcore.h + // or at other plugins how to embed it. + + // if you want to embed your widget as an outputview, simply uncomment + // the following line. + // mainWindow()->embedOutputView( m_widget, "name that should appear", "enter a tooltip" ); + + // if you want to embed your widget as a selectview (at the left), simply uncomment + // the following line. + // mainWindow()->embedSelectView( m_widget, "name that should appear", "enter a tooltip" ); + + // if you want to embed your widget as a selectview (at the right), simply uncomment + // the following line. + // mainWindow()->embedSelectViewRight( m_widget, "name that should appear", "enter a tooltip" ); + + setupActions(); + + m_configProxy = new ConfigWidgetProxy(core()); + m_configProxy->createGlobalConfigPage(i18n("%{APPNAME}"), GLOBALDOC_OPTIONS, info()->icon()); + m_configProxy->createProjectConfigPage(i18n("%{APPNAME}"), PROJECTDOC_OPTIONS, info()->icon()); + connect(m_configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), + this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int))); + + connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); + connect(core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened())); + connect(core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); + + + TQTimer::singleShot(0, this, TQT_SLOT(init())); +} + +%{APPNAME}Part::~%{APPNAME}Part() +{ +// if you embed a widget, you need to tell the mainwindow when you remove it +// if ( m_widget ) +// { +// mainWindow()->removeView( m_widget ); +// } + delete m_widget; + delete m_configProxy; +} + +void %{APPNAME}Part::init() +{ +// delayed initialization stuff goes here +} + +void %{APPNAME}Part::setupActions() +{ +// create XMLGUI actions here + action = new TDEAction(i18n("&Do Something..."), 0, + this, TQT_SLOT(doSomething()), actionCollection(), "plugin_action" ); + action->setToolTip(i18n("Do something")); + action->setWhatsThis(i18n("Do something

    Describe here what does this action do.")); +} + +void %{APPNAME}Part::insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo) +{ +// create configuraton dialogs here + switch (pageNo) + { + case GLOBALDOC_OPTIONS: + { + %{APPNAME}GlobalConfig *w = new %{APPNAME}GlobalConfig(this, page, "global config"); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); + break; + } + case PROJECTDOC_OPTIONS: + { + %{APPNAME}ProjectConfig *w = new %{APPNAME}ProjectConfig(this, page, "project config"); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); + break; + } + } +} + +void %{APPNAME}Part::contextMenu(TQPopupMenu *popup, const Context *context) +{ +// put actions into the context menu here + if (context->hasType(Context::EditorContext)) + { + // editor context menu + const EditorContext *econtext = static_cast(context); + + // use context and plug actions here + action->plug(popup); + + // or create menu items on the fly + // int id = -1; + // id = popup->insertItem(i18n("Do Something Here"), + // this, TQT_SLOT(doSomething()) ); + // popup->setWhatsThis(id, i18n("Do something here

    Describe here what does this action do." + } + else if (context->hasType(Context::FileContext)) + { + // file context menu + const FileContext *fcontext = static_cast(context); + + //use context and plug actions here + } + else if (context->hasType(Context::ProjectModelItemContext)) + { + // project tree context menu + const ProjectModelItemContext *pcontext = static_cast(context); + + // use context and plug actions here + } + else if (context->hasType(Context::CodeModelItemContext)) + { + // class tree context menu + const CodeModelItemContext *mcontext = static_cast(context); + + // use context and plug actions here + } + else if (context->hasType(Context::DocumentationContext)) + { + // documentation viewer context menu + const DocumentationContext *dcontext = static_cast(context); + + // use context and plug actions here + } +} + +void %{APPNAME}Part::projectOpened() +{ +// do something when the project is opened +} + +void %{APPNAME}Part::projectClosed() +{ +// do something when the project is closed +} + +void %{APPNAME}Part::doSomething() +{ +// do something useful here instead of showing the message box + KMessageBox::information(m_widget, i18n("This action does nothing."), i18n("%{APPNAME} Plugin")); +} + +#include "%{APPNAMELC}part.moc" diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart_part.h b/languages/cpp/app_templates/kdevpart2/kdevpart_part.h new file mode 100644 index 00000000..9414d448 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart_part.h @@ -0,0 +1,46 @@ +%{H_TEMPLATE} +#ifndef TDEV%{APPNAMEUC}_H +#define TDEV%{APPNAMEUC}_H + +#include + +#include + +class TQPopupMenu; +class TDEAction; +class KDialogBase; +class Context; +class ConfigWidgetProxy; +class %{APPNAME}Widget; + +/** +Please read the README.dox file for more info about this part +*/ +class %{APPNAME}Part: public KDevPlugin +{ + Q_OBJECT + +public: + %{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &args); + ~%{APPNAME}Part(); + +private slots: + void init(); + + void insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo); + void contextMenu(TQPopupMenu *popup, const Context *context); + void projectOpened(); + void projectClosed(); + + void doSomething(); + +private: + void setupActions(); + + TDEAction *action; + + TQGuardedPtr<%{APPNAME}Widget> m_widget; + ConfigWidgetProxy *m_configProxy; +}; + +#endif diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart_part.rc b/languages/cpp/app_templates/kdevpart2/kdevpart_part.rc new file mode 100644 index 00000000..a38ee14e --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart_part.rc @@ -0,0 +1,11 @@ + + + +

    &Tools + + + + + + + diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart_widget.cpp b/languages/cpp/app_templates/kdevpart2/kdevpart_widget.cpp new file mode 100644 index 00000000..65bb996e --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart_widget.cpp @@ -0,0 +1,21 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}widget.h" + +#include +#include +#include + +#include + +#include "%{APPNAMELC}part.h" + +%{APPNAME}Widget::%{APPNAME}Widget(%{APPNAME}Part *part) + : TQWidget(0, "%{APPNAMELC} widget"), m_part(part) +{ +} + +%{APPNAME}Widget::~%{APPNAME}Widget() +{ +} + +#include "%{APPNAMELC}widget.moc" diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart_widget.h b/languages/cpp/app_templates/kdevpart2/kdevpart_widget.h new file mode 100644 index 00000000..e54abd4d --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart_widget.h @@ -0,0 +1,24 @@ +%{H_TEMPLATE} +#ifndef %{APPNAMEUC}_WIDGET_H +#define %{APPNAMEUC}_WIDGET_H + +#include +#include + +class KDevProject; +class %{APPNAME}Part; + +class %{APPNAME}Widget: public TQWidget +{ + Q_OBJECT + +public: + %{APPNAME}Widget(%{APPNAME}Part *part); + ~%{APPNAME}Widget(); + +private: + %{APPNAME}Part *m_part; +}; + + +#endif diff --git a/languages/cpp/app_templates/kdevpart2/projectconfig.cpp b/languages/cpp/app_templates/kdevpart2/projectconfig.cpp new file mode 100644 index 00000000..42a9f3e7 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/projectconfig.cpp @@ -0,0 +1,15 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}projectconfig.h" + +#include "%{APPNAMELC}part.h" + +%{APPNAME}ProjectConfig::%{APPNAME}ProjectConfig(%{APPNAME}Part *part, TQWidget *parent, const char *name) + : %{APPNAME}ProjectConfigBase(parent, name), m_part(part) +{ +} + +void %{APPNAME}ProjectConfig::accept() +{ +} + +#include "%{APPNAMELC}projectconfig.moc" diff --git a/languages/cpp/app_templates/kdevpart2/projectconfig.h b/languages/cpp/app_templates/kdevpart2/projectconfig.h new file mode 100644 index 00000000..49d4f089 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/projectconfig.h @@ -0,0 +1,23 @@ +%{H_TEMPLATE} +#ifndef %{APPNAMEUC}_PROJECT_CONFIG_H +#define %{APPNAMEUC}_PROJECT_CONFIG_H + +#include "%{APPNAMELC}projectconfigbase.h" + +class %{APPNAME}Part; + +class %{APPNAME}ProjectConfig: public %{APPNAME}ProjectConfigBase +{ + Q_OBJECT + +public: + %{APPNAME}ProjectConfig(%{APPNAME}Part *part, TQWidget *parent = 0, const char *name = 0); + +public slots: + void accept(); + +private: + %{APPNAME}Part *m_part; +}; + +#endif diff --git a/languages/cpp/app_templates/kdevpart2/projectconfigbase.ui b/languages/cpp/app_templates/kdevpart2/projectconfigbase.ui new file mode 100644 index 00000000..30849e54 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/projectconfigbase.ui @@ -0,0 +1,20 @@ + +%{APPNAME}ProjectConfigBase + + + %{APPNAME}ProjectConfigBase + + + + 0 + 0 + 600 + 480 + + + + %{APPNAME} + + + + diff --git a/languages/cpp/app_templates/kdevpart2/src-Makefile.am b/languages/cpp/app_templates/kdevpart2/src-Makefile.am new file mode 100644 index 00000000..c5995af4 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/src-Makefile.am @@ -0,0 +1,17 @@ +INCLUDES = -I$(kde_includes)/tdevelop/interfaces -I$(kde_includes)/tdevelop/util $(all_includes) + +kde_module_LTLIBRARIES = libkdev%{APPNAMELC}.la +libkdev%{APPNAMELC}_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) $(KDE_PLUGIN) +libkdev%{APPNAMELC}_la_LIBADD = -ltdevelop +libkdev%{APPNAMELC}_la_SOURCES = %{APPNAMELC}part.cpp %{APPNAMELC}widget.cpp %{APPNAMELC}globalconfigbase.ui %{APPNAMELC}globalconfig.cpp %{APPNAMELC}projectconfigbase.ui %{APPNAMELC}projectconfig.cpp + +METASOURCES = AUTO + +servicedir = $(kde_servicesdir) +service_DATA = kdev%{APPNAMELC}.desktop + +rcdir = $(kde_datadir)/kdev%{APPNAMELC} +rc_DATA = kdev%{APPNAMELC}.rc + +appsharedir = $(kde_datadir)/kdev%{APPNAMELC} +appshare_DATA = diff --git a/languages/cpp/app_templates/kdevpart2/subdirs b/languages/cpp/app_templates/kdevpart2/subdirs new file mode 100644 index 00000000..0e678106 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/subdirs @@ -0,0 +1,3 @@ +doc +po +src diff --git a/languages/cpp/app_templates/khello/CMakeLists.txt b/languages/cpp/app_templates/khello/CMakeLists.txt index 3ed5e064..360e792e 100644 --- a/languages/cpp/app_templates/khello/CMakeLists.txt +++ b/languages/cpp/app_templates/khello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( khello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/khello.tar.gz khello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - khello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + khello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/khello/Makefile.am b/languages/cpp/app_templates/khello/Makefile.am index 49feb06a..56df4792 100644 --- a/languages/cpp/app_templates/khello/Makefile.am +++ b/languages/cpp/app_templates/khello/Makefile.am @@ -4,10 +4,10 @@ dataFiles = src-Makefile.am app.cpp app.h main.cpp appui.rc app.tdevelop \ templateName = khello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/khello/app.tdevelop b/languages/cpp/app_templates/khello/app.tdevelop index 029288aa..9c25500e 100644 --- a/languages/cpp/app_templates/khello/app.tdevelop +++ b/languages/cpp/app_templates/khello/app.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -47,8 +47,8 @@ -O0 -g3 - - + + @@ -56,8 +56,8 @@ - - + + ada ada_bugs_gcc @@ -92,24 +92,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/khello/khello.kdevtemplate b/languages/cpp/app_templates/khello/khello.kdevtemplate new file mode 100644 index 00000000..81d20c5a --- /dev/null +++ b/languages/cpp/app_templates/khello/khello.kdevtemplate @@ -0,0 +1,220 @@ +# TDE Config File +[General] +Name=Simple TDE Application +Name[ca]=Una simple aplicació per al TDE +Name[da]=Et simpelt TDE program +Name[de]=Einfache TDE-Anwendung +Name[el]=Απλή εφαρμογή του TDE +Name[es]=Aplicación de TDE sencilla +Name[et]=Lihtne TDE rakendus +Name[eu]=TDE aplikazio simple bat +Name[fa]=کاربرد سادۀ TDE +Name[fr]=Application TDE simple +Name[ga]=Feidhmchlár Simplí TDE +Name[gl]=Aplicación TDE sinxela +Name[hu]=Egyszerű TDE-s alkalmazás +Name[it]=Una semplice applicazione TDE +Name[ja]=簡単な TDE アプリケーション +Name[nds]=Eenfach TDE-Programm +Name[ne]=साधारण केडीई अनुप्रयोग +Name[nl]=Eenvoudige TDE-toepassing +Name[pl]=Prosty program dla TDE +Name[pt]=Aplicação Simples do TDE +Name[pt_BR]=Aplicação Simples do TDE +Name[ru]=Простое приложение TDE +Name[sk]=Jednoduchá TDE aplikácia +Name[sl]=Preprost program za TDE +Name[sr]=Једноставан TDE програм +Name[sr@Latn]=Jednostavan TDE program +Name[sv]=Enkelt TDE-program +Name[tr]=Basit TDE Uygulaması +Name[zh_CN]=简单的 TDE 应用程序 +Name[zh_TW]=簡單的 TDE 應用程式 +Category=C++/TDE +Icon=khello.png +Comment=Generates a simple TDE application with one widget. +Comment[ca]=Genera una simple aplicació per al TDE amb un estri. +Comment[da]=Genererer et simpelt TDE program men en kontrol +Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Oberflächenelement +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό. +Comment[es]=Genera una sencilla aplicación para TDE con una ventana. +Comment[et]=Lihtsa TDE rakenduse loomine ühe vidinaga. +Comment[eu]=Trepeta bakarra duen TDE aplikazio simple bat sortzen du. +Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر تولید می‌کند. +Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget). +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin. +Comment[gl]=Xera unha aplicación TDE sinxela con un compoñente. +Comment[hu]=Létrehoz egy egyszerű TDE-s alkalmazást, egy grafikus elemmel. +Comment[it]=Genera una semplice applicazione TDE senza elementi grafici. +Comment[ja]=ウィジェットを一つ含んだ簡単な TDE アプリケーションを作成します。 +Comment[nds]=Stellt en eenfach TDE-Programm mit een Element op. +Comment[ne]=एउटा विगेटसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget. +Comment[pl]=Generuje prosty program dla TDE z jednym widgetem. +Comment[pt]=Gera uma aplicação simples para o TDE com uma janela. +Comment[pt_BR]=Gera uma aplicação simples para o TDE com uma janela. +Comment[ru]=Создание простого приложения TDE с одним окном. +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom. +Comment[sl]=Ustvari preprost program za TDE z enim gradnikom. +Comment[sr]=Прави једноставан TDE програм са једном контролом. +Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom. +Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent. +Comment[tr]=Tek parçacıklı basit bir TDE uygulaması yaratır. +Comment[zh_CN]=生成只有一个部件的 TDE 应用程序。 +Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=khello.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/po + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE9] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[MkDir4] +Type=mkdir +Dir=%{dest}/src + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[FILE13] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE14] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE15] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE16] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE17] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE18] +Type=install +Source=%{src}/app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A TDE Hello world program was created in %{dest} +Comment[ca]=Un programa de Hello world per al TDE ha estat creat en %{dest} +Comment[da]=Et TDE Goddag verden program blev oprettet i %{dest} +Comment[de]=Ein TDE-"Hello World"-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε του TDE δημιουργήθηκε στο %{dest} +Comment[es]=Un programa «Hola mundo» para TDE ha sido creado en %{dest} +Comment[et]=TDE "Tere, maailm" programm loodi asukohta %{dest} +Comment[eu]=TDE-ren "Kaixo mundua" programa bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ TDE Hello world در %{dest} ایجاد شد +Comment[fr]=Un programme TDE « Bonjour monde » a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár "Hello World" TDE i %{dest} +Comment[gl]=Creouse un programa TDE Ola mundo en %{dest} +Comment[hu]=Létrejött egy TDE Hello world program itt: %{dest} +Comment[it]=È stato creato un semplice programma TDE di "Hello world" in %{dest} +Comment[ja]=TDE Hello world プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en "Moin Welt"-Programm för TDE opstellt +Comment[ne]=केडीई हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDE Hello World-programma is aangemaakt in %{dest} +Comment[pl]=Program 'Witaj świecie' dla TDE został utworzony w %{dest} +Comment[pt]=Foi criado um programa Olá Mundo do TDE em %{dest} +Comment[pt_BR]=Foi criado um programa Olá Mundo do TDE em %{dest} +Comment[ru]=Приложение TDE Hello world создано в %{dest} +Comment[sk]=TDE Ahoj svet program bol vytvorený v %{dest} +Comment[sl]=Program Hello World za TDE je bil ustvarjen v %{dest} +Comment[sr]=TDE „Здраво свете“ програм направљен је у %{dest} +Comment[sr@Latn]=TDE „Zdravo svete“ program napravljen je u %{dest} +Comment[sv]=Ett TDE Hello world-program skapades i %{dest} +Comment[tr]=Bir TDE Merhaba Dünya programı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 TDE Hello world 程序 +Comment[zh_TW]=一個 TDE Hello World 程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/khello/khello.tdevtemplate b/languages/cpp/app_templates/khello/khello.tdevtemplate deleted file mode 100644 index 2bce3511..00000000 --- a/languages/cpp/app_templates/khello/khello.tdevtemplate +++ /dev/null @@ -1,220 +0,0 @@ -# TDE Config File -[General] -Name=Simple TDE Application -Name[ca]=Una simple aplicació per al TDE -Name[da]=Et simpelt TDE program -Name[de]=Einfache TDE-Anwendung -Name[el]=Απλή εφαρμογή του TDE -Name[es]=Aplicación de TDE sencilla -Name[et]=Lihtne TDE rakendus -Name[eu]=TDE aplikazio simple bat -Name[fa]=کاربرد سادۀ TDE -Name[fr]=Application TDE simple -Name[ga]=Feidhmchlár Simplí TDE -Name[gl]=Aplicación TDE sinxela -Name[hu]=Egyszerű TDE-s alkalmazás -Name[it]=Una semplice applicazione TDE -Name[ja]=簡単な TDE アプリケーション -Name[nds]=Eenfach TDE-Programm -Name[ne]=साधारण केडीई अनुप्रयोग -Name[nl]=Eenvoudige TDE-toepassing -Name[pl]=Prosty program dla TDE -Name[pt]=Aplicação Simples do TDE -Name[pt_BR]=Aplicação Simples do TDE -Name[ru]=Простое приложение TDE -Name[sk]=Jednoduchá TDE aplikácia -Name[sl]=Preprost program za TDE -Name[sr]=Једноставан TDE програм -Name[sr@Latn]=Jednostavan TDE program -Name[sv]=Enkelt TDE-program -Name[tr]=Basit TDE Uygulaması -Name[zh_CN]=简单的 TDE 应用程序 -Name[zh_TW]=簡單的 TDE 應用程式 -Category=C++/TDE -Icon=khello.png -Comment=Generates a simple TDE application with one widget. -Comment[ca]=Genera una simple aplicació per al TDE amb un estri. -Comment[da]=Genererer et simpelt TDE program men en kontrol -Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Oberflächenelement -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό. -Comment[es]=Genera una sencilla aplicación para TDE con una ventana. -Comment[et]=Lihtsa TDE rakenduse loomine ühe vidinaga. -Comment[eu]=Trepeta bakarra duen TDE aplikazio simple bat sortzen du. -Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر تولید می‌کند. -Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget). -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin. -Comment[gl]=Xera unha aplicación TDE sinxela con un compoñente. -Comment[hu]=Létrehoz egy egyszerű TDE-s alkalmazást, egy grafikus elemmel. -Comment[it]=Genera una semplice applicazione TDE senza elementi grafici. -Comment[ja]=ウィジェットを一つ含んだ簡単な TDE アプリケーションを作成します。 -Comment[nds]=Stellt en eenfach TDE-Programm mit een Element op. -Comment[ne]=एउटा विगेटसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget. -Comment[pl]=Generuje prosty program dla TDE z jednym widgetem. -Comment[pt]=Gera uma aplicação simples para o TDE com uma janela. -Comment[pt_BR]=Gera uma aplicação simples para o TDE com uma janela. -Comment[ru]=Создание простого приложения TDE с одним окном. -Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom. -Comment[sl]=Ustvari preprost program za TDE z enim gradnikom. -Comment[sr]=Прави једноставан TDE програм са једном контролом. -Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom. -Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent. -Comment[tr]=Tek parçacıklı basit bir TDE uygulaması yaratır. -Comment[zh_CN]=生成只有一个部件的 TDE 应用程序。 -Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=khello.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/po - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE9] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[MkDir4] -Type=mkdir -Dir=%{dest}/src - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[FILE13] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE14] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE15] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE16] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE17] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE18] -Type=install -Source=%{src}/app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=A TDE Hello world program was created in %{dest} -Comment[ca]=Un programa de Hello world per al TDE ha estat creat en %{dest} -Comment[da]=Et TDE Goddag verden program blev oprettet i %{dest} -Comment[de]=Ein TDE-"Hello World"-Programm wurde in %{dest} erstellt. -Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε του TDE δημιουργήθηκε στο %{dest} -Comment[es]=Un programa «Hola mundo» para TDE ha sido creado en %{dest} -Comment[et]=TDE "Tere, maailm" programm loodi asukohta %{dest} -Comment[eu]=TDE-ren "Kaixo mundua" programa bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ TDE Hello world در %{dest} ایجاد شد -Comment[fr]=Un programme TDE « Bonjour monde » a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár "Hello World" TDE i %{dest} -Comment[gl]=Creouse un programa TDE Ola mundo en %{dest} -Comment[hu]=Létrejött egy TDE Hello world program itt: %{dest} -Comment[it]=È stato creato un semplice programma TDE di "Hello world" in %{dest} -Comment[ja]=TDE Hello world プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en "Moin Welt"-Programm för TDE opstellt -Comment[ne]=केडीई हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDE Hello World-programma is aangemaakt in %{dest} -Comment[pl]=Program 'Witaj świecie' dla TDE został utworzony w %{dest} -Comment[pt]=Foi criado um programa Olá Mundo do TDE em %{dest} -Comment[pt_BR]=Foi criado um programa Olá Mundo do TDE em %{dest} -Comment[ru]=Приложение TDE Hello world создано в %{dest} -Comment[sk]=TDE Ahoj svet program bol vytvorený v %{dest} -Comment[sl]=Program Hello World za TDE je bil ustvarjen v %{dest} -Comment[sr]=TDE „Здраво свете“ програм направљен је у %{dest} -Comment[sr@Latn]=TDE „Zdravo svete“ program napravljen je u %{dest} -Comment[sv]=Ett TDE Hello world-program skapades i %{dest} -Comment[tr]=Bir TDE Merhaba Dünya programı %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了 TDE Hello world 程序 -Comment[zh_TW]=一個 TDE Hello World 程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/khello2/CMakeLists.txt b/languages/cpp/app_templates/khello2/CMakeLists.txt index 151fb079..8e9fdb9d 100644 --- a/languages/cpp/app_templates/khello2/CMakeLists.txt +++ b/languages/cpp/app_templates/khello2/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( khello2.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/khello2.tar.gz khello2.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - khello2.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + khello2.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/khello2/Makefile.am b/languages/cpp/app_templates/khello2/Makefile.am index 96774e3b..14445170 100644 --- a/languages/cpp/app_templates/khello2/Makefile.am +++ b/languages/cpp/app_templates/khello2/Makefile.am @@ -4,10 +4,10 @@ dataFiles = src-Makefile.am app.cpp app.h main.cpp appui.rc app.tdevelop \ templateName = khello2 ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/khello2/app.tdevelop b/languages/cpp/app_templates/khello2/app.tdevelop index b51226ee..a079670d 100644 --- a/languages/cpp/app_templates/khello2/app.tdevelop +++ b/languages/cpp/app_templates/khello2/app.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -47,8 +47,8 @@ -O0 -g3 - - + + @@ -56,8 +56,8 @@ - - + + ada ada_bugs_gcc @@ -92,24 +92,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/khello2/khello2.kdevtemplate b/languages/cpp/app_templates/khello2/khello2.kdevtemplate new file mode 100644 index 00000000..b85e11fb --- /dev/null +++ b/languages/cpp/app_templates/khello2/khello2.kdevtemplate @@ -0,0 +1,230 @@ +# TDE Config File +[General] +Name=Simple Designer based TDE Application +Name[ca]=Simple aplicació per al TDE basada en el dissenyador +Name[da]=Simpelt Designer-baseret TDE program +Name[de]=Einfache, auf Designer basierende TDE-Anwendung +Name[el]=Απλή εφαρμογή TDE βασισμένη στο σχεδιαστή +Name[es]=Aplicación para TDE sencilla basada en el diseñador +Name[et]=Lihtne TDE rakendus Disaineri põhjal +Name[eu]=Designer-en oinarritutako TDE aplikazio simple bat +Name[fa]=کاربرد TDE بر مبنای طراح ساده +Name[fr]=Application TDE simple basée sur Designer +Name[gl]=Aplicación TDE sinxela baseada no deseñador +Name[hu]=Egyszerű Qt Designer-alapú TDE-s alkalmazás +Name[it]=Una semplice applicazione TDE basata su designer +Name[ja]=Designer ベースの簡単な TDE アプリケーション +Name[nds]=Eenfach, op "Designer" opbuut TDE-Programm +Name[ne]=साधारण डिजाइनरमा आधारित केडीई अनुप्रयोग +Name[nl]=Eenvoudige Designer-gebaseerde TDE-toepassing +Name[pl]=Prosty program dla TDE wykonany w Designerze +Name[pt]=Aplicação Simples do TDE baseada no Qt Designer +Name[pt_BR]=Aplicação Simples do TDE baseada no Qt Designer +Name[ru]=Простое приложение TDE с формой +Name[sk]=Jednoduchý dizajnér založený na TDE aplikácii +Name[sr]=Једноставан TDE програм на основу Designer-а +Name[sr@Latn]=Jednostavan TDE program na osnovu Designer-a +Name[sv]=Enkelt TDE-program baserat på Designer +Name[tr]=Basit Designer tabanlı TDE Uygulaması +Name[zh_CN]=基于设计师的简单 TDE 应用程序 +Name[zh_TW]=簡單的設計器 TDE 應用程式 +Category=C++/TDE +Icon=khello2.png +Comment=Generates a simple TDE application with one Qt-designer based widget. +Comment[ca]=Genera una simple aplicació per al TDE basada en el dissenyador de Qt. +Comment[da]=Genererer et simpelt TDE program med en Qt-designer baseret kontrol. +Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem auf Qt-Designer basierenden Widget. +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό βασισμένο στο σχεδιαστή Qt. +Comment[es]=Genera una sencilla aplicación para TDE con una ventana basada en Qt-designer. +Comment[et]=Lihtsa TDE rakenduse loomine ühe vidinaga Qt Disaineri põhjal. +Comment[eu]=Qt Designer-en oinarritutako trepeta bat duen TDE aplikazio sinple bat sortzen du. +Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر مبنای طراح Qt تولید می‌کند. +Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget) basé sur Qt-designer. +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin bunaithe ar Qt-Designer +Comment[gl]=Xera unha aplicación TDE sinxela cunha compoñente baseada en Qt-designer. +Comment[hu]=Létrehoz egy egyszerű TDE-s alkalmazást, mely egy Qt Designerrel készített grafikus elemre épül. +Comment[it]=Genera una semplice applicazione TDE con un elemento grafico basato su Qt-designer. +Comment[nds]=Stellt en eenfach TDE-Programm mit een op Qt-Designer opbuut Element op. +Comment[ne]=क्यू टी डिजाइनरमा आधारित विगेटसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één Qt-Designer-gebaseerde widget. +Comment[pl]=Generuje prosty program dla TDE z jednym widgetem pochodzącym z Qt Designera. +Comment[pt]=Gera uma aplicação simples do TDE com uma interface baseada no Qt-designer. +Comment[pt_BR]=Gera uma aplicação simples do TDE com uma interface baseada no Qt-designer. +Comment[ru]=Создание простого приложения TDE с формой, созданной в Qt Designer. +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom Qt dizajnéra. +Comment[sr]=Прави једноставан TDE програма са једном контролом на основу Qt-Designer-а. +Comment[sr@Latn]=Pravi jednostavan TDE programa sa jednom kontrolom na osnovu Qt-Designer-a. +Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent baserad på Qt-Designer. +Comment[tr]=Qt-designer tabanlı bir parçacığı olan basit bir TDE uygulaması yaratır. +Comment[zh_CN]=生成一个带一个基于 Qt 设计师部件的简单 TDE 应用程序。 +Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含 Qt 設計器的元件 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=khello2.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/po + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE9] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[MkDir4] +Type=mkdir +Dir=%{dest}/src + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[FILE13] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE14] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE15] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE16] +Type=install +Source=%{src}/widget.cpp +Dest=%{dest}/src/%{APPNAMELC}widget.cpp + +[FILE17] +Type=install +Source=%{src}/widget.h +Dest=%{dest}/src/%{APPNAMELC}widget.h + +[FILE18] +Type=install +EscapeXML=true +Source=%{src}/widgetbase.ui +Dest=%{dest}/src/%{APPNAMELC}widgetbase.ui + +[FILE19] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE20] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE21] +Type=install +Source=%{src}/app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A simple designer based TDE application was created in %{dest} +Comment[ca]=A simple aplicació per al TDE basada en el dissenyador ha estat creada en %{dest} +Comment[da]=Et simpelt designer-baseret TDE program blev oprettet i %{dest} +Comment[de]=Eine einfache, auf Designer basierende TDE-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια απλή εφαρμογή TDE βασισμένη στο σχεδιαστή δημιουργήθηκε στο %{dest} +Comment[es]=Una sencilla aplicación para TDE basada en el diseñador ha sido creada en %{dest} +Comment[et]=Lihtne TDE rakendus Disaineri põhjal loodi asukohta %{dest} +Comment[eu]=Designer-en oinarritutako TDE aplikazio simple bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد ساده‌ای بر مبنای طراح در %{dest} ایجاد شد +Comment[fr]=Une application TDE simple basée sur Designer a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár simplí TDE bunaithe ar Qt-Designer i %{dest} +Comment[gl]=Creouse unha aplicación TDE baseada no deseñador en %{dest} +Comment[hu]=Létrejött egy egyszerű, Qt Designer-alapú TDE-s alkalmazás itt: %{dest} +Comment[it]=È stata creata una semplice applicazione TDE basata su designer +Comment[ja]=Designer ベースの簡単な TDE アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach op "Designer" opbuut TDE-Programm opstellt +Comment[ne]=साधारण डिजाइनरमा आधारित केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudige Designer-gebaseerde TDE-toepassing is aangemaakt in %{dest} +Comment[pl]=Prosty program wykorzystujący Qt Designera został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação simples do TDE em %{dest} +Comment[pt_BR]=Foi criada uma aplicação simples do TDE em %{dest} +Comment[ru]=Простое приложение TDE с формой создано в %{dest} +Comment[sk]=Jednoduchý dizajnér založený na TDE aplikácii bol vytvorený v %{dest} +Comment[sr]=Једноставан TDE програм на основу Designer-а направљен је у %{dest} +Comment[sr@Latn]=Jednostavan TDE program na osnovu Designer-a napravljen je u %{dest} +Comment[sv]=Ett enkelt TDE-program baserat på Designer skapades i %{dest} +Comment[tr]=Designer tabanlı basit bir TDE uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个基于设计师的简单 TDE 应用程序 +Comment[zh_TW]=一個簡單的設計器 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/khello2/khello2.tdevtemplate b/languages/cpp/app_templates/khello2/khello2.tdevtemplate deleted file mode 100644 index 66666212..00000000 --- a/languages/cpp/app_templates/khello2/khello2.tdevtemplate +++ /dev/null @@ -1,230 +0,0 @@ -# TDE Config File -[General] -Name=Simple Designer based TDE Application -Name[ca]=Simple aplicació per al TDE basada en el dissenyador -Name[da]=Simpelt Designer-baseret TDE program -Name[de]=Einfache, auf Designer basierende TDE-Anwendung -Name[el]=Απλή εφαρμογή TDE βασισμένη στο σχεδιαστή -Name[es]=Aplicación para TDE sencilla basada en el diseñador -Name[et]=Lihtne TDE rakendus Disaineri põhjal -Name[eu]=Designer-en oinarritutako TDE aplikazio simple bat -Name[fa]=کاربرد TDE بر مبنای طراح ساده -Name[fr]=Application TDE simple basée sur Designer -Name[gl]=Aplicación TDE sinxela baseada no deseñador -Name[hu]=Egyszerű Qt Designer-alapú TDE-s alkalmazás -Name[it]=Una semplice applicazione TDE basata su designer -Name[ja]=Designer ベースの簡単な TDE アプリケーション -Name[nds]=Eenfach, op "Designer" opbuut TDE-Programm -Name[ne]=साधारण डिजाइनरमा आधारित केडीई अनुप्रयोग -Name[nl]=Eenvoudige Designer-gebaseerde TDE-toepassing -Name[pl]=Prosty program dla TDE wykonany w Designerze -Name[pt]=Aplicação Simples do TDE baseada no Qt Designer -Name[pt_BR]=Aplicação Simples do TDE baseada no Qt Designer -Name[ru]=Простое приложение TDE с формой -Name[sk]=Jednoduchý dizajnér založený na TDE aplikácii -Name[sr]=Једноставан TDE програм на основу Designer-а -Name[sr@Latn]=Jednostavan TDE program na osnovu Designer-a -Name[sv]=Enkelt TDE-program baserat på Designer -Name[tr]=Basit Designer tabanlı TDE Uygulaması -Name[zh_CN]=基于设计师的简单 TDE 应用程序 -Name[zh_TW]=簡單的設計器 TDE 應用程式 -Category=C++/TDE -Icon=khello2.png -Comment=Generates a simple TDE application with one Qt-designer based widget. -Comment[ca]=Genera una simple aplicació per al TDE basada en el dissenyador de Qt. -Comment[da]=Genererer et simpelt TDE program med en Qt-designer baseret kontrol. -Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem auf Qt-Designer basierenden Widget. -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό βασισμένο στο σχεδιαστή Qt. -Comment[es]=Genera una sencilla aplicación para TDE con una ventana basada en Qt-designer. -Comment[et]=Lihtsa TDE rakenduse loomine ühe vidinaga Qt Disaineri põhjal. -Comment[eu]=Qt Designer-en oinarritutako trepeta bat duen TDE aplikazio sinple bat sortzen du. -Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر مبنای طراح Qt تولید می‌کند. -Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget) basé sur Qt-designer. -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin bunaithe ar Qt-Designer -Comment[gl]=Xera unha aplicación TDE sinxela cunha compoñente baseada en Qt-designer. -Comment[hu]=Létrehoz egy egyszerű TDE-s alkalmazást, mely egy Qt Designerrel készített grafikus elemre épül. -Comment[it]=Genera una semplice applicazione TDE con un elemento grafico basato su Qt-designer. -Comment[nds]=Stellt en eenfach TDE-Programm mit een op Qt-Designer opbuut Element op. -Comment[ne]=क्यू टी डिजाइनरमा आधारित विगेटसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één Qt-Designer-gebaseerde widget. -Comment[pl]=Generuje prosty program dla TDE z jednym widgetem pochodzącym z Qt Designera. -Comment[pt]=Gera uma aplicação simples do TDE com uma interface baseada no Qt-designer. -Comment[pt_BR]=Gera uma aplicação simples do TDE com uma interface baseada no Qt-designer. -Comment[ru]=Создание простого приложения TDE с формой, созданной в Qt Designer. -Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom Qt dizajnéra. -Comment[sr]=Прави једноставан TDE програма са једном контролом на основу Qt-Designer-а. -Comment[sr@Latn]=Pravi jednostavan TDE programa sa jednom kontrolom na osnovu Qt-Designer-a. -Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent baserad på Qt-Designer. -Comment[tr]=Qt-designer tabanlı bir parçacığı olan basit bir TDE uygulaması yaratır. -Comment[zh_CN]=生成一个带一个基于 Qt 设计师部件的简单 TDE 应用程序。 -Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含 Qt 設計器的元件 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=khello2.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/po - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE9] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[MkDir4] -Type=mkdir -Dir=%{dest}/src - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[FILE13] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE14] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE15] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE16] -Type=install -Source=%{src}/widget.cpp -Dest=%{dest}/src/%{APPNAMELC}widget.cpp - -[FILE17] -Type=install -Source=%{src}/widget.h -Dest=%{dest}/src/%{APPNAMELC}widget.h - -[FILE18] -Type=install -EscapeXML=true -Source=%{src}/widgetbase.ui -Dest=%{dest}/src/%{APPNAMELC}widgetbase.ui - -[FILE19] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE20] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE21] -Type=install -Source=%{src}/app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=A simple designer based TDE application was created in %{dest} -Comment[ca]=A simple aplicació per al TDE basada en el dissenyador ha estat creada en %{dest} -Comment[da]=Et simpelt designer-baseret TDE program blev oprettet i %{dest} -Comment[de]=Eine einfache, auf Designer basierende TDE-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια απλή εφαρμογή TDE βασισμένη στο σχεδιαστή δημιουργήθηκε στο %{dest} -Comment[es]=Una sencilla aplicación para TDE basada en el diseñador ha sido creada en %{dest} -Comment[et]=Lihtne TDE rakendus Disaineri põhjal loodi asukohta %{dest} -Comment[eu]=Designer-en oinarritutako TDE aplikazio simple bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد ساده‌ای بر مبنای طراح در %{dest} ایجاد شد -Comment[fr]=Une application TDE simple basée sur Designer a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár simplí TDE bunaithe ar Qt-Designer i %{dest} -Comment[gl]=Creouse unha aplicación TDE baseada no deseñador en %{dest} -Comment[hu]=Létrejött egy egyszerű, Qt Designer-alapú TDE-s alkalmazás itt: %{dest} -Comment[it]=È stata creata una semplice applicazione TDE basata su designer -Comment[ja]=Designer ベースの簡単な TDE アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach op "Designer" opbuut TDE-Programm opstellt -Comment[ne]=साधारण डिजाइनरमा आधारित केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudige Designer-gebaseerde TDE-toepassing is aangemaakt in %{dest} -Comment[pl]=Prosty program wykorzystujący Qt Designera został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação simples do TDE em %{dest} -Comment[pt_BR]=Foi criada uma aplicação simples do TDE em %{dest} -Comment[ru]=Простое приложение TDE с формой создано в %{dest} -Comment[sk]=Jednoduchý dizajnér založený na TDE aplikácii bol vytvorený v %{dest} -Comment[sr]=Једноставан TDE програм на основу Designer-а направљен је у %{dest} -Comment[sr@Latn]=Jednostavan TDE program na osnovu Designer-a napravljen je u %{dest} -Comment[sv]=Ett enkelt TDE-program baserat på Designer skapades i %{dest} -Comment[tr]=Designer tabanlı basit bir TDE uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个基于设计师的简单 TDE 应用程序 -Comment[zh_TW]=一個簡單的設計器 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kicker/CMakeLists.txt b/languages/cpp/app_templates/kicker/CMakeLists.txt index fba98f58..c1a1d7d5 100644 --- a/languages/cpp/app_templates/kicker/CMakeLists.txt +++ b/languages/cpp/app_templates/kicker/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( kicker.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kicker.tar.gz kicker.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kicker.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kicker.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kicker/Makefile.am b/languages/cpp/app_templates/kicker/Makefile.am index 254e5917..82095d72 100644 --- a/languages/cpp/app_templates/kicker/Makefile.am +++ b/languages/cpp/app_templates/kicker/Makefile.am @@ -3,10 +3,10 @@ dataFiles = applet.cpp applet.h applet.desktop applet.tdevelop \ templateName = kicker ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kicker/applet.tdevelop b/languages/cpp/app_templates/kicker/applet.tdevelop index 88bf952d..929b3c49 100644 --- a/languages/cpp/app_templates/kicker/applet.tdevelop +++ b/languages/cpp/app_templates/kicker/applet.tdevelop @@ -14,16 +14,16 @@ Kicker - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}.la debug @@ -45,8 +45,8 @@ -O0 -g3 - - + + @@ -54,8 +54,8 @@ - - + + ada ada_bugs_gcc @@ -92,24 +92,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kicker/kicker.kdevtemplate b/languages/cpp/app_templates/kicker/kicker.kdevtemplate new file mode 100644 index 00000000..5185eb20 --- /dev/null +++ b/languages/cpp/app_templates/kicker/kicker.kdevtemplate @@ -0,0 +1,193 @@ +[General] +Name=Kicker Applet +Name[br]=Arloadig Kicker +Name[ca]=Una miniaplicació per a Kicker +Name[da]=Kicker-applet +Name[de]=Kicker-Miniprogramm +Name[el]=Μικροεφαρμογή Kicker +Name[es]=Applet para Kicker +Name[et]=Kickeri aplett +Name[eu]=Kicker applet-a +Name[fa]=برنامک Kicker +Name[fr]=Applet Kicker +Name[ga]=Feidhmchláirín Kicker +Name[gl]=Applet para Kicker +Name[hu]=Panel-kisalkalmazás +Name[it]=Applet di kicker +Name[ja]=Kicker アプレット +Name[nds]=Kicker-Lüttprogramm +Name[ne]=किकर एप्लेट +Name[nl]=Kicker-applet +Name[pl]=Aplet panelu +Name[pt]='Applet' do Kicker +Name[pt_BR]='Applet' do Kicker +Name[ru]=Аплет панели TDE +Name[sk]=Kicker applet +Name[sl]=Vstavek za Kicker +Name[sr]=Аплет за Kicker +Name[sr@Latn]=Aplet za Kicker +Name[sv]=Miniprogram för Kicker +Name[tr]=Kicker Küçük Uygulaması +Name[zh_CN]=Kicker 小程序 +Name[zh_TW]=Kicker 小程式 +Icon=kicker.png +Category=C++/TDE +Comment=Generates a framework for an applet that embeds into the TDE panel +Comment[ca]=Genera una infraestructura per a una miniaplicació encastada en el plafó de TDE +Comment[da]=Genererer et skelet for en applet der indlejres i TDE's panel +Comment[de]=Erstellt das Grundgerüst für ein Miniprogramm, das in die TDE-Kontrollleiste eingebettet wird. +Comment[el]=Δημιουργεί ένα πλαίσιο για μία μικροεφαρμογή που ενσωματώνεται στον πίνακα του TDE +Comment[es]=Genera una infraestructura para un applet empotrado en el panel de TDE +Comment[et]=Apleti raamistiku loomine, mida saab põimida TDE paneelile +Comment[eu]=TDE-ren panelean kapsulatzen den applet baten lan-marko bat sortzen du +Comment[fa]=چارچوبی برای برنامک نهفته‌شده در تابلوی TDEتولید می‌کند +Comment[fr]=Génère une infrastructure pour un applet qui s'intègre dans le tableau de bord de TDE +Comment[gl]=Xera un contorno de traballo para un applet que se incrusta no panel de TDE. +Comment[hu]=Létrehoz egy keretprogramot TDE-s panel-kisalkalmazás készítéséhez +Comment[it]=Genera l'infrastruttura per un'applet che si integra nel pannello di TDE +Comment[nds]=Stellt dat Rahmenwark för en Lüttprogramm op, dat sik na dat TDE-Paneel inbett +Comment[ne]=केडीई प्यानलमा सम्मिलित एप्लेटका लागि फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Genereert een framework voor een applet die kan worden ingebed in het TDE-paneel +Comment[pl]=Generuje szablon apletu, który można wstawić do panelu TDE +Comment[pt]=Gera a plataforma para uma 'applet' que se incorpore no painel do TDE +Comment[pt_BR]=Gera a plataforma para uma 'applet' que se incorpore no painel do TDE +Comment[ru]=Создание аплета панели TDE +Comment[sk]=Vygeneruje framework pre applet, ktorý sa bude dať vložiť do TDE panelu +Comment[sr]=Прави радни оквир за аплет који се уграђује у TDE-ов панел +Comment[sr@Latn]=Pravi radni okvir za aplet koji se ugrađuje u TDE-ov panel +Comment[sv]=Skapar ett ramverk för ett miniprogram som inbäddas i TDE:s panel +Comment[tr]=TDE paneline gömülen bir küçük uygulama için bir çatı oluşturur. +Comment[zh_CN]=生成一个可嵌入 TDE 面板的小程序框架 +Comment[zh_TW]=產生一個嵌入 TDE 面板的小程式框架 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=kicker.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/applet.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/applet.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/applet.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/applet.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A Kicker Applet was created in %{dest} +Comment[ca]=Una miniaplicació per a Kicker ha estat creat en %{dest} +Comment[da]=En Kicker applet blev oprettet i %{dest} +Comment[de]=Ein Miniprogramm für Kicker wurde in %{dest} erstellt. +Comment[el]=Μία μικροεφαρμογή Kicker δημιουργήθηκε στο %{dest} +Comment[es]=Un applet para Kicker ha sido creado en %{dest} +Comment[et]=Kickeri aplett loodi asukohta %{dest} +Comment[eu]=Kicker Applet bat sortu da hemen: %{dest} +Comment[fa]=یک برنامک Kicker در %{dest} ایجاد شد +Comment[fr]=Un applet Kicker a été créé dans %{dest} +Comment[ga]=Cruthaíodh feidhmchláirín Kicker i %{dest} +Comment[gl]=Creouse un applet para Kicker en %{dest} +Comment[hu]=Létrejött egy panel-kisalkalmazás itt: %{dest} +Comment[it]=È stata creata un'applet per kicker in %{dest} +Comment[ja]=Kicker アプレットを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Kicker-Lüttprogramm opstellt +Comment[ne]=किकर एप्लेट %{dest} मा सिर्जना गरियो +Comment[nl]=Een Kicker-applet is aangemaakt in %{dest} +Comment[pl]=Aplet panelu został utworzony w %{dest} +Comment[pt]=Foi criada uma 'applet' do Kicker em %{dest} +Comment[pt_BR]=Foi criada uma 'applet' do Kicker em %{dest} +Comment[ru]=Аплет панели TDE создан в %{dest} +Comment[sk]=Kicker applet bol vytvorený v %{dest} +Comment[sl]=Vstavek za Kicker je bil ustvarjen v %{dest} +Comment[sr]=Аплет за Kicker направљен је у %{dest} +Comment[sr@Latn]=Aplet za Kicker napravljen je u %{dest} +Comment[sv]=Ett miniprogram för Kicker skapades i %{dest} +Comment[tr]=Bir Kicker küçük uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 Kicker 小程序 +Comment[zh_TW]=一個 Kicker 小程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kicker/kicker.tdevtemplate b/languages/cpp/app_templates/kicker/kicker.tdevtemplate deleted file mode 100644 index ba1252de..00000000 --- a/languages/cpp/app_templates/kicker/kicker.tdevtemplate +++ /dev/null @@ -1,193 +0,0 @@ -[General] -Name=Kicker Applet -Name[br]=Arloadig Kicker -Name[ca]=Una miniaplicació per a Kicker -Name[da]=Kicker-applet -Name[de]=Kicker-Miniprogramm -Name[el]=Μικροεφαρμογή Kicker -Name[es]=Applet para Kicker -Name[et]=Kickeri aplett -Name[eu]=Kicker applet-a -Name[fa]=برنامک Kicker -Name[fr]=Applet Kicker -Name[ga]=Feidhmchláirín Kicker -Name[gl]=Applet para Kicker -Name[hu]=Panel-kisalkalmazás -Name[it]=Applet di kicker -Name[ja]=Kicker アプレット -Name[nds]=Kicker-Lüttprogramm -Name[ne]=किकर एप्लेट -Name[nl]=Kicker-applet -Name[pl]=Aplet panelu -Name[pt]='Applet' do Kicker -Name[pt_BR]='Applet' do Kicker -Name[ru]=Аплет панели TDE -Name[sk]=Kicker applet -Name[sl]=Vstavek za Kicker -Name[sr]=Аплет за Kicker -Name[sr@Latn]=Aplet za Kicker -Name[sv]=Miniprogram för Kicker -Name[tr]=Kicker Küçük Uygulaması -Name[zh_CN]=Kicker 小程序 -Name[zh_TW]=Kicker 小程式 -Icon=kicker.png -Category=C++/TDE -Comment=Generates a framework for an applet that embeds into the TDE panel -Comment[ca]=Genera una infraestructura per a una miniaplicació encastada en el plafó de TDE -Comment[da]=Genererer et skelet for en applet der indlejres i TDE's panel -Comment[de]=Erstellt das Grundgerüst für ein Miniprogramm, das in die TDE-Kontrollleiste eingebettet wird. -Comment[el]=Δημιουργεί ένα πλαίσιο για μία μικροεφαρμογή που ενσωματώνεται στον πίνακα του TDE -Comment[es]=Genera una infraestructura para un applet empotrado en el panel de TDE -Comment[et]=Apleti raamistiku loomine, mida saab põimida TDE paneelile -Comment[eu]=TDE-ren panelean kapsulatzen den applet baten lan-marko bat sortzen du -Comment[fa]=چارچوبی برای برنامک نهفته‌شده در تابلوی TDEتولید می‌کند -Comment[fr]=Génère une infrastructure pour un applet qui s'intègre dans le tableau de bord de TDE -Comment[gl]=Xera un contorno de traballo para un applet que se incrusta no panel de TDE. -Comment[hu]=Létrehoz egy keretprogramot TDE-s panel-kisalkalmazás készítéséhez -Comment[it]=Genera l'infrastruttura per un'applet che si integra nel pannello di TDE -Comment[nds]=Stellt dat Rahmenwark för en Lüttprogramm op, dat sik na dat TDE-Paneel inbett -Comment[ne]=केडीई प्यानलमा सम्मिलित एप्लेटका लागि फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Genereert een framework voor een applet die kan worden ingebed in het TDE-paneel -Comment[pl]=Generuje szablon apletu, który można wstawić do panelu TDE -Comment[pt]=Gera a plataforma para uma 'applet' que se incorpore no painel do TDE -Comment[pt_BR]=Gera a plataforma para uma 'applet' que se incorpore no painel do TDE -Comment[ru]=Создание аплета панели TDE -Comment[sk]=Vygeneruje framework pre applet, ktorý sa bude dať vložiť do TDE panelu -Comment[sr]=Прави радни оквир за аплет који се уграђује у TDE-ов панел -Comment[sr@Latn]=Pravi radni okvir za aplet koji se ugrađuje u TDE-ov panel -Comment[sv]=Skapar ett ramverk för ett miniprogram som inbäddas i TDE:s panel -Comment[tr]=TDE paneline gömülen bir küçük uygulama için bir çatı oluşturur. -Comment[zh_CN]=生成一个可嵌入 TDE 面板的小程序框架 -Comment[zh_TW]=產生一個嵌入 TDE 面板的小程式框架 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=kicker.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/applet.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/applet.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/applet.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/applet.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=A Kicker Applet was created in %{dest} -Comment[ca]=Una miniaplicació per a Kicker ha estat creat en %{dest} -Comment[da]=En Kicker applet blev oprettet i %{dest} -Comment[de]=Ein Miniprogramm für Kicker wurde in %{dest} erstellt. -Comment[el]=Μία μικροεφαρμογή Kicker δημιουργήθηκε στο %{dest} -Comment[es]=Un applet para Kicker ha sido creado en %{dest} -Comment[et]=Kickeri aplett loodi asukohta %{dest} -Comment[eu]=Kicker Applet bat sortu da hemen: %{dest} -Comment[fa]=یک برنامک Kicker در %{dest} ایجاد شد -Comment[fr]=Un applet Kicker a été créé dans %{dest} -Comment[ga]=Cruthaíodh feidhmchláirín Kicker i %{dest} -Comment[gl]=Creouse un applet para Kicker en %{dest} -Comment[hu]=Létrejött egy panel-kisalkalmazás itt: %{dest} -Comment[it]=È stata creata un'applet per kicker in %{dest} -Comment[ja]=Kicker アプレットを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Kicker-Lüttprogramm opstellt -Comment[ne]=किकर एप्लेट %{dest} मा सिर्जना गरियो -Comment[nl]=Een Kicker-applet is aangemaakt in %{dest} -Comment[pl]=Aplet panelu został utworzony w %{dest} -Comment[pt]=Foi criada uma 'applet' do Kicker em %{dest} -Comment[pt_BR]=Foi criada uma 'applet' do Kicker em %{dest} -Comment[ru]=Аплет панели TDE создан в %{dest} -Comment[sk]=Kicker applet bol vytvorený v %{dest} -Comment[sl]=Vstavek za Kicker je bil ustvarjen v %{dest} -Comment[sr]=Аплет за Kicker направљен је у %{dest} -Comment[sr@Latn]=Aplet za Kicker napravljen je u %{dest} -Comment[sv]=Ett miniprogram för Kicker skapades i %{dest} -Comment[tr]=Bir Kicker küçük uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 Kicker 小程序 -Comment[zh_TW]=一個 Kicker 小程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kmake/Makefile.am b/languages/cpp/app_templates/kmake/Makefile.am index 35238c7e..b7bd96f9 100644 --- a/languages/cpp/app_templates/kmake/Makefile.am +++ b/languages/cpp/app_templates/kmake/Makefile.am @@ -2,10 +2,10 @@ dataFiles = appui.rc app.desktop app.cpp mainviewimp.cpp mainviewimp.h mainview. templateName = kmake ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kmake/app.tdevelop b/languages/cpp/app_templates/kmake/app.tdevelop index ffcb6370..ba82ff4b 100644 --- a/languages/cpp/app_templates/kmake/app.tdevelop +++ b/languages/cpp/app_templates/kmake/app.tdevelop @@ -10,16 +10,16 @@ Qt - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + @@ -30,8 +30,8 @@ false *.o,*.lo,CVS - - + + bash bash_bugs @@ -68,8 +68,8 @@ TDE Libraries (Doxygen) - - + + @@ -84,28 +84,28 @@ true - - + + ./bin/%{APPNAMELC} - + - + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kmake/kmake.kdevtemplate b/languages/cpp/app_templates/kmake/kmake.kdevtemplate new file mode 100644 index 00000000..7c2688d9 --- /dev/null +++ b/languages/cpp/app_templates/kmake/kmake.kdevtemplate @@ -0,0 +1,148 @@ +# TDE Config File +[General] +Name=QMake based TDE template +Name[ca]=Plantilla per al TDE basada en QMake +Name[da]=QMake baseret TDE-skabelon +Name[de]=Auf QMake basierende TDE-Vorlage +Name[el]=Πρότυπο TDE βασισμένο στο QMake +Name[es]=Plantilla para TDE basada en QMake +Name[et]=TDE mall QMake'i põhjal +Name[eu]=QMake-en oinarritutatko TDE txantiloia +Name[fa]=قالب TDE بر مبنای QMake +Name[fr]=Modèle TDE basé sur QMake +Name[ga]=Teimpléad TDE bunaithe ar QMake +Name[gl]=Modelo de TDE baseado en QMake +Name[hu]=QMake-alapú TDE-s sablon +Name[it]=Modello TDE basato su QMake +Name[ja]=QMake ベースの TDE テンプレート +Name[nds]=Op QMake opbuut TDE-Vörlaag +Name[ne]=QMake मा आधारित केडीई टेम्प्लेट +Name[nl]=Qmake-gebaseerde TDE-jabloon +Name[pl]=Oparty na QMake szablon dla TDE +Name[pt]=Modelo do TDE baseado no QMake +Name[pt_BR]=Modelo do TDE baseado no QMake +Name[ru]=Приложение TDE как проект QMake +Name[sk]=Šablóna TDE založená na QMake +Name[sr]=TDE шаблон на основи QMake-а +Name[sr@Latn]=TDE šablon na osnovi QMake-a +Name[sv]=QMake-baserad TDE-mall +Name[tr]=QMake tabanlı TDE şablonu +Name[zh_CN]=基于 QMake 的 TDE 模板 +Name[zh_TW]=QMake 為基礎的 TDE 樣本 +Icon=kmake.png +Category=C++/QMake project +Comment=Generates a simple TDE application using QMake based project manager +Comment[ca]=Genera una simple aplicació per al TDE usant un gestor de projectes basat en QMake +Comment[da]=Genererer et simpelt TDE program ved brug af QMake baseret projekthåndtering +Comment[de]=Erstellt eine einfache TDE-Anwendung unter Verwendung der QMake-Projektverwaltung +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE χρησιμοποιώντας το διαχειριστή έργου βασισμένο στο QMake +Comment[es]=Genera una sencilla aplicación para TDE que usa un gestor de proyecto basado en QMake +Comment[et]=Lihtsa TDE rakenduse loomine projektihalduriga QMake'i põhjal +Comment[eu]=TDE aplikazio sinple bat sortzen du QMake-en oinarritutako proiektu-kudeatzailea erabiliz +Comment[fa]=یک کاربرد سادۀ TDE، با استفاده از مدیر پروژۀ بر مبنای QMake تولید می‌کند +Comment[fr]=Génère une application TDE simple utilisant un gestionnaire de projet basé sur QMake +Comment[gl]=Xera unha aplicación TDE sinxela usando un xestor de proxectos baseado en QMake +Comment[hu]=Létrehoz egy egyszerű TDE-s alkalmazást Qmake-alapú projektkezelővel +Comment[it]=Genera una semplice applicazione TDE che usa QMake basata sul gestore di progetto +Comment[ja]=QMake ベースのプロジェクトマネージャを使って 簡単な TDE アプリケーションを作成します +Comment[nds]=Stellt mit den op QMake opbuut Projektpleger en eenfach TDE-Programm op +Comment[ne]=QMake आधारित परियोजना प्रबन्धक प्रयोग गरेर एउटा साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudige TDE-toepassing met behulp van Qmake-gebaseerde projectmanager +Comment[pl]=Generuje prosty program TDE używający menedżera projektów QMake +Comment[pt]=Gera uma aplicação simples do TDE, usando o QMake como gestor de projectos +Comment[pt_BR]=Gera uma aplicação simples do TDE, usando o QMake como gestor de projectos +Comment[ru]=Создание простого приложения TDE как проекта QMake +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu založenú na QMake projektovom manažéri +Comment[sr]=Прави једноставан TDE програм помоћу менаџера пројекта на основи QMake-а +Comment[sr@Latn]=Pravi jednostavan TDE program pomoću menadžera projekta na osnovi QMake-a +Comment[sv]=Skapar ett enkelt TDE-program baserat på QMake projekthantering +Comment[tr]=QMake tabanlı proje yöneticisini kullanarak basit bir TDE uygulaması yaratır. +Comment[zh_CN]=使用基于 QMake的工程管理器生成一个简单的 TDE 应用程序 +Comment[zh_TW]=產生一個使用 QMake 專案管理員的簡單 TDE 應用程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=kmake.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE3] +Type=install +Source=%{src}/src.pro +Dest=%{dest}/src/src.pro + +[FILE4] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE5] +Type=install +Source=%{src}/mainviewimp.cpp +Dest=%{dest}/src/mainviewimp.cpp + +[FILE7] +Type=install +Source=%{src}/mainviewimp.h +Dest=%{dest}/src/mainviewimp.h + +[FILE8] +Type=install +EscapeXML=true +Source=%{src}/mainview.ui +Dest=%{dest}/src/mainview.ui + +[FILE9] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}.rc + +[FILE10] +Type=install +Source=%{src}/app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A Qmake based TDE application was created in %{dest} +Comment[ca]=Una aplicació per al TDE basada en QMake ha estat creada en %{dest} +Comment[da]=Et Qmake baseret TDE program blev oprettet i %{dest} +Comment[de]=Eine auf Qmake basierende TDE-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή TDE βασισμένη στο Qmake δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación para TDE basada en QMake ha sido creada en %{dest} +Comment[et]=TDE rakendus QMake'i põhjal loodi asukohta %{dest} +Comment[eu]=Qmake-en oinarritutako TDE aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد TDE بر مبنای Qmake در %{dest} ایجاد شد +Comment[fr]=Une application TDE basée sur QMake a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár TDE bunaithe ar Qmake i %{dest} +Comment[gl]=Creouse unha aplicación TDE baseada en QMake en %{dest} +Comment[hu]=Létrejött egy Qmake-alapú TDE-s alkalmazás itt: %{dest} +Comment[it]=È stata creata una semplice applicazione TDE basata su Qmake in %{dest} +Comment[ja]=QMake ベースの TDE アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op QMake opbuut TDE-Programm opstellt +Comment[ne]=Qmake आधारित केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Qmake-gebaseerde TDE-toepassing is aangemaakt in %{dest} +Comment[pl]=Program TDE oparty na QMake został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDE baseada no Qmake em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDE baseada no Qmake em %{dest} +Comment[ru]=Приложение TDE как проект QMake создано в %{dest} +Comment[sk]=TDE aplikácia založená na QMake bola vytvorená v %{dest} +Comment[sr]=TDE програм на основу QMake-а направљен је у %{dest} +Comment[sr@Latn]=TDE program na osnovu QMake-a napravljen je u %{dest} +Comment[sv]=Ett Qmake-baserat TDE-program skapades i %{dest} +Comment[tr]=Bir QMake tabanlı TDE uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了基于 QMake 的 TDE 应用程序 +Comment[zh_TW]=一個以 Qmake 為基礎的 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kmake/kmake.tdevtemplate b/languages/cpp/app_templates/kmake/kmake.tdevtemplate deleted file mode 100644 index 7c2688d9..00000000 --- a/languages/cpp/app_templates/kmake/kmake.tdevtemplate +++ /dev/null @@ -1,148 +0,0 @@ -# TDE Config File -[General] -Name=QMake based TDE template -Name[ca]=Plantilla per al TDE basada en QMake -Name[da]=QMake baseret TDE-skabelon -Name[de]=Auf QMake basierende TDE-Vorlage -Name[el]=Πρότυπο TDE βασισμένο στο QMake -Name[es]=Plantilla para TDE basada en QMake -Name[et]=TDE mall QMake'i põhjal -Name[eu]=QMake-en oinarritutatko TDE txantiloia -Name[fa]=قالب TDE بر مبنای QMake -Name[fr]=Modèle TDE basé sur QMake -Name[ga]=Teimpléad TDE bunaithe ar QMake -Name[gl]=Modelo de TDE baseado en QMake -Name[hu]=QMake-alapú TDE-s sablon -Name[it]=Modello TDE basato su QMake -Name[ja]=QMake ベースの TDE テンプレート -Name[nds]=Op QMake opbuut TDE-Vörlaag -Name[ne]=QMake मा आधारित केडीई टेम्प्लेट -Name[nl]=Qmake-gebaseerde TDE-jabloon -Name[pl]=Oparty na QMake szablon dla TDE -Name[pt]=Modelo do TDE baseado no QMake -Name[pt_BR]=Modelo do TDE baseado no QMake -Name[ru]=Приложение TDE как проект QMake -Name[sk]=Šablóna TDE založená na QMake -Name[sr]=TDE шаблон на основи QMake-а -Name[sr@Latn]=TDE šablon na osnovi QMake-a -Name[sv]=QMake-baserad TDE-mall -Name[tr]=QMake tabanlı TDE şablonu -Name[zh_CN]=基于 QMake 的 TDE 模板 -Name[zh_TW]=QMake 為基礎的 TDE 樣本 -Icon=kmake.png -Category=C++/QMake project -Comment=Generates a simple TDE application using QMake based project manager -Comment[ca]=Genera una simple aplicació per al TDE usant un gestor de projectes basat en QMake -Comment[da]=Genererer et simpelt TDE program ved brug af QMake baseret projekthåndtering -Comment[de]=Erstellt eine einfache TDE-Anwendung unter Verwendung der QMake-Projektverwaltung -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE χρησιμοποιώντας το διαχειριστή έργου βασισμένο στο QMake -Comment[es]=Genera una sencilla aplicación para TDE que usa un gestor de proyecto basado en QMake -Comment[et]=Lihtsa TDE rakenduse loomine projektihalduriga QMake'i põhjal -Comment[eu]=TDE aplikazio sinple bat sortzen du QMake-en oinarritutako proiektu-kudeatzailea erabiliz -Comment[fa]=یک کاربرد سادۀ TDE، با استفاده از مدیر پروژۀ بر مبنای QMake تولید می‌کند -Comment[fr]=Génère une application TDE simple utilisant un gestionnaire de projet basé sur QMake -Comment[gl]=Xera unha aplicación TDE sinxela usando un xestor de proxectos baseado en QMake -Comment[hu]=Létrehoz egy egyszerű TDE-s alkalmazást Qmake-alapú projektkezelővel -Comment[it]=Genera una semplice applicazione TDE che usa QMake basata sul gestore di progetto -Comment[ja]=QMake ベースのプロジェクトマネージャを使って 簡単な TDE アプリケーションを作成します -Comment[nds]=Stellt mit den op QMake opbuut Projektpleger en eenfach TDE-Programm op -Comment[ne]=QMake आधारित परियोजना प्रबन्धक प्रयोग गरेर एउटा साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudige TDE-toepassing met behulp van Qmake-gebaseerde projectmanager -Comment[pl]=Generuje prosty program TDE używający menedżera projektów QMake -Comment[pt]=Gera uma aplicação simples do TDE, usando o QMake como gestor de projectos -Comment[pt_BR]=Gera uma aplicação simples do TDE, usando o QMake como gestor de projectos -Comment[ru]=Создание простого приложения TDE как проекта QMake -Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu založenú na QMake projektovom manažéri -Comment[sr]=Прави једноставан TDE програм помоћу менаџера пројекта на основи QMake-а -Comment[sr@Latn]=Pravi jednostavan TDE program pomoću menadžera projekta na osnovi QMake-a -Comment[sv]=Skapar ett enkelt TDE-program baserat på QMake projekthantering -Comment[tr]=QMake tabanlı proje yöneticisini kullanarak basit bir TDE uygulaması yaratır. -Comment[zh_CN]=使用基于 QMake的工程管理器生成一个简单的 TDE 应用程序 -Comment[zh_TW]=產生一個使用 QMake 專案管理員的簡單 TDE 應用程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=kmake.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE3] -Type=install -Source=%{src}/src.pro -Dest=%{dest}/src/src.pro - -[FILE4] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE5] -Type=install -Source=%{src}/mainviewimp.cpp -Dest=%{dest}/src/mainviewimp.cpp - -[FILE7] -Type=install -Source=%{src}/mainviewimp.h -Dest=%{dest}/src/mainviewimp.h - -[FILE8] -Type=install -EscapeXML=true -Source=%{src}/mainview.ui -Dest=%{dest}/src/mainview.ui - -[FILE9] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}.rc - -[FILE10] -Type=install -Source=%{src}/app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=A Qmake based TDE application was created in %{dest} -Comment[ca]=Una aplicació per al TDE basada en QMake ha estat creada en %{dest} -Comment[da]=Et Qmake baseret TDE program blev oprettet i %{dest} -Comment[de]=Eine auf Qmake basierende TDE-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή TDE βασισμένη στο Qmake δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación para TDE basada en QMake ha sido creada en %{dest} -Comment[et]=TDE rakendus QMake'i põhjal loodi asukohta %{dest} -Comment[eu]=Qmake-en oinarritutako TDE aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد TDE بر مبنای Qmake در %{dest} ایجاد شد -Comment[fr]=Une application TDE basée sur QMake a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár TDE bunaithe ar Qmake i %{dest} -Comment[gl]=Creouse unha aplicación TDE baseada en QMake en %{dest} -Comment[hu]=Létrejött egy Qmake-alapú TDE-s alkalmazás itt: %{dest} -Comment[it]=È stata creata una semplice applicazione TDE basata su Qmake in %{dest} -Comment[ja]=QMake ベースの TDE アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en op QMake opbuut TDE-Programm opstellt -Comment[ne]=Qmake आधारित केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Qmake-gebaseerde TDE-toepassing is aangemaakt in %{dest} -Comment[pl]=Program TDE oparty na QMake został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do TDE baseada no Qmake em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do TDE baseada no Qmake em %{dest} -Comment[ru]=Приложение TDE как проект QMake создано в %{dest} -Comment[sk]=TDE aplikácia založená na QMake bola vytvorená v %{dest} -Comment[sr]=TDE програм на основу QMake-а направљен је у %{dest} -Comment[sr@Latn]=TDE program na osnovu QMake-a napravljen je u %{dest} -Comment[sv]=Ett Qmake-baserat TDE-program skapades i %{dest} -Comment[tr]=Bir QMake tabanlı TDE uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了基于 QMake 的 TDE 应用程序 -Comment[zh_TW]=一個以 Qmake 為基礎的 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kmod/CMakeLists.txt b/languages/cpp/app_templates/kmod/CMakeLists.txt index ff891946..af575a10 100644 --- a/languages/cpp/app_templates/kmod/CMakeLists.txt +++ b/languages/cpp/app_templates/kmod/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( kmod.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kmod.tar.gz kmod.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kmod.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kmod.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kmod/Makefile.am b/languages/cpp/app_templates/kmod/Makefile.am index bae9772c..f4b1ec98 100644 --- a/languages/cpp/app_templates/kmod/Makefile.am +++ b/languages/cpp/app_templates/kmod/Makefile.am @@ -3,10 +3,10 @@ dataFiles = src-Makefile kmod.tdevelop kmod-driver.c templateName = kmod ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kmod/kmod.kdevtemplate b/languages/cpp/app_templates/kmod/kmod.kdevtemplate new file mode 100644 index 00000000..069d5103 --- /dev/null +++ b/languages/cpp/app_templates/kmod/kmod.kdevtemplate @@ -0,0 +1,89 @@ +# TDE Config File +[General] +Name=Linux Kernel module +Name[br]=Mollad ar galon Linux +Name[ca]=Mòdul del nucli Linux +Name[da]=Linux kernemodul +Name[de]=Linux-Kernelmodul +Name[el]=Άρθρωμα πυρήνα Linux +Name[es]=Módulo para el núcleo de Linux +Name[et]=Linuxi kerneli moodul +Name[eu]=Linux Kernel modulua +Name[fa]=پیمانۀ هستۀ لینوکس +Name[fr]=Module de noyau Linux +Name[ga]=Modúl Eithne Linux +Name[gl]=Módulo para o kernel Linux +Name[hu]=Linuxos kernelmodul +Name[it]=Modulo del kernel Linux +Name[ja]=Linux カーネルモジュール +Name[nds]=Linux-Kernelmoduul +Name[ne]=लिनक्स कर्नेल मोड्युल +Name[nl]=Linux kernelmodule +Name[pl]=Moduł jądra Linuksa +Name[pt]=Módulo do 'kernel' do Linux +Name[pt_BR]=Módulo do 'kernel' do Linux +Name[ru]=Драйвер ядра Linux +Name[sk]=Linux kernel modul +Name[sr]=Модул језгра Linux-а +Name[sr@Latn]=Modul jezgra Linux-a +Name[sv]=Modul för Linux kärna +Name[tr]=Linux Çekirdek Birimi +Name[zh_CN]=Linux 内核模块 +Name[zh_TW]=Linux 核心模組 +Icon= +Category=C +Comment=Generates a template for a Linux kernel module. +Comment[ca]=Genera una plantilla per a un mòdul del nucli Linux. +Comment[da]=Genererer en skabelon for en Linux kernemodul. +Comment[de]=Erstellt eine Vorlage für ein Linux-Kernelmodul. +Comment[el]=Δημιουργεί ένα πρότυπο για ένα άρθρωμα του πυρήνα του Linux. +Comment[es]=Genera una plantilla para un módulo del núcleo de Linux. +Comment[et]=Linuxi kerneli mooduli malli loomine. +Comment[eu]=Linux kernel modulu batentzat txantiloi bat sortzen du. +Comment[fa]=قالبی برای پیمانۀ هستۀ لینوکس تولید می‌کند +Comment[fr]=Génère un modèle pour un module de noyau Linux. +Comment[gl]=Xera unha modelo dun módulo para o kernel Linux. +Comment[hu]=Létrehoz egy sablont linuxos kernelmodul készítéséhez. +Comment[it]=Genera un modello per un modulo del kernel Linux kernel. +Comment[ja]=Linux カーネルモジュール用のテンプレートを作成します +Comment[nds]=Stellt en Vörlaag för en Linux-Kernelmoduul op. +Comment[ne]=लिनक्स कर्नेल मोड्युलका लागि टेम्प्लेट उत्पन्न गर्दछ +Comment[nl]=Genereert een sjabloon voor een Linux kernelmodule +Comment[pl]=Generuje szablon dla modułu jądra Linuksa. +Comment[pt]=Gera um modelo para um módulo do 'kernel' do Linux. +Comment[pt_BR]=Gera um modelo para um módulo do 'kernel' do Linux. +Comment[ru]=Создание драйвера ядра Linux. +Comment[sk]=Vygeneruje šablónu pre Linux kernel modul +Comment[sr]=Прави шаблон за модул језгра Linux-а. +Comment[sr@Latn]=Pravi šablon za modul jezgra Linux-a. +Comment[sv]=Skapar en mall för en modul i Linux kärna. +Comment[tr]=Bir Linux çekirdek birimi için bir şablon yaratır. +Comment[zh_CN]=生成一个 Linux 内核模块的模板。 +Comment[zh_TW]=產生一個 Linux 核心模組的樣本 +FileTemplates=h,CStyle,c,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}-driver.c +Archive=kmod.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/kmod.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/src-Makefile +Dest=%{dest}/Makefile + +[FILE3] +Type=install +Source=%{src}/kmod-driver.c +Dest=%{dest}/%{APPNAMELC}-driver.c + +[MSG] +Type=message +Command=A linux kernel module was created in %{dest} diff --git a/languages/cpp/app_templates/kmod/kmod.tdevelop b/languages/cpp/app_templates/kmod/kmod.tdevelop index 55d6f2b6..6ce5f390 100644 --- a/languages/cpp/app_templates/kmod/kmod.tdevelop +++ b/languages/cpp/app_templates/kmod/kmod.tdevelop @@ -4,10 +4,10 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C - TDevDebugger + KDevDebugger C @@ -15,13 +15,13 @@ Kernel - + - - + + make @@ -35,8 +35,8 @@ - - + + ada ada_bugs_gcc @@ -83,11 +83,11 @@ TDE Libraries (Doxygen) - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kmod/kmod.tdevtemplate b/languages/cpp/app_templates/kmod/kmod.tdevtemplate deleted file mode 100644 index c47912f8..00000000 --- a/languages/cpp/app_templates/kmod/kmod.tdevtemplate +++ /dev/null @@ -1,89 +0,0 @@ -# TDE Config File -[General] -Name=Linux Kernel module -Name[br]=Mollad ar galon Linux -Name[ca]=Mòdul del nucli Linux -Name[da]=Linux kernemodul -Name[de]=Linux-Kernelmodul -Name[el]=Άρθρωμα πυρήνα Linux -Name[es]=Módulo para el núcleo de Linux -Name[et]=Linuxi kerneli moodul -Name[eu]=Linux Kernel modulua -Name[fa]=پیمانۀ هستۀ لینوکس -Name[fr]=Module de noyau Linux -Name[ga]=Modúl Eithne Linux -Name[gl]=Módulo para o kernel Linux -Name[hu]=Linuxos kernelmodul -Name[it]=Modulo del kernel Linux -Name[ja]=Linux カーネルモジュール -Name[nds]=Linux-Kernelmoduul -Name[ne]=लिनक्स कर्नेल मोड्युल -Name[nl]=Linux kernelmodule -Name[pl]=Moduł jądra Linuksa -Name[pt]=Módulo do 'kernel' do Linux -Name[pt_BR]=Módulo do 'kernel' do Linux -Name[ru]=Драйвер ядра Linux -Name[sk]=Linux kernel modul -Name[sr]=Модул језгра Linux-а -Name[sr@Latn]=Modul jezgra Linux-a -Name[sv]=Modul för Linux kärna -Name[tr]=Linux Çekirdek Birimi -Name[zh_CN]=Linux 内核模块 -Name[zh_TW]=Linux 核心模組 -Icon= -Category=C -Comment=Generates a template for a Linux kernel module. -Comment[ca]=Genera una plantilla per a un mòdul del nucli Linux. -Comment[da]=Genererer en skabelon for en Linux kernemodul. -Comment[de]=Erstellt eine Vorlage für ein Linux-Kernelmodul. -Comment[el]=Δημιουργεί ένα πρότυπο για ένα άρθρωμα του πυρήνα του Linux. -Comment[es]=Genera una plantilla para un módulo del núcleo de Linux. -Comment[et]=Linuxi kerneli mooduli malli loomine. -Comment[eu]=Linux kernel modulu batentzat txantiloi bat sortzen du. -Comment[fa]=قالبی برای پیمانۀ هستۀ لینوکس تولید می‌کند -Comment[fr]=Génère un modèle pour un module de noyau Linux. -Comment[gl]=Xera unha modelo dun módulo para o kernel Linux. -Comment[hu]=Létrehoz egy sablont linuxos kernelmodul készítéséhez. -Comment[it]=Genera un modello per un modulo del kernel Linux kernel. -Comment[ja]=Linux カーネルモジュール用のテンプレートを作成します -Comment[nds]=Stellt en Vörlaag för en Linux-Kernelmoduul op. -Comment[ne]=लिनक्स कर्नेल मोड्युलका लागि टेम्प्लेट उत्पन्न गर्दछ -Comment[nl]=Genereert een sjabloon voor een Linux kernelmodule -Comment[pl]=Generuje szablon dla modułu jądra Linuksa. -Comment[pt]=Gera um modelo para um módulo do 'kernel' do Linux. -Comment[pt_BR]=Gera um modelo para um módulo do 'kernel' do Linux. -Comment[ru]=Создание драйвера ядра Linux. -Comment[sk]=Vygeneruje šablónu pre Linux kernel modul -Comment[sr]=Прави шаблон за модул језгра Linux-а. -Comment[sr@Latn]=Pravi šablon za modul jezgra Linux-a. -Comment[sv]=Skapar en mall för en modul i Linux kärna. -Comment[tr]=Bir Linux çekirdek birimi için bir şablon yaratır. -Comment[zh_CN]=生成一个 Linux 内核模块的模板。 -Comment[zh_TW]=產生一個 Linux 核心模組的樣本 -FileTemplates=h,CStyle,c,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}-driver.c -Archive=kmod.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/kmod.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/src-Makefile -Dest=%{dest}/Makefile - -[FILE3] -Type=install -Source=%{src}/kmod-driver.c -Dest=%{dest}/%{APPNAMELC}-driver.c - -[MSG] -Type=message -Command=A linux kernel module was created in %{dest} diff --git a/languages/cpp/app_templates/kofficepart/CMakeLists.txt b/languages/cpp/app_templates/kofficepart/CMakeLists.txt index 460b3293..955225bc 100644 --- a/languages/cpp/app_templates/kofficepart/CMakeLists.txt +++ b/languages/cpp/app_templates/kofficepart/CMakeLists.txt @@ -21,9 +21,9 @@ add_custom_target( kopart.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kopart.tar.gz kopart.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kopart.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kopart.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kofficepart/Makefile.am b/languages/cpp/app_templates/kofficepart/Makefile.am index d602a552..a38746b1 100644 --- a/languages/cpp/app_templates/kofficepart/Makefile.am +++ b/languages/cpp/app_templates/kofficepart/Makefile.am @@ -7,10 +7,10 @@ dataFiles = kopart.tdevelop kopart_aboutdata.h kopart_part.cpp kopart_view.h \ templateName = kopart ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kofficepart/kopart.kdevtemplate b/languages/cpp/app_templates/kofficepart/kopart.kdevtemplate new file mode 100644 index 00000000..0273e0ca --- /dev/null +++ b/languages/cpp/app_templates/kofficepart/kopart.kdevtemplate @@ -0,0 +1,231 @@ +# TDE Config File +[General] +Name=KOffice Part +Name[br]=Perzh KOffice +Name[ca]=Part per a KOffice +Name[da]=KOffice part +Name[de]=KOffice-Komponente +Name[el]=Τμήμα KOffice +Name[es]=Part de KOffice +Name[et]=KOffice'i komponent +Name[eu]=KOffice zatia +Name[fa]=جزء KOffice +Name[fr]=Composant KOffice +Name[ga]=Páirt KOffice +Name[gl]='Part' para KOffice +Name[hu]=KOffice-objektum +Name[it]=Part di KOffice +Name[nds]=KOffice-Komponent +Name[ne]=केडीई अफिस भाग +Name[nl]=Koffice-part +Name[pt]=Componente do KOffice +Name[pt_BR]=Componente do KOffice +Name[ru]=Приложение KOffice +Name[sr]=KOffice део +Name[sr@Latn]=KOffice deo +Name[sv]=Koffice-delprogram +Name[tr]=KOffice Bileşeni +Name[zh_CN]=KOffice 部件 +Name[zh_TW]=KOffice 元件 +Icon=kopart.png +Category=C++/TDE +Comment=Generates a framework for a full KOffice Application. +Comment[ca]=Genera una infraestructura per a una completa aplicació de KOffice. +Comment[da]=Genererer et skelet for et fuldstændigt KOffice-program. +Comment[de]=Erstellt ein Grundgerüst für eine vollwertige KOffice-Anwendung +Comment[el]=Δημιουργεί ένα πλαίσιο για μια πλήρης εφαρμογή του KOffice. +Comment[es]=Genera una infraestructura para una aplicación completa de KOffice. +Comment[et]=KOffice'i rakenduse raamistiku loomine. +Comment[eu]=KOffice-en aplikazio batentzat lan-marko oso bat sortzen du. +Comment[fa]=چارچوبی را برای کاربرد کامل KOffice تولید می‌کند. +Comment[fr]=Génère une infrastructure pour une application KOffice complète. +Comment[gl]=Xera un contorno de traballo para unha aplicación KOffice completa. +Comment[hu]=Létrehoz egy kiindulási keretprogramot teljes KOffice-alkalmazás készítéséhez. +Comment[it]=Genera l'infrastruttura per un'applicazione completa di KOffice. +Comment[nds]=Stellt dat Rahmenwark för en heel KOffice-Programm op. +Comment[ne]=पूर्ण केडीई अफिस अनुप्रयोगका लागि फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Genereert een framework voor een volledige KOffice-toepassing +Comment[pl]=Generuje szablon pełnego programu KOffice. +Comment[pt]=Gera a plataforma para uma aplicação completa do KOffice. +Comment[pt_BR]=Gera a plataforma para uma aplicação completa do KOffice. +Comment[ru]=Создание приложения KOffice. +Comment[sk]=Vygeneruje framework pre kompletnú aplikáciu KOffice. +Comment[sl]=Ustvari ogrodje za poln program KOffice +Comment[sr]=Прави радни оквир за пуни KOffice програм. +Comment[sr@Latn]=Pravi radni okvir za puni KOffice program. +Comment[sv]=Skapar ett ramverk för ett fullständigt Koffice-program. +Comment[tr]=Tam bir KOffice Uygulaması için bir çatı yaratır. +Comment[zh_CN]=生成一个全功能的 KOffice 应用程序框架。 +Comment[zh_TW]=產生一個完整的 KOffice 應用程式的框架 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}_part.cpp +Archive=kopart.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/kopart.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{src}/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/kopart_view.cpp +Dest=%{dest}/src/%{APPNAMELC}_view.cpp + +[FILE13] +Type=install +Source=%{src}/kopart_view.h +Dest=%{dest}/src/%{APPNAMELC}_view.h + +[FILE14] +Type=install +Source=%{src}/kopart_part.cpp +Dest=%{dest}/src/%{APPNAMELC}_part.cpp + +[FILE15] +Type=install +Source=%{src}/kopart_part.h +Dest=%{dest}/src/%{APPNAMELC}_part.h + +[FILE16] +Type=install +Source=%{src}/kopart_factory.cpp +Dest=%{dest}/src/%{APPNAMELC}_factory.cpp + +[FILE17] +Type=install +Source=%{src}/kopart_factory.h +Dest=%{dest}/src/%{APPNAMELC}_factory.h + +[FILE18] +Type=install +Source=%{src}/kopart_aboutdata.h +Dest=%{dest}/src/%{APPNAMELC}_aboutdata.h + +[FILE19] +Type=install +EscapeXML=true +Source=%{src}/kopart.rc +Dest=%{dest}/src/%{APPNAMELC}.rc + +[FILE20] +Type=install +Source=%{src}/kopart.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE21] +Type=install +Source=%{src}/x-kopart.desktop +Dest=%{dest}/src/x-%{APPNAMELC}.desktop + +[FILE22] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=A KOffice part was created in %{dest} +Comment[ca]=Una part per a KOffice ha estat creada en %{dest} +Comment[da]=En KOffice part blev oprettet i %{dest} +Comment[de]=Eine KOffice-Komponente wurde in %{dest} erstellt. +Comment[el]=Ένα τμήμα του KOffice δημιουργήθηκε στο %{dest} +Comment[es]=Un Part de KOffice ha sido creado en %{dest} +Comment[et]=KOffice'i komponent loodi asukohta %{dest} +Comment[eu]=KOffice zati bat sortu da hemen: %{dest} +Comment[fa]=یک جزء KOffice در %{dest} ایجاد شد +Comment[fr]=Un composant KOffice a été créé dans %{dest} +Comment[ga]=Cruthaíodh páirt TDE i %{dest} +Comment[gl]=Creouse unha 'part' para KOffice en %{dest} +Comment[hu]=Létrejött egy KOffice-objektum itt: %{dest} +Comment[it]=È stata creata una part di KOffice in %{dest} +Comment[ja]=KOffice パートを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en KOffice-Komponent opstellt +Comment[ne]=केडीई अफिस भाग %{dest} मा सिर्जना गरियो +Comment[nl]=Een KOffice-part is aangemaakt in %{dest} +Comment[pl]=KOffice part została utworzona w %{dest} +Comment[pt]=Foi criado um componente do KOffice em %{dest} +Comment[pt_BR]=Foi criado um componente do KOffice em %{dest} +Comment[ru]=Приложение KOffice создано в %{dest} +Comment[sk]=KOffice Part bol vytvorený v %{dest} +Comment[sr]=KOffice део је направљен у %{dest} +Comment[sr@Latn]=KOffice deo je napravljen u %{dest} +Comment[sv]=Ett Koffice-delprogram skapades i %{dest} +Comment[tr]=Bir KOffice bileşeni %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 KOffice 部件 +Comment[zh_TW]=一個 KOffice 元件已建立於 %{dest} diff --git a/languages/cpp/app_templates/kofficepart/kopart.tdevelop b/languages/cpp/app_templates/kofficepart/kopart.tdevelop index 7c4b0e4c..194157d7 100644 --- a/languages/cpp/app_templates/kofficepart/kopart.tdevelop +++ b/languages/cpp/app_templates/kofficepart/kopart.tdevelop @@ -14,16 +14,16 @@ tdeioslave - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}part.la debug @@ -45,15 +45,15 @@ -O0 -g3 - - + + - - + + ada ada_bugs_gcc @@ -90,24 +90,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kofficepart/kopart.tdevtemplate b/languages/cpp/app_templates/kofficepart/kopart.tdevtemplate deleted file mode 100644 index 076b650a..00000000 --- a/languages/cpp/app_templates/kofficepart/kopart.tdevtemplate +++ /dev/null @@ -1,231 +0,0 @@ -# TDE Config File -[General] -Name=KOffice Part -Name[br]=Perzh KOffice -Name[ca]=Part per a KOffice -Name[da]=KOffice part -Name[de]=KOffice-Komponente -Name[el]=Τμήμα KOffice -Name[es]=Part de KOffice -Name[et]=KOffice'i komponent -Name[eu]=KOffice zatia -Name[fa]=جزء KOffice -Name[fr]=Composant KOffice -Name[ga]=Páirt KOffice -Name[gl]='Part' para KOffice -Name[hu]=KOffice-objektum -Name[it]=Part di KOffice -Name[nds]=KOffice-Komponent -Name[ne]=केडीई अफिस भाग -Name[nl]=Koffice-part -Name[pt]=Componente do KOffice -Name[pt_BR]=Componente do KOffice -Name[ru]=Приложение KOffice -Name[sr]=KOffice део -Name[sr@Latn]=KOffice deo -Name[sv]=Koffice-delprogram -Name[tr]=KOffice Bileşeni -Name[zh_CN]=KOffice 部件 -Name[zh_TW]=KOffice 元件 -Icon=kopart.png -Category=C++/TDE -Comment=Generates a framework for a full KOffice Application. -Comment[ca]=Genera una infraestructura per a una completa aplicació de KOffice. -Comment[da]=Genererer et skelet for et fuldstændigt KOffice-program. -Comment[de]=Erstellt ein Grundgerüst für eine vollwertige KOffice-Anwendung -Comment[el]=Δημιουργεί ένα πλαίσιο για μια πλήρης εφαρμογή του KOffice. -Comment[es]=Genera una infraestructura para una aplicación completa de KOffice. -Comment[et]=KOffice'i rakenduse raamistiku loomine. -Comment[eu]=KOffice-en aplikazio batentzat lan-marko oso bat sortzen du. -Comment[fa]=چارچوبی را برای کاربرد کامل KOffice تولید می‌کند. -Comment[fr]=Génère une infrastructure pour une application KOffice complète. -Comment[gl]=Xera un contorno de traballo para unha aplicación KOffice completa. -Comment[hu]=Létrehoz egy kiindulási keretprogramot teljes KOffice-alkalmazás készítéséhez. -Comment[it]=Genera l'infrastruttura per un'applicazione completa di KOffice. -Comment[nds]=Stellt dat Rahmenwark för en heel KOffice-Programm op. -Comment[ne]=पूर्ण केडीई अफिस अनुप्रयोगका लागि फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Genereert een framework voor een volledige KOffice-toepassing -Comment[pl]=Generuje szablon pełnego programu KOffice. -Comment[pt]=Gera a plataforma para uma aplicação completa do KOffice. -Comment[pt_BR]=Gera a plataforma para uma aplicação completa do KOffice. -Comment[ru]=Создание приложения KOffice. -Comment[sk]=Vygeneruje framework pre kompletnú aplikáciu KOffice. -Comment[sl]=Ustvari ogrodje za poln program KOffice -Comment[sr]=Прави радни оквир за пуни KOffice програм. -Comment[sr@Latn]=Pravi radni okvir za puni KOffice program. -Comment[sv]=Skapar ett ramverk för ett fullständigt Koffice-program. -Comment[tr]=Tam bir KOffice Uygulaması için bir çatı yaratır. -Comment[zh_CN]=生成一个全功能的 KOffice 应用程序框架。 -Comment[zh_TW]=產生一個完整的 KOffice 應用程式的框架 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}_part.cpp -Archive=kopart.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/kopart.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{src}/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/kopart_view.cpp -Dest=%{dest}/src/%{APPNAMELC}_view.cpp - -[FILE13] -Type=install -Source=%{src}/kopart_view.h -Dest=%{dest}/src/%{APPNAMELC}_view.h - -[FILE14] -Type=install -Source=%{src}/kopart_part.cpp -Dest=%{dest}/src/%{APPNAMELC}_part.cpp - -[FILE15] -Type=install -Source=%{src}/kopart_part.h -Dest=%{dest}/src/%{APPNAMELC}_part.h - -[FILE16] -Type=install -Source=%{src}/kopart_factory.cpp -Dest=%{dest}/src/%{APPNAMELC}_factory.cpp - -[FILE17] -Type=install -Source=%{src}/kopart_factory.h -Dest=%{dest}/src/%{APPNAMELC}_factory.h - -[FILE18] -Type=install -Source=%{src}/kopart_aboutdata.h -Dest=%{dest}/src/%{APPNAMELC}_aboutdata.h - -[FILE19] -Type=install -EscapeXML=true -Source=%{src}/kopart.rc -Dest=%{dest}/src/%{APPNAMELC}.rc - -[FILE20] -Type=install -Source=%{src}/kopart.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE21] -Type=install -Source=%{src}/x-kopart.desktop -Dest=%{dest}/src/x-%{APPNAMELC}.desktop - -[FILE22] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=A KOffice part was created in %{dest} -Comment[ca]=Una part per a KOffice ha estat creada en %{dest} -Comment[da]=En KOffice part blev oprettet i %{dest} -Comment[de]=Eine KOffice-Komponente wurde in %{dest} erstellt. -Comment[el]=Ένα τμήμα του KOffice δημιουργήθηκε στο %{dest} -Comment[es]=Un Part de KOffice ha sido creado en %{dest} -Comment[et]=KOffice'i komponent loodi asukohta %{dest} -Comment[eu]=KOffice zati bat sortu da hemen: %{dest} -Comment[fa]=یک جزء KOffice در %{dest} ایجاد شد -Comment[fr]=Un composant KOffice a été créé dans %{dest} -Comment[ga]=Cruthaíodh páirt TDE i %{dest} -Comment[gl]=Creouse unha 'part' para KOffice en %{dest} -Comment[hu]=Létrejött egy KOffice-objektum itt: %{dest} -Comment[it]=È stata creata una part di KOffice in %{dest} -Comment[ja]=KOffice パートを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en KOffice-Komponent opstellt -Comment[ne]=केडीई अफिस भाग %{dest} मा सिर्जना गरियो -Comment[nl]=Een KOffice-part is aangemaakt in %{dest} -Comment[pl]=KOffice part została utworzona w %{dest} -Comment[pt]=Foi criado um componente do KOffice em %{dest} -Comment[pt_BR]=Foi criado um componente do KOffice em %{dest} -Comment[ru]=Приложение KOffice создано в %{dest} -Comment[sk]=KOffice Part bol vytvorený v %{dest} -Comment[sr]=KOffice део је направљен у %{dest} -Comment[sr@Latn]=KOffice deo je napravljen u %{dest} -Comment[sv]=Ett Koffice-delprogram skapades i %{dest} -Comment[tr]=Bir KOffice bileşeni %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 KOffice 部件 -Comment[zh_TW]=一個 KOffice 元件已建立於 %{dest} diff --git a/languages/cpp/app_templates/konqnavpanel/CMakeLists.txt b/languages/cpp/app_templates/konqnavpanel/CMakeLists.txt index c683f536..e38fc279 100644 --- a/languages/cpp/app_templates/konqnavpanel/CMakeLists.txt +++ b/languages/cpp/app_templates/konqnavpanel/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( konqnavpanel.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/konqnavpanel.tar.gz konqnavpanel.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - konqnavpanel.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + konqnavpanel.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/konqnavpanel/Makefile.am b/languages/cpp/app_templates/konqnavpanel/Makefile.am index a901456b..6fccbf38 100644 --- a/languages/cpp/app_templates/konqnavpanel/Makefile.am +++ b/languages/cpp/app_templates/konqnavpanel/Makefile.am @@ -4,10 +4,10 @@ dataFiles = konqnavpanel.cpp konqnavpanel.h konqnavpanel.desktop \ templateName = konqnavpanel ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/konqnavpanel/konqnavpanel.kdevtemplate b/languages/cpp/app_templates/konqnavpanel/konqnavpanel.kdevtemplate new file mode 100644 index 00000000..e6f1a23e --- /dev/null +++ b/languages/cpp/app_templates/konqnavpanel/konqnavpanel.kdevtemplate @@ -0,0 +1,192 @@ +# TDE Config File +[General] +Name=Konqueror Navigation Panel Plugin +Name[br]=Lugent panell furchal Konqueror +Name[ca]=Un connector per al plafó de navegació de Konqueror +Name[da]=Konqueror navigationspanel plugin +Name[de]=Modul für den Navigationsbereich von Konqueror +Name[el]=Πρόσθετο πίνακα πλοήγησης του Konqueror +Name[es]=Un complemento para el panel de navegación de Konqueror +Name[et]=Konquerori liikumispaneeli plugin +Name[eu]=Konqueror arakatze-panel plugina +Name[fa]=وصلۀ تابلوی ناوش Konqueror +Name[fr]=Module externe pour le panneau de navigation de Konqueror +Name[ga]=Breiseán Painéil Nascleanúna Konqueror +Name[gl]=Extensión para o panel de navegación de Konqueror +Name[hu]=Konqueroros navigációs bővítőmodul +Name[it]=Plugin per il pannello di navigazione di Konqueror +Name[ja]=Konqueror ナビゲーションプラグイン +Name[nds]=En Sietpaneelmoduul för Konqueror +Name[ne]=कन्क्वेरर नेभिगेसन प्यानल प्लगइन +Name[nl]=Konqueror Navigatiepaneel-plugin +Name[pl]=Wtyczka panelu nawigacji Konquerora +Name[pt]='Plugin' do Painel de Navegação do Konqueror +Name[pt_BR]='Plugin' do Painel de Navegação do Konqueror +Name[ru]=Модуль панели навигации Konqueror +Name[sk]=Modul pre konqueror navigačný panel +Name[sr]=Кonqueror-ов прикључак за навигациони панел +Name[sr@Latn]=Konqueror-ov priključak za navigacioni panel +Name[sv]=Konqueror-insticksprogram för navigeringspanelen +Name[tr]=Konqueror Gezinme Paneli Eklentisi +Name[zh_CN]=Konqueror 导航面板插件 +Name[zh_TW]=Konqueror 導覽面板外掛程式 +Icon=konqnavpanel.png +Category=C++/TDE +Comment=Generates a framework for a plugin that embeds into Konqueror's navigation panel +Comment[ca]=Genera una infraestructura per a un connector que s'encasti al plafó de navegació de Konqueror +Comment[da]=Genererer et skelet for et plugin der indlejres i Konqueror's navigationspanel +Comment[de]=Erstellt das Gerüst für ein Modul, das in den Navigationsbereich von Konqueror eingebunden werden kann. +Comment[el]=Δημιουργεί ένα πλαίσιο για ένα πρόσθετο που ενσωματώνεται στον πίνακα πλοήγησης του Konqueror +Comment[es]=Genera una infraestructura para un complemento empotrado en el panel de navegación de Konqueror +Comment[et]=Plugina raamistiku loomine, mida saab põimida Konquerori liikumispaneelile. +Comment[eu]=Konqueror-en arakatze-panelean kapsulatzen den plugin batentzat lan-marko oso bat sortzen du +Comment[fa]=چارچوبی را برای یک وصله که در تابلوی ناوش Konqueror نهفته بود، تولید می‌کند +Comment[fr]=Génère une infrastructure pour un module externe qui s'intègre dans le panneau de navigation de Konqueror +Comment[gl]=Xera un contorno de traballo para unha extensión que se incrusta no panel de navegación de Konqueror +Comment[hu]=Létrehoz egy alapprogramot konqueroros navigációs panelmodul készítéséhez +Comment[it]=Genera l'infrastruttura per un plugin che si integra nel pannello di navigazione di Konqueror +Comment[nds]=Stellt dat Rahmenwark för en Moduul op, dat sik in't Sietpaneel vun Konqueror inbett +Comment[ne]=कन्क्वेररको नेभिगेसन प्यानलमा सम्मिलित हुने प्लगइनका लागि फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Genereert een framework voor een plugin die kan worden ingebed in Konqueror's navigatiepaneel. +Comment[pl]=Generuje wtyczkę, którą można osadzić w panelu nawigacyjnym Konquerora +Comment[pt]=Gera a plataforma para um 'plugin' que se incorpore no painel de navegação do Konqueror +Comment[pt_BR]=Gera a plataforma para um 'plugin' que se incorpore no painel de navegação do Konqueror +Comment[ru]=Создание модуля панели навигации Konqueror +Comment[sk]=Vygeneruje framework pre modul, ktorý sa bude dať vložiť do konqueror navigačného panelu +Comment[sr]=Прави радни оквир за прикључак који се уграђује у Konqueror-ов навигациони панел +Comment[sr@Latn]=Pravi radni okvir za priključak koji se ugrađuje u Konqueror-ov navigacioni panel +Comment[sv]=Skapar ett ramverk för ett insticksprogram som inbäddas i Konquerors navigeringspanel +Comment[tr]=Konqueror'un gezinme paneline gömülen bir eklenti için bir çatı oluşturur. +Comment[zh_CN]=生成可嵌入到 Konqueror 导航面板的插件框架 +Comment[zh_TW]=產生一個嵌入 Konqueror 導覽面板的外掛程式的框架 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=konqnavpanel.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/konqnavpanel.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/konqnavpanel.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/konqnavpanel.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/konqnavpanel.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A konqueror navigation panel plugin was created in %{dest} +Comment[ca]=Un connector per al plafó de navegació de Konqueror ha estat creada en %{dest} +Comment[da]=Et Konqueror navigationspanel plugin blev oprettet i %{dest} +Comment[de]=Ein Modul für den Navigationsbereich von Konqueror wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο του πίνακα πλοήγησης του konqueror δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para el panel de navegación de Konqueror ha sido creado en %{dest} +Comment[et]=Konquerori liikumispaneeli plugin loodi asukohta %{dest} +Comment[eu]=Konqueror-en arakatze-paneleko plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ تابلوی ناوش konqueror در %{dest} ایجاد شد +Comment[fr]=Un module externe pour le panneau de navigation de Konqueror a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán painéil nascleanúna konqueror i %{dest} +Comment[gl]=Creouse unha extensión para o panel de navegación en %{dest} +Comment[hu]=Létrejött egy konqueroros navigációs modul itt: %{dest} +Comment[it]=È stato creato un plugin per il pannello di navigazione di Konqueror in %{dest} +Comment[ja]=Konqueror ナビゲーションプラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Sietpaneelmoduul för Konqueror opstellt +Comment[ne]=कन्क्वेरर नेभिगेसन प्यानल प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een Konqueror-navigatiepaneel-plugin is aangemaakt in %{dest} +Comment[pl]=Wtyczka do panelu nawigacyjnego Konquerora została utworzona w %{dest} +Comment[pt]=Um 'plugin' do painel de navegação do Konqueror foi criado em %{dest} +Comment[pt_BR]=Um 'plugin' do painel de navegação do Konqueror foi criado em %{dest} +Comment[ru]=Модуль панели навигации Konqueror создан в %{dest} +Comment[sk]=Modul pre konqueror navigačný panel bol vytvorený v %{dest} +Comment[sr]=Кonqueror-ов прикључак за навигациони панел направљен је у %{dest} +Comment[sr@Latn]=Konqueror-ov priključak za navigacioni panel napravljen je u %{dest} +Comment[sv]=Ett Konqueror-insticksprogram för navigeringspanelen skapades i %{dest} +Comment[tr]=Bir konqueror gezinme paneli eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 konqueror 导航器面板插件 +Comment[zh_TW]=一個 Konqueror 導覽面板外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevelop b/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevelop index 88bf952d..929b3c49 100644 --- a/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevelop +++ b/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevelop @@ -14,16 +14,16 @@ Kicker - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}.la debug @@ -45,8 +45,8 @@ -O0 -g3 - - + + @@ -54,8 +54,8 @@ - - + + ada ada_bugs_gcc @@ -92,24 +92,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevtemplate b/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevtemplate deleted file mode 100644 index 01a924df..00000000 --- a/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevtemplate +++ /dev/null @@ -1,192 +0,0 @@ -# TDE Config File -[General] -Name=Konqueror Navigation Panel Plugin -Name[br]=Lugent panell furchal Konqueror -Name[ca]=Un connector per al plafó de navegació de Konqueror -Name[da]=Konqueror navigationspanel plugin -Name[de]=Modul für den Navigationsbereich von Konqueror -Name[el]=Πρόσθετο πίνακα πλοήγησης του Konqueror -Name[es]=Un complemento para el panel de navegación de Konqueror -Name[et]=Konquerori liikumispaneeli plugin -Name[eu]=Konqueror arakatze-panel plugina -Name[fa]=وصلۀ تابلوی ناوش Konqueror -Name[fr]=Module externe pour le panneau de navigation de Konqueror -Name[ga]=Breiseán Painéil Nascleanúna Konqueror -Name[gl]=Extensión para o panel de navegación de Konqueror -Name[hu]=Konqueroros navigációs bővítőmodul -Name[it]=Plugin per il pannello di navigazione di Konqueror -Name[ja]=Konqueror ナビゲーションプラグイン -Name[nds]=En Sietpaneelmoduul för Konqueror -Name[ne]=कन्क्वेरर नेभिगेसन प्यानल प्लगइन -Name[nl]=Konqueror Navigatiepaneel-plugin -Name[pl]=Wtyczka panelu nawigacji Konquerora -Name[pt]='Plugin' do Painel de Navegação do Konqueror -Name[pt_BR]='Plugin' do Painel de Navegação do Konqueror -Name[ru]=Модуль панели навигации Konqueror -Name[sk]=Modul pre konqueror navigačný panel -Name[sr]=Кonqueror-ов прикључак за навигациони панел -Name[sr@Latn]=Konqueror-ov priključak za navigacioni panel -Name[sv]=Konqueror-insticksprogram för navigeringspanelen -Name[tr]=Konqueror Gezinme Paneli Eklentisi -Name[zh_CN]=Konqueror 导航面板插件 -Name[zh_TW]=Konqueror 導覽面板外掛程式 -Icon=konqnavpanel.png -Category=C++/TDE -Comment=Generates a framework for a plugin that embeds into Konqueror's navigation panel -Comment[ca]=Genera una infraestructura per a un connector que s'encasti al plafó de navegació de Konqueror -Comment[da]=Genererer et skelet for et plugin der indlejres i Konqueror's navigationspanel -Comment[de]=Erstellt das Gerüst für ein Modul, das in den Navigationsbereich von Konqueror eingebunden werden kann. -Comment[el]=Δημιουργεί ένα πλαίσιο για ένα πρόσθετο που ενσωματώνεται στον πίνακα πλοήγησης του Konqueror -Comment[es]=Genera una infraestructura para un complemento empotrado en el panel de navegación de Konqueror -Comment[et]=Plugina raamistiku loomine, mida saab põimida Konquerori liikumispaneelile. -Comment[eu]=Konqueror-en arakatze-panelean kapsulatzen den plugin batentzat lan-marko oso bat sortzen du -Comment[fa]=چارچوبی را برای یک وصله که در تابلوی ناوش Konqueror نهفته بود، تولید می‌کند -Comment[fr]=Génère une infrastructure pour un module externe qui s'intègre dans le panneau de navigation de Konqueror -Comment[gl]=Xera un contorno de traballo para unha extensión que se incrusta no panel de navegación de Konqueror -Comment[hu]=Létrehoz egy alapprogramot konqueroros navigációs panelmodul készítéséhez -Comment[it]=Genera l'infrastruttura per un plugin che si integra nel pannello di navigazione di Konqueror -Comment[nds]=Stellt dat Rahmenwark för en Moduul op, dat sik in't Sietpaneel vun Konqueror inbett -Comment[ne]=कन्क्वेररको नेभिगेसन प्यानलमा सम्मिलित हुने प्लगइनका लागि फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Genereert een framework voor een plugin die kan worden ingebed in Konqueror's navigatiepaneel. -Comment[pl]=Generuje wtyczkę, którą można osadzić w panelu nawigacyjnym Konquerora -Comment[pt]=Gera a plataforma para um 'plugin' que se incorpore no painel de navegação do Konqueror -Comment[pt_BR]=Gera a plataforma para um 'plugin' que se incorpore no painel de navegação do Konqueror -Comment[ru]=Создание модуля панели навигации Konqueror -Comment[sk]=Vygeneruje framework pre modul, ktorý sa bude dať vložiť do konqueror navigačného panelu -Comment[sr]=Прави радни оквир за прикључак који се уграђује у Konqueror-ов навигациони панел -Comment[sr@Latn]=Pravi radni okvir za priključak koji se ugrađuje u Konqueror-ov navigacioni panel -Comment[sv]=Skapar ett ramverk för ett insticksprogram som inbäddas i Konquerors navigeringspanel -Comment[tr]=Konqueror'un gezinme paneline gömülen bir eklenti için bir çatı oluşturur. -Comment[zh_CN]=生成可嵌入到 Konqueror 导航面板的插件框架 -Comment[zh_TW]=產生一個嵌入 Konqueror 導覽面板的外掛程式的框架 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=konqnavpanel.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/konqnavpanel.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/konqnavpanel.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/konqnavpanel.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/konqnavpanel.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=A konqueror navigation panel plugin was created in %{dest} -Comment[ca]=Un connector per al plafó de navegació de Konqueror ha estat creada en %{dest} -Comment[da]=Et Konqueror navigationspanel plugin blev oprettet i %{dest} -Comment[de]=Ein Modul für den Navigationsbereich von Konqueror wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο του πίνακα πλοήγησης του konqueror δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para el panel de navegación de Konqueror ha sido creado en %{dest} -Comment[et]=Konquerori liikumispaneeli plugin loodi asukohta %{dest} -Comment[eu]=Konqueror-en arakatze-paneleko plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ تابلوی ناوش konqueror در %{dest} ایجاد شد -Comment[fr]=Un module externe pour le panneau de navigation de Konqueror a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán painéil nascleanúna konqueror i %{dest} -Comment[gl]=Creouse unha extensión para o panel de navegación en %{dest} -Comment[hu]=Létrejött egy konqueroros navigációs modul itt: %{dest} -Comment[it]=È stato creato un plugin per il pannello di navigazione di Konqueror in %{dest} -Comment[ja]=Konqueror ナビゲーションプラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Sietpaneelmoduul för Konqueror opstellt -Comment[ne]=कन्क्वेरर नेभिगेसन प्यानल प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een Konqueror-navigatiepaneel-plugin is aangemaakt in %{dest} -Comment[pl]=Wtyczka do panelu nawigacyjnego Konquerora została utworzona w %{dest} -Comment[pt]=Um 'plugin' do painel de navegação do Konqueror foi criado em %{dest} -Comment[pt_BR]=Um 'plugin' do painel de navegação do Konqueror foi criado em %{dest} -Comment[ru]=Модуль панели навигации Konqueror создан в %{dest} -Comment[sk]=Modul pre konqueror navigačný panel bol vytvorený v %{dest} -Comment[sr]=Кonqueror-ов прикључак за навигациони панел направљен је у %{dest} -Comment[sr@Latn]=Konqueror-ov priključak za navigacioni panel napravljen je u %{dest} -Comment[sv]=Ett Konqueror-insticksprogram för navigeringspanelen skapades i %{dest} -Comment[tr]=Bir konqueror gezinme paneli eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 konqueror 导航器面板插件 -Comment[zh_TW]=一個 Konqueror 導覽面板外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kpartapp/CMakeLists.txt b/languages/cpp/app_templates/kpartapp/CMakeLists.txt index ab0ed3b0..9f3d8119 100644 --- a/languages/cpp/app_templates/kpartapp/CMakeLists.txt +++ b/languages/cpp/app_templates/kpartapp/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( kpartapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kpartapp.tar.gz kpartapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kpartapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kpartapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kpartapp/Makefile.am b/languages/cpp/app_templates/kpartapp/Makefile.am index 45c41564..bfb8ceed 100644 --- a/languages/cpp/app_templates/kpartapp/Makefile.am +++ b/languages/cpp/app_templates/kpartapp/Makefile.am @@ -3,10 +3,10 @@ dataFiles = src-Makefile.am app.cpp app.h app_part.cpp\ kpartapp.png app.tdevelop subdirs templateName = kpartapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kpartapp/app.tdevelop b/languages/cpp/app_templates/kpartapp/app.tdevelop index 56e6f467..a8628fe3 100644 --- a/languages/cpp/app_templates/kpartapp/app.tdevelop +++ b/languages/cpp/app_templates/kpartapp/app.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -47,8 +47,8 @@ -O0 -g3 - - + + @@ -56,8 +56,8 @@ - - + + ada ada_bugs_gcc @@ -92,24 +92,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kpartapp/kpartapp.kdevtemplate b/languages/cpp/app_templates/kpartapp/kpartapp.kdevtemplate new file mode 100644 index 00000000..773cc0d8 --- /dev/null +++ b/languages/cpp/app_templates/kpartapp/kpartapp.kdevtemplate @@ -0,0 +1,237 @@ +# TDE Config File +[General] +Name=Application framework (KParts) +Name[ca]=Infraestructura d'aplicació (KParts) +Name[da]=Programskelet (KParts) +Name[de]=Anwendungsgerüst (KParts) +Name[el]=Πλαίσιο εφαρμογής (KParts) +Name[es]=Infraestructura de aplicación (KParts) +Name[et]=Rakenduse raamistik (KParts) +Name[eu]=Aplikazioen lan-markoa (KParts) +Name[fa]=(KParts)چارچوب کاربرد +Name[fr]=Infrastructure d'application (KParts) +Name[ga]=Creatlach feidhmchláir (KParts) +Name[gl]=Entorno de traballo de aplicación (KParts) +Name[hu]=Alkalmazás-keretrendszer (objektumokkal) +Name[it]=Infrastruttura applicativa (KParts) +Name[ja]=アプリケーションフレームワーク (KParts) +Name[nds]=Programmrahmenwark (KParts) +Name[ne]=अनुप्रयोग फ्रेमवर्क (केडीई भाग) +Name[nl]=Toepassingframework (KParts) +Name[pl]=Szablon progamu (KParts) +Name[pt]=Plataforma de aplicações (KParts) +Name[pt_BR]=Plataforma de aplicações (KParts) +Name[ru]=Приложение KPart +Name[sk]=Aplikačný framework (KParts) +Name[sr]=Радни оквир програма (KParts) +Name[sr@Latn]=Radni okvir programa (KParts) +Name[sv]=Programramverk (KParts) +Name[tr]=Uygulama Çatısı (KParts) +Name[zh_CN]=应用程序框架(KParts) +Name[zh_TW]=應用程式框架(KParts) +Icon=kpartapp.png +Category=C++/TDE +Comment=Generates a complex TDE application with a KParts shell and a KPart component. +Comment[ca]=Genera una complexa aplicació per al TDE amb un intèrpret de comandaments KParts i un component KPart. +Comment[da]=Genererer et komplekst TDE-program med en KParts-skal og en KPart-komponent. +Comment[de]=Erstellt eine aufwändige TDE-Anwendung mit einer Shell für KParts und einer KPart-Komponente. +Comment[el]=Δημιουργεί μια πολύπλοκη εφαρμογή TDE με ένα κέλυφος KParts και ένα συστατικό KPart. +Comment[es]=Genera una aplicación TDE compleja con un contenedor KParts y un componente KPart. +Comment[et]=Keerulise TDE rakenduse loomine KParts-shelliga ja KPart-komponendiga. +Comment[eu]=TDE aplikazio konplexu bat sortzen du KParts shellbat eta KPart osagai batekin. +Comment[fa]=یک کاربرد پیچیدۀ TDE با یک پوستۀ KParts و یک مؤلفۀ KPart تولید می‌کند. +Comment[fr]=Génère une application TDE évoluée comprenant un shell KParts et un composant KPart. +Comment[ga]=Cruthaíonn sé seo feidhmchlár casta TDE le blaosc KParts agus comhpháirt KPart. +Comment[gl]=Xera unha aplicación TDE complexa cun terminal KPart e unha compoñente KPart. +Comment[hu]=Létrehoz egy komplex, objektumok használatát támogató TDE-s alkalmazást és egy KPart objektumot. +Comment[it]=Genera un'applicazione complessa di TDE con una shell di KParts e un componente KPart. +Comment[nds]=Stellt en vigeliensch TDE-Programm mit en Konsool för KPart un en KPart-Komponent op. +Comment[ne]=केडीई भाग शेल र केडीई भाग अवयवसँग जटिल केडीई अनुप्रयोग उत्पन्न गर्दछ । +Comment[nl]=Genereert een complexe TDE-toepassing met een KParts-shell en een KPart-component. +Comment[pl]=Generuje złożony program z powłoką KParts i komponentem KPart. +Comment[pt]=Gera uma aplicação complexa do TDE com uma infra-estrutura de KParts, bem como um componente KPart. +Comment[pt_BR]=Gera uma aplicação complexa do TDE com uma infra-estrutura de KParts, bem como um componente KPart. +Comment[ru]=Создание полноценного приложения TDE на базе компонента KPart. +Comment[sk]=Vygeneruje komplexnú TDE aplikáciu s KParts shell a s KPart komponentom. +Comment[sr]=Прави сложени TDE програм са KParts шкољком и KPart компонентом. +Comment[sr@Latn]=Pravi složeni TDE program sa KParts školjkom i KPart komponentom. +Comment[sv]=Skapar ett komplext TDE-program med ett KPart-skal och en KPart-komponent. +Comment[tr]=Bir KParts kabuğu ve KParts bileşeni olan karmaşık bir TDE uygulaması yaratır. +Comment[zh_CN]=生成一个带 KParts 外壳和 KPart 组件的复杂 TDE 应用程序。 +Comment[zh_TW]=產生一個複雜的 TDE 應用程式,內含 KParts shell 與 KPart 元件。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}_part.cpp +Archive=kpartapp.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-part.desktop +Dest=%{dest}/src/%{APPNAMELC}_part.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE13] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE14] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE15] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE16] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE17] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE18] +Type=install +Source=%{src}/app_part.cpp +Dest=%{dest}/src/%{APPNAMELC}_part.cpp + +[FILE19] +Type=install +Source=%{src}/app_part.h +Dest=%{dest}/src/%{APPNAMELC}_part.h + +[FILE20] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE21] +Type=install +EscapeXML=true +Source=%{src}/app_part.rc +Dest=%{dest}/src/%{APPNAMELC}_part.rc + +[FILE22] +Type=install +EscapeXML=true +Source=%{src}/app_shell.rc +Dest=%{dest}/src/%{APPNAMELC}_shell.rc + +[MSG] +Type=message +Comment=A complex TDE application using KParts was created in %{dest} +Comment[ca]=Una complexa aplicació per al TDE usant KParts ha estat creada en %{dest} +Comment[da]=Et komplekst TDE-program ved brug af KParts blev oprettet i %{dest} +Comment[de]=Eine aufwändige TDE-Anwendung, die KParts verwendet, wurde in %{dest} erstellt. +Comment[el]=Μια πολύπλοκη εφαρμογή TDE που χρησιμοποιεί το KParts δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación compleja para TDE que usa KParts ha sido creada en %{dest} +Comment[et]=KParts'i kasutav keeruline TDE rakendus loodi asukohta %{dest} +Comment[eu]=TDE aplikazio konplexu bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد پیچیدۀ TDE با استفاده از KParts در %{dest} ایجاد شد +Comment[fr]=Une application TDE évoluée utilisant KParts a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár casta TDE a úsáideann KParts i %{dest} +Comment[gl]=Creouse unha aplicación TDE complexa usando KParts en %{dest} +Comment[hu]=Létrejött egy komplex, objektumok használatát támogató TDE-s alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDE complessa usando KParts in %{dest} +Comment[ja]=KParts を使った複雑な TDE アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en vigeliensch TDE-Programm opstellt, dat "KParts" bruukt. +Comment[ne]=केडीई भाग प्रयोग गरेर जटिल केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een complexe TDE-toepassing gebruik makend van KParts is aangemaakt in %{dest} +Comment[pl]=Złożony program TDE używający KParts został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação complexa do TDE, que usa o KParts, em %{dest} +Comment[pt_BR]=Foi criada uma aplicação complexa do TDE, que usa o KParts, em %{dest} +Comment[ru]=Приложение TDE на базе компонента KPart создано в %{dest} +Comment[sk]=Komplexná TDE aplikácia používajúca KParts bola vytvorená v %{dest} +Comment[sr]=Сложени TDE програм на основу KParts направљен је у %{dest} +Comment[sr@Latn]=Složeni TDE program na osnovu KParts napravljen je u %{dest} +Comment[sv]=Ett komplext TDE-program som använder KParts skapades i %{dest} +Comment[tr]=KParts kullanan karmaşık bir TDE uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个使用 KParts 的复杂 TDE 应用程序 +Comment[zh_TW]=一個使用 KParts 的複雜 TDE 應用程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/kpartapp/kpartapp.tdevtemplate b/languages/cpp/app_templates/kpartapp/kpartapp.tdevtemplate deleted file mode 100644 index 11aaaabb..00000000 --- a/languages/cpp/app_templates/kpartapp/kpartapp.tdevtemplate +++ /dev/null @@ -1,237 +0,0 @@ -# TDE Config File -[General] -Name=Application framework (KParts) -Name[ca]=Infraestructura d'aplicació (KParts) -Name[da]=Programskelet (KParts) -Name[de]=Anwendungsgerüst (KParts) -Name[el]=Πλαίσιο εφαρμογής (KParts) -Name[es]=Infraestructura de aplicación (KParts) -Name[et]=Rakenduse raamistik (KParts) -Name[eu]=Aplikazioen lan-markoa (KParts) -Name[fa]=(KParts)چارچوب کاربرد -Name[fr]=Infrastructure d'application (KParts) -Name[ga]=Creatlach feidhmchláir (KParts) -Name[gl]=Entorno de traballo de aplicación (KParts) -Name[hu]=Alkalmazás-keretrendszer (objektumokkal) -Name[it]=Infrastruttura applicativa (KParts) -Name[ja]=アプリケーションフレームワーク (KParts) -Name[nds]=Programmrahmenwark (KParts) -Name[ne]=अनुप्रयोग फ्रेमवर्क (केडीई भाग) -Name[nl]=Toepassingframework (KParts) -Name[pl]=Szablon progamu (KParts) -Name[pt]=Plataforma de aplicações (KParts) -Name[pt_BR]=Plataforma de aplicações (KParts) -Name[ru]=Приложение KPart -Name[sk]=Aplikačný framework (KParts) -Name[sr]=Радни оквир програма (KParts) -Name[sr@Latn]=Radni okvir programa (KParts) -Name[sv]=Programramverk (KParts) -Name[tr]=Uygulama Çatısı (KParts) -Name[zh_CN]=应用程序框架(KParts) -Name[zh_TW]=應用程式框架(KParts) -Icon=kpartapp.png -Category=C++/TDE -Comment=Generates a complex TDE application with a KParts shell and a KPart component. -Comment[ca]=Genera una complexa aplicació per al TDE amb un intèrpret de comandaments KParts i un component KPart. -Comment[da]=Genererer et komplekst TDE-program med en KParts-skal og en KPart-komponent. -Comment[de]=Erstellt eine aufwändige TDE-Anwendung mit einer Shell für KParts und einer KPart-Komponente. -Comment[el]=Δημιουργεί μια πολύπλοκη εφαρμογή TDE με ένα κέλυφος KParts και ένα συστατικό KPart. -Comment[es]=Genera una aplicación TDE compleja con un contenedor KParts y un componente KPart. -Comment[et]=Keerulise TDE rakenduse loomine KParts-shelliga ja KPart-komponendiga. -Comment[eu]=TDE aplikazio konplexu bat sortzen du KParts shellbat eta KPart osagai batekin. -Comment[fa]=یک کاربرد پیچیدۀ TDE با یک پوستۀ KParts و یک مؤلفۀ KPart تولید می‌کند. -Comment[fr]=Génère une application TDE évoluée comprenant un shell KParts et un composant KPart. -Comment[ga]=Cruthaíonn sé seo feidhmchlár casta TDE le blaosc KParts agus comhpháirt KPart. -Comment[gl]=Xera unha aplicación TDE complexa cun terminal KPart e unha compoñente KPart. -Comment[hu]=Létrehoz egy komplex, objektumok használatát támogató TDE-s alkalmazást és egy KPart objektumot. -Comment[it]=Genera un'applicazione complessa di TDE con una shell di KParts e un componente KPart. -Comment[nds]=Stellt en vigeliensch TDE-Programm mit en Konsool för KPart un en KPart-Komponent op. -Comment[ne]=केडीई भाग शेल र केडीई भाग अवयवसँग जटिल केडीई अनुप्रयोग उत्पन्न गर्दछ । -Comment[nl]=Genereert een complexe TDE-toepassing met een KParts-shell en een KPart-component. -Comment[pl]=Generuje złożony program z powłoką KParts i komponentem KPart. -Comment[pt]=Gera uma aplicação complexa do TDE com uma infra-estrutura de KParts, bem como um componente KPart. -Comment[pt_BR]=Gera uma aplicação complexa do TDE com uma infra-estrutura de KParts, bem como um componente KPart. -Comment[ru]=Создание полноценного приложения TDE на базе компонента KPart. -Comment[sk]=Vygeneruje komplexnú TDE aplikáciu s KParts shell a s KPart komponentom. -Comment[sr]=Прави сложени TDE програм са KParts шкољком и KPart компонентом. -Comment[sr@Latn]=Pravi složeni TDE program sa KParts školjkom i KPart komponentom. -Comment[sv]=Skapar ett komplext TDE-program med ett KPart-skal och en KPart-komponent. -Comment[tr]=Bir KParts kabuğu ve KParts bileşeni olan karmaşık bir TDE uygulaması yaratır. -Comment[zh_CN]=生成一个带 KParts 外壳和 KPart 组件的复杂 TDE 应用程序。 -Comment[zh_TW]=產生一個複雜的 TDE 應用程式,內含 KParts shell 與 KPart 元件。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}_part.cpp -Archive=kpartapp.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-part.desktop -Dest=%{dest}/src/%{APPNAMELC}_part.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE13] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE14] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE15] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE16] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE17] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE18] -Type=install -Source=%{src}/app_part.cpp -Dest=%{dest}/src/%{APPNAMELC}_part.cpp - -[FILE19] -Type=install -Source=%{src}/app_part.h -Dest=%{dest}/src/%{APPNAMELC}_part.h - -[FILE20] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE21] -Type=install -EscapeXML=true -Source=%{src}/app_part.rc -Dest=%{dest}/src/%{APPNAMELC}_part.rc - -[FILE22] -Type=install -EscapeXML=true -Source=%{src}/app_shell.rc -Dest=%{dest}/src/%{APPNAMELC}_shell.rc - -[MSG] -Type=message -Comment=A complex TDE application using KParts was created in %{dest} -Comment[ca]=Una complexa aplicació per al TDE usant KParts ha estat creada en %{dest} -Comment[da]=Et komplekst TDE-program ved brug af KParts blev oprettet i %{dest} -Comment[de]=Eine aufwändige TDE-Anwendung, die KParts verwendet, wurde in %{dest} erstellt. -Comment[el]=Μια πολύπλοκη εφαρμογή TDE που χρησιμοποιεί το KParts δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación compleja para TDE que usa KParts ha sido creada en %{dest} -Comment[et]=KParts'i kasutav keeruline TDE rakendus loodi asukohta %{dest} -Comment[eu]=TDE aplikazio konplexu bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد پیچیدۀ TDE با استفاده از KParts در %{dest} ایجاد شد -Comment[fr]=Une application TDE évoluée utilisant KParts a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár casta TDE a úsáideann KParts i %{dest} -Comment[gl]=Creouse unha aplicación TDE complexa usando KParts en %{dest} -Comment[hu]=Létrejött egy komplex, objektumok használatát támogató TDE-s alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDE complessa usando KParts in %{dest} -Comment[ja]=KParts を使った複雑な TDE アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en vigeliensch TDE-Programm opstellt, dat "KParts" bruukt. -Comment[ne]=केडीई भाग प्रयोग गरेर जटिल केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een complexe TDE-toepassing gebruik makend van KParts is aangemaakt in %{dest} -Comment[pl]=Złożony program TDE używający KParts został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação complexa do TDE, que usa o KParts, em %{dest} -Comment[pt_BR]=Foi criada uma aplicação complexa do TDE, que usa o KParts, em %{dest} -Comment[ru]=Приложение TDE на базе компонента KPart создано в %{dest} -Comment[sk]=Komplexná TDE aplikácia používajúca KParts bola vytvorená v %{dest} -Comment[sr]=Сложени TDE програм на основу KParts направљен је у %{dest} -Comment[sr@Latn]=Složeni TDE program na osnovu KParts napravljen je u %{dest} -Comment[sv]=Ett komplext TDE-program som använder KParts skapades i %{dest} -Comment[tr]=KParts kullanan karmaşık bir TDE uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个使用 KParts 的复杂 TDE 应用程序 -Comment[zh_TW]=一個使用 KParts 的複雜 TDE 應用程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/kpartplugin/CMakeLists.txt b/languages/cpp/app_templates/kpartplugin/CMakeLists.txt index a1d063b0..00f4c664 100644 --- a/languages/cpp/app_templates/kpartplugin/CMakeLists.txt +++ b/languages/cpp/app_templates/kpartplugin/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( kpartplugin.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kpartplugin.tar.gz kpartplugin.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kpartplugin.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kpartplugin.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kpartplugin/Makefile.am b/languages/cpp/app_templates/kpartplugin/Makefile.am index dd0a5612..057be667 100644 --- a/languages/cpp/app_templates/kpartplugin/Makefile.am +++ b/languages/cpp/app_templates/kpartplugin/Makefile.am @@ -5,10 +5,10 @@ dataFiles = src-Makefile.am plugin_app.cpp plugin_app.h \ templateName = kpartplugin ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kpartplugin/kpartplugin.kdevtemplate b/languages/cpp/app_templates/kpartplugin/kpartplugin.kdevtemplate new file mode 100644 index 00000000..59ca51d8 --- /dev/null +++ b/languages/cpp/app_templates/kpartplugin/kpartplugin.kdevtemplate @@ -0,0 +1,204 @@ +# TDE Config File +[General] +Name=TDEHTMLPart plugin +Name[br]=Lugent TDEHTMLPart +Name[ca]=Connector per a TDEHTMLPart +Name[de]=TDEHTMLPart-Modul +Name[el]=Πρόσθετο TDEHTMLPart +Name[es]=Complemento para TDEHTMLPart +Name[eu]=TDEHTMLPart plugina +Name[fa]=وصلۀ TDEHTMLPart +Name[fr]=Module externe pour le composant TDEHTML +Name[ga]=Breiseán TDEHTMLPart +Name[gl]=Extensión para TDEHTMLPart +Name[hu]=TDEHTML-bővítőmodul +Name[it]=Plugin TDEHTMLPart +Name[ja]=TDEHTMLPart プラグイン +Name[nds]=TDEHTMLPart-Moduul +Name[ne]=TDEHTMLPart प्लगइन +Name[nl]=TDEHTMLPart-plugin +Name[pl]=Wtyczka do TDEHTMLPart +Name[pt]='Plugin' do TDEHTMLPart +Name[pt_BR]='Plugin' do TDEHTMLPart +Name[ru]=Модуль TDEHTMLPart +Name[sk]=TDEHTMLPart modul +Name[sl]=Vstavek za TDEHTMLPart +Name[sr]=Прикључак за део TDEHTML +Name[sr@Latn]=Priključak za deo TDEHTML +Name[sv]=Insticksprogram för TDEHTML-delprogram +Name[tr]=TDEHTMLPart Eklentisi +Name[zh_CN]=TDEHTMLPart 插件 +Name[zh_TW]=TDEHTMLPart 外掛程式 +Icon=kpartplugin.png +Category=C++/TDE +Comment=Generates a plugin for the TDEHTML part. +Comment[ca]=Genera un connector per a la part TDEHTML. +Comment[da]=Genererer et plugin for TDEHTML parten. +Comment[de]=Erstellt ein Modul für die Komponente TDEHTML +Comment[el]=Δημιουργεί ένα πρόσθετο για το τμήμα TDEHTML. +Comment[es]=Genera un complemento para TDEHTMLPart. +Comment[et]=TDEHTML-komponendi plugina loomine. +Comment[eu]=TDEHTML zatirako plugin bat sortzen du. +Comment[fa]=یک وصله برای جزء TDEHTML تولید می‌کند +Comment[fr]=Génère un module externe pour le composant TDEHTML. +Comment[gl]=Xera unha extensión para o 'part' TDEHTML. +Comment[hu]=Létrehoz egy TDEHTML-bővítőmodult. +Comment[it]=Genera un plugin per la part TDEHTML. +Comment[ja]=TDEHTML パートのためのプラグインを作成します +Comment[nds]=Stellt en Moduul för de Komponent TDEHTML op. +Comment[ne]=TDEHTML भागका लागि प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Genereert een plugin voor de TDEHTML-part. +Comment[pl]=Generuje wtyczkę do TDEHTML part. +Comment[pt]=Gera um 'plugin' para a componente TDEHTML. +Comment[pt_BR]=Gera um 'plugin' para a componente TDEHTML. +Comment[ru]=Создание модуля для компонента TDEHTML. +Comment[sk]=Vygeneruje modul pre TDEHTML part. +Comment[sr]=Прави прикључак за део TDEHTML. +Comment[sr@Latn]=Pravi priključak za deo TDEHTML. +Comment[sv]=Skapar ett insticksprogram för TDEHTML-delprogrammet +Comment[zh_CN]=生成 TDEHTML 部件的插件。 +Comment[zh_TW]=產生一個 TDEHTML part 的外掛程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp +Archive=kpartplugin.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/plugin_app.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/plugin_app.h +Dest=%{dest}/src/plugin_%{APPNAMELC}.h + +[FILE14] +Type=install +EscapeXML=true +Source=%{src}/plugin_app.rc +Dest=%{dest}/src/plugin_%{APPNAMELC}.rc + +[FILE15] +Type=install +Source=%{src}/hi16-action-plugin.png +Dest=%{dest}/src/hi16-action-plugin.png +Process=false + +[FILE16] +Type=install +Source=%{src}/hi22-action-plugin.png +Dest=%{dest}/src/hi32-action-plugin.png +Process=false + +[MSG] +Type=message +Comment=A TDEHTMLPart plugin was created in %{dest} +Comment[ca]=Un connector per a TDEHTMLPart ha estat creat en %{dest} +Comment[da]=Et TDEHTMLPart plugin blev oprettet i %{dest} +Comment[de]=Ein Modul für die Komponente TDEHTML wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο τμήμα TDEHTML δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para TDEHTMLPart ha sido creado en %{dest} +Comment[et]=TDEHTMLPart plugin loodi asukohta %{dest} +Comment[eu]=TDEHTMLPart plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ جزء TDEHTML در %{dest} ایجاد شد +Comment[fr]=Un module externe pour TDEHTMLPart a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán TDEHTMLPart i %{dest} +Comment[gl]=Creouse unha extensión para TDEHTMLPart en %{dest} +Comment[hu]=Létrejött egy TDEHTML-bővítőmodul itt: %{dest} +Comment[it]=È stato creato un plugin TDEHTMLPart in %{dest} +Comment[ja]=TDEHTMLPart プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDEHTMLPart-Moduul opstellt +Comment[ne]=TDEHTMLPart प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDEHTMLPart-plugin is aangemaakt in %{dest} +Comment[pl]=Wtyczka do TDEHTMLPart została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' TDEHTMLPart em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' TDEHTMLPart em %{dest} +Comment[ru]=Модуль для компонента TDEHTML создан в %{dest} +Comment[sk]=TDEHTML modul bol vytvorený v %{dest} +Comment[sr]=Прикључак за део TDEHTML направљен је у %{dest} +Comment[sr@Latn]=Priključak za deo TDEHTML napravljen je u %{dest} +Comment[sv]=Ett insticksprogram för TDEHTML-delprogrammet skapades i %{dest} +Comment[tr]=Bir TDEHTMLPart eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 TDEHTMLPart 插件 +Comment[zh_TW]=一個 TDEHTML 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kpartplugin/kpartplugin.tdevtemplate b/languages/cpp/app_templates/kpartplugin/kpartplugin.tdevtemplate deleted file mode 100644 index dc3b3e04..00000000 --- a/languages/cpp/app_templates/kpartplugin/kpartplugin.tdevtemplate +++ /dev/null @@ -1,204 +0,0 @@ -# TDE Config File -[General] -Name=TDEHTMLPart plugin -Name[br]=Lugent TDEHTMLPart -Name[ca]=Connector per a TDEHTMLPart -Name[de]=TDEHTMLPart-Modul -Name[el]=Πρόσθετο TDEHTMLPart -Name[es]=Complemento para TDEHTMLPart -Name[eu]=TDEHTMLPart plugina -Name[fa]=وصلۀ TDEHTMLPart -Name[fr]=Module externe pour le composant TDEHTML -Name[ga]=Breiseán TDEHTMLPart -Name[gl]=Extensión para TDEHTMLPart -Name[hu]=TDEHTML-bővítőmodul -Name[it]=Plugin TDEHTMLPart -Name[ja]=TDEHTMLPart プラグイン -Name[nds]=TDEHTMLPart-Moduul -Name[ne]=TDEHTMLPart प्लगइन -Name[nl]=TDEHTMLPart-plugin -Name[pl]=Wtyczka do TDEHTMLPart -Name[pt]='Plugin' do TDEHTMLPart -Name[pt_BR]='Plugin' do TDEHTMLPart -Name[ru]=Модуль TDEHTMLPart -Name[sk]=TDEHTMLPart modul -Name[sl]=Vstavek za TDEHTMLPart -Name[sr]=Прикључак за део TDEHTML -Name[sr@Latn]=Priključak za deo TDEHTML -Name[sv]=Insticksprogram för TDEHTML-delprogram -Name[tr]=TDEHTMLPart Eklentisi -Name[zh_CN]=TDEHTMLPart 插件 -Name[zh_TW]=TDEHTMLPart 外掛程式 -Icon=kpartplugin.png -Category=C++/TDE -Comment=Generates a plugin for the TDEHTML part. -Comment[ca]=Genera un connector per a la part TDEHTML. -Comment[da]=Genererer et plugin for TDEHTML parten. -Comment[de]=Erstellt ein Modul für die Komponente TDEHTML -Comment[el]=Δημιουργεί ένα πρόσθετο για το τμήμα TDEHTML. -Comment[es]=Genera un complemento para TDEHTMLPart. -Comment[et]=TDEHTML-komponendi plugina loomine. -Comment[eu]=TDEHTML zatirako plugin bat sortzen du. -Comment[fa]=یک وصله برای جزء TDEHTML تولید می‌کند -Comment[fr]=Génère un module externe pour le composant TDEHTML. -Comment[gl]=Xera unha extensión para o 'part' TDEHTML. -Comment[hu]=Létrehoz egy TDEHTML-bővítőmodult. -Comment[it]=Genera un plugin per la part TDEHTML. -Comment[ja]=TDEHTML パートのためのプラグインを作成します -Comment[nds]=Stellt en Moduul för de Komponent TDEHTML op. -Comment[ne]=TDEHTML भागका लागि प्लगइन उत्पन्न गर्दछ । -Comment[nl]=Genereert een plugin voor de TDEHTML-part. -Comment[pl]=Generuje wtyczkę do TDEHTML part. -Comment[pt]=Gera um 'plugin' para a componente TDEHTML. -Comment[pt_BR]=Gera um 'plugin' para a componente TDEHTML. -Comment[ru]=Создание модуля для компонента TDEHTML. -Comment[sk]=Vygeneruje modul pre TDEHTML part. -Comment[sr]=Прави прикључак за део TDEHTML. -Comment[sr@Latn]=Pravi priključak za deo TDEHTML. -Comment[sv]=Skapar ett insticksprogram för TDEHTML-delprogrammet -Comment[zh_CN]=生成 TDEHTML 部件的插件。 -Comment[zh_TW]=產生一個 TDEHTML part 的外掛程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp -Archive=kpartplugin.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/plugin_app.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/plugin_app.h -Dest=%{dest}/src/plugin_%{APPNAMELC}.h - -[FILE14] -Type=install -EscapeXML=true -Source=%{src}/plugin_app.rc -Dest=%{dest}/src/plugin_%{APPNAMELC}.rc - -[FILE15] -Type=install -Source=%{src}/hi16-action-plugin.png -Dest=%{dest}/src/hi16-action-plugin.png -Process=false - -[FILE16] -Type=install -Source=%{src}/hi22-action-plugin.png -Dest=%{dest}/src/hi32-action-plugin.png -Process=false - -[MSG] -Type=message -Comment=A TDEHTMLPart plugin was created in %{dest} -Comment[ca]=Un connector per a TDEHTMLPart ha estat creat en %{dest} -Comment[da]=Et TDEHTMLPart plugin blev oprettet i %{dest} -Comment[de]=Ein Modul für die Komponente TDEHTML wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο τμήμα TDEHTML δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para TDEHTMLPart ha sido creado en %{dest} -Comment[et]=TDEHTMLPart plugin loodi asukohta %{dest} -Comment[eu]=TDEHTMLPart plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ جزء TDEHTML در %{dest} ایجاد شد -Comment[fr]=Un module externe pour TDEHTMLPart a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán TDEHTMLPart i %{dest} -Comment[gl]=Creouse unha extensión para TDEHTMLPart en %{dest} -Comment[hu]=Létrejött egy TDEHTML-bővítőmodul itt: %{dest} -Comment[it]=È stato creato un plugin TDEHTMLPart in %{dest} -Comment[ja]=TDEHTMLPart プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDEHTMLPart-Moduul opstellt -Comment[ne]=TDEHTMLPart प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDEHTMLPart-plugin is aangemaakt in %{dest} -Comment[pl]=Wtyczka do TDEHTMLPart została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' TDEHTMLPart em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' TDEHTMLPart em %{dest} -Comment[ru]=Модуль для компонента TDEHTML создан в %{dest} -Comment[sk]=TDEHTML modul bol vytvorený v %{dest} -Comment[sr]=Прикључак за део TDEHTML направљен је у %{dest} -Comment[sr@Latn]=Priključak za deo TDEHTML napravljen je u %{dest} -Comment[sv]=Ett insticksprogram för TDEHTML-delprogrammet skapades i %{dest} -Comment[tr]=Bir TDEHTMLPart eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 TDEHTMLPart 插件 -Comment[zh_TW]=一個 TDEHTML 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kpartplugin/plugin.tdevelop b/languages/cpp/app_templates/kpartplugin/plugin.tdevelop index 2a61c8d5..c94ba886 100644 --- a/languages/cpp/app_templates/kpartplugin/plugin.tdevelop +++ b/languages/cpp/app_templates/kpartplugin/plugin.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}.la debug @@ -44,8 +44,8 @@ -O0 -g3 - - + + @@ -53,8 +53,8 @@ - - + + ada ada_bugs_gcc @@ -91,24 +91,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kscons_kxt/CMakeLists.txt b/languages/cpp/app_templates/kscons_kxt/CMakeLists.txt index 2aa03b98..bf1be9f6 100644 --- a/languages/cpp/app_templates/kscons_kxt/CMakeLists.txt +++ b/languages/cpp/app_templates/kscons_kxt/CMakeLists.txt @@ -21,9 +21,9 @@ add_custom_target( kscons_kxt.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kscons_kxt.tar.gz kscons_kxt.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kscons_kxt.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kscons_kxt.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kscons_kxt/Makefile.am b/languages/cpp/app_templates/kscons_kxt/Makefile.am index 5f00c212..59a58ee1 100644 --- a/languages/cpp/app_templates/kscons_kxt/Makefile.am +++ b/languages/cpp/app_templates/kscons_kxt/Makefile.am @@ -7,10 +7,10 @@ QUICKSTART INSTALL README templateName= kscons_kxt ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kscons_kxt/app.tdevelop b/languages/cpp/app_templates/kscons_kxt/app.tdevelop index b32b6656..317a4cbc 100644 --- a/languages/cpp/app_templates/kscons_kxt/app.tdevelop +++ b/languages/cpp/app_templates/kscons_kxt/app.tdevelop @@ -17,16 +17,16 @@ - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -62,8 +62,8 @@ -O0 -g3 - - + + @@ -75,8 +75,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -111,8 +111,8 @@ qmake User Guide - - + + libtool @@ -126,16 +126,16 @@ false true - - + + - - + + -f -dP @@ -144,7 +144,7 @@ -u3 -p - + @@ -156,14 +156,14 @@ true - + true 2 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kscons_kxt/kscons_kxt.kdevtemplate b/languages/cpp/app_templates/kscons_kxt/kscons_kxt.kdevtemplate new file mode 100644 index 00000000..20d35070 --- /dev/null +++ b/languages/cpp/app_templates/kscons_kxt/kscons_kxt.kdevtemplate @@ -0,0 +1,253 @@ +# TDE Config File +[General] +Name=Scons-based TDE application +Name[ca]=Una aplicació per al TDE basada en Scons +Name[da]=Scons-baseret TDE program +Name[de]=Auf Scons basierende TDE-Anwendung +Name[el]=Μια εφαρμογή KMDI βασισμένης στο Scons +Name[es]=Aplicación para TDE basada en Scons +Name[et]=TDE rakendus Sconsi põhjal +Name[eu]=Scons-en oinarritutako TDE aplikazioa +Name[fa]=کاربرد TDE بر مبنای Scons +Name[fr]=Application TDE basée sur Scons +Name[ga]=Feidhmchlár TDE bunaithe ar Scons +Name[gl]=Aplicación TDE baseada en Scons +Name[hu]=Scons-alapú TDE-s alkalmazás +Name[it]=Un'applicazione TDE basata su scons +Name[ja]=Scons を使った TDE アプリケーション +Name[nds]=Op "Scons" opbuut TDE-Programm +Name[ne]=स्कोन-आधारित केडीई अनुप्रयोग +Name[nl]=Scons gebaseerde TDE-toepassing +Name[pl]=Program TDE wykorzystujący Scons +Name[pt]=Aplicação TDE usando Scons +Name[pt_BR]=Aplicação TDE usando Scons +Name[ru]=Приложение TDE на базе Scons +Name[sk]=TDE aplikácia založená na Scons +Name[sr]=TDE програм на основу Scons-а +Name[sr@Latn]=TDE program na osnovu Scons-a +Name[sv]=Scons-baserat TDE-program +Name[tr]=Scons-tabanlı TDE Uygulaması +Name[zh_CN]=基于 Scons 的 TDE 应用程序 +Name[zh_TW]=Scons 為基礎的 TDE 應用程式 +Category=C++/TDE +Icon=kscons_kxt.png +Comment=Generates a simple TDE application with one widget, a configuration dialog and a dcop interface. Scons scripts are provided for compiling and installing the application. +Comment[ca]=Genera una simple aplicació per al TDE amb un estri, un diàleg de configuració i una interfície dcop. Els scripts en Scons són proveïts per a compilar i instal·lar l'aplicació. +Comment[da]=Genererer et simpelt TDE program med en kontrol, en indstillingsdialog og en dcop-grænseflade. Der sørges for scons-scripter til at kompilere og installere programmet. +Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Widget, einem Einstellungsdialog und einer DCOP-Schnittstelle. Scons-Skripte zum Kompileren und Installieren der Anwendung werden zur Verfügung gestellt. +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης και μια διασύνδεση dcop. Προσφέρονται σενάρια Scons για τη μεταγλώττιση και εγκατάσταση της εφαρμογής. +Comment[en_GB]=Generates a simple TDE application with one widget, a configuration dialogue and a dcop interface. Scons scripts are provided for compiling and installing the application. +Comment[es]=Genera una sencilla aplicación para TDE con una ventana principal, un diálogo de configuración y una interfaz DCOP. Se proporcionan guiones en Scons para compilar e instalar la aplicación. +Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina, seadistusdialoogi ja DCOP-liidesega. Luuakse ka Sconsi skriptid rakenduse kompileerimiseks ja paigaldamiseks. +Comment[eu]=TDE aplikazio sinple bat sortzen du trepeta bat, konfigurazio-elkarrizketa eta dcop interfaze batekin. Aplikazioa konpilatu eta instalatzeko Scons script-ak sortzen ditu. +Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر، یک محاورۀ پیکربندی و یک واسط dcop تولید می‌کند. دست‌نوشته‌های Scons برای ترجمه و نصب کاربرد فراهم شده‌اند. +Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget), une boîte de dialogue de configuration et une interface DCOP. Des scripts Scons sont fournis pour compiler et installer l'application. +Comment[gl]=Xera unha aplicación sinxela TDE cunha compoñente, un diálogo de configuración e unha interface dcop. Os scripts scons proporciónanse para compilar e intalar a aplicación. +Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy főablakkal, beállítóablakkal és DCOP-felülettel. Az alkalmazás lefordításához és telepítéséhez Scons-szkriptek állnak rendelkezésre. +Comment[it]=Genera una semplice applicazione TDE con un elemento grafico, una finestra di configurazione e un'interfaccia DCOP. Gli script scons sono forniti per compilare e installare l'applicazione. +Comment[nds]=Stellt en eenfach TDE-Programm mit een Element, en Instelldialoog un en DCOP-Koppelsteed op. Stellt Scons-Skripten för't Kompileren un Installeren vun't Programm praat. +Comment[ne]=एउटा विगेट, कन्फिगरेसन संवाद र dcop इन्टरफेससँग एउटा साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । स्कोन स्क्रिप्टहरू अनुप्रयोग स्थापना र कम्पाइल गर्नका लागि प्रदान गरिन्छ । +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één toplevel widget, een configuratievenster en een DCOP-interface. Scons-scripts worden aangemaakt voor compilatie en installatie. +Comment[pl]=Generuje prosty program dla TDE widgetem, oknem konfiguracyjnym i interfejsem dcop. Do kompilacji i instalacji programu wykorzystywane są skrypty Scons. +Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal, uma de configuração e uma interface de DCOP. Os ficheiros do 'scons' são oferecidos para compilar e instalar a aplicação. +Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal, uma de configuração e uma interface de DCOP. Os ficheiros do 'scons' são oferecidos para compilar e instalar a aplicação. +Comment[ru]=Создание простого приложения TDE с одним виджетом, окном настройки и интерфейсом DCOP. Сборка и установка осуществляется с помощью скриптов Scons. +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom, konfiguračným dial=ogom a DCOP rozhraním. K dispozícii je Scons skriptna kompiláciu a inštaláciu aplikácie. +Comment[sr]=Прави једноставан TDE програм са једном контролом, дијалогом за подешавање и DCOP интерфејсом. Дате су Scons скрипте за превођење и инсталирање програма. +Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom, dijalogom za podešavanje i DCOP interfejsom. Date su Scons skripte za prevođenje i instaliranje programa. +Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent, en inställningsdialogruta och ett DCOP-gränssnitt. Scons-script tillhandahålls för att kompilera och installera programmet. +Comment[tr]=Bir parçacıklı, ayar pencereli ve bir dcop arayüzü olan basit bir TDE uygulaması yaratır. Uygulamayı derlemek ve kurmak için scons betikleri sağlanmıştır. +Comment[zh_CN]=生成一个带一个部件、一个配置对话框和一个 DCOP 接口的简单 TDE 应用程序。此时会提供 Scons 脚本以供编译并安装应用程序。 +Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件,一個設定對話框與一個 DCOP 介面。Scons 文稿可用於編譯與安裝應用程式。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/QUICKSTART +Archive=kscons_kxt.tar.gz + +[SCONS] +Type=include +File=%{tdevelop}/template-common/scons.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{src}/SConscript-doc +Dest=%{dest}/doc/SConscript + +[FILE2] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE3] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE4] +Type=install +Source=%{src}/SConstruct +Dest=%{dest}/SConstruct + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE10] +Type=install +Source=%{src}/SConscript-src +Dest=%{dest}/src/SConscript + +[FILE11] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE12] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE13] +Type=install +EscapeXML=true +Source=%{src}/appview_base.ui +Dest=%{dest}/src/%{APPNAMELC}view_base.ui + +[FILE14] +Type=install +Source=%{src}/appview.cpp +Dest=%{dest}/src/%{APPNAMELC}view.cpp + +[FILE15] +Type=install +Source=%{src}/appview.h +Dest=%{dest}/src/%{APPNAMELC}view.h + +[FILE16] +Type=install +EscapeXML=true +Source=%{src}/prefs-base.ui +Dest=%{dest}/src/prefs-base.ui + +[FILE17] +Type=install +Source=%{src}/prefs.cpp +Dest=%{dest}/src/prefs.cpp + +[FILE18] +Type=install +Source=%{src}/prefs.h +Dest=%{dest}/src/prefs.h + +[FILE19] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE20] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE21] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[FILE22] +Type=install +Source=%{src}/app.kcfg +Dest=%{dest}/src/%{APPNAMELC}.kcfg + +[FILE23] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/src/settings.kcfgc + +[FILE24] +Type=install +Source=%{src}/tips +Dest=%{dest}/src/tips + +[FILE26] +Type=install +Source=%{src}/VERSION +Dest=%{dest}/VERSION + +[FILE29] +Type=install +Source=%{src}/INSTALL +Dest=%{dest}/INSTALL + +[FILE30] +Type=install +Source=%{src}/QUICKSTART +Dest=%{dest}/QUICKSTART + +[FILE31] +Type=install +Source=%{src}/messages.sh +Dest=%{dest}/po/messages.sh + +[MSG] +Type=message +Comment=A TDE application with scons scripts was created in %{dest} +Comment[ca]=Una aplicació per al TDE amb scripts en Scons ha estat creada e n %{dest} +Comment[da]=Et TDE program med scons-scripter blev oprette i %{dest} +Comment[de]=Eine TDE-Anwendung mit Scons-Skripten wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή TDE με σενάρια scons δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación para TDE con guiones de Scons ha sido creada en %{dest} +Comment[et]=TDE rakendus Sconsi skriptidega loodi asukohta %{dest} +Comment[eu]=Scons script-dun TDE aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد TDE با دست‌نوشته‌های scons در %{dest} ایجاد شد +Comment[fr]=Une application TDE comprenant des scripts Scons a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár TDE le scripteanna scons i %{dest} +Comment[gl]=Creouse unha aplicación TDE con scripts scons en %{dest} +Comment[hu]=Létrejött egy Scons-szkripteket használó TDE-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDE con gli script scons in %{dest} +Comment[ja]=Scons スクリプトを使った TDE アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDE-Programm mit scons-Skripten opstellt +Comment[ne]=स्कोन स्क्रिप्टसँग केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDE applicatie inclusief Scons-scripts is aangemaakt in %{dest} +Comment[pl]=Program TDE ze skryptami scons utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} +Comment[ru]=Приложение TDE со скриптами Scons создано в %{dest} +Comment[sk]=TDE aplikácia so scons skriptom bola vytvorená v %{dest} +Comment[sr]=TDE програм са scons скриптама направљен је у %{dest} +Comment[sr@Latn]=TDE program sa scons skriptama napravljen je u %{dest} +Comment[sv]=Ett TDE-program med Scons-skript skapades i %{dest} +Comment[tr]=Scons betikleri olan bir TDE uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了带 scons 脚本的 TDE 应用程序 +Comment[zh_TW]=一個內含 scons 文稿的 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kscons_kxt/kscons_kxt.tdevtemplate b/languages/cpp/app_templates/kscons_kxt/kscons_kxt.tdevtemplate deleted file mode 100644 index fd709e79..00000000 --- a/languages/cpp/app_templates/kscons_kxt/kscons_kxt.tdevtemplate +++ /dev/null @@ -1,253 +0,0 @@ -# TDE Config File -[General] -Name=Scons-based TDE application -Name[ca]=Una aplicació per al TDE basada en Scons -Name[da]=Scons-baseret TDE program -Name[de]=Auf Scons basierende TDE-Anwendung -Name[el]=Μια εφαρμογή KMDI βασισμένης στο Scons -Name[es]=Aplicación para TDE basada en Scons -Name[et]=TDE rakendus Sconsi põhjal -Name[eu]=Scons-en oinarritutako TDE aplikazioa -Name[fa]=کاربرد TDE بر مبنای Scons -Name[fr]=Application TDE basée sur Scons -Name[ga]=Feidhmchlár TDE bunaithe ar Scons -Name[gl]=Aplicación TDE baseada en Scons -Name[hu]=Scons-alapú TDE-s alkalmazás -Name[it]=Un'applicazione TDE basata su scons -Name[ja]=Scons を使った TDE アプリケーション -Name[nds]=Op "Scons" opbuut TDE-Programm -Name[ne]=स्कोन-आधारित केडीई अनुप्रयोग -Name[nl]=Scons gebaseerde TDE-toepassing -Name[pl]=Program TDE wykorzystujący Scons -Name[pt]=Aplicação TDE usando Scons -Name[pt_BR]=Aplicação TDE usando Scons -Name[ru]=Приложение TDE на базе Scons -Name[sk]=TDE aplikácia založená na Scons -Name[sr]=TDE програм на основу Scons-а -Name[sr@Latn]=TDE program na osnovu Scons-a -Name[sv]=Scons-baserat TDE-program -Name[tr]=Scons-tabanlı TDE Uygulaması -Name[zh_CN]=基于 Scons 的 TDE 应用程序 -Name[zh_TW]=Scons 為基礎的 TDE 應用程式 -Category=C++/TDE -Icon=kscons_kxt.png -Comment=Generates a simple TDE application with one widget, a configuration dialog and a dcop interface. Scons scripts are provided for compiling and installing the application. -Comment[ca]=Genera una simple aplicació per al TDE amb un estri, un diàleg de configuració i una interfície dcop. Els scripts en Scons són proveïts per a compilar i instal·lar l'aplicació. -Comment[da]=Genererer et simpelt TDE program med en kontrol, en indstillingsdialog og en dcop-grænseflade. Der sørges for scons-scripter til at kompilere og installere programmet. -Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Widget, einem Einstellungsdialog und einer DCOP-Schnittstelle. Scons-Skripte zum Kompileren und Installieren der Anwendung werden zur Verfügung gestellt. -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης και μια διασύνδεση dcop. Προσφέρονται σενάρια Scons για τη μεταγλώττιση και εγκατάσταση της εφαρμογής. -Comment[en_GB]=Generates a simple TDE application with one widget, a configuration dialogue and a dcop interface. Scons scripts are provided for compiling and installing the application. -Comment[es]=Genera una sencilla aplicación para TDE con una ventana principal, un diálogo de configuración y una interfaz DCOP. Se proporcionan guiones en Scons para compilar e instalar la aplicación. -Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina, seadistusdialoogi ja DCOP-liidesega. Luuakse ka Sconsi skriptid rakenduse kompileerimiseks ja paigaldamiseks. -Comment[eu]=TDE aplikazio sinple bat sortzen du trepeta bat, konfigurazio-elkarrizketa eta dcop interfaze batekin. Aplikazioa konpilatu eta instalatzeko Scons script-ak sortzen ditu. -Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر، یک محاورۀ پیکربندی و یک واسط dcop تولید می‌کند. دست‌نوشته‌های Scons برای ترجمه و نصب کاربرد فراهم شده‌اند. -Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget), une boîte de dialogue de configuration et une interface DCOP. Des scripts Scons sont fournis pour compiler et installer l'application. -Comment[gl]=Xera unha aplicación sinxela TDE cunha compoñente, un diálogo de configuración e unha interface dcop. Os scripts scons proporciónanse para compilar e intalar a aplicación. -Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy főablakkal, beállítóablakkal és DCOP-felülettel. Az alkalmazás lefordításához és telepítéséhez Scons-szkriptek állnak rendelkezésre. -Comment[it]=Genera una semplice applicazione TDE con un elemento grafico, una finestra di configurazione e un'interfaccia DCOP. Gli script scons sono forniti per compilare e installare l'applicazione. -Comment[nds]=Stellt en eenfach TDE-Programm mit een Element, en Instelldialoog un en DCOP-Koppelsteed op. Stellt Scons-Skripten för't Kompileren un Installeren vun't Programm praat. -Comment[ne]=एउटा विगेट, कन्फिगरेसन संवाद र dcop इन्टरफेससँग एउटा साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । स्कोन स्क्रिप्टहरू अनुप्रयोग स्थापना र कम्पाइल गर्नका लागि प्रदान गरिन्छ । -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één toplevel widget, een configuratievenster en een DCOP-interface. Scons-scripts worden aangemaakt voor compilatie en installatie. -Comment[pl]=Generuje prosty program dla TDE widgetem, oknem konfiguracyjnym i interfejsem dcop. Do kompilacji i instalacji programu wykorzystywane są skrypty Scons. -Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal, uma de configuração e uma interface de DCOP. Os ficheiros do 'scons' são oferecidos para compilar e instalar a aplicação. -Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal, uma de configuração e uma interface de DCOP. Os ficheiros do 'scons' são oferecidos para compilar e instalar a aplicação. -Comment[ru]=Создание простого приложения TDE с одним виджетом, окном настройки и интерфейсом DCOP. Сборка и установка осуществляется с помощью скриптов Scons. -Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom, konfiguračným dial=ogom a DCOP rozhraním. K dispozícii je Scons skriptna kompiláciu a inštaláciu aplikácie. -Comment[sr]=Прави једноставан TDE програм са једном контролом, дијалогом за подешавање и DCOP интерфејсом. Дате су Scons скрипте за превођење и инсталирање програма. -Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom, dijalogom za podešavanje i DCOP interfejsom. Date su Scons skripte za prevođenje i instaliranje programa. -Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent, en inställningsdialogruta och ett DCOP-gränssnitt. Scons-script tillhandahålls för att kompilera och installera programmet. -Comment[tr]=Bir parçacıklı, ayar pencereli ve bir dcop arayüzü olan basit bir TDE uygulaması yaratır. Uygulamayı derlemek ve kurmak için scons betikleri sağlanmıştır. -Comment[zh_CN]=生成一个带一个部件、一个配置对话框和一个 DCOP 接口的简单 TDE 应用程序。此时会提供 Scons 脚本以供编译并安装应用程序。 -Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件,一個設定對話框與一個 DCOP 介面。Scons 文稿可用於編譯與安裝應用程式。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/QUICKSTART -Archive=kscons_kxt.tar.gz - -[SCONS] -Type=include -File=%{tdevelop}/template-common/scons.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{src}/SConscript-doc -Dest=%{dest}/doc/SConscript - -[FILE2] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE3] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE4] -Type=install -Source=%{src}/SConstruct -Dest=%{dest}/SConstruct - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE10] -Type=install -Source=%{src}/SConscript-src -Dest=%{dest}/src/SConscript - -[FILE11] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE12] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE13] -Type=install -EscapeXML=true -Source=%{src}/appview_base.ui -Dest=%{dest}/src/%{APPNAMELC}view_base.ui - -[FILE14] -Type=install -Source=%{src}/appview.cpp -Dest=%{dest}/src/%{APPNAMELC}view.cpp - -[FILE15] -Type=install -Source=%{src}/appview.h -Dest=%{dest}/src/%{APPNAMELC}view.h - -[FILE16] -Type=install -EscapeXML=true -Source=%{src}/prefs-base.ui -Dest=%{dest}/src/prefs-base.ui - -[FILE17] -Type=install -Source=%{src}/prefs.cpp -Dest=%{dest}/src/prefs.cpp - -[FILE18] -Type=install -Source=%{src}/prefs.h -Dest=%{dest}/src/prefs.h - -[FILE19] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE20] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE21] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[FILE22] -Type=install -Source=%{src}/app.kcfg -Dest=%{dest}/src/%{APPNAMELC}.kcfg - -[FILE23] -Type=install -Source=%{src}/settings.kcfgc -Dest=%{dest}/src/settings.kcfgc - -[FILE24] -Type=install -Source=%{src}/tips -Dest=%{dest}/src/tips - -[FILE26] -Type=install -Source=%{src}/VERSION -Dest=%{dest}/VERSION - -[FILE29] -Type=install -Source=%{src}/INSTALL -Dest=%{dest}/INSTALL - -[FILE30] -Type=install -Source=%{src}/QUICKSTART -Dest=%{dest}/QUICKSTART - -[FILE31] -Type=install -Source=%{src}/messages.sh -Dest=%{dest}/po/messages.sh - -[MSG] -Type=message -Comment=A TDE application with scons scripts was created in %{dest} -Comment[ca]=Una aplicació per al TDE amb scripts en Scons ha estat creada e n %{dest} -Comment[da]=Et TDE program med scons-scripter blev oprette i %{dest} -Comment[de]=Eine TDE-Anwendung mit Scons-Skripten wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή TDE με σενάρια scons δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación para TDE con guiones de Scons ha sido creada en %{dest} -Comment[et]=TDE rakendus Sconsi skriptidega loodi asukohta %{dest} -Comment[eu]=Scons script-dun TDE aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد TDE با دست‌نوشته‌های scons در %{dest} ایجاد شد -Comment[fr]=Une application TDE comprenant des scripts Scons a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár TDE le scripteanna scons i %{dest} -Comment[gl]=Creouse unha aplicación TDE con scripts scons en %{dest} -Comment[hu]=Létrejött egy Scons-szkripteket használó TDE-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDE con gli script scons in %{dest} -Comment[ja]=Scons スクリプトを使った TDE アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDE-Programm mit scons-Skripten opstellt -Comment[ne]=स्कोन स्क्रिप्टसँग केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDE applicatie inclusief Scons-scripts is aangemaakt in %{dest} -Comment[pl]=Program TDE ze skryptami scons utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} -Comment[ru]=Приложение TDE со скриптами Scons создано в %{dest} -Comment[sk]=TDE aplikácia so scons skriptom bola vytvorená v %{dest} -Comment[sr]=TDE програм са scons скриптама направљен је у %{dest} -Comment[sr@Latn]=TDE program sa scons skriptama napravljen je u %{dest} -Comment[sv]=Ett TDE-program med Scons-skript skapades i %{dest} -Comment[tr]=Scons betikleri olan bir TDE uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了带 scons 脚本的 TDE 应用程序 -Comment[zh_TW]=一個內含 scons 文稿的 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kscons_tdemdi/CMakeLists.txt b/languages/cpp/app_templates/kscons_tdemdi/CMakeLists.txt index d8af0f23..c05f1bb1 100644 --- a/languages/cpp/app_templates/kscons_tdemdi/CMakeLists.txt +++ b/languages/cpp/app_templates/kscons_tdemdi/CMakeLists.txt @@ -22,9 +22,9 @@ add_custom_target( kscons_tdemdi.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kscons_tdemdi.tar.gz kscons_tdemdi.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kscons_tdemdi.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kscons_tdemdi.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kscons_tdemdi/Makefile.am b/languages/cpp/app_templates/kscons_tdemdi/Makefile.am index b51e2bdb..191ea8ee 100644 --- a/languages/cpp/app_templates/kscons_tdemdi/Makefile.am +++ b/languages/cpp/app_templates/kscons_tdemdi/Makefile.am @@ -7,10 +7,10 @@ app_part.cpp app_part.h app_part.rc app_shell.rc templateName= kscons_tdemdi ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kscons_tdemdi/app.tdevelop b/languages/cpp/app_templates/kscons_tdemdi/app.tdevelop index b32b6656..317a4cbc 100644 --- a/languages/cpp/app_templates/kscons_tdemdi/app.tdevelop +++ b/languages/cpp/app_templates/kscons_tdemdi/app.tdevelop @@ -17,16 +17,16 @@ - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -62,8 +62,8 @@ -O0 -g3 - - + + @@ -75,8 +75,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -111,8 +111,8 @@ qmake User Guide - - + + libtool @@ -126,16 +126,16 @@ false true - - + + - - + + -f -dP @@ -144,7 +144,7 @@ -u3 -p - + @@ -156,14 +156,14 @@ true - + true 2 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.kdevtemplate b/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.kdevtemplate new file mode 100644 index 00000000..2a297d60 --- /dev/null +++ b/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.kdevtemplate @@ -0,0 +1,271 @@ +# TDE Config File +[General] +Name=Scons-based KMDI application +Name[ca]=Aplicació per a KMDI basada en Scons +Name[da]=Scons-baseret KMDI-program +Name[de]=Auf Scons basierende KMDI-Anwendung +Name[el]=Μια εφαρμογή KMDI βασισμένης στο Scons +Name[es]=Aplicación KMDI basada en Scons +Name[et]=KMDI rakendus Sconsi põhjal +Name[eu]=Scons-en oinarritutako KMDI aplikazioa +Name[fa]=کاربرد KMDI بر مبنای Scons +Name[fr]=Application KMDI basée sur Scons +Name[ga]=Feidhmchlár KMDI bunaithe ar Scons +Name[gl]=Aplicación KMDI baseada en Scons +Name[hu]=Scons-alapú KMDI-alkalmazás +Name[it]=Applicazione KMDI basata su scons +Name[ja]=Scons ベースの KMDI アプリケーション +Name[nds]=Op "scons" opbuut KMDI-Programm +Name[ne]=स्कोन-आधारित KMDI अनुप्रयोग +Name[nl]=Scons gebaseerde KMDI-toepassing +Name[pl]=Program KMDI wykorzystujący Scons +Name[pt]=Aplicação KMDI usando Scons +Name[pt_BR]=Aplicação KMDI usando Scons +Name[ru]=Многооконное приложение TDE на базе Scons +Name[sk]=KMDI aplikácia založená na Scons +Name[sr]=KMDI програм на основу Scons-а +Name[sr@Latn]=KMDI program na osnovu Scons-a +Name[sv]=Scons-baserat KMDI-program +Name[tr]=Scons tabanlı KMDI uygulaması +Name[zh_CN]=基于 Scons 的 KMDI 应用程序 +Name[zh_TW]=Scons 為基礎的 KMDI 應用程式 +Category=C++/TDE +Icon=kscons_tdemdi.png +Comment=Generates a complex KMDI application. Scons scripts are provided for compiling and installing the application. +Comment[ca]=Genera una complexa aplicació per a KMDI. Els scripts en Scons són proveïts per a compilar i instal·lar l'aplicació. +Comment[da]=Genererer et komplekst TDE-program. Der sørges for scons-scripter til at kompilere og installere programmet. +Comment[de]=Erstellt eine aufwändige KMDI-Anwendung. Scons-Skripte zum Kompilieren und Installieren der Anwendung werden zur Verfügung gestellt. +Comment[el]=Δημιουργεί μια πολύπλοκη εφαρμογή KMDI. Προσφέρονται σενάρια Scons για τη μεταγλώττιση και εγκατάσταση της εφαρμογής. +Comment[es]=Genera una aplicación KMDI compleja. Se proporcionan guiones en Scons para compilar e instalar la aplicación. +Comment[et]=Keerulise KMDI rakenduse loomine. Luuakse ka Sconsi skriptid rakenduse kompileerimiseks ja paigaldamiseks. +Comment[eu]=KMDI aplikazio konplexu bat sortzen du. Aplikazioak konpilatu eta aplikazioa instalatzeko Scons script-ak sortzen ditu. +Comment[fa]=یک کاربرد پیچیدۀ KMDI تولید می‌کند. دست‌نوشته‌های Scons برای ترجمه و نصب کاربرد فراهم می‌شوند. +Comment[fr]=Génère une application KMDI évoluée. Des scripts Scons sont fournis pour compiler et installer l'application. +Comment[gl]=Xera unha aplicación complexa KMDI. Os scripts Scons proporciónanse para compilar e instalar a aplicación. +Comment[hu]=Létrehoz egy komplex KMDI alkalmazást. Az alkalmazás lefordításához és telepítéséhez Scons-szkriptek állnak rendelkezésre. +Comment[it]=Genera una applicazione KMDI complessa. Gli script scons sono forniti per compilare e istallare l'applicazione. +Comment[nds]=Stellt en vigeliensch KMDI-Programm op. Stellt Scons-Skripten för't Kompileren un Installeren vun't Programm praat. +Comment[ne]=जटिल KMDI अनुप्रयोग उत्पन्न गर्दछ । स्कोन स्क्रिप्टहरू अनुप्रयोग स्थापना र कम्पाइल गर्नका लागि प्रदान गरिन्छ । +Comment[nl]=Genereert een complexe KMDI-applicatie. Scons-scripts worden gebruikt voor compilatie en installatie. +Comment[pl]=Generuje złożony program z powłoką KMDI. Do kompilacji i instalacji wykorzystywany jest skrypt Scons. +Comment[pt]=Gera uma aplicação complexa com KMDI. Os ficheiros do Scons são fornecidos para compilar e instalar a aplicação. +Comment[pt_BR]=Gera uma aplicação complexa com KMDI. Os ficheiros do Scons são fornecidos para compilar e instalar a aplicação. +Comment[ru]=Создание полноценного многооконного приложения TDE. Для сборки и установки этого приложения будут использованы скрипты Scons. +Comment[sk]=Vygeneruje komplexnú KMDI aplikáciu. K dispozícii je Scons skriptna kompiláciu a inštaláciu aplikácie. +Comment[sr]=Прави сложени KMDI програм. Дате су Scons скрипте за превођење и инсталирање програма. +Comment[sr@Latn]=Pravi složeni KMDI program. Date su Scons skripte za prevođenje i instaliranje programa. +Comment[sv]=Skapar ett komplext KMDI-program. Scons-skript tillhandahålls för att kompilera och installera programmet. +Comment[tr]=Karmaşık bir KMDI uygulaması yaratır. Uygulamayı derlemek ve kurmak için scons betikleri sağlanmıştır. +Comment[zh_CN]=生成一个复杂的 KMDI 应用程序。此时会提供 Scons 脚本以供编译并安装应用程序。 +Comment[zh_TW]=產生一個複雜的 KMDI 應用程式。Scons 文稿是用於編譯與安裝應用程式。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/QUICKSTART +Archive=kscons_tdemdi.tar.gz + +[SCONS] +Type=include +File=%{tdevelop}/template-common/scons.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{src}/SConscript-doc +Dest=%{dest}/doc/SConscript + +[FILE2] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE3] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE4] +Type=install +Source=%{src}/SConstruct +Dest=%{dest}/SConstruct + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE10] +Type=install +Source=%{src}/SConscript-src +Dest=%{dest}/src/SConscript + +[FILE11] +Type=install +Source=%{src}/apptdemdi.cpp +Dest=%{dest}/src/%{APPNAMELC}tdemdi.cpp + +[FILE12] +Type=install +Source=%{src}/apptdemdi.h +Dest=%{dest}/src/%{APPNAMELC}tdemdi.h + +[FILE13] +Type=install +EscapeXML=true +Source=%{src}/prefs.ui +Dest=%{dest}/src/prefs.ui + +[FILE14] +Type=install +Source=%{src}/apptdemdiView.cpp +Dest=%{dest}/src/%{APPNAMELC}tdemdiView.cpp + +[FILE15] +Type=install +Source=%{src}/apptdemdiView.h +Dest=%{dest}/src/%{APPNAMELC}tdemdiView.h + +[FILE19] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE20] +Type=install +EscapeXML=true +Source=%{src}/app_shell.rc +Dest=%{dest}/src/%{APPNAMELC}_shell.rc + +[FILE21] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[FILE22] +Type=install +Source=%{src}/app.kcfg +Dest=%{dest}/src/%{APPNAMELC}.kcfg + +[FILE23] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/src/settings.kcfgc + +[FILE25] +Type=install +Source=%{src}/tips +Dest=%{dest}/src/tips + +[FILE27] +Type=install +Source=%{src}/VERSION +Dest=%{dest}/VERSION + +[FILE28] +Type=install +Source=%{src}/INSTALL +Dest=%{dest}/INSTALL + +[FILE29] +Type=install +Source=%{src}/QUICKSTART +Dest=%{dest}/QUICKSTART + +[FILE30] +Type=install +Source=%{src}/messages.sh +Dest=%{dest}/po/messages.sh + +[FILE31] +Type=install +Source=%{src}/tdemdikonsole.cpp +Dest=%{dest}/src/tdemdikonsole.cpp + +[FILE32] +Type=install +Source=%{src}/tdemdikonsole.h +Dest=%{dest}/src/tdemdikonsole.h + +[FILE34] +Type=install +Source=%{src}/app_part.cpp +Dest=%{dest}/src/%{APPNAMELC}_part.cpp + +[FILE35] +Type=install +Source=%{src}/app_part.h +Dest=%{dest}/src/%{APPNAMELC}_part.h + +[FILE36] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE37] +Type=install +Source=%{tdevelop}/template-common/tde-part.desktop +Dest=%{dest}/src/%{APPNAMELC}_part.desktop + +[FILE38] +Type=install +Source=%{src}/app_part.rc +Dest=%{dest}/src/%{APPNAMELC}_part.rc + +[MSG] +Type=message +Comment=A TDE application with scons scripts was created in %{dest} +Comment[ca]=Una aplicació per al TDE amb scripts en Scons ha estat creada e n %{dest} +Comment[da]=Et TDE program med scons-scripter blev oprette i %{dest} +Comment[de]=Eine TDE-Anwendung mit Scons-Skripten wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή TDE με σενάρια scons δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación para TDE con guiones de Scons ha sido creada en %{dest} +Comment[et]=TDE rakendus Sconsi skriptidega loodi asukohta %{dest} +Comment[eu]=Scons script-dun TDE aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد TDE با دست‌نوشته‌های scons در %{dest} ایجاد شد +Comment[fr]=Une application TDE comprenant des scripts Scons a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár TDE le scripteanna scons i %{dest} +Comment[gl]=Creouse unha aplicación TDE con scripts scons en %{dest} +Comment[hu]=Létrejött egy Scons-szkripteket használó TDE-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDE con gli script scons in %{dest} +Comment[ja]=Scons スクリプトを使った TDE アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDE-Programm mit scons-Skripten opstellt +Comment[ne]=स्कोन स्क्रिप्टसँग केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDE applicatie inclusief Scons-scripts is aangemaakt in %{dest} +Comment[pl]=Program TDE ze skryptami scons utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} +Comment[ru]=Приложение TDE со скриптами Scons создано в %{dest} +Comment[sk]=TDE aplikácia so scons skriptom bola vytvorená v %{dest} +Comment[sr]=TDE програм са scons скриптама направљен је у %{dest} +Comment[sr@Latn]=TDE program sa scons skriptama napravljen je u %{dest} +Comment[sv]=Ett TDE-program med Scons-skript skapades i %{dest} +Comment[tr]=Scons betikleri olan bir TDE uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了带 scons 脚本的 TDE 应用程序 +Comment[zh_TW]=一個內含 scons 文稿的 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.tdevtemplate b/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.tdevtemplate deleted file mode 100644 index 4b71d06c..00000000 --- a/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.tdevtemplate +++ /dev/null @@ -1,271 +0,0 @@ -# TDE Config File -[General] -Name=Scons-based KMDI application -Name[ca]=Aplicació per a KMDI basada en Scons -Name[da]=Scons-baseret KMDI-program -Name[de]=Auf Scons basierende KMDI-Anwendung -Name[el]=Μια εφαρμογή KMDI βασισμένης στο Scons -Name[es]=Aplicación KMDI basada en Scons -Name[et]=KMDI rakendus Sconsi põhjal -Name[eu]=Scons-en oinarritutako KMDI aplikazioa -Name[fa]=کاربرد KMDI بر مبنای Scons -Name[fr]=Application KMDI basée sur Scons -Name[ga]=Feidhmchlár KMDI bunaithe ar Scons -Name[gl]=Aplicación KMDI baseada en Scons -Name[hu]=Scons-alapú KMDI-alkalmazás -Name[it]=Applicazione KMDI basata su scons -Name[ja]=Scons ベースの KMDI アプリケーション -Name[nds]=Op "scons" opbuut KMDI-Programm -Name[ne]=स्कोन-आधारित KMDI अनुप्रयोग -Name[nl]=Scons gebaseerde KMDI-toepassing -Name[pl]=Program KMDI wykorzystujący Scons -Name[pt]=Aplicação KMDI usando Scons -Name[pt_BR]=Aplicação KMDI usando Scons -Name[ru]=Многооконное приложение TDE на базе Scons -Name[sk]=KMDI aplikácia založená na Scons -Name[sr]=KMDI програм на основу Scons-а -Name[sr@Latn]=KMDI program na osnovu Scons-a -Name[sv]=Scons-baserat KMDI-program -Name[tr]=Scons tabanlı KMDI uygulaması -Name[zh_CN]=基于 Scons 的 KMDI 应用程序 -Name[zh_TW]=Scons 為基礎的 KMDI 應用程式 -Category=C++/TDE -Icon=kscons_tdemdi.png -Comment=Generates a complex KMDI application. Scons scripts are provided for compiling and installing the application. -Comment[ca]=Genera una complexa aplicació per a KMDI. Els scripts en Scons són proveïts per a compilar i instal·lar l'aplicació. -Comment[da]=Genererer et komplekst TDE-program. Der sørges for scons-scripter til at kompilere og installere programmet. -Comment[de]=Erstellt eine aufwändige KMDI-Anwendung. Scons-Skripte zum Kompilieren und Installieren der Anwendung werden zur Verfügung gestellt. -Comment[el]=Δημιουργεί μια πολύπλοκη εφαρμογή KMDI. Προσφέρονται σενάρια Scons για τη μεταγλώττιση και εγκατάσταση της εφαρμογής. -Comment[es]=Genera una aplicación KMDI compleja. Se proporcionan guiones en Scons para compilar e instalar la aplicación. -Comment[et]=Keerulise KMDI rakenduse loomine. Luuakse ka Sconsi skriptid rakenduse kompileerimiseks ja paigaldamiseks. -Comment[eu]=KMDI aplikazio konplexu bat sortzen du. Aplikazioak konpilatu eta aplikazioa instalatzeko Scons script-ak sortzen ditu. -Comment[fa]=یک کاربرد پیچیدۀ KMDI تولید می‌کند. دست‌نوشته‌های Scons برای ترجمه و نصب کاربرد فراهم می‌شوند. -Comment[fr]=Génère une application KMDI évoluée. Des scripts Scons sont fournis pour compiler et installer l'application. -Comment[gl]=Xera unha aplicación complexa KMDI. Os scripts Scons proporciónanse para compilar e instalar a aplicación. -Comment[hu]=Létrehoz egy komplex KMDI alkalmazást. Az alkalmazás lefordításához és telepítéséhez Scons-szkriptek állnak rendelkezésre. -Comment[it]=Genera una applicazione KMDI complessa. Gli script scons sono forniti per compilare e istallare l'applicazione. -Comment[nds]=Stellt en vigeliensch KMDI-Programm op. Stellt Scons-Skripten för't Kompileren un Installeren vun't Programm praat. -Comment[ne]=जटिल KMDI अनुप्रयोग उत्पन्न गर्दछ । स्कोन स्क्रिप्टहरू अनुप्रयोग स्थापना र कम्पाइल गर्नका लागि प्रदान गरिन्छ । -Comment[nl]=Genereert een complexe KMDI-applicatie. Scons-scripts worden gebruikt voor compilatie en installatie. -Comment[pl]=Generuje złożony program z powłoką KMDI. Do kompilacji i instalacji wykorzystywany jest skrypt Scons. -Comment[pt]=Gera uma aplicação complexa com KMDI. Os ficheiros do Scons são fornecidos para compilar e instalar a aplicação. -Comment[pt_BR]=Gera uma aplicação complexa com KMDI. Os ficheiros do Scons são fornecidos para compilar e instalar a aplicação. -Comment[ru]=Создание полноценного многооконного приложения TDE. Для сборки и установки этого приложения будут использованы скрипты Scons. -Comment[sk]=Vygeneruje komplexnú KMDI aplikáciu. K dispozícii je Scons skriptna kompiláciu a inštaláciu aplikácie. -Comment[sr]=Прави сложени KMDI програм. Дате су Scons скрипте за превођење и инсталирање програма. -Comment[sr@Latn]=Pravi složeni KMDI program. Date su Scons skripte za prevođenje i instaliranje programa. -Comment[sv]=Skapar ett komplext KMDI-program. Scons-skript tillhandahålls för att kompilera och installera programmet. -Comment[tr]=Karmaşık bir KMDI uygulaması yaratır. Uygulamayı derlemek ve kurmak için scons betikleri sağlanmıştır. -Comment[zh_CN]=生成一个复杂的 KMDI 应用程序。此时会提供 Scons 脚本以供编译并安装应用程序。 -Comment[zh_TW]=產生一個複雜的 KMDI 應用程式。Scons 文稿是用於編譯與安裝應用程式。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/QUICKSTART -Archive=kscons_tdemdi.tar.gz - -[SCONS] -Type=include -File=%{tdevelop}/template-common/scons.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{src}/SConscript-doc -Dest=%{dest}/doc/SConscript - -[FILE2] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE3] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE4] -Type=install -Source=%{src}/SConstruct -Dest=%{dest}/SConstruct - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE10] -Type=install -Source=%{src}/SConscript-src -Dest=%{dest}/src/SConscript - -[FILE11] -Type=install -Source=%{src}/apptdemdi.cpp -Dest=%{dest}/src/%{APPNAMELC}tdemdi.cpp - -[FILE12] -Type=install -Source=%{src}/apptdemdi.h -Dest=%{dest}/src/%{APPNAMELC}tdemdi.h - -[FILE13] -Type=install -EscapeXML=true -Source=%{src}/prefs.ui -Dest=%{dest}/src/prefs.ui - -[FILE14] -Type=install -Source=%{src}/apptdemdiView.cpp -Dest=%{dest}/src/%{APPNAMELC}tdemdiView.cpp - -[FILE15] -Type=install -Source=%{src}/apptdemdiView.h -Dest=%{dest}/src/%{APPNAMELC}tdemdiView.h - -[FILE19] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE20] -Type=install -EscapeXML=true -Source=%{src}/app_shell.rc -Dest=%{dest}/src/%{APPNAMELC}_shell.rc - -[FILE21] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[FILE22] -Type=install -Source=%{src}/app.kcfg -Dest=%{dest}/src/%{APPNAMELC}.kcfg - -[FILE23] -Type=install -Source=%{src}/settings.kcfgc -Dest=%{dest}/src/settings.kcfgc - -[FILE25] -Type=install -Source=%{src}/tips -Dest=%{dest}/src/tips - -[FILE27] -Type=install -Source=%{src}/VERSION -Dest=%{dest}/VERSION - -[FILE28] -Type=install -Source=%{src}/INSTALL -Dest=%{dest}/INSTALL - -[FILE29] -Type=install -Source=%{src}/QUICKSTART -Dest=%{dest}/QUICKSTART - -[FILE30] -Type=install -Source=%{src}/messages.sh -Dest=%{dest}/po/messages.sh - -[FILE31] -Type=install -Source=%{src}/tdemdikonsole.cpp -Dest=%{dest}/src/tdemdikonsole.cpp - -[FILE32] -Type=install -Source=%{src}/tdemdikonsole.h -Dest=%{dest}/src/tdemdikonsole.h - -[FILE34] -Type=install -Source=%{src}/app_part.cpp -Dest=%{dest}/src/%{APPNAMELC}_part.cpp - -[FILE35] -Type=install -Source=%{src}/app_part.h -Dest=%{dest}/src/%{APPNAMELC}_part.h - -[FILE36] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE37] -Type=install -Source=%{tdevelop}/template-common/tde-part.desktop -Dest=%{dest}/src/%{APPNAMELC}_part.desktop - -[FILE38] -Type=install -Source=%{src}/app_part.rc -Dest=%{dest}/src/%{APPNAMELC}_part.rc - -[MSG] -Type=message -Comment=A TDE application with scons scripts was created in %{dest} -Comment[ca]=Una aplicació per al TDE amb scripts en Scons ha estat creada e n %{dest} -Comment[da]=Et TDE program med scons-scripter blev oprette i %{dest} -Comment[de]=Eine TDE-Anwendung mit Scons-Skripten wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή TDE με σενάρια scons δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación para TDE con guiones de Scons ha sido creada en %{dest} -Comment[et]=TDE rakendus Sconsi skriptidega loodi asukohta %{dest} -Comment[eu]=Scons script-dun TDE aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد TDE با دست‌نوشته‌های scons در %{dest} ایجاد شد -Comment[fr]=Une application TDE comprenant des scripts Scons a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár TDE le scripteanna scons i %{dest} -Comment[gl]=Creouse unha aplicación TDE con scripts scons en %{dest} -Comment[hu]=Létrejött egy Scons-szkripteket használó TDE-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDE con gli script scons in %{dest} -Comment[ja]=Scons スクリプトを使った TDE アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDE-Programm mit scons-Skripten opstellt -Comment[ne]=स्कोन स्क्रिप्टसँग केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDE applicatie inclusief Scons-scripts is aangemaakt in %{dest} -Comment[pl]=Program TDE ze skryptami scons utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} -Comment[ru]=Приложение TDE со скриптами Scons создано в %{dest} -Comment[sk]=TDE aplikácia so scons skriptom bola vytvorená v %{dest} -Comment[sr]=TDE програм са scons скриптама направљен је у %{dest} -Comment[sr@Latn]=TDE program sa scons skriptama napravljen je u %{dest} -Comment[sv]=Ett TDE-program med Scons-skript skapades i %{dest} -Comment[tr]=Scons betikleri olan bir TDE uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了带 scons 脚本的 TDE 应用程序 -Comment[zh_TW]=一個內含 scons 文稿的 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kxt/CMakeLists.txt b/languages/cpp/app_templates/kxt/CMakeLists.txt index c7de3e19..4b203750 100644 --- a/languages/cpp/app_templates/kxt/CMakeLists.txt +++ b/languages/cpp/app_templates/kxt/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( kxt.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kxt.tar.gz kxt.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kxt.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kxt.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kxt/Makefile.am b/languages/cpp/app_templates/kxt/Makefile.am index 96333456..8321742a 100644 --- a/languages/cpp/app_templates/kxt/Makefile.am +++ b/languages/cpp/app_templates/kxt/Makefile.am @@ -5,10 +5,10 @@ dataFiles = src-Makefile.am app.cpp app.h main.cpp appui.rc app.tdevelop \ templateName= kxt ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kxt/app.tdevelop b/languages/cpp/app_templates/kxt/app.tdevelop index b32b6656..317a4cbc 100644 --- a/languages/cpp/app_templates/kxt/app.tdevelop +++ b/languages/cpp/app_templates/kxt/app.tdevelop @@ -17,16 +17,16 @@ - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -62,8 +62,8 @@ -O0 -g3 - - + + @@ -75,8 +75,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -111,8 +111,8 @@ qmake User Guide - - + + libtool @@ -126,16 +126,16 @@ false true - - + + - - + + -f -dP @@ -144,7 +144,7 @@ -u3 -p - + @@ -156,14 +156,14 @@ true - + true 2 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kxt/kxt.kdevtemplate b/languages/cpp/app_templates/kxt/kxt.kdevtemplate new file mode 100644 index 00000000..79789759 --- /dev/null +++ b/languages/cpp/app_templates/kxt/kxt.kdevtemplate @@ -0,0 +1,269 @@ +# TDE Config File +[General] +Name=TDEConfig XT application +Name[ca]=Aplicació TDEConfig XT +Name[da]=TDEConfig XT program +Name[de]=TDEConfigXT-Anwendung +Name[el]=Εφαρμογή TDEConfig XT +Name[es]=Aplicación TDEConfig XT +Name[et]=TDEConfig XT rakendus +Name[eu]=TDEConfig XT aplikazioa +Name[fa]=کاربرد TDEConfig XT +Name[fr]=Application TDEConfig XT +Name[ga]=Feidhmchlár XT TDEConfig +Name[gl]=Aplicación TDEConfig XT +Name[hu]=TDEConfig XT-alapú alkalmazás +Name[it]=Applicazione TDEConfig XT +Name[ja]=TDEConfig XT アプリケーション +Name[nds]=TDEConfig-XT-Programm +Name[ne]=TDEConfig XT अनुप्रयोग +Name[nl]=TDEConfig XT-toepassing +Name[pl]=Program TDEConfig XT +Name[pt]=Aplicação do TDEConfig XT +Name[pt_BR]=Aplicação do TDEConfig XT +Name[ru]=Приложение TDE с TDEConfig XT +Name[sk]=TDEConfig XT aplikácia +Name[sr]=TDEConfig XT програм +Name[sr@Latn]=TDEConfig XT program +Name[sv]=TDEConfig XT-program +Name[tr]=TDEConfig XT uygulaması +Name[zh_CN]=TDEConfig XT 应用程序 +Name[zh_TW]=TDEConfig XT 應用程式 +Category=C++/TDE +Icon=kxt.png +Comment=Generates a simple TDE application with one widget and a configuration dialog +Comment[ca]=Genera una simple aplicació per al TDE amb un estri i un diàleg de configuració +Comment[da]=Genererer et simpelt TDE-program med en kontrol og en indstillingsdialog +Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Widget und einem Einstellungsdialog. +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης +Comment[en_GB]=Generates a simple TDE application with one widget and a configuration dialogue +Comment[es]=Genera una sencilla aplicación para TDE con una ventana y un diálogo de configuración +Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina ja seadistustedialoogiga. +Comment[eu]=Trepeta bat eta konfigurazio elkarrizketa-koadro bat duen TDE aplikazio sinple bat sortzen du +Comment[fa]=یک کاربرد سادۀ TDE، با یک عنصر و یک محاورۀ پیکربندی تولید می‌کند +Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget) et une boîte de dialogue de configuration +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin agus dialóg chumraíochta +Comment[gl]=Xera unha aplicación TDE sinxela cunha compoñente e un diálogo de configuración +Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal +Comment[it]=Genera una semplice applicazione TDE con un elemento grafico e una finestra di configurazione +Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な TDE アプリケーションを作成します +Comment[nds]=Stellt en eenfach TDE-Programm mit een Element un en Instelldialoog op +Comment[ne]=एउटा विगेट र कन्फिगरेसन संवादसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget en een configuratiedialoog +Comment[pl]=Generuje prosty program TDE z jednym widgetem i oknem konfiguracyjnym +Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração +Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração +Comment[ru]=Создание приложения TDE с окном конфигурации +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom a konfiguračným dialógom +Comment[sr]=Прави једноставан TDE програм са једном контролом и дијалогом за подешавање +Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom i dijalogom za podešavanje +Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent och en inställningsdialogruta +Comment[tr]=Bir parçacığı ve ayar penceresi olan basit bir TDE uygulaması yaratır. +Comment[zh_CN]=生成带一个部件和一个配置对话框的简单 TDE 应用程序 +Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件與一個設定對話框。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=kxt.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE17] +Type=install +EscapeXML=true +Source=%{src}/appview_base.ui +Dest=%{dest}/src/%{APPNAMELC}view_base.ui + +[FILE18] +Type=install +Source=%{src}/appview.cpp +Dest=%{dest}/src/%{APPNAMELC}view.cpp + +[FILE19] +Type=install +Source=%{src}/appview.h +Dest=%{dest}/src/%{APPNAMELC}view.h + +[FILE20] +Type=install +EscapeXML=true +Source=%{src}/prefs-base.ui +Dest=%{dest}/src/prefs-base.ui + +[FILE21] +Type=install +Source=%{src}/prefs.cpp +Dest=%{dest}/src/prefs.cpp + +[FILE22] +Type=install +Source=%{src}/prefs.h +Dest=%{dest}/src/prefs.h + +[FILE23] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE24] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE25] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[FILE26] +Type=install +Source=%{src}/app.kcfg +Dest=%{dest}/src/%{APPNAMELC}.kcfg + +[FILE27] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/src/settings.kcfgc + +[FILE28] +Type=install +Source=%{src}/src-configure.in.in +Dest=%{dest}/configure.in.in + +[MSG] +Type=message +Comment=A TDEConfig XT application was created in %{dest} +Comment[ca]=Una aplicació TDEConfig XT ha estat creada en %{dest} +Comment[da]=Et TDEConfig XT-program blev oprettet i %{dest} +Comment[de]=Eine TDEConfig-XT-Anwendung wurde in %{dest} erstellt +Comment[el]=Μια εφαρμογή TDEConfig XT δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación TDEConfig XT ha sido creada en %{dest} +Comment[et]=A TDEConfig XT rakendus loodi asukohta %{dest} +Comment[eu]=TDEConfig XT aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد TDEConfig XT در %{dest} ایجاد شد +Comment[fr]=Une application TDEConfig XT a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár XT TDEConfig i %{dest} +Comment[gl]=Creouse unha aplicación TDEConfig XT en %{dest} +Comment[hu]=Létrejött egy TDEConfig XT-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDEConfig XT in %{dest} +Comment[ja]=TDEConfig XT アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDEConfig-XT-Programm opstellt +Comment[ne]=TDEConfig XT अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDEConfig XT-toepassing is aangemaakt in %{dest} +Comment[pl]=Program TDEConfig XT został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDEConfig XT em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDEConfig XT em %{dest} +Comment[ru]=Приложение TDE с TDEConfig XT создано в %{dest} +Comment[sk]=TDEConfig XT aplikácia bola vytvorená v %{dest} +Comment[sr]=TDEConfig XT програм је направљен у %{dest} +Comment[sr@Latn]=TDEConfig XT program je napravljen u %{dest} +Comment[sv]=Ett TDEConfig XT-program skapades i %{dest} +Comment[tr]=Bir TDEConfig XT uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 TDEConfig XT 应用程序 +Comment[zh_TW]=一個 TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kxt/kxt.tdevtemplate b/languages/cpp/app_templates/kxt/kxt.tdevtemplate deleted file mode 100644 index 7b6583f1..00000000 --- a/languages/cpp/app_templates/kxt/kxt.tdevtemplate +++ /dev/null @@ -1,269 +0,0 @@ -# TDE Config File -[General] -Name=TDEConfig XT application -Name[ca]=Aplicació TDEConfig XT -Name[da]=TDEConfig XT program -Name[de]=TDEConfigXT-Anwendung -Name[el]=Εφαρμογή TDEConfig XT -Name[es]=Aplicación TDEConfig XT -Name[et]=TDEConfig XT rakendus -Name[eu]=TDEConfig XT aplikazioa -Name[fa]=کاربرد TDEConfig XT -Name[fr]=Application TDEConfig XT -Name[ga]=Feidhmchlár XT TDEConfig -Name[gl]=Aplicación TDEConfig XT -Name[hu]=TDEConfig XT-alapú alkalmazás -Name[it]=Applicazione TDEConfig XT -Name[ja]=TDEConfig XT アプリケーション -Name[nds]=TDEConfig-XT-Programm -Name[ne]=TDEConfig XT अनुप्रयोग -Name[nl]=TDEConfig XT-toepassing -Name[pl]=Program TDEConfig XT -Name[pt]=Aplicação do TDEConfig XT -Name[pt_BR]=Aplicação do TDEConfig XT -Name[ru]=Приложение TDE с TDEConfig XT -Name[sk]=TDEConfig XT aplikácia -Name[sr]=TDEConfig XT програм -Name[sr@Latn]=TDEConfig XT program -Name[sv]=TDEConfig XT-program -Name[tr]=TDEConfig XT uygulaması -Name[zh_CN]=TDEConfig XT 应用程序 -Name[zh_TW]=TDEConfig XT 應用程式 -Category=C++/TDE -Icon=kxt.png -Comment=Generates a simple TDE application with one widget and a configuration dialog -Comment[ca]=Genera una simple aplicació per al TDE amb un estri i un diàleg de configuració -Comment[da]=Genererer et simpelt TDE-program med en kontrol og en indstillingsdialog -Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Widget und einem Einstellungsdialog. -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης -Comment[en_GB]=Generates a simple TDE application with one widget and a configuration dialogue -Comment[es]=Genera una sencilla aplicación para TDE con una ventana y un diálogo de configuración -Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina ja seadistustedialoogiga. -Comment[eu]=Trepeta bat eta konfigurazio elkarrizketa-koadro bat duen TDE aplikazio sinple bat sortzen du -Comment[fa]=یک کاربرد سادۀ TDE، با یک عنصر و یک محاورۀ پیکربندی تولید می‌کند -Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget) et une boîte de dialogue de configuration -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin agus dialóg chumraíochta -Comment[gl]=Xera unha aplicación TDE sinxela cunha compoñente e un diálogo de configuración -Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal -Comment[it]=Genera una semplice applicazione TDE con un elemento grafico e una finestra di configurazione -Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な TDE アプリケーションを作成します -Comment[nds]=Stellt en eenfach TDE-Programm mit een Element un en Instelldialoog op -Comment[ne]=एउटा विगेट र कन्फिगरेसन संवादसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget en een configuratiedialoog -Comment[pl]=Generuje prosty program TDE z jednym widgetem i oknem konfiguracyjnym -Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração -Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração -Comment[ru]=Создание приложения TDE с окном конфигурации -Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom a konfiguračným dialógom -Comment[sr]=Прави једноставан TDE програм са једном контролом и дијалогом за подешавање -Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom i dijalogom za podešavanje -Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent och en inställningsdialogruta -Comment[tr]=Bir parçacığı ve ayar penceresi olan basit bir TDE uygulaması yaratır. -Comment[zh_CN]=生成带一个部件和一个配置对话框的简单 TDE 应用程序 -Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件與一個設定對話框。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=kxt.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE17] -Type=install -EscapeXML=true -Source=%{src}/appview_base.ui -Dest=%{dest}/src/%{APPNAMELC}view_base.ui - -[FILE18] -Type=install -Source=%{src}/appview.cpp -Dest=%{dest}/src/%{APPNAMELC}view.cpp - -[FILE19] -Type=install -Source=%{src}/appview.h -Dest=%{dest}/src/%{APPNAMELC}view.h - -[FILE20] -Type=install -EscapeXML=true -Source=%{src}/prefs-base.ui -Dest=%{dest}/src/prefs-base.ui - -[FILE21] -Type=install -Source=%{src}/prefs.cpp -Dest=%{dest}/src/prefs.cpp - -[FILE22] -Type=install -Source=%{src}/prefs.h -Dest=%{dest}/src/prefs.h - -[FILE23] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE24] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE25] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[FILE26] -Type=install -Source=%{src}/app.kcfg -Dest=%{dest}/src/%{APPNAMELC}.kcfg - -[FILE27] -Type=install -Source=%{src}/settings.kcfgc -Dest=%{dest}/src/settings.kcfgc - -[FILE28] -Type=install -Source=%{src}/src-configure.in.in -Dest=%{dest}/configure.in.in - -[MSG] -Type=message -Comment=A TDEConfig XT application was created in %{dest} -Comment[ca]=Una aplicació TDEConfig XT ha estat creada en %{dest} -Comment[da]=Et TDEConfig XT-program blev oprettet i %{dest} -Comment[de]=Eine TDEConfig-XT-Anwendung wurde in %{dest} erstellt -Comment[el]=Μια εφαρμογή TDEConfig XT δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación TDEConfig XT ha sido creada en %{dest} -Comment[et]=A TDEConfig XT rakendus loodi asukohta %{dest} -Comment[eu]=TDEConfig XT aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد TDEConfig XT در %{dest} ایجاد شد -Comment[fr]=Une application TDEConfig XT a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár XT TDEConfig i %{dest} -Comment[gl]=Creouse unha aplicación TDEConfig XT en %{dest} -Comment[hu]=Létrejött egy TDEConfig XT-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDEConfig XT in %{dest} -Comment[ja]=TDEConfig XT アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDEConfig-XT-Programm opstellt -Comment[ne]=TDEConfig XT अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDEConfig XT-toepassing is aangemaakt in %{dest} -Comment[pl]=Program TDEConfig XT został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do TDEConfig XT em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do TDEConfig XT em %{dest} -Comment[ru]=Приложение TDE с TDEConfig XT создано в %{dest} -Comment[sk]=TDEConfig XT aplikácia bola vytvorená v %{dest} -Comment[sr]=TDEConfig XT програм је направљен у %{dest} -Comment[sr@Latn]=TDEConfig XT program je napravljen u %{dest} -Comment[sv]=Ett TDEConfig XT-program skapades i %{dest} -Comment[tr]=Bir TDEConfig XT uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了 TDEConfig XT 应用程序 -Comment[zh_TW]=一個 TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/makefileempty/CMakeLists.txt b/languages/cpp/app_templates/makefileempty/CMakeLists.txt index 25f86b01..48a6e3dd 100644 --- a/languages/cpp/app_templates/makefileempty/CMakeLists.txt +++ b/languages/cpp/app_templates/makefileempty/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( makefileempty.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/makefileempty.tar.gz makefileempty.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - makefileempty.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + makefileempty.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/makefileempty/Makefile.am b/languages/cpp/app_templates/makefileempty/Makefile.am index 60035c3d..ec381a04 100644 --- a/languages/cpp/app_templates/makefileempty/Makefile.am +++ b/languages/cpp/app_templates/makefileempty/Makefile.am @@ -3,10 +3,10 @@ dataFiles = makefileempty-Makefile \ templateName = makefileempty ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/makefileempty/app.tdevelop b/languages/cpp/app_templates/makefileempty/app.tdevelop index e3b8de97..da576369 100644 --- a/languages/cpp/app_templates/makefileempty/app.tdevelop +++ b/languages/cpp/app_templates/makefileempty/app.tdevelop @@ -4,14 +4,14 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C++ C++ Code - + @@ -33,8 +33,8 @@ -O0 -g3 - - + + ada ada_bugs_gcc @@ -79,23 +79,23 @@ TDE Libraries (Doxygen) - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/makefileempty/makefileempty.kdevtemplate b/languages/cpp/app_templates/makefileempty/makefileempty.kdevtemplate new file mode 100644 index 00000000..b69317d7 --- /dev/null +++ b/languages/cpp/app_templates/makefileempty/makefileempty.kdevtemplate @@ -0,0 +1,85 @@ +# TDE Config File +[General] +Name=Empty Custom Makefile Template +Name[ca]=Plantilla Makefile personalitzada buida +Name[da]=Tom brugertilpasset Makefile-skabelon +Name[de]=Leere Vorlage für benutzerdefiniertes Makefile +Name[el]=Κενό προσαρμοσμένο πρότυπο Makefile +Name[es]=Plantilla vacía para Makefile personalizado +Name[et]=Tühi kohandatud makefile'i mall +Name[hu]=Üres egyedi Makefile-ra épülő sablon +Name[it]=Modello di makefile personalizzato vuoto +Name[nds]=Egen leddig Makefile-Vörlaag +Name[nl]=Leeg aangepast Makefile-sjabloon +Name[pl]=Pusty własny szablon pliku Makefile +Name[pt]=Modelo de Makefile Personalizada Vazio +Name[pt_BR]=Modelo de Makefile Personalizada Vazio +Name[ru]=Пустой шаблон с пользовательским Makefile +Name[sk]=Prázdna šablóna pre vlastný Makefile +Name[sr]=Празан шаблон посебног справифајла +Name[sr@Latn]=Prazan šablon posebnog spravifajla +Name[sv]=Tom mall för egen byggfil +Name[zh_TW]=空的自訂 Makefile 樣板 +Icon=makefileempty.png +Category=C++ +Comment=Generate an empty Custom Makefile based application +Comment[ca]=Genera una aplicació personalitzada buida basada en Makefile +Comment[da]=Opretter et tomt brugertilpasset Makefile-baseret program +Comment[de]=Erstellt eine auf einem benutzerdefinierten Makefile basierende Anwendung +Comment[el]=Δημιουργία μίας κενής εφαρμογής βασισμένης σε προσαρμοσμένο Makefile +Comment[es]=Genera una aplicación vacía basada en un Makefile personalizado +Comment[et]=Tühja rakenduse loomine kohandatud makefile'i põhjal +Comment[hu]=Létrehoz egy egyedi Makefile-ra épülő alkalmazást +Comment[it]=Genera un'applicazione basata su makefile personalizzato +Comment[nds]=Stellt en leddig Programm op, dat op en egen Makefile opbuut +Comment[nl]=Genereer een leeg op een aangepast Makefile gebaseerd programma +Comment[pl]=Generuje pusty program z własnym plikiem Makefile +Comment[pt]=Gera uma aplicação baseada em Makefile's personalizadas +Comment[pt_BR]=Gera uma aplicação baseada em Makefile's personalizadas +Comment[ru]=Создание каркаса приложения, использующего пользовательский Makefile +Comment[sk]=Vygeneruje prázdnu aplikáciu založenú na vlastnom Makefile +Comment[sr]=Прави програм на основу посебног справифајла +Comment[sr@Latn]=Pravi program na osnovu posebnog spravifajla +Comment[sv]=Skapar ett tomt program baserat på en egen byggfil +Comment[zh_TW]=產生一個空的使用自訂 Makefile 的應用程式 +FileTemplates=h,CStyle,cpp,CStyle +Archive=makefileempty.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE2] +Type=install +Source=%{src}/makefileempty-Makefile +Dest=%{dest}/Makefile + +[MSG] +Type=message +Comment=A Custom Makefile based application was created in %{dest} +Comment[ca]=S'ha creat una aplicació basada en Makefile en %{dest} +Comment[da]=Et brugertilpasset Makefile-baseret program blev oprettet i %{dest} +Comment[de]=Eine auf einem benutzerdefinierten Makefile basierende Anwendung wurde in %{dest} erstellt. +Comment[el]=Δημιουργήθηκε μία εφαρμογή βασισμένη σε προσαρμοσμένο Makefile στο %{dest} +Comment[es]=Una aplicación basada en un Makefile personalizado ha sido creada en %{dest} +Comment[et]=Rakendus kohandatud makefile'i põhjal loodi asukohta %{dest} +Comment[hu]=Létrejött egy egyedi Makefile-ra épülő alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione basata su un makefile personalizzato in %{dest} +Comment[nds]=In %{dest} wöör en Programm opstellt, dat op en egen Makefile opbuut +Comment[nl]=Een op een aangepast Makefile gebaseerd programma is aangemaakt in %{dest} +Comment[pl]=Program używający własnego Makefile został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação baseada em Makefile's personalizadas em %{dest} +Comment[pt_BR]=Foi criada uma aplicação baseada em Makefile's personalizadas em %{dest} +Comment[ru]=Приложение с пользовательским Makefile создано в %{dest} +Comment[sk]=Aplikácia založená na vlastnom Makefile bola vytvorená v %{dest} +Comment[sr]=Програм на основу посебног справифајла направљен је у %{dest} +Comment[sr@Latn]=Program na osnovu posebnog spravifajla napravljen je u %{dest} +Comment[sv]=Ett program baserat på en egen byggfil skapades i %{dest} +Comment[zh_TW]=一個以自訂 Makefile 為基礎的應用程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/makefileempty/makefileempty.tdevtemplate b/languages/cpp/app_templates/makefileempty/makefileempty.tdevtemplate deleted file mode 100644 index 97c3f238..00000000 --- a/languages/cpp/app_templates/makefileempty/makefileempty.tdevtemplate +++ /dev/null @@ -1,85 +0,0 @@ -# TDE Config File -[General] -Name=Empty Custom Makefile Template -Name[ca]=Plantilla Makefile personalitzada buida -Name[da]=Tom brugertilpasset Makefile-skabelon -Name[de]=Leere Vorlage für benutzerdefiniertes Makefile -Name[el]=Κενό προσαρμοσμένο πρότυπο Makefile -Name[es]=Plantilla vacía para Makefile personalizado -Name[et]=Tühi kohandatud makefile'i mall -Name[hu]=Üres egyedi Makefile-ra épülő sablon -Name[it]=Modello di makefile personalizzato vuoto -Name[nds]=Egen leddig Makefile-Vörlaag -Name[nl]=Leeg aangepast Makefile-sjabloon -Name[pl]=Pusty własny szablon pliku Makefile -Name[pt]=Modelo de Makefile Personalizada Vazio -Name[pt_BR]=Modelo de Makefile Personalizada Vazio -Name[ru]=Пустой шаблон с пользовательским Makefile -Name[sk]=Prázdna šablóna pre vlastný Makefile -Name[sr]=Празан шаблон посебног справифајла -Name[sr@Latn]=Prazan šablon posebnog spravifajla -Name[sv]=Tom mall för egen byggfil -Name[zh_TW]=空的自訂 Makefile 樣板 -Icon=makefileempty.png -Category=C++ -Comment=Generate an empty Custom Makefile based application -Comment[ca]=Genera una aplicació personalitzada buida basada en Makefile -Comment[da]=Opretter et tomt brugertilpasset Makefile-baseret program -Comment[de]=Erstellt eine auf einem benutzerdefinierten Makefile basierende Anwendung -Comment[el]=Δημιουργία μίας κενής εφαρμογής βασισμένης σε προσαρμοσμένο Makefile -Comment[es]=Genera una aplicación vacía basada en un Makefile personalizado -Comment[et]=Tühja rakenduse loomine kohandatud makefile'i põhjal -Comment[hu]=Létrehoz egy egyedi Makefile-ra épülő alkalmazást -Comment[it]=Genera un'applicazione basata su makefile personalizzato -Comment[nds]=Stellt en leddig Programm op, dat op en egen Makefile opbuut -Comment[nl]=Genereer een leeg op een aangepast Makefile gebaseerd programma -Comment[pl]=Generuje pusty program z własnym plikiem Makefile -Comment[pt]=Gera uma aplicação baseada em Makefile's personalizadas -Comment[pt_BR]=Gera uma aplicação baseada em Makefile's personalizadas -Comment[ru]=Создание каркаса приложения, использующего пользовательский Makefile -Comment[sk]=Vygeneruje prázdnu aplikáciu založenú na vlastnom Makefile -Comment[sr]=Прави програм на основу посебног справифајла -Comment[sr@Latn]=Pravi program na osnovu posebnog spravifajla -Comment[sv]=Skapar ett tomt program baserat på en egen byggfil -Comment[zh_TW]=產生一個空的使用自訂 Makefile 的應用程式 -FileTemplates=h,CStyle,cpp,CStyle -Archive=makefileempty.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE2] -Type=install -Source=%{src}/makefileempty-Makefile -Dest=%{dest}/Makefile - -[MSG] -Type=message -Comment=A Custom Makefile based application was created in %{dest} -Comment[ca]=S'ha creat una aplicació basada en Makefile en %{dest} -Comment[da]=Et brugertilpasset Makefile-baseret program blev oprettet i %{dest} -Comment[de]=Eine auf einem benutzerdefinierten Makefile basierende Anwendung wurde in %{dest} erstellt. -Comment[el]=Δημιουργήθηκε μία εφαρμογή βασισμένη σε προσαρμοσμένο Makefile στο %{dest} -Comment[es]=Una aplicación basada en un Makefile personalizado ha sido creada en %{dest} -Comment[et]=Rakendus kohandatud makefile'i põhjal loodi asukohta %{dest} -Comment[hu]=Létrejött egy egyedi Makefile-ra épülő alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione basata su un makefile personalizzato in %{dest} -Comment[nds]=In %{dest} wöör en Programm opstellt, dat op en egen Makefile opbuut -Comment[nl]=Een op een aangepast Makefile gebaseerd programma is aangemaakt in %{dest} -Comment[pl]=Program używający własnego Makefile został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação baseada em Makefile's personalizadas em %{dest} -Comment[pt_BR]=Foi criada uma aplicação baseada em Makefile's personalizadas em %{dest} -Comment[ru]=Приложение с пользовательским Makefile создано в %{dest} -Comment[sk]=Aplikácia založená na vlastnom Makefile bola vytvorená v %{dest} -Comment[sr]=Програм на основу посебног справифајла направљен је у %{dest} -Comment[sr@Latn]=Program na osnovu posebnog spravifajla napravljen je u %{dest} -Comment[sv]=Ett program baserat på en egen byggfil skapades i %{dest} -Comment[zh_TW]=一個以自訂 Makefile 為基礎的應用程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/noatunui/CMakeLists.txt b/languages/cpp/app_templates/noatunui/CMakeLists.txt index 698684c1..332a960a 100644 --- a/languages/cpp/app_templates/noatunui/CMakeLists.txt +++ b/languages/cpp/app_templates/noatunui/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( noatunui.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/noatunui.tar.gz noatunui.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - noatunui.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + noatunui.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/noatunui/Makefile.am b/languages/cpp/app_templates/noatunui/Makefile.am index d72a928d..a222f235 100644 --- a/languages/cpp/app_templates/noatunui/Makefile.am +++ b/languages/cpp/app_templates/noatunui/Makefile.am @@ -3,10 +3,10 @@ dataFiles = src-Makefile.am plugin_app.cpp plugin_impl.cpp plugin_impl.h \ templateName = noatunui ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/noatunui/noatunui.kdevtemplate b/languages/cpp/app_templates/noatunui/noatunui.kdevtemplate new file mode 100644 index 00000000..a91349c3 --- /dev/null +++ b/languages/cpp/app_templates/noatunui/noatunui.kdevtemplate @@ -0,0 +1,195 @@ +# TDE Config File +[General] +Name=Noatun UI plugin +Name[ca]=Connector d'interfície d'usuari per a Noatun +Name[de]=Noatun-UI-Modul +Name[el]=Πρόσθετο Noatun UI +Name[es]=Complemento de interfaz de usuario para Noatun +Name[et]=Noatuni kasutajaliidese plugin +Name[eu]=Noatun UI plugina +Name[fa]=وصلۀ Noatun UI +Name[fr]=Module externe d'interface utilisateur pour Noatun +Name[ga]=Breiseán Chomhéadan Noatun +Name[gl]=Extensión para a IU de Noatun +Name[hu]=Noatun UI-modul +Name[it]=Plugin UI di noatun +Name[ja]=Noatun UI プラグイン +Name[nds]=Böversiet-Moduul för Noatun +Name[ne]=नोअटन UI plugin +Name[nl]=Noatun UI-plugin +Name[pl]=Wtyczka do interfejsu użytkownika Noatun +Name[pt]='Plugin' de UI do Noatun +Name[pt_BR]='Plugin' de UI do Noatun +Name[ru]=Модуль интерфейса Noatun +Name[sk]=Noatun UI modul +Name[sr]=UI прикључак за Noatun +Name[sr@Latn]=UI priključak za Noatun +Name[sv]=Noatun-insticksprogram för användargränssnitt +Name[tr]=Noatun Arayüz eklentisi +Name[zh_CN]=Noatun 界面插件 +Name[zh_TW]=Noatun 使用者介面外掛程式 +Icon=noatunui.png +Category=C++/TDE +Comment=Generates a simple user interface plugin for noatun. +Comment[ca]=Genera un simple connector d'interfície d'usuari per a Noatun. +Comment[da]=Genererer en simpel brugergrænseflade-plugin for noatun. +Comment[de]=Erstellt ein einfaches Oberflächen-Modul für Noatun +Comment[el]=Δημιουργεί ένα απλό πρόσθετο γραφικού περιβάλλοντος για το noatun. +Comment[es]=Genera un complemento de interfaz de usuario para Noatun. +Comment[et]=Noatuni lihtsa kasutajaliidese plugina loomine. +Comment[eu]=Noatun-entzat erabiltzaile-interfazerako plugin sinple bat sortzen du. +Comment[fa]=یک وصلۀ واسط کاربر ساده برای noatun تولید می‌کند. +Comment[fr]=Génère un module externe d'interface utilisateur simple pour Noatun. +Comment[gl]=Xera unha extensión sinxela para a interface de usuario de noatun. +Comment[hu]=Létrehoz egy egyszerű felületbővítő modult a Noatun programhoz. +Comment[it]=Genera un semplice plugin di interfaccia per noatun. +Comment[nds]=Stellt en eenfach Böversietmoduul för Noatun op. +Comment[ne]=नोअटनका लागि साधारण इन्टरफेस प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Genereert een eenvoudige gebruikersinterfaceplugin voor Noatun. +Comment[pl]=Generuje prostą wtyczkę do interfejsu użytkownika programu Noatun. +Comment[pt]=Gera um 'plugin' simples para a interface de utilizador do Noatun. +Comment[pt_BR]=Gera um 'plugin' simples para a interface de utilizador do Noatun. +Comment[ru]=Создание простого интерфейса для Noatun. +Comment[sk]=Vygeneruje jednoduchý modul užívateľského rozhrania pre Noatun +Comment[sr]=Прави једноставан прикључак корисничког интерфејса за Noatun. +Comment[sr@Latn]=Pravi jednostavan priključak korisničkog interfejsa za Noatun. +Comment[sv]=Skapar ett enkelt insticksprogram för användargränssnitt till Noatun. +Comment[tr]=Noatun için basit bir kullanıcı arayüzü eklentisi yaratır. +Comment[zh_CN]=生成 noatun 的简单用户界面插件。 +Comment[zh_TW]=產生一個簡單的 noatun 的使用者介面外掛程式。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp +Archive=noatunui.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/plugin_app.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/plugin_impl.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp + +[FILE14] +Type=install +Source=%{src}/plugin_impl.h +Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.h + +[FILE15] +Type=install +Source=%{src}/plugin.plugin +Dest=%{dest}/src/%{APPNAMELC}.plugin + +[MSG] +Type=message +Comment=A Noatun UI plugin was created in %{dest} +Comment[ca]=Un connector d'interfície d'usuari per a Noatun ha estat creat en %{dest} +Comment[da]=Et Noatun UI-plugin blev oprettet i %{dest} +Comment[de]=Ein Oberflächen-Modul für Noatun wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο Noatun UI δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento de interfaz de usuario para Noatun ha sido creado en %{dest} +Comment[et]=Noatuni kasutajaliidese plugin loodi asukohta %{dest} +Comment[eu]=Noatun UI plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ Noatun UI در %{dest} ایجاد شد +Comment[fr]=Un module externe d'interface utilisateur pour Noatun a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán chomhéadan Noatun i %{dest} +Comment[gl]=Creouse unha extensión para a IU de Noatun en %{dest} +Comment[hu]=Létrejött egy Noatun UI-modul itt: %{dest} +Comment[it]=È stato creato un plugin UI per noatun in %{dest} +Comment[ja]=Noatun UI プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Noatun-Böversietmoduul opstellt +Comment[ne]=नोअटन UI प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een Noatun UI-plugin is aangemaakt in %{dest} +Comment[pl]=Wtyczka do interfejsu Noatun została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' da UI do Noatun em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' da UI do Noatun em %{dest} +Comment[ru]=Модуль интерфейса для Noatun создан в %{dest} +Comment[sk]=Noatun UI modul bol vytvorený v %{dest} +Comment[sr]=UI прикључак за Noatun направљен је у %{dest} +Comment[sr@Latn]=UI priključak za Noatun napravljen je u %{dest} +Comment[sv]=Ett Noatun-insticksprogram för användargränssnitt skapades i %{dest} +Comment[tr]=Bir Noatun Arayüz eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 Noatun 界面插件 +Comment[zh_TW]=一個 Noatun 使用者介面外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/noatunui/noatunui.tdevtemplate b/languages/cpp/app_templates/noatunui/noatunui.tdevtemplate deleted file mode 100644 index 3324640f..00000000 --- a/languages/cpp/app_templates/noatunui/noatunui.tdevtemplate +++ /dev/null @@ -1,195 +0,0 @@ -# TDE Config File -[General] -Name=Noatun UI plugin -Name[ca]=Connector d'interfície d'usuari per a Noatun -Name[de]=Noatun-UI-Modul -Name[el]=Πρόσθετο Noatun UI -Name[es]=Complemento de interfaz de usuario para Noatun -Name[et]=Noatuni kasutajaliidese plugin -Name[eu]=Noatun UI plugina -Name[fa]=وصلۀ Noatun UI -Name[fr]=Module externe d'interface utilisateur pour Noatun -Name[ga]=Breiseán Chomhéadan Noatun -Name[gl]=Extensión para a IU de Noatun -Name[hu]=Noatun UI-modul -Name[it]=Plugin UI di noatun -Name[ja]=Noatun UI プラグイン -Name[nds]=Böversiet-Moduul för Noatun -Name[ne]=नोअटन UI plugin -Name[nl]=Noatun UI-plugin -Name[pl]=Wtyczka do interfejsu użytkownika Noatun -Name[pt]='Plugin' de UI do Noatun -Name[pt_BR]='Plugin' de UI do Noatun -Name[ru]=Модуль интерфейса Noatun -Name[sk]=Noatun UI modul -Name[sr]=UI прикључак за Noatun -Name[sr@Latn]=UI priključak za Noatun -Name[sv]=Noatun-insticksprogram för användargränssnitt -Name[tr]=Noatun Arayüz eklentisi -Name[zh_CN]=Noatun 界面插件 -Name[zh_TW]=Noatun 使用者介面外掛程式 -Icon=noatunui.png -Category=C++/TDE -Comment=Generates a simple user interface plugin for noatun. -Comment[ca]=Genera un simple connector d'interfície d'usuari per a Noatun. -Comment[da]=Genererer en simpel brugergrænseflade-plugin for noatun. -Comment[de]=Erstellt ein einfaches Oberflächen-Modul für Noatun -Comment[el]=Δημιουργεί ένα απλό πρόσθετο γραφικού περιβάλλοντος για το noatun. -Comment[es]=Genera un complemento de interfaz de usuario para Noatun. -Comment[et]=Noatuni lihtsa kasutajaliidese plugina loomine. -Comment[eu]=Noatun-entzat erabiltzaile-interfazerako plugin sinple bat sortzen du. -Comment[fa]=یک وصلۀ واسط کاربر ساده برای noatun تولید می‌کند. -Comment[fr]=Génère un module externe d'interface utilisateur simple pour Noatun. -Comment[gl]=Xera unha extensión sinxela para a interface de usuario de noatun. -Comment[hu]=Létrehoz egy egyszerű felületbővítő modult a Noatun programhoz. -Comment[it]=Genera un semplice plugin di interfaccia per noatun. -Comment[nds]=Stellt en eenfach Böversietmoduul för Noatun op. -Comment[ne]=नोअटनका लागि साधारण इन्टरफेस प्लगइन उत्पन्न गर्दछ । -Comment[nl]=Genereert een eenvoudige gebruikersinterfaceplugin voor Noatun. -Comment[pl]=Generuje prostą wtyczkę do interfejsu użytkownika programu Noatun. -Comment[pt]=Gera um 'plugin' simples para a interface de utilizador do Noatun. -Comment[pt_BR]=Gera um 'plugin' simples para a interface de utilizador do Noatun. -Comment[ru]=Создание простого интерфейса для Noatun. -Comment[sk]=Vygeneruje jednoduchý modul užívateľského rozhrania pre Noatun -Comment[sr]=Прави једноставан прикључак корисничког интерфејса за Noatun. -Comment[sr@Latn]=Pravi jednostavan priključak korisničkog interfejsa za Noatun. -Comment[sv]=Skapar ett enkelt insticksprogram för användargränssnitt till Noatun. -Comment[tr]=Noatun için basit bir kullanıcı arayüzü eklentisi yaratır. -Comment[zh_CN]=生成 noatun 的简单用户界面插件。 -Comment[zh_TW]=產生一個簡單的 noatun 的使用者介面外掛程式。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp -Archive=noatunui.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/plugin_app.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/plugin_impl.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp - -[FILE14] -Type=install -Source=%{src}/plugin_impl.h -Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.h - -[FILE15] -Type=install -Source=%{src}/plugin.plugin -Dest=%{dest}/src/%{APPNAMELC}.plugin - -[MSG] -Type=message -Comment=A Noatun UI plugin was created in %{dest} -Comment[ca]=Un connector d'interfície d'usuari per a Noatun ha estat creat en %{dest} -Comment[da]=Et Noatun UI-plugin blev oprettet i %{dest} -Comment[de]=Ein Oberflächen-Modul für Noatun wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο Noatun UI δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento de interfaz de usuario para Noatun ha sido creado en %{dest} -Comment[et]=Noatuni kasutajaliidese plugin loodi asukohta %{dest} -Comment[eu]=Noatun UI plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ Noatun UI در %{dest} ایجاد شد -Comment[fr]=Un module externe d'interface utilisateur pour Noatun a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán chomhéadan Noatun i %{dest} -Comment[gl]=Creouse unha extensión para a IU de Noatun en %{dest} -Comment[hu]=Létrejött egy Noatun UI-modul itt: %{dest} -Comment[it]=È stato creato un plugin UI per noatun in %{dest} -Comment[ja]=Noatun UI プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Noatun-Böversietmoduul opstellt -Comment[ne]=नोअटन UI प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een Noatun UI-plugin is aangemaakt in %{dest} -Comment[pl]=Wtyczka do interfejsu Noatun została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' da UI do Noatun em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' da UI do Noatun em %{dest} -Comment[ru]=Модуль интерфейса для Noatun создан в %{dest} -Comment[sk]=Noatun UI modul bol vytvorený v %{dest} -Comment[sr]=UI прикључак за Noatun направљен је у %{dest} -Comment[sr@Latn]=UI priključak za Noatun napravljen je u %{dest} -Comment[sv]=Ett Noatun-insticksprogram för användargränssnitt skapades i %{dest} -Comment[tr]=Bir Noatun Arayüz eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 Noatun 界面插件 -Comment[zh_TW]=一個 Noatun 使用者介面外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/noatunui/plugin.tdevelop b/languages/cpp/app_templates/noatunui/plugin.tdevelop index bc17550d..66986f2a 100644 --- a/languages/cpp/app_templates/noatunui/plugin.tdevelop +++ b/languages/cpp/app_templates/noatunui/plugin.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/noatun_%{APPNAMELC}plugin.la debug @@ -44,8 +44,8 @@ -O0 -g3 - - + + @@ -53,8 +53,8 @@ - - + + bash bash_bugs @@ -88,24 +88,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/noatunvisual/CMakeLists.txt b/languages/cpp/app_templates/noatunvisual/CMakeLists.txt index adac7be4..8b5668ec 100644 --- a/languages/cpp/app_templates/noatunvisual/CMakeLists.txt +++ b/languages/cpp/app_templates/noatunvisual/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( noatunvisual.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/noatunvisual.tar.gz noatunvisual.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - noatunvisual.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + noatunvisual.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/noatunvisual/Makefile.am b/languages/cpp/app_templates/noatunvisual/Makefile.am index e32b274e..d7466e24 100644 --- a/languages/cpp/app_templates/noatunvisual/Makefile.am +++ b/languages/cpp/app_templates/noatunvisual/Makefile.am @@ -4,10 +4,10 @@ dataFiles = src-Makefile.am plugin_app.cpp plugin_app.h plugin_impl.cpp \ templateName = noatunvisual ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/noatunvisual/noatunvisual.kdevtemplate b/languages/cpp/app_templates/noatunvisual/noatunvisual.kdevtemplate new file mode 100644 index 00000000..c747925c --- /dev/null +++ b/languages/cpp/app_templates/noatunvisual/noatunvisual.kdevtemplate @@ -0,0 +1,205 @@ +# TDE Config File +[General] +Name=Noatun visualization plugin +Name[ca]=Connector de visualització per a Noatun +Name[da]=Noatun visualiserings-plugin +Name[de]=Noatun-Visualisierungs-Modul +Name[el]=Οπτικό πρόσθετο Noatun +Name[en_GB]=Noatun visualisation plugin +Name[es]=Complemento de visualización para Noatun +Name[et]=Noatuni visualiseerimisplugin +Name[eu]=Noatun bistaratze-plugina +Name[fa]=وصلۀ تجسم Noatun +Name[fr]=Module externe de visualisation pour Noatun +Name[ga]=Breiseán amharcléirithe Noatun +Name[gl]=Extensión de visualización para Noatun +Name[hu]=Noatun vizualizációs modul +Name[it]=Plugin di visualizzazione per noatun +Name[ja]=Noatun ビジュアライゼーションプラグイン +Name[nds]=Noatun-Filmmakermoduul +Name[ne]=नोअटन भिजुलाइजेसन प्लगइन +Name[nl]=Noatun visualisatieplugin +Name[pl]=Wtyczka wizualizacji do Noatun +Name[pt]='Plugin' de visualização do Noatun +Name[pt_BR]='Plugin' de visualização do Noatun +Name[ru]=Модуль визуализации Noatun +Name[sk]=Noatun vizualizačný modul +Name[sr]=Визуелизациони прикључак за Noatun +Name[sr@Latn]=Vizuelizacioni priključak za Noatun +Name[sv]=Noatun-insticksprogram för visningar +Name[tr]=Noatun görsellik eklentisi +Name[zh_CN]=Noatun 可视化插件 +Name[zh_TW]=Noatun 視覺化外掛程式 +Icon=noatunvisual.png +Category=C++/TDE +Comment=Generates a visualization plugin for noatun using SDL +Comment[ca]=Genera un connector de visualització per a Noatun usant SDL +Comment[da]=Generere et visualiserings-plugin for noatun ved brug af SDL +Comment[de]=Erstellt ein Visualisierungs-Modul für Noatun unter Verwendung der SDL. +Comment[el]=Δημιουργεί ένα οπτικό πρόσθετο για το noatun χρησιμοποιώντας το SDL +Comment[en_GB]=Generates a visualisation plugin for noatun using SDL +Comment[es]=Genera un complemento de visualización para Noatun que usa SDL +Comment[et]=Noatuni visualiseerimisplugina loomine SDL-i abil +Comment[eu]=SDL erabiliz, bistaratze-plugin bat sortzen du noatun-entzat +Comment[fa]=یک وصلۀ تجسم برای noatun با استفاده از SDL تولید می‌کند +Comment[fr]=Génère un module externe de visualisation pour Noatun utilisant SDL +Comment[ga]=Cruthaíonn sé seo breiseán amharcléirithe noatun le SDL +Comment[gl]=Xera unha extensión de visualización para noatun usando SDL +Comment[hu]=Létrehoz egy vizualizációs modult a Noatunhoz, SDL-ben +Comment[it]=Genera un plugin di visualizzazione per noatun usando SDL +Comment[nds]=Stellt mit SDL en Filmmakermoduul för Noatun op +Comment[ne]=SDL प्रयोग गरेर नोअटनका लागि भिजुलाइजेसन प्लगइन उत्पन्न गर्दछ +Comment[nl]=Genereert een visualisatieplugin voor Noatun met behulp van SDL +Comment[pl]=Generuje wtyczkę wizualizacji do Noatun. Używany jest SDL. +Comment[pt]=Gera um 'plugin' de visualização para o Noatun, que usa o SDL +Comment[pt_BR]=Gera um 'plugin' de visualização para o Noatun, que usa o SDL +Comment[ru]=Создание модуля визуализации для Noatun на основе SDL +Comment[sk]=Vygeneruje vizualizačný modul pre Noatun s použitím SDL +Comment[sr]=Прави визуелизациони прикључак за Noatun користећи SDL +Comment[sr@Latn]=Pravi vizuelizacioni priključak za Noatun koristeći SDL +Comment[sv]=Skapar ett Noatun-insticksprogram för visningar som använder SDL +Comment[tr]=SDL kullanarak noatun için bir görsellik eklentisi yaratır. +Comment[zh_CN]=使用 SDL 生成 noatun 的可视化插件 +Comment[zh_TW]=產生一個使用 SDL 的 Noatun 視覺化外掛程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp +Archive=noatunvisual.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{src}/noatunvisual-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/plugin_app.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/plugin_app.h +Dest=%{dest}/src/plugin_%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/plugin_impl.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp + +[FILE15] +Type=install +Source=%{src}/plugin_impl.h +Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.h + +[FILE16] +Type=install +Source=%{src}/plugin.plugin +Dest=%{dest}/src/%{APPNAMELC}.plugin + +[MSG] +Type=message +Comment=A Noatun visualization plugin was created in %{dest} +Comment[ca]=Un connector de visualització per a Noatun ha estat creat en %{dest} +Comment[da]=Et Noatun visualiserings-plugin blev oprettet i %{dest} +Comment[de]=Ein Visualisierungs-Modul für Noatun wurde in %{dest} erstellt. +Comment[el]=Ένα οπτικό πρόσθετο Noatun δημιουργήθηκε στο %{dest} +Comment[en_GB]=A Noatun visualisation plugin was created in %{dest} +Comment[es]=Un complemento de visualización para Noatun ha sido creado en %{dest} +Comment[et]=Noatuni visualiseerimisplugin loodi asukohta %{dest} +Comment[eu]=Noatun-en bistaratze-plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ تجسم Noatun در %{dest} ایجاد شد +Comment[fr]=Un module externe de visualisation pour Noatun a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán amharcléirithe Noatun i %{dest} +Comment[gl]=Creouse unha extensión de visualización para Noatun en %{dest} +Comment[hu]=Létrejött egy Noatun vizualizációs modul itt: %{dest} +Comment[it]=È stato creato un plugin di visualizzazione per noatun in %{dest} +Comment[ja]=Noatun ビジュアライゼーションプラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Noatun-Filmmakermoduul opstellt +Comment[ne]=नोअटन भिजुलाइजेसन प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een Noatun-visualisatieplugin is aangemaakt in %{dest} +Comment[pl]=Wtyczka wizualizacji została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' de visualização do Noatun em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' de visualização do Noatun em %{dest} +Comment[ru]=Модуль визуализации Noatun создан в %{dest} +Comment[sk]=Noatun vizualizačný modul bol vytvorený v %{dest} +Comment[sr]=Визуелизациони прикључак за Noatun направљен је у %{dest} +Comment[sr@Latn]=Vizuelizacioni priključak za Noatun napravljen je u %{dest} +Comment[sv]=Ett Noatun-insticksprogram för visningar skapades i %{dest} +Comment[tr]=Bir Noatun görsellik eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 Noatun 可视化插件 +Comment[zh_TW]=一個 Noatun 視覺化外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/noatunvisual/noatunvisual.tdevtemplate b/languages/cpp/app_templates/noatunvisual/noatunvisual.tdevtemplate deleted file mode 100644 index 0a91ba64..00000000 --- a/languages/cpp/app_templates/noatunvisual/noatunvisual.tdevtemplate +++ /dev/null @@ -1,205 +0,0 @@ -# TDE Config File -[General] -Name=Noatun visualization plugin -Name[ca]=Connector de visualització per a Noatun -Name[da]=Noatun visualiserings-plugin -Name[de]=Noatun-Visualisierungs-Modul -Name[el]=Οπτικό πρόσθετο Noatun -Name[en_GB]=Noatun visualisation plugin -Name[es]=Complemento de visualización para Noatun -Name[et]=Noatuni visualiseerimisplugin -Name[eu]=Noatun bistaratze-plugina -Name[fa]=وصلۀ تجسم Noatun -Name[fr]=Module externe de visualisation pour Noatun -Name[ga]=Breiseán amharcléirithe Noatun -Name[gl]=Extensión de visualización para Noatun -Name[hu]=Noatun vizualizációs modul -Name[it]=Plugin di visualizzazione per noatun -Name[ja]=Noatun ビジュアライゼーションプラグイン -Name[nds]=Noatun-Filmmakermoduul -Name[ne]=नोअटन भिजुलाइजेसन प्लगइन -Name[nl]=Noatun visualisatieplugin -Name[pl]=Wtyczka wizualizacji do Noatun -Name[pt]='Plugin' de visualização do Noatun -Name[pt_BR]='Plugin' de visualização do Noatun -Name[ru]=Модуль визуализации Noatun -Name[sk]=Noatun vizualizačný modul -Name[sr]=Визуелизациони прикључак за Noatun -Name[sr@Latn]=Vizuelizacioni priključak za Noatun -Name[sv]=Noatun-insticksprogram för visningar -Name[tr]=Noatun görsellik eklentisi -Name[zh_CN]=Noatun 可视化插件 -Name[zh_TW]=Noatun 視覺化外掛程式 -Icon=noatunvisual.png -Category=C++/TDE -Comment=Generates a visualization plugin for noatun using SDL -Comment[ca]=Genera un connector de visualització per a Noatun usant SDL -Comment[da]=Generere et visualiserings-plugin for noatun ved brug af SDL -Comment[de]=Erstellt ein Visualisierungs-Modul für Noatun unter Verwendung der SDL. -Comment[el]=Δημιουργεί ένα οπτικό πρόσθετο για το noatun χρησιμοποιώντας το SDL -Comment[en_GB]=Generates a visualisation plugin for noatun using SDL -Comment[es]=Genera un complemento de visualización para Noatun que usa SDL -Comment[et]=Noatuni visualiseerimisplugina loomine SDL-i abil -Comment[eu]=SDL erabiliz, bistaratze-plugin bat sortzen du noatun-entzat -Comment[fa]=یک وصلۀ تجسم برای noatun با استفاده از SDL تولید می‌کند -Comment[fr]=Génère un module externe de visualisation pour Noatun utilisant SDL -Comment[ga]=Cruthaíonn sé seo breiseán amharcléirithe noatun le SDL -Comment[gl]=Xera unha extensión de visualización para noatun usando SDL -Comment[hu]=Létrehoz egy vizualizációs modult a Noatunhoz, SDL-ben -Comment[it]=Genera un plugin di visualizzazione per noatun usando SDL -Comment[nds]=Stellt mit SDL en Filmmakermoduul för Noatun op -Comment[ne]=SDL प्रयोग गरेर नोअटनका लागि भिजुलाइजेसन प्लगइन उत्पन्न गर्दछ -Comment[nl]=Genereert een visualisatieplugin voor Noatun met behulp van SDL -Comment[pl]=Generuje wtyczkę wizualizacji do Noatun. Używany jest SDL. -Comment[pt]=Gera um 'plugin' de visualização para o Noatun, que usa o SDL -Comment[pt_BR]=Gera um 'plugin' de visualização para o Noatun, que usa o SDL -Comment[ru]=Создание модуля визуализации для Noatun на основе SDL -Comment[sk]=Vygeneruje vizualizačný modul pre Noatun s použitím SDL -Comment[sr]=Прави визуелизациони прикључак за Noatun користећи SDL -Comment[sr@Latn]=Pravi vizuelizacioni priključak za Noatun koristeći SDL -Comment[sv]=Skapar ett Noatun-insticksprogram för visningar som använder SDL -Comment[tr]=SDL kullanarak noatun için bir görsellik eklentisi yaratır. -Comment[zh_CN]=使用 SDL 生成 noatun 的可视化插件 -Comment[zh_TW]=產生一個使用 SDL 的 Noatun 視覺化外掛程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp -Archive=noatunvisual.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{src}/noatunvisual-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/plugin_app.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/plugin_app.h -Dest=%{dest}/src/plugin_%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/plugin_impl.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp - -[FILE15] -Type=install -Source=%{src}/plugin_impl.h -Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.h - -[FILE16] -Type=install -Source=%{src}/plugin.plugin -Dest=%{dest}/src/%{APPNAMELC}.plugin - -[MSG] -Type=message -Comment=A Noatun visualization plugin was created in %{dest} -Comment[ca]=Un connector de visualització per a Noatun ha estat creat en %{dest} -Comment[da]=Et Noatun visualiserings-plugin blev oprettet i %{dest} -Comment[de]=Ein Visualisierungs-Modul für Noatun wurde in %{dest} erstellt. -Comment[el]=Ένα οπτικό πρόσθετο Noatun δημιουργήθηκε στο %{dest} -Comment[en_GB]=A Noatun visualisation plugin was created in %{dest} -Comment[es]=Un complemento de visualización para Noatun ha sido creado en %{dest} -Comment[et]=Noatuni visualiseerimisplugin loodi asukohta %{dest} -Comment[eu]=Noatun-en bistaratze-plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ تجسم Noatun در %{dest} ایجاد شد -Comment[fr]=Un module externe de visualisation pour Noatun a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán amharcléirithe Noatun i %{dest} -Comment[gl]=Creouse unha extensión de visualización para Noatun en %{dest} -Comment[hu]=Létrejött egy Noatun vizualizációs modul itt: %{dest} -Comment[it]=È stato creato un plugin di visualizzazione per noatun in %{dest} -Comment[ja]=Noatun ビジュアライゼーションプラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Noatun-Filmmakermoduul opstellt -Comment[ne]=नोअटन भिजुलाइजेसन प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een Noatun-visualisatieplugin is aangemaakt in %{dest} -Comment[pl]=Wtyczka wizualizacji została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' de visualização do Noatun em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' de visualização do Noatun em %{dest} -Comment[ru]=Модуль визуализации Noatun создан в %{dest} -Comment[sk]=Noatun vizualizačný modul bol vytvorený v %{dest} -Comment[sr]=Визуелизациони прикључак за Noatun направљен је у %{dest} -Comment[sr@Latn]=Vizuelizacioni priključak za Noatun napravljen je u %{dest} -Comment[sv]=Ett Noatun-insticksprogram för visningar skapades i %{dest} -Comment[tr]=Bir Noatun görsellik eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了 Noatun 可视化插件 -Comment[zh_TW]=一個 Noatun 視覺化外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/noatunvisual/plugin.tdevelop b/languages/cpp/app_templates/noatunvisual/plugin.tdevelop index 6833abad..78193361 100644 --- a/languages/cpp/app_templates/noatunvisual/plugin.tdevelop +++ b/languages/cpp/app_templates/noatunvisual/plugin.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/noatun_%{APPNAMELC}plugin.la debug @@ -49,8 +49,8 @@ -lSDL - - + + @@ -58,8 +58,8 @@ - - + + bash bash_bugs @@ -95,24 +95,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opieapp/CMakeLists.txt b/languages/cpp/app_templates/opieapp/CMakeLists.txt index 45dc1b61..4f2b2824 100644 --- a/languages/cpp/app_templates/opieapp/CMakeLists.txt +++ b/languages/cpp/app_templates/opieapp/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( opieapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opieapp.tar.gz opieapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opieapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opieapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opieapp/Makefile.am b/languages/cpp/app_templates/opieapp/Makefile.am index 854f4c54..10a1f2a1 100644 --- a/languages/cpp/app_templates/opieapp/Makefile.am +++ b/languages/cpp/app_templates/opieapp/Makefile.am @@ -4,10 +4,10 @@ dataFiles = Example.png app.tdevelop example.desktop Makefile.am \ templateName = opieapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opieapp/app.tdevelop b/languages/cpp/app_templates/opieapp/app.tdevelop index 94c86a45..9bdb127e 100644 --- a/languages/cpp/app_templates/opieapp/app.tdevelop +++ b/languages/cpp/app_templates/opieapp/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + true @@ -93,15 +93,15 @@ -qws - - + + - + @@ -120,11 +120,11 @@ true - + true 2 - - + + -f -dP @@ -133,11 +133,11 @@ -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opieapp/opieapp.kdevtemplate b/languages/cpp/app_templates/opieapp/opieapp.kdevtemplate new file mode 100644 index 00000000..fc492b55 --- /dev/null +++ b/languages/cpp/app_templates/opieapp/opieapp.kdevtemplate @@ -0,0 +1,149 @@ +# TDE Config File +[General] +Name=Opie Application +Name[br]=Meziant Opie +Name[ca]=Aplicació per a Opie +Name[da]=Opie-program +Name[de]=Opie-Anwendung +Name[el]=Εφαρμογή Opie +Name[es]=Aplicación para Opie +Name[et]=Opie rakendus +Name[eu]=Opie aplikazioa +Name[fa]=کاربرد Opie +Name[fr]=Application Opie +Name[ga]=Feidhmchlár Opie +Name[gl]=Aplicación Opie +Name[hu]=Opie-alkalmazás +Name[it]=Applicazione Opie +Name[ja]=Opie アプリケーション +Name[nds]=Opie-Programm +Name[ne]=ओपिइ अनुप्रयोग +Name[nl]=Opie-toepassing +Name[pl]=Program Opie +Name[pt]=Aplicação do Opie +Name[pt_BR]=Aplicação do Opie +Name[ru]=Приложение Opie +Name[sk]=Apie aplikácia +Name[sl]=Program za Opie +Name[sr]=Opie програм +Name[sr@Latn]=Opie program +Name[sv]=Opie-program +Name[tr]=Opie Uygulaması +Name[zh_CN]=Opie 应用程序 +Name[zh_TW]=Opie 應用程式 +Icon=qmakeapp.png +Category=C++/Embedded +Comment=Generate an Opie application. +Comment[ca]=Genera una aplicació per a Opie. +Comment[da]=Generér et Opie-program. +Comment[de]=Erstellt eine Opie-Anwendung +Comment[el]=Δημιουργία μιας εφαρμογής Opie. +Comment[es]=Genera una aplicación para Opie. +Comment[et]=Opie rakenduse loomine. +Comment[eu]=Sortu Opie aplikazio bat. +Comment[fa]=یک کاربرد Opie تولید می‌کند. +Comment[fr]=Génère une application Opie. +Comment[ga]=Cruthaigh feidhmchlár Opie. +Comment[hu]=Létrehoz egy Opie-alkalmazást. +Comment[it]=Genera un'applicazione Opie. +Comment[ja]=Opie アプリケーションを作成 +Comment[nds]=Stellt en Opie-Programm op. +Comment[ne]=ओपिइ अनुप्रयोग उत्पन्न गर्नुहोस् +Comment[nl]=Genereert een Opie-toepassing +Comment[pl]=Generuje program Opie. +Comment[pt]=Gera uma aplicação do Opie. +Comment[pt_BR]=Gera uma aplicação do Opie. +Comment[ru]=Создание приложение Opie. +Comment[sk]=Vygeneruje Opie aplikáciu. +Comment[sl]=Ustvari program za Opie +Comment[sr]=Прави Opie програм. +Comment[sr@Latn]=Pravi Opie program. +Comment[sv]=Skapa ett Opie-program. +Comment[tr]=Bir Opie uygulaması yarat +Comment[zh_CN]=生成一个 Opie 应用程序。 +Comment[zh_TW]=產生一個 Opie 應用程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp +Archive=opieapp.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir0] +Type=mkdir +Dir=%{dest}/pics + +[MkDir1] +Type=mkdir +Dir=%{dest}/pics/%{APPNAMELC} + +[FILE2] +Type=install +Source=%{src}/Example.png +Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png +Process=false + +[FILE3] +Type=install +Source=%{src}/app.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[FILE4] +Type=install +Source=%{src}/example.cpp +Dest=%{dest}/%{APPNAMELC}.cpp + +[FILE5] +Type=install +Source=%{src}/example.h +Dest=%{dest}/%{APPNAMELC}.h + +[FILE6] +Type=install +Source=%{src}/examplebase.ui +Dest=%{dest}/%{APPNAMELC}base.ui + +[MkDir2] +Type=mkdir +Dir=%{dest}/apps + +[FILE7] +Type=install +Source=%{src}/example.desktop +Dest=%{dest}/apps/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=An opie application was created in %{dest} +Comment[ca]=Una aplicació per a Opie ha estat creada en %{dest} +Comment[da]=Et opie-program blev oprettet i %{dest} +Comment[de]=Eine Opie-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή opie δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación para Opie ha sido creada en %{dest} +Comment[et]=Opie rakendus loodi asukohta %{dest} +Comment[eu]=Opie aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد opie در %{dest} ایجاد شد +Comment[fr]=Une application Opie a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár opie i %{dest} +Comment[gl]=Creouse unha aplicación opie en %{dest} +Comment[hu]=Létrejött egy Opie-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Opie in %{dest} +Comment[ja]=Opie アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Opie-Programm opstellt +Comment[ne]=ओपिइ अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Opie-toepassing is aangemaakt in %{dest} +Comment[pl]=Program Opie został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do Opie em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do Opie em %{dest} +Comment[ru]=Приложение Opie создано в %{dest} +Comment[sk]=Opie aplikácia bola vytvorená v %{dest} +Comment[sl]=Program za opie je bil ustvarjen v %{dest} +Comment[sr]=Opie програм је направљен у %{dest} +Comment[sr@Latn]=Opie program je napravljen u %{dest} +Comment[sv]=Ett Opie-program skapades i %{dest} +Comment[tr]=Bir opie uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 opie 应用程序 +Comment[zh_TW]=一個 opie 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/opieapp/opieapp.tdevtemplate b/languages/cpp/app_templates/opieapp/opieapp.tdevtemplate deleted file mode 100644 index fc492b55..00000000 --- a/languages/cpp/app_templates/opieapp/opieapp.tdevtemplate +++ /dev/null @@ -1,149 +0,0 @@ -# TDE Config File -[General] -Name=Opie Application -Name[br]=Meziant Opie -Name[ca]=Aplicació per a Opie -Name[da]=Opie-program -Name[de]=Opie-Anwendung -Name[el]=Εφαρμογή Opie -Name[es]=Aplicación para Opie -Name[et]=Opie rakendus -Name[eu]=Opie aplikazioa -Name[fa]=کاربرد Opie -Name[fr]=Application Opie -Name[ga]=Feidhmchlár Opie -Name[gl]=Aplicación Opie -Name[hu]=Opie-alkalmazás -Name[it]=Applicazione Opie -Name[ja]=Opie アプリケーション -Name[nds]=Opie-Programm -Name[ne]=ओपिइ अनुप्रयोग -Name[nl]=Opie-toepassing -Name[pl]=Program Opie -Name[pt]=Aplicação do Opie -Name[pt_BR]=Aplicação do Opie -Name[ru]=Приложение Opie -Name[sk]=Apie aplikácia -Name[sl]=Program za Opie -Name[sr]=Opie програм -Name[sr@Latn]=Opie program -Name[sv]=Opie-program -Name[tr]=Opie Uygulaması -Name[zh_CN]=Opie 应用程序 -Name[zh_TW]=Opie 應用程式 -Icon=qmakeapp.png -Category=C++/Embedded -Comment=Generate an Opie application. -Comment[ca]=Genera una aplicació per a Opie. -Comment[da]=Generér et Opie-program. -Comment[de]=Erstellt eine Opie-Anwendung -Comment[el]=Δημιουργία μιας εφαρμογής Opie. -Comment[es]=Genera una aplicación para Opie. -Comment[et]=Opie rakenduse loomine. -Comment[eu]=Sortu Opie aplikazio bat. -Comment[fa]=یک کاربرد Opie تولید می‌کند. -Comment[fr]=Génère une application Opie. -Comment[ga]=Cruthaigh feidhmchlár Opie. -Comment[hu]=Létrehoz egy Opie-alkalmazást. -Comment[it]=Genera un'applicazione Opie. -Comment[ja]=Opie アプリケーションを作成 -Comment[nds]=Stellt en Opie-Programm op. -Comment[ne]=ओपिइ अनुप्रयोग उत्पन्न गर्नुहोस् -Comment[nl]=Genereert een Opie-toepassing -Comment[pl]=Generuje program Opie. -Comment[pt]=Gera uma aplicação do Opie. -Comment[pt_BR]=Gera uma aplicação do Opie. -Comment[ru]=Создание приложение Opie. -Comment[sk]=Vygeneruje Opie aplikáciu. -Comment[sl]=Ustvari program za Opie -Comment[sr]=Прави Opie програм. -Comment[sr@Latn]=Pravi Opie program. -Comment[sv]=Skapa ett Opie-program. -Comment[tr]=Bir Opie uygulaması yarat -Comment[zh_CN]=生成一个 Opie 应用程序。 -Comment[zh_TW]=產生一個 Opie 應用程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp -Archive=opieapp.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir0] -Type=mkdir -Dir=%{dest}/pics - -[MkDir1] -Type=mkdir -Dir=%{dest}/pics/%{APPNAMELC} - -[FILE2] -Type=install -Source=%{src}/Example.png -Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png -Process=false - -[FILE3] -Type=install -Source=%{src}/app.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[FILE4] -Type=install -Source=%{src}/example.cpp -Dest=%{dest}/%{APPNAMELC}.cpp - -[FILE5] -Type=install -Source=%{src}/example.h -Dest=%{dest}/%{APPNAMELC}.h - -[FILE6] -Type=install -Source=%{src}/examplebase.ui -Dest=%{dest}/%{APPNAMELC}base.ui - -[MkDir2] -Type=mkdir -Dir=%{dest}/apps - -[FILE7] -Type=install -Source=%{src}/example.desktop -Dest=%{dest}/apps/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=An opie application was created in %{dest} -Comment[ca]=Una aplicació per a Opie ha estat creada en %{dest} -Comment[da]=Et opie-program blev oprettet i %{dest} -Comment[de]=Eine Opie-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή opie δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación para Opie ha sido creada en %{dest} -Comment[et]=Opie rakendus loodi asukohta %{dest} -Comment[eu]=Opie aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد opie در %{dest} ایجاد شد -Comment[fr]=Une application Opie a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár opie i %{dest} -Comment[gl]=Creouse unha aplicación opie en %{dest} -Comment[hu]=Létrejött egy Opie-alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione Opie in %{dest} -Comment[ja]=Opie アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Opie-Programm opstellt -Comment[ne]=ओपिइ अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Opie-toepassing is aangemaakt in %{dest} -Comment[pl]=Program Opie został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do Opie em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do Opie em %{dest} -Comment[ru]=Приложение Opie создано в %{dest} -Comment[sk]=Opie aplikácia bola vytvorená v %{dest} -Comment[sl]=Program za opie je bil ustvarjen v %{dest} -Comment[sr]=Opie програм је направљен у %{dest} -Comment[sr@Latn]=Opie program je napravljen u %{dest} -Comment[sv]=Ett Opie-program skapades i %{dest} -Comment[tr]=Bir opie uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 opie 应用程序 -Comment[zh_TW]=一個 opie 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/opieapplet/CMakeLists.txt b/languages/cpp/app_templates/opieapplet/CMakeLists.txt index 6c8edbbe..e4dc42f0 100644 --- a/languages/cpp/app_templates/opieapplet/CMakeLists.txt +++ b/languages/cpp/app_templates/opieapplet/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( opieapplet.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opieapplet.tar.gz opieapplet.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opieapplet.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opieapplet.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opieapplet/Makefile.am b/languages/cpp/app_templates/opieapplet/Makefile.am index 845411c7..6bbb09ac 100644 --- a/languages/cpp/app_templates/opieapplet/Makefile.am +++ b/languages/cpp/app_templates/opieapplet/Makefile.am @@ -4,10 +4,10 @@ dataFiles = Makefile.am Example.png app.tdevelop app.pro \ templateName = opieapplet ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opieapplet/app.tdevelop b/languages/cpp/app_templates/opieapplet/app.tdevelop index da3b91d4..c5544656 100644 --- a/languages/cpp/app_templates/opieapplet/app.tdevelop +++ b/languages/cpp/app_templates/opieapplet/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + true @@ -108,15 +108,15 @@ fi -qws - - + + - + @@ -135,11 +135,11 @@ fi true - + true 2 - - + + -f -dP @@ -148,11 +148,11 @@ fi -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opieapplet/opieapplet.kdevtemplate b/languages/cpp/app_templates/opieapplet/opieapplet.kdevtemplate new file mode 100644 index 00000000..e6cec5eb --- /dev/null +++ b/languages/cpp/app_templates/opieapplet/opieapplet.kdevtemplate @@ -0,0 +1,135 @@ +# TDE Config File +[General] +Name=Opie Applet +Name[br]=Arloadig Opie +Name[ca]=Miniaplicació per a Opie +Name[da]=Opie-applet +Name[de]=Opie-Miniprogramm (Applet) +Name[el]=Μικροεφαρμογή Opie +Name[es]=Applet para Opie +Name[et]=Opie aplett +Name[eu]=Opie applet-a +Name[fa]=برنامک Opie +Name[fr]=Applet Opie +Name[ga]=Feidhmchláirín Opie +Name[gl]=Applet Opie +Name[hu]=Opie-s kisalkalmazás +Name[it]=Applet Opie +Name[ja]=Opie アプレット +Name[nds]=Opie-Lüttprogramm +Name[ne]=ओपिइ एप्लेट +Name[nl]=Opie-applet +Name[pl]=Aplet Opie +Name[pt]='Applet' do Opie +Name[pt_BR]='Applet' do Opie +Name[ru]=Аплет Opie +Name[sk]=Opie applet +Name[sl]=Vstavek za Opie +Name[sr]=Opie аплет +Name[sr@Latn]=Opie aplet +Name[sv]=Opie-miniprogram +Name[tr]=Opie Küçük Uygulaması +Name[zh_CN]=Opie 小程序 +Name[zh_TW]=Opie 小程式 +Icon=qmakeapp.png +Category=C++/Embedded +Comment=Generate an Opie applet. +Comment[ca]=Genera una miniaplicació per a Opie. +Comment[da]=Generér en Opie-applet. +Comment[de]=Erstellt ein Opie-Miniprogramm (Applet). +Comment[el]=Δημιουργία μίας μικροεφαρμογής Opie. +Comment[es]=Genera un applet para Opie. +Comment[et]=Opie apleti loomine. +Comment[eu]=Sortu Opie applet bat. +Comment[fa]=یک برنامک Opie تولید می‌کند. +Comment[fr]=Génère un applet Opie. +Comment[ga]=Cruthaigh feidhmchláirín Opie. +Comment[gl]=Xera un applet Opie. +Comment[hu]=Létrehoz egy Opie-s kisalkalmazást. +Comment[it]=Genera un'applet Opie. +Comment[ja]=Opie アプレットを作成 +Comment[nds]=Stellt en Opie-Lüttprogramm op. +Comment[ne]=ओपिइ एप्लेट उत्पन्न गर्दछ +Comment[nl]=Genereert een Opie-applet. +Comment[pl]=Generuje aplet Opie +Comment[pt]=Gera uma 'applet' do Opie. +Comment[pt_BR]=Gera uma 'applet' do Opie. +Comment[ru]=Создание аплета Opie. +Comment[sk]=Vygeneruje Opie applet. +Comment[sl]=Ustvari vstavek za Opie. +Comment[sr]=Прави Opie аплет. +Comment[sr@Latn]=Pravi Opie aplet. +Comment[sv]=Skapa ett Opie-miniprogram. +Comment[zh_CN]=生成一个 Opie 小程序。 +Comment[zh_TW]=產生一個 Opie 小程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp +Archive=opieapplet.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir0] +Type=mkdir +Dir=%{dest}/pics + +[MkDir1] +Type=mkdir +Dir=%{dest}/pics/%{APPNAMELC} + +[FILE2] +Type=install +Source=%{src}/Example.png +Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png +Process=false + +[FILE3] +Type=install +Source=%{src}/app.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[FILE4] +Type=install +Source=%{src}/simpleimpl.cpp +Dest=%{dest}/%{APPNAMELC}.cpp + +[FILE5] +Type=install +Source=%{src}/simpleimpl.h +Dest=%{dest}/%{APPNAMELC}.h + +[MSG] +Type=message +Comment=An opie applet was created in %{dest} +Comment[ca]=Una miniaplicació per a Opie ha estat creat en %{dest} +Comment[da]=En opie-applet blev oprettet i %{dest} +Comment[de]=Ein Opie-Miniprogramm (Applet) wurde in %{dest} erstellt. +Comment[el]=Μία μικροεφαρμογή opie δημιουργήθηκε στο %{dest} +Comment[es]=Un applet para Opie ha sido creado en %{dest} +Comment[et]=Opie aplett loodi asukohta %{dest} +Comment[eu]=Opie applet bat sortu da hemen: %{dest} +Comment[fa]=یک برنامک opie در %{dest} ایجاد شد +Comment[fr]=Un applet Opie a été créé dans %{dest} +Comment[ga]=Cruthaíodh feidhmchláirín opie i %{dest} +Comment[gl]=Creouse un applet opie en %{dset} +Comment[hu]=Létrejött egy Opie-s kisalkalmazás itt: %{dest} +Comment[it]=È stata creata un'applet Opie in %{dest} +Comment[ja]=Opie アプレットを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Opie-Lüttprogramm opstellt +Comment[ne]=ओपिइ एप्लेट %{dest} मा सिर्जना गरियो +Comment[nl]=Een Opie-applet is aangemaakt in %{dest} +Comment[pl]=Aplet Opie został utworzony w %{dest} +Comment[pt]=Foi criada uma 'applet' do Opie em %{dest} +Comment[pt_BR]=Foi criada uma 'applet' do Opie em %{dest} +Comment[ru]=Аплет Opie создан в %{dest} +Comment[sk]=Opie applet bol vytvorený v %{dest} +Comment[sl]=Vstavek za opie je bil ustvarjen v %{dest} +Comment[sr]=Opie аплет је направљен у %{dest} +Comment[sr@Latn]=Opie aplet je napravljen u %{dest} +Comment[sv]=Ett Opie-miniprogram skapades i %{dest} +Comment[tr]=Bir Opie küçük uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 opie 小程序 +Comment[zh_TW]=一個 Opie 小程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/opieapplet/opieapplet.tdevtemplate b/languages/cpp/app_templates/opieapplet/opieapplet.tdevtemplate deleted file mode 100644 index e6cec5eb..00000000 --- a/languages/cpp/app_templates/opieapplet/opieapplet.tdevtemplate +++ /dev/null @@ -1,135 +0,0 @@ -# TDE Config File -[General] -Name=Opie Applet -Name[br]=Arloadig Opie -Name[ca]=Miniaplicació per a Opie -Name[da]=Opie-applet -Name[de]=Opie-Miniprogramm (Applet) -Name[el]=Μικροεφαρμογή Opie -Name[es]=Applet para Opie -Name[et]=Opie aplett -Name[eu]=Opie applet-a -Name[fa]=برنامک Opie -Name[fr]=Applet Opie -Name[ga]=Feidhmchláirín Opie -Name[gl]=Applet Opie -Name[hu]=Opie-s kisalkalmazás -Name[it]=Applet Opie -Name[ja]=Opie アプレット -Name[nds]=Opie-Lüttprogramm -Name[ne]=ओपिइ एप्लेट -Name[nl]=Opie-applet -Name[pl]=Aplet Opie -Name[pt]='Applet' do Opie -Name[pt_BR]='Applet' do Opie -Name[ru]=Аплет Opie -Name[sk]=Opie applet -Name[sl]=Vstavek za Opie -Name[sr]=Opie аплет -Name[sr@Latn]=Opie aplet -Name[sv]=Opie-miniprogram -Name[tr]=Opie Küçük Uygulaması -Name[zh_CN]=Opie 小程序 -Name[zh_TW]=Opie 小程式 -Icon=qmakeapp.png -Category=C++/Embedded -Comment=Generate an Opie applet. -Comment[ca]=Genera una miniaplicació per a Opie. -Comment[da]=Generér en Opie-applet. -Comment[de]=Erstellt ein Opie-Miniprogramm (Applet). -Comment[el]=Δημιουργία μίας μικροεφαρμογής Opie. -Comment[es]=Genera un applet para Opie. -Comment[et]=Opie apleti loomine. -Comment[eu]=Sortu Opie applet bat. -Comment[fa]=یک برنامک Opie تولید می‌کند. -Comment[fr]=Génère un applet Opie. -Comment[ga]=Cruthaigh feidhmchláirín Opie. -Comment[gl]=Xera un applet Opie. -Comment[hu]=Létrehoz egy Opie-s kisalkalmazást. -Comment[it]=Genera un'applet Opie. -Comment[ja]=Opie アプレットを作成 -Comment[nds]=Stellt en Opie-Lüttprogramm op. -Comment[ne]=ओपिइ एप्लेट उत्पन्न गर्दछ -Comment[nl]=Genereert een Opie-applet. -Comment[pl]=Generuje aplet Opie -Comment[pt]=Gera uma 'applet' do Opie. -Comment[pt_BR]=Gera uma 'applet' do Opie. -Comment[ru]=Создание аплета Opie. -Comment[sk]=Vygeneruje Opie applet. -Comment[sl]=Ustvari vstavek za Opie. -Comment[sr]=Прави Opie аплет. -Comment[sr@Latn]=Pravi Opie aplet. -Comment[sv]=Skapa ett Opie-miniprogram. -Comment[zh_CN]=生成一个 Opie 小程序。 -Comment[zh_TW]=產生一個 Opie 小程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp -Archive=opieapplet.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir0] -Type=mkdir -Dir=%{dest}/pics - -[MkDir1] -Type=mkdir -Dir=%{dest}/pics/%{APPNAMELC} - -[FILE2] -Type=install -Source=%{src}/Example.png -Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png -Process=false - -[FILE3] -Type=install -Source=%{src}/app.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[FILE4] -Type=install -Source=%{src}/simpleimpl.cpp -Dest=%{dest}/%{APPNAMELC}.cpp - -[FILE5] -Type=install -Source=%{src}/simpleimpl.h -Dest=%{dest}/%{APPNAMELC}.h - -[MSG] -Type=message -Comment=An opie applet was created in %{dest} -Comment[ca]=Una miniaplicació per a Opie ha estat creat en %{dest} -Comment[da]=En opie-applet blev oprettet i %{dest} -Comment[de]=Ein Opie-Miniprogramm (Applet) wurde in %{dest} erstellt. -Comment[el]=Μία μικροεφαρμογή opie δημιουργήθηκε στο %{dest} -Comment[es]=Un applet para Opie ha sido creado en %{dest} -Comment[et]=Opie aplett loodi asukohta %{dest} -Comment[eu]=Opie applet bat sortu da hemen: %{dest} -Comment[fa]=یک برنامک opie در %{dest} ایجاد شد -Comment[fr]=Un applet Opie a été créé dans %{dest} -Comment[ga]=Cruthaíodh feidhmchláirín opie i %{dest} -Comment[gl]=Creouse un applet opie en %{dset} -Comment[hu]=Létrejött egy Opie-s kisalkalmazás itt: %{dest} -Comment[it]=È stata creata un'applet Opie in %{dest} -Comment[ja]=Opie アプレットを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Opie-Lüttprogramm opstellt -Comment[ne]=ओपिइ एप्लेट %{dest} मा सिर्जना गरियो -Comment[nl]=Een Opie-applet is aangemaakt in %{dest} -Comment[pl]=Aplet Opie został utworzony w %{dest} -Comment[pt]=Foi criada uma 'applet' do Opie em %{dest} -Comment[pt_BR]=Foi criada uma 'applet' do Opie em %{dest} -Comment[ru]=Аплет Opie создан в %{dest} -Comment[sk]=Opie applet bol vytvorený v %{dest} -Comment[sl]=Vstavek za opie je bil ustvarjen v %{dest} -Comment[sr]=Opie аплет је направљен у %{dest} -Comment[sr@Latn]=Opie aplet je napravljen u %{dest} -Comment[sv]=Ett Opie-miniprogram skapades i %{dest} -Comment[tr]=Bir Opie küçük uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 opie 小程序 -Comment[zh_TW]=一個 Opie 小程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/opieinput/CMakeLists.txt b/languages/cpp/app_templates/opieinput/CMakeLists.txt index 5246ccdb..f7bba492 100644 --- a/languages/cpp/app_templates/opieinput/CMakeLists.txt +++ b/languages/cpp/app_templates/opieinput/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( opieinput.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opieinput.tar.gz opieinput.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opieinput.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opieinput.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opieinput/Makefile.am b/languages/cpp/app_templates/opieinput/Makefile.am index fee564a7..9a3e5ffd 100644 --- a/languages/cpp/app_templates/opieinput/Makefile.am +++ b/languages/cpp/app_templates/opieinput/Makefile.am @@ -3,10 +3,10 @@ dataFiles = Makefile.am Example.png app.tdevelop app.pro \ templateName = opieinput ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opieinput/app.tdevelop b/languages/cpp/app_templates/opieinput/app.tdevelop index 9a81ebba..cc61122f 100644 --- a/languages/cpp/app_templates/opieinput/app.tdevelop +++ b/languages/cpp/app_templates/opieinput/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + false @@ -109,15 +109,15 @@ fi -qws - - + + - + @@ -136,11 +136,11 @@ fi true - + true 2 - - + + -f -dP @@ -149,11 +149,11 @@ fi -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opieinput/opieinput.kdevtemplate b/languages/cpp/app_templates/opieinput/opieinput.kdevtemplate new file mode 100644 index 00000000..19b721bf --- /dev/null +++ b/languages/cpp/app_templates/opieinput/opieinput.kdevtemplate @@ -0,0 +1,129 @@ +# TDE Config File +[General] +Name=Opie Input +Name[ca]=Entrada per a Opie +Name[da]=Opie-input +Name[de]=Opie-Eingabe +Name[el]=Μέθοδος εισαγωγής Opie +Name[es]=Entrada para Opie +Name[et]=Opie sisestus +Name[eu]=Opie sarrera +Name[fa]=ورودی Opie +Name[fr]=Entrée Opie +Name[ga]=Ionchur Opie +Name[gl]=Entrada Opie +Name[hu]=Opie-s bemeneti modul +Name[it]=Input di Opie +Name[ja]=Opie 入力 +Name[nds]=Opie-Ingaav +Name[ne]=ओपिइ आगत +Name[nl]=Opie-invoer +Name[pl]=Wejście Opie +Name[pt]=Introdução de Dados do Opie +Name[pt_BR]=Introdução de Dados do Opie +Name[ru]=Модуль ввода Opie +Name[sk]=Opie vstup +Name[sr]=Opie унос +Name[sr@Latn]=Opie unos +Name[sv]=Opie-inmatning +Name[tr]=Opie Girdisi +Name[zh_CN]=Opie 输入法 +Name[zh_TW]=Opie 輸入 +Icon=qmakeapp.png +Category=C++/Embedded +Comment=Generate an Opie input method plugin. +Comment[ca]=Genera un connector de mètode d'entrada per a Opie. +Comment[da]=Generér en Opie input-metode-plugin. +Comment[de]=Erstellt ein Eingabemethode-Modul für Opie. +Comment[el]=Δημιουργία ενός πρόσθετου μεθόδου εισαγωγής. +Comment[es]=Genera un complemento de método de entrada para Opie. +Comment[et]=Opie sisestusmeetodi plugina loomine. +Comment[eu]=Sortu Opie-ren sarrera-metodoaren plugin bat. +Comment[fa]=یک وصلۀ روش ورودی Opie تولید می‌کند. +Comment[fr]=Génère un module externe de méthode d'entrée Opie. +Comment[gl]=Xera unha extensión de método de entrada para Opie. +Comment[hu]=Létrehoz egy Opie-s bemeneti modult. +Comment[it]=Genera un plugin per il metodo di input Opie. +Comment[nds]=Stellt en Ingaavmetood-Moduul för Opie op. +Comment[ne]=ओपिइ आगत विधि प्लगइन उत्पन्न गर्नुहोस् +Comment[nl]=Genereert een Opie-invoermethode-plugin. +Comment[pl]=Generuje wtyczkę z metodą wejściową dla Opie. +Comment[pt]=Gera um 'plugin' de introdução de dados do Opie. +Comment[pt_BR]=Gera um 'plugin' de introdução de dados do Opie. +Comment[ru]=Создание модуля ввода данных для среды Opie. +Comment[sk]=Vygeneruje Opie vstupný modul. +Comment[sr]=Прави прикључак за Opie метод уноса. +Comment[sr@Latn]=Pravi priključak za Opie metod unosa. +Comment[sv]=Skapa ett insticksprogram för Opie-inmatning. +Comment[tr]=Bir Opie girdi yöntemi eklentisi yarat +Comment[zh_CN]=生成一个 Opie 输入法插件。 +Comment[zh_TW]=產生一個 Opie 輸入法外掛程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp +Archive=opieinput.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir0] +Type=mkdir +Dir=%{dest}/pics + +[MkDir1] +Type=mkdir +Dir=%{dest}/pics/%{APPNAMELC} + +[FILE2] +Type=install +Source=%{src}/Example.png +Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png +Process=false + +[FILE3] +Type=install +Source=%{src}/app.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[FILE4] +Type=install +Source=%{src}/simpleimpl.cpp +Dest=%{dest}/%{APPNAMELC}.cpp + +[FILE5] +Type=install +Source=%{src}/simpleimpl.h +Dest=%{dest}/%{APPNAMELC}.h + +[MSG] +Type=message +Comment=An opie input method plugin was created in %{dest} +Comment[ca]=Un connector de mètode d'entrada per a Opie ha estat creat en %{dest} +Comment[da]=At opie input-metode-plugin blev oprettet i %{dest} +Comment[de]=Ein Eingabemethode-Modul für Opie wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο μεθόδου εισαγωγής opie δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento de método de entrada para Opie ha sido creado en %{dest} +Comment[et]=Opie sisestusmeetodi plugin loodi asukohta %{dest} +Comment[eu]=Opie-ren sarrera-metodoaren plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ روش ورودی opie در %{dest} ایجاد شد +Comment[fr]=Un module externe de méthode d'entrée Opie a été créé dans %{dest} +Comment[gl]=Creouse unha extensión de método de entrada para opie en %{dest} +Comment[hu]=Létrejött egy Opie-s bemeneti modul itt: %{dest} +Comment[it]=È stato creato un plugin per il metodo di input Opie in %{dest} +Comment[nds]=In %{dest} wöör en Opie-Ingaavmetoodmoduul opstellt +Comment[ne]=ओपिइ आगत विधि प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een Opie-invoermethode-plugins is aangemaakt in %{dest} +Comment[pl]=Wtyczka z metodą wejściową dla Opie została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' de introdução de dados em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' de introdução de dados em %{dest} +Comment[ru]=Модуль ввода Opie создан в %{dest} +Comment[sk]=Opie vstupný modul bol vytvorený v %{dest} +Comment[sr]=Прикључак за Opie метод уноса направљен је у %{dest} +Comment[sr@Latn]=Priključak za Opie metod unosa napravljen je u %{dest} +Comment[sv]=Ett insticksprogram för Opie-inmatning skapades i %{dest} +Comment[tr]=Bir opie girdi yöntemi eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 opie 输入法 +Comment[zh_TW]=一個 Opie 輸入法外掛程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/opieinput/opieinput.tdevtemplate b/languages/cpp/app_templates/opieinput/opieinput.tdevtemplate deleted file mode 100644 index 19b721bf..00000000 --- a/languages/cpp/app_templates/opieinput/opieinput.tdevtemplate +++ /dev/null @@ -1,129 +0,0 @@ -# TDE Config File -[General] -Name=Opie Input -Name[ca]=Entrada per a Opie -Name[da]=Opie-input -Name[de]=Opie-Eingabe -Name[el]=Μέθοδος εισαγωγής Opie -Name[es]=Entrada para Opie -Name[et]=Opie sisestus -Name[eu]=Opie sarrera -Name[fa]=ورودی Opie -Name[fr]=Entrée Opie -Name[ga]=Ionchur Opie -Name[gl]=Entrada Opie -Name[hu]=Opie-s bemeneti modul -Name[it]=Input di Opie -Name[ja]=Opie 入力 -Name[nds]=Opie-Ingaav -Name[ne]=ओपिइ आगत -Name[nl]=Opie-invoer -Name[pl]=Wejście Opie -Name[pt]=Introdução de Dados do Opie -Name[pt_BR]=Introdução de Dados do Opie -Name[ru]=Модуль ввода Opie -Name[sk]=Opie vstup -Name[sr]=Opie унос -Name[sr@Latn]=Opie unos -Name[sv]=Opie-inmatning -Name[tr]=Opie Girdisi -Name[zh_CN]=Opie 输入法 -Name[zh_TW]=Opie 輸入 -Icon=qmakeapp.png -Category=C++/Embedded -Comment=Generate an Opie input method plugin. -Comment[ca]=Genera un connector de mètode d'entrada per a Opie. -Comment[da]=Generér en Opie input-metode-plugin. -Comment[de]=Erstellt ein Eingabemethode-Modul für Opie. -Comment[el]=Δημιουργία ενός πρόσθετου μεθόδου εισαγωγής. -Comment[es]=Genera un complemento de método de entrada para Opie. -Comment[et]=Opie sisestusmeetodi plugina loomine. -Comment[eu]=Sortu Opie-ren sarrera-metodoaren plugin bat. -Comment[fa]=یک وصلۀ روش ورودی Opie تولید می‌کند. -Comment[fr]=Génère un module externe de méthode d'entrée Opie. -Comment[gl]=Xera unha extensión de método de entrada para Opie. -Comment[hu]=Létrehoz egy Opie-s bemeneti modult. -Comment[it]=Genera un plugin per il metodo di input Opie. -Comment[nds]=Stellt en Ingaavmetood-Moduul för Opie op. -Comment[ne]=ओपिइ आगत विधि प्लगइन उत्पन्न गर्नुहोस् -Comment[nl]=Genereert een Opie-invoermethode-plugin. -Comment[pl]=Generuje wtyczkę z metodą wejściową dla Opie. -Comment[pt]=Gera um 'plugin' de introdução de dados do Opie. -Comment[pt_BR]=Gera um 'plugin' de introdução de dados do Opie. -Comment[ru]=Создание модуля ввода данных для среды Opie. -Comment[sk]=Vygeneruje Opie vstupný modul. -Comment[sr]=Прави прикључак за Opie метод уноса. -Comment[sr@Latn]=Pravi priključak za Opie metod unosa. -Comment[sv]=Skapa ett insticksprogram för Opie-inmatning. -Comment[tr]=Bir Opie girdi yöntemi eklentisi yarat -Comment[zh_CN]=生成一个 Opie 输入法插件。 -Comment[zh_TW]=產生一個 Opie 輸入法外掛程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp -Archive=opieinput.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir0] -Type=mkdir -Dir=%{dest}/pics - -[MkDir1] -Type=mkdir -Dir=%{dest}/pics/%{APPNAMELC} - -[FILE2] -Type=install -Source=%{src}/Example.png -Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png -Process=false - -[FILE3] -Type=install -Source=%{src}/app.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[FILE4] -Type=install -Source=%{src}/simpleimpl.cpp -Dest=%{dest}/%{APPNAMELC}.cpp - -[FILE5] -Type=install -Source=%{src}/simpleimpl.h -Dest=%{dest}/%{APPNAMELC}.h - -[MSG] -Type=message -Comment=An opie input method plugin was created in %{dest} -Comment[ca]=Un connector de mètode d'entrada per a Opie ha estat creat en %{dest} -Comment[da]=At opie input-metode-plugin blev oprettet i %{dest} -Comment[de]=Ein Eingabemethode-Modul für Opie wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο μεθόδου εισαγωγής opie δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento de método de entrada para Opie ha sido creado en %{dest} -Comment[et]=Opie sisestusmeetodi plugin loodi asukohta %{dest} -Comment[eu]=Opie-ren sarrera-metodoaren plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ روش ورودی opie در %{dest} ایجاد شد -Comment[fr]=Un module externe de méthode d'entrée Opie a été créé dans %{dest} -Comment[gl]=Creouse unha extensión de método de entrada para opie en %{dest} -Comment[hu]=Létrejött egy Opie-s bemeneti modul itt: %{dest} -Comment[it]=È stato creato un plugin per il metodo di input Opie in %{dest} -Comment[nds]=In %{dest} wöör en Opie-Ingaavmetoodmoduul opstellt -Comment[ne]=ओपिइ आगत विधि प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een Opie-invoermethode-plugins is aangemaakt in %{dest} -Comment[pl]=Wtyczka z metodą wejściową dla Opie została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' de introdução de dados em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' de introdução de dados em %{dest} -Comment[ru]=Модуль ввода Opie создан в %{dest} -Comment[sk]=Opie vstupný modul bol vytvorený v %{dest} -Comment[sr]=Прикључак за Opie метод уноса направљен је у %{dest} -Comment[sr@Latn]=Priključak za Opie metod unosa napravljen je u %{dest} -Comment[sv]=Ett insticksprogram för Opie-inmatning skapades i %{dest} -Comment[tr]=Bir opie girdi yöntemi eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 opie 输入法 -Comment[zh_TW]=一個 Opie 輸入法外掛程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/opiemenu/CMakeLists.txt b/languages/cpp/app_templates/opiemenu/CMakeLists.txt index 12eedcdc..c321604c 100644 --- a/languages/cpp/app_templates/opiemenu/CMakeLists.txt +++ b/languages/cpp/app_templates/opiemenu/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( opiemenu.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opiemenu.tar.gz opiemenu.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opiemenu.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opiemenu.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opiemenu/Makefile.am b/languages/cpp/app_templates/opiemenu/Makefile.am index 91d1c2ba..343a2bfa 100644 --- a/languages/cpp/app_templates/opiemenu/Makefile.am +++ b/languages/cpp/app_templates/opiemenu/Makefile.am @@ -4,10 +4,10 @@ dataFiles = Makefile.am Example.png app.tdevelop app.pro \ templateName = opiemenu ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opiemenu/app.tdevelop b/languages/cpp/app_templates/opiemenu/app.tdevelop index da3b91d4..c5544656 100644 --- a/languages/cpp/app_templates/opiemenu/app.tdevelop +++ b/languages/cpp/app_templates/opiemenu/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + true @@ -108,15 +108,15 @@ fi -qws - - + + - + @@ -135,11 +135,11 @@ fi true - + true 2 - - + + -f -dP @@ -148,11 +148,11 @@ fi -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opiemenu/opiemenu.kdevtemplate b/languages/cpp/app_templates/opiemenu/opiemenu.kdevtemplate new file mode 100644 index 00000000..204cf5d8 --- /dev/null +++ b/languages/cpp/app_templates/opiemenu/opiemenu.kdevtemplate @@ -0,0 +1,132 @@ +# TDE Config File +[General] +Name=Opie Menu Applet +Name[ca]=Una miniaplicació de menú per a Opie +Name[da]=Opie menu-applet +Name[de]=Opie-Menü-Miniprogramm (Applet) +Name[el]=Μικροεφαρμογή μενού Opie +Name[es]=Applet de menú para Opie +Name[et]=Opie menüüaplett +Name[eu]=Opie-ren menu applet-a +Name[fa]=برنامک گزینگان Opie +Name[fr]=Applet de menu Opie +Name[ga]=Feidhmchláirín Roghchláir Opie +Name[gl]=Applet de menú Opie +Name[hu]=Opie-s menü-kisalkalmazás +Name[it]=Applet di menu Opie +Name[ja]=Opie メニューアプレット +Name[nds]=Menü-Lüttprogramm för Opie +Name[ne]=ओपिइ मेनु एप्लेट +Name[nl]=Opie-menuapplet +Name[pl]=Aplet menu Opie +Name[pt]='Applet' do Menu do Opie +Name[pt_BR]='Applet' do Menu do Opie +Name[ru]=Аплет меню Opie +Name[sk]=Opie menu pplet +Name[sr]=Opie аплет менија +Name[sr@Latn]=Opie aplet menija +Name[sv]=Opie-menyminiprogram +Name[tr]=Opie Menü Küçük Uygulaması +Name[zh_CN]=Opie 菜单小程序 +Name[zh_TW]=Opie 選單小程式 +Icon=qmakeapp.png +Category=C++/Embedded +Comment=Generate an Opie menu applet. +Comment[ca]=Genera una miniaplicació de menú per a Opie. +Comment[da]=Generér en Opie menu-applet. +Comment[de]=Erstellt ein Opie-Menü-Miniprogramm (Applet). +Comment[el]=Δημιουργία μίας μικροεφαρμογής μενού Opie. +Comment[es]=Genera un applet de menú para Opie. +Comment[et]=Opie menüüapleti loomine. +Comment[eu]=Sortu Opie-ren menu applet bat. +Comment[fa]=یک برنامک گزینگان Opie تولید می‌کند. +Comment[fr]=Génère un applet de menu Opie. +Comment[gl]=Xera un applet de menu para Opie. +Comment[hu]=Létrehoz egy Opie-s menü-kisalkalmazást. +Comment[it]=Genera un'applet di menu Opie. +Comment[ja]=Opie メニューアプレットを作成 +Comment[nds]=Stellt en Menü-Lüttprogramm för Opie op. +Comment[ne]=ओपिइ मेनु एप्लेट उत्पन्न गर्नुहोस् +Comment[nl]=Genereert een Opie-menuapplet. +Comment[pl]=Generuje aplet menu Opie +Comment[pt]=Gera uma 'applet' do menu do Opie. +Comment[pt_BR]=Gera uma 'applet' do menu do Opie. +Comment[ru]=Создание аплета меню Opie. +Comment[sk]=Vygeneruje Opie menu applet. +Comment[sr]=Прави Opie аплет менија. +Comment[sr@Latn]=Pravi Opie aplet menija. +Comment[sv]=Skapa ett Opie-menyminiprogram. +Comment[tr]=Bir Opie menü küçük uygulaması yarat +Comment[zh_CN]=生成一个 Opie 菜单小程序。 +Comment[zh_TW]=產生一個 Opie 選單小程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp +Archive=opiemenu.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir0] +Type=mkdir +Dir=%{dest}/pics + +[MkDir1] +Type=mkdir +Dir=%{dest}/pics/%{APPNAMELC} + +[FILE2] +Type=install +Source=%{src}/Example.png +Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png +Process=false + +[FILE3] +Type=install +Source=%{src}/app.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[FILE4] +Type=install +Source=%{src}/simpleimpl.cpp +Dest=%{dest}/%{APPNAMELC}.cpp + +[FILE5] +Type=install +Source=%{src}/simpleimpl.h +Dest=%{dest}/%{APPNAMELC}.h + +[MSG] +Type=message +Comment=An opie menu applet was created in %{dest} +Comment[ca]=Una miniaplicació de menú per a Opie ha estat creat en %{dest} +Comment[da]=En opie menu-applet blev oprettet i %{dest} +Comment[de]=Ein Opie-Menü-Miniprogramm (Applet) wurde in %{dest} erstellt. +Comment[el]=Μία μικροεφαρμογή μενού opie δημιουργήθηκε στο %{dest} +Comment[es]=Un applet de menú para Opie ha sido creado en %{dest} +Comment[et]=Opie menüüaplett loodi asukohta %{dest} +Comment[eu]= Opie-ren menu applet bat sortu da hemen: %{dest} +Comment[fa]=یک برنامک گزینگان opie در %{dest} ایجاد شد +Comment[fr]=Un applet de menu Opie a été créé dans %{dest} +Comment[ga]=Cruthaíodh feidhmchláirín roghchláir opie i %{dest} +Comment[gl]=Creouse un applet de menu para opie en %{dest} +Comment[hu]=Létrejött egy Opie-s menü-kisalkalmazás itt: %{dest} +Comment[it]=È stata creata un'applet di menu Opie in %{dest} +Comment[ja]=Opie メニューアプレットを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Menü-Lüttprogramm för Opie opstellt +Comment[ne]=ओपिइ मेनु एप्लेट %{dest} मा सिर्जना गरियो +Comment[nl]=Een Opie-menuapplet is aangemaakt in %{dest} +Comment[pl]=Aplet menu Opie został utworzony w %{dest} +Comment[pt]=Foi criada uma 'applet' do menu do Opie em %{dest} +Comment[pt_BR]=Foi criada uma 'applet' do menu do Opie em %{dest} +Comment[ru]=Аплет меню Opie создан в %{dest} +Comment[sk]=Opie menu applet bol vytvorený v %{dest} +Comment[sr]=Opie аплет менија направљен је у %{dest} +Comment[sr@Latn]=Opie aplet menija napravljen je u %{dest} +Comment[sv]=Ett Opie-menyprogram skapades i %{dest} +Comment[tr]=Bir opie menü küçük uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 opie 菜单小程序 +Comment[zh_TW]=一個 Opie 選單小程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/opiemenu/opiemenu.tdevtemplate b/languages/cpp/app_templates/opiemenu/opiemenu.tdevtemplate deleted file mode 100644 index 204cf5d8..00000000 --- a/languages/cpp/app_templates/opiemenu/opiemenu.tdevtemplate +++ /dev/null @@ -1,132 +0,0 @@ -# TDE Config File -[General] -Name=Opie Menu Applet -Name[ca]=Una miniaplicació de menú per a Opie -Name[da]=Opie menu-applet -Name[de]=Opie-Menü-Miniprogramm (Applet) -Name[el]=Μικροεφαρμογή μενού Opie -Name[es]=Applet de menú para Opie -Name[et]=Opie menüüaplett -Name[eu]=Opie-ren menu applet-a -Name[fa]=برنامک گزینگان Opie -Name[fr]=Applet de menu Opie -Name[ga]=Feidhmchláirín Roghchláir Opie -Name[gl]=Applet de menú Opie -Name[hu]=Opie-s menü-kisalkalmazás -Name[it]=Applet di menu Opie -Name[ja]=Opie メニューアプレット -Name[nds]=Menü-Lüttprogramm för Opie -Name[ne]=ओपिइ मेनु एप्लेट -Name[nl]=Opie-menuapplet -Name[pl]=Aplet menu Opie -Name[pt]='Applet' do Menu do Opie -Name[pt_BR]='Applet' do Menu do Opie -Name[ru]=Аплет меню Opie -Name[sk]=Opie menu pplet -Name[sr]=Opie аплет менија -Name[sr@Latn]=Opie aplet menija -Name[sv]=Opie-menyminiprogram -Name[tr]=Opie Menü Küçük Uygulaması -Name[zh_CN]=Opie 菜单小程序 -Name[zh_TW]=Opie 選單小程式 -Icon=qmakeapp.png -Category=C++/Embedded -Comment=Generate an Opie menu applet. -Comment[ca]=Genera una miniaplicació de menú per a Opie. -Comment[da]=Generér en Opie menu-applet. -Comment[de]=Erstellt ein Opie-Menü-Miniprogramm (Applet). -Comment[el]=Δημιουργία μίας μικροεφαρμογής μενού Opie. -Comment[es]=Genera un applet de menú para Opie. -Comment[et]=Opie menüüapleti loomine. -Comment[eu]=Sortu Opie-ren menu applet bat. -Comment[fa]=یک برنامک گزینگان Opie تولید می‌کند. -Comment[fr]=Génère un applet de menu Opie. -Comment[gl]=Xera un applet de menu para Opie. -Comment[hu]=Létrehoz egy Opie-s menü-kisalkalmazást. -Comment[it]=Genera un'applet di menu Opie. -Comment[ja]=Opie メニューアプレットを作成 -Comment[nds]=Stellt en Menü-Lüttprogramm för Opie op. -Comment[ne]=ओपिइ मेनु एप्लेट उत्पन्न गर्नुहोस् -Comment[nl]=Genereert een Opie-menuapplet. -Comment[pl]=Generuje aplet menu Opie -Comment[pt]=Gera uma 'applet' do menu do Opie. -Comment[pt_BR]=Gera uma 'applet' do menu do Opie. -Comment[ru]=Создание аплета меню Opie. -Comment[sk]=Vygeneruje Opie menu applet. -Comment[sr]=Прави Opie аплет менија. -Comment[sr@Latn]=Pravi Opie aplet menija. -Comment[sv]=Skapa ett Opie-menyminiprogram. -Comment[tr]=Bir Opie menü küçük uygulaması yarat -Comment[zh_CN]=生成一个 Opie 菜单小程序。 -Comment[zh_TW]=產生一個 Opie 選單小程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp -Archive=opiemenu.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir0] -Type=mkdir -Dir=%{dest}/pics - -[MkDir1] -Type=mkdir -Dir=%{dest}/pics/%{APPNAMELC} - -[FILE2] -Type=install -Source=%{src}/Example.png -Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png -Process=false - -[FILE3] -Type=install -Source=%{src}/app.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[FILE4] -Type=install -Source=%{src}/simpleimpl.cpp -Dest=%{dest}/%{APPNAMELC}.cpp - -[FILE5] -Type=install -Source=%{src}/simpleimpl.h -Dest=%{dest}/%{APPNAMELC}.h - -[MSG] -Type=message -Comment=An opie menu applet was created in %{dest} -Comment[ca]=Una miniaplicació de menú per a Opie ha estat creat en %{dest} -Comment[da]=En opie menu-applet blev oprettet i %{dest} -Comment[de]=Ein Opie-Menü-Miniprogramm (Applet) wurde in %{dest} erstellt. -Comment[el]=Μία μικροεφαρμογή μενού opie δημιουργήθηκε στο %{dest} -Comment[es]=Un applet de menú para Opie ha sido creado en %{dest} -Comment[et]=Opie menüüaplett loodi asukohta %{dest} -Comment[eu]= Opie-ren menu applet bat sortu da hemen: %{dest} -Comment[fa]=یک برنامک گزینگان opie در %{dest} ایجاد شد -Comment[fr]=Un applet de menu Opie a été créé dans %{dest} -Comment[ga]=Cruthaíodh feidhmchláirín roghchláir opie i %{dest} -Comment[gl]=Creouse un applet de menu para opie en %{dest} -Comment[hu]=Létrejött egy Opie-s menü-kisalkalmazás itt: %{dest} -Comment[it]=È stata creata un'applet di menu Opie in %{dest} -Comment[ja]=Opie メニューアプレットを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Menü-Lüttprogramm för Opie opstellt -Comment[ne]=ओपिइ मेनु एप्लेट %{dest} मा सिर्जना गरियो -Comment[nl]=Een Opie-menuapplet is aangemaakt in %{dest} -Comment[pl]=Aplet menu Opie został utworzony w %{dest} -Comment[pt]=Foi criada uma 'applet' do menu do Opie em %{dest} -Comment[pt_BR]=Foi criada uma 'applet' do menu do Opie em %{dest} -Comment[ru]=Аплет меню Opie создан в %{dest} -Comment[sk]=Opie menu applet bol vytvorený v %{dest} -Comment[sr]=Opie аплет менија направљен је у %{dest} -Comment[sr@Latn]=Opie aplet menija napravljen je u %{dest} -Comment[sv]=Ett Opie-menyprogram skapades i %{dest} -Comment[tr]=Bir opie menü küçük uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 opie 菜单小程序 -Comment[zh_TW]=一個 Opie 選單小程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/opienet/CMakeLists.txt b/languages/cpp/app_templates/opienet/CMakeLists.txt index 19c969d3..a08e71be 100644 --- a/languages/cpp/app_templates/opienet/CMakeLists.txt +++ b/languages/cpp/app_templates/opienet/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( opienet.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opienet.tar.gz opienet.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opienet.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opienet.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opienet/Makefile.am b/languages/cpp/app_templates/opienet/Makefile.am index d23c835b..5245c17e 100644 --- a/languages/cpp/app_templates/opienet/Makefile.am +++ b/languages/cpp/app_templates/opienet/Makefile.am @@ -5,10 +5,10 @@ dataFiles = Makefile.am Example.png app.tdevelop app.pro \ templateName = opienet ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opienet/app.tdevelop b/languages/cpp/app_templates/opienet/app.tdevelop index 1292af0e..7717a098 100644 --- a/languages/cpp/app_templates/opienet/app.tdevelop +++ b/languages/cpp/app_templates/opienet/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + false @@ -93,15 +93,15 @@ -qws - - + + - + @@ -120,11 +120,11 @@ true - + true 2 - - + + -f -dP @@ -133,11 +133,11 @@ -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opienet/opienet.kdevtemplate b/languages/cpp/app_templates/opienet/opienet.kdevtemplate new file mode 100644 index 00000000..23223d28 --- /dev/null +++ b/languages/cpp/app_templates/opienet/opienet.kdevtemplate @@ -0,0 +1,142 @@ +# TDE Config File +[General] +Name=Opie Networksettings +Name[br]=Kefluniadur rouedad Opie +Name[ca]=Connector de preferències de xarxa per a Opie +Name[da]=Opie netværksopsætning +Name[de]=Opie-Netzwerkeinstellungen +Name[el]=Ρυθμίσεις δικτύου Opie +Name[es]=Preferencias de red para Opie +Name[et]=Opie võrguseadustused +Name[eu]=Opie-ren sare-ezarpenak +Name[fa]=تنظیمات شبکۀ Opie +Name[fr]=Paramètres réseau pour Opie +Name[ga]=Socruithe Líonra Opie +Name[hu]=Opie-s hálózati beállítómodul +Name[it]=Impostazioni di rete di Opie +Name[ja]=Opie ネットワーク設定 +Name[nds]=Opie-Nettwarkinstellen +Name[ne]=ओपिइ सञ्जाल सेटिङ +Name[nl]=Opie-netwerkinstellingen +Name[pl]=Ustawienia sieciowe Opie +Name[pt]=Configuração de rede do Opie +Name[pt_BR]=Configuração de rede do Opie +Name[ru]=Параметры сети Opie +Name[sk]=Opie sieťové nastavenia +Name[sr]=Opie мрежна подешавања +Name[sr@Latn]=Opie mrežna podešavanja +Name[sv]=Opie nätverksinställningar +Name[tr]=Opie Ağ Ayarları +Name[zh_CN]=Opie 网络设置 +Name[zh_TW]=Opie 網路設定 +Icon=qmakeapp.png +Category=C++/Embedded +Comment=Generate an Opie network config plugin. +Comment[ca]=Genera un connector de preferències de xarxa per a Opie. +Comment[da]=Generér en Opie netværks-config-plugin. +Comment[de]=Erstellt ein Modul für Opie-Netzwerkeinstellungen. +Comment[el]=Δημιουργία ενός πρόσθετου ρύθμισης δικτύου Opie. +Comment[es]=Genera un complemento de configuración de red para Opie. +Comment[et]=Opie võrguseadistuste plugina loomine. +Comment[eu]=Sortu Opie-ren sare-ezarpenetarako plugin bat. +Comment[fa]=یک وصلۀ پیکربندی شبکۀ Opie تولید می‌کند. +Comment[fr]=Génère un module externe de configuration réseau pour Opie. +Comment[ga]=Cruthaigh breiseán cumraíochta líonra Opie. +Comment[gl]=Xera unha extensión de configuración da rede para Opie. +Comment[hu]=Létrehoz egy Opie-s hálózati beállítómodult. +Comment[it]=Genera un plugin di configurazione di rete Opie. +Comment[ja]=Opie ネットワーク設定プラグインを作成 +Comment[nds]=Stellt en Moduul för Opie-Nettwarkinstellen op. +Comment[ne]=ओपिइ सञ्जाल कन्फिग प्लगइन उत्पन्न गर्नुहोस् +Comment[nl]=Genereert een Opie netwerkconfiguratieplugin. +Comment[pl]=Generuje wtyczkę do ustawień sieciowych Opie +Comment[pt]=Gera um 'plugin' de configuração da rede do Opie. +Comment[pt_BR]=Gera um 'plugin' de configuração da rede do Opie. +Comment[ru]=Создание модуля настройки сети Opie. +Comment[sk]=Vygeneruje Opie modul pre sieťovú konfiguráciu. +Comment[sr]=Прави прикључак за Opie мрежна подешавања. +Comment[sr@Latn]=Pravi priključak za Opie mrežna podešavanja. +Comment[sv]=Skapa ett Opie-insticksprogram för nätverksinställning. +Comment[tr]=Opie ağ ayar eklentisi yarat. +Comment[zh_CN]=生成一个 Opie 网络配置插件。 +Comment[zh_TW]=產生一個 Opie 網路設定外掛程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp +Archive=opienet.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir0] +Type=mkdir +Dir=%{dest}/pics + +[MkDir1] +Type=mkdir +Dir=%{dest}/pics/%{APPNAMELC} + +[FILE2] +Type=install +Source=%{src}/Example.png +Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png +Process=false + +[FILE3] +Type=install +Source=%{src}/app.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[FILE4] +Type=install +Source=%{src}/simplemodule.cpp +Dest=%{dest}/%{APPNAMELC}module.cpp + +[FILE5] +Type=install +Source=%{src}/simpleiface.cpp +Dest=%{dest}/%{APPNAMELC}iface.cpp + +[FILE6] +Type=install +Source=%{src}/simplemodule.h +Dest=%{dest}/%{APPNAMELC}module.h + +[FILE7] +Type=install +Source=%{src}/simpleiface.h +Dest=%{dest}/%{APPNAMELC}iface.h + +[MSG] +Type=message +Comment=An opie network settings plugin was created in %{dest} +Comment[ca]=Un connector de preferències de xarxa per a Opie ha estat creat en %{dest} +Comment[da]=En opie netværksopsætning-plugin blev oprettet i %{dest} +Comment[de]=Ein Modul für Opie-Netzwerkeinstellungen wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο ρύθμισης δικτύου του opie δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento de preferencias de red para Opie ha sido creado en %{dest} +Comment[et]=Opie võrguseadistuste plugin loodi asukohta %{dest} +Comment[eu]=Opie-ren sare-ezarpenetarako plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ تنظیمات شبکۀ opie در %{dest} ایجاد شد +Comment[fr]=Un module externe de configuration réseau pour Opie a été créé dans %{dest} +Comment[gl]=Creouse unha extensión de configuración da rede para opie en %{dest} +Comment[hu]=Létrejött egy Opie-s hálózati beállítómodul itt: %{dest} +Comment[it]=È stato creato un plugin per le impostazioni di rete di Opie in %{dest} +Comment[ja]=Opie ネットワーク設定プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Nettwarkinstellenmoduul för Opie opstellt +Comment[ne]=ओपिइ सञ्जाल सेटिङ प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een Opie netwerkconfiguratieplugin is aangemaakt in %{dest} +Comment[pl]=Wtyczka ustawień sieciowych Opie została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' de configuração da rede do Opie em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' de configuração da rede do Opie em %{dest} +Comment[ru]=Модуль настройки сети Opie создан в %{dest} +Comment[sk]=Opie module pre sieťové nastavenia bol vytvorený v %{dest} +Comment[sr]=Прикључак за Opie мрежна подешавања направљен је у %{dest} +Comment[sr@Latn]=Priključak za Opie mrežna podešavanja napravljen je u %{dest} +Comment[sv]=Ett Opie-insticksprogram för nätverksinställning skapades i %{dest} +Comment[tr]=Bir opie ağ ayar eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 opie 网络设置插件 +Comment[zh_TW]=一個 Opie 網路設定外掛程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/opienet/opienet.tdevtemplate b/languages/cpp/app_templates/opienet/opienet.tdevtemplate deleted file mode 100644 index 23223d28..00000000 --- a/languages/cpp/app_templates/opienet/opienet.tdevtemplate +++ /dev/null @@ -1,142 +0,0 @@ -# TDE Config File -[General] -Name=Opie Networksettings -Name[br]=Kefluniadur rouedad Opie -Name[ca]=Connector de preferències de xarxa per a Opie -Name[da]=Opie netværksopsætning -Name[de]=Opie-Netzwerkeinstellungen -Name[el]=Ρυθμίσεις δικτύου Opie -Name[es]=Preferencias de red para Opie -Name[et]=Opie võrguseadustused -Name[eu]=Opie-ren sare-ezarpenak -Name[fa]=تنظیمات شبکۀ Opie -Name[fr]=Paramètres réseau pour Opie -Name[ga]=Socruithe Líonra Opie -Name[hu]=Opie-s hálózati beállítómodul -Name[it]=Impostazioni di rete di Opie -Name[ja]=Opie ネットワーク設定 -Name[nds]=Opie-Nettwarkinstellen -Name[ne]=ओपिइ सञ्जाल सेटिङ -Name[nl]=Opie-netwerkinstellingen -Name[pl]=Ustawienia sieciowe Opie -Name[pt]=Configuração de rede do Opie -Name[pt_BR]=Configuração de rede do Opie -Name[ru]=Параметры сети Opie -Name[sk]=Opie sieťové nastavenia -Name[sr]=Opie мрежна подешавања -Name[sr@Latn]=Opie mrežna podešavanja -Name[sv]=Opie nätverksinställningar -Name[tr]=Opie Ağ Ayarları -Name[zh_CN]=Opie 网络设置 -Name[zh_TW]=Opie 網路設定 -Icon=qmakeapp.png -Category=C++/Embedded -Comment=Generate an Opie network config plugin. -Comment[ca]=Genera un connector de preferències de xarxa per a Opie. -Comment[da]=Generér en Opie netværks-config-plugin. -Comment[de]=Erstellt ein Modul für Opie-Netzwerkeinstellungen. -Comment[el]=Δημιουργία ενός πρόσθετου ρύθμισης δικτύου Opie. -Comment[es]=Genera un complemento de configuración de red para Opie. -Comment[et]=Opie võrguseadistuste plugina loomine. -Comment[eu]=Sortu Opie-ren sare-ezarpenetarako plugin bat. -Comment[fa]=یک وصلۀ پیکربندی شبکۀ Opie تولید می‌کند. -Comment[fr]=Génère un module externe de configuration réseau pour Opie. -Comment[ga]=Cruthaigh breiseán cumraíochta líonra Opie. -Comment[gl]=Xera unha extensión de configuración da rede para Opie. -Comment[hu]=Létrehoz egy Opie-s hálózati beállítómodult. -Comment[it]=Genera un plugin di configurazione di rete Opie. -Comment[ja]=Opie ネットワーク設定プラグインを作成 -Comment[nds]=Stellt en Moduul för Opie-Nettwarkinstellen op. -Comment[ne]=ओपिइ सञ्जाल कन्फिग प्लगइन उत्पन्न गर्नुहोस् -Comment[nl]=Genereert een Opie netwerkconfiguratieplugin. -Comment[pl]=Generuje wtyczkę do ustawień sieciowych Opie -Comment[pt]=Gera um 'plugin' de configuração da rede do Opie. -Comment[pt_BR]=Gera um 'plugin' de configuração da rede do Opie. -Comment[ru]=Создание модуля настройки сети Opie. -Comment[sk]=Vygeneruje Opie modul pre sieťovú konfiguráciu. -Comment[sr]=Прави прикључак за Opie мрежна подешавања. -Comment[sr@Latn]=Pravi priključak za Opie mrežna podešavanja. -Comment[sv]=Skapa ett Opie-insticksprogram för nätverksinställning. -Comment[tr]=Opie ağ ayar eklentisi yarat. -Comment[zh_CN]=生成一个 Opie 网络配置插件。 -Comment[zh_TW]=產生一個 Opie 網路設定外掛程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp -Archive=opienet.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir0] -Type=mkdir -Dir=%{dest}/pics - -[MkDir1] -Type=mkdir -Dir=%{dest}/pics/%{APPNAMELC} - -[FILE2] -Type=install -Source=%{src}/Example.png -Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png -Process=false - -[FILE3] -Type=install -Source=%{src}/app.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[FILE4] -Type=install -Source=%{src}/simplemodule.cpp -Dest=%{dest}/%{APPNAMELC}module.cpp - -[FILE5] -Type=install -Source=%{src}/simpleiface.cpp -Dest=%{dest}/%{APPNAMELC}iface.cpp - -[FILE6] -Type=install -Source=%{src}/simplemodule.h -Dest=%{dest}/%{APPNAMELC}module.h - -[FILE7] -Type=install -Source=%{src}/simpleiface.h -Dest=%{dest}/%{APPNAMELC}iface.h - -[MSG] -Type=message -Comment=An opie network settings plugin was created in %{dest} -Comment[ca]=Un connector de preferències de xarxa per a Opie ha estat creat en %{dest} -Comment[da]=En opie netværksopsætning-plugin blev oprettet i %{dest} -Comment[de]=Ein Modul für Opie-Netzwerkeinstellungen wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο ρύθμισης δικτύου του opie δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento de preferencias de red para Opie ha sido creado en %{dest} -Comment[et]=Opie võrguseadistuste plugin loodi asukohta %{dest} -Comment[eu]=Opie-ren sare-ezarpenetarako plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ تنظیمات شبکۀ opie در %{dest} ایجاد شد -Comment[fr]=Un module externe de configuration réseau pour Opie a été créé dans %{dest} -Comment[gl]=Creouse unha extensión de configuración da rede para opie en %{dest} -Comment[hu]=Létrejött egy Opie-s hálózati beállítómodul itt: %{dest} -Comment[it]=È stato creato un plugin per le impostazioni di rete di Opie in %{dest} -Comment[ja]=Opie ネットワーク設定プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Nettwarkinstellenmoduul för Opie opstellt -Comment[ne]=ओपिइ सञ्जाल सेटिङ प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een Opie netwerkconfiguratieplugin is aangemaakt in %{dest} -Comment[pl]=Wtyczka ustawień sieciowych Opie została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' de configuração da rede do Opie em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' de configuração da rede do Opie em %{dest} -Comment[ru]=Модуль настройки сети Opie создан в %{dest} -Comment[sk]=Opie module pre sieťové nastavenia bol vytvorený v %{dest} -Comment[sr]=Прикључак за Opie мрежна подешавања направљен је у %{dest} -Comment[sr@Latn]=Priključak za Opie mrežna podešavanja napravljen je u %{dest} -Comment[sv]=Ett Opie-insticksprogram för nätverksinställning skapades i %{dest} -Comment[tr]=Bir opie ağ ayar eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 opie 网络设置插件 -Comment[zh_TW]=一個 Opie 網路設定外掛程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/opietoday/CMakeLists.txt b/languages/cpp/app_templates/opietoday/CMakeLists.txt index 2f9e0dd1..6c7c4d66 100644 --- a/languages/cpp/app_templates/opietoday/CMakeLists.txt +++ b/languages/cpp/app_templates/opietoday/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( opietoday.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opietoday.tar.gz opietoday.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opietoday.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opietoday.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opietoday/Makefile.am b/languages/cpp/app_templates/opietoday/Makefile.am index 8c9ec514..6c999369 100644 --- a/languages/cpp/app_templates/opietoday/Makefile.am +++ b/languages/cpp/app_templates/opietoday/Makefile.am @@ -5,10 +5,10 @@ dataFiles = Makefile.am Example.png app.tdevelop app.pro exampleplugin.cpp \ templateName = opietoday ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opietoday/app.tdevelop b/languages/cpp/app_templates/opietoday/app.tdevelop index 043326d3..c387911b 100644 --- a/languages/cpp/app_templates/opietoday/app.tdevelop +++ b/languages/cpp/app_templates/opietoday/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + false @@ -93,15 +93,15 @@ -qws - - + + - + @@ -120,11 +120,11 @@ true - + true 2 - - + + -f -dP @@ -133,11 +133,11 @@ -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opietoday/opietoday.kdevtemplate b/languages/cpp/app_templates/opietoday/opietoday.kdevtemplate new file mode 100644 index 00000000..91bb39be --- /dev/null +++ b/languages/cpp/app_templates/opietoday/opietoday.kdevtemplate @@ -0,0 +1,151 @@ +# TDE Config File +[General] +Name=Opie Today Plugin +Name[ca]=Connector de tasques pendents per a Opie +Name[da]=Opie Today-plugin +Name[de]=Opie-Today-Modul +Name[el]=Πρόσθετο Σήμερα του Opie +Name[es]=Complemento de tareas pendientes para Opie +Name[et]=Opie Today plugin +Name[eu]=Opie-ren gaur-plugina +Name[fa]=وصلۀ Opie Today +Name[fr]=Module externe Opie « Today » +Name[ga]=Breiseán Inniu Opie +Name[gl]=Extensión 'today' para Opie +Name[hu]=Opie Today-modul +Name[it]=Plugin today di Opie +Name[ja]=Opie Today プラグイン +Name[nds]=Moduul för Opie-Today +Name[ne]=ओपिइ टुडे प्लगइन +Name[nl]=Opie Today-plugin +Name[pl]=Wtyczka Opie Dzisiaj +Name[pt]='Plugin' de Dados de Hoje do Opie +Name[pt_BR]='Plugin' de Dados de Hoje do Opie +Name[ru]=Модуль задач Opie +Name[sk]=Opie dnešný modul +Name[sr]=Прикључак за Opie данас +Name[sr@Latn]=Priključak za Opie danas +Name[sv]=Opie Idag-insticksprogram +Name[tr]=Opie Bugün Eklentisi +Name[zh_CN]=Opie 今日插件 +Name[zh_TW]=Opie 今天外掛程式 +Icon=qmakeapp.png +Category=C++/Embedded +Comment=Generate an Opie today plugin. +Comment[ca]=Genera un connector de tasques pendents per a Opie. +Comment[da]=Generér et Opie today-plugin. +Comment[de]=Erstellt ein Opie-Today-Modul +Comment[el]=Δημιουργία ενός πρόσθετου Σήμερα του Opie. +Comment[es]=Genera un complemento de tareas pendientes para Opie. +Comment[et]=Opie Today plugina loomine. +Comment[eu]=Sortu Opie-ren gaur plugin bat. +Comment[fa]=یک وصلۀ Opie today تولید می‌کند. +Comment[fr]=Génère un module externe Opie « Today ». +Comment[gl]=Xera unha extensión 'today' para Opie +Comment[hu]=Létrehoz egy Opie Today-modult. +Comment[it]=Genera un plugin today di Opie. +Comment[ja]=Opie today プラグインを作成 +Comment[nds]=Stellt en Moduul för Opie-Today op. +Comment[ne]=ओपिइ टुडे प्लगइन उत्पन्न गर्नुहोस् +Comment[nl]=Genereert een Opie today-plugin. +Comment[pl]=Generuje wtyczkę Opie "Dzisiaj". +Comment[pt]=Gera um 'plugin' para dados de hoje do Opie. +Comment[pt_BR]=Gera um 'plugin' para dados de hoje do Opie. +Comment[ru]=Создание модуля задач Opie. +Comment[sk]=Vygeneruje Opie dnešný modul. +Comment[sr]=Прави прикључак за Opie данас. +Comment[sr@Latn]=Pravi priključak za Opie danas. +Comment[sv]=Skapar ett Opie Idag-insticksprogram. +Comment[tr]=Bir Opie bugün eklentisi yarat +Comment[zh_CN]=生成一个 Opie 今日插件。 +Comment[zh_TW]=產生一個 Opie 今天外掛程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp +Archive=opietoday.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir0] +Type=mkdir +Dir=%{dest}/pics + +[MkDir1] +Type=mkdir +Dir=%{dest}/pics/%{APPNAMELC} + +[FILE2] +Type=install +Source=%{src}/Example.png +Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png +Process=false + +[FILE3] +Type=install +Source=%{src}/app.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[FILE4] +Type=install +Source=%{src}/exampleplugin.cpp +Dest=%{dest}/%{APPNAMELC}.cpp + +[FILE5] +Type=install +Source=%{src}/examplepluginwidget.cpp +Dest=%{dest}/%{APPNAMELC}widget.cpp + +[FILE6] +Type=install +Source=%{src}/examplepluginimpl.cpp +Dest=%{dest}/%{APPNAMELC}impl.cpp + +[FILE7] +Type=install +Source=%{src}/exampleplugin.h +Dest=%{dest}/%{APPNAMELC}.h + +[FILE8] +Type=install +Source=%{src}/examplepluginwidget.h +Dest=%{dest}/%{APPNAMELC}widget.h + +[FILE9] +Type=install +Source=%{src}/examplepluginimpl.h +Dest=%{dest}/%{APPNAMELC}impl.h + +[MSG] +Type=message +Comment=An opie today plugin was created in %{dest} +Comment[ca]=Un connector de tasques pendents per a Opie ha estat creat en %{dest} +Comment[da]=Et opie today-plugin blev oprettet i %{dest} +Comment[de]=Ein Opie-Today-Modul wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο Σήμερα του opie δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento de tareas pendientes para Opie ha sido creado en %{dest} +Comment[et]=Opie Today plugin loodi asukohta %{dest} +Comment[eu]=Opie-ren gaur plugin bat sortu da hemen %{dest} +Comment[fa]=یک وصلۀ opie today در %{dest} ایجاد شد +Comment[fr]=Un module externe Opie « Today » a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán inniu opie i %{dest} +Comment[gl]=Creouse unha extensión 'today' para opie en %{dest} +Comment[hu]=Létrejött egy Opie Today-modul itt: %{dest} +Comment[it]=È stato creato un plugin today di Opie in %{dest} +Comment[ja]=Opie today プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Moduul för Opie-Today opstellt +Comment[ne]=ओपिइ टुडे प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een Opie today-plugins is aangemaakt in %{dest} +Comment[pl]=Wtyczka Opie Dzisiaj została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' para dados de hoje do Opie em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' para dados de hoje do Opie em %{dest} +Comment[ru]=Модуль задач Opie создан в %{dest} +Comment[sk]=Opie dnešný modul bol vytvorený v %{dest} +Comment[sr]=Прикључак за opie данас направљен је у %{dest} +Comment[sr@Latn]=Priključak za opie danas napravljen je u %{dest} +Comment[sv]=Ett Opie Idag-insticksprogram skapades i %{dest} +Comment[tr]=Bir Opie bugün eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 opie 今日插件 +Comment[zh_TW]=一個 Opie 今天外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/opietoday/opietoday.tdevtemplate b/languages/cpp/app_templates/opietoday/opietoday.tdevtemplate deleted file mode 100644 index 91bb39be..00000000 --- a/languages/cpp/app_templates/opietoday/opietoday.tdevtemplate +++ /dev/null @@ -1,151 +0,0 @@ -# TDE Config File -[General] -Name=Opie Today Plugin -Name[ca]=Connector de tasques pendents per a Opie -Name[da]=Opie Today-plugin -Name[de]=Opie-Today-Modul -Name[el]=Πρόσθετο Σήμερα του Opie -Name[es]=Complemento de tareas pendientes para Opie -Name[et]=Opie Today plugin -Name[eu]=Opie-ren gaur-plugina -Name[fa]=وصلۀ Opie Today -Name[fr]=Module externe Opie « Today » -Name[ga]=Breiseán Inniu Opie -Name[gl]=Extensión 'today' para Opie -Name[hu]=Opie Today-modul -Name[it]=Plugin today di Opie -Name[ja]=Opie Today プラグイン -Name[nds]=Moduul för Opie-Today -Name[ne]=ओपिइ टुडे प्लगइन -Name[nl]=Opie Today-plugin -Name[pl]=Wtyczka Opie Dzisiaj -Name[pt]='Plugin' de Dados de Hoje do Opie -Name[pt_BR]='Plugin' de Dados de Hoje do Opie -Name[ru]=Модуль задач Opie -Name[sk]=Opie dnešný modul -Name[sr]=Прикључак за Opie данас -Name[sr@Latn]=Priključak za Opie danas -Name[sv]=Opie Idag-insticksprogram -Name[tr]=Opie Bugün Eklentisi -Name[zh_CN]=Opie 今日插件 -Name[zh_TW]=Opie 今天外掛程式 -Icon=qmakeapp.png -Category=C++/Embedded -Comment=Generate an Opie today plugin. -Comment[ca]=Genera un connector de tasques pendents per a Opie. -Comment[da]=Generér et Opie today-plugin. -Comment[de]=Erstellt ein Opie-Today-Modul -Comment[el]=Δημιουργία ενός πρόσθετου Σήμερα του Opie. -Comment[es]=Genera un complemento de tareas pendientes para Opie. -Comment[et]=Opie Today plugina loomine. -Comment[eu]=Sortu Opie-ren gaur plugin bat. -Comment[fa]=یک وصلۀ Opie today تولید می‌کند. -Comment[fr]=Génère un module externe Opie « Today ». -Comment[gl]=Xera unha extensión 'today' para Opie -Comment[hu]=Létrehoz egy Opie Today-modult. -Comment[it]=Genera un plugin today di Opie. -Comment[ja]=Opie today プラグインを作成 -Comment[nds]=Stellt en Moduul för Opie-Today op. -Comment[ne]=ओपिइ टुडे प्लगइन उत्पन्न गर्नुहोस् -Comment[nl]=Genereert een Opie today-plugin. -Comment[pl]=Generuje wtyczkę Opie "Dzisiaj". -Comment[pt]=Gera um 'plugin' para dados de hoje do Opie. -Comment[pt_BR]=Gera um 'plugin' para dados de hoje do Opie. -Comment[ru]=Создание модуля задач Opie. -Comment[sk]=Vygeneruje Opie dnešný modul. -Comment[sr]=Прави прикључак за Opie данас. -Comment[sr@Latn]=Pravi priključak za Opie danas. -Comment[sv]=Skapar ett Opie Idag-insticksprogram. -Comment[tr]=Bir Opie bugün eklentisi yarat -Comment[zh_CN]=生成一个 Opie 今日插件。 -Comment[zh_TW]=產生一個 Opie 今天外掛程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp -Archive=opietoday.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir0] -Type=mkdir -Dir=%{dest}/pics - -[MkDir1] -Type=mkdir -Dir=%{dest}/pics/%{APPNAMELC} - -[FILE2] -Type=install -Source=%{src}/Example.png -Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png -Process=false - -[FILE3] -Type=install -Source=%{src}/app.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[FILE4] -Type=install -Source=%{src}/exampleplugin.cpp -Dest=%{dest}/%{APPNAMELC}.cpp - -[FILE5] -Type=install -Source=%{src}/examplepluginwidget.cpp -Dest=%{dest}/%{APPNAMELC}widget.cpp - -[FILE6] -Type=install -Source=%{src}/examplepluginimpl.cpp -Dest=%{dest}/%{APPNAMELC}impl.cpp - -[FILE7] -Type=install -Source=%{src}/exampleplugin.h -Dest=%{dest}/%{APPNAMELC}.h - -[FILE8] -Type=install -Source=%{src}/examplepluginwidget.h -Dest=%{dest}/%{APPNAMELC}widget.h - -[FILE9] -Type=install -Source=%{src}/examplepluginimpl.h -Dest=%{dest}/%{APPNAMELC}impl.h - -[MSG] -Type=message -Comment=An opie today plugin was created in %{dest} -Comment[ca]=Un connector de tasques pendents per a Opie ha estat creat en %{dest} -Comment[da]=Et opie today-plugin blev oprettet i %{dest} -Comment[de]=Ein Opie-Today-Modul wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο Σήμερα του opie δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento de tareas pendientes para Opie ha sido creado en %{dest} -Comment[et]=Opie Today plugin loodi asukohta %{dest} -Comment[eu]=Opie-ren gaur plugin bat sortu da hemen %{dest} -Comment[fa]=یک وصلۀ opie today در %{dest} ایجاد شد -Comment[fr]=Un module externe Opie « Today » a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán inniu opie i %{dest} -Comment[gl]=Creouse unha extensión 'today' para opie en %{dest} -Comment[hu]=Létrejött egy Opie Today-modul itt: %{dest} -Comment[it]=È stato creato un plugin today di Opie in %{dest} -Comment[ja]=Opie today プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Moduul för Opie-Today opstellt -Comment[ne]=ओपिइ टुडे प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een Opie today-plugins is aangemaakt in %{dest} -Comment[pl]=Wtyczka Opie Dzisiaj została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' para dados de hoje do Opie em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' para dados de hoje do Opie em %{dest} -Comment[ru]=Модуль задач Opie создан в %{dest} -Comment[sk]=Opie dnešný modul bol vytvorený v %{dest} -Comment[sr]=Прикључак за opie данас направљен је у %{dest} -Comment[sr@Latn]=Priključak za opie danas napravljen je u %{dest} -Comment[sv]=Ett Opie Idag-insticksprogram skapades i %{dest} -Comment[tr]=Bir Opie bugün eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 opie 今日插件 -Comment[zh_TW]=一個 Opie 今天外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/prc-tool/Makefile.am b/languages/cpp/app_templates/prc-tool/Makefile.am index ee4e2182..06f097a4 100644 --- a/languages/cpp/app_templates/prc-tool/Makefile.am +++ b/languages/cpp/app_templates/prc-tool/Makefile.am @@ -3,10 +3,10 @@ dataFiles = prc-tool.png src-Makefile prc-tool.tdevelop callback.h \ templateName = prc-tool ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/prc-tool/prc-tool.kdevtemplate b/languages/cpp/app_templates/prc-tool/prc-tool.kdevtemplate new file mode 100644 index 00000000..8cfea15f --- /dev/null +++ b/languages/cpp/app_templates/prc-tool/prc-tool.kdevtemplate @@ -0,0 +1,136 @@ +# TDE Config File +[General] +Name=Hello world program +Name[ca]=Programa Hello world +Name[da]=Goddag verden program +Name[de]="Hello World"-Programm +Name[el]=Πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» +Name[et]="Tere,maailm" programm +Name[eu]="Kaixo mundua" programa +Name[fa]=برنامۀ Hello world +Name[fr]=Programme « Bonjour monde » +Name[ga]=Ríomhchlár "Hello world" +Name[gl]=Programa Ola mundo +Name[it]=Programma di "Hello world" +Name[ja]=Hello world プログラム +Name[nds]="Moin Welt"-Programm +Name[ne]=हेल्डो वोल्ड कार्यक्रम +Name[nl]=Hello World-programma +Name[pl]=Program 'Witaj świecie' +Name[pt]=Programa 'Olá mundo' +Name[pt_BR]=Programa 'Olá mundo' +Name[ru]=Программа Hello world +Name[sk]=Ahoj svet program +Name[sl]=Program Hello world +Name[sr]=Програм „Здраво свете“ +Name[sr@Latn]=Program „Zdravo svete“ +Name[sv]=Hello world-program +Name[tr]=Merhaba Dünya Programı +Name[zh_CN]=Hello world 程序 +Name[zh_TW]=Hello world 程式 +Icon= # got none +Category=C/PalmOS +Comment=Generates a template for palm application +Comment[ca]=Genera una plantilla d'aplicació per a Palm +Comment[da]=Genererer en skabelon for et palm-program +Comment[de]=Erstellt das Gerüst für eine Palm-Anwendung +Comment[el]=Δημιουργία ενός προτύπου εφαρμογής για palm +Comment[es]=Genera una plantilla para una aplicación Palm +Comment[et]=Palmi rakenduse malli loomine. +Comment[eu]=Palm aplikazio baten txantiloi bat sortzen du +Comment[fa]=قالبی برای کاربرد palm تولید می‌کند +Comment[fr]=Génère un modèle pour une application Palm +Comment[gl]=Xera un modelo para aplicación palm +Comment[hu]=Létrehoz egy Palm-os alkalmazássablont +Comment[it]=Genera un modello per un'applicazione palm +Comment[ja]=Palm アプリケーションのためのテンプレートを作成します +Comment[nds]=Stellt dat Rahmenwark för en Palm-Programm op +Comment[ne]=पाम अनुप्रयोगका लागि टेम्प्लेट उत्पन्न गर्दछ +Comment[nl]=Genereert een sjabloon voor een Palm-toepassing +Comment[pl]=Generuje szablon programu dla Palma +Comment[pt]=Gera um modelo para aplicações do Palm +Comment[pt_BR]=Gera um modelo para aplicações do Palm +Comment[ru]=Создание простого приложения Palm +Comment[sk]=Vygeneruje šablónu pre Palm aplikáciu +Comment[sr]=Прави шаблон за palm програм +Comment[sr@Latn]=Pravi šablon za palm program +Comment[sv]=Skapar en mall för ett Palm-program +Comment[tr]=Bir avuçiçi uygulaması için bir şablon yaratır +Comment[zh_CN]=生成一个 Palm 应用程序的模板 +Comment[zh_TW]=產生一個 palm 應用程式樣本 +FileTemplates=h,CStyle,c,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAME}.c +Archive=prc-tool.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/prc-tool.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/src-Makefile +Dest=%{dest}/Makefile + +[FILE3] +Type=install +Source=%{src}/palmhello.c +Dest=%{dest}/%{APPNAME}.c + +[FILE4] +Type=install +Source=%{src}/palmhello.pbitm +Dest=%{dest}/%{APPNAME}.pbitm + +[FILE5] +Type=install +Source=%{src}/palmhello.rcp +Dest=%{dest}/%{APPNAME}.rcp + +[FILE6] +Type=install +Source=%{src}/palmhelloRsc.h +Dest=%{dest}/%{APPNAME}Rsc.h + +[FILE7] +Type=install +Source=%{src}/callback.h +Dest=%{dest}/callback.h + +[MSG] +Type=message +Comment=A palm application was created in %{dest} +Comment[ca]=Una aplicació per a Palm ha estat creada en %{dest} +Comment[da]=Et palm-program blev oprettet i %{dest} +Comment[de]=Eine Palm-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή palm δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación Palm ha sido creada en %{dest} +Comment[et]=Palmi rakendus loodi asukohta %{dest} +Comment[eu]=Palm aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد palm در %{dest} ایجاد شد +Comment[fr]=Une application Palm a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár Palm i %{dest} +Comment[gl]=Creouse unha aplicación palm en %{dest} +Comment[hu]=Létrejött egy Palmos alkalmazássablon itt: %{dest} +Comment[it]=È stata creata un'applicazione palm in %{dest} +Comment[ja]=Palm アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Palm-Programm opstellt +Comment[ne]=पाम अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Palm-toepassing is aangemaakt in %{dest} +Comment[pl]=Program dla Palma został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do Palm em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do Palm em %{dest} +Comment[ru]=Приложение Palm создано в %{dest} +Comment[sk]=Palm aplikácia bola vytvorená v %{dest} +Comment[sr]=Palm програм је направљен у %{dest} +Comment[sr@Latn]=Palm program je napravljen u %{dest} +Comment[sv]=Ett Palm-program skapades i %{dest} +Comment[tr]=Bir avuçiçi uygulaması %{dest} içinde yaratıldı +Comment[zh_CN]=在 %{dest} 中创建了一个 Palme 应用程序 +Comment[zh_TW]=一個 palm 應用程式樣本已建立於 %{dest} diff --git a/languages/cpp/app_templates/prc-tool/prc-tool.tdevelop b/languages/cpp/app_templates/prc-tool/prc-tool.tdevelop index cb31f8a1..9015718f 100644 --- a/languages/cpp/app_templates/prc-tool/prc-tool.tdevelop +++ b/languages/cpp/app_templates/prc-tool/prc-tool.tdevelop @@ -4,23 +4,23 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C - TDevDebugger + KDevDebugger C PalmOS - + - - + + make test @@ -40,12 +40,12 @@ - + - + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/prc-tool/prc-tool.tdevtemplate b/languages/cpp/app_templates/prc-tool/prc-tool.tdevtemplate deleted file mode 100644 index 23b0013e..00000000 --- a/languages/cpp/app_templates/prc-tool/prc-tool.tdevtemplate +++ /dev/null @@ -1,136 +0,0 @@ -# TDE Config File -[General] -Name=Hello world program -Name[ca]=Programa Hello world -Name[da]=Goddag verden program -Name[de]="Hello World"-Programm -Name[el]=Πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» -Name[et]="Tere,maailm" programm -Name[eu]="Kaixo mundua" programa -Name[fa]=برنامۀ Hello world -Name[fr]=Programme « Bonjour monde » -Name[ga]=Ríomhchlár "Hello world" -Name[gl]=Programa Ola mundo -Name[it]=Programma di "Hello world" -Name[ja]=Hello world プログラム -Name[nds]="Moin Welt"-Programm -Name[ne]=हेल्डो वोल्ड कार्यक्रम -Name[nl]=Hello World-programma -Name[pl]=Program 'Witaj świecie' -Name[pt]=Programa 'Olá mundo' -Name[pt_BR]=Programa 'Olá mundo' -Name[ru]=Программа Hello world -Name[sk]=Ahoj svet program -Name[sl]=Program Hello world -Name[sr]=Програм „Здраво свете“ -Name[sr@Latn]=Program „Zdravo svete“ -Name[sv]=Hello world-program -Name[tr]=Merhaba Dünya Programı -Name[zh_CN]=Hello world 程序 -Name[zh_TW]=Hello world 程式 -Icon= # got none -Category=C/PalmOS -Comment=Generates a template for palm application -Comment[ca]=Genera una plantilla d'aplicació per a Palm -Comment[da]=Genererer en skabelon for et palm-program -Comment[de]=Erstellt das Gerüst für eine Palm-Anwendung -Comment[el]=Δημιουργία ενός προτύπου εφαρμογής για palm -Comment[es]=Genera una plantilla para una aplicación Palm -Comment[et]=Palmi rakenduse malli loomine. -Comment[eu]=Palm aplikazio baten txantiloi bat sortzen du -Comment[fa]=قالبی برای کاربرد palm تولید می‌کند -Comment[fr]=Génère un modèle pour une application Palm -Comment[gl]=Xera un modelo para aplicación palm -Comment[hu]=Létrehoz egy Palm-os alkalmazássablont -Comment[it]=Genera un modello per un'applicazione palm -Comment[ja]=Palm アプリケーションのためのテンプレートを作成します -Comment[nds]=Stellt dat Rahmenwark för en Palm-Programm op -Comment[ne]=पाम अनुप्रयोगका लागि टेम्प्लेट उत्पन्न गर्दछ -Comment[nl]=Genereert een sjabloon voor een Palm-toepassing -Comment[pl]=Generuje szablon programu dla Palma -Comment[pt]=Gera um modelo para aplicações do Palm -Comment[pt_BR]=Gera um modelo para aplicações do Palm -Comment[ru]=Создание простого приложения Palm -Comment[sk]=Vygeneruje šablónu pre Palm aplikáciu -Comment[sr]=Прави шаблон за palm програм -Comment[sr@Latn]=Pravi šablon za palm program -Comment[sv]=Skapar en mall för ett Palm-program -Comment[tr]=Bir avuçiçi uygulaması için bir şablon yaratır -Comment[zh_CN]=生成一个 Palm 应用程序的模板 -Comment[zh_TW]=產生一個 palm 應用程式樣本 -FileTemplates=h,CStyle,c,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAME}.c -Archive=prc-tool.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/prc-tool.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/src-Makefile -Dest=%{dest}/Makefile - -[FILE3] -Type=install -Source=%{src}/palmhello.c -Dest=%{dest}/%{APPNAME}.c - -[FILE4] -Type=install -Source=%{src}/palmhello.pbitm -Dest=%{dest}/%{APPNAME}.pbitm - -[FILE5] -Type=install -Source=%{src}/palmhello.rcp -Dest=%{dest}/%{APPNAME}.rcp - -[FILE6] -Type=install -Source=%{src}/palmhelloRsc.h -Dest=%{dest}/%{APPNAME}Rsc.h - -[FILE7] -Type=install -Source=%{src}/callback.h -Dest=%{dest}/callback.h - -[MSG] -Type=message -Comment=A palm application was created in %{dest} -Comment[ca]=Una aplicació per a Palm ha estat creada en %{dest} -Comment[da]=Et palm-program blev oprettet i %{dest} -Comment[de]=Eine Palm-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή palm δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación Palm ha sido creada en %{dest} -Comment[et]=Palmi rakendus loodi asukohta %{dest} -Comment[eu]=Palm aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد palm در %{dest} ایجاد شد -Comment[fr]=Une application Palm a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár Palm i %{dest} -Comment[gl]=Creouse unha aplicación palm en %{dest} -Comment[hu]=Létrejött egy Palmos alkalmazássablon itt: %{dest} -Comment[it]=È stata creata un'applicazione palm in %{dest} -Comment[ja]=Palm アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Palm-Programm opstellt -Comment[ne]=पाम अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Palm-toepassing is aangemaakt in %{dest} -Comment[pl]=Program dla Palma został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do Palm em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do Palm em %{dest} -Comment[ru]=Приложение Palm создано в %{dest} -Comment[sk]=Palm aplikácia bola vytvorená v %{dest} -Comment[sr]=Palm програм је направљен у %{dest} -Comment[sr@Latn]=Palm program je napravljen u %{dest} -Comment[sv]=Ett Palm-program skapades i %{dest} -Comment[tr]=Bir avuçiçi uygulaması %{dest} içinde yaratıldı -Comment[zh_CN]=在 %{dest} 中创建了一个 Palme 应用程序 -Comment[zh_TW]=一個 palm 應用程式樣本已建立於 %{dest} diff --git a/languages/cpp/app_templates/qmakeapp/CMakeLists.txt b/languages/cpp/app_templates/qmakeapp/CMakeLists.txt index f23ed602..4af3dc73 100644 --- a/languages/cpp/app_templates/qmakeapp/CMakeLists.txt +++ b/languages/cpp/app_templates/qmakeapp/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( qmakeapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qmakeapp.tar.gz qmakeapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qmakeapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qmakeapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qmakeapp/Makefile.am b/languages/cpp/app_templates/qmakeapp/Makefile.am index 11a39e79..233717d7 100644 --- a/languages/cpp/app_templates/qmakeapp/Makefile.am +++ b/languages/cpp/app_templates/qmakeapp/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.cpp qmakeapp.cpp qmakeapp.h qmakeapp.png qmakeapp.tdevelop \ templateName = qmakeapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qmakeapp/qmakeapp.kdevtemplate b/languages/cpp/app_templates/qmakeapp/qmakeapp.kdevtemplate new file mode 100644 index 00000000..b89e8a52 --- /dev/null +++ b/languages/cpp/app_templates/qmakeapp/qmakeapp.kdevtemplate @@ -0,0 +1,182 @@ +# TDE Config File +[General] +Name=Qt3 Application +Name[br]=Meziant Qt3 +Name[ca]=Aplicació Qt3 +Name[da]=Qt3-Program +Name[de]=Qt3-Anwendung +Name[el]=Εφαρμογή Qt3 +Name[es]=Aplicación Qt3 +Name[et]=Qt3 rakendus +Name[fr]=Application Qt3 +Name[hu]=Qt3-alapú alkalmazások +Name[it]=Applicazione Qt3 +Name[ja]=Qt3 アプリケーション +Name[nds]=Qt3-Programm +Name[nl]=Qt3-toepassing +Name[pl]=Program Qt3 +Name[pt]=Aplicação do Qt3 +Name[pt_BR]=Aplicação do Qt3 +Name[ru]=Приложение Qt 3 +Name[sk]=Qt3 aplikácia +Name[sr]=Qt3 програм +Name[sr@Latn]=Qt3 program +Name[sv]=Qt3-program +Name[zh_TW]=Qt3 應用程式 +Icon=qmakeapp.png +Category=C++/QMake project +Category[fr]=C++/QMake +Comment=Generate a QMake/Qt3 based application (crossplatform compatible) +Comment[ca]=Genera una aplicació basada en QMake/Qt3 (multi plataforma) +Comment[da]=Generér et QMake/Qt3 baseret program (krydsplatform kompatibel) +Comment[de]=Erstellt eine auf QMake/Qt3 basierende Anwendung (plattformunabhängig) +Comment[el]=Δημιουργία μια εφαρμογής βασισμένης στα QMake/Qt3 (συμβατή με πολλαπλές πλατφόρμες) +Comment[es]=Genera una aplicación basada en QMake/Qt3 (con compatibilidad multiplataforma) +Comment[et]=Rakenduse loomine QMake'i/Qt3 põhjal (multiplatvormne) +Comment[fr]=Génère une application basée sur QMake / Qt3 (compatible multi-plateforme) +Comment[hu]=Létrehoz egy QMake/Qt3-alapú, keresztfordításra is alkalmas alkalmazást +Comment[it]=Genera un'applicazione basata su QMake/Qt3 (compatibile multipiattaforma) +Comment[ja]=QMake/Qt3 ベースのアプリケーションを作成 (クロスプラットフォーム) +Comment[nds]=Stellt en op QMake/Qt3 opbuut Programm op (över Bedriefümgeven weg kompatibel) +Comment[nl]=Genereert een Qmake/Qt3-gebaseerde toepassing (crossplatform compatible) +Comment[pl]=Generuje program używający QMake i Qt3 (wieloplatformowy) +Comment[pt]=Gera uma aplicação baseada no QMake/Qt3 (compatível com várias plataformas) +Comment[pt_BR]=Gera uma aplicação baseada no QMake/Qt3 (compatível com várias plataformas) +Comment[ru]=Создание использующее QMake кроссплатформенное приложение Qt 3 +Comment[sk]=Vygeneruje aplikáciu založenú na QMake/Qt3 (multiplatformovo kompatibilnú) +Comment[sr]=Прави програм на основи QMake/Qt3 (прекоплатформски компатибилан) +Comment[sr@Latn]=Pravi program na osnovi QMake/Qt3 (prekoplatformski kompatibilan) +Comment[sv]=Skapar ett Qmake/Qt3-baserat program (fungerar på andra plattformar) +Comment[zh_TW]=產生一個 QMake/Qt3 為基礎的應用程式(跨平台相容) +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=qmakeapp.tar.gz + +[FILE1] +Type=install +Source=%{src}/qmakeapp.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/qmakeapp.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE3] +Type=install +Source=%{src}/src.pro +Dest=%{dest}/src/src.pro + +[FILE4] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE5] +Type=install +Source=%{src}/qmakeapp.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE6] +Type=install +Source=%{src}/qmakeapp.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE7] +Type=install +Source=%{src}/fileopen.xpm +Dest=%{dest}/src/fileopen.xpm + +[FILE8] +Type=install +Source=%{src}/filesave.xpm +Dest=%{dest}/src/filesave.xpm + +[FILE9] +Type=install +Source=%{src}/fileprint.xpm +Dest=%{dest}/src/fileprint.xpm + +[MSG] +Type=message +Comment=A Qt3/Qmake based application was created in %{dest} +Comment[ca]=Una aplicació basada en Qt3/Qmake ha estat creada en %{dest} +Comment[da]=Et Qt3/Qmake baseret program blev oprettet i %{dest} +Comment[de]=Eine auf QMake/Qt3 basierende Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή βασισμένη στα Qt3/Qmake δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación basada en Qt3/Qmake ha sido creada en %{dest} +Comment[et]=Rakendus QMake'i põhjal loodi asukohta %{dest} +Comment[fr]=Une application basée sur Qt3 / Qmake a été créée dans %{dest} +Comment[hu]=Létrejött egy Qt3/Qmake-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione basata su Qt3/Qmake in %{dest} +Comment[ja]=Qt3/QMake ベースのアプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op Qt3/Qmake opbuut Programm opstellt +Comment[nl]=Een Qt3/Qmake-gebaseerde toepassing is aangemaakt in %{dest} +Comment[pl]=Program używający QMake i Qt3 został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação baseada no Qt3/Qmake em %{dest} +Comment[pt_BR]=Foi criada uma aplicação baseada no Qt3/Qmake em %{dest} +Comment[ru]=Использующее QMake приложение Qt 3 создано в %{dest} +Comment[sk]=Aplikácia založená na Qt3/Qmake bola vytvorená v %{dest} +Comment[sr]=Програм на основи Qt3/Qmake направљен је у %{dest} +Comment[sr@Latn]=Program na osnovi Qt3/Qmake napravljen je u %{dest} +Comment[sv]=Ett Qmake/Qt3-baserat program skapades i %{dest} +Comment[zh_TW]=一個 QMake/Qt3 為基礎的應用程式已建立於 %{dest} + +[QTDIR] +Type=value +ValueType=QString +Value=QTDIR +Comment=Directory where Qt3 is installed. +Comment[ca]=Directori a on està instal·lat Qt3. +Comment[da]=Katalog hvor Qt3 er installeret. +Comment[de]=Qt3-Verzeichnis +Comment[el]=Κατάλογος εγκατάστασης του Qt3. +Comment[es]=Carpeta donde se ha instalado Qt3. +Comment[et]=Kataloog, kuhu on paigaldatud Qt3. +Comment[fr]=Dossier où Qt3 est installé. +Comment[hu]=A Qt3 telepítési könyvtára +Comment[it]=Cartella in cui è installato Qt3. +Comment[ja]=Qt3 がインストールされているディレクトリ +Comment[nds]=Orner, woneem Qt3 installeert is. +Comment[nl]=Map waarin Qt3 is geïnstalleerd. +Comment[pl]=Katalog, w którym zainstalowane jest Qt3. +Comment[pt]=A pasta onde está instalado o Qt3. +Comment[pt_BR]=A pasta onde está instalado o Qt3. +Comment[ru]=Каталог с установленным Qt 3 +Comment[sk]=Priečinok kde je nainštalované Qt3. +Comment[sr]=Директоријум у коме је Qt3 инсталиран. +Comment[sr@Latn]=Direktorijum u kome je Qt3 instaliran. +Comment[sv]=Katalog där Qt3 är installerat. +Comment[zh_TW]=Qt3 的安裝目錄 +Default= +[QMAKE] +Type=value +ValueType=QString +Value=QMAKE +Comment=Absolute Path for QMake (Qt3). +Comment[ca]=Ruta absoluta per a QMake (Qt3). +Comment[da]=Absolut søgesti til QMake (Qt3). +Comment[de]=Absoluter Pfad für QMake (Qt3). +Comment[el]=Απόλυτη διαδρομή για το QMake (Qt3). +Comment[es]=Ruta completa para QMake (Qt3). +Comment[et]=QMake'i (Qt3) absoluutne asukoht. +Comment[fr]=Chemin absolu pour QMake (Qt3). +Comment[hu]=A QMake (Qt3) teljes elérési útja. +Comment[it]=Percorso assoluto per QMake (Qt3). +Comment[ja]= QMake (Qt3) の絶対パス +Comment[nds]=Afsluut Padd för QMake (Qt3) +Comment[nl]=Absoluut pad naar QMake (Qt3) +Comment[pl]=Ścieżka bezwzględna do QMake (Qt3). +Comment[pt]=Localização Absoluta do QMake (Qt3). +Comment[pt_BR]=Localização Absoluta do QMake (Qt3). +Comment[ru]=Абсолютный путь к QMake (Qt 3) +Comment[sk]=Absolútna cesta ku QMake (Qt3). +Comment[sr]=Апсолутна путања до QMake-ва (Qt3). +Comment[sr@Latn]=Apsolutna putanja do QMake-va (Qt3). +Comment[sv]=Absolut sökväg till Qmake (Qt3). +Comment[zh_TW]=QMake (Qt3) 的絕對路徑 +Default= diff --git a/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevelop b/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevelop index 04ec68cb..48a9bd99 100644 --- a/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevelop +++ b/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevelop @@ -10,7 +10,7 @@ Qt - + @@ -21,18 +21,18 @@ false *.o,*.lo,CVS - - + + true 3 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner %{QTDIR} %{QMAKE} - - + + bash bash_bugs @@ -69,8 +69,8 @@ TDE Libraries (Doxygen) - - + + @@ -85,28 +85,28 @@ true - - + + ./bin/%{APPNAMELC} - + - + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevtemplate b/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevtemplate deleted file mode 100644 index b89e8a52..00000000 --- a/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevtemplate +++ /dev/null @@ -1,182 +0,0 @@ -# TDE Config File -[General] -Name=Qt3 Application -Name[br]=Meziant Qt3 -Name[ca]=Aplicació Qt3 -Name[da]=Qt3-Program -Name[de]=Qt3-Anwendung -Name[el]=Εφαρμογή Qt3 -Name[es]=Aplicación Qt3 -Name[et]=Qt3 rakendus -Name[fr]=Application Qt3 -Name[hu]=Qt3-alapú alkalmazások -Name[it]=Applicazione Qt3 -Name[ja]=Qt3 アプリケーション -Name[nds]=Qt3-Programm -Name[nl]=Qt3-toepassing -Name[pl]=Program Qt3 -Name[pt]=Aplicação do Qt3 -Name[pt_BR]=Aplicação do Qt3 -Name[ru]=Приложение Qt 3 -Name[sk]=Qt3 aplikácia -Name[sr]=Qt3 програм -Name[sr@Latn]=Qt3 program -Name[sv]=Qt3-program -Name[zh_TW]=Qt3 應用程式 -Icon=qmakeapp.png -Category=C++/QMake project -Category[fr]=C++/QMake -Comment=Generate a QMake/Qt3 based application (crossplatform compatible) -Comment[ca]=Genera una aplicació basada en QMake/Qt3 (multi plataforma) -Comment[da]=Generér et QMake/Qt3 baseret program (krydsplatform kompatibel) -Comment[de]=Erstellt eine auf QMake/Qt3 basierende Anwendung (plattformunabhängig) -Comment[el]=Δημιουργία μια εφαρμογής βασισμένης στα QMake/Qt3 (συμβατή με πολλαπλές πλατφόρμες) -Comment[es]=Genera una aplicación basada en QMake/Qt3 (con compatibilidad multiplataforma) -Comment[et]=Rakenduse loomine QMake'i/Qt3 põhjal (multiplatvormne) -Comment[fr]=Génère une application basée sur QMake / Qt3 (compatible multi-plateforme) -Comment[hu]=Létrehoz egy QMake/Qt3-alapú, keresztfordításra is alkalmas alkalmazást -Comment[it]=Genera un'applicazione basata su QMake/Qt3 (compatibile multipiattaforma) -Comment[ja]=QMake/Qt3 ベースのアプリケーションを作成 (クロスプラットフォーム) -Comment[nds]=Stellt en op QMake/Qt3 opbuut Programm op (över Bedriefümgeven weg kompatibel) -Comment[nl]=Genereert een Qmake/Qt3-gebaseerde toepassing (crossplatform compatible) -Comment[pl]=Generuje program używający QMake i Qt3 (wieloplatformowy) -Comment[pt]=Gera uma aplicação baseada no QMake/Qt3 (compatível com várias plataformas) -Comment[pt_BR]=Gera uma aplicação baseada no QMake/Qt3 (compatível com várias plataformas) -Comment[ru]=Создание использующее QMake кроссплатформенное приложение Qt 3 -Comment[sk]=Vygeneruje aplikáciu založenú na QMake/Qt3 (multiplatformovo kompatibilnú) -Comment[sr]=Прави програм на основи QMake/Qt3 (прекоплатформски компатибилан) -Comment[sr@Latn]=Pravi program na osnovi QMake/Qt3 (prekoplatformski kompatibilan) -Comment[sv]=Skapar ett Qmake/Qt3-baserat program (fungerar på andra plattformar) -Comment[zh_TW]=產生一個 QMake/Qt3 為基礎的應用程式(跨平台相容) -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=qmakeapp.tar.gz - -[FILE1] -Type=install -Source=%{src}/qmakeapp.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/qmakeapp.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE3] -Type=install -Source=%{src}/src.pro -Dest=%{dest}/src/src.pro - -[FILE4] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE5] -Type=install -Source=%{src}/qmakeapp.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE6] -Type=install -Source=%{src}/qmakeapp.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE7] -Type=install -Source=%{src}/fileopen.xpm -Dest=%{dest}/src/fileopen.xpm - -[FILE8] -Type=install -Source=%{src}/filesave.xpm -Dest=%{dest}/src/filesave.xpm - -[FILE9] -Type=install -Source=%{src}/fileprint.xpm -Dest=%{dest}/src/fileprint.xpm - -[MSG] -Type=message -Comment=A Qt3/Qmake based application was created in %{dest} -Comment[ca]=Una aplicació basada en Qt3/Qmake ha estat creada en %{dest} -Comment[da]=Et Qt3/Qmake baseret program blev oprettet i %{dest} -Comment[de]=Eine auf QMake/Qt3 basierende Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή βασισμένη στα Qt3/Qmake δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación basada en Qt3/Qmake ha sido creada en %{dest} -Comment[et]=Rakendus QMake'i põhjal loodi asukohta %{dest} -Comment[fr]=Une application basée sur Qt3 / Qmake a été créée dans %{dest} -Comment[hu]=Létrejött egy Qt3/Qmake-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione basata su Qt3/Qmake in %{dest} -Comment[ja]=Qt3/QMake ベースのアプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en op Qt3/Qmake opbuut Programm opstellt -Comment[nl]=Een Qt3/Qmake-gebaseerde toepassing is aangemaakt in %{dest} -Comment[pl]=Program używający QMake i Qt3 został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação baseada no Qt3/Qmake em %{dest} -Comment[pt_BR]=Foi criada uma aplicação baseada no Qt3/Qmake em %{dest} -Comment[ru]=Использующее QMake приложение Qt 3 создано в %{dest} -Comment[sk]=Aplikácia založená na Qt3/Qmake bola vytvorená v %{dest} -Comment[sr]=Програм на основи Qt3/Qmake направљен је у %{dest} -Comment[sr@Latn]=Program na osnovi Qt3/Qmake napravljen je u %{dest} -Comment[sv]=Ett Qmake/Qt3-baserat program skapades i %{dest} -Comment[zh_TW]=一個 QMake/Qt3 為基礎的應用程式已建立於 %{dest} - -[QTDIR] -Type=value -ValueType=QString -Value=QTDIR -Comment=Directory where Qt3 is installed. -Comment[ca]=Directori a on està instal·lat Qt3. -Comment[da]=Katalog hvor Qt3 er installeret. -Comment[de]=Qt3-Verzeichnis -Comment[el]=Κατάλογος εγκατάστασης του Qt3. -Comment[es]=Carpeta donde se ha instalado Qt3. -Comment[et]=Kataloog, kuhu on paigaldatud Qt3. -Comment[fr]=Dossier où Qt3 est installé. -Comment[hu]=A Qt3 telepítési könyvtára -Comment[it]=Cartella in cui è installato Qt3. -Comment[ja]=Qt3 がインストールされているディレクトリ -Comment[nds]=Orner, woneem Qt3 installeert is. -Comment[nl]=Map waarin Qt3 is geïnstalleerd. -Comment[pl]=Katalog, w którym zainstalowane jest Qt3. -Comment[pt]=A pasta onde está instalado o Qt3. -Comment[pt_BR]=A pasta onde está instalado o Qt3. -Comment[ru]=Каталог с установленным Qt 3 -Comment[sk]=Priečinok kde je nainštalované Qt3. -Comment[sr]=Директоријум у коме је Qt3 инсталиран. -Comment[sr@Latn]=Direktorijum u kome je Qt3 instaliran. -Comment[sv]=Katalog där Qt3 är installerat. -Comment[zh_TW]=Qt3 的安裝目錄 -Default= -[QMAKE] -Type=value -ValueType=QString -Value=QMAKE -Comment=Absolute Path for QMake (Qt3). -Comment[ca]=Ruta absoluta per a QMake (Qt3). -Comment[da]=Absolut søgesti til QMake (Qt3). -Comment[de]=Absoluter Pfad für QMake (Qt3). -Comment[el]=Απόλυτη διαδρομή για το QMake (Qt3). -Comment[es]=Ruta completa para QMake (Qt3). -Comment[et]=QMake'i (Qt3) absoluutne asukoht. -Comment[fr]=Chemin absolu pour QMake (Qt3). -Comment[hu]=A QMake (Qt3) teljes elérési útja. -Comment[it]=Percorso assoluto per QMake (Qt3). -Comment[ja]= QMake (Qt3) の絶対パス -Comment[nds]=Afsluut Padd för QMake (Qt3) -Comment[nl]=Absoluut pad naar QMake (Qt3) -Comment[pl]=Ścieżka bezwzględna do QMake (Qt3). -Comment[pt]=Localização Absoluta do QMake (Qt3). -Comment[pt_BR]=Localização Absoluta do QMake (Qt3). -Comment[ru]=Абсолютный путь к QMake (Qt 3) -Comment[sk]=Absolútna cesta ku QMake (Qt3). -Comment[sr]=Апсолутна путања до QMake-ва (Qt3). -Comment[sr@Latn]=Apsolutna putanja do QMake-va (Qt3). -Comment[sv]=Absolut sökväg till Qmake (Qt3). -Comment[zh_TW]=QMake (Qt3) 的絕對路徑 -Default= diff --git a/languages/cpp/app_templates/qmakeempty/CMakeLists.txt b/languages/cpp/app_templates/qmakeempty/CMakeLists.txt index f8bba7c6..bc109590 100644 --- a/languages/cpp/app_templates/qmakeempty/CMakeLists.txt +++ b/languages/cpp/app_templates/qmakeempty/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( qmakeempty.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qmakeempty.tar.gz qmakeempty.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qmakeempty.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qmakeempty.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qmakeempty/Makefile.am b/languages/cpp/app_templates/qmakeempty/Makefile.am index 2eb31a4f..9d62ad0a 100644 --- a/languages/cpp/app_templates/qmakeempty/Makefile.am +++ b/languages/cpp/app_templates/qmakeempty/Makefile.am @@ -4,10 +4,10 @@ dataFiles = qmakeempty.tdevelop \ templateName = qmakeempty ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qmakeempty/qmakeempty.kdevtemplate b/languages/cpp/app_templates/qmakeempty/qmakeempty.kdevtemplate new file mode 100644 index 00000000..19c03688 --- /dev/null +++ b/languages/cpp/app_templates/qmakeempty/qmakeempty.kdevtemplate @@ -0,0 +1,131 @@ +# TDE Config File +[General] +Name=Empty QMake Template +Name[ca]=Plantilla QMake buida +Name[da]=Tom QMake-skabelon +Name[de]=Leere QMake-Vorlage +Name[el]=Κενό πρότυπο του QMake +Name[es]=Plantilla QMake vacía +Name[et]=Tühi QMake'i mall +Name[hu]=Üres QMake-alapú sablon +Name[it]=Modello di QMake vuoto +Name[nds]=Leddig QMake-Vörlaag +Name[nl]=Leeg QMake-sjabloon +Name[pl]=Pusty szablon QMake +Name[pt]=Modelo do QMake Vazio +Name[pt_BR]=Modelo do QMake Vazio +Name[ru]=Пустой шаблон QMake +Name[sk]=Prázdna šablóna založená na QMake +Name[sr]=Празан шаблон QMake-а +Name[sr@Latn]=Prazan šablon QMake-a +Name[sv]=Tom Qmake-mall +Name[zh_TW]=空的 QMake 樣本 +Icon=qmakeempty.png +Category=C++/QMake project +Comment=Generate an empty QMake based application (crossplatform compatible) - Needs Qt +Comment[ca]=Genera una aplicació buida basada en QMake (compatible plataforma creuada) - Necessita Qt +Comment[da]=Genererer et tomt QMake-baseret program (krydsplatformskompatibelt) - kræver Qt +Comment[de]=Erstellt eine leere auf QMake basierende Anwendung (plattformunabhängig). - Benötigt Qt +Comment[el]=Δημιουργία μιας κενής εφαρμογής βασισμένης στο QMake (crossplatform) - Βασίζεται στην Qt +Comment[es]=Genera una aplicación vacía basada en QMake (con compatibilidad multiplataforma) - Necesita Qt +Comment[et]=Tühja rakenduse loomine QMake'i põhjal (multiplatvormne) - vajalik on Qt +Comment[hu]=Létrehoz egy üres QMake-alapú, keresztfordításra is alkalmas alkalmazást - Qt-t igényel +Comment[it]=Genera un'applicazione basata su QMake vuoto (compatibile multipiattaforma) - serve Qt +Comment[nds]=Stellt en op QMake opbuut Programm op (över Bedriefümgeven weg kompatibel) - Qt deit noot +Comment[nl]=Genereer een leeg QMake-gebaseerd programma (crossplatform-compatible) - Heeft Qt nodig +Comment[pl]=Generuje program używający QMake (wieloplatformowy) - wymaga biblioteki Qt +Comment[pt]=Gera uma aplicação vazia baseada no QMake (compatível com várias plataformas) - Necessita do Qt4 +Comment[pt_BR]=Gera uma aplicação vazia baseada no QMake (compatível com várias plataformas) - Necessita do Qt4 +Comment[ru]=Создание каркаса кроссплатформенного приложения Qt, использующего QMake. +Comment[sk]=Vygeneruje aplikáciu založenú na QMake (multiplatformovo kompatibilnú) - vyžaduje Qt +Comment[sr]=Прави празан шаблон на основи QMake-а (прекоплатформски компатибилан) — захтева Qt +Comment[sr@Latn]=Pravi prazan šablon na osnovi QMake-a (prekoplatformski kompatibilan) — zahteva Qt +Comment[sv]=Skapar ett tomt Qmake-baserat program (fungerar på andra plattformar). Kräver Qt. +Comment[zh_TW]=產生一個空的以 QMake 為基礎的(跨平台相容)應用程式─需要 Qt +FileTemplates=h,CStyle,cpp,CStyle +Archive=qmakeempty.tar.gz + +[FILE1] +Type=install +Source=%{src}/qmakeempty.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/qmakeempty.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[MSG] +Type=message +Comment=A Qmake based application was created in %{dest} +Comment[ca]=Una aplicació basada en QMake ha estat creada en %{dest} +Comment[da]=Et Qmake-baseret program blev oprettet i %{dest} +Comment[de]=Eine auf Qmake basierende Anwendung wurde in %{dest} erstellt. +Comment[el]=Δημιουργήθηκε μια εφαρμογή βασισμένη σε Qmake στο %{dest} +Comment[es]=Una aplicación basada en QMake ha sido creada en %{dest} +Comment[et]=Rakendus QMake'i põhjal loodi asukohta %{dest} +Comment[hu]=Létrejött egy Qmake-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione basata su Qmake in %{dest} +Comment[nds]=In %{dest} wöör en op QMake opbuut Programm opstellt +Comment[nl]=Een Qmake-gebaseerd programma is aangemaakt in %{dest} +Comment[pl]=Program oparty na QMake został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação baseada no Qmake em %{dest} +Comment[pt_BR]=Foi criada uma aplicação baseada no Qmake em %{dest} +Comment[ru]=Использующее QMake приложение создано в %{dest} +Comment[sk]=Aplikácia založená na QMake bola vytvorená v %{dest} +Comment[sr]=Програм на основу QMake-а направљен је у %{dest} +Comment[sr@Latn]=Program na osnovu QMake-a napravljen je u %{dest} +Comment[sv]=Ett Qmake-baserat program skapades i %{dest} +Comment[zh_TW]=一個以 Qmake 為基礎的應用程式已建立於 %{dest} + +[QMAKE] +Type=value +ValueType=QString +Value=QMAKE +Comment=Absolute Path for QMake. +Comment[ca]=Ruta absoluta per a QMake. +Comment[da]=Absolut søgesti til QMake. +Comment[de]=Absoluter Pfad für QMake. +Comment[el]=Απόλυτη διαδρομή του QMake. +Comment[es]=Ruta completa para QMake. +Comment[et]=QMake absoluutne asukoht. +Comment[hu]=A QMake teljes elérési útja. +Comment[it]=Percorso assoluto per QMake. +Comment[nds]=Afsluut Padd för QMake +Comment[nl]=Absoluut pad voor Qmake. +Comment[pl]=Ścieżka bezwzględna do QMake. +Comment[pt]=Localização Absoluta do QMake. +Comment[pt_BR]=Localização Absoluta do QMake. +Comment[ru]=Полный путь к QMake. +Comment[sk]=Absolútna cesta ku QMake. +Comment[sr]=Апсолутна путања до QMake-а. +Comment[sr@Latn]=Apsolutna putanja do QMake-a. +Comment[sv]=Absolut sökväg till Qmake. +Comment[zh_TW]=QMake 的絕對路徑 +Default= + +[DESIGNER] +Type=value +ValueType=QString +Value=DESIGNER +Comment=Absolute Path for Designer. +Comment[ca]=Ruta absoluta per a Designer. +Comment[da]=Absolut søgesti til Designer +Comment[de]=Absoluter Pfad für Designer. +Comment[el]=Απόλυτη διαδρομή του Designer. +Comment[es]=Ruta completa para Designer. +Comment[et]=Disaineri absoluutne asukoht. +Comment[hu]=A Designer teljes elérési útja. +Comment[it]=Percorso assoluto per Designer. +Comment[nds]=Afsluut Padd för Designer +Comment[nl]=Absoluut pad voor Designer. +Comment[pl]=Ścieżka bezwzględna do Projektanta. +Comment[pt]=Localização Absoluta do Designer. +Comment[pt_BR]=Localização Absoluta do Designer. +Comment[ru]=Полный путь к Designer. +Comment[sk]=Absolútna cesta ku Designer. +Comment[sr]=Апсолутна путања до Designer-а. +Comment[sr@Latn]=Apsolutna putanja do Designer-a. +Comment[sv]=Absolut sökväg till Designer. +Comment[zh_TW]=設計家(Designer)的絕對路徑 +Default= diff --git a/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevelop b/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevelop index c35d2fe9..3dc8acbb 100644 --- a/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevelop +++ b/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevelop @@ -10,7 +10,7 @@ Qt - + @@ -21,8 +21,8 @@ false *.o,*.lo,CVS - - + + true 4 @@ -31,8 +31,8 @@ %{QMAKE} %{DESIGNER} - - + + bash bash_bugs @@ -69,8 +69,8 @@ TDE Libraries (Doxygen) - - + + @@ -85,17 +85,17 @@ true - - + + ./bin/%{APPNAMELC} - + - + @@ -103,11 +103,11 @@ - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevtemplate b/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevtemplate deleted file mode 100644 index 19c03688..00000000 --- a/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevtemplate +++ /dev/null @@ -1,131 +0,0 @@ -# TDE Config File -[General] -Name=Empty QMake Template -Name[ca]=Plantilla QMake buida -Name[da]=Tom QMake-skabelon -Name[de]=Leere QMake-Vorlage -Name[el]=Κενό πρότυπο του QMake -Name[es]=Plantilla QMake vacía -Name[et]=Tühi QMake'i mall -Name[hu]=Üres QMake-alapú sablon -Name[it]=Modello di QMake vuoto -Name[nds]=Leddig QMake-Vörlaag -Name[nl]=Leeg QMake-sjabloon -Name[pl]=Pusty szablon QMake -Name[pt]=Modelo do QMake Vazio -Name[pt_BR]=Modelo do QMake Vazio -Name[ru]=Пустой шаблон QMake -Name[sk]=Prázdna šablóna založená na QMake -Name[sr]=Празан шаблон QMake-а -Name[sr@Latn]=Prazan šablon QMake-a -Name[sv]=Tom Qmake-mall -Name[zh_TW]=空的 QMake 樣本 -Icon=qmakeempty.png -Category=C++/QMake project -Comment=Generate an empty QMake based application (crossplatform compatible) - Needs Qt -Comment[ca]=Genera una aplicació buida basada en QMake (compatible plataforma creuada) - Necessita Qt -Comment[da]=Genererer et tomt QMake-baseret program (krydsplatformskompatibelt) - kræver Qt -Comment[de]=Erstellt eine leere auf QMake basierende Anwendung (plattformunabhängig). - Benötigt Qt -Comment[el]=Δημιουργία μιας κενής εφαρμογής βασισμένης στο QMake (crossplatform) - Βασίζεται στην Qt -Comment[es]=Genera una aplicación vacía basada en QMake (con compatibilidad multiplataforma) - Necesita Qt -Comment[et]=Tühja rakenduse loomine QMake'i põhjal (multiplatvormne) - vajalik on Qt -Comment[hu]=Létrehoz egy üres QMake-alapú, keresztfordításra is alkalmas alkalmazást - Qt-t igényel -Comment[it]=Genera un'applicazione basata su QMake vuoto (compatibile multipiattaforma) - serve Qt -Comment[nds]=Stellt en op QMake opbuut Programm op (över Bedriefümgeven weg kompatibel) - Qt deit noot -Comment[nl]=Genereer een leeg QMake-gebaseerd programma (crossplatform-compatible) - Heeft Qt nodig -Comment[pl]=Generuje program używający QMake (wieloplatformowy) - wymaga biblioteki Qt -Comment[pt]=Gera uma aplicação vazia baseada no QMake (compatível com várias plataformas) - Necessita do Qt4 -Comment[pt_BR]=Gera uma aplicação vazia baseada no QMake (compatível com várias plataformas) - Necessita do Qt4 -Comment[ru]=Создание каркаса кроссплатформенного приложения Qt, использующего QMake. -Comment[sk]=Vygeneruje aplikáciu založenú na QMake (multiplatformovo kompatibilnú) - vyžaduje Qt -Comment[sr]=Прави празан шаблон на основи QMake-а (прекоплатформски компатибилан) — захтева Qt -Comment[sr@Latn]=Pravi prazan šablon na osnovi QMake-a (prekoplatformski kompatibilan) — zahteva Qt -Comment[sv]=Skapar ett tomt Qmake-baserat program (fungerar på andra plattformar). Kräver Qt. -Comment[zh_TW]=產生一個空的以 QMake 為基礎的(跨平台相容)應用程式─需要 Qt -FileTemplates=h,CStyle,cpp,CStyle -Archive=qmakeempty.tar.gz - -[FILE1] -Type=install -Source=%{src}/qmakeempty.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/qmakeempty.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[MSG] -Type=message -Comment=A Qmake based application was created in %{dest} -Comment[ca]=Una aplicació basada en QMake ha estat creada en %{dest} -Comment[da]=Et Qmake-baseret program blev oprettet i %{dest} -Comment[de]=Eine auf Qmake basierende Anwendung wurde in %{dest} erstellt. -Comment[el]=Δημιουργήθηκε μια εφαρμογή βασισμένη σε Qmake στο %{dest} -Comment[es]=Una aplicación basada en QMake ha sido creada en %{dest} -Comment[et]=Rakendus QMake'i põhjal loodi asukohta %{dest} -Comment[hu]=Létrejött egy Qmake-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione basata su Qmake in %{dest} -Comment[nds]=In %{dest} wöör en op QMake opbuut Programm opstellt -Comment[nl]=Een Qmake-gebaseerd programma is aangemaakt in %{dest} -Comment[pl]=Program oparty na QMake został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação baseada no Qmake em %{dest} -Comment[pt_BR]=Foi criada uma aplicação baseada no Qmake em %{dest} -Comment[ru]=Использующее QMake приложение создано в %{dest} -Comment[sk]=Aplikácia založená na QMake bola vytvorená v %{dest} -Comment[sr]=Програм на основу QMake-а направљен је у %{dest} -Comment[sr@Latn]=Program na osnovu QMake-a napravljen je u %{dest} -Comment[sv]=Ett Qmake-baserat program skapades i %{dest} -Comment[zh_TW]=一個以 Qmake 為基礎的應用程式已建立於 %{dest} - -[QMAKE] -Type=value -ValueType=QString -Value=QMAKE -Comment=Absolute Path for QMake. -Comment[ca]=Ruta absoluta per a QMake. -Comment[da]=Absolut søgesti til QMake. -Comment[de]=Absoluter Pfad für QMake. -Comment[el]=Απόλυτη διαδρομή του QMake. -Comment[es]=Ruta completa para QMake. -Comment[et]=QMake absoluutne asukoht. -Comment[hu]=A QMake teljes elérési útja. -Comment[it]=Percorso assoluto per QMake. -Comment[nds]=Afsluut Padd för QMake -Comment[nl]=Absoluut pad voor Qmake. -Comment[pl]=Ścieżka bezwzględna do QMake. -Comment[pt]=Localização Absoluta do QMake. -Comment[pt_BR]=Localização Absoluta do QMake. -Comment[ru]=Полный путь к QMake. -Comment[sk]=Absolútna cesta ku QMake. -Comment[sr]=Апсолутна путања до QMake-а. -Comment[sr@Latn]=Apsolutna putanja do QMake-a. -Comment[sv]=Absolut sökväg till Qmake. -Comment[zh_TW]=QMake 的絕對路徑 -Default= - -[DESIGNER] -Type=value -ValueType=QString -Value=DESIGNER -Comment=Absolute Path for Designer. -Comment[ca]=Ruta absoluta per a Designer. -Comment[da]=Absolut søgesti til Designer -Comment[de]=Absoluter Pfad für Designer. -Comment[el]=Απόλυτη διαδρομή του Designer. -Comment[es]=Ruta completa para Designer. -Comment[et]=Disaineri absoluutne asukoht. -Comment[hu]=A Designer teljes elérési útja. -Comment[it]=Percorso assoluto per Designer. -Comment[nds]=Afsluut Padd för Designer -Comment[nl]=Absoluut pad voor Designer. -Comment[pl]=Ścieżka bezwzględna do Projektanta. -Comment[pt]=Localização Absoluta do Designer. -Comment[pt_BR]=Localização Absoluta do Designer. -Comment[ru]=Полный путь к Designer. -Comment[sk]=Absolútna cesta ku Designer. -Comment[sr]=Апсолутна путања до Designer-а. -Comment[sr@Latn]=Apsolutna putanja do Designer-a. -Comment[sv]=Absolut sökväg till Designer. -Comment[zh_TW]=設計家(Designer)的絕對路徑 -Default= diff --git a/languages/cpp/app_templates/qmakesimple/CMakeLists.txt b/languages/cpp/app_templates/qmakesimple/CMakeLists.txt index 71d9301b..64b3b0bd 100644 --- a/languages/cpp/app_templates/qmakesimple/CMakeLists.txt +++ b/languages/cpp/app_templates/qmakesimple/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( qmakesimple.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qmakesimple.tar.gz qmakesimple.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qmakesimple.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qmakesimple.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qmakesimple/Makefile.am b/languages/cpp/app_templates/qmakesimple/Makefile.am index 728d63ba..ac17219f 100644 --- a/languages/cpp/app_templates/qmakesimple/Makefile.am +++ b/languages/cpp/app_templates/qmakesimple/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.cpp qmakesimple.png app.tdevelop app.pro src.pro templateName = qmakesimple ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qmakesimple/app.tdevelop b/languages/cpp/app_templates/qmakesimple/app.tdevelop index a8e39ca6..2af4f7ad 100644 --- a/languages/cpp/app_templates/qmakesimple/app.tdevelop +++ b/languages/cpp/app_templates/qmakesimple/app.tdevelop @@ -10,25 +10,25 @@ Qt - + - - + + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner %{QTDIR} %{QMAKE} - - + + ada ada_bugs_gcc @@ -66,8 +66,8 @@ TDE Libraries (Doxygen) - - + + /usr/bin/gdb @@ -76,25 +76,25 @@ false - - + + ./bin/%{APPNAMELC} - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qmakesimple/qmakesimple.kdevtemplate b/languages/cpp/app_templates/qmakesimple/qmakesimple.kdevtemplate new file mode 100644 index 00000000..8f2dbee7 --- /dev/null +++ b/languages/cpp/app_templates/qmakesimple/qmakesimple.kdevtemplate @@ -0,0 +1,158 @@ +# TDE Config File +[General] +Name=Qt3 Hello world program +Name[ca]=Programa Hello world per a Qt3 +Name[da]=Qt3 Goddag verden program +Name[de]="Hello World"-Programm (Qt3) +Name[el]=Πρόγραμμα 'Γεια σου Κόσμε' για το Qt3 +Name[es]=Programa Qt3 «Hola mundo» +Name[et]=Qt3 "Tere,maailm" programm +Name[fr]=Programme « Bonjour monde » en Qt3 +Name[hu]=Qt3-alapú 'Hello world' program +Name[it]=Programma di "Hello world" fatto in Qt3 +Name[ja]=Qt3 Hello world プログラム +Name[nds]=Qt3-"Moin Welt"-Programm +Name[nl]=Qt3 Hello world-programma +Name[pl]=Program 'Witaj świecie' w Qt3 +Name[pt]=Programa 'Olá mundo' em Qt3 +Name[pt_BR]=Programa 'Olá mundo' em Qt3 +Name[ru]=Программа Qt 3 +Name[sk]=Qt3 Ahoj svet program +Name[sr]=Програм „Здраво свете“ за Qt3 +Name[sr@Latn]=Program „Zdravo svete“ za Qt3 +Name[sv]=Qt3 Hello world-program +Name[zh_TW]=Qt3 的 Hello world 程式 +Icon=qmakesimple.png +Category=C++/QMake project +Category[fr]=C++/QMake +Comment=Generates a simple Hello world program in C++ using QMake/Qt3 based project manager +Comment[ca]=Genera un simple programa de Hello world en C++ usant el gestor de projectes basat en QMake/Qt3 +Comment[da]=Genererer et simpelt Goddag verden program in C++ ved brug af QMake/Qt3 baseret projekthåndtering +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++ basierend auf dem QMake-Projektmanager und Qt3. +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα 'Γεια σου Κόσμε' σε C++ χρησιμοποιώντας διαχειριστή έργου βασισμένο στο QMake/Qt3 +Comment[es]=Genera un sencillo programa «Hola mundo» en C++ que usa un gestor de proyecto basado en QMake/Qt3 +Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s projektihalduriga QMake'i/Qt3 põhjal +Comment[fr]=Génère un programme « Bonjour monde » simple en C++ utilisant un gestionnaire de projet basé sur QMake / Qt3 +Comment[hu]=Létrehoz egy egyszerű 'Hello world' programot C++-ban, QMake/Qt3-alapú projektkezelővel +Comment[it]=Genera un semplice programma di "Hello world" in C++ usando il gestore di progetto QMake/Qt3 +Comment[ja]=QMake/Qt3 ベースのプロジェクトマネージャを使って簡単な Hello World プログラムを C++ で作成します +Comment[nds]=Stellt mit den op Qt3 un QMake opbuut Projektpleger en eenfach "Moin Welt"-Programm in C++ op +Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ met behulp van de QMake/Qt3-gebaseerde projectbeheerder +Comment[pl]=Generuje prosty program "Witaj świecie" w C++ używając menedżera projektów QMake i Qt3 +Comment[pt]=Gera um programa simples Olá Mundo em C++, usando o gestor de projectos QMake/Qt3 +Comment[pt_BR]=Gera um programa simples Olá Mundo em C++, usando o gestor de projectos QMake/Qt3 +Comment[ru]=Создание простой программы на C++ с использованием QMake (Qt 3) +Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v C++ s použitím QMake/Qt3 projektového manažéra +Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у помоћу менаџера пројекта на основу QMake/Qt3 +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u pomoću menadžera projekta na osnovu QMake/Qt3 +Comment[sv]=Skapar ett enkelt Hello world-program i C++ baserat på QMake/Qt3 projekthantering +Comment[zh_TW]=產生一個使用 QMake/Qt3 專案管理員的簡單 C++ Hello world 程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=qmakesimple.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE3] +Type=install +Source=%{src}/src.pro +Dest=%{dest}/src/src.pro + +[FILE4] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=A Qmake/Qt3 based hello world program was created in %{dest} +Comment[ca]=Una programa de hello world basat en QMake/Qt3 ha estat creat en %{dest} +Comment[da]=et Qmake/Qt3 baseret Goddag verden program blev oprettet i %{dest} +Comment[de]=Ein auf QMake basierendes "Hello World"-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα πρόγραμμα 'Γεια σου Κόσμε' βασισμένο στο Qmake/Qt3 δημιουργήθηκε στο %{dest} +Comment[es]=Un programa «Hola mundo» basado en QMake/Qt3 ha sido creado en %{dest} +Comment[et]="Tere, maailm" programm QMake'i/Qt3 põhjal loodi asukohta %{dest} +Comment[fr]=Un programme « Bonjour monde » basé sur QMake / Qt3 a été créé dans %{dest} +Comment[hu]=Létrejött egy Qmake/Qt3-alapú 'Hello world' program itt: %{dest} +Comment[it]=È stato creato un programma di "hello world" basato su Qmake/Qt3 in %{dest} +Comment[ja]=QMake/Qt3 ベースの hello world プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op Qt3 un QMake opbuut "Moin Welt"-Programm opstellt +Comment[nl]=Een Qmake/Qt3-gebaseerd Hello World-programma is aangemaakt in %{dest} +Comment[pl]=Prosty program używający Qmake/Qt3 został utworzony w %{dest} +Comment[pt]=Foi criado um programa Olá Mundo, baseado no Qmake/Qt3, em %{dest} +Comment[pt_BR]=Foi criado um programa Olá Mundo, baseado no Qmake/Qt3, em %{dest} +Comment[ru]=Программа на Qt 3, использующая QMake, создана в %{dest} +Comment[sk]=Ahoj svet program založený na Qmake/Qt3 bol vytvorený v %{dest} +Comment[sr]=„Здраво свете“ на основу Qmake/Qt3 направљен је у %{dest} +Comment[sr@Latn]=„Zdravo svete“ na osnovu Qmake/Qt3 napravljen je u %{dest} +Comment[sv]=Ett Qmake/Qt3-baserat Hello world-program skapades i %{dest} +Comment[zh_TW]=一個 Qmake/Qt3 為基礎的 hello world 程式已建立於 %{dest} + + +[QTDIR] +Type=value +ValueType=QString +Value=QTDIR +Comment=Directory where Qt3 is installed. +Comment[ca]=Directori a on està instal·lat Qt3. +Comment[da]=Katalog hvor Qt3 er installeret. +Comment[de]=Qt3-Verzeichnis +Comment[el]=Κατάλογος εγκατάστασης του Qt3. +Comment[es]=Carpeta donde se ha instalado Qt3. +Comment[et]=Kataloog, kuhu on paigaldatud Qt3. +Comment[fr]=Dossier où Qt3 est installé. +Comment[hu]=A Qt3 telepítési könyvtára +Comment[it]=Cartella in cui è installato Qt3. +Comment[ja]=Qt3 がインストールされているディレクトリ +Comment[nds]=Orner, woneem Qt3 installeert is. +Comment[nl]=Map waarin Qt3 is geïnstalleerd. +Comment[pl]=Katalog, w którym zainstalowane jest Qt3. +Comment[pt]=A pasta onde está instalado o Qt3. +Comment[pt_BR]=A pasta onde está instalado o Qt3. +Comment[ru]=Каталог с установленным Qt 3 +Comment[sk]=Priečinok kde je nainštalované Qt3. +Comment[sr]=Директоријум у коме је Qt3 инсталиран. +Comment[sr@Latn]=Direktorijum u kome je Qt3 instaliran. +Comment[sv]=Katalog där Qt3 är installerat. +Comment[zh_TW]=Qt3 的安裝目錄 +Default= +[QMAKE] +Type=value +ValueType=QString +Value=QMAKE +Comment=Absolute Path for QMake (Qt3). +Comment[ca]=Ruta absoluta per a QMake (Qt3). +Comment[da]=Absolut søgesti til QMake (Qt3). +Comment[de]=Absoluter Pfad für QMake (Qt3). +Comment[el]=Απόλυτη διαδρομή για το QMake (Qt3). +Comment[es]=Ruta completa para QMake (Qt3). +Comment[et]=QMake'i (Qt3) absoluutne asukoht. +Comment[fr]=Chemin absolu pour QMake (Qt3). +Comment[hu]=A QMake (Qt3) teljes elérési útja. +Comment[it]=Percorso assoluto per QMake (Qt3). +Comment[ja]= QMake (Qt3) の絶対パス +Comment[nds]=Afsluut Padd för QMake (Qt3) +Comment[nl]=Absoluut pad naar QMake (Qt3) +Comment[pl]=Ścieżka bezwzględna do QMake (Qt3). +Comment[pt]=Localização Absoluta do QMake (Qt3). +Comment[pt_BR]=Localização Absoluta do QMake (Qt3). +Comment[ru]=Абсолютный путь к QMake (Qt 3) +Comment[sk]=Absolútna cesta ku QMake (Qt3). +Comment[sr]=Апсолутна путања до QMake-ва (Qt3). +Comment[sr@Latn]=Apsolutna putanja do QMake-va (Qt3). +Comment[sv]=Absolut sökväg till Qmake (Qt3). +Comment[zh_TW]=QMake (Qt3) 的絕對路徑 +Default= diff --git a/languages/cpp/app_templates/qmakesimple/qmakesimple.tdevtemplate b/languages/cpp/app_templates/qmakesimple/qmakesimple.tdevtemplate deleted file mode 100644 index 8f2dbee7..00000000 --- a/languages/cpp/app_templates/qmakesimple/qmakesimple.tdevtemplate +++ /dev/null @@ -1,158 +0,0 @@ -# TDE Config File -[General] -Name=Qt3 Hello world program -Name[ca]=Programa Hello world per a Qt3 -Name[da]=Qt3 Goddag verden program -Name[de]="Hello World"-Programm (Qt3) -Name[el]=Πρόγραμμα 'Γεια σου Κόσμε' για το Qt3 -Name[es]=Programa Qt3 «Hola mundo» -Name[et]=Qt3 "Tere,maailm" programm -Name[fr]=Programme « Bonjour monde » en Qt3 -Name[hu]=Qt3-alapú 'Hello world' program -Name[it]=Programma di "Hello world" fatto in Qt3 -Name[ja]=Qt3 Hello world プログラム -Name[nds]=Qt3-"Moin Welt"-Programm -Name[nl]=Qt3 Hello world-programma -Name[pl]=Program 'Witaj świecie' w Qt3 -Name[pt]=Programa 'Olá mundo' em Qt3 -Name[pt_BR]=Programa 'Olá mundo' em Qt3 -Name[ru]=Программа Qt 3 -Name[sk]=Qt3 Ahoj svet program -Name[sr]=Програм „Здраво свете“ за Qt3 -Name[sr@Latn]=Program „Zdravo svete“ za Qt3 -Name[sv]=Qt3 Hello world-program -Name[zh_TW]=Qt3 的 Hello world 程式 -Icon=qmakesimple.png -Category=C++/QMake project -Category[fr]=C++/QMake -Comment=Generates a simple Hello world program in C++ using QMake/Qt3 based project manager -Comment[ca]=Genera un simple programa de Hello world en C++ usant el gestor de projectes basat en QMake/Qt3 -Comment[da]=Genererer et simpelt Goddag verden program in C++ ved brug af QMake/Qt3 baseret projekthåndtering -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++ basierend auf dem QMake-Projektmanager und Qt3. -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα 'Γεια σου Κόσμε' σε C++ χρησιμοποιώντας διαχειριστή έργου βασισμένο στο QMake/Qt3 -Comment[es]=Genera un sencillo programa «Hola mundo» en C++ que usa un gestor de proyecto basado en QMake/Qt3 -Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s projektihalduriga QMake'i/Qt3 põhjal -Comment[fr]=Génère un programme « Bonjour monde » simple en C++ utilisant un gestionnaire de projet basé sur QMake / Qt3 -Comment[hu]=Létrehoz egy egyszerű 'Hello world' programot C++-ban, QMake/Qt3-alapú projektkezelővel -Comment[it]=Genera un semplice programma di "Hello world" in C++ usando il gestore di progetto QMake/Qt3 -Comment[ja]=QMake/Qt3 ベースのプロジェクトマネージャを使って簡単な Hello World プログラムを C++ で作成します -Comment[nds]=Stellt mit den op Qt3 un QMake opbuut Projektpleger en eenfach "Moin Welt"-Programm in C++ op -Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ met behulp van de QMake/Qt3-gebaseerde projectbeheerder -Comment[pl]=Generuje prosty program "Witaj świecie" w C++ używając menedżera projektów QMake i Qt3 -Comment[pt]=Gera um programa simples Olá Mundo em C++, usando o gestor de projectos QMake/Qt3 -Comment[pt_BR]=Gera um programa simples Olá Mundo em C++, usando o gestor de projectos QMake/Qt3 -Comment[ru]=Создание простой программы на C++ с использованием QMake (Qt 3) -Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v C++ s použitím QMake/Qt3 projektového manažéra -Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у помоћу менаџера пројекта на основу QMake/Qt3 -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u pomoću menadžera projekta na osnovu QMake/Qt3 -Comment[sv]=Skapar ett enkelt Hello world-program i C++ baserat på QMake/Qt3 projekthantering -Comment[zh_TW]=產生一個使用 QMake/Qt3 專案管理員的簡單 C++ Hello world 程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=qmakesimple.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE3] -Type=install -Source=%{src}/src.pro -Dest=%{dest}/src/src.pro - -[FILE4] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=A Qmake/Qt3 based hello world program was created in %{dest} -Comment[ca]=Una programa de hello world basat en QMake/Qt3 ha estat creat en %{dest} -Comment[da]=et Qmake/Qt3 baseret Goddag verden program blev oprettet i %{dest} -Comment[de]=Ein auf QMake basierendes "Hello World"-Programm wurde in %{dest} erstellt. -Comment[el]=Ένα πρόγραμμα 'Γεια σου Κόσμε' βασισμένο στο Qmake/Qt3 δημιουργήθηκε στο %{dest} -Comment[es]=Un programa «Hola mundo» basado en QMake/Qt3 ha sido creado en %{dest} -Comment[et]="Tere, maailm" programm QMake'i/Qt3 põhjal loodi asukohta %{dest} -Comment[fr]=Un programme « Bonjour monde » basé sur QMake / Qt3 a été créé dans %{dest} -Comment[hu]=Létrejött egy Qmake/Qt3-alapú 'Hello world' program itt: %{dest} -Comment[it]=È stato creato un programma di "hello world" basato su Qmake/Qt3 in %{dest} -Comment[ja]=QMake/Qt3 ベースの hello world プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en op Qt3 un QMake opbuut "Moin Welt"-Programm opstellt -Comment[nl]=Een Qmake/Qt3-gebaseerd Hello World-programma is aangemaakt in %{dest} -Comment[pl]=Prosty program używający Qmake/Qt3 został utworzony w %{dest} -Comment[pt]=Foi criado um programa Olá Mundo, baseado no Qmake/Qt3, em %{dest} -Comment[pt_BR]=Foi criado um programa Olá Mundo, baseado no Qmake/Qt3, em %{dest} -Comment[ru]=Программа на Qt 3, использующая QMake, создана в %{dest} -Comment[sk]=Ahoj svet program založený na Qmake/Qt3 bol vytvorený v %{dest} -Comment[sr]=„Здраво свете“ на основу Qmake/Qt3 направљен је у %{dest} -Comment[sr@Latn]=„Zdravo svete“ na osnovu Qmake/Qt3 napravljen je u %{dest} -Comment[sv]=Ett Qmake/Qt3-baserat Hello world-program skapades i %{dest} -Comment[zh_TW]=一個 Qmake/Qt3 為基礎的 hello world 程式已建立於 %{dest} - - -[QTDIR] -Type=value -ValueType=QString -Value=QTDIR -Comment=Directory where Qt3 is installed. -Comment[ca]=Directori a on està instal·lat Qt3. -Comment[da]=Katalog hvor Qt3 er installeret. -Comment[de]=Qt3-Verzeichnis -Comment[el]=Κατάλογος εγκατάστασης του Qt3. -Comment[es]=Carpeta donde se ha instalado Qt3. -Comment[et]=Kataloog, kuhu on paigaldatud Qt3. -Comment[fr]=Dossier où Qt3 est installé. -Comment[hu]=A Qt3 telepítési könyvtára -Comment[it]=Cartella in cui è installato Qt3. -Comment[ja]=Qt3 がインストールされているディレクトリ -Comment[nds]=Orner, woneem Qt3 installeert is. -Comment[nl]=Map waarin Qt3 is geïnstalleerd. -Comment[pl]=Katalog, w którym zainstalowane jest Qt3. -Comment[pt]=A pasta onde está instalado o Qt3. -Comment[pt_BR]=A pasta onde está instalado o Qt3. -Comment[ru]=Каталог с установленным Qt 3 -Comment[sk]=Priečinok kde je nainštalované Qt3. -Comment[sr]=Директоријум у коме је Qt3 инсталиран. -Comment[sr@Latn]=Direktorijum u kome je Qt3 instaliran. -Comment[sv]=Katalog där Qt3 är installerat. -Comment[zh_TW]=Qt3 的安裝目錄 -Default= -[QMAKE] -Type=value -ValueType=QString -Value=QMAKE -Comment=Absolute Path for QMake (Qt3). -Comment[ca]=Ruta absoluta per a QMake (Qt3). -Comment[da]=Absolut søgesti til QMake (Qt3). -Comment[de]=Absoluter Pfad für QMake (Qt3). -Comment[el]=Απόλυτη διαδρομή για το QMake (Qt3). -Comment[es]=Ruta completa para QMake (Qt3). -Comment[et]=QMake'i (Qt3) absoluutne asukoht. -Comment[fr]=Chemin absolu pour QMake (Qt3). -Comment[hu]=A QMake (Qt3) teljes elérési útja. -Comment[it]=Percorso assoluto per QMake (Qt3). -Comment[ja]= QMake (Qt3) の絶対パス -Comment[nds]=Afsluut Padd för QMake (Qt3) -Comment[nl]=Absoluut pad naar QMake (Qt3) -Comment[pl]=Ścieżka bezwzględna do QMake (Qt3). -Comment[pt]=Localização Absoluta do QMake (Qt3). -Comment[pt_BR]=Localização Absoluta do QMake (Qt3). -Comment[ru]=Абсолютный путь к QMake (Qt 3) -Comment[sk]=Absolútna cesta ku QMake (Qt3). -Comment[sr]=Апсолутна путања до QMake-ва (Qt3). -Comment[sr@Latn]=Apsolutna putanja do QMake-va (Qt3). -Comment[sv]=Absolut sökväg till Qmake (Qt3). -Comment[zh_TW]=QMake (Qt3) 的絕對路徑 -Default= diff --git a/languages/cpp/app_templates/qt4hello/CMakeLists.txt b/languages/cpp/app_templates/qt4hello/CMakeLists.txt index d1aee7bd..7ec55256 100644 --- a/languages/cpp/app_templates/qt4hello/CMakeLists.txt +++ b/languages/cpp/app_templates/qt4hello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( qt4hello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qt4hello.tar.gz qt4hello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qt4hello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qt4hello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qt4hello/Makefile.am b/languages/cpp/app_templates/qt4hello/Makefile.am index 20edc902..3f735466 100644 --- a/languages/cpp/app_templates/qt4hello/Makefile.am +++ b/languages/cpp/app_templates/qt4hello/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.cpp qt4hello.png qt4hello.tdevelop \ templateName = qt4hello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qt4hello/qt4hello.kdevtemplate b/languages/cpp/app_templates/qt4hello/qt4hello.kdevtemplate new file mode 100644 index 00000000..2ea95b83 --- /dev/null +++ b/languages/cpp/app_templates/qt4hello/qt4hello.kdevtemplate @@ -0,0 +1,160 @@ +# TDE Config File +[General] +Name=Basic Qt4 Application +Name[ca]=Aplicació en Qt4 bàsica +Name[da]=Basalt Qt4-program +Name[de]=Einfache Qt4-Anwendung +Name[el]=Βασική εφαρμογή Qt4 +Name[es]=Aplicación Qt4 básica +Name[et]=Elementaarne Qt4 rakendus +Name[fr]=Application Qt4 de base +Name[hu]=Egyszerű Qt4-alapú alkalmazás +Name[it]=Applicazione Qt4 base +Name[ja]=基本的な Qt4 アプリケーション +Name[nds]=Eenfach Qt4-Programm +Name[nl]=Basis Qt4-toepassing +Name[pl]=Prosty program w Qt4 +Name[pt]=Aplicação Básica em Qt4 +Name[pt_BR]=Aplicação Básica em Qt4 +Name[ru]=Простое приложение Qt 4 +Name[sk]=Základná Qt4 aplikácia +Name[sr]=Основни Qt4 програм +Name[sr@Latn]=Osnovni Qt4 program +Name[sv]=Grundläggande Qt4-program +Name[zh_TW]=基本 Qt4 應用程式 +Icon=qt4hello.png +Category=C++/QMake project +Comment=Generate a very simple QMake/Qt4 based application (crossplatform compatible) - Needs Qt4 +Comment[ca]=Genera una aplicació molt simple basada en QMake/Qt4 (multi plataforma) -requereix Qt4- +Comment[da]=Generér et meget enkelt QMake/Qt4 baseret program (krydsplatform kompatibel) - behøver Qt4 +Comment[de]=Erstellt eine sehr einfache, auf QMake/Qt4 basierende Anwendung (plattformunabhängig). - Benötigt Qt4. +Comment[el]=Δημιουργία μια εφαρμογής βασισμένης στα QMake/Qt4 (συμβατή με πολλαπλές πλατφόρμες) -Απαιτεί το Qt4 +Comment[es]=Genera una aplicación muy sencilla basada en QMake/Qt4 (con compatibilidad multiplataforma) - Necesita Qt4 +Comment[et]=Väga lihtsa rakenduse loomine QMake'i/Qt4 põhjal (multiplatvormne) - vajalik on Qt4 +Comment[fr]=Génère une application basée sur QMake / Qt4 très simple (compatible multi-plateforme) - Nécessite Qt4 +Comment[hu]=Létrehoz egy QMake/Qt4-alapú, keresztfordításra is alkalmas alkalmazást - Qt4-et igényel +Comment[it]=Genera una semplice applicazione basata su QMake/Qt4 (compatibile multipiattaforma) - serve Qt4 +Comment[nds]=Stellt en op QMake un Qt4 opbuut Programm op (över Bedriefümgeven weg kompatibel) - Qt4 deit noot +Comment[nl]=Genereert een heel eenvoudig Qmake/Qt4-gebaseerde toepassing (crossplatform compatible) - heeft Qt4 nodig +Comment[pl]=Generuje program używający QMake i Qt4 (wieloplatformowy) +Comment[pt]=Gera uma aplicação baseada no QMake/Qt4 (compatível com várias plataformas) - Necessita do Qt4 +Comment[pt_BR]=Gera uma aplicação baseada no QMake/Qt4 (compatível com várias plataformas) - Necessita do Qt4 +Comment[ru]=Создание простого кроссплатформенного приложения Qt 4, использующего QMake. +Comment[sk]=Vygeneruje veľmi jednoduchú aplikáciu založenú na QMake/Qt4 (multiplatformovo kompatibilnú) - vyžaduje Qt4 +Comment[sr]=Прави једноставан програм на основи QMake/Qt4 (прекоплатформски компатибилан) — захтева Qt4 +Comment[sr@Latn]=Pravi jednostavan program na osnovi QMake/Qt4 (prekoplatformski kompatibilan) — zahteva Qt4 +Comment[sv]=Skapar ett mycket enkelt QMake/Qt4-baserat program (fungerar på andra plattformar). Kräver Qt4. +Comment[zh_TW]=產生一個以 QMake/Qt4 為基礎的簡單應用程式(跨平台相容)─需要使用 Qt4 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/main.cpp,%{dest}/src/ReadMe +Archive=qt4hello.tar.gz + +[FILE1] +Type=install +Source=%{src}/qt4hello.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/qt4hello.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE3] +Type=install +Source=%{src}/src.pro +Dest=%{dest}/src/src.pro + +[FILE4] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE5] +Type=install +Source=%{src}/ReadMe +Dest=%{dest}/src/ReadMe + +[MSG] +Type=message +Comment=A Qt4/Qmake based application was created in %{dest} +Comment[ca]=Una aplicació basada en Qt4/Qmake ha estat creada en %{dest} +Comment[da]=Et Qt4/Qmake baseret program blev oprettet i %{dest} +Comment[de]=Eine auf QMake/Qt4 basierende Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή βασισμένη στα Qt4/Qmake δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación basada en Qt4/Qmake ha sido creada en %{dest} +Comment[et]=Rakendus Qt4/QMake'i põhjal loodi asukohta %{dest} +Comment[fr]=Une application basée sur Qt4 / Qmake a été créée dans %{dest} +Comment[hu]=Létrejött egy Qt4/Qmake-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione basata su Qt4/Qmake in %{dest} +Comment[ja]=Qt4/QMake ベースのアプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op Qt4 un Qmake opbuut Programm opstellt +Comment[nl]=Een Qt4/Qmake gebaseerde toepassing is aangemaakt in %{dest} +Comment[pl]=Program używający QMake i Qt4 został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação baseada no Qt4/Qmake em %{dest} +Comment[pt_BR]=Foi criada uma aplicação baseada no Qt4/Qmake em %{dest} +Comment[ru]=Приложение Qt 4, использующее Qmake, создано в %{dest} +Comment[sk]=Aplikácia založená na Qt4/Qmake bola vytvorená v %{dest} +Comment[sr]=Програм на основу Qt4/Qmake направљен је у %{dest} +Comment[sr@Latn]=Program na osnovu Qt4/Qmake napravljen je u %{dest} +Comment[sv]=Ett QMake/Qt4-baserat program skapades i %{dest} +Comment[zh_TW]=一個 QMake/Qt4 為基礎的應用程式已建立於 %{dest} + +[QMAKE] +Type=value +ValueType=QString +Value=QMAKE +Comment=Absolute Path for QMake (Qt4). +Comment[ca]=Ruta absoluta per a QMake (Qt4). +Comment[da]=Absolut søgesti til QMake (Qt4). +Comment[de]=Absoluter Pfad für QMake (Qt4). +Comment[el]=Απόλυτη διαδρομή για το QMake (Qt4). +Comment[es]=Ruta completa para QMake (Qt4). +Comment[et]=QMake (Qt4) absoluutne asukoht. +Comment[fr]=Chemin absolu pour QMake (Qt4). +Comment[hu]=A QMake (Qt4) teljes elérési útja. +Comment[it]=Percorso assoluto per QMake (Qt4). +Comment[ja]=QMake (Qt4) の絶対パス +Comment[nds]=Afsluut Padd för QMake (Qt4) +Comment[nl]=Absoluut pad naar QMake (Qt4). +Comment[pl]=Ścieżka bezwzględna do QMake (Qt4). +Comment[pt]=Localização Absoluta do QMake (Qt4). +Comment[pt_BR]=Localização Absoluta do QMake (Qt4). +Comment[ru]=Полный путь к QMake (Qt 4). +Comment[sk]=Absolútna cesta ku QMake (Qt4). +Comment[sr]=Апсолутна путања до QMake-а (Qt4). +Comment[sr@Latn]=Apsolutna putanja do QMake-a (Qt4). +Comment[sv]=Absolut sökväg till QMake (Qt4). +Comment[zh_TW]=QMake(Qt4)的絕對路徑 +Default= + +[DESIGNER] +Type=value +ValueType=QString +Value=DESIGNER +Comment=Absolute Path for Designer (Qt4). +Comment[ca]=Ruta absoluta per a Designer (Qt4). +Comment[da]=Absolut søgesti til Designer (Qt4). +Comment[de]=Absoluter Pfad für Designer (Qt4). +Comment[el]=Απόλυτη διαδρομή για τον Σχεδιαστή (Qt4). +Comment[es]=Ruta completa para Designer (Qt4). +Comment[et]=Disaineri (Qt4) absoluutne asukoht. +Comment[fr]=Chemin absolu pour Designer (Qt4). +Comment[hu]=A Designer (Qt4) teljes elérési útja +Comment[it]=Percorso assoluto del Designer (Qt4). +Comment[ja]=Designer (Qt4) の絶対パス +Comment[nds]=Afsluut Padd för Designer (Qt4) +Comment[nl]=Absoluut pad naar Designer (Qt4). +Comment[pl]=Ścieżka bezwzględna do Designera (Qt4). +Comment[pt]=Localização Absoluta do Designer (Qt4). +Comment[pt_BR]=Localização Absoluta do Designer (Qt4). +Comment[ru]=Полный путь к Designer (Qt 4). +Comment[sk]=Absolútna cesta ku Designer (Qt4). +Comment[sr]=Апсолутна путања до Designer-а (Qt4). +Comment[sr@Latn]=Apsolutna putanja do Designer-a (Qt4). +Comment[sv]=Absolut sökväg till Designer (Qt4). +Comment[zh_TW]=設計家(Qt4)的絕對路徑 +Default= diff --git a/languages/cpp/app_templates/qt4hello/qt4hello.tdevelop b/languages/cpp/app_templates/qt4hello/qt4hello.tdevelop index c35d2fe9..3dc8acbb 100644 --- a/languages/cpp/app_templates/qt4hello/qt4hello.tdevelop +++ b/languages/cpp/app_templates/qt4hello/qt4hello.tdevelop @@ -10,7 +10,7 @@ Qt - + @@ -21,8 +21,8 @@ false *.o,*.lo,CVS - - + + true 4 @@ -31,8 +31,8 @@ %{QMAKE} %{DESIGNER} - - + + bash bash_bugs @@ -69,8 +69,8 @@ TDE Libraries (Doxygen) - - + + @@ -85,17 +85,17 @@ true - - + + ./bin/%{APPNAMELC} - + - + @@ -103,11 +103,11 @@ - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qt4hello/qt4hello.tdevtemplate b/languages/cpp/app_templates/qt4hello/qt4hello.tdevtemplate deleted file mode 100644 index 2ea95b83..00000000 --- a/languages/cpp/app_templates/qt4hello/qt4hello.tdevtemplate +++ /dev/null @@ -1,160 +0,0 @@ -# TDE Config File -[General] -Name=Basic Qt4 Application -Name[ca]=Aplicació en Qt4 bàsica -Name[da]=Basalt Qt4-program -Name[de]=Einfache Qt4-Anwendung -Name[el]=Βασική εφαρμογή Qt4 -Name[es]=Aplicación Qt4 básica -Name[et]=Elementaarne Qt4 rakendus -Name[fr]=Application Qt4 de base -Name[hu]=Egyszerű Qt4-alapú alkalmazás -Name[it]=Applicazione Qt4 base -Name[ja]=基本的な Qt4 アプリケーション -Name[nds]=Eenfach Qt4-Programm -Name[nl]=Basis Qt4-toepassing -Name[pl]=Prosty program w Qt4 -Name[pt]=Aplicação Básica em Qt4 -Name[pt_BR]=Aplicação Básica em Qt4 -Name[ru]=Простое приложение Qt 4 -Name[sk]=Základná Qt4 aplikácia -Name[sr]=Основни Qt4 програм -Name[sr@Latn]=Osnovni Qt4 program -Name[sv]=Grundläggande Qt4-program -Name[zh_TW]=基本 Qt4 應用程式 -Icon=qt4hello.png -Category=C++/QMake project -Comment=Generate a very simple QMake/Qt4 based application (crossplatform compatible) - Needs Qt4 -Comment[ca]=Genera una aplicació molt simple basada en QMake/Qt4 (multi plataforma) -requereix Qt4- -Comment[da]=Generér et meget enkelt QMake/Qt4 baseret program (krydsplatform kompatibel) - behøver Qt4 -Comment[de]=Erstellt eine sehr einfache, auf QMake/Qt4 basierende Anwendung (plattformunabhängig). - Benötigt Qt4. -Comment[el]=Δημιουργία μια εφαρμογής βασισμένης στα QMake/Qt4 (συμβατή με πολλαπλές πλατφόρμες) -Απαιτεί το Qt4 -Comment[es]=Genera una aplicación muy sencilla basada en QMake/Qt4 (con compatibilidad multiplataforma) - Necesita Qt4 -Comment[et]=Väga lihtsa rakenduse loomine QMake'i/Qt4 põhjal (multiplatvormne) - vajalik on Qt4 -Comment[fr]=Génère une application basée sur QMake / Qt4 très simple (compatible multi-plateforme) - Nécessite Qt4 -Comment[hu]=Létrehoz egy QMake/Qt4-alapú, keresztfordításra is alkalmas alkalmazást - Qt4-et igényel -Comment[it]=Genera una semplice applicazione basata su QMake/Qt4 (compatibile multipiattaforma) - serve Qt4 -Comment[nds]=Stellt en op QMake un Qt4 opbuut Programm op (över Bedriefümgeven weg kompatibel) - Qt4 deit noot -Comment[nl]=Genereert een heel eenvoudig Qmake/Qt4-gebaseerde toepassing (crossplatform compatible) - heeft Qt4 nodig -Comment[pl]=Generuje program używający QMake i Qt4 (wieloplatformowy) -Comment[pt]=Gera uma aplicação baseada no QMake/Qt4 (compatível com várias plataformas) - Necessita do Qt4 -Comment[pt_BR]=Gera uma aplicação baseada no QMake/Qt4 (compatível com várias plataformas) - Necessita do Qt4 -Comment[ru]=Создание простого кроссплатформенного приложения Qt 4, использующего QMake. -Comment[sk]=Vygeneruje veľmi jednoduchú aplikáciu založenú na QMake/Qt4 (multiplatformovo kompatibilnú) - vyžaduje Qt4 -Comment[sr]=Прави једноставан програм на основи QMake/Qt4 (прекоплатформски компатибилан) — захтева Qt4 -Comment[sr@Latn]=Pravi jednostavan program na osnovi QMake/Qt4 (prekoplatformski kompatibilan) — zahteva Qt4 -Comment[sv]=Skapar ett mycket enkelt QMake/Qt4-baserat program (fungerar på andra plattformar). Kräver Qt4. -Comment[zh_TW]=產生一個以 QMake/Qt4 為基礎的簡單應用程式(跨平台相容)─需要使用 Qt4 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/main.cpp,%{dest}/src/ReadMe -Archive=qt4hello.tar.gz - -[FILE1] -Type=install -Source=%{src}/qt4hello.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/qt4hello.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE3] -Type=install -Source=%{src}/src.pro -Dest=%{dest}/src/src.pro - -[FILE4] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE5] -Type=install -Source=%{src}/ReadMe -Dest=%{dest}/src/ReadMe - -[MSG] -Type=message -Comment=A Qt4/Qmake based application was created in %{dest} -Comment[ca]=Una aplicació basada en Qt4/Qmake ha estat creada en %{dest} -Comment[da]=Et Qt4/Qmake baseret program blev oprettet i %{dest} -Comment[de]=Eine auf QMake/Qt4 basierende Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή βασισμένη στα Qt4/Qmake δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación basada en Qt4/Qmake ha sido creada en %{dest} -Comment[et]=Rakendus Qt4/QMake'i põhjal loodi asukohta %{dest} -Comment[fr]=Une application basée sur Qt4 / Qmake a été créée dans %{dest} -Comment[hu]=Létrejött egy Qt4/Qmake-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione basata su Qt4/Qmake in %{dest} -Comment[ja]=Qt4/QMake ベースのアプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en op Qt4 un Qmake opbuut Programm opstellt -Comment[nl]=Een Qt4/Qmake gebaseerde toepassing is aangemaakt in %{dest} -Comment[pl]=Program używający QMake i Qt4 został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação baseada no Qt4/Qmake em %{dest} -Comment[pt_BR]=Foi criada uma aplicação baseada no Qt4/Qmake em %{dest} -Comment[ru]=Приложение Qt 4, использующее Qmake, создано в %{dest} -Comment[sk]=Aplikácia založená na Qt4/Qmake bola vytvorená v %{dest} -Comment[sr]=Програм на основу Qt4/Qmake направљен је у %{dest} -Comment[sr@Latn]=Program na osnovu Qt4/Qmake napravljen je u %{dest} -Comment[sv]=Ett QMake/Qt4-baserat program skapades i %{dest} -Comment[zh_TW]=一個 QMake/Qt4 為基礎的應用程式已建立於 %{dest} - -[QMAKE] -Type=value -ValueType=QString -Value=QMAKE -Comment=Absolute Path for QMake (Qt4). -Comment[ca]=Ruta absoluta per a QMake (Qt4). -Comment[da]=Absolut søgesti til QMake (Qt4). -Comment[de]=Absoluter Pfad für QMake (Qt4). -Comment[el]=Απόλυτη διαδρομή για το QMake (Qt4). -Comment[es]=Ruta completa para QMake (Qt4). -Comment[et]=QMake (Qt4) absoluutne asukoht. -Comment[fr]=Chemin absolu pour QMake (Qt4). -Comment[hu]=A QMake (Qt4) teljes elérési útja. -Comment[it]=Percorso assoluto per QMake (Qt4). -Comment[ja]=QMake (Qt4) の絶対パス -Comment[nds]=Afsluut Padd för QMake (Qt4) -Comment[nl]=Absoluut pad naar QMake (Qt4). -Comment[pl]=Ścieżka bezwzględna do QMake (Qt4). -Comment[pt]=Localização Absoluta do QMake (Qt4). -Comment[pt_BR]=Localização Absoluta do QMake (Qt4). -Comment[ru]=Полный путь к QMake (Qt 4). -Comment[sk]=Absolútna cesta ku QMake (Qt4). -Comment[sr]=Апсолутна путања до QMake-а (Qt4). -Comment[sr@Latn]=Apsolutna putanja do QMake-a (Qt4). -Comment[sv]=Absolut sökväg till QMake (Qt4). -Comment[zh_TW]=QMake(Qt4)的絕對路徑 -Default= - -[DESIGNER] -Type=value -ValueType=QString -Value=DESIGNER -Comment=Absolute Path for Designer (Qt4). -Comment[ca]=Ruta absoluta per a Designer (Qt4). -Comment[da]=Absolut søgesti til Designer (Qt4). -Comment[de]=Absoluter Pfad für Designer (Qt4). -Comment[el]=Απόλυτη διαδρομή για τον Σχεδιαστή (Qt4). -Comment[es]=Ruta completa para Designer (Qt4). -Comment[et]=Disaineri (Qt4) absoluutne asukoht. -Comment[fr]=Chemin absolu pour Designer (Qt4). -Comment[hu]=A Designer (Qt4) teljes elérési útja -Comment[it]=Percorso assoluto del Designer (Qt4). -Comment[ja]=Designer (Qt4) の絶対パス -Comment[nds]=Afsluut Padd för Designer (Qt4) -Comment[nl]=Absoluut pad naar Designer (Qt4). -Comment[pl]=Ścieżka bezwzględna do Designera (Qt4). -Comment[pt]=Localização Absoluta do Designer (Qt4). -Comment[pt_BR]=Localização Absoluta do Designer (Qt4). -Comment[ru]=Полный путь к Designer (Qt 4). -Comment[sk]=Absolútna cesta ku Designer (Qt4). -Comment[sr]=Апсолутна путања до Designer-а (Qt4). -Comment[sr@Latn]=Apsolutna putanja do Designer-a (Qt4). -Comment[sv]=Absolut sökväg till Designer (Qt4). -Comment[zh_TW]=設計家(Qt4)的絕對路徑 -Default= diff --git a/languages/cpp/app_templates/qt4makeapp/CMakeLists.txt b/languages/cpp/app_templates/qt4makeapp/CMakeLists.txt index 5fe14da0..422740dc 100644 --- a/languages/cpp/app_templates/qt4makeapp/CMakeLists.txt +++ b/languages/cpp/app_templates/qt4makeapp/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( qt4makeapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qt4makeapp.tar.gz qt4makeapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qt4makeapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qt4makeapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qt4makeapp/Makefile.am b/languages/cpp/app_templates/qt4makeapp/Makefile.am index 265a5cd9..68f78acb 100644 --- a/languages/cpp/app_templates/qt4makeapp/Makefile.am +++ b/languages/cpp/app_templates/qt4makeapp/Makefile.am @@ -5,10 +5,10 @@ dataFiles = main.cpp qt4makeapp.cpp qt4makeapp.h qt4makeapp.png qt4makeapp.tdeve templateName = qt4makeapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qt4makeapp/qt4makeapp.kdevtemplate b/languages/cpp/app_templates/qt4makeapp/qt4makeapp.kdevtemplate new file mode 100644 index 00000000..1aea3b21 --- /dev/null +++ b/languages/cpp/app_templates/qt4makeapp/qt4makeapp.kdevtemplate @@ -0,0 +1,207 @@ +# TDE Config File +[General] +Name=Qt4 Application +Name[br]=Meziant Qt4 +Name[ca]=Aplicació Qt4 +Name[da]=Qt4-Program +Name[de]=Qt4-Anwendung +Name[el]=Εφαρμογή Qt4 +Name[es]=Aplicación Qt4 +Name[et]=Qt4 rakendus +Name[fr]=Application Qt4 +Name[hu]=Qt4-alapú alkalmazás +Name[it]=Applicazione Qt4 +Name[ja]=Qt4 アプリケーション +Name[nds]=Qt4-Programm +Name[nl]=Qt4-toepassing +Name[pl]=Program Qt4 +Name[pt]=Aplicação do Qt4 +Name[pt_BR]=Aplicação do Qt4 +Name[ru]=Приложение Qt 4 +Name[sk]=Qt4 aplikácia +Name[sr]=Qt4 програм +Name[sr@Latn]=Qt4 program +Name[sv]=Qt4-program +Name[zh_TW]=Qt4 應用程式 +Icon=qt4makeapp.png +Category=C++/QMake project +Category[fr]=C++/QMake +Comment=Generate a QMake/Qt4 based application (crossplatform compatible) - Needs Qt4 +Comment[ca]=Genera una aplicació basada en QMake/Qt4 (multi plataforma) -Necessita Qt4- +Comment[da]=Generér et QMake/Qt4 baseret program (krydsplatform kompatibel) - behøver Qt4 +Comment[de]=Erstellt eine auf QMake/Qt4 basierende Anwendung (plattformunabhängig). - Benötigt Qt4. +Comment[el]=Δημιουργία μια εφαρμογής βασισμένης στα QMake/Qt4 (συμβατή με πολλαπλές πλατφόρμες) +Comment[es]=Genera una aplicación basada en QMake/Qt4 (con compatibilidad multiplataforma) - Necesita Qt4 +Comment[et]=Rakenduse loomine QMake'i/Qt4 põhjal (multiplatvormne) +Comment[fr]=Génère une application basée sur QMake / Qt4 (compatible multi-plateforme) - Nécessite Qt4 +Comment[hu]=Létrehoz egy QMake/Qt4-alapú, keresztfordításra is alkalmas alkalmazást - Qt4-et igényel +Comment[it]=Genera un'applicazione basata su QMake/Qt4 (compatibile multipiattaforma) - serve Qt4 +Comment[nds]=Stellt en op QMake un Qt4 opbuut Programm op (över Bedriefümgeven weg kompatibel) - Qt4 deit noot +Comment[nl]=Genereer een Qmake/Qt4-gebaseerde toepassing (crossplatform compatible) - heeft Qt4 nodig +Comment[pl]=Generuje program używający QMake i Qt4 (wieloplatformowy) - wymaga biblioteki Qt4 +Comment[pt]=Gera uma aplicação baseada no QMake/Qt4 (compatível com várias plataformas) - Necessita do Qt4 +Comment[pt_BR]=Gera uma aplicação baseada no QMake/Qt4 (compatível com várias plataformas) - Necessita do Qt4 +Comment[ru]=Создание кроссплатформенного приложения Qt 4, использующего QMake +Comment[sk]=Vygeneruje aplikáciu založenú na QMake/Qt4 (multiplatformovo kompatibilnú) - vyžaduje Qt4 +Comment[sr]=Прави програм на основи QMake/Qt4 (прекоплатформски компатибилан) — захтева Qt4 +Comment[sr@Latn]=Pravi program na osnovi QMake/Qt4 (prekoplatformski kompatibilan) — zahteva Qt4 +Comment[sv]=Skapar ett QMake/Qt4-baserat program (fungerar på andra plattformar). Kräver Qt4. +Comment[zh_TW]=產生一個 QMake/Qt4 為基礎的應用程式(跨平台相容)─需要 Qt4 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp,%{dest}/src/ReadMe +Archive=qt4makeapp.tar.gz + +[FILE1] +Type=install +Source=%{src}/qt4makeapp.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/qt4makeapp.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE3] +Type=install +Source=%{src}/src.pro +Dest=%{dest}/src/src.pro + +[FILE4] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE5] +Type=install +Source=%{src}/qt4makeapp.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE6] +Type=install +Source=%{src}/qt4makeapp.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE7] +Type=install +Source=%{src}/fileopen.xpm +Dest=%{dest}/src/fileopen.xpm + +[FILE8] +Type=install +Source=%{src}/filesave.xpm +Dest=%{dest}/src/filesave.xpm + +[FILE9] +Type=install +Source=%{src}/filenew.xpm +Dest=%{dest}/src/filenew.xpm + +[FILE10] +Type=install +Source=%{src}/editcopy.xpm +Dest=%{dest}/src/editcopy.xpm + +[FILE11] +Type=install +Source=%{src}/editpaste.xpm +Dest=%{dest}/src/editpaste.xpm + +[FILE12] +Type=install +Source=%{src}/editcut.xpm +Dest=%{dest}/src/editcut.xpm + +[FILE13] +Type=install +Source=%{src}/application.qrc +Dest=%{dest}/src/application.qrc + +[FILE14] +Type=install +Source=%{src}/ReadMe +Dest=%{dest}/src/ReadMe + +[MSG] +Type=message +Comment=A Qt4/Qmake based application was created in %{dest} +Comment[ca]=Una aplicació basada en Qt4/Qmake ha estat creada en %{dest} +Comment[da]=Et Qt4/Qmake baseret program blev oprettet i %{dest} +Comment[de]=Eine auf QMake/Qt4 basierende Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή βασισμένη στα Qt4/Qmake δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación basada en Qt4/Qmake ha sido creada en %{dest} +Comment[et]=Rakendus Qt4/QMake'i põhjal loodi asukohta %{dest} +Comment[fr]=Une application basée sur Qt4 / Qmake a été créée dans %{dest} +Comment[hu]=Létrejött egy Qt4/Qmake-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione basata su Qt4/Qmake in %{dest} +Comment[ja]=Qt4/QMake ベースのアプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op Qt4 un Qmake opbuut Programm opstellt +Comment[nl]=Een Qt4/Qmake gebaseerde toepassing is aangemaakt in %{dest} +Comment[pl]=Program używający QMake i Qt4 został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação baseada no Qt4/Qmake em %{dest} +Comment[pt_BR]=Foi criada uma aplicação baseada no Qt4/Qmake em %{dest} +Comment[ru]=Приложение Qt 4, использующее Qmake, создано в %{dest} +Comment[sk]=Aplikácia založená na Qt4/Qmake bola vytvorená v %{dest} +Comment[sr]=Програм на основу Qt4/Qmake направљен је у %{dest} +Comment[sr@Latn]=Program na osnovu Qt4/Qmake napravljen je u %{dest} +Comment[sv]=Ett QMake/Qt4-baserat program skapades i %{dest} +Comment[zh_TW]=一個 QMake/Qt4 為基礎的應用程式已建立於 %{dest} + +Comment= +[QMAKE] +Type=value +ValueType=QString +Value=QMAKE +Comment=Absolute Path for QMake (Qt4). +Comment[ca]=Ruta absoluta per a QMake (Qt4). +Comment[da]=Absolut søgesti til QMake (Qt4). +Comment[de]=Absoluter Pfad für QMake (Qt4). +Comment[el]=Απόλυτη διαδρομή για το QMake (Qt4). +Comment[es]=Ruta completa para QMake (Qt4). +Comment[et]=QMake (Qt4) absoluutne asukoht. +Comment[fr]=Chemin absolu pour QMake (Qt4). +Comment[hu]=A QMake (Qt4) teljes elérési útja. +Comment[it]=Percorso assoluto per QMake (Qt4). +Comment[ja]=QMake (Qt4) の絶対パス +Comment[nds]=Afsluut Padd för QMake (Qt4) +Comment[nl]=Absoluut pad naar QMake (Qt4). +Comment[pl]=Ścieżka bezwzględna do QMake (Qt4). +Comment[pt]=Localização Absoluta do QMake (Qt4). +Comment[pt_BR]=Localização Absoluta do QMake (Qt4). +Comment[ru]=Полный путь к QMake (Qt 4). +Comment[sk]=Absolútna cesta ku QMake (Qt4). +Comment[sr]=Апсолутна путања до QMake-а (Qt4). +Comment[sr@Latn]=Apsolutna putanja do QMake-a (Qt4). +Comment[sv]=Absolut sökväg till QMake (Qt4). +Comment[zh_TW]=QMake(Qt4)的絕對路徑 +Default= +[DESIGNER] +Type=value +ValueType=QString +Value=DESIGNER +Comment=Absolute Path for Designer (Qt4). +Comment[ca]=Ruta absoluta per a Designer (Qt4). +Comment[da]=Absolut søgesti til Designer (Qt4). +Comment[de]=Absoluter Pfad für Designer (Qt4). +Comment[el]=Απόλυτη διαδρομή για τον Σχεδιαστή (Qt4). +Comment[es]=Ruta completa para Designer (Qt4). +Comment[et]=Disaineri (Qt4) absoluutne asukoht. +Comment[fr]=Chemin absolu pour Designer (Qt4). +Comment[hu]=A Designer (Qt4) teljes elérési útja +Comment[it]=Percorso assoluto del Designer (Qt4). +Comment[ja]=Designer (Qt4) の絶対パス +Comment[nds]=Afsluut Padd för Designer (Qt4) +Comment[nl]=Absoluut pad naar Designer (Qt4). +Comment[pl]=Ścieżka bezwzględna do Designera (Qt4). +Comment[pt]=Localização Absoluta do Designer (Qt4). +Comment[pt_BR]=Localização Absoluta do Designer (Qt4). +Comment[ru]=Полный путь к Designer (Qt 4). +Comment[sk]=Absolútna cesta ku Designer (Qt4). +Comment[sr]=Апсолутна путања до Designer-а (Qt4). +Comment[sr@Latn]=Apsolutna putanja do Designer-a (Qt4). +Comment[sv]=Absolut sökväg till Designer (Qt4). +Comment[zh_TW]=設計家(Qt4)的絕對路徑 +Default= diff --git a/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevelop b/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevelop index c35d2fe9..3dc8acbb 100644 --- a/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevelop +++ b/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevelop @@ -10,7 +10,7 @@ Qt - + @@ -21,8 +21,8 @@ false *.o,*.lo,CVS - - + + true 4 @@ -31,8 +31,8 @@ %{QMAKE} %{DESIGNER} - - + + bash bash_bugs @@ -69,8 +69,8 @@ TDE Libraries (Doxygen) - - + + @@ -85,17 +85,17 @@ true - - + + ./bin/%{APPNAMELC} - + - + @@ -103,11 +103,11 @@ - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevtemplate b/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevtemplate deleted file mode 100644 index 1aea3b21..00000000 --- a/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevtemplate +++ /dev/null @@ -1,207 +0,0 @@ -# TDE Config File -[General] -Name=Qt4 Application -Name[br]=Meziant Qt4 -Name[ca]=Aplicació Qt4 -Name[da]=Qt4-Program -Name[de]=Qt4-Anwendung -Name[el]=Εφαρμογή Qt4 -Name[es]=Aplicación Qt4 -Name[et]=Qt4 rakendus -Name[fr]=Application Qt4 -Name[hu]=Qt4-alapú alkalmazás -Name[it]=Applicazione Qt4 -Name[ja]=Qt4 アプリケーション -Name[nds]=Qt4-Programm -Name[nl]=Qt4-toepassing -Name[pl]=Program Qt4 -Name[pt]=Aplicação do Qt4 -Name[pt_BR]=Aplicação do Qt4 -Name[ru]=Приложение Qt 4 -Name[sk]=Qt4 aplikácia -Name[sr]=Qt4 програм -Name[sr@Latn]=Qt4 program -Name[sv]=Qt4-program -Name[zh_TW]=Qt4 應用程式 -Icon=qt4makeapp.png -Category=C++/QMake project -Category[fr]=C++/QMake -Comment=Generate a QMake/Qt4 based application (crossplatform compatible) - Needs Qt4 -Comment[ca]=Genera una aplicació basada en QMake/Qt4 (multi plataforma) -Necessita Qt4- -Comment[da]=Generér et QMake/Qt4 baseret program (krydsplatform kompatibel) - behøver Qt4 -Comment[de]=Erstellt eine auf QMake/Qt4 basierende Anwendung (plattformunabhängig). - Benötigt Qt4. -Comment[el]=Δημιουργία μια εφαρμογής βασισμένης στα QMake/Qt4 (συμβατή με πολλαπλές πλατφόρμες) -Comment[es]=Genera una aplicación basada en QMake/Qt4 (con compatibilidad multiplataforma) - Necesita Qt4 -Comment[et]=Rakenduse loomine QMake'i/Qt4 põhjal (multiplatvormne) -Comment[fr]=Génère une application basée sur QMake / Qt4 (compatible multi-plateforme) - Nécessite Qt4 -Comment[hu]=Létrehoz egy QMake/Qt4-alapú, keresztfordításra is alkalmas alkalmazást - Qt4-et igényel -Comment[it]=Genera un'applicazione basata su QMake/Qt4 (compatibile multipiattaforma) - serve Qt4 -Comment[nds]=Stellt en op QMake un Qt4 opbuut Programm op (över Bedriefümgeven weg kompatibel) - Qt4 deit noot -Comment[nl]=Genereer een Qmake/Qt4-gebaseerde toepassing (crossplatform compatible) - heeft Qt4 nodig -Comment[pl]=Generuje program używający QMake i Qt4 (wieloplatformowy) - wymaga biblioteki Qt4 -Comment[pt]=Gera uma aplicação baseada no QMake/Qt4 (compatível com várias plataformas) - Necessita do Qt4 -Comment[pt_BR]=Gera uma aplicação baseada no QMake/Qt4 (compatível com várias plataformas) - Necessita do Qt4 -Comment[ru]=Создание кроссплатформенного приложения Qt 4, использующего QMake -Comment[sk]=Vygeneruje aplikáciu založenú na QMake/Qt4 (multiplatformovo kompatibilnú) - vyžaduje Qt4 -Comment[sr]=Прави програм на основи QMake/Qt4 (прекоплатформски компатибилан) — захтева Qt4 -Comment[sr@Latn]=Pravi program na osnovi QMake/Qt4 (prekoplatformski kompatibilan) — zahteva Qt4 -Comment[sv]=Skapar ett QMake/Qt4-baserat program (fungerar på andra plattformar). Kräver Qt4. -Comment[zh_TW]=產生一個 QMake/Qt4 為基礎的應用程式(跨平台相容)─需要 Qt4 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp,%{dest}/src/ReadMe -Archive=qt4makeapp.tar.gz - -[FILE1] -Type=install -Source=%{src}/qt4makeapp.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/qt4makeapp.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE3] -Type=install -Source=%{src}/src.pro -Dest=%{dest}/src/src.pro - -[FILE4] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE5] -Type=install -Source=%{src}/qt4makeapp.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE6] -Type=install -Source=%{src}/qt4makeapp.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE7] -Type=install -Source=%{src}/fileopen.xpm -Dest=%{dest}/src/fileopen.xpm - -[FILE8] -Type=install -Source=%{src}/filesave.xpm -Dest=%{dest}/src/filesave.xpm - -[FILE9] -Type=install -Source=%{src}/filenew.xpm -Dest=%{dest}/src/filenew.xpm - -[FILE10] -Type=install -Source=%{src}/editcopy.xpm -Dest=%{dest}/src/editcopy.xpm - -[FILE11] -Type=install -Source=%{src}/editpaste.xpm -Dest=%{dest}/src/editpaste.xpm - -[FILE12] -Type=install -Source=%{src}/editcut.xpm -Dest=%{dest}/src/editcut.xpm - -[FILE13] -Type=install -Source=%{src}/application.qrc -Dest=%{dest}/src/application.qrc - -[FILE14] -Type=install -Source=%{src}/ReadMe -Dest=%{dest}/src/ReadMe - -[MSG] -Type=message -Comment=A Qt4/Qmake based application was created in %{dest} -Comment[ca]=Una aplicació basada en Qt4/Qmake ha estat creada en %{dest} -Comment[da]=Et Qt4/Qmake baseret program blev oprettet i %{dest} -Comment[de]=Eine auf QMake/Qt4 basierende Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή βασισμένη στα Qt4/Qmake δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación basada en Qt4/Qmake ha sido creada en %{dest} -Comment[et]=Rakendus Qt4/QMake'i põhjal loodi asukohta %{dest} -Comment[fr]=Une application basée sur Qt4 / Qmake a été créée dans %{dest} -Comment[hu]=Létrejött egy Qt4/Qmake-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione basata su Qt4/Qmake in %{dest} -Comment[ja]=Qt4/QMake ベースのアプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en op Qt4 un Qmake opbuut Programm opstellt -Comment[nl]=Een Qt4/Qmake gebaseerde toepassing is aangemaakt in %{dest} -Comment[pl]=Program używający QMake i Qt4 został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação baseada no Qt4/Qmake em %{dest} -Comment[pt_BR]=Foi criada uma aplicação baseada no Qt4/Qmake em %{dest} -Comment[ru]=Приложение Qt 4, использующее Qmake, создано в %{dest} -Comment[sk]=Aplikácia založená na Qt4/Qmake bola vytvorená v %{dest} -Comment[sr]=Програм на основу Qt4/Qmake направљен је у %{dest} -Comment[sr@Latn]=Program na osnovu Qt4/Qmake napravljen je u %{dest} -Comment[sv]=Ett QMake/Qt4-baserat program skapades i %{dest} -Comment[zh_TW]=一個 QMake/Qt4 為基礎的應用程式已建立於 %{dest} - -Comment= -[QMAKE] -Type=value -ValueType=QString -Value=QMAKE -Comment=Absolute Path for QMake (Qt4). -Comment[ca]=Ruta absoluta per a QMake (Qt4). -Comment[da]=Absolut søgesti til QMake (Qt4). -Comment[de]=Absoluter Pfad für QMake (Qt4). -Comment[el]=Απόλυτη διαδρομή για το QMake (Qt4). -Comment[es]=Ruta completa para QMake (Qt4). -Comment[et]=QMake (Qt4) absoluutne asukoht. -Comment[fr]=Chemin absolu pour QMake (Qt4). -Comment[hu]=A QMake (Qt4) teljes elérési útja. -Comment[it]=Percorso assoluto per QMake (Qt4). -Comment[ja]=QMake (Qt4) の絶対パス -Comment[nds]=Afsluut Padd för QMake (Qt4) -Comment[nl]=Absoluut pad naar QMake (Qt4). -Comment[pl]=Ścieżka bezwzględna do QMake (Qt4). -Comment[pt]=Localização Absoluta do QMake (Qt4). -Comment[pt_BR]=Localização Absoluta do QMake (Qt4). -Comment[ru]=Полный путь к QMake (Qt 4). -Comment[sk]=Absolútna cesta ku QMake (Qt4). -Comment[sr]=Апсолутна путања до QMake-а (Qt4). -Comment[sr@Latn]=Apsolutna putanja do QMake-a (Qt4). -Comment[sv]=Absolut sökväg till QMake (Qt4). -Comment[zh_TW]=QMake(Qt4)的絕對路徑 -Default= -[DESIGNER] -Type=value -ValueType=QString -Value=DESIGNER -Comment=Absolute Path for Designer (Qt4). -Comment[ca]=Ruta absoluta per a Designer (Qt4). -Comment[da]=Absolut søgesti til Designer (Qt4). -Comment[de]=Absoluter Pfad für Designer (Qt4). -Comment[el]=Απόλυτη διαδρομή για τον Σχεδιαστή (Qt4). -Comment[es]=Ruta completa para Designer (Qt4). -Comment[et]=Disaineri (Qt4) absoluutne asukoht. -Comment[fr]=Chemin absolu pour Designer (Qt4). -Comment[hu]=A Designer (Qt4) teljes elérési útja -Comment[it]=Percorso assoluto del Designer (Qt4). -Comment[ja]=Designer (Qt4) の絶対パス -Comment[nds]=Afsluut Padd för Designer (Qt4) -Comment[nl]=Absoluut pad naar Designer (Qt4). -Comment[pl]=Ścieżka bezwzględna do Designera (Qt4). -Comment[pt]=Localização Absoluta do Designer (Qt4). -Comment[pt_BR]=Localização Absoluta do Designer (Qt4). -Comment[ru]=Полный путь к Designer (Qt 4). -Comment[sk]=Absolútna cesta ku Designer (Qt4). -Comment[sr]=Апсолутна путања до Designer-а (Qt4). -Comment[sr@Latn]=Apsolutna putanja do Designer-a (Qt4). -Comment[sv]=Absolut sökväg till Designer (Qt4). -Comment[zh_TW]=設計家(Qt4)的絕對路徑 -Default= diff --git a/languages/cpp/app_templates/qtopia4app/CMakeLists.txt b/languages/cpp/app_templates/qtopia4app/CMakeLists.txt index ef38e012..57849362 100644 --- a/languages/cpp/app_templates/qtopia4app/CMakeLists.txt +++ b/languages/cpp/app_templates/qtopia4app/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( qtopia4app.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qtopia4app.tar.gz qtopia4app.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qtopia4app.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qtopia4app.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qtopia4app/Makefile.am b/languages/cpp/app_templates/qtopia4app/Makefile.am index 8dcaa585..324291bb 100644 --- a/languages/cpp/app_templates/qtopia4app/Makefile.am +++ b/languages/cpp/app_templates/qtopia4app/Makefile.am @@ -5,10 +5,10 @@ dataFiles = Example.png app.tdevelop example.desktop \ templateName = qtopia4app ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} gzip -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qtopia4app/app.tdevelop b/languages/cpp/app_templates/qtopia4app/app.tdevelop index 320ae4d7..b890135e 100644 --- a/languages/cpp/app_templates/qtopia4app/app.tdevelop +++ b/languages/cpp/app_templates/qtopia4app/app.tdevelop @@ -11,7 +11,7 @@ - + @@ -22,8 +22,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -61,8 +61,8 @@ TDE Libraries (Doxygen) - - + + libtool @@ -75,8 +75,8 @@ false true - - + + @@ -105,11 +105,11 @@ - - + + - + @@ -128,11 +128,11 @@ true - + true 2 - - + + -f -dP @@ -141,14 +141,14 @@ -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - - + + true 4 @@ -159,5 +159,5 @@ /opt/Qtopia/SDK/4.2.4/x86/bin/designer - + diff --git a/languages/cpp/app_templates/qtopia4app/qtopia4app.kdevtemplate b/languages/cpp/app_templates/qtopia4app/qtopia4app.kdevtemplate new file mode 100644 index 00000000..e6a7ec9e --- /dev/null +++ b/languages/cpp/app_templates/qtopia4app/qtopia4app.kdevtemplate @@ -0,0 +1,193 @@ +# TDE Config File +[General] +Name=Qtopia 4 Application +Name[ca]=Aplicació per a Qtopia 4 +Name[da]=Qtopia4-program +Name[de]=Qtopia 4-Anwendung +Name[el]=Εφαρμογή Qtopia 4 +Name[es]=Aplicación para Qtopia 4 +Name[et]=Qtopia 4 rakendus +Name[hu]=Qtopia 4-alapú alkalmazás +Name[it]=Applicazione Qtopia 4 +Name[nds]=Qtopia 4-Programm +Name[nl]=Qtopia4-programma +Name[pl]=Program wykorzystujący Qtopię 4 +Name[pt]=Aplicação do Qtopia 4 +Name[pt_BR]=Aplicação do Qtopia 4 +Name[ru]=Приложение Qtopia 4 +Name[sk]=Qtopia 4 aplikácia +Name[sr]=Qtopia 4 програм +Name[sr@Latn]=Qtopia 4 program +Name[sv]=Qtopia 4-program +Name[zh_TW]=Qtopia 4 應用程式 +Icon=qmakeapp4.png +Category=C++/Embedded +Comment=Generate a Qmake/Qt based application for Qtopia 4.x +Comment[ca]=Genera una aplicació basada en Qmake/Qt per a Qtopia 4.x +Comment[da]=Genererer et QMake-/Qt-baseret program til Qtopia 4.x +Comment[de]=Erstellt eine auf QMake/Qt basierende Anwendung für Qtopia 4.x +Comment[el]=Δημιουργία μιας εφαρμογής βασισμένης στο Qmake/Qt για το Qtopia 4.x +Comment[es]=Genera una aplicación basada en Qmake/Qt para Qtopia 4.x +Comment[et]=Qtopia 4.x rakenduse loomine QMake'i/Qt põhjal +Comment[hu]=Létrehoz egy QMake/Qt-alapú alkalmazást a Qtopia 4.x rendszerhez +Comment[it]=Genera un'applicazione basata su QMake/Qt per Qtopia 4.x +Comment[nds]=Stellt en op QMake/Qt opbuut Programm för Qtopia 4.x op +Comment[nl]=Genereer een Qmake/Qt-gebaseerd programma voor Qtopia 4.x +Comment[pl]=Generuje program wykorzystujący QMake/Qt dla Qtopii 4.x +Comment[pt]=Gera uma aplicação, baseada no QMake/Qt, para o Qtopia 4.x +Comment[pt_BR]=Gera uma aplicação, baseada no QMake/Qt, para o Qtopia 4.x +Comment[ru]=Создание приложения Qt, использующего QMake, для Qtopia 4.x +Comment[sk]=Vygeneruje aplikáciu založenú na QMake/Qt pre Qtopia 4.x +Comment[sr]=Прави програм за Qtopia-у 4.x на основу QMake-а/Qt-а +Comment[sr@Latn]=Pravi program za Qtopia-u 4.x na osnovu QMake-a/Qt-a +Comment[sv]=Skapa ett Qmake/Qt-baserat program för Qtopia 4.x +Comment[zh_TW]=產生一個以 Qmake/Qt 為基礎的 Qtopia 4.x 應用程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp +Archive=qtopia4app.tar.gz + +[MkDir0] +Type=mkdir +Dir=%{dest}/help + +[MkDir1] +Type=mkdir +Dir=%{dest}/help/html + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/Example.png +Dest=%{dest}/%{APPNAME}.png +Process=false + +[FILE3] +Type=install +Source=%{src}/app.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[FILE4] +Type=install +Source=%{src}/example.cpp +Dest=%{dest}/%{APPNAMELC}.cpp + +[FILE5] +Type=install +Source=%{src}/example.h +Dest=%{dest}/%{APPNAMELC}.h + +[FILE6] +Type=install +EscapeXML=true +Source=%{src}/examplebase.ui +Dest=%{dest}/%{APPNAMELC}base.ui + +[FILE7] +Type=install +Source=%{src}/example.desktop +Dest=%{dest}/%{APPNAMELC}.desktop + +[FILE8] +Type=install +EscapeXML=true +Source=%{src}/example.html +Dest=%{dest}/%{APPNAMELC}.html + +[FILE9] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/main.cpp + +[MSG] +Type=message +Comment=A Qtopia application was created in %{dest} +Comment[ca]=Una aplicació basada en Qtopia ha estat creada en %{dest} +Comment[da]=Et Qtopia program blev oprettet i %{dest} +Comment[de]=Eine Qtopia-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή Qtopia δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación para Qtopia ha sido creada en %{dest} +Comment[et]=Qtopia rakendus loodi asukohta %{dest} +Comment[eu]=Qtopia aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد Qtopia در %{dest} ایجاد شد +Comment[fr]=Une application Qtopia a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár Qtopia i %{dest} +Comment[gl]=Creouse unha aplicación Qtopia en %{dest} +Comment[hu]=Létrejött egy Qtopia-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Qtopia in %{dest} +Comment[ja]=Qtopia アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Qtopia-Programm opstellt +Comment[ne]=Qtopia अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Qtopia-toepassing is aangemaakt in %{dest} +Comment[pl]=Program wykorzystujący Qtopię został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do Qtopia em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do Qtopia em %{dest} +Comment[ru]=Приложение Qtopia создано в %{dest} +Comment[sk]=Qtopia aplikácia bola vytvorená v %{dest} +Comment[sr]=Qtopia програм је направљен у %{dest} +Comment[sr@Latn]=Qtopia program je napravljen u %{dest} +Comment[sv]=Ett Qtopia-program skapades i %{dest} +Comment[tr]=Bir Qtopia uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了 Qtopia 应用程序 +Comment[zh_TW]=一個 Qtopia 應用程式已建立於 %{dest} + +[QMAKE] +Type=value +ValueType=QString +Value=QMAKE +Comment=Absolute Path for QMake (Qt4). +Comment[ca]=Ruta absoluta per a QMake (Qt4). +Comment[da]=Absolut søgesti til QMake (Qt4). +Comment[de]=Absoluter Pfad für QMake (Qt4). +Comment[el]=Απόλυτη διαδρομή για το QMake (Qt4). +Comment[es]=Ruta completa para QMake (Qt4). +Comment[et]=QMake (Qt4) absoluutne asukoht. +Comment[fr]=Chemin absolu pour QMake (Qt4). +Comment[hu]=A QMake (Qt4) teljes elérési útja. +Comment[it]=Percorso assoluto per QMake (Qt4). +Comment[ja]=QMake (Qt4) の絶対パス +Comment[nds]=Afsluut Padd för QMake (Qt4) +Comment[nl]=Absoluut pad naar QMake (Qt4). +Comment[pl]=Ścieżka bezwzględna do QMake (Qt4). +Comment[pt]=Localização Absoluta do QMake (Qt4). +Comment[pt_BR]=Localização Absoluta do QMake (Qt4). +Comment[ru]=Полный путь к QMake (Qt 4). +Comment[sk]=Absolútna cesta ku QMake (Qt4). +Comment[sr]=Апсолутна путања до QMake-а (Qt4). +Comment[sr@Latn]=Apsolutna putanja do QMake-a (Qt4). +Comment[sv]=Absolut sökväg till QMake (Qt4). +Comment[zh_TW]=QMake(Qt4)的絕對路徑 +Default=/opt/Qtopia/SDK/4.2.4/x86/bin/qtopiamake +[DESIGNER] +Type=value +ValueType=QString +Value=DESIGNER +Comment=Absolute Path for Designer (Qt4). +Comment[ca]=Ruta absoluta per a Designer (Qt4). +Comment[da]=Absolut søgesti til Designer (Qt4). +Comment[de]=Absoluter Pfad für Designer (Qt4). +Comment[el]=Απόλυτη διαδρομή για τον Σχεδιαστή (Qt4). +Comment[es]=Ruta completa para Designer (Qt4). +Comment[et]=Disaineri (Qt4) absoluutne asukoht. +Comment[fr]=Chemin absolu pour Designer (Qt4). +Comment[hu]=A Designer (Qt4) teljes elérési útja +Comment[it]=Percorso assoluto del Designer (Qt4). +Comment[ja]=Designer (Qt4) の絶対パス +Comment[nds]=Afsluut Padd för Designer (Qt4) +Comment[nl]=Absoluut pad naar Designer (Qt4). +Comment[pl]=Ścieżka bezwzględna do Designera (Qt4). +Comment[pt]=Localização Absoluta do Designer (Qt4). +Comment[pt_BR]=Localização Absoluta do Designer (Qt4). +Comment[ru]=Полный путь к Designer (Qt 4). +Comment[sk]=Absolútna cesta ku Designer (Qt4). +Comment[sr]=Апсолутна путања до Designer-а (Qt4). +Comment[sr@Latn]=Apsolutna putanja do Designer-a (Qt4). +Comment[sv]=Absolut sökväg till Designer (Qt4). +Comment[zh_TW]=設計家(Qt4)的絕對路徑 +Default=/opt/Qtopia/SDK/4.2.4/x86/bin/designer + + diff --git a/languages/cpp/app_templates/qtopia4app/qtopia4app.tdevtemplate b/languages/cpp/app_templates/qtopia4app/qtopia4app.tdevtemplate deleted file mode 100644 index e6a7ec9e..00000000 --- a/languages/cpp/app_templates/qtopia4app/qtopia4app.tdevtemplate +++ /dev/null @@ -1,193 +0,0 @@ -# TDE Config File -[General] -Name=Qtopia 4 Application -Name[ca]=Aplicació per a Qtopia 4 -Name[da]=Qtopia4-program -Name[de]=Qtopia 4-Anwendung -Name[el]=Εφαρμογή Qtopia 4 -Name[es]=Aplicación para Qtopia 4 -Name[et]=Qtopia 4 rakendus -Name[hu]=Qtopia 4-alapú alkalmazás -Name[it]=Applicazione Qtopia 4 -Name[nds]=Qtopia 4-Programm -Name[nl]=Qtopia4-programma -Name[pl]=Program wykorzystujący Qtopię 4 -Name[pt]=Aplicação do Qtopia 4 -Name[pt_BR]=Aplicação do Qtopia 4 -Name[ru]=Приложение Qtopia 4 -Name[sk]=Qtopia 4 aplikácia -Name[sr]=Qtopia 4 програм -Name[sr@Latn]=Qtopia 4 program -Name[sv]=Qtopia 4-program -Name[zh_TW]=Qtopia 4 應用程式 -Icon=qmakeapp4.png -Category=C++/Embedded -Comment=Generate a Qmake/Qt based application for Qtopia 4.x -Comment[ca]=Genera una aplicació basada en Qmake/Qt per a Qtopia 4.x -Comment[da]=Genererer et QMake-/Qt-baseret program til Qtopia 4.x -Comment[de]=Erstellt eine auf QMake/Qt basierende Anwendung für Qtopia 4.x -Comment[el]=Δημιουργία μιας εφαρμογής βασισμένης στο Qmake/Qt για το Qtopia 4.x -Comment[es]=Genera una aplicación basada en Qmake/Qt para Qtopia 4.x -Comment[et]=Qtopia 4.x rakenduse loomine QMake'i/Qt põhjal -Comment[hu]=Létrehoz egy QMake/Qt-alapú alkalmazást a Qtopia 4.x rendszerhez -Comment[it]=Genera un'applicazione basata su QMake/Qt per Qtopia 4.x -Comment[nds]=Stellt en op QMake/Qt opbuut Programm för Qtopia 4.x op -Comment[nl]=Genereer een Qmake/Qt-gebaseerd programma voor Qtopia 4.x -Comment[pl]=Generuje program wykorzystujący QMake/Qt dla Qtopii 4.x -Comment[pt]=Gera uma aplicação, baseada no QMake/Qt, para o Qtopia 4.x -Comment[pt_BR]=Gera uma aplicação, baseada no QMake/Qt, para o Qtopia 4.x -Comment[ru]=Создание приложения Qt, использующего QMake, для Qtopia 4.x -Comment[sk]=Vygeneruje aplikáciu založenú na QMake/Qt pre Qtopia 4.x -Comment[sr]=Прави програм за Qtopia-у 4.x на основу QMake-а/Qt-а -Comment[sr@Latn]=Pravi program za Qtopia-u 4.x na osnovu QMake-a/Qt-a -Comment[sv]=Skapa ett Qmake/Qt-baserat program för Qtopia 4.x -Comment[zh_TW]=產生一個以 Qmake/Qt 為基礎的 Qtopia 4.x 應用程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp -Archive=qtopia4app.tar.gz - -[MkDir0] -Type=mkdir -Dir=%{dest}/help - -[MkDir1] -Type=mkdir -Dir=%{dest}/help/html - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/Example.png -Dest=%{dest}/%{APPNAME}.png -Process=false - -[FILE3] -Type=install -Source=%{src}/app.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[FILE4] -Type=install -Source=%{src}/example.cpp -Dest=%{dest}/%{APPNAMELC}.cpp - -[FILE5] -Type=install -Source=%{src}/example.h -Dest=%{dest}/%{APPNAMELC}.h - -[FILE6] -Type=install -EscapeXML=true -Source=%{src}/examplebase.ui -Dest=%{dest}/%{APPNAMELC}base.ui - -[FILE7] -Type=install -Source=%{src}/example.desktop -Dest=%{dest}/%{APPNAMELC}.desktop - -[FILE8] -Type=install -EscapeXML=true -Source=%{src}/example.html -Dest=%{dest}/%{APPNAMELC}.html - -[FILE9] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/main.cpp - -[MSG] -Type=message -Comment=A Qtopia application was created in %{dest} -Comment[ca]=Una aplicació basada en Qtopia ha estat creada en %{dest} -Comment[da]=Et Qtopia program blev oprettet i %{dest} -Comment[de]=Eine Qtopia-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή Qtopia δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación para Qtopia ha sido creada en %{dest} -Comment[et]=Qtopia rakendus loodi asukohta %{dest} -Comment[eu]=Qtopia aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد Qtopia در %{dest} ایجاد شد -Comment[fr]=Une application Qtopia a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár Qtopia i %{dest} -Comment[gl]=Creouse unha aplicación Qtopia en %{dest} -Comment[hu]=Létrejött egy Qtopia-alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione Qtopia in %{dest} -Comment[ja]=Qtopia アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Qtopia-Programm opstellt -Comment[ne]=Qtopia अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Qtopia-toepassing is aangemaakt in %{dest} -Comment[pl]=Program wykorzystujący Qtopię został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do Qtopia em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do Qtopia em %{dest} -Comment[ru]=Приложение Qtopia создано в %{dest} -Comment[sk]=Qtopia aplikácia bola vytvorená v %{dest} -Comment[sr]=Qtopia програм је направљен у %{dest} -Comment[sr@Latn]=Qtopia program je napravljen u %{dest} -Comment[sv]=Ett Qtopia-program skapades i %{dest} -Comment[tr]=Bir Qtopia uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了 Qtopia 应用程序 -Comment[zh_TW]=一個 Qtopia 應用程式已建立於 %{dest} - -[QMAKE] -Type=value -ValueType=QString -Value=QMAKE -Comment=Absolute Path for QMake (Qt4). -Comment[ca]=Ruta absoluta per a QMake (Qt4). -Comment[da]=Absolut søgesti til QMake (Qt4). -Comment[de]=Absoluter Pfad für QMake (Qt4). -Comment[el]=Απόλυτη διαδρομή για το QMake (Qt4). -Comment[es]=Ruta completa para QMake (Qt4). -Comment[et]=QMake (Qt4) absoluutne asukoht. -Comment[fr]=Chemin absolu pour QMake (Qt4). -Comment[hu]=A QMake (Qt4) teljes elérési útja. -Comment[it]=Percorso assoluto per QMake (Qt4). -Comment[ja]=QMake (Qt4) の絶対パス -Comment[nds]=Afsluut Padd för QMake (Qt4) -Comment[nl]=Absoluut pad naar QMake (Qt4). -Comment[pl]=Ścieżka bezwzględna do QMake (Qt4). -Comment[pt]=Localização Absoluta do QMake (Qt4). -Comment[pt_BR]=Localização Absoluta do QMake (Qt4). -Comment[ru]=Полный путь к QMake (Qt 4). -Comment[sk]=Absolútna cesta ku QMake (Qt4). -Comment[sr]=Апсолутна путања до QMake-а (Qt4). -Comment[sr@Latn]=Apsolutna putanja do QMake-a (Qt4). -Comment[sv]=Absolut sökväg till QMake (Qt4). -Comment[zh_TW]=QMake(Qt4)的絕對路徑 -Default=/opt/Qtopia/SDK/4.2.4/x86/bin/qtopiamake -[DESIGNER] -Type=value -ValueType=QString -Value=DESIGNER -Comment=Absolute Path for Designer (Qt4). -Comment[ca]=Ruta absoluta per a Designer (Qt4). -Comment[da]=Absolut søgesti til Designer (Qt4). -Comment[de]=Absoluter Pfad für Designer (Qt4). -Comment[el]=Απόλυτη διαδρομή για τον Σχεδιαστή (Qt4). -Comment[es]=Ruta completa para Designer (Qt4). -Comment[et]=Disaineri (Qt4) absoluutne asukoht. -Comment[fr]=Chemin absolu pour Designer (Qt4). -Comment[hu]=A Designer (Qt4) teljes elérési útja -Comment[it]=Percorso assoluto del Designer (Qt4). -Comment[ja]=Designer (Qt4) の絶対パス -Comment[nds]=Afsluut Padd för Designer (Qt4) -Comment[nl]=Absoluut pad naar Designer (Qt4). -Comment[pl]=Ścieżka bezwzględna do Designera (Qt4). -Comment[pt]=Localização Absoluta do Designer (Qt4). -Comment[pt_BR]=Localização Absoluta do Designer (Qt4). -Comment[ru]=Полный путь к Designer (Qt 4). -Comment[sk]=Absolútna cesta ku Designer (Qt4). -Comment[sr]=Апсолутна путања до Designer-а (Qt4). -Comment[sr@Latn]=Apsolutna putanja do Designer-a (Qt4). -Comment[sv]=Absolut sökväg till Designer (Qt4). -Comment[zh_TW]=設計家(Qt4)的絕對路徑 -Default=/opt/Qtopia/SDK/4.2.4/x86/bin/designer - - diff --git a/languages/cpp/app_templates/qtopiaapp/CMakeLists.txt b/languages/cpp/app_templates/qtopiaapp/CMakeLists.txt index 74826ef3..424d19bc 100644 --- a/languages/cpp/app_templates/qtopiaapp/CMakeLists.txt +++ b/languages/cpp/app_templates/qtopiaapp/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( qtopiaapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qtopiaapp.tar.gz qtopiaapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qtopiaapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qtopiaapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qtopiaapp/Makefile.am b/languages/cpp/app_templates/qtopiaapp/Makefile.am index 342e2a96..afaaf294 100644 --- a/languages/cpp/app_templates/qtopiaapp/Makefile.am +++ b/languages/cpp/app_templates/qtopiaapp/Makefile.am @@ -5,10 +5,10 @@ dataFiles = Example.png app.tdevelop example.control example.desktop \ templateName = qtopiaapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qtopiaapp/app.tdevelop b/languages/cpp/app_templates/qtopiaapp/app.tdevelop index 67916b05..962f4622 100644 --- a/languages/cpp/app_templates/qtopiaapp/app.tdevelop +++ b/languages/cpp/app_templates/qtopiaapp/app.tdevelop @@ -11,7 +11,7 @@ - + @@ -22,8 +22,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -61,8 +61,8 @@ TDE Libraries (Doxygen) - - + + libtool @@ -75,8 +75,8 @@ false true - - + + @@ -85,11 +85,11 @@ -qws - - + + - + @@ -108,11 +108,11 @@ true - + true 2 - - + + -f -dP @@ -121,11 +121,11 @@ -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qtopiaapp/qtopiaapp.kdevtemplate b/languages/cpp/app_templates/qtopiaapp/qtopiaapp.kdevtemplate new file mode 100644 index 00000000..5c7dcc36 --- /dev/null +++ b/languages/cpp/app_templates/qtopiaapp/qtopiaapp.kdevtemplate @@ -0,0 +1,153 @@ +# TDE Config File +[General] +Name=Qtopia Application +Name[ca]=Aplicació per a Qtopia +Name[da]=Qtopia-program +Name[de]=Qtopia-Anwendung +Name[el]=Εφαρμογή Qtopia +Name[es]=Aplicación para Qtopia +Name[et]=Qtopia rakendus +Name[eu]=Qtopia aplikazioa +Name[fa]=کاربرد Qtopia +Name[fr]=Application Qtopia +Name[ga]=Feidhmchlár Qtopia +Name[gl]=Aplicación Qtopia +Name[hu]=Qtopia-alkalmazás +Name[it]=Applicazione Qtopia +Name[ja]=Qtopia アプリケーション +Name[nds]=Qtopia-Programm +Name[ne]=Qtopia अनुप्रयोग +Name[nl]=Qtopia-toepassing +Name[pl]=Program wykorzystujący Qtopię +Name[pt]=Aplicação do Qtopia +Name[pt_BR]=Aplicação do Qtopia +Name[ru]=Приложение Qtopia +Name[sk]=Qtopia aplikácia +Name[sl]=Program za Qtopio +Name[sr]=Qtopia програм +Name[sr@Latn]=Qtopia program +Name[sv]=Qtopia-program +Name[tr]=Qtopia Uygulaması +Name[zh_CN]=Qtopia 应用程序 +Name[zh_TW]=Qtopia 應用程式 +Icon=qmakeapp.png +Category=C++/Embedded +Category[fr]=C++/Environnement embarqu +Comment=Generate a TMake/Qt based application for Qtopia 1.x +Comment[ca]=Genera una aplicació basada en TMake/Qt per a Qtopia 1.x +Comment[da]=Generér et TMake/Qt baseret program for Qtopia 1.x +Comment[de]=Erstellt eine auf TMake/Qt basierende Anwendung für Qtopia 1.x +Comment[el]=Δημιουργία μιας εφαρμογής βασισμένης στα TMake/Qt για το Qtopia 1.x +Comment[es]=Genera una aplicación basada en TMake/Qt para Qtopia 1.x +Comment[et]=Qtopia 1.x rakenduse loomine TMake'i/Qt põhjal +Comment[eu]= Sortu TMake/Qt software-ean oinarritutako Qtopia 1.x aplikazio bat +Comment[fa]=یک کاربرد بر مبنای TMake/Qt برای Qtopia 1.x تولید می‌کند +Comment[fr]=Génère une application basée sur TMake / Qt pour Qtopia 1.x +Comment[ga]=Cruthaigh feidhmchlár bunaithe ar TMake/Qt le haghaidh Qtopia 1.x +Comment[gl]=Xera unha aplicación baseada en TMake/Qt para Qtopia 1.x +Comment[hu]=Létrehoz egy TMake/Qt-alapú alkalmazást a Qtopia 1.x rendszerhez +Comment[it]=Genera un'applicazione basata su TMake/Qt per Qtopia 1.x +Comment[ja]=Qtopia 1.x 用の TMake/Qt ベースのアプリケーションを作成 +Comment[nds]=Stellt en op TMake/Qt opbuut Programm för Qtopia 1.x op +Comment[ne]= Qtopia 1.x का लागि TMake/Qt आधारित अनुप्रयोग उत्पन्न गर्नुहोस् +Comment[nl]=Genereert een Tmake/Qt-gebaseerde toepassing voor Qtopie 1.x +Comment[pl]=Generuje program wykorzystujący TMake i Qt dla Qtopii 1.x +Comment[pt]=Gera uma aplicação, baseada no TMake/Qt, para o Qtopia 1.x +Comment[pt_BR]=Gera uma aplicação, baseada no TMake/Qt, para o Qtopia 1.x +Comment[ru]=Создание приложения Qt со сборкой посредством TMake для Qtopia 1.x +Comment[sk]=Vygeneruje aplikáciu založenú na TMake/Qt pre Qtopia 1.x +Comment[sr]=Прави програм за Qtopia-у 1.x на основуTMake-а/Qt-а +Comment[sr@Latn]=Pravi program za Qtopia-u 1.x na osnovuTMake-a/Qt-a +Comment[sv]=Skapa ett TMake/Qt-baserat program för Qtopia 1.x +Comment[tr]=Qtopia 1.x için TMake/Qt tabanlı bir uygulama yarat +Comment[zh_CN]=生成适用于 Qtopia 1.x 基于 TMake/Qt 的应用程序 +Comment[zh_TW]=產生一個 Qtopia 1.x 的 TMake/Qt 應用程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp +Archive=qtopiaapp.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/Example.png +Dest=%{dest}/%{APPNAME}.png +Process=false + +[FILE3] +Type=install +Source=%{src}/app.pro +Dest=%{dest}/%{APPNAMELC}.pro + +[FILE4] +Type=install +Source=%{src}/example.cpp +Dest=%{dest}/%{APPNAMELC}.cpp + +[FILE5] +Type=install +Source=%{src}/example.h +Dest=%{dest}/%{APPNAMELC}.h + +[FILE6] +Type=install +EscapeXML=true +Source=%{src}/examplebase.ui +Dest=%{dest}/%{APPNAMELC}base.ui + +[FILE7] +Type=install +Source=%{src}/example.control +Dest=%{dest}/%{APPNAMELC}.control + +[FILE8] +Type=install +Source=%{src}/example.desktop +Dest=%{dest}/%{APPNAMELC}.desktop + +[FILE9] +Type=install +EscapeXML=true +Source=%{src}/example.html +Dest=%{dest}/%{APPNAMELC}.html + +[FILE10] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/main.cpp + +[MSG] +Type=message +Comment=A Qtopia application was created in %{dest} +Comment[ca]=Una aplicació basada en Qtopia ha estat creada en %{dest} +Comment[da]=Et Qtopia program blev oprettet i %{dest} +Comment[de]=Eine Qtopia-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή Qtopia δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación para Qtopia ha sido creada en %{dest} +Comment[et]=Qtopia rakendus loodi asukohta %{dest} +Comment[eu]=Qtopia aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد Qtopia در %{dest} ایجاد شد +Comment[fr]=Une application Qtopia a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár Qtopia i %{dest} +Comment[gl]=Creouse unha aplicación Qtopia en %{dest} +Comment[hu]=Létrejött egy Qtopia-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Qtopia in %{dest} +Comment[ja]=Qtopia アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Qtopia-Programm opstellt +Comment[ne]=Qtopia अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Qtopia-toepassing is aangemaakt in %{dest} +Comment[pl]=Program wykorzystujący Qtopię został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do Qtopia em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do Qtopia em %{dest} +Comment[ru]=Приложение Qtopia создано в %{dest} +Comment[sk]=Qtopia aplikácia bola vytvorená v %{dest} +Comment[sr]=Qtopia програм је направљен у %{dest} +Comment[sr@Latn]=Qtopia program je napravljen u %{dest} +Comment[sv]=Ett Qtopia-program skapades i %{dest} +Comment[tr]=Bir Qtopia uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了 Qtopia 应用程序 +Comment[zh_TW]=一個 Qtopia 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/qtopiaapp/qtopiaapp.tdevtemplate b/languages/cpp/app_templates/qtopiaapp/qtopiaapp.tdevtemplate deleted file mode 100644 index 5c7dcc36..00000000 --- a/languages/cpp/app_templates/qtopiaapp/qtopiaapp.tdevtemplate +++ /dev/null @@ -1,153 +0,0 @@ -# TDE Config File -[General] -Name=Qtopia Application -Name[ca]=Aplicació per a Qtopia -Name[da]=Qtopia-program -Name[de]=Qtopia-Anwendung -Name[el]=Εφαρμογή Qtopia -Name[es]=Aplicación para Qtopia -Name[et]=Qtopia rakendus -Name[eu]=Qtopia aplikazioa -Name[fa]=کاربرد Qtopia -Name[fr]=Application Qtopia -Name[ga]=Feidhmchlár Qtopia -Name[gl]=Aplicación Qtopia -Name[hu]=Qtopia-alkalmazás -Name[it]=Applicazione Qtopia -Name[ja]=Qtopia アプリケーション -Name[nds]=Qtopia-Programm -Name[ne]=Qtopia अनुप्रयोग -Name[nl]=Qtopia-toepassing -Name[pl]=Program wykorzystujący Qtopię -Name[pt]=Aplicação do Qtopia -Name[pt_BR]=Aplicação do Qtopia -Name[ru]=Приложение Qtopia -Name[sk]=Qtopia aplikácia -Name[sl]=Program za Qtopio -Name[sr]=Qtopia програм -Name[sr@Latn]=Qtopia program -Name[sv]=Qtopia-program -Name[tr]=Qtopia Uygulaması -Name[zh_CN]=Qtopia 应用程序 -Name[zh_TW]=Qtopia 應用程式 -Icon=qmakeapp.png -Category=C++/Embedded -Category[fr]=C++/Environnement embarqu -Comment=Generate a TMake/Qt based application for Qtopia 1.x -Comment[ca]=Genera una aplicació basada en TMake/Qt per a Qtopia 1.x -Comment[da]=Generér et TMake/Qt baseret program for Qtopia 1.x -Comment[de]=Erstellt eine auf TMake/Qt basierende Anwendung für Qtopia 1.x -Comment[el]=Δημιουργία μιας εφαρμογής βασισμένης στα TMake/Qt για το Qtopia 1.x -Comment[es]=Genera una aplicación basada en TMake/Qt para Qtopia 1.x -Comment[et]=Qtopia 1.x rakenduse loomine TMake'i/Qt põhjal -Comment[eu]= Sortu TMake/Qt software-ean oinarritutako Qtopia 1.x aplikazio bat -Comment[fa]=یک کاربرد بر مبنای TMake/Qt برای Qtopia 1.x تولید می‌کند -Comment[fr]=Génère une application basée sur TMake / Qt pour Qtopia 1.x -Comment[ga]=Cruthaigh feidhmchlár bunaithe ar TMake/Qt le haghaidh Qtopia 1.x -Comment[gl]=Xera unha aplicación baseada en TMake/Qt para Qtopia 1.x -Comment[hu]=Létrehoz egy TMake/Qt-alapú alkalmazást a Qtopia 1.x rendszerhez -Comment[it]=Genera un'applicazione basata su TMake/Qt per Qtopia 1.x -Comment[ja]=Qtopia 1.x 用の TMake/Qt ベースのアプリケーションを作成 -Comment[nds]=Stellt en op TMake/Qt opbuut Programm för Qtopia 1.x op -Comment[ne]= Qtopia 1.x का लागि TMake/Qt आधारित अनुप्रयोग उत्पन्न गर्नुहोस् -Comment[nl]=Genereert een Tmake/Qt-gebaseerde toepassing voor Qtopie 1.x -Comment[pl]=Generuje program wykorzystujący TMake i Qt dla Qtopii 1.x -Comment[pt]=Gera uma aplicação, baseada no TMake/Qt, para o Qtopia 1.x -Comment[pt_BR]=Gera uma aplicação, baseada no TMake/Qt, para o Qtopia 1.x -Comment[ru]=Создание приложения Qt со сборкой посредством TMake для Qtopia 1.x -Comment[sk]=Vygeneruje aplikáciu založenú na TMake/Qt pre Qtopia 1.x -Comment[sr]=Прави програм за Qtopia-у 1.x на основуTMake-а/Qt-а -Comment[sr@Latn]=Pravi program za Qtopia-u 1.x na osnovuTMake-a/Qt-a -Comment[sv]=Skapa ett TMake/Qt-baserat program för Qtopia 1.x -Comment[tr]=Qtopia 1.x için TMake/Qt tabanlı bir uygulama yarat -Comment[zh_CN]=生成适用于 Qtopia 1.x 基于 TMake/Qt 的应用程序 -Comment[zh_TW]=產生一個 Qtopia 1.x 的 TMake/Qt 應用程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp -Archive=qtopiaapp.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/Example.png -Dest=%{dest}/%{APPNAME}.png -Process=false - -[FILE3] -Type=install -Source=%{src}/app.pro -Dest=%{dest}/%{APPNAMELC}.pro - -[FILE4] -Type=install -Source=%{src}/example.cpp -Dest=%{dest}/%{APPNAMELC}.cpp - -[FILE5] -Type=install -Source=%{src}/example.h -Dest=%{dest}/%{APPNAMELC}.h - -[FILE6] -Type=install -EscapeXML=true -Source=%{src}/examplebase.ui -Dest=%{dest}/%{APPNAMELC}base.ui - -[FILE7] -Type=install -Source=%{src}/example.control -Dest=%{dest}/%{APPNAMELC}.control - -[FILE8] -Type=install -Source=%{src}/example.desktop -Dest=%{dest}/%{APPNAMELC}.desktop - -[FILE9] -Type=install -EscapeXML=true -Source=%{src}/example.html -Dest=%{dest}/%{APPNAMELC}.html - -[FILE10] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/main.cpp - -[MSG] -Type=message -Comment=A Qtopia application was created in %{dest} -Comment[ca]=Una aplicació basada en Qtopia ha estat creada en %{dest} -Comment[da]=Et Qtopia program blev oprettet i %{dest} -Comment[de]=Eine Qtopia-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή Qtopia δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación para Qtopia ha sido creada en %{dest} -Comment[et]=Qtopia rakendus loodi asukohta %{dest} -Comment[eu]=Qtopia aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد Qtopia در %{dest} ایجاد شد -Comment[fr]=Une application Qtopia a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár Qtopia i %{dest} -Comment[gl]=Creouse unha aplicación Qtopia en %{dest} -Comment[hu]=Létrejött egy Qtopia-alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione Qtopia in %{dest} -Comment[ja]=Qtopia アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Qtopia-Programm opstellt -Comment[ne]=Qtopia अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Qtopia-toepassing is aangemaakt in %{dest} -Comment[pl]=Program wykorzystujący Qtopię został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do Qtopia em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do Qtopia em %{dest} -Comment[ru]=Приложение Qtopia создано в %{dest} -Comment[sk]=Qtopia aplikácia bola vytvorená v %{dest} -Comment[sr]=Qtopia програм је направљен у %{dest} -Comment[sr@Latn]=Qtopia program je napravljen u %{dest} -Comment[sv]=Ett Qtopia-program skapades i %{dest} -Comment[tr]=Bir Qtopia uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了 Qtopia 应用程序 -Comment[zh_TW]=一個 Qtopia 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tde4app/CMakeLists.txt b/languages/cpp/app_templates/tde4app/CMakeLists.txt deleted file mode 100644 index 29997b2c..00000000 --- a/languages/cpp/app_templates/tde4app/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_custom_target( tde4app.tar.gz ALL - COMMAND tar zcf tde4app.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - tdeapp4.cpp tdeapp4.h prefs_base.ui tdeapp4view.cpp - tdeapp4view.h tdeapp4view_base.ui main.cpp tde4appui.rc - tde4app-CMakeLists.txt tdeapp4.desktop tdeapp4.kcfg - settings.kcfgc tde4app.png README tde4app.tdevelop - tde4app.tdevelop.filelist -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tde4app.tar.gz tde4app.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tde4app.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tde4app/Makefile.am b/languages/cpp/app_templates/tde4app/Makefile.am deleted file mode 100644 index 3fc82b7a..00000000 --- a/languages/cpp/app_templates/tde4app/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -dataFiles = tdeapp4.cpp tdeapp4.h prefs_base.ui tdeapp4view.cpp tdeapp4view.h tdeapp4view_base.ui \ - main.cpp tde4appui.rc CMakeLists.txt tdeapp4.desktop tdeapp4.kcfg settings.kcfgc \ - tde4app.png README tde4app.tdevelop tde4app.tdevelop.filelist - -templateName = tde4app - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(templateName).tar.gz: ${dataFiles} - $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} - $(GZIP_COMMAND) -f9 $(templateName).tar - -archivedir = ${appwizarddatadir} -archive_DATA = $(templateName).tar.gz ${templateName}.png - -CLEANFILES = *.tar.gz diff --git a/languages/cpp/app_templates/tde4app/README b/languages/cpp/app_templates/tde4app/README deleted file mode 100644 index 8180d28c..00000000 --- a/languages/cpp/app_templates/tde4app/README +++ /dev/null @@ -1,15 +0,0 @@ -!!!!!ATTENTION!!!!! - -Before starting the build you may need to setup the KDE4 environment variables. -To do this open Project->Project Options and then look at the "Run" and the "Make" -pages. Each of these two has an environment variables widget in which you have -to fill in the right values for the variables already listed. - -After setting up the variables you'll also need to run cmake inside the build -directory. This can not be done by tdevelop as a KDE4 environment is needed -when running cmake to find KDE4. Open the integrated konsole and change to the build -subdirectory. Then setup a KDE4 environment and run "cmake ../". - -More information how to setup a KDE4 development environment can be found on -http://techbase.kde.org/Getting_Started/Increased_Productivity_in_KDE4_with_Scripts - diff --git a/languages/cpp/app_templates/tde4app/main.cpp b/languages/cpp/app_templates/tde4app/main.cpp deleted file mode 100644 index 5c83921b..00000000 --- a/languages/cpp/app_templates/tde4app/main.cpp +++ /dev/null @@ -1,55 +0,0 @@ -%{CPP_TEMPLATE} - -#include "%{APPNAMELC}.h" -#include -#include -#include -#include - -static const char description[] = - I18N_NOOP("A KDE 4 Application"); - -static const char version[] = "%{VERSION}"; - -int main(int argc, char **argv) -{ - TDEAboutData about("%{APPNAMELC}", 0, ki18n("%{APPNAME}"), version, ki18n(description), - TDEAboutData::License_%{LICENSE}, ki18n("(C) %{YEAR} %{AUTHOR}"), KLocalizedString(), 0, "%{EMAIL}"); - about.addAuthor( ki18n("%{AUTHOR}"), KLocalizedString(), "%{EMAIL}" ); - TDECmdLineArgs::init(argc, argv, &about); - - TDECmdLineOptions options; - options.add("+[URL]", ki18n( "Document to open" )); - TDECmdLineArgs::addCmdLineOptions(options); - TDEApplication app; - - %{APPNAME} *widget = new %{APPNAME}; - - // see if we are starting with session management - if (app.isSessionRestored()) - { - RESTORE(%{APPNAME}); - } - else - { - // no session.. just start up normally - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - if (args->count() == 0) - { - //%{APPNAMELC} *widget = new %{APPNAMELC}; - widget->show(); - } - else - { - int i = 0; - for (; i < args->count(); i++) - { - //%{APPNAMELC} *widget = new %{APPNAMELC}; - widget->show(); - } - } - args->clear(); - } - - return app.exec(); -} diff --git a/languages/cpp/app_templates/tde4app/prefs_base.ui b/languages/cpp/app_templates/tde4app/prefs_base.ui deleted file mode 100644 index 87a191f1..00000000 --- a/languages/cpp/app_templates/tde4app/prefs_base.ui +++ /dev/null @@ -1,155 +0,0 @@ - - prefs_base - - - - 0 - 0 - 282 - 156 - - - - - - - Background color: - - - false - - - - - - - Choose a new background color - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'DejaVu Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Change the <span style=" font-weight:600;">background</span> color by clicking here and choose the new <span style=" color:#ff0000;">color</span> in the <span style=" font-style:italic;">color dialog</span>.</p></body></html> - - - - - - - - - - Project age: - - - false - - - - - - - Foreground color: - - - false - - - - - - - Choose a new foreground color - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'DejaVu Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Change the <span style=" font-weight:600;">foreground</span> color by clicking here and choose the new <span style=" color:#ff0000;">color</span> in the <span style=" font-style:italic;">color dialog</span>.</p></body></html> - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 41 - 20 - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 41 - 20 - - - - - - - - Set the project age (in days) - - - Change the project age (in days) by choosing a new number of days. - - - 1 - - - 2 - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 41 - 20 - - - - - - - - qPixmapFromMimeSource - - - KColorButton - QPushButton -
    kcolorbutton.h
    -
    -
    - - kcolorbutton.h - - - -
    diff --git a/languages/cpp/app_templates/tde4app/settings.kcfgc b/languages/cpp/app_templates/tde4app/settings.kcfgc deleted file mode 100644 index 402fad09..00000000 --- a/languages/cpp/app_templates/tde4app/settings.kcfgc +++ /dev/null @@ -1,6 +0,0 @@ -# Code generation options for tdeconfig_compiler -File=%{APPNAMELC}.kcfg -ClassName=Settings -Singleton=true -Mutators=col_background,col_foreground -# will create the necessary code for setting those variables diff --git a/languages/cpp/app_templates/tde4app/tde4app-CMakeLists.txt b/languages/cpp/app_templates/tde4app/tde4app-CMakeLists.txt deleted file mode 100644 index db1f4bab..00000000 --- a/languages/cpp/app_templates/tde4app/tde4app-CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -project(%{APPNAME}) -find_package(KDE4 REQUIRED) -include (KDE4Defaults) -include_directories( ${KDE4_INCLUDES} ${QT_INCLUDES} ) - -set(%{APPNAMELC}_SRCS - %{APPNAMELC}.cpp - main.cpp - %{APPNAMELC}view.cpp - ) - -#kde4_automoc(${%{APPNAMELC}_SRCS}) - -kde4_add_ui_files(%{APPNAMELC}_SRCS %{APPNAMELC}view_base.ui prefs_base.ui) - -kde4_add_kcfg_files(%{APPNAMELC}_SRCS settings.kcfgc ) - -kde4_add_executable(%{APPNAMELC} ${%{APPNAMELC}_SRCS}) - -target_link_libraries(%{APPNAMELC} ${KDE4_TDEUI_LIBS} ) - -install(TARGETS %{APPNAMELC} DESTINATION ${BIN_INSTALL_DIR} ) - - -########### install files ############### - -install( FILES %{APPNAMELC}.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( FILES %{APPNAMELC}.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) -install( FILES %{APPNAMELC}ui.rc DESTINATION ${DATA_INSTALL_DIR}/%{APPNAMELC} ) - - diff --git a/languages/cpp/app_templates/tde4app/tde4app.png b/languages/cpp/app_templates/tde4app/tde4app.png deleted file mode 100644 index a421a664..00000000 Binary files a/languages/cpp/app_templates/tde4app/tde4app.png and /dev/null differ diff --git a/languages/cpp/app_templates/tde4app/tde4app.tdevelop b/languages/cpp/app_templates/tde4app/tde4app.tdevelop deleted file mode 100644 index 87554ffc..00000000 --- a/languages/cpp/app_templates/tde4app/tde4app.tdevelop +++ /dev/null @@ -1,205 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - TDevCustomProject - C++ - - C++ - Code - Qt - KDE - - %{APPNAMELC} - . - false - - - - - - - - - - - - - false - *.o,*.lo,CVS - - - - - ada - ada_bugs_gcc - bash - bash_bugs - clanlib - w3c-dom-level2-html - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - ruby - ruby_bugs - sdl - w3c-svg - sw - w3c-uaag10 - wxwidgets_bugs - - - qmake User Guide - - - - - libtool - - - true - false - false - true - - - false - true - - - - - - - - - - - - -f - - -dP - - -f - -u3 -p - - - - - - - false - - - .h - .cpp - true - - - - - %{dest}/build/%{APPNAMELC} - - false - false - - - - - - - - - false - false - - true - %{dest} - executable - - - make - %{dest}/build - - - false - 1 - 0 - false - make - - - default - - - - - - - - - - - - - *.h - *.cpp - CMakeLists.txt - *.desktop - *.kcfg* - *.ui - Doxyfile - *.dox - *.rc - *.cmake - - - 0 - - - - default - - - - - - build - - - - - true - 4 - 4 - ExternalDesigner - /usr/bin/designer-qt4 - /usr/lib/qt4 - - - - true - 2 - - - - Doxygen Documentation Collection - %{APPNAMELC}.tag - - - diff --git a/languages/cpp/app_templates/tde4app/tde4app.tdevelop.filelist b/languages/cpp/app_templates/tde4app/tde4app.tdevelop.filelist deleted file mode 100644 index 50a0a4f0..00000000 --- a/languages/cpp/app_templates/tde4app/tde4app.tdevelop.filelist +++ /dev/null @@ -1,13 +0,0 @@ -# TDevelop Custom Project File List -CMakeLists.txt -main.cpp -prefs_base.ui -settings.kcfgc -%{APPNAMELC}.cpp -%{APPNAMELC}.desktop -%{APPNAMELC}.h -%{APPNAMELC}.kcfg -%{APPNAMELC}ui.rc -%{APPNAMELC}view.cpp -%{APPNAMELC}view.h -%{APPNAMELC}view_base.ui diff --git a/languages/cpp/app_templates/tde4app/tde4app.tdevtemplate b/languages/cpp/app_templates/tde4app/tde4app.tdevtemplate deleted file mode 100644 index 1516e92e..00000000 --- a/languages/cpp/app_templates/tde4app/tde4app.tdevtemplate +++ /dev/null @@ -1,155 +0,0 @@ -# KDE Config File -[General] -Name=KDE4 Application framework -Name[ca]=Entorn de treball d'aplicacions pel KDE4 -Name[da]=KDE4 program-framework -Name[de]=KDE 4-Anwendungsgrundgerüst -Name[el]=Πλαίσιο εφαρμογής του KDE4 -Name[es]=Infraestructura de aplicación para KDE4 -Name[et]=KDE4 rakenduse raamistik -Name[hu]=Keretrendszer KDE4-alapú alkalmazáshoz -Name[it]=Infrastruttura per applicazioni KDE4 -Name[nds]=KDE4-Programmrahmenwark -Name[nl]=KDE4-programmaframewerk -Name[pl]=Szablon programu dla KDE4 -Name[pt]=Plataforma de aplicações do KDE4 -Name[pt_BR]=Plataforma de aplicações do KDE4 -Name[ru]=Инструментарий для создания приложений KDE 4 -Name[sk]=KDE4 aplikačný framework -Name[sr]=Радни оквир KDE4 програма -Name[sr@Latn]=Radni okvir KDE4 programa -Name[sv]=KDE 4-programramverk -Name[zh_TW]=KDE4 應用程式框架 -Icon=kde4app.png -Category=C++/KDE4 -Comment=Generates a simple KDE4 application with one toplevel window, menus and toolbars. -Comment[ca]=Genera una aplicació senzilla per al KDE4 amb una finestra principal, menús i barres d'eines. -Comment[da]=Genererer et simpelt KDE4-program med et vindue på topniveau, menuer og værktøjslinjer. -Comment[de]=Erstellt eine einfache KDE 4-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. -Comment[el]=Δημιουργεί μια απλή εφαρμογή του KDE4 με ένα ανώτερο παράθυρο, μενού, και γραμμές εργαλείων. -Comment[es]=Genera una sencilla aplicación para KDE4 con una ventana principal, menús y barras de herramientas. -Comment[et]=Lihtsa KDE4 rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. -Comment[hu]=Létrehoz egy egyszerű KDE4-alkalmazást egy főablakkal, menükkel és eszköztárakkal. -Comment[it]=Genera una semplice applicazione KDE4 con una finestra toplevel, menu e barre degli strumenti. -Comment[nds]=Stellt en eenfach KDE4-Programm mit een böverst Finster, Menüs un Warktüüchbalkens op. -Comment[nl]=Genereert een eenvoudig KDE4-programma met een topniveauvenster, menu's en werkbalken. -Comment[pl]=Generuje prosty program dla KDE4 posiadający okno, menu i paski narzędzi. -Comment[pt]=Gera uma aplicação para KDE4 simples, com uma janela de topo, menus e barras de ferramentas. -Comment[pt_BR]=Gera uma aplicação para KDE4 simples, com uma janela de topo, menus e barras de ferramentas. -Comment[ru]=Создание простого приложения KDE 4 с одним окном верхнего уровня, меню и панелями инструментов. -Comment[sk]=Vygeneruje jednoduchú KDE4 aplikáciu s jedným oknom, menu a panelom nástrojov. -Comment[sr]=Прави једноставан KDE4 програм са једним прозором највишег нивоа, менијима и тракама са алатом. -Comment[sr@Latn]=Pravi jednostavan KDE4 program sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. -Comment[sv]=Skapar ett enkelt KDE 4-program med ett toppnivåfönster, menyer och verktygsrader. -Comment[zh_TW]=產生一個簡單的 KDE4 應用程式,內含頂層視窗、選單與工具列。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/README -Archive=kde4app.tar.gz - -[FILE1] -Type=install -Source=%{src}/CMakeLists.txt -Dest=%{dest}/CMakeLists.txt - -[FILE2] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/main.cpp - -[FILE3] -Type=install -Source=%{src}/kapp4.cpp -Dest=%{dest}/%{APPNAMELC}.cpp - -[FILE4] -Type=install -Source=%{src}/kapp4.h -Dest=%{dest}/%{APPNAMELC}.h - -[FILE5] -Type=install -Source=%{src}/kapp4view.cpp -Dest=%{dest}/%{APPNAMELC}view.cpp - - -[FILE6] -Type=install -Source=%{src}/kapp4view.h -Dest=%{dest}/%{APPNAMELC}view.h - - -[FILE7] -Type=install -Source=%{src}/kde4appui.rc -Dest=%{dest}/%{APPNAMELC}ui.rc - - -[FILE8] -Type=install -Source=%{src}/kapp4view_base.ui -Dest=%{dest}/%{APPNAMELC}view_base.ui - - -[FILE9] -Type=install -Source=%{src}/kapp4.desktop -Dest=%{dest}/%{APPNAMELC}.desktop - -[FILE10] -Type=install -Source=%{src}/kapp4.kcfg -Dest=%{dest}/%{APPNAMELC}.kcfg - - -[FILE11] -Type=install -Source=%{src}/prefs_base.ui -Dest=%{dest}/prefs_base.ui - - -[FILE12] -Type=install -Source=%{src}/settings.kcfgc -Dest=%{dest}/settings.kcfgc - -[FILE13] -Type=install -Source=%{src}/README -Dest=%{dest}/README - -[FILE14] -Type=install -Source=%{src}/kde4app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE15] -Type=install -Source=%{src}/kde4app.tdevelop.filelist -Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist - -[MKDIR1] -Type=mkdir -Dir=%{dest}/build - -[MSG] -Type=message -Comment=A KDE4 Application was created at %{dest} -Comment[ca]=S'ha creat una aplicació per al KDE4 a %{dest} -Comment[da]=Et KDE4-program blev oprettet i %{dest} -Comment[de]=Eine KDE 4-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή KDE4 δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación para KDE4 ha sido creada en %{dest} -Comment[et]=KDE4 rakendus loodi asukohta %{dest} -Comment[hu]=Létrejött egy KDE4-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione KDE4 in %{dest} -Comment[nds]=In %{dest} wöör en KDE4-Programm opstellt -Comment[nl]=Een KDE4-toepassing is aangemaakt in %{dest} -Comment[pl]=Program dla KDE4 został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do KDE4 em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do KDE4 em %{dest} -Comment[ru]=Приложение KDE 4 создано в %{dest} -Comment[sk]=KDE4 aplikácia bola vytvorená v %{dest} -Comment[sr]=KDE4 програм је направљен у %{dest} -Comment[sr@Latn]=KDE4 program je napravljen u %{dest} -Comment[sv]=Ett KDE 4-program skapades i %{dest} -Comment[zh_TW]=一個 KDE4 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tde4app/tde4appui.rc b/languages/cpp/app_templates/tde4app/tde4appui.rc deleted file mode 100644 index 406bccc6..00000000 --- a/languages/cpp/app_templates/tde4app/tde4appui.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - &Move - - - - diff --git a/languages/cpp/app_templates/tde4app/tdeapp4.cpp b/languages/cpp/app_templates/tde4app/tdeapp4.cpp deleted file mode 100644 index d224123c..00000000 --- a/languages/cpp/app_templates/tde4app/tdeapp4.cpp +++ /dev/null @@ -1,90 +0,0 @@ -%{CPP_TEMPLATE} - -#include "%{APPNAMELC}.h" -#include "%{APPNAMELC}view.h" -#include "settings.h" - -#include -#include - -#include -#include - -#include -#include -#include - -#include - -%{APPNAME}::%{APPNAME}() - : KXmlGuiWindow(), - m_view(new %{APPNAME}View(this)), - m_printer(0) -{ - // accept dnd - setAcceptDrops(true); - - // tell the KXmlGuiWindow that this is indeed the main widget - setCentralWidget(m_view); - - // then, setup our actions - setupActions(); - - // add a status bar - statusBar()->show(); - - // a call to KXmlGuiWindow::setupGUI() populates the GUI - // with actions, using KXMLGUI. - // It also applies the saved mainwindow settings, if any, and ask the - // mainwindow to automatically save settings if changed: window size, - // toolbar position, icon size, etc. - setupGUI(); -} - -%{APPNAME}::~%{APPNAME}() -{ -} - -void %{APPNAME}::setupActions() -{ - TDEStandardAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); - TDEStandardAction::quit(tqApp, TQT_SLOT(quit()), actionCollection()); - - TDEStandardAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); - - // custom menu and menu item - the slot is in the class %{APPNAME}View - TDEAction *custom = new TDEAction(TDEIcon("colorize"), i18n("Swi&tch Colors"), this); - actionCollection()->addAction( TQLatin1String("switch_action"), custom ); - connect(custom, TQT_SIGNAL(triggered(bool)), m_view, TQT_SLOT(switchColors())); -} - -void %{APPNAME}::fileNew() -{ - // this slot is called whenever the File->New menu is selected, - // the New shortcut is pressed (usually CTRL+N) or the New toolbar - // button is clicked - - // create a new window - (new %{APPNAME})->show(); -} - -void %{APPNAME}::optionsPreferences() -{ - // The preference dialog is derived from prefs_base.ui - // - // compare the names of the widgets in the .ui file - // to the names of the variables in the .kcfg file - //avoid to have 2 dialogs shown - if ( TDEConfigDialog::showDialog( "settings" ) ) { - return; - } - TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self()); - TQWidget *generalSettingsDlg = new TQWidget; - ui_prefs_base.setupUi(generalSettingsDlg); - dialog->addPage(generalSettingsDlg, i18n("General"), "package_setting"); - connect(dialog, TQT_SIGNAL(settingsChanged(TQString)), m_view, TQT_SLOT(settingsChanged())); - dialog->setAttribute( TQt::WA_DeleteOnClose ); - dialog->show(); -} - -#include "%{APPNAMELC}.moc" diff --git a/languages/cpp/app_templates/tde4app/tdeapp4.desktop b/languages/cpp/app_templates/tde4app/tdeapp4.desktop deleted file mode 100644 index 63b359c5..00000000 --- a/languages/cpp/app_templates/tde4app/tdeapp4.desktop +++ /dev/null @@ -1,30 +0,0 @@ -[Desktop Entry] -Name=KApp4 -Name[nds]=KProg4 -Name[sv]=KDE 4-program -Name[zh_TW]=KApp4 程式 -Exec=tdeapp4 %i -caption "%c" -Icon=kapp4 -Type=Application -DocPath=kapp4/kapp4.html -GenericName=A KDE4 Application -GenericName[ca]=Una aplicació del KDE4 -GenericName[da]=Et KDE4-program -GenericName[de]=Eine KDE 4-Anwendung -GenericName[el]=Μία εφαρμογή του KDE4 -GenericName[es]=Una aplicación para KDE4 -GenericName[et]=KDE4 rakendus -GenericName[hu]=KDE4-alapú alkalmazás -GenericName[it]=Applicazione KDE4 -GenericName[nds]=En KDE4-Programm -GenericName[nl]=Een KDE4-programma -GenericName[pl]=Program dla KDE4 -GenericName[pt]=Uma Aplicação do KDE4 -GenericName[pt_BR]=Uma Aplicação do KDE4 -GenericName[ru]=Приложение KDE 4 -GenericName[sk]=KDE4 aplikácia -GenericName[sr]=KDE4 програм -GenericName[sr@Latn]=KDE4 program -GenericName[sv]=Ett KDE 4-program -GenericName[zh_TW]=KDE4 應用程式 -Terminal=false diff --git a/languages/cpp/app_templates/tde4app/tdeapp4.h b/languages/cpp/app_templates/tde4app/tdeapp4.h deleted file mode 100644 index 3c209de2..00000000 --- a/languages/cpp/app_templates/tde4app/tdeapp4.h +++ /dev/null @@ -1,54 +0,0 @@ -%{H_TEMPLATE} -#ifndef %{APPNAMEUC}_H -#define %{APPNAMEUC}_H - - -#include - -#include "ui_prefs_base.h" - -class %{APPNAME}View; -class KPrinter; -class TDEToggleAction; -class KUrl; - -/** - * This class serves as the main window for %{APPNAME}. It handles the - * menus, toolbars, and status bars. - * - * @short Main window class - * @author Andreas Pakulat - * @version 0.1 - */ -class %{APPNAME} : public KXmlGuiWindow -{ - Q_OBJECT - -public: - /** - * Default Constructor - */ - %{APPNAME}(); - - /** - * Default Destructor - */ - virtual ~%{APPNAME}(); - -private slots: - void fileNew(); - void optionsPreferences(); - -private: - void setupActions(); - -private: - Ui::prefs_base ui_prefs_base ; - %{APPNAME}View *m_view; - - KPrinter *m_printer; - TDEToggleAction *m_toolbarAction; - TDEToggleAction *m_statusbarAction; -}; - -#endif // _%{APPNAMELC}_H_ diff --git a/languages/cpp/app_templates/tde4app/tdeapp4.kcfg b/languages/cpp/app_templates/tde4app/tdeapp4.kcfg deleted file mode 100644 index 6040f769..00000000 --- a/languages/cpp/app_templates/tde4app/tdeapp4.kcfg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - black - - - - yellow - - - - 2 - - - diff --git a/languages/cpp/app_templates/tde4app/tdeapp4view.cpp b/languages/cpp/app_templates/tde4app/tdeapp4view.cpp deleted file mode 100644 index af95aa15..00000000 --- a/languages/cpp/app_templates/tde4app/tdeapp4view.cpp +++ /dev/null @@ -1,42 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}view.h" -#include "settings.h" - -#include -#include - -%{APPNAME}View::%{APPNAME}View(TQWidget *) -{ - ui_%{APPNAMELC}view_base.setupUi(this); - settingsChanged(); - setAutoFillBackground(true); -} - -%{APPNAME}View::~%{APPNAME}View() -{ - -} - -void %{APPNAME}View::switchColors() -{ - // switch the foreground/background colors of the label - TQColor color = Settings::col_background(); - Settings::setCol_background( Settings::col_foreground() ); - Settings::setCol_foreground( color ); - - settingsChanged(); -} - -void %{APPNAME}View::settingsChanged() -{ - TQPalette pal; - pal.setColor( TQPalette::Window, Settings::col_background()); - pal.setColor( TQPalette::WindowText, Settings::col_foreground()); - ui_%{APPNAMELC}view_base.kcfg_sillyLabel->setPalette( pal ); - - // i18n : internationalization - ui_%{APPNAMELC}view_base.kcfg_sillyLabel->setText( i18n("This project is %1 days old",Settings::val_time()) ); - emit signalChangeStatusbar( i18n("Settings changed") ); -} - -#include "%{APPNAMELC}view.moc" diff --git a/languages/cpp/app_templates/tde4app/tdeapp4view.h b/languages/cpp/app_templates/tde4app/tdeapp4view.h deleted file mode 100644 index 855a2144..00000000 --- a/languages/cpp/app_templates/tde4app/tdeapp4view.h +++ /dev/null @@ -1,56 +0,0 @@ -%{H_TEMPLATE} -#ifndef %{APPNAMELC}VIEW_H -#define %{APPNAMELC}VIEW_H - -#include - -#include "ui_%{APPNAMELC}view_base.h" - -class TQPainter; -class KUrl; - -/** - * This is the main view class for %{APPNAME}. Most of the non-menu, - * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go - * here. - * - * @short Main view - * @author %{AUTHOR} <%{EMAIL}> - * @version %{VERSION} - */ - -class %{APPNAME}View : public TQWidget, public Ui::%{APPNAMELC}view_base -{ - Q_OBJECT - -public: - /** - * Default constructor - */ - %{APPNAME}View(TQWidget *parent); - - /** - * Destructor - */ - virtual ~%{APPNAME}View(); - -private: - Ui::%{APPNAMELC}view_base ui_%{APPNAMELC}view_base; - -signals: - /** - * Use this signal to change the content of the statusbar - */ - void signalChangeStatusbar(const TQString& text); - - /** - * Use this signal to change the content of the caption - */ - void signalChangeCaption(const TQString& text); - -private slots: - void switchColors(); - void settingsChanged(); -}; - -#endif // %{APPNAME}VIEW_H diff --git a/languages/cpp/app_templates/tde4app/tdeapp4view_base.ui b/languages/cpp/app_templates/tde4app/tdeapp4view_base.ui deleted file mode 100644 index 6738a789..00000000 --- a/languages/cpp/app_templates/tde4app/tdeapp4view_base.ui +++ /dev/null @@ -1,213 +0,0 @@ - -%{APPNAMELC}view_base - - - - 0 - 0 - 315 - 233 - - - - %{APPNAMELC}_base - - - true - - - - 11 - - - 11 - - - 11 - - - 11 - - - 6 - - - 6 - - - - - - - - - - 255 - 255 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - - - 255 - 255 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - - - 119 - 119 - 119 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - - - Sans Serif - 12 - - - - true - - - hello, world - - - true - - - Qt::AlignCenter - - - false - - - - - - - qPixmapFromMimeSource - - - diff --git a/languages/cpp/app_templates/tdeapp/CMakeLists.txt b/languages/cpp/app_templates/tdeapp/CMakeLists.txt deleted file mode 100644 index 10c09f9f..00000000 --- a/languages/cpp/app_templates/tdeapp/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_custom_target( tdeapp.tar.gz ALL - COMMAND tar zcf tdeapp.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - app.cpp app.h pref.cpp pref.h appview.cpp appview.h - appiface.h app_client.cpp main.cpp appui.rc src-Makefile.am - tdeapp.png app.tdevelop subdirs README -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdeapp.tar.gz tdeapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdeapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdeapp/Makefile.am b/languages/cpp/app_templates/tdeapp/Makefile.am deleted file mode 100644 index 6adf4430..00000000 --- a/languages/cpp/app_templates/tdeapp/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -dataFiles = app.cpp app.h pref.cpp pref.h appview.cpp appview.h \ - appiface.h app_client.cpp main.cpp appui.rc src-Makefile.am \ - tdeapp.png app.tdevelop subdirs README - -templateName = tdeapp - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(templateName).tar.gz: ${dataFiles} - $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} - $(GZIP_COMMAND) -f9 $(templateName).tar - -archivedir = ${appwizarddatadir} -archive_DATA = $(templateName).tar.gz ${templateName}.png - -CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/cpp/app_templates/tdeapp/README b/languages/cpp/app_templates/tdeapp/README deleted file mode 100644 index 7720e6b4..00000000 --- a/languages/cpp/app_templates/tdeapp/README +++ /dev/null @@ -1,81 +0,0 @@ ------------------------------------------------ -Kde application framework template quickstart -Author: Thomas Nagy -Date: 2004-03-22 ------------------------------------------------ - -This README file explains you basic things for starting with -this application template. - - -** Building and installing ** - -* Build the configure script by "make -f Makefile.cvs" - -* To clean, use "make clean", and to clean everything -(remove the makefiles, etc), use "make distclean" - -* To distribute your program, try "make dist". -This will make a compact tarball archive of your release with the -necessary scripts inside. - -* Modifying the auto-tools scripts -for automake scripts there is an excellent tutorial there : -http://developer.kde.org/documentation/other/makefile_am_howto.html - -* Simplify your life : install the project in your home directory for -testing purposes. -./configure --prefix=/home/user/dummyfolder/ -In the end when you finished the development you can -rm -rf /home/user/dummyfolder/ -without fear. - - -** Technologies ** - -* Build the menus of your application easily -kde applications now use an xml file (*ui.rc file) to build the menus. -This allow a great customization of the application. However, when -programming the menu is shown only after a "make install" - -For more details, consult : -http://devel-home.kde.org/~larrosa/tutorial/p9.html -http://developer.kde.org/documentation/tutorials/xmlui/preface.html - -* Use TDEConfig XT to create your configuration dialogs and make -them more maintainable. - -For more details, consult : -http://developer.kde.org/documentation/tutorials/tdeconfigxt/tdeconfigxt.html - -* With KParts, you can embed other kde components in your program, or make your program -embeddable in other apps. For example, the kmplayer kpart can be called to play videos -in your app. - -For more details, consult : -http://www-106.ibm.com/developerworks/library/l-tdeparts/ -http://developer.kde.org/documentation/tutorials/dot/writing-plugins.html -http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html - -* With dcop, you can control your app from other applications -Make sure to include K_DCOP and a kdcop: section in your .h file -http://developer.kde.org/documentation/tutorials/dot/dcopiface/dcop-interface.html - - -** Documentation ** - -* For the translations : -1. Download a patched gettext which can be found at: - http://public.kde.planetmirror.com/pub/kde/devel/gettext-kde/ -2. Install that gettext in ~/bin/ -3. cd ~/yourproject, export PATH=~/bin:$PATH, export -TDEDIR=/where_your_TDE3_is -4. make -f admin/Makefile.common package-messages -5. make package-messages -6. Translate the po files (not the pot!!) with kbabel or xemacs - -* Do not forget to write the documentation for your kde app -edit the documentation template index.docbook in doc/ - - - diff --git a/languages/cpp/app_templates/tdeapp/app.cpp b/languages/cpp/app_templates/tdeapp/app.cpp deleted file mode 100644 index 774efe8e..00000000 --- a/languages/cpp/app_templates/tdeapp/app.cpp +++ /dev/null @@ -1,247 +0,0 @@ -%{CPP_TEMPLATE} - -#include "%{APPNAMELC}.h" -#include "pref.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -%{APPNAME}::%{APPNAME}() - : TDEMainWindow( 0, "%{APPNAME}" ), - m_view(new %{APPNAME}View(this)), - m_printer(0) -{ - // accept dnd - setAcceptDrops(true); - - // tell the TDEMainWindow that this is indeed the main widget - setCentralWidget(m_view); - - // then, setup our actions - setupActions(); - - // and a status bar - statusBar()->show(); - - // Apply the create the main window and ask the mainwindow to - // automatically save settings if changed: window size, toolbar - // position, icon size, etc. Also to add actions for the statusbar - // toolbar, and keybindings if necessary. - setupGUI(); - - // allow the view to change the statusbar and caption - connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)), - this, TQT_SLOT(changeStatusbar(const TQString&))); - connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)), - this, TQT_SLOT(changeCaption(const TQString&))); - -} - -%{APPNAME}::~%{APPNAME}() -{ -} - -void %{APPNAME}::load(const KURL& url) -{ - TQString target; - // the below code is what you should normally do. in this - // example case, we want the url to our own. you probably - // want to use this code instead for your app - - #if 0 - // download the contents - if (TDEIO::NetAccess::download(url, target)) - { - // set our caption - setCaption(url); - - // load in the file (target is always local) - loadFile(target); - - // and remove the temp file - TDEIO::NetAccess::removeTempFile(target); - } - #endif - - setCaption(url.prettyURL()); - m_view->openURL(url); -} - -void %{APPNAME}::setupActions() -{ - KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); - KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection()); - KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); - KStdAction::print(this, TQT_SLOT(filePrint()), actionCollection()); - KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); - - KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); - - // this doesn't do anything useful. it's just here to illustrate - // how to insert a custom menu and menu item - TDEAction *custom = new TDEAction(i18n("Cus&tom Menuitem"), 0, - this, TQT_SLOT(optionsPreferences()), - actionCollection(), "custom_action"); -} - -void %{APPNAME}::saveProperties(TDEConfig *config) -{ - // the 'config' object points to the session managed - // config file. anything you write here will be available - // later when this app is restored - - if (!m_view->currentURL().isEmpty()) { -#if KDE_IS_VERSION(3,1,3) - config->writePathEntry("lastURL", m_view->currentURL()); -#else - config->writeEntry("lastURL", m_view->currentURL()); -#endif - } -} - -void %{APPNAME}::readProperties(TDEConfig *config) -{ - // the 'config' object points to the session managed - // config file. this function is automatically called whenever - // the app is being restored. read in here whatever you wrote - // in 'saveProperties' - - TQString url = config->readPathEntry("lastURL"); - - if (!url.isEmpty()) - m_view->openURL(KURL(url)); -} - -void %{APPNAME}::dragEnterEvent(TQDragEnterEvent *event) -{ - // accept uri drops only - event->accept(KURLDrag::canDecode(event)); -} - -void %{APPNAME}::dropEvent(TQDropEvent *event) -{ - // this is a very simplistic implementation of a drop event. we - // will only accept a dropped URL. the TQt dnd code can do *much* - // much more, so please read the docs there - KURL::List urls; - - // see if we can decode a URI.. if not, just ignore it - if (KURLDrag::decode(event, urls) && !urls.isEmpty()) - { - // okay, we have a URI.. process it - const KURL &url = urls.first(); - - // load in the file - load(url); - } -} - -void %{APPNAME}::fileNew() -{ - // this slot is called whenever the File->New menu is selected, - // the New shortcut is pressed (usually CTRL+N) or the New toolbar - // button is clicked - - // create a new window - (new %{APPNAME})->show(); -} - -void %{APPNAME}::fileOpen() -{ - // this slot is called whenever the File->Open menu is selected, - // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar - // button is clicked -/* - // this brings up the generic open dialog - KURL url = KURLRequesterDlg::getURL(TQString(), this, i18n("Open Location") ); -*/ - // standard filedialog - KURL url = KFileDialog::getOpenURL(TQString(), TQString(), this, i18n("Open Location")); - if (!url.isEmpty()) - m_view->openURL(url); -} - -void %{APPNAME}::fileSave() -{ - // this slot is called whenever the File->Save menu is selected, - // the Save shortcut is pressed (usually CTRL+S) or the Save toolbar - // button is clicked - - // save the current file -} - -void %{APPNAME}::fileSaveAs() -{ - // this slot is called whenever the File->Save As menu is selected, - KURL file_url = KFileDialog::getSaveURL(); - if (!file_url.isEmpty() && file_url.isValid()) - { - // save your info, here - } -} - -void %{APPNAME}::filePrint() -{ - // this slot is called whenever the File->Print menu is selected, - // the Print shortcut is pressed (usually CTRL+P) or the Print toolbar - // button is clicked - if (!m_printer) m_printer = new KPrinter; - if (m_printer->setup(this)) - { - // setup the printer. with TQt, you always "print" to a - // TQPainter.. whether the output medium is a pixmap, a screen, - // or paper - TQPainter p; - p.begin(m_printer); - - // we let our view do the actual printing - TQPaintDeviceMetrics metrics(m_printer); - m_view->print(&p, metrics.height(), metrics.width()); - - // and send the result to the printer - p.end(); - } -} - -void %{APPNAME}::optionsPreferences() -{ - // popup some sort of preference dialog, here - %{APPNAME}Preferences dlg; - if (dlg.exec()) - { - // redo your settings - } -} - -void %{APPNAME}::changeStatusbar(const TQString& text) -{ - // display the text on the statusbar - statusBar()->message(text); -} - -void %{APPNAME}::changeCaption(const TQString& text) -{ - // display the text on the caption - setCaption(text); -} -#include "%{APPNAMELC}.moc" diff --git a/languages/cpp/app_templates/tdeapp/app.desktop b/languages/cpp/app_templates/tdeapp/app.desktop deleted file mode 100644 index 5c7ab928..00000000 --- a/languages/cpp/app_templates/tdeapp/app.desktop +++ /dev/null @@ -1,44 +0,0 @@ -[Desktop Entry] -Name=%{APPNAME} -Exec=%{APPNAMELC} %i -caption "%c" -Icon=%{APPNAMELC} -Type=Application -DocPath=%{APPNAMELC}/%{APPNAMELC}.html -Comment=A TDE KPart Application -Comment[br]=Ur meziant Kpart evit TDE -Comment[ca]=Una aplicació KPart per al TDE -Comment[cy]=Cymhwysiad KPart TDE -Comment[da]=Et TDE KPart-program -Comment[de]=Eine auf der Komponententechnik KPart basierende TDE-Anwendung -Comment[el]=Μια εφαρμογή KPart του TDE -Comment[es]=Una aplicación KPart de TDE -Comment[et]=TDE KPart rakendus -Comment[eu]=TDE KPart aplikazio bat -Comment[fa]=یک کاربرد TDE KPart -Comment[fr]=Une application KPart pour TDE -Comment[ga]=Feidhmchlár KPart TDE -Comment[gl]=Unha aplicación KPart de TDE -Comment[hi]=एक केडीई के-पार्ट अनुप्रयोग -Comment[hu]=KPart-alapú TDE-alkalmazás -Comment[is]=TDE KPart forrit -Comment[it]=Applicazione KPart di TDE -Comment[ja]=TDE KPart アプリケーション -Comment[lt]=TDE KPart programa -Comment[nds]=En KPart-Deelprogramm för TDE -Comment[ne]=एउटा केडीई KPart अनुप्रयोग -Comment[nl]=Een TDE KPart-toepassing -Comment[pl]=Osadzalny element KPart TDE -Comment[pt]=Uma Aplicação KPart do TDE -Comment[pt_BR]=Um Aplicativo KPart do TDE -Comment[ru]=Приложение KPart для TDE -Comment[sk]=TDE KPart aplikácia -Comment[sl]=Program KPart za TDE -Comment[sr]=TDE KPart програм -Comment[sr@Latn]=TDE KPart program -Comment[sv]=Ett TDE Kpart-program -Comment[ta]=கெடி கெபார்ட் பயன்பாடு -Comment[tg]=Ба кор андохтани KPart барои TDE -Comment[tr]=Bir TDE KPart Uygulaması -Comment[zh_CN]=一个 TDE KPart 应用程序 -Comment[zh_TW]=TDE KPart 應用程式 -Terminal=false diff --git a/languages/cpp/app_templates/tdeapp/app.h b/languages/cpp/app_templates/tdeapp/app.h deleted file mode 100644 index 5f39dd11..00000000 --- a/languages/cpp/app_templates/tdeapp/app.h +++ /dev/null @@ -1,90 +0,0 @@ -%{H_TEMPLATE} - -#ifndef _%{APPNAMEUC}_H_ -#define _%{APPNAMEUC}_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include "%{APPNAMELC}view.h" - -class KPrinter; -class KURL; - -/** - * This class serves as the main window for %{APPNAME}. It handles the - * menus, toolbars, and status bars. - * - * @short Main window class - * @author %{AUTHOR} <%{EMAIL}> - * @version %{VERSION} - */ -class %{APPNAME} : public TDEMainWindow -{ - Q_OBJECT - -public: - /** - * Default Constructor - */ - %{APPNAME}(); - - /** - * Default Destructor - */ - virtual ~%{APPNAME}(); - - /** - * Use this method to load whatever file/URL you have - */ - void load(const KURL& url); - -protected: - /** - * Overridden virtuals for TQt drag 'n drop (XDND) - */ - virtual void dragEnterEvent(TQDragEnterEvent *event); - virtual void dropEvent(TQDropEvent *event); - -protected: - /** - * This function is called when it is time for the app to save its - * properties for session management purposes. - */ - void saveProperties(TDEConfig *); - - /** - * This function is called when this app is restored. The TDEConfig - * object points to the session management config file that was saved - * with @ref saveProperties - */ - void readProperties(TDEConfig *); - - -private slots: - void fileNew(); - void fileOpen(); - void fileSave(); - void fileSaveAs(); - void filePrint(); - void optionsPreferences(); - - void changeStatusbar(const TQString& text); - void changeCaption(const TQString& text); - -private: - void setupAccel(); - void setupActions(); - -private: - %{APPNAME}View *m_view; - - KPrinter *m_printer; -}; - -#endif // _%{APPNAMEUC}_H_ - diff --git a/languages/cpp/app_templates/tdeapp/app.tdevelop b/languages/cpp/app_templates/tdeapp/app.tdevelop deleted file mode 100644 index e1523988..00000000 --- a/languages/cpp/app_templates/tdeapp/app.tdevelop +++ /dev/null @@ -1,168 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - C++ - Code - Qt - TDE - - . - false - - - - - - 3 - true - 3 - EmbeddedTDevDesigner - - - - - src/%{APPNAMELC} - debug - - - src/%{APPNAMELC} - false - - - - - - - false - 1 - false - - - - - optimized - kdevgccoptions - kdevgppoptions - kdevg77options - -O2 -g0 - - - --enable-debug=full - debug - kdevgccoptions - kdevgppoptions - kdevg77options - -O0 -g3 - - - - - - - - - - - - - false - *.o,*.lo,CVS - - - - - ada - ada_bugs_gcc - bash - bash_bugs - clanlib - w3c-dom-level2-html - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - ruby - ruby_bugs - sdl - w3c-svg - sw - w3c-uaag10 - wxwidgets_bugs - - - qmake User Guide - - - - - libtool - - - true - false - false - true - - - false - true - - - - - - - - - - - - -f - - -dP - - -f - -u3 -p - - - - - - - false - - - .h - .cpp - true - - - - true - 2 - - - - Doxygen Documentation Collection - %{APPNAMELC}.tag - - - diff --git a/languages/cpp/app_templates/tdeapp/app.tdevses b/languages/cpp/app_templates/tdeapp/app.tdevses deleted file mode 100644 index dcd1c8c1..00000000 --- a/languages/cpp/app_templates/tdeapp/app.tdevses +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/languages/cpp/app_templates/tdeapp/app_client.cpp b/languages/cpp/app_templates/tdeapp/app_client.cpp deleted file mode 100644 index ce92c875..00000000 --- a/languages/cpp/app_templates/tdeapp/app_client.cpp +++ /dev/null @@ -1,26 +0,0 @@ -%{CPP_TEMPLATE} - -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - TDEApplication app(argc, argv, "%{APPNAMELC}_client", false); - - // get our DCOP client and attach so that we may use it - DCOPClient *client = app.dcopClient(); - client->attach(); - - // do a 'send' for now - TQByteArray data; - TQDataStream ds(data, IO_WriteOnly); - if (argc > 1) - ds << TQString(argv[1]); - else - ds << TQString("http://www.kde.org"); - client->send("%{APPNAMELC}", "%{APPNAME}Iface", "openURL(TQString)", data); - - return app.exec(); -} diff --git a/languages/cpp/app_templates/tdeapp/appiface.h b/languages/cpp/app_templates/tdeapp/appiface.h deleted file mode 100644 index 9fa7cd1b..00000000 --- a/languages/cpp/app_templates/tdeapp/appiface.h +++ /dev/null @@ -1,17 +0,0 @@ -%{H_TEMPLATE} - -#ifndef _%{APPNAMEUC}IFACE_H_ -#define _%{APPNAMEUC}IFACE_H_ - -#include - -class %{APPNAME}Iface : virtual public DCOPObject -{ - K_DCOP -public: - -k_dcop: - virtual void openURL(TQString url) = 0; -}; - -#endif // _%{APPNAMEUC}IFACE_H_ diff --git a/languages/cpp/app_templates/tdeapp/appui.rc b/languages/cpp/app_templates/tdeapp/appui.rc deleted file mode 100644 index ceb4f14e..00000000 --- a/languages/cpp/app_templates/tdeapp/appui.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - C&ustom - - - - diff --git a/languages/cpp/app_templates/tdeapp/appview.cpp b/languages/cpp/app_templates/tdeapp/appview.cpp deleted file mode 100644 index 16c05a3f..00000000 --- a/languages/cpp/app_templates/tdeapp/appview.cpp +++ /dev/null @@ -1,107 +0,0 @@ -%{CPP_TEMPLATE} - -#include "%{APPNAMELC}view.h" - -#include -#include - -#include - -#include -#include -#include -#include -#include - -%{APPNAME}View::%{APPNAME}View(TQWidget *parent) - : TQWidget(parent), - DCOPObject("%{APPNAME}Iface") -{ - // setup our layout manager to automatically add our widgets - TQHBoxLayout *top_layout = new TQHBoxLayout(this); - top_layout->setAutoAdd(true); - - // we want to look for all components that satisfy our needs. the - // trader will actually search through *all* registered TDE - // applications and components -- not just KParts. So we have to - // specify two things: a service type and a constraint - // - // the service type is like a mime type. we say that we want all - // applications and components that can handle HTML -- 'text/html' - // - // however, by itself, this will return such things as Netscape.. - // not what we wanted. so we constrain it by saying that the - // string 'KParts/ReadOnlyPart' must be found in the ServiceTypes - // field. with this, only components of the type we want will be - // returned. - TDETrader::OfferList offers = TDETrader::self()->query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes"); - - KLibFactory *factory = 0; - // in theory, we only care about the first one.. but let's try all - // offers just in case the first can't be loaded for some reason - TDETrader::OfferList::Iterator it(offers.begin()); - for( ; it != offers.end(); ++it) - { - KService::Ptr ptr = (*it); - - // we now know that our offer can handle HTML and is a part. - // since it is a part, it must also have a library... let's try to - // load that now - factory = KLibLoader::self()->factory( ptr->library() ); - if (factory) - { - m_html = static_cast(factory->create(this, ptr->name(), "KParts::ReadOnlyPart")); - break; - } - } - - // if our factory is invalid, then we never found our component - // and we might as well just exit now - if (!factory) - { - KMessageBox::error(this, i18n("Could not find a suitable HTML component")); - return; - } - - connect(m_html, TQT_SIGNAL(setWindowCaption(const TQString&)), - this, TQT_SLOT(slotSetTitle(const TQString&))); - connect(m_html, TQT_SIGNAL(setStatusBarText(const TQString&)), - this, TQT_SLOT(slotOnURL(const TQString&))); - -} - -%{APPNAME}View::~%{APPNAME}View() -{ -} - -void %{APPNAME}View::print(TQPainter *p, int height, int width) -{ - // do the actual printing, here - // p->drawText(etc..) -} - -TQString %{APPNAME}View::currentURL() -{ - return m_html->url().url(); -} - -void %{APPNAME}View::openURL(TQString url) -{ - openURL(KURL(url)); -} - -void %{APPNAME}View::openURL(const KURL& url) -{ - m_html->openURL(url); -} - -void %{APPNAME}View::slotOnURL(const TQString& url) -{ - emit signalChangeStatusbar(url); -} - -void %{APPNAME}View::slotSetTitle(const TQString& title) -{ - emit signalChangeCaption(title); -} -#include "%{APPNAMELC}view.moc" diff --git a/languages/cpp/app_templates/tdeapp/appview.h b/languages/cpp/app_templates/tdeapp/appview.h deleted file mode 100644 index 79513a9d..00000000 --- a/languages/cpp/app_templates/tdeapp/appview.h +++ /dev/null @@ -1,78 +0,0 @@ -%{H_TEMPLATE} - -#ifndef _%{APPNAMEUC}VIEW_H_ -#define _%{APPNAMEUC}VIEW_H_ - -#include -#include -#include <%{APPNAMELC}iface.h> - -class TQPainter; -class KURL; - -/** - * This is the main view class for %{APPNAME}. Most of the non-menu, - * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go - * here. - * - * This %{APPNAMELC} uses an HTML component as an example. - * - * @short Main view - * @author %{AUTHOR} <%{EMAIL}> - * @version %{VERSION} - */ -class %{APPNAME}View : public TQWidget, public %{APPNAME}Iface -{ - Q_OBJECT - -public: - /** - * Default constructor - */ - %{APPNAME}View(TQWidget *parent); - - /** - * Destructor - */ - virtual ~%{APPNAME}View(); - - /** - * Random 'get' function - */ - TQString currentURL(); - - /** - * Random 'set' function accessed by DCOP - */ - virtual void openURL(TQString url); - - /** - * Random 'set' function - */ - virtual void openURL(const KURL& url); - - /** - * Print this view to any medium -- paper or not - */ - void print(TQPainter *, int height, int width); - -signals: - /** - * Use this signal to change the content of the statusbar - */ - void signalChangeStatusbar(const TQString& text); - - /** - * Use this signal to change the content of the caption - */ - void signalChangeCaption(const TQString& text); - -private slots: - void slotOnURL(const TQString& url); - void slotSetTitle(const TQString& title); - -private: - KParts::ReadOnlyPart *m_html; -}; - -#endif // _%{APPNAMEUC}VIEW_H_ diff --git a/languages/cpp/app_templates/tdeapp/main.cpp b/languages/cpp/app_templates/tdeapp/main.cpp deleted file mode 100644 index 8c2cc07f..00000000 --- a/languages/cpp/app_templates/tdeapp/main.cpp +++ /dev/null @@ -1,61 +0,0 @@ -%{CPP_TEMPLATE} - -#include "%{APPNAMELC}.h" -#include -#include -#include -#include -#include - -static const char description[] = - I18N_NOOP("A TDE Application"); - -static const char version[] = "%{VERSION}"; - -static TDECmdLineOptions options[] = -{ - { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, - TDECmdLineLastOption -}; - -int main(int argc, char **argv) -{ - TDEAboutData about("%{APPNAMELC}", I18N_NOOP("%{APPNAME}"), version, description, - TDEAboutData::License_%{LICENSE}, "(C) %{YEAR} %{AUTHOR}", 0, 0, "%{EMAIL}"); - about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" ); - TDECmdLineArgs::init(argc, argv, &about); - TDECmdLineArgs::addCmdLineOptions(options); - TDEApplication app; - - // register ourselves as a dcop client - app.dcopClient()->registerAs(app.name(), false); - - // see if we are starting with session management - if (app.isRestored()) - { - RESTORE(%{APPNAME}); - } - else - { - // no session.. just start up normally - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - if (args->count() == 0) - { - %{APPNAME} *widget = new %{APPNAME}; - widget->show(); - } - else - { - int i = 0; - for (; i < args->count(); i++) - { - %{APPNAME} *widget = new %{APPNAME}; - widget->show(); - widget->load(args->url(i)); - } - } - args->clear(); - } - - return app.exec(); -} diff --git a/languages/cpp/app_templates/tdeapp/pref.cpp b/languages/cpp/app_templates/tdeapp/pref.cpp deleted file mode 100644 index 669f591c..00000000 --- a/languages/cpp/app_templates/tdeapp/pref.cpp +++ /dev/null @@ -1,42 +0,0 @@ -%{CPP_TEMPLATE} - -#include "pref.h" - -#include - -#include -#include - -%{APPNAME}Preferences::%{APPNAME}Preferences() - : KDialogBase(TreeList, i18n("%{APPNAME} Preferences"), - Help|Default|Ok|Apply|Cancel, Ok) -{ - // this is the base class for your preferences dialog. it is now - // a Treelist dialog.. but there are a number of other - // possibilities (including Tab, Swallow, and just Plain) - TQFrame *frame; - frame = addPage(i18n("First Page"), i18n("Page One Options")); - m_pageOne = new %{APPNAME}PrefPageOne(frame); - - frame = addPage(i18n("Second Page"), i18n("Page Two Options")); - m_pageTwo = new %{APPNAME}PrefPageTwo(frame); -} - -%{APPNAME}PrefPageOne::%{APPNAME}PrefPageOne(TQWidget *parent) - : TQFrame(parent) -{ - TQHBoxLayout *layout = new TQHBoxLayout(this); - layout->setAutoAdd(true); - - new TQLabel(i18n("Add something here"), this); -} - -%{APPNAME}PrefPageTwo::%{APPNAME}PrefPageTwo(TQWidget *parent) - : TQFrame(parent) -{ - TQHBoxLayout *layout = new TQHBoxLayout(this); - layout->setAutoAdd(true); - - new TQLabel(i18n("Add something here"), this); -} -#include "pref.moc" diff --git a/languages/cpp/app_templates/tdeapp/pref.h b/languages/cpp/app_templates/tdeapp/pref.h deleted file mode 100644 index b2aae436..00000000 --- a/languages/cpp/app_templates/tdeapp/pref.h +++ /dev/null @@ -1,40 +0,0 @@ -%{H_TEMPLATE} - -#ifndef _%{APPNAMEUC}PREF_H_ -#define _%{APPNAMEUC}PREF_H_ - -#include -#include - -class %{APPNAME}PrefPageOne; -class %{APPNAME}PrefPageTwo; - -class %{APPNAME}Preferences : public KDialogBase -{ - Q_OBJECT - -public: - %{APPNAME}Preferences(); - -private: - %{APPNAME}PrefPageOne *m_pageOne; - %{APPNAME}PrefPageTwo *m_pageTwo; -}; - -class %{APPNAME}PrefPageOne : public TQFrame -{ - Q_OBJECT - -public: - %{APPNAME}PrefPageOne(TQWidget *parent = 0); -}; - -class %{APPNAME}PrefPageTwo : public TQFrame -{ - Q_OBJECT - -public: - %{APPNAME}PrefPageTwo(TQWidget *parent = 0); -}; - -#endif // _%{APPNAMEUC}PREF_H_ diff --git a/languages/cpp/app_templates/tdeapp/src-Makefile.am b/languages/cpp/app_templates/tdeapp/src-Makefile.am deleted file mode 100644 index 8125665b..00000000 --- a/languages/cpp/app_templates/tdeapp/src-Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -## Makefile.am for %{APPNAMELC} - -# this is the program that gets installed. it's name is used for all -# of the other Makefile.am variables -bin_PROGRAMS = %{APPNAMELC} %{APPNAMELC}_client - -# set the include path for X, qt and TDE -INCLUDES = $(all_includes) - -# the library search path. -%{APPNAMELC}_LDFLAGS = $(KDE_RPATH) $(all_libraries) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) $(LIB_TDEIO) - -# the libraries to link against. -%{APPNAMELC}_LDADD = $(LIB_TDEFILE) $(LIB_TDEPRINT) - -# which sources should be compiled for %{APPNAMELC} -%{APPNAMELC}_SOURCES = main.cpp %{APPNAMELC}.cpp %{APPNAMELC}view.cpp \ - pref.cpp %{APPNAMELC}iface.skel - -# these are the headers for your project -noinst_HEADERS = %{APPNAMELC}.h %{APPNAMELC}view.h pref.h - -# client stuff -%{APPNAMELC}_client_LDFLAGS = $(KDE_RPATH) $(all_libraries) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) $(LIB_TDEIO) -%{APPNAMELC}_client_LDADD = $(LIB_TDECORE) -%{APPNAMELC}_client_SOURCES = %{APPNAMELC}_client.cpp - -# let automoc handle all of the meta source files ((moc)) -METASOURCES = AUTO - -messages: rc.cpp - $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot - -KDE_ICON = AUTO - -# this is where the kdelnk file will go -kdelnkdir = $(kde_appsdir)/Utilities -kdelnk_DATA = %{APPNAMELC}.desktop - -# this is where the XML-GUI resource file goes -rcdir = $(kde_datadir)/%{APPNAMELC} -rc_DATA = %{APPNAMELC}ui.rc diff --git a/languages/cpp/app_templates/tdeapp/subdirs b/languages/cpp/app_templates/tdeapp/subdirs deleted file mode 100644 index 0e678106..00000000 --- a/languages/cpp/app_templates/tdeapp/subdirs +++ /dev/null @@ -1,3 +0,0 @@ -doc -po -src diff --git a/languages/cpp/app_templates/tdeapp/tdeapp.png b/languages/cpp/app_templates/tdeapp/tdeapp.png deleted file mode 100644 index a421a664..00000000 Binary files a/languages/cpp/app_templates/tdeapp/tdeapp.png and /dev/null differ diff --git a/languages/cpp/app_templates/tdeapp/tdeapp.tdevtemplate b/languages/cpp/app_templates/tdeapp/tdeapp.tdevtemplate deleted file mode 100644 index 0902455d..00000000 --- a/languages/cpp/app_templates/tdeapp/tdeapp.tdevtemplate +++ /dev/null @@ -1,253 +0,0 @@ -# TDE Config File -[General] -Name=Application framework -Name[ca]=Infraestructura d'aplicacions -Name[da]=Programskelet -Name[de]=Anwendungsgrundgerüst -Name[el]=Πλαίσιο εφαρμογής -Name[es]=Infraestructura de aplicación -Name[et]=Rakenduse raamistik -Name[eu]=Aplikazioen lan-markoa -Name[fa]=چارچوب کاربرد -Name[fr]=Infrastructure d'application -Name[ga]=Creatlach feidhmchláir -Name[gl]=Entorno de traballo para aplicación -Name[hu]=Alkalmazás-keretrendszer -Name[it]=Infrastruttura applicativa -Name[ja]=アプリケーションフレームワーク -Name[nds]=Programmrahmenwark -Name[ne]=अनुप्रयोग फ्रेमवर्क -Name[nl]=Applicationframework -Name[pl]=Szablon programu -Name[pt]=Plataforma de aplicações -Name[pt_BR]=Plataforma de aplicações -Name[ru]=Приложение TDE -Name[sk]=Aplikačný framework -Name[sl]=Ogrodje programa -Name[sr]=Радни оквир програма -Name[sr@Latn]=Radni okvir programa -Name[sv]=Programramverk -Name[tr]=Uygulama Çatısı -Name[zh_CN]=应用程序框架 -Name[zh_TW]=應用程式框架 -Icon=tdeapp.png -Category=C++/TDE -Comment=Generates a simple TDE application with one toplevel window, menus and toolbars. A DCOP interface is also provided, so that your application can provide a scripting interface -Comment[ca]=Genera una simple aplicació per al TDE amb una finestra principal, menús i barres d'eines. També es proveeix la interfície DCOP, de manera que la vostra aplicació podrà proveir d'una interfície per a scripts -Comment[da]=Genererer et simpelt TDE program med et vindue på topniveau, menuer og værktøjslinjer. Der sørges også for en DCOP-grænseflade, så dit program kan sørge for en script-grænseflade -Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. Dazu kommt eine DCOP-Schnittstelle, so dass Ihre Anwendung eine Schnittstelle für Skripte anbieten kann. -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα ανώτερο παράθυρο, μενού και γραμμές εργαλείων. Μια διασύνδεση DCOP προσφέρεται επίσης, έτσι ώστε η εφαρμογή σας να προσφέρει ένα περιβάλλον γραφής σεναρίων -Comment[es]=Genera una sencilla aplicación de TDE con una ventana de nivel superior, menús y barras de herramientas. También se proporciona una interfaz DCOP para que su aplicación pueda proporcionar una interfaz para guiones de órdenes. -Comment[et]=Lihtsa TDE rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. Lisatakse ka DCOP-liides, mis võimaldab pakkuda rakenduses ka skriptikeelte tuge. -Comment[eu]=TDE aplikazio sinple bat sortzen du menu eta tresna-barradun goi-mailako lehio batekin. DCOP interfaze bat ere eskeintzen zaio aplikazioari, zure aplikazioak script interfaze bat izan dezan -Comment[fa]=یک کاربرد سادۀ TDE با یک پنجرۀ سطح بالا، گزینگان و میله ابزارها تولید می‌کند. همچنین یک واسط DCOP فراهم است. بنابراین، کاربرد شما یک واسط دست‌نوشته‌ای را می‌تواند فراهم کند -Comment[fr]=Génère une application TDE simple comprenant une fenêtre de premier niveau, des menus et des barres d'outils. Une interface DCOP est également prévue, afin que votre application puisse offrir une interface de scriptage -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le príomhfhuinneog amháin, roghchláir agus barraí uirlisí. Soláthraítear comhéadan DCOP freisin, d'fhonn is féidir comhéadan scriptithe a chur ar fáil -Comment[gl]=Xera unha aplicación TDE sinxela cunha xanela principal, menús e barras de ferramentas. Tamén se proporciona unha interface DCOP de modo que a súa aplicación poida proveer unha interface de scripting. -Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy főablakkal, menükkel és eszköztárakkal. DCOP-felület is létre lesz hozva, ezért az alkalmazás szkriptelési felületet is biztosíthat. -Comment[it]=Genera una semplice applicazione TDE con una finestra toplevel, menu e barre degli strumenti. È anche fornita un'interfaccia DCOP così l'applicazione avrà un'interfaccia per lo scripting -Comment[ja]=簡単な TDE アプリケーションを作成します。アプリケーションには、トップレベルのウィンドウ、メニュー、ツールバーがあります。スクリプト化をサポートするために DCOP のインターフェースも用意してあります。 -Comment[nds]=Stellt en eenfach TDE-Programm mit een böverst Finster, Menüs un Warktüüchbalkens op. Ok warrt noch en DCOP-Koppelsteed praatstellt, so dat Dien Programm en Skriptkoppelsteed anbeden kann -Comment[ne]=एउटा उच्चतह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । DCOP पनि प्रदान गरिन्छ, जसले गर्दा तपाईँको अनुप्रयोगले स्क्रिप्टिङ इन्टरफेस प्रदान गर्न सक्दछ -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één toplevel window, menu's en toolbars. Er wordt ook een DCOP-interface aangeleverd, zodat uw toepassing een scripting interface kan aanleveren. -Comment[pl]=Generuje prosty program dla TDE z oknem, menu i paskami narzędzi. Dostępny jest także interfejs DCOP, więc Twoje programy mogą zawierać interfejs do skryptów -Comment[pt]=Gera uma aplicação simples do TDE com uma janela de topo, menus e barras de ferramentas. Também é oferecida uma interface de DCOP, para que a sua aplicação possa fornecer uma interface de programação -Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela de topo, menus e barras de ferramentas. Também é oferecida uma interface de DCOP, para que a sua aplicação possa fornecer uma interface de programação -Comment[ru]=Создание простого приложения TDE с окном, меню и панелями инструментов. Кроме того, в нём содержится интерфейс DCOP для автоматизации работы с помощью пользовательских скриптов -Comment[sk]=Vygenruje jednoduchú TDE aplikáciu s jedným oknom, menu apanelom nástrojov. Taktiež bude poskytnuté DCOP rozhranie, takže aj aplikáciamôže poskytnúť skriptovacie rozhranie -Comment[sr]=Прави једноставан TDE програм, са једним прозором највишег нивоа, менијима и тракама са алатом. Дат је и DCOP интерфејс, тако да ваш програм може да омогући скриптовање -Comment[sr@Latn]=Pravi jednostavan TDE program, sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. Dat je i DCOP interfejs, tako da vaš program može da omogući skriptovanje -Comment[sv]=Skapar ett enkelt TDE-program med ett toppnivåfönster, menyer och verktygsrader. Ett DCOP-gränssnitt tillhandahålls också, så att programmet kan tillhandahålla ett skriptgränssnitt. -Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir TDE uygulaması yaratır. Bir DCOP arayüzü sağlanır, böylece uygulama bir betik arayüzü sağlayabilir. -Comment[zh_CN]=生成一个带一个顶层窗口、菜单和工具栏的简单 TDE 应用程序。另外还提供了 DCOP 接口,这样您的应用也可同时提供脚本接口。 -Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含頂層視窗、選單與工具列。另外提供一個 DCOP 介面,讓您的應用程式可以提供文稿介面。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}view.cpp,%{dest}/src/README -Archive=kapp.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE17] -Type=install -Source=%{src}/appview.cpp -Dest=%{dest}/src/%{APPNAMELC}view.cpp - -[FILE18] -Type=install -Source=%{src}/appview.h -Dest=%{dest}/src/%{APPNAMELC}view.h - -[FILE19] -Type=install -Source=%{src}/appiface.h -Dest=%{dest}/src/%{APPNAMELC}iface.h - -[FILE20] -Type=install -Source=%{src}/app_client.cpp -Dest=%{dest}/src/%{APPNAMELC}_client.cpp - -[FILE21] -Type=install -Source=%{src}/pref.cpp -Dest=%{dest}/src/pref.cpp - -[FILE22] -Type=install -Source=%{src}/pref.h -Dest=%{dest}/src/pref.h - -[FILE23] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE24] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE25] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[MSG] -Type=message -Comment=A TDE Application was created at %{dest} -Comment[ca]=Una aplicació per al TDE ha estat creada a %{dest} -Comment[da]=Et TDE program blev oprettet i %{dest} -Comment[de]=Eine TDE-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή TDE δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación de TDE ha sido creada en %{dest} -Comment[et]=TDE rakendus loodi asukohta %{dest} -Comment[eu]=A TDE aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد TDE در %{dest} فراهم شد -Comment[fr]=Une application TDE a été créée dans %{dest} -Comment[ga]=Cruthaíodh Feidhmchlár TDE ag %{dest} -Comment[gl]=Creouse unha aplicación TDE en %{dest} -Comment[hu]=Létrejött egy TDE-s alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDE in %{dest} -Comment[ja]=TDE アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDE-Programm opstellt -Comment[ne]=TDE अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDE-toepassing is aangemaakt in %{dest} -Comment[pl]=Program dla TDE został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do TDE em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do TDE em %{dest} -Comment[ru]=Приложение TDE создано в %{dest} -Comment[sk]=TDE aplikácia bola vytvorená v %{dest} -Comment[sl]=Program za TDE je bil ustvarjen v %{dest} -Comment[sr]=TDE програм је направљен у %{dest} -Comment[sr@Latn]=TDE program je napravljen u %{dest} -Comment[sv]=Ett TDE-program skapades i %{dest} -Comment[tr]=Bir TDE Uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 TDE 应用程序 -Comment[zh_TW]=一個 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdecmodule/CMakeLists.txt b/languages/cpp/app_templates/tdecmodule/CMakeLists.txt index 40e12016..072f5f5e 100644 --- a/languages/cpp/app_templates/tdecmodule/CMakeLists.txt +++ b/languages/cpp/app_templates/tdecmodule/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( tdecmodule.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdecmodule.tar.gz tdecmodule.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - tdecmodule.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + tdecmodule.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdecmodule/Makefile.am b/languages/cpp/app_templates/tdecmodule/Makefile.am index 0938012d..b3b19611 100644 --- a/languages/cpp/app_templates/tdecmodule/Makefile.am +++ b/languages/cpp/app_templates/tdecmodule/Makefile.am @@ -3,10 +3,10 @@ dataFiles = module.cpp module.h module.desktop module.tdevelop \ templateName = tdecmodule ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/tdecmodule/module.tdevelop b/languages/cpp/app_templates/tdecmodule/module.tdevelop index 4f2d0606..7b5a57c0 100644 --- a/languages/cpp/app_templates/tdecmodule/module.tdevelop +++ b/languages/cpp/app_templates/tdecmodule/module.tdevelop @@ -13,15 +13,15 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - - + + src/%{APPNAMELC} debug @@ -43,8 +43,8 @@ -O0 -g3 - - + + @@ -52,8 +52,8 @@ - - + + ada ada_bugs_gcc @@ -90,24 +90,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/tdecmodule/tdecmodule.kdevtemplate b/languages/cpp/app_templates/tdecmodule/tdecmodule.kdevtemplate new file mode 100644 index 00000000..f646c242 --- /dev/null +++ b/languages/cpp/app_templates/tdecmodule/tdecmodule.kdevtemplate @@ -0,0 +1,197 @@ +# TDE Config File +[General] +Name=Control Center module +Name[ca]=Mòdul per al Centre de control +Name[da]=Kontrolcenter-modul +Name[de]=Kontrollzentrum-Modul +Name[el]=Άρθρωμα κέντρου ελέγχου +Name[en_GB]=Control Centre module +Name[es]=Módulo para el Centro de control +Name[et]=Juhtimiskeskuse moodul +Name[eu]=Kontrol-gunearen modulua +Name[fa]=پیمانۀ مرکز کنترل +Name[fr]=Module du centre de configuration +Name[ga]=Modúl Lárionad Rialaithe +Name[gl]=Módulo para Centro de control +Name[hu]=KControl-beállítómodul +Name[it]=Modulo del Centro di controllo +Name[ja]=コントロールセンターモジュール +Name[nds]=Kuntrullzentrum-Moduul +Name[ne]=नियन्त्रण केन्द्र मोड्युल +Name[nl]=Configuratiemodule +Name[pl]=Moduł Centrum Sterowania +Name[pt]=Módulo do Centro de Controlo +Name[pt_BR]=Módulo do Centro de Controlo +Name[ru]=Модуль Центра управления +Name[sk]=Control Center modul +Name[sl]=Modul nadzornega središča +Name[sr]=Модул Контролног центра +Name[sr@Latn]=Modul Kontrolnog centra +Name[sv]=Modul i inställningscentralen +Name[tr]=Kontrol Merkezi Birimi +Name[zh_CN]=控制中心模块 +Name[zh_TW]=控制中心模組 +Icon=tdecmodule.png +Category=C++/TDE +Comment=Generates a framework for a module which can be embedded into the TDE Control Center. +Comment[ca]=Genera una infraestructura per a un mòdul que es pugui encastar al Centre de control de TDE. +Comment[da]=Genererer et skelet for et modul som kan indlejres i TDE's kontrolcenter. +Comment[de]=Erstellt das Gerüst für ein Modul, das in das TDE-Kontrollzentrum integriert werden kann. +Comment[el]=Δημιουργεί ένα πλαίσιο για ένα άρθρωμα το οποίο μπορεί να ενσωματωθεί το κέντρο ελέγχου του TDE. +Comment[en_GB]=Generates a framework for a module which can be embedded into the TDE Control Centre. +Comment[es]=Genera una infraestructura para un módulo que se puede empotrar en el Centro de control de TDE. +Comment[et]=Mooduli raamistiku loomine, mida saab põimida TDE juhtimiskeskusse. +Comment[eu]=TDE-ren kontrol-gunean kapsula daitekeen modulu baten lan-marko bat sortzen du. +Comment[fa]=چارچوبی برای پیمانه‌ای که در مرکز کنترل TDE می‌تواند نهفته شود، تولید می‌کند. +Comment[fr]=Génère une infrastructure pour un module qui peut être intégré dans le centre de configuration de TDE. +Comment[ga]=Cruthaigh creatlach de mhodúl is féidir leabú i Lárionad Rialaithe TDE. +Comment[gl]=Xera un contorno de traballo para un módulo que pode incrustarse no Centro de control de TDE. +Comment[hu]=Létrehoz egy kiindulási TDE vezérlőpult-beállítómodult +Comment[it]=Genera l'infrastruttura per un modulo che può essere integrato nel Centro di controllo di TDE. +Comment[ja]=TDE のコントロールセンターに取り込めるモジュールのフレームワークを作成します。 +Comment[nds]=Stellt en Rahmenwark för en Moduul op, dat sik na dat TDE-Kuntrullzentrum inbetten lett. +Comment[ne]=केडीई नियन्त्रण केन्द्रमा सम्मिलित गर्न सकिने मोड्युलका लागि फ्रेमवर्क उत्पन्न गर्दछ । +Comment[nl]=Genereert een framework voor een module die kan worden ingebed in het configuratiecentrum van TDE. +Comment[pl]=Generuje szablon modułu, który może zostać włączony w Centrum Sterowania TDE. +Comment[pt]=Gera a plataforma para um módulo que possa ser incorporado no Centro de Controlo do TDE. +Comment[pt_BR]=Gera a plataforma para um módulo que possa ser incorporado no Centro de Controlo do TDE. +Comment[ru]=Создание модуля для Центра управления TDE. +Comment[sk]=Vygeneruje framework pre modul, ktorý môže byť vložený do TDE Control Center. +Comment[sr]=Прави радни оквир за модул који се може уградити у Контролни центар TDE-а. +Comment[sr@Latn]=Pravi radni okvir za modul koji se može ugraditi u Kontrolni centar TDE-a. +Comment[sv]=Skapar ett ramverk för en modul som kan inbäddas i TDE:s inställningscentral. +Comment[tr]=TDE Kontrol Merkezine gömülebilen bir birim için bir çatı yaratır. +Comment[zh_CN]=生成一个可嵌入 TDE 控制中心的模块框架。 +Comment[zh_TW]=產生一個可以嵌入 TDE 控制中心的模組框架。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=tdecmodule.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/module.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/po + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir4] +Type=mkdir +Dir=%{dest}/src + +[FILE9] +Type=install +Source=%{src}/module.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/module.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/module.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/module.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A control center module was created in %{dest} +Comment[ca]=A mòdul per al centre de control ha estat creat en %{dest} +Comment[da]=Et kontrolcenter-modul blev oprettet i %{dest} +Comment[de]=Ein Kontrollzentrum-Modul wurde in %{dest} erstellt. +Comment[el]=Ένα άρθρωμα κέντρου ελέγχου δημιουργήθηκε στο %{dest} +Comment[en_GB]=A control centre module was created in %{dest} +Comment[es]=Un módulo para el Centro de control ha sido creado en %{dest} +Comment[et]=Juhtimiskeskuse moodul loodi asukohta %{dest} +Comment[eu]=Kontrol-gunearen modulu bat sortu da hemen: {dest} +Comment[fa]=یک پیمانۀ مرکز کنترل در %{dest} ایجاد شد +Comment[fr]=Un module du centre de configuration a été créé dans %{dest} +Comment[ga]=Cruthaíodh modúl lárionad rialaithe i %{dest} +Comment[gl]=Creouse un módulo para o centro de control en %{dest} +Comment[hu]=Létrejött egy KControl-beállítómodul itt: %{dest} +Comment[it]=È stato creato un modulo del Centro di controllo in %{dest} +Comment[ja]=コントロールセンターのモジュールを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Kuntrullzentrum-Moduul opstellt +Comment[ne]=नियन्त्रण केन्द्र मोड्युल %{dest} मा सिर्जना गरियो +Comment[nl]=Een configuratiemodule is aangemaakt in %{dest} +Comment[pl]=Moduł Centrum Sterowania został utworzony w %{dest} +Comment[pt]=Foi criado um módulo do Centro de Controlo em %{dest} +Comment[pt_BR]=Foi criado um módulo do Centro de Controlo em %{dest} +Comment[ru]=Модуль Центра управления TDE создан в %{dest} +Comment[sk]=Control center modul bol vytvorený v %{dest} +Comment[sl]=Modul nadzornega središča je bil ustvarjen v %{dest} +Comment[sr]=Модул Контролног центра направљен је у %{dest} +Comment[sr@Latn]=Modul Kontrolnog centra napravljen je u %{dest} +Comment[sv]=En modul i inställningscentralen skapades i %{dest} +Comment[zh_CN]=在 %{dest} 中创建了一个控制中心模块 +Comment[zh_TW]=一個控制中心模組已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdecmodule/tdecmodule.tdevtemplate b/languages/cpp/app_templates/tdecmodule/tdecmodule.tdevtemplate deleted file mode 100644 index 06d6657a..00000000 --- a/languages/cpp/app_templates/tdecmodule/tdecmodule.tdevtemplate +++ /dev/null @@ -1,197 +0,0 @@ -# TDE Config File -[General] -Name=Control Center module -Name[ca]=Mòdul per al Centre de control -Name[da]=Kontrolcenter-modul -Name[de]=Kontrollzentrum-Modul -Name[el]=Άρθρωμα κέντρου ελέγχου -Name[en_GB]=Control Centre module -Name[es]=Módulo para el Centro de control -Name[et]=Juhtimiskeskuse moodul -Name[eu]=Kontrol-gunearen modulua -Name[fa]=پیمانۀ مرکز کنترل -Name[fr]=Module du centre de configuration -Name[ga]=Modúl Lárionad Rialaithe -Name[gl]=Módulo para Centro de control -Name[hu]=KControl-beállítómodul -Name[it]=Modulo del Centro di controllo -Name[ja]=コントロールセンターモジュール -Name[nds]=Kuntrullzentrum-Moduul -Name[ne]=नियन्त्रण केन्द्र मोड्युल -Name[nl]=Configuratiemodule -Name[pl]=Moduł Centrum Sterowania -Name[pt]=Módulo do Centro de Controlo -Name[pt_BR]=Módulo do Centro de Controlo -Name[ru]=Модуль Центра управления -Name[sk]=Control Center modul -Name[sl]=Modul nadzornega središča -Name[sr]=Модул Контролног центра -Name[sr@Latn]=Modul Kontrolnog centra -Name[sv]=Modul i inställningscentralen -Name[tr]=Kontrol Merkezi Birimi -Name[zh_CN]=控制中心模块 -Name[zh_TW]=控制中心模組 -Icon=tdecmodule.png -Category=C++/TDE -Comment=Generates a framework for a module which can be embedded into the TDE Control Center. -Comment[ca]=Genera una infraestructura per a un mòdul que es pugui encastar al Centre de control de TDE. -Comment[da]=Genererer et skelet for et modul som kan indlejres i TDE's kontrolcenter. -Comment[de]=Erstellt das Gerüst für ein Modul, das in das TDE-Kontrollzentrum integriert werden kann. -Comment[el]=Δημιουργεί ένα πλαίσιο για ένα άρθρωμα το οποίο μπορεί να ενσωματωθεί το κέντρο ελέγχου του TDE. -Comment[en_GB]=Generates a framework for a module which can be embedded into the TDE Control Centre. -Comment[es]=Genera una infraestructura para un módulo que se puede empotrar en el Centro de control de TDE. -Comment[et]=Mooduli raamistiku loomine, mida saab põimida TDE juhtimiskeskusse. -Comment[eu]=TDE-ren kontrol-gunean kapsula daitekeen modulu baten lan-marko bat sortzen du. -Comment[fa]=چارچوبی برای پیمانه‌ای که در مرکز کنترل TDE می‌تواند نهفته شود، تولید می‌کند. -Comment[fr]=Génère une infrastructure pour un module qui peut être intégré dans le centre de configuration de TDE. -Comment[ga]=Cruthaigh creatlach de mhodúl is féidir leabú i Lárionad Rialaithe TDE. -Comment[gl]=Xera un contorno de traballo para un módulo que pode incrustarse no Centro de control de TDE. -Comment[hu]=Létrehoz egy kiindulási TDE vezérlőpult-beállítómodult -Comment[it]=Genera l'infrastruttura per un modulo che può essere integrato nel Centro di controllo di TDE. -Comment[ja]=TDE のコントロールセンターに取り込めるモジュールのフレームワークを作成します。 -Comment[nds]=Stellt en Rahmenwark för en Moduul op, dat sik na dat TDE-Kuntrullzentrum inbetten lett. -Comment[ne]=केडीई नियन्त्रण केन्द्रमा सम्मिलित गर्न सकिने मोड्युलका लागि फ्रेमवर्क उत्पन्न गर्दछ । -Comment[nl]=Genereert een framework voor een module die kan worden ingebed in het configuratiecentrum van TDE. -Comment[pl]=Generuje szablon modułu, który może zostać włączony w Centrum Sterowania TDE. -Comment[pt]=Gera a plataforma para um módulo que possa ser incorporado no Centro de Controlo do TDE. -Comment[pt_BR]=Gera a plataforma para um módulo que possa ser incorporado no Centro de Controlo do TDE. -Comment[ru]=Создание модуля для Центра управления TDE. -Comment[sk]=Vygeneruje framework pre modul, ktorý môže byť vložený do TDE Control Center. -Comment[sr]=Прави радни оквир за модул који се може уградити у Контролни центар TDE-а. -Comment[sr@Latn]=Pravi radni okvir za modul koji se može ugraditi u Kontrolni centar TDE-a. -Comment[sv]=Skapar ett ramverk för en modul som kan inbäddas i TDE:s inställningscentral. -Comment[tr]=TDE Kontrol Merkezine gömülebilen bir birim için bir çatı yaratır. -Comment[zh_CN]=生成一个可嵌入 TDE 控制中心的模块框架。 -Comment[zh_TW]=產生一個可以嵌入 TDE 控制中心的模組框架。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=tdecmodule.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/module.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/po - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir4] -Type=mkdir -Dir=%{dest}/src - -[FILE9] -Type=install -Source=%{src}/module.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/module.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/module.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/module.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=A control center module was created in %{dest} -Comment[ca]=A mòdul per al centre de control ha estat creat en %{dest} -Comment[da]=Et kontrolcenter-modul blev oprettet i %{dest} -Comment[de]=Ein Kontrollzentrum-Modul wurde in %{dest} erstellt. -Comment[el]=Ένα άρθρωμα κέντρου ελέγχου δημιουργήθηκε στο %{dest} -Comment[en_GB]=A control centre module was created in %{dest} -Comment[es]=Un módulo para el Centro de control ha sido creado en %{dest} -Comment[et]=Juhtimiskeskuse moodul loodi asukohta %{dest} -Comment[eu]=Kontrol-gunearen modulu bat sortu da hemen: {dest} -Comment[fa]=یک پیمانۀ مرکز کنترل در %{dest} ایجاد شد -Comment[fr]=Un module du centre de configuration a été créé dans %{dest} -Comment[ga]=Cruthaíodh modúl lárionad rialaithe i %{dest} -Comment[gl]=Creouse un módulo para o centro de control en %{dest} -Comment[hu]=Létrejött egy KControl-beállítómodul itt: %{dest} -Comment[it]=È stato creato un modulo del Centro di controllo in %{dest} -Comment[ja]=コントロールセンターのモジュールを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Kuntrullzentrum-Moduul opstellt -Comment[ne]=नियन्त्रण केन्द्र मोड्युल %{dest} मा सिर्जना गरियो -Comment[nl]=Een configuratiemodule is aangemaakt in %{dest} -Comment[pl]=Moduł Centrum Sterowania został utworzony w %{dest} -Comment[pt]=Foi criado um módulo do Centro de Controlo em %{dest} -Comment[pt_BR]=Foi criado um módulo do Centro de Controlo em %{dest} -Comment[ru]=Модуль Центра управления TDE создан в %{dest} -Comment[sk]=Control center modul bol vytvorený v %{dest} -Comment[sl]=Modul nadzornega središča je bil ustvarjen v %{dest} -Comment[sr]=Модул Контролног центра направљен је у %{dest} -Comment[sr@Latn]=Modul Kontrolnog centra napravljen je u %{dest} -Comment[sv]=En modul i inställningscentralen skapades i %{dest} -Comment[zh_CN]=在 %{dest} 中创建了一个控制中心模块 -Comment[zh_TW]=一個控制中心模組已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdeconfig35/CMakeLists.txt b/languages/cpp/app_templates/tdeconfig35/CMakeLists.txt index 1025eb0b..32dd830c 100644 --- a/languages/cpp/app_templates/tdeconfig35/CMakeLists.txt +++ b/languages/cpp/app_templates/tdeconfig35/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( tdeconfig35.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdeconfig35.tar.gz tdeconfig35.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - tdeconfig35.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + tdeconfig35.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdeconfig35/Makefile.am b/languages/cpp/app_templates/tdeconfig35/Makefile.am index dc6c56d1..a172f05f 100644 --- a/languages/cpp/app_templates/tdeconfig35/Makefile.am +++ b/languages/cpp/app_templates/tdeconfig35/Makefile.am @@ -5,10 +5,10 @@ dataFiles = src-Makefile.am app.cpp app.h main.cpp appui.rc app.tdevelop \ templateName= tdeconfig35 ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/tdeconfig35/app.tdevelop b/languages/cpp/app_templates/tdeconfig35/app.tdevelop index e1523988..6a53f237 100644 --- a/languages/cpp/app_templates/tdeconfig35/app.tdevelop +++ b/languages/cpp/app_templates/tdeconfig35/app.tdevelop @@ -17,15 +17,15 @@ - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - - + + src/%{APPNAMELC} debug @@ -61,8 +61,8 @@ -O0 -g3 - - + + @@ -74,8 +74,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -110,8 +110,8 @@ qmake User Guide - - + + libtool @@ -125,16 +125,16 @@ false true - - + + - - + + -f -dP @@ -143,7 +143,7 @@ -u3 -p - + @@ -155,14 +155,14 @@ true - + true 2 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/tdeconfig35/tdeconfig35.kdevtemplate b/languages/cpp/app_templates/tdeconfig35/tdeconfig35.kdevtemplate new file mode 100644 index 00000000..b9edfb7a --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/tdeconfig35.kdevtemplate @@ -0,0 +1,245 @@ +# TDE Config File +[General] +Name=TDEConfig XT for TDE 3.5 +Name[ca]=TDEConfig XT per a TDE 3.5 +Name[de]=TDEConfigXT-Anwendung für TDE 3.5 +Name[el]=Εφαρμογή TDEConfig XT για το TDE 3.5 +Name[es]=TDEConfig XT para TDE 3.5 +Name[et]=TDEConfig XT TDE 3.5 jaoks +Name[fr]=Application TDEConfig XT pour TDE 3.5 +Name[hu]=TDEConfig XT a TDE 3.5-höz +Name[it]=TDEConfig XT per TDE 3.5 +Name[ja]=TDE 3.5 用 TDEConfig XT +Name[nds]=TDEConfig-XT-Programm för TDE 3.5 +Name[nl]=TDEConfig XT voor TDE 3.5 +Name[pl]=Program TDEConfig XT dla TDE 3.5 +Name[pt]=Aplicação do TDEConfig XT para o TDE 3.5 +Name[pt_BR]=Aplicação do TDEConfig XT para o TDE 3.5 +Name[ru]=Приложение TDE 3.5 с TDEConfig XT +Name[sk]=TDEConfig XT pre TDE 3.5 +Name[sr]=TDEConfig XT програм за TDE 3.5 +Name[sr@Latn]=TDEConfig XT program za TDE 3.5 +Name[sv]=TDEConfig XT för TDE 3.5 +Name[zh_TW]=TDE 3.5 的 TDEConfig XT 應用程式 +Category=C++/TDE +Icon=kxt.png +Comment=Generates a simple TDE application with one widget and a configuration dialog compatible with TDE 3.5 only +Comment[ca]=Genera una simple aplicació per al TDE amb un estri i un diàleg de configuració compatible només amb TDE 3.5. +Comment[da]=Genererer et simpelt TDE-program med en kontrol og en indstillingsdialog der kun er kompatibelt med TDE 3.5 +Comment[de]=Erstellt eine einfache TDE-Anwendung für TDE 3.5 mit einem Widget und einem Einstellungsdialog. +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης συμβατό μόνο με το TDE 3.5 +Comment[en_GB]=Generates a simple TDE application with one widget and a configuration dialogue compatible with TDE 3.5 only +Comment[es]=Genera una sencilla aplicación para TDE con un widget y un diálogo de configuración compatible solo con TDE 3.5 +Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina ja vaid TDE 3.5-ga ühilduva seadistustedialoogiga. +Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique et une boîte de dialogue de configuration compatible avec TDE 3.5 uniquement +Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal, csak a TDE 3.5-tel kompatibilis +Comment[it]=Genera una semplice applicazione TDE con un elemento grafico e una finestra di configurazione compatibile solo con TDE 3.5 +Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な TDE アプリケーションを作成します (TDE 3.5 用) +Comment[nds]=Stellt en eenfach TDE-Programm mit een Element un en Instelldialoog op, de bloots mit TDE 3.5 kompatibel is. +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget en een configuratiedialoog die alleen met TDE 3.5 compatible is +Comment[pl]=Generuje prosty program TDE z jednym widżetem i oknem konfiguracyjnym zgodnym z TDE 3.5 +Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração, apenas para o TDE 3.5 +Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração, apenas para o TDE 3.5 +Comment[ru]=Создание простого приложения TDE с одним виджетом и диалогом конфигурации, совместимое только с TDE 3.5. +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom a konfiguračným dialógom kompatibilnú len s TDE 3.5 +Comment[sr]=Прави једноставан TDE програм са једном контролом и дијалогом за подешавање, компатибилан само са TDE-ом 3.5 +Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom i dijalogom za podešavanje, kompatibilan samo sa TDE-om 3.5 +Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent och en inställningsdialogruta, som bara fungerar med TDE 3.5 +Comment[zh_TW]=產生一個簡單的 TDE 3.5 上的應用程式,內含一個元件與一個設定對話框。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp,%{dest}/README +Archive=tdeconfig35.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE17] +Type=install +EscapeXML=true +Source=%{src}/appview_base.ui +Dest=%{dest}/src/%{APPNAMELC}view_base.ui + +[FILE18] +Type=install +Source=%{src}/appview.cpp +Dest=%{dest}/src/%{APPNAMELC}view.cpp + +[FILE19] +Type=install +Source=%{src}/appview.h +Dest=%{dest}/src/%{APPNAMELC}view.h + +[FILE20] +Type=install +EscapeXML=true +Source=%{src}/prefs-base.ui +Dest=%{dest}/src/prefs-base.ui + +[FILE21] +Type=install +Source=%{src}/prefs.cpp +Dest=%{dest}/src/prefs.cpp + +[FILE22] +Type=install +Source=%{src}/prefs.h +Dest=%{dest}/src/prefs.h + +[FILE23] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE24] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE25] +Type=install +Source=%{src}/README +Dest=%{dest}/README + +[FILE26] +Type=install +Source=%{src}/app.kcfg +Dest=%{dest}/src/%{APPNAMELC}.kcfg + +[FILE27] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/src/settings.kcfgc + +[FILE28] +Type=install +Source=%{src}/src-configure.in.in +Dest=%{dest}/configure.in.in + +[MSG] +Type=message +Comment=A TDE 3.5 TDEConfig XT application was created in %{dest} +Comment[ca]=Una aplicació TDEConfig XT per al TDE ha estat creada en %{dest} +Comment[da]=Et TDE 3.5 TDEConfig XT-program blev oprettet i %{dest} +Comment[de]=Eine TDEConfig-XT-Anwendung für TDE 3.5 wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή TDEConfig XT του TDE 3.5 δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación TDEConfig XT para TDE 3.5 ha sido creada en %{dest} +Comment[et]=TDE 3.5 TDEConfig XT rakendus loodi asukohta %{dest} +Comment[fr]=Une application TDEConfig XT pour TDE 3.5 a été créée dans %{dest} +Comment[hu]=Létrejött egy TDEConfig XT-alapú TDE 3.5-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDEConfig XT per TDE 3.5 in %{dest} +Comment[ja]=TDE 3.5 用 TDEConfig XT アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDEConfig-XT-Programm för TDE 3.5 opstellt +Comment[nl]=Een TDE 3.5 TDEConfig XT-toepassing is aangemaakt in %{dest} +Comment[pl]=Program TDEConfig XT dla TDE 3.5 został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDEConfig XT para o TDE 3.5 em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDEConfig XT para o TDE 3.5 em %{dest} +Comment[ru]=Приложение TDE с TDEConfig XT создано в %{dest} +Comment[sk]=TDEConfig XT pre TDE 3.5 bola vytvorená v %{dest} +Comment[sr]=TDEConfig XT програм за TDE 3.5 направљен је у %{dest} +Comment[sr@Latn]=TDEConfig XT program za TDE 3.5 napravljen je u %{dest} +Comment[sv]=Ett TDE 3.5 TDEConfig XT-program skapades i %{dest} +Comment[zh_TW]=一個 TDE 3.5 上的 TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdeconfig35/tdeconfig35.tdevtemplate b/languages/cpp/app_templates/tdeconfig35/tdeconfig35.tdevtemplate deleted file mode 100644 index 485b9eb9..00000000 --- a/languages/cpp/app_templates/tdeconfig35/tdeconfig35.tdevtemplate +++ /dev/null @@ -1,245 +0,0 @@ -# TDE Config File -[General] -Name=TDEConfig XT for TDE 3.5 -Name[ca]=TDEConfig XT per a TDE 3.5 -Name[de]=TDEConfigXT-Anwendung für TDE 3.5 -Name[el]=Εφαρμογή TDEConfig XT για το TDE 3.5 -Name[es]=TDEConfig XT para TDE 3.5 -Name[et]=TDEConfig XT TDE 3.5 jaoks -Name[fr]=Application TDEConfig XT pour TDE 3.5 -Name[hu]=TDEConfig XT a TDE 3.5-höz -Name[it]=TDEConfig XT per TDE 3.5 -Name[ja]=TDE 3.5 用 TDEConfig XT -Name[nds]=TDEConfig-XT-Programm för TDE 3.5 -Name[nl]=TDEConfig XT voor TDE 3.5 -Name[pl]=Program TDEConfig XT dla TDE 3.5 -Name[pt]=Aplicação do TDEConfig XT para o TDE 3.5 -Name[pt_BR]=Aplicação do TDEConfig XT para o TDE 3.5 -Name[ru]=Приложение TDE 3.5 с TDEConfig XT -Name[sk]=TDEConfig XT pre TDE 3.5 -Name[sr]=TDEConfig XT програм за TDE 3.5 -Name[sr@Latn]=TDEConfig XT program za TDE 3.5 -Name[sv]=TDEConfig XT för TDE 3.5 -Name[zh_TW]=TDE 3.5 的 TDEConfig XT 應用程式 -Category=C++/TDE -Icon=kxt.png -Comment=Generates a simple TDE application with one widget and a configuration dialog compatible with TDE 3.5 only -Comment[ca]=Genera una simple aplicació per al TDE amb un estri i un diàleg de configuració compatible només amb TDE 3.5. -Comment[da]=Genererer et simpelt TDE-program med en kontrol og en indstillingsdialog der kun er kompatibelt med TDE 3.5 -Comment[de]=Erstellt eine einfache TDE-Anwendung für TDE 3.5 mit einem Widget und einem Einstellungsdialog. -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης συμβατό μόνο με το TDE 3.5 -Comment[en_GB]=Generates a simple TDE application with one widget and a configuration dialogue compatible with TDE 3.5 only -Comment[es]=Genera una sencilla aplicación para TDE con un widget y un diálogo de configuración compatible solo con TDE 3.5 -Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina ja vaid TDE 3.5-ga ühilduva seadistustedialoogiga. -Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique et une boîte de dialogue de configuration compatible avec TDE 3.5 uniquement -Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal, csak a TDE 3.5-tel kompatibilis -Comment[it]=Genera una semplice applicazione TDE con un elemento grafico e una finestra di configurazione compatibile solo con TDE 3.5 -Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な TDE アプリケーションを作成します (TDE 3.5 用) -Comment[nds]=Stellt en eenfach TDE-Programm mit een Element un en Instelldialoog op, de bloots mit TDE 3.5 kompatibel is. -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget en een configuratiedialoog die alleen met TDE 3.5 compatible is -Comment[pl]=Generuje prosty program TDE z jednym widżetem i oknem konfiguracyjnym zgodnym z TDE 3.5 -Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração, apenas para o TDE 3.5 -Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração, apenas para o TDE 3.5 -Comment[ru]=Создание простого приложения TDE с одним виджетом и диалогом конфигурации, совместимое только с TDE 3.5. -Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom a konfiguračným dialógom kompatibilnú len s TDE 3.5 -Comment[sr]=Прави једноставан TDE програм са једном контролом и дијалогом за подешавање, компатибилан само са TDE-ом 3.5 -Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom i dijalogom za podešavanje, kompatibilan samo sa TDE-om 3.5 -Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent och en inställningsdialogruta, som bara fungerar med TDE 3.5 -Comment[zh_TW]=產生一個簡單的 TDE 3.5 上的應用程式,內含一個元件與一個設定對話框。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp,%{dest}/README -Archive=tdeconfig35.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE17] -Type=install -EscapeXML=true -Source=%{src}/appview_base.ui -Dest=%{dest}/src/%{APPNAMELC}view_base.ui - -[FILE18] -Type=install -Source=%{src}/appview.cpp -Dest=%{dest}/src/%{APPNAMELC}view.cpp - -[FILE19] -Type=install -Source=%{src}/appview.h -Dest=%{dest}/src/%{APPNAMELC}view.h - -[FILE20] -Type=install -EscapeXML=true -Source=%{src}/prefs-base.ui -Dest=%{dest}/src/prefs-base.ui - -[FILE21] -Type=install -Source=%{src}/prefs.cpp -Dest=%{dest}/src/prefs.cpp - -[FILE22] -Type=install -Source=%{src}/prefs.h -Dest=%{dest}/src/prefs.h - -[FILE23] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE24] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE25] -Type=install -Source=%{src}/README -Dest=%{dest}/README - -[FILE26] -Type=install -Source=%{src}/app.kcfg -Dest=%{dest}/src/%{APPNAMELC}.kcfg - -[FILE27] -Type=install -Source=%{src}/settings.kcfgc -Dest=%{dest}/src/settings.kcfgc - -[FILE28] -Type=install -Source=%{src}/src-configure.in.in -Dest=%{dest}/configure.in.in - -[MSG] -Type=message -Comment=A TDE 3.5 TDEConfig XT application was created in %{dest} -Comment[ca]=Una aplicació TDEConfig XT per al TDE ha estat creada en %{dest} -Comment[da]=Et TDE 3.5 TDEConfig XT-program blev oprettet i %{dest} -Comment[de]=Eine TDEConfig-XT-Anwendung für TDE 3.5 wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή TDEConfig XT του TDE 3.5 δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación TDEConfig XT para TDE 3.5 ha sido creada en %{dest} -Comment[et]=TDE 3.5 TDEConfig XT rakendus loodi asukohta %{dest} -Comment[fr]=Une application TDEConfig XT pour TDE 3.5 a été créée dans %{dest} -Comment[hu]=Létrejött egy TDEConfig XT-alapú TDE 3.5-alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDEConfig XT per TDE 3.5 in %{dest} -Comment[ja]=TDE 3.5 用 TDEConfig XT アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDEConfig-XT-Programm för TDE 3.5 opstellt -Comment[nl]=Een TDE 3.5 TDEConfig XT-toepassing is aangemaakt in %{dest} -Comment[pl]=Program TDEConfig XT dla TDE 3.5 został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do TDEConfig XT para o TDE 3.5 em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do TDEConfig XT para o TDE 3.5 em %{dest} -Comment[ru]=Приложение TDE с TDEConfig XT создано в %{dest} -Comment[sk]=TDEConfig XT pre TDE 3.5 bola vytvorená v %{dest} -Comment[sr]=TDEConfig XT програм за TDE 3.5 направљен је у %{dest} -Comment[sr@Latn]=TDEConfig XT program za TDE 3.5 napravljen je u %{dest} -Comment[sv]=Ett TDE 3.5 TDEConfig XT-program skapades i %{dest} -Comment[zh_TW]=一個 TDE 3.5 上的 TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdecpp.appwizard b/languages/cpp/app_templates/tdecpp.appwizard deleted file mode 100644 index c4f7b2ac..00000000 --- a/languages/cpp/app_templates/tdecpp.appwizard +++ /dev/null @@ -1,2 +0,0 @@ -[General] -List=kdedcop,tdeioslave,kxt,tdevlang,kmake,kapp,tdeconfig35,tdevlang,tdevpart,kateplugin,tdevpart2,kopart,noatunui,kateplugin2,tdefileplugin,konqnavpanel,noatunvisual,dcopservice,khello,kpartapp,khello2,kpartplugin,tdecmodule,kicker,tdescreensaver,kscons_kxt,kscons_tdemdi diff --git a/languages/cpp/app_templates/tdedcop/CMakeLists.txt b/languages/cpp/app_templates/tdedcop/CMakeLists.txt deleted file mode 100644 index f5556887..00000000 --- a/languages/cpp/app_templates/tdedcop/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_custom_target( tdedcop.tar.gz ALL - COMMAND tar zcf tdedcop.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - app.cpp app.h app_iface.h app.tdevelop main.cpp - mainclass.cpp mainclass.h tdedcop.png src-Makefile.am - subdirs -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdedcop.tar.gz tdedcop.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdedcop.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdedcop/Makefile.am b/languages/cpp/app_templates/tdedcop/Makefile.am deleted file mode 100644 index 8a21a2bd..00000000 --- a/languages/cpp/app_templates/tdedcop/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -dataFiles = app.cpp app.h app_iface.h app.tdevelop main.cpp mainclass.cpp \ - mainclass.h tdedcop.png src-Makefile.am subdirs - -templateName = tdedcop - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(templateName).tar.gz: ${dataFiles} - $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} - $(GZIP_COMMAND) -f9 $(templateName).tar - -archivedir = ${appwizarddatadir} -archive_DATA = $(templateName).tar.gz ${templateName}.png - -CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/cpp/app_templates/tdedcop/app.cpp b/languages/cpp/app_templates/tdedcop/app.cpp deleted file mode 100644 index 5c2fa627..00000000 --- a/languages/cpp/app_templates/tdedcop/app.cpp +++ /dev/null @@ -1,21 +0,0 @@ -%{CPP_TEMPLATE} - -#include "%{APPNAMELC}.h" - -#include - -#include -#include - -%{APPNAME}::%{APPNAME}() - : TDEMainWindow( 0, "%{APPNAME}" ) -{ - m_mainClass = new MainClass(); -} - -%{APPNAME}::~%{APPNAME}() -{ - if (m_mainClass) delete m_mainClass; -} - -#include "%{APPNAMELC}.moc" diff --git a/languages/cpp/app_templates/tdedcop/app.h b/languages/cpp/app_templates/tdedcop/app.h deleted file mode 100644 index 814fccad..00000000 --- a/languages/cpp/app_templates/tdedcop/app.h +++ /dev/null @@ -1,37 +0,0 @@ -%{H_TEMPLATE} - -#ifndef _%{APPNAMEUC}_H_ -#define _%{APPNAMEUC}_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "mainclass.h" - -/** - * @short Application Main Window - * @author %{AUTHOR} <%{EMAIL}> - * @version 0.1 - */ -class %{APPNAME} : public TDEMainWindow -{ - Q_OBJECT - -public: - /** - * Default Constructor - */ - %{APPNAME}(); - - /** - * Default Destructor - */ - virtual ~%{APPNAME}(); -private: - MainClass *m_mainClass; -}; - -#endif // _%{APPNAMEUC}_H_ diff --git a/languages/cpp/app_templates/tdedcop/app.tdevelop b/languages/cpp/app_templates/tdedcop/app.tdevelop deleted file mode 100644 index c37bd28d..00000000 --- a/languages/cpp/app_templates/tdedcop/app.tdevelop +++ /dev/null @@ -1,116 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - C++ - Code - Qt - TDE - DCOP - - - - - 3 - true - 3 - EmbeddedTDevDesigner - - - - - - src/%{APPNAMELC} - debug - - - src/%{APPNAMELC} - - - - optimized - kdevgccoptions - kdevgppoptions - kdevg77options - -O2 -g0 - - - --enable-debug=full - debug - kdevgccoptions - kdevgppoptions - kdevg77options - -O0 -g3 - - - - - - - - - - - - - - - ada - ada_bugs_gcc - bash - bash_bugs - clanlib - w3c-dom-level2-html - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - ruby - ruby_bugs - sdl - w3c-svg - sw - w3c-uaag10 - wxwidgets_bugs - - - qmake User Guide - - - - - libtool - - - - - - - - - - - - - Doxygen Documentation Collection - %{APPNAMELC}.tag - - - diff --git a/languages/cpp/app_templates/tdedcop/app_iface.h b/languages/cpp/app_templates/tdedcop/app_iface.h deleted file mode 100644 index 7049c712..00000000 --- a/languages/cpp/app_templates/tdedcop/app_iface.h +++ /dev/null @@ -1,19 +0,0 @@ -%{H_TEMPLATE} - -#include - -class DCOPDemoIface : virtual public DCOPObject -{ - K_DCOP - k_dcop: - - - // Here you should place your DCOP interface. - // Below are four example methods. - virtual TQString strVal() const = 0; - virtual int intVal() const = 0; - - virtual void setIntVal( int num ) = 0; - virtual void setStrVal( const TQString &str ) = 0; - -}; diff --git a/languages/cpp/app_templates/tdedcop/main.cpp b/languages/cpp/app_templates/tdedcop/main.cpp deleted file mode 100644 index 283ab5cf..00000000 --- a/languages/cpp/app_templates/tdedcop/main.cpp +++ /dev/null @@ -1,52 +0,0 @@ -%{CPP_TEMPLATE} - -#include "%{APPNAMELC}.h" -#include -#include -#include -#include - -static const char description[] = - I18N_NOOP("A TDE KPart Application"); - -static const char version[] = "0.1"; - -static TDECmdLineOptions options[] = -{ -// { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, - TDECmdLineLastOption -}; - -int main(int argc, char **argv) -{ - TDEAboutData about("%{APPNAMELC}", I18N_NOOP("%{APPNAME}"), version, description, - TDEAboutData::License_%{LICENSE}, "(C) %{YEAR} %{AUTHOR}", 0, 0, "%{EMAIL}"); - about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" ); - TDECmdLineArgs::init(argc, argv, &about); - TDECmdLineArgs::addCmdLineOptions( options ); - TDEApplication app; - %{APPNAME} *mainWin = 0; - - if (app.isRestored()) - { - RESTORE(%{APPNAME}); - } - else - { - // no session.. just start up normally - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - /// @todo do something with the command line args here - - mainWin = new %{APPNAME}(); - app.setMainWidget( mainWin ); - mainWin->show(); - - args->clear(); - } - - int ret = app.exec(); - - delete mainWin; - return ret; -} diff --git a/languages/cpp/app_templates/tdedcop/mainclass.cpp b/languages/cpp/app_templates/tdedcop/mainclass.cpp deleted file mode 100644 index a5e0d6a5..00000000 --- a/languages/cpp/app_templates/tdedcop/mainclass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -%{CPP_TEMPLATE} - -#include "mainclass.h" - - -MainClass::MainClass() - : DCOPDemoIface(), - DCOPObject("mainclass"), /* this is the object name DCOP will expose */ - m_intValue(0) -{ -} - -MainClass::~MainClass() -{ -} - -void MainClass::setStrVal(const TQString & str) { - m_strValue = str; -} - -void MainClass::setIntVal(int val) { - m_intValue = val; -} - -TQString MainClass::strVal() const { - return m_strValue; -} - -int MainClass::intVal() const { - return m_intValue; -} diff --git a/languages/cpp/app_templates/tdedcop/mainclass.h b/languages/cpp/app_templates/tdedcop/mainclass.h deleted file mode 100644 index 13504f82..00000000 --- a/languages/cpp/app_templates/tdedcop/mainclass.h +++ /dev/null @@ -1,32 +0,0 @@ -%{H_TEMPLATE} - -#ifndef MAINCLASS_H -#define MAINCLASS_H - -#include "%{APPNAMELC}_iface.h" - -/** - * - * @author %{AUTHOR} - **/ -class MainClass : virtual public DCOPDemoIface -{ -public: - MainClass(); - - ~MainClass(); - - - // Here is the implementation of the example DCOP interface methods. - virtual void setStrVal(const TQString &); - virtual void setIntVal(int); - virtual TQString strVal() const; - virtual int intVal() const; - -private: - TQString m_strValue; - int m_intValue; - -}; - -#endif diff --git a/languages/cpp/app_templates/tdedcop/src-Makefile.am b/languages/cpp/app_templates/tdedcop/src-Makefile.am deleted file mode 100644 index 19ddf2fb..00000000 --- a/languages/cpp/app_templates/tdedcop/src-Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -## Makefile.am for %{APPNAMELC} - -# set the include path for X, qt and TDE -INCLUDES = $(all_includes) - -# these are the headers for your project -noinst_HEADERS = %{APPNAMELC}.h - -# let automoc handle all of the meta source files ((moc)) -METASOURCES = AUTO - -messages: rc.cpp - $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot - -# this is the program that gets installed. it's name is used for all -# of the other Makefile.am variables -bin_PROGRAMS = %{APPNAMELC} - -# the application source, library search path, and link libraries -%{APPNAMELC}_SOURCES = main.cpp %{APPNAMELC}.cpp %{APPNAMELC}_iface.skel mainclass.cpp -%{APPNAMELC}_LDFLAGS = $(KDE_RPATH) $(all_libraries) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) -%{APPNAMELC}_LDADD = $(LIB_TDEUI) diff --git a/languages/cpp/app_templates/tdedcop/subdirs b/languages/cpp/app_templates/tdedcop/subdirs deleted file mode 100644 index 0e678106..00000000 --- a/languages/cpp/app_templates/tdedcop/subdirs +++ /dev/null @@ -1,3 +0,0 @@ -doc -po -src diff --git a/languages/cpp/app_templates/tdedcop/tdedcop.png b/languages/cpp/app_templates/tdedcop/tdedcop.png deleted file mode 100644 index 1d25362b..00000000 Binary files a/languages/cpp/app_templates/tdedcop/tdedcop.png and /dev/null differ diff --git a/languages/cpp/app_templates/tdedcop/tdedcop.tdevtemplate b/languages/cpp/app_templates/tdedcop/tdedcop.tdevtemplate deleted file mode 100644 index 628fadd3..00000000 --- a/languages/cpp/app_templates/tdedcop/tdedcop.tdevtemplate +++ /dev/null @@ -1,227 +0,0 @@ -# TDE Config File -[General] -Name=Simple DCOP server -Name[ca]=Simple servidor DCOP -Name[da]=Simpel DCOP-server -Name[de]=Einfacher DCOP-Server -Name[el]=Απλός εξυπηρετητής DCOP -Name[es]=Sencillo servidor DCOP -Name[et]=Lihtne DCOP-server -Name[eu]=DCOP zerbitzari sinple bat -Name[fa]=کارساز سادۀ DCOP -Name[fr]=Serveur DCOP simple -Name[ga]=Freastalaí simplí DCOP -Name[gl]=Servidor sinxelo DCOP -Name[hu]=Egyszerű DCOP-kiszolgáló -Name[it]=Semplice server DCOP -Name[ja]=簡単な DCOP サーバ -Name[nds]=Eenfach DCOP-Server -Name[ne]=साधारण DCOP सर्भर -Name[nl]=Eenvoudige DCOP-server -Name[pl]=Prosty serwer DCOP -Name[pt]=Servidor de DCOP simples -Name[pt_BR]=Servidor de DCOP simples -Name[ru]=Сервер DCOP -Name[sk]=Jednoduchý DCOP server -Name[sl]=Preprost strežnik DCOP -Name[sr]=Једноставан DCOP сервер -Name[sr@Latn]=Jednostavan DCOP server -Name[sv]=Enkel DCOP-server -Name[tr]=Basit DCOP Sunucusu -Name[zh_CN]=简单的 DCOP 服务器 -Name[zh_TW]=簡單的 DCOP 伺服器 -Icon=kdedcop.png -Category=C++/TDE -Comment=Generates a basic TDE DCOP server. This is an ideal starting point for a DCOP server that does not require a GUI interface. -Comment[ca]=Genera un servidor bàsic DCOP per al TDE. Aquest és un idoni punt de partida per a un servidor DCOP que no requereixi d'una IGU. -Comment[da]=Genererer en basal TDE DCOP-server. Dette er et ideelt startpunkt for en DCOP-server der ikke kræver en GUI-grænseflade. -Comment[de]=Erstellt einen einfachen TDE-DCOP-Server. Dies ist ein idealer Ausgangspunkt für einen DCOP-Server, der keine Benutzeroberfläche erfordert. -Comment[el]=Δημιουργεί ένα βασικό εξυπηρετητή TDE DCOP. Αυτό είναι ένα ιδανικό σημείο αρχής για έναν εξυπηρετητή DCOP ο οποίος δε χρειάζεται ένα γραφικό περιβάλλον. -Comment[es]=Genera un servidor básico DCOP para TDE. Es un punto de comienzo ideal para un servidor DCOP que no requiera una interfaz gráfica. -Comment[et]=Lihtsa TDE DCOP-serveri loomine. See on ideaalne algus DCOP-serverile, mis ei eelda graafilist kasutajaliidest. -Comment[eu]=DCOP zerbitzari sinple bat sortzen du. Hau GUI interfazerik behar ez duen DCOP zerbitzari baterako hasierako puntu aparta da. -Comment[fa]=یک کارساز پایۀ TDE DCOP تولید می‌کند. این یک نقطۀ شروع دلخواه برای یک کارساز DCOP است، که نیازی به یک واسط ونک ندارد. -Comment[fr]=Génère un serveur DCOP TDE de base. C'est un bon point de départ pour un serveur DCOP qui ne requiert pas d'interface graphique. -Comment[gl]=Xera un servidor básico DCOP para TDE. Este é un punto de comezo ideal para un servidor DCOP que non require unha interface GUI. -Comment[hu]=Létrehoz egy egyszerű TDE DCOP-os kiszolgálót. Jó kiindulópont grafikus felület nélküli DCOP-kiszolgáló készítéséhez. -Comment[it]=Genera un semplice server DCOP per TDE. È un punto di partenza ideale per un server DCOP che non richiede un'interfaccia GUI. -Comment[ja]=基本的な TDE DCOP サーバを作成します。GUI を必要としない DCOP サーバの理想的な開始点です。 -Comment[nds]=Stellt en eenfach DCOP-Server op. Dat is en goot Anfang för en DCOP-Server ahn Böversiet. -Comment[ne]=आधारभूत TDE DCOP सर्भर उत्पन्न गर्दछ । यो DCOP सर्भरका लागि उपयुक्त सुरुआत बिन्दु हो जसलाई जी यू आई इन्टरफेस आवश्यक पर्दैन । -Comment[nl]=Genereert een basis TDE DCOP-server. Dit is een ideaal startpunt voor een DCOP-server die geen GUI-interface vereist. -Comment[pl]=Generuje prosty serwer TDE DCOP. Dobry punkt startu dla serwera DCOP, który nie potrzebuje interfejsu graficznego. -Comment[pt]=Gera um servidor básico de DCOP para o TDE. Este é um ponto de partida ideal para um servidor de DCOP que não necessite de uma interface gráfica. -Comment[pt_BR]=Gera um servidor básico de DCOP para o TDE. Este é um ponto de partida ideal para um servidor de DCOP que não necessite de uma interface gráfica. -Comment[ru]=Создание простого сервера DCOP. Идеальная стартовая точка для разработки сервера DCOP без графического интерфейса. -Comment[sk]=Vygeneruje základný TDE DCOP server. Toto je ideálny štartovací bod pre DCOP server, ktorý nepotrebuje GUI rozhranie. -Comment[sl]=Ustvari osnovni strežnik DCOP za TDE. To je idealno začetno mesto za strežnik DCOP, ki ne potrebuje grafičnega vmesnika. -Comment[sr]=Прави основан TDE DCOP сервер. Ово је идеална почетна тачка за DCOP сервер који не захтева GUI. -Comment[sr@Latn]=Pravi osnovan TDE DCOP server. Ovo je idealna početna tačka za DCOP server koji ne zahteva GUI. -Comment[sv]=Skapar en grundläggande TDE DCOP-server. Detta är en idealisk utgångspunkt för en DCOP-server som inte kräver ett grafiskt användargränssnitt. -Comment[tr]=Basit bir TDE DCOP sunucusu yaratır. Bu grafik arayüz gerektirmeyen bir DCOP sunucusuna başlamak için uygun bir noktadır. -Comment[zh_CN]=生成简单的 TDE DCOP 服务器。这是不需要图形界面的 DCOP 服务器的良好开端。 -Comment[zh_TW]=產生一個基本的 TDE DCOP 伺服器。這個是開發一個不需使用者介面的 DCOP 伺服器的一個好起點。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/main.cpp -Archive=kdedcop.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE17] -Type=install -Source=%{src}/mainclass.cpp -Dest=%{dest}/src/mainclass.cpp - -[FILE18] -Type=install -Source=%{src}/mainclass.h -Dest=%{dest}/src/mainclass.h - -[FILE19] -Type=install -Source=%{src}/app_iface.h -Dest=%{dest}/src/%{APPNAMELC}_iface.h - -[FILE20] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[MSG] -Type=message -Comment=A simple DCOP server was created in %{dest} -Comment[ca]=Un simple servidor DCOP ha estat creat en %{dest} -Comment[da]=En simpel DCOP-server blev oprettet i %{dest} -Comment[de]=Ein einfacher DCOP-Server wurde in %{dest} erstellt. -Comment[el]=Ένας απλός εξυπηρετητής DCOP δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo servidor DCOP ha sido creado en %{dest} -Comment[et]=Lihtne DCOP-server loodi asukohta %{dest} -Comment[eu]=DCOP zerbitzari sinple bat sortu da hemen: %{dest} -Comment[fa]=یک کارساز سادۀ DCOP در %{dest} ایجاد شد -Comment[fr]=Un serveur DCOP simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh freastalaí simplí DCOP i %{dest} -Comment[gl]=Creouse un servidor DCOP sinxelo en %{dest} -Comment[hu]=Létrejött egy egyszerű DCOP-kiszolgáló itt: %{dest} -Comment[it]=È stato creato un semplice server DCOP in %{dest} -Comment[ja]=簡単な DCOP サーバを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach DCOP-Server opstellt -Comment[ne]=साधारण DCOP सर्भर %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudige DCOP-server is aangemaakt in %{dest} -Comment[pl]=Prosty serwer DCOP został utworzony w %{dest} -Comment[pt]=Foi criado um servidor de DCOP simples em %{dest} -Comment[pt_BR]=Foi criado um servidor de DCOP simples em %{dest} -Comment[ru]=Простой сервер DCOP создан в %{dest} -Comment[sk]=Jednoduchý DCOP server bol vytvorený v %{dest} -Comment[sl]=Preprost strežnik DCOP je bil ustvarjen v %{dest} -Comment[sr]=Једноставан DCOP сервер направљен је у %{dest} -Comment[sr@Latn]=Jednostavan DCOP server napravljen je u %{dest} -Comment[sv]=En enkel DCOP-server skapades i %{dest} -Comment[tr]=Basit bir DCOP sunucusu %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了简单的 DCOP 服务器 -Comment[zh_TW]=一個簡單的 DCOP 伺服器已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdefileplugin/CMakeLists.txt b/languages/cpp/app_templates/tdefileplugin/CMakeLists.txt index d6998c33..5462742c 100644 --- a/languages/cpp/app_templates/tdefileplugin/CMakeLists.txt +++ b/languages/cpp/app_templates/tdefileplugin/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( tdefileplugin.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdefileplugin.tar.gz tdefileplugin.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - tdefileplugin.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + tdefileplugin.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdefileplugin/Makefile.am b/languages/cpp/app_templates/tdefileplugin/Makefile.am index 2896e774..019d2d7c 100644 --- a/languages/cpp/app_templates/tdefileplugin/Makefile.am +++ b/languages/cpp/app_templates/tdefileplugin/Makefile.am @@ -4,10 +4,10 @@ dataFiles = README.devel tdefile_plugin.cpp tdefile_plugin.desktop \ templateName = tdefileplugin ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/tdefileplugin/plugin.tdevelop b/languages/cpp/app_templates/tdefileplugin/plugin.tdevelop index cb6caa43..f09030c1 100644 --- a/languages/cpp/app_templates/tdefileplugin/plugin.tdevelop +++ b/languages/cpp/app_templates/tdefileplugin/plugin.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/tdefile_%{APPNAMELC}.la debug @@ -44,8 +44,8 @@ -O0 -g3 - - + + @@ -53,8 +53,8 @@ - - + + ada ada_bugs_gcc @@ -91,24 +91,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/tdefileplugin/tdefileplugin.kdevtemplate b/languages/cpp/app_templates/tdefileplugin/tdefileplugin.kdevtemplate new file mode 100644 index 00000000..2e53acc7 --- /dev/null +++ b/languages/cpp/app_templates/tdefileplugin/tdefileplugin.kdevtemplate @@ -0,0 +1,166 @@ +# TDE Config File +[General] +Name=KFile plugin +Name[br]=Lugent KFile +Name[ca]=Connector KFile +Name[de]=KFile-Modul +Name[el]=Πρόσθετο KFile +Name[es]=Complemento para KFile +Name[et]=KFile'i plugin +Name[eu]=KFile plugin-a +Name[fa]=وصلۀ KFile +Name[fr]=Module externe KFile +Name[ga]=Breiseán KFile +Name[gl]=Extensión para KFile +Name[hu]=KFile-bővítőmodul +Name[it]=Plugin KFile +Name[ja]=KFile プラグイン +Name[nds]=KFile-Moduul +Name[ne]=केडीई फाइल प्लगइन +Name[nl]=KFile-plugin +Name[pl]=Wtyczka do KFile +Name[pt]='Plugin' do KFile +Name[pt_BR]='Plugin' do KFile +Name[ru]=Модуль KFile +Name[sk]=KFile modul +Name[sl]=Vstavek za KFile +Name[sr]=Прикључак за KFile +Name[sr@Latn]=Priključak za KFile +Name[sv]=KFile-insticksprogram +Name[tr]=KFile Eklentisi +Name[zh_CN]=KFile 插件 +Name[zh_TW]=KFile 外掛程式 +Icon=tdefileplugin.png +Category=C++/TDE +Comment=Generates a KFile plugin for konqueror to display meta information. +Comment[ca]=Genera un connector KFile per al konqueror per a mostrar meta informació. +Comment[da]=Genererer et KFile-plugin for konqueror til at vise meta-information. +Comment[de]=Erstellt ein KFile-Modul für Konqueror zur Anzeige von Meta-Daten. +Comment[el]=Δημιουργεί ένα πρόσθετο KFile για την εμφάνιση μεταπληροφοριών στον konqueror. +Comment[es]=Genera un complemento de KFile para Konqueror que muestra metainformación. +Comment[et]=Konquerori KFile'i plugina loomine, mis näitab metainfot. +Comment[eu]=Meta-informazioa bistaratzeko Konqueror-en KFile plugin bat sortzen du. +Comment[fa]=یک وصلۀ KFile برای konqueror جهت نمایش فرااطلاعات تولید می‌کند. +Comment[fr]=Génère un module externe KFile pour que Konqueror affiche des méta-informations. +Comment[gl]=Xera unha extensión para KFile para permitir a konqueror mostrar metainformación. +Comment[hu]=Létrehoz egy KFile-bővítőmodult, mellyel a Konquerorban dokumentumjellemzőket lehet megjeleníteni. +Comment[it]=Genera un plugin KFile per Konqueror per mostrare meta informazioni. +Comment[nds]=Stellt en KFile-Moduul för Konqueror op, dat Metadaten wiest. +Comment[ne]=मेटा सूचना देखाउन कन्क्वेररका लागि केडीई फाइल प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Genereert een KFile-plugin voor konqueror voor het weergeven van meta-informatie. +Comment[pl]=Generuje wtyczkę KFile dla Konquerora do wyświetlania informacji meta. +Comment[pt]=Gera um 'plugin' do KFile para o Konqueror poder mostrar meta-informações. +Comment[pt_BR]=Gera um 'plugin' do KFile para o Konqueror poder mostrar meta-informações. +Comment[ru]=Создание модуля KFile для показа метаданных в Konqueror. +Comment[sk]=Vygeneruje KFile modul pre konqueror na zobrazenie meta informácií. +Comment[sr]=Прави прикључак за KFile за приказ метаинформација у Konqueror-у. +Comment[sr@Latn]=Pravi priključak za KFile za prikaz metainformacija u Konqueror-u. +Comment[sv]=Skapar ett KFile-insticksprogram till Konqueror för att visa metainformation. +Comment[tr]=Meta bilgisini göstermesi için Konqueror'a bir KFile eklentisi yaratır. +Comment[zh_CN]=生成一个可显示元信息的 Konqueror KFile 插件。 +Comment[zh_TW]=產生一個 Konqueror 的 KFile 外掛程式,顯示中繼資訊 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=${dest}/README.devel,%{dest}/src/tdefile_%{APPNAMELC}.cpp +Archive=tdefileplugin.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/tdefile_plugin.desktop +Dest=%{dest}/src/tdefile_%{APPNAMELC}.desktop + +[FILE13] +Type=install +Source=%{src}/tdefile_plugin.cpp +Dest=%{dest}/src/tdefile_%{APPNAMELC}.cpp + +[FILE14] +Type=install +Source=%{src}/tdefile_plugin.h +Dest=%{dest}/src/tdefile_%{APPNAMELC}.h + +[FILE15] +Type=install +Source=%{src}/README.devel +Dest=%{dest}/README.devel + diff --git a/languages/cpp/app_templates/tdefileplugin/tdefileplugin.tdevtemplate b/languages/cpp/app_templates/tdefileplugin/tdefileplugin.tdevtemplate deleted file mode 100644 index 4ef025de..00000000 --- a/languages/cpp/app_templates/tdefileplugin/tdefileplugin.tdevtemplate +++ /dev/null @@ -1,166 +0,0 @@ -# TDE Config File -[General] -Name=KFile plugin -Name[br]=Lugent KFile -Name[ca]=Connector KFile -Name[de]=KFile-Modul -Name[el]=Πρόσθετο KFile -Name[es]=Complemento para KFile -Name[et]=KFile'i plugin -Name[eu]=KFile plugin-a -Name[fa]=وصلۀ KFile -Name[fr]=Module externe KFile -Name[ga]=Breiseán KFile -Name[gl]=Extensión para KFile -Name[hu]=KFile-bővítőmodul -Name[it]=Plugin KFile -Name[ja]=KFile プラグイン -Name[nds]=KFile-Moduul -Name[ne]=केडीई फाइल प्लगइन -Name[nl]=KFile-plugin -Name[pl]=Wtyczka do KFile -Name[pt]='Plugin' do KFile -Name[pt_BR]='Plugin' do KFile -Name[ru]=Модуль KFile -Name[sk]=KFile modul -Name[sl]=Vstavek za KFile -Name[sr]=Прикључак за KFile -Name[sr@Latn]=Priključak za KFile -Name[sv]=KFile-insticksprogram -Name[tr]=KFile Eklentisi -Name[zh_CN]=KFile 插件 -Name[zh_TW]=KFile 外掛程式 -Icon=tdefileplugin.png -Category=C++/TDE -Comment=Generates a KFile plugin for konqueror to display meta information. -Comment[ca]=Genera un connector KFile per al konqueror per a mostrar meta informació. -Comment[da]=Genererer et KFile-plugin for konqueror til at vise meta-information. -Comment[de]=Erstellt ein KFile-Modul für Konqueror zur Anzeige von Meta-Daten. -Comment[el]=Δημιουργεί ένα πρόσθετο KFile για την εμφάνιση μεταπληροφοριών στον konqueror. -Comment[es]=Genera un complemento de KFile para Konqueror que muestra metainformación. -Comment[et]=Konquerori KFile'i plugina loomine, mis näitab metainfot. -Comment[eu]=Meta-informazioa bistaratzeko Konqueror-en KFile plugin bat sortzen du. -Comment[fa]=یک وصلۀ KFile برای konqueror جهت نمایش فرااطلاعات تولید می‌کند. -Comment[fr]=Génère un module externe KFile pour que Konqueror affiche des méta-informations. -Comment[gl]=Xera unha extensión para KFile para permitir a konqueror mostrar metainformación. -Comment[hu]=Létrehoz egy KFile-bővítőmodult, mellyel a Konquerorban dokumentumjellemzőket lehet megjeleníteni. -Comment[it]=Genera un plugin KFile per Konqueror per mostrare meta informazioni. -Comment[nds]=Stellt en KFile-Moduul för Konqueror op, dat Metadaten wiest. -Comment[ne]=मेटा सूचना देखाउन कन्क्वेररका लागि केडीई फाइल प्लगइन उत्पन्न गर्दछ । -Comment[nl]=Genereert een KFile-plugin voor konqueror voor het weergeven van meta-informatie. -Comment[pl]=Generuje wtyczkę KFile dla Konquerora do wyświetlania informacji meta. -Comment[pt]=Gera um 'plugin' do KFile para o Konqueror poder mostrar meta-informações. -Comment[pt_BR]=Gera um 'plugin' do KFile para o Konqueror poder mostrar meta-informações. -Comment[ru]=Создание модуля KFile для показа метаданных в Konqueror. -Comment[sk]=Vygeneruje KFile modul pre konqueror na zobrazenie meta informácií. -Comment[sr]=Прави прикључак за KFile за приказ метаинформација у Konqueror-у. -Comment[sr@Latn]=Pravi priključak za KFile za prikaz metainformacija u Konqueror-u. -Comment[sv]=Skapar ett KFile-insticksprogram till Konqueror för att visa metainformation. -Comment[tr]=Meta bilgisini göstermesi için Konqueror'a bir KFile eklentisi yaratır. -Comment[zh_CN]=生成一个可显示元信息的 Konqueror KFile 插件。 -Comment[zh_TW]=產生一個 Konqueror 的 KFile 外掛程式,顯示中繼資訊 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=${dest}/README.devel,%{dest}/src/tdefile_%{APPNAMELC}.cpp -Archive=tdefileplugin.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/tdefile_plugin.desktop -Dest=%{dest}/src/tdefile_%{APPNAMELC}.desktop - -[FILE13] -Type=install -Source=%{src}/tdefile_plugin.cpp -Dest=%{dest}/src/tdefile_%{APPNAMELC}.cpp - -[FILE14] -Type=install -Source=%{src}/tdefile_plugin.h -Dest=%{dest}/src/tdefile_%{APPNAMELC}.h - -[FILE15] -Type=install -Source=%{src}/README.devel -Dest=%{dest}/README.devel - diff --git a/languages/cpp/app_templates/tdeioslave/CMakeLists.txt b/languages/cpp/app_templates/tdeioslave/CMakeLists.txt index 730f65e2..584bdc19 100644 --- a/languages/cpp/app_templates/tdeioslave/CMakeLists.txt +++ b/languages/cpp/app_templates/tdeioslave/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( tdeioslave.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdeioslave.tar.gz tdeioslave.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - tdeioslave.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + tdeioslave.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdeioslave/Makefile.am b/languages/cpp/app_templates/tdeioslave/Makefile.am index 003040b4..bee7ddb6 100644 --- a/languages/cpp/app_templates/tdeioslave/Makefile.am +++ b/languages/cpp/app_templates/tdeioslave/Makefile.am @@ -3,10 +3,10 @@ dataFiles = slave.cpp slave.h slave.protocol slave.tdevelop \ templateName = tdeioslave ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/tdeioslave/slave.tdevelop b/languages/cpp/app_templates/tdeioslave/slave.tdevelop index 5cbbe5e0..cb257385 100644 --- a/languages/cpp/app_templates/tdeioslave/slave.tdevelop +++ b/languages/cpp/app_templates/tdeioslave/slave.tdevelop @@ -14,16 +14,16 @@ tdeioslave - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}.la debug @@ -45,15 +45,15 @@ -O0 -g3 - - + + - - + + bash bash_bugs @@ -91,23 +91,23 @@ Qt Designer Manual Qt Reference Documentation - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/tdeioslave/tdeioslave.kdevtemplate b/languages/cpp/app_templates/tdeioslave/tdeioslave.kdevtemplate new file mode 100644 index 00000000..2ff27786 --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/tdeioslave.kdevtemplate @@ -0,0 +1,183 @@ +# TDE Config File +[General] +Name=TDEIO slave +Name[br]=Sklav TDEIO +Name[ca]=Esclau TDEIO +Name[da]=TDEIO-slave +Name[de]=Ein-/Ausgabemodul +Name[el]=Υπηρέτης TDEIO +Name[es]=Esclavo TDEIO +Name[et]=TDEIO-moodul +Name[eu]=TDEIO morroia +Name[fr]=Esclave TDEIO +Name[ga]=Sclábhaí TDEIO +Name[gl]=Escravo TDEIO +Name[hu]=TDE-protokoll (KIOslave) +Name[it]=Slave TDEIO +Name[nds]=In-/Utgaavmoduul +Name[ne]=TDEIO स्लेभ +Name[nl]=TDEIO-slave +Name[pt]=TDEIO Slave +Name[sk]=TDEIO otrok +Name[sv]=I/O-slav +Icon=tdeioslave.png +Category=C++/TDE +Comment=Generates a framework for an IO slave +Comment[ca]=Genera una infraestructura per a un esclau IO +Comment[da]=Genererer et skelet for en IO-slave +Comment[de]=Erstellt das Grundgerüst für ein Ein-/Ausgabemodul. +Comment[el]=Δημιουργεί ένα πλαίσιο για έναν υπηρέτη IO +Comment[es]=Genera una infraestructura para un esclavo de E/S +Comment[et]=IO-mooduli raamistiku loomine +Comment[eu]=IO morroi baterako lan-marko bat sortzen du +Comment[fa]=چارچوبی برای یک IO slave تولید می‌کند +Comment[fr]=Génère une infrastructure pour un esclave d'entrée / sortie +Comment[ga]=Cruthaíonn sé seo creatlach le haghaidh sclábhaí IO +Comment[gl]=Xera un contorno de traballo para un escravo IO +Comment[hu]=Létrehoz egy kiindulási keretprogramot KIOslave készítéséhez +Comment[it]=Genera l'infrastruttura per uno slave di I/O +Comment[ja]=IO slave のフレームワークを作成します +Comment[nds]=Stellt dat Rahmenwark för en In-/Utgaavmoduul op +Comment[ne]=IO स्लेभका लागि फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Genereert een framework voor een IO-slave +Comment[pl]=Generuje szablon dla IO slave +Comment[pt]=Gera a plataforma para um 'IO slave' +Comment[pt_BR]=Gera a plataforma para um 'IO slave' +Comment[ru]=Создание канала IO slave для TDE +Comment[sk]=Vygeneruje framework pre IO otroka +Comment[sr]=Прави радни оквир за IO slave +Comment[sr@Latn]=Pravi radni okvir za IO slave +Comment[sv]=Skapar ett ramverk för en I/O-slav +Comment[zh_CN]=生成一个 IO slave 的框架 +Comment[zh_TW]=產生一個 IO slave 的框架 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=tdeioslave.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/slave.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/slave.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/slave.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/slave.protocol +Dest=%{dest}/src/%{APPNAMELC}.protocol + +[MSG] +Type=message +Comment=A TDEIO slave was created in %{dest} +Comment[ca]=Un esclau TDEIO ha estat creat en %{dest} +Comment[da]=En TDEIO-slave blev oprettet i %{dest} +Comment[de]=Ein Ein-/Ausgabemodul wurde in %{dest} erstellt. +Comment[el]=Ένας υπηρέτης TDEIO δημιουργήθηκε στο %{dest} +Comment[es]=Un esclavo TDEIO ha sido creado en %{dest} +Comment[et]=TDEIO-moodul loodi asukohta %{dest} +Comment[eu]=TDEIO morroi bat sortu da hemen: %{dest} +Comment[fa]=یک TDEIO slave در %{dest} ایجاد شد +Comment[fr]=Un esclave d'entrée / sortie a été créé dans %{dest} +Comment[ga]=Cruthaíodh sclábhaí TDEIO i %{dest} +Comment[gl]=Creouse un escravo TDEIO en %{dest} +Comment[hu]=Létrejött egy KIOslave itt: %{dest} +Comment[it]=È stato generato un slave TDEIO in %{dest} +Comment[ja]=TDEIO slave を %{dest} に作成しました。 +Comment[nds]=In %{dest} wöör en In-/Utgaavmoduul opstellt +Comment[ne]=TDEIO स्लेभ %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDEIO-slave is aangemaakt in %{dest} +Comment[pl]=TDEIO slave został utworzony w %{dest} +Comment[pt]=Foi criado um 'TDEIO slave' em %{dest} +Comment[pt_BR]=Foi criado um 'TDEIO slave' em %{dest} +Comment[ru]=Канал TDEIO slave создан в %{dest} +Comment[sk]=TDEIO otrok bol vytvorený v %{dest} +Comment[sr]=TDEIO slave је направљен у %{dest} +Comment[sr@Latn]=TDEIO slave je napravljen u %{dest} +Comment[sv]=En I/O-slav skapades i %{dest} +Comment[tr]=Bir TDEIO slave'i %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 TDEIO slave +Comment[zh_TW]=一個 TDEIO slave 已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdeioslave/tdeioslave.tdevtemplate b/languages/cpp/app_templates/tdeioslave/tdeioslave.tdevtemplate deleted file mode 100644 index 6ced25c6..00000000 --- a/languages/cpp/app_templates/tdeioslave/tdeioslave.tdevtemplate +++ /dev/null @@ -1,183 +0,0 @@ -# TDE Config File -[General] -Name=TDEIO slave -Name[br]=Sklav TDEIO -Name[ca]=Esclau TDEIO -Name[da]=TDEIO-slave -Name[de]=Ein-/Ausgabemodul -Name[el]=Υπηρέτης TDEIO -Name[es]=Esclavo TDEIO -Name[et]=TDEIO-moodul -Name[eu]=TDEIO morroia -Name[fr]=Esclave TDEIO -Name[ga]=Sclábhaí TDEIO -Name[gl]=Escravo TDEIO -Name[hu]=TDE-protokoll (KIOslave) -Name[it]=Slave TDEIO -Name[nds]=In-/Utgaavmoduul -Name[ne]=TDEIO स्लेभ -Name[nl]=TDEIO-slave -Name[pt]=TDEIO Slave -Name[sk]=TDEIO otrok -Name[sv]=I/O-slav -Icon=tdeioslave.png -Category=C++/TDE -Comment=Generates a framework for an IO slave -Comment[ca]=Genera una infraestructura per a un esclau IO -Comment[da]=Genererer et skelet for en IO-slave -Comment[de]=Erstellt das Grundgerüst für ein Ein-/Ausgabemodul. -Comment[el]=Δημιουργεί ένα πλαίσιο για έναν υπηρέτη IO -Comment[es]=Genera una infraestructura para un esclavo de E/S -Comment[et]=IO-mooduli raamistiku loomine -Comment[eu]=IO morroi baterako lan-marko bat sortzen du -Comment[fa]=چارچوبی برای یک IO slave تولید می‌کند -Comment[fr]=Génère une infrastructure pour un esclave d'entrée / sortie -Comment[ga]=Cruthaíonn sé seo creatlach le haghaidh sclábhaí IO -Comment[gl]=Xera un contorno de traballo para un escravo IO -Comment[hu]=Létrehoz egy kiindulási keretprogramot KIOslave készítéséhez -Comment[it]=Genera l'infrastruttura per uno slave di I/O -Comment[ja]=IO slave のフレームワークを作成します -Comment[nds]=Stellt dat Rahmenwark för en In-/Utgaavmoduul op -Comment[ne]=IO स्लेभका लागि फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Genereert een framework voor een IO-slave -Comment[pl]=Generuje szablon dla IO slave -Comment[pt]=Gera a plataforma para um 'IO slave' -Comment[pt_BR]=Gera a plataforma para um 'IO slave' -Comment[ru]=Создание канала IO slave для TDE -Comment[sk]=Vygeneruje framework pre IO otroka -Comment[sr]=Прави радни оквир за IO slave -Comment[sr@Latn]=Pravi radni okvir za IO slave -Comment[sv]=Skapar ett ramverk för en I/O-slav -Comment[zh_CN]=生成一个 IO slave 的框架 -Comment[zh_TW]=產生一個 IO slave 的框架 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=tdeioslave.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/slave.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/slave.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/slave.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/slave.protocol -Dest=%{dest}/src/%{APPNAMELC}.protocol - -[MSG] -Type=message -Comment=A TDEIO slave was created in %{dest} -Comment[ca]=Un esclau TDEIO ha estat creat en %{dest} -Comment[da]=En TDEIO-slave blev oprettet i %{dest} -Comment[de]=Ein Ein-/Ausgabemodul wurde in %{dest} erstellt. -Comment[el]=Ένας υπηρέτης TDEIO δημιουργήθηκε στο %{dest} -Comment[es]=Un esclavo TDEIO ha sido creado en %{dest} -Comment[et]=TDEIO-moodul loodi asukohta %{dest} -Comment[eu]=TDEIO morroi bat sortu da hemen: %{dest} -Comment[fa]=یک TDEIO slave در %{dest} ایجاد شد -Comment[fr]=Un esclave d'entrée / sortie a été créé dans %{dest} -Comment[ga]=Cruthaíodh sclábhaí TDEIO i %{dest} -Comment[gl]=Creouse un escravo TDEIO en %{dest} -Comment[hu]=Létrejött egy KIOslave itt: %{dest} -Comment[it]=È stato generato un slave TDEIO in %{dest} -Comment[ja]=TDEIO slave を %{dest} に作成しました。 -Comment[nds]=In %{dest} wöör en In-/Utgaavmoduul opstellt -Comment[ne]=TDEIO स्लेभ %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDEIO-slave is aangemaakt in %{dest} -Comment[pl]=TDEIO slave został utworzony w %{dest} -Comment[pt]=Foi criado um 'TDEIO slave' em %{dest} -Comment[pt_BR]=Foi criado um 'TDEIO slave' em %{dest} -Comment[ru]=Канал TDEIO slave создан в %{dest} -Comment[sk]=TDEIO otrok bol vytvorený v %{dest} -Comment[sr]=TDEIO slave је направљен у %{dest} -Comment[sr@Latn]=TDEIO slave je napravljen u %{dest} -Comment[sv]=En I/O-slav skapades i %{dest} -Comment[tr]=Bir TDEIO slave'i %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 TDEIO slave -Comment[zh_TW]=一個 TDEIO slave 已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdescreensaver/CMakeLists.txt b/languages/cpp/app_templates/tdescreensaver/CMakeLists.txt index eae96197..b1149d88 100644 --- a/languages/cpp/app_templates/tdescreensaver/CMakeLists.txt +++ b/languages/cpp/app_templates/tdescreensaver/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( tdescreensaver.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdescreensaver.tar.gz tdescreensaver.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - tdescreensaver.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + tdescreensaver.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdescreensaver/Makefile.am b/languages/cpp/app_templates/tdescreensaver/Makefile.am index 1f9e6179..bee93bbc 100644 --- a/languages/cpp/app_templates/tdescreensaver/Makefile.am +++ b/languages/cpp/app_templates/tdescreensaver/Makefile.am @@ -5,10 +5,10 @@ dataFiles = tdescreensaver.desktop tdescreensaver.png tdescreensaver.h \ templateName= tdescreensaver ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/tdescreensaver/tdescreensaver.kdevtemplate b/languages/cpp/app_templates/tdescreensaver/tdescreensaver.kdevtemplate new file mode 100644 index 00000000..91510f04 --- /dev/null +++ b/languages/cpp/app_templates/tdescreensaver/tdescreensaver.kdevtemplate @@ -0,0 +1,203 @@ +# TDE Config File +[General] +Name=TDE Screen Saver +Name[br]=Damanter skramm TDE +Name[ca]=Salvapantalles per al TDE +Name[da]=TDE pauseskærm +Name[de]=TDE-Bildschirmschoner +Name[el]=Προφύλαξη οθόνης του TDE +Name[es]=Salvapantallas para TDE +Name[et]=TDE ekraanisäästja +Name[eu]=TDE pantaila-babeslea +Name[fa]=محافظ صفحۀ TDE +Name[fr]=Écran de veille TDE +Name[ga]=Spárálaí Scáileáin TDE +Name[gl]=Salvapantallas TDE +Name[hu]=TDE-s képernyővédő +Name[it]=Salva schermo di TDE +Name[ja]=TDE スクリーンセーバー +Name[nds]=TDE-Pausschirm +Name[ne]=केडीई स्क्रिन सर्भर +Name[nl]=TDE-schermbeveiliging +Name[pl]=Wygaszacz ekranu TDE +Name[pt]=Protector de Ecrã do TDE +Name[pt_BR]=Protetor de tela do TDE +Name[ru]=Хранитель экрана для TDE +Name[sk]=TDE šetrič obrazovky +Name[sl]=Ohranjevalnik zaslona za TDE +Name[sr]=TDE чувар екрана +Name[sr@Latn]=TDE čuvar ekrana +Name[sv]=TDE-skärmsläckare +Name[tr]=TDE Ekran Koruyucusu +Name[zh_CN]= TDE 屏幕保护程序 +Name[zh_TW]=TDE 螢幕保護程式 +Icon=tdescreensaver.png +Category=C++/TDE +Comment=Generates a framework for a TDE screensaver. +Comment[ca]=Genera una infraestructura per a un salvapantalles de TDE. +Comment[da]=Genererer et skelet for en TDE-pauseskærm. +Comment[de]=Erstellt das Gerüst für einen TDE-Bildschirmschoner. +Comment[el]=Δημιουργεί ένα πλαίσιο για μια προφύλαξη οθόνης του TDE. +Comment[es]=Genera una infraestructura para un salvapantallas de TDE +Comment[et]=TDE ekraanisäästja raamistiku loomine. +Comment[eu]=TDE-ren pantaila-babesle baten lan-marko bat sortzen du. +Comment[fa]=چارچوبی برای محافظ صفحۀ TDE تولید می‌کند. +Comment[fr]=Génère une infrastructure pour un écran de veille TDE. +Comment[gl]=Xera un contorno de traballo para un salvapantallas TDE. +Comment[hu]=Létrehoz egy alap TDE-s képernyővédőt. +Comment[it]=Genera l'infrastruttura per un salvaschermo di TDE. +Comment[ja]=TDE スクリーンセーバーのフレームワークを作成します +Comment[nds]=Stellt dat Rahmenwark för en TDE-Pausschirm op. +Comment[ne]=केडीई स्क्रिनसेभरका लागि फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Genereert een framework voor een TDE-schermbeveiliging. +Comment[pl]=Generuje szablon wygaszacza ekranu dla TDE. +Comment[pt]=Gera a plataforma para um protector de ecrã do TDE. +Comment[pt_BR]=Gera a plataforma para um protector de ecrã do TDE. +Comment[ru]=Создание инфраструктуры хранителя экрана для TDE. +Comment[sk]=Vygeneruje framework pre TDE šetrič obrazovky. +Comment[sl]=Ustvari ogrodje ohranjevalnika zaslona za TDE. +Comment[sr]=Прави радни оквир за TDE чувар екрана. +Comment[sr@Latn]=Pravi radni okvir za TDE čuvar ekrana. +Comment[sv]=Skapar ett ramverk för en TDE-skärmsläckare +Comment[tr]=Bir TDE ekran koruyucusu için bir çatı oluşturulur. +Comment[zh_CN]=生成 TDE 屏幕保护程序框架。 +Comment[zh_TW]=產生一個 TDE 螢幕保護程式的框架 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=tdescreensaver.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/tdescreensaver.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/tdescreensaver.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/tdescreensaver.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/tdescreensaver.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE15] +Type=install +EscapeXML=true +Source=%{src}/tdescreensaverui.ui +Dest=%{dest}/src/%{APPNAMELC}ui.ui + +[MSG] +Type=message +Comment=A screensaver application was created in %{dest} +Comment[ca]=Una aplicació de salvapantalles ha estat creada en %{dest} +Comment[da]=Et pauseskærmsprogram blev oprettet i %{dest} +Comment[de]=Ein Bildschirmschoner wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή προφύλαξης οθόνης δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación salvapantallas ha sido creada en %{dest} +Comment[et]=Ekraanisäästja rakendus loodi asukohta %{dest} +Comment[eu]=Pantaila-babesle baten aplikazioa sortu da hemen: %{dest} +Comment[fa]=یک کاربرد محافظ صفحه در %{dest} ایجاد شد +Comment[fr]=Une application écran de veille a été créé dans %{dest} +Comment[ga]=Cruthaíodh spárálaí scáileáin i %{dest} +Comment[gl]=Creouse unha aplicación salvapantallas en %{dest} +Comment[hu]=Létrejött egy alap képernyővédő program itt: %{dest} +Comment[it]=È stata creata un'applicazione salvaschermo in %{dest} +Comment[ja]=スクリーンセーバーアプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Pausschirm opstellt +Comment[ne]=स्क्रिनसेभर अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een schermbeveiligingstoepassing is aangemaakt in %{dest} +Comment[pl]=Program wygaszacza ekranu został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação protectora do ecrã em %{dest} +Comment[pt_BR]=Foi criada uma aplicação protectora do ecrã em %{dest} +Comment[ru]=Приложение хранителя экрана создано в %{dest} +Comment[sk]=Aplikácia šetriča obrazovky bola vytvorená v %{dest} +Comment[sl]=Program ohranjevalnika zaslona je bil ustvarjen v %{dest} +Comment[sr]=Програм чувара екрана направљен је у %{dest} +Comment[sr@Latn]=Program čuvara ekrana napravljen je u %{dest} +Comment[sv]=Ett skärmsläckarprogram skapades i %{dest} +Comment[tr]=Bir ekran koruyucusu uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了屏幕保护应用程序 +Comment[zh_TW]=一個螢幕保護程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevelop b/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevelop index c3ae15db..28e0a678 100644 --- a/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevelop +++ b/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevelop @@ -14,16 +14,16 @@ tdeioslave - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}.la debug @@ -45,15 +45,15 @@ -O0 -g3 - - + + - - + + ada ada_bugs_gcc @@ -90,24 +90,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevtemplate b/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevtemplate deleted file mode 100644 index 0500fdd5..00000000 --- a/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevtemplate +++ /dev/null @@ -1,203 +0,0 @@ -# TDE Config File -[General] -Name=TDE Screen Saver -Name[br]=Damanter skramm TDE -Name[ca]=Salvapantalles per al TDE -Name[da]=TDE pauseskærm -Name[de]=TDE-Bildschirmschoner -Name[el]=Προφύλαξη οθόνης του TDE -Name[es]=Salvapantallas para TDE -Name[et]=TDE ekraanisäästja -Name[eu]=TDE pantaila-babeslea -Name[fa]=محافظ صفحۀ TDE -Name[fr]=Écran de veille TDE -Name[ga]=Spárálaí Scáileáin TDE -Name[gl]=Salvapantallas TDE -Name[hu]=TDE-s képernyővédő -Name[it]=Salva schermo di TDE -Name[ja]=TDE スクリーンセーバー -Name[nds]=TDE-Pausschirm -Name[ne]=केडीई स्क्रिन सर्भर -Name[nl]=TDE-schermbeveiliging -Name[pl]=Wygaszacz ekranu TDE -Name[pt]=Protector de Ecrã do TDE -Name[pt_BR]=Protetor de tela do TDE -Name[ru]=Хранитель экрана для TDE -Name[sk]=TDE šetrič obrazovky -Name[sl]=Ohranjevalnik zaslona za TDE -Name[sr]=TDE чувар екрана -Name[sr@Latn]=TDE čuvar ekrana -Name[sv]=TDE-skärmsläckare -Name[tr]=TDE Ekran Koruyucusu -Name[zh_CN]= TDE 屏幕保护程序 -Name[zh_TW]=TDE 螢幕保護程式 -Icon=tdescreensaver.png -Category=C++/TDE -Comment=Generates a framework for a TDE screensaver. -Comment[ca]=Genera una infraestructura per a un salvapantalles de TDE. -Comment[da]=Genererer et skelet for en TDE-pauseskærm. -Comment[de]=Erstellt das Gerüst für einen TDE-Bildschirmschoner. -Comment[el]=Δημιουργεί ένα πλαίσιο για μια προφύλαξη οθόνης του TDE. -Comment[es]=Genera una infraestructura para un salvapantallas de TDE -Comment[et]=TDE ekraanisäästja raamistiku loomine. -Comment[eu]=TDE-ren pantaila-babesle baten lan-marko bat sortzen du. -Comment[fa]=چارچوبی برای محافظ صفحۀ TDE تولید می‌کند. -Comment[fr]=Génère une infrastructure pour un écran de veille TDE. -Comment[gl]=Xera un contorno de traballo para un salvapantallas TDE. -Comment[hu]=Létrehoz egy alap TDE-s képernyővédőt. -Comment[it]=Genera l'infrastruttura per un salvaschermo di TDE. -Comment[ja]=TDE スクリーンセーバーのフレームワークを作成します -Comment[nds]=Stellt dat Rahmenwark för en TDE-Pausschirm op. -Comment[ne]=केडीई स्क्रिनसेभरका लागि फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Genereert een framework voor een TDE-schermbeveiliging. -Comment[pl]=Generuje szablon wygaszacza ekranu dla TDE. -Comment[pt]=Gera a plataforma para um protector de ecrã do TDE. -Comment[pt_BR]=Gera a plataforma para um protector de ecrã do TDE. -Comment[ru]=Создание инфраструктуры хранителя экрана для TDE. -Comment[sk]=Vygeneruje framework pre TDE šetrič obrazovky. -Comment[sl]=Ustvari ogrodje ohranjevalnika zaslona za TDE. -Comment[sr]=Прави радни оквир за TDE чувар екрана. -Comment[sr@Latn]=Pravi radni okvir za TDE čuvar ekrana. -Comment[sv]=Skapar ett ramverk för en TDE-skärmsläckare -Comment[tr]=Bir TDE ekran koruyucusu için bir çatı oluşturulur. -Comment[zh_CN]=生成 TDE 屏幕保护程序框架。 -Comment[zh_TW]=產生一個 TDE 螢幕保護程式的框架 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=tdescreensaver.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/tdescreensaver.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/tdescreensaver.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/tdescreensaver.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/tdescreensaver.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE15] -Type=install -EscapeXML=true -Source=%{src}/tdescreensaverui.ui -Dest=%{dest}/src/%{APPNAMELC}ui.ui - -[MSG] -Type=message -Comment=A screensaver application was created in %{dest} -Comment[ca]=Una aplicació de salvapantalles ha estat creada en %{dest} -Comment[da]=Et pauseskærmsprogram blev oprettet i %{dest} -Comment[de]=Ein Bildschirmschoner wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή προφύλαξης οθόνης δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación salvapantallas ha sido creada en %{dest} -Comment[et]=Ekraanisäästja rakendus loodi asukohta %{dest} -Comment[eu]=Pantaila-babesle baten aplikazioa sortu da hemen: %{dest} -Comment[fa]=یک کاربرد محافظ صفحه در %{dest} ایجاد شد -Comment[fr]=Une application écran de veille a été créé dans %{dest} -Comment[ga]=Cruthaíodh spárálaí scáileáin i %{dest} -Comment[gl]=Creouse unha aplicación salvapantallas en %{dest} -Comment[hu]=Létrejött egy alap képernyővédő program itt: %{dest} -Comment[it]=È stata creata un'applicazione salvaschermo in %{dest} -Comment[ja]=スクリーンセーバーアプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Pausschirm opstellt -Comment[ne]=स्क्रिनसेभर अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een schermbeveiligingstoepassing is aangemaakt in %{dest} -Comment[pl]=Program wygaszacza ekranu został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação protectora do ecrã em %{dest} -Comment[pt_BR]=Foi criada uma aplicação protectora do ecrã em %{dest} -Comment[ru]=Приложение хранителя экрана создано в %{dest} -Comment[sk]=Aplikácia šetriča obrazovky bola vytvorená v %{dest} -Comment[sl]=Program ohranjevalnika zaslona je bil ustvarjen v %{dest} -Comment[sr]=Програм чувара екрана направљен је у %{dest} -Comment[sr@Latn]=Program čuvara ekrana napravljen je u %{dest} -Comment[sv]=Ett skärmsläckarprogram skapades i %{dest} -Comment[tr]=Bir ekran koruyucusu uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了屏幕保护应用程序 -Comment[zh_TW]=一個螢幕保護程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdevlang/CMakeLists.txt b/languages/cpp/app_templates/tdevlang/CMakeLists.txt deleted file mode 100644 index a5768a94..00000000 --- a/languages/cpp/app_templates/tdevlang/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_custom_target( tdevlang.tar.gz ALL - COMMAND tar zcf tdevlang.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - src-Makefile.am tdevlang_part.cpp tdevlang_part.h - tdevlang.rc tdevlang.desktop app.tdevelop - tdevlang-configure.in.in README.dox -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdevlang.tar.gz tdevlang.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdevlang.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdevlang/Makefile.am b/languages/cpp/app_templates/tdevlang/Makefile.am deleted file mode 100644 index d33ab103..00000000 --- a/languages/cpp/app_templates/tdevlang/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -dataFiles = src-Makefile.am tdevlang_part.cpp tdevlang_part.h tdevlang.rc \ - tdevlang.desktop app.tdevelop tdevlang-configure.in.in README.dox -templateName = tdevlang - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(templateName).tar.gz: ${dataFiles} - $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} - $(GZIP_COMMAND) -f9 $(templateName).tar - -archivedir = ${appwizarddatadir} -archive_DATA = $(templateName).tar.gz ${templateName}.png - -CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/cpp/app_templates/tdevlang/README.dox b/languages/cpp/app_templates/tdevlang/README.dox deleted file mode 100644 index 7069f3a5..00000000 --- a/languages/cpp/app_templates/tdevlang/README.dox +++ /dev/null @@ -1,55 +0,0 @@ -/** \class %{APPNAME} -Put a brief description here, the brief description ends at the first dot. -Put a more detailed description of your part in these lines. It can span -over several lines. You can even use some html commands in these lines like: -This is code, html links link text, -and images. - -\authors %{AUTHOR} -\authors 2nd author full name -... -\authors nth author full name - -\maintainer %{AUTHOR} -\maintainer 2nd maintainer full name -... -\maintainer nth maintainer full name - -\feature Describe the first feature -\feature Describe the second feature -... -\feature Describe the last feature - -\bug bugs in -YOUR_COMPONENT_NAME at Bugzilla database -\bug Describe a the 1st bug that you know of, but probably hasn't been reported yet. -.. -\bug Describe a the nth bug that you know of, but probably hasn't been reported yet. - -\requirement Describe a the 1st requirement of your part. -\requirement Describe a the 2nd requirement of your part. -... -\requirement Describe a the nth requirement of your part. - -\todo Describe a the 1st TODO of your part. -\todo Describe a the 2nd TODO of your part. -... -\todo Describe a the nth TODO of your part. - -\faq First frequenly asked question about your part ? Answer. -\faq Second frequenly asked question about your part ? Answer. -... -\faq Last frequenly asked question about your part ? Answer. - -\note First note text. -\note Second note text. -... -\note Last note text. - -\warning First warning text. -\warning Second warning text. -... -\warning Last warning text. - -*/ diff --git a/languages/cpp/app_templates/tdevlang/app.tdevelop b/languages/cpp/app_templates/tdevlang/app.tdevelop deleted file mode 100644 index d6648708..00000000 --- a/languages/cpp/app_templates/tdevlang/app.tdevelop +++ /dev/null @@ -1,115 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - C++ - Code - Qt - TDE - KDevelop - - - - - 3 - true - 3 - EmbeddedTDevDesigner - - - - - - src/%{APPNAMELC} - - - src/%{APPNAMELC} - - - - optimized - kdevgccoptions - kdevgppoptions - kdevg77options - -O2 -g0 - - - --enable-debug=full - debug - kdevgccoptions - kdevgppoptions - kdevg77options - -O0 -g3 - - - - - - - - - - - - - - - ada - ada_bugs_gcc - bash - bash_bugs - clanlib - w3c-dom-level2-html - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - ruby - ruby_bugs - sdl - w3c-svg - sw - w3c-uaag10 - wxwidgets_bugs - - - qmake User Guide - - - - - libtool - - - - - - - - - - - - - Doxygen Documentation Collection - %{APPNAMELC}.tag - - - diff --git a/languages/cpp/app_templates/tdevlang/src-Makefile.am b/languages/cpp/app_templates/tdevlang/src-Makefile.am deleted file mode 100644 index 6de535df..00000000 --- a/languages/cpp/app_templates/tdevlang/src-Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -AM_CPPFLAGS = -I$(kde_includes)/tdevelop/interfaces -I$(kde_includes)/tdevelop/util -I$(kde_includes)/kinterfacedesigner $(all_includes) - -kde_module_LTLIBRARIES = libtdev%{APPNAMELC}.la -libtdev%{APPNAMELC}_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) -libtdev%{APPNAMELC}_la_LIBADD = -ltdevelop -libtdev%{APPNAMELC}_la_SOURCES = %{APPNAMELC}_part.cpp - -METASOURCES = AUTO - -servicedir = $(kde_servicesdir) -service_DATA = kdev%{APPNAMELC}.desktop - -rcdir = $(kde_datadir)/kdev%{APPNAMELC} -rc_DATA = kdev%{APPNAMELC}.rc diff --git a/languages/cpp/app_templates/tdevlang/tdevlang-configure.in.in b/languages/cpp/app_templates/tdevlang/tdevlang-configure.in.in deleted file mode 100644 index a7e792f2..00000000 --- a/languages/cpp/app_templates/tdevlang/tdevlang-configure.in.in +++ /dev/null @@ -1,10 +0,0 @@ -#MIN_CONFIG(3.0.0) - -AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION}) -AC_C_BIGENDIAN -AC_CHECK_TDEMAXPATHLEN - -KDE_CHECK_HEADERS([tdevelop/tdevcore.h]) -KDE_CHECK_LIB([tdevelop],main, - [LIBTDEVELOP="-ltdevelop"]) -AC_SUBST(LIBTDEVELOP) diff --git a/languages/cpp/app_templates/tdevlang/tdevlang.desktop b/languages/cpp/app_templates/tdevlang/tdevlang.desktop deleted file mode 100644 index 78fac402..00000000 --- a/languages/cpp/app_templates/tdevlang/tdevlang.desktop +++ /dev/null @@ -1,14 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=%{APPNAME} -Comment[pt]=%{APPNAME$} -Name=KDev%{APPNAME} -Name[nds]=KDev%{ProgNaam} -Name[sv]=TDevelop %{APPNAME} -Name[ta]=கெடெவ்%{APPNAME} -Icon=tdevelop -ServiceTypes=TDevelop/LanguageSupport -X-TDevelop-Language=ChangeMe -X-TDE-Library=libtdev%{APPNAMELC} -X-TDevelop-Version=3 diff --git a/languages/cpp/app_templates/tdevlang/tdevlang.png b/languages/cpp/app_templates/tdevlang/tdevlang.png deleted file mode 100644 index 840a953c..00000000 Binary files a/languages/cpp/app_templates/tdevlang/tdevlang.png and /dev/null differ diff --git a/languages/cpp/app_templates/tdevlang/tdevlang.rc b/languages/cpp/app_templates/tdevlang/tdevlang.rc deleted file mode 100644 index b4e153fa..00000000 --- a/languages/cpp/app_templates/tdevlang/tdevlang.rc +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/languages/cpp/app_templates/tdevlang/tdevlang.tdevtemplate b/languages/cpp/app_templates/tdevlang/tdevlang.tdevtemplate deleted file mode 100644 index 8692af7e..00000000 --- a/languages/cpp/app_templates/tdevlang/tdevlang.tdevtemplate +++ /dev/null @@ -1,157 +0,0 @@ -# TDE Config File -[General] -Name=TDevelop Language Support Plugin (Standalone build) -Name[ca]=Connector per al suport de llenguatge a TDevelop (de construcció aïllada) -Name[da]=TDevelop plugin for sprogstøttet (alenestående bygning) -Name[de]=TDevelop-Modul für Sprachunterstützung (Unabhängige Erstellung) -Name[el]=Πρόσθετο υποστήριξης γλώσσας του TDevelop (αυτόνομη κατασκευή) -Name[es]=Complemento de implementación de lenguaje para TDevelop (construcción independiente) -Name[et]=TDevelopi keeletoetuse plugin (autonoomne) -Name[eu]=TDevelop-en lengoaien euskarrien interfazea (eraikuntza autonomoak) -Name[fa]=وصلۀ پشتیبانی زبان TDevelop )ساخت خوداتکا( -Name[fr]=Module externe de prise en charge de langage de TDevelop (construction autonome) -Name[ga]=Breiseán Tacaíochta Teanga le haghaidh TDevelop (Tógáil Shaorsheasaimh) -Name[gl]=Extensión de soporte de linguaxes para TDevelop (compilación independente) -Name[hu]=TDevelop nyelvtámogató modul (önálló) -Name[it]=Plugin di supporto per linguaggio di TDevelop (compilazione indipendente) -Name[ja]=TDevelop 言語サポートプラグイン (スタンダローンビルド) -Name[nds]=TDevelop-Moduul för Spraakünnerstütten (Enkelprogramm) -Name[ne]=केडीई विकास भाषा समर्थन प्लगइन (स्ट्यान्डअलोन निर्माण) -Name[nl]=TDEvelop Taalondersteuning Plugin (Standalone build) -Name[pl]=Wtyczka TDevelopa do obsługi języka (budowana oddzielnie) -Name[pt]='Plugin' de Suporte a Linguagens do TDevelop (compilação autónoma) -Name[pt_BR]='Plugin' de Suporte a Linguagens do TDevelop (compilação autónoma) -Name[ru]=Интерфейс языковой поддержки для TDevelop (внешний) -Name[sk]=TDevelop modul pre jazykovú podporu (samostatný build) -Name[sl]=Vstavek jezikovne podpore za TDevelop (samostojna izgradnja) -Name[sr]=TDevelop-ов интерфејс за језичку подршку (самостална градња) -Name[sr@Latn]=TDevelop-ov interfejs za jezičku podršku (samostalna gradnja) -Name[sv]=TDevelop-insticksprogram för språkstöd (att bygga fristående) -Name[tr]=TDevelop Dil Desteği Eklentisi (Kendi başına çalışabilen kurulum) -Name[zh_CN]=TDevelop 语言支持插件(独立编译) -Name[zh_TW]=TDevelop 語言支援外掛程式(單獨建立) -Category=C++/TDevelop/ -Comment=This generates a language support plugin for TDevelop, to be built outside of the TDevelop source tree. -Comment[ca]=Genera un connector per al suport de llenguatge a TDevelop, per a que es construeixi fora de l'arbre de fonts de TDevelop. -Comment[da]=Dette genererer en sprogstøtte-plugin for TDevelop, der skal bygges udenfor TDevelop's kildetræ. -Comment[de]=Hiermit wird ein Sprachunterstützungsmodul für TDevelop generiert, das außerhalb des Quelltextbaumes von TDevelop erstellt wird. -Comment[el]=Αυτό δημιουργεί ένα πρόσθετο υποστήριξης γλώσσας για το TDevelop, για την κατασκευή του έξω από το δέντρο πηγαίου κώδικα του TDevelop. -Comment[es]=Genera un complemento de implementación de lenguaje para TDevelop, para ser construido fuera del árbol de código fuente de TDevelop. -Comment[et]=TDevelopi keeletoetuse plugina loomine, mida saab ehitada väljaspool TDevelopi lähtekoodipuud. -Comment[eu]=Honek TDevelop-en lengoai-euskarrirako plugin bat sortzen du, TDevelop-en iturburu zuhaitzetik at eraikitzeko. -Comment[fa]=یک وصلۀ پشتیبان برای TDevelop تولید می‌کند، تا در بیرون درخت منبع TDevelop ساخته شود. -Comment[fr]=Génère un module externe de prise en charge de langage pour TDevelop, à construire en dehors de l'arborescence des sources de TDevelop. -Comment[gl]=Isto xera unha extensión de soporte de linguaxes para TDevelop que se compilará fóra da árbore de código de TDevelop. -Comment[hu]=Létrehoz egy nyelvtámogató modult a TDevelophoz, mely a TDevelopos forráskönyvtáron kívül fordítható le. -Comment[it]=Genera un plugin di supporto per linguaggio per TDevelop, deve essere compilato fuori dell'albero sorgente di TDevelop. -Comment[nds]=Dit stellt en Spraakünnerstütten-Moduul för TDevelop op, dat buten den TDevelop-Bornboom kompileert warrt. -Comment[ne]=यसले केडीई विकासका लागि केडीई विकास स्रोत ट्रीको बाहिर निर्माण गर्न, भाषा समर्थन प्लगइन उत्पन्न गर्दछ । -Comment[nl]=Dit genereert een taalondersteuningsplugin voor TDEvelop, welke buiten de TDevelop sourcetree wordt gebouwd. -Comment[pl]=Generuje wtyczkę do obsługi języka w TDevelopie. Wtyczka jest budowana poza drzewem źródłowym TDevelopa. -Comment[pt]=Isto gera um 'plugin' de suporte de linguagens para o TDevelop, que possa ser compilado fora da árvore de código do TDevelop. -Comment[pt_BR]=Isto gera um 'plugin' de suporte de linguagens para o TDevelop, que possa ser compilado fora da árvore de código do TDevelop. -Comment[ru]=Создание интерфейса языковой поддержки для TDevelop со сборкой вне исходного кода TDevelop. -Comment[sk]=Vygeneruje modul pre jazykovú podporu pre TDevelop, tak aby ho bolo možné kompilovať mimo zdrojového stromu TDevelop. -Comment[sr]=Ово прави прикључак за језичку подршку за TDevelop, који се гради ван TDevelop-овог изворног стабла. -Comment[sr@Latn]=Ovo pravi priključak za jezičku podršku za TDevelop, koji se gradi van TDevelop-ovog izvornog stabla. -Comment[sv]=Detta skapar ett TDevelop-insticksprogram för språkstöd, att bygga utanför TDevelops källkodsträd. -Comment[tr]=Bu TDevelop için, TDevelop kaynak ağacının dışında olacak, bir dil desteği eklentisi yaratır. -Comment[zh_CN]=这将生成 TDevelop 的语言支持插件,可以在 TDevelop 源代码树之外编译。 -Comment[zh_TW]=產生一個 TDevelop 語言支援外掛程式,建立在 TDevelop 程式源碼樹之外。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}_part.cpp -Archive=tdevlang.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE5] -Type=install -Source=%{src}/tdevlang-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE6] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE7] -Type=install -Source=%{src}/tdevlang_part.cpp -Dest=%{dest}/src/%{APPNAMELC}_part.cpp - -[FILE8] -Type=install -Source=%{src}/tdevlang_part.h -Dest=%{dest}/src/%{APPNAMELC}_part.h - -[FILE9] -Type=install -EscapeXML=true -Source=%{src}/tdevlang.rc -Dest=%{dest}/src/kdev%{APPNAMELC}.rc - -[FILE10] -Type=install -Source=%{src}/tdevlang.desktop -Dest=%{dest}/src/kdev%{APPNAMELC}.desktop - -[FILE11] -Type=install -Source=%{src}/README.dox -Dest=%{dest}/src/README.dox - -[MSG] -Type=message -Comment=A language plugin for TDevelop for standalone build was created in %{dest} -Comment[ca]=Un connector per a llenguatge a TDevelop i de construcció aïllada ha estat creat en %{dest} -Comment[da]=Et sprog-plugin for TDevelop for alenestående bygning blev oprettet i %{dest} -Comment[de]=Ein Sprachunterstützungsmodul für TDevelop (unabhängige Erstellung) wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο γλώσσας για το TDevelop για αυτόνομη κατασκευή δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento de lenguaje para TDevelop de construcción independiente ha sido creado en %{dest} -Comment[et]=TDevelopi autonoomne keeleplugin loodi asukohta %{dest} -Comment[eu]=TDevelop-en hizkuntza plugin autonomo bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ زبان برای TDevelop جهت ساخت خوداتکا در %{dest} ایجاد شد -Comment[fr]=Un module externe de langage pour TDevelop à construire de façon autonome a été créé dans %{dest} -Comment[gl]=Creouse unha extensión de linguaxe para TDevelop a compilar de forma independente en %{dest} -Comment[hu]=Létrejött egy TDevelopos nyelvtámogató modul (önálló lefordításra) itt: %{dest} -Comment[it]=È stato creato un plugin di linguaggio per TDevelop per compilazione indipendente %{dest} -Comment[nds]=In %{dest} wöör en Spraakünnerstütten-Moduul för TDevelop (Enkelprogramm) opstellt -Comment[ne]=स्ट्यान्डअलोन निर्माण गर्न केडीई विकासका लागि भाषा प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een taalplugin voor TDevelop voor standalone build is aangemaakt in %{dest} -Comment[pl]=Wtyczka języka dla TDevelopa do budowy oddzielnie została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' de linguagens de compilação autónoma para o TDevelop em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' de linguagens de compilação autónoma para o TDevelop em %{dest} -Comment[ru]=Внешний интерфейс языковой поддержки для TDevelop создан в %{dest} -Comment[sk]=Modul pre jazykovú podporu pre TDevelop bol vutvorený v %{dest} -Comment[sr]=Језички прикључак за TDevelop за самосталну градњу направљен је у %{dest} -Comment[sr@Latn]=Jezički priključak za TDevelop za samostalnu gradnju napravljen je u %{dest} -Comment[sv]=Ett TDevelop-insticksprogram för språkstöd att bygga fristående skapades i %{dest} -Comment[tr]=Kendi başına çalışabilen bir TDevelop dil eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个独立编译的 TDevelop 语言插件 -Comment[zh_TW]=一個單獨建立的 TDevelop 語言外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdevlang/tdevlang_part.cpp b/languages/cpp/app_templates/tdevlang/tdevlang_part.cpp deleted file mode 100644 index 488f494a..00000000 --- a/languages/cpp/app_templates/tdevlang/tdevlang_part.cpp +++ /dev/null @@ -1,154 +0,0 @@ -%{CPP_TEMPLATE} - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//#include "%{APPNAMELC}_widget.h" -#include "%{APPNAMELC}_part.h" - -typedef KGenericFactory<%{APPNAME}Part> %{APPNAME}Factory; -K_EXPORT_COMPONENT_FACTORY( libtdev%{APPNAMELC}, %{APPNAME}Factory( "tdev%{APPNAMELC}" ) ); -static const TDevPluginInfo data("tdev%{APPNAMELC}"); - -%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList& ) -: TDevLanguageSupport(&data, parent, name ? name : "%{APPNAME}Part" ) -{ - setInstance(%{APPNAME}Factory::instance()); - setXMLFile("tdevlang_%{APPNAMELC}.rc"); - - - m_build = new TDEAction( i18n("&Run"), "exec",Key_F9,this, TQT_SLOT(slotRun()),actionCollection(), "build_execute" ); - - kdDebug() << "Creating %{APPNAMELC} Part" << endl; - - connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), - this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); - connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); - connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); - connect( partController(), TQT_SIGNAL(savedFile(const KURL&)), this, TQT_SLOT(savedFile(const KURL&)) ); - connect(partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), - this, TQT_SLOT(slotActivePartChanged(KParts::Part *))); -} - - -%{APPNAME}Part::~%{APPNAME}Part() -{ - delete m_build; -} - -TDevLanguageSupport::Features %{APPNAME}Part::features() -{ - return Features(Variables | Functions); -} -KMimeType::List %{APPNAME}Part::mimeTypes() -{ - KMimeType::List list; - - KMimeType::Ptr mime = KMimeType::mimeType( "application/x-shellscript" ); - if( mime ) - list << mime; - - return list; -} -void %{APPNAME}Part::slotRun() -{ - // Execute the application here. -} -void %{APPNAME}Part::projectConfigWidget(KDialogBase *dlg) -{ - Q_UNUSED( dlg ); - // Create your config dialog here. -} -void %{APPNAME}Part::projectOpened() -{ - kdDebug(9014) << "projectOpened()" << endl; - - connect( project(), TQT_SIGNAL(addedFilesToProject(const TQStringList &)), - this, TQT_SLOT(addedFilesToProject(const TQStringList &)) ); - connect( project(), TQT_SIGNAL(removedFilesFromProject(const TQStringList &)), - this, TQT_SLOT(removedFilesFromProject(const TQStringList &)) ); - - // We want to parse only after all components have been - // properly initialized - TQTimer::singleShot(0, this, TQT_SLOT(parse())); -} -void %{APPNAME}Part::projectClosed() -{ - -} -void %{APPNAME}Part::savedFile(const KURL &fileName) -{ - - - if (project()->allFiles().contains(fileName.path().mid ( project()->projectDirectory().length() + 1 ))) - { - kdDebug(9014) << "parse file " << fileName.path() << endl; - emit addedSourceInfo( fileName.path() ); - } -} -void %{APPNAME}Part::addedFilesToProject(const TQStringList &fileList) -{ - kdDebug(9014) << "addedFilesToProject()" << endl; - - TQStringList::ConstIterator it; - - for ( it = fileList.begin(); it != fileList.end(); ++it ) - { - kdDebug(9014) << "maybe parse " << project()->projectDirectory() + "/" + ( *it ) << endl; - } - - emit updatedSourceInfo(); -} -void %{APPNAME}Part::removedFilesFromProject(const TQStringList &fileList) -{ - - - TQStringList::ConstIterator it; - - for ( it = fileList.begin(); it != fileList.end(); ++it ) - { - TQString fileName = project()->projectDirectory() + "/" + ( *it ); - if( codeModel()->hasFile(fileName) ) - { - kdDebug(9014) << "removed " << fileName << endl; - emit aboutToRemoveSourceInfo( fileName ); - codeModel()->removeFile( codeModel()->fileByName(fileName) ); - } - } - -} -void %{APPNAME}Part::parse() -{ - kdDebug(9014) << "initialParse()" << endl; - - if (project()) - { - kapp->setOverrideCursor(waitCursor); - TQStringList files = project()->allFiles(); - for (TQStringList::Iterator it = files.begin(); it != files.end() ;++it) - { - kdDebug(9014) << "maybe parse " << project()->projectDirectory() + "/" + (*it) << endl; - } - emit updatedSourceInfo(); - kapp->restoreOverrideCursor(); - } else { - kdDebug(9014) << "No project" << endl; - } -} -void %{APPNAME}Part::slotActivePartChanged(KParts::Part *part) -{ - kdDebug() << "Changeing active part..." << endl; -} - -#include "%{APPNAMELC}_part.moc" diff --git a/languages/cpp/app_templates/tdevlang/tdevlang_part.h b/languages/cpp/app_templates/tdevlang/tdevlang_part.h deleted file mode 100644 index 9b0f2513..00000000 --- a/languages/cpp/app_templates/tdevlang/tdevlang_part.h +++ /dev/null @@ -1,44 +0,0 @@ -%{H_TEMPLATE} - -#ifndef __TDEVPART_%{APPNAMEUC}_H__ -#define __TDEVPART_%{APPNAMEUC}_H__ - - -#include -#include -#include -#include -#include - -class TDEAction; - -/* - Please read the README.dox file for more info about this part - */ -class %{APPNAME}Part : public TDevLanguageSupport -{ - Q_OBJECT - - public: - %{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &); - ~%{APPNAME}Part(); - protected: - virtual Features features(); - virtual KMimeType::List mimeTypes(); - - private slots: - void slotRun(); - void projectConfigWidget(KDialogBase *dlg); - void projectOpened(); - void projectClosed(); - void savedFile(const KURL &fileName); - void addedFilesToProject(const TQStringList &fileList); - void removedFilesFromProject(const TQStringList &fileList); - void parse(); - void slotActivePartChanged(KParts::Part *part); - private: - TDEAction *m_build; -}; - - -#endif diff --git a/languages/cpp/app_templates/tdevpart/CMakeLists.txt b/languages/cpp/app_templates/tdevpart/CMakeLists.txt deleted file mode 100644 index e952ce8a..00000000 --- a/languages/cpp/app_templates/tdevpart/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_custom_target( tdevpart.tar.gz ALL - COMMAND tar zcf tdevpart.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - src-Makefile.am tdevpart_part.cpp tdevpart_part.h - tdevpart_widget.h tdevpart_widget.cpp tdevpart_part.rc - tdevpart.desktop app.tdevelop README.dox - globalconfigbase.ui globalconfig.h globalconfig.cpp - projectconfigbase.ui projectconfig.h projectconfig.cpp -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdevpart.tar.gz tdevpart.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdevpart.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdevpart/Makefile.am b/languages/cpp/app_templates/tdevpart/Makefile.am deleted file mode 100644 index 6aa1f606..00000000 --- a/languages/cpp/app_templates/tdevpart/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -dataFiles = src-Makefile.am tdevpart_part.cpp tdevpart_part.h \ - tdevpart_widget.h tdevpart_widget.cpp tdevpart_part.rc \ - tdevpart.desktop app.tdevelop README.dox globalconfigbase.ui globalconfig.h \ - globalconfig.cpp projectconfigbase.ui projectconfig.h projectconfig.cpp -templateName = tdevpart - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(templateName).tar.gz: ${dataFiles} - $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} - $(GZIP_COMMAND) -f9 $(templateName).tar - -archivedir = ${appwizarddatadir} -archive_DATA = $(templateName).tar.gz ${templateName}.png - -CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/cpp/app_templates/tdevpart/README.dox b/languages/cpp/app_templates/tdevpart/README.dox deleted file mode 100644 index 7069f3a5..00000000 --- a/languages/cpp/app_templates/tdevpart/README.dox +++ /dev/null @@ -1,55 +0,0 @@ -/** \class %{APPNAME} -Put a brief description here, the brief description ends at the first dot. -Put a more detailed description of your part in these lines. It can span -over several lines. You can even use some html commands in these lines like: -This is code, html links link text, -and images. - -\authors %{AUTHOR} -\authors 2nd author full name -... -\authors nth author full name - -\maintainer %{AUTHOR} -\maintainer 2nd maintainer full name -... -\maintainer nth maintainer full name - -\feature Describe the first feature -\feature Describe the second feature -... -\feature Describe the last feature - -\bug bugs in -YOUR_COMPONENT_NAME at Bugzilla database -\bug Describe a the 1st bug that you know of, but probably hasn't been reported yet. -.. -\bug Describe a the nth bug that you know of, but probably hasn't been reported yet. - -\requirement Describe a the 1st requirement of your part. -\requirement Describe a the 2nd requirement of your part. -... -\requirement Describe a the nth requirement of your part. - -\todo Describe a the 1st TODO of your part. -\todo Describe a the 2nd TODO of your part. -... -\todo Describe a the nth TODO of your part. - -\faq First frequenly asked question about your part ? Answer. -\faq Second frequenly asked question about your part ? Answer. -... -\faq Last frequenly asked question about your part ? Answer. - -\note First note text. -\note Second note text. -... -\note Last note text. - -\warning First warning text. -\warning Second warning text. -... -\warning Last warning text. - -*/ diff --git a/languages/cpp/app_templates/tdevpart/app.tdevelop b/languages/cpp/app_templates/tdevpart/app.tdevelop deleted file mode 100644 index 473da16e..00000000 --- a/languages/cpp/app_templates/tdevpart/app.tdevelop +++ /dev/null @@ -1,116 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - C++ - Code - Qt - TDE - KDevelop - - - - - 3 - true - 3 - EmbeddedTDevDesigner - - - - - - src/%{APPNAMELC} - debug - - - src/%{APPNAMELC} - - - - optimized - kdevgccoptions - kdevgppoptions - kdevg77options - -O2 -g0 - - - --enable-debug=full - debug - kdevgccoptions - kdevgppoptions - kdevg77options - -O0 -g3 - - - - - - - - - - - - - - - ada - ada_bugs_gcc - bash - bash_bugs - clanlib - w3c-dom-level2-html - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - ruby - ruby_bugs - sdl - w3c-svg - sw - w3c-uaag10 - wxwidgets_bugs - - - qmake User Guide - - - - - libtool - - - - - - - - - - - - - Doxygen Documentation Collection - %{APPNAMELC}.tag - - - diff --git a/languages/cpp/app_templates/tdevpart/globalconfig.cpp b/languages/cpp/app_templates/tdevpart/globalconfig.cpp deleted file mode 100644 index cddf3e7e..00000000 --- a/languages/cpp/app_templates/tdevpart/globalconfig.cpp +++ /dev/null @@ -1,15 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}globalconfig.h" - -#include "%{APPNAMELC}part.h" - -%{APPNAME}GlobalConfig::%{APPNAME}GlobalConfig(%{APPNAME}Part *part, TQWidget *parent, const char *name) - : %{APPNAME}GlobalConfigBase(parent, name), m_part(part) -{ -} - -void %{APPNAME}GlobalConfig::accept() -{ -} - -#include "%{APPNAMELC}globalconfig.moc" diff --git a/languages/cpp/app_templates/tdevpart/globalconfig.h b/languages/cpp/app_templates/tdevpart/globalconfig.h deleted file mode 100644 index 723dbae2..00000000 --- a/languages/cpp/app_templates/tdevpart/globalconfig.h +++ /dev/null @@ -1,23 +0,0 @@ -%{H_TEMPLATE} -#ifndef %{APPNAMEUC}_GLOBAL_CONFIG_H -#define %{APPNAMEUC}_GLOBAL_CONFIG_H - -#include "%{APPNAMELC}globalconfigbase.h" - -class %{APPNAME}Part; - -class %{APPNAME}GlobalConfig: public %{APPNAME}GlobalConfigBase -{ - Q_OBJECT - -public: - %{APPNAME}GlobalConfig(%{APPNAME}Part *part, TQWidget *parent = 0, const char *name = 0); - -public slots: - void accept(); - -private: - %{APPNAME}Part *m_part; -}; - -#endif diff --git a/languages/cpp/app_templates/tdevpart/globalconfigbase.ui b/languages/cpp/app_templates/tdevpart/globalconfigbase.ui deleted file mode 100644 index 588f9dc9..00000000 --- a/languages/cpp/app_templates/tdevpart/globalconfigbase.ui +++ /dev/null @@ -1,20 +0,0 @@ - -%{APPNAME}GlobalConfigBase - - - %{APPNAME}GlobalConfigBase - - - - 0 - 0 - 600 - 480 - - - - %{APPNAME} - - - - diff --git a/languages/cpp/app_templates/tdevpart/projectconfig.cpp b/languages/cpp/app_templates/tdevpart/projectconfig.cpp deleted file mode 100644 index 42a9f3e7..00000000 --- a/languages/cpp/app_templates/tdevpart/projectconfig.cpp +++ /dev/null @@ -1,15 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}projectconfig.h" - -#include "%{APPNAMELC}part.h" - -%{APPNAME}ProjectConfig::%{APPNAME}ProjectConfig(%{APPNAME}Part *part, TQWidget *parent, const char *name) - : %{APPNAME}ProjectConfigBase(parent, name), m_part(part) -{ -} - -void %{APPNAME}ProjectConfig::accept() -{ -} - -#include "%{APPNAMELC}projectconfig.moc" diff --git a/languages/cpp/app_templates/tdevpart/projectconfig.h b/languages/cpp/app_templates/tdevpart/projectconfig.h deleted file mode 100644 index 49d4f089..00000000 --- a/languages/cpp/app_templates/tdevpart/projectconfig.h +++ /dev/null @@ -1,23 +0,0 @@ -%{H_TEMPLATE} -#ifndef %{APPNAMEUC}_PROJECT_CONFIG_H -#define %{APPNAMEUC}_PROJECT_CONFIG_H - -#include "%{APPNAMELC}projectconfigbase.h" - -class %{APPNAME}Part; - -class %{APPNAME}ProjectConfig: public %{APPNAME}ProjectConfigBase -{ - Q_OBJECT - -public: - %{APPNAME}ProjectConfig(%{APPNAME}Part *part, TQWidget *parent = 0, const char *name = 0); - -public slots: - void accept(); - -private: - %{APPNAME}Part *m_part; -}; - -#endif diff --git a/languages/cpp/app_templates/tdevpart/projectconfigbase.ui b/languages/cpp/app_templates/tdevpart/projectconfigbase.ui deleted file mode 100644 index 30849e54..00000000 --- a/languages/cpp/app_templates/tdevpart/projectconfigbase.ui +++ /dev/null @@ -1,20 +0,0 @@ - -%{APPNAME}ProjectConfigBase - - - %{APPNAME}ProjectConfigBase - - - - 0 - 0 - 600 - 480 - - - - %{APPNAME} - - - - diff --git a/languages/cpp/app_templates/tdevpart/src-Makefile.am b/languages/cpp/app_templates/tdevpart/src-Makefile.am deleted file mode 100644 index e082adff..00000000 --- a/languages/cpp/app_templates/tdevpart/src-Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) - -kde_module_LTLIBRARIES = libtdev%{APPNAMELC}.la -libtdev%{APPNAMELC}_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) $(KDE_PLUGIN) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) -libtdev%{APPNAMELC}_la_LIBADD = $(top_builddir)/lib/libtdevelop.la - -libtdev%{APPNAMELC}_la_SOURCES = %{APPNAMELC}part.cpp %{APPNAMELC}widget.cpp \ - %{APPNAMELC}globalconfigbase.ui %{APPNAMELC}globalconfig.cpp \ - %{APPNAMELC}projectconfigbase.ui %{APPNAMELC}projectconfig.cpp - -METASOURCES = AUTO - -appsharedir = $(kde_datadir)/kdev%{APPNAMELC} -appshare_DATA = - -servicedir = $(kde_servicesdir) -service_DATA = kdev%{APPNAMELC}.desktop - -rcdir = $(kde_datadir)/kdev%{APPNAMELC} -rc_DATA = kdev%{APPNAMELC}.rc diff --git a/languages/cpp/app_templates/tdevpart/tdevpart.desktop b/languages/cpp/app_templates/tdevpart/tdevpart.desktop deleted file mode 100644 index c3eb6a81..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart.desktop +++ /dev/null @@ -1,83 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Name=KDev%{APPNAME} -Name[nds]=KDev%{ProgNaam} -Name[sv]=TDevelop %{APPNAME} -Name[ta]=கெடெவ்%{APPNAME} -GenericName=%{APPNAME} Plugin -GenericName[br]=Lugent %{APPNAME} -GenericName[ca]=Connector per a %{APPNAME} -GenericName[da]=%{APPNAME} plugin -GenericName[de]=%{APPNAME}-Modul -GenericName[el]=Πρόσθετο %{APPNAME} -GenericName[es]=Complemento %{APPNAME} -GenericName[et]=%{APPNAME} plugin -GenericName[eu]=%{APPNAME} plugina -GenericName[fa]=وصلۀ %{APPNAME} -GenericName[fr]=Module externe pour %{APPNAME} -GenericName[ga]=Breiseán %{APPNAME} -GenericName[gl]=Extensión %{APPNAME} -GenericName[hu]=%{APPNAME}-bővítőmodul -GenericName[it]=Plugin %{APPNAME} -GenericName[ja]=%{APPNAME} プラグイン -GenericName[nds]=%{APPNAME}-Moduul -GenericName[ne]=%{APPNAME} प्लगइन -GenericName[nl]=%{APPNAME}-plugin -GenericName[pl]=Wtyczka %{APPNAME} -GenericName[pt]='Plugin' %{APPNAME} -GenericName[pt_BR]=Plug-in do %{APPNAME} -GenericName[ru]=Модуль %{APPNAME} -GenericName[sk]=%{APPNAME} modul -GenericName[sl]=Vstavek za %{APPNAME} -GenericName[sr]=%{APPNAME} прикључак -GenericName[sr@Latn]=%{APPNAME} priključak -GenericName[sv]=%{APPNAME} insticksprogram -GenericName[tr]=%{APPNAME} Eklentisi -GenericName[zh_CN]=%{APPNAME} 插件 -GenericName[zh_TW]=%{APPNAME} 外掛程式 -Comment=%{APPNAME} Description -Comment[br]=Deskrivadur %{APPNAME} -Comment[ca]=Descripció per a %{APPNAME} -Comment[da]=%{APPNAME} beskrivelse -Comment[de]=%{APPNAME} Beschreibung -Comment[el]=Περιγραφή %{APPNAME} -Comment[es]=Descripción de %{APPNAME} -Comment[et]=%{APPNAME} kirjeldus -Comment[eu]=%{APPNAME} deskribapena -Comment[fa]=توصیف %{APPNAME} -Comment[fr]=Description pour %{APPNAME} -Comment[ga]=Cur Síos %{APPNAME} -Comment[gl]=Descripción de %{APPNAME} -Comment[hu]=%{APPNAME} leírása -Comment[it]=Descrizione %{APPNAME} -Comment[ja]=%{APPNAME} 概説 -Comment[nds]=%{APPNAME}-Beschrieven -Comment[ne]=%{APPNAME} वर्णन -Comment[nl]=%{APPNAME} omschrijving -Comment[pl]=Opis %{APPNAME} -Comment[pt]=Descrição de %{APPNAME$} -Comment[pt_BR]=Descrição do %{APPNAME} -Comment[ru]=Описание %{APPNAME} -Comment[sk]=%{APPNAME} popis -Comment[sl]=Opis za %{APPNAME} -Comment[sr]=Опис за %{APPNAME} -Comment[sr@Latn]=Opis za %{APPNAME} -Comment[sv]=%{APPNAME} beskrivning -Comment[tr]=%{APPNAME} Tanımı -Comment[zh_CN]=%{APPNAME} 描述 -Comment[zh_TW]=%{APPNAME} 描述 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin - -X-TDevelop-Plugin-Version=1 -X-TDevelop-Plugin-Homepage= -X-TDevelop-Plugin-BugsEmailAddress=%{EMAIL} -X-TDevelop-Plugin-Copyright=(C) by %{AUTHOR} - -X-TDevelop-Args= - -X-TDevelop-Scope=%{SCOPE} -X-TDE-Library=libtdev%{APPNAMELC} -X-TDevelop-Version=3 -X-TDevelop-Properties=%{PROPS} diff --git a/languages/cpp/app_templates/tdevpart/tdevpart.png b/languages/cpp/app_templates/tdevpart/tdevpart.png deleted file mode 100644 index 840a953c..00000000 Binary files a/languages/cpp/app_templates/tdevpart/tdevpart.png and /dev/null differ diff --git a/languages/cpp/app_templates/tdevpart/tdevpart.tdevtemplate b/languages/cpp/app_templates/tdevpart/tdevpart.tdevtemplate deleted file mode 100644 index 8bdb87e3..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart.tdevtemplate +++ /dev/null @@ -1,242 +0,0 @@ -# TDE Config File -[General] -Name=TDevelop Plugin (TDevelop source tree build) -Name[ca]=Connector per a TDevelop (de construcció a l'arbre de fonts de TDevelop) -Name[da]=TDevelop Plugin (TDevelop kildetræ bygning) -Name[de]=TDevelop-Modul (Erstellung im TDevelop-Quelltextbaum) -Name[el]=Πρόσθετο TDevelop (κατασκευή με το δέντρο πηγαίου κώδικα του TDevelop) -Name[es]=Complemento para TDevelop (construcción en árbol de código fuente de TDevelop) -Name[et]=TDevelopi plugin (Kdevelopi lähtekoodipuus) -Name[eu]=TDevelop plugina (TDevelop-en iturburu zuhaitzean erakitzeko) -Name[fa]=وصلۀ TDevelop )ساخت درخت منبع TDevelop( -Name[fr]=Module externe de TDevelop (construction dans l'arborescence des sources de TDevelop) -Name[gl]=Extensión para TDevelop (compilación na árbore de código de TDevelop) -Name[hu]=TDevelop-bővítőmodul (TDevelopos forráskönyvtáron belül) -Name[it]=Plugin di TDevelop (compila l'albero sorgente di TDevelop) -Name[ja]=TDevelop プラグイン (TDevelop ソースツリービルド) -Name[nds]=TDevelop-Moduul (TDevelop-Bornboomprogramm) -Name[ne]=केडीई विकास प्लगइन (केडीई विकास स्रोत ट्री निर्माण) -Name[nl]=TDevelop-plugin (TDevelop source tree build) -Name[pl]=Wtyczka TDevelopa (budowa w drzewie źródłowym TDevelopa) -Name[pt]='Plugin' do TDevelop (compilação na árvore de código do TDevelop) -Name[pt_BR]='Plugin' do TDevelop (compilação na árvore de código do TDevelop) -Name[ru]=Модуль TDevelop (в исходном коде TDevelop) -Name[sk]=TDevelop modul (TDevelop zdrojový strom build) -Name[sr]=Прикључак за TDevelop (градња у изворном стаблу TDevelop-а) -Name[sr@Latn]=Priključak za TDevelop (gradnja u izvornom stablu TDevelop-a) -Name[sv]=TDevelop-insticksprogram (att bygga i TDevelops källkodsträd) -Name[tr]=TDevelop Eklentisi (TDevelop kaynak ağacı kurulumu) -Name[zh_CN]=TDevelop 插件(TDevelop 源代码树编译) -Name[zh_TW]=TDevelop 外掛程式(TDevelop 程式源碼樹內建立) -Category=C++/TDevelop/ -Comment=This generates a plugin for TDevelop, for building within the TDevelop source tree -Comment[ca]=Genera un connector per a TDevelop, per a que es construeixi en l'arbre de fonts de TDevelop -Comment[da]=Dette genererer et plugin for TDevelop, til at bygges indenfor TDevelop's kildetræ -Comment[de]=Hiermit wird ein Modul für TDevelop erstellt, dessen Erstellung innerhalb des Quelltextbaumes von TDevelop erfolgt. -Comment[el]=Αυτό δημιουργεί ένα πρόσθετο για το TDevelop, για κατασκευή του μέσα στο δέντρο πηγαίου κώδικα του TDevelop -Comment[es]=Genera un complemento para TDevelop, para ser construido en el árbol de código fuente de TDevelop -Comment[et]=TDevelopi plugina loomine, mis ehitatakse TDevelopi lähtekoodipuus. -Comment[eu]=Honek TDevelop-erako plugin bat sortzen du, TDevelop-en iturburu-zuhaitzean eraikitzeko -Comment[fa]=وصله‌ای برای TDevelop، برای ساختن در درخت منبع TDevelop تولید می‌کند -Comment[fr]=Génère un module externe pour TDevelop, à construire dans l'arborescence des sources de TDevelop -Comment[gl]=Isto xera unha extensión para TDevelop que se compilará dentro da árbore de código de TDevelop -Comment[hu]=Létrehoz egy TDevelop-bővítőmodult, mely a TDevelopos forráskönyvtáron belül fordítható le -Comment[it]=Genera un plugin per TDevelop, per compilarlo assieme all'albero sorgente di TDevelop -Comment[nds]=Dit stellt en TDevelop-Moduul för't Kompileren binnen den TDevelop-Bornboom op -Comment[ne]=यसले केडीई विकास स्रोत ट्री भित्र निर्माण गर्न, केडीई विकासका लागि प्लगइन उत्पन्न गर्दछ -Comment[nl]=Dit genereert een plugin voor TDevelop, om te bouwen binnen de TDevelop sourcetree -Comment[pl]=Generuje wtyczkę do TDevelopa, która jest budowana w jego drzewie źródłowym -Comment[pt]=Isto gera um 'plugin' para o TDevelop, para uma compilação dentro da árvore de código do TDevelop -Comment[pt_BR]=Isto gera um 'plugin' para o TDevelop, para uma compilação dentro da árvore de código do TDevelop -Comment[ru]=Создание модуля TDevelop в исходном коде TDevelop -Comment[sk]=Vygeneruje modul pre TDevelop, ktorý sa bude kompilovať v rámci TDevelop zdrojového stromu -Comment[sr]=Ово прави прикључак за TDevelop, за градњу у оквиру TDevelop-овог изворног стабла -Comment[sr@Latn]=Ovo pravi priključak za TDevelop, za gradnju u okviru TDevelop-ovog izvornog stabla -Comment[sv]=Det här skapar ett insticksprogram för TDevelop, att byggas inne i TDevelops källkodsträd. -Comment[tr]=Bu TDevelop için, TDevelop kaynak ağacınında olacak, bir eklenti yaratır. -Comment[zh_CN]=这将生成 TDevelop 的插件,该插件需要与 TDevelop 源代码树一起编译 -Comment[zh_TW]=產生一個 TDevelop 外掛程式,建立於 TDevelop 程式源碼樹內。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}part.cpp -Archive=tdevpart.tar.gz - -[SCOPE] -Type = value -ValueType=QString -Value= SCOPE -Comment= The scope of a plugin (Global, Project, Core) -Comment[ca]= L'àmbit d'un connector (Global, Project, Core) -Comment[da]= Et plugins omfang (Globalt, Projekt, Kerne) -Comment[de]= Gültigkeitsbereich eines Moduls (Global, Projekt, Kern) -Comment[el]= Η εμβέλεια ενός πρόσθετου (Καθολική, Έργο, Πυρήνας) -Comment[es]=El alcance de un complemento (global, proyecto, núcleo) -Comment[et]=Plugina skoop (globaalne, projekt, tuum) -Comment[eu]= Pluginaren barrutia (Globala, Projektua, Nukleoa) -Comment[fa]=دامنۀ یک وصله )سراسری، پروژه، هسته( -Comment[fr]= La portée d'un module externe (globale, projet, core) -Comment[ga]= Scóip an bhreiseáin (Comhchoiteann, Tionscadal, Ceartlár) -Comment[gl]=Ámbito da extensión (Global, Proxecto, Núcleo) -Comment[hu]=A modul hatóköre (globális, projektszintű, alap) -Comment[it]=Il contesto di un plugin (Globale, Progetto, Core) -Comment[nds]= Dat Rebeet vun en Moduul (Globaal, Projekt, Karn) -Comment[ne]= प्लगइनको क्षेत्र (विश्वव्यापी, परियोजना, कोर) -Comment[nl]=Het bereik van een plugin (globaal, project, core) -Comment[pl]=Przynależność wtyczki (globalna, projekt, część główna) -Comment[pt]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) -Comment[pt_BR]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) -Comment[ru]=Тип модуля (Global, Project, Core) -Comment[sk]=Rozsah module (globálny, projektový, jadrový) -Comment[sr]=Опсег прикључка (глобални, пројекат, језгро) -Comment[sr@Latn]=Opseg priključka (globalni, projekat, jezgro) -Comment[sv]=Insticksprogrammets omfattning (Global, Projekt, Kärna) -Comment[tr]=Bir eklentinin alanı (Genel, Proje, İç) -Comment[zh_CN]=插件的范围(全局、工程、核心) -Comment[zh_TW]=外掛程式的範圍(全域、專案、核心) -Default= Global - -[PROPS] -Type = value -ValueType=QString -Value= PROPS -Comment= The list of supported TDevelop properties -Comment[ca]= La llista de propietats suportades del TDevelop -Comment[da]= Listen af understøttede TDevelop-egenskaber -Comment[de]= Die Liste der unterstützten TDevelop-Eigenschaften -Comment[el]= Η λίστα των υποστηριζόμενων ιδιοτήτων του TDevelop -Comment[es]=La lista de propiedades de TDevelop soportadas -Comment[et]= TDevelopi toetatud omaduste nimekiri -Comment[eu]= Onartzen diren TDevelop-en propietateen zerrenda -Comment[fa]=فهرست ویژگیهای پشتیبانی‌شدۀ TDevelop -Comment[fr]= La liste des propriétés de TDevelop prises en charge -Comment[ga]= Liosta d'airíonna TDevelop a dtacaítear leo -Comment[gl]=Lista das propiedades de TDevelop soportadas -Comment[hu]=A támogatott TDevelop-tulajdonságok -Comment[it]=Lista delle proprietà supportate da TDevelop -Comment[nds]= De List mit ünnerstütt TDevelop-Egenschappen -Comment[ne]= केडीई विकास समर्थन गर्ने गुणको सूची -Comment[nl]=De lijst met ondersteunde TDevelop-properties -Comment[pl]= Lista obsługiwanych właściwości TDevelopa -Comment[pt]= A lista de propriedades do TDevelop suportadas -Comment[pt_BR]= A lista de propriedades do TDevelop suportadas -Comment[ru]=Список поддерживаемых типов модулей для TDevelop -Comment[sk]=Zoznam podporovaných vlastností TDevelop -Comment[sl]=Seznam podprtih lastnosti TDevelop -Comment[sr]=Листа подржаних TDevelop-ових својстава -Comment[sr@Latn]=Lista podržanih TDevelop-ovih svojstava -Comment[sv]=Listan med egenskaper i TDevelop som stöds -Comment[tr]=Desteklenen TDevelop özellikleri -Comment[zh_CN]=列出支持的 TDevelop 属性 -Comment[zh_TW]=支援的 TDevelop 屬性列表 -Default= - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/tdevpart_part.cpp -Dest=%{dest}/%{APPNAMELC}part.cpp - -[FILE4] -Type=install -Source=%{src}/tdevpart_part.h -Dest=%{dest}/%{APPNAMELC}part.h - -[FILE5] -Type=install -Source=%{src}/tdevpart_widget.cpp -Dest=%{dest}/%{APPNAMELC}widget.cpp - -[FILE6] -Type=install -Source=%{src}/tdevpart_widget.h -Dest=%{dest}/%{APPNAMELC}widget.h - -[FILE7] -Type=install -EscapeXML=true -Source=%{src}/tdevpart_part.rc -Dest=%{dest}/kdev%{APPNAMELC}.rc - -[FILE71] -Type=install -EscapeXML=true -Source=%{src}/globalconfigbase.ui -Dest=%{dest}/%{APPNAMELC}globalconfigbase.ui - -[FILE711] -Type=install -Source=%{src}/globalconfig.h -Dest=%{dest}/%{APPNAMELC}globalconfig.h - -[FILE712] -Type=install -Source=%{src}/globalconfig.cpp -Dest=%{dest}/%{APPNAMELC}globalconfig.cpp - -[FILE72] -Type=install -EscapeXML=true -Source=%{src}/projectconfigbase.ui -Dest=%{dest}/%{APPNAMELC}projectconfigbase.ui - -[FILE721] -Type=install -Source=%{src}/projectconfig.h -Dest=%{dest}/%{APPNAMELC}projectconfig.h - -[FILE722] -Type=install -Source=%{src}/projectconfig.cpp -Dest=%{dest}/%{APPNAMELC}projectconfig.cpp - -[FILE8] -Type=install -Source=%{src}/tdevpart.desktop -Dest=%{dest}/kdev%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{src}/README.dox -Dest=%{dest}/README.dox - -[MSG] -Type=message -Comment=A TDevelop plugin was created in %{dest} -Comment[ca]=Un connector per a TDevelop ha estat creat en %{dest} -Comment[da]=Et TDevelop plugin blev oprettet i %{dest} -Comment[de]=Ein TDevelop-Modul wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο του TDevelop δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para TDevelop ha sido creado en %{dest} -Comment[et]=TDevelopi plugin loodi asukohta %{dest} -Comment[eu]=TDevelop plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ TDevelop در %{dest} ایجاد شد -Comment[fr]=Un module externe pour TDevelop a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán TDevelop i %{dest} -Comment[gl]=Creouse unha extensión para TDevelop en %{dest} -Comment[hu]=Létrejött egy TDevelop-bővítőmodul itt: %{dest} -Comment[it]=È stato creato un plugin per TDevelop in %{dest} -Comment[ja]=TDevelop プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDevelop-Moduul opstellt -Comment[ne]=केडीई विकास प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Er is een TDevelop-plugin aangemaakt in %{dest} -Comment[pl]=Wtyczka do TDevelopa została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' do TDevelop em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' do TDevelop em %{dest} -Comment[ru]=Модуль TDevelop создан в %{dest} -Comment[sk]=TDevelop modul bol vytvorený v %{dest} -Comment[sl]=Vstavek za TDevelop je bil ustvarjen v %{dest} -Comment[sr]=Прикључак за TDevelop направљен је у %{dest} -Comment[sr@Latn]=Priključak za TDevelop napravljen je u %{dest} -Comment[sv]=Ett insticksprogram för TDevelop skapades i %{dest} -Comment[tr]=Bir TDevelop eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了 TDevelop 插件 -Comment[zh_TW]=一個 TDevelop 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdevpart/tdevpart_part.cpp b/languages/cpp/app_templates/tdevpart/tdevpart_part.cpp deleted file mode 100644 index 0d846d38..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart_part.cpp +++ /dev/null @@ -1,183 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}part.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "%{APPNAMELC}widget.h" -#include "%{APPNAMELC}globalconfig.h" -#include "%{APPNAMELC}projectconfig.h" - -typedef TDevGenericFactory<%{APPNAME}Part> %{APPNAME}Factory; -TDevPluginInfo data("tdev%{APPNAMELC}"); -K_EXPORT_COMPONENT_FACTORY( libtdev%{APPNAMELC}, %{APPNAME}Factory( data ) ); - -#define GLOBALDOC_OPTIONS 1 -#define PROJECTDOC_OPTIONS 2 - -%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevPlugin(&data, parent, name ? name : "%{APPNAME}Part") -{ - setInstance(%{APPNAME}Factory::instance()); - setXMLFile("tdev%{APPNAMELC}.rc"); - - m_widget = new %{APPNAME}Widget(this); - m_widget->setCaption("widget caption"); - m_widget->setIcon(SmallIcon(info()->icon())); - - TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); - - // now you decide what should happen to the widget. Take a look at tdevcore.h - // or at other plugins how to embed it. - - // if you want to embed your widget as an outputview, simply uncomment - // the following line. - // mainWindow()->embedOutputView( m_widget, "name that should appear", "enter a tooltip" ); - - // if you want to embed your widget as a selectview (at the left), simply uncomment - // the following line. - // mainWindow()->embedSelectView( m_widget, "name that should appear", "enter a tooltip" ); - - // if you want to embed your widget as a selectview (at the right), simply uncomment - // the following line. - // mainWindow()->embedSelectViewRight( m_widget, "name that should appear", "enter a tooltip" ); - - setupActions(); - - m_configProxy = new ConfigWidgetProxy(core()); - m_configProxy->createGlobalConfigPage(i18n("%{APPNAME}"), GLOBALDOC_OPTIONS, info()->icon()); - m_configProxy->createProjectConfigPage(i18n("%{APPNAME}"), PROJECTDOC_OPTIONS, info()->icon()); - connect(m_configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), - this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int))); - - connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), - this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); - connect(core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened())); - connect(core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); - - - TQTimer::singleShot(0, this, TQT_SLOT(init())); -} - -%{APPNAME}Part::~%{APPNAME}Part() -{ -// if you embed a widget, you need to tell the mainwindow when you remove it -// if ( m_widget ) -// { -// mainWindow()->removeView( m_widget ); -// } - delete m_widget; - delete m_configProxy; -} - -void %{APPNAME}Part::init() -{ -// delayed initialization stuff goes here -} - -void %{APPNAME}Part::setupActions() -{ -// create XMLGUI actions here - action = new TDEAction(i18n("&Do Something..."), 0, - this, TQT_SLOT(doSomething()), actionCollection(), "plugin_action" ); - action->setToolTip(i18n("Do something")); - action->setWhatsThis(i18n("Do something

    Describe here what does this action do.")); -} - -void %{APPNAME}Part::insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo) -{ -// create configuraton dialogs here - switch (pageNo) - { - case GLOBALDOC_OPTIONS: - { - %{APPNAME}GlobalConfig *w = new %{APPNAME}GlobalConfig(this, page, "global config"); - connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); - break; - } - case PROJECTDOC_OPTIONS: - { - %{APPNAME}ProjectConfig *w = new %{APPNAME}ProjectConfig(this, page, "project config"); - connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); - break; - } - } -} - -void %{APPNAME}Part::contextMenu(TQPopupMenu *popup, const Context *context) -{ -// put actions into the context menu here - if (context->hasType(Context::EditorContext)) - { - // editor context menu - const EditorContext *econtext = static_cast(context); - - // use context and plug actions here - action->plug(popup); - - // or create menu items on the fly - // int id = -1; - // id = popup->insertItem(i18n("Do Something Here"), - // this, TQT_SLOT(doSomething()) ); - // popup->setWhatsThis(id, i18n("Do something here

    Describe here what does this action do." - } - else if (context->hasType(Context::FileContext)) - { - // file context menu - const FileContext *fcontext = static_cast(context); - - //use context and plug actions here - } - else if (context->hasType(Context::ProjectModelItemContext)) - { - // project tree context menu - const ProjectModelItemContext *pcontext = static_cast(context); - - // use context and plug actions here - } - else if (context->hasType(Context::CodeModelItemContext)) - { - // class tree context menu - const CodeModelItemContext *mcontext = static_cast(context); - - // use context and plug actions here - } - else if (context->hasType(Context::DocumentationContext)) - { - // documentation viewer context menu - const DocumentationContext *dcontext = static_cast(context); - - // use context and plug actions here - } -} - -void %{APPNAME}Part::projectOpened() -{ -// do something when the project is opened -} - -void %{APPNAME}Part::projectClosed() -{ -// do something when the project is closed -} - -void %{APPNAME}Part::doSomething() -{ -// do something useful here instead of showing the message box - KMessageBox::information(m_widget, i18n("This action does nothing."), i18n("%{APPNAME} Plugin")); -} - -#include "%{APPNAMELC}part.moc" diff --git a/languages/cpp/app_templates/tdevpart/tdevpart_part.h b/languages/cpp/app_templates/tdevpart/tdevpart_part.h deleted file mode 100644 index 1d61dd0c..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart_part.h +++ /dev/null @@ -1,46 +0,0 @@ -%{H_TEMPLATE} -#ifndef TDEV%{APPNAMEUC}_H -#define TDEV%{APPNAMEUC}_H - -#include - -#include - -class TQPopupMenu; -class TDEAction; -class KDialogBase; -class Context; -class ConfigWidgetProxy; -class %{APPNAME}Widget; - -/** -Please read the README.dox file for more info about this part -*/ -class %{APPNAME}Part: public TDevPlugin -{ - Q_OBJECT - -public: - %{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &args); - ~%{APPNAME}Part(); - -private slots: - void init(); - - void insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo); - void contextMenu(TQPopupMenu *popup, const Context *context); - void projectOpened(); - void projectClosed(); - - void doSomething(); - -private: - void setupActions(); - - TDEAction *action; - - TQGuardedPtr<%{APPNAME}Widget> m_widget; - ConfigWidgetProxy *m_configProxy; -}; - -#endif diff --git a/languages/cpp/app_templates/tdevpart/tdevpart_part.rc b/languages/cpp/app_templates/tdevpart/tdevpart_part.rc deleted file mode 100644 index a38ee14e..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart_part.rc +++ /dev/null @@ -1,11 +0,0 @@ - - - -

    &Tools - - - - - - - diff --git a/languages/cpp/app_templates/tdevpart/tdevpart_widget.cpp b/languages/cpp/app_templates/tdevpart/tdevpart_widget.cpp deleted file mode 100644 index 1f356afd..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart_widget.cpp +++ /dev/null @@ -1,21 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}widget.h" - -#include -#include -#include - -#include - -#include "%{APPNAMELC}part.h" - -%{APPNAME}Widget::%{APPNAME}Widget(%{APPNAME}Part *part) - : TQWidget(0, "%{APPNAMELC} widget"), m_part(part) -{ -} - -%{APPNAME}Widget::~%{APPNAME}Widget() -{ -} - -#include "%{APPNAMELC}widget.moc" diff --git a/languages/cpp/app_templates/tdevpart/tdevpart_widget.h b/languages/cpp/app_templates/tdevpart/tdevpart_widget.h deleted file mode 100644 index e9762de3..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart_widget.h +++ /dev/null @@ -1,24 +0,0 @@ -%{H_TEMPLATE} -#ifndef %{APPNAMEUC}_WIDGET_H -#define %{APPNAMEUC}_WIDGET_H - -#include -#include - -class TDevProject; -class %{APPNAME}Part; - -class %{APPNAME}Widget: public TQWidget -{ - Q_OBJECT - -public: - %{APPNAME}Widget(%{APPNAME}Part *part); - ~%{APPNAME}Widget(); - -private: - %{APPNAME}Part *m_part; -}; - - -#endif diff --git a/languages/cpp/app_templates/tdevpart2/CMakeLists.txt b/languages/cpp/app_templates/tdevpart2/CMakeLists.txt deleted file mode 100644 index d48daf45..00000000 --- a/languages/cpp/app_templates/tdevpart2/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_custom_target( tdevpart2.tar.gz ALL - COMMAND tar zcf tdevpart2.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - src-Makefile.am tdevpart_part.cpp tdevpart_part.h - tdevpart_widget.h tdevpart_widget.cpp tdevpart_part.rc - tdevpart.desktop app.tdevelop tdevpart-configure.in.in - README.dox subdirs globalconfigbase.ui globalconfig.h - globalconfig.cpp projectconfigbase.ui projectconfig.h - projectconfig.cpp -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdevpart2.tar.gz tdevpart2.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdevpart2.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdevpart2/Makefile.am b/languages/cpp/app_templates/tdevpart2/Makefile.am deleted file mode 100644 index ae1df924..00000000 --- a/languages/cpp/app_templates/tdevpart2/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -dataFiles = src-Makefile.am tdevpart_part.cpp tdevpart_part.h\ - tdevpart_widget.h tdevpart_widget.cpp \ - tdevpart_part.rc tdevpart.desktop app.tdevelop \ - tdevpart-configure.in.in README.dox subdirs globalconfigbase.ui globalconfig.h \ - globalconfig.cpp projectconfigbase.ui projectconfig.h projectconfig.cpp - -templateName = tdevpart2 - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(templateName).tar.gz: ${dataFiles} - $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} - $(GZIP_COMMAND) -f9 $(templateName).tar - -archivedir = ${appwizarddatadir} -archive_DATA = $(templateName).tar.gz ${templateName}.png - -CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/cpp/app_templates/tdevpart2/README.dox b/languages/cpp/app_templates/tdevpart2/README.dox deleted file mode 100644 index 7069f3a5..00000000 --- a/languages/cpp/app_templates/tdevpart2/README.dox +++ /dev/null @@ -1,55 +0,0 @@ -/** \class %{APPNAME} -Put a brief description here, the brief description ends at the first dot. -Put a more detailed description of your part in these lines. It can span -over several lines. You can even use some html commands in these lines like: -This is code, html links link text, -and images. - -\authors %{AUTHOR} -\authors 2nd author full name -... -\authors nth author full name - -\maintainer %{AUTHOR} -\maintainer 2nd maintainer full name -... -\maintainer nth maintainer full name - -\feature Describe the first feature -\feature Describe the second feature -... -\feature Describe the last feature - -\bug bugs in -YOUR_COMPONENT_NAME at Bugzilla database -\bug Describe a the 1st bug that you know of, but probably hasn't been reported yet. -.. -\bug Describe a the nth bug that you know of, but probably hasn't been reported yet. - -\requirement Describe a the 1st requirement of your part. -\requirement Describe a the 2nd requirement of your part. -... -\requirement Describe a the nth requirement of your part. - -\todo Describe a the 1st TODO of your part. -\todo Describe a the 2nd TODO of your part. -... -\todo Describe a the nth TODO of your part. - -\faq First frequenly asked question about your part ? Answer. -\faq Second frequenly asked question about your part ? Answer. -... -\faq Last frequenly asked question about your part ? Answer. - -\note First note text. -\note Second note text. -... -\note Last note text. - -\warning First warning text. -\warning Second warning text. -... -\warning Last warning text. - -*/ diff --git a/languages/cpp/app_templates/tdevpart2/app.tdevelop b/languages/cpp/app_templates/tdevpart2/app.tdevelop deleted file mode 100644 index ac470cdc..00000000 --- a/languages/cpp/app_templates/tdevpart2/app.tdevelop +++ /dev/null @@ -1,148 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - C++ - Code - Qt - TDE - KDevelop - - - - - src/%{APPNAMELC} - debug - - - src/%{APPNAMELC} - executable - - - - optimized - kdevgccoptions - kdevgppoptions - kdevg77options - -O2 -g0 - - - --enable-debug=full - debug - kdevgccoptions - kdevgppoptions - kdevg77options - -O0 -g3 - - - - - - - - - - - - - - - - - - - - false - true - - - - - ada - ada_bugs_gcc - bash - bash_bugs - clanlib - w3c-dom-level2-html - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - ruby - ruby_bugs - sdl - w3c-svg - sw - w3c-uaag10 - wxwidgets_bugs - - - qmake User Guide - - - - - libtool - - - - - - - - - - - - -f - - - - -dP - -f - -C -d -P - -u3 -p - - - - - 3 - true - 3 - EmbeddedTDevDesigner - - - true - true - true - false - true - true - 250 - 400 - - - - - Doxygen Documentation Collection - %{APPNAMELC}.tag - - - diff --git a/languages/cpp/app_templates/tdevpart2/globalconfig.cpp b/languages/cpp/app_templates/tdevpart2/globalconfig.cpp deleted file mode 100644 index cddf3e7e..00000000 --- a/languages/cpp/app_templates/tdevpart2/globalconfig.cpp +++ /dev/null @@ -1,15 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}globalconfig.h" - -#include "%{APPNAMELC}part.h" - -%{APPNAME}GlobalConfig::%{APPNAME}GlobalConfig(%{APPNAME}Part *part, TQWidget *parent, const char *name) - : %{APPNAME}GlobalConfigBase(parent, name), m_part(part) -{ -} - -void %{APPNAME}GlobalConfig::accept() -{ -} - -#include "%{APPNAMELC}globalconfig.moc" diff --git a/languages/cpp/app_templates/tdevpart2/globalconfig.h b/languages/cpp/app_templates/tdevpart2/globalconfig.h deleted file mode 100644 index 723dbae2..00000000 --- a/languages/cpp/app_templates/tdevpart2/globalconfig.h +++ /dev/null @@ -1,23 +0,0 @@ -%{H_TEMPLATE} -#ifndef %{APPNAMEUC}_GLOBAL_CONFIG_H -#define %{APPNAMEUC}_GLOBAL_CONFIG_H - -#include "%{APPNAMELC}globalconfigbase.h" - -class %{APPNAME}Part; - -class %{APPNAME}GlobalConfig: public %{APPNAME}GlobalConfigBase -{ - Q_OBJECT - -public: - %{APPNAME}GlobalConfig(%{APPNAME}Part *part, TQWidget *parent = 0, const char *name = 0); - -public slots: - void accept(); - -private: - %{APPNAME}Part *m_part; -}; - -#endif diff --git a/languages/cpp/app_templates/tdevpart2/globalconfigbase.ui b/languages/cpp/app_templates/tdevpart2/globalconfigbase.ui deleted file mode 100644 index 588f9dc9..00000000 --- a/languages/cpp/app_templates/tdevpart2/globalconfigbase.ui +++ /dev/null @@ -1,20 +0,0 @@ - -%{APPNAME}GlobalConfigBase - - - %{APPNAME}GlobalConfigBase - - - - 0 - 0 - 600 - 480 - - - - %{APPNAME} - - - - diff --git a/languages/cpp/app_templates/tdevpart2/projectconfig.cpp b/languages/cpp/app_templates/tdevpart2/projectconfig.cpp deleted file mode 100644 index 42a9f3e7..00000000 --- a/languages/cpp/app_templates/tdevpart2/projectconfig.cpp +++ /dev/null @@ -1,15 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}projectconfig.h" - -#include "%{APPNAMELC}part.h" - -%{APPNAME}ProjectConfig::%{APPNAME}ProjectConfig(%{APPNAME}Part *part, TQWidget *parent, const char *name) - : %{APPNAME}ProjectConfigBase(parent, name), m_part(part) -{ -} - -void %{APPNAME}ProjectConfig::accept() -{ -} - -#include "%{APPNAMELC}projectconfig.moc" diff --git a/languages/cpp/app_templates/tdevpart2/projectconfig.h b/languages/cpp/app_templates/tdevpart2/projectconfig.h deleted file mode 100644 index 49d4f089..00000000 --- a/languages/cpp/app_templates/tdevpart2/projectconfig.h +++ /dev/null @@ -1,23 +0,0 @@ -%{H_TEMPLATE} -#ifndef %{APPNAMEUC}_PROJECT_CONFIG_H -#define %{APPNAMEUC}_PROJECT_CONFIG_H - -#include "%{APPNAMELC}projectconfigbase.h" - -class %{APPNAME}Part; - -class %{APPNAME}ProjectConfig: public %{APPNAME}ProjectConfigBase -{ - Q_OBJECT - -public: - %{APPNAME}ProjectConfig(%{APPNAME}Part *part, TQWidget *parent = 0, const char *name = 0); - -public slots: - void accept(); - -private: - %{APPNAME}Part *m_part; -}; - -#endif diff --git a/languages/cpp/app_templates/tdevpart2/projectconfigbase.ui b/languages/cpp/app_templates/tdevpart2/projectconfigbase.ui deleted file mode 100644 index 30849e54..00000000 --- a/languages/cpp/app_templates/tdevpart2/projectconfigbase.ui +++ /dev/null @@ -1,20 +0,0 @@ - -%{APPNAME}ProjectConfigBase - - - %{APPNAME}ProjectConfigBase - - - - 0 - 0 - 600 - 480 - - - - %{APPNAME} - - - - diff --git a/languages/cpp/app_templates/tdevpart2/src-Makefile.am b/languages/cpp/app_templates/tdevpart2/src-Makefile.am deleted file mode 100644 index 407d9565..00000000 --- a/languages/cpp/app_templates/tdevpart2/src-Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -INCLUDES = -I$(kde_includes)/tdevelop/interfaces -I$(kde_includes)/tdevelop/util $(all_includes) - -kde_module_LTLIBRARIES = libtdev%{APPNAMELC}.la -libtdev%{APPNAMELC}_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) $(KDE_PLUGIN) -libtdev%{APPNAMELC}_la_LIBADD = -ltdevelop -libtdev%{APPNAMELC}_la_SOURCES = %{APPNAMELC}part.cpp %{APPNAMELC}widget.cpp %{APPNAMELC}globalconfigbase.ui %{APPNAMELC}globalconfig.cpp %{APPNAMELC}projectconfigbase.ui %{APPNAMELC}projectconfig.cpp - -METASOURCES = AUTO - -servicedir = $(kde_servicesdir) -service_DATA = kdev%{APPNAMELC}.desktop - -rcdir = $(kde_datadir)/kdev%{APPNAMELC} -rc_DATA = kdev%{APPNAMELC}.rc - -appsharedir = $(kde_datadir)/kdev%{APPNAMELC} -appshare_DATA = diff --git a/languages/cpp/app_templates/tdevpart2/subdirs b/languages/cpp/app_templates/tdevpart2/subdirs deleted file mode 100644 index 0e678106..00000000 --- a/languages/cpp/app_templates/tdevpart2/subdirs +++ /dev/null @@ -1,3 +0,0 @@ -doc -po -src diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart-configure.in.in b/languages/cpp/app_templates/tdevpart2/tdevpart-configure.in.in deleted file mode 100644 index f08ae2b7..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart-configure.in.in +++ /dev/null @@ -1,10 +0,0 @@ -#MIN_CONFIG(3.0.0) - -AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION}) -AC_C_BIGENDIAN -AC_CHECK_TDEMAXPATHLEN - -KDE_CHECK_HEADERS([tdevelop/interfaces/tdevcore.h]) -KDE_CHECK_LIB([tdevelop],main, - [LIBTDEVELOP="-ltdevelop"]) -AC_SUBST(LIBTDEVELOP) diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart.desktop b/languages/cpp/app_templates/tdevpart2/tdevpart.desktop deleted file mode 100644 index c3eb6a81..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart.desktop +++ /dev/null @@ -1,83 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Name=KDev%{APPNAME} -Name[nds]=KDev%{ProgNaam} -Name[sv]=TDevelop %{APPNAME} -Name[ta]=கெடெவ்%{APPNAME} -GenericName=%{APPNAME} Plugin -GenericName[br]=Lugent %{APPNAME} -GenericName[ca]=Connector per a %{APPNAME} -GenericName[da]=%{APPNAME} plugin -GenericName[de]=%{APPNAME}-Modul -GenericName[el]=Πρόσθετο %{APPNAME} -GenericName[es]=Complemento %{APPNAME} -GenericName[et]=%{APPNAME} plugin -GenericName[eu]=%{APPNAME} plugina -GenericName[fa]=وصلۀ %{APPNAME} -GenericName[fr]=Module externe pour %{APPNAME} -GenericName[ga]=Breiseán %{APPNAME} -GenericName[gl]=Extensión %{APPNAME} -GenericName[hu]=%{APPNAME}-bővítőmodul -GenericName[it]=Plugin %{APPNAME} -GenericName[ja]=%{APPNAME} プラグイン -GenericName[nds]=%{APPNAME}-Moduul -GenericName[ne]=%{APPNAME} प्लगइन -GenericName[nl]=%{APPNAME}-plugin -GenericName[pl]=Wtyczka %{APPNAME} -GenericName[pt]='Plugin' %{APPNAME} -GenericName[pt_BR]=Plug-in do %{APPNAME} -GenericName[ru]=Модуль %{APPNAME} -GenericName[sk]=%{APPNAME} modul -GenericName[sl]=Vstavek za %{APPNAME} -GenericName[sr]=%{APPNAME} прикључак -GenericName[sr@Latn]=%{APPNAME} priključak -GenericName[sv]=%{APPNAME} insticksprogram -GenericName[tr]=%{APPNAME} Eklentisi -GenericName[zh_CN]=%{APPNAME} 插件 -GenericName[zh_TW]=%{APPNAME} 外掛程式 -Comment=%{APPNAME} Description -Comment[br]=Deskrivadur %{APPNAME} -Comment[ca]=Descripció per a %{APPNAME} -Comment[da]=%{APPNAME} beskrivelse -Comment[de]=%{APPNAME} Beschreibung -Comment[el]=Περιγραφή %{APPNAME} -Comment[es]=Descripción de %{APPNAME} -Comment[et]=%{APPNAME} kirjeldus -Comment[eu]=%{APPNAME} deskribapena -Comment[fa]=توصیف %{APPNAME} -Comment[fr]=Description pour %{APPNAME} -Comment[ga]=Cur Síos %{APPNAME} -Comment[gl]=Descripción de %{APPNAME} -Comment[hu]=%{APPNAME} leírása -Comment[it]=Descrizione %{APPNAME} -Comment[ja]=%{APPNAME} 概説 -Comment[nds]=%{APPNAME}-Beschrieven -Comment[ne]=%{APPNAME} वर्णन -Comment[nl]=%{APPNAME} omschrijving -Comment[pl]=Opis %{APPNAME} -Comment[pt]=Descrição de %{APPNAME$} -Comment[pt_BR]=Descrição do %{APPNAME} -Comment[ru]=Описание %{APPNAME} -Comment[sk]=%{APPNAME} popis -Comment[sl]=Opis za %{APPNAME} -Comment[sr]=Опис за %{APPNAME} -Comment[sr@Latn]=Opis za %{APPNAME} -Comment[sv]=%{APPNAME} beskrivning -Comment[tr]=%{APPNAME} Tanımı -Comment[zh_CN]=%{APPNAME} 描述 -Comment[zh_TW]=%{APPNAME} 描述 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin - -X-TDevelop-Plugin-Version=1 -X-TDevelop-Plugin-Homepage= -X-TDevelop-Plugin-BugsEmailAddress=%{EMAIL} -X-TDevelop-Plugin-Copyright=(C) by %{AUTHOR} - -X-TDevelop-Args= - -X-TDevelop-Scope=%{SCOPE} -X-TDE-Library=libtdev%{APPNAMELC} -X-TDevelop-Version=3 -X-TDevelop-Properties=%{PROPS} diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart2.png b/languages/cpp/app_templates/tdevpart2/tdevpart2.png deleted file mode 100644 index 840a953c..00000000 Binary files a/languages/cpp/app_templates/tdevpart2/tdevpart2.png and /dev/null differ diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart2.tdevtemplate b/languages/cpp/app_templates/tdevpart2/tdevpart2.tdevtemplate deleted file mode 100644 index b0431099..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart2.tdevtemplate +++ /dev/null @@ -1,276 +0,0 @@ -# TDE Config File -[General] -Name=TDevelop Plugin (Standalone build) -Name[ca]=Connector per a TDevelop (de construcció aïllada) -Name[da]=TDevelop plugin (Alenestående) -Name[de]=TDevelop-Modul (Unabhängige Erstellung) -Name[el]=Πρόσθετο TDevelop (Αυτόνομη κατασκευή) -Name[es]=Complemento para TDevelop (construcción independiente) -Name[et]=TDevelopi plugin (autonoomne) -Name[eu]=TDevelop plugin-a (eraikuntza autonomoak) -Name[fa]=وصلۀ TDevelop )ساخت خوداتکا( -Name[fr]=Module externe pour TDevelop (construction autonome) -Name[ga]=Breiseán TDevelop (Tógáil Shaorsheasaimh) -Name[gl]=Extensión para TDevelop (compilación independente) -Name[hu]=TDevelop-bővítőmodul (önálló) -Name[it]=Plugin di TDevelop (compilazione indipendente) -Name[ja]=TDevelop プラグイン (スタンダローンビルド) -Name[nds]=TDevelop-Moduul (Enkelprogramm) -Name[ne]=केडीई विकास प्लगइन (स्ट्यान्डअलोन निर्माण) -Name[nl]=TDevelop-plugin (standalone build) -Name[pl]=Wtyczka do TDevelopa (budowana oddzielnie) -Name[pt]='Plugin' do TDevelop (compilação autónoma) -Name[pt_BR]='Plugin' do TDevelop (compilação autónoma) -Name[ru]=Модуль TDevelop (внешний) -Name[sk]=TDevelop modul (samostatný build) -Name[sl]=Vstavek za TDevelop (samostojna izgradnja) -Name[sr]=Прикључак за TDevelop -Name[sr@Latn]=Priključak za TDevelop -Name[sv]=TDevelop-insticksprogram (att bygga fristående) -Name[tr]=TDevelop Eklentisi (Kendi başına çalışabilen) -Name[zh_CN]=TDevelop 插件(独立编译) -Name[zh_TW]=TDevelop 外掛程式(單獨建立) -Category=C++/TDevelop/ -Comment=This generates a KPart for TDevelop, to be built outside of the TDevelop source tree. -Comment[ca]=Genera una KPart per a TDevelop, per a que es construeixi fora de l'arbre de fonts de TDevelop. -Comment[da]=Dette genererer en KPart for TDevelop, til at bygges udenfor TDevelop's kildetræ. -Comment[de]=Hiermit wird eine Komponente (KPart) für TDevelop generiert, die außerhalb des Quelltextbaumes von TDevelop erstellt wird. -Comment[el]=Αυτό δημιουργεί ένα KPart για το TDevelop, για κατασκευή του έξω από το δέντρο πηγαίου κώδικα του TDevelop. -Comment[es]=Genera un KPart para TDevelop, para ser construido fuera del árbol de código fuente de TDevelop. -Comment[et]=TDevelopi KPart'i loomine, mida saab ehitada väljaspool TDevelopi lähtekoodipuud. -Comment[eu]=Honek TDevelop-en KPart bat sortzen du, TDevelop-en iturburu-zuhaitzetik at eraikitzeko. -Comment[fa]=یک KPart برای TDevelop، برای ساخته شدن در بیرون درخت منبع پروژه تولید می‌کند. -Comment[fr]=Génère un KPart pour TDevelop, à construire en dehors de l'arborescence des sources de TDevelop. -Comment[gl]=Isto xera un KPart para TDevelop que se compilará fóra da árbore de código de TDevelop. -Comment[hu]=Létrehoz egy TDevelop-bővítőmodult, mely a TDevelopos forráskönyvtáron kívül fordítható le. -Comment[it]=Genera un KPart per TDevelop, da compilare al di fuori dell'albero sorgente di TDevelop. -Comment[nds]=Dit stellt en KPart-Komponent för TDevelop op, dat buten den TDevelop-Bornboom kompileert warrt. -Comment[ne]=यसले केडीई विकास स्रोत ट्री बाहिर निर्माण हुने, केडीई विकासका लागि केडीई भाग उत्पन्न गर्दछ । -Comment[nl]=Dit genereert een KPart voor TDevelop, welke buiten de TDevelop sourcetree wordt gebouwd. -Comment[pl]=Generuje KPart dla TDevelopa budowane poza jego drzewem źródłowym. -Comment[pt]=Isto gera uma KPart para o TDevelop, de modo a ser compilada fora da árvore de código do TDevelop. -Comment[pt_BR]=Isto gera uma KPart para o TDevelop, de modo a ser compilada fora da árvore de código do TDevelop. -Comment[ru]=Создание компонента KPart для TDevelop со сборкой вне исходного кода TDevelop. -Comment[sk]=Vygenruje KPart pre TDevelop, tak aby ho bolo možné kompilovať mimo zdrojový strom TDevelop. -Comment[sr]=Ово прави KPart за TDevelop, за градњу изван TDevelop-овог изворног стабла. -Comment[sr@Latn]=Ovo pravi KPart za TDevelop, za gradnju izvan TDevelop-ovog izvornog stabla. -Comment[sv]=Detta skapar ett TDevelop-delprogram, att bygga utanför TDevelops källkodsträd. -Comment[tr]=Bu, TDevelop için, TDevelop kaynak ağacının dışında yapılacak, bir KPart yaratır. -Comment[zh_CN]=这将生成一个 TDevelop 的 KPart,可以在 TDevelop 源代码树之外编译。 -Comment[zh_TW]=產生一個 TDevelop 的 KPart 元件,建立在 TDevelop 程式源碼樹之外。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}_part.cpp -Archive=tdevpart2.tar.gz - -[SCOPE] -Type = value -ValueType=QString -Value= SCOPE -Comment= The scope of a plugin (Global, Project, Core) -Comment[ca]= L'àmbit d'un connector (Global, Project, Core) -Comment[da]= Et plugins omfang (Globalt, Projekt, Kerne) -Comment[de]= Gültigkeitsbereich eines Moduls (Global, Projekt, Kern) -Comment[el]= Η εμβέλεια ενός πρόσθετου (Καθολική, Έργο, Πυρήνας) -Comment[es]=El alcance de un complemento (global, proyecto, núcleo) -Comment[et]=Plugina skoop (globaalne, projekt, tuum) -Comment[eu]= Pluginaren barrutia (Globala, Projektua, Nukleoa) -Comment[fa]=دامنۀ یک وصله )سراسری، پروژه، هسته( -Comment[fr]= La portée d'un module externe (globale, projet, core) -Comment[ga]= Scóip an bhreiseáin (Comhchoiteann, Tionscadal, Ceartlár) -Comment[gl]=Ámbito da extensión (Global, Proxecto, Núcleo) -Comment[hu]=A modul hatóköre (globális, projektszintű, alap) -Comment[it]=Il contesto di un plugin (Globale, Progetto, Core) -Comment[nds]= Dat Rebeet vun en Moduul (Globaal, Projekt, Karn) -Comment[ne]= प्लगइनको क्षेत्र (विश्वव्यापी, परियोजना, कोर) -Comment[nl]=Het bereik van een plugin (globaal, project, core) -Comment[pl]=Przynależność wtyczki (globalna, projekt, część główna) -Comment[pt]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) -Comment[pt_BR]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) -Comment[ru]=Тип модуля (Global, Project, Core) -Comment[sk]=Rozsah module (globálny, projektový, jadrový) -Comment[sr]=Опсег прикључка (глобални, пројекат, језгро) -Comment[sr@Latn]=Opseg priključka (globalni, projekat, jezgro) -Comment[sv]=Insticksprogrammets omfattning (Global, Projekt, Kärna) -Comment[tr]=Bir eklentinin alanı (Genel, Proje, İç) -Comment[zh_CN]=插件的范围(全局、工程、核心) -Comment[zh_TW]=外掛程式的範圍(全域、專案、核心) -Default= Global - -[PROPS] -Type = value -ValueType=QString -Value= PROPS -Comment= The list of supported TDevelop properties -Comment[ca]= La llista de propietats suportades del TDevelop -Comment[da]= Listen af understøttede TDevelop-egenskaber -Comment[de]= Die Liste der unterstützten TDevelop-Eigenschaften -Comment[el]= Η λίστα των υποστηριζόμενων ιδιοτήτων του TDevelop -Comment[es]=La lista de propiedades de TDevelop soportadas -Comment[et]= TDevelopi toetatud omaduste nimekiri -Comment[eu]= Onartzen diren TDevelop-en propietateen zerrenda -Comment[fa]=فهرست ویژگیهای پشتیبانی‌شدۀ TDevelop -Comment[fr]= La liste des propriétés de TDevelop prises en charge -Comment[ga]= Liosta d'airíonna TDevelop a dtacaítear leo -Comment[gl]=Lista das propiedades de TDevelop soportadas -Comment[hu]=A támogatott TDevelop-tulajdonságok -Comment[it]=Lista delle proprietà supportate da TDevelop -Comment[nds]= De List mit ünnerstütt TDevelop-Egenschappen -Comment[ne]= केडीई विकास समर्थन गर्ने गुणको सूची -Comment[nl]=De lijst met ondersteunde TDevelop-properties -Comment[pl]= Lista obsługiwanych właściwości TDevelopa -Comment[pt]= A lista de propriedades do TDevelop suportadas -Comment[pt_BR]= A lista de propriedades do TDevelop suportadas -Comment[ru]=Список поддерживаемых типов модулей для TDevelop -Comment[sk]=Zoznam podporovaných vlastností TDevelop -Comment[sl]=Seznam podprtih lastnosti TDevelop -Comment[sr]=Листа подржаних TDevelop-ових својстава -Comment[sr@Latn]=Lista podržanih TDevelop-ovih svojstava -Comment[sv]=Listan med egenskaper i TDevelop som stöds -Comment[tr]=Desteklenen TDevelop özellikleri -Comment[zh_CN]=列出支持的 TDevelop 属性 -Comment[zh_TW]=支援的 TDevelop 屬性列表 -Default= - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE5] -Type=install -Source=%{src}/tdevpart-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE6] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE7] -Type=install -Source=%{src}/tdevpart_part.cpp -Dest=%{dest}/src/%{APPNAMELC}part.cpp - -[FILE71] -Type=install -EscapeXML=true -Source=%{src}/globalconfigbase.ui -Dest=%{dest}/src/%{APPNAMELC}globalconfigbase.ui - -[FILE711] -Type=install -Source=%{src}/globalconfig.h -Dest=%{dest}/src/%{APPNAMELC}globalconfig.h - -[FILE712] -Type=install -Source=%{src}/globalconfig.cpp -Dest=%{dest}/src/%{APPNAMELC}globalconfig.cpp - -[FILE72] -Type=install -EscapeXML=true -Source=%{src}/projectconfigbase.ui -Dest=%{dest}/src/%{APPNAMELC}projectconfigbase.ui - -[FILE721] -Type=install -Source=%{src}/projectconfig.h -Dest=%{dest}/src/%{APPNAMELC}projectconfig.h - -[FILE722] -Type=install -Source=%{src}/projectconfig.cpp -Dest=%{dest}/src/%{APPNAMELC}projectconfig.cpp - -[FILE8] -Type=install -Source=%{src}/tdevpart_part.h -Dest=%{dest}/src/%{APPNAMELC}part.h - -[FILE9] -Type=install -Source=%{src}/tdevpart_widget.cpp -Dest=%{dest}/src/%{APPNAMELC}widget.cpp - -[FILE10] -Type=install -Source=%{src}/tdevpart_widget.h -Dest=%{dest}/src/%{APPNAMELC}widget.h - -[FILE11] -Type=install -EscapeXML=true -Source=%{src}/tdevpart_part.rc -Dest=%{dest}/src/kdev%{APPNAMELC}.rc - -[FILE12] -Type=install -Source=%{src}/tdevpart.desktop -Dest=%{dest}/src/kdev%{APPNAMELC}.desktop - -[FILE13] -Type=install -Source=%{src}/README.dox -Dest=%{dest}/src/README.dox - -[MSG] -Type=message -Comment=A TDevelop plugin was created in %{dest} -Comment[ca]=Un connector per a TDevelop ha estat creat en %{dest} -Comment[da]=Et TDevelop plugin blev oprettet i %{dest} -Comment[de]=Ein TDevelop-Modul wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο του TDevelop δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para TDevelop ha sido creado en %{dest} -Comment[et]=TDevelopi plugin loodi asukohta %{dest} -Comment[eu]=TDevelop plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ TDevelop در %{dest} ایجاد شد -Comment[fr]=Un module externe pour TDevelop a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán TDevelop i %{dest} -Comment[gl]=Creouse unha extensión para TDevelop en %{dest} -Comment[hu]=Létrejött egy TDevelop-bővítőmodul itt: %{dest} -Comment[it]=È stato creato un plugin per TDevelop in %{dest} -Comment[ja]=TDevelop プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDevelop-Moduul opstellt -Comment[ne]=केडीई विकास प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Er is een TDevelop-plugin aangemaakt in %{dest} -Comment[pl]=Wtyczka do TDevelopa została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' do TDevelop em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' do TDevelop em %{dest} -Comment[ru]=Модуль TDevelop создан в %{dest} -Comment[sk]=TDevelop modul bol vytvorený v %{dest} -Comment[sl]=Vstavek za TDevelop je bil ustvarjen v %{dest} -Comment[sr]=Прикључак за TDevelop направљен је у %{dest} -Comment[sr@Latn]=Priključak za TDevelop napravljen je u %{dest} -Comment[sv]=Ett insticksprogram för TDevelop skapades i %{dest} -Comment[tr]=Bir TDevelop eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了 TDevelop 插件 -Comment[zh_TW]=一個 TDevelop 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart_part.cpp b/languages/cpp/app_templates/tdevpart2/tdevpart_part.cpp deleted file mode 100644 index 0d846d38..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart_part.cpp +++ /dev/null @@ -1,183 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}part.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "%{APPNAMELC}widget.h" -#include "%{APPNAMELC}globalconfig.h" -#include "%{APPNAMELC}projectconfig.h" - -typedef TDevGenericFactory<%{APPNAME}Part> %{APPNAME}Factory; -TDevPluginInfo data("tdev%{APPNAMELC}"); -K_EXPORT_COMPONENT_FACTORY( libtdev%{APPNAMELC}, %{APPNAME}Factory( data ) ); - -#define GLOBALDOC_OPTIONS 1 -#define PROJECTDOC_OPTIONS 2 - -%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevPlugin(&data, parent, name ? name : "%{APPNAME}Part") -{ - setInstance(%{APPNAME}Factory::instance()); - setXMLFile("tdev%{APPNAMELC}.rc"); - - m_widget = new %{APPNAME}Widget(this); - m_widget->setCaption("widget caption"); - m_widget->setIcon(SmallIcon(info()->icon())); - - TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); - - // now you decide what should happen to the widget. Take a look at tdevcore.h - // or at other plugins how to embed it. - - // if you want to embed your widget as an outputview, simply uncomment - // the following line. - // mainWindow()->embedOutputView( m_widget, "name that should appear", "enter a tooltip" ); - - // if you want to embed your widget as a selectview (at the left), simply uncomment - // the following line. - // mainWindow()->embedSelectView( m_widget, "name that should appear", "enter a tooltip" ); - - // if you want to embed your widget as a selectview (at the right), simply uncomment - // the following line. - // mainWindow()->embedSelectViewRight( m_widget, "name that should appear", "enter a tooltip" ); - - setupActions(); - - m_configProxy = new ConfigWidgetProxy(core()); - m_configProxy->createGlobalConfigPage(i18n("%{APPNAME}"), GLOBALDOC_OPTIONS, info()->icon()); - m_configProxy->createProjectConfigPage(i18n("%{APPNAME}"), PROJECTDOC_OPTIONS, info()->icon()); - connect(m_configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), - this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int))); - - connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), - this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); - connect(core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened())); - connect(core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); - - - TQTimer::singleShot(0, this, TQT_SLOT(init())); -} - -%{APPNAME}Part::~%{APPNAME}Part() -{ -// if you embed a widget, you need to tell the mainwindow when you remove it -// if ( m_widget ) -// { -// mainWindow()->removeView( m_widget ); -// } - delete m_widget; - delete m_configProxy; -} - -void %{APPNAME}Part::init() -{ -// delayed initialization stuff goes here -} - -void %{APPNAME}Part::setupActions() -{ -// create XMLGUI actions here - action = new TDEAction(i18n("&Do Something..."), 0, - this, TQT_SLOT(doSomething()), actionCollection(), "plugin_action" ); - action->setToolTip(i18n("Do something")); - action->setWhatsThis(i18n("Do something

    Describe here what does this action do.")); -} - -void %{APPNAME}Part::insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo) -{ -// create configuraton dialogs here - switch (pageNo) - { - case GLOBALDOC_OPTIONS: - { - %{APPNAME}GlobalConfig *w = new %{APPNAME}GlobalConfig(this, page, "global config"); - connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); - break; - } - case PROJECTDOC_OPTIONS: - { - %{APPNAME}ProjectConfig *w = new %{APPNAME}ProjectConfig(this, page, "project config"); - connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); - break; - } - } -} - -void %{APPNAME}Part::contextMenu(TQPopupMenu *popup, const Context *context) -{ -// put actions into the context menu here - if (context->hasType(Context::EditorContext)) - { - // editor context menu - const EditorContext *econtext = static_cast(context); - - // use context and plug actions here - action->plug(popup); - - // or create menu items on the fly - // int id = -1; - // id = popup->insertItem(i18n("Do Something Here"), - // this, TQT_SLOT(doSomething()) ); - // popup->setWhatsThis(id, i18n("Do something here

    Describe here what does this action do." - } - else if (context->hasType(Context::FileContext)) - { - // file context menu - const FileContext *fcontext = static_cast(context); - - //use context and plug actions here - } - else if (context->hasType(Context::ProjectModelItemContext)) - { - // project tree context menu - const ProjectModelItemContext *pcontext = static_cast(context); - - // use context and plug actions here - } - else if (context->hasType(Context::CodeModelItemContext)) - { - // class tree context menu - const CodeModelItemContext *mcontext = static_cast(context); - - // use context and plug actions here - } - else if (context->hasType(Context::DocumentationContext)) - { - // documentation viewer context menu - const DocumentationContext *dcontext = static_cast(context); - - // use context and plug actions here - } -} - -void %{APPNAME}Part::projectOpened() -{ -// do something when the project is opened -} - -void %{APPNAME}Part::projectClosed() -{ -// do something when the project is closed -} - -void %{APPNAME}Part::doSomething() -{ -// do something useful here instead of showing the message box - KMessageBox::information(m_widget, i18n("This action does nothing."), i18n("%{APPNAME} Plugin")); -} - -#include "%{APPNAMELC}part.moc" diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart_part.h b/languages/cpp/app_templates/tdevpart2/tdevpart_part.h deleted file mode 100644 index 1d61dd0c..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart_part.h +++ /dev/null @@ -1,46 +0,0 @@ -%{H_TEMPLATE} -#ifndef TDEV%{APPNAMEUC}_H -#define TDEV%{APPNAMEUC}_H - -#include - -#include - -class TQPopupMenu; -class TDEAction; -class KDialogBase; -class Context; -class ConfigWidgetProxy; -class %{APPNAME}Widget; - -/** -Please read the README.dox file for more info about this part -*/ -class %{APPNAME}Part: public TDevPlugin -{ - Q_OBJECT - -public: - %{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &args); - ~%{APPNAME}Part(); - -private slots: - void init(); - - void insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo); - void contextMenu(TQPopupMenu *popup, const Context *context); - void projectOpened(); - void projectClosed(); - - void doSomething(); - -private: - void setupActions(); - - TDEAction *action; - - TQGuardedPtr<%{APPNAME}Widget> m_widget; - ConfigWidgetProxy *m_configProxy; -}; - -#endif diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart_part.rc b/languages/cpp/app_templates/tdevpart2/tdevpart_part.rc deleted file mode 100644 index a38ee14e..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart_part.rc +++ /dev/null @@ -1,11 +0,0 @@ - - - -

    &Tools - - - - - - - diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart_widget.cpp b/languages/cpp/app_templates/tdevpart2/tdevpart_widget.cpp deleted file mode 100644 index 1f356afd..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart_widget.cpp +++ /dev/null @@ -1,21 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}widget.h" - -#include -#include -#include - -#include - -#include "%{APPNAMELC}part.h" - -%{APPNAME}Widget::%{APPNAME}Widget(%{APPNAME}Part *part) - : TQWidget(0, "%{APPNAMELC} widget"), m_part(part) -{ -} - -%{APPNAME}Widget::~%{APPNAME}Widget() -{ -} - -#include "%{APPNAMELC}widget.moc" diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart_widget.h b/languages/cpp/app_templates/tdevpart2/tdevpart_widget.h deleted file mode 100644 index e9762de3..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart_widget.h +++ /dev/null @@ -1,24 +0,0 @@ -%{H_TEMPLATE} -#ifndef %{APPNAMEUC}_WIDGET_H -#define %{APPNAMEUC}_WIDGET_H - -#include -#include - -class TDevProject; -class %{APPNAME}Part; - -class %{APPNAME}Widget: public TQWidget -{ - Q_OBJECT - -public: - %{APPNAME}Widget(%{APPNAME}Part *part); - ~%{APPNAME}Widget(); - -private: - %{APPNAME}Part *m_part; -}; - - -#endif diff --git a/languages/cpp/app_templates/win32gui/CMakeLists.txt b/languages/cpp/app_templates/win32gui/CMakeLists.txt index 3e7bf9d0..09d0bc52 100644 --- a/languages/cpp/app_templates/win32gui/CMakeLists.txt +++ b/languages/cpp/app_templates/win32gui/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( win32gui.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/win32gui.tar.gz win32gui.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - win32gui.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + win32gui.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/win32gui/Makefile.am b/languages/cpp/app_templates/win32gui/Makefile.am index d315f718..a29fa6a8 100644 --- a/languages/cpp/app_templates/win32gui/Makefile.am +++ b/languages/cpp/app_templates/win32gui/Makefile.am @@ -4,10 +4,10 @@ dataFiles = app.cpp src-Makefile.am win32gui-Makefile.am win32gui-Makefile.cvs \ templateName = win32gui ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/win32gui/app.tdevelop b/languages/cpp/app_templates/win32gui/app.tdevelop index 53ec087b..eb9bbdbd 100644 --- a/languages/cpp/app_templates/win32gui/app.tdevelop +++ b/languages/cpp/app_templates/win32gui/app.tdevelop @@ -16,7 +16,7 @@ - + src/%{APPNAMELC} debug @@ -103,8 +103,8 @@ 0 - - + + clanlib opengl @@ -120,15 +120,15 @@ TDE Libraries (Doxygen) - - + + - - + + @@ -139,14 +139,14 @@ *.o,*.lo,CVS false - + .h .cpp - + true true @@ -164,8 +164,8 @@ TDElibs ksjembed - - + + @@ -182,11 +182,11 @@ true 10 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/win32gui/win32gui.kdevtemplate b/languages/cpp/app_templates/win32gui/win32gui.kdevtemplate new file mode 100644 index 00000000..dec00262 --- /dev/null +++ b/languages/cpp/app_templates/win32gui/win32gui.kdevtemplate @@ -0,0 +1,137 @@ +# TDE Config File +[General] +Name=Simple Win32 GUI App. +Name[ca]=Simple aplicació per a Win32. +Name[da]=Simpelt Win32 GUI-program. +Name[de]=Einfache Win32-GUI-Anwendung +Name[el]=Απλή εφαρμογή γραφικού περιβάλλοντος Win32. +Name[es]=Aplicación sencilla para Win32 +Name[et]=Lihtne Win32 graafilise kasutajaliidese rakendus +Name[eu]=Win32 GUI aplikazio sinplea. +Name[fa]=کاربرد سادۀ ونک Win32 +Name[fr]=Interface graphique Win32 simple. +Name[ga]=Feidhmchlár Simplí Win32 le Comhéadan Grafach +Name[gl]=Aplicación sinxela Win32. +Name[hu]=Egyszerű Win32-alapú, grafikus felületű alkalmazás +Name[it]=Semplice applicazione GUI Win32. +Name[ja]=簡単な Win32 GUI アプリケーション +Name[nds]=Eenfach Win32-Böversietprogramm. +Name[ne]=साधारण Win32 GUI अनुप्रयोग +Name[nl]=Eenvoudige Win32 GUI-toepassing +Name[pl]=Prosty program Win32 +Name[pt]=Aplicação gráfica simples em Win32. +Name[pt_BR]=Aplicação gráfica simples em Win32. +Name[ru]=Простое графическое приложение Windows +Name[sk]=Jednoduchá Win32 GUI aplikácia +Name[sr]=Једноставан Win32 програм са GUI-јем. +Name[sr@Latn]=Jednostavan Win32 program sa GUI-jem. +Name[sv]=Enkelt Win32-program med grafiskt gränssnitt +Name[tr]=Basit Win32 Grafik Arayüz Uygulaması +Name[zh_CN]=简单的 Win32 GUI 应用程序 +Name[zh_TW]=簡單的 Win32 使用者介面應用程式 +Icon=win32gui.png +Category=C++ +Comment=Generates a shell project for crosscompiling Win32 projects. +Comment[ca]=Genera un projecte d'intèrpret de comandaments per a la compilació multi plataforma de projectes per a Win32. +Comment[da]=Genererer et skalprojekt for krydskompilering af Win32-projekter. +Comment[de]=Erstellt ein Shell-Projekt für plattformunabhängige Win32-Projekte. +Comment[el]=Δημιουργία ενός έργου κελύφους για μεταγλώττιση έργων Win32 σε διαφορετικές πλατφόρμες. +Comment[es]=Genera un proyecto de intérprete de órdenes para compilación multiplataforma de proyectos Win32. +Comment[et]=Shelliprojekti loomine Win32 projektide kompileerimiseks. +Comment[eu]=Win32 proiektuak konpilazio gurutzaturako shell proiektu bat sortzen du. +Comment[fa]=یک پروژۀ پوسته برای پروژه‌های Win32 ترجمۀ بین سکویی تولید می‌کند. +Comment[fr]=Génère un projet shell pour la compilation croisée de projets Win32. +Comment[gl]=Xera un proxecto shell para a compilación cruzada de proxectos Win32. +Comment[hu]=Létrehoz egy konzolos projektet Win32-projektek keresztfordításához. +Comment[it]=Genera un progetto di shell per progetti Win32 multi compilanti. +Comment[nds]=Stellt en Konsoolprojekt för't Krüüzkompileren vun Win32-Projekten op. +Comment[ne]=क्रसकम्पाइलिङ Win32 परियोजनाका लागि शेल परियोजना उत्पन्न गर्दछ +Comment[nl]=Genereert een shellproject voor crosscompilerende Win32-projecten. +Comment[pl]=Generuje powłokę do kompilacji projektów dla Win32. +Comment[pt]=Gera um projecto para poder compilar projectos em Win32. +Comment[pt_BR]=Gera um projecto para poder compilar projectos em Win32. +Comment[ru]=Создание проекта для кросс-компиляции проектов Win32. +Comment[sk]=Vygenruje shell projekt pre kompiláciu Win32 projektov. +Comment[sr]=Прави пројекат за прекопревођење Win32 пројеката. +Comment[sr@Latn]=Pravi projekat za prekoprevođenje Win32 projekata. +Comment[sv]=Skapar ett skalprojekt för korskompilering av Win32-projekt. +Comment[tr]=Win32 projelerini karşıderlemek için bir kabul projesi yarat. +Comment[zh_CN]=生成跨平台编译的 Win32 工程的外壳工程。 +Comment[zh_TW]=產生一個 shell 專案,可在 Win32 跨平台編譯。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=src/%{APPNAMELC}.cpp +Archive=win32gui.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/win32gui-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/win32gui-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/win32gui-configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=For this project to compile and run you need both Wine and MinGW installed. +Comment[ca]=Per a compilar i executar aquest projecte us caldrà instal·lar Wine i MinGW. +Comment[da]=For at dette projekt skal kompilere og køre har du brug for at have både Wine og MinGW installeret. +Comment[de]=Um dieses Projekt kompilieren und ausführen zu können, muss sowohl Wine als auch MinGW installiert sein. +Comment[el]=Για να μεταγλωττιστεί και να εκτελεστεί αυτό το έργο χρειάζεστε τόσο το Wine όσο και το MinGW εγκατεστημένα. +Comment[es]=Para compilar y ejecutar este proyecto necesitará tener instalados Wine y MinGW. +Comment[et]=Selle projekti kompileerimiseks ja käivitamiseks peab olema paigaldatud nii Wine kui MinGW. +Comment[eu]=Proiektu hau konpilatzeko eta exekutatzeko Wine eta MinGw instalatuta izan behar dituzu. +Comment[fa]=برای ترجمه و اجرای این پروژه، هم نیاز به نصب Wine و هم نیاز به MinGW دارید. +Comment[fr]=Pour que ce projet compile et s'exécute, vous devez installer Wine et MinGW. +Comment[gl]=Para poder compilar e executar este proxecto necesita ter instalados Wine e MinGW. +Comment[hu]=A projekt lefordításához és futtatásához szükség van a Wine és a MinGW telepítésére. +Comment[it]=Per compilare ed eseguire questo progetto dei avere sia Wine che MinGW installati. +Comment[nds]=Wine un MinGW mööt installeert wesen, wenn Du dit Projekt kompileren un utföhren wullt. +Comment[ne]=यो परियोजनाका लागि कम्पाइल गर्न र चलाउन तपाईँले वाइन र MinGW स्थापना गरेको हुनुपर्दछ । +Comment[nl]=Om dit project te kunnen compileren en uitvoeren hebt u Wine en MinGW nodig. +Comment[pl]=Do kompilacji takiego projektu potrzebne są Wine oraz MinGW. +Comment[pt]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. +Comment[pt_BR]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. +Comment[ru]=Для сборки и запуска этого проекта вам необходимо установить Wine и MinGW . +Comment[sk]=Na kompiláciu tohoto projektu potrebujete mať nainštalované Wine a MinGW. +Comment[sr]=Да би се овај пројекат превео и покренуо, и Wine и MinGW морају бити инсталирани. +Comment[sr@Latn]=Da bi se ovaj projekat preveo i pokrenuo, i Wine i MinGW moraju biti instalirani. +Comment[sv]=För att projektet ska kompileras och köras behöver du ha installerat både Wine och MinGW. +Comment[tr]=Bu projenin derlenmesi için Wine ve MinGW'nin kurulu olması lazım. +Comment[zh_CN]=要让此工程能够编译并运行,您需要同时安装 Wine 和 MinGW。 +Comment[zh_TW]=這個專案要編譯,您需要安裝 Wine 與 MinGW。 + diff --git a/languages/cpp/app_templates/win32gui/win32gui.tdevtemplate b/languages/cpp/app_templates/win32gui/win32gui.tdevtemplate deleted file mode 100644 index cd15f549..00000000 --- a/languages/cpp/app_templates/win32gui/win32gui.tdevtemplate +++ /dev/null @@ -1,137 +0,0 @@ -# TDE Config File -[General] -Name=Simple Win32 GUI App. -Name[ca]=Simple aplicació per a Win32. -Name[da]=Simpelt Win32 GUI-program. -Name[de]=Einfache Win32-GUI-Anwendung -Name[el]=Απλή εφαρμογή γραφικού περιβάλλοντος Win32. -Name[es]=Aplicación sencilla para Win32 -Name[et]=Lihtne Win32 graafilise kasutajaliidese rakendus -Name[eu]=Win32 GUI aplikazio sinplea. -Name[fa]=کاربرد سادۀ ونک Win32 -Name[fr]=Interface graphique Win32 simple. -Name[ga]=Feidhmchlár Simplí Win32 le Comhéadan Grafach -Name[gl]=Aplicación sinxela Win32. -Name[hu]=Egyszerű Win32-alapú, grafikus felületű alkalmazás -Name[it]=Semplice applicazione GUI Win32. -Name[ja]=簡単な Win32 GUI アプリケーション -Name[nds]=Eenfach Win32-Böversietprogramm. -Name[ne]=साधारण Win32 GUI अनुप्रयोग -Name[nl]=Eenvoudige Win32 GUI-toepassing -Name[pl]=Prosty program Win32 -Name[pt]=Aplicação gráfica simples em Win32. -Name[pt_BR]=Aplicação gráfica simples em Win32. -Name[ru]=Простое графическое приложение Windows -Name[sk]=Jednoduchá Win32 GUI aplikácia -Name[sr]=Једноставан Win32 програм са GUI-јем. -Name[sr@Latn]=Jednostavan Win32 program sa GUI-jem. -Name[sv]=Enkelt Win32-program med grafiskt gränssnitt -Name[tr]=Basit Win32 Grafik Arayüz Uygulaması -Name[zh_CN]=简单的 Win32 GUI 应用程序 -Name[zh_TW]=簡單的 Win32 使用者介面應用程式 -Icon=win32gui.png -Category=C++ -Comment=Generates a shell project for crosscompiling Win32 projects. -Comment[ca]=Genera un projecte d'intèrpret de comandaments per a la compilació multi plataforma de projectes per a Win32. -Comment[da]=Genererer et skalprojekt for krydskompilering af Win32-projekter. -Comment[de]=Erstellt ein Shell-Projekt für plattformunabhängige Win32-Projekte. -Comment[el]=Δημιουργία ενός έργου κελύφους για μεταγλώττιση έργων Win32 σε διαφορετικές πλατφόρμες. -Comment[es]=Genera un proyecto de intérprete de órdenes para compilación multiplataforma de proyectos Win32. -Comment[et]=Shelliprojekti loomine Win32 projektide kompileerimiseks. -Comment[eu]=Win32 proiektuak konpilazio gurutzaturako shell proiektu bat sortzen du. -Comment[fa]=یک پروژۀ پوسته برای پروژه‌های Win32 ترجمۀ بین سکویی تولید می‌کند. -Comment[fr]=Génère un projet shell pour la compilation croisée de projets Win32. -Comment[gl]=Xera un proxecto shell para a compilación cruzada de proxectos Win32. -Comment[hu]=Létrehoz egy konzolos projektet Win32-projektek keresztfordításához. -Comment[it]=Genera un progetto di shell per progetti Win32 multi compilanti. -Comment[nds]=Stellt en Konsoolprojekt för't Krüüzkompileren vun Win32-Projekten op. -Comment[ne]=क्रसकम्पाइलिङ Win32 परियोजनाका लागि शेल परियोजना उत्पन्न गर्दछ -Comment[nl]=Genereert een shellproject voor crosscompilerende Win32-projecten. -Comment[pl]=Generuje powłokę do kompilacji projektów dla Win32. -Comment[pt]=Gera um projecto para poder compilar projectos em Win32. -Comment[pt_BR]=Gera um projecto para poder compilar projectos em Win32. -Comment[ru]=Создание проекта для кросс-компиляции проектов Win32. -Comment[sk]=Vygenruje shell projekt pre kompiláciu Win32 projektov. -Comment[sr]=Прави пројекат за прекопревођење Win32 пројеката. -Comment[sr@Latn]=Pravi projekat za prekoprevođenje Win32 projekata. -Comment[sv]=Skapar ett skalprojekt för korskompilering av Win32-projekt. -Comment[tr]=Win32 projelerini karşıderlemek için bir kabul projesi yarat. -Comment[zh_CN]=生成跨平台编译的 Win32 工程的外壳工程。 -Comment[zh_TW]=產生一個 shell 專案,可在 Win32 跨平台編譯。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=src/%{APPNAMELC}.cpp -Archive=win32gui.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/win32gui-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/win32gui-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/win32gui-configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=For this project to compile and run you need both Wine and MinGW installed. -Comment[ca]=Per a compilar i executar aquest projecte us caldrà instal·lar Wine i MinGW. -Comment[da]=For at dette projekt skal kompilere og køre har du brug for at have både Wine og MinGW installeret. -Comment[de]=Um dieses Projekt kompilieren und ausführen zu können, muss sowohl Wine als auch MinGW installiert sein. -Comment[el]=Για να μεταγλωττιστεί και να εκτελεστεί αυτό το έργο χρειάζεστε τόσο το Wine όσο και το MinGW εγκατεστημένα. -Comment[es]=Para compilar y ejecutar este proyecto necesitará tener instalados Wine y MinGW. -Comment[et]=Selle projekti kompileerimiseks ja käivitamiseks peab olema paigaldatud nii Wine kui MinGW. -Comment[eu]=Proiektu hau konpilatzeko eta exekutatzeko Wine eta MinGw instalatuta izan behar dituzu. -Comment[fa]=برای ترجمه و اجرای این پروژه، هم نیاز به نصب Wine و هم نیاز به MinGW دارید. -Comment[fr]=Pour que ce projet compile et s'exécute, vous devez installer Wine et MinGW. -Comment[gl]=Para poder compilar e executar este proxecto necesita ter instalados Wine e MinGW. -Comment[hu]=A projekt lefordításához és futtatásához szükség van a Wine és a MinGW telepítésére. -Comment[it]=Per compilare ed eseguire questo progetto dei avere sia Wine che MinGW installati. -Comment[nds]=Wine un MinGW mööt installeert wesen, wenn Du dit Projekt kompileren un utföhren wullt. -Comment[ne]=यो परियोजनाका लागि कम्पाइल गर्न र चलाउन तपाईँले वाइन र MinGW स्थापना गरेको हुनुपर्दछ । -Comment[nl]=Om dit project te kunnen compileren en uitvoeren hebt u Wine en MinGW nodig. -Comment[pl]=Do kompilacji takiego projektu potrzebne są Wine oraz MinGW. -Comment[pt]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. -Comment[pt_BR]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. -Comment[ru]=Для сборки и запуска этого проекта вам необходимо установить Wine и MinGW . -Comment[sk]=Na kompiláciu tohoto projektu potrebujete mať nainštalované Wine a MinGW. -Comment[sr]=Да би се овај пројекат превео и покренуо, и Wine и MinGW морају бити инсталирани. -Comment[sr@Latn]=Da bi se ovaj projekat preveo i pokrenuo, i Wine i MinGW moraju biti instalirani. -Comment[sv]=För att projektet ska kompileras och köras behöver du ha installerat både Wine och MinGW. -Comment[tr]=Bu projenin derlenmesi için Wine ve MinGW'nin kurulu olması lazım. -Comment[zh_CN]=要让此工程能够编译并运行,您需要同时安装 Wine 和 MinGW。 -Comment[zh_TW]=這個專案要編譯,您需要安裝 Wine 與 MinGW。 - diff --git a/languages/cpp/app_templates/win32hello/CMakeLists.txt b/languages/cpp/app_templates/win32hello/CMakeLists.txt index 9cc35db0..bc1c8d80 100644 --- a/languages/cpp/app_templates/win32hello/CMakeLists.txt +++ b/languages/cpp/app_templates/win32hello/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( win32hello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/win32hello.tar.gz win32hello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - win32hello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + win32hello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/win32hello/Makefile.am b/languages/cpp/app_templates/win32hello/Makefile.am index 813c591f..a55bcebc 100644 --- a/languages/cpp/app_templates/win32hello/Makefile.am +++ b/languages/cpp/app_templates/win32hello/Makefile.am @@ -4,10 +4,10 @@ dataFiles = app.cpp src-Makefile.am win32-Makefile.am win32-Makefile.cvs \ templateName = win32hello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/win32hello/app.tdevelop b/languages/cpp/app_templates/win32hello/app.tdevelop index 3ee2b1af..672646c4 100644 --- a/languages/cpp/app_templates/win32hello/app.tdevelop +++ b/languages/cpp/app_templates/win32hello/app.tdevelop @@ -16,7 +16,7 @@ - + src/%{APPNAMELC} default @@ -75,8 +75,8 @@ 0 - - + + clanlib opengl @@ -92,15 +92,15 @@ TDE Libraries (Doxygen) - - + + - - + + @@ -111,14 +111,14 @@ *.o,*.lo,CVS false - + .h .cpp - + true true @@ -136,8 +136,8 @@ TDElibs ksjembed - - + + @@ -154,11 +154,11 @@ true 10 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/win32hello/win32hello.kdevtemplate b/languages/cpp/app_templates/win32hello/win32hello.kdevtemplate new file mode 100644 index 00000000..3b5f4f3e --- /dev/null +++ b/languages/cpp/app_templates/win32hello/win32hello.kdevtemplate @@ -0,0 +1,136 @@ +# TDE Config File +[General] +Name=Simple Win32 Hello World +Name[ca]=Simple Hello World per a Win32 +Name[da]=Simpelt Win32 Goddag verden +Name[de]=Einfaches Win32-"Hello World"-Programm +Name[el]=Απλό Γεια σου Κόσμε Win32 +Name[es]=Sencillo programa «Hola mundo» para Win32 +Name[et]=Lihtne Win32 "Tere, maailm" +Name[eu]=Win32 "Kaixo mundua" aplikazio sinple bat +Name[fa]=Hello World سادۀ Win32 +Name[fr]=« Bonjour monde » Win32 simple +Name[ga]=Ríomhchlár simplí "Hello World" le haghaidh Win32 +Name[gl]=Aplicación Win32 sinxela Ola mundo +Name[hu]=Win32-alapú Hello world program +Name[it]=Semplice "Hello World" Win32 +Name[nds]=Eenfach Win32-"Moin Welt"-Programm +Name[ne]=साधारण Win32 हेल्लो वोल्ड +Name[nl]=Eenvoudige Win32 Hello World +Name[pl]=Prosty program Witaj świecie dla Win32 +Name[pt]=Olá Mundo Simples em Win32 +Name[pt_BR]=Olá Mundo Simples em Win32 +Name[ru]=Простое приложение Hello World для Windows +Name[sk]=Jenoduchý Ahoj svet Win32 program +Name[sr]=Једноставан Win32 „Здраво свете“ +Name[sr@Latn]=Jednostavan Win32 „Zdravo svete“ +Name[sv]=Enkelt Win32 Hello World +Name[tr]=Basit Win32 Merhaba Dünya +Name[zh_CN]=简单的 Win32 Hello World +Name[zh_TW]=簡單的 Win32 Hello World +Icon=win32hello.png +Category=C++ +Comment=Generates a shell project for crosscompiling Win32 projects. +Comment[ca]=Genera un projecte d'intèrpret de comandaments per a la compilació multi plataforma de projectes per a Win32. +Comment[da]=Genererer et skalprojekt for krydskompilering af Win32-projekter. +Comment[de]=Erstellt ein Shell-Projekt für plattformunabhängige Win32-Projekte. +Comment[el]=Δημιουργία ενός έργου κελύφους για μεταγλώττιση έργων Win32 σε διαφορετικές πλατφόρμες. +Comment[es]=Genera un proyecto de intérprete de órdenes para compilación multiplataforma de proyectos Win32. +Comment[et]=Shelliprojekti loomine Win32 projektide kompileerimiseks. +Comment[eu]=Win32 proiektuak konpilazio gurutzaturako shell proiektu bat sortzen du. +Comment[fa]=یک پروژۀ پوسته برای پروژه‌های Win32 ترجمۀ بین سکویی تولید می‌کند. +Comment[fr]=Génère un projet shell pour la compilation croisée de projets Win32. +Comment[gl]=Xera un proxecto shell para a compilación cruzada de proxectos Win32. +Comment[hu]=Létrehoz egy konzolos projektet Win32-projektek keresztfordításához. +Comment[it]=Genera un progetto di shell per progetti Win32 multi compilanti. +Comment[nds]=Stellt en Konsoolprojekt för't Krüüzkompileren vun Win32-Projekten op. +Comment[ne]=क्रसकम्पाइलिङ Win32 परियोजनाका लागि शेल परियोजना उत्पन्न गर्दछ +Comment[nl]=Genereert een shellproject voor crosscompilerende Win32-projecten. +Comment[pl]=Generuje powłokę do kompilacji projektów dla Win32. +Comment[pt]=Gera um projecto para poder compilar projectos em Win32. +Comment[pt_BR]=Gera um projecto para poder compilar projectos em Win32. +Comment[ru]=Создание проекта для кросс-компиляции проектов Win32. +Comment[sk]=Vygenruje shell projekt pre kompiláciu Win32 projektov. +Comment[sr]=Прави пројекат за прекопревођење Win32 пројеката. +Comment[sr@Latn]=Pravi projekat za prekoprevođenje Win32 projekata. +Comment[sv]=Skapar ett skalprojekt för korskompilering av Win32-projekt. +Comment[tr]=Win32 projelerini karşıderlemek için bir kabul projesi yarat. +Comment[zh_CN]=生成跨平台编译的 Win32 工程的外壳工程。 +Comment[zh_TW]=產生一個 shell 專案,可在 Win32 跨平台編譯。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=src/%{APPNAMELC}.cpp +Archive=win32hello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/win32-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/win32-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/win32-configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=For this project to compile and run you need both Wine and MinGW installed. +Comment[ca]=Per a compilar i executar aquest projecte us caldrà instal·lar Wine i MinGW. +Comment[da]=For at dette projekt skal kompilere og køre har du brug for at have både Wine og MinGW installeret. +Comment[de]=Um dieses Projekt kompilieren und ausführen zu können, muss sowohl Wine als auch MinGW installiert sein. +Comment[el]=Για να μεταγλωττιστεί και να εκτελεστεί αυτό το έργο χρειάζεστε τόσο το Wine όσο και το MinGW εγκατεστημένα. +Comment[es]=Para compilar y ejecutar este proyecto necesitará tener instalados Wine y MinGW. +Comment[et]=Selle projekti kompileerimiseks ja käivitamiseks peab olema paigaldatud nii Wine kui MinGW. +Comment[eu]=Proiektu hau konpilatzeko eta exekutatzeko Wine eta MinGw instalatuta izan behar dituzu. +Comment[fa]=برای ترجمه و اجرای این پروژه، هم نیاز به نصب Wine و هم نیاز به MinGW دارید. +Comment[fr]=Pour que ce projet compile et s'exécute, vous devez installer Wine et MinGW. +Comment[gl]=Para poder compilar e executar este proxecto necesita ter instalados Wine e MinGW. +Comment[hu]=A projekt lefordításához és futtatásához szükség van a Wine és a MinGW telepítésére. +Comment[it]=Per compilare ed eseguire questo progetto dei avere sia Wine che MinGW installati. +Comment[nds]=Wine un MinGW mööt installeert wesen, wenn Du dit Projekt kompileren un utföhren wullt. +Comment[ne]=यो परियोजनाका लागि कम्पाइल गर्न र चलाउन तपाईँले वाइन र MinGW स्थापना गरेको हुनुपर्दछ । +Comment[nl]=Om dit project te kunnen compileren en uitvoeren hebt u Wine en MinGW nodig. +Comment[pl]=Do kompilacji takiego projektu potrzebne są Wine oraz MinGW. +Comment[pt]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. +Comment[pt_BR]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. +Comment[ru]=Для сборки и запуска этого проекта вам необходимо установить Wine и MinGW . +Comment[sk]=Na kompiláciu tohoto projektu potrebujete mať nainštalované Wine a MinGW. +Comment[sr]=Да би се овај пројекат превео и покренуо, и Wine и MinGW морају бити инсталирани. +Comment[sr@Latn]=Da bi se ovaj projekat preveo i pokrenuo, i Wine i MinGW moraju biti instalirani. +Comment[sv]=För att projektet ska kompileras och köras behöver du ha installerat både Wine och MinGW. +Comment[tr]=Bu projenin derlenmesi için Wine ve MinGW'nin kurulu olması lazım. +Comment[zh_CN]=要让此工程能够编译并运行,您需要同时安装 Wine 和 MinGW。 +Comment[zh_TW]=這個專案要編譯,您需要安裝 Wine 與 MinGW。 + diff --git a/languages/cpp/app_templates/win32hello/win32hello.tdevtemplate b/languages/cpp/app_templates/win32hello/win32hello.tdevtemplate deleted file mode 100644 index ce8804a7..00000000 --- a/languages/cpp/app_templates/win32hello/win32hello.tdevtemplate +++ /dev/null @@ -1,136 +0,0 @@ -# TDE Config File -[General] -Name=Simple Win32 Hello World -Name[ca]=Simple Hello World per a Win32 -Name[da]=Simpelt Win32 Goddag verden -Name[de]=Einfaches Win32-"Hello World"-Programm -Name[el]=Απλό Γεια σου Κόσμε Win32 -Name[es]=Sencillo programa «Hola mundo» para Win32 -Name[et]=Lihtne Win32 "Tere, maailm" -Name[eu]=Win32 "Kaixo mundua" aplikazio sinple bat -Name[fa]=Hello World سادۀ Win32 -Name[fr]=« Bonjour monde » Win32 simple -Name[ga]=Ríomhchlár simplí "Hello World" le haghaidh Win32 -Name[gl]=Aplicación Win32 sinxela Ola mundo -Name[hu]=Win32-alapú Hello world program -Name[it]=Semplice "Hello World" Win32 -Name[nds]=Eenfach Win32-"Moin Welt"-Programm -Name[ne]=साधारण Win32 हेल्लो वोल्ड -Name[nl]=Eenvoudige Win32 Hello World -Name[pl]=Prosty program Witaj świecie dla Win32 -Name[pt]=Olá Mundo Simples em Win32 -Name[pt_BR]=Olá Mundo Simples em Win32 -Name[ru]=Простое приложение Hello World для Windows -Name[sk]=Jenoduchý Ahoj svet Win32 program -Name[sr]=Једноставан Win32 „Здраво свете“ -Name[sr@Latn]=Jednostavan Win32 „Zdravo svete“ -Name[sv]=Enkelt Win32 Hello World -Name[tr]=Basit Win32 Merhaba Dünya -Name[zh_CN]=简单的 Win32 Hello World -Name[zh_TW]=簡單的 Win32 Hello World -Icon=win32hello.png -Category=C++ -Comment=Generates a shell project for crosscompiling Win32 projects. -Comment[ca]=Genera un projecte d'intèrpret de comandaments per a la compilació multi plataforma de projectes per a Win32. -Comment[da]=Genererer et skalprojekt for krydskompilering af Win32-projekter. -Comment[de]=Erstellt ein Shell-Projekt für plattformunabhängige Win32-Projekte. -Comment[el]=Δημιουργία ενός έργου κελύφους για μεταγλώττιση έργων Win32 σε διαφορετικές πλατφόρμες. -Comment[es]=Genera un proyecto de intérprete de órdenes para compilación multiplataforma de proyectos Win32. -Comment[et]=Shelliprojekti loomine Win32 projektide kompileerimiseks. -Comment[eu]=Win32 proiektuak konpilazio gurutzaturako shell proiektu bat sortzen du. -Comment[fa]=یک پروژۀ پوسته برای پروژه‌های Win32 ترجمۀ بین سکویی تولید می‌کند. -Comment[fr]=Génère un projet shell pour la compilation croisée de projets Win32. -Comment[gl]=Xera un proxecto shell para a compilación cruzada de proxectos Win32. -Comment[hu]=Létrehoz egy konzolos projektet Win32-projektek keresztfordításához. -Comment[it]=Genera un progetto di shell per progetti Win32 multi compilanti. -Comment[nds]=Stellt en Konsoolprojekt för't Krüüzkompileren vun Win32-Projekten op. -Comment[ne]=क्रसकम्पाइलिङ Win32 परियोजनाका लागि शेल परियोजना उत्पन्न गर्दछ -Comment[nl]=Genereert een shellproject voor crosscompilerende Win32-projecten. -Comment[pl]=Generuje powłokę do kompilacji projektów dla Win32. -Comment[pt]=Gera um projecto para poder compilar projectos em Win32. -Comment[pt_BR]=Gera um projecto para poder compilar projectos em Win32. -Comment[ru]=Создание проекта для кросс-компиляции проектов Win32. -Comment[sk]=Vygenruje shell projekt pre kompiláciu Win32 projektov. -Comment[sr]=Прави пројекат за прекопревођење Win32 пројеката. -Comment[sr@Latn]=Pravi projekat za prekoprevođenje Win32 projekata. -Comment[sv]=Skapar ett skalprojekt för korskompilering av Win32-projekt. -Comment[tr]=Win32 projelerini karşıderlemek için bir kabul projesi yarat. -Comment[zh_CN]=生成跨平台编译的 Win32 工程的外壳工程。 -Comment[zh_TW]=產生一個 shell 專案,可在 Win32 跨平台編譯。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=src/%{APPNAMELC}.cpp -Archive=win32hello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/win32-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/win32-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/win32-configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=For this project to compile and run you need both Wine and MinGW installed. -Comment[ca]=Per a compilar i executar aquest projecte us caldrà instal·lar Wine i MinGW. -Comment[da]=For at dette projekt skal kompilere og køre har du brug for at have både Wine og MinGW installeret. -Comment[de]=Um dieses Projekt kompilieren und ausführen zu können, muss sowohl Wine als auch MinGW installiert sein. -Comment[el]=Για να μεταγλωττιστεί και να εκτελεστεί αυτό το έργο χρειάζεστε τόσο το Wine όσο και το MinGW εγκατεστημένα. -Comment[es]=Para compilar y ejecutar este proyecto necesitará tener instalados Wine y MinGW. -Comment[et]=Selle projekti kompileerimiseks ja käivitamiseks peab olema paigaldatud nii Wine kui MinGW. -Comment[eu]=Proiektu hau konpilatzeko eta exekutatzeko Wine eta MinGw instalatuta izan behar dituzu. -Comment[fa]=برای ترجمه و اجرای این پروژه، هم نیاز به نصب Wine و هم نیاز به MinGW دارید. -Comment[fr]=Pour que ce projet compile et s'exécute, vous devez installer Wine et MinGW. -Comment[gl]=Para poder compilar e executar este proxecto necesita ter instalados Wine e MinGW. -Comment[hu]=A projekt lefordításához és futtatásához szükség van a Wine és a MinGW telepítésére. -Comment[it]=Per compilare ed eseguire questo progetto dei avere sia Wine che MinGW installati. -Comment[nds]=Wine un MinGW mööt installeert wesen, wenn Du dit Projekt kompileren un utföhren wullt. -Comment[ne]=यो परियोजनाका लागि कम्पाइल गर्न र चलाउन तपाईँले वाइन र MinGW स्थापना गरेको हुनुपर्दछ । -Comment[nl]=Om dit project te kunnen compileren en uitvoeren hebt u Wine en MinGW nodig. -Comment[pl]=Do kompilacji takiego projektu potrzebne są Wine oraz MinGW. -Comment[pt]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. -Comment[pt_BR]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. -Comment[ru]=Для сборки и запуска этого проекта вам необходимо установить Wine и MinGW . -Comment[sk]=Na kompiláciu tohoto projektu potrebujete mať nainštalované Wine a MinGW. -Comment[sr]=Да би се овај пројекат превео и покренуо, и Wine и MinGW морају бити инсталирани. -Comment[sr@Latn]=Da bi se ovaj projekat preveo i pokrenuo, i Wine i MinGW moraju biti instalirani. -Comment[sv]=För att projektet ska kompileras och köras behöver du ha installerat både Wine och MinGW. -Comment[tr]=Bu projenin derlenmesi için Wine ve MinGW'nin kurulu olması lazım. -Comment[zh_CN]=要让此工程能够编译并运行,您需要同时安装 Wine 和 MinGW。 -Comment[zh_TW]=這個專案要編譯,您需要安裝 Wine 與 MinGW。 - diff --git a/languages/cpp/app_templates/wxhello/CMakeLists.txt b/languages/cpp/app_templates/wxhello/CMakeLists.txt index 48d382bd..f1a8ffec 100644 --- a/languages/cpp/app_templates/wxhello/CMakeLists.txt +++ b/languages/cpp/app_templates/wxhello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( wxhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/wxhello.tar.gz wxhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - wxhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + wxhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/wxhello/Makefile.am b/languages/cpp/app_templates/wxhello/Makefile.am index f0e0839e..c45b1d10 100644 --- a/languages/cpp/app_templates/wxhello/Makefile.am +++ b/languages/cpp/app_templates/wxhello/Makefile.am @@ -4,10 +4,10 @@ dataFiles = src-Makefile.am app.cpp app.h app.tdevelop subdirs \ templateName = wxhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/wxhello/app.tdevelop b/languages/cpp/app_templates/wxhello/app.tdevelop index 9a3f0821..9de4fa75 100644 --- a/languages/cpp/app_templates/wxhello/app.tdevelop +++ b/languages/cpp/app_templates/wxhello/app.tdevelop @@ -12,7 +12,7 @@ wxWidgets - + src/%{APPNAMELC} debug @@ -37,16 +37,16 @@ -O0 -g3 - - + + - - + + ada ada_bugs_gcc @@ -91,24 +91,24 @@ TDE Libraries (Doxygen) - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/wxhello/wxhello.kdevtemplate b/languages/cpp/app_templates/wxhello/wxhello.kdevtemplate new file mode 100644 index 00000000..ed1cbc6a --- /dev/null +++ b/languages/cpp/app_templates/wxhello/wxhello.kdevtemplate @@ -0,0 +1,192 @@ +# TDE Config File +[General] +Name=Simple Hello wxWidgets Application +Name[ca]=Simple aplicació de Hello per a wxWidgets +Name[da]=Simpelt Goddag wxWidgets program +Name[de]=Einfache wxWidgets-Anwendung +Name[el]=Απλή εφαρμογή Γεια σου wxWidgets +Name[es]=Una sencilla aplicación «Hola mundo» con wxWidgets +Name[et]=Lihtne wxWidgets'i tervitusrakendus +Name[eu]=wxWidgets-en "Kaixo mundua" aplikazio sinple bat +Name[fa]=کاربرد سادۀ Hello wxWidgets +Name[fr]=Application « Bonjour monde » simple avec wxWidgets +Name[gl]=Aplicación sinxela Ola en wxWidgets +Name[hu]=wxWidgets-alapú Hello world program +Name[it]=Semplice applicazione wxWidgets di "Hello" +Name[ja]=簡単な wxWidget アプリケーション +Name[nds]=Eenfach wxWidgets-Programm "Moin" +Name[ne]=साधारण हेल्लो wxWidgets अनुप्रयोग +Name[nl]=Eenvoudige Hello wxWidgets-toepassing +Name[pl]=Prosty program Witaj używający wxWidgets +Name[pt]=Aplicação Olá Mundo Simples do wxWidgets +Name[pt_BR]=Aplicação Olá Mundo Simples do wxWidgets +Name[ru]=Простое приложение wxWidgets +Name[sk]=Jednoduchá wxWidgets Ahoj svet aplikácia +Name[sr]=Једноставан „Здраво“ wxWidgets програм +Name[sr@Latn]=Jednostavan „Zdravo“ wxWidgets program +Name[sv]=Enkelt Hello-program för wxWidgets +Name[tr]=Basit Merhaba wxWidgets Uygulaması +Name[zh_CN]=一个简单的 wxWidgets 应用程序 +Name[zh_TW]=簡單的 Hello wxWidgets 應用程式 +Category=C++/wxWidgets +Comment=Generates a simple wxWidgets Hello application. +Comment[ca]=Genera una simple aplicació de Hello per a wxWidgets. +Comment[da]=Genererer et simpelt wxWidgets Goddag-program. +Comment[de]=Erstellt eine einfache wxWidgets-Anwendung +Comment[el]=Δημιουργεί μια απλή εφαρμογή Γεια σου wxWidgets. +Comment[es]=Genera una sencilla aplicación «Hola mundo» con wxWidgets +Comment[et]=Lihtsa wxWidgets'i tervitusrakenduse loomine. +Comment[eu]=wxWidgets-en "Kaixo mundua"aplikazio sinple bat sortzen du. +Comment[fa]=یک کاربرد سادۀ wxWidgets Hello تولید می‌کند. +Comment[fr]=Une application « Bonjour monde » simple avec wxWidgets. +Comment[gl]=Xera unha aplicación sinxela Ola en wxWidgets. +Comment[hu]=Létrehoz egy egyszerű wxWidgets-alkalmazást. +Comment[it]=Genera una semplice applicazione wxWidgets di "Hello". +Comment[ja]=簡単な wxWidget アプリケーションを作成します +Comment[nds]=Stellt mit wxWidgets en eenfach "Moin"-Programm op. +Comment[ne]=साधारण wxWidgets हेल्लो अनुप्रयोग उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudige wxWidget Hello-toepassing. +Comment[pl]=Generuje prosty program Witaj wykorzystujący wxWidgets +Comment[pt]=Gera uma aplicação simples de Olá Mundo do wxWidgets. +Comment[pt_BR]=Gera uma aplicação simples de Olá Mundo do wxWidgets. +Comment[ru]=Создание простого приложения wxWidgets. +Comment[sk]=Vygeneruje jednoduchú wxWidgets Ahoj svet aplikáciu. +Comment[sr]=Прави једноставан „Здраво“ wxWidgets програм. +Comment[sr@Latn]=Pravi jednostavan „Zdravo“ wxWidgets program. +Comment[sv]=Skapar ett enkelt Hello-program för wxWidgets. +Comment[tr]=Basit bir wxWidgets Merhaba uygulaması yaratır. +Comment[zh_CN]=生成一个简单的 wxWidgets Hello 应用程序。 +Comment[zh_TW]=產生一個簡單的 wxWidgets Hello 應用程式。 +FileTemplates=h,CStyle,cpp,CStyle +Icon=wxhello.png +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=wxhello.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[WXARCH] +Type=install archive +Source=%{tdevelop}/template-common/wxwidgets.tar.gz +Dest=%{dest} + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[WX] +Type=include +File=%{tdevelop}/template-common/wx.kdevtemplate + +[FILE4] +Type=install +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/wx-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/wx-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/wx-configure.in +Dest=%{dest}/configure.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +#[FILE10] +#Type=install +#Source=%{src}/subdirs +#Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=Simple hello wxWidgets application was created in %{dest} +Comment[ca]=Simple aplicació de Hello per a wxWidgets ha estat creada en %{dest} +Comment[da]=Simpelt Goddag wxWidgets program blev oprettet i %{dest} +Comment[de]=Eine einfache wxWidgets-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια απλή εφαρμογή Γεια σου wxWidgets δημιουργήθηκε στο %{dest} +Comment[es]=Una sencilla aplicación «Hola mundo» con wxWidgets ha sido creada en %{dest} +Comment[et]=Lihtne wxWidgets'i tervitusrakendus loodi asukohta %{dest} +Comment[eu]=wxWidgets "Kaixo mundua" aplikazio sinple bat sortu da hemen: %{dest} +Comment[fa]=کاربرد سادۀ hello wxWidgets در %{dest} ایجاد شد +Comment[fr]=Une application « Bonjour monde » simple en wxWidgets a été créée dans %{dest} +Comment[gl]=Creouse unha aplicación sinxela Ola en wxWidgets en %{dest} +Comment[hu]=Létrejött egy egyszerű wxWidgets-alkalmazás itt: %{dest} +Comment[it]=È stata creata una semplice applicazione wxWidgets di "hello" in %{dest} +Comment[ja]=簡単な wxWidget アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach wxWidgets-Programm opstellt +Comment[ne]=साधारण हेल्लो wxWidgets अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Eenvoudige hello wxWidget-toepassing is aangemaakt in %{dest} +Comment[pl]=Prosty program Witaj wykorzystujący wxWidgets został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação simples de wxWidgets em %{dest} +Comment[pt_BR]=Foi criada uma aplicação simples de wxWidgets em %{dest} +Comment[ru]=Простое приложение wxWidgets создано в %{dest} +Comment[sk]=Jedniduchá wxWidgets Ahoj svet aplikácia bola vytvorená v %{dest} +Comment[sr]=Једноставан „Здраво“ wxWidgets програм направљен је у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo“ wxWidgets program napravljen je u %{dest} +Comment[sv]=Ett enkelt Hello-program för wxWidgets.skapades i %{dest} +Comment[tr]=Basit merhaba wxWidgets uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简单的 wxWidgets Hello 应用程序 +Comment[zh_TW]=一個簡單的 hello wxWidgets 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/wxhello/wxhello.tdevtemplate b/languages/cpp/app_templates/wxhello/wxhello.tdevtemplate deleted file mode 100644 index dab3c253..00000000 --- a/languages/cpp/app_templates/wxhello/wxhello.tdevtemplate +++ /dev/null @@ -1,192 +0,0 @@ -# TDE Config File -[General] -Name=Simple Hello wxWidgets Application -Name[ca]=Simple aplicació de Hello per a wxWidgets -Name[da]=Simpelt Goddag wxWidgets program -Name[de]=Einfache wxWidgets-Anwendung -Name[el]=Απλή εφαρμογή Γεια σου wxWidgets -Name[es]=Una sencilla aplicación «Hola mundo» con wxWidgets -Name[et]=Lihtne wxWidgets'i tervitusrakendus -Name[eu]=wxWidgets-en "Kaixo mundua" aplikazio sinple bat -Name[fa]=کاربرد سادۀ Hello wxWidgets -Name[fr]=Application « Bonjour monde » simple avec wxWidgets -Name[gl]=Aplicación sinxela Ola en wxWidgets -Name[hu]=wxWidgets-alapú Hello world program -Name[it]=Semplice applicazione wxWidgets di "Hello" -Name[ja]=簡単な wxWidget アプリケーション -Name[nds]=Eenfach wxWidgets-Programm "Moin" -Name[ne]=साधारण हेल्लो wxWidgets अनुप्रयोग -Name[nl]=Eenvoudige Hello wxWidgets-toepassing -Name[pl]=Prosty program Witaj używający wxWidgets -Name[pt]=Aplicação Olá Mundo Simples do wxWidgets -Name[pt_BR]=Aplicação Olá Mundo Simples do wxWidgets -Name[ru]=Простое приложение wxWidgets -Name[sk]=Jednoduchá wxWidgets Ahoj svet aplikácia -Name[sr]=Једноставан „Здраво“ wxWidgets програм -Name[sr@Latn]=Jednostavan „Zdravo“ wxWidgets program -Name[sv]=Enkelt Hello-program för wxWidgets -Name[tr]=Basit Merhaba wxWidgets Uygulaması -Name[zh_CN]=一个简单的 wxWidgets 应用程序 -Name[zh_TW]=簡單的 Hello wxWidgets 應用程式 -Category=C++/wxWidgets -Comment=Generates a simple wxWidgets Hello application. -Comment[ca]=Genera una simple aplicació de Hello per a wxWidgets. -Comment[da]=Genererer et simpelt wxWidgets Goddag-program. -Comment[de]=Erstellt eine einfache wxWidgets-Anwendung -Comment[el]=Δημιουργεί μια απλή εφαρμογή Γεια σου wxWidgets. -Comment[es]=Genera una sencilla aplicación «Hola mundo» con wxWidgets -Comment[et]=Lihtsa wxWidgets'i tervitusrakenduse loomine. -Comment[eu]=wxWidgets-en "Kaixo mundua"aplikazio sinple bat sortzen du. -Comment[fa]=یک کاربرد سادۀ wxWidgets Hello تولید می‌کند. -Comment[fr]=Une application « Bonjour monde » simple avec wxWidgets. -Comment[gl]=Xera unha aplicación sinxela Ola en wxWidgets. -Comment[hu]=Létrehoz egy egyszerű wxWidgets-alkalmazást. -Comment[it]=Genera una semplice applicazione wxWidgets di "Hello". -Comment[ja]=簡単な wxWidget アプリケーションを作成します -Comment[nds]=Stellt mit wxWidgets en eenfach "Moin"-Programm op. -Comment[ne]=साधारण wxWidgets हेल्लो अनुप्रयोग उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudige wxWidget Hello-toepassing. -Comment[pl]=Generuje prosty program Witaj wykorzystujący wxWidgets -Comment[pt]=Gera uma aplicação simples de Olá Mundo do wxWidgets. -Comment[pt_BR]=Gera uma aplicação simples de Olá Mundo do wxWidgets. -Comment[ru]=Создание простого приложения wxWidgets. -Comment[sk]=Vygeneruje jednoduchú wxWidgets Ahoj svet aplikáciu. -Comment[sr]=Прави једноставан „Здраво“ wxWidgets програм. -Comment[sr@Latn]=Pravi jednostavan „Zdravo“ wxWidgets program. -Comment[sv]=Skapar ett enkelt Hello-program för wxWidgets. -Comment[tr]=Basit bir wxWidgets Merhaba uygulaması yaratır. -Comment[zh_CN]=生成一个简单的 wxWidgets Hello 应用程序。 -Comment[zh_TW]=產生一個簡單的 wxWidgets Hello 應用程式。 -FileTemplates=h,CStyle,cpp,CStyle -Icon=wxhello.png -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=wxhello.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[WXARCH] -Type=install archive -Source=%{tdevelop}/template-common/wxwidgets.tar.gz -Dest=%{dest} - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[WX] -Type=include -File=%{tdevelop}/template-common/wx.tdevtemplate - -[FILE4] -Type=install -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/wx-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/wx-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/wx-configure.in -Dest=%{dest}/configure.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -#[FILE10] -#Type=install -#Source=%{src}/subdirs -#Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=Simple hello wxWidgets application was created in %{dest} -Comment[ca]=Simple aplicació de Hello per a wxWidgets ha estat creada en %{dest} -Comment[da]=Simpelt Goddag wxWidgets program blev oprettet i %{dest} -Comment[de]=Eine einfache wxWidgets-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια απλή εφαρμογή Γεια σου wxWidgets δημιουργήθηκε στο %{dest} -Comment[es]=Una sencilla aplicación «Hola mundo» con wxWidgets ha sido creada en %{dest} -Comment[et]=Lihtne wxWidgets'i tervitusrakendus loodi asukohta %{dest} -Comment[eu]=wxWidgets "Kaixo mundua" aplikazio sinple bat sortu da hemen: %{dest} -Comment[fa]=کاربرد سادۀ hello wxWidgets در %{dest} ایجاد شد -Comment[fr]=Une application « Bonjour monde » simple en wxWidgets a été créée dans %{dest} -Comment[gl]=Creouse unha aplicación sinxela Ola en wxWidgets en %{dest} -Comment[hu]=Létrejött egy egyszerű wxWidgets-alkalmazás itt: %{dest} -Comment[it]=È stata creata una semplice applicazione wxWidgets di "hello" in %{dest} -Comment[ja]=簡単な wxWidget アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach wxWidgets-Programm opstellt -Comment[ne]=साधारण हेल्लो wxWidgets अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Eenvoudige hello wxWidget-toepassing is aangemaakt in %{dest} -Comment[pl]=Prosty program Witaj wykorzystujący wxWidgets został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação simples de wxWidgets em %{dest} -Comment[pt_BR]=Foi criada uma aplicação simples de wxWidgets em %{dest} -Comment[ru]=Простое приложение wxWidgets создано в %{dest} -Comment[sk]=Jedniduchá wxWidgets Ahoj svet aplikácia bola vytvorená v %{dest} -Comment[sr]=Једноставан „Здраво“ wxWidgets програм направљен је у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo“ wxWidgets program napravljen je u %{dest} -Comment[sv]=Ett enkelt Hello-program för wxWidgets.skapades i %{dest} -Comment[tr]=Basit merhaba wxWidgets uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个简单的 wxWidgets Hello 应用程序 -Comment[zh_TW]=一個簡單的 hello wxWidgets 應用程式已建立於 %{dest} diff --git a/languages/cpp/backgroundparser.cpp b/languages/cpp/backgroundparser.cpp index 51311dac..730a090f 100644 --- a/languages/cpp/backgroundparser.cpp +++ b/languages/cpp/backgroundparser.cpp @@ -15,8 +15,8 @@ #include "codeinformationrepository.h" #include "cppcodecompletion.h" #include "ast_utils.h" -#include "tdevdeepcopy.h" -#include "tdevdriver.h" +#include "kdevdeepcopy.h" +#include "kdevdriver.h" #include @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -39,9 +39,9 @@ #include -class BackgroundTDevDriver : public TDevDriver { +class BackgroundKDevDriver : public KDevDriver { public: - BackgroundTDevDriver( CppSupportPart* cppSupport, BackgroundParser* bp ) : TDevDriver( cppSupport, false ), m_backgroundParser(bp) { + BackgroundKDevDriver( CppSupportPart* cppSupport, BackgroundParser* bp ) : KDevDriver( cppSupport, false ), m_backgroundParser(bp) { } virtual void fileParsed( ParsedFile& fileName ); virtual void addDependence( const TQString& fileName, const Dependence& dep ); @@ -255,7 +255,7 @@ BackgroundParser::BackgroundParser( CppSupportPart* part, TQWaitCondition* consu : m_consumed( consumed ), m_cppSupport( part ), m_close( false ), m_saveMemory( false ) { m_fileList = new SynchronizedFileList(); - m_driver = new BackgroundTDevDriver( m_cppSupport, this ); + m_driver = new BackgroundKDevDriver( m_cppSupport, this ); m_driver->setSourceProvider( new KDevSourceProvider( m_cppSupport, m_mutex ) ); TQString conf_file_name = m_cppSupport->specialHeaderName(); @@ -347,14 +347,14 @@ void BackgroundParser::removeFile( const TQString& fileName ) m_isEmpty.wakeAll(); } -void BackgroundTDevDriver::addDependence( const TQString& fileName, const Dependence& dep ) { +void BackgroundKDevDriver::addDependence( const TQString& fileName, const Dependence& dep ) { //give waiting threads a chance to perform their actions m_backgroundParser->m_mutex.unlock(); m_backgroundParser->m_mutex.lock(); - TDevDriver::addDependence( fileName, dep ); + KDevDriver::addDependence( fileName, dep ); } -void BackgroundTDevDriver::fileParsed( ParsedFile& fileName ) { +void BackgroundKDevDriver::fileParsed( ParsedFile& fileName ) { m_backgroundParser->fileParsed( fileName ); } diff --git a/languages/cpp/backgroundparser.h b/languages/cpp/backgroundparser.h index bd21fd6f..f3cd86fd 100644 --- a/languages/cpp/backgroundparser.h +++ b/languages/cpp/backgroundparser.h @@ -24,7 +24,7 @@ class CppSupportPart; class TranslationUnitAST; class SynchronizedFileList; -class BackgroundTDevDriver; +class BackgroundKDevDriver; class Unit { public: @@ -94,14 +94,14 @@ public: virtual void run(); protected: - friend class BackgroundTDevDriver; + friend class BackgroundKDevDriver; void fileParsed( ParsedFile& fileName ); Unit* findUnit( const TQString& fileName ); void parseFile( const TQString& fileName, bool readFromDisk, bool lock = false ) ; private: - class TDevDriver* m_driver; + class KDevDriver* m_driver; TQString m_currentFile; TQWaitCondition m_canParse; TQWaitCondition m_isEmpty; diff --git a/languages/cpp/ccconfigwidget.cpp b/languages/cpp/ccconfigwidget.cpp index 6e285019..99a6db12 100644 --- a/languages/cpp/ccconfigwidget.cpp +++ b/languages/cpp/ccconfigwidget.cpp @@ -25,7 +25,7 @@ #include // kde includes -#include +#include #include #include #include @@ -41,9 +41,9 @@ #include // tdevelop includes #include -#include -#include -#include +#include +#include +#include #include // std includes #include @@ -440,11 +440,11 @@ void CCConfigWidget::initTQtTab() isExecutable( m_qmakePath->url() ); m_designerPath->setURL( c->designerPath() ); isExecutable( m_designerPath->url() ); - if ( c->designerIntegration() == "EmbeddedTDevDesigner" ) + if ( c->designerIntegration() == "EmbeddedKDevDesigner" ) { m_kdevembedded->setChecked( true ); } - else if ( c->designerIntegration() == "ExternalTDevDesigner" ) + else if ( c->designerIntegration() == "ExternalKDevDesigner" ) { m_kdevexternal->setChecked( true ); }else @@ -507,11 +507,11 @@ void CCConfigWidget::saveTQtTab() c->setDesignerPath( m_designerPath->url() ); if( m_kdevembedded->isChecked() ) { - c->setDesignerIntegration( "EmbeddedTDevDesigner" ); + c->setDesignerIntegration( "EmbeddedKDevDesigner" ); } else if ( m_kdevexternal->isChecked() ) { - c->setDesignerIntegration( "ExternalTDevDesigner" ); + c->setDesignerIntegration( "ExternalKDevDesigner" ); }else { c->setDesignerIntegration( "ExternalDesigner" ); diff --git a/languages/cpp/codeinformationrepository.cpp b/languages/cpp/codeinformationrepository.cpp index de256b00..a1ad79b0 100644 --- a/languages/cpp/codeinformationrepository.cpp +++ b/languages/cpp/codeinformationrepository.cpp @@ -12,7 +12,7 @@ #include "codeinformationrepository.h" #include "cpp_tags.h" -#include +#include #include /// @todo move in utils.cpp @@ -39,7 +39,7 @@ my_unique( const TQValueList& entryList ) return l; } -CodeInformationRepository::CodeInformationRepository( TDevCodeRepository* rep ) +CodeInformationRepository::CodeInformationRepository( KDevCodeRepository* rep ) : m_rep( rep ) {} diff --git a/languages/cpp/codeinformationrepository.h b/languages/cpp/codeinformationrepository.h index 4b46ce0e..54610e50 100644 --- a/languages/cpp/codeinformationrepository.h +++ b/languages/cpp/codeinformationrepository.h @@ -23,12 +23,12 @@ struct TypeProcessor { virtual TQString parentType() = 0; }; -class TDevCodeRepository; +class KDevCodeRepository; class CodeInformationRepository { public: - CodeInformationRepository( TDevCodeRepository* rep ); + CodeInformationRepository( KDevCodeRepository* rep ); virtual ~CodeInformationRepository(); static TQValueList toEntryList( const TQValueList& tags, @@ -46,7 +46,7 @@ public: private: TQValueList m_globalEntries; - TDevCodeRepository* m_rep; + KDevCodeRepository* m_rep; private: CodeInformationRepository( const CodeInformationRepository& source ); diff --git a/languages/cpp/compiler/Makefile.am b/languages/cpp/compiler/Makefile.am index ab237cd4..128e715f 100644 --- a/languages/cpp/compiler/Makefile.am +++ b/languages/cpp/compiler/Makefile.am @@ -1,6 +1,6 @@ # This is the collection of plugins. In contrast to the parts # directory, these are 'transient' in a sense and don't -# share the complete TDevComponent interface. +# share the complete KDevComponent interface. SUBDIRS = gccoptions diff --git a/languages/cpp/compiler/gccoptions/CMakeLists.txt b/languages/cpp/compiler/gccoptions/CMakeLists.txt index ed9b49d4..35c6159d 100644 --- a/languages/cpp/compiler/gccoptions/CMakeLists.txt +++ b/languages/cpp/compiler/gccoptions/CMakeLists.txt @@ -26,15 +26,15 @@ link_directories( ##### other data ################################ install( FILES - tdevgccoptions.desktop tdevgppoptions.desktop - tdevg77options.desktop + kdevgccoptions.desktop kdevgppoptions.desktop + kdevg77options.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevgccoptions (module) ################ +##### libkdevgccoptions (module) ################ -tde_add_kpart( libtdevgccoptions AUTOMOC +tde_add_kpart( libkdevgccoptions AUTOMOC SOURCES gccoptionsplugin.cpp - LINK tdevwidgets-shared tdevextras-shared + LINK kdevwidgets-shared kdevextras-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/cpp/compiler/gccoptions/Makefile.am b/languages/cpp/compiler/gccoptions/Makefile.am index 23c8a752..e90edb63 100644 --- a/languages/cpp/compiler/gccoptions/Makefile.am +++ b/languages/cpp/compiler/gccoptions/Makefile.am @@ -3,17 +3,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extras \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevgccoptions.la -libtdevgccoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -libtdevgccoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevgccoptions.la +libkdevgccoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevgccoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(LIB_TDEHTML) -libtdevgccoptions_la_SOURCES = gccoptionsplugin.cpp +libkdevgccoptions_la_SOURCES = gccoptionsplugin.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevgccoptions.desktop tdevgppoptions.desktop tdevg77options.desktop +service_DATA = kdevgccoptions.desktop kdevgppoptions.desktop kdevg77options.desktop diff --git a/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp b/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp index d43bf094..37470a49 100644 --- a/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp +++ b/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp @@ -24,7 +24,7 @@ #include "flagboxes.h" #include "gccoptionsplugin.h" -K_EXPORT_COMPONENT_FACTORY( libtdevgccoptions, KGenericFactory( "tdevgccoptions" ) ) +K_EXPORT_COMPONENT_FACTORY( libkdevgccoptions, KGenericFactory( "kdevgccoptions" ) ) class GeneralTab : public TQWidget { @@ -650,7 +650,7 @@ TQString GccOptionsDialog::flags() const GccOptionsPlugin::GccOptionsPlugin( TQObject *parent, const char *name, const TQStringList &args ) - : TDevCompilerOptions( parent, name ) + : KDevCompilerOptions( parent, name ) { gcctype = Unknown; diff --git a/languages/cpp/compiler/gccoptions/gccoptionsplugin.h b/languages/cpp/compiler/gccoptions/gccoptionsplugin.h index 3332809a..656bd289 100644 --- a/languages/cpp/compiler/gccoptions/gccoptionsplugin.h +++ b/languages/cpp/compiler/gccoptions/gccoptionsplugin.h @@ -14,7 +14,7 @@ #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" class GeneralTab; @@ -24,7 +24,7 @@ class Warnings1Tab; class Warnings2Tab; -class GccOptionsPlugin : public TDevCompilerOptions +class GccOptionsPlugin : public KDevCompilerOptions { Q_OBJECT diff --git a/languages/cpp/compiler/gccoptions/kdevg77options.desktop b/languages/cpp/compiler/gccoptions/kdevg77options.desktop new file mode 100644 index 00000000..e2a806f5 --- /dev/null +++ b/languages/cpp/compiler/gccoptions/kdevg77options.desktop @@ -0,0 +1,56 @@ +[Desktop Entry] +Type=Service +Exec=g77 +Comment=GNU Fortran 77 Compiler +Comment[br]=Dastumer Fortran 77 GNU +Comment[ca]=Compilador Fortran 77 de GNU +Comment[da]=GNU Fortran 77 compiler +Comment[el]=Μεταγλωττιστής GNU Fortran 77 +Comment[es]=Compilador GNU de Fortran 77 +Comment[et]=GNU Fortran 77 kompilaator +Comment[eu]=GNU Fortran 77 konpiladorea +Comment[fa]=مترجم فرترن ۷۷ گنو +Comment[fr]=Compilateur pour Fortran 77 du GNU +Comment[ga]=Tiomsaitheoir Fortran 77 GNU +Comment[gl]=Compilador GNU Fortran 77 +Comment[hi]=जीएनयू फ़ोरट्रॉन 77 कम्पायलर +Comment[hu]=GNU Fortran 77 fordítóprogram +Comment[is]=GNU Fortran 77 þýðandi +Comment[it]=Compilatore per GNU Fortran 77 +Comment[ja]=GNU Fortran 77 コンパイラ +Comment[nds]=GNU Fortran 77-Kompilerer +Comment[ne]=GNU Fortran 77 कम्पाइलर +Comment[nl]=GNU Fortran 77-compiler +Comment[pl]=Kompilator GNU Fortran 77 +Comment[pt]=Compilador GNU Fortran 77 +Comment[pt_BR]=Compilador GNU Fortran 77 +Comment[ru]=Компилятор GNU Fortran 77 +Comment[sk]=GNU Fortran 77 kompilátor +Comment[sl]=Prevajalnik za GNU Fortran 77 +Comment[sr]=GNU-ов преводилац Fortran-а 77 +Comment[sr@Latn]=GNU-ov prevodilac Fortran-a 77 +Comment[sv]=GNU Fortran 77-compilator +Comment[ta]=GNU Fortran 77 தொகுப்பி +Comment[tg]=Талфифгари GNU Fortran 77 +Comment[tr]=GNU Fortran 77 Derleyicisi +Comment[zh_CN]=GNU Fortran 77 编译器 +Comment[zh_TW]=GNU Fortran 77 編譯器 +Name=G77Options +Name[de]=G77-Einstellungen (TDevelop) +Name[el]=G77Επιλογές +Name[hi]=जी77विकल्प +Name[nds]=G77-Optschonen (TDevelop) +Name[pl]=Opcje G77 +Name[sk]=G77 možnosti +Name[sl]=Možnosti G77 +Name[sv]=Alternativ för g77 +Name[ta]=G77விருப்பங்கள் +Name[tg]=G77Интихобҳо +Name[tr]=G77Seçenekleri +Name[zh_TW]=G77 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevgccoptions +X-TDevelop-Version=5 +X-TDevelop-Language=Fortran +X-TDevelop-Args=g77 +X-TDevelop-Default=true diff --git a/languages/cpp/compiler/gccoptions/kdevgccoptions.desktop b/languages/cpp/compiler/gccoptions/kdevgccoptions.desktop new file mode 100644 index 00000000..14bc62df --- /dev/null +++ b/languages/cpp/compiler/gccoptions/kdevgccoptions.desktop @@ -0,0 +1,54 @@ +[Desktop Entry] +Type=Service +Exec=gcc +Comment=GNU C Compiler +Comment[br]=Dastumer C GNU +Comment[ca]=Compilador C de GNU +Comment[da]=GNU C compiler +Comment[el]=Μεταγλωττιστής GNU C +Comment[es]=Compilador GNU de C +Comment[et]=GNU C kompilaator +Comment[eu]=GNU C konpiladorea +Comment[fa]=مترجم سی گنو +Comment[fr]=Compilateur C du GNU +Comment[ga]=Tiomsaitheoir C GNU +Comment[gl]=Compilador GNU C +Comment[hi]=जीएनयू सी कम्पायलर +Comment[hu]=GNU C fordítóprogram +Comment[is]=GNU C þýðandi +Comment[it]=Compilatore GNU C +Comment[ja]=GNU C コンパイラ +Comment[nds]=GNU C-Kompilerer +Comment[ne]=GNU C कम्पाइलर +Comment[pl]=Kompilator GNU C +Comment[pt]=Compilador GNU C +Comment[pt_BR]=Compilador GNU C +Comment[ru]=Компилятор GNU C +Comment[sk]=GNU C kompilátor +Comment[sl]=Prevajalnik za GNU C +Comment[sr]=GNU-ов C преводилац +Comment[sr@Latn]=GNU-ov C prevodilac +Comment[sv]=GNU C-kompilator +Comment[ta]=GNU Cதொகுப்பி +Comment[tg]=Талфифгари GNU C +Comment[zh_CN]=GNU C 编译器 +Comment[zh_TW]=GNU C 編譯器 +Name=GccOptions +Name[de]=GCC-Einstellungen (TDevelop) +Name[el]=GccΕπιλογές +Name[hi]=जीसीसी-विकल्प +Name[nds]=GCC-Instellen +Name[pl]=Opcje Gcc +Name[sk]=Gcc možnosti +Name[sl]=Možnosti Gcc +Name[sv]=Alternativ för gcc +Name[ta]=Gccவிருப்பங்கள் +Name[tr]=GccSeçenekleri +Name[zh_TW]=Gcc 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevgccoptions +X-TDevelop-Version=5 +X-TDevelop-Language=C +X-TDevelop-Args=gcc +X-TDevelop-Default=true + diff --git a/languages/cpp/compiler/gccoptions/kdevgppoptions.desktop b/languages/cpp/compiler/gccoptions/kdevgppoptions.desktop new file mode 100644 index 00000000..d8487596 --- /dev/null +++ b/languages/cpp/compiler/gccoptions/kdevgppoptions.desktop @@ -0,0 +1,56 @@ +[Desktop Entry] +Type=Service +Exec=g++ +Comment=GNU C++ Compiler +Comment[br]=Dastumer C++ GNU +Comment[ca]=Compilador C++ de GNU +Comment[da]=GNU C++ compiler +Comment[el]=Μεταγλωττιστής GNU C++ +Comment[es]=Compilador GNU de C++ +Comment[et]=GNU C++ kompilaator +Comment[eu]=GNU C++ konpiladorea +Comment[fa]=مترجم C++ گنو +Comment[fr]=Compilateur C++ de GNU +Comment[ga]=Tiomsaitheoir C++ GNU +Comment[gl]=Compilador GNU C++ +Comment[hi]=जीएनयू सी++ कम्पायलर +Comment[hu]=GNU C++ fordítóprogram +Comment[is]=GNU C++ þýðandi +Comment[it]=Compilatore GNU C++ +Comment[ja]=GNU C++ コンパイラ +Comment[nds]=GNU C++-Kompilerer +Comment[ne]=GNU C++ कम्पाइलर +Comment[nl]=GNU C++ compiler +Comment[pl]=Kompilator GNU C++ +Comment[pt]=Compilador GNU C++ +Comment[pt_BR]=Compilador GNU C++ +Comment[ru]=Компилятор GNU C++ +Comment[sk]=GNU C++ kompilátor +Comment[sl]=Prevajalnik za GNU C++ +Comment[sr]=GNU-ов C++ преводилац +Comment[sr@Latn]=GNU-ov C++ prevodilac +Comment[sv]=GNU C++ kompilator +Comment[ta]=GNU C++தொகுப்பி +Comment[tg]=Талфифгари GNU C++ +Comment[tr]=GNU C++ Derleyicisi +Comment[zh_CN]=GNU C++ 编译器 +Comment[zh_TW]=GNU C++ 編譯器 +Name=GppOptions +Name[de]=GPP-Einstellungen (TDevelop) +Name[el]=GppΕπιλογές +Name[hi]=जीपीपी-विकल्प +Name[nds]=GPP-Instellen +Name[pl]=Opcje Gpp +Name[sk]=Gpp možnosti +Name[sl]=Možnosti Gpp +Name[sv]=Alternativ för g++ +Name[ta]=Gppவிருப்பங்கள் +Name[tr]=GppSeçenekleri +Name[zh_TW]=Gpp 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevgccoptions +X-TDevelop-Version=5 +X-TDevelop-Language=C++ +X-TDevelop-Args=g++ +X-TDevelop-Default=true + diff --git a/languages/cpp/compiler/gccoptions/tdevg77options.desktop b/languages/cpp/compiler/gccoptions/tdevg77options.desktop deleted file mode 100644 index bbe1f47c..00000000 --- a/languages/cpp/compiler/gccoptions/tdevg77options.desktop +++ /dev/null @@ -1,56 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=g77 -Comment=GNU Fortran 77 Compiler -Comment[br]=Dastumer Fortran 77 GNU -Comment[ca]=Compilador Fortran 77 de GNU -Comment[da]=GNU Fortran 77 compiler -Comment[el]=Μεταγλωττιστής GNU Fortran 77 -Comment[es]=Compilador GNU de Fortran 77 -Comment[et]=GNU Fortran 77 kompilaator -Comment[eu]=GNU Fortran 77 konpiladorea -Comment[fa]=مترجم فرترن ۷۷ گنو -Comment[fr]=Compilateur pour Fortran 77 du GNU -Comment[ga]=Tiomsaitheoir Fortran 77 GNU -Comment[gl]=Compilador GNU Fortran 77 -Comment[hi]=जीएनयू फ़ोरट्रॉन 77 कम्पायलर -Comment[hu]=GNU Fortran 77 fordítóprogram -Comment[is]=GNU Fortran 77 þýðandi -Comment[it]=Compilatore per GNU Fortran 77 -Comment[ja]=GNU Fortran 77 コンパイラ -Comment[nds]=GNU Fortran 77-Kompilerer -Comment[ne]=GNU Fortran 77 कम्पाइलर -Comment[nl]=GNU Fortran 77-compiler -Comment[pl]=Kompilator GNU Fortran 77 -Comment[pt]=Compilador GNU Fortran 77 -Comment[pt_BR]=Compilador GNU Fortran 77 -Comment[ru]=Компилятор GNU Fortran 77 -Comment[sk]=GNU Fortran 77 kompilátor -Comment[sl]=Prevajalnik za GNU Fortran 77 -Comment[sr]=GNU-ов преводилац Fortran-а 77 -Comment[sr@Latn]=GNU-ov prevodilac Fortran-a 77 -Comment[sv]=GNU Fortran 77-compilator -Comment[ta]=GNU Fortran 77 தொகுப்பி -Comment[tg]=Талфифгари GNU Fortran 77 -Comment[tr]=GNU Fortran 77 Derleyicisi -Comment[zh_CN]=GNU Fortran 77 编译器 -Comment[zh_TW]=GNU Fortran 77 編譯器 -Name=G77Options -Name[de]=G77-Einstellungen (TDevelop) -Name[el]=G77Επιλογές -Name[hi]=जी77विकल्प -Name[nds]=G77-Optschonen (TDevelop) -Name[pl]=Opcje G77 -Name[sk]=G77 možnosti -Name[sl]=Možnosti G77 -Name[sv]=Alternativ för g77 -Name[ta]=G77விருப்பங்கள் -Name[tg]=G77Интихобҳо -Name[tr]=G77Seçenekleri -Name[zh_TW]=G77 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevgccoptions -X-TDevelop-Version=5 -X-TDevelop-Language=Fortran -X-TDevelop-Args=g77 -X-TDevelop-Default=true diff --git a/languages/cpp/compiler/gccoptions/tdevgccoptions.desktop b/languages/cpp/compiler/gccoptions/tdevgccoptions.desktop deleted file mode 100644 index ce01a066..00000000 --- a/languages/cpp/compiler/gccoptions/tdevgccoptions.desktop +++ /dev/null @@ -1,54 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=gcc -Comment=GNU C Compiler -Comment[br]=Dastumer C GNU -Comment[ca]=Compilador C de GNU -Comment[da]=GNU C compiler -Comment[el]=Μεταγλωττιστής GNU C -Comment[es]=Compilador GNU de C -Comment[et]=GNU C kompilaator -Comment[eu]=GNU C konpiladorea -Comment[fa]=مترجم سی گنو -Comment[fr]=Compilateur C du GNU -Comment[ga]=Tiomsaitheoir C GNU -Comment[gl]=Compilador GNU C -Comment[hi]=जीएनयू सी कम्पायलर -Comment[hu]=GNU C fordítóprogram -Comment[is]=GNU C þýðandi -Comment[it]=Compilatore GNU C -Comment[ja]=GNU C コンパイラ -Comment[nds]=GNU C-Kompilerer -Comment[ne]=GNU C कम्पाइलर -Comment[pl]=Kompilator GNU C -Comment[pt]=Compilador GNU C -Comment[pt_BR]=Compilador GNU C -Comment[ru]=Компилятор GNU C -Comment[sk]=GNU C kompilátor -Comment[sl]=Prevajalnik za GNU C -Comment[sr]=GNU-ов C преводилац -Comment[sr@Latn]=GNU-ov C prevodilac -Comment[sv]=GNU C-kompilator -Comment[ta]=GNU Cதொகுப்பி -Comment[tg]=Талфифгари GNU C -Comment[zh_CN]=GNU C 编译器 -Comment[zh_TW]=GNU C 編譯器 -Name=GccOptions -Name[de]=GCC-Einstellungen (TDevelop) -Name[el]=GccΕπιλογές -Name[hi]=जीसीसी-विकल्प -Name[nds]=GCC-Instellen -Name[pl]=Opcje Gcc -Name[sk]=Gcc možnosti -Name[sl]=Možnosti Gcc -Name[sv]=Alternativ för gcc -Name[ta]=Gccவிருப்பங்கள் -Name[tr]=GccSeçenekleri -Name[zh_TW]=Gcc 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevgccoptions -X-TDevelop-Version=5 -X-TDevelop-Language=C -X-TDevelop-Args=gcc -X-TDevelop-Default=true - diff --git a/languages/cpp/compiler/gccoptions/tdevgppoptions.desktop b/languages/cpp/compiler/gccoptions/tdevgppoptions.desktop deleted file mode 100644 index b5fe552e..00000000 --- a/languages/cpp/compiler/gccoptions/tdevgppoptions.desktop +++ /dev/null @@ -1,56 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=g++ -Comment=GNU C++ Compiler -Comment[br]=Dastumer C++ GNU -Comment[ca]=Compilador C++ de GNU -Comment[da]=GNU C++ compiler -Comment[el]=Μεταγλωττιστής GNU C++ -Comment[es]=Compilador GNU de C++ -Comment[et]=GNU C++ kompilaator -Comment[eu]=GNU C++ konpiladorea -Comment[fa]=مترجم C++ گنو -Comment[fr]=Compilateur C++ de GNU -Comment[ga]=Tiomsaitheoir C++ GNU -Comment[gl]=Compilador GNU C++ -Comment[hi]=जीएनयू सी++ कम्पायलर -Comment[hu]=GNU C++ fordítóprogram -Comment[is]=GNU C++ þýðandi -Comment[it]=Compilatore GNU C++ -Comment[ja]=GNU C++ コンパイラ -Comment[nds]=GNU C++-Kompilerer -Comment[ne]=GNU C++ कम्पाइलर -Comment[nl]=GNU C++ compiler -Comment[pl]=Kompilator GNU C++ -Comment[pt]=Compilador GNU C++ -Comment[pt_BR]=Compilador GNU C++ -Comment[ru]=Компилятор GNU C++ -Comment[sk]=GNU C++ kompilátor -Comment[sl]=Prevajalnik za GNU C++ -Comment[sr]=GNU-ов C++ преводилац -Comment[sr@Latn]=GNU-ov C++ prevodilac -Comment[sv]=GNU C++ kompilator -Comment[ta]=GNU C++தொகுப்பி -Comment[tg]=Талфифгари GNU C++ -Comment[tr]=GNU C++ Derleyicisi -Comment[zh_CN]=GNU C++ 编译器 -Comment[zh_TW]=GNU C++ 編譯器 -Name=GppOptions -Name[de]=GPP-Einstellungen (TDevelop) -Name[el]=GppΕπιλογές -Name[hi]=जीपीपी-विकल्प -Name[nds]=GPP-Instellen -Name[pl]=Opcje Gpp -Name[sk]=Gpp možnosti -Name[sl]=Možnosti Gpp -Name[sv]=Alternativ för g++ -Name[ta]=Gppவிருப்பங்கள் -Name[tr]=GppSeçenekleri -Name[zh_TW]=Gpp 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevgccoptions -X-TDevelop-Version=5 -X-TDevelop-Language=C++ -X-TDevelop-Args=g++ -X-TDevelop-Default=true - diff --git a/languages/cpp/configproblemreporter.ui.h b/languages/cpp/configproblemreporter.ui.h index 2b1ad2a3..97cc66e1 100644 --- a/languages/cpp/configproblemreporter.ui.h +++ b/languages/cpp/configproblemreporter.ui.h @@ -8,7 +8,7 @@ #include "cppsupportpart.h" -#include +#include #include #include diff --git a/languages/cpp/cppcodecompletion.cpp b/languages/cpp/cppcodecompletion.cpp index adfc1c7d..bf4bef5a 100644 --- a/languages/cpp/cppcodecompletion.cpp +++ b/languages/cpp/cppcodecompletion.cpp @@ -59,10 +59,10 @@ email : david.nolden.kdevelop@art-master.de #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -1470,7 +1470,7 @@ void CppCodeCompletion::popupDefinitionAction( int number ) { } void CppCodeCompletion::selectItem( ItemDom item ) { - Extensions::TDevCodeBrowserFrontend * f = m_pSupport->extension< Extensions::TDevCodeBrowserFrontend > ( "KDevelop/CodeBrowserFrontend" ); + Extensions::KDevCodeBrowserFrontend * f = m_pSupport->extension< Extensions::KDevCodeBrowserFrontend > ( "KDevelop/CodeBrowserFrontend" ); if ( f != 0 ) { ItemDom itemDom( &( *item ) ); diff --git a/languages/cpp/cppimplementationwidget.cpp b/languages/cpp/cppimplementationwidget.cpp index 5fc00da3..35069349 100644 --- a/languages/cpp/cppimplementationwidget.cpp +++ b/languages/cpp/cppimplementationwidget.cpp @@ -31,12 +31,12 @@ #include #include -#include -#include +#include +#include #include #include -CppImplementationWidget::CppImplementationWidget( TDevLanguageSupport *part, +CppImplementationWidget::CppImplementationWidget( KDevLanguageSupport *part, TQWidget *parent, const char *name, bool modal ) : ImplementationWidget( part, parent, name, modal ) {} @@ -45,7 +45,7 @@ TQStringList CppImplementationWidget::createClassFiles() { TQString template_h = "#ifndef $DEFTEXT$_H\n#define $DEFTEXT$_H\n\n#include \"$BASEINCLUDE$\"\n\nclass $CLASSNAME$: public $BASECLASSNAME$ {\nQ_OBJECT\n\npublic:\n $CLASSNAME$(TQWidget *parent = 0, const char *name = 0);\n};\n\n#endif\n"; TQString template_cpp = "#include \"$CLASSINCLUDE$\"\n\n$CLASSNAME$::$CLASSNAME$(TQWidget *parent, const char *name)\n :$BASECLASSNAME$(parent, name)\n{\n}\n"; - if ( m_part->project() ->options() == TDevProject::UsesAutotoolsBuildSystem ) + if ( m_part->project() ->options() == KDevProject::UsesAutotoolsBuildSystem ) template_cpp += "\n#include \"$MOCINCLUDE$\"\n"; TQFileInfo formInfo( m_formName ); diff --git a/languages/cpp/cppimplementationwidget.h b/languages/cpp/cppimplementationwidget.h index 6040cf69..c8569c03 100644 --- a/languages/cpp/cppimplementationwidget.h +++ b/languages/cpp/cppimplementationwidget.h @@ -32,7 +32,7 @@ class CppImplementationWidget : public ImplementationWidget Q_OBJECT public: - CppImplementationWidget( TDevLanguageSupport *part, TQWidget* parent = 0, const char* name = 0, bool modal = false ); + CppImplementationWidget( KDevLanguageSupport *part, TQWidget* parent = 0, const char* name = 0, bool modal = false ); protected: virtual TQStringList createClassFiles(); diff --git a/languages/cpp/cppnewclassdlg.cpp b/languages/cpp/cppnewclassdlg.cpp index 84c8fe4e..6289da44 100644 --- a/languages/cpp/cppnewclassdlg.cpp +++ b/languages/cpp/cppnewclassdlg.cpp @@ -40,10 +40,10 @@ #include #include "cppsupportpart.h" -#include "tdevproject.h" -#include "tdevsourceformatter.h" -#include "tdevcoderepository.h" -#include "tdevpartcontroller.h" +#include "kdevproject.h" +#include "kdevsourceformatter.h" +#include "kdevcoderepository.h" +#include "kdevpartcontroller.h" #include "backgroundparser.h" #include "domutil.h" #include "filetemplate.h" @@ -65,7 +65,7 @@ CppNewClassDialog::CppNewClassDialog( CppSupportPart *part, TQWidget *parent, co implementationModified = false; m_part = part; // read file template configuration - // TDevProject *project = part->project(); + // KDevProject *project = part->project(); TQDomDocument &dom = *part->projectDom(); interface_url = DomUtil::readEntry( dom, "/cppsupportpart/filetemplates/interfaceURL" ); implementation_url = DomUtil::readEntry( dom, "/cppsupportpart/filetemplates/implementationURL" ); @@ -1342,7 +1342,7 @@ bool CppNewClassDialog::ClassGenerator::validateInput() } /// \FIXME - if ( ( header.find( '/' ) != -1 || implementation.find( '/' ) != -1 ) && !( dlg.m_part->project() ->options() & TDevProject::UsesTQMakeBuildSystem) ) + if ( ( header.find( '/' ) != -1 || implementation.find( '/' ) != -1 ) && !( dlg.m_part->project() ->options() & KDevProject::UsesTQMakeBuildSystem) ) { KMessageBox::error( &dlg, i18n( "Generated files will always be added to the " "active directory, so you must not give an " @@ -1376,7 +1376,7 @@ bool CppNewClassDialog::ClassGenerator::generate() return false; } - if( ( dlg.m_part->project() ->options() & TDevProject::UsesTQMakeBuildSystem) ) + if( ( dlg.m_part->project() ->options() & KDevProject::UsesTQMakeBuildSystem) ) { TQDir dir( TQFileInfo( project->projectDirectory()+TQString( TQChar( TQDir::separator() ) )+project->activeDirectory() + TQString( TQChar( TQDir::separator() ) ) + header ).dirPath() ); kdDebug(9024) << "Dir for new file:" << dir.absPath() << endl; @@ -1818,7 +1818,7 @@ void CppNewClassDialog::ClassGenerator::gen_implementation() classImpl.replace( TQRegExp( "\\$NAMESPACEEND\\$" ), namespaceEnd ); classImpl.replace( TQRegExp( "\\$FILENAME\\$" ), implementation ); - if ( ( dlg.m_part->project() ) && ( childClass || qobject ) && ( dlg.m_part->project() ->options() & TDevProject::UsesAutotoolsBuildSystem ) ) + if ( ( dlg.m_part->project() ) && ( childClass || qobject ) && ( dlg.m_part->project() ->options() & KDevProject::UsesAutotoolsBuildSystem ) ) { TQString moc = header; moc.replace( TQRegExp( "\\..*" ), ".moc" ); diff --git a/languages/cpp/cppnewclassdlg.h b/languages/cpp/cppnewclassdlg.h index 30aed9e4..e7f969db 100644 --- a/languages/cpp/cppnewclassdlg.h +++ b/languages/cpp/cppnewclassdlg.h @@ -24,7 +24,7 @@ #include "cppnewclassdlgbase.h" class CppSupportPart; -class TDevProject; +class KDevProject; class TQPopupMenu; class TDECompletion; class CodeModel; @@ -257,7 +257,7 @@ private: TQString advConstructorsHeader; TQString advConstructorsSource; - TDevProject *project; + KDevProject *project; TQString subDir, headerPath, implementationPath; TQString doc; TQString namespaceStr; diff --git a/languages/cpp/cppsupport_events.h b/languages/cpp/cppsupport_events.h index b8d9909f..b40fc0ec 100644 --- a/languages/cpp/cppsupport_events.h +++ b/languages/cpp/cppsupport_events.h @@ -12,7 +12,7 @@ #ifndef __cppsupport_events_h #define __cppsupport_events_h -#include "tdevdeepcopy.h" +#include "kdevdeepcopy.h" #include #include diff --git a/languages/cpp/cppsupportfactory.cpp b/languages/cpp/cppsupportfactory.cpp index ca98f2f3..41335cdb 100644 --- a/languages/cpp/cppsupportfactory.cpp +++ b/languages/cpp/cppsupportfactory.cpp @@ -11,21 +11,21 @@ #include #include -#include +#include #include "cppsupportfactory.h" -K_EXPORT_COMPONENT_FACTORY( libtdevcppsupport, CppSupportFactory ) +K_EXPORT_COMPONENT_FACTORY( libkdevcppsupport, CppSupportFactory ) -static const TDevPluginInfo data("tdevcppsupport"); +static const KDevPluginInfo data("kdevcppsupport"); CppSupportFactory::CppSupportFactory() -: TDevGenericFactory( data ) +: KDevGenericFactory( data ) { } TDEInstance *CppSupportFactory::createInstance() { - TDEInstance *instance = TDevGenericFactory::createInstance(); + TDEInstance *instance = KDevGenericFactory::createInstance(); TDEStandardDirs *dirs = instance->dirs(); dirs->addResourceType( "newclasstemplates", TDEStandardDirs::kde_default("data") + "kdevcppsupport/newclass/" ); dirs->addResourceType( "pcs", TDEStandardDirs::kde_default( "data" ) + "kdevcppsupport/pcs/" ); @@ -33,7 +33,7 @@ TDEInstance *CppSupportFactory::createInstance() return instance; } -const TDevPluginInfo * CppSupportFactory::info() +const KDevPluginInfo * CppSupportFactory::info() { return &data; } diff --git a/languages/cpp/cppsupportfactory.h b/languages/cpp/cppsupportfactory.h index 0ece65e9..f543c4fc 100644 --- a/languages/cpp/cppsupportfactory.h +++ b/languages/cpp/cppsupportfactory.h @@ -12,17 +12,17 @@ #ifndef _CPPSUPPORTFACTORY_H_ #define _CPPSUPPORTFACTORY_H_ -#include +#include #include "cppsupportpart.h" -class TDevPluginInfo; +class KDevPluginInfo; -class CppSupportFactory : public TDevGenericFactory +class CppSupportFactory : public KDevGenericFactory { public: CppSupportFactory(); - static const TDevPluginInfo *info(); + static const KDevPluginInfo *info(); protected: virtual TDEInstance *createInstance(); diff --git a/languages/cpp/cppsupportpart.cpp b/languages/cpp/cppsupportpart.cpp index f02b967b..35739045 100644 --- a/languages/cpp/cppsupportpart.cpp +++ b/languages/cpp/cppsupportpart.cpp @@ -25,11 +25,11 @@ #include "ast_utils.h" #include "cppcodecompletion.h" #include "ccconfigwidget.h" -#include "TDevCppSupportIface.h" +#include "KDevCppSupportIface.h" #include "cppsupportfactory.h" #include "catalog.h" #include "cpp_tags.h" -#include "tdevdriver.h" +#include "kdevdriver.h" #include "cppcodecompletionconfig.h" #include "cppsplitheadersourceconfig.h" #include "tag_creator.h" @@ -37,10 +37,10 @@ #include "classgeneratorconfig.h" #include "urlutil.h" #include "creategettersetterconfiguration.h" -#include "tdevsourceformatter.h" -#include "tdevcreatefile.h" +#include "kdevsourceformatter.h" +#include "kdevcreatefile.h" #include "qtbuildconfig.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" #include #include // wizards @@ -93,14 +93,14 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include #include @@ -116,10 +116,10 @@ TQStringList CppSupportPart::m_headerMimeTypes = TQStringList() << "text/x-chdr" TQStringList CppSupportPart::m_sourceExtensions = TQStringList::split( ",", "c,C,cc,cpp,c++,cxx,m,mm,M" ); TQStringList CppSupportPart::m_headerExtensions = TQStringList::split( ",", "h,H,hh,h++,hxx,hpp,inl,tlh,diff,ui.h" ); -class CppDriver: public TDevDriver +class CppDriver: public KDevDriver { public: - CppDriver( CppSupportPart* cppSupport ) : TDevDriver( cppSupport, true ) + CppDriver( CppSupportPart* cppSupport ) : KDevDriver( cppSupport, true ) {} void fileParsed( ParsedFile& fileName ) @@ -192,7 +192,7 @@ public: CppSupportPart::CppSupportPart( TQObject *parent, const char *name, const TQStringList &args ) -: TDevLanguageSupport( CppSupportFactory::info(), parent, name ? name : "TDevCppSupport" ), m_backgroundParser(0), +: KDevLanguageSupport( CppSupportFactory::info(), parent, name ? name : "KDevCppSupport" ), m_backgroundParser(0), m_activeDocument( 0 ), m_activeView( 0 ), m_activeSelection( 0 ), m_activeEditor( 0 ), m_activeViewCursor( 0 ), m_projectClosed( true ), m_projectClosing( false ), m_valid( false ), m_isTyping( false ), m_hadErrors( false ), _jd(0) @@ -232,7 +232,7 @@ CppSupportPart::CppSupportPart( TQObject *parent, const char *name, const TQStri m_saveMemoryTimer->start( 240000, false ); //Free some memory every 4 minutes // connect( m_functionHintTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotFunctionHint()) ); - setXMLFile( "tdevcppsupport.rc" ); + setXMLFile( "kdevcppsupport.rc" ); m_catalogList.setAutoDelete( true ); @@ -309,7 +309,7 @@ CppSupportPart::CppSupportPart( TQObject *parent, const char *name, const TQStri connect( core( ), TQT_SIGNAL( projectConfigWidget( KDialogBase* ) ), this, TQT_SLOT( projectConfigWidget( KDialogBase* ) ) ); - new TDevCppSupportIface( this ); + new KDevCppSupportIface( this ); //(void) dcopClient(); m_lockupTester = new UIBlockTester( 100 ); @@ -611,7 +611,7 @@ void CppSupportPart::projectClosed( ) } DomUtil::writeListEntry( *project() ->projectDom(), "kdevcppsupport/references", "pcs", enabledPCSs ); - for ( TQMap::const_iterator it = m_designers.begin(); + for ( TQMap::const_iterator it = m_designers.begin(); it != m_designers.end(); ++it ) { kdDebug( 9007 ) << "calling save settings fro designer integration" << endl; @@ -840,7 +840,7 @@ void CppSupportPart::contextMenu( TQPopupMenu *popup, const Context *context ) { m_contextFileName = url.path(); int id = popup->insertItem( i18n( "Create or Select Implementation..." ), this, TQT_SLOT( slotCreateSubclass() ) ); - popup->setWhatsThis( id, i18n( "Create or select implementation

    Creates or selects a subclass of selected form for use with integrated TDevDesigner." ) ); + popup->setWhatsThis( id, i18n( "Create or select implementation

    Creates or selects a subclass of selected form for use with integrated KDevDesigner." ) ); } } } @@ -1342,7 +1342,7 @@ void CppSupportPart::jumpToCodeModelItem( const ItemDom& item, bool scrollOnly ) lastSyncedUrl = url; } -TDevLanguageSupport::Features CppSupportPart::features() +KDevLanguageSupport::Features CppSupportPart::features() { if ( withcpp ) return Features( Classes | Structs | Functions | Variables | Namespaces | Declarations @@ -2065,7 +2065,7 @@ void CppSupportPart::codeCompletionConfigStored( ) /* m_backgroundParser->updateParserConfiguration(); - TDevDriver* d = dynamic_cast( m_driver ); //The foreground-parse isn't used anymore, and could be removed + KDevDriver* d = dynamic_cast( m_driver ); //The foreground-parse isn't used anymore, and could be removed if( d ) { d->setup(); d->makeMacrosPersistent(); @@ -2144,7 +2144,7 @@ TQString CppSupportPart::formatModelItem( const CodeModelItem *item, bool shortD return arg.stripWhiteSpace(); } else - return TDevLanguageSupport::formatModelItem( item, shortDescription ); + return KDevLanguageSupport::formatModelItem( item, shortDescription ); } void CppSupportPart::addClass() @@ -2677,7 +2677,7 @@ void CppSupportPart::slotCursorPositionChanged() { unsigned int line = 0; unsigned int column = 0; - if ( TDevEditorUtil::currentPositionReal( &line, &column, dynamic_cast( partController()->activePart() ) ) ) + if ( KDevEditorUtil::currentPositionReal( &line, &column, dynamic_cast( partController()->activePart() ) ) ) { TQString typeInfoString = codeCompletion()->createTypeInfoString( line, column ); mainWindow()->statusBar()->message( typeInfoString ); @@ -2738,7 +2738,7 @@ void CppSupportPart::updateParserConfiguration() TQString conf_file_name = specialHeaderName(); m_driver->removeAllMacrosInFile( conf_file_name ); - dynamic_cast(m_driver)->setup(); + dynamic_cast(m_driver)->setup(); m_driver->parseFile( conf_file_name, true, true, true ); m_buildSafeFileSetTimer->start( 500, true ); @@ -2753,9 +2753,9 @@ Driver* CppSupportPart::driver() { return m_driver; } -TDevDesignerIntegration * CppSupportPart::designer( KInterfaceDesigner::DesignerType type ) +KDevDesignerIntegration * CppSupportPart::designer( KInterfaceDesigner::DesignerType type ) { - TDevDesignerIntegration * des = 0; + KDevDesignerIntegration * des = 0; switch ( type ) { case KInterfaceDesigner::Glade: @@ -2847,7 +2847,7 @@ void CppSupportPart::addMethod( ClassDom aClass, const TQString& name, const TQS TQFileInfo info( aClass->fileName() ); TQString implementationFile = info.dirPath( true ) + "/" + info.baseName() + ".cpp" ; TQFileInfo fileInfo( implementationFile ); - TDevCreateFile* createFileSupport = extension( "TDevelop/CreateFile" ); + KDevCreateFile* createFileSupport = extension( "TDevelop/CreateFile" ); if ( !TQFile::exists( fileInfo.absFilePath() ) && createFileSupport != 0 ) createFileSupport->createNewFile( fileInfo.extension(), fileInfo.dirPath( true ), fileInfo.baseName() ); diff --git a/languages/cpp/cppsupportpart.h b/languages/cpp/cppsupportpart.h index ec00cd9c..7de698c0 100644 --- a/languages/cpp/cppsupportpart.h +++ b/languages/cpp/cppsupportpart.h @@ -18,8 +18,8 @@ #ifndef _CPPSUPPORTPART_H_ #define _CPPSUPPORTPART_H_ -#include -#include +#include +#include #include #include @@ -153,7 +153,7 @@ private: SetType m_fileSet; }; -class CppSupportPart : public TDevLanguageSupport +class CppSupportPart : public KDevLanguageSupport { Q_OBJECT @@ -243,7 +243,7 @@ public: //uses the old simple algorithm to find the header TQString findHeaderSimple( const TQString &header ); - virtual TDevDesignerIntegration *designer( KInterfaceDesigner::DesignerType type ); + virtual KDevDesignerIntegration *designer( KInterfaceDesigner::DesignerType type ); void setTyping( bool typing ); @@ -284,7 +284,7 @@ signals: void synchronousParseReady( const TQString& file, ParsedFilePointer unit ); protected: - virtual TDevLanguageSupport::Features features(); + virtual KDevLanguageSupport::Features features(); virtual KMimeType::List mimeTypes(); virtual TQString formatClassName( const TQString &name ); virtual TQString unformatClassName( const TQString &name ); @@ -435,7 +435,7 @@ private: KTextEditor::ViewCursorInterface* m_activeViewCursor; TQString m_activeFileName; - TQMap m_designers; + TQMap m_designers; TQWaitCondition m_eventConsumed; bool m_projectClosed; @@ -623,7 +623,7 @@ private: static TQStringList m_sourceExtensions; static TQStringList m_headerExtensions; - friend class TDevCppSupportIface; + friend class KDevCppSupportIface; friend class CppDriver; // we need something to plug actions that are not in any menu diff --git a/languages/cpp/createpcsdialog.cpp b/languages/cpp/createpcsdialog.cpp index 0f390477..9cca7ef8 100644 --- a/languages/cpp/createpcsdialog.cpp +++ b/languages/cpp/createpcsdialog.cpp @@ -17,8 +17,8 @@ #include "setuphelper.h" #include -#include -#include +#include +#include #include @@ -132,12 +132,12 @@ private: class PCSListViewItem: public TDEListViewItem { public: - PCSListViewItem( KService::Ptr ptr, TDevPCSImporter* importer, TQListViewItem* parent ) + PCSListViewItem( KService::Ptr ptr, KDevPCSImporter* importer, TQListViewItem* parent ) : TDEListViewItem( parent ), m_importer( importer ) { init( ptr ); } - PCSListViewItem( KService::Ptr ptr, TDevPCSImporter* importer, TQListView* parent ) + PCSListViewItem( KService::Ptr ptr, KDevPCSImporter* importer, TQListView* parent ) : TDEListViewItem( parent ), m_importer( importer ) { init( ptr ); @@ -155,13 +155,13 @@ public: setPixmap( 0, SmallIcon( ptr->icon() ) ); } - TDevPCSImporter* importer() + KDevPCSImporter* importer() { return m_importer; } private: - TDevPCSImporter* m_importer; + KDevPCSImporter* m_importer; }; class CreatePCSDialog::PCSJobData @@ -212,7 +212,7 @@ CreatePCSDialog::CreatePCSDialog( CppSupportPart* part, TQWidget* parent, const KService::Ptr ptr = *it; int error = 0; - TDevPCSImporter* importer = KParts::ComponentFactory::createInstanceFromService( ptr, TQT_TQOBJECT(this), ptr->name().latin1(), TQStringList(), &error ); + KDevPCSImporter* importer = KParts::ComponentFactory::createInstanceFromService( ptr, TQT_TQOBJECT(this), ptr->name().latin1(), TQStringList(), &error ); if ( importer ) { new PCSListViewItem( ptr, importer, importerListView ); @@ -272,7 +272,7 @@ void CreatePCSDialog::slotSelected( const TQString & ) if ( m_settings ) delete( m_settings ); - TDevPCSImporter* importer = static_cast( importerListView->selectedItem() ) ->importer(); + KDevPCSImporter* importer = static_cast( importerListView->selectedItem() ) ->importer(); m_settings = importer->createSettingsPage( settingsPage ); setNextEnabled( currentPage(), false ); setHelpEnabled( currentPage(), false ); @@ -286,7 +286,7 @@ void CreatePCSDialog::slotSelected( const TQString & ) } else if ( currentPage() == descriptionPage ) { - TDevPCSImporter* importer = static_cast( importerListView->selectedItem() )->importer(); + KDevPCSImporter* importer = static_cast( importerListView->selectedItem() )->importer(); filename_edit->setText( importer->dbName() ); } else if ( currentPage() == finalPage ) @@ -294,7 +294,7 @@ void CreatePCSDialog::slotSelected( const TQString & ) setBackEnabled( currentPage(), false ); setNextEnabled( currentPage(), false ); - TDevPCSImporter* importer = static_cast( importerListView->selectedItem() )->importer(); + KDevPCSImporter* importer = static_cast( importerListView->selectedItem() )->importer(); TQStringList fileList = importer->fileList(); progressBar->setTotalSteps( fileList.size() ); progressBar->setPercentageVisible( true ); diff --git a/languages/cpp/debugger/CMakeLists.txt b/languages/cpp/debugger/CMakeLists.txt index d5b91df2..4b660c1d 100644 --- a/languages/cpp/debugger/CMakeLists.txt +++ b/languages/cpp/debugger/CMakeLists.txt @@ -33,13 +33,13 @@ link_directories( ##### other data ################################ tde_install_icons( ) -install( FILES tdevdebugger.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevdebugger.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdebugger ) +install( FILES kdevdebugger.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevdebugger.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdebugger ) -##### libtdevdebugger (module) ################## +##### libkdevdebugger (module) ################## -tde_add_kpart( libtdevdebugger AUTOMOC +tde_add_kpart( libkdevdebugger AUTOMOC SOURCES debuggerdcopinterface.skel debuggerpart.cpp dbgcontroller.cpp gdbcontroller.cpp gdbcommand.cpp @@ -50,6 +50,6 @@ tde_add_kpart( libtdevdebugger AUTOMOC debuggerconfigwidgetbase.ui debuggertracingdialogbase.ui gdboutputwidget.cpp gdbtable.cpp debuggertracingdialog.cpp label_with_double_click.cpp - LINK gdbmi_parser-shared lang_debugger-shared tdevwidgets-shared tdevelop-shared + LINK gdbmi_parser-shared lang_debugger-shared kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/cpp/debugger/Makefile.am b/languages/cpp/debugger/Makefile.am index 40aba33a..09c147ad 100644 --- a/languages/cpp/debugger/Makefile.am +++ b/languages/cpp/debugger/Makefile.am @@ -7,13 +7,13 @@ INCLUDES = -I$(top_srcdir)/languages/lib/debugger \ -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevdebugger.la -libtdevdebugger_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevdebugger_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) \ +kde_module_LTLIBRARIES = libkdevdebugger.la +libkdevdebugger_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevdebugger_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) \ $(top_builddir)/languages/lib/debugger/liblang_debugger.la \ $(top_builddir)/languages/cpp/debugger/mi/libgdbmi_parser.la -libtdevdebugger_la_SOURCES = debuggerdcopinterface.skel debuggerpart.cpp \ +libkdevdebugger_la_SOURCES = debuggerdcopinterface.skel debuggerpart.cpp \ dbgcontroller.cpp gdbcontroller.cpp gdbcommand.cpp \ gdbparser.cpp stty.cpp breakpoint.cpp variablewidget.cpp \ gdbbreakpointwidget.cpp framestackwidget.cpp disassemblewidget.cpp \ @@ -26,8 +26,8 @@ METASOURCES = AUTO KDE_ICON = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdebugger.desktop +service_DATA = kdevdebugger.desktop -rcdir = $(kde_datadir)/tdevdebugger -rc_DATA = tdevdebugger.rc +rcdir = $(kde_datadir)/kdevdebugger +rc_DATA = kdevdebugger.rc noinst_HEADERS = gdbtable.h diff --git a/languages/cpp/debugger/debuggerconfigwidget.cpp b/languages/cpp/debugger/debuggerconfigwidget.cpp index dab4486b..2b8523ae 100644 --- a/languages/cpp/debugger/debuggerconfigwidget.cpp +++ b/languages/cpp/debugger/debuggerconfigwidget.cpp @@ -14,7 +14,7 @@ #include "debuggerconfigwidget.h" #include "debuggerpart.h" -#include "tdevproject.h" +#include "kdevproject.h" #include "domutil.h" #include diff --git a/languages/cpp/debugger/debuggerpart.cpp b/languages/cpp/debugger/debuggerpart.cpp index f2379ccb..3cae3762 100644 --- a/languages/cpp/debugger/debuggerpart.cpp +++ b/languages/cpp/debugger/debuggerpart.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -37,12 +37,12 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" -#include "tdevdebugger.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" +#include "kdevdebugger.h" #include "domutil.h" #include "variablewidget.h" #include "gdbbreakpointwidget.h" @@ -61,7 +61,7 @@ #include -#include +#include #include @@ -71,13 +71,13 @@ namespace GDBDebugger { -static const TDevPluginInfo data("tdevdebugger"); +static const KDevPluginInfo data("kdevdebugger"); -typedef TDevGenericFactory DebuggerFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevdebugger, DebuggerFactory( data ) ) +typedef KDevGenericFactory DebuggerFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevdebugger, DebuggerFactory( data ) ) DebuggerPart::DebuggerPart( TQObject *parent, const char *name, const TQStringList & ) : - TDevPlugin( &data, parent, name ? name : "DebuggerPart" ), + KDevPlugin( &data, parent, name ? name : "DebuggerPart" ), controller(0), previousDebuggerState_(s_dbgNotStarted), justRestarted_(false), needRebuild_(true), running_(false) @@ -85,7 +85,7 @@ DebuggerPart::DebuggerPart( TQObject *parent, const char *name, const TQStringLi setObjId("DebuggerInterface"); setInstance(DebuggerFactory::instance()); - setXMLFile("tdevdebugger.rc"); + setXMLFile("kdevdebugger.rc"); m_debugger = new Debugger( partController() ); @@ -333,8 +333,8 @@ DebuggerPart::DebuggerPart( TQObject *parent, const char *name, const TQStringLi connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStop(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStop(KDevPlugin*)) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -858,7 +858,7 @@ void DebuggerPart::slotRun() if (rebuild) { disconnect(TQT_SIGNAL(buildProject())); - // The TDevProject has no method to build the project, + // The KDevProject has no method to build the project, // so try connecting to a slot has is present to all // existing project managers. // Note: this assumes that 'slotBuild' will save @@ -984,7 +984,7 @@ bool DebuggerPart::attachProcess(int pid) } -void DebuggerPart::slotStop(TDevPlugin* which) +void DebuggerPart::slotStop(KDevPlugin* which) { if( which != 0 && which != this ) return; @@ -1259,12 +1259,12 @@ bool DebuggerPart::haveModifiedFiles() } -TDevAppFrontend * GDBDebugger::DebuggerPart::appFrontend( ) +KDevAppFrontend * GDBDebugger::DebuggerPart::appFrontend( ) { - return extension("TDevelop/AppFrontend"); + return extension("TDevelop/AppFrontend"); } -TDevDebugger * GDBDebugger::DebuggerPart::debugger() +KDevDebugger * GDBDebugger::DebuggerPart::debugger() { return m_debugger; } diff --git a/languages/cpp/debugger/debuggerpart.h b/languages/cpp/debugger/debuggerpart.h index f1f27d23..50479249 100644 --- a/languages/cpp/debugger/debuggerpart.h +++ b/languages/cpp/debugger/debuggerpart.h @@ -15,8 +15,8 @@ #define _DEBUGGERPART_H_ #include -#include "tdevplugin.h" -#include "tdevcore.h" +#include "kdevplugin.h" +#include "kdevcore.h" #include "gdbcontroller.h" #include "debuggerdcopinterface.h" @@ -28,8 +28,8 @@ class TQPopupMenu; class KDialogBase; class ProcessWidget; class ProcessLineMaker; -class TDevAppFrontend; -class TDevDebugger; +class KDevAppFrontend; +class KDevDebugger; namespace GDBDebugger { @@ -44,7 +44,7 @@ class VariableWidget; class GDBOutputWidget; class ViewerWidget; -class DebuggerPart : public TDevPlugin, virtual public DebuggerDCOPInterface +class DebuggerPart : public KDevPlugin, virtual public DebuggerDCOPInterface { Q_OBJECT @@ -82,7 +82,7 @@ private slots: void slotExamineCore(); void slotAttachProcess(); void slotStopDebugger(); - void slotStop(TDevPlugin* which = 0); + void slotStop(KDevPlugin* which = 0); void slotPause(); void slotRunToCursor(); void slotJumpToCursor(); @@ -116,8 +116,8 @@ private slots: void slotEvent(GDBController::event_t); private: - TDevAppFrontend *appFrontend(); - TDevDebugger *debugger(); + KDevAppFrontend *appFrontend(); + KDevDebugger *debugger(); bool attachProcess(int pid); bool startDebugger(); @@ -139,7 +139,7 @@ private: TQString m_contextIdent; TQCString m_drkonqi; - TDevDebugger *m_debugger; + KDevDebugger *m_debugger; int previousDebuggerState_; // Set to true after each debugger restart // Currently used to auto-show variables view diff --git a/languages/cpp/debugger/kdevdebugger.desktop b/languages/cpp/debugger/kdevdebugger.desktop new file mode 100644 index 00000000..beaf17f3 --- /dev/null +++ b/languages/cpp/debugger/kdevdebugger.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin provides a frontend for GDB, a source-level debugger for C, C++ and more. http://sources.redhat.com/gdb/ +Comment[ca]=Aquest connector proveeix una interfície per a GDB, un depurador a nivell de codi per a C, C++ i d'altres. http://sources.redhat.com/gdb/ +Comment[da]=Dette plugin sørger for en brugerflade til GDB, en fejlretter til C, C++ og mere. http://sources.redhat.com/gdb/ +Comment[de]=Dieses Modul bietet eine Oberfläche für GDB, einen Quellcode-Debugger für C, C++ und andere Sprachen. http://sources.redhat.com/gdb/ +Comment[el]=Αυτό το πρόσθετο προσφέρει ένα πρόγραμμα για το GDB, έναν αποσφαλματωτή πηγαίου κώδικα για C, C++ και άλλες γλώσσες. http://sources.redhat.com/gdb/ +Comment[es]=Este complemento proporciona un entorno para GDB, un depurador a nivel de código para C, C++ y otros (http://sources.redhat.com/gdb/) +Comment[et]=See plugin pakub GDB kasutajaliidest. GDB on C, C++ ja veel mitme keele lähtekoodi tasandil tegutsev siluja. http://sources.redhat.com/gdb/ +Comment[eu]=Plugin honek GDB-rako interfaze bat eskeintzen du. GDB, C eta C++-rako iturburu-mailako araztaile bat da. http://sources.redhat.com/gdb/ +Comment[fa]=این وصله پایانه‌ای برای GDB، اشکال‌زدای سطح منبع برای سی، C++ و بیشتر تولید می‌کند. http://sources.redhat.com/gdb/ +Comment[fr]=Ce module externe fournit une interface pour GDB, un débogueur au niveau source pour C, C++ et autres. http://sources.redhat.com/gdb/ +Comment[gl]=Esta extensión proporciona un frontal para GDB, un depurador a nivel de código para C, C++ e outras linguaxes. http://sources.redhat.com/gdb/ +Comment[hi]=यह प्लगइन जीडीबी के लिए फ्रन्टएण्ड प्रदान करता है, जो सी, सी++ तथा और भी के लिए स्रोत-स्तर पर डिबगर हैhttp://sources.redhat.com/gdb/ +Comment[hu]=Ez a bővítőmodul grafikus felületet biztosít a GDB nyomkövető használatához, C/C++-hoz és más nyelvekhez, forrásszinten. http://sources.redhat.com/gdb/ +Comment[is]=Þetta íforrit útvegar framhlið fyrir GDB, frumkóða-aflúsara fyrir C, C++ og fleira. http://sources.redhat.com/gdb/ +Comment[it]=Questo plugin fornisce un'interfaccia per GDB, un debugger a livello sorgente per C, C++ e altro. http://sources.redhat.com/gdb/ +Comment[ja]=このプラグインは、C, C++ などのソースレベルデバッガ GDB のフロントエンドを提供します。http://sources.redhat.com/gdb/ +Comment[nds]=Dit Moduul stellt en Böversiet för GDB praat, en Bornkode-Fehlersöker för C, C++ un annerswat. http://sources.redhat.com/gdb/ +Comment[ne]=यो प्लगइनले C, C++ र बढीका लागि स्रोत-तह डिबगर,GDB का लागि फ्रन्टइन्ड प्रदान गर्दछ । http://sources.redhat.com/gdb/ +Comment[nl]=Deze plugin biedt een grafische schil voor GDB, een broncode-debugger voor C, C++ en meer. http://sources.redhat.com/gdb/ +Comment[pl]=Ta wtyczka udostępnia interfejs do GDB, debugera poziomu źródłowego dla C, C++ i innych. http://sources.redhat.com/gdb/ +Comment[pt]=Este 'plugin' oferece uma interface para o GDB, um depurador ao nível do código para C, C++ entre outros. http://sources.redhat.com/gdb/ +Comment[pt_BR]=Este plug-in fornece um frontend para o GDB, um depurador a nível de código para C, C++ e mais. http://sources.redhat.com/gdb/ +Comment[ru]=Этот модуль предоставляет интерфейс к GDB, отладчику исходного кода для C, C++ и других языков. http://sources.redhat.com/gdb/ +Comment[sk]=Tento modul poskytuje rozhranie pre GDB, debuger pre C, C++ a ďalšie. http://sources.redhat.com/gdb/ +Comment[sl]=Ta vstavek omogoča vmesnik za GDB, razhroščevalnik na ravni izvorne kode za C, C++ in več. http://sourcs.redhat.com/gdb/ +Comment[sr]=Овај прикључак обезбеђује интерфејс за GDB, исправљач на нивоу изворног кода за C, C++ и више. http://sources.redhat.com/gdb/ +Comment[sr@Latn]=Ovaj priključak obezbeđuje interfejs za GDB, ispravljač na nivou izvornog koda za C, C++ i više. http://sources.redhat.com/gdb/ +Comment[sv]=Insticksprogrammet tillhandahåller ett gränssnitt till GDB, en källkodsavlusare för C, C++ med mera. http://sources.redhat.com/gdb/ +Comment[ta]=GDB க்கு இந்த சொருகு ஒரு முன்நிறுத்தல் , C, C++ மற்றும் பலவற்றிற்கு ஒரு மூல-நிலை டிபக்கர் +Comment[tg]=Ин модул дар GDB интерфейсро ба ихтиёр мегузорад, созгузори код барои C, C++ ибтидоӣва барои дигар забонҳо. http://sources.redhat.com/gdb/ +Comment[tr]=Bu eklenti, C, C++ ve daha fazlası için bir kaynak-düzeyinde hata ayıklayıcı olan GDB için bir önucu sağlar. http://sources.redhat.com/gdb/ +Comment[zh_CN]=这个插件是一个 GDB 前端,一个 C、C++ 和其它语言的源代码调试器。http://sources.redhat.com/gdb/ +Comment[zh_TW]=這個外掛程式提供 GDB 的前端介面。GDB 是一個 C/C++ 還有其它語言的除錯器。http://sources.redhat.com/gdb/ +Name=KDevDebugger +Name[da]=TDevelop Debugger +Name[de]=Debugger (TDevelop) +Name[hi]=के-डेव-डिबगर +Name[nds]=TDevelop-Fehlersöker +Name[ne]=केडीई विकास डिबगर +Name[pl]=KDevDebuger +Name[sk]=KDev debuger +Name[sv]=TDevelop avlusare +Name[ta]=கெடெவ் டிபக்கர் +Name[zh_TW]=TDevelop 除錯器 +GenericName=Debugger Frontend +GenericName[ca]=Interfície per al depurador +GenericName[da]=Fejlsøgningsbrugerflade +GenericName[de]=Debugger-Oberfläche +GenericName[el]=Πρόγραμμα Αποσφαλματωτή +GenericName[es]=Entorno del depurador +GenericName[et]=Siluja kasutajaliides +GenericName[eu]=Araztaile-interfazea +GenericName[fa]=پایانۀ اشکال‌زدا +GenericName[fr]=Interface du débogueur +GenericName[ga]=Comhéadan Dífhabhtóra +GenericName[gl]=Frontal de depuración +GenericName[hi]=डिबगर फ्रन्टएण्ड +GenericName[hu]=Grafikus felület nyomkövetéshez +GenericName[it]=Interfaccia al debugger +GenericName[ja]=デバッガフロントエンド +GenericName[nds]=Fehlersöker-Böversiet +GenericName[ne]=डिबगर फ्रन्टइन्ड +GenericName[nl]=Grafische schil voor debugger +GenericName[pl]=Interfejs do debugera +GenericName[pt]=Interface de Depuração +GenericName[pt_BR]=Frontend do Depurador +GenericName[ru]=Интегрированный отладчик +GenericName[sk]=Debuger rozhranie +GenericName[sl]=Vmesnik razhroščevalnika +GenericName[sr]=Интерфејс исправљача +GenericName[sr@Latn]=Interfejs ispravljača +GenericName[sv]=Gränssnitt för avlusare +GenericName[ta]=டிபக்கர் பிரான்டட் +GenericName[tg]=Интеграл ёфтани созгузор +GenericName[tr]=Hata Ayıklayıcı Önucu +GenericName[zh_CN]=调试器前端 +GenericName[zh_TW]=除錯器前端 +Icon=debugger +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevdebugger +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=CompiledDevelopment diff --git a/languages/cpp/debugger/kdevdebugger.rc b/languages/cpp/debugger/kdevdebugger.rc new file mode 100644 index 00000000..801cadb8 --- /dev/null +++ b/languages/cpp/debugger/kdevdebugger.rc @@ -0,0 +1,93 @@ + + + +

    + &Debug + + + + + + + + + + + + + + + + + + + + + + + + Debugger Toolbar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/cpp/debugger/tdevdebugger.desktop b/languages/cpp/debugger/tdevdebugger.desktop deleted file mode 100644 index 9db31510..00000000 --- a/languages/cpp/debugger/tdevdebugger.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin provides a frontend for GDB, a source-level debugger for C, C++ and more. http://sources.redhat.com/gdb/ -Comment[ca]=Aquest connector proveeix una interfície per a GDB, un depurador a nivell de codi per a C, C++ i d'altres. http://sources.redhat.com/gdb/ -Comment[da]=Dette plugin sørger for en brugerflade til GDB, en fejlretter til C, C++ og mere. http://sources.redhat.com/gdb/ -Comment[de]=Dieses Modul bietet eine Oberfläche für GDB, einen Quellcode-Debugger für C, C++ und andere Sprachen. http://sources.redhat.com/gdb/ -Comment[el]=Αυτό το πρόσθετο προσφέρει ένα πρόγραμμα για το GDB, έναν αποσφαλματωτή πηγαίου κώδικα για C, C++ και άλλες γλώσσες. http://sources.redhat.com/gdb/ -Comment[es]=Este complemento proporciona un entorno para GDB, un depurador a nivel de código para C, C++ y otros (http://sources.redhat.com/gdb/) -Comment[et]=See plugin pakub GDB kasutajaliidest. GDB on C, C++ ja veel mitme keele lähtekoodi tasandil tegutsev siluja. http://sources.redhat.com/gdb/ -Comment[eu]=Plugin honek GDB-rako interfaze bat eskeintzen du. GDB, C eta C++-rako iturburu-mailako araztaile bat da. http://sources.redhat.com/gdb/ -Comment[fa]=این وصله پایانه‌ای برای GDB، اشکال‌زدای سطح منبع برای سی، C++ و بیشتر تولید می‌کند. http://sources.redhat.com/gdb/ -Comment[fr]=Ce module externe fournit une interface pour GDB, un débogueur au niveau source pour C, C++ et autres. http://sources.redhat.com/gdb/ -Comment[gl]=Esta extensión proporciona un frontal para GDB, un depurador a nivel de código para C, C++ e outras linguaxes. http://sources.redhat.com/gdb/ -Comment[hi]=यह प्लगइन जीडीबी के लिए फ्रन्टएण्ड प्रदान करता है, जो सी, सी++ तथा और भी के लिए स्रोत-स्तर पर डिबगर हैhttp://sources.redhat.com/gdb/ -Comment[hu]=Ez a bővítőmodul grafikus felületet biztosít a GDB nyomkövető használatához, C/C++-hoz és más nyelvekhez, forrásszinten. http://sources.redhat.com/gdb/ -Comment[is]=Þetta íforrit útvegar framhlið fyrir GDB, frumkóða-aflúsara fyrir C, C++ og fleira. http://sources.redhat.com/gdb/ -Comment[it]=Questo plugin fornisce un'interfaccia per GDB, un debugger a livello sorgente per C, C++ e altro. http://sources.redhat.com/gdb/ -Comment[ja]=このプラグインは、C, C++ などのソースレベルデバッガ GDB のフロントエンドを提供します。http://sources.redhat.com/gdb/ -Comment[nds]=Dit Moduul stellt en Böversiet för GDB praat, en Bornkode-Fehlersöker för C, C++ un annerswat. http://sources.redhat.com/gdb/ -Comment[ne]=यो प्लगइनले C, C++ र बढीका लागि स्रोत-तह डिबगर,GDB का लागि फ्रन्टइन्ड प्रदान गर्दछ । http://sources.redhat.com/gdb/ -Comment[nl]=Deze plugin biedt een grafische schil voor GDB, een broncode-debugger voor C, C++ en meer. http://sources.redhat.com/gdb/ -Comment[pl]=Ta wtyczka udostępnia interfejs do GDB, debugera poziomu źródłowego dla C, C++ i innych. http://sources.redhat.com/gdb/ -Comment[pt]=Este 'plugin' oferece uma interface para o GDB, um depurador ao nível do código para C, C++ entre outros. http://sources.redhat.com/gdb/ -Comment[pt_BR]=Este plug-in fornece um frontend para o GDB, um depurador a nível de código para C, C++ e mais. http://sources.redhat.com/gdb/ -Comment[ru]=Этот модуль предоставляет интерфейс к GDB, отладчику исходного кода для C, C++ и других языков. http://sources.redhat.com/gdb/ -Comment[sk]=Tento modul poskytuje rozhranie pre GDB, debuger pre C, C++ a ďalšie. http://sources.redhat.com/gdb/ -Comment[sl]=Ta vstavek omogoča vmesnik za GDB, razhroščevalnik na ravni izvorne kode za C, C++ in več. http://sourcs.redhat.com/gdb/ -Comment[sr]=Овај прикључак обезбеђује интерфејс за GDB, исправљач на нивоу изворног кода за C, C++ и више. http://sources.redhat.com/gdb/ -Comment[sr@Latn]=Ovaj priključak obezbeđuje interfejs za GDB, ispravljač na nivou izvornog koda za C, C++ i više. http://sources.redhat.com/gdb/ -Comment[sv]=Insticksprogrammet tillhandahåller ett gränssnitt till GDB, en källkodsavlusare för C, C++ med mera. http://sources.redhat.com/gdb/ -Comment[ta]=GDB க்கு இந்த சொருகு ஒரு முன்நிறுத்தல் , C, C++ மற்றும் பலவற்றிற்கு ஒரு மூல-நிலை டிபக்கர் -Comment[tg]=Ин модул дар GDB интерфейсро ба ихтиёр мегузорад, созгузори код барои C, C++ ибтидоӣва барои дигар забонҳо. http://sources.redhat.com/gdb/ -Comment[tr]=Bu eklenti, C, C++ ve daha fazlası için bir kaynak-düzeyinde hata ayıklayıcı olan GDB için bir önucu sağlar. http://sources.redhat.com/gdb/ -Comment[zh_CN]=这个插件是一个 GDB 前端,一个 C、C++ 和其它语言的源代码调试器。http://sources.redhat.com/gdb/ -Comment[zh_TW]=這個外掛程式提供 GDB 的前端介面。GDB 是一個 C/C++ 還有其它語言的除錯器。http://sources.redhat.com/gdb/ -Name=TDevDebugger -Name[da]=TDevelop Debugger -Name[de]=Debugger (TDevelop) -Name[hi]=के-डेव-डिबगर -Name[nds]=TDevelop-Fehlersöker -Name[ne]=केडीई विकास डिबगर -Name[pl]=KDevDebuger -Name[sk]=KDev debuger -Name[sv]=TDevelop avlusare -Name[ta]=கெடெவ் டிபக்கர் -Name[zh_TW]=TDevelop 除錯器 -GenericName=Debugger Frontend -GenericName[ca]=Interfície per al depurador -GenericName[da]=Fejlsøgningsbrugerflade -GenericName[de]=Debugger-Oberfläche -GenericName[el]=Πρόγραμμα Αποσφαλματωτή -GenericName[es]=Entorno del depurador -GenericName[et]=Siluja kasutajaliides -GenericName[eu]=Araztaile-interfazea -GenericName[fa]=پایانۀ اشکال‌زدا -GenericName[fr]=Interface du débogueur -GenericName[ga]=Comhéadan Dífhabhtóra -GenericName[gl]=Frontal de depuración -GenericName[hi]=डिबगर फ्रन्टएण्ड -GenericName[hu]=Grafikus felület nyomkövetéshez -GenericName[it]=Interfaccia al debugger -GenericName[ja]=デバッガフロントエンド -GenericName[nds]=Fehlersöker-Böversiet -GenericName[ne]=डिबगर फ्रन्टइन्ड -GenericName[nl]=Grafische schil voor debugger -GenericName[pl]=Interfejs do debugera -GenericName[pt]=Interface de Depuração -GenericName[pt_BR]=Frontend do Depurador -GenericName[ru]=Интегрированный отладчик -GenericName[sk]=Debuger rozhranie -GenericName[sl]=Vmesnik razhroščevalnika -GenericName[sr]=Интерфејс исправљача -GenericName[sr@Latn]=Interfejs ispravljača -GenericName[sv]=Gränssnitt för avlusare -GenericName[ta]=டிபக்கர் பிரான்டட் -GenericName[tg]=Интеграл ёфтани созгузор -GenericName[tr]=Hata Ayıklayıcı Önucu -GenericName[zh_CN]=调试器前端 -GenericName[zh_TW]=除錯器前端 -Icon=debugger -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevdebugger -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=CompiledDevelopment diff --git a/languages/cpp/debugger/tdevdebugger.rc b/languages/cpp/debugger/tdevdebugger.rc deleted file mode 100644 index 99a10f3c..00000000 --- a/languages/cpp/debugger/tdevdebugger.rc +++ /dev/null @@ -1,93 +0,0 @@ - - - - - &Debug - - - - - - - - - - - - - - - - - - - - - - - - Debugger Toolbar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/languages/cpp/debugger/tests/breakpoints/breakpoints.tdevelop b/languages/cpp/debugger/tests/breakpoints/breakpoints.tdevelop index fc68be33..54214a1b 100644 --- a/languages/cpp/debugger/tests/breakpoints/breakpoints.tdevelop +++ b/languages/cpp/debugger/tests/breakpoints/breakpoints.tdevelop @@ -4,14 +4,14 @@ Vladimir Prus ghost@ghostwalk $VERSION$ - TDevCustomProject + KDevCustomProject C++ . false - + breakpoints executable @@ -38,8 +38,8 @@ - - + + @@ -56,8 +56,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -102,16 +102,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -143,8 +143,8 @@ true Vertical - - + + false false @@ -153,7 +153,7 @@ *.o,*.lo,CVS false - + .h diff --git a/languages/cpp/debugger/tests/dll/dll.tdevelop b/languages/cpp/debugger/tests/dll/dll.tdevelop index b875ae48..f92f1d08 100644 --- a/languages/cpp/debugger/tests/dll/dll.tdevelop +++ b/languages/cpp/debugger/tests/dll/dll.tdevelop @@ -4,14 +4,14 @@ Vladimir Prus ghost@ghostwalk $VERSION$ - TDevCustomProject + KDevCustomProject C++ . false - + main executable @@ -38,8 +38,8 @@ - - + + @@ -56,8 +56,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -102,22 +102,22 @@ KDE Libraries (Doxygen) - - + + - + .h .cpp - + false 3 @@ -144,8 +144,8 @@ true - - + + false false @@ -154,5 +154,5 @@ *.o,*.lo,CVS false - + diff --git a/languages/cpp/debugger/tests/infinite_loop/infinite_loop.tdevelop b/languages/cpp/debugger/tests/infinite_loop/infinite_loop.tdevelop index 3096faea..267a73d8 100644 --- a/languages/cpp/debugger/tests/infinite_loop/infinite_loop.tdevelop +++ b/languages/cpp/debugger/tests/infinite_loop/infinite_loop.tdevelop @@ -4,22 +4,22 @@ Vladimir Prus ghost@zigzag $VERSION$ - TDevCustomProject + KDevCustomProject C++ - + infinite_loop executable - - + + - - + + ada ada_bugs_gcc @@ -64,16 +64,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -95,8 +95,8 @@ true false - - + + false false @@ -105,5 +105,5 @@ *.o,*.lo,CVS false - + diff --git a/languages/cpp/debugger/tests/print_pointers/print_pointers.tdevelop b/languages/cpp/debugger/tests/print_pointers/print_pointers.tdevelop index fc7f4d19..a838d09d 100644 --- a/languages/cpp/debugger/tests/print_pointers/print_pointers.tdevelop +++ b/languages/cpp/debugger/tests/print_pointers/print_pointers.tdevelop @@ -4,7 +4,7 @@ Vladimir Prus ghost@cs.msu.su $VERSION$ - TDevCustomProject + KDevCustomProject C++ kdevsecurity @@ -18,7 +18,7 @@ print_pointers - + print_pointers executable @@ -62,8 +62,8 @@ CMakeLists.txt - - + + @@ -80,8 +80,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -126,22 +126,22 @@ KDE Libraries (Doxygen) - - + + - + .h .cpp - + true true @@ -185,7 +185,7 @@ 3 /usr/share/qt3 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner /usr/bin/qmake-qt3 /usr/bin/designer @@ -195,8 +195,8 @@ true Vertical - - + + false false @@ -205,8 +205,8 @@ *.o,*.lo,CVS false - - + + VisualBoyAdvance @@ -214,5 +214,5 @@ false -f0 -1 - + diff --git a/languages/cpp/debugger/tests/segfault/segfault.tdevelop b/languages/cpp/debugger/tests/segfault/segfault.tdevelop index e48ed4e4..4eccf2e1 100644 --- a/languages/cpp/debugger/tests/segfault/segfault.tdevelop +++ b/languages/cpp/debugger/tests/segfault/segfault.tdevelop @@ -4,14 +4,14 @@ Vladimir Prus ghost@zigzag $VERSION$ - TDevCustomProject + KDevCustomProject C++ . false - + segfault executable @@ -38,8 +38,8 @@ - - + + @@ -56,8 +56,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -102,16 +102,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -143,8 +143,8 @@ true Vertical - - + + false false @@ -153,7 +153,7 @@ *.o,*.lo,CVS false - + .h diff --git a/languages/cpp/debugger/tests/threads/threads.tdevelop b/languages/cpp/debugger/tests/threads/threads.tdevelop index c730bfc4..048b3aed 100644 --- a/languages/cpp/debugger/tests/threads/threads.tdevelop +++ b/languages/cpp/debugger/tests/threads/threads.tdevelop @@ -4,22 +4,22 @@ Vladimir Prus ghost@zigzag $VERSION$ - TDevCustomProject + KDevCustomProject C++ - + threads executable - - + + - - + + ada ada_bugs_gcc @@ -64,16 +64,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -87,8 +87,8 @@ 400 250 - - + + false false @@ -97,5 +97,5 @@ *.o,*.lo,CVS false - + diff --git a/languages/cpp/debugger/tests/tracing/tracing.tdevelop b/languages/cpp/debugger/tests/tracing/tracing.tdevelop index ab1846ef..56743de1 100644 --- a/languages/cpp/debugger/tests/tracing/tracing.tdevelop +++ b/languages/cpp/debugger/tests/tracing/tracing.tdevelop @@ -4,14 +4,14 @@ Vladimir Prus ghost@ghostwalk $VERSION$ - TDevCustomProject + KDevCustomProject C++ . false - + tracing executable @@ -38,8 +38,8 @@ - - + + @@ -56,8 +56,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -102,16 +102,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -143,8 +143,8 @@ true Vertical - - + + false false @@ -153,7 +153,7 @@ *.o,*.lo,CVS false - + .h diff --git a/languages/cpp/debugger/tests/two_module/two_module.tdevelop b/languages/cpp/debugger/tests/two_module/two_module.tdevelop index e4a9ae33..a6d22c2a 100644 --- a/languages/cpp/debugger/tests/two_module/two_module.tdevelop +++ b/languages/cpp/debugger/tests/two_module/two_module.tdevelop @@ -4,14 +4,14 @@ Vladimir Prus ghost@ghostwalk $VERSION$ - TDevCustomProject + KDevCustomProject C++ . false - + two_module executable @@ -38,8 +38,8 @@ - - + + @@ -56,8 +56,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -102,16 +102,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -143,8 +143,8 @@ true Vertical - - + + false false @@ -153,7 +153,7 @@ *.o,*.lo,CVS false - + .h diff --git a/languages/cpp/doc/CMakeLists.txt b/languages/cpp/doc/CMakeLists.txt index a6371ae2..9a2b4e11 100644 --- a/languages/cpp/doc/CMakeLists.txt +++ b/languages/cpp/doc/CMakeLists.txt @@ -10,8 +10,8 @@ ################################################# install( FILES - libc.toc libstdc++.toc tdetemplates.toc stl.toc - qt-tdev3.toc tde2book.toc gnustep.toc gnome1.toc + libc.toc libstdc++.toc kdetemplates.toc stl.toc + qt-kdev3.toc kde2book.toc gnustep.toc gnome1.toc clanlib.toc c++_bugs_gcc.toc gtk_bugs.toc wxwidgets_bugs.toc cppannotations.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/cpp/doc/Makefile.am b/languages/cpp/doc/Makefile.am index cf1ecd60..55571124 100644 --- a/languages/cpp/doc/Makefile.am +++ b/languages/cpp/doc/Makefile.am @@ -1,5 +1,5 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs -toc_DATA = libc.toc libstdc++.toc tdetemplates.toc stl.toc qt-tdev3.toc tde2book.toc \ +tocdir = ${kde_datadir}/kdevdocumentation/tocs +toc_DATA = libc.toc libstdc++.toc kdetemplates.toc stl.toc qt-kdev3.toc kde2book.toc \ gnustep.toc gnome1.toc clanlib.toc c++_bugs_gcc.toc gtk_bugs.toc wxwidgets_bugs.toc \ cppannotations.toc diff --git a/languages/cpp/doc/clanlib.toc b/languages/cpp/doc/clanlib.toc index 82cfe409..2cad8dcd 100644 --- a/languages/cpp/doc/clanlib.toc +++ b/languages/cpp/doc/clanlib.toc @@ -7,7 +7,7 @@ - + diff --git a/languages/cpp/doc/gnome1.toc b/languages/cpp/doc/gnome1.toc index 3cb995d3..577d61af 100644 --- a/languages/cpp/doc/gnome1.toc +++ b/languages/cpp/doc/gnome1.toc @@ -124,7 +124,7 @@ - + diff --git a/languages/cpp/doc/kde2book.toc b/languages/cpp/doc/kde2book.toc new file mode 100644 index 00000000..d806e440 --- /dev/null +++ b/languages/cpp/doc/kde2book.toc @@ -0,0 +1,2875 @@ + + +KDE2 Development Book (kde.org) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/cpp/doc/kdetemplates.toc b/languages/cpp/doc/kdetemplates.toc new file mode 100644 index 00000000..c764c0c4 --- /dev/null +++ b/languages/cpp/doc/kdetemplates.toc @@ -0,0 +1,9 @@ + + +The KDevelop C++ KDE templates explained + + + + + + diff --git a/languages/cpp/doc/qt-kdev3.toc b/languages/cpp/doc/qt-kdev3.toc new file mode 100644 index 00000000..af086cf5 --- /dev/null +++ b/languages/cpp/doc/qt-kdev3.toc @@ -0,0 +1,39 @@ + + +Qt Designer-3 and KDevelop-3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/languages/cpp/doc/qt-tdev3.toc b/languages/cpp/doc/qt-tdev3.toc deleted file mode 100644 index 3f6ffff0..00000000 --- a/languages/cpp/doc/qt-tdev3.toc +++ /dev/null @@ -1,39 +0,0 @@ - - -Qt Designer-3 and TDevelop-3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/languages/cpp/doc/tde2book.toc b/languages/cpp/doc/tde2book.toc deleted file mode 100644 index 79ceb137..00000000 --- a/languages/cpp/doc/tde2book.toc +++ /dev/null @@ -1,2875 +0,0 @@ - - -KDE2 Development Book (kde.org) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/languages/cpp/doc/tdetemplates.toc b/languages/cpp/doc/tdetemplates.toc deleted file mode 100644 index c764c0c4..00000000 --- a/languages/cpp/doc/tdetemplates.toc +++ /dev/null @@ -1,9 +0,0 @@ - - -The KDevelop C++ KDE templates explained - - - - - - diff --git a/languages/cpp/file_templates/CMakeLists.txt b/languages/cpp/file_templates/CMakeLists.txt index f7dbfda7..17909c7d 100644 --- a/languages/cpp/file_templates/CMakeLists.txt +++ b/languages/cpp/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES c cpp h l ll y yy - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/cpp/file_templates/Makefile.am b/languages/cpp/file_templates/Makefile.am index 722d3091..d688d547 100644 --- a/languages/cpp/file_templates/Makefile.am +++ b/languages/cpp/file_templates/Makefile.am @@ -1,3 +1,3 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = c cpp h l ll y yy diff --git a/languages/cpp/kdevcppsupport.desktop b/languages/cpp/kdevcppsupport.desktop new file mode 100644 index 00000000..cd638819 --- /dev/null +++ b/languages/cpp/kdevcppsupport.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=C++ Support +Comment[ca]=Suport per a C++ +Comment[da]=C++ understøttelse +Comment[de]=C++-Unterstützung für TDevelop +Comment[el]=Υποστήριξη C++ +Comment[es]=Soporte para C++ +Comment[et]=C++ toetus +Comment[eu]=C++ euskarria +Comment[fa]=پشتیبانی C++ +Comment[fr]=Prise en charge du langage C++ +Comment[ga]=Tacaíocht C++ +Comment[gl]=Soporte para C++ +Comment[hi]=सी++ समर्थन +Comment[hu]=C++-támogatás +Comment[is]=C++ stuðningur +Comment[it]=Supporto per C++ +Comment[ja]=C++ サポート +Comment[nds]=Ünnerstütten för C++ +Comment[ne]=C++ समर्थन +Comment[nl]=Ondersteuning voor C++ +Comment[pl]=Obsługa C++ +Comment[pt]=Suporte a C++ +Comment[pt_BR]=Suporte ao C++ +Comment[ru]=Поддержка языка C++ +Comment[sk]=C++ podpora +Comment[sl]=Podpora za C++ +Comment[sr]=Подршка за C++ +Comment[sr@Latn]=Podrška za C++ +Comment[sv]=C++ stöd +Comment[ta]=C++ ஆதரவு +Comment[tg]=Ёрӣ намудани забони C++ +Comment[tr]=C++ Desteği +Comment[zh_CN]=C++ 支持 +Comment[zh_TW]=C++ 支援 +Name=KDevCppSupport +Name[da]=TDevelop C++ understøttelse +Name[hi]=के-डेव-सीपीपी-समर्थन +Name[nds]=CPP-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaCpp +Name[sk]=KDev C++ podpora +Name[sv]=TDevelop C++ stöd +Name[ta]=கெடெவ்சிபிபி ஆதரவு +Name[zh_TW]=TDevelop C++ 支援 +GenericName=C++ Support +GenericName[ca]=Suport per a C++ +GenericName[da]=C++ understøttelse +GenericName[de]=Unterstützung für C++ +GenericName[el]=Υποστήριξη C++ +GenericName[es]=Soporte para C++ +GenericName[et]=C++ toetus +GenericName[eu]=C++ euskarria +GenericName[fa]=پشتیبانی C++ +GenericName[fr]=Prise en charge du langage C++ +GenericName[ga]=Tacaíocht C++ +GenericName[gl]=Soporte para C++ +GenericName[hi]=सी++ समर्थन +GenericName[hu]=C++-támogatás +GenericName[it]=Supporto C++ +GenericName[ja]=C++ サポート +GenericName[nds]=Ünnerstütten för C++ +GenericName[ne]=C++ समर्थन +GenericName[nl]=Ondersteuning voor C++ +GenericName[pa]=C++ ਸਹਿਯੋਗ +GenericName[pl]=Obsługa C++ +GenericName[pt]=Suporte a C++ +GenericName[pt_BR]=Suporte ao C++ +GenericName[ru]=Поддержка языка C++ +GenericName[sk]=C++ podpora +GenericName[sl]=Podpora za C++ +GenericName[sr]=Подршка за C++ +GenericName[sr@Latn]=Podrška za C++ +GenericName[sv]=C++ stöd +GenericName[ta]=C++ ஆதரவு +GenericName[tg]=Ёрӣ намудани забони C++ +GenericName[tr]=C++ Desteği +GenericName[zh_CN]=C++ 支持 +GenericName[zh_TW]=C++ 支援 +ServiceTypes=TDevelop/LanguageSupport +Icon=source_cpp +X-TDE-Library=libkdevcppsupport +X-TDevelop-Version=5 +X-TDevelop-Language=C++ +X-TDevelop-Args=Cpp diff --git a/languages/cpp/kdevcppsupport.rc b/languages/cpp/kdevcppsupport.rc new file mode 100644 index 00000000..37e3fa3a --- /dev/null +++ b/languages/cpp/kdevcppsupport.rc @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/cpp/kdevcsupport.desktop b/languages/cpp/kdevcsupport.desktop new file mode 100644 index 00000000..cc54dd73 --- /dev/null +++ b/languages/cpp/kdevcsupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=C Support +Comment[ca]=Suport per a C +Comment[da]=C understøttelse +Comment[de]=C-Unterstützung für TDevelop +Comment[el]=Υποστήριξη C +Comment[es]=Soporte para C +Comment[et]=C toetus +Comment[eu]=C euskarria +Comment[fa]=پشتیبانی سی +Comment[fr]=Prise en charge du langage C +Comment[ga]=Tacaíocht C +Comment[gl]=Soporte para C +Comment[hi]=सी समर्थन +Comment[hu]=C-támogatás +Comment[is]=C stuðningur +Comment[it]=Supporto per C +Comment[ja]=C サポート +Comment[nds]=Ünnerstütten för C +Comment[ne]=C समर्थन +Comment[nl]=Ondersteuning voor C +Comment[pa]=C ਸਹਿਯੋਗ +Comment[pl]=Obsługa C +Comment[pt]=Suporte a C +Comment[pt_BR]=Suporte ao C +Comment[ru]=Поддержка языка C +Comment[sk]=C podpora +Comment[sl]=Podpora za C +Comment[sr]=Подршка за C +Comment[sr@Latn]=Podrška za C +Comment[sv]=C-stöd +Comment[ta]=C ஆதரவு +Comment[tg]=Ёрӣ намудани забони C +Comment[tr]=C Desteği +Comment[zh_CN]=C 支持 +Comment[zh_TW]=C 支援 +Name=KDevCSupport +Name[da]=TDevelop C understøttelse +Name[nds]=C-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaC +Name[sk]=KDev C podpora +Name[sv]=TDevelop C-stöd +Name[zh_TW]=TDevelop C 支援 +GenericName=C Support +GenericName[ca]=Suport per a C +GenericName[da]=C understøttelse +GenericName[de]=Unterstützung für C +GenericName[el]=Υποστήριξη C +GenericName[es]=Soporte para C +GenericName[et]=C toetus +GenericName[eu]=C euskarria +GenericName[fa]=پشتیبانی سی +GenericName[fr]=Prise en charge du langage C +GenericName[ga]=Tacaíocht C +GenericName[gl]=Soporte para C +GenericName[hi]=सी समर्थन +GenericName[hu]=C-támogatás +GenericName[it]=Supporto C +GenericName[ja]=C サポート +GenericName[nds]=Ünnerstütten för C +GenericName[ne]=C समर्थन +GenericName[nl]=Ondersteuning voor C +GenericName[pa]=C ਸਹਿਯੋਗ +GenericName[pl]=Obsługa C +GenericName[pt]=Suporte a C +GenericName[pt_BR]=Suporte ao C +GenericName[ru]=Поддержка языка C +GenericName[sk]=C podpora +GenericName[sl]=Podpora za C +GenericName[sr]=Подршка за C +GenericName[sr@Latn]=Podrška za C +GenericName[sv]=C-stöd +GenericName[ta]=C ஆதரவு +GenericName[tg]=Ёрӣ намудани забони C +GenericName[tr]=C Desteği +GenericName[zh_CN]=C 支持 +GenericName[zh_TW]=C 支援 +ServiceTypes=TDevelop/LanguageSupport +Icon=source_cpp +X-TDE-Library=libkdevcppsupport +X-TDevelop-Version=5 +X-TDevelop-Language=C +X-TDevelop-Args=C diff --git a/languages/cpp/kdevdeepcopy.h b/languages/cpp/kdevdeepcopy.h new file mode 100644 index 00000000..c29ee1e1 --- /dev/null +++ b/languages/cpp/kdevdeepcopy.h @@ -0,0 +1,14 @@ +#ifndef KDEVDEEPCOPY_H +#define KDEVDEEPCOPY_H + +#include + +inline TQString deepCopy( const TQString& s ) +{ + TQCString str = s.utf8(); + return TQString::fromUtf8( str, str.length() ); +} + +#endif +// kate: indent-mode csands; tab-width 4; + diff --git a/languages/cpp/kdevdriver.cpp b/languages/cpp/kdevdriver.cpp new file mode 100644 index 00000000..4a6c45ec --- /dev/null +++ b/languages/cpp/kdevdriver.cpp @@ -0,0 +1,206 @@ +#include "tdelocale.h" /* defines [function] i18n */ +#include + +#include "kdevdriver.h" +#include "cppcodecompletionconfig.h" +#include "setuphelper.h" +#include +#include "includepathresolver.h" + + +KDevDriver::KDevDriver( CppSupportPart* cppSupport, bool foreground ) +: m_cppSupport( cppSupport ), m_includePathResolver(0), m_foreground(foreground), m_shouldParseIncludedFiles(true) +{ + //setupProject(); + setup(); + +} + +KDevDriver::~KDevDriver() { + delete m_includePathResolver; +} + +CppSupportPart* KDevDriver::cppSupport() { return m_cppSupport; } + +void KDevDriver::setupProject() +{ + TQMap map; + + TQStringList fileList = m_cppSupport->project() ->allFiles(); + TQStringList::ConstIterator it = fileList.begin(); + while ( it != fileList.end() ) + { + TQFileInfo info( *it ); + ++it; + + map.insert( info.dirPath( true ), true ); + } + TQMap::Iterator mapit = map.begin(); + while ( mapit != map.end() ) + { + addIncludePath( mapit.key() ); + ++mapit; + } +} + +void KDevDriver::setupLexer( Lexer* lexer ) +{ + Driver::setupLexer( lexer ); + lexer->setReportMessages( true ); + lexer->setReportWarnings( true ); +} + +//! setup the preprocessor +//! code provided by Reginald Stadlbauer +void KDevDriver::setup() +{ + if( lexerCache() ) lexerCache()->clear(); ///Clear the lexer-cache so missing headers get a chance to be parsed + clearMacros(); + clearIncludePaths(); + + addMacro( Macro("KDEVELOP_PARSER", "3.4") ); + + bool ok; + TQString verboseGccOutput = SetupHelper::getVerboseGccIncludePath( &ok ); + TQStringList verboseGccLines = TQStringList::split( '\n', verboseGccOutput ); + if( verboseGccLines.count() > 3 ) { + ///Parse the output of gcc. It includes gcc's final include-path when parsing an empty c++-file(including dirs like /usr/include/c++/4.xx/...) + //what about order? + for( TQStringList::iterator it = verboseGccLines.begin(); it != verboseGccLines.end(); ++it ) { + if( (*it).startsWith(" ") && (*it).length() > 2 && (*it)[1] != ' ' ) { + //it is a potential include-file + TQString path = (*it).stripWhiteSpace(); + TQFileInfo info( path ); + if( info.exists() ) { + kdDebug( 9007 ) << "Adding include-path from gcc-output: \"" << path << "\" absolute: \"" << info.absFilePath() << "\"" << endl; + addIncludePath(info.absFilePath()); + } + } + } + } else { + ///Do some of the old stuff + addIncludePath( "/include" ); + addIncludePath( "/usr/include" ); + addIncludePath( "/usr/local/include" ); + + bool ok; + TQString includePath = SetupHelper::getGccIncludePath(&ok); + if (ok) { + TQStringList ls = TQStringList::split( "\n", includePath ); + for( TQStringList::const_iterator it = ls.begin(); it != ls.end(); ++it ) { + if( !(*it).isEmpty() ) + addIncludePath( *it ); + } + } + + addIncludePath( includePath ); + addIncludePath( "/usr/include/g++-3" ); + addIncludePath( "/usr/include/g++" ); + } + + addMacro( Macro( "__cplusplus", "1" ) ); + + ///@todo maybe remove the following? Is there any normal user who has his environment set up correctly so this is of any use? + TQString tdedir = getenv( "TDEDIR" ); + if( !tdedir.isNull() ) + addIncludePath( tdedir + "/include" ); + + TQString qmakespec = getenv( "QMAKESPEC" ); + if ( qmakespec.isNull() ) + qmakespec = "linux-g++"; + + TQString qtdir = getenv( "QTDIR" ); + if( !qtdir.isNull() ) { + addIncludePath( qtdir + "/include" ); + + // #### implement other mkspecs and find a better way to find the + // #### proper mkspec (althoigh this will be no fun :-) + + addIncludePath( qtdir + "/mkspecs/" + qmakespec ); + } + + TQStringList lines = SetupHelper::getGccMacros(&ok); + if (!ok) { + for (TQStringList::ConstIterator it = lines.constBegin(); it != lines.constEnd(); ++it) { + TQStringList lst = TQStringList::split( ' ', *it ); + if ( lst.count() != 3 ) + continue; + addMacro( Macro( lst[1], lst[2] ) ); + } + } + + addMacro( Macro( "__cplusplus", "1" ) ); + addMacro( Macro( "signals", "signals" ) ); + addMacro( Macro( "slots", "slots" ) ); + addMacro( Macro( "TQ_SCRIPTABLE", "" ) ); + + CppCodeCompletionConfig* cfg = m_cppSupport->codeCompletionConfig(); + TQString str = cfg->customIncludePaths(); + int pos = 0; + while( pos < str.length() ) { + int end = str.find( ';', pos ); + if( end == -1 ) { + end = str.length(); + } + + TQString s = str.mid( pos, end-pos ).stripWhiteSpace(); + if( !s.isEmpty() ) { + if( !s.startsWith( "/" ) && m_cppSupport->project() ) { + s = m_cppSupport->project()->projectDirectory() + "/" + s; + } + addIncludePath( s ); + } + + pos = end+1; + } + + setResolveDependencesEnabled( cfg->preProcessAllHeaders() | cfg->parseMissingHeaders() ); + + delete m_includePathResolver; + if( cfg->resolveIncludePaths() ) { + m_includePathResolver = new CppTools::IncludePathResolver( m_foreground ); + if( m_cppSupport && m_cppSupport->project() ) + m_includePathResolver->setOutOfSourceBuildSystem( m_cppSupport->project()->projectDirectory(), m_cppSupport->project()->buildDirectory() ); + } else + m_includePathResolver = 0; + + m_shouldParseIncludedFiles = cfg->parseMissingHeaders(); +} + +TQStringList KDevDriver::getCustomIncludePath( const TQString& file ) { + if( !file.startsWith("/") ) + kdDebug( 9007 ) << "KDevDriver::getCustomIncludePath(..): given file \"" << file << "\" is not absolute" << endl; + if( !m_includePathResolver ) + return includePaths(); + CppTools::PathResolutionResult res = m_includePathResolver->resolveIncludePath( file ); + + if( !res.success ) { + Problem p( i18n( "%1. Message: %2" ).arg( res.errorMessage ).arg( res.longErrorMessage ), 0, 0, Problem::Level_Warning ); + p.setFileName( file ); + addProblem( file, p ); + } + + return res.path + includePaths(); +} + +bool KDevDriver::shouldParseIncludedFile( const ParsedFilePointer& file ) { + TQString compoundString = file->fileName() + "||" + TQString("%1").arg(file->usedMacros().valueHash()) + "||" + TQString("%1").arg(file->usedMacros().idHash()); + + if( !m_shouldParseIncludedFiles ) + return false; + m_cppSupport->safeFileSet().contains( compoundString ); + + if( m_cppSupport->safeFileSet().contains( file->fileName()) ){ + return false; + } else if( m_cppSupport->safeFileSet().contains( compoundString ) ) { + //kdDebug( 9007 ) << "ALREADY IN FILE-SET: " << compoundString << endl; + return false; + } else { + m_cppSupport->safeFileSet().insert( compoundString ); //This is needed so the same instance of a file is not queued many times + //kdDebug( 9007 ) << "NOT IN FILE-SET, PARSING: " << compoundString << endl; + return true; + } + +} + +//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/kdevdriver.h b/languages/cpp/kdevdriver.h new file mode 100644 index 00000000..8af87e0c --- /dev/null +++ b/languages/cpp/kdevdriver.h @@ -0,0 +1,58 @@ + +#ifndef __kdevdriver_h +#define __kdevdriver_h + +#include "cppsupportpart.h" +#include "driver.h" + +#include +#include + +#include +#include +#include + +class TDEProcess; +namespace CppTools { + class IncludePathResolver; +}; + +class KDevDriver: public Driver +{ +public: + ///When the driver is used in a background-thread, foreground MUST be false(else crash) + KDevDriver( CppSupportPart* cppSupport, bool foreground = false ); + ~KDevDriver(); + CppSupportPart* cppSupport(); + void setupProject(); + //! setup the preprocessor + //! code provided by Reginald Stadlbauer + void setup(); + + virtual void addMacro( const Macro& m ) + { + if ( m.name() == "signals" || m.name() == "slots" ) + return ; + Driver::addMacro( m ); + } + +protected: + void setupLexer( Lexer* lexer ); + + ///Returns the complete include-path for that file. Not constant because it may add Problem-items to the driver. Must be absolute path. + virtual TQStringList getCustomIncludePath( const TQString& file ); + + virtual bool shouldParseIncludedFile( const ParsedFilePointer& /*file*/ ); + +private: + + CppSupportPart* m_cppSupport; + CppTools::IncludePathResolver* m_includePathResolver; + bool m_foreground; + bool m_shouldParseIncludedFiles; +}; + +#endif +// kate: indent-mode csands; tab-width 4; + + diff --git a/languages/cpp/newclass_templates/CMakeLists.txt b/languages/cpp/newclass_templates/CMakeLists.txt index 7847d9a7..73b9bff5 100644 --- a/languages/cpp/newclass_templates/CMakeLists.txt +++ b/languages/cpp/newclass_templates/CMakeLists.txt @@ -12,4 +12,4 @@ install( FILES cpp_header cpp_source gtk_header gtk_source objc_header objc_source - DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport/newclass ) + DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport/newclass ) diff --git a/languages/cpp/newclass_templates/Makefile.am b/languages/cpp/newclass_templates/Makefile.am index 2b47443f..5b013d27 100644 --- a/languages/cpp/newclass_templates/Makefile.am +++ b/languages/cpp/newclass_templates/Makefile.am @@ -1,4 +1,4 @@ -cppsupportdatadir = ${kde_datadir}/tdevcppsupport +cppsupportdatadir = ${kde_datadir}/kdevcppsupport newclassdir = ${cppsupportdatadir}/newclass newclass_DATA = cpp_header cpp_source gtk_header gtk_source objc_header objc_source diff --git a/languages/cpp/pcsimporter/customimporter/CMakeLists.txt b/languages/cpp/pcsimporter/customimporter/CMakeLists.txt index 90652509..c2e07bdb 100644 --- a/languages/cpp/pcsimporter/customimporter/CMakeLists.txt +++ b/languages/cpp/pcsimporter/customimporter/CMakeLists.txt @@ -24,14 +24,14 @@ link_directories( ##### other data ################################ -install( FILES tdevpcscustomimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpcscustomimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevcustompcsimporter (module) ######### +##### libkdevcustompcsimporter (module) ######### -tde_add_kpart( libtdevcustompcsimporter AUTOMOC +tde_add_kpart( libkdevcustompcsimporter AUTOMOC SOURCES - tdevcustomimporter.cpp settingsdialog.cpp + kdevcustomimporter.cpp settingsdialog.cpp settingsdialogbase.ui LINK lang_interfaces-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/languages/cpp/pcsimporter/customimporter/Makefile.am b/languages/cpp/pcsimporter/customimporter/Makefile.am index 1a6c1f1d..7e6a7093 100644 --- a/languages/cpp/pcsimporter/customimporter/Makefile.am +++ b/languages/cpp/pcsimporter/customimporter/Makefile.am @@ -1,12 +1,12 @@ INCLUDES = -I$(top_srcdir)/languages/lib/interfaces \ -I$(top_srcdir)/lib/interfaces $(all_includes) METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevcustompcsimporter.la +kde_module_LTLIBRARIES = libkdevcustompcsimporter.la -noinst_HEADERS = tdevcustomimporter.h -libtdevcustompcsimporter_la_SOURCES = tdevcustomimporter.cpp settingsdialog.cpp settingsdialogbase.ui -libtdevcustompcsimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +noinst_HEADERS = kdevcustomimporter.h +libkdevcustompcsimporter_la_SOURCES = kdevcustomimporter.cpp settingsdialog.cpp settingsdialogbase.ui +libkdevcustompcsimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/languages/lib/interfaces/liblang_interfaces.la -libtdevcustompcsimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -kde_services_DATA = tdevpcscustomimporter.desktop +libkdevcustompcsimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +kde_services_DATA = kdevpcscustomimporter.desktop diff --git a/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.cpp b/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.cpp new file mode 100644 index 00000000..38a41eb8 --- /dev/null +++ b/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.cpp @@ -0,0 +1,118 @@ +/*************************************************************************** +* Copyright (C) 2003 by Alexander Dymo * +* cloudtemple@mksat.net * +* * +* This program 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. * +***************************************************************************/ +#include "kdevcustomimporter.h" + +#include "settingsdialog.h" + +#include +#include + +#include +#include + +K_EXPORT_COMPONENT_FACTORY( libkdevcustompcsimporter, KGenericFactory( "kdevcustompcsimporter" ) ) + +KDevCustomImporter::KDevCustomImporter( TQObject* parent, const char* name, const TQStringList & // args + ) + : KDevPCSImporter( parent, name ) +{} + + +KDevCustomImporter::~KDevCustomImporter() +{} + + +TQString KDevCustomImporter::dbName() const +{ + return m_settings->dbName(); +} + +TQStringList KDevCustomImporter::fileList( const TQString& path ) +{ + TQDir dir( path ); + if ( !dir.exists() ) + return TQStringList(); +// TQStringList lst = dir.entryList( "*.h;*.H;*.hh;*.hxx;*.hpp;*.tlh" ); + TQStringList lst = dir.entryList( m_settings->filePattern() ); + TQStringList fileList; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) + { + fileList.push_back( dir.absPath() + "/" + ( *it ) ); + } + return fileList; +} + +TQStringList KDevCustomImporter::fileList() +{ + if ( !m_settings ) + return TQStringList(); + + TQStringList lst = m_settings->dirs(); + TQStringList files; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) + { + if ( !m_settings->recursive() ) + files += fileList( *it ); + else + processDir( *it, files ); + } + + return files; +} + +TQStringList KDevCustomImporter::includePaths() +{ + if ( !m_settings ) + return TQStringList(); + + return m_settings->dirs(); +} + +TQWidget* KDevCustomImporter::createSettingsPage( TQWidget* parent, const char* name ) +{ + m_settings = new SettingsDialog( parent, name ); + return m_settings; +} + +void KDevCustomImporter::processDir( const TQString path, TQStringList & files ) +{ + TQValueStack s; + s.push( path ); + files += fileList( path ); + + TQDir dir; + do + { + dir.setPath( s.pop() ); + if (!dir.exists()) + continue; + kdDebug( 9015 ) << "Examining: " << dir.path() << endl; + const TQFileInfoList *dirEntries = dir.entryInfoList(); + if ( !dirEntries ) continue; + TQPtrListIterator it( *dirEntries ); + for ( ; dirEntries && it.current(); ++it ) + { + TQString fileName = it.current() ->fileName(); + if ( fileName == "." || fileName == ".." ) + continue; + if ( it.current() ->isDir() ) + { + TQString tmpPath = it.current() ->absFilePath(); + kdDebug( 9015 ) << "Pushing: " << tmpPath << endl; + s.push( tmpPath ); + files += fileList( tmpPath ); + } + } + } + while ( !s.isEmpty() ); +} + +#include "kdevcustomimporter.moc" +//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.h b/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.h new file mode 100644 index 00000000..884a033d --- /dev/null +++ b/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.h @@ -0,0 +1,41 @@ +/*************************************************************************** +* Copyright (C) 2003 by Alexander Dymo * +* cloudtemple@mksat.net * +* * +* This program 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. * +***************************************************************************/ +#ifndef KDEVCUSTOMIMPORTER_H +#define KDEVCUSTOMIMPORTER_H + +#include "kdevpcsimporter.h" + +#include + +class SettingsDialog; + +class KDevCustomImporter : public KDevPCSImporter +{ +Q_OBJECT + +public: + KDevCustomImporter(TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + + ~KDevCustomImporter(); + + virtual TQString dbName() const; + virtual TQStringList fileList(); + virtual TQStringList includePaths(); + virtual TQWidget* createSettingsPage(TQWidget* parent, const char* name); + +protected: + TQStringList fileList( const TQString& path ); + void processDir(const TQString path, TQStringList &files ); + +private: + TQGuardedPtr m_settings; +}; + +#endif diff --git a/languages/cpp/pcsimporter/customimporter/kdevpcscustomimporter.desktop b/languages/cpp/pcsimporter/customimporter/kdevpcscustomimporter.desktop new file mode 100644 index 00000000..b351a8e3 --- /dev/null +++ b/languages/cpp/pcsimporter/customimporter/kdevpcscustomimporter.desktop @@ -0,0 +1,44 @@ +[Desktop Entry] +Type=Service +Name=KDevPCSCustomImporter +Name[da]=TDevelop brugerdefineret PCS-importør +Name[nds]=EgenPCS-Import för TDevelop +Name[pl]=KDevWłasnyImportPCS +Name[sk]=KDev PCS vlastný import +Name[sv]=TDevelop egen import av PCS +Name[zh_TW]=TDevelop PCS 自訂匯入器 +Comment=TDevelop Custom Directory PCS Importer +Comment[ca]=Importador PCS de directori personalitzat per a TDevelop +Comment[da]=TDevelop brugerdefineret mappe-PCS-importør +Comment[de]=Import für persistenten Klassenspeicher aus benutzerdefinierten Ordnern +Comment[el]=Εισαγωγέας PCS προσαρμοσμένου καταλόγου του TDevelop +Comment[es]=Importador PCS de carpeta personalizada de TDevelop +Comment[et]=TDevelopi kohandatud kataloogi PCS importija +Comment[eu]=TDevelop-en direktorio pertsonalizatuko PCS inportatzailea +Comment[fa]=واردکنندۀ PCS فهرست سفارشی TDevelop +Comment[fr]=Importation PCS de dossiers personnalisés pour TDevelop +Comment[gl]=Importador PCS de directorios personalizados para TDevelop +Comment[hi]=के-डेवलप मनपसंद डिरेक्ट्री पीसीएस आयातक +Comment[hu]=TDevelop egyéni könyvtár PCS-importáló +Comment[it]=Cartella per l'importatore personalizzato PCS di TDevelop +Comment[ja]=TDevelop カスタムディレクトリ PCS インポータ +Comment[nds]=Import för duerhaftig Klassenspieker ut Bruker-Ornern +Comment[ne]=केडीई विकास अनुकूल डाइरेक्टरी PCS आयातकर्ता +Comment[nl]=TDevelop PCS Importer voor eigen mappen +Comment[pl]=Własny program do importowania PCS dla TDevelopa +Comment[pt]=Importador de PCS com Directoria Personalizada do TDevelop +Comment[pt_BR]=Importador de Diretório PCS Personalizado para o TDevelop +Comment[ru]=Загрузка символов из любого каталога в хранилище классов +Comment[sk]=TDevelop vlastný PCS import priečinkov +Comment[sr]=TDevelop-ов PCS увозник прилагођеног директоријума +Comment[sr@Latn]=TDevelop-ov PCS uvoznik prilagođenog direktorijuma +Comment[sv]=TDevelop PCS-import för egen katalog +Comment[ta]=கெடெவலப் கஸ்டம் டைரக்ட்ரி இறக்குமதியாளர் +Comment[tg]=Пурборкунии нишонаҳо аз анбори синфҳои каталог +Comment[tr]=TDevelop Özel Dizin PCS Aktarıcısı +Comment[zh_CN]=TDevelop 自定义目录的 PCS 导入器 +Comment[zh_TW]=TDevelop 自訂目錄 PCS 匯入器 +Icon=gear +ServiceTypes=TDevelop/PCSImporter +X-TDE-Library=libkdevcustompcsimporter +X-TDevelop-PCSImporter= diff --git a/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.cpp b/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.cpp deleted file mode 100644 index 33a2bf40..00000000 --- a/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2003 by Alexander Dymo * -* cloudtemple@mksat.net * -* * -* This program 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. * -***************************************************************************/ -#include "tdevcustomimporter.h" - -#include "settingsdialog.h" - -#include -#include - -#include -#include - -K_EXPORT_COMPONENT_FACTORY( libtdevcustompcsimporter, KGenericFactory( "tdevcustompcsimporter" ) ) - -TDevCustomImporter::TDevCustomImporter( TQObject* parent, const char* name, const TQStringList & // args - ) - : TDevPCSImporter( parent, name ) -{} - - -TDevCustomImporter::~TDevCustomImporter() -{} - - -TQString TDevCustomImporter::dbName() const -{ - return m_settings->dbName(); -} - -TQStringList TDevCustomImporter::fileList( const TQString& path ) -{ - TQDir dir( path ); - if ( !dir.exists() ) - return TQStringList(); -// TQStringList lst = dir.entryList( "*.h;*.H;*.hh;*.hxx;*.hpp;*.tlh" ); - TQStringList lst = dir.entryList( m_settings->filePattern() ); - TQStringList fileList; - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - { - fileList.push_back( dir.absPath() + "/" + ( *it ) ); - } - return fileList; -} - -TQStringList TDevCustomImporter::fileList() -{ - if ( !m_settings ) - return TQStringList(); - - TQStringList lst = m_settings->dirs(); - TQStringList files; - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - { - if ( !m_settings->recursive() ) - files += fileList( *it ); - else - processDir( *it, files ); - } - - return files; -} - -TQStringList TDevCustomImporter::includePaths() -{ - if ( !m_settings ) - return TQStringList(); - - return m_settings->dirs(); -} - -TQWidget* TDevCustomImporter::createSettingsPage( TQWidget* parent, const char* name ) -{ - m_settings = new SettingsDialog( parent, name ); - return m_settings; -} - -void TDevCustomImporter::processDir( const TQString path, TQStringList & files ) -{ - TQValueStack s; - s.push( path ); - files += fileList( path ); - - TQDir dir; - do - { - dir.setPath( s.pop() ); - if (!dir.exists()) - continue; - kdDebug( 9015 ) << "Examining: " << dir.path() << endl; - const TQFileInfoList *dirEntries = dir.entryInfoList(); - if ( !dirEntries ) continue; - TQPtrListIterator it( *dirEntries ); - for ( ; dirEntries && it.current(); ++it ) - { - TQString fileName = it.current() ->fileName(); - if ( fileName == "." || fileName == ".." ) - continue; - if ( it.current() ->isDir() ) - { - TQString tmpPath = it.current() ->absFilePath(); - kdDebug( 9015 ) << "Pushing: " << tmpPath << endl; - s.push( tmpPath ); - files += fileList( tmpPath ); - } - } - } - while ( !s.isEmpty() ); -} - -#include "tdevcustomimporter.moc" -//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.h b/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.h deleted file mode 100644 index 925e42f9..00000000 --- a/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.h +++ /dev/null @@ -1,41 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2003 by Alexander Dymo * -* cloudtemple@mksat.net * -* * -* This program 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. * -***************************************************************************/ -#ifndef TDEVCUSTOMIMPORTER_H -#define TDEVCUSTOMIMPORTER_H - -#include "tdevpcsimporter.h" - -#include - -class SettingsDialog; - -class TDevCustomImporter : public TDevPCSImporter -{ -Q_OBJECT - -public: - TDevCustomImporter(TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); - - ~TDevCustomImporter(); - - virtual TQString dbName() const; - virtual TQStringList fileList(); - virtual TQStringList includePaths(); - virtual TQWidget* createSettingsPage(TQWidget* parent, const char* name); - -protected: - TQStringList fileList( const TQString& path ); - void processDir(const TQString path, TQStringList &files ); - -private: - TQGuardedPtr m_settings; -}; - -#endif diff --git a/languages/cpp/pcsimporter/customimporter/tdevpcscustomimporter.desktop b/languages/cpp/pcsimporter/customimporter/tdevpcscustomimporter.desktop deleted file mode 100644 index 50530ef8..00000000 --- a/languages/cpp/pcsimporter/customimporter/tdevpcscustomimporter.desktop +++ /dev/null @@ -1,44 +0,0 @@ -[Desktop Entry] -Type=Service -Name=TDevPCSCustomImporter -Name[da]=TDevelop brugerdefineret PCS-importør -Name[nds]=EgenPCS-Import för TDevelop -Name[pl]=KDevWłasnyImportPCS -Name[sk]=KDev PCS vlastný import -Name[sv]=TDevelop egen import av PCS -Name[zh_TW]=TDevelop PCS 自訂匯入器 -Comment=TDevelop Custom Directory PCS Importer -Comment[ca]=Importador PCS de directori personalitzat per a TDevelop -Comment[da]=TDevelop brugerdefineret mappe-PCS-importør -Comment[de]=Import für persistenten Klassenspeicher aus benutzerdefinierten Ordnern -Comment[el]=Εισαγωγέας PCS προσαρμοσμένου καταλόγου του TDevelop -Comment[es]=Importador PCS de carpeta personalizada de TDevelop -Comment[et]=TDevelopi kohandatud kataloogi PCS importija -Comment[eu]=TDevelop-en direktorio pertsonalizatuko PCS inportatzailea -Comment[fa]=واردکنندۀ PCS فهرست سفارشی TDevelop -Comment[fr]=Importation PCS de dossiers personnalisés pour TDevelop -Comment[gl]=Importador PCS de directorios personalizados para TDevelop -Comment[hi]=के-डेवलप मनपसंद डिरेक्ट्री पीसीएस आयातक -Comment[hu]=TDevelop egyéni könyvtár PCS-importáló -Comment[it]=Cartella per l'importatore personalizzato PCS di TDevelop -Comment[ja]=TDevelop カスタムディレクトリ PCS インポータ -Comment[nds]=Import för duerhaftig Klassenspieker ut Bruker-Ornern -Comment[ne]=केडीई विकास अनुकूल डाइरेक्टरी PCS आयातकर्ता -Comment[nl]=TDevelop PCS Importer voor eigen mappen -Comment[pl]=Własny program do importowania PCS dla TDevelopa -Comment[pt]=Importador de PCS com Directoria Personalizada do TDevelop -Comment[pt_BR]=Importador de Diretório PCS Personalizado para o TDevelop -Comment[ru]=Загрузка символов из любого каталога в хранилище классов -Comment[sk]=TDevelop vlastný PCS import priečinkov -Comment[sr]=TDevelop-ов PCS увозник прилагођеног директоријума -Comment[sr@Latn]=TDevelop-ov PCS uvoznik prilagođenog direktorijuma -Comment[sv]=TDevelop PCS-import för egen katalog -Comment[ta]=கெடெவலப் கஸ்டம் டைரக்ட்ரி இறக்குமதியாளர் -Comment[tg]=Пурборкунии нишонаҳо аз анбори синфҳои каталог -Comment[tr]=TDevelop Özel Dizin PCS Aktarıcısı -Comment[zh_CN]=TDevelop 自定义目录的 PCS 导入器 -Comment[zh_TW]=TDevelop 自訂目錄 PCS 匯入器 -Icon=gear -ServiceTypes=TDevelop/PCSImporter -X-TDE-Library=libtdevcustompcsimporter -X-TDevelop-PCSImporter= diff --git a/languages/cpp/pcsimporter/qt4importer/CMakeLists.txt b/languages/cpp/pcsimporter/qt4importer/CMakeLists.txt index 908c66fc..8e29fdec 100644 --- a/languages/cpp/pcsimporter/qt4importer/CMakeLists.txt +++ b/languages/cpp/pcsimporter/qt4importer/CMakeLists.txt @@ -24,14 +24,14 @@ link_directories( ##### other data ################################ -install( FILES tdevqt4importer.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevqt4importer.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevqt4importer (module) ############### +##### libkdevqt4importer (module) ############### -tde_add_kpart( libtdevqt4importer AUTOMOC +tde_add_kpart( libkdevqt4importer AUTOMOC SOURCES - tdevqt4importer.cpp settingsdialogbase.ui + kdevqt4importer.cpp settingsdialogbase.ui settingsdialog.cpp LINK lang_interfaces-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/languages/cpp/pcsimporter/qt4importer/Makefile.am b/languages/cpp/pcsimporter/qt4importer/Makefile.am index 935c7d49..12f12104 100644 --- a/languages/cpp/pcsimporter/qt4importer/Makefile.am +++ b/languages/cpp/pcsimporter/qt4importer/Makefile.am @@ -1,11 +1,11 @@ INCLUDES = -I$(top_srcdir)/languages/lib/interfaces \ -I$(top_srcdir)/lib/interfaces $(all_includes) METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevqt4importer.la +kde_module_LTLIBRARIES = libkdevqt4importer.la -noinst_HEADERS = tdevqt4importer.h settingsdialog.h -libtdevqt4importer_la_SOURCES = tdevqt4importer.cpp settingsdialogbase.ui settingsdialog.cpp -kde_services_DATA = tdevqt4importer.desktop -libtdevqt4importer_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +noinst_HEADERS = kdevqt4importer.h settingsdialog.h +libkdevqt4importer_la_SOURCES = kdevqt4importer.cpp settingsdialogbase.ui settingsdialog.cpp +kde_services_DATA = kdevqt4importer.desktop +libkdevqt4importer_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/languages/lib/interfaces/liblang_interfaces.la -libtdevqt4importer_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevqt4importer_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) diff --git a/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.cpp b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.cpp new file mode 100644 index 00000000..0289c7a4 --- /dev/null +++ b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.cpp @@ -0,0 +1,107 @@ +/*************************************************************************** + * Copyright (C) 2003 by Roberto Raggi * + * roberto@kdevelop.org * + * * + * This program 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. * + * * + ***************************************************************************/ + +#include "kdevqt4importer.h" +#include "kdevqt4importer.moc" +#include "settingsdialog.h" + +#include +#include +#include +#include + +#include +#include +#include + +K_EXPORT_COMPONENT_FACTORY( libkdevqt4importer, KGenericFactory( "kdevqt4importer" ) ) + +KDevQt4Importer::KDevQt4Importer( TQObject * parent, const char * name, const TQStringList& ) + : KDevPCSImporter( parent, name ) +{ + m_qtfile = 0; +} + +KDevQt4Importer::~KDevQt4Importer() +{ + if (m_qtfile) + delete m_qtfile; + + m_qtfile = 0; +} + +TQStringList KDevQt4Importer::fileList() +{ + if( !m_settings ) + return TQStringList(); + + if (m_qtfile) + delete m_qtfile; + + KTempFile ifile; + TQTextStream &is = *ifile.textStream(); + + is << "#include \n" + << "#undef slots\n#undef signals\n#undef slots\n#undef signals" + << "#define slots slots\n" + << "#define signals signals\n" + << "#include \n" + << "#include \n" + << "#include \n" + << "#include \n" + << "#include \n" + << "#include \n" + << "#include \n" + << "#include \n"; + + + + TDEProcess proc; + proc << "cpp" << "-nostdinc" << "-xc++"; + + m_qtfile = new KTempFile(); + + // include paths + TQStringList paths = includePaths(); + for (TQStringList::Iterator it = paths.begin(); it != paths.end(); ++it) + proc << "-I" << *it; + + ifile.close(); + + TQString o; + o += "-o"; + o += m_qtfile->name(); + + proc << ifile.name() << o; + proc.start(TDEProcess::Block); + + return m_qtfile->name(); +} + +TQStringList KDevQt4Importer::includePaths() +{ + if( !m_settings || !m_qtfile) + return TQStringList(); + + TQStringList includePaths; + includePaths.push_back( m_settings->qtDir() ); + includePaths.push_back( m_settings->qtDir() + "/TQt" ); + + /// @todo add mkspec + return includePaths; +} + +TQWidget * KDevQt4Importer::createSettingsPage( TQWidget * parent, const char * name ) +{ + m_settings = new SettingsDialog( parent, name ); + return m_settings; +} + diff --git a/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.desktop b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.desktop new file mode 100644 index 00000000..5d91d917 --- /dev/null +++ b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.desktop @@ -0,0 +1,34 @@ +[Desktop Entry] +Type=Service +Name=KDevQt4Importer +Name[de]=Qt4-PCS-Import (TDevelop) +Name[fr]=KDevQtImporter +Name[nds]=Qt4-PCS-Import (TDevelop) +Name[ru]=KDevQt 4Importer +Name[sv]=TDevelop QT4-import +Comment=TDevelop Qt4 PCS Importer +Comment[ca]=Importador PCS de Qt4 per a TDevelop +Comment[da]=TDevelop Qt4 PCS importør +Comment[de]=Qt4-Import für persistenten Klassenspeicher +Comment[el]=Εισαγωγέας PCS TDevelop Qt4 +Comment[es]=Importador PCS de Qt4 de TDevelop +Comment[et]=TDevelopi Qt4 PCS importija +Comment[fr]=Importation PCS de Qt4 pour TDevelop +Comment[hu]=TDevelop Qt4 PCS-importáló +Comment[it]=Importatore PCS di Qt4 di TDevelop +Comment[ja]=TDevelop Qt4 PCS インポータ +Comment[nds]=Qt4-Import för duerhaftig Klassenspieker +Comment[pl]=TDevelop: importowanie PCS Qt4 +Comment[pt]=Importador de PCS para Qt4 do TDevelop +Comment[pt_BR]=Importador de PCS para Qt4 do TDevelop +Comment[ru]=Импорт Qt 4 PCS в TDevelop +Comment[sk]=TDevelop Qt4 PCS import +Comment[sr]=TDevelop-ов Qt4 PCS увозник +Comment[sr@Latn]=TDevelop-ov Qt4 PCS uvoznik +Comment[sv]=TDevelop QT4 PCS-import +Comment[zh_TW]=TDevelop Qt4 PCS 匯入器 +Icon=gear +ServiceTypes=TDevelop/PCSImporter +X-TDE-Library=libkdevqt4importer +X-TDevelop-PCSImporter= +X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.h b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.h new file mode 100644 index 00000000..3b9563f3 --- /dev/null +++ b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.h @@ -0,0 +1,40 @@ +/*************************************************************************** + * Copyright (C) 2003 by Roberto Raggi * + * roberto@kdevelop.org * + * * + * This program 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. * + * * + ***************************************************************************/ + +#ifndef KDEVTQTIMPORTER_H +#define KDEVTQTIMPORTER_H + +#include +#include + +class SettingsDialog; +class KTempFile; + +class KDevQt4Importer : public KDevPCSImporter +{ + Q_OBJECT + +public: + KDevQt4Importer( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); + virtual ~KDevQt4Importer(); + + virtual TQString dbName() const { return TQString::fromLatin1("TQt4"); } + virtual TQStringList fileList(); + virtual TQStringList includePaths(); + + virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); + +private: + TQGuardedPtr m_settings; + KTempFile *m_qtfile; +}; + +#endif diff --git a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.cpp b/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.cpp deleted file mode 100644 index fefa57ee..00000000 --- a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program 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. * - * * - ***************************************************************************/ - -#include "tdevqt4importer.h" -#include "tdevqt4importer.moc" -#include "settingsdialog.h" - -#include -#include -#include -#include - -#include -#include -#include - -K_EXPORT_COMPONENT_FACTORY( libtdevqt4importer, KGenericFactory( "tdevqt4importer" ) ) - -TDevQt4Importer::TDevQt4Importer( TQObject * parent, const char * name, const TQStringList& ) - : TDevPCSImporter( parent, name ) -{ - m_qtfile = 0; -} - -TDevQt4Importer::~TDevQt4Importer() -{ - if (m_qtfile) - delete m_qtfile; - - m_qtfile = 0; -} - -TQStringList TDevQt4Importer::fileList() -{ - if( !m_settings ) - return TQStringList(); - - if (m_qtfile) - delete m_qtfile; - - KTempFile ifile; - TQTextStream &is = *ifile.textStream(); - - is << "#include \n" - << "#undef slots\n#undef signals\n#undef slots\n#undef signals" - << "#define slots slots\n" - << "#define signals signals\n" - << "#include \n" - << "#include \n" - << "#include \n" - << "#include \n" - << "#include \n" - << "#include \n" - << "#include \n" - << "#include \n"; - - - - TDEProcess proc; - proc << "cpp" << "-nostdinc" << "-xc++"; - - m_qtfile = new KTempFile(); - - // include paths - TQStringList paths = includePaths(); - for (TQStringList::Iterator it = paths.begin(); it != paths.end(); ++it) - proc << "-I" << *it; - - ifile.close(); - - TQString o; - o += "-o"; - o += m_qtfile->name(); - - proc << ifile.name() << o; - proc.start(TDEProcess::Block); - - return m_qtfile->name(); -} - -TQStringList TDevQt4Importer::includePaths() -{ - if( !m_settings || !m_qtfile) - return TQStringList(); - - TQStringList includePaths; - includePaths.push_back( m_settings->qtDir() ); - includePaths.push_back( m_settings->qtDir() + "/TQt" ); - - /// @todo add mkspec - return includePaths; -} - -TQWidget * TDevQt4Importer::createSettingsPage( TQWidget * parent, const char * name ) -{ - m_settings = new SettingsDialog( parent, name ); - return m_settings; -} - diff --git a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.desktop b/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.desktop deleted file mode 100644 index cf42c497..00000000 --- a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.desktop +++ /dev/null @@ -1,34 +0,0 @@ -[Desktop Entry] -Type=Service -Name=TDevQt4Importer -Name[de]=Qt4-PCS-Import (TDevelop) -Name[fr]=TDevQtImporter -Name[nds]=Qt4-PCS-Import (TDevelop) -Name[ru]=TDevQt 4Importer -Name[sv]=TDevelop QT4-import -Comment=TDevelop Qt4 PCS Importer -Comment[ca]=Importador PCS de Qt4 per a TDevelop -Comment[da]=TDevelop Qt4 PCS importør -Comment[de]=Qt4-Import für persistenten Klassenspeicher -Comment[el]=Εισαγωγέας PCS TDevelop Qt4 -Comment[es]=Importador PCS de Qt4 de TDevelop -Comment[et]=TDevelopi Qt4 PCS importija -Comment[fr]=Importation PCS de Qt4 pour TDevelop -Comment[hu]=TDevelop Qt4 PCS-importáló -Comment[it]=Importatore PCS di Qt4 di TDevelop -Comment[ja]=TDevelop Qt4 PCS インポータ -Comment[nds]=Qt4-Import för duerhaftig Klassenspieker -Comment[pl]=TDevelop: importowanie PCS Qt4 -Comment[pt]=Importador de PCS para Qt4 do TDevelop -Comment[pt_BR]=Importador de PCS para Qt4 do TDevelop -Comment[ru]=Импорт Qt 4 PCS в TDevelop -Comment[sk]=TDevelop Qt4 PCS import -Comment[sr]=TDevelop-ов Qt4 PCS увозник -Comment[sr@Latn]=TDevelop-ov Qt4 PCS uvoznik -Comment[sv]=TDevelop QT4 PCS-import -Comment[zh_TW]=TDevelop Qt4 PCS 匯入器 -Icon=gear -ServiceTypes=TDevelop/PCSImporter -X-TDE-Library=libtdevqt4importer -X-TDevelop-PCSImporter= -X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.h b/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.h deleted file mode 100644 index 53f6a18e..00000000 --- a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.h +++ /dev/null @@ -1,40 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program 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. * - * * - ***************************************************************************/ - -#ifndef TDEVTQTIMPORTER_H -#define TDEVTQTIMPORTER_H - -#include -#include - -class SettingsDialog; -class KTempFile; - -class TDevQt4Importer : public TDevPCSImporter -{ - Q_OBJECT - -public: - TDevQt4Importer( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); - virtual ~TDevQt4Importer(); - - virtual TQString dbName() const { return TQString::fromLatin1("TQt4"); } - virtual TQStringList fileList(); - virtual TQStringList includePaths(); - - virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); - -private: - TQGuardedPtr m_settings; - KTempFile *m_qtfile; -}; - -#endif diff --git a/languages/cpp/pcsimporter/qtimporter/CMakeLists.txt b/languages/cpp/pcsimporter/qtimporter/CMakeLists.txt index 9af966d9..64e95d39 100644 --- a/languages/cpp/pcsimporter/qtimporter/CMakeLists.txt +++ b/languages/cpp/pcsimporter/qtimporter/CMakeLists.txt @@ -24,14 +24,14 @@ link_directories( ##### other data ################################ -install( FILES tdevqtimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevqtimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevqtimporter (module) ################ +##### libkdevqtimporter (module) ################ -tde_add_kpart( libtdevqtimporter AUTOMOC +tde_add_kpart( libkdevqtimporter AUTOMOC SOURCES - tdevqtimporter.cpp settingsdialogbase.ui settingsdialog.cpp + kdevqtimporter.cpp settingsdialogbase.ui settingsdialog.cpp LINK lang_interfaces-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/cpp/pcsimporter/qtimporter/Makefile.am b/languages/cpp/pcsimporter/qtimporter/Makefile.am index 23a60885..80ccc8be 100644 --- a/languages/cpp/pcsimporter/qtimporter/Makefile.am +++ b/languages/cpp/pcsimporter/qtimporter/Makefile.am @@ -1,11 +1,11 @@ INCLUDES = -I$(top_srcdir)/languages/lib/interfaces \ -I$(top_srcdir)/lib/interfaces $(all_includes) METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevqtimporter.la +kde_module_LTLIBRARIES = libkdevqtimporter.la -noinst_HEADERS = tdevqtimporter.h settingsdialog.h -libtdevqtimporter_la_SOURCES = tdevqtimporter.cpp settingsdialogbase.ui settingsdialog.cpp -kde_services_DATA = tdevqtimporter.desktop -libtdevqtimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +noinst_HEADERS = kdevqtimporter.h settingsdialog.h +libkdevqtimporter_la_SOURCES = kdevqtimporter.cpp settingsdialogbase.ui settingsdialog.cpp +kde_services_DATA = kdevqtimporter.desktop +libkdevqtimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/languages/lib/interfaces/liblang_interfaces.la -libtdevqtimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevqtimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) diff --git a/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.cpp b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.cpp new file mode 100644 index 00000000..62eb38fd --- /dev/null +++ b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.cpp @@ -0,0 +1,73 @@ +/*************************************************************************** +* Copyright (C) 2003 by Roberto Raggi * +* roberto@kdevelop.org * +* * +* This program 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. * +* * +***************************************************************************/ + +#include "kdevqtimporter.h" +#include "kdevqtimporter.moc" +#include "settingsdialog.h" + +#include + +#include +#include + +K_EXPORT_COMPONENT_FACTORY( libkdevqtimporter, KGenericFactory( "kdevqtimporter" ) ) + +KDevQtImporter::KDevQtImporter( TQObject * parent, const char * name, const TQStringList& ) + : KDevPCSImporter( parent, name ) +{} + +KDevQtImporter::~KDevQtImporter() +{} + +TQStringList KDevQtImporter::fileList() +{ + if ( !m_settings ) + return TQStringList(); + + TQDir dir( m_settings->qtDir() ); + TQStringList lst = dir.entryList( "*.h" ); + TQStringList fileList; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) + { + if ( ( *it ).startsWith( "qconfig-" ) ) + { + if ( ( *it ).endsWith( m_settings->configuration() + ".h" ) ) + fileList.prepend( dir.absPath() + "/" + ( *it ) ); + } + else + { + fileList.push_back( dir.absPath() + "/" + ( *it ) ); + } + } + return fileList; +} + +TQStringList KDevQtImporter::includePaths() +{ + if ( !m_settings ) + return TQStringList(); + + TQStringList includePaths; + includePaths.push_back( m_settings->qtDir() ); + includePaths.push_back( m_settings->qtDir() + "/private" ); + includePaths.push_back( m_settings->qtDir() + "/default" ); + + /// @todo add mkspec + return includePaths; +} + +TQWidget * KDevQtImporter::createSettingsPage( TQWidget * parent, const char * name ) +{ + m_settings = new SettingsDialog( parent, name ); + return m_settings; +} + +//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.desktop b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.desktop new file mode 100644 index 00000000..72161838 --- /dev/null +++ b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.desktop @@ -0,0 +1,37 @@ +[Desktop Entry] +Type=Service +Name=KDevQtImporter +Name[da]=TDevelop Qt-importør +Name[de]=Qt-PCS-Import (TDevelop) +Name[hi]=के-डेव-क्यूटी-आयातक +Name[nds]=Qt-PCS-Import (TDevelop) +Name[pl]=KDevImportQt +Name[sv]=TDevelop QT-import +Name[ta]=கெடெவ் க்யு இறக்குமதியாளர் +Name[zh_TW]=KDev Qt 匯入器 +Comment=TDevelop Qt3 PCS Importer +Comment[ca]=Importador PCS de Qt3 per a TDevelop +Comment[da]=TDevelop Qt3 PCS importør +Comment[de]=Qt3-Import für persistenten Klassenspeicher +Comment[el]=Εισαγωγέας PCS TDevelop Qt3 +Comment[es]=Importador PCS de Qt3 de TDevelop +Comment[et]=TDevelopi Qt3 PCS importija +Comment[fr]=Importation PCS de Qt3 pour TDevelop +Comment[hu]=TDevelop Qt3 PCS-importáló +Comment[it]=Importatore PCS di Qt3 di TDevelop +Comment[ja]=TDevelop Qt3 PCS インポータ +Comment[nds]=Qt3-Import för duerhaftig Klassenspieker +Comment[pl]=TDevelop: importowanie PCS Qt3 +Comment[pt]=Importador de PCS para Qt3 do TDevelop +Comment[pt_BR]=Importador de PCS para Qt3 do TDevelop +Comment[ru]=Импорт Qt 3 PCS в TDevelop +Comment[sk]=TDevelop Qt3 PCS import +Comment[sr]=TDevelop-ов Qt3 PCS увозник +Comment[sr@Latn]=TDevelop-ov Qt3 PCS uvoznik +Comment[sv]=TDevelop QT3 PCS-import +Comment[zh_TW]=TDevelop Qt3 PCS 匯入器 +Icon=gear +ServiceTypes=TDevelop/PCSImporter +X-TDE-Library=libkdevqtimporter +X-TDevelop-PCSImporter= +X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.h b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.h new file mode 100644 index 00000000..bad9973e --- /dev/null +++ b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * Copyright (C) 2003 by Roberto Raggi * + * roberto@kdevelop.org * + * * + * This program 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. * + * * + ***************************************************************************/ + +#ifndef KDEVTQTIMPORTER_H +#define KDEVTQTIMPORTER_H + +#include +#include + +class SettingsDialog; + +class KDevQtImporter : public KDevPCSImporter +{ + Q_OBJECT + +public: + KDevQtImporter( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); + virtual ~KDevQtImporter(); + + virtual TQString dbName() const { return TQString::fromLatin1("TQt"); } + virtual TQStringList fileList(); + virtual TQStringList includePaths(); + + virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); + +private: + TQGuardedPtr m_settings; +}; + +#endif diff --git a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.cpp b/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.cpp deleted file mode 100644 index b3b94019..00000000 --- a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2003 by Roberto Raggi * -* roberto@kdevelop.org * -* * -* This program 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. * -* * -***************************************************************************/ - -#include "tdevqtimporter.h" -#include "tdevqtimporter.moc" -#include "settingsdialog.h" - -#include - -#include -#include - -K_EXPORT_COMPONENT_FACTORY( libtdevqtimporter, KGenericFactory( "tdevqtimporter" ) ) - -TDevQtImporter::TDevQtImporter( TQObject * parent, const char * name, const TQStringList& ) - : TDevPCSImporter( parent, name ) -{} - -TDevQtImporter::~TDevQtImporter() -{} - -TQStringList TDevQtImporter::fileList() -{ - if ( !m_settings ) - return TQStringList(); - - TQDir dir( m_settings->qtDir() ); - TQStringList lst = dir.entryList( "*.h" ); - TQStringList fileList; - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - { - if ( ( *it ).startsWith( "qconfig-" ) ) - { - if ( ( *it ).endsWith( m_settings->configuration() + ".h" ) ) - fileList.prepend( dir.absPath() + "/" + ( *it ) ); - } - else - { - fileList.push_back( dir.absPath() + "/" + ( *it ) ); - } - } - return fileList; -} - -TQStringList TDevQtImporter::includePaths() -{ - if ( !m_settings ) - return TQStringList(); - - TQStringList includePaths; - includePaths.push_back( m_settings->qtDir() ); - includePaths.push_back( m_settings->qtDir() + "/private" ); - includePaths.push_back( m_settings->qtDir() + "/default" ); - - /// @todo add mkspec - return includePaths; -} - -TQWidget * TDevQtImporter::createSettingsPage( TQWidget * parent, const char * name ) -{ - m_settings = new SettingsDialog( parent, name ); - return m_settings; -} - -//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.desktop b/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.desktop deleted file mode 100644 index f9b02306..00000000 --- a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.desktop +++ /dev/null @@ -1,37 +0,0 @@ -[Desktop Entry] -Type=Service -Name=TDevQtImporter -Name[da]=TDevelop Qt-importør -Name[de]=Qt-PCS-Import (TDevelop) -Name[hi]=के-डेव-क्यूटी-आयातक -Name[nds]=Qt-PCS-Import (TDevelop) -Name[pl]=KDevImportQt -Name[sv]=TDevelop QT-import -Name[ta]=கெடெவ் க்யு இறக்குமதியாளர் -Name[zh_TW]=KDev Qt 匯入器 -Comment=TDevelop Qt3 PCS Importer -Comment[ca]=Importador PCS de Qt3 per a TDevelop -Comment[da]=TDevelop Qt3 PCS importør -Comment[de]=Qt3-Import für persistenten Klassenspeicher -Comment[el]=Εισαγωγέας PCS TDevelop Qt3 -Comment[es]=Importador PCS de Qt3 de TDevelop -Comment[et]=TDevelopi Qt3 PCS importija -Comment[fr]=Importation PCS de Qt3 pour TDevelop -Comment[hu]=TDevelop Qt3 PCS-importáló -Comment[it]=Importatore PCS di Qt3 di TDevelop -Comment[ja]=TDevelop Qt3 PCS インポータ -Comment[nds]=Qt3-Import för duerhaftig Klassenspieker -Comment[pl]=TDevelop: importowanie PCS Qt3 -Comment[pt]=Importador de PCS para Qt3 do TDevelop -Comment[pt_BR]=Importador de PCS para Qt3 do TDevelop -Comment[ru]=Импорт Qt 3 PCS в TDevelop -Comment[sk]=TDevelop Qt3 PCS import -Comment[sr]=TDevelop-ов Qt3 PCS увозник -Comment[sr@Latn]=TDevelop-ov Qt3 PCS uvoznik -Comment[sv]=TDevelop QT3 PCS-import -Comment[zh_TW]=TDevelop Qt3 PCS 匯入器 -Icon=gear -ServiceTypes=TDevelop/PCSImporter -X-TDE-Library=libtdevqtimporter -X-TDevelop-PCSImporter= -X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.h b/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.h deleted file mode 100644 index 3f7d1ac8..00000000 --- a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.h +++ /dev/null @@ -1,38 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program 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. * - * * - ***************************************************************************/ - -#ifndef TDEVTQTIMPORTER_H -#define TDEVTQTIMPORTER_H - -#include -#include - -class SettingsDialog; - -class TDevQtImporter : public TDevPCSImporter -{ - Q_OBJECT - -public: - TDevQtImporter( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); - virtual ~TDevQtImporter(); - - virtual TQString dbName() const { return TQString::fromLatin1("TQt"); } - virtual TQStringList fileList(); - virtual TQStringList includePaths(); - - virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); - -private: - TQGuardedPtr m_settings; -}; - -#endif diff --git a/languages/cpp/pcsimporter/tdelibsimporter/CMakeLists.txt b/languages/cpp/pcsimporter/tdelibsimporter/CMakeLists.txt index 4dbf0d0c..d48bad5a 100644 --- a/languages/cpp/pcsimporter/tdelibsimporter/CMakeLists.txt +++ b/languages/cpp/pcsimporter/tdelibsimporter/CMakeLists.txt @@ -24,14 +24,14 @@ link_directories( ##### other data ################################ -install( FILES tdevtdelibsimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevtdelibsimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevtdelibsimporter (module) ########### +##### libkdevtdelibsimporter (module) ########### -tde_add_kpart( libtdevtdelibsimporter AUTOMOC +tde_add_kpart( libkdevtdelibsimporter AUTOMOC SOURCES - tdevtdelibsimporter.cpp settingsdialogbase.ui + kdevtdelibsimporter.cpp settingsdialogbase.ui settingsdialog.cpp LINK lang_interfaces-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/languages/cpp/pcsimporter/tdelibsimporter/Makefile.am b/languages/cpp/pcsimporter/tdelibsimporter/Makefile.am index e7c846d4..14efcabc 100644 --- a/languages/cpp/pcsimporter/tdelibsimporter/Makefile.am +++ b/languages/cpp/pcsimporter/tdelibsimporter/Makefile.am @@ -1,11 +1,11 @@ INCLUDES = -I$(top_srcdir)/languages/lib/interfaces \ -I$(top_srcdir)/lib/interfaces $(all_includes) METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevtdelibsimporter.la +kde_module_LTLIBRARIES = libkdevtdelibsimporter.la -noinst_HEADERS = tdevtdelibsimporter.h settingsdialog.h -libtdevtdelibsimporter_la_SOURCES = tdevtdelibsimporter.cpp settingsdialogbase.ui settingsdialog.cpp -kde_services_DATA = tdevtdelibsimporter.desktop -libtdevtdelibsimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +noinst_HEADERS = kdevtdelibsimporter.h settingsdialog.h +libkdevtdelibsimporter_la_SOURCES = kdevtdelibsimporter.cpp settingsdialogbase.ui settingsdialog.cpp +kde_services_DATA = kdevtdelibsimporter.desktop +libkdevtdelibsimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/languages/lib/interfaces/liblang_interfaces.la -libtdevtdelibsimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevtdelibsimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) diff --git a/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.cpp b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.cpp new file mode 100644 index 00000000..d3f5795b --- /dev/null +++ b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.cpp @@ -0,0 +1,119 @@ +/*************************************************************************** +* Copyright (C) 2003 by Roberto Raggi * +* roberto@kdevelop.org * +* * +* This program 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. * +* * +***************************************************************************/ + +#include "kdevtdelibsimporter.h" +#include "kdevtdelibsimporter.moc" +#include "settingsdialog.h" + +#include +#include + +#include +#include +#include +#include + +K_EXPORT_COMPONENT_FACTORY( libkdevtdelibsimporter, KGenericFactory( "kdevtdelibsimporter" ) ) + +KDevKDELibsImporter::KDevKDELibsImporter( TQObject * parent, const char * name, const TQStringList& ) + : KDevPCSImporter( parent, name ) +{} + +KDevKDELibsImporter::~KDevKDELibsImporter() +{} + +TQStringList KDevKDELibsImporter::fileList( const TQString& path ) +{ + TQDir dir( path ); + TQStringList lst = dir.entryList( "*.h" ); + TQStringList fileList; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) + { + fileList.push_back( dir.absPath() + "/" + ( *it ) ); + } + return fileList; +} + + +TQStringList KDevKDELibsImporter::fileList() +{ + if ( !m_settings ) + return TQStringList(); + + TQStringList files; + int scope = m_settings->cbParsingScope->currentItem(); + if ( scope == 0 ) + { + files += fileList( m_settings->kdeDir() ); + files += fileList( m_settings->kdeDir() + "/arts" ); + files += fileList( m_settings->kdeDir() + "/artsc" ); + files += fileList( m_settings->kdeDir() + "/dcopc" ); + files += fileList( m_settings->kdeDir() + "/dom" ); + files += fileList( m_settings->kdeDir() + "/tdeabc" ); + files += fileList( m_settings->kdeDir() + "/tdeprint" ); + files += fileList( m_settings->kdeDir() + "/tdesu" ); + files += fileList( m_settings->kdeDir() + "/tdeio" ); + files += fileList( m_settings->kdeDir() + "/kjs" ); + files += fileList( m_settings->kdeDir() + "/tdeparts" ); + files += fileList( m_settings->kdeDir() + "/tdetexteditor" ); + } + else if ( scope == 1 ) + { + TQValueStack s; + s.push( m_settings->kdeDir() ); + files += fileList( m_settings->kdeDir() ); + + TQDir dir; + do + { + dir.setPath( s.pop() ); + kdDebug( 9015 ) << "Examining: " << dir.path() << endl; + const TQFileInfoList *dirEntries = dir.entryInfoList(); + if ( !dirEntries ) continue; + TQPtrListIterator it( *dirEntries ); + for ( ; it.current(); ++it ) + { + TQString fileName = it.current() ->fileName(); + if ( fileName == "." || fileName == ".." ) + continue; + TQString path = it.current() ->absFilePath(); + if ( it.current() ->isDir() ) + { + kdDebug( 9015 ) << "Pushing: " << path << endl; + s.push( path ); + files += fileList( path ); + } + } + } + while ( !s.isEmpty() ); + } + + return files; +} + +TQStringList KDevKDELibsImporter::includePaths() +{ + if ( !m_settings ) + return TQStringList(); + + TQStringList includePaths; + includePaths.push_back( m_settings->kdeDir() ); + return includePaths; +} + +TQWidget * KDevKDELibsImporter::createSettingsPage( TQWidget * parent, const char * name ) +{ + m_settings = new SettingsDialog( parent, name ); + return m_settings; +} +//kate: indent-mode csands; tab-width 4; space-indent off; + + diff --git a/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.desktop b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.desktop new file mode 100644 index 00000000..7433518e --- /dev/null +++ b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.desktop @@ -0,0 +1,49 @@ +[Desktop Entry] +Type=Service +Name=KDevKDELibsImporter +Name[da]=TDevelop KDELibs-importør +Name[de]=KDELibs-PCS-Import (TDevelop) +Name[hi]=के-डेव-केडीई-लिब्स-इम्पोर्टर +Name[ja]=KDev KDE +Name[nds]=KDELibs-PCS-Import (TDevelop) +Name[pl]=KDevKDEImportBib +Name[sk]=KDev KDE import knižníc +Name[sv]=TDevelop KDE-biblioteksimport +Name[ta]=கெடெவ் கெடெலிப்ஸ் இறக்குமதியாளர் +Name[zh_TW]=TDevelop KDE 函式庫匯入器 +Comment=TDevelop KDELibs PCS Importer +Comment[ca]=Importador PCS de KDELibs per a TDevelop +Comment[da]=TDevelop KDELibs PCS importør +Comment[de]=KDELibs-Import für persistenten Klassenspeicher +Comment[el]=Εισαγωγέας PCS TDevelop KDELibs +Comment[es]=Importador PCS de KDELibs de TDevelop +Comment[et]=TDevelopi tdelibs PCS importija +Comment[eu]=TDevelop-en KDELibs PCS inportatzailea +Comment[fa]=واردکنندۀ TDevelop KDELibs PCS +Comment[fr]=Importation PCS de KDELibs pour TDevelop +Comment[gl]=Importador PCS de KDELibs para TDevelop +Comment[hi]=के-डेवलप केडीई-लिब्स पीसीएस आयातक +Comment[hu]=TDevelop KDELibs PCS-importáló +Comment[it]=Importatore per KDELibs PCS di TDevelop +Comment[ja]=TDevelop KDELibs PCS インポータ +Comment[nds]=KDELibs-Import för duerhaftig Klassenspieker +Comment[ne]=TDevelop KDELibs PCS आयातकर्ता +Comment[nl]=TDevelop PCS Importer voor KDELibs +Comment[pl]=TDevelop: importowanie PCS (KDELibs) +Comment[pt]=Importador de PCS das KDELibs do TDevelop +Comment[pt_BR]=Importador PCS do KDELibs para o TDevelop +Comment[ru]=Загрузка символов из библиотеки KDELibs в хранилище классов +Comment[sk]=TDevelop PCS import KDE knižníc +Comment[sr]=TDevelop-ов KDELibs PCS увозник +Comment[sr@Latn]=TDevelop-ov KDELibs PCS uvoznik +Comment[sv]=TDevelop KDE-bibliotek PCS-import +Comment[ta]=கெடெவலப் கெடெலிப்ஸ் பிசிஸ் இறக்குமதியாளர் +Comment[tg]=Пурборкунии нишонаҳо аз китобхонаи KDELibs дар синфҳои анборӣ +Comment[tr]=TDevelop KDELibs PCS Aktarıcısı +Comment[zh_CN]=TDevelop KDELibs PCS 导入器 +Comment[zh_TW]=TDevelop KDE 函式庫匯入器 +Icon=gear +ServiceTypes=TDevelop/PCSImporter +X-TDE-Library=libkdevtdelibsimporter +X-TDevelop-PCSImporter= +X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.h b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.h new file mode 100644 index 00000000..14fb7cff --- /dev/null +++ b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.h @@ -0,0 +1,41 @@ +/*************************************************************************** + * Copyright (C) 2003 by Roberto Raggi * + * roberto@kdevelop.org * + * * + * This program 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. * + * * + ***************************************************************************/ + +#ifndef KDEVTQTIMPORTER_H +#define KDEVTQTIMPORTER_H + +#include +#include + +class SettingsDialog; + +class KDevKDELibsImporter : public KDevPCSImporter +{ + Q_OBJECT + +public: + KDevKDELibsImporter( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); + virtual ~KDevKDELibsImporter(); + + virtual TQString dbName() const { return TQString::fromLatin1("KDElibs"); } + virtual TQStringList fileList(); + virtual TQStringList includePaths(); + + virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); + +private: + TQStringList fileList( const TQString& path ); + +private: + TQGuardedPtr m_settings; +}; + +#endif diff --git a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.cpp b/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.cpp deleted file mode 100644 index 6f83e483..00000000 --- a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2003 by Roberto Raggi * -* roberto@kdevelop.org * -* * -* This program 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. * -* * -***************************************************************************/ - -#include "tdevtdelibsimporter.h" -#include "tdevtdelibsimporter.moc" -#include "settingsdialog.h" - -#include -#include - -#include -#include -#include -#include - -K_EXPORT_COMPONENT_FACTORY( libtdevtdelibsimporter, KGenericFactory( "tdevtdelibsimporter" ) ) - -TDevTDELibsImporter::TDevTDELibsImporter( TQObject * parent, const char * name, const TQStringList& ) - : TDevPCSImporter( parent, name ) -{} - -TDevTDELibsImporter::~TDevTDELibsImporter() -{} - -TQStringList TDevTDELibsImporter::fileList( const TQString& path ) -{ - TQDir dir( path ); - TQStringList lst = dir.entryList( "*.h" ); - TQStringList fileList; - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - { - fileList.push_back( dir.absPath() + "/" + ( *it ) ); - } - return fileList; -} - - -TQStringList TDevTDELibsImporter::fileList() -{ - if ( !m_settings ) - return TQStringList(); - - TQStringList files; - int scope = m_settings->cbParsingScope->currentItem(); - if ( scope == 0 ) - { - files += fileList( m_settings->kdeDir() ); - files += fileList( m_settings->kdeDir() + "/arts" ); - files += fileList( m_settings->kdeDir() + "/artsc" ); - files += fileList( m_settings->kdeDir() + "/dcopc" ); - files += fileList( m_settings->kdeDir() + "/dom" ); - files += fileList( m_settings->kdeDir() + "/tdeabc" ); - files += fileList( m_settings->kdeDir() + "/tdeprint" ); - files += fileList( m_settings->kdeDir() + "/tdesu" ); - files += fileList( m_settings->kdeDir() + "/tdeio" ); - files += fileList( m_settings->kdeDir() + "/kjs" ); - files += fileList( m_settings->kdeDir() + "/tdeparts" ); - files += fileList( m_settings->kdeDir() + "/tdetexteditor" ); - } - else if ( scope == 1 ) - { - TQValueStack s; - s.push( m_settings->kdeDir() ); - files += fileList( m_settings->kdeDir() ); - - TQDir dir; - do - { - dir.setPath( s.pop() ); - kdDebug( 9015 ) << "Examining: " << dir.path() << endl; - const TQFileInfoList *dirEntries = dir.entryInfoList(); - if ( !dirEntries ) continue; - TQPtrListIterator it( *dirEntries ); - for ( ; it.current(); ++it ) - { - TQString fileName = it.current() ->fileName(); - if ( fileName == "." || fileName == ".." ) - continue; - TQString path = it.current() ->absFilePath(); - if ( it.current() ->isDir() ) - { - kdDebug( 9015 ) << "Pushing: " << path << endl; - s.push( path ); - files += fileList( path ); - } - } - } - while ( !s.isEmpty() ); - } - - return files; -} - -TQStringList TDevTDELibsImporter::includePaths() -{ - if ( !m_settings ) - return TQStringList(); - - TQStringList includePaths; - includePaths.push_back( m_settings->kdeDir() ); - return includePaths; -} - -TQWidget * TDevTDELibsImporter::createSettingsPage( TQWidget * parent, const char * name ) -{ - m_settings = new SettingsDialog( parent, name ); - return m_settings; -} -//kate: indent-mode csands; tab-width 4; space-indent off; - - diff --git a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.desktop b/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.desktop deleted file mode 100644 index 54cd2996..00000000 --- a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.desktop +++ /dev/null @@ -1,49 +0,0 @@ -[Desktop Entry] -Type=Service -Name=TDevTDELibsImporter -Name[da]=TDevelop KDELibs-importør -Name[de]=KDELibs-PCS-Import (TDevelop) -Name[hi]=के-डेव-केडीई-लिब्स-इम्पोर्टर -Name[ja]=KDev KDE -Name[nds]=KDELibs-PCS-Import (TDevelop) -Name[pl]=TDevTDEImportBib -Name[sk]=KDev KDE import knižníc -Name[sv]=TDevelop KDE-biblioteksimport -Name[ta]=கெடெவ் கெடெலிப்ஸ் இறக்குமதியாளர் -Name[zh_TW]=TDevelop KDE 函式庫匯入器 -Comment=TDevelop KDELibs PCS Importer -Comment[ca]=Importador PCS de KDELibs per a TDevelop -Comment[da]=TDevelop KDELibs PCS importør -Comment[de]=KDELibs-Import für persistenten Klassenspeicher -Comment[el]=Εισαγωγέας PCS TDevelop KDELibs -Comment[es]=Importador PCS de KDELibs de TDevelop -Comment[et]=TDevelopi tdelibs PCS importija -Comment[eu]=TDevelop-en KDELibs PCS inportatzailea -Comment[fa]=واردکنندۀ TDevelop KDELibs PCS -Comment[fr]=Importation PCS de KDELibs pour TDevelop -Comment[gl]=Importador PCS de KDELibs para TDevelop -Comment[hi]=के-डेवलप केडीई-लिब्स पीसीएस आयातक -Comment[hu]=TDevelop KDELibs PCS-importáló -Comment[it]=Importatore per KDELibs PCS di TDevelop -Comment[ja]=TDevelop KDELibs PCS インポータ -Comment[nds]=KDELibs-Import för duerhaftig Klassenspieker -Comment[ne]=TDevelop KDELibs PCS आयातकर्ता -Comment[nl]=TDevelop PCS Importer voor KDELibs -Comment[pl]=TDevelop: importowanie PCS (KDELibs) -Comment[pt]=Importador de PCS das KDELibs do TDevelop -Comment[pt_BR]=Importador PCS do KDELibs para o TDevelop -Comment[ru]=Загрузка символов из библиотеки KDELibs в хранилище классов -Comment[sk]=TDevelop PCS import KDE knižníc -Comment[sr]=TDevelop-ов KDELibs PCS увозник -Comment[sr@Latn]=TDevelop-ov KDELibs PCS uvoznik -Comment[sv]=TDevelop KDE-bibliotek PCS-import -Comment[ta]=கெடெவலப் கெடெலிப்ஸ் பிசிஸ் இறக்குமதியாளர் -Comment[tg]=Пурборкунии нишонаҳо аз китобхонаи KDELibs дар синфҳои анборӣ -Comment[tr]=TDevelop KDELibs PCS Aktarıcısı -Comment[zh_CN]=TDevelop KDELibs PCS 导入器 -Comment[zh_TW]=TDevelop KDE 函式庫匯入器 -Icon=gear -ServiceTypes=TDevelop/PCSImporter -X-TDE-Library=libtdevtdelibsimporter -X-TDevelop-PCSImporter= -X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.h b/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.h deleted file mode 100644 index 0d772bba..00000000 --- a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.h +++ /dev/null @@ -1,41 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program 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. * - * * - ***************************************************************************/ - -#ifndef TDEVTQTIMPORTER_H -#define TDEVTQTIMPORTER_H - -#include -#include - -class SettingsDialog; - -class TDevTDELibsImporter : public TDevPCSImporter -{ - Q_OBJECT - -public: - TDevTDELibsImporter( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); - virtual ~TDevTDELibsImporter(); - - virtual TQString dbName() const { return TQString::fromLatin1("KDElibs"); } - virtual TQStringList fileList(); - virtual TQStringList includePaths(); - - virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); - -private: - TQStringList fileList( const TQString& path ); - -private: - TQGuardedPtr m_settings; -}; - -#endif diff --git a/languages/cpp/problemreporter.cpp b/languages/cpp/problemreporter.cpp index bed0c9ae..eed7a5b6 100644 --- a/languages/cpp/problemreporter.cpp +++ b/languages/cpp/problemreporter.cpp @@ -21,9 +21,9 @@ #include "configproblemreporter.h" #include "backgroundparser.h" -#include -#include -#include +#include +#include +#include #include #include diff --git a/languages/cpp/qtbuildconfig.cpp b/languages/cpp/qtbuildconfig.cpp index 5c42ffb1..c5c87b1c 100644 --- a/languages/cpp/qtbuildconfig.cpp +++ b/languages/cpp/qtbuildconfig.cpp @@ -77,7 +77,7 @@ void QtBuildConfig::init( ) if( m_designerIntegration.isEmpty() ) { if ( m_version == 3 ) - m_designerIntegration = "EmbeddedTDevDesigner"; + m_designerIntegration = "EmbeddedKDevDesigner"; else m_designerIntegration = "ExternalDesigner"; } diff --git a/languages/cpp/qtbuildconfig.h b/languages/cpp/qtbuildconfig.h index 10da233d..118503b6 100644 --- a/languages/cpp/qtbuildconfig.h +++ b/languages/cpp/qtbuildconfig.h @@ -81,7 +81,7 @@ private: TQString m_designerPath; ///< The path including the binary name of TQt Designer TQString m_qmakePath; ///< The path including the binary name of TQMake TQStringList m_designerPluginPaths; ///< The Prefix for Designer - TQString m_designerIntegration; ///< The type of designer used, tdevdesigner or qt designer + TQString m_designerIntegration; ///< The type of designer used, kdevdesigner or qt designer static const TQString m_configRoot; ///< The root path of the configuration }; diff --git a/languages/cpp/qtdesignercppintegration.cpp b/languages/cpp/qtdesignercppintegration.cpp index 715da1a9..db6df895 100644 --- a/languages/cpp/qtdesignercppintegration.cpp +++ b/languages/cpp/qtdesignercppintegration.cpp @@ -32,15 +32,15 @@ #include #include -#include -#include +#include +#include #include "backgroundparser.h" #include "cppsupportpart.h" #include "codemodel_utils.h" #include "implementationwidget.h" -QtDesignerCppIntegration::QtDesignerCppIntegration( TDevLanguageSupport *part, +QtDesignerCppIntegration::QtDesignerCppIntegration( KDevLanguageSupport *part, ImplementationWidget *impl ) : QtDesignerIntegration( part, impl, true, 0 ) {} @@ -126,7 +126,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function TQFileInfo fileInfo( implementationFile ); if ( !TQFile::exists( fileInfo.absFilePath() ) ) { - if ( TDevCreateFile * createFileSupp = m_part->extension( "TDevelop/CreateFile" ) ) + if ( KDevCreateFile * createFileSupp = m_part->extension( "TDevelop/CreateFile" ) ) createFileSupp->createNewFile( fileInfo.extension(), fileInfo.dirPath( true ), fileInfo.fileName() ); } diff --git a/languages/cpp/qtdesignercppintegration.h b/languages/cpp/qtdesignercppintegration.h index 143cf180..d156d276 100644 --- a/languages/cpp/qtdesignercppintegration.h +++ b/languages/cpp/qtdesignercppintegration.h @@ -27,7 +27,7 @@ class QtDesignerCppIntegration : public QtDesignerIntegration Q_OBJECT public: - QtDesignerCppIntegration( TDevLanguageSupport *part, ImplementationWidget *impl ); + QtDesignerCppIntegration( KDevLanguageSupport *part, ImplementationWidget *impl ); protected: virtual void addFunctionToClass( KInterfaceDesigner::Function function, ClassDom klass ); diff --git a/languages/cpp/simpletype.cpp b/languages/cpp/simpletype.cpp index ac905c33..db3f9c79 100644 --- a/languages/cpp/simpletype.cpp +++ b/languages/cpp/simpletype.cpp @@ -910,9 +910,9 @@ TQString SimpleTypeImpl::fullTypeResolved( int depth ) { TypeDesc t = desc(); if ( !scope().isEmpty() ) { if ( depth > 10 ) - return "TDeveParseError::ToDeep"; + return "KDevParseError::ToDeep"; if ( !safetyCounter ) - return "TDeveParseError::MaximumCountReached"; + return "KDevParseError::MaximumCountReached"; ifVerbose( dbg() << "fully resolving type " << t.fullName() << endl ); if ( scope().size() != 0 ) { diff --git a/languages/cpp/storeconverter.cpp b/languages/cpp/storeconverter.cpp index 670e69ff..6ad55925 100644 --- a/languages/cpp/storeconverter.cpp +++ b/languages/cpp/storeconverter.cpp @@ -14,7 +14,7 @@ #include -#include +#include #include "cppcodecompletion.h" #include "codeinformationrepository.h" diff --git a/languages/cpp/subclassing_template/CMakeLists.txt b/languages/cpp/subclassing_template/CMakeLists.txt index 4ee02817..3223a7d7 100644 --- a/languages/cpp/subclassing_template/CMakeLists.txt +++ b/languages/cpp/subclassing_template/CMakeLists.txt @@ -12,4 +12,4 @@ install( FILES subclass_template.h subclass_template.cpp subclass_qt4_template.h subclass_qt4_template.cpp - DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport/subclassing ) + DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport/subclassing ) diff --git a/languages/cpp/subclassing_template/Makefile.am b/languages/cpp/subclassing_template/Makefile.am index 850ec6b9..4e722ca0 100644 --- a/languages/cpp/subclassing_template/Makefile.am +++ b/languages/cpp/subclassing_template/Makefile.am @@ -1,4 +1,4 @@ -cppsupportdatadir = ${kde_datadir}/tdevcppsupport +cppsupportdatadir = ${kde_datadir}/kdevcppsupport subclassingdir = ${cppsupportdatadir}/subclassing subclassing_DATA = subclass_template.h subclass_template.cpp \ diff --git a/languages/cpp/subclassingdlg.cpp b/languages/cpp/subclassingdlg.cpp index 26758d09..0982226c 100644 --- a/languages/cpp/subclassingdlg.cpp +++ b/languages/cpp/subclassingdlg.cpp @@ -16,9 +16,9 @@ #include "backgroundparser.h" #include "store_walker.h" #include "cppsupportfactory.h" -#include "tdevsourceformatter.h" -#include "tdevapi.h" -#include "tdevproject.h" +#include "kdevsourceformatter.h" +#include "kdevapi.h" +#include "kdevproject.h" #include "filetemplate.h" #include "codemodel.h" @@ -475,7 +475,7 @@ void SubclassingDlg::accept() TQString basefilename = fi.baseName(true); buffer.replace(TQRegExp("\\$MODULE\\$"),module); buffer.replace(TQRegExp("\\$FILENAME\\$"),basefilename); - if ( (m_cppSupport->project()) && (m_cppSupport->project()->options() & TDevProject::UsesAutotoolsBuildSystem)) + if ( (m_cppSupport->project()) && (m_cppSupport->project()->options() & KDevProject::UsesAutotoolsBuildSystem)) buffer += "\n#include \"$NEWFILENAMELC$.moc\"\n"; } else diff --git a/languages/cpp/tdevcppsupport.desktop b/languages/cpp/tdevcppsupport.desktop deleted file mode 100644 index 93a99f59..00000000 --- a/languages/cpp/tdevcppsupport.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=C++ Support -Comment[ca]=Suport per a C++ -Comment[da]=C++ understøttelse -Comment[de]=C++-Unterstützung für TDevelop -Comment[el]=Υποστήριξη C++ -Comment[es]=Soporte para C++ -Comment[et]=C++ toetus -Comment[eu]=C++ euskarria -Comment[fa]=پشتیبانی C++ -Comment[fr]=Prise en charge du langage C++ -Comment[ga]=Tacaíocht C++ -Comment[gl]=Soporte para C++ -Comment[hi]=सी++ समर्थन -Comment[hu]=C++-támogatás -Comment[is]=C++ stuðningur -Comment[it]=Supporto per C++ -Comment[ja]=C++ サポート -Comment[nds]=Ünnerstütten för C++ -Comment[ne]=C++ समर्थन -Comment[nl]=Ondersteuning voor C++ -Comment[pl]=Obsługa C++ -Comment[pt]=Suporte a C++ -Comment[pt_BR]=Suporte ao C++ -Comment[ru]=Поддержка языка C++ -Comment[sk]=C++ podpora -Comment[sl]=Podpora za C++ -Comment[sr]=Подршка за C++ -Comment[sr@Latn]=Podrška za C++ -Comment[sv]=C++ stöd -Comment[ta]=C++ ஆதரவு -Comment[tg]=Ёрӣ намудани забони C++ -Comment[tr]=C++ Desteği -Comment[zh_CN]=C++ 支持 -Comment[zh_TW]=C++ 支援 -Name=TDevCppSupport -Name[da]=TDevelop C++ understøttelse -Name[hi]=के-डेव-सीपीपी-समर्थन -Name[nds]=CPP-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaCpp -Name[sk]=KDev C++ podpora -Name[sv]=TDevelop C++ stöd -Name[ta]=கெடெவ்சிபிபி ஆதரவு -Name[zh_TW]=TDevelop C++ 支援 -GenericName=C++ Support -GenericName[ca]=Suport per a C++ -GenericName[da]=C++ understøttelse -GenericName[de]=Unterstützung für C++ -GenericName[el]=Υποστήριξη C++ -GenericName[es]=Soporte para C++ -GenericName[et]=C++ toetus -GenericName[eu]=C++ euskarria -GenericName[fa]=پشتیبانی C++ -GenericName[fr]=Prise en charge du langage C++ -GenericName[ga]=Tacaíocht C++ -GenericName[gl]=Soporte para C++ -GenericName[hi]=सी++ समर्थन -GenericName[hu]=C++-támogatás -GenericName[it]=Supporto C++ -GenericName[ja]=C++ サポート -GenericName[nds]=Ünnerstütten för C++ -GenericName[ne]=C++ समर्थन -GenericName[nl]=Ondersteuning voor C++ -GenericName[pa]=C++ ਸਹਿਯੋਗ -GenericName[pl]=Obsługa C++ -GenericName[pt]=Suporte a C++ -GenericName[pt_BR]=Suporte ao C++ -GenericName[ru]=Поддержка языка C++ -GenericName[sk]=C++ podpora -GenericName[sl]=Podpora za C++ -GenericName[sr]=Подршка за C++ -GenericName[sr@Latn]=Podrška za C++ -GenericName[sv]=C++ stöd -GenericName[ta]=C++ ஆதரவு -GenericName[tg]=Ёрӣ намудани забони C++ -GenericName[tr]=C++ Desteği -GenericName[zh_CN]=C++ 支持 -GenericName[zh_TW]=C++ 支援 -ServiceTypes=TDevelop/LanguageSupport -Icon=source_cpp -X-TDE-Library=libtdevcppsupport -X-TDevelop-Version=5 -X-TDevelop-Language=C++ -X-TDevelop-Args=Cpp diff --git a/languages/cpp/tdevcppsupport.rc b/languages/cpp/tdevcppsupport.rc deleted file mode 100644 index 1bfcf5a8..00000000 --- a/languages/cpp/tdevcppsupport.rc +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/languages/cpp/tdevcsupport.desktop b/languages/cpp/tdevcsupport.desktop deleted file mode 100644 index 7c196ef0..00000000 --- a/languages/cpp/tdevcsupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=C Support -Comment[ca]=Suport per a C -Comment[da]=C understøttelse -Comment[de]=C-Unterstützung für TDevelop -Comment[el]=Υποστήριξη C -Comment[es]=Soporte para C -Comment[et]=C toetus -Comment[eu]=C euskarria -Comment[fa]=پشتیبانی سی -Comment[fr]=Prise en charge du langage C -Comment[ga]=Tacaíocht C -Comment[gl]=Soporte para C -Comment[hi]=सी समर्थन -Comment[hu]=C-támogatás -Comment[is]=C stuðningur -Comment[it]=Supporto per C -Comment[ja]=C サポート -Comment[nds]=Ünnerstütten för C -Comment[ne]=C समर्थन -Comment[nl]=Ondersteuning voor C -Comment[pa]=C ਸਹਿਯੋਗ -Comment[pl]=Obsługa C -Comment[pt]=Suporte a C -Comment[pt_BR]=Suporte ao C -Comment[ru]=Поддержка языка C -Comment[sk]=C podpora -Comment[sl]=Podpora za C -Comment[sr]=Подршка за C -Comment[sr@Latn]=Podrška za C -Comment[sv]=C-stöd -Comment[ta]=C ஆதரவு -Comment[tg]=Ёрӣ намудани забони C -Comment[tr]=C Desteği -Comment[zh_CN]=C 支持 -Comment[zh_TW]=C 支援 -Name=KDevCSupport -Name[da]=TDevelop C understøttelse -Name[nds]=C-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaC -Name[sk]=KDev C podpora -Name[sv]=TDevelop C-stöd -Name[zh_TW]=TDevelop C 支援 -GenericName=C Support -GenericName[ca]=Suport per a C -GenericName[da]=C understøttelse -GenericName[de]=Unterstützung für C -GenericName[el]=Υποστήριξη C -GenericName[es]=Soporte para C -GenericName[et]=C toetus -GenericName[eu]=C euskarria -GenericName[fa]=پشتیبانی سی -GenericName[fr]=Prise en charge du langage C -GenericName[ga]=Tacaíocht C -GenericName[gl]=Soporte para C -GenericName[hi]=सी समर्थन -GenericName[hu]=C-támogatás -GenericName[it]=Supporto C -GenericName[ja]=C サポート -GenericName[nds]=Ünnerstütten för C -GenericName[ne]=C समर्थन -GenericName[nl]=Ondersteuning voor C -GenericName[pa]=C ਸਹਿਯੋਗ -GenericName[pl]=Obsługa C -GenericName[pt]=Suporte a C -GenericName[pt_BR]=Suporte ao C -GenericName[ru]=Поддержка языка C -GenericName[sk]=C podpora -GenericName[sl]=Podpora za C -GenericName[sr]=Подршка за C -GenericName[sr@Latn]=Podrška za C -GenericName[sv]=C-stöd -GenericName[ta]=C ஆதரவு -GenericName[tg]=Ёрӣ намудани забони C -GenericName[tr]=C Desteği -GenericName[zh_CN]=C 支持 -GenericName[zh_TW]=C 支援 -ServiceTypes=TDevelop/LanguageSupport -Icon=source_cpp -X-TDE-Library=libtdevcppsupport -X-TDevelop-Version=5 -X-TDevelop-Language=C -X-TDevelop-Args=C diff --git a/languages/cpp/tdevdeepcopy.h b/languages/cpp/tdevdeepcopy.h deleted file mode 100644 index 3b5d6995..00000000 --- a/languages/cpp/tdevdeepcopy.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef TDEVDEEPCOPY_H -#define TDEVDEEPCOPY_H - -#include - -inline TQString deepCopy( const TQString& s ) -{ - TQCString str = s.utf8(); - return TQString::fromUtf8( str, str.length() ); -} - -#endif -// kate: indent-mode csands; tab-width 4; - diff --git a/languages/cpp/tdevdriver.cpp b/languages/cpp/tdevdriver.cpp deleted file mode 100644 index f2ac1ddb..00000000 --- a/languages/cpp/tdevdriver.cpp +++ /dev/null @@ -1,206 +0,0 @@ -#include "tdelocale.h" /* defines [function] i18n */ -#include - -#include "tdevdriver.h" -#include "cppcodecompletionconfig.h" -#include "setuphelper.h" -#include -#include "includepathresolver.h" - - -TDevDriver::TDevDriver( CppSupportPart* cppSupport, bool foreground ) -: m_cppSupport( cppSupport ), m_includePathResolver(0), m_foreground(foreground), m_shouldParseIncludedFiles(true) -{ - //setupProject(); - setup(); - -} - -TDevDriver::~TDevDriver() { - delete m_includePathResolver; -} - -CppSupportPart* TDevDriver::cppSupport() { return m_cppSupport; } - -void TDevDriver::setupProject() -{ - TQMap map; - - TQStringList fileList = m_cppSupport->project() ->allFiles(); - TQStringList::ConstIterator it = fileList.begin(); - while ( it != fileList.end() ) - { - TQFileInfo info( *it ); - ++it; - - map.insert( info.dirPath( true ), true ); - } - TQMap::Iterator mapit = map.begin(); - while ( mapit != map.end() ) - { - addIncludePath( mapit.key() ); - ++mapit; - } -} - -void TDevDriver::setupLexer( Lexer* lexer ) -{ - Driver::setupLexer( lexer ); - lexer->setReportMessages( true ); - lexer->setReportWarnings( true ); -} - -//! setup the preprocessor -//! code provided by Reginald Stadlbauer -void TDevDriver::setup() -{ - if( lexerCache() ) lexerCache()->clear(); ///Clear the lexer-cache so missing headers get a chance to be parsed - clearMacros(); - clearIncludePaths(); - - addMacro( Macro("KDEVELOP_PARSER", "3.4") ); - - bool ok; - TQString verboseGccOutput = SetupHelper::getVerboseGccIncludePath( &ok ); - TQStringList verboseGccLines = TQStringList::split( '\n', verboseGccOutput ); - if( verboseGccLines.count() > 3 ) { - ///Parse the output of gcc. It includes gcc's final include-path when parsing an empty c++-file(including dirs like /usr/include/c++/4.xx/...) - //what about order? - for( TQStringList::iterator it = verboseGccLines.begin(); it != verboseGccLines.end(); ++it ) { - if( (*it).startsWith(" ") && (*it).length() > 2 && (*it)[1] != ' ' ) { - //it is a potential include-file - TQString path = (*it).stripWhiteSpace(); - TQFileInfo info( path ); - if( info.exists() ) { - kdDebug( 9007 ) << "Adding include-path from gcc-output: \"" << path << "\" absolute: \"" << info.absFilePath() << "\"" << endl; - addIncludePath(info.absFilePath()); - } - } - } - } else { - ///Do some of the old stuff - addIncludePath( "/include" ); - addIncludePath( "/usr/include" ); - addIncludePath( "/usr/local/include" ); - - bool ok; - TQString includePath = SetupHelper::getGccIncludePath(&ok); - if (ok) { - TQStringList ls = TQStringList::split( "\n", includePath ); - for( TQStringList::const_iterator it = ls.begin(); it != ls.end(); ++it ) { - if( !(*it).isEmpty() ) - addIncludePath( *it ); - } - } - - addIncludePath( includePath ); - addIncludePath( "/usr/include/g++-3" ); - addIncludePath( "/usr/include/g++" ); - } - - addMacro( Macro( "__cplusplus", "1" ) ); - - ///@todo maybe remove the following? Is there any normal user who has his environment set up correctly so this is of any use? - TQString tdedir = getenv( "TDEDIR" ); - if( !tdedir.isNull() ) - addIncludePath( tdedir + "/include" ); - - TQString qmakespec = getenv( "QMAKESPEC" ); - if ( qmakespec.isNull() ) - qmakespec = "linux-g++"; - - TQString qtdir = getenv( "QTDIR" ); - if( !qtdir.isNull() ) { - addIncludePath( qtdir + "/include" ); - - // #### implement other mkspecs and find a better way to find the - // #### proper mkspec (althoigh this will be no fun :-) - - addIncludePath( qtdir + "/mkspecs/" + qmakespec ); - } - - TQStringList lines = SetupHelper::getGccMacros(&ok); - if (!ok) { - for (TQStringList::ConstIterator it = lines.constBegin(); it != lines.constEnd(); ++it) { - TQStringList lst = TQStringList::split( ' ', *it ); - if ( lst.count() != 3 ) - continue; - addMacro( Macro( lst[1], lst[2] ) ); - } - } - - addMacro( Macro( "__cplusplus", "1" ) ); - addMacro( Macro( "signals", "signals" ) ); - addMacro( Macro( "slots", "slots" ) ); - addMacro( Macro( "TQ_SCRIPTABLE", "" ) ); - - CppCodeCompletionConfig* cfg = m_cppSupport->codeCompletionConfig(); - TQString str = cfg->customIncludePaths(); - int pos = 0; - while( pos < str.length() ) { - int end = str.find( ';', pos ); - if( end == -1 ) { - end = str.length(); - } - - TQString s = str.mid( pos, end-pos ).stripWhiteSpace(); - if( !s.isEmpty() ) { - if( !s.startsWith( "/" ) && m_cppSupport->project() ) { - s = m_cppSupport->project()->projectDirectory() + "/" + s; - } - addIncludePath( s ); - } - - pos = end+1; - } - - setResolveDependencesEnabled( cfg->preProcessAllHeaders() | cfg->parseMissingHeaders() ); - - delete m_includePathResolver; - if( cfg->resolveIncludePaths() ) { - m_includePathResolver = new CppTools::IncludePathResolver( m_foreground ); - if( m_cppSupport && m_cppSupport->project() ) - m_includePathResolver->setOutOfSourceBuildSystem( m_cppSupport->project()->projectDirectory(), m_cppSupport->project()->buildDirectory() ); - } else - m_includePathResolver = 0; - - m_shouldParseIncludedFiles = cfg->parseMissingHeaders(); -} - -TQStringList TDevDriver::getCustomIncludePath( const TQString& file ) { - if( !file.startsWith("/") ) - kdDebug( 9007 ) << "TDevDriver::getCustomIncludePath(..): given file \"" << file << "\" is not absolute" << endl; - if( !m_includePathResolver ) - return includePaths(); - CppTools::PathResolutionResult res = m_includePathResolver->resolveIncludePath( file ); - - if( !res.success ) { - Problem p( i18n( "%1. Message: %2" ).arg( res.errorMessage ).arg( res.longErrorMessage ), 0, 0, Problem::Level_Warning ); - p.setFileName( file ); - addProblem( file, p ); - } - - return res.path + includePaths(); -} - -bool TDevDriver::shouldParseIncludedFile( const ParsedFilePointer& file ) { - TQString compoundString = file->fileName() + "||" + TQString("%1").arg(file->usedMacros().valueHash()) + "||" + TQString("%1").arg(file->usedMacros().idHash()); - - if( !m_shouldParseIncludedFiles ) - return false; - m_cppSupport->safeFileSet().contains( compoundString ); - - if( m_cppSupport->safeFileSet().contains( file->fileName()) ){ - return false; - } else if( m_cppSupport->safeFileSet().contains( compoundString ) ) { - //kdDebug( 9007 ) << "ALREADY IN FILE-SET: " << compoundString << endl; - return false; - } else { - m_cppSupport->safeFileSet().insert( compoundString ); //This is needed so the same instance of a file is not queued many times - //kdDebug( 9007 ) << "NOT IN FILE-SET, PARSING: " << compoundString << endl; - return true; - } - -} - -//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/tdevdriver.h b/languages/cpp/tdevdriver.h deleted file mode 100644 index 46c7d515..00000000 --- a/languages/cpp/tdevdriver.h +++ /dev/null @@ -1,58 +0,0 @@ - -#ifndef __tdevdriver_h -#define __tdevdriver_h - -#include "cppsupportpart.h" -#include "driver.h" - -#include -#include - -#include -#include -#include - -class TDEProcess; -namespace CppTools { - class IncludePathResolver; -}; - -class TDevDriver: public Driver -{ -public: - ///When the driver is used in a background-thread, foreground MUST be false(else crash) - TDevDriver( CppSupportPart* cppSupport, bool foreground = false ); - ~TDevDriver(); - CppSupportPart* cppSupport(); - void setupProject(); - //! setup the preprocessor - //! code provided by Reginald Stadlbauer - void setup(); - - virtual void addMacro( const Macro& m ) - { - if ( m.name() == "signals" || m.name() == "slots" ) - return ; - Driver::addMacro( m ); - } - -protected: - void setupLexer( Lexer* lexer ); - - ///Returns the complete include-path for that file. Not constant because it may add Problem-items to the driver. Must be absolute path. - virtual TQStringList getCustomIncludePath( const TQString& file ); - - virtual bool shouldParseIncludedFile( const ParsedFilePointer& /*file*/ ); - -private: - - CppSupportPart* m_cppSupport; - CppTools::IncludePathResolver* m_includePathResolver; - bool m_foreground; - bool m_shouldParseIncludedFiles; -}; - -#endif -// kate: indent-mode csands; tab-width 4; - - diff --git a/languages/cpp/templates/CMakeLists.txt b/languages/cpp/templates/CMakeLists.txt index c52a25aa..c278a137 100644 --- a/languages/cpp/templates/CMakeLists.txt +++ b/languages/cpp/templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES default.cpp default.h - DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport/templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport/templates ) diff --git a/languages/cpp/templates/Makefile.am b/languages/cpp/templates/Makefile.am index d5d24bcb..21f95fa8 100644 --- a/languages/cpp/templates/Makefile.am +++ b/languages/cpp/templates/Makefile.am @@ -1,2 +1,2 @@ templatesdata_DATA = default.cpp default.h -templatesdatadir = $(kde_datadir)/tdevcppsupport/templates +templatesdatadir = $(kde_datadir)/kdevcppsupport/templates diff --git a/languages/csharp/CMakeLists.txt b/languages/csharp/CMakeLists.txt index 361ce1a1..5e148431 100644 --- a/languages/csharp/CMakeLists.txt +++ b/languages/csharp/CMakeLists.txt @@ -31,17 +31,17 @@ link_directories( ##### other data ################################ install( FILES - tdevcsharpsupport.desktop csharpdoc.protocol + kdevcsharpsupport.desktop csharpdoc.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) install( FILES - tdevcsharpsupport.rc - DESTINATION ${DATA_INSTALL_DIR}/tdevcsharpsupport ) + kdevcsharpsupport.rc + DESTINATION ${DATA_INSTALL_DIR}/kdevcsharpsupport ) -##### libtdevcsharpsupport (module) ############# +##### libkdevcsharpsupport (module) ############# -tde_add_kpart( libtdevcsharpsupport AUTOMOC +tde_add_kpart( libkdevcsharpsupport AUTOMOC SOURCES csharpsupportpart.cpp csharpconfigwidget.cpp csharpconfigwidgetbase.ui diff --git a/languages/csharp/Makefile.am b/languages/csharp/Makefile.am index 313e8bca..75ba9513 100644 --- a/languages/csharp/Makefile.am +++ b/languages/csharp/Makefile.am @@ -6,11 +6,11 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ SUBDIRS = app_templates file_templates doc -kde_module_LTLIBRARIES = libtdevcsharpsupport.la tdeio_csharpdoc.la -libtdevcsharpsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevcsharpsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevcsharpsupport.la tdeio_csharpdoc.la +libkdevcsharpsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevcsharpsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevcsharpsupport_la_SOURCES = csharpsupportpart.cpp csharpconfigwidget.cpp csharpconfigwidgetbase.ui +libkdevcsharpsupport_la_SOURCES = csharpsupportpart.cpp csharpconfigwidget.cpp csharpconfigwidgetbase.ui tdeio_csharpdoc_la_SOURCES = csharpdoc.cpp tdeio_csharpdoc_la_LIBADD = $(LIB_TDEIO) @@ -19,7 +19,7 @@ tdeio_csharpdoc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevcsharpsupport.desktop csharpdoc.protocol +service_DATA = kdevcsharpsupport.desktop csharpdoc.protocol -rcdir = $(kde_datadir)/tdevcsharpsupport -rc_DATA = tdevcsharpsupport.rc +rcdir = $(kde_datadir)/kdevcsharpsupport +rc_DATA = kdevcsharpsupport.rc diff --git a/languages/csharp/csharpsupportpart.cpp b/languages/csharp/csharpsupportpart.cpp index d410441b..154ff911 100644 --- a/languages/csharp/csharpsupportpart.cpp +++ b/languages/csharp/csharpsupportpart.cpp @@ -19,24 +19,24 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include "tdevmainwindow.h" +#include "kdevmainwindow.h" #include #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" -#include "tdevplugininfo.h" -#include "tdevappfrontend.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" +#include "kdevplugininfo.h" +#include "kdevappfrontend.h" //#include "classstore.h" //#include "parsedclass.h" //#include "parsedmethod.h" @@ -44,16 +44,16 @@ #include "domutil.h" //#include "programmingbycontract.h" -typedef TDevGenericFactory CSharpSupportFactory; -static const TDevPluginInfo data("tdevcsharpsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevcsharpsupport, CSharpSupportFactory( data ) ) +typedef KDevGenericFactory CSharpSupportFactory; +static const KDevPluginInfo data("kdevcsharpsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevcsharpsupport, CSharpSupportFactory( data ) ) CSharpSupportPart::CSharpSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "CSharpSupportPart") + : KDevLanguageSupport(&data, parent, name ? name : "CSharpSupportPart") { setInstance(CSharpSupportFactory::instance()); - setXMLFile("tdevcsharpsupport.rc"); + setXMLFile("kdevcsharpsupport.rc"); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -174,9 +174,9 @@ void CSharpSupportPart::savedFile(const KURL &fileName) } -TDevLanguageSupport::Features CSharpSupportPart::features() +KDevLanguageSupport::Features CSharpSupportPart::features() { - return TDevLanguageSupport::Features(Classes | Functions | Variables | Namespaces | /*Scripts | */NewClass | AddMethod | AddAttribute /*| NewScript*/); + return KDevLanguageSupport::Features(Classes | Functions | Variables | Namespaces | /*Scripts | */NewClass | AddMethod | AddAttribute /*| NewScript*/); // return Functions; } @@ -193,7 +193,7 @@ TQString CSharpSupportPart::interpreter() void CSharpSupportPart::startApplication(const TQString &program) { bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevcsharpsupport/run/terminal"); - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, inTerminal); } diff --git a/languages/csharp/csharpsupportpart.h b/languages/csharp/csharpsupportpart.h index 2256480b..18e5a663 100644 --- a/languages/csharp/csharpsupportpart.h +++ b/languages/csharp/csharpsupportpart.h @@ -12,11 +12,11 @@ #ifndef _CSHARPSUPPORTPART_H_ #define _CSHARPSUPPORTPART_H_ -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include // #include "csharpparser.h" -class CSharpSupportPart : public TDevLanguageSupport +class CSharpSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/csharp/doc/Makefile.am b/languages/csharp/doc/Makefile.am index 1e8dbe53..e0dfb9eb 100644 --- a/languages/csharp/doc/Makefile.am +++ b/languages/csharp/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/csharp/file_templates/Makefile.am b/languages/csharp/file_templates/Makefile.am index 40ad2f23..b4f0a30c 100644 --- a/languages/csharp/file_templates/Makefile.am +++ b/languages/csharp/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = diff --git a/languages/csharp/kdevcsharpsupport.desktop b/languages/csharp/kdevcsharpsupport.desktop new file mode 100644 index 00000000..a5627cc3 --- /dev/null +++ b/languages/csharp/kdevcsharpsupport.desktop @@ -0,0 +1,57 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=CSharp Support +Comment[ca]=Suport per a CSharp +Comment[da]=Csharp understøttelse +Comment[de]=CSharp-Unterstützung für TDevelop +Comment[el]=Υποστήριξη CSharp +Comment[es]=Soporte para CSharp +Comment[et]=CSharp'i toetus +Comment[fr]=Prise en charge du langage CSharp +Comment[hu]=CSharp-támogatás +Comment[it]=Supporto per CSharp +Comment[ja]=CSharp サポート +Comment[nds]=Ünnerstütten för CSharp +Comment[nl]=Ondersteuning voor CSharp +Comment[pl]=Obsługa CSharp +Comment[pt]=Suporte a C# +Comment[pt_BR]=Suporte a C# +Comment[ru]=Поддержка CSharp +Comment[sk]=CSharp podpora +Comment[sr]=Подршка за CSharp +Comment[sr@Latn]=Podrška za CSharp +Comment[sv]=C#-stöd +Comment[zh_TW]=C# 支援 +Name=KDevCSharpSupport +Name[de]=Unterstützung für CSharp (TDevelop) +Name[nds]=CSharp-Ünnerstütten för TDevelop +Name[sv]=TDevelop C#-stöd +Name[zh_TW]=TDevelop C# 支援 +GenericName=CSharp Support +GenericName[ca]=Suport per a CSharp +GenericName[da]=CSharp understøttelse +GenericName[de]=Unterstützung für CSharp +GenericName[el]=Υποστήριξη CSharp +GenericName[es]=Soporte para CSharp +GenericName[et]=CSharp'i toetus +GenericName[fr]=Prise en charge du langage CSharp +GenericName[hu]=CSharp-támogatás +GenericName[it]=Supporto CSharp +GenericName[ja]=CSharp サポート +GenericName[nds]=Ünnerstütten för CSharp +GenericName[nl]=Ondersteuning voor CSharp +GenericName[pl]=Obsługa CSharp +GenericName[pt]=Suporte a C# +GenericName[pt_BR]=Suporte a C# +GenericName[ru]=Поддержка CSharp +GenericName[sk]=CSharp podpora +GenericName[sr]=Подршка за CSharp +GenericName[sr@Latn]=Podrška za CSharp +GenericName[sv]=C#-stöd +GenericName[zh_TW]=C# 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevcsharpsupport +X-TDevelop-Version=5 +X-TDevelop-Language=CSharp + diff --git a/languages/csharp/kdevcsharpsupport.rc b/languages/csharp/kdevcsharpsupport.rc new file mode 100644 index 00000000..b5f735e2 --- /dev/null +++ b/languages/csharp/kdevcsharpsupport.rc @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/languages/csharp/tdevcsharpsupport.desktop b/languages/csharp/tdevcsharpsupport.desktop deleted file mode 100644 index c072003e..00000000 --- a/languages/csharp/tdevcsharpsupport.desktop +++ /dev/null @@ -1,57 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=CSharp Support -Comment[ca]=Suport per a CSharp -Comment[da]=Csharp understøttelse -Comment[de]=CSharp-Unterstützung für TDevelop -Comment[el]=Υποστήριξη CSharp -Comment[es]=Soporte para CSharp -Comment[et]=CSharp'i toetus -Comment[fr]=Prise en charge du langage CSharp -Comment[hu]=CSharp-támogatás -Comment[it]=Supporto per CSharp -Comment[ja]=CSharp サポート -Comment[nds]=Ünnerstütten för CSharp -Comment[nl]=Ondersteuning voor CSharp -Comment[pl]=Obsługa CSharp -Comment[pt]=Suporte a C# -Comment[pt_BR]=Suporte a C# -Comment[ru]=Поддержка CSharp -Comment[sk]=CSharp podpora -Comment[sr]=Подршка за CSharp -Comment[sr@Latn]=Podrška za CSharp -Comment[sv]=C#-stöd -Comment[zh_TW]=C# 支援 -Name=KDevCSharpSupport -Name[de]=Unterstützung für CSharp (TDevelop) -Name[nds]=CSharp-Ünnerstütten för TDevelop -Name[sv]=TDevelop C#-stöd -Name[zh_TW]=TDevelop C# 支援 -GenericName=CSharp Support -GenericName[ca]=Suport per a CSharp -GenericName[da]=CSharp understøttelse -GenericName[de]=Unterstützung für CSharp -GenericName[el]=Υποστήριξη CSharp -GenericName[es]=Soporte para CSharp -GenericName[et]=CSharp'i toetus -GenericName[fr]=Prise en charge du langage CSharp -GenericName[hu]=CSharp-támogatás -GenericName[it]=Supporto CSharp -GenericName[ja]=CSharp サポート -GenericName[nds]=Ünnerstütten för CSharp -GenericName[nl]=Ondersteuning voor CSharp -GenericName[pl]=Obsługa CSharp -GenericName[pt]=Suporte a C# -GenericName[pt_BR]=Suporte a C# -GenericName[ru]=Поддержка CSharp -GenericName[sk]=CSharp podpora -GenericName[sr]=Подршка за CSharp -GenericName[sr@Latn]=Podrška za CSharp -GenericName[sv]=C#-stöd -GenericName[zh_TW]=C# 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevcsharpsupport -X-TDevelop-Version=5 -X-TDevelop-Language=CSharp - diff --git a/languages/csharp/tdevcsharpsupport.rc b/languages/csharp/tdevcsharpsupport.rc deleted file mode 100644 index b5f735e2..00000000 --- a/languages/csharp/tdevcsharpsupport.rc +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/languages/fortran/CMakeLists.txt b/languages/fortran/CMakeLists.txt index 8829a5b3..507795aa 100644 --- a/languages/fortran/CMakeLists.txt +++ b/languages/fortran/CMakeLists.txt @@ -31,13 +31,13 @@ link_directories( ##### other data ################################ -install( FILES tdevfortransupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevfortransupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevfortransupport ) +install( FILES kdevfortransupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevfortransupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevfortransupport ) -##### libtdevfortransupport (module) ############ +##### libkdevfortransupport (module) ############ -tde_add_kpart( libtdevfortransupport AUTOMOC +tde_add_kpart( libkdevfortransupport AUTOMOC SOURCES fortransupportpart.cpp fixedformparser.cpp ftnchekconfigwidget.cpp ftnchekconfigwidgetbase.ui diff --git a/languages/fortran/Makefile.am b/languages/fortran/Makefile.am index e6568364..73f4582c 100644 --- a/languages/fortran/Makefile.am +++ b/languages/fortran/Makefile.am @@ -5,16 +5,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ $(all_includes) SUBDIRS = file_templates app_templates compiler doc -kde_module_LTLIBRARIES = libtdevfortransupport.la -libtdevfortransupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfortransupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfortransupport.la +libkdevfortransupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfortransupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfortransupport_la_SOURCES = fortransupportpart.cpp fixedformparser.cpp ftnchekconfigwidget.cpp ftnchekconfigwidgetbase.ui +libkdevfortransupport_la_SOURCES = fortransupportpart.cpp fixedformparser.cpp ftnchekconfigwidget.cpp ftnchekconfigwidgetbase.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfortransupport.desktop +service_DATA = kdevfortransupport.desktop -rcdir = $(kde_datadir)/tdevfortransupport -rc_DATA = tdevfortransupport.rc +rcdir = $(kde_datadir)/kdevfortransupport +rc_DATA = kdevfortransupport.rc diff --git a/languages/fortran/app_templates/fortranhello/CMakeLists.txt b/languages/fortran/app_templates/fortranhello/CMakeLists.txt index 86254144..74709631 100644 --- a/languages/fortran/app_templates/fortranhello/CMakeLists.txt +++ b/languages/fortran/app_templates/fortranhello/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( fortranhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/fortranhello.tar.gz fortranhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - fortranhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + fortranhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/fortran/app_templates/fortranhello/Makefile.am b/languages/fortran/app_templates/fortranhello/Makefile.am index 15da4c3f..3bf32575 100644 --- a/languages/fortran/app_templates/fortranhello/Makefile.am +++ b/languages/fortran/app_templates/fortranhello/Makefile.am @@ -3,10 +3,10 @@ dataFiles = main.f src-Makefile.am fortran-Makefile.am fortran-Makefile.cvs \ templateName = fortranhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/fortran/app_templates/fortranhello/app.tdevelop b/languages/fortran/app_templates/fortranhello/app.tdevelop index 238351ec..f97fd76a 100644 --- a/languages/fortran/app_templates/fortranhello/app.tdevelop +++ b/languages/fortran/app_templates/fortranhello/app.tdevelop @@ -14,7 +14,7 @@ KDevCTags - + src/%{APPNAMELC} @@ -26,16 +26,16 @@ - - + + - - + + false false @@ -54,8 +54,8 @@ - - + + ada ada_bugs_gcc @@ -103,11 +103,11 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/fortran/app_templates/fortranhello/fortranhello.kdevtemplate b/languages/fortran/app_templates/fortranhello/fortranhello.kdevtemplate new file mode 100644 index 00000000..e4c5cb33 --- /dev/null +++ b/languages/fortran/app_templates/fortranhello/fortranhello.kdevtemplate @@ -0,0 +1,140 @@ +# KDE Config File +[General] +Name=Simple Hello world program +Name[ca]=Simple programa Hello world +Name[da]=Simpelt Goddag verden program +Name[de]=Ein einfaches "Hello World"-Programm +Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» sencillo +Name[et]=Lihtne "Tere, maailm" programm +Name[eu]="Kaixo mundua" programa sinplea +Name[fa]=برنامۀ سادۀ Hello world +Name[fr]=Programme « Bonjour monde » simple +Name[ga]=Ríomhchlár simplí "Hello World" +Name[gl]=Programa sinxelo Ola mundo +Name[hu]=Egyszerű Hello world program +Name[it]=Semplice programma di "Hello world" +Name[ja]=簡単な Hello world プログラム +Name[ms]=Program Hello World mudah +Name[nds]=En eenfach "Moin Welt"-Programm +Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम +Name[nl]=Eenvoudig 'Hello World' programma +Name[pl]=Prosty program witaj świecie +Name[pt]=Programa simples Olá Mundo +Name[pt_BR]=Programa simples Olá Mundo +Name[ru]=Простая программа Hello world +Name[sk]=Jednoduchý "Ahoj svet" program +Name[sl]=Preprost program Hello world +Name[sr]=Једноставан „Здраво свете“ програм +Name[sr@Latn]=Jednostavan „Zdravo svete“ program +Name[sv]=Enkelt Hello world-program +Name[tr]=Basit Merhaba dünya programı +Name[zh_CN]=简单的 Hello world 程序 +Name[zh_TW]=簡單的 Hello world 程式 +Icon=fortranhello.png +Category=Fortran +Comment=Generates a simple Hello world program in Fortran +Comment[ca]=Genera un simple programa de Hello world en Fortran +Comment[da]=Genererer et simpelt Goddag verden program i Fortran +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Fortran +Comment[el]=Δημιουργία ενός απλού προγράμματος Γεια σου σε Fortran +Comment[es]=Genera un sencillo programa «Hola mundo» en Fortran +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Fortranis +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Fortran lengoaian +Comment[fa]=یک برنامۀ سادۀ Hello world در فرترن تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Fortran +Comment[gl]=Xera un programa sinxelo Ola mundo en Fortran +Comment[hu]=Létrehoz egy egyszerű Hello world programot Fortran nyelven +Comment[it]=Genera un semplice programma di "Hello world" in Fortran +Comment[ja]=簡単な Hello world プログラムを Fortran で作成します +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in Fortran op +Comment[ne]=फोर्ट्रानमा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig Hello World-programma in Fortran +Comment[pl]=Generuje prosty program Witaj świecie w Fortranie +Comment[pt]=Gera um programa simples Olá Mundo em Fortran +Comment[pt_BR]=Gera um programa simples Olá Mundo em Fortran +Comment[ru]=Создание простой программы Hello world на Fortran +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program vo Fortran +Comment[sr]=Прави једноставан „Здраво свете“ у Fortran-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Fortran-u +Comment[sv]=Skapar ett enkelt Hello world-program i Fortran +Comment[tr]=Fortran'da basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成一个简单的 Fortran 语言 Hello world 程序 +Comment[zh_TW]=產生一個簡單的 Fortran Hello world 程式 +FileTemplates=f,None +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.f +Archive=fortranhello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/fortran-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/fortran-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/main.f +Dest=%{dest}/src/%{APPNAMELC}.f + +[MSG] +Type=message +Comment=a simple "Hello world" program in fortran was created in %{dest} +Comment[ca]=Un simple programa de "Hello world" en fortran ha estat creat en %{dest} +Comment[da]=et simpelt "Goddag verden" program i fortran blev oprettet i %{dest} +Comment[de]=Ein einfaches "Hello World"-Programm in Fortran wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα "Γεια σου κόσμε" σε fortran δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa «Hola mundo» en Fortran ha sido creado en %{dest} +Comment[et]=Lihtne "Tere, maailm" programm Fortranis loodi asukohta %{dest} +Comment[eu]="Kaixo mundua" programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ «Hello world» در فرترن در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » simple en Fortran a été créé dans %{dest} +Comment[gl]=Creouse un programa sinxelo "Ola mundo" en fortran en %{dest} +Comment[hu]=Létrejött egy egyszerű, Fortran nyelvű Hello world program itt: %{dest} +Comment[it]=È stato creato un semplice programma di "Hello world" in Fortran in %{dest} +Comment[ja]=Fortran で記述された簡単な Hello world プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Fortran opstellt +Comment[ne]=फोर्ट्रानमा साधारण "हेल्लो वोल्ड" कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=een eenvoudig "Hello World"-programma in Fortran is aangemaakt in %{dest} +Comment[pl]=Prosty program "Witaj świecie" w Fortranie został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples "Olá mundo" em Fortran em %{dest} +Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em Fortran em %{dest} +Comment[ru]=Простая программа "Hello world" на Fortran создана в %{dest} +Comment[sk]=Jednoduchý "Ahoj svet" program vo Fortran bol vytvorený v %{dest} +Comment[sr]=Једноставан „Здраво свете“ у Fortran-у направљен је у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo svete“ u Fortran-u napravljen je u %{dest} +Comment[sv]=Ett enkelt "Hello world"-program i Fortran skapades i %{dest} +Comment[tr]=Fortran'da basit bir "Merhaba Dünya" programı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简单的 Fortran 语言“Hello world”程序 +Comment[zh_TW]=一個 fortran 的簡單的 "Hello world" 程式已建立於 %{dest} diff --git a/languages/fortran/app_templates/fortranhello/fortranhello.tdevtemplate b/languages/fortran/app_templates/fortranhello/fortranhello.tdevtemplate deleted file mode 100644 index d25570f7..00000000 --- a/languages/fortran/app_templates/fortranhello/fortranhello.tdevtemplate +++ /dev/null @@ -1,140 +0,0 @@ -# KDE Config File -[General] -Name=Simple Hello world program -Name[ca]=Simple programa Hello world -Name[da]=Simpelt Goddag verden program -Name[de]=Ein einfaches "Hello World"-Programm -Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» sencillo -Name[et]=Lihtne "Tere, maailm" programm -Name[eu]="Kaixo mundua" programa sinplea -Name[fa]=برنامۀ سادۀ Hello world -Name[fr]=Programme « Bonjour monde » simple -Name[ga]=Ríomhchlár simplí "Hello World" -Name[gl]=Programa sinxelo Ola mundo -Name[hu]=Egyszerű Hello world program -Name[it]=Semplice programma di "Hello world" -Name[ja]=簡単な Hello world プログラム -Name[ms]=Program Hello World mudah -Name[nds]=En eenfach "Moin Welt"-Programm -Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम -Name[nl]=Eenvoudig 'Hello World' programma -Name[pl]=Prosty program witaj świecie -Name[pt]=Programa simples Olá Mundo -Name[pt_BR]=Programa simples Olá Mundo -Name[ru]=Простая программа Hello world -Name[sk]=Jednoduchý "Ahoj svet" program -Name[sl]=Preprost program Hello world -Name[sr]=Једноставан „Здраво свете“ програм -Name[sr@Latn]=Jednostavan „Zdravo svete“ program -Name[sv]=Enkelt Hello world-program -Name[tr]=Basit Merhaba dünya programı -Name[zh_CN]=简单的 Hello world 程序 -Name[zh_TW]=簡單的 Hello world 程式 -Icon=fortranhello.png -Category=Fortran -Comment=Generates a simple Hello world program in Fortran -Comment[ca]=Genera un simple programa de Hello world en Fortran -Comment[da]=Genererer et simpelt Goddag verden program i Fortran -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Fortran -Comment[el]=Δημιουργία ενός απλού προγράμματος Γεια σου σε Fortran -Comment[es]=Genera un sencillo programa «Hola mundo» en Fortran -Comment[et]=Lihtsa "Tere, maailm" programmi loomine Fortranis -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Fortran lengoaian -Comment[fa]=یک برنامۀ سادۀ Hello world در فرترن تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en Fortran -Comment[gl]=Xera un programa sinxelo Ola mundo en Fortran -Comment[hu]=Létrehoz egy egyszerű Hello world programot Fortran nyelven -Comment[it]=Genera un semplice programma di "Hello world" in Fortran -Comment[ja]=簡単な Hello world プログラムを Fortran で作成します -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in Fortran op -Comment[ne]=फोर्ट्रानमा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig Hello World-programma in Fortran -Comment[pl]=Generuje prosty program Witaj świecie w Fortranie -Comment[pt]=Gera um programa simples Olá Mundo em Fortran -Comment[pt_BR]=Gera um programa simples Olá Mundo em Fortran -Comment[ru]=Создание простой программы Hello world на Fortran -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program vo Fortran -Comment[sr]=Прави једноставан „Здраво свете“ у Fortran-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Fortran-u -Comment[sv]=Skapar ett enkelt Hello world-program i Fortran -Comment[tr]=Fortran'da basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成一个简单的 Fortran 语言 Hello world 程序 -Comment[zh_TW]=產生一個簡單的 Fortran Hello world 程式 -FileTemplates=f,None -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.f -Archive=fortranhello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/fortran-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/fortran-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/main.f -Dest=%{dest}/src/%{APPNAMELC}.f - -[MSG] -Type=message -Comment=a simple "Hello world" program in fortran was created in %{dest} -Comment[ca]=Un simple programa de "Hello world" en fortran ha estat creat en %{dest} -Comment[da]=et simpelt "Goddag verden" program i fortran blev oprettet i %{dest} -Comment[de]=Ein einfaches "Hello World"-Programm in Fortran wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα "Γεια σου κόσμε" σε fortran δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa «Hola mundo» en Fortran ha sido creado en %{dest} -Comment[et]=Lihtne "Tere, maailm" programm Fortranis loodi asukohta %{dest} -Comment[eu]="Kaixo mundua" programa sinple bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ «Hello world» در فرترن در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » simple en Fortran a été créé dans %{dest} -Comment[gl]=Creouse un programa sinxelo "Ola mundo" en fortran en %{dest} -Comment[hu]=Létrejött egy egyszerű, Fortran nyelvű Hello world program itt: %{dest} -Comment[it]=È stato creato un semplice programma di "Hello world" in Fortran in %{dest} -Comment[ja]=Fortran で記述された簡単な Hello world プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Fortran opstellt -Comment[ne]=फोर्ट्रानमा साधारण "हेल्लो वोल्ड" कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=een eenvoudig "Hello World"-programma in Fortran is aangemaakt in %{dest} -Comment[pl]=Prosty program "Witaj świecie" w Fortranie został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples "Olá mundo" em Fortran em %{dest} -Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em Fortran em %{dest} -Comment[ru]=Простая программа "Hello world" на Fortran создана в %{dest} -Comment[sk]=Jednoduchý "Ahoj svet" program vo Fortran bol vytvorený v %{dest} -Comment[sr]=Једноставан „Здраво свете“ у Fortran-у направљен је у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo svete“ u Fortran-u napravljen je u %{dest} -Comment[sv]=Ett enkelt "Hello world"-program i Fortran skapades i %{dest} -Comment[tr]=Fortran'da basit bir "Merhaba Dünya" programı %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个简单的 Fortran 语言“Hello world”程序 -Comment[zh_TW]=一個 fortran 的簡單的 "Hello world" 程式已建立於 %{dest} diff --git a/languages/fortran/compiler/Makefile.am b/languages/fortran/compiler/Makefile.am index 183131cb..3489a85c 100644 --- a/languages/fortran/compiler/Makefile.am +++ b/languages/fortran/compiler/Makefile.am @@ -1,6 +1,6 @@ # This is the collection of plugins. In contrast to the parts # directory, these are 'transient' in a sense and don't -# share the complete TDevComponent interface. +# share the complete KDevComponent interface. SUBDIRS = pgioptions diff --git a/languages/fortran/compiler/pgioptions/CMakeLists.txt b/languages/fortran/compiler/pgioptions/CMakeLists.txt index 82d0d0a2..2111f2ad 100644 --- a/languages/fortran/compiler/pgioptions/CMakeLists.txt +++ b/languages/fortran/compiler/pgioptions/CMakeLists.txt @@ -25,15 +25,15 @@ link_directories( ##### other data ################################ install( FILES - tdevpghpfoptions.desktop tdevpgf77options.desktop + kdevpghpfoptions.desktop kdevpgf77options.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevpgioptions (module) ################ +##### libkdevpgioptions (module) ################ -tde_add_kpart( libtdevpgioptions AUTOMOC +tde_add_kpart( libkdevpgioptions AUTOMOC SOURCES pgioptionsfactory.cpp pgioptionsplugin.cpp - LINK tdevextras-shared tdeui-shared + LINK kdevextras-shared tdeui-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/fortran/compiler/pgioptions/Makefile.am b/languages/fortran/compiler/pgioptions/Makefile.am index c26068e2..893b7950 100644 --- a/languages/fortran/compiler/pgioptions/Makefile.am +++ b/languages/fortran/compiler/pgioptions/Makefile.am @@ -4,15 +4,15 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extras \ $(all_includes) -kde_module_LTLIBRARIES = libtdevpgioptions.la -libtdevpgioptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -libtdevpgioptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la +kde_module_LTLIBRARIES = libkdevpgioptions.la +libkdevpgioptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevpgioptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la -libtdevpgioptions_la_SOURCES = pgioptionsfactory.cpp pgioptionsplugin.cpp +libkdevpgioptions_la_SOURCES = pgioptionsfactory.cpp pgioptionsplugin.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevpghpfoptions.desktop tdevpgf77options.desktop +service_DATA = kdevpghpfoptions.desktop kdevpgf77options.desktop diff --git a/languages/fortran/compiler/pgioptions/kdevpgf77options.desktop b/languages/fortran/compiler/pgioptions/kdevpgf77options.desktop new file mode 100644 index 00000000..6d2007ea --- /dev/null +++ b/languages/fortran/compiler/pgioptions/kdevpgf77options.desktop @@ -0,0 +1,53 @@ +[Desktop Entry] +Type=Service +Exec=pgf77 +Comment=Portland Group Fortran77 Compiler +Comment[br]=Dastumer Fortran 77 ar strollad Portland +Comment[ca]=Compilador Fortran 77 de Portland Group +Comment[da]=Portland Group Fortran77 oversætter +Comment[el]=Μεταγλωττιστής Fortran77 ομάδας Portland +Comment[es]=Compilador de Fortran 77 de Portland Group +Comment[et]=Portland Group Fortran77 kompilaator +Comment[eu]=Portland Group Fortran77 konpiladorea +Comment[fa]=مترجم فرترن ۷۷ گروه Portland +Comment[fr]=Compilateur Fortran77 du Portland Group +Comment[gl]=Compilador de Fortran77 de Portland Group +Comment[hi]=पोर्टलैंड समूह फ़ोरट्रॉन77 कम्पायलर +Comment[hu]=Portland Group Fortran 77 fordítóprogram +Comment[is]=Portland Group Fortran77 þýðandi +Comment[it]=Compilatore per Portland Group Fortran77 +Comment[ja]=Portland グループ Fortran77 コンパイラ +Comment[nds]=Portland Group-Fortran77-Kompilerer +Comment[ne]=पोर्टल्यान्ड समूह फोर्ट्रान ७७ कम्पाइलर +Comment[nl]=Portland Group Fortran77-compiler +Comment[pl]=Kompilator Portland Group Fortran77 +Comment[pt]=Compilador de Fortran77 do Portland Group +Comment[pt_BR]=Compilador Portland Group Fortran77 +Comment[ru]=Компилятор Portland Group Fortran77 +Comment[sk]=Portland Group Fortran77 kompilátor +Comment[sl]=Prevajalnik za Portland Group Fortran77 +Comment[sr]=Преводилац Fortran-а 77 од Portland Group-а +Comment[sr@Latn]=Prevodilac Fortran-a 77 od Portland Group-a +Comment[sv]=Portland gruppens Fortran 77-kompilator +Comment[ta]=பொர்ட்லான்ட் குழு பொர்ட்ரான் 77 தொகுப்பி +Comment[tg]=Талфифгари Portland Group Fortran77 +Comment[tr]=Portland Grubu Fortran 77 Derleyicisi +Comment[zh_CN]=Portland Group Fortran77 编译器 +Comment[zh_TW]=Portland Group Fortran 77 編譯器 +Name=Pgf77Options +Name[da]=Portland Group Fortran77 indstillinger +Name[de]=Pgf77-Einstellungen (TDevelop) +Name[hi]=पीजीएफ़77विकल्प +Name[nds]=Pgf77-Instellen (TDevelop) +Name[pl]=Opcje Pgf77 +Name[sk]=Pgf77 možnosti +Name[sl]=Možnosti Pgf77 +Name[sv]=Alternativ för pgf77 +Name[ta]=Pgf77 விருப்பங்கள் +Name[tg]=Pgf77Интихобҳо +Name[zh_TW]=Pgf77 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevpgioptions +X-TDevelop-Version=5 +X-TDevelop-Language=Fortran +X-TDevelop-Args=pgf77 diff --git a/languages/fortran/compiler/pgioptions/kdevpghpfoptions.desktop b/languages/fortran/compiler/pgioptions/kdevpghpfoptions.desktop new file mode 100644 index 00000000..f3793949 --- /dev/null +++ b/languages/fortran/compiler/pgioptions/kdevpghpfoptions.desktop @@ -0,0 +1,50 @@ +[Desktop Entry] +Type=Service +Exec=pghpf +Comment=Portland Group High Performance Fortran compiler +Comment[ca]=Compilador Fortran d'altes prestacions de Portland Group +Comment[da]=Portland Group Fortran oversætter +Comment[de]=Portland Group High Performance Fortran Compiler +Comment[el]=Μεταγλωττιστής υψηλής ταχύτητας Fortran της ομάδας Portland +Comment[es]=Compilador de Fortran de alto rendimiento de Portland Group +Comment[et]=Portland Groupi suure jõudlusega Fortrani kompilaator +Comment[eu]=Portland Group-en errendimendu handiko Fortran konpiladorea +Comment[fa]=مترجم فرترن با کارایی بالای گروه Portland +Comment[fr]=Compilateur Fortran hautes performances du Portland Group +Comment[gl]=Compilador de High Performance Fortran de Portland Group +Comment[hi]=पोर्टलैंड समूह उच्च परफ़ार्मेंस फ़ोरट्रॉन कम्पायलर +Comment[hu]=Portland Group nagyteljesítményű Fortran fordítóprogram +Comment[it]=Compilatore ad alte prestazioni per Fortran del Portland Group +Comment[ja]=Portland グループ ハイパフォーマンス Fortran コンパイラ +Comment[nds]=Portland Group-Hoochleistenkompilerer för Fortran +Comment[ne]=पोर्टल्यान्ड समूह उच्च कार्यसम्पादन फोर्ट्रान कम्पाइलर +Comment[nl]=Portland Group High Performance Fortran-compiler +Comment[pl]=Kompilator Portland Group High Performance Fortran +Comment[pt]=Compilador Portland Group High Performance Fortran +Comment[pt_BR]=Compilador Portland Group Alta Performance +Comment[ru]=Компилятор Portland Group High Performance Fortran +Comment[sk]=Portland Group vysoko výkonný Fortran kompilátor +Comment[sr]=Преводилац Fortran-а високих перформанси, из Portland Group-а +Comment[sr@Latn]=Prevodilac Fortran-a visokih performansi, iz Portland Group-a +Comment[sv]=Portland gruppens högprestanda Fortran 77-kompilator +Comment[ta]=பொர்ட்லான்ட் குழு உயர் செயல்பாடு பொர்ட்ரான் தொகுப்பி +Comment[tg]=Талфифгари Portland Group High Performance Fortran +Comment[tr]=Portland Grubu Yüksek Başarımlı Fortran Derleyicisi +Comment[zh_CN]=Portland Group 高性能 Fortran 编译器 +Comment[zh_TW]=Portland Group 高效能 Fortran 編譯器 +Name=PghpfOptions +Name[da]=Portland Group oversætter-indstillinger +Name[de]=Pghpf-Einstellungen (TDevelop) +Name[hi]=पीजीएचपीएफ़-विकल्प +Name[nds]=Pghpf-Optschonen +Name[pl]=Opcje Pghpf +Name[sk]=Pghpf možnosti +Name[sv]=Alternativ för pghpf +Name[ta]=Pghpf விருப்பங்கள் +Name[tg]=PghpfИнтихобҳо +Name[zh_TW]=Pghpf 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevpgioptions +X-TDevelop-Version=5 +X-TDevelop-Language=Fortran +X-TDevelop-Args=pghpf diff --git a/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp b/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp index 474263f0..6e019589 100644 --- a/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp +++ b/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp @@ -17,7 +17,7 @@ extern "C" { - void *init_libtdevpgioptions() + void *init_libkdevpgioptions() { return new PgiOptionsFactory; } @@ -61,7 +61,7 @@ TDEInstance *PgiOptionsFactory::s_instance = 0; TDEInstance *PgiOptionsFactory::instance() { if (!s_instance) - s_instance = new TDEInstance("tdevpgioptions"); + s_instance = new TDEInstance("kdevpgioptions"); return s_instance; } diff --git a/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp b/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp index 50d907b5..29301c36 100644 --- a/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp +++ b/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp @@ -300,7 +300,7 @@ TQString PgiOptionsDialog::flags() const PgiOptionsPlugin::PgiOptionsPlugin(Type type, TQObject *parent, const char *name) - : TDevCompilerOptions(parent, name) + : KDevCompilerOptions(parent, name) { pgitype = type; } diff --git a/languages/fortran/compiler/pgioptions/pgioptionsplugin.h b/languages/fortran/compiler/pgioptions/pgioptionsplugin.h index daa8c99b..d5d80892 100644 --- a/languages/fortran/compiler/pgioptions/pgioptionsplugin.h +++ b/languages/fortran/compiler/pgioptions/pgioptionsplugin.h @@ -14,14 +14,14 @@ #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" class GeneralTab; class OptimizationTab; class HpfTab; -class PgiOptionsPlugin : public TDevCompilerOptions +class PgiOptionsPlugin : public KDevCompilerOptions { Q_OBJECT diff --git a/languages/fortran/compiler/pgioptions/tdevpgf77options.desktop b/languages/fortran/compiler/pgioptions/tdevpgf77options.desktop deleted file mode 100644 index 12dadcff..00000000 --- a/languages/fortran/compiler/pgioptions/tdevpgf77options.desktop +++ /dev/null @@ -1,53 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=pgf77 -Comment=Portland Group Fortran77 Compiler -Comment[br]=Dastumer Fortran 77 ar strollad Portland -Comment[ca]=Compilador Fortran 77 de Portland Group -Comment[da]=Portland Group Fortran77 oversætter -Comment[el]=Μεταγλωττιστής Fortran77 ομάδας Portland -Comment[es]=Compilador de Fortran 77 de Portland Group -Comment[et]=Portland Group Fortran77 kompilaator -Comment[eu]=Portland Group Fortran77 konpiladorea -Comment[fa]=مترجم فرترن ۷۷ گروه Portland -Comment[fr]=Compilateur Fortran77 du Portland Group -Comment[gl]=Compilador de Fortran77 de Portland Group -Comment[hi]=पोर्टलैंड समूह फ़ोरट्रॉन77 कम्पायलर -Comment[hu]=Portland Group Fortran 77 fordítóprogram -Comment[is]=Portland Group Fortran77 þýðandi -Comment[it]=Compilatore per Portland Group Fortran77 -Comment[ja]=Portland グループ Fortran77 コンパイラ -Comment[nds]=Portland Group-Fortran77-Kompilerer -Comment[ne]=पोर्टल्यान्ड समूह फोर्ट्रान ७७ कम्पाइलर -Comment[nl]=Portland Group Fortran77-compiler -Comment[pl]=Kompilator Portland Group Fortran77 -Comment[pt]=Compilador de Fortran77 do Portland Group -Comment[pt_BR]=Compilador Portland Group Fortran77 -Comment[ru]=Компилятор Portland Group Fortran77 -Comment[sk]=Portland Group Fortran77 kompilátor -Comment[sl]=Prevajalnik za Portland Group Fortran77 -Comment[sr]=Преводилац Fortran-а 77 од Portland Group-а -Comment[sr@Latn]=Prevodilac Fortran-a 77 od Portland Group-a -Comment[sv]=Portland gruppens Fortran 77-kompilator -Comment[ta]=பொர்ட்லான்ட் குழு பொர்ட்ரான் 77 தொகுப்பி -Comment[tg]=Талфифгари Portland Group Fortran77 -Comment[tr]=Portland Grubu Fortran 77 Derleyicisi -Comment[zh_CN]=Portland Group Fortran77 编译器 -Comment[zh_TW]=Portland Group Fortran 77 編譯器 -Name=Pgf77Options -Name[da]=Portland Group Fortran77 indstillinger -Name[de]=Pgf77-Einstellungen (TDevelop) -Name[hi]=पीजीएफ़77विकल्प -Name[nds]=Pgf77-Instellen (TDevelop) -Name[pl]=Opcje Pgf77 -Name[sk]=Pgf77 možnosti -Name[sl]=Možnosti Pgf77 -Name[sv]=Alternativ för pgf77 -Name[ta]=Pgf77 விருப்பங்கள் -Name[tg]=Pgf77Интихобҳо -Name[zh_TW]=Pgf77 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevpgioptions -X-TDevelop-Version=5 -X-TDevelop-Language=Fortran -X-TDevelop-Args=pgf77 diff --git a/languages/fortran/compiler/pgioptions/tdevpghpfoptions.desktop b/languages/fortran/compiler/pgioptions/tdevpghpfoptions.desktop deleted file mode 100644 index 7fe27fe8..00000000 --- a/languages/fortran/compiler/pgioptions/tdevpghpfoptions.desktop +++ /dev/null @@ -1,50 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=pghpf -Comment=Portland Group High Performance Fortran compiler -Comment[ca]=Compilador Fortran d'altes prestacions de Portland Group -Comment[da]=Portland Group Fortran oversætter -Comment[de]=Portland Group High Performance Fortran Compiler -Comment[el]=Μεταγλωττιστής υψηλής ταχύτητας Fortran της ομάδας Portland -Comment[es]=Compilador de Fortran de alto rendimiento de Portland Group -Comment[et]=Portland Groupi suure jõudlusega Fortrani kompilaator -Comment[eu]=Portland Group-en errendimendu handiko Fortran konpiladorea -Comment[fa]=مترجم فرترن با کارایی بالای گروه Portland -Comment[fr]=Compilateur Fortran hautes performances du Portland Group -Comment[gl]=Compilador de High Performance Fortran de Portland Group -Comment[hi]=पोर्टलैंड समूह उच्च परफ़ार्मेंस फ़ोरट्रॉन कम्पायलर -Comment[hu]=Portland Group nagyteljesítményű Fortran fordítóprogram -Comment[it]=Compilatore ad alte prestazioni per Fortran del Portland Group -Comment[ja]=Portland グループ ハイパフォーマンス Fortran コンパイラ -Comment[nds]=Portland Group-Hoochleistenkompilerer för Fortran -Comment[ne]=पोर्टल्यान्ड समूह उच्च कार्यसम्पादन फोर्ट्रान कम्पाइलर -Comment[nl]=Portland Group High Performance Fortran-compiler -Comment[pl]=Kompilator Portland Group High Performance Fortran -Comment[pt]=Compilador Portland Group High Performance Fortran -Comment[pt_BR]=Compilador Portland Group Alta Performance -Comment[ru]=Компилятор Portland Group High Performance Fortran -Comment[sk]=Portland Group vysoko výkonný Fortran kompilátor -Comment[sr]=Преводилац Fortran-а високих перформанси, из Portland Group-а -Comment[sr@Latn]=Prevodilac Fortran-a visokih performansi, iz Portland Group-a -Comment[sv]=Portland gruppens högprestanda Fortran 77-kompilator -Comment[ta]=பொர்ட்லான்ட் குழு உயர் செயல்பாடு பொர்ட்ரான் தொகுப்பி -Comment[tg]=Талфифгари Portland Group High Performance Fortran -Comment[tr]=Portland Grubu Yüksek Başarımlı Fortran Derleyicisi -Comment[zh_CN]=Portland Group 高性能 Fortran 编译器 -Comment[zh_TW]=Portland Group 高效能 Fortran 編譯器 -Name=PghpfOptions -Name[da]=Portland Group oversætter-indstillinger -Name[de]=Pghpf-Einstellungen (TDevelop) -Name[hi]=पीजीएचपीएफ़-विकल्प -Name[nds]=Pghpf-Optschonen -Name[pl]=Opcje Pghpf -Name[sk]=Pghpf možnosti -Name[sv]=Alternativ för pghpf -Name[ta]=Pghpf விருப்பங்கள் -Name[tg]=PghpfИнтихобҳо -Name[zh_TW]=Pghpf 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevpgioptions -X-TDevelop-Version=5 -X-TDevelop-Language=Fortran -X-TDevelop-Args=pghpf diff --git a/languages/fortran/doc/CMakeLists.txt b/languages/fortran/doc/CMakeLists.txt index 423f4cbd..50e2ab71 100644 --- a/languages/fortran/doc/CMakeLists.txt +++ b/languages/fortran/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES fortran_bugs_gcc.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/fortran/doc/Makefile.am b/languages/fortran/doc/Makefile.am index b7f9a188..5e7eab51 100644 --- a/languages/fortran/doc/Makefile.am +++ b/languages/fortran/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = fortran_bugs_gcc.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/fortran/file_templates/CMakeLists.txt b/languages/fortran/file_templates/CMakeLists.txt index b031bbdc..3b5ef22e 100644 --- a/languages/fortran/file_templates/CMakeLists.txt +++ b/languages/fortran/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES f f77 f90 f95 for fpp ftn - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/fortran/file_templates/Makefile.am b/languages/fortran/file_templates/Makefile.am index d935b552..2a8e4365 100644 --- a/languages/fortran/file_templates/Makefile.am +++ b/languages/fortran/file_templates/Makefile.am @@ -1,2 +1,2 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = f f77 f90 f95 for fpp ftn diff --git a/languages/fortran/fortransupportpart.cpp b/languages/fortran/fortransupportpart.cpp index c23a35f3..4f749ed3 100644 --- a/languages/fortran/fortransupportpart.cpp +++ b/languages/fortran/fortransupportpart.cpp @@ -31,29 +31,29 @@ #include #include #include -#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include +#include -typedef TDevGenericFactory FortranSupportFactory; -static const TDevPluginInfo data("tdevfortransupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevfortransupport, FortranSupportFactory( data ) ) +typedef KDevGenericFactory FortranSupportFactory; +static const KDevPluginInfo data("kdevfortransupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevfortransupport, FortranSupportFactory( data ) ) FortranSupportPart::FortranSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "FortranSupportPart") + : KDevLanguageSupport(&data, parent, name ? name : "FortranSupportPart") { setInstance(FortranSupportFactory::instance()); - setXMLFile("tdevfortransupport.rc"); + setXMLFile("kdevfortransupport.rc"); connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); @@ -274,14 +274,14 @@ void FortranSupportPart::savedFile(const KURL &fileName) } -TDevLanguageSupport::Features FortranSupportPart::features() +KDevLanguageSupport::Features FortranSupportPart::features() { return Features(Functions); } -TDevMakeFrontend * FortranSupportPart::makeFrontend( ) +KDevMakeFrontend * FortranSupportPart::makeFrontend( ) { - return extension("TDevelop/MakeFrontend"); + return extension("TDevelop/MakeFrontend"); } #include "fortransupportpart.moc" diff --git a/languages/fortran/fortransupportpart.h b/languages/fortran/fortransupportpart.h index fe48e364..7ed0f122 100644 --- a/languages/fortran/fortransupportpart.h +++ b/languages/fortran/fortransupportpart.h @@ -15,12 +15,12 @@ class FixedFormParser; class KDialogBase; class TQStringList; -class TDevMakeFrontend; +class KDevMakeFrontend; -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" -class FortranSupportPart : public TDevLanguageSupport +class FortranSupportPart : public KDevLanguageSupport { Q_OBJECT @@ -30,7 +30,7 @@ public: ~FortranSupportPart(); protected: - virtual TDevLanguageSupport::Features features(); + virtual KDevLanguageSupport::Features features(); private slots: void slotFtnchek(); @@ -46,7 +46,7 @@ private slots: private: void maybeParse(const TQString fileName); - TDevMakeFrontend *makeFrontend(); + KDevMakeFrontend *makeFrontend(); FixedFormParser *parser; }; diff --git a/languages/fortran/kdevfortransupport.desktop b/languages/fortran/kdevfortransupport.desktop new file mode 100644 index 00000000..b6465210 --- /dev/null +++ b/languages/fortran/kdevfortransupport.desktop @@ -0,0 +1,80 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Fortran 77 Support +Comment[ca]=Suport per a Fortran 77 +Comment[da]=Fortran 77 understøttelse +Comment[de]=Unterstützung für Fortran 77 für TDevelop +Comment[el]=Υποστήριξη Fortran 77 +Comment[es]=Soporte para Fortran 77 +Comment[et]=Fortran 77 toetus +Comment[eu]=Fortran 77 euskarria +Comment[fa]=پشتیبانی فرترن ۷۷ +Comment[fr]=Prise en charge du langage Fortran77 +Comment[ga]=Tacaíocht Fortran 77 +Comment[gl]=Soporte para Fortran 77 +Comment[hi]=फ़ोरट्रॉन 77 समर्थन +Comment[hu]=Fortran 77-támogatás +Comment[is]=Fortran 77 stuðningur +Comment[it]=Supporto per Fortran 77 +Comment[ja]=Fortran 77 サポート +Comment[nds]=Ünnerstütten för Fortran 77 +Comment[ne]=फोर्ट्रान ७७ समर्थन +Comment[nl]=Ondersteuning voor Fortran 77 +Comment[pl]=Obsługa Fortrana 77 +Comment[pt]=Suporte a Fortran 77 +Comment[pt_BR]=Suporte ao Fortran 77 +Comment[ru]=Поддержка языка Fortran 77 +Comment[sk]=Fortran 77 podpora +Comment[sl]=Podpora za Fortran 77 +Comment[sr]=Подршка за Fortran 77 +Comment[sr@Latn]=Podrška za Fortran 77 +Comment[sv]=Fortran 77-stöd +Comment[ta]=பொர்ட்ரான் 77 ஆதரவு +Comment[tg]=Ёрӣ намудани забони 77 Support +Comment[tr]=Fortran 77 Desteği +Comment[zh_CN]=Fortran 77 支持 +Comment[zh_TW]=Fortran 77 支援 +Name=KDevFortranSupport +Name[da]=TDevelop Fortran77 understøttelse +Name[nds]=Fortran-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaFortrana +Name[sk]=KDev Fortran podpora +Name[sv]=TDevelop Fortran-stöd +Name[zh_TW]=TDevelop Fortran 支援 +GenericName=Fortran 77 Support +GenericName[ca]=Suport per a Fortran 77 +GenericName[da]=Fortran 77 understøttelse +GenericName[de]=Unterstützung für Fortran 77 +GenericName[el]=Υποστήριξη Fortran 77 +GenericName[es]=Soporte para Fortran 77 +GenericName[et]=Fortran 77 toetus +GenericName[eu]=Fortran 77 euskarria +GenericName[fa]=پشتیبانی فرترن ۷۷ +GenericName[fr]=Prise en charge du langage Fortran 77 +GenericName[ga]=Tacaíocht Fortran 77 +GenericName[gl]=Soporte para Fortran 77 +GenericName[hi]=फ़ोरट्रॉन 77 समर्थन +GenericName[hu]=Fortran 77-támogatás +GenericName[it]=Supporto Fortran 77 +GenericName[ja]=Fortran 77 サポート +GenericName[nds]=Ünnerstütten för Fortran-77 +GenericName[ne]=फोर्ट्रान ७७ समर्थन +GenericName[nl]=Ondersteuning voor Fortran 77 +GenericName[pl]=Obsługa Fortrana 77 +GenericName[pt]=Suporte a Fortran 77 +GenericName[pt_BR]=Suporte ao Fortran 77 +GenericName[ru]=Поддержка языка Fortran 77 +GenericName[sk]=Fortran 77 podpora +GenericName[sl]=Podpora za Fortran 77 +GenericName[sr]=Подршка за Fortran 77 +GenericName[sr@Latn]=Podrška za Fortran 77 +GenericName[sv]=Fortran 77-stöd +GenericName[tg]=Ёрӣ намудани забони 77 Support +GenericName[tr]=Fortran 77 Desteği +GenericName[zh_CN]=Fortran 77 支持 +GenericName[zh_TW]=Fortran 77 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevfortransupport +X-TDevelop-Version=5 +X-TDevelop-Language=Fortran77 diff --git a/languages/fortran/kdevfortransupport.rc b/languages/fortran/kdevfortransupport.rc new file mode 100644 index 00000000..40e3f80a --- /dev/null +++ b/languages/fortran/kdevfortransupport.rc @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/languages/fortran/tdevfortransupport.desktop b/languages/fortran/tdevfortransupport.desktop deleted file mode 100644 index d4da4cba..00000000 --- a/languages/fortran/tdevfortransupport.desktop +++ /dev/null @@ -1,80 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Fortran 77 Support -Comment[ca]=Suport per a Fortran 77 -Comment[da]=Fortran 77 understøttelse -Comment[de]=Unterstützung für Fortran 77 für TDevelop -Comment[el]=Υποστήριξη Fortran 77 -Comment[es]=Soporte para Fortran 77 -Comment[et]=Fortran 77 toetus -Comment[eu]=Fortran 77 euskarria -Comment[fa]=پشتیبانی فرترن ۷۷ -Comment[fr]=Prise en charge du langage Fortran77 -Comment[ga]=Tacaíocht Fortran 77 -Comment[gl]=Soporte para Fortran 77 -Comment[hi]=फ़ोरट्रॉन 77 समर्थन -Comment[hu]=Fortran 77-támogatás -Comment[is]=Fortran 77 stuðningur -Comment[it]=Supporto per Fortran 77 -Comment[ja]=Fortran 77 サポート -Comment[nds]=Ünnerstütten för Fortran 77 -Comment[ne]=फोर्ट्रान ७७ समर्थन -Comment[nl]=Ondersteuning voor Fortran 77 -Comment[pl]=Obsługa Fortrana 77 -Comment[pt]=Suporte a Fortran 77 -Comment[pt_BR]=Suporte ao Fortran 77 -Comment[ru]=Поддержка языка Fortran 77 -Comment[sk]=Fortran 77 podpora -Comment[sl]=Podpora za Fortran 77 -Comment[sr]=Подршка за Fortran 77 -Comment[sr@Latn]=Podrška za Fortran 77 -Comment[sv]=Fortran 77-stöd -Comment[ta]=பொர்ட்ரான் 77 ஆதரவு -Comment[tg]=Ёрӣ намудани забони 77 Support -Comment[tr]=Fortran 77 Desteği -Comment[zh_CN]=Fortran 77 支持 -Comment[zh_TW]=Fortran 77 支援 -Name=KDevFortranSupport -Name[da]=TDevelop Fortran77 understøttelse -Name[nds]=Fortran-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaFortrana -Name[sk]=KDev Fortran podpora -Name[sv]=TDevelop Fortran-stöd -Name[zh_TW]=TDevelop Fortran 支援 -GenericName=Fortran 77 Support -GenericName[ca]=Suport per a Fortran 77 -GenericName[da]=Fortran 77 understøttelse -GenericName[de]=Unterstützung für Fortran 77 -GenericName[el]=Υποστήριξη Fortran 77 -GenericName[es]=Soporte para Fortran 77 -GenericName[et]=Fortran 77 toetus -GenericName[eu]=Fortran 77 euskarria -GenericName[fa]=پشتیبانی فرترن ۷۷ -GenericName[fr]=Prise en charge du langage Fortran 77 -GenericName[ga]=Tacaíocht Fortran 77 -GenericName[gl]=Soporte para Fortran 77 -GenericName[hi]=फ़ोरट्रॉन 77 समर्थन -GenericName[hu]=Fortran 77-támogatás -GenericName[it]=Supporto Fortran 77 -GenericName[ja]=Fortran 77 サポート -GenericName[nds]=Ünnerstütten för Fortran-77 -GenericName[ne]=फोर्ट्रान ७७ समर्थन -GenericName[nl]=Ondersteuning voor Fortran 77 -GenericName[pl]=Obsługa Fortrana 77 -GenericName[pt]=Suporte a Fortran 77 -GenericName[pt_BR]=Suporte ao Fortran 77 -GenericName[ru]=Поддержка языка Fortran 77 -GenericName[sk]=Fortran 77 podpora -GenericName[sl]=Podpora za Fortran 77 -GenericName[sr]=Подршка за Fortran 77 -GenericName[sr@Latn]=Podrška za Fortran 77 -GenericName[sv]=Fortran 77-stöd -GenericName[tg]=Ёрӣ намудани забони 77 Support -GenericName[tr]=Fortran 77 Desteği -GenericName[zh_CN]=Fortran 77 支持 -GenericName[zh_TW]=Fortran 77 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevfortransupport -X-TDevelop-Version=5 -X-TDevelop-Language=Fortran77 diff --git a/languages/fortran/tdevfortransupport.rc b/languages/fortran/tdevfortransupport.rc deleted file mode 100644 index 40e3f80a..00000000 --- a/languages/fortran/tdevfortransupport.rc +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/languages/java/CMakeLists.txt b/languages/java/CMakeLists.txt index 546c6ac9..d3f7f5a7 100644 --- a/languages/java/CMakeLists.txt +++ b/languages/java/CMakeLists.txt @@ -35,20 +35,20 @@ link_directories( ##### other data ################################ -install( FILES tdevjavasupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevjavasupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevjavasupport ) +install( FILES kdevjavasupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevjavasupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevjavasupport ) -##### libtdevjavasupport (module) ############### +##### libkdevjavasupport (module) ############### -tde_add_kpart( libtdevjavasupport AUTOMOC +tde_add_kpart( libkdevjavasupport AUTOMOC SOURCES - JavaLexer.cpp TDevJavaSupportIface.cpp + JavaLexer.cpp KDevJavaSupportIface.cpp javasupportfactory.cpp JavaRecognizer.cpp backgroundparser.cpp configproblemreporter.ui javasupportpart.cpp JavaStoreWalker.cpp javasupport_utils.cpp problemreporter.cpp driver.cpp - tdevdriver.cpp TDevJavaSupportIface.skel - LINK antlr-static tdevcatalog-shared tdevelop-shared + kdevdriver.cpp KDevJavaSupportIface.skel + LINK antlr-static kdevcatalog-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/java/KDevJavaSupportIface.cpp b/languages/java/KDevJavaSupportIface.cpp new file mode 100644 index 00000000..b1225700 --- /dev/null +++ b/languages/java/KDevJavaSupportIface.cpp @@ -0,0 +1,24 @@ + +#include "KDevJavaSupportIface.h" +#include "javasupportpart.h" + +KDevJavaSupportIface::KDevJavaSupportIface( JavaSupportPart* javaSupport ) + : TQObject( javaSupport ), DCOPObject( "KDevJavaSupport" ), m_javaSupport( javaSupport ) +{ +} + +KDevJavaSupportIface::~KDevJavaSupportIface() +{ +} + +void KDevJavaSupportIface::addClass() +{ + m_javaSupport->slotNewClass(); +} + +void KDevJavaSupportIface::parseProject() +{ + m_javaSupport->parseProject(); +} + +#include "KDevJavaSupportIface.moc" diff --git a/languages/java/KDevJavaSupportIface.h b/languages/java/KDevJavaSupportIface.h new file mode 100644 index 00000000..d0c4d441 --- /dev/null +++ b/languages/java/KDevJavaSupportIface.h @@ -0,0 +1,27 @@ + +#ifndef KDEVJAVASUPPORTIFACE_H +#define KDEVJAVASUPPORTIFACE_H + +#include +#include + +class JavaSupportPart; + +class KDevJavaSupportIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP +public: + KDevJavaSupportIface( JavaSupportPart* javaSupport ); + ~KDevJavaSupportIface(); + +k_dcop: + void addClass(); + void parseProject(); + +private: + JavaSupportPart* m_javaSupport; +}; + +#endif diff --git a/languages/java/Makefile.am b/languages/java/Makefile.am index 8e19da19..a1a1e812 100644 --- a/languages/java/Makefile.am +++ b/languages/java/Makefile.am @@ -10,13 +10,13 @@ INCLUDES = -I$(top_srcdir)/lib/antlr -I$(top_srcdir)/lib/catalog \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util \ $(all_includes) -kde_module_LTLIBRARIES = libtdevjavasupport.la -libtdevjavasupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevjavasupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la $(top_builddir)/lib/catalog/libtdevcatalog.la +kde_module_LTLIBRARIES = libkdevjavasupport.la +libkdevjavasupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevjavasupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la $(top_builddir)/lib/catalog/libkdevcatalog.la -libtdevjavasupport_la_SOURCES = JavaLexer.cpp TDevJavaSupportIface.cpp javasupportfactory.cpp \ +libkdevjavasupport_la_SOURCES = JavaLexer.cpp KDevJavaSupportIface.cpp javasupportfactory.cpp \ JavaRecognizer.cpp backgroundparser.cpp configproblemreporter.ui javasupportpart.cpp \ -JavaStoreWalker.cpp javasupport_utils.cpp problemreporter.cpp driver.cpp tdevdriver.cpp TDevJavaSupportIface.skel +JavaStoreWalker.cpp javasupport_utils.cpp problemreporter.cpp driver.cpp kdevdriver.cpp KDevJavaSupportIface.skel EXTRA_DIST = java.g java.tree.g java.store.g @@ -31,7 +31,7 @@ EXTRA_DIST = java.g java.tree.g java.store.g METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevjavasupport.desktop +service_DATA = kdevjavasupport.desktop -rcdir = $(kde_datadir)/tdevjavasupport -rc_DATA = tdevjavasupport.rc +rcdir = $(kde_datadir)/kdevjavasupport +rc_DATA = kdevjavasupport.rc diff --git a/languages/java/TDevJavaSupportIface.cpp b/languages/java/TDevJavaSupportIface.cpp deleted file mode 100644 index b9847558..00000000 --- a/languages/java/TDevJavaSupportIface.cpp +++ /dev/null @@ -1,24 +0,0 @@ - -#include "TDevJavaSupportIface.h" -#include "javasupportpart.h" - -TDevJavaSupportIface::TDevJavaSupportIface( JavaSupportPart* javaSupport ) - : TQObject( javaSupport ), DCOPObject( "TDevJavaSupport" ), m_javaSupport( javaSupport ) -{ -} - -TDevJavaSupportIface::~TDevJavaSupportIface() -{ -} - -void TDevJavaSupportIface::addClass() -{ - m_javaSupport->slotNewClass(); -} - -void TDevJavaSupportIface::parseProject() -{ - m_javaSupport->parseProject(); -} - -#include "TDevJavaSupportIface.moc" diff --git a/languages/java/TDevJavaSupportIface.h b/languages/java/TDevJavaSupportIface.h deleted file mode 100644 index 9732ca51..00000000 --- a/languages/java/TDevJavaSupportIface.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef TDEVJAVASUPPORTIFACE_H -#define TDEVJAVASUPPORTIFACE_H - -#include -#include - -class JavaSupportPart; - -class TDevJavaSupportIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP -public: - TDevJavaSupportIface( JavaSupportPart* javaSupport ); - ~TDevJavaSupportIface(); - -k_dcop: - void addClass(); - void parseProject(); - -private: - JavaSupportPart* m_javaSupport; -}; - -#endif diff --git a/languages/java/app_templates/CMakeLists.txt b/languages/java/app_templates/CMakeLists.txt index 34cc305c..f7e7d242 100644 --- a/languages/java/app_templates/CMakeLists.txt +++ b/languages/java/app_templates/CMakeLists.txt @@ -10,7 +10,7 @@ ################################################# add_subdirectory( javahello ) -add_subdirectory( tdeappjava ) +add_subdirectory( kappjava ) add_subdirectory( superwaba ) install( FILES diff --git a/languages/java/app_templates/Makefile.am b/languages/java/app_templates/Makefile.am index f30aefdb..fe3931a3 100644 --- a/languages/java/app_templates/Makefile.am +++ b/languages/java/app_templates/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = javahello tdeappjava superwaba +SUBDIRS = javahello kappjava superwaba profilesdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/JavaIDE profiles_DATA = java.appwizard diff --git a/languages/java/app_templates/java.appwizard b/languages/java/app_templates/java.appwizard index f4f8d6ba..087d6c0c 100644 --- a/languages/java/app_templates/java.appwizard +++ b/languages/java/app_templates/java.appwizard @@ -1,2 +1,2 @@ [General] -List=javahello,tdeappjava,superwaba +List=javahello,kappjava,superwaba diff --git a/languages/java/app_templates/javahello/CMakeLists.txt b/languages/java/app_templates/javahello/CMakeLists.txt index 04fd4963..8129bbc1 100644 --- a/languages/java/app_templates/javahello/CMakeLists.txt +++ b/languages/java/app_templates/javahello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( javahello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/javahello.tar.gz javahello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - javahello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + javahello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/java/app_templates/javahello/Makefile.am b/languages/java/app_templates/javahello/Makefile.am index e3e3be27..f47e7056 100644 --- a/languages/java/app_templates/javahello/Makefile.am +++ b/languages/java/app_templates/javahello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = Main.java build.xml javahello.filelist javahello.tdevelop templateName= javahello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/java/app_templates/javahello/javahello.filelist b/languages/java/app_templates/javahello/javahello.filelist index b9ce43ab..97da44be 100644 --- a/languages/java/app_templates/javahello/javahello.filelist +++ b/languages/java/app_templates/javahello/javahello.filelist @@ -1,2 +1,2 @@ -# TDevelop Custom Project File List +# KDevelop Custom Project File List Main.java diff --git a/languages/java/app_templates/javahello/javahello.kdevtemplate b/languages/java/app_templates/javahello/javahello.kdevtemplate new file mode 100644 index 00000000..62fcffc5 --- /dev/null +++ b/languages/java/app_templates/javahello/javahello.kdevtemplate @@ -0,0 +1,124 @@ +# KDE Config File +[General] +Name=Application +Name[br]=Arload +Name[ca]=Aplicació +Name[cy]=Cymhwysiad +Name[da]=Program +Name[de]=Anwendung +Name[el]=Εφαρμογή +Name[es]=Aplicación +Name[et]=Rakendus +Name[eu]=Aplikazioa +Name[fa]=کاربرد +Name[ga]=Feidhmchlár +Name[gl]=Aplicación +Name[hu]=Alkalmazások +Name[it]=Applicazione +Name[ja]=アプリケーション +Name[lt]=Programa +Name[ms]=Aplikasi +Name[nds]=Programm +Name[ne]=अनुप्रयोग +Name[nl]=Toepassing +Name[pl]=Program +Name[pt]=Aplicação +Name[pt_BR]=Aplicativo +Name[ru]=Приложение +Name[rw]=Porogaramu +Name[sk]=Aplikácia +Name[sl]=Program +Name[sr]=Програм +Name[sr@Latn]=Program +Name[sv]=Program +Name[tr]=Uygulama +Name[zh_CN]=应用程序 +Name[zh_TW]=應用程式 +Icon=qmakeapp.png +Category=Java/Ant project +Category[fr]=Java/Ant +Comment=Generate a Java application +Comment[ca]=Genera una aplicació Java +Comment[da]=Generér et Java-program +Comment[de]=Erstellt eine Java-Anwendung +Comment[el]=Δημιουργία μιας εφαρμογής Java +Comment[es]=Genera una aplicación en Java +Comment[et]=Java rakenduse loomine +Comment[eu]=Sortu Java aplikazio bat +Comment[fa]=یک کاربرد جاوا تولید می‌کند +Comment[fr]=Génère une application Java +Comment[ga]=Cruthaigh feidhmchlár Java +Comment[gl]=Xera unha aplicación Java +Comment[hu]=Létrehoz egy Java-alkalmazást +Comment[it]=Genera un'applicazione Java +Comment[ja]= Java アプリケーションを作成 +Comment[nds]=Stellt en Java-Programm op +Comment[ne]=जाभा अनुप्रयोग उत्पन्न गर्नुहोस् +Comment[nl]=Genereer een Java-toepassing +Comment[pl]=Generuj program w Javie +Comment[pt]=Gera uma aplicação em Java +Comment[pt_BR]=Gera uma aplicação em Java +Comment[ru]=Создание приложения Java +Comment[sk]=Vygeneruje Java aplikáciu +Comment[sr]=Прави Java програм +Comment[sr@Latn]=Pravi Java program +Comment[sv]=Skapa ett Java-program +Comment[tr]=Bir Java uygulaması yarat +Comment[zh_CN]=生成一个 Java 应用程序 +Comment[zh_TW]=產生 Java 應用程式 +FileTemplates=java,JavaStyle +ShowFilesAfterGeneration=%{dest}/Main.java +Archive=javahello.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/javahello.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/javahello.filelist +Dest=%{dest}/%{APPNAMELC}.filelist + +[FILE3] +Type=install +Source=%{src}/Main.java +Dest=%{dest}/Main.java + +[FILE4] +Type=install +Source=%{src}/build.xml +Dest=%{dest}/build.xml + +[msg] +Type=message +Comment=A JAVA application was created in %{dest} +Comment[ca]=Una aplicació JAVA ha estat creada en %{dest} +Comment[da]=Et JAVA-program blev oprettet i %{dest} +Comment[de]=Eine Java-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή JAVA δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación en Java ha sido creada en %{dest} +Comment[et]=Java rakendus loodi asukohta %{dest} +Comment[eu]=JAVA aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد جاوا در %{dest} ایجاد شد +Comment[fr]=Une application Java a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár JAVA i %{dest} +Comment[gl]=Creouse una aplicación JAVA en %{dest} +Comment[hu]=Létrejött egy Java-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Java in %{dest} +Comment[ja]=JAVA アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en JAVA-Programm opstellt +Comment[ne]= जाभा अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Java-toepassing is aangemaakt in %{dest} +Comment[pl]=Program w Javie został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação em Java em %{dest} +Comment[pt_BR]=Foi criada uma aplicação em Java em %{dest} +Comment[ru]=Приложение Java создано в %{dest} +Comment[sk]=Java aplikácia bola vytvorená v %{dest} +Comment[sr]=Java програм је направљен у %{dest} +Comment[sr@Latn]=Java program je napravljen u %{dest} +Comment[sv]=Ett Java-program skapades i %{dest} +Comment[tr]=Bir JAVA uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个 Java 应用程序 +Comment[zh_TW]=一個 Java 應用程式已建立於 %{dest} diff --git a/languages/java/app_templates/javahello/javahello.tdevelop b/languages/java/app_templates/javahello/javahello.tdevelop index ade81a9a..a41fae72 100644 --- a/languages/java/app_templates/javahello/javahello.tdevelop +++ b/languages/java/app_templates/javahello/javahello.tdevelop @@ -7,15 +7,15 @@ KDevAntProject Java - TDevDebugger + KDevDebugger - + ant - - + + ada ada_bugs_gcc @@ -59,11 +59,11 @@ KDE Libraries (Doxygen) - - + + false *.o,*.lo,CVS - + diff --git a/languages/java/app_templates/javahello/javahello.tdevtemplate b/languages/java/app_templates/javahello/javahello.tdevtemplate deleted file mode 100644 index 62fcffc5..00000000 --- a/languages/java/app_templates/javahello/javahello.tdevtemplate +++ /dev/null @@ -1,124 +0,0 @@ -# KDE Config File -[General] -Name=Application -Name[br]=Arload -Name[ca]=Aplicació -Name[cy]=Cymhwysiad -Name[da]=Program -Name[de]=Anwendung -Name[el]=Εφαρμογή -Name[es]=Aplicación -Name[et]=Rakendus -Name[eu]=Aplikazioa -Name[fa]=کاربرد -Name[ga]=Feidhmchlár -Name[gl]=Aplicación -Name[hu]=Alkalmazások -Name[it]=Applicazione -Name[ja]=アプリケーション -Name[lt]=Programa -Name[ms]=Aplikasi -Name[nds]=Programm -Name[ne]=अनुप्रयोग -Name[nl]=Toepassing -Name[pl]=Program -Name[pt]=Aplicação -Name[pt_BR]=Aplicativo -Name[ru]=Приложение -Name[rw]=Porogaramu -Name[sk]=Aplikácia -Name[sl]=Program -Name[sr]=Програм -Name[sr@Latn]=Program -Name[sv]=Program -Name[tr]=Uygulama -Name[zh_CN]=应用程序 -Name[zh_TW]=應用程式 -Icon=qmakeapp.png -Category=Java/Ant project -Category[fr]=Java/Ant -Comment=Generate a Java application -Comment[ca]=Genera una aplicació Java -Comment[da]=Generér et Java-program -Comment[de]=Erstellt eine Java-Anwendung -Comment[el]=Δημιουργία μιας εφαρμογής Java -Comment[es]=Genera una aplicación en Java -Comment[et]=Java rakenduse loomine -Comment[eu]=Sortu Java aplikazio bat -Comment[fa]=یک کاربرد جاوا تولید می‌کند -Comment[fr]=Génère une application Java -Comment[ga]=Cruthaigh feidhmchlár Java -Comment[gl]=Xera unha aplicación Java -Comment[hu]=Létrehoz egy Java-alkalmazást -Comment[it]=Genera un'applicazione Java -Comment[ja]= Java アプリケーションを作成 -Comment[nds]=Stellt en Java-Programm op -Comment[ne]=जाभा अनुप्रयोग उत्पन्न गर्नुहोस् -Comment[nl]=Genereer een Java-toepassing -Comment[pl]=Generuj program w Javie -Comment[pt]=Gera uma aplicação em Java -Comment[pt_BR]=Gera uma aplicação em Java -Comment[ru]=Создание приложения Java -Comment[sk]=Vygeneruje Java aplikáciu -Comment[sr]=Прави Java програм -Comment[sr@Latn]=Pravi Java program -Comment[sv]=Skapa ett Java-program -Comment[tr]=Bir Java uygulaması yarat -Comment[zh_CN]=生成一个 Java 应用程序 -Comment[zh_TW]=產生 Java 應用程式 -FileTemplates=java,JavaStyle -ShowFilesAfterGeneration=%{dest}/Main.java -Archive=javahello.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/javahello.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/javahello.filelist -Dest=%{dest}/%{APPNAMELC}.filelist - -[FILE3] -Type=install -Source=%{src}/Main.java -Dest=%{dest}/Main.java - -[FILE4] -Type=install -Source=%{src}/build.xml -Dest=%{dest}/build.xml - -[msg] -Type=message -Comment=A JAVA application was created in %{dest} -Comment[ca]=Una aplicació JAVA ha estat creada en %{dest} -Comment[da]=Et JAVA-program blev oprettet i %{dest} -Comment[de]=Eine Java-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή JAVA δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación en Java ha sido creada en %{dest} -Comment[et]=Java rakendus loodi asukohta %{dest} -Comment[eu]=JAVA aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد جاوا در %{dest} ایجاد شد -Comment[fr]=Une application Java a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár JAVA i %{dest} -Comment[gl]=Creouse una aplicación JAVA en %{dest} -Comment[hu]=Létrejött egy Java-alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione Java in %{dest} -Comment[ja]=JAVA アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en JAVA-Programm opstellt -Comment[ne]= जाभा अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Java-toepassing is aangemaakt in %{dest} -Comment[pl]=Program w Javie został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação em Java em %{dest} -Comment[pt_BR]=Foi criada uma aplicação em Java em %{dest} -Comment[ru]=Приложение Java создано в %{dest} -Comment[sk]=Java aplikácia bola vytvorená v %{dest} -Comment[sr]=Java програм је направљен у %{dest} -Comment[sr@Latn]=Java program je napravljen u %{dest} -Comment[sv]=Ett Java-program skapades i %{dest} -Comment[tr]=Bir JAVA uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个 Java 应用程序 -Comment[zh_TW]=一個 Java 應用程式已建立於 %{dest} diff --git a/languages/java/app_templates/kappjava/CMakeLists.txt b/languages/java/app_templates/kappjava/CMakeLists.txt new file mode 100644 index 00000000..042872fd --- /dev/null +++ b/languages/java/app_templates/kappjava/CMakeLists.txt @@ -0,0 +1,26 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_custom_target( kappjava.tar.gz ALL + COMMAND tar zcf kappjava.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + app.java pref.java appview.java app_client.java appui.rc + src-Makefile.am kappjava.png app.tdevelop subdirs +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kappjava.tar.gz kappjava.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kappjava.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/java/app_templates/kappjava/Makefile.am b/languages/java/app_templates/kappjava/Makefile.am new file mode 100644 index 00000000..edbd4468 --- /dev/null +++ b/languages/java/app_templates/kappjava/Makefile.am @@ -0,0 +1,17 @@ +dataFiles = app.java pref.java appview.java app_client.java appui.rc \ + src-Makefile.am kappjava.png app.tdevelop subdirs +templateName = kappjava + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/java/app_templates/kappjava/app.desktop b/languages/java/app_templates/kappjava/app.desktop new file mode 100644 index 00000000..3cc75ad8 --- /dev/null +++ b/languages/java/app_templates/kappjava/app.desktop @@ -0,0 +1,41 @@ +[Desktop Entry] +Name=%{APPNAME} +Exec=%{APPNAMELC} %i -caption "%c" +Icon=%{APPNAMELC} +Type=Application +DocPath=%{APPNAMELC}/%{APPNAMELC}.html +Comment=A Java TDE KPart Application +Comment[ca]=Una aplicació KPart en Java per al TDE +Comment[da]=Et Java TDE KPart-program +Comment[de]=Eine TDE-Komponten-Anwendung in Java +Comment[el]=Μια εφαρμογή Java TDE KPart +Comment[es]=Una aplicación KPart en Java para TDE +Comment[et]=Java TDE KPart rakendus +Comment[eu]=Java TDE KPart aplikazio bat +Comment[fa]=یک کاربرد TDE KPart جاوا +Comment[fr]=Une application KPart en JAVA pour TDE +Comment[ga]=Feidhmchlár KPart TDE i Java +Comment[gl]=Unha aplicación KPart de TDE en Java +Comment[hi]=एक जावा केडीई के-पार्ट अनुप्रयोग +Comment[hu]=Java-ban írt, KPart-alapú TDE-alkalmazás +Comment[is]=Java TDE KPart forrit +Comment[it]=Un'applicazione Java TDE KPart +Comment[ja]= Java TDE KPart アプリケーション +Comment[nds]=En TDE-Programm in Java +Comment[ne]=जाभा केडीई KPart अनुप्रयोग +Comment[nl]=Een Java TDE KPart-toepassing +Comment[pl]=Element osadzalny KPart Javy +Comment[pt]=Uma Aplicação TDE KPart em Java +Comment[pt_BR]=Um Aplicativo KPart do TDE para Java +Comment[ru]=Приложение KPart для TDE на Java +Comment[sk]=Java TDE KPart aplikácia +Comment[sl]=Program za Javo TDE KPart +Comment[sr]=Java TDE KPart програм +Comment[sr@Latn]=Java TDE KPart program +Comment[sv]=Ett Java TDE Kpart-program +Comment[ta]=ஜாவா கெடி கெபாகம் பயன்பாடு +Comment[tg]=Гузориш KPart барои TDE дар Java +Comment[tr]=Bir Java TDE KPart Uygulaması +Comment[zh_CN]=一个 Java TDE KPart 应用程序 +Comment[zh_TW]=Java TDE KPart 應用程式 +Terminal=false diff --git a/languages/java/app_templates/kappjava/app.java b/languages/java/app_templates/kappjava/app.java new file mode 100644 index 00000000..40bc6b93 --- /dev/null +++ b/languages/java/app_templates/kappjava/app.java @@ -0,0 +1,281 @@ +/* + * Copyright (C) %{YEAR} %{AUTHOR} <%{EMAIL}> + */ + +import java.util.*; +import org.kde.qt.*; +import org.kde.koala.*; + +/** + * This class serves as the main window for %{APPNAME}. It handles the + * menus, toolbars, and status bars. + * + * @short Main window class + * @author $AUTHOR <$EMAIL> + * @version $APP_VERSION + */ +public class %{APPNAME} extends TDEMainWindow +{ + private %{APPNAME}View m_view; + private QPrinter m_printer; + +%{APPNAME}() +{ + super( null, "%{APPNAME}" ); + m_view = new %{APPNAME}View(this); + m_printer = new QPrinter(); + // accept dnd + setAcceptDrops(true); + + // tell the TDEMainWindow that this is indeed the main widget + setCentralWidget(m_view); + + // then, setup our actions + setupActions(); + + // and a status bar + statusBar().show(); + + // Apply the create the main window and ask the mainwindow to + // automatically save settings if changed: window size, toolbar + // position, icon size, etc. Also to add actions for the statusbar + // toolbar, and keybindings if necessary. + setupGUI(); + + // allow the view to change the statusbar and caption + connect(m_view, SIGNAL("signalChangeStatusbar(String)"), + this, SLOT("changeStatusbar(String)")); + connect(m_view, SIGNAL("signalChangeCaption(String)"), + this, SLOT("changeCaption(String)")); + +} + +public void load(KURL url) +{ + StringBuffer target = new StringBuffer(); + // the below code is what you should normally do. in this + // example case, we want the url to our own. you probably + // want to use this code instead for your app + + // download the contents + if (NetAccess.download(url, target, null)) + { + // set our caption + setCaption(url.fileName()); + + // load in the file (target is always local) +// loadFile(target); + + // and remove the temp file + NetAccess.removeTempFile(target.toString()); + } + + setCaption(url.url()); + m_view.openURL(url); +} + +public void setupActions() +{ + TDEApplication kapp = TDEApplication.kApplication(); + KStdAction.openNew(this, SLOT("fileNew()"), actionCollection()); + KStdAction.open(this, SLOT("fileOpen()"), actionCollection()); + KStdAction.save(this, SLOT("fileSave()"), actionCollection()); + KStdAction.saveAs(this, SLOT("fileSaveAs()"), actionCollection()); + KStdAction.print(this, SLOT("filePrint()"), actionCollection()); + KStdAction.quit(kapp, SLOT("quit()"), actionCollection()); + + KStdAction.preferences(this, SLOT("optionsPreferences()"), actionCollection()); + + // this doesn't do anything useful. it's just here to illustrate + // how to insert a custom menu and menu item + TDEAction custom = new TDEAction(tr("Cus&tom Menuitem"), new TDEShortcut(), + this, SLOT("optionsPreferences()"), + actionCollection(), "custom_action"); +} + +protected void saveProperties(TDEConfig config) +{ + // the 'config' object points to the session managed + // config file. anything you write here will be available + // later when this app is restored + + if (m_view.currentURL() != null) + config.writeEntry("lastURL", m_view.currentURL()); +} + +protected void readProperties(TDEConfig config) +{ + // the 'config' object points to the session managed + // config file. this function is automatically called whenever + // the app is being restored. read in here whatever you wrote + // in 'saveProperties' + + String url = config.readPathEntry("lastURL"); + + if (url != null) + m_view.openURL(new KURL(url)); +} + +protected void dragEnterEvent(QDragEnterEvent event) +{ + // accept uri drops only + event.accept(QUriDrag.canDecode(event)); +} + +protected void dropEvent(QDropEvent event) +{ + // this is a very simplistic implementation of a drop event. we + // will only accept a dropped URL. the Qt dnd code can do *much* + // much more, so please read the docs there + ArrayList uri = new ArrayList(); + + // see if we can decode a URI.. if not, just ignore it + if (QUriDrag.decode(event, (String[]) uri.toArray())) + { + // okay, we have a URI.. process it + String url, target; + url = (String) uri.get(0); + + // load in the file + load(new KURL(url)); + } +} + +private void fileNew() +{ + // this slot is called whenever the File.New menu is selected, + // the New shortcut is pressed (usually CTRL+N) or the New toolbar + // button is clicked + + // create a new window + (new %{APPNAME}()).show(); +} + +private void fileOpen() +{ + // this slot is called whenever the File.Open menu is selected, + // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar + // button is clicked + KURL url = KURLRequesterDlg.getURL(null, this, tr("Open Location") ); + if (!url.isEmpty()) + m_view.openURL(url); +} + +private void fileSave() +{ + // this slot is called whenever the File.Save menu is selected, + // the Save shortcut is pressed (usually CTRL+S) or the Save toolbar + // button is clicked + + // save the current file +} + +private void fileSaveAs() +{ + // this slot is called whenever the File.Save As menu is selected, + KURL file_url = KFileDialog.getSaveURL(); + if (!file_url.isEmpty() && file_url.isValid()) + { + // save your info, here + } +} + +private void filePrint() +{ + // this slot is called whenever the File.Print menu is selected, + // the Print shortcut is pressed (usually CTRL+P) or the Print toolbar + // button is clicked + if (m_printer == null) m_printer = new QPrinter(); + if (QPrintDialog.getPrinterSetup(m_printer)) + { + // setup the printer. with Qt, you always "print" to a + // QPainter.. whether the output medium is a pixmap, a screen, + // or paper + QPainter p = new QPainter(); + p.begin(m_printer); + + // we let our view do the actual printing + QPaintDeviceMetrics metrics = new QPaintDeviceMetrics(m_printer); + m_view.print(p, metrics.height(), metrics.width()); + + // and send the result to the printer + p.end(); + } +} + +private void optionsPreferences() +{ + // popup some sort of preference dialog, here + %{APPNAME}Preferences dlg = new %{APPNAME}Preferences(); + if (dlg.exec() != 0) + { + // redo your settings + } +} + +private void changeStatusbar(String text) +{ + // display the text on the statusbar + statusBar().message(text); +} + +private void changeCaption(String text) +{ + // display the text on the caption + setCaption(text); +} + +static String description = + "A KDE Application"; + +static String version = "%{VERSION}"; + +static String[][] options = +{ + { "+[URL]", "Document to open.", null } +}; + +static void main(String[] cmdLineArgs) +{ + TDEAboutData about = new TDEAboutData("%{APPNAMELC}", "%{APPNAME}", version, description, + TDEAboutData.License_%{LICENSE}, "(C) %{YEAR} %{AUTHOR}", null, null, "%{EMAIL}"); + about.addAuthor( "%{AUTHOR}", null, "%{EMAIL}" ); + TDECmdLineArgs.init(cmdLineArgs, about); + TDECmdLineArgs.addCmdLineOptions(options); + TDEApplication app = new TDEApplication(); + + // see if we are starting with session management + if (app.isRestored()) + RESTORE("%{APPNAME}"); + else + { + // no session.. just start up normally + TDECmdLineArgs args = TDECmdLineArgs.parsedArgs(); + if (args.count() == 0) + { + %{APPNAME} widget = new %{APPNAME}(); + widget.show(); + } + else + { + int i = 0; + for (; i < args.count(); i++) + { + %{APPNAME} widget = new %{APPNAME}(); + widget.show(); + widget.load(args.url(i)); + } + } + args.clear(); + } + + app.exec(); + return; +} + + static { + qtjava.initialize(); + kdejava.initialize(); + } +} + diff --git a/languages/java/app_templates/kappjava/app.tdevelop b/languages/java/app_templates/kappjava/app.tdevelop new file mode 100644 index 00000000..7ee74558 --- /dev/null +++ b/languages/java/app_templates/kappjava/app.tdevelop @@ -0,0 +1,88 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevAutoProject + Java + + Java + Code + Qt + KDE + + + + + src/java + + + src/%{APPNAMELC} + + + + + + + + + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + c++_bugs_gcc + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + libc + libstdc++ + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + stl + w3c-svg + sw + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + diff --git a/languages/java/app_templates/kappjava/app_client.java b/languages/java/app_templates/kappjava/app_client.java new file mode 100644 index 00000000..9648cfad --- /dev/null +++ b/languages/java/app_templates/kappjava/app_client.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) %{YEAR} %{AUTHOR} <%{EMAIL}> + */ + +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + TDEApplication app(argc, argv, "%{APPNAMELC}_client", false); + + // get our DCOP client and attach so that we may use it + DCOPClient *client = app.dcopClient(); + client->attach(); + + // do a 'send' for now + QByteArray data; + QDataStream ds(data, IO_WriteOnly); + if (argc > 1) + ds << QString(argv[1]); + else + ds << QString("http://www.kde.org"); + client->send("%{APPNAMELC}", "%{APPNAME}Iface", "openURL(QString)", data); + + return app.exec(); +} diff --git a/languages/java/app_templates/kappjava/appui.rc b/languages/java/app_templates/kappjava/appui.rc new file mode 100644 index 00000000..ceb4f14e --- /dev/null +++ b/languages/java/app_templates/kappjava/appui.rc @@ -0,0 +1,8 @@ + + + + C&ustom + + + + diff --git a/languages/java/app_templates/kappjava/appview.java b/languages/java/app_templates/kappjava/appview.java new file mode 100644 index 00000000..347ff58f --- /dev/null +++ b/languages/java/app_templates/kappjava/appview.java @@ -0,0 +1,115 @@ +/* + * Copyright (C) %{YEAR} %{AUTHOR} <%{EMAIL}> + */ + +import java.util.*; +import org.kde.qt.*; +import org.kde.koala.*; + +/** + * This is the main view class for %{APPNAME}. Most of the non-menu, + * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go + * here. + * + * This %{APPNAMELC} uses an HTML component as an example. + * + * @short Main view + * @author %{AUTHOR} <%{EMAIL}> + * @version %{VERSION} + */ +public class %{APPNAME}View extends QWidget +{ + + QHBoxLayout top_layout; + +public %{APPNAME}View(QWidget parent) +{ + super(parent, null); + // setup our layout manager to automatically add our widgets + top_layout = new QHBoxLayout(this); + top_layout.setAutoAdd(true); + + // we want to look for all components that satisfy our needs. the + // trader will actually search through *all* registered KDE + // applications and components -- not just KParts. So we have to + // specify two things: a service type and a constraint + // + // the service type is like a mime type. we say that we want all + // applications and components that can handle HTML -- 'text/html' + // + // however, by itself, this will return such things as Netscape.. + // not what we wanted. so we constrain it by saying that the + // string 'KParts/ReadOnlyPart' must be found in the ServiceTypes + // field. with this, only components of the type we want will be + // returned. + ArrayList offers = TDETrader.self().query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes"); + + KLibFactory factory = null; + // in theory, we only care about the first one.. but let's try all + // offers just in case the first can't be loaded for some reason + Iterator it = offers.iterator(); + while(it.hasNext()) + { + KService ptr = (KService) it.next(); + + // we now know that our offer can handle HTML and is a part. + // since it is a part, it must also have a library... let's try to + // load that now + factory = KLibLoader.self().factory( ptr.library() ); + if (factory != null) + { + m_html = (ReadOnlyPart) factory.create(this, ptr.name(), "KParts::ReadOnlyPart"); + break; + } + } + + // if our factory is invalid, then we never found our component + // and we might as well just exit now + if (factory == null) + { + KMessageBox.error(this, "Could not find a suitable HTML component"); + return; + } + + connect(m_html, SIGNAL("setWindowCaption(String)"), + this, SLOT("slotSetTitle(String)")); + connect(m_html, SIGNAL("setStatusBarText(String)"), + this, SLOT("slotOnURL(String)")); + +} + + +public void print(QPainter p, int height, int width) +{ + // do the actual printing, here + // p.drawText(etc..) +} + +public String currentURL() +{ + return m_html.url().url(); +} + +public void openURL(String url) +{ + openURL(new KURL(url)); +} + +public void openURL(KURL url) +{ + m_html.openURL(url); +} + +private void slotOnURL(String url) +{ + emit("signalChangeStatusbar", url); +} + +private void slotSetTitle(String title) +{ + emit("signalChangeCaption", title); +} + +private ReadOnlyPart m_html; + +} diff --git a/languages/java/app_templates/kappjava/kappjava b/languages/java/app_templates/kappjava/kappjava new file mode 100644 index 00000000..e199ac25 --- /dev/null +++ b/languages/java/app_templates/kappjava/kappjava @@ -0,0 +1,10 @@ +# KDE Config File +[General] +Name=Application framework +Name[fr]=Squelette d'application +Icon=kappjava.png +Category=Java/KDE +Comment=Generates a simple Java KDE application with one toplevel window, menus and toolbars. +Comment[fr]=Gnre une simple application KDE dans le language JAVA avec une fentre principale, des menus, et des barres d'outils. +FileTemplates=java,CStyle +ShowFilesAfterGeneration=src/APPNAMEView.java diff --git a/languages/java/app_templates/kappjava/kappjava.kdevtemplate b/languages/java/app_templates/kappjava/kappjava.kdevtemplate new file mode 100644 index 00000000..92cf4710 --- /dev/null +++ b/languages/java/app_templates/kappjava/kappjava.kdevtemplate @@ -0,0 +1,163 @@ +# KDE Config File +[General] +Name=Application framework +Name[ca]=Infraestructura d'aplicacions +Name[da]=Programskelet +Name[de]=Anwendungsgrundgerüst +Name[el]=Πλαίσιο εφαρμογής +Name[es]=Infraestructura de aplicación +Name[et]=Rakenduse raamistik +Name[eu]=Aplikazioen lan-markoa +Name[fa]=چارچوب کاربرد +Name[fr]=Infrastructure d'application +Name[ga]=Creatlach feidhmchláir +Name[gl]=Entorno de traballo para aplicación +Name[hu]=Alkalmazás-keretrendszer +Name[it]=Infrastruttura applicativa +Name[ja]=アプリケーションフレームワーク +Name[nds]=Programmrahmenwark +Name[ne]=अनुप्रयोग फ्रेमवर्क +Name[nl]=Applicationframework +Name[pl]=Szablon programu +Name[pt]=Plataforma de aplicações +Name[pt_BR]=Plataforma de aplicações +Name[ru]=Приложение KDE +Name[sk]=Aplikačný framework +Name[sl]=Ogrodje programa +Name[sr]=Радни оквир програма +Name[sr@Latn]=Radni okvir programa +Name[sv]=Programramverk +Name[tr]=Uygulama Çatısı +Name[zh_CN]=应用程序框架 +Name[zh_TW]=應用程式框架 +Icon=kappjava.png +Category=Java/KDE +Comment=Generates a simple Java KDE application with one toplevel window, menus and toolbars. +Comment[ca]=Genera una simple aplicació per al KDE en Java amb una finestra principal, menús i barres d'eines. +Comment[da]=Genererer et simpelt Java KDE program med et vindue på topniveau, menuer og værktøjslinjer. +Comment[de]=Erstellt eine einfache Java-KDE-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. +Comment[el]=Δημιουργεί μια απλή εφαρμογή Java του KDE με ένα ανώτερο παράθυρο, μενού, και γραμμές εργαλείων. +Comment[es]=Genera una sencilla aplicación para KDE en Java, con una ventana principal, menús y barras de herramientas. +Comment[et]=Lihtsa Java KDE rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. +Comment[eu]=Goi-mailako lehio bat, menuak eta tresna-barrak dituen Java KDE aplikazio bat sortzen du. +Comment[fa]=یک کاربرد سادۀ KDE جاوا با یک پنجرۀ سطح بالا، گزینگان و میله‌های ابزار تولید می‌کند. +Comment[fr]=Génère une application KDE simple en Java comprenant une fenêtre de premier niveau, des menus et des barres d'outils. +Comment[gl]=Xera unha aplicación sinxela KDE en Java cunha xanela principal, menús e barras de ferramentas. +Comment[hu]=Létrehoz egy egyszerű Java-alapú KDE-alkalmazást egy főablakkal, menükkel és eszköztárakkal. +Comment[it]=Genera una semplice applicazione KDE Java con una finestra toplevel, menu e barre degli strumenti. +Comment[nds]=Stellt en eenfach KDE-Programm in Java mit een böverst Finster, Menüs un Warktüüchbalkens op. +Comment[ne]=एउटा उच्चतह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण जाभा केडीई अनुप्रयोग उत्पन्न गर्दछ । +Comment[nl]=Genereert een eenvoudige Java KDE-toepassing met een toplevel window, menu's en toolbars. +Comment[pl]=Generuje prosty program KDE w Javie posiadający okno, menu i paski narzędzi. +Comment[pt]=Gera uma aplicação para KDE simples em Java, com uma janela de topo, menus e barras de ferramentas. +Comment[pt_BR]=Gera uma aplicação para KDE simples em Java, com uma janela de topo, menus e barras de ferramentas. +Comment[ru]=Создание простого приложения Java KDE с окном, меню и панелями инструментов. +Comment[sk]=Vygeneruje jednoduchú Java KDE aplikáciu s jedným oknom, menu a panelom nástrojov. +Comment[sr]=Прави једноставан Java KDE програм са једним прозором највишег нивоа, менијима и тракама са алатом. +Comment[sr@Latn]=Pravi jednostavan Java KDE program sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. +Comment[sv]=Skapar ett enkelt Java KDE-program med ett toppnivåfönster, menyer och verktygsrader. +Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir Java KDE uygulaması yaratır. +Comment[zh_CN]=生成一个简单的带有顶级窗口、菜单和工具栏的 Java KDE 应用程序。 +Comment[zh_TW]=產生一個簡單的 Java KDE 應用程式,內含頂層視窗、選單與工具列。 +FileTemplates=java,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAME}View.java +Archive=kappjava.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[DOCBOOK] +Type=include +File=%{tdevelop}/template-common/dockbook.kdevtemplate + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.java +Dest=%{dest}/src/%{APPNAME}.java + +[FILE16] +Type=install +Source=%{src}/appview.java +Dest=%{dest}/src/%{APPNAME}View.java + +[FILE17] +Type=install +Source=%{src}/pref.java +Dest=%{dest}/src/%{APPNAME}Preferences.java + +[FILE18] +Type=install +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + diff --git a/languages/java/app_templates/kappjava/kappjava.png b/languages/java/app_templates/kappjava/kappjava.png new file mode 100644 index 00000000..913ebb87 Binary files /dev/null and b/languages/java/app_templates/kappjava/kappjava.png differ diff --git a/languages/java/app_templates/kappjava/pref.java b/languages/java/app_templates/kappjava/pref.java new file mode 100644 index 00000000..a50fdb31 --- /dev/null +++ b/languages/java/app_templates/kappjava/pref.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) %{YEAR} %{AUTHOR} <%{EMAIL}> + */ + +import java.util.*; +import org.kde.qt.*; +import org.kde.koala.*; + +public class %{APPNAME}Preferences extends KDialogBase +{ +private %{APPNAME}PrefPageOne m_pageOne; +private %{APPNAME}PrefPageTwo m_pageTwo; + +public %{APPNAME}Preferences() +{ + super(TreeList, "%{APPNAME} Preferences", + Help|Default|Ok|Apply|Cancel, Ok); + + // this is the base class for your preferences dialog. it is now + // a Treelist dialog.. but there are a number of other + // possibilities (including Tab, Swallow, and just Plain) + QFrame frame; + frame = addPage(tr("First Page"), tr("Page One Options")); + m_pageOne = new %{APPNAME}PrefPageOne(frame); + + frame = addPage(tr("Second Page"), tr("Page Two Options")); + m_pageTwo = new %{APPNAME}PrefPageTwo(frame); +} + +public class %{APPNAME}PrefPageOne extends QFrame { +public %{APPNAME}PrefPageOne(QWidget parent) +{ + super(parent); + QHBoxLayout layout = new QHBoxLayout(this); + layout.setAutoAdd(true); + + new QLabel("Add something here", this); +} +} + +public class %{APPNAME}PrefPageTwo extends QFrame { +public %{APPNAME}PrefPageTwo(QWidget parent) +{ + super(parent); + QHBoxLayout layout = new QHBoxLayout(this); + layout.setAutoAdd(true); + + new QLabel("Add something here", this); +} +} + +} diff --git a/languages/java/app_templates/kappjava/src-Makefile.am b/languages/java/app_templates/kappjava/src-Makefile.am new file mode 100644 index 00000000..6468994c --- /dev/null +++ b/languages/java/app_templates/kappjava/src-Makefile.am @@ -0,0 +1,18 @@ +## Makefile.am for %{APPNAMELC} + +JAVAROOT = . + +# which sources should be compiled for %{APPNAMELC} +java_JAVA = %{APPNAME}.java %{APPNAME}View.java \ + %{APPNAME}Preferences.java + + +KDE_ICON = %{APPNAMELC} + +# this is where the kdelnk file will go +kdelnkdir = $(kde_appsdir)/Utilities +kdelnk_DATA = %{APPNAMELC}.desktop + +# this is where the XML-GUI resource file goes +rcdir = $(kde_datadir)/%{APPNAMELC} +rc_DATA = %{APPNAMELC}ui.rc diff --git a/languages/java/app_templates/kappjava/subdirs b/languages/java/app_templates/kappjava/subdirs new file mode 100644 index 00000000..0e678106 --- /dev/null +++ b/languages/java/app_templates/kappjava/subdirs @@ -0,0 +1,3 @@ +doc +po +src diff --git a/languages/java/app_templates/superwaba/CMakeLists.txt b/languages/java/app_templates/superwaba/CMakeLists.txt index ea9517be..58932352 100644 --- a/languages/java/app_templates/superwaba/CMakeLists.txt +++ b/languages/java/app_templates/superwaba/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( superwaba.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/superwaba.tar.gz superwaba.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - superwaba.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + superwaba.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/java/app_templates/superwaba/Makefile.am b/languages/java/app_templates/superwaba/Makefile.am index c9c6aa99..bc706fe6 100644 --- a/languages/java/app_templates/superwaba/Makefile.am +++ b/languages/java/app_templates/superwaba/Makefile.am @@ -2,10 +2,10 @@ dataFiles = superwaba.png sw.java src-Makefile sw.tdevelop sw.filelist templateName = superwaba ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/java/app_templates/superwaba/superwaba.kdevtemplate b/languages/java/app_templates/superwaba/superwaba.kdevtemplate new file mode 100644 index 00000000..27257770 --- /dev/null +++ b/languages/java/app_templates/superwaba/superwaba.kdevtemplate @@ -0,0 +1,166 @@ +# KDE Config File +[General] +Name=SuperWaba +Name[ne]=सुपरवाभा +Icon=superwaba.png +Category=Java +Comment=A simple template for building SuperWaba Java based apps on WinCE and PalmOS. More information can be found at http://www.superwaba.org +Comment[ca]=Una simple plantilla per a construir aplicacions basades en SuperWaba Java per a WinCE i PalmOS. Podeu trobar més informació a http://www.superwaba.org +Comment[da]=En simpel skabelon til at bygge SuperWaba Java baserede programmer på WinCE og PalmOS. Mere information kan findes på http://www.superwaba.org +Comment[de]=Eine einfache Vorlage zum Erstellen von auf Java basierenden SuperWaba-Anwendungen unter WinCE und PalmOS. Weitere Informationen erhalten Sie auf http://www.superwaba.org. +Comment[el]=Ένα απλό πρότυπο για την κατασκευή εφαρμογών SuperWaba Java για τα WinCE και PalmOS. Περισσότερες πληροφορίες μπορούν να βρεθούν στο http://www.superwaba.org +Comment[es]=Una plantilla sencilla para crear aplicaciones basadas en SuperWaba Java para WinCE y PalmOS. Puede encontrar más información en http://www.superwaba.org +Comment[et]=Lihtne mall rakenduste loomiseks SuperWaba Java põhjal WinCE ja PalmOS'i tarbeks. Rohkem infot annab http://www.superwaba.org +Comment[eu]=WinCE eta PalmOS sistema eragileetan SuperWaba Javan oinarritutako aplikazioak sortzeko txantiloi sinple bat. Informazio gehiagorako: http://www.superwaba.org +Comment[fa]=یک قالب ساده برای ساختن کاربردهای بر مبنای SuperWaba جاوا روی WinCE و PalmOS. اطلاعات بیشتر می‌تواند در http://www.superwaba.org یافت شود +Comment[fr]=Un modèle simple pour construire des applications basées sur Java SuperWaba pour WinCE et PalmOS. Vous trouverez plus d'informations sur http://www.superwaba.org +Comment[gl]=Un modelo sinxelo para crear aplicacións SuperWaba baseadas en Java para WinCE e PalmOS. Pode atopar máis información en http://www.superwaba.org +Comment[hu]=Egyszerű sablon SuperWaba Java-alkalmazások készítéséhez, WinCE és PalmOS platformra. Részletes információ itt található: http://www.superwaba.org +Comment[it]=Un semplice modello per compilare applicazioni Java SuperWaba basato su WinCE e PalmOS. Ulteriori informazioni possono essere trovate visitando http://www.superwaba.org/ +Comment[nds]=En eenfach Vörlaag för't Opstellen vun op WinCE un PalmOS opbuut SuperWaba-Programmen. Mehr Informatschonen laat sik op http://www.superwaba.org finnen +Comment[ne]=WinCE र PalmOS मा सुपरवाभा जाभा आधारित अनुप्रयोग निर्माणका लागि साधारण टेम्प्लेट । बढी जानकारी http://www.superwaba.org मा फेला पार्न सकिन्छ । +Comment[nl]=Een eenvouidg sjabloon voor het bouwen van SuperWaba Java-gebaseerde toepassingen op WinCE en PalmOS. Meer informatie vindt u op http://www.superwaba.org. +Comment[pl]=Prosty szablon do budowania programów w Javie wykorzystujących SuperWaba w środowiskach WinCE oraz PalmOS. Więcej informacji można znaleźć na stronie http://www.superwaba.org +Comment[pt]=Um modelo simples para criara aplicações Java, baseadas no SuperWaba, para o WinCE e o PalmOS. Poderá encontrar mais informações em http://www.superwaba.org +Comment[pt_BR]=Um modelo simples para criara aplicações Java, baseadas no SuperWaba, para o WinCE e o PalmOS. Poderá encontrar mais informações em http://www.superwaba.org +Comment[ru]=Создание приложения SuperWaba Java для устройств WinCE и PalmOS. Дополнительную информацию можно найти на http://www.superwaba.org +Comment[sk]=Jednoduchá šablóna pre vytváranie SuperWaba Java Aplikácií na WinCE a PalmOS. Viac informácií môžte nájsť na http://www.superwaba.org +Comment[sr]=Једноставан шаблон за градњу SuperWaba програма на основу Java-е, за WinCE и PalmOS. Више информација на http://www.superwaba.org +Comment[sr@Latn]=Jednostavan šablon za gradnju SuperWaba programa na osnovu Java-e, za WinCE i PalmOS. Više informacija na http://www.superwaba.org +Comment[sv]=En enkel mall för att bygga SuperWaba Java-baserade program på WinCE och PalmOS. Mer information hittas på http://www.superwaba.org. +Comment[tr]=WinCE ve PalmOS üstünde SuperWaba tabanlı Java uygulamarı yapmak için basit bir şablon. Daha fazla bilgi http://www.superwaba.org/ adresinde bulunabilir. +Comment[zh_CN]=在 WinCE 和 PalmOS 上构建基于 SuperWaba Java 应用程序的简单模板。更多信息可以在 http://www.superwaba.org 找到 +Comment[zh_TW]=一個簡單的建立在 WinCE 與 PalmOS 上執行的 SuperWaba Java 應用程式。您可以在 http://www.superwaba.org 取得更多資訊。 +FileTemplates=java +ShowFilesAfterGeneration=%{dest}/%{APPNAME}.java +Archive=superwaba.tar.gz + +[JAVA] +Type=value +Value=JAVA +Comment=Path to your java root +Comment[ca]=Ruta cap a la vostra arrel Java +Comment[da]=Sti til din java-rod +Comment[de]=Pfad zum Stammordner von Java +Comment[el]=Διαδρομή στο κατάλογό σας της java +Comment[es]=Ruta a su carpeta raíz Java +Comment[et]=Java juurkataloogi asukoht +Comment[eu]=Zure java erroaren bide-izena +Comment[fa]=مسیر ریشۀ جاوای شما +Comment[fr]=Chemin vers votre racine Java +Comment[gl]=Ruta a súa instalación de java +Comment[hu]=A Java-alapkönyvtár elérési útja +Comment[it]=Percorso alla radice java +Comment[ja]=Java ルートへのパス +Comment[nds]=Padd na Dien Java-Wörtelorner +Comment[ne]=तपाईँको जाभा रूटको मार्ग +Comment[nl]=Pad naar uw Java-hoofdmap +Comment[pl]=Ścieżka do głównego katalogu Javy +Comment[pt]=A localização de base do seu Java +Comment[pt_BR]=A localização de base do seu Java +Comment[ru]=Путь к корневому каталогу Java +Comment[sk]=Cesta ku java koreňu +Comment[sr]=Путања до вашег корена Java-е +Comment[sr@Latn]=Putanja do vašeg korena Java-e +Comment[sv]=Sökväg till Java-rotkatalog +Comment[zh_CN]=您的 Java 根路径 +Comment[zh_TW]=您的 java 根路徑 +Default=/usr/lib/java +ValueType=QString + +[WABA] +Type=value +Value=WABA +Comment=Path to your SuperWaba root +Comment[ca]=Ruta cap a la vostra arrel SuperWaba +Comment[da]=Sti til din SuperWaba-rod +Comment[de]=Pfad zum Stammordner von SuperWaba +Comment[el]=Διαδρομή στο κατάλογό σας της SuperWaba +Comment[es]=Ruta a su carpeta raíz de SuperWaba +Comment[et]=SuperWaba juurkataloogi asukoht +Comment[eu]=Zure SuperWaba erroaren bide-izena +Comment[fa]=مسیر ریشۀ SuperWaba شما +Comment[fr]=Chemin vers votre racine SuperWaba +Comment[gl]=Ruta a súa instalación de SuperWaba +Comment[hu]=A SuperWaba-alapkönyvtár elérési útja +Comment[it]=Percorso alla radice SuperWaba +Comment[ja]=SuperWaba ルートへのパス +Comment[nds]=Padd na Dien SuperWaba-Wörtelorner +Comment[ne]=तपाईँको सुपरवाभा रूटको मार्ग +Comment[nl]=Pad naar uw SuperWaba-hoofdmap +Comment[pl]=Ścieżka do głównego katalogu SuperWaba +Comment[pt]=A localização de base do seu SuperWaba +Comment[pt_BR]=A localização de base do seu SuperWaba +Comment[ru]=Путь к корневому каталогу SuperWaba +Comment[sk]=Cesta ku SuperWaba koreňu +Comment[sr]=Путања до вашег корена SuperWaba-е +Comment[sr@Latn]=Putanja do vašeg korena SuperWaba-e +Comment[sv]=Sökväg till SuperWaba-rotkatalog +Comment[tr]=SuperWaba kök dizininizin yolu +Comment[zh_CN]=您的 SuperWaba 根路径 +Comment[zh_TW]=您的 SuperWaba 根路徑 +Default=/usr/lib +ValueType=QString + +[GNU] +Type=install archive +Source=%{tdevelop}/template-common/gnu.tar.gz +Dest=%{dest} + +[PROJECT] +Type=install +EscapeXML=true +Source=%{src}/sw.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILELIST] +Type=install +Source=%{src}/sw.filelist +Dest=%{dest}/%{APPNAMELC}.filelist + +[MAKEFILE] +Type=install +Source=%{src}/src-Makefile +Dest=%{dest}/Makefile + +[SOURCE] +Type=install +Source=%{src}/sw.java +Dest=%{dest}/%{APPNAME}.java + +[MESSAGE] +Type=Message +Comment=Your application is setup to build. Edit the make targets to customize the file. +Comment[ca]=La vostra aplicació està llesta per a ser construïda. Editeu els objectius de make per a personalitzar el fitxer. +Comment[da]=Dit program er parat til at blive bygget. Redigér make targets for at indstille filen. +Comment[de]=Ihre Anwendung ist bereit für das Erstellen. Bearbeiten Sie die Make-Targets, um die Datei an Ihre Bedürfnisse anzupassen. +Comment[el]=Η εφαρμογή σας έχει ρυθμιστεί για κατασκευή. Επεξεργαστείτε τους προορισμούς κατασκευής για την προσαρμογή του αρχείου. +Comment[en_GB]=Your application is setup to build. Edit the make targets to customise the file. +Comment[es]=Su aplicación está lista para ser construída. Edite los objetivos make para personalizar el archivo. +Comment[et]=Rakendus on ehitamiseks valmis. Faili kohandamiseks redigeeri ehitamise sihtmärke. +Comment[eu]=Zure aplikazioa eraikitzeko konfiguratu da. Editatu make-en helburuak fitxategia pertsonalizatzeko. +Comment[fa]=کاربرد شما برای ساختن برپا می‌شود. برای سفارشی کردن پرونده، هدفهای make را ویرایش کنید. +Comment[fr]=Votre application est prête à être construite. Modifiez les cibles de « make » pour personnaliser le fichier. +Comment[gl]=A súa aplicación esta configurada para compilar. Edite os obxectivos make para persoalizalo ficheiro. +Comment[hu]=Az alkalmazás készen áll a lefordításra. A make-célpontok szerkeszthetők, ha szükséges. +Comment[it]=L'applicazione è configurata per compilare. Modifica i target di make per personalizzare il file. +Comment[nds]=Dien Programm kann opstellt warrn. Bewerk de "Make"-Telen för't Topassen vun de Datei. +Comment[ne]=तपाईँको अनुप्रयोग निर्माण गर्नका लागि सेटअप भएको छ । फाइललाई अनुकूल गर्नका लागि मेक तार्गेटलाई सम्पादन गर्नुहोस् । +Comment[nl]=Uw toepassing kan worden gebouwd. Bewerk de make targets om het bestand naar eigen inzicht aan te passen. +Comment[pl]=Program skonfigurowany. Dostosowanie pliku do własnych potrzeb jest możliwe przez modyfikację celów make. +Comment[pt]=A sua aplicação está preparada para ser compilada. Edite os alvos do 'make' para personalizar o ficheiro. +Comment[pt_BR]=A sua aplicação está preparada para ser compilada. Edite os alvos do 'make' para personalizar o ficheiro. +Comment[ru]=Ваше приложение готово для сборки. +Comment[sk]=Aplikácia je pripravená na build. Môžte si prispôsobiť make ciele. +Comment[sr]=Ваш програм је спреман за градњу. Уредите циљеве справљача да бисте прилагодили фајл. +Comment[sr@Latn]=Vaš program je spreman za gradnju. Uredite ciljeve spravljača da biste prilagodili fajl. +Comment[sv]=Programmet är inställt att byggas. Redigera byggmålen för att anpassa filen. +Comment[tr]=Uygulamanız derlenmeye hazır. Dosyayı özelleştirmek için make hedeflerini düzenleyin. +Comment[zh_CN]=您的应用程序已设置为构建。编辑 make 目标可自定义文件。 +Comment[zh_TW]=您的應用程式已設定好可建立了。請編輯 make 目標來調整檔案。 +Archive=superwaba.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + diff --git a/languages/java/app_templates/superwaba/superwaba.tdevtemplate b/languages/java/app_templates/superwaba/superwaba.tdevtemplate deleted file mode 100644 index e792af35..00000000 --- a/languages/java/app_templates/superwaba/superwaba.tdevtemplate +++ /dev/null @@ -1,166 +0,0 @@ -# KDE Config File -[General] -Name=SuperWaba -Name[ne]=सुपरवाभा -Icon=superwaba.png -Category=Java -Comment=A simple template for building SuperWaba Java based apps on WinCE and PalmOS. More information can be found at http://www.superwaba.org -Comment[ca]=Una simple plantilla per a construir aplicacions basades en SuperWaba Java per a WinCE i PalmOS. Podeu trobar més informació a http://www.superwaba.org -Comment[da]=En simpel skabelon til at bygge SuperWaba Java baserede programmer på WinCE og PalmOS. Mere information kan findes på http://www.superwaba.org -Comment[de]=Eine einfache Vorlage zum Erstellen von auf Java basierenden SuperWaba-Anwendungen unter WinCE und PalmOS. Weitere Informationen erhalten Sie auf http://www.superwaba.org. -Comment[el]=Ένα απλό πρότυπο για την κατασκευή εφαρμογών SuperWaba Java για τα WinCE και PalmOS. Περισσότερες πληροφορίες μπορούν να βρεθούν στο http://www.superwaba.org -Comment[es]=Una plantilla sencilla para crear aplicaciones basadas en SuperWaba Java para WinCE y PalmOS. Puede encontrar más información en http://www.superwaba.org -Comment[et]=Lihtne mall rakenduste loomiseks SuperWaba Java põhjal WinCE ja PalmOS'i tarbeks. Rohkem infot annab http://www.superwaba.org -Comment[eu]=WinCE eta PalmOS sistema eragileetan SuperWaba Javan oinarritutako aplikazioak sortzeko txantiloi sinple bat. Informazio gehiagorako: http://www.superwaba.org -Comment[fa]=یک قالب ساده برای ساختن کاربردهای بر مبنای SuperWaba جاوا روی WinCE و PalmOS. اطلاعات بیشتر می‌تواند در http://www.superwaba.org یافت شود -Comment[fr]=Un modèle simple pour construire des applications basées sur Java SuperWaba pour WinCE et PalmOS. Vous trouverez plus d'informations sur http://www.superwaba.org -Comment[gl]=Un modelo sinxelo para crear aplicacións SuperWaba baseadas en Java para WinCE e PalmOS. Pode atopar máis información en http://www.superwaba.org -Comment[hu]=Egyszerű sablon SuperWaba Java-alkalmazások készítéséhez, WinCE és PalmOS platformra. Részletes információ itt található: http://www.superwaba.org -Comment[it]=Un semplice modello per compilare applicazioni Java SuperWaba basato su WinCE e PalmOS. Ulteriori informazioni possono essere trovate visitando http://www.superwaba.org/ -Comment[nds]=En eenfach Vörlaag för't Opstellen vun op WinCE un PalmOS opbuut SuperWaba-Programmen. Mehr Informatschonen laat sik op http://www.superwaba.org finnen -Comment[ne]=WinCE र PalmOS मा सुपरवाभा जाभा आधारित अनुप्रयोग निर्माणका लागि साधारण टेम्प्लेट । बढी जानकारी http://www.superwaba.org मा फेला पार्न सकिन्छ । -Comment[nl]=Een eenvouidg sjabloon voor het bouwen van SuperWaba Java-gebaseerde toepassingen op WinCE en PalmOS. Meer informatie vindt u op http://www.superwaba.org. -Comment[pl]=Prosty szablon do budowania programów w Javie wykorzystujących SuperWaba w środowiskach WinCE oraz PalmOS. Więcej informacji można znaleźć na stronie http://www.superwaba.org -Comment[pt]=Um modelo simples para criara aplicações Java, baseadas no SuperWaba, para o WinCE e o PalmOS. Poderá encontrar mais informações em http://www.superwaba.org -Comment[pt_BR]=Um modelo simples para criara aplicações Java, baseadas no SuperWaba, para o WinCE e o PalmOS. Poderá encontrar mais informações em http://www.superwaba.org -Comment[ru]=Создание приложения SuperWaba Java для устройств WinCE и PalmOS. Дополнительную информацию можно найти на http://www.superwaba.org -Comment[sk]=Jednoduchá šablóna pre vytváranie SuperWaba Java Aplikácií na WinCE a PalmOS. Viac informácií môžte nájsť na http://www.superwaba.org -Comment[sr]=Једноставан шаблон за градњу SuperWaba програма на основу Java-е, за WinCE и PalmOS. Више информација на http://www.superwaba.org -Comment[sr@Latn]=Jednostavan šablon za gradnju SuperWaba programa na osnovu Java-e, za WinCE i PalmOS. Više informacija na http://www.superwaba.org -Comment[sv]=En enkel mall för att bygga SuperWaba Java-baserade program på WinCE och PalmOS. Mer information hittas på http://www.superwaba.org. -Comment[tr]=WinCE ve PalmOS üstünde SuperWaba tabanlı Java uygulamarı yapmak için basit bir şablon. Daha fazla bilgi http://www.superwaba.org/ adresinde bulunabilir. -Comment[zh_CN]=在 WinCE 和 PalmOS 上构建基于 SuperWaba Java 应用程序的简单模板。更多信息可以在 http://www.superwaba.org 找到 -Comment[zh_TW]=一個簡單的建立在 WinCE 與 PalmOS 上執行的 SuperWaba Java 應用程式。您可以在 http://www.superwaba.org 取得更多資訊。 -FileTemplates=java -ShowFilesAfterGeneration=%{dest}/%{APPNAME}.java -Archive=superwaba.tar.gz - -[JAVA] -Type=value -Value=JAVA -Comment=Path to your java root -Comment[ca]=Ruta cap a la vostra arrel Java -Comment[da]=Sti til din java-rod -Comment[de]=Pfad zum Stammordner von Java -Comment[el]=Διαδρομή στο κατάλογό σας της java -Comment[es]=Ruta a su carpeta raíz Java -Comment[et]=Java juurkataloogi asukoht -Comment[eu]=Zure java erroaren bide-izena -Comment[fa]=مسیر ریشۀ جاوای شما -Comment[fr]=Chemin vers votre racine Java -Comment[gl]=Ruta a súa instalación de java -Comment[hu]=A Java-alapkönyvtár elérési útja -Comment[it]=Percorso alla radice java -Comment[ja]=Java ルートへのパス -Comment[nds]=Padd na Dien Java-Wörtelorner -Comment[ne]=तपाईँको जाभा रूटको मार्ग -Comment[nl]=Pad naar uw Java-hoofdmap -Comment[pl]=Ścieżka do głównego katalogu Javy -Comment[pt]=A localização de base do seu Java -Comment[pt_BR]=A localização de base do seu Java -Comment[ru]=Путь к корневому каталогу Java -Comment[sk]=Cesta ku java koreňu -Comment[sr]=Путања до вашег корена Java-е -Comment[sr@Latn]=Putanja do vašeg korena Java-e -Comment[sv]=Sökväg till Java-rotkatalog -Comment[zh_CN]=您的 Java 根路径 -Comment[zh_TW]=您的 java 根路徑 -Default=/usr/lib/java -ValueType=QString - -[WABA] -Type=value -Value=WABA -Comment=Path to your SuperWaba root -Comment[ca]=Ruta cap a la vostra arrel SuperWaba -Comment[da]=Sti til din SuperWaba-rod -Comment[de]=Pfad zum Stammordner von SuperWaba -Comment[el]=Διαδρομή στο κατάλογό σας της SuperWaba -Comment[es]=Ruta a su carpeta raíz de SuperWaba -Comment[et]=SuperWaba juurkataloogi asukoht -Comment[eu]=Zure SuperWaba erroaren bide-izena -Comment[fa]=مسیر ریشۀ SuperWaba شما -Comment[fr]=Chemin vers votre racine SuperWaba -Comment[gl]=Ruta a súa instalación de SuperWaba -Comment[hu]=A SuperWaba-alapkönyvtár elérési útja -Comment[it]=Percorso alla radice SuperWaba -Comment[ja]=SuperWaba ルートへのパス -Comment[nds]=Padd na Dien SuperWaba-Wörtelorner -Comment[ne]=तपाईँको सुपरवाभा रूटको मार्ग -Comment[nl]=Pad naar uw SuperWaba-hoofdmap -Comment[pl]=Ścieżka do głównego katalogu SuperWaba -Comment[pt]=A localização de base do seu SuperWaba -Comment[pt_BR]=A localização de base do seu SuperWaba -Comment[ru]=Путь к корневому каталогу SuperWaba -Comment[sk]=Cesta ku SuperWaba koreňu -Comment[sr]=Путања до вашег корена SuperWaba-е -Comment[sr@Latn]=Putanja do vašeg korena SuperWaba-e -Comment[sv]=Sökväg till SuperWaba-rotkatalog -Comment[tr]=SuperWaba kök dizininizin yolu -Comment[zh_CN]=您的 SuperWaba 根路径 -Comment[zh_TW]=您的 SuperWaba 根路徑 -Default=/usr/lib -ValueType=QString - -[GNU] -Type=install archive -Source=%{tdevelop}/template-common/gnu.tar.gz -Dest=%{dest} - -[PROJECT] -Type=install -EscapeXML=true -Source=%{src}/sw.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILELIST] -Type=install -Source=%{src}/sw.filelist -Dest=%{dest}/%{APPNAMELC}.filelist - -[MAKEFILE] -Type=install -Source=%{src}/src-Makefile -Dest=%{dest}/Makefile - -[SOURCE] -Type=install -Source=%{src}/sw.java -Dest=%{dest}/%{APPNAME}.java - -[MESSAGE] -Type=Message -Comment=Your application is setup to build. Edit the make targets to customize the file. -Comment[ca]=La vostra aplicació està llesta per a ser construïda. Editeu els objectius de make per a personalitzar el fitxer. -Comment[da]=Dit program er parat til at blive bygget. Redigér make targets for at indstille filen. -Comment[de]=Ihre Anwendung ist bereit für das Erstellen. Bearbeiten Sie die Make-Targets, um die Datei an Ihre Bedürfnisse anzupassen. -Comment[el]=Η εφαρμογή σας έχει ρυθμιστεί για κατασκευή. Επεξεργαστείτε τους προορισμούς κατασκευής για την προσαρμογή του αρχείου. -Comment[en_GB]=Your application is setup to build. Edit the make targets to customise the file. -Comment[es]=Su aplicación está lista para ser construída. Edite los objetivos make para personalizar el archivo. -Comment[et]=Rakendus on ehitamiseks valmis. Faili kohandamiseks redigeeri ehitamise sihtmärke. -Comment[eu]=Zure aplikazioa eraikitzeko konfiguratu da. Editatu make-en helburuak fitxategia pertsonalizatzeko. -Comment[fa]=کاربرد شما برای ساختن برپا می‌شود. برای سفارشی کردن پرونده، هدفهای make را ویرایش کنید. -Comment[fr]=Votre application est prête à être construite. Modifiez les cibles de « make » pour personnaliser le fichier. -Comment[gl]=A súa aplicación esta configurada para compilar. Edite os obxectivos make para persoalizalo ficheiro. -Comment[hu]=Az alkalmazás készen áll a lefordításra. A make-célpontok szerkeszthetők, ha szükséges. -Comment[it]=L'applicazione è configurata per compilare. Modifica i target di make per personalizzare il file. -Comment[nds]=Dien Programm kann opstellt warrn. Bewerk de "Make"-Telen för't Topassen vun de Datei. -Comment[ne]=तपाईँको अनुप्रयोग निर्माण गर्नका लागि सेटअप भएको छ । फाइललाई अनुकूल गर्नका लागि मेक तार्गेटलाई सम्पादन गर्नुहोस् । -Comment[nl]=Uw toepassing kan worden gebouwd. Bewerk de make targets om het bestand naar eigen inzicht aan te passen. -Comment[pl]=Program skonfigurowany. Dostosowanie pliku do własnych potrzeb jest możliwe przez modyfikację celów make. -Comment[pt]=A sua aplicação está preparada para ser compilada. Edite os alvos do 'make' para personalizar o ficheiro. -Comment[pt_BR]=A sua aplicação está preparada para ser compilada. Edite os alvos do 'make' para personalizar o ficheiro. -Comment[ru]=Ваше приложение готово для сборки. -Comment[sk]=Aplikácia je pripravená na build. Môžte si prispôsobiť make ciele. -Comment[sr]=Ваш програм је спреман за градњу. Уредите циљеве справљача да бисте прилагодили фајл. -Comment[sr@Latn]=Vaš program je spreman za gradnju. Uredite ciljeve spravljača da biste prilagodili fajl. -Comment[sv]=Programmet är inställt att byggas. Redigera byggmålen för att anpassa filen. -Comment[tr]=Uygulamanız derlenmeye hazır. Dosyayı özelleştirmek için make hedeflerini düzenleyin. -Comment[zh_CN]=您的应用程序已设置为构建。编辑 make 目标可自定义文件。 -Comment[zh_TW]=您的應用程式已設定好可建立了。請編輯 make 目標來調整檔案。 -Archive=superwaba.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - diff --git a/languages/java/app_templates/superwaba/sw.tdevelop b/languages/java/app_templates/superwaba/sw.tdevelop index 029d3af3..11db7411 100644 --- a/languages/java/app_templates/superwaba/sw.tdevelop +++ b/languages/java/app_templates/superwaba/sw.tdevelop @@ -4,17 +4,17 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Java - TDevDebugger + KDevDebugger Java Code - + make test @@ -34,14 +34,14 @@ - - + + - - + + bash bash_bugs @@ -85,10 +85,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/java/app_templates/tdeappjava/CMakeLists.txt b/languages/java/app_templates/tdeappjava/CMakeLists.txt deleted file mode 100644 index 578b6e9d..00000000 --- a/languages/java/app_templates/tdeappjava/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_custom_target( tdeappjava.tar.gz ALL - COMMAND tar zcf tdeappjava.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - app.java pref.java appview.java app_client.java appui.rc - src-Makefile.am tdeappjava.png app.tdevelop subdirs -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdeappjava.tar.gz tdeappjava.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdeappjava.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/java/app_templates/tdeappjava/Makefile.am b/languages/java/app_templates/tdeappjava/Makefile.am deleted file mode 100644 index 889abb5a..00000000 --- a/languages/java/app_templates/tdeappjava/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -dataFiles = app.java pref.java appview.java app_client.java appui.rc \ - src-Makefile.am tdeappjava.png app.tdevelop subdirs -templateName = tdeappjava - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(templateName).tar.gz: ${dataFiles} - $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} - $(GZIP_COMMAND) -f9 $(templateName).tar - -archivedir = ${appwizarddatadir} -archive_DATA = $(templateName).tar.gz ${templateName}.png - -CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/java/app_templates/tdeappjava/app.desktop b/languages/java/app_templates/tdeappjava/app.desktop deleted file mode 100644 index 3cc75ad8..00000000 --- a/languages/java/app_templates/tdeappjava/app.desktop +++ /dev/null @@ -1,41 +0,0 @@ -[Desktop Entry] -Name=%{APPNAME} -Exec=%{APPNAMELC} %i -caption "%c" -Icon=%{APPNAMELC} -Type=Application -DocPath=%{APPNAMELC}/%{APPNAMELC}.html -Comment=A Java TDE KPart Application -Comment[ca]=Una aplicació KPart en Java per al TDE -Comment[da]=Et Java TDE KPart-program -Comment[de]=Eine TDE-Komponten-Anwendung in Java -Comment[el]=Μια εφαρμογή Java TDE KPart -Comment[es]=Una aplicación KPart en Java para TDE -Comment[et]=Java TDE KPart rakendus -Comment[eu]=Java TDE KPart aplikazio bat -Comment[fa]=یک کاربرد TDE KPart جاوا -Comment[fr]=Une application KPart en JAVA pour TDE -Comment[ga]=Feidhmchlár KPart TDE i Java -Comment[gl]=Unha aplicación KPart de TDE en Java -Comment[hi]=एक जावा केडीई के-पार्ट अनुप्रयोग -Comment[hu]=Java-ban írt, KPart-alapú TDE-alkalmazás -Comment[is]=Java TDE KPart forrit -Comment[it]=Un'applicazione Java TDE KPart -Comment[ja]= Java TDE KPart アプリケーション -Comment[nds]=En TDE-Programm in Java -Comment[ne]=जाभा केडीई KPart अनुप्रयोग -Comment[nl]=Een Java TDE KPart-toepassing -Comment[pl]=Element osadzalny KPart Javy -Comment[pt]=Uma Aplicação TDE KPart em Java -Comment[pt_BR]=Um Aplicativo KPart do TDE para Java -Comment[ru]=Приложение KPart для TDE на Java -Comment[sk]=Java TDE KPart aplikácia -Comment[sl]=Program za Javo TDE KPart -Comment[sr]=Java TDE KPart програм -Comment[sr@Latn]=Java TDE KPart program -Comment[sv]=Ett Java TDE Kpart-program -Comment[ta]=ஜாவா கெடி கெபாகம் பயன்பாடு -Comment[tg]=Гузориш KPart барои TDE дар Java -Comment[tr]=Bir Java TDE KPart Uygulaması -Comment[zh_CN]=一个 Java TDE KPart 应用程序 -Comment[zh_TW]=Java TDE KPart 應用程式 -Terminal=false diff --git a/languages/java/app_templates/tdeappjava/app.java b/languages/java/app_templates/tdeappjava/app.java deleted file mode 100644 index 40bc6b93..00000000 --- a/languages/java/app_templates/tdeappjava/app.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright (C) %{YEAR} %{AUTHOR} <%{EMAIL}> - */ - -import java.util.*; -import org.kde.qt.*; -import org.kde.koala.*; - -/** - * This class serves as the main window for %{APPNAME}. It handles the - * menus, toolbars, and status bars. - * - * @short Main window class - * @author $AUTHOR <$EMAIL> - * @version $APP_VERSION - */ -public class %{APPNAME} extends TDEMainWindow -{ - private %{APPNAME}View m_view; - private QPrinter m_printer; - -%{APPNAME}() -{ - super( null, "%{APPNAME}" ); - m_view = new %{APPNAME}View(this); - m_printer = new QPrinter(); - // accept dnd - setAcceptDrops(true); - - // tell the TDEMainWindow that this is indeed the main widget - setCentralWidget(m_view); - - // then, setup our actions - setupActions(); - - // and a status bar - statusBar().show(); - - // Apply the create the main window and ask the mainwindow to - // automatically save settings if changed: window size, toolbar - // position, icon size, etc. Also to add actions for the statusbar - // toolbar, and keybindings if necessary. - setupGUI(); - - // allow the view to change the statusbar and caption - connect(m_view, SIGNAL("signalChangeStatusbar(String)"), - this, SLOT("changeStatusbar(String)")); - connect(m_view, SIGNAL("signalChangeCaption(String)"), - this, SLOT("changeCaption(String)")); - -} - -public void load(KURL url) -{ - StringBuffer target = new StringBuffer(); - // the below code is what you should normally do. in this - // example case, we want the url to our own. you probably - // want to use this code instead for your app - - // download the contents - if (NetAccess.download(url, target, null)) - { - // set our caption - setCaption(url.fileName()); - - // load in the file (target is always local) -// loadFile(target); - - // and remove the temp file - NetAccess.removeTempFile(target.toString()); - } - - setCaption(url.url()); - m_view.openURL(url); -} - -public void setupActions() -{ - TDEApplication kapp = TDEApplication.kApplication(); - KStdAction.openNew(this, SLOT("fileNew()"), actionCollection()); - KStdAction.open(this, SLOT("fileOpen()"), actionCollection()); - KStdAction.save(this, SLOT("fileSave()"), actionCollection()); - KStdAction.saveAs(this, SLOT("fileSaveAs()"), actionCollection()); - KStdAction.print(this, SLOT("filePrint()"), actionCollection()); - KStdAction.quit(kapp, SLOT("quit()"), actionCollection()); - - KStdAction.preferences(this, SLOT("optionsPreferences()"), actionCollection()); - - // this doesn't do anything useful. it's just here to illustrate - // how to insert a custom menu and menu item - TDEAction custom = new TDEAction(tr("Cus&tom Menuitem"), new TDEShortcut(), - this, SLOT("optionsPreferences()"), - actionCollection(), "custom_action"); -} - -protected void saveProperties(TDEConfig config) -{ - // the 'config' object points to the session managed - // config file. anything you write here will be available - // later when this app is restored - - if (m_view.currentURL() != null) - config.writeEntry("lastURL", m_view.currentURL()); -} - -protected void readProperties(TDEConfig config) -{ - // the 'config' object points to the session managed - // config file. this function is automatically called whenever - // the app is being restored. read in here whatever you wrote - // in 'saveProperties' - - String url = config.readPathEntry("lastURL"); - - if (url != null) - m_view.openURL(new KURL(url)); -} - -protected void dragEnterEvent(QDragEnterEvent event) -{ - // accept uri drops only - event.accept(QUriDrag.canDecode(event)); -} - -protected void dropEvent(QDropEvent event) -{ - // this is a very simplistic implementation of a drop event. we - // will only accept a dropped URL. the Qt dnd code can do *much* - // much more, so please read the docs there - ArrayList uri = new ArrayList(); - - // see if we can decode a URI.. if not, just ignore it - if (QUriDrag.decode(event, (String[]) uri.toArray())) - { - // okay, we have a URI.. process it - String url, target; - url = (String) uri.get(0); - - // load in the file - load(new KURL(url)); - } -} - -private void fileNew() -{ - // this slot is called whenever the File.New menu is selected, - // the New shortcut is pressed (usually CTRL+N) or the New toolbar - // button is clicked - - // create a new window - (new %{APPNAME}()).show(); -} - -private void fileOpen() -{ - // this slot is called whenever the File.Open menu is selected, - // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar - // button is clicked - KURL url = KURLRequesterDlg.getURL(null, this, tr("Open Location") ); - if (!url.isEmpty()) - m_view.openURL(url); -} - -private void fileSave() -{ - // this slot is called whenever the File.Save menu is selected, - // the Save shortcut is pressed (usually CTRL+S) or the Save toolbar - // button is clicked - - // save the current file -} - -private void fileSaveAs() -{ - // this slot is called whenever the File.Save As menu is selected, - KURL file_url = KFileDialog.getSaveURL(); - if (!file_url.isEmpty() && file_url.isValid()) - { - // save your info, here - } -} - -private void filePrint() -{ - // this slot is called whenever the File.Print menu is selected, - // the Print shortcut is pressed (usually CTRL+P) or the Print toolbar - // button is clicked - if (m_printer == null) m_printer = new QPrinter(); - if (QPrintDialog.getPrinterSetup(m_printer)) - { - // setup the printer. with Qt, you always "print" to a - // QPainter.. whether the output medium is a pixmap, a screen, - // or paper - QPainter p = new QPainter(); - p.begin(m_printer); - - // we let our view do the actual printing - QPaintDeviceMetrics metrics = new QPaintDeviceMetrics(m_printer); - m_view.print(p, metrics.height(), metrics.width()); - - // and send the result to the printer - p.end(); - } -} - -private void optionsPreferences() -{ - // popup some sort of preference dialog, here - %{APPNAME}Preferences dlg = new %{APPNAME}Preferences(); - if (dlg.exec() != 0) - { - // redo your settings - } -} - -private void changeStatusbar(String text) -{ - // display the text on the statusbar - statusBar().message(text); -} - -private void changeCaption(String text) -{ - // display the text on the caption - setCaption(text); -} - -static String description = - "A KDE Application"; - -static String version = "%{VERSION}"; - -static String[][] options = -{ - { "+[URL]", "Document to open.", null } -}; - -static void main(String[] cmdLineArgs) -{ - TDEAboutData about = new TDEAboutData("%{APPNAMELC}", "%{APPNAME}", version, description, - TDEAboutData.License_%{LICENSE}, "(C) %{YEAR} %{AUTHOR}", null, null, "%{EMAIL}"); - about.addAuthor( "%{AUTHOR}", null, "%{EMAIL}" ); - TDECmdLineArgs.init(cmdLineArgs, about); - TDECmdLineArgs.addCmdLineOptions(options); - TDEApplication app = new TDEApplication(); - - // see if we are starting with session management - if (app.isRestored()) - RESTORE("%{APPNAME}"); - else - { - // no session.. just start up normally - TDECmdLineArgs args = TDECmdLineArgs.parsedArgs(); - if (args.count() == 0) - { - %{APPNAME} widget = new %{APPNAME}(); - widget.show(); - } - else - { - int i = 0; - for (; i < args.count(); i++) - { - %{APPNAME} widget = new %{APPNAME}(); - widget.show(); - widget.load(args.url(i)); - } - } - args.clear(); - } - - app.exec(); - return; -} - - static { - qtjava.initialize(); - kdejava.initialize(); - } -} - diff --git a/languages/java/app_templates/tdeappjava/app.tdevelop b/languages/java/app_templates/tdeappjava/app.tdevelop deleted file mode 100644 index 1e07dec0..00000000 --- a/languages/java/app_templates/tdeappjava/app.tdevelop +++ /dev/null @@ -1,88 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevAutoProject - Java - - Java - Code - Qt - KDE - - - - - src/java - - - src/%{APPNAMELC} - - - - - - - - - - - - - - - - - - ada - ada_bugs_gcc - bash - bash_bugs - c++_bugs_gcc - clanlib - w3c-dom-level2-html - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - libc - libstdc++ - opengl - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - ruby - ruby_bugs - sdl - stl - w3c-svg - sw - w3c-uaag10 - wxwidgets_bugs - - - Guide to the Qt Translation Tools - Qt Assistant Manual - Qt Designer Manual - Qt Reference Documentation - qmake User Guide - - - KDE Libraries (Doxygen) - - - - - - - - diff --git a/languages/java/app_templates/tdeappjava/app_client.java b/languages/java/app_templates/tdeappjava/app_client.java deleted file mode 100644 index 9648cfad..00000000 --- a/languages/java/app_templates/tdeappjava/app_client.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) %{YEAR} %{AUTHOR} <%{EMAIL}> - */ - -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - TDEApplication app(argc, argv, "%{APPNAMELC}_client", false); - - // get our DCOP client and attach so that we may use it - DCOPClient *client = app.dcopClient(); - client->attach(); - - // do a 'send' for now - QByteArray data; - QDataStream ds(data, IO_WriteOnly); - if (argc > 1) - ds << QString(argv[1]); - else - ds << QString("http://www.kde.org"); - client->send("%{APPNAMELC}", "%{APPNAME}Iface", "openURL(QString)", data); - - return app.exec(); -} diff --git a/languages/java/app_templates/tdeappjava/appui.rc b/languages/java/app_templates/tdeappjava/appui.rc deleted file mode 100644 index ceb4f14e..00000000 --- a/languages/java/app_templates/tdeappjava/appui.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - C&ustom - - - - diff --git a/languages/java/app_templates/tdeappjava/appview.java b/languages/java/app_templates/tdeappjava/appview.java deleted file mode 100644 index 347ff58f..00000000 --- a/languages/java/app_templates/tdeappjava/appview.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (C) %{YEAR} %{AUTHOR} <%{EMAIL}> - */ - -import java.util.*; -import org.kde.qt.*; -import org.kde.koala.*; - -/** - * This is the main view class for %{APPNAME}. Most of the non-menu, - * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go - * here. - * - * This %{APPNAMELC} uses an HTML component as an example. - * - * @short Main view - * @author %{AUTHOR} <%{EMAIL}> - * @version %{VERSION} - */ -public class %{APPNAME}View extends QWidget -{ - - QHBoxLayout top_layout; - -public %{APPNAME}View(QWidget parent) -{ - super(parent, null); - // setup our layout manager to automatically add our widgets - top_layout = new QHBoxLayout(this); - top_layout.setAutoAdd(true); - - // we want to look for all components that satisfy our needs. the - // trader will actually search through *all* registered KDE - // applications and components -- not just KParts. So we have to - // specify two things: a service type and a constraint - // - // the service type is like a mime type. we say that we want all - // applications and components that can handle HTML -- 'text/html' - // - // however, by itself, this will return such things as Netscape.. - // not what we wanted. so we constrain it by saying that the - // string 'KParts/ReadOnlyPart' must be found in the ServiceTypes - // field. with this, only components of the type we want will be - // returned. - ArrayList offers = TDETrader.self().query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes"); - - KLibFactory factory = null; - // in theory, we only care about the first one.. but let's try all - // offers just in case the first can't be loaded for some reason - Iterator it = offers.iterator(); - while(it.hasNext()) - { - KService ptr = (KService) it.next(); - - // we now know that our offer can handle HTML and is a part. - // since it is a part, it must also have a library... let's try to - // load that now - factory = KLibLoader.self().factory( ptr.library() ); - if (factory != null) - { - m_html = (ReadOnlyPart) factory.create(this, ptr.name(), "KParts::ReadOnlyPart"); - break; - } - } - - // if our factory is invalid, then we never found our component - // and we might as well just exit now - if (factory == null) - { - KMessageBox.error(this, "Could not find a suitable HTML component"); - return; - } - - connect(m_html, SIGNAL("setWindowCaption(String)"), - this, SLOT("slotSetTitle(String)")); - connect(m_html, SIGNAL("setStatusBarText(String)"), - this, SLOT("slotOnURL(String)")); - -} - - -public void print(QPainter p, int height, int width) -{ - // do the actual printing, here - // p.drawText(etc..) -} - -public String currentURL() -{ - return m_html.url().url(); -} - -public void openURL(String url) -{ - openURL(new KURL(url)); -} - -public void openURL(KURL url) -{ - m_html.openURL(url); -} - -private void slotOnURL(String url) -{ - emit("signalChangeStatusbar", url); -} - -private void slotSetTitle(String title) -{ - emit("signalChangeCaption", title); -} - -private ReadOnlyPart m_html; - -} diff --git a/languages/java/app_templates/tdeappjava/pref.java b/languages/java/app_templates/tdeappjava/pref.java deleted file mode 100644 index a50fdb31..00000000 --- a/languages/java/app_templates/tdeappjava/pref.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) %{YEAR} %{AUTHOR} <%{EMAIL}> - */ - -import java.util.*; -import org.kde.qt.*; -import org.kde.koala.*; - -public class %{APPNAME}Preferences extends KDialogBase -{ -private %{APPNAME}PrefPageOne m_pageOne; -private %{APPNAME}PrefPageTwo m_pageTwo; - -public %{APPNAME}Preferences() -{ - super(TreeList, "%{APPNAME} Preferences", - Help|Default|Ok|Apply|Cancel, Ok); - - // this is the base class for your preferences dialog. it is now - // a Treelist dialog.. but there are a number of other - // possibilities (including Tab, Swallow, and just Plain) - QFrame frame; - frame = addPage(tr("First Page"), tr("Page One Options")); - m_pageOne = new %{APPNAME}PrefPageOne(frame); - - frame = addPage(tr("Second Page"), tr("Page Two Options")); - m_pageTwo = new %{APPNAME}PrefPageTwo(frame); -} - -public class %{APPNAME}PrefPageOne extends QFrame { -public %{APPNAME}PrefPageOne(QWidget parent) -{ - super(parent); - QHBoxLayout layout = new QHBoxLayout(this); - layout.setAutoAdd(true); - - new QLabel("Add something here", this); -} -} - -public class %{APPNAME}PrefPageTwo extends QFrame { -public %{APPNAME}PrefPageTwo(QWidget parent) -{ - super(parent); - QHBoxLayout layout = new QHBoxLayout(this); - layout.setAutoAdd(true); - - new QLabel("Add something here", this); -} -} - -} diff --git a/languages/java/app_templates/tdeappjava/src-Makefile.am b/languages/java/app_templates/tdeappjava/src-Makefile.am deleted file mode 100644 index 6468994c..00000000 --- a/languages/java/app_templates/tdeappjava/src-Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -## Makefile.am for %{APPNAMELC} - -JAVAROOT = . - -# which sources should be compiled for %{APPNAMELC} -java_JAVA = %{APPNAME}.java %{APPNAME}View.java \ - %{APPNAME}Preferences.java - - -KDE_ICON = %{APPNAMELC} - -# this is where the kdelnk file will go -kdelnkdir = $(kde_appsdir)/Utilities -kdelnk_DATA = %{APPNAMELC}.desktop - -# this is where the XML-GUI resource file goes -rcdir = $(kde_datadir)/%{APPNAMELC} -rc_DATA = %{APPNAMELC}ui.rc diff --git a/languages/java/app_templates/tdeappjava/subdirs b/languages/java/app_templates/tdeappjava/subdirs deleted file mode 100644 index 0e678106..00000000 --- a/languages/java/app_templates/tdeappjava/subdirs +++ /dev/null @@ -1,3 +0,0 @@ -doc -po -src diff --git a/languages/java/app_templates/tdeappjava/tdeappjava b/languages/java/app_templates/tdeappjava/tdeappjava deleted file mode 100644 index a62edafa..00000000 --- a/languages/java/app_templates/tdeappjava/tdeappjava +++ /dev/null @@ -1,10 +0,0 @@ -# KDE Config File -[General] -Name=Application framework -Name[fr]=Squelette d'application -Icon=tdeappjava.png -Category=Java/KDE -Comment=Generates a simple Java KDE application with one toplevel window, menus and toolbars. -Comment[fr]=Gnre une simple application KDE dans le language JAVA avec une fentre principale, des menus, et des barres d'outils. -FileTemplates=java,CStyle -ShowFilesAfterGeneration=src/APPNAMEView.java diff --git a/languages/java/app_templates/tdeappjava/tdeappjava.png b/languages/java/app_templates/tdeappjava/tdeappjava.png deleted file mode 100644 index 913ebb87..00000000 Binary files a/languages/java/app_templates/tdeappjava/tdeappjava.png and /dev/null differ diff --git a/languages/java/app_templates/tdeappjava/tdeappjava.tdevtemplate b/languages/java/app_templates/tdeappjava/tdeappjava.tdevtemplate deleted file mode 100644 index b5b35e33..00000000 --- a/languages/java/app_templates/tdeappjava/tdeappjava.tdevtemplate +++ /dev/null @@ -1,163 +0,0 @@ -# KDE Config File -[General] -Name=Application framework -Name[ca]=Infraestructura d'aplicacions -Name[da]=Programskelet -Name[de]=Anwendungsgrundgerüst -Name[el]=Πλαίσιο εφαρμογής -Name[es]=Infraestructura de aplicación -Name[et]=Rakenduse raamistik -Name[eu]=Aplikazioen lan-markoa -Name[fa]=چارچوب کاربرد -Name[fr]=Infrastructure d'application -Name[ga]=Creatlach feidhmchláir -Name[gl]=Entorno de traballo para aplicación -Name[hu]=Alkalmazás-keretrendszer -Name[it]=Infrastruttura applicativa -Name[ja]=アプリケーションフレームワーク -Name[nds]=Programmrahmenwark -Name[ne]=अनुप्रयोग फ्रेमवर्क -Name[nl]=Applicationframework -Name[pl]=Szablon programu -Name[pt]=Plataforma de aplicações -Name[pt_BR]=Plataforma de aplicações -Name[ru]=Приложение KDE -Name[sk]=Aplikačný framework -Name[sl]=Ogrodje programa -Name[sr]=Радни оквир програма -Name[sr@Latn]=Radni okvir programa -Name[sv]=Programramverk -Name[tr]=Uygulama Çatısı -Name[zh_CN]=应用程序框架 -Name[zh_TW]=應用程式框架 -Icon=tdeappjava.png -Category=Java/KDE -Comment=Generates a simple Java KDE application with one toplevel window, menus and toolbars. -Comment[ca]=Genera una simple aplicació per al KDE en Java amb una finestra principal, menús i barres d'eines. -Comment[da]=Genererer et simpelt Java KDE program med et vindue på topniveau, menuer og værktøjslinjer. -Comment[de]=Erstellt eine einfache Java-KDE-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. -Comment[el]=Δημιουργεί μια απλή εφαρμογή Java του KDE με ένα ανώτερο παράθυρο, μενού, και γραμμές εργαλείων. -Comment[es]=Genera una sencilla aplicación para KDE en Java, con una ventana principal, menús y barras de herramientas. -Comment[et]=Lihtsa Java KDE rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. -Comment[eu]=Goi-mailako lehio bat, menuak eta tresna-barrak dituen Java KDE aplikazio bat sortzen du. -Comment[fa]=یک کاربرد سادۀ KDE جاوا با یک پنجرۀ سطح بالا، گزینگان و میله‌های ابزار تولید می‌کند. -Comment[fr]=Génère une application KDE simple en Java comprenant une fenêtre de premier niveau, des menus et des barres d'outils. -Comment[gl]=Xera unha aplicación sinxela KDE en Java cunha xanela principal, menús e barras de ferramentas. -Comment[hu]=Létrehoz egy egyszerű Java-alapú KDE-alkalmazást egy főablakkal, menükkel és eszköztárakkal. -Comment[it]=Genera una semplice applicazione KDE Java con una finestra toplevel, menu e barre degli strumenti. -Comment[nds]=Stellt en eenfach KDE-Programm in Java mit een böverst Finster, Menüs un Warktüüchbalkens op. -Comment[ne]=एउटा उच्चतह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण जाभा केडीई अनुप्रयोग उत्पन्न गर्दछ । -Comment[nl]=Genereert een eenvoudige Java KDE-toepassing met een toplevel window, menu's en toolbars. -Comment[pl]=Generuje prosty program KDE w Javie posiadający okno, menu i paski narzędzi. -Comment[pt]=Gera uma aplicação para KDE simples em Java, com uma janela de topo, menus e barras de ferramentas. -Comment[pt_BR]=Gera uma aplicação para KDE simples em Java, com uma janela de topo, menus e barras de ferramentas. -Comment[ru]=Создание простого приложения Java KDE с окном, меню и панелями инструментов. -Comment[sk]=Vygeneruje jednoduchú Java KDE aplikáciu s jedným oknom, menu a panelom nástrojov. -Comment[sr]=Прави једноставан Java KDE програм са једним прозором највишег нивоа, менијима и тракама са алатом. -Comment[sr@Latn]=Pravi jednostavan Java KDE program sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. -Comment[sv]=Skapar ett enkelt Java KDE-program med ett toppnivåfönster, menyer och verktygsrader. -Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir Java KDE uygulaması yaratır. -Comment[zh_CN]=生成一个简单的带有顶级窗口、菜单和工具栏的 Java KDE 应用程序。 -Comment[zh_TW]=產生一個簡單的 Java KDE 應用程式,內含頂層視窗、選單與工具列。 -FileTemplates=java,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAME}View.java -Archive=tdeappjava.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[DOCBOOK] -Type=include -File=%{tdevelop}/template-common/dockbook.tdevtemplate - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.java -Dest=%{dest}/src/%{APPNAME}.java - -[FILE16] -Type=install -Source=%{src}/appview.java -Dest=%{dest}/src/%{APPNAME}View.java - -[FILE17] -Type=install -Source=%{src}/pref.java -Dest=%{dest}/src/%{APPNAME}Preferences.java - -[FILE18] -Type=install -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - diff --git a/languages/java/backgroundparser.cpp b/languages/java/backgroundparser.cpp index 006b0127..d6a034e4 100644 --- a/languages/java/backgroundparser.cpp +++ b/languages/java/backgroundparser.cpp @@ -13,8 +13,8 @@ #include "javasupportpart.h" #include "javasupport_events.h" #include "driver.h" -#include "tdevdeepcopy.h" -#include "tdevdriver.h" +#include "kdevdeepcopy.h" +#include "kdevdriver.h" #include @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -178,7 +178,7 @@ BackgroundParser::BackgroundParser( JavaSupportPart* part, TQWaitCondition* cons : m_consumed( consumed ), m_javaSupport( part ), m_close( false ) { m_fileList = new SynchronizedFileList(); - m_driver = new TDevDriver( m_javaSupport ); + m_driver = new KDevDriver( m_javaSupport ); m_driver->setSourceProvider( new KDevSourceProvider(m_javaSupport) ); //disabled for now m_driver->setResolveDependencesEnabled( true ); } diff --git a/languages/java/backgroundparser.h b/languages/java/backgroundparser.h index db197e31..fee2bc78 100644 --- a/languages/java/backgroundparser.h +++ b/languages/java/backgroundparser.h @@ -71,7 +71,7 @@ protected: Unit* parseFile( const TQString& fileName, bool readFromDisk ); private: - class TDevDriver* m_driver; + class KDevDriver* m_driver; TQString m_currentFile; TQWaitCondition m_canParse; TQWaitCondition m_isEmpty; diff --git a/languages/java/doc/CMakeLists.txt b/languages/java/doc/CMakeLists.txt index 23acf492..685a980d 100644 --- a/languages/java/doc/CMakeLists.txt +++ b/languages/java/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES sw.toc java_bugs_gcc.toc java_bugs_sun.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/java/doc/Makefile.am b/languages/java/doc/Makefile.am index f163d148..adb0f24f 100644 --- a/languages/java/doc/Makefile.am +++ b/languages/java/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = sw.toc java_bugs_gcc.toc java_bugs_sun.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/java/file_templates/CMakeLists.txt b/languages/java/file_templates/CMakeLists.txt index cee049fb..848555dd 100644 --- a/languages/java/file_templates/CMakeLists.txt +++ b/languages/java/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES java - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/java/file_templates/Makefile.am b/languages/java/file_templates/Makefile.am index 4d9013d4..dc3b82a9 100644 --- a/languages/java/file_templates/Makefile.am +++ b/languages/java/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = java diff --git a/languages/java/javasupport_events.h b/languages/java/javasupport_events.h index b2022af2..36cda51b 100644 --- a/languages/java/javasupport_events.h +++ b/languages/java/javasupport_events.h @@ -13,7 +13,7 @@ #define __javasupport_events_h #include "driver.h" -#include "tdevdeepcopy.h" +#include "kdevdeepcopy.h" #include #include diff --git a/languages/java/javasupportfactory.cpp b/languages/java/javasupportfactory.cpp index ac1eaadb..94e435f2 100644 --- a/languages/java/javasupportfactory.cpp +++ b/languages/java/javasupportfactory.cpp @@ -11,28 +11,28 @@ #include #include -#include +#include #include "javasupportfactory.h" -static const TDevPluginInfo data("tdevjavasupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevjavasupport, JavaSupportFactory ) +static const KDevPluginInfo data("kdevjavasupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevjavasupport, JavaSupportFactory ) JavaSupportFactory::JavaSupportFactory() - : TDevGenericFactory( data ) + : KDevGenericFactory( data ) { } TDEInstance *JavaSupportFactory::createInstance() { - TDEInstance *instance = TDevGenericFactory::createInstance(); + TDEInstance *instance = KDevGenericFactory::createInstance(); TDEStandardDirs *dirs = instance->dirs(); - dirs->addResourceType( "newclasstemplates", TDEStandardDirs::kde_default("data") + "tdevjavasupport/newclass/" ); - dirs->addResourceType( "pcs", TDEStandardDirs::kde_default( "data" ) + "tdevjavasupport/pcs/" ); + dirs->addResourceType( "newclasstemplates", TDEStandardDirs::kde_default("data") + "kdevjavasupport/newclass/" ); + dirs->addResourceType( "pcs", TDEStandardDirs::kde_default( "data" ) + "kdevjavasupport/pcs/" ); return instance; } -const TDevPluginInfo *JavaSupportFactory::info() +const KDevPluginInfo *JavaSupportFactory::info() { return &data; } diff --git a/languages/java/javasupportfactory.h b/languages/java/javasupportfactory.h index cb231d34..e5ae52b4 100644 --- a/languages/java/javasupportfactory.h +++ b/languages/java/javasupportfactory.h @@ -12,17 +12,17 @@ #ifndef _JAVASUPPORTFACTORY_H_ #define _JAVASUPPORTFACTORY_H_ -#include +#include #include "javasupportpart.h" -class TDevPluginInfo; +class KDevPluginInfo; -class JavaSupportFactory : public TDevGenericFactory +class JavaSupportFactory : public KDevGenericFactory { public: JavaSupportFactory(); - static const TDevPluginInfo *info(); + static const KDevPluginInfo *info(); protected: virtual TDEInstance *createInstance(); diff --git a/languages/java/javasupportpart.cpp b/languages/java/javasupportpart.cpp index 3c2090e8..63b174fc 100644 --- a/languages/java/javasupportpart.cpp +++ b/languages/java/javasupportpart.cpp @@ -17,10 +17,10 @@ #include "javasupport_events.h" #include "problemreporter.h" #include "backgroundparser.h" -#include "TDevJavaSupportIface.h" +#include "KDevJavaSupportIface.h" #include "javasupportfactory.h" #include "catalog.h" -#include "tdevdriver.h" +#include "kdevdriver.h" #include "javasupport_utils.h" #include "JavaStoreWalker.hpp" @@ -63,12 +63,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -77,11 +77,11 @@ enum { KDEV_DB_VERSION = 7 }; enum { KDEV_PCS_VERSION = 8 }; -class JavaDriver: public TDevDriver +class JavaDriver: public KDevDriver { public: JavaDriver( JavaSupportPart* javaSupport ) - : TDevDriver( javaSupport ) + : KDevDriver( javaSupport ) { } @@ -119,7 +119,7 @@ public: }; JavaSupportPart::JavaSupportPart(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevLanguageSupport(JavaSupportFactory::info(), parent, name ? name : "TDevJavaSupport"), + : KDevLanguageSupport(JavaSupportFactory::info(), parent, name ? name : "KDevJavaSupport"), m_activeDocument( 0 ), m_activeView( 0 ), m_activeSelection( 0 ), m_activeEditor( 0 ), m_activeViewCursor( 0 ), m_projectClosed( true ), m_valid( false ) { @@ -127,7 +127,7 @@ JavaSupportPart::JavaSupportPart(TQObject *parent, const char *name, const TQStr m_driver = new JavaDriver( this ); - setXMLFile( "tdevjavasupport.rc" ); + setXMLFile( "kdevjavasupport.rc" ); m_catalogList.setAutoDelete( true ); setupCatalog(); @@ -167,7 +167,7 @@ JavaSupportPart::JavaSupportPart(TQObject *parent, const char *name, const TQStr connect( core( ), TQT_SIGNAL( projectConfigWidget( KDialogBase* ) ), this, TQT_SLOT( projectConfigWidget( KDialogBase* ) ) ); - new TDevJavaSupportIface( this ); + new KDevJavaSupportIface( this ); //(void) dcopClient(); } @@ -434,7 +434,7 @@ TQString JavaSupportPart::findSourceFile() return m_activeFileName; } -TDevLanguageSupport::Features JavaSupportPart::features() +KDevLanguageSupport::Features JavaSupportPart::features() { return Features( Classes | Functions | Variables ); } @@ -830,7 +830,7 @@ TQString JavaSupportPart::formatModelItem( const CodeModelItem *item, bool short return arg.stripWhiteSpace(); } else - return TDevLanguageSupport::formatModelItem( item, shortDescription ); + return KDevLanguageSupport::formatModelItem( item, shortDescription ); } void JavaSupportPart::addClass( ) diff --git a/languages/java/javasupportpart.h b/languages/java/javasupportpart.h index 6154cb8f..a69e3524 100644 --- a/languages/java/javasupportpart.h +++ b/languages/java/javasupportpart.h @@ -16,8 +16,8 @@ #ifndef _JAVASUPPORTPART_H_ #define _JAVASUPPORTPART_H_ -#include -#include +#include +#include #include #include @@ -46,7 +46,7 @@ namespace KTextEditor class ViewCursorInterface; } -class JavaSupportPart : public TDevLanguageSupport +class JavaSupportPart : public KDevLanguageSupport { Q_OBJECT @@ -82,7 +82,7 @@ signals: void fileParsed( const TQString& fileName ); protected: - virtual TDevLanguageSupport::Features features(); + virtual KDevLanguageSupport::Features features(); virtual KMimeType::List mimeTypes(); virtual TQString formatClassName(const TQString &name); virtual TQString unformatClassName(const TQString &name); @@ -159,7 +159,7 @@ private: FunctionDom m_activeFunction; VariableDom m_activeVariable; - friend class TDevJavaSupportIface; + friend class KDevJavaSupportIface; friend class JavaDriver; }; diff --git a/languages/java/kdevdeepcopy.h b/languages/java/kdevdeepcopy.h new file mode 100644 index 00000000..dd4d8f4d --- /dev/null +++ b/languages/java/kdevdeepcopy.h @@ -0,0 +1,12 @@ +#ifndef KDEVDEEPCOPY_H +#define KDEVDEEPCOPY_H + +#include + +inline TQString deepCopy( const TQString& s ) +{ + TQCString str = s.utf8(); + return TQString::fromUtf8( str, str.length() ); +} + +#endif diff --git a/languages/java/kdevdriver.cpp b/languages/java/kdevdriver.cpp new file mode 100644 index 00000000..d19a20c3 --- /dev/null +++ b/languages/java/kdevdriver.cpp @@ -0,0 +1,44 @@ + +#include "kdevdriver.h" +#include "JavaLexer.hpp" +#include +#include + +KDevDriver::KDevDriver( JavaSupportPart* javaSupport ) + : m_javaSupport( javaSupport ) +{ +} + +JavaSupportPart* KDevDriver::javaSupport() +{ + return m_javaSupport; +} + +void KDevDriver::setupProject() +{ + TQMap map; + + { + TQStringList fileList = m_javaSupport->project()->allFiles(); + TQStringList::ConstIterator it = fileList.begin(); + while( it != fileList.end() ){ + TQFileInfo info( *it ); + ++it; + + map.insert( info.dirPath(true), true ); + } + } + + { + TQMap::Iterator it = map.begin(); + while( it != map.end() ){ + addIncludePath( it.key() ); + ++it; + } + } +} + +void KDevDriver::setupLexer( JavaLexer* lexer ) +{ + Driver::setupLexer( lexer ); +} diff --git a/languages/java/kdevdriver.h b/languages/java/kdevdriver.h new file mode 100644 index 00000000..cc0a1393 --- /dev/null +++ b/languages/java/kdevdriver.h @@ -0,0 +1,30 @@ + +#ifndef __kdevdriver_h +#define __kdevdriver_h + +#include "javasupportpart.h" + +#include +#include + +#include "driver.h" + +#include +#include + +class KDevDriver: public Driver +{ +public: + KDevDriver( JavaSupportPart* javaSupport ); + JavaSupportPart* javaSupport(); + void setupProject(); + +protected: + void setupLexer( JavaLexer* lexer ); + +private: + JavaSupportPart* m_javaSupport; +}; + +#endif + diff --git a/languages/java/kdevjavasupport.desktop b/languages/java/kdevjavasupport.desktop new file mode 100644 index 00000000..620fb10f --- /dev/null +++ b/languages/java/kdevjavasupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Java Support +Comment[ca]=Suport per a Java +Comment[da]=Java understøttelse +Comment[de]=Java-Unterstützung für TDevelop +Comment[el]=Υποστήριξη Java +Comment[es]=Soporte para Java +Comment[et]=Java toetus +Comment[eu]=Java euskarria +Comment[fa]=پشتیبانی جاوا +Comment[fr]=Prise en charge de Java +Comment[ga]=Tacaíocht Java +Comment[gl]=Soporte para Java +Comment[hi]=जावा समर्थन +Comment[hu]=Java-támogatás +Comment[is]=Java stuðningur +Comment[it]=Supporto per Java +Comment[ja]=Java サポート +Comment[nds]=Java-Ünnerstütten för TDevelop +Comment[ne]=जाभा समर्थन +Comment[nl]=Ondersteuning voor Java +Comment[pl]=Obsługa Javy +Comment[pt]=Suporte a Java +Comment[pt_BR]=Suporte ao Java +Comment[ru]=Поддержка языка Java +Comment[sk]=Java podpora +Comment[sl]=Podpora javi +Comment[sr]=Подршка за Java-у +Comment[sr@Latn]=Podrška za Java-u +Comment[sv]=Java-stöd +Comment[ta]=ஜாவா ஆதரவு +Comment[tg]=Ёрӣ намудани забони Java +Comment[tr]=Java Desteği +Comment[zh_CN]=Java 支持 +Comment[zh_TW]=Java 支援 +Name=KDevJavaSupport +Name[da]=TDevelop Java-understøttelse +Name[de]=Unterstützung für Java (TDevelop) +Name[hi]=के-डेव-जावा-समर्थन +Name[nds]=Java-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaJavy +Name[sk]=KDev Java podpora +Name[sv]=TDevelop Java-stöd +Name[ta]=கெடெவ் ஜாவா ஆதரவு +Name[zh_TW]=TDevelop Java 支援 +GenericName=Java Support +GenericName[ca]=Suport per a Java +GenericName[da]=Java-understøttelse +GenericName[de]=Unterstützung für Java +GenericName[el]=Υποστήριξη Java +GenericName[es]=Soporte para Java +GenericName[et]=Java toetus +GenericName[eu]=Java euskarria +GenericName[fa]=پشتیبانی جاوا +GenericName[fr]=Prise en charge de JAVA +GenericName[ga]=Tacaíocht Java +GenericName[gl]=Soporte para Java +GenericName[hi]=जावा समर्थन +GenericName[hu]=Java-támogatás +GenericName[it]=Supporto Java +GenericName[ja]=Java サポート +GenericName[nds]=Ünnerstütten för Java +GenericName[ne]=जाभा समर्थन +GenericName[nl]=Ondersteuning voor Java +GenericName[pl]=Obsługa Javy +GenericName[pt]=Suporte a Java +GenericName[pt_BR]=Suporte ao Java +GenericName[ru]=Поддержка языка Java +GenericName[sk]=Java podpora +GenericName[sl]=Podpora javi +GenericName[sr]=Подршка за Java-у +GenericName[sr@Latn]=Podrška za Java-u +GenericName[sv]=Java-stöd +GenericName[ta]=ஜாவா ஆதரவு +GenericName[tg]=Ёрӣ намудани забони Java +GenericName[tr]=Java Desteği +GenericName[zh_CN]=Java 支持 +GenericName[zh_TW]=Java 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevjavasupport +X-TDevelop-Version=5 +X-TDevelop-Language=Java +X-TDevelop-Args=Java diff --git a/languages/java/kdevjavasupport.rc b/languages/java/kdevjavasupport.rc new file mode 100644 index 00000000..e9b80d0d --- /dev/null +++ b/languages/java/kdevjavasupport.rc @@ -0,0 +1,4 @@ + + + + diff --git a/languages/java/newclass_templates/Makefile.am b/languages/java/newclass_templates/Makefile.am index f8b9e3bd..d24c99ef 100644 --- a/languages/java/newclass_templates/Makefile.am +++ b/languages/java/newclass_templates/Makefile.am @@ -1,4 +1,4 @@ -javasupportdatadir = ${kde_datadir}/tdevjavasupport +javasupportdatadir = ${kde_datadir}/kdevjavasupport newclassdir = ${javasupportdatadir}/newclass newclass_DATA = java_source diff --git a/languages/java/problemreporter.cpp b/languages/java/problemreporter.cpp index 6b6a46e6..4d4f47af 100644 --- a/languages/java/problemreporter.cpp +++ b/languages/java/problemreporter.cpp @@ -21,8 +21,8 @@ #include "configproblemreporter.h" #include "backgroundparser.h" -#include -#include +#include +#include #include #include diff --git a/languages/java/tdevdeepcopy.h b/languages/java/tdevdeepcopy.h deleted file mode 100644 index c4f889c1..00000000 --- a/languages/java/tdevdeepcopy.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef TDEVDEEPCOPY_H -#define TDEVDEEPCOPY_H - -#include - -inline TQString deepCopy( const TQString& s ) -{ - TQCString str = s.utf8(); - return TQString::fromUtf8( str, str.length() ); -} - -#endif diff --git a/languages/java/tdevdriver.cpp b/languages/java/tdevdriver.cpp deleted file mode 100644 index d36a23f3..00000000 --- a/languages/java/tdevdriver.cpp +++ /dev/null @@ -1,44 +0,0 @@ - -#include "tdevdriver.h" -#include "JavaLexer.hpp" -#include -#include - -TDevDriver::TDevDriver( JavaSupportPart* javaSupport ) - : m_javaSupport( javaSupport ) -{ -} - -JavaSupportPart* TDevDriver::javaSupport() -{ - return m_javaSupport; -} - -void TDevDriver::setupProject() -{ - TQMap map; - - { - TQStringList fileList = m_javaSupport->project()->allFiles(); - TQStringList::ConstIterator it = fileList.begin(); - while( it != fileList.end() ){ - TQFileInfo info( *it ); - ++it; - - map.insert( info.dirPath(true), true ); - } - } - - { - TQMap::Iterator it = map.begin(); - while( it != map.end() ){ - addIncludePath( it.key() ); - ++it; - } - } -} - -void TDevDriver::setupLexer( JavaLexer* lexer ) -{ - Driver::setupLexer( lexer ); -} diff --git a/languages/java/tdevdriver.h b/languages/java/tdevdriver.h deleted file mode 100644 index 27fd7854..00000000 --- a/languages/java/tdevdriver.h +++ /dev/null @@ -1,30 +0,0 @@ - -#ifndef __tdevdriver_h -#define __tdevdriver_h - -#include "javasupportpart.h" - -#include -#include - -#include "driver.h" - -#include -#include - -class TDevDriver: public Driver -{ -public: - TDevDriver( JavaSupportPart* javaSupport ); - JavaSupportPart* javaSupport(); - void setupProject(); - -protected: - void setupLexer( JavaLexer* lexer ); - -private: - JavaSupportPart* m_javaSupport; -}; - -#endif - diff --git a/languages/java/tdevjavasupport.desktop b/languages/java/tdevjavasupport.desktop deleted file mode 100644 index 6d3553d7..00000000 --- a/languages/java/tdevjavasupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Java Support -Comment[ca]=Suport per a Java -Comment[da]=Java understøttelse -Comment[de]=Java-Unterstützung für TDevelop -Comment[el]=Υποστήριξη Java -Comment[es]=Soporte para Java -Comment[et]=Java toetus -Comment[eu]=Java euskarria -Comment[fa]=پشتیبانی جاوا -Comment[fr]=Prise en charge de Java -Comment[ga]=Tacaíocht Java -Comment[gl]=Soporte para Java -Comment[hi]=जावा समर्थन -Comment[hu]=Java-támogatás -Comment[is]=Java stuðningur -Comment[it]=Supporto per Java -Comment[ja]=Java サポート -Comment[nds]=Java-Ünnerstütten för TDevelop -Comment[ne]=जाभा समर्थन -Comment[nl]=Ondersteuning voor Java -Comment[pl]=Obsługa Javy -Comment[pt]=Suporte a Java -Comment[pt_BR]=Suporte ao Java -Comment[ru]=Поддержка языка Java -Comment[sk]=Java podpora -Comment[sl]=Podpora javi -Comment[sr]=Подршка за Java-у -Comment[sr@Latn]=Podrška za Java-u -Comment[sv]=Java-stöd -Comment[ta]=ஜாவா ஆதரவு -Comment[tg]=Ёрӣ намудани забони Java -Comment[tr]=Java Desteği -Comment[zh_CN]=Java 支持 -Comment[zh_TW]=Java 支援 -Name=TDevJavaSupport -Name[da]=TDevelop Java-understøttelse -Name[de]=Unterstützung für Java (TDevelop) -Name[hi]=के-डेव-जावा-समर्थन -Name[nds]=Java-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaJavy -Name[sk]=KDev Java podpora -Name[sv]=TDevelop Java-stöd -Name[ta]=கெடெவ் ஜாவா ஆதரவு -Name[zh_TW]=TDevelop Java 支援 -GenericName=Java Support -GenericName[ca]=Suport per a Java -GenericName[da]=Java-understøttelse -GenericName[de]=Unterstützung für Java -GenericName[el]=Υποστήριξη Java -GenericName[es]=Soporte para Java -GenericName[et]=Java toetus -GenericName[eu]=Java euskarria -GenericName[fa]=پشتیبانی جاوا -GenericName[fr]=Prise en charge de JAVA -GenericName[ga]=Tacaíocht Java -GenericName[gl]=Soporte para Java -GenericName[hi]=जावा समर्थन -GenericName[hu]=Java-támogatás -GenericName[it]=Supporto Java -GenericName[ja]=Java サポート -GenericName[nds]=Ünnerstütten för Java -GenericName[ne]=जाभा समर्थन -GenericName[nl]=Ondersteuning voor Java -GenericName[pl]=Obsługa Javy -GenericName[pt]=Suporte a Java -GenericName[pt_BR]=Suporte ao Java -GenericName[ru]=Поддержка языка Java -GenericName[sk]=Java podpora -GenericName[sl]=Podpora javi -GenericName[sr]=Подршка за Java-у -GenericName[sr@Latn]=Podrška za Java-u -GenericName[sv]=Java-stöd -GenericName[ta]=ஜாவா ஆதரவு -GenericName[tg]=Ёрӣ намудани забони Java -GenericName[tr]=Java Desteği -GenericName[zh_CN]=Java 支持 -GenericName[zh_TW]=Java 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevjavasupport -X-TDevelop-Version=5 -X-TDevelop-Language=Java -X-TDevelop-Args=Java diff --git a/languages/java/tdevjavasupport.rc b/languages/java/tdevjavasupport.rc deleted file mode 100644 index 66c7975c..00000000 --- a/languages/java/tdevjavasupport.rc +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/languages/kjssupport/Makefile.am b/languages/kjssupport/Makefile.am index 1fd1839b..72cc722b 100644 --- a/languages/kjssupport/Makefile.am +++ b/languages/kjssupport/Makefile.am @@ -1,22 +1,22 @@ INCLUDES = -I$(kde_includes)/tdevelop $(all_includes) -kde_module_LTLIBRARIES = libtdevkjssupport.la -libtdevkjssupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevkjssupport_la_LIBADD = -lkjsembed -ltdevelop -libtdevkjssupport_la_SOURCES = kjssupport_part.cpp kjsproblems.cpp jscodecompletion.cpp subclassingdlg.cpp subclassingdlgbase.ui +kde_module_LTLIBRARIES = libkdevkjssupport.la +libkdevkjssupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevkjssupport_la_LIBADD = -lkjsembed -ltdevelop +libkdevkjssupport_la_SOURCES = kjssupport_part.cpp kjsproblems.cpp jscodecompletion.cpp subclassingdlg.cpp subclassingdlgbase.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevkjssupport.desktop +service_DATA = kdevkjssupport.desktop mimesrcdir = $(kde_mimedir)/text mimesrc_DATA = x-javascript-source.desktop EXTRA_DIST = $(mimesrc_DATA) -rcdir = $(kde_datadir)/tdevkjssupport -rc_DATA = tdevkjssupport.rc +rcdir = $(kde_datadir)/kdevkjssupport +rc_DATA = kdevkjssupport.rc SUBDIRS = template subclassing_template noinst_HEADERS = kjsproblems.h diff --git a/languages/kjssupport/jscodecompletion.cpp b/languages/kjssupport/jscodecompletion.cpp index b8f361a4..436e0a95 100644 --- a/languages/kjssupport/jscodecompletion.cpp +++ b/languages/kjssupport/jscodecompletion.cpp @@ -28,12 +28,12 @@ #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/languages/kjssupport/jscodecompletion.h b/languages/kjssupport/jscodecompletion.h index 9e4434bb..f1d18a70 100644 --- a/languages/kjssupport/jscodecompletion.h +++ b/languages/kjssupport/jscodecompletion.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/languages/kjssupport/kdevkjssupport.desktop b/languages/kjssupport/kdevkjssupport.desktop new file mode 100644 index 00000000..e972cd18 --- /dev/null +++ b/languages/kjssupport/kdevkjssupport.desktop @@ -0,0 +1,54 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=kjsSupport +Comment[da]=kjs-understøttelse +Comment[et]=kjs toetus +Comment[fa]=پشتیبانی kjs +Comment[nds]=KDE-Ünnerstütten för JavaScript +Comment[pl]=Obsługakjs +Comment[sk]=kjs podpora +Comment[sv]=Javaskript-stöd +Comment[zh_TW]=kjs 支援 +Name=KDevkjsSupport +Name[da]=TDevelop Bash-understøttelse +Name[nds]=KJS-Ünnerstütten för TDevelop +Name[pl]=KDevObsługakjs +Name[sk]=KDev kjs podpora +Name[sv]=TDevelop Javaskript-stöd +Name[zh_TW]=TDevelop kjs 支援 +GenericName=TDE JavaScript Support +GenericName[ca]=Suport per a JavaScript per al TDE +GenericName[da]=TDE JavaScript-understøttelse +GenericName[de]=Unterstützung für TDE-JavaScript +GenericName[el]=Υποστήριξη TDE JavaScript +GenericName[es]=Soporte para JavaScript de TDE +GenericName[et]=TDE JavaScripti toetus +GenericName[eu]=TDE JavaScript euskarria +GenericName[fa]=پشتیبانی جاوااسکریپت TDE +GenericName[fr]=Prise en charge du JavaScript pour TDE +GenericName[ga]=Tacaíocht JavaScript TDE +GenericName[gl]=Soporte para JavaScript de TDE +GenericName[hu]=TDE Javascript-támogatás +GenericName[it]=Supporto JavaScript di TDE +GenericName[ja]=TDE JavaScript サポート +GenericName[nds]=TDE-Ünnerstütten för JavaScript +GenericName[ne]=केडीई जाभास्क्रिप्ट समर्थन +GenericName[nl]=TDE ondersteuning voor JavaScript +GenericName[pl]=Obsługa JavaScriptu TDE +GenericName[pt]=Suporte TDE a JavaScript +GenericName[pt_BR]=Suporte ao JavaScript do TDE +GenericName[ru]=Поддержка языка JavaScript +GenericName[sk]=TDE JavaScript podpora +GenericName[sl]=Podpora javascriptu v TDE +GenericName[sr]=TDE-ова подршка за Javascript +GenericName[sr@Latn]=TDE-ova podrška za Javascript +GenericName[sv]=TDE Javaskript-stöd +GenericName[tr]=TDE JavaScript Desteği +GenericName[zh_CN]=TDE JavaScript 支持 +GenericName[zh_TW]=TDE JavaScript 支援 +Icon=tdevelop +ServiceTypes=TDevelop/LanguageSupport +X-TDevelop-Language=Javascript +X-TDE-Library=libkdevkjssupport +X-TDevelop-Version=3 diff --git a/languages/kjssupport/kdevkjssupport.rc b/languages/kjssupport/kdevkjssupport.rc new file mode 100644 index 00000000..e48fc863 --- /dev/null +++ b/languages/kjssupport/kdevkjssupport.rc @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/languages/kjssupport/kjssupport_part.cpp b/languages/kjssupport/kjssupport_part.cpp index 69311ac3..4a3dbc25 100644 --- a/languages/kjssupport/kjssupport_part.cpp +++ b/languages/kjssupport/kjssupport_part.cpp @@ -26,15 +26,15 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -42,16 +42,16 @@ #include #include -#include +#include #include "kjssupport_part.h" #include "kjsproblems.h" #include "jscodecompletion.h" #include "subclassingdlg.h" -typedef TDevGenericFactory kjsSupportFactory; -static const TDevPluginInfo data("tdevkjssupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevkjssupport, kjsSupportFactory( data ) ); +typedef KDevGenericFactory kjsSupportFactory; +static const KDevPluginInfo data("kdevkjssupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevkjssupport, kjsSupportFactory( data ) ); class typeProperty @@ -63,10 +63,10 @@ class typeProperty }; kjsSupportPart::kjsSupportPart(TQObject *parent, const char *name, const TQStringList& ) -: TDevLanguageSupport(&data, parent, name ? name : "kjsSupportPart" ) +: KDevLanguageSupport(&data, parent, name ? name : "kjsSupportPart" ) { setInstance(kjsSupportFactory::instance()); - setXMLFile("tdevkjssupport.rc"); + setXMLFile("kdevkjssupport.rc"); m_build = new TDEAction( i18n("&Run"), "exec",Key_F9,this, TQT_SLOT(slotRun()),actionCollection(), "build_execute" ); @@ -104,7 +104,7 @@ kjsSupportPart::~kjsSupportPart() delete m_js; } -TDevLanguageSupport::Features kjsSupportPart::features() +KDevLanguageSupport::Features kjsSupportPart::features() { return Features(Classes | Variables | Functions); } diff --git a/languages/kjssupport/kjssupport_part.h b/languages/kjssupport/kjssupport_part.h index 59b5dae4..4572b9a2 100644 --- a/languages/kjssupport/kjssupport_part.h +++ b/languages/kjssupport/kjssupport_part.h @@ -17,13 +17,13 @@ */ -#ifndef __TDEVPART_KJSSUPPORT_H__ -#define __TDEVPART_KJSSUPPORT_H__ +#ifndef __KDEVPART_KJSSUPPORT_H__ +#define __KDEVPART_KJSSUPPORT_H__ #include #include -#include +#include #include #include #include @@ -43,7 +43,7 @@ class Context; class typeProperty; -class kjsSupportPart : public TDevLanguageSupport +class kjsSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/kjssupport/subclassing_template/Makefile.am b/languages/kjssupport/subclassing_template/Makefile.am index bafadb4e..8c99d172 100644 --- a/languages/kjssupport/subclassing_template/Makefile.am +++ b/languages/kjssupport/subclassing_template/Makefile.am @@ -1,3 +1,3 @@ -kjssupportdatadir = ${kde_datadir}/tdevkjssupport +kjssupportdatadir = ${kde_datadir}/kdevkjssupport subclassingdir = ${kjssupportdatadir}/subclassing subclassing_DATA = subclass_template.js diff --git a/languages/kjssupport/subclassingdlg.cpp b/languages/kjssupport/subclassingdlg.cpp index 260e2d49..513e0180 100644 --- a/languages/kjssupport/subclassingdlg.cpp +++ b/languages/kjssupport/subclassingdlg.cpp @@ -17,7 +17,7 @@ #include "store_walker.h" #include "cppsupportfactory.h"*/ #include -#include +#include #include #include diff --git a/languages/kjssupport/tdevkjssupport.desktop b/languages/kjssupport/tdevkjssupport.desktop deleted file mode 100644 index 02640f78..00000000 --- a/languages/kjssupport/tdevkjssupport.desktop +++ /dev/null @@ -1,54 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=kjsSupport -Comment[da]=kjs-understøttelse -Comment[et]=kjs toetus -Comment[fa]=پشتیبانی kjs -Comment[nds]=KDE-Ünnerstütten för JavaScript -Comment[pl]=Obsługakjs -Comment[sk]=kjs podpora -Comment[sv]=Javaskript-stöd -Comment[zh_TW]=kjs 支援 -Name=KDevkjsSupport -Name[da]=TDevelop Bash-understøttelse -Name[nds]=KJS-Ünnerstütten för TDevelop -Name[pl]=KDevObsługakjs -Name[sk]=KDev kjs podpora -Name[sv]=TDevelop Javaskript-stöd -Name[zh_TW]=TDevelop kjs 支援 -GenericName=TDE JavaScript Support -GenericName[ca]=Suport per a JavaScript per al TDE -GenericName[da]=TDE JavaScript-understøttelse -GenericName[de]=Unterstützung für TDE-JavaScript -GenericName[el]=Υποστήριξη TDE JavaScript -GenericName[es]=Soporte para JavaScript de TDE -GenericName[et]=TDE JavaScripti toetus -GenericName[eu]=TDE JavaScript euskarria -GenericName[fa]=پشتیبانی جاوااسکریپت TDE -GenericName[fr]=Prise en charge du JavaScript pour TDE -GenericName[ga]=Tacaíocht JavaScript TDE -GenericName[gl]=Soporte para JavaScript de TDE -GenericName[hu]=TDE Javascript-támogatás -GenericName[it]=Supporto JavaScript di TDE -GenericName[ja]=TDE JavaScript サポート -GenericName[nds]=TDE-Ünnerstütten för JavaScript -GenericName[ne]=केडीई जाभास्क्रिप्ट समर्थन -GenericName[nl]=TDE ondersteuning voor JavaScript -GenericName[pl]=Obsługa JavaScriptu TDE -GenericName[pt]=Suporte TDE a JavaScript -GenericName[pt_BR]=Suporte ao JavaScript do TDE -GenericName[ru]=Поддержка языка JavaScript -GenericName[sk]=TDE JavaScript podpora -GenericName[sl]=Podpora javascriptu v TDE -GenericName[sr]=TDE-ова подршка за Javascript -GenericName[sr@Latn]=TDE-ova podrška za Javascript -GenericName[sv]=TDE Javaskript-stöd -GenericName[tr]=TDE JavaScript Desteği -GenericName[zh_CN]=TDE JavaScript 支持 -GenericName[zh_TW]=TDE JavaScript 支援 -Icon=tdevelop -ServiceTypes=TDevelop/LanguageSupport -X-TDevelop-Language=Javascript -X-TDE-Library=libtdevkjssupport -X-TDevelop-Version=3 diff --git a/languages/kjssupport/tdevkjssupport.rc b/languages/kjssupport/tdevkjssupport.rc deleted file mode 100644 index e48fc863..00000000 --- a/languages/kjssupport/tdevkjssupport.rc +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/languages/kjssupport/template/Makefile.am b/languages/kjssupport/template/Makefile.am index fd902e1a..284227b7 100644 --- a/languages/kjssupport/template/Makefile.am +++ b/languages/kjssupport/template/Makefile.am @@ -1,4 +1,4 @@ -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard commondatadir = ${appwizarddatadir}/template-common jshellodir = ${appwizarddatadir}/template-jshello templatedir = ${appwizarddatadir}/templates diff --git a/languages/kjssupport/template/app.tdevelop b/languages/kjssupport/template/app.tdevelop index d1e55b10..cbef8262 100644 --- a/languages/kjssupport/template/app.tdevelop +++ b/languages/kjssupport/template/app.tdevelop @@ -10,24 +10,24 @@ Javascript - TDevFileView + KDevFileView KDevdistpart - TDevDebugger + KDevDebugger - + src *.js *~ - - + + - - + + kde gtk @@ -36,10 +36,10 @@ perl php - - + + - + diff --git a/languages/kjssupport/template/script b/languages/kjssupport/template/script index 3ed2602c..1473d762 100644 --- a/languages/kjssupport/template/script +++ b/languages/kjssupport/template/script @@ -1,4 +1,4 @@ -#!perl -I/usr/kde/3.1/share/apps/tdevappwizard/template-common +#!perl -I/usr/kde/3.1/share/apps/kdevappwizard/template-common use gideon; diff --git a/languages/lib/debugger/CMakeLists.txt b/languages/lib/debugger/CMakeLists.txt index fbd121e4..c159528b 100644 --- a/languages/lib/debugger/CMakeLists.txt +++ b/languages/lib/debugger/CMakeLists.txt @@ -24,14 +24,14 @@ link_directories( ##### headers ################################### install( FILES - debugger.h tdevdebugger.h + debugger.h kdevdebugger.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/languages/debugger ) ##### lang_debugger (shared) #################### tde_add_library( lang_debugger SHARED AUTOMOC - SOURCES tdevdebugger.cpp debugger.cpp + SOURCES kdevdebugger.cpp debugger.cpp VERSION 0.0.0 LINK tdetexteditor-shared DESTINATION ${LIB_INSTALL_DIR} diff --git a/languages/lib/debugger/Makefile.am b/languages/lib/debugger/Makefile.am index 3ca4e3a8..fc8923aa 100644 --- a/languages/lib/debugger/Makefile.am +++ b/languages/lib/debugger/Makefile.am @@ -3,11 +3,11 @@ METASOURCES = AUTO lib_LTLIBRARIES = liblang_debugger.la liblang_debugger_la_LDFLAGS = $(all_libraries) liblang_debugger_la_LIBADD = $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEPARTS) -ltdetexteditor -liblang_debugger_la_SOURCES = tdevdebugger.cpp debugger.cpp +liblang_debugger_la_SOURCES = kdevdebugger.cpp debugger.cpp langincludedirdir = $(includedir)/tdevelop/languages/debugger -langincludedir_HEADERS = debugger.h tdevdebugger.h +langincludedir_HEADERS = debugger.h kdevdebugger.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevinterfaces tdevutil -DOXYGEN_PROJECTNAME = TDevelop Debugger Support Library -DOXYGEN_DOCDIRPREFIX = tdevlang +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevinterfaces kdevutil +DOXYGEN_PROJECTNAME = KDevelop Debugger Support Library +DOXYGEN_DOCDIRPREFIX = kdevlang include ../../../Doxyfile.am diff --git a/languages/lib/debugger/debugger.cpp b/languages/lib/debugger/debugger.cpp index 341abecd..bc8356b7 100644 --- a/languages/lib/debugger/debugger.cpp +++ b/languages/lib/debugger/debugger.cpp @@ -6,14 +6,14 @@ #include // #include "editorproxy.h" -#include +#include using namespace KTextEditor; Debugger *Debugger::s_instance = 0; -Debugger::Debugger(TDevPartController *partController) +Debugger::Debugger(KDevPartController *partController) :m_partController(partController) { connect( m_partController, TQT_SIGNAL(partAdded(KParts::Part*)), diff --git a/languages/lib/debugger/debugger.h b/languages/lib/debugger/debugger.h index 1f5cbae8..d4112490 100644 --- a/languages/lib/debugger/debugger.h +++ b/languages/lib/debugger/debugger.h @@ -3,7 +3,7 @@ #include -#include "tdevdebugger.h" +#include "kdevdebugger.h" #include #include @@ -11,7 +11,7 @@ #include #include -class TDevPartController; +class KDevPartController; /** * Describes a single breakpoint in the system @@ -54,7 +54,7 @@ private: * point of the debugger. * We may change, add or remove breakpoints in this class. */ -class Debugger : public TDevDebugger +class Debugger : public KDevDebugger { Q_OBJECT @@ -94,7 +94,7 @@ public: // protected: - Debugger(TDevPartController *partController); + Debugger(KDevPartController *partController); ~Debugger(); private slots: @@ -126,7 +126,7 @@ private: }; static Debugger *s_instance; - TDevPartController *m_partController; + KDevPartController *m_partController; TQValueList BPList; }; diff --git a/languages/lib/debugger/kdevdebugger.cpp b/languages/lib/debugger/kdevdebugger.cpp new file mode 100644 index 00000000..b9ee4a05 --- /dev/null +++ b/languages/lib/debugger/kdevdebugger.cpp @@ -0,0 +1,182 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 John Firebaugh + + 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 "kdevdebugger.h" + +KDevDebugger::KDevDebugger(TQObject *parent, const char *name) + : TQObject(parent, name) +{ +} + + +KDevDebugger::~KDevDebugger() +{ +} + +const TQPixmap* KDevDebugger::inactiveBreakpointPixmap() +{ + const char*breakpoint_gr_xpm[]={ + "11 16 6 1", + "c c #c6c6c6", + "d c #2c2c2c", + "# c #000000", + ". c None", + "a c #ffffff", + "b c #555555", + "...........", + "...........", + "...#####...", + "..#aaaaa#..", + ".#abbbbbb#.", + "#abbbbbbbb#", + "#abcacacbd#", + "#abbbbbbbb#", + "#abcacacbd#", + "#abbbbbbbb#", + ".#bbbbbbb#.", + "..#bdbdb#..", + "...#####...", + "...........", + "...........", + "..........."}; + static TQPixmap pixmap( breakpoint_gr_xpm ); + return &pixmap; +} + +const TQPixmap* KDevDebugger::activeBreakpointPixmap() +{ + const char* breakpoint_xpm[]={ + "11 16 6 1", + "c c #c6c6c6", + ". c None", + "# c #000000", + "d c #840000", + "a c #ffffff", + "b c #ff0000", + "...........", + "...........", + "...#####...", + "..#aaaaa#..", + ".#abbbbbb#.", + "#abbbbbbbb#", + "#abcacacbd#", + "#abbbbbbbb#", + "#abcacacbd#", + "#abbbbbbbb#", + ".#bbbbbbb#.", + "..#bdbdb#..", + "...#####...", + "...........", + "...........", + "..........."}; + static TQPixmap pixmap( breakpoint_xpm ); + return &pixmap; +} + +const TQPixmap* KDevDebugger::reachedBreakpointPixmap() +{ + const char*breakpoint_bl_xpm[]={ + "11 16 7 1", + "a c #c0c0ff", + "# c #000000", + "c c #0000c0", + "e c #0000ff", + "b c #dcdcdc", + "d c #ffffff", + ". c None", + "...........", + "...........", + "...#####...", + "..#ababa#..", + ".#bcccccc#.", + "#acccccccc#", + "#bcadadace#", + "#acccccccc#", + "#bcadadace#", + "#acccccccc#", + ".#ccccccc#.", + "..#cecec#..", + "...#####...", + "...........", + "...........", + "..........."}; + static TQPixmap pixmap( breakpoint_bl_xpm ); + return &pixmap; +} + +const TQPixmap* KDevDebugger::disabledBreakpointPixmap() +{ + const char*breakpoint_wh_xpm[]={ + "11 16 7 1", + "a c #c0c0ff", + "# c #000000", + "c c #0000c0", + "e c #0000ff", + "b c #dcdcdc", + "d c #ffffff", + ". c None", + "...........", + "...........", + "...#####...", + "..#ddddd#..", + ".#ddddddd#.", + "#ddddddddd#", + "#ddddddddd#", + "#ddddddddd#", + "#ddddddddd#", + "#ddddddddd#", + ".#ddddddd#.", + "..#ddddd#..", + "...#####...", + "...........", + "...........", + "..........."}; + static TQPixmap pixmap( breakpoint_wh_xpm ); + return &pixmap; +} + +const TQPixmap* KDevDebugger::executionPointPixmap() +{ + const char*exec_xpm[]={ + "11 16 4 1", + "a c #00ff00", + "b c #000000", + ". c None", + "# c #00c000", + "...........", + "...........", + "...........", + "#a.........", + "#aaa.......", + "#aaaaa.....", + "#aaaaaaa...", + "#aaaaaaaaa.", + "#aaaaaaa#b.", + "#aaaaa#b...", + "#aaa#b.....", + "#a#b.......", + "#b.........", + "...........", + "...........", + "..........."}; + static TQPixmap pixmap( exec_xpm ); + return &pixmap; +} + +#include "kdevdebugger.moc" diff --git a/languages/lib/debugger/kdevdebugger.h b/languages/lib/debugger/kdevdebugger.h new file mode 100644 index 00000000..4cb7df3f --- /dev/null +++ b/languages/lib/debugger/kdevdebugger.h @@ -0,0 +1,89 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 John Firebaugh + + 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 _KDEVDEBUGGER_H_ +#define _KDEVDEBUGGER_H_ + + +#include +#include + + +#include + +/** +* Base class to handle signals from the editor that relate to breakpoints +* and the execution point of the debugger. +*/ +class KDevDebugger : public TQObject +{ + Q_OBJECT + + +public: + + KDevDebugger(TQObject *parent=0, const char *name=0); + ~KDevDebugger(); + + /** + * Sets a breakpoint in the editor document belong to fileName. + * If id==-1, the breakpoint is deleted. + */ + virtual void setBreakpoint(const TQString &fileName, int lineNum, + int id, bool enabled, bool pending) = 0; + + /** + * Goes to a given location in a source file and marks the line. + * This is used by the debugger to mark the location where the + * the debugger has stopped. + */ + virtual void gotoExecutionPoint(const KURL &url, int lineNum=0) = 0; + + /** + * Clear the execution point. Usefull if debugging has ended. + */ + virtual void clearExecutionPoint() = 0; + + static const TQPixmap* inactiveBreakpointPixmap(); + static const TQPixmap* activeBreakpointPixmap(); + static const TQPixmap* reachedBreakpointPixmap(); + static const TQPixmap* disabledBreakpointPixmap(); + static const TQPixmap* executionPointPixmap(); + +signals: + + /** + * The user has toggled a breakpoint. + */ + void toggledBreakpoint(const TQString &fileName, int lineNum); + + /* + * The user wants to edit the properties of a breakpoint. + */ + void editedBreakpoint(const TQString &fileName, int lineNum); + + /** + * The user wants to enable/disable a breakpoint. + */ + void toggledBreakpointEnabled(const TQString &fileName, int lineNum); + +}; + + +#endif diff --git a/languages/lib/debugger/tdevdebugger.cpp b/languages/lib/debugger/tdevdebugger.cpp deleted file mode 100644 index e005491f..00000000 --- a/languages/lib/debugger/tdevdebugger.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 John Firebaugh - - 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 "tdevdebugger.h" - -TDevDebugger::TDevDebugger(TQObject *parent, const char *name) - : TQObject(parent, name) -{ -} - - -TDevDebugger::~TDevDebugger() -{ -} - -const TQPixmap* TDevDebugger::inactiveBreakpointPixmap() -{ - const char*breakpoint_gr_xpm[]={ - "11 16 6 1", - "c c #c6c6c6", - "d c #2c2c2c", - "# c #000000", - ". c None", - "a c #ffffff", - "b c #555555", - "...........", - "...........", - "...#####...", - "..#aaaaa#..", - ".#abbbbbb#.", - "#abbbbbbbb#", - "#abcacacbd#", - "#abbbbbbbb#", - "#abcacacbd#", - "#abbbbbbbb#", - ".#bbbbbbb#.", - "..#bdbdb#..", - "...#####...", - "...........", - "...........", - "..........."}; - static TQPixmap pixmap( breakpoint_gr_xpm ); - return &pixmap; -} - -const TQPixmap* TDevDebugger::activeBreakpointPixmap() -{ - const char* breakpoint_xpm[]={ - "11 16 6 1", - "c c #c6c6c6", - ". c None", - "# c #000000", - "d c #840000", - "a c #ffffff", - "b c #ff0000", - "...........", - "...........", - "...#####...", - "..#aaaaa#..", - ".#abbbbbb#.", - "#abbbbbbbb#", - "#abcacacbd#", - "#abbbbbbbb#", - "#abcacacbd#", - "#abbbbbbbb#", - ".#bbbbbbb#.", - "..#bdbdb#..", - "...#####...", - "...........", - "...........", - "..........."}; - static TQPixmap pixmap( breakpoint_xpm ); - return &pixmap; -} - -const TQPixmap* TDevDebugger::reachedBreakpointPixmap() -{ - const char*breakpoint_bl_xpm[]={ - "11 16 7 1", - "a c #c0c0ff", - "# c #000000", - "c c #0000c0", - "e c #0000ff", - "b c #dcdcdc", - "d c #ffffff", - ". c None", - "...........", - "...........", - "...#####...", - "..#ababa#..", - ".#bcccccc#.", - "#acccccccc#", - "#bcadadace#", - "#acccccccc#", - "#bcadadace#", - "#acccccccc#", - ".#ccccccc#.", - "..#cecec#..", - "...#####...", - "...........", - "...........", - "..........."}; - static TQPixmap pixmap( breakpoint_bl_xpm ); - return &pixmap; -} - -const TQPixmap* TDevDebugger::disabledBreakpointPixmap() -{ - const char*breakpoint_wh_xpm[]={ - "11 16 7 1", - "a c #c0c0ff", - "# c #000000", - "c c #0000c0", - "e c #0000ff", - "b c #dcdcdc", - "d c #ffffff", - ". c None", - "...........", - "...........", - "...#####...", - "..#ddddd#..", - ".#ddddddd#.", - "#ddddddddd#", - "#ddddddddd#", - "#ddddddddd#", - "#ddddddddd#", - "#ddddddddd#", - ".#ddddddd#.", - "..#ddddd#..", - "...#####...", - "...........", - "...........", - "..........."}; - static TQPixmap pixmap( breakpoint_wh_xpm ); - return &pixmap; -} - -const TQPixmap* TDevDebugger::executionPointPixmap() -{ - const char*exec_xpm[]={ - "11 16 4 1", - "a c #00ff00", - "b c #000000", - ". c None", - "# c #00c000", - "...........", - "...........", - "...........", - "#a.........", - "#aaa.......", - "#aaaaa.....", - "#aaaaaaa...", - "#aaaaaaaaa.", - "#aaaaaaa#b.", - "#aaaaa#b...", - "#aaa#b.....", - "#a#b.......", - "#b.........", - "...........", - "...........", - "..........."}; - static TQPixmap pixmap( exec_xpm ); - return &pixmap; -} - -#include "tdevdebugger.moc" diff --git a/languages/lib/debugger/tdevdebugger.h b/languages/lib/debugger/tdevdebugger.h deleted file mode 100644 index 3cfcd5de..00000000 --- a/languages/lib/debugger/tdevdebugger.h +++ /dev/null @@ -1,89 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 John Firebaugh - - 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 _TDEVDEBUGGER_H_ -#define _TDEVDEBUGGER_H_ - - -#include -#include - - -#include - -/** -* Base class to handle signals from the editor that relate to breakpoints -* and the execution point of the debugger. -*/ -class TDevDebugger : public TQObject -{ - Q_OBJECT - - -public: - - TDevDebugger(TQObject *parent=0, const char *name=0); - ~TDevDebugger(); - - /** - * Sets a breakpoint in the editor document belong to fileName. - * If id==-1, the breakpoint is deleted. - */ - virtual void setBreakpoint(const TQString &fileName, int lineNum, - int id, bool enabled, bool pending) = 0; - - /** - * Goes to a given location in a source file and marks the line. - * This is used by the debugger to mark the location where the - * the debugger has stopped. - */ - virtual void gotoExecutionPoint(const KURL &url, int lineNum=0) = 0; - - /** - * Clear the execution point. Usefull if debugging has ended. - */ - virtual void clearExecutionPoint() = 0; - - static const TQPixmap* inactiveBreakpointPixmap(); - static const TQPixmap* activeBreakpointPixmap(); - static const TQPixmap* reachedBreakpointPixmap(); - static const TQPixmap* disabledBreakpointPixmap(); - static const TQPixmap* executionPointPixmap(); - -signals: - - /** - * The user has toggled a breakpoint. - */ - void toggledBreakpoint(const TQString &fileName, int lineNum); - - /* - * The user wants to edit the properties of a breakpoint. - */ - void editedBreakpoint(const TQString &fileName, int lineNum); - - /** - * The user wants to enable/disable a breakpoint. - */ - void toggledBreakpointEnabled(const TQString &fileName, int lineNum); - -}; - - -#endif diff --git a/languages/lib/designer_integration/Mainpage.dox b/languages/lib/designer_integration/Mainpage.dox index 43070931..1f2db949 100644 --- a/languages/lib/designer_integration/Mainpage.dox +++ b/languages/lib/designer_integration/Mainpage.dox @@ -10,18 +10,18 @@ This library contains base classes to implement GUI designer integration in lang \section usingintegration Using designer integration support library Each language support which wants to use integrated designer, must reimplement @code -virtual TDevDesignerIntegration *TDevLanguageSupport::designer(KInterfaceDesigner::DesignerType type) +virtual KDevDesignerIntegration *KDevLanguageSupport::designer(KInterfaceDesigner::DesignerType type) @endcode -method and return designer integration object (@ref TDevLanguageSupport base class returns 0). +method and return designer integration object (@ref KDevLanguageSupport base class returns 0). Qt designer integration can be easily implemented by reusing @ref QtDesignerIntegration base class. For example, designer method of a language support could look like: @code -TDevDesignerIntegration * MyLanguageSupportPart::designer(KInterfaceDesigner::DesignerType type) +KDevDesignerIntegration * MyLanguageSupportPart::designer(KInterfaceDesigner::DesignerType type) { - TDevDesignerIntegration *des = 0; + KDevDesignerIntegration *des = 0; switch (type) { case KInterfaceDesigner::QtDesigner: @@ -40,7 +40,7 @@ return des; @endcode In the code above m_designers is a designer cache declared as: @code -QMap m_designers; +QMap m_designers; @endcode MyLanguageImplementationWidget and MyLanguageQtDesignerIntegration classes are subclasses of @ref QtDesignerIntegration and @ref ImplementationWidget base classes. diff --git a/languages/lib/designer_integration/Makefile.am b/languages/lib/designer_integration/Makefile.am index 41c0395d..6e9680a9 100644 --- a/languages/lib/designer_integration/Makefile.am +++ b/languages/lib/designer_integration/Makefile.am @@ -4,13 +4,13 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ METASOURCES = AUTO libdesignerintegration_la_LDFLAGS = $(all_libraries) lib_LTLIBRARIES = libdesignerintegration.la -libdesignerintegration_la_LIBADD = $(top_builddir)/lib/interfaces/libtdevinterfaces.la $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) +libdesignerintegration_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) libdesignerintegration_la_SOURCES = implementationwidgetbase.ui \ implementationwidget.cpp qtdesignerintegration.cpp langincludedirdir = $(includedir)/tdevelop/languages/designer_integration langincludedir_HEADERS = qtdesignerintegration.h implementationwidget.h implementationwidgetbase.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevinterfaces tdevutil -DOXYGEN_PROJECTNAME = TDevelop Designer Integration Support Library +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevinterfaces kdevutil +DOXYGEN_PROJECTNAME = KDevelop Designer Integration Support Library include ../../../Doxyfile.am diff --git a/languages/lib/designer_integration/implementationwidget.cpp b/languages/lib/designer_integration/implementationwidget.cpp index 314e9eeb..bdca4558 100644 --- a/languages/lib/designer_integration/implementationwidget.cpp +++ b/languages/lib/designer_integration/implementationwidget.cpp @@ -32,10 +32,10 @@ #include #include -#include +#include #include #include -#include +#include namespace ImplUtils{ class ClassItem: public TDEListViewItem{ @@ -61,7 +61,7 @@ private: }; } -ImplementationWidget::ImplementationWidget(TDevLanguageSupport *part, TQWidget* parent, const char* name, bool modal) +ImplementationWidget::ImplementationWidget(KDevLanguageSupport *part, TQWidget* parent, const char* name, bool modal) :CreateImplemenationWidgetBase(parent, name, modal), m_part(part) { } diff --git a/languages/lib/designer_integration/implementationwidget.h b/languages/lib/designer_integration/implementationwidget.h index c74947be..3dd53763 100644 --- a/languages/lib/designer_integration/implementationwidget.h +++ b/languages/lib/designer_integration/implementationwidget.h @@ -26,7 +26,7 @@ #include class TDEListViewItem; -class TDevLanguageSupport; +class KDevLanguageSupport; /** Base class for implementation creation widgets. @@ -42,7 +42,7 @@ class ImplementationWidget : public CreateImplemenationWidgetBase Q_OBJECT public: - ImplementationWidget(TDevLanguageSupport *part, TQWidget* parent = 0, const char* name = 0, bool modal = false); + ImplementationWidget(KDevLanguageSupport *part, TQWidget* parent = 0, const char* name = 0, bool modal = false); virtual ~ImplementationWidget(); /*$PUBLIC_FUNCTIONS$*/ @@ -77,7 +77,7 @@ protected slots: virtual void accept(); protected: - TDevLanguageSupport *m_part; + KDevLanguageSupport *m_part; ClassDom m_selectedClass; TQString m_formName; TQString m_baseClassName; diff --git a/languages/lib/designer_integration/qtdesignerintegration.cpp b/languages/lib/designer_integration/qtdesignerintegration.cpp index c2b9ab34..26912ba1 100644 --- a/languages/lib/designer_integration/qtdesignerintegration.cpp +++ b/languages/lib/designer_integration/qtdesignerintegration.cpp @@ -30,16 +30,16 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "codemodel_utils.h" #include "implementationwidget.h" -QtDesignerIntegration::QtDesignerIntegration(TDevLanguageSupport *part, ImplementationWidget *impl, bool classHasDefinitions, const char* name) - :TDevDesignerIntegration(part, name), m_part(part), m_impl(impl), +QtDesignerIntegration::QtDesignerIntegration(KDevLanguageSupport *part, ImplementationWidget *impl, bool classHasDefinitions, const char* name) + :KDevDesignerIntegration(part, name), m_part(part), m_impl(impl), m_classHasDefinitions(classHasDefinitions) { } diff --git a/languages/lib/designer_integration/qtdesignerintegration.h b/languages/lib/designer_integration/qtdesignerintegration.h index faafec58..f76eecba 100644 --- a/languages/lib/designer_integration/qtdesignerintegration.h +++ b/languages/lib/designer_integration/qtdesignerintegration.h @@ -23,24 +23,24 @@ #include #include -#include "tdevdesignerintegration.h" +#include "kdevdesignerintegration.h" -class TDevLanguageSupport; +class KDevLanguageSupport; class ImplementationWidget; /** TQt Designer integration base class. -Contains language-independent implementation part of a @ref TDevDesignerIntegration interface. +Contains language-independent implementation part of a @ref KDevDesignerIntegration interface. Ready to use in KDevelop language support plugins. Subclasses of this class should reimplement only pure virtual functions in the common case. */ -class QtDesignerIntegration : public TDevDesignerIntegration +class QtDesignerIntegration : public KDevDesignerIntegration { Q_OBJECT public: - QtDesignerIntegration(TDevLanguageSupport *part, ImplementationWidget *impl, + QtDesignerIntegration(KDevLanguageSupport *part, ImplementationWidget *impl, bool classHasDefinitions, const char* name = 0); virtual ~QtDesignerIntegration(); @@ -73,7 +73,7 @@ protected: //Form file - derived class name TQMap m_implementations; - TDevLanguageSupport *m_part; + KDevLanguageSupport *m_part; ImplementationWidget *m_impl; bool m_classHasDefinitions; }; diff --git a/languages/lib/interfaces/CMakeLists.txt b/languages/lib/interfaces/CMakeLists.txt index e8af2f36..370eece3 100644 --- a/languages/lib/interfaces/CMakeLists.txt +++ b/languages/lib/interfaces/CMakeLists.txt @@ -22,7 +22,7 @@ link_directories( ##### headers ################################### -install( FILES tdevpcsimporter.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/languages/interfaces ) +install( FILES kdevpcsimporter.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/languages/interfaces ) ##### other data ################################ @@ -33,7 +33,7 @@ install( FILES tdeveloppcsimporter.desktop DESTINATION ${SERVICETYPES_INSTALL_DI ##### lang_interfaces (shared) ################## tde_add_library( lang_interfaces SHARED AUTOMOC - SOURCES tdevpcsimporter.cpp + SOURCES kdevpcsimporter.cpp VERSION 0.0.0 LINK ${TQT_LIBRARIES} DESTINATION ${LIB_INSTALL_DIR} diff --git a/languages/lib/interfaces/Makefile.am b/languages/lib/interfaces/Makefile.am index 127999e6..c3ed3d00 100644 --- a/languages/lib/interfaces/Makefile.am +++ b/languages/lib/interfaces/Makefile.am @@ -3,14 +3,14 @@ METASOURCES = AUTO langincludedirdir = $(includedir)/tdevelop/languages/interfaces lib_LTLIBRARIES = liblang_interfaces.la liblang_interfaces_la_LDFLAGS = $(all_libraries) -liblang_interfaces_la_SOURCES = tdevpcsimporter.cpp +liblang_interfaces_la_SOURCES = kdevpcsimporter.cpp liblang_interfaces_la_LIBADD = $(LIB_QT) -langincludedir_HEADERS = tdevpcsimporter.h +langincludedir_HEADERS = kdevpcsimporter.h INCLUDES = $(all_includes) servicetypedir = $(kde_servicetypesdir) servicetype_DATA = tdeveloppcsimporter.desktop -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevinterfaces tdevutil -DOXYGEN_PROJECTNAME = TDevelop Language Support Interfaces Library -DOXYGEN_DOCDIRPREFIX = tdevlang +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevinterfaces kdevutil +DOXYGEN_PROJECTNAME = KDevelop Language Support Interfaces Library +DOXYGEN_DOCDIRPREFIX = kdevlang include ../../../Doxyfile.am diff --git a/languages/lib/interfaces/kdevpcsimporter.cpp b/languages/lib/interfaces/kdevpcsimporter.cpp new file mode 100644 index 00000000..166cc862 --- /dev/null +++ b/languages/lib/interfaces/kdevpcsimporter.cpp @@ -0,0 +1,35 @@ +/* This file is part of TDevelop + Copyright (C) 2003 Roberto Raggi + + 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 "kdevpcsimporter.h" +#include "kdevpcsimporter.moc" + +KDevPCSImporter::KDevPCSImporter( TQObject * parent, const char * name ) + : TQObject( parent, name ) +{ +} + +KDevPCSImporter::~ KDevPCSImporter( ) +{ +} + +TQWidget * KDevPCSImporter::createSettingsPage( TQWidget * /*parent*/, const char * /*name*/ ) +{ + return 0; +} diff --git a/languages/lib/interfaces/kdevpcsimporter.h b/languages/lib/interfaces/kdevpcsimporter.h new file mode 100644 index 00000000..870865cb --- /dev/null +++ b/languages/lib/interfaces/kdevpcsimporter.h @@ -0,0 +1,50 @@ +/* This file is part of TDevelop + Copyright (C) 2003 Roberto Raggi + + 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 KDEVPCSIMPORTER_H +#define KDEVPCSIMPORTER_H + +#include +#include + +class TQWidget; + +/** +KDevelop persistent class store importer plugin. + +These plugins are used by language support plugins to fill symbol stores +with symbol information from certain files. The purpose of the importer +is to provide file selection wizard. +*/ +class KDevPCSImporter: public TQObject +{ + Q_OBJECT + +public: + KDevPCSImporter( TQObject* parent=0, const char* name=0 ); + virtual ~KDevPCSImporter(); + + virtual TQString dbName() const = 0; + virtual TQStringList includePaths() = 0; + virtual TQStringList fileList() = 0; + + virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); +}; + +#endif // KDEVPCSIMPORTER_H diff --git a/languages/lib/interfaces/tdevpcsimporter.cpp b/languages/lib/interfaces/tdevpcsimporter.cpp deleted file mode 100644 index 66e29c13..00000000 --- a/languages/lib/interfaces/tdevpcsimporter.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* This file is part of TDevelop - Copyright (C) 2003 Roberto Raggi - - 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 "tdevpcsimporter.h" -#include "tdevpcsimporter.moc" - -TDevPCSImporter::TDevPCSImporter( TQObject * parent, const char * name ) - : TQObject( parent, name ) -{ -} - -TDevPCSImporter::~ TDevPCSImporter( ) -{ -} - -TQWidget * TDevPCSImporter::createSettingsPage( TQWidget * /*parent*/, const char * /*name*/ ) -{ - return 0; -} diff --git a/languages/lib/interfaces/tdevpcsimporter.h b/languages/lib/interfaces/tdevpcsimporter.h deleted file mode 100644 index 62878973..00000000 --- a/languages/lib/interfaces/tdevpcsimporter.h +++ /dev/null @@ -1,50 +0,0 @@ -/* This file is part of TDevelop - Copyright (C) 2003 Roberto Raggi - - 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 TDEVPCSIMPORTER_H -#define TDEVPCSIMPORTER_H - -#include -#include - -class TQWidget; - -/** -KDevelop persistent class store importer plugin. - -These plugins are used by language support plugins to fill symbol stores -with symbol information from certain files. The purpose of the importer -is to provide file selection wizard. -*/ -class TDevPCSImporter: public TQObject -{ - Q_OBJECT - -public: - TDevPCSImporter( TQObject* parent=0, const char* name=0 ); - virtual ~TDevPCSImporter(); - - virtual TQString dbName() const = 0; - virtual TQStringList includePaths() = 0; - virtual TQStringList fileList() = 0; - - virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); -}; - -#endif // TDEVPCSIMPORTER_H diff --git a/languages/pascal/CMakeLists.txt b/languages/pascal/CMakeLists.txt index cd398415..7449570e 100644 --- a/languages/pascal/CMakeLists.txt +++ b/languages/pascal/CMakeLists.txt @@ -34,18 +34,18 @@ link_directories( ##### other data ################################ -install( FILES tdevpascalsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpascalsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevpascalsupport ) -install( FILES pascaltemplates DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev/templates ) +install( FILES kdevpascalsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpascalsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevpascalsupport ) +install( FILES pascaltemplates DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev/templates ) -##### libtdevpascalsupport (module) ############# +##### libkdevpascalsupport (module) ############# -tde_add_kpart( libtdevpascalsupport AUTOMOC +tde_add_kpart( libkdevpascalsupport AUTOMOC SOURCES pascalsupport_part.cpp PascalLexer.cpp PascalParser.cpp PascalStoreWalker.cpp backgroundparser.cpp configproblemreporter.ui problemreporter.cpp - LINK antlr-static tdevcatalog-shared tdevelop-shared + LINK antlr-static kdevcatalog-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/pascal/Makefile.am b/languages/pascal/Makefile.am index 403f37f9..9d168734 100644 --- a/languages/pascal/Makefile.am +++ b/languages/pascal/Makefile.am @@ -5,19 +5,19 @@ INCLUDES = -I$(top_srcdir)/lib/antlr -I$(top_srcdir)/lib/catalog \ $(all_includes) SUBDIRS = file_templates app_templates compiler doc -kde_module_LTLIBRARIES = libtdevpascalsupport.la -libtdevpascalsupport_la_LDFLAGS = $(LEXLIB) $(all_libraries) $(KDE_PLUGIN) -libtdevpascalsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la $(top_builddir)/lib/catalog/libtdevcatalog.la +kde_module_LTLIBRARIES = libkdevpascalsupport.la +libkdevpascalsupport_la_LDFLAGS = $(LEXLIB) $(all_libraries) $(KDE_PLUGIN) +libkdevpascalsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la $(top_builddir)/lib/catalog/libkdevcatalog.la -libtdevpascalsupport_la_SOURCES = pascalsupport_part.cpp PascalLexer.cpp PascalParser.cpp PascalStoreWalker.cpp backgroundparser.cpp configproblemreporter.ui problemreporter.cpp +libkdevpascalsupport_la_SOURCES = pascalsupport_part.cpp PascalLexer.cpp PascalParser.cpp PascalStoreWalker.cpp backgroundparser.cpp configproblemreporter.ui problemreporter.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevpascalsupport.desktop +service_DATA = kdevpascalsupport.desktop -rcdir = $(kde_datadir)/tdevpascalsupport -rc_DATA = tdevpascalsupport.rc +rcdir = $(kde_datadir)/kdevpascalsupport +rc_DATA = kdevpascalsupport.rc genparser: antlr pascal.g && antlr pascal.tree.g @@ -29,5 +29,5 @@ genparser: #PascalStoreWalker.hpp PascalStoreWalker.cpp: pascal.tree.g # antlr pascal.tree.g -templatedir = ${kde_datadir}/tdevabbrev/templates +templatedir = ${kde_datadir}/kdevabbrev/templates template_DATA = pascaltemplates diff --git a/languages/pascal/app_templates/fpcgtk/CMakeLists.txt b/languages/pascal/app_templates/fpcgtk/CMakeLists.txt index b4a2e071..eb16e978 100644 --- a/languages/pascal/app_templates/fpcgtk/CMakeLists.txt +++ b/languages/pascal/app_templates/fpcgtk/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( fpcgtk.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/fpcgtk.tar.gz fpcgtk.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - fpcgtk.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + fpcgtk.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/pascal/app_templates/fpcgtk/Makefile.am b/languages/pascal/app_templates/fpcgtk/Makefile.am index e9744c9b..5c4c116f 100644 --- a/languages/pascal/app_templates/fpcgtk/Makefile.am +++ b/languages/pascal/app_templates/fpcgtk/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.pp app.tdevelop templateName = fpcgtk ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/pascal/app_templates/fpcgtk/app.tdevelop b/languages/pascal/app_templates/fpcgtk/app.tdevelop index bbd6d777..e7b3a147 100644 --- a/languages/pascal/app_templates/fpcgtk/app.tdevelop +++ b/languages/pascal/app_templates/fpcgtk/app.tdevelop @@ -11,7 +11,7 @@ Code - + default @@ -26,8 +26,8 @@ false - - + + ada ada_bugs_gcc @@ -75,12 +75,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/pascal/app_templates/fpcgtk/fpcgtk.kdevtemplate b/languages/pascal/app_templates/fpcgtk/fpcgtk.kdevtemplate new file mode 100644 index 00000000..45bb7eea --- /dev/null +++ b/languages/pascal/app_templates/fpcgtk/fpcgtk.kdevtemplate @@ -0,0 +1,114 @@ +# KDE Config File +[General] +Name=GTK+ application +Name[ca]=Aplicació GTK+ +Name[da]=GTK+ program +Name[de]=GTK+-Anwendung +Name[el]=Εφαρμογή GTK+ +Name[es]=Aplicación GTK+ +Name[et]=GTK+ rakendus +Name[eu]=GTK+ aplikazioa +Name[fa]=کاربرد GTK+ +Name[fr]=Application GTK+ +Name[ga]=Feidhmchlár GTK+ +Name[gl]=Aplicación GTK+ +Name[hu]=GTK+-alapú alkalmazás +Name[it]=Applicazione GTK+ +Name[ja]=GTK+ アプリケーション +Name[nds]=GTK+-Programm +Name[ne]=GTK+ अनुप्रयोग +Name[nl]=GTK+-toepassing +Name[pl]=Program GTK+ +Name[pt]=Aplicação do GTK+ +Name[pt_BR]=Aplicativo GTK+ +Name[ru]=Приложение GTK+ +Name[sk]=GTK+ aplikácia +Name[sr]=GTK+ програм +Name[sr@Latn]=GTK+ program +Name[sv]=GTK+ program +Name[tr]=GTK+ Uygulaması +Name[zh_CN]=GTK+ 应用程序 +Name[zh_TW]=GTK+ 應用程式 +Category=Pascal/Free Pascal +Comment=Generates a GTK+ based GUI application in Pascal +Comment[ca]=Genera una aplicació IGU en Pascal basada en GTK+ +Comment[da]=Genererer et GTK+ baseret GUI program i Pascal +Comment[de]=Erstellt eine auf GTK+ basierende GUI-Anwendung in Pascal +Comment[el]=Δημιουργεί μια γραφική εφαρμογή βασισμένη στο GTK+ σε Pascal +Comment[es]=Genera una aplicación gráfica en Pascal basada en GTK+ +Comment[et]=Graafilise rakenduse loomine GTK+ põhjal Pascalis +Comment[eu]=GTK+-en oinarritutako GUI aplikazio bat sortzen du Pascal-en +Comment[fa]=یک کاربرد ونک بر مبنای GTK+ در پاسکال تولید می‌کند +Comment[fr]=Génère une application avec interface graphique basée sur GTK+ en Pascal +Comment[ga]=Cruthaigh feidhmchlár grafach i Pascal, bunaithe ar GTK+ +Comment[gl]=Xera unha aplicación GUI baseada en GTK+ en Pascal +Comment[hu]=Létrehoz egy GTK+-alapú grafikus felületű alkalmazást Pascalban +Comment[it]=Genera un'applicazione GUI basata su GTK+ in Pascal +Comment[ja]=GTK+ ベースの GUI アプリケーションを Pascal で作成します +Comment[nds]=Stellt en op GTK+ opbuut Böversietprogramm in Pascal op +Comment[ne]= GTK+ आधारित जी यू आई अनुप्रयोगलाई पास्कलमा उत्पन्न गर्दछ +Comment[nl]=Genereert een GKT+-gebaseerde GUI-toepassing in Pascal +Comment[pl]=Generuje program z graficznym interfejsem użytkownika używający GTK+ w Pascalu +Comment[pt]=Gera uma aplicação gráfica, baseada em GTK+, em Pascal +Comment[pt_BR]=Gera uma aplicação gráfica, baseada em GTK+, em Pascal +Comment[ru]=Создание приложения GTK+ на Pascal +Comment[sk]=Vygeneruje GTK+ GUI aplikáciu v Pascal +Comment[sr]=Прави GUI програм на основу GTK+ у Pascal-у +Comment[sr@Latn]=Pravi GUI program na osnovu GTK+ u Pascal-u +Comment[sv]=Skapar ett GTK+ baserat program med grafiskt användargränssnitt i Pascal +Comment[zh_CN]=生成一个 Pascal 语言的 GTK+ GUI 应用程序 +Comment[zh_TW]=產生一個 Pascal 語言,以GTK+ 為基礎的使用者介面應用程式 +FileTemplates=pp-program,PStyle,pp-unit,PStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp +Archive=fpcgtk.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE2] +Type=install +Source=%{src}/main.pp +Dest=%{dest}/src/%{APPNAMELC}.pp + +[MSG] +Type=message +Comment=A GTK+ application written in pascal was created in %{dest} +Comment[ca]=Una aplicació GTK+ escrita en Pascal ha estat creada en %{dest} +Comment[da]=Et GTK+ program skrevet i pascal blev oprettet i %{dest} +Comment[de]=Eine in Pascal geschriebene GTK+-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή GTK+ γραμμένη σε pascal δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación GTK+ escrita en Pascal ha sido creada en %{dest} +Comment[et]=GTK+ rakendus Pascalis loodi asukohta %{dest} +Comment[eu]=Pascal-en idatzitako GTK+ aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد GTK+ نوشته‌شده در پاسکال در %{dest} ایجاد شد +Comment[fr]=Une application GTK+ écrite en Pascal a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár GTK+, scríofa i pascal, i %{dest} +Comment[gl]=Creouse unha aplicación GTK+ escrita en pascal en %{dest} +Comment[hu]=Létrejött egy egyszerű, Pascal nyelvű, GTK+-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione GTK+ scritta in Pascal in %{dest} +Comment[ja]=Pascal で書かれた GTK+ アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Pascal-Programm för GTK+ opstellt +Comment[ne]=पास्कलमा लेखिएको GTK+ अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een GTK+-toepassing geschreven in Pascal is aangemaakt in %{dest} +Comment[pl]=Program GTK+ napisany w Pascalu został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação GTK+, escrita em Pascal, em %{dest} +Comment[pt_BR]=Foi criada uma aplicação GTK+, escrita em Pascal, em %{dest} +Comment[ru]=Приложение GTK+ на Pascal создано в %{dest} +Comment[sk]=GTK+ aplikácia v Pascal bola vytvorená v %{dest} +Comment[sr]=GTK+ програм у Pascal-у направљен је у %{dest} +Comment[sr@Latn]=GTK+ program u Pascal-u napravljen je u %{dest} +Comment[sv]=Ett GTK+ program skrivet i Pascal skapades i %{dest} +Comment[tr]=Pascal'da yazılmış bir GTK+ uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了 Pascal 语言的 GTK+ 应用程序 +Comment[zh_TW]=一個 Pascal 的 GTK+ 應用程式已建立於 %{dest} diff --git a/languages/pascal/app_templates/fpcgtk/fpcgtk.tdevtemplate b/languages/pascal/app_templates/fpcgtk/fpcgtk.tdevtemplate deleted file mode 100644 index d0103844..00000000 --- a/languages/pascal/app_templates/fpcgtk/fpcgtk.tdevtemplate +++ /dev/null @@ -1,114 +0,0 @@ -# KDE Config File -[General] -Name=GTK+ application -Name[ca]=Aplicació GTK+ -Name[da]=GTK+ program -Name[de]=GTK+-Anwendung -Name[el]=Εφαρμογή GTK+ -Name[es]=Aplicación GTK+ -Name[et]=GTK+ rakendus -Name[eu]=GTK+ aplikazioa -Name[fa]=کاربرد GTK+ -Name[fr]=Application GTK+ -Name[ga]=Feidhmchlár GTK+ -Name[gl]=Aplicación GTK+ -Name[hu]=GTK+-alapú alkalmazás -Name[it]=Applicazione GTK+ -Name[ja]=GTK+ アプリケーション -Name[nds]=GTK+-Programm -Name[ne]=GTK+ अनुप्रयोग -Name[nl]=GTK+-toepassing -Name[pl]=Program GTK+ -Name[pt]=Aplicação do GTK+ -Name[pt_BR]=Aplicativo GTK+ -Name[ru]=Приложение GTK+ -Name[sk]=GTK+ aplikácia -Name[sr]=GTK+ програм -Name[sr@Latn]=GTK+ program -Name[sv]=GTK+ program -Name[tr]=GTK+ Uygulaması -Name[zh_CN]=GTK+ 应用程序 -Name[zh_TW]=GTK+ 應用程式 -Category=Pascal/Free Pascal -Comment=Generates a GTK+ based GUI application in Pascal -Comment[ca]=Genera una aplicació IGU en Pascal basada en GTK+ -Comment[da]=Genererer et GTK+ baseret GUI program i Pascal -Comment[de]=Erstellt eine auf GTK+ basierende GUI-Anwendung in Pascal -Comment[el]=Δημιουργεί μια γραφική εφαρμογή βασισμένη στο GTK+ σε Pascal -Comment[es]=Genera una aplicación gráfica en Pascal basada en GTK+ -Comment[et]=Graafilise rakenduse loomine GTK+ põhjal Pascalis -Comment[eu]=GTK+-en oinarritutako GUI aplikazio bat sortzen du Pascal-en -Comment[fa]=یک کاربرد ونک بر مبنای GTK+ در پاسکال تولید می‌کند -Comment[fr]=Génère une application avec interface graphique basée sur GTK+ en Pascal -Comment[ga]=Cruthaigh feidhmchlár grafach i Pascal, bunaithe ar GTK+ -Comment[gl]=Xera unha aplicación GUI baseada en GTK+ en Pascal -Comment[hu]=Létrehoz egy GTK+-alapú grafikus felületű alkalmazást Pascalban -Comment[it]=Genera un'applicazione GUI basata su GTK+ in Pascal -Comment[ja]=GTK+ ベースの GUI アプリケーションを Pascal で作成します -Comment[nds]=Stellt en op GTK+ opbuut Böversietprogramm in Pascal op -Comment[ne]= GTK+ आधारित जी यू आई अनुप्रयोगलाई पास्कलमा उत्पन्न गर्दछ -Comment[nl]=Genereert een GKT+-gebaseerde GUI-toepassing in Pascal -Comment[pl]=Generuje program z graficznym interfejsem użytkownika używający GTK+ w Pascalu -Comment[pt]=Gera uma aplicação gráfica, baseada em GTK+, em Pascal -Comment[pt_BR]=Gera uma aplicação gráfica, baseada em GTK+, em Pascal -Comment[ru]=Создание приложения GTK+ на Pascal -Comment[sk]=Vygeneruje GTK+ GUI aplikáciu v Pascal -Comment[sr]=Прави GUI програм на основу GTK+ у Pascal-у -Comment[sr@Latn]=Pravi GUI program na osnovu GTK+ u Pascal-u -Comment[sv]=Skapar ett GTK+ baserat program med grafiskt användargränssnitt i Pascal -Comment[zh_CN]=生成一个 Pascal 语言的 GTK+ GUI 应用程序 -Comment[zh_TW]=產生一個 Pascal 語言,以GTK+ 為基礎的使用者介面應用程式 -FileTemplates=pp-program,PStyle,pp-unit,PStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp -Archive=fpcgtk.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE2] -Type=install -Source=%{src}/main.pp -Dest=%{dest}/src/%{APPNAMELC}.pp - -[MSG] -Type=message -Comment=A GTK+ application written in pascal was created in %{dest} -Comment[ca]=Una aplicació GTK+ escrita en Pascal ha estat creada en %{dest} -Comment[da]=Et GTK+ program skrevet i pascal blev oprettet i %{dest} -Comment[de]=Eine in Pascal geschriebene GTK+-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή GTK+ γραμμένη σε pascal δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación GTK+ escrita en Pascal ha sido creada en %{dest} -Comment[et]=GTK+ rakendus Pascalis loodi asukohta %{dest} -Comment[eu]=Pascal-en idatzitako GTK+ aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد GTK+ نوشته‌شده در پاسکال در %{dest} ایجاد شد -Comment[fr]=Une application GTK+ écrite en Pascal a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár GTK+, scríofa i pascal, i %{dest} -Comment[gl]=Creouse unha aplicación GTK+ escrita en pascal en %{dest} -Comment[hu]=Létrejött egy egyszerű, Pascal nyelvű, GTK+-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione GTK+ scritta in Pascal in %{dest} -Comment[ja]=Pascal で書かれた GTK+ アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Pascal-Programm för GTK+ opstellt -Comment[ne]=पास्कलमा लेखिएको GTK+ अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een GTK+-toepassing geschreven in Pascal is aangemaakt in %{dest} -Comment[pl]=Program GTK+ napisany w Pascalu został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação GTK+, escrita em Pascal, em %{dest} -Comment[pt_BR]=Foi criada uma aplicação GTK+, escrita em Pascal, em %{dest} -Comment[ru]=Приложение GTK+ на Pascal создано в %{dest} -Comment[sk]=GTK+ aplikácia v Pascal bola vytvorená v %{dest} -Comment[sr]=GTK+ програм у Pascal-у направљен је у %{dest} -Comment[sr@Latn]=GTK+ program u Pascal-u napravljen je u %{dest} -Comment[sv]=Ett GTK+ program skrivet i Pascal skapades i %{dest} -Comment[tr]=Pascal'da yazılmış bir GTK+ uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了 Pascal 语言的 GTK+ 应用程序 -Comment[zh_TW]=一個 Pascal 的 GTK+ 應用程式已建立於 %{dest} diff --git a/languages/pascal/app_templates/fpchello/CMakeLists.txt b/languages/pascal/app_templates/fpchello/CMakeLists.txt index 37ac3aa9..12941440 100644 --- a/languages/pascal/app_templates/fpchello/CMakeLists.txt +++ b/languages/pascal/app_templates/fpchello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( fpchello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/fpchello.tar.gz fpchello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - fpchello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + fpchello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/pascal/app_templates/fpchello/Makefile.am b/languages/pascal/app_templates/fpchello/Makefile.am index f5567a09..744bc214 100644 --- a/languages/pascal/app_templates/fpchello/Makefile.am +++ b/languages/pascal/app_templates/fpchello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.pp app.tdevelop templateName = fpchello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/pascal/app_templates/fpchello/app.tdevelop b/languages/pascal/app_templates/fpchello/app.tdevelop index 603e6e6b..a2f83092 100644 --- a/languages/pascal/app_templates/fpchello/app.tdevelop +++ b/languages/pascal/app_templates/fpchello/app.tdevelop @@ -11,7 +11,7 @@ Code - + default @@ -26,8 +26,8 @@ true - - + + ada ada_bugs_gcc @@ -75,12 +75,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/pascal/app_templates/fpchello/fpchello.kdevtemplate b/languages/pascal/app_templates/fpchello/fpchello.kdevtemplate new file mode 100644 index 00000000..65c46115 --- /dev/null +++ b/languages/pascal/app_templates/fpchello/fpchello.kdevtemplate @@ -0,0 +1,115 @@ +# KDE Config File +[General] +Name=Simple program +Name[ca]=Simple programa +Name[da]=Simpelt program +Name[de]=Einfaches Programm +Name[el]=Απλό πρόγραμμα +Name[es]=Programa sencillo +Name[et]=Lihtne programm +Name[eu]=Programa sinplea +Name[fa]=برنامۀ ساده +Name[fr]=Programme simple +Name[ga]=Ríomhchlár simplí +Name[gl]=Programa sinxelo +Name[hu]=Egyszerű program +Name[it]=Semplice programma +Name[ja]=簡単なプログラム +Name[nds]=Eenfach Programm +Name[ne]=साधारण कार्यक्रम +Name[nl]=Eenvoudig programma +Name[pl]=Prosty program +Name[pt]=Programa simples +Name[pt_BR]=Programa simples +Name[ru]=Простое приложение +Name[sk]=Jednoduchý prohram +Name[sr]=Једноставан програм +Name[sr@Latn]=Jednostavan program +Name[sv]=Enkelt program +Name[tr]=Basit program +Name[zh_CN]=简单程序 +Name[zh_TW]=簡單程式 +Category=Pascal/Free Pascal +Comment=Generates a simple program in Pascal +Comment[ca]=Genera un simple programa en Pascal +Comment[da]=Genererer et simpelt program i Pascal +Comment[de]=Erstellt ein einfaches Programm in Pascal +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα σε Pascal +Comment[es]=Genera un sencillo programa en Pascal +Comment[et]=Lihtsa programmi loomine Pascalis +Comment[eu]=Pascal-en idatzitako programa sinple bat +Comment[fa]=یک برنامۀ ساده در پاسکال تولید می‌کند +Comment[fr]=Génère un programme simple en Pascal +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí i Pascal +Comment[gl]=Xera un programa sinxelo en Pascal +Comment[hu]=Létrehoz egy egyszerű programot Pascalban +Comment[it]=Genera un semplice programma in Pascal +Comment[ja]=簡単なプログラムを Pascal で作成します +Comment[nds]=Stellt en eenfach Pascal-Programm op +Comment[ne]=पास्कलमा साधारण कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig programma in Pascal +Comment[pl]=Generuje prosty program w Pascalu +Comment[pt]=Gera um programa simples em Pascal +Comment[pt_BR]=Gera um programa simples em Pascal +Comment[ru]=Создание простого приложения на Pascal +Comment[sk]=Vygeneruje jednoduchý program v Pascal +Comment[sr]=Прави једноставан програм у Pascal-у +Comment[sr@Latn]=Pravi jednostavan program u Pascal-u +Comment[sv]=Skapar ett enkelt program i Pascal +Comment[tr]=Pascal'da basit bir program yaratır +Comment[zh_CN]=生成一个简单的 Pascal 语言程序 +Comment[zh_TW]=產生一個 Pascal 的簡單程式 +FileTemplates=pp-program,PStyle,pp-unit,PStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp +Archive=fpchello.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE2] +Type=install +Source=%{src}/main.pp +Dest=%{dest}/src/%{APPNAMELC}.pp + +[MSG] +Type=message +Comment=A simple pascal program was created in %{dest} +Comment[ca]=Un simple programa en Pascal ha estat creat en %{dest} +Comment[da]=Et simpelt pascal program blev oprettet i %{dest} +Comment[de]=Ein einfaches Programm in Pascal wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα pascal δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa en Pascal ha sido creado en %{dest} +Comment[et]=Lihtne Pascali programm loodi asukohta %{dest} +Comment[eu]=Pascal-en oinarritutako programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ پاسکال در %{dest} ایجاد شد +Comment[fr]=Un programme Pascal simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár simplí pascal i %{dest} +Comment[gl]=Creouse un programa sinxelo en pascal en %{dest} +Comment[hu]=Létrejött egy egyszerű Pascal-program itt: %{dest} +Comment[it]=È stato creato un semplice programma Pascal in %{dest} +Comment[ja]=簡単な Pascal プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach Pascal-Programm opstellt +Comment[ne]=साधारण पास्कल कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig Pascal-programma is aangemaakt in %{dest} +Comment[pl]=Prosty program w Pascalu został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples em Pascal em %{dest} +Comment[pt_BR]=Foi criado um programa simples em Pascal em %{dest} +Comment[ru]=Простое приложение на Pascal создано в %{dest} +Comment[sk]=Jednoduchý program v Pascal bol vytvorený v %{dest} +Comment[sr]=Једноставан pascal програм направљен је у %{dest} +Comment[sr@Latn]=Jednostavan pascal program napravljen je u %{dest} +Comment[sv]=Ett enkelt Pascal-program skapades i %{dest} +Comment[tr]=Pascal'da basit bir program %{dest} içinde yaratıldı +Comment[zh_CN]=在 %{dest} 创建了一个简单的 Pascal 程序 +Comment[zh_TW]=一個簡單的 Pascal 程式已建立於 %{dest} diff --git a/languages/pascal/app_templates/fpchello/fpchello.tdevtemplate b/languages/pascal/app_templates/fpchello/fpchello.tdevtemplate deleted file mode 100644 index 21c213f4..00000000 --- a/languages/pascal/app_templates/fpchello/fpchello.tdevtemplate +++ /dev/null @@ -1,115 +0,0 @@ -# KDE Config File -[General] -Name=Simple program -Name[ca]=Simple programa -Name[da]=Simpelt program -Name[de]=Einfaches Programm -Name[el]=Απλό πρόγραμμα -Name[es]=Programa sencillo -Name[et]=Lihtne programm -Name[eu]=Programa sinplea -Name[fa]=برنامۀ ساده -Name[fr]=Programme simple -Name[ga]=Ríomhchlár simplí -Name[gl]=Programa sinxelo -Name[hu]=Egyszerű program -Name[it]=Semplice programma -Name[ja]=簡単なプログラム -Name[nds]=Eenfach Programm -Name[ne]=साधारण कार्यक्रम -Name[nl]=Eenvoudig programma -Name[pl]=Prosty program -Name[pt]=Programa simples -Name[pt_BR]=Programa simples -Name[ru]=Простое приложение -Name[sk]=Jednoduchý prohram -Name[sr]=Једноставан програм -Name[sr@Latn]=Jednostavan program -Name[sv]=Enkelt program -Name[tr]=Basit program -Name[zh_CN]=简单程序 -Name[zh_TW]=簡單程式 -Category=Pascal/Free Pascal -Comment=Generates a simple program in Pascal -Comment[ca]=Genera un simple programa en Pascal -Comment[da]=Genererer et simpelt program i Pascal -Comment[de]=Erstellt ein einfaches Programm in Pascal -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα σε Pascal -Comment[es]=Genera un sencillo programa en Pascal -Comment[et]=Lihtsa programmi loomine Pascalis -Comment[eu]=Pascal-en idatzitako programa sinple bat -Comment[fa]=یک برنامۀ ساده در پاسکال تولید می‌کند -Comment[fr]=Génère un programme simple en Pascal -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí i Pascal -Comment[gl]=Xera un programa sinxelo en Pascal -Comment[hu]=Létrehoz egy egyszerű programot Pascalban -Comment[it]=Genera un semplice programma in Pascal -Comment[ja]=簡単なプログラムを Pascal で作成します -Comment[nds]=Stellt en eenfach Pascal-Programm op -Comment[ne]=पास्कलमा साधारण कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig programma in Pascal -Comment[pl]=Generuje prosty program w Pascalu -Comment[pt]=Gera um programa simples em Pascal -Comment[pt_BR]=Gera um programa simples em Pascal -Comment[ru]=Создание простого приложения на Pascal -Comment[sk]=Vygeneruje jednoduchý program v Pascal -Comment[sr]=Прави једноставан програм у Pascal-у -Comment[sr@Latn]=Pravi jednostavan program u Pascal-u -Comment[sv]=Skapar ett enkelt program i Pascal -Comment[tr]=Pascal'da basit bir program yaratır -Comment[zh_CN]=生成一个简单的 Pascal 语言程序 -Comment[zh_TW]=產生一個 Pascal 的簡單程式 -FileTemplates=pp-program,PStyle,pp-unit,PStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp -Archive=fpchello.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE2] -Type=install -Source=%{src}/main.pp -Dest=%{dest}/src/%{APPNAMELC}.pp - -[MSG] -Type=message -Comment=A simple pascal program was created in %{dest} -Comment[ca]=Un simple programa en Pascal ha estat creat en %{dest} -Comment[da]=Et simpelt pascal program blev oprettet i %{dest} -Comment[de]=Ein einfaches Programm in Pascal wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα pascal δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa en Pascal ha sido creado en %{dest} -Comment[et]=Lihtne Pascali programm loodi asukohta %{dest} -Comment[eu]=Pascal-en oinarritutako programa sinple bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ پاسکال در %{dest} ایجاد شد -Comment[fr]=Un programme Pascal simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár simplí pascal i %{dest} -Comment[gl]=Creouse un programa sinxelo en pascal en %{dest} -Comment[hu]=Létrejött egy egyszerű Pascal-program itt: %{dest} -Comment[it]=È stato creato un semplice programma Pascal in %{dest} -Comment[ja]=簡単な Pascal プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach Pascal-Programm opstellt -Comment[ne]=साधारण पास्कल कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig Pascal-programma is aangemaakt in %{dest} -Comment[pl]=Prosty program w Pascalu został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples em Pascal em %{dest} -Comment[pt_BR]=Foi criado um programa simples em Pascal em %{dest} -Comment[ru]=Простое приложение на Pascal создано в %{dest} -Comment[sk]=Jednoduchý program v Pascal bol vytvorený v %{dest} -Comment[sr]=Једноставан pascal програм направљен је у %{dest} -Comment[sr@Latn]=Jednostavan pascal program napravljen je u %{dest} -Comment[sv]=Ett enkelt Pascal-program skapades i %{dest} -Comment[tr]=Pascal'da basit bir program %{dest} içinde yaratıldı -Comment[zh_CN]=在 %{dest} 创建了一个简单的 Pascal 程序 -Comment[zh_TW]=一個簡單的 Pascal 程式已建立於 %{dest} diff --git a/languages/pascal/app_templates/fpcsharedlib/CMakeLists.txt b/languages/pascal/app_templates/fpcsharedlib/CMakeLists.txt index 779eda2d..52a5e4f7 100644 --- a/languages/pascal/app_templates/fpcsharedlib/CMakeLists.txt +++ b/languages/pascal/app_templates/fpcsharedlib/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( fpcsharedlib.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/fpcsharedlib.tar.gz fpcsharedlib.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - fpcsharedlib.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + fpcsharedlib.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/pascal/app_templates/fpcsharedlib/Makefile.am b/languages/pascal/app_templates/fpcsharedlib/Makefile.am index 13194e81..d1d0eef4 100644 --- a/languages/pascal/app_templates/fpcsharedlib/Makefile.am +++ b/languages/pascal/app_templates/fpcsharedlib/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.pp app.tdevelop templateName = fpcsharedlib ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/pascal/app_templates/fpcsharedlib/app.tdevelop b/languages/pascal/app_templates/fpcsharedlib/app.tdevelop index e0289480..8249e017 100644 --- a/languages/pascal/app_templates/fpcsharedlib/app.tdevelop +++ b/languages/pascal/app_templates/fpcsharedlib/app.tdevelop @@ -11,7 +11,7 @@ Code - + default @@ -26,8 +26,8 @@ true - - + + ada ada_bugs_gcc @@ -75,12 +75,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.kdevtemplate b/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.kdevtemplate new file mode 100644 index 00000000..35835599 --- /dev/null +++ b/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.kdevtemplate @@ -0,0 +1,115 @@ +# KDE Config File +[General] +Name=Shared library +Name[ca]=Biblioteca compartida +Name[da]=Delt bibliotek +Name[de]=Shared Library +Name[el]=Κοινόχρηστη βιβλιοθήκη +Name[es]=Biblioteca compartida +Name[et]=Jagatud teek +Name[eu]=Liburutegi partekatua +Name[fa]=کتابخانۀ مشترک +Name[fr]=Bibliothèque partagée +Name[ga]=Comhleabharlann +Name[gl]=Biblioteca compartida +Name[hu]=Osztott programkönyvtár +Name[it]=Libreria condivisa +Name[ja]=共有ライブラリ +Name[nds]=Deelt Bibliotheek +Name[ne]=साझेदार लाइब्रेरी +Name[nl]=Gedeelde bibliotheek +Name[pl]=Biblioteka dzielona +Name[pt]=Biblioteca dinâmica +Name[pt_BR]=Biblioteca compartilhada +Name[ru]=Разделяемая библиотека +Name[sk]=Zdieľaná knižnica +Name[sr]=Дељена библиотека +Name[sr@Latn]=Deljena biblioteka +Name[sv]=Delat bibliotek +Name[tr]=Paylaşılan Kütüphane +Name[zh_CN]=共享库 +Name[zh_TW]=共享函式庫 +Category=Pascal/Free Pascal +Comment=Generates a shared library in Pascal +Comment[ca]=Genera una biblioteca compartida en Pascal +Comment[da]=Genererer et delt bibliotek i Pascal +Comment[de]=Erstellt eine Shared Library in Pascal +Comment[el]=Δημιουργία μιας κοινόχρηστης βιβλιοθήκης σε Pascal +Comment[es]=Genera una biblioteca compartida en Pascal +Comment[et]=Jagatud teegi loomine Pascalis +Comment[eu]=Pascal-en idatzitako liburutegi partekatu bat sortzen du +Comment[fa]=یک کتابخانۀ مشترک در پاسکال تولید می‌کند +Comment[fr]=Génère une bibliothèque partagée en Pascal +Comment[ga]=Cruthaíonn sé seo comhleabharlann i Pascal +Comment[gl]=Xera unha biblioteca compartida en Pascal +Comment[hu]=Létrehoz egy osztott programkönyvtárt Pascalban +Comment[it]=Genera una libreria condivisa in Pascal +Comment[ja]=共有ライブラリを Pascal で作成します +Comment[nds]=Stellt en deelt Bibliotheek in Pascal op +Comment[ne]=साझेदार लाइब्रेरीलाई पास्कलमा उत्पन्न गर्दछ +Comment[nl]=Genereert een gedeelde bibliotheek in Pascal +Comment[pl]=Generuje bibliotekę dzieloną w Pascalu +Comment[pt]=Gera uma biblioteca dinâmica em Pascal +Comment[pt_BR]=Gera uma biblioteca dinâmica em Pascal +Comment[ru]=Создание разделяемой библиотеки на Pascal +Comment[sk]=Vygeneruje zdieľanú knižnicu v Pascal +Comment[sr]=Прави дељену библиотеку у Pascal-у +Comment[sr@Latn]=Pravi deljenu biblioteku u Pascal-u +Comment[sv]=Skapar ett delat bibliotek i Pascal +Comment[tr]=Pascal'da bir paylaşılan kütüphane yaratır +Comment[zh_CN]=生成 Pascal 语言的共享库 +Comment[zh_TW]=產生一個 Pascal 的共享函式庫 +FileTemplates=pp-program,PStyle,pp-unit,PStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp +Archive=fpcsharedlib.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE2] +Type=install +Source=%{src}/main.pp +Dest=%{dest}/src/%{APPNAMELC}.pp + +[MSG] +Type=message +Comment=A shared library project written in pascal was created in %{dest} +Comment[ca]=Una biblioteca compartida escrita en Pascal ha estat creada en %{dest} +Comment[da]=Et delt biblioteksprojekt skrevet i pascal blev oprettet i %{dest} +Comment[de]=Ein Projekt für eine in Pascal geschriebene Shared Library wurde in %{dest} erstellt. +Comment[el]=Ένα έργο κοινόχρηστης βιβλιοθήκης γραμμένο σε pascal δημιουργήθηκε στο %{dest} +Comment[es]=Un proyecto de biblioteca compartida escrito en Pascal ha sido creado en %{dest} +Comment[et]=Jagatud teegi projekt Pascalis loodi asukohta %{dest} +Comment[eu]=Pascal-en idatzitako liburutegi partekatu bat sortu da hemen: %{dest} +Comment[fa]=یک پروژۀ کتابخانۀ مشترک نوشته‌شده در پاسکال در %{dest} ایجاد شد +Comment[fr]=Un projet de bibliothèque partagée écrit en Pascal a été créé dans %{dest} +Comment[ga]=Cruthaíodh tionscadal comhleabharlainne, scríofa i pascal, i %{dest} +Comment[gl]=Creouse un proxecto de biblioteca compartida en pascan en %{dest} +Comment[hu]=Létrejött egy Pascal nyelvű projekt osztott programkönyvtár készítéséhez itt: %{dest} +Comment[it]=È stato creato un progetto di libreria condivisa scritto in Pascal in %{dest} +Comment[ja]=Pascal で書かれた共有ライブラリプロジェクトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Projekt för en in Pascal schreven deelt Bibliotheek opstellt +Comment[ne]=पास्कलमा लेखिएको साझेदार लाइब्रेरी परियोजना %{dest} मा सिर्जना गरियो +Comment[nl]=Een gedeelde bibliotheek geschreven in Pascal is aangemaakt in %{dest} +Comment[pl]=Projekt biblioteki dzielonej napisanej w Pascalu został utworzony w %{dest} +Comment[pt]=Foi criado o projecto de uma biblioteca dinâmica em Pascal em %{dest} +Comment[pt_BR]=Foi criado o projecto de uma biblioteca dinâmica em Pascal em %{dest} +Comment[ru]=Разделяемая библиотека на Pascal создана в %{dest} +Comment[sk]=Zdieľaná knižnica v Pascal bola vytvorená v %{dest} +Comment[sr]=Пројекат дељене библиотеке у Pascal-у направљен је у %{dest} +Comment[sr@Latn]=Projekat deljene biblioteke u Pascal-u napravljen je u %{dest} +Comment[sv]=Ett projekt med delat bibliotek skrivet i Pascal skapades i %{dest} +Comment[tr]=Pascal'da bir paylaşılan kütüphane projesi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个 Pascal 语言的共享库工程 +Comment[zh_TW]=一個 Pascal 的共享函式庫專案已建立於 %{dest} diff --git a/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.tdevtemplate b/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.tdevtemplate deleted file mode 100644 index 3c4e93bf..00000000 --- a/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.tdevtemplate +++ /dev/null @@ -1,115 +0,0 @@ -# KDE Config File -[General] -Name=Shared library -Name[ca]=Biblioteca compartida -Name[da]=Delt bibliotek -Name[de]=Shared Library -Name[el]=Κοινόχρηστη βιβλιοθήκη -Name[es]=Biblioteca compartida -Name[et]=Jagatud teek -Name[eu]=Liburutegi partekatua -Name[fa]=کتابخانۀ مشترک -Name[fr]=Bibliothèque partagée -Name[ga]=Comhleabharlann -Name[gl]=Biblioteca compartida -Name[hu]=Osztott programkönyvtár -Name[it]=Libreria condivisa -Name[ja]=共有ライブラリ -Name[nds]=Deelt Bibliotheek -Name[ne]=साझेदार लाइब्रेरी -Name[nl]=Gedeelde bibliotheek -Name[pl]=Biblioteka dzielona -Name[pt]=Biblioteca dinâmica -Name[pt_BR]=Biblioteca compartilhada -Name[ru]=Разделяемая библиотека -Name[sk]=Zdieľaná knižnica -Name[sr]=Дељена библиотека -Name[sr@Latn]=Deljena biblioteka -Name[sv]=Delat bibliotek -Name[tr]=Paylaşılan Kütüphane -Name[zh_CN]=共享库 -Name[zh_TW]=共享函式庫 -Category=Pascal/Free Pascal -Comment=Generates a shared library in Pascal -Comment[ca]=Genera una biblioteca compartida en Pascal -Comment[da]=Genererer et delt bibliotek i Pascal -Comment[de]=Erstellt eine Shared Library in Pascal -Comment[el]=Δημιουργία μιας κοινόχρηστης βιβλιοθήκης σε Pascal -Comment[es]=Genera una biblioteca compartida en Pascal -Comment[et]=Jagatud teegi loomine Pascalis -Comment[eu]=Pascal-en idatzitako liburutegi partekatu bat sortzen du -Comment[fa]=یک کتابخانۀ مشترک در پاسکال تولید می‌کند -Comment[fr]=Génère une bibliothèque partagée en Pascal -Comment[ga]=Cruthaíonn sé seo comhleabharlann i Pascal -Comment[gl]=Xera unha biblioteca compartida en Pascal -Comment[hu]=Létrehoz egy osztott programkönyvtárt Pascalban -Comment[it]=Genera una libreria condivisa in Pascal -Comment[ja]=共有ライブラリを Pascal で作成します -Comment[nds]=Stellt en deelt Bibliotheek in Pascal op -Comment[ne]=साझेदार लाइब्रेरीलाई पास्कलमा उत्पन्न गर्दछ -Comment[nl]=Genereert een gedeelde bibliotheek in Pascal -Comment[pl]=Generuje bibliotekę dzieloną w Pascalu -Comment[pt]=Gera uma biblioteca dinâmica em Pascal -Comment[pt_BR]=Gera uma biblioteca dinâmica em Pascal -Comment[ru]=Создание разделяемой библиотеки на Pascal -Comment[sk]=Vygeneruje zdieľanú knižnicu v Pascal -Comment[sr]=Прави дељену библиотеку у Pascal-у -Comment[sr@Latn]=Pravi deljenu biblioteku u Pascal-u -Comment[sv]=Skapar ett delat bibliotek i Pascal -Comment[tr]=Pascal'da bir paylaşılan kütüphane yaratır -Comment[zh_CN]=生成 Pascal 语言的共享库 -Comment[zh_TW]=產生一個 Pascal 的共享函式庫 -FileTemplates=pp-program,PStyle,pp-unit,PStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp -Archive=fpcsharedlib.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE2] -Type=install -Source=%{src}/main.pp -Dest=%{dest}/src/%{APPNAMELC}.pp - -[MSG] -Type=message -Comment=A shared library project written in pascal was created in %{dest} -Comment[ca]=Una biblioteca compartida escrita en Pascal ha estat creada en %{dest} -Comment[da]=Et delt biblioteksprojekt skrevet i pascal blev oprettet i %{dest} -Comment[de]=Ein Projekt für eine in Pascal geschriebene Shared Library wurde in %{dest} erstellt. -Comment[el]=Ένα έργο κοινόχρηστης βιβλιοθήκης γραμμένο σε pascal δημιουργήθηκε στο %{dest} -Comment[es]=Un proyecto de biblioteca compartida escrito en Pascal ha sido creado en %{dest} -Comment[et]=Jagatud teegi projekt Pascalis loodi asukohta %{dest} -Comment[eu]=Pascal-en idatzitako liburutegi partekatu bat sortu da hemen: %{dest} -Comment[fa]=یک پروژۀ کتابخانۀ مشترک نوشته‌شده در پاسکال در %{dest} ایجاد شد -Comment[fr]=Un projet de bibliothèque partagée écrit en Pascal a été créé dans %{dest} -Comment[ga]=Cruthaíodh tionscadal comhleabharlainne, scríofa i pascal, i %{dest} -Comment[gl]=Creouse un proxecto de biblioteca compartida en pascan en %{dest} -Comment[hu]=Létrejött egy Pascal nyelvű projekt osztott programkönyvtár készítéséhez itt: %{dest} -Comment[it]=È stato creato un progetto di libreria condivisa scritto in Pascal in %{dest} -Comment[ja]=Pascal で書かれた共有ライブラリプロジェクトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Projekt för en in Pascal schreven deelt Bibliotheek opstellt -Comment[ne]=पास्कलमा लेखिएको साझेदार लाइब्रेरी परियोजना %{dest} मा सिर्जना गरियो -Comment[nl]=Een gedeelde bibliotheek geschreven in Pascal is aangemaakt in %{dest} -Comment[pl]=Projekt biblioteki dzielonej napisanej w Pascalu został utworzony w %{dest} -Comment[pt]=Foi criado o projecto de uma biblioteca dinâmica em Pascal em %{dest} -Comment[pt_BR]=Foi criado o projecto de uma biblioteca dinâmica em Pascal em %{dest} -Comment[ru]=Разделяемая библиотека на Pascal создана в %{dest} -Comment[sk]=Zdieľaná knižnica v Pascal bola vytvorená v %{dest} -Comment[sr]=Пројекат дељене библиотеке у Pascal-у направљен је у %{dest} -Comment[sr@Latn]=Projekat deljene biblioteke u Pascal-u napravljen je u %{dest} -Comment[sv]=Ett projekt med delat bibliotek skrivet i Pascal skapades i %{dest} -Comment[tr]=Pascal'da bir paylaşılan kütüphane projesi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个 Pascal 语言的共享库工程 -Comment[zh_TW]=一個 Pascal 的共享函式庫專案已建立於 %{dest} diff --git a/languages/pascal/app_templates/pascalhello/CMakeLists.txt b/languages/pascal/app_templates/pascalhello/CMakeLists.txt index a9d1b313..3422a8ff 100644 --- a/languages/pascal/app_templates/pascalhello/CMakeLists.txt +++ b/languages/pascal/app_templates/pascalhello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( pascalhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/pascalhello.tar.gz pascalhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - pascalhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + pascalhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/pascal/app_templates/pascalhello/Makefile.am b/languages/pascal/app_templates/pascalhello/Makefile.am index 96ce40c7..3e72435c 100644 --- a/languages/pascal/app_templates/pascalhello/Makefile.am +++ b/languages/pascal/app_templates/pascalhello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.pp app.tdevelop templateName = pascalhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/pascal/app_templates/pascalhello/app.tdevelop b/languages/pascal/app_templates/pascalhello/app.tdevelop index 8e571db2..51e8c65e 100644 --- a/languages/pascal/app_templates/pascalhello/app.tdevelop +++ b/languages/pascal/app_templates/pascalhello/app.tdevelop @@ -11,7 +11,7 @@ Code - + default @@ -23,8 +23,8 @@ true - - + + ada ada_bugs_gcc @@ -72,12 +72,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/pascal/app_templates/pascalhello/pascalhello.kdevtemplate b/languages/pascal/app_templates/pascalhello/pascalhello.kdevtemplate new file mode 100644 index 00000000..ed7104cb --- /dev/null +++ b/languages/pascal/app_templates/pascalhello/pascalhello.kdevtemplate @@ -0,0 +1,116 @@ +# KDE Config File +[General] +Name=Simple Hello world program +Name[ca]=Simple programa Hello world +Name[da]=Simpelt Goddag verden program +Name[de]=Ein einfaches "Hello World"-Programm +Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» sencillo +Name[et]=Lihtne "Tere, maailm" programm +Name[eu]="Kaixo mundua" programa sinplea +Name[fa]=برنامۀ سادۀ Hello world +Name[fr]=Programme « Bonjour monde » simple +Name[ga]=Ríomhchlár simplí "Hello World" +Name[gl]=Programa sinxelo Ola mundo +Name[hu]=Egyszerű Hello world program +Name[it]=Semplice programma di "Hello world" +Name[ja]=簡単な Hello world プログラム +Name[ms]=Program Hello World mudah +Name[nds]=En eenfach "Moin Welt"-Programm +Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम +Name[nl]=Eenvoudig 'Hello World' programma +Name[pl]=Prosty program witaj świecie +Name[pt]=Programa simples Olá Mundo +Name[pt_BR]=Programa simples Olá Mundo +Name[ru]=Простая программа Hello world +Name[sk]=Jednoduchý "Ahoj svet" program +Name[sl]=Preprost program Hello world +Name[sr]=Једноставан „Здраво свете“ програм +Name[sr@Latn]=Jednostavan „Zdravo svete“ program +Name[sv]=Enkelt Hello world-program +Name[tr]=Basit Merhaba dünya programı +Name[zh_CN]=简单的 Hello world 程序 +Name[zh_TW]=簡單的 Hello world 程式 +Icon=pascalhello.png +Category=Pascal +Comment=Generates a simple Hello world program in Pascal +Comment[ca]=Genera un simple programa de Hello world en Pascal +Comment[da]=Genererer et simpelt Goddag verden program i Pascal +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Pascal +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε Pascal +Comment[es]=Genera un programa «Hola mundo» sencillo en Pascal +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Pascalis +Comment[eu]=Pascal-en idatzitako "Kaixo mundua" programa sinple bat sortzen du +Comment[fa]=یک برنامۀ سادۀ Hello world در پاسکال تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Pascal +Comment[gl]=Xera un programa sinxelo Ola mundo en Pascal +Comment[hu]=Létrehoz egy egyszerű Hello world programot Pascalban +Comment[it]=Genera un semplice programma di "Hello world" in Pascal +Comment[ja]=簡単な Hello world プログラムを Pascal で作成します +Comment[nds]=Stellt in Pascal en eenfach "Moin Welt"-Programm op +Comment[ne]=साधारण हेल्लो वोल्ड कार्यक्रमलाई पास्कलमा उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvudig Hello World-programma in Pascal +Comment[pl]=Generuje prosty program "Witaj świecie" w Pascalu +Comment[pt]=Gera um programa simples Olá Mundo em Pascal +Comment[pt_BR]=Gera um programa simples Olá Mundo em Pascal +Comment[ru]=Создание простого приложения Hello world на Pascal +Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v Pascal +Comment[sr]=Прави једноставан „Здраво свете“ у Pascal-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Pascal-u +Comment[sv]=Skapar ett enkelt Hello world-program i Pascal +Comment[tr]=Pascal'da basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成一个简单的 Pascal 语言 Hello world 程序 +Comment[zh_TW]=產生一個簡單的 Pascal Hello world 程式 +FileTemplates=pp-program,PStyle,pp-unit,PStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp +Archive=pascalhello.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE2] +Type=install +Source=%{src}/main.pp +Dest=%{dest}/src/%{APPNAMELC}.pp + +[MSG] +Type=message +Comment=A simple 'hello world' program in Pascal was created in %{dest} +Comment[ca]=Un simple programa de 'hello world' en Pascal ha estat creat en %{dest} +Comment[da]=Et simpelt 'goddag verden' program i Pascal blev oprettet i %{dest} +Comment[de]=Ein einfaches "Hello world"-Programm in Pascal wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα 'Γεια σου κόσμε' σε Pascal δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa «Hola mundo» en Pascal ha sido creado en %{dest} +Comment[et]=Lihtne "Tere, maailm" programm Pascalis loodi asukohta %{dest} +Comment[eu]=Pascal-en idatzitako "Kaixo mundua" programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ «hello world» در پاسکال در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » simple en Pascal a été créé dans %{dest} +Comment[gl]=Creouse un programa sinxelo en Pascal 'ola mundo' en %{dest} +Comment[hu]=Létrejött egy egyszerű Hello world Pascal-program itt: %{dest} +Comment[it]=È stato creato un semplice programma Pascal di "hello world" in %{dest} +Comment[ja]=Pascal で書かれた簡単な hello world プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Pascal opstellt +Comment[ne]=पास्कलमा साधारण 'हेल्लो वोल्ड' कार्यक्रम %{dest} सिर्जना गरियो +Comment[nl]=Een eenvoudig Hello World-programma geschreven in Pascal is aangemaakt in %{dest} +Comment[pl]=Prosty program "Witaj świecie" w Pascalu został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples 'olá mundo' em Pascal em %{dest} +Comment[pt_BR]=Foi criado um programa simples 'olá mundo' em Pascal em %{dest} +Comment[ru]=Простое приложение 'hello world' на Pascal создано в %{dest} +Comment[sk]=Jednoduchý Ahoj svet program v Pascal bol vytvorený v %{dest} +Comment[sr]=Једноставан „Здраво свете“ програм у Pascal-у направљен је у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo svete“ program u Pascal-u napravljen je u %{dest} +Comment[sv]=Ett enkelt 'Hello world'-program i Pascal skapades i %{dest} +Comment[tr]=Pascal'da basit bir "Merhaba Dünya" uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简单的“Hello world”程序 +Comment[zh_TW]=一個簡單的 Pascal Hello world 程式已建立於 %{dest} diff --git a/languages/pascal/app_templates/pascalhello/pascalhello.tdevtemplate b/languages/pascal/app_templates/pascalhello/pascalhello.tdevtemplate deleted file mode 100644 index e70ca533..00000000 --- a/languages/pascal/app_templates/pascalhello/pascalhello.tdevtemplate +++ /dev/null @@ -1,116 +0,0 @@ -# KDE Config File -[General] -Name=Simple Hello world program -Name[ca]=Simple programa Hello world -Name[da]=Simpelt Goddag verden program -Name[de]=Ein einfaches "Hello World"-Programm -Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» sencillo -Name[et]=Lihtne "Tere, maailm" programm -Name[eu]="Kaixo mundua" programa sinplea -Name[fa]=برنامۀ سادۀ Hello world -Name[fr]=Programme « Bonjour monde » simple -Name[ga]=Ríomhchlár simplí "Hello World" -Name[gl]=Programa sinxelo Ola mundo -Name[hu]=Egyszerű Hello world program -Name[it]=Semplice programma di "Hello world" -Name[ja]=簡単な Hello world プログラム -Name[ms]=Program Hello World mudah -Name[nds]=En eenfach "Moin Welt"-Programm -Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम -Name[nl]=Eenvoudig 'Hello World' programma -Name[pl]=Prosty program witaj świecie -Name[pt]=Programa simples Olá Mundo -Name[pt_BR]=Programa simples Olá Mundo -Name[ru]=Простая программа Hello world -Name[sk]=Jednoduchý "Ahoj svet" program -Name[sl]=Preprost program Hello world -Name[sr]=Једноставан „Здраво свете“ програм -Name[sr@Latn]=Jednostavan „Zdravo svete“ program -Name[sv]=Enkelt Hello world-program -Name[tr]=Basit Merhaba dünya programı -Name[zh_CN]=简单的 Hello world 程序 -Name[zh_TW]=簡單的 Hello world 程式 -Icon=pascalhello.png -Category=Pascal -Comment=Generates a simple Hello world program in Pascal -Comment[ca]=Genera un simple programa de Hello world en Pascal -Comment[da]=Genererer et simpelt Goddag verden program i Pascal -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Pascal -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε Pascal -Comment[es]=Genera un programa «Hola mundo» sencillo en Pascal -Comment[et]=Lihtsa "Tere, maailm" programmi loomine Pascalis -Comment[eu]=Pascal-en idatzitako "Kaixo mundua" programa sinple bat sortzen du -Comment[fa]=یک برنامۀ سادۀ Hello world در پاسکال تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en Pascal -Comment[gl]=Xera un programa sinxelo Ola mundo en Pascal -Comment[hu]=Létrehoz egy egyszerű Hello world programot Pascalban -Comment[it]=Genera un semplice programma di "Hello world" in Pascal -Comment[ja]=簡単な Hello world プログラムを Pascal で作成します -Comment[nds]=Stellt in Pascal en eenfach "Moin Welt"-Programm op -Comment[ne]=साधारण हेल्लो वोल्ड कार्यक्रमलाई पास्कलमा उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvudig Hello World-programma in Pascal -Comment[pl]=Generuje prosty program "Witaj świecie" w Pascalu -Comment[pt]=Gera um programa simples Olá Mundo em Pascal -Comment[pt_BR]=Gera um programa simples Olá Mundo em Pascal -Comment[ru]=Создание простого приложения Hello world на Pascal -Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v Pascal -Comment[sr]=Прави једноставан „Здраво свете“ у Pascal-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Pascal-u -Comment[sv]=Skapar ett enkelt Hello world-program i Pascal -Comment[tr]=Pascal'da basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成一个简单的 Pascal 语言 Hello world 程序 -Comment[zh_TW]=產生一個簡單的 Pascal Hello world 程式 -FileTemplates=pp-program,PStyle,pp-unit,PStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp -Archive=pascalhello.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE2] -Type=install -Source=%{src}/main.pp -Dest=%{dest}/src/%{APPNAMELC}.pp - -[MSG] -Type=message -Comment=A simple 'hello world' program in Pascal was created in %{dest} -Comment[ca]=Un simple programa de 'hello world' en Pascal ha estat creat en %{dest} -Comment[da]=Et simpelt 'goddag verden' program i Pascal blev oprettet i %{dest} -Comment[de]=Ein einfaches "Hello world"-Programm in Pascal wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα 'Γεια σου κόσμε' σε Pascal δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa «Hola mundo» en Pascal ha sido creado en %{dest} -Comment[et]=Lihtne "Tere, maailm" programm Pascalis loodi asukohta %{dest} -Comment[eu]=Pascal-en idatzitako "Kaixo mundua" programa sinple bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ «hello world» در پاسکال در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » simple en Pascal a été créé dans %{dest} -Comment[gl]=Creouse un programa sinxelo en Pascal 'ola mundo' en %{dest} -Comment[hu]=Létrejött egy egyszerű Hello world Pascal-program itt: %{dest} -Comment[it]=È stato creato un semplice programma Pascal di "hello world" in %{dest} -Comment[ja]=Pascal で書かれた簡単な hello world プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Pascal opstellt -Comment[ne]=पास्कलमा साधारण 'हेल्लो वोल्ड' कार्यक्रम %{dest} सिर्जना गरियो -Comment[nl]=Een eenvoudig Hello World-programma geschreven in Pascal is aangemaakt in %{dest} -Comment[pl]=Prosty program "Witaj świecie" w Pascalu został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples 'olá mundo' em Pascal em %{dest} -Comment[pt_BR]=Foi criado um programa simples 'olá mundo' em Pascal em %{dest} -Comment[ru]=Простое приложение 'hello world' на Pascal создано в %{dest} -Comment[sk]=Jednoduchý Ahoj svet program v Pascal bol vytvorený v %{dest} -Comment[sr]=Једноставан „Здраво свете“ програм у Pascal-у направљен је у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo svete“ program u Pascal-u napravljen je u %{dest} -Comment[sv]=Ett enkelt 'Hello world'-program i Pascal skapades i %{dest} -Comment[tr]=Pascal'da basit bir "Merhaba Dünya" uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个简单的“Hello world”程序 -Comment[zh_TW]=一個簡單的 Pascal Hello world 程式已建立於 %{dest} diff --git a/languages/pascal/compiler/Makefile.am b/languages/pascal/compiler/Makefile.am index 400962be..c9f7528b 100644 --- a/languages/pascal/compiler/Makefile.am +++ b/languages/pascal/compiler/Makefile.am @@ -1,6 +1,6 @@ # This is the collection of plugins. In contrast to the parts # directory, these are 'transient' in a sense and don't -# share the complete TDevComponent interface. +# share the complete KDevComponent interface. SUBDIRS = dccoptions fpcoptions diff --git a/languages/pascal/compiler/dccoptions/CMakeLists.txt b/languages/pascal/compiler/dccoptions/CMakeLists.txt index 3e7fbcdd..ae6c6388 100644 --- a/languages/pascal/compiler/dccoptions/CMakeLists.txt +++ b/languages/pascal/compiler/dccoptions/CMakeLists.txt @@ -25,13 +25,13 @@ link_directories( ##### other data ################################ -install( FILES tdevdccoptions.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevdccoptions.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevdccoptions (module) ################ +##### libkdevdccoptions (module) ################ -tde_add_kpart( libtdevdccoptions AUTOMOC +tde_add_kpart( libkdevdccoptions AUTOMOC SOURCES dccoptionsplugin.cpp optiontabs.cpp - LINK tdevwidgets-shared tdevextras-shared + LINK kdevwidgets-shared kdevextras-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/pascal/compiler/dccoptions/Makefile.am b/languages/pascal/compiler/dccoptions/Makefile.am index f913ae45..734e63c5 100644 --- a/languages/pascal/compiler/dccoptions/Makefile.am +++ b/languages/pascal/compiler/dccoptions/Makefile.am @@ -3,14 +3,14 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extras \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevdccoptions.la -libtdevdccoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -libtdevdccoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevdccoptions.la +libkdevdccoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevdccoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(LIB_TDEHTML) -libtdevdccoptions_la_SOURCES = dccoptionsplugin.cpp optiontabs.cpp +libkdevdccoptions_la_SOURCES = dccoptionsplugin.cpp optiontabs.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdccoptions.desktop +service_DATA = kdevdccoptions.desktop diff --git a/languages/pascal/compiler/dccoptions/dccoptionsplugin.cpp b/languages/pascal/compiler/dccoptions/dccoptionsplugin.cpp index cffbbdd5..8a8ffc54 100644 --- a/languages/pascal/compiler/dccoptions/dccoptionsplugin.cpp +++ b/languages/pascal/compiler/dccoptions/dccoptionsplugin.cpp @@ -19,10 +19,10 @@ #include "optiontabs.h" -K_EXPORT_COMPONENT_FACTORY( libtdevdccoptions, KGenericFactory( "tdevdccoptions" ) ) +K_EXPORT_COMPONENT_FACTORY( libkdevdccoptions, KGenericFactory( "kdevdccoptions" ) ) DccOptionsPlugin::DccOptionsPlugin(TQObject *parent, const char *name, const TQStringList/* &args*/) - : TDevCompilerOptions(parent, name) + : KDevCompilerOptions(parent, name) { } diff --git a/languages/pascal/compiler/dccoptions/dccoptionsplugin.h b/languages/pascal/compiler/dccoptions/dccoptionsplugin.h index b0db639d..d8465520 100644 --- a/languages/pascal/compiler/dccoptions/dccoptionsplugin.h +++ b/languages/pascal/compiler/dccoptions/dccoptionsplugin.h @@ -13,9 +13,9 @@ #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" -class DccOptionsPlugin : public TDevCompilerOptions +class DccOptionsPlugin : public KDevCompilerOptions { Q_OBJECT diff --git a/languages/pascal/compiler/dccoptions/kdevdccoptions.desktop b/languages/pascal/compiler/dccoptions/kdevdccoptions.desktop new file mode 100644 index 00000000..e99e9385 --- /dev/null +++ b/languages/pascal/compiler/dccoptions/kdevdccoptions.desktop @@ -0,0 +1,54 @@ +[Desktop Entry] +Type=Service +Exec=dcc +Comment=Borland Delphi Compiler +Comment[br]=Dastumer Delphi Borland +Comment[ca]=Compilador Delphi de Borland +Comment[da]=Borland Delphi oversætter +Comment[el]=Μεταγλωττιστής Borland Delphi +Comment[es]=Compilador de Delphi de Borland +Comment[et]=Borland Delphi kompilaator +Comment[eu]=Borland Delphi konpiladorea +Comment[fa]=مترجم برلند دلفی +Comment[fr]=Compilateur Delphi de Borland +Comment[ga]=Tiomsaitheoir Borland Delphi +Comment[gl]=Compilador Borland Delphi +Comment[hi]=बोरलैंड डेल्फ़ी कम्पायलर +Comment[hu]=Borland Delphi fordítóprogram +Comment[is]=Borland Delphi þýðandi +Comment[it]=Compilatore per Borland Delphi +Comment[ja]=Borland Delphi コンパイラ +Comment[nds]=Borland Delphi-Kompilerer +Comment[ne]=बोरल्यान्ड डेल्पी कम्पाइलर +Comment[nl]=Borland Delphi-compiler +Comment[pl]=Kompilator Borland Delphi +Comment[pt]=Compilador de Borland Delphi +Comment[pt_BR]=Compilador Delphi da Borland Delphi +Comment[ru]=Компилятор Borland Delphi +Comment[sk]=Borland Delphi kompilátor +Comment[sl]=Prevajalnik za Borland Delphi +Comment[sr]=Borland-ов преводилац Delphi-ја +Comment[sr@Latn]=Borland-ov prevodilac Delphi-ja +Comment[sv]=Borland Delphi kompilator +Comment[ta]=பொர்லான்ட் டெல்பி தொகுப்பி +Comment[tg]=Талфифгари Borland Delphi +Comment[tr]=Borland Delphi Derleyicisi +Comment[zh_CN]=Borland Delphi 编译器 +Comment[zh_TW]=Borland Delphi 編譯器 +Name=DccOptions +Name[da]=Delphi oversætter indstillinger +Name[de]=Delphi-Einstellungen (TDevelop) +Name[hi]=डीसीसी-विकल्प +Name[nds]=Delphi-Optschonen (TDevelop) +Name[pl]=Opcje Dcc +Name[sk]=Dcc možnosti +Name[sl]=Možnosti Dcc +Name[sv]=Alternativ för dcc +Name[ta]=Dccவிருப்பங்கள் +Name[tg]=DccИнтихобҳо +Name[zh_TW]=Dcc 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevdccoptions +X-TDevelop-Version=5 +X-TDevelop-Language=Pascal +X-TDevelop-Args=dcc diff --git a/languages/pascal/compiler/dccoptions/tdevdccoptions.desktop b/languages/pascal/compiler/dccoptions/tdevdccoptions.desktop deleted file mode 100644 index 3631eeb9..00000000 --- a/languages/pascal/compiler/dccoptions/tdevdccoptions.desktop +++ /dev/null @@ -1,54 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=dcc -Comment=Borland Delphi Compiler -Comment[br]=Dastumer Delphi Borland -Comment[ca]=Compilador Delphi de Borland -Comment[da]=Borland Delphi oversætter -Comment[el]=Μεταγλωττιστής Borland Delphi -Comment[es]=Compilador de Delphi de Borland -Comment[et]=Borland Delphi kompilaator -Comment[eu]=Borland Delphi konpiladorea -Comment[fa]=مترجم برلند دلفی -Comment[fr]=Compilateur Delphi de Borland -Comment[ga]=Tiomsaitheoir Borland Delphi -Comment[gl]=Compilador Borland Delphi -Comment[hi]=बोरलैंड डेल्फ़ी कम्पायलर -Comment[hu]=Borland Delphi fordítóprogram -Comment[is]=Borland Delphi þýðandi -Comment[it]=Compilatore per Borland Delphi -Comment[ja]=Borland Delphi コンパイラ -Comment[nds]=Borland Delphi-Kompilerer -Comment[ne]=बोरल्यान्ड डेल्पी कम्पाइलर -Comment[nl]=Borland Delphi-compiler -Comment[pl]=Kompilator Borland Delphi -Comment[pt]=Compilador de Borland Delphi -Comment[pt_BR]=Compilador Delphi da Borland Delphi -Comment[ru]=Компилятор Borland Delphi -Comment[sk]=Borland Delphi kompilátor -Comment[sl]=Prevajalnik za Borland Delphi -Comment[sr]=Borland-ов преводилац Delphi-ја -Comment[sr@Latn]=Borland-ov prevodilac Delphi-ja -Comment[sv]=Borland Delphi kompilator -Comment[ta]=பொர்லான்ட் டெல்பி தொகுப்பி -Comment[tg]=Талфифгари Borland Delphi -Comment[tr]=Borland Delphi Derleyicisi -Comment[zh_CN]=Borland Delphi 编译器 -Comment[zh_TW]=Borland Delphi 編譯器 -Name=DccOptions -Name[da]=Delphi oversætter indstillinger -Name[de]=Delphi-Einstellungen (TDevelop) -Name[hi]=डीसीसी-विकल्प -Name[nds]=Delphi-Optschonen (TDevelop) -Name[pl]=Opcje Dcc -Name[sk]=Dcc možnosti -Name[sl]=Možnosti Dcc -Name[sv]=Alternativ för dcc -Name[ta]=Dccவிருப்பங்கள் -Name[tg]=DccИнтихобҳо -Name[zh_TW]=Dcc 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevdccoptions -X-TDevelop-Version=5 -X-TDevelop-Language=Pascal -X-TDevelop-Args=dcc diff --git a/languages/pascal/compiler/fpcoptions/CMakeLists.txt b/languages/pascal/compiler/fpcoptions/CMakeLists.txt index 7d9a010f..12c9ef89 100644 --- a/languages/pascal/compiler/fpcoptions/CMakeLists.txt +++ b/languages/pascal/compiler/fpcoptions/CMakeLists.txt @@ -25,13 +25,13 @@ link_directories( ##### other data ################################ -install( FILES tdevfpcoptions.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevfpcoptions.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevfpcoptions (module) ################ +##### libkdevfpcoptions (module) ################ -tde_add_kpart( libtdevfpcoptions AUTOMOC +tde_add_kpart( libkdevfpcoptions AUTOMOC SOURCES fpcoptionsplugin.cpp optiontabs.cpp - LINK tdevwidgets-shared tdevextras-shared + LINK kdevwidgets-shared kdevextras-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/pascal/compiler/fpcoptions/Makefile.am b/languages/pascal/compiler/fpcoptions/Makefile.am index 3d105f6f..70579448 100644 --- a/languages/pascal/compiler/fpcoptions/Makefile.am +++ b/languages/pascal/compiler/fpcoptions/Makefile.am @@ -3,17 +3,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extras \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevfpcoptions.la -libtdevfpcoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -libtdevfpcoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevfpcoptions.la +libkdevfpcoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevfpcoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(LIB_TDEHTML) -libtdevfpcoptions_la_SOURCES = fpcoptionsplugin.cpp optiontabs.cpp +libkdevfpcoptions_la_SOURCES = fpcoptionsplugin.cpp optiontabs.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfpcoptions.desktop +service_DATA = kdevfpcoptions.desktop diff --git a/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.cpp b/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.cpp index 31babced..0b01fb01 100644 --- a/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.cpp +++ b/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.cpp @@ -16,10 +16,10 @@ #include "optiontabs.h" #include "fpcoptionsplugin.h" -K_EXPORT_COMPONENT_FACTORY( libtdevfpcoptions, KGenericFactory( "tdevfpcoptions" ) ) +K_EXPORT_COMPONENT_FACTORY( libkdevfpcoptions, KGenericFactory( "kdevfpcoptions" ) ) FpcOptionsPlugin::FpcOptionsPlugin(TQObject *parent, const char *name, const TQStringList& /*args*/) - : TDevCompilerOptions(parent, name) + : KDevCompilerOptions(parent, name) { } diff --git a/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.h b/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.h index cee18e79..e30b33c0 100644 --- a/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.h +++ b/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.h @@ -13,9 +13,9 @@ #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" -class FpcOptionsPlugin : public TDevCompilerOptions +class FpcOptionsPlugin : public KDevCompilerOptions { Q_OBJECT diff --git a/languages/pascal/compiler/fpcoptions/kdevfpcoptions.desktop b/languages/pascal/compiler/fpcoptions/kdevfpcoptions.desktop new file mode 100644 index 00000000..660e973d --- /dev/null +++ b/languages/pascal/compiler/fpcoptions/kdevfpcoptions.desktop @@ -0,0 +1,55 @@ +[Desktop Entry] +Type=Service +Exec=fpc +Comment=Free Pascal Compiler +Comment[br]=Dastumer Pascal dieub +Comment[ca]=Compilador Free Pascal +Comment[da]=Free Pascal oversætter +Comment[el]=Μεταγλωττιστής Free Pascal +Comment[es]=Compilador Free Pascal +Comment[et]=Free Pascal kompilaator +Comment[eu]=Free Pascal konpiladorea +Comment[fa]=مترجم آزاد پاسکال +Comment[fr]=Compilateur Free Pascal +Comment[ga]=Tiomsaitheoir Saor Pascal +Comment[gl]=Compilador Free Pascal +Comment[hi]=फ्री पॉस्कल कम्पायलर +Comment[hu]=Szabad forráskódú Pascal fordítóprogram +Comment[is]=Frjáls Pascal þýðandi +Comment[it]=Compilatore per Free Pascal +Comment[ja]=Free Pascal コンパイラ +Comment[nds]=Free Pascal-Kompilerer +Comment[ne]=स्वतन्त्र पास्कल कम्पाइलर +Comment[nl]=Free Pascal-compiler +Comment[pt]=Compilador Free Pascal +Comment[pt_BR]=Compilador Free Pascal +Comment[ru]=Компилятор Free Pascal +Comment[sk]=Voľný Pascal kompilátor +Comment[sl]=Prevajalnik za Free Pascal +Comment[sr]=Слободни преводилац Pascal-а +Comment[sr@Latn]=Slobodni prevodilac Pascal-a +Comment[sv]=Fri Pascal-kompilator +Comment[ta]=இலவச பாஸ்கல் தொகுப்பி +Comment[tg]=Талфифгари Free Pascal +Comment[tr]=Serbest Pascal Derleyicisi +Comment[zh_CN]=Free Pascal 编译器 +Comment[zh_TW]=Free Pascal 編譯器 +Name=FpcOptions +Name[da]=Free Pascal oversætter indstillinger +Name[de]=Fpc-Einstellungen (TDevelop) +Name[hi]=एफपीसी-विकल्प +Name[nds]=Fpc-Optschonen (TDevelop) +Name[pl]=Opcje Fpc +Name[sk]=Fpc možnosti +Name[sl]=Možnosti Fpc +Name[sv]=Alternativ för fpc +Name[ta]=Fpcவிருப்பங்கள் +Name[tg]=FpcИнтихобҳо +Name[zh_TW]=Fpc 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevfpcoptions +X-TDevelop-Version=5 +X-TDevelop-Language=Pascal +X-TDevelop-Args=fpc +X-TDevelop-Default=true + diff --git a/languages/pascal/compiler/fpcoptions/tdevfpcoptions.desktop b/languages/pascal/compiler/fpcoptions/tdevfpcoptions.desktop deleted file mode 100644 index da25b683..00000000 --- a/languages/pascal/compiler/fpcoptions/tdevfpcoptions.desktop +++ /dev/null @@ -1,55 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=fpc -Comment=Free Pascal Compiler -Comment[br]=Dastumer Pascal dieub -Comment[ca]=Compilador Free Pascal -Comment[da]=Free Pascal oversætter -Comment[el]=Μεταγλωττιστής Free Pascal -Comment[es]=Compilador Free Pascal -Comment[et]=Free Pascal kompilaator -Comment[eu]=Free Pascal konpiladorea -Comment[fa]=مترجم آزاد پاسکال -Comment[fr]=Compilateur Free Pascal -Comment[ga]=Tiomsaitheoir Saor Pascal -Comment[gl]=Compilador Free Pascal -Comment[hi]=फ्री पॉस्कल कम्पायलर -Comment[hu]=Szabad forráskódú Pascal fordítóprogram -Comment[is]=Frjáls Pascal þýðandi -Comment[it]=Compilatore per Free Pascal -Comment[ja]=Free Pascal コンパイラ -Comment[nds]=Free Pascal-Kompilerer -Comment[ne]=स्वतन्त्र पास्कल कम्पाइलर -Comment[nl]=Free Pascal-compiler -Comment[pt]=Compilador Free Pascal -Comment[pt_BR]=Compilador Free Pascal -Comment[ru]=Компилятор Free Pascal -Comment[sk]=Voľný Pascal kompilátor -Comment[sl]=Prevajalnik za Free Pascal -Comment[sr]=Слободни преводилац Pascal-а -Comment[sr@Latn]=Slobodni prevodilac Pascal-a -Comment[sv]=Fri Pascal-kompilator -Comment[ta]=இலவச பாஸ்கல் தொகுப்பி -Comment[tg]=Талфифгари Free Pascal -Comment[tr]=Serbest Pascal Derleyicisi -Comment[zh_CN]=Free Pascal 编译器 -Comment[zh_TW]=Free Pascal 編譯器 -Name=FpcOptions -Name[da]=Free Pascal oversætter indstillinger -Name[de]=Fpc-Einstellungen (TDevelop) -Name[hi]=एफपीसी-विकल्प -Name[nds]=Fpc-Optschonen (TDevelop) -Name[pl]=Opcje Fpc -Name[sk]=Fpc možnosti -Name[sl]=Možnosti Fpc -Name[sv]=Alternativ för fpc -Name[ta]=Fpcவிருப்பங்கள் -Name[tg]=FpcИнтихобҳо -Name[zh_TW]=Fpc 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevfpcoptions -X-TDevelop-Version=5 -X-TDevelop-Language=Pascal -X-TDevelop-Args=fpc -X-TDevelop-Default=true - diff --git a/languages/pascal/doc/CMakeLists.txt b/languages/pascal/doc/CMakeLists.txt index 37627f81..ade55abb 100644 --- a/languages/pascal/doc/CMakeLists.txt +++ b/languages/pascal/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES pascal_bugs_fp.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/pascal/doc/Makefile.am b/languages/pascal/doc/Makefile.am index bf36ead8..a7829d08 100644 --- a/languages/pascal/doc/Makefile.am +++ b/languages/pascal/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = pascal_bugs_fp.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/pascal/file_templates/CMakeLists.txt b/languages/pascal/file_templates/CMakeLists.txt index 5a55baad..812d0398 100644 --- a/languages/pascal/file_templates/CMakeLists.txt +++ b/languages/pascal/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES dpr pas-program pas-unit pp-program pp-unit - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/pascal/file_templates/Makefile.am b/languages/pascal/file_templates/Makefile.am index fe16bfb0..94891c97 100644 --- a/languages/pascal/file_templates/Makefile.am +++ b/languages/pascal/file_templates/Makefile.am @@ -1,2 +1,2 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = dpr pas-program pas-unit pp-program pp-unit diff --git a/languages/pascal/kdevpascalsupport.desktop b/languages/pascal/kdevpascalsupport.desktop new file mode 100644 index 00000000..65e9f851 --- /dev/null +++ b/languages/pascal/kdevpascalsupport.desktop @@ -0,0 +1,84 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Pascal Language Support +Comment[ca]=Suport per al llenguatge Pascal +Comment[da]=Pascal sprogunderstøttelse +Comment[de]=Pascal-Unterstützung für TDevelop +Comment[el]=Υποστήριξη γλώσσας Pascal +Comment[es]=Soporte para el lenguaje Pascal +Comment[et]=Pascali keele toetus +Comment[eu]=Pascal lenguaiaren euskarria +Comment[fa]=پشتیبانی زبان پاسکال +Comment[fr]=Prise en charge du langage Pascal +Comment[ga]=Tacaíocht Pascal +Comment[gl]=Soporte para linguaxe Pascal +Comment[hi]=पास्कल भाषा समर्थन +Comment[hu]=Támogatás a Pascal nyelv használatához +Comment[is]=Stuðningur við Pascal forritunarmálið +Comment[it]=Supporto per il linguaggio Pascal +Comment[ja]=Pascal 言語サポート +Comment[nds]=Ünnerstütten för de Spraak Pascal +Comment[ne]=पास्कल भाषा समर्थन +Comment[nl]=Ondersteuning voor Pascal +Comment[pl]=Obsługa języka Pascal +Comment[pt]=Suporte da Linguagem Pascal +Comment[pt_BR]=Suporte à Linguagem Pascal +Comment[ru]=Поддержка языка Pascal +Comment[sk]=Podpora jazyka Pascal +Comment[sl]=Podpora jeziku pascal +Comment[sr]=Језичка подршка за Pascal +Comment[sr@Latn]=Jezička podrška za Pascal +Comment[sv]=Stöd för språket Pascal +Comment[ta]=பாஸ்கல் மொழி ஆதரவு +Comment[tg]=Ёрӣ намудани забони Pascal Language +Comment[tr]=Pascal Dil Desteği +Comment[zh_CN]=Pascal 语言支持 +Comment[zh_TW]=Pascal 語言支援 +Name=KDevPascalSupport +Name[da]=TDevelop Pascal-understøttelse +Name[de]=Sprachunterstützung für Pascal (TDevelop) +Name[hi]=के-डेव-पॉस्कल-समर्थन +Name[nds]=Pascal-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaPascala +Name[sk]=KDev Pascal podpora +Name[sv]=TDevelop Pascal-stöd +Name[ta]=கெடெவ் பாஸ்கல் ஆதரவு +Name[zh_TW]=TDevelop Pascal 支援 +GenericName=Pascal Language Support +GenericName[ca]=Suport per al llenguatge Pascal +GenericName[da]=Pascal sprogunderstøttelse +GenericName[de]=Sprachunterstützung für Pascal +GenericName[el]=Υποστήριξη γλώσσας Pascal +GenericName[es]=Soporte para el lenguaje Pascal +GenericName[et]=Pascali keele toetus +GenericName[eu]=Pascal lenguaiaren euskarria +GenericName[fa]=پشتیبانی زبان پاسکال +GenericName[fr]=Prise en charge du langage PASCAL +GenericName[ga]=Tacaíocht Pascal +GenericName[gl]=Soporte para linguaxe Pascal +GenericName[hi]=पास्कल भाषा समर्थन +GenericName[hu]=Pascal-támogatás +GenericName[it]=Supporto per il linguaggio Pascal +GenericName[ja]=Pascal 言語サポート +GenericName[nds]=Ünnerstütten för de Spraak Pascal +GenericName[ne]=पास्कल भाषा समर्थन +GenericName[nl]=Ondersteuning voor Pascal +GenericName[pl]=Obsługa języka Pascal +GenericName[pt]=Suporte à Linguagem Pascal +GenericName[pt_BR]=Suporte à Linguagem Pascal +GenericName[ru]=Поддержка языка Pascal +GenericName[sk]=Podpora jazyka Pascal +GenericName[sl]=Podpora jezicu pascal +GenericName[sr]=Језичка подршка за Pascal +GenericName[sr@Latn]=Jezička podrška za Pascal +GenericName[sv]=Stöd för språket Pascal +GenericName[ta]=பாஸ்கல் மொழி ஆதரவு +GenericName[tg]=Ёрӣ намудани забони Pascal +GenericName[tr]=Pascal Dil Desteği +GenericName[zh_CN]=Pascal 语言支持 +GenericName[zh_TW]=Pascal 語言支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevpascalsupport +X-TDevelop-Version=5 +X-TDevelop-Language=Pascal diff --git a/languages/pascal/kdevpascalsupport.rc b/languages/pascal/kdevpascalsupport.rc new file mode 100644 index 00000000..4335b2a6 --- /dev/null +++ b/languages/pascal/kdevpascalsupport.rc @@ -0,0 +1,3 @@ + + + diff --git a/languages/pascal/pascalsupport_part.cpp b/languages/pascal/pascalsupport_part.cpp index 3b9d8263..69cbebf8 100644 --- a/languages/pascal/pascalsupport_part.cpp +++ b/languages/pascal/pascalsupport_part.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include @@ -23,11 +23,11 @@ #include #include "catalog.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "pascalsupport_part.h" #include "problemreporter.h" @@ -43,16 +43,16 @@ struct PascalSupportPartData{ {} }; -typedef TDevGenericFactory PascalSupportFactory; -static const TDevPluginInfo data("tdevpascalsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevpascalsupport, PascalSupportFactory( data ) ) +typedef KDevGenericFactory PascalSupportFactory; +static const KDevPluginInfo data("kdevpascalsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevpascalsupport, PascalSupportFactory( data ) ) PascalSupportPart::PascalSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "KDevPascalSupport" ), + : KDevLanguageSupport(&data, parent, name ? name : "KDevPascalSupport" ), d( new PascalSupportPartData() ) { setInstance(PascalSupportFactory::instance()); - setXMLFile("tdevpascalsupport.rc"); + setXMLFile("kdevpascalsupport.rc"); d->problemReporter = new ProblemReporter( this ); connect( core(), TQT_SIGNAL(configWidget(KDialogBase*)), @@ -317,7 +317,7 @@ TQString PascalSupportPart::formatModelItem( const CodeModelItem * item, bool sh return arg.stripWhiteSpace(); } else - return TDevLanguageSupport::formatModelItem( item, shortDescription ); + return KDevLanguageSupport::formatModelItem( item, shortDescription ); } #include "pascalsupport_part.moc" diff --git a/languages/pascal/pascalsupport_part.h b/languages/pascal/pascalsupport_part.h index bac5c25b..5c99c2ae 100644 --- a/languages/pascal/pascalsupport_part.h +++ b/languages/pascal/pascalsupport_part.h @@ -7,11 +7,11 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ -#ifndef __TDEVPART_PASCALSUPPORT_H__ -#define __TDEVPART_PASCALSUPPORT_H__ +#ifndef __KDEVPART_PASCALSUPPORT_H__ +#define __KDEVPART_PASCALSUPPORT_H__ #include -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" class PascalSupportWidget; class KDialogBase; @@ -19,7 +19,7 @@ class TQPopupMenu; class Context; class PascalSupportPartData; -class PascalSupportPart : public TDevLanguageSupport +class PascalSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/pascal/problemreporter.cpp b/languages/pascal/problemreporter.cpp index 0d33aec1..2b477063 100644 --- a/languages/pascal/problemreporter.cpp +++ b/languages/pascal/problemreporter.cpp @@ -18,8 +18,8 @@ #include "problemreporter.h" #include "pascalsupport_part.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" #include "configproblemreporter.h" #include "backgroundparser.h" diff --git a/languages/pascal/tdevpascalsupport.desktop b/languages/pascal/tdevpascalsupport.desktop deleted file mode 100644 index 85c50c20..00000000 --- a/languages/pascal/tdevpascalsupport.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Pascal Language Support -Comment[ca]=Suport per al llenguatge Pascal -Comment[da]=Pascal sprogunderstøttelse -Comment[de]=Pascal-Unterstützung für TDevelop -Comment[el]=Υποστήριξη γλώσσας Pascal -Comment[es]=Soporte para el lenguaje Pascal -Comment[et]=Pascali keele toetus -Comment[eu]=Pascal lenguaiaren euskarria -Comment[fa]=پشتیبانی زبان پاسکال -Comment[fr]=Prise en charge du langage Pascal -Comment[ga]=Tacaíocht Pascal -Comment[gl]=Soporte para linguaxe Pascal -Comment[hi]=पास्कल भाषा समर्थन -Comment[hu]=Támogatás a Pascal nyelv használatához -Comment[is]=Stuðningur við Pascal forritunarmálið -Comment[it]=Supporto per il linguaggio Pascal -Comment[ja]=Pascal 言語サポート -Comment[nds]=Ünnerstütten för de Spraak Pascal -Comment[ne]=पास्कल भाषा समर्थन -Comment[nl]=Ondersteuning voor Pascal -Comment[pl]=Obsługa języka Pascal -Comment[pt]=Suporte da Linguagem Pascal -Comment[pt_BR]=Suporte à Linguagem Pascal -Comment[ru]=Поддержка языка Pascal -Comment[sk]=Podpora jazyka Pascal -Comment[sl]=Podpora jeziku pascal -Comment[sr]=Језичка подршка за Pascal -Comment[sr@Latn]=Jezička podrška za Pascal -Comment[sv]=Stöd för språket Pascal -Comment[ta]=பாஸ்கல் மொழி ஆதரவு -Comment[tg]=Ёрӣ намудани забони Pascal Language -Comment[tr]=Pascal Dil Desteği -Comment[zh_CN]=Pascal 语言支持 -Comment[zh_TW]=Pascal 語言支援 -Name=KDevPascalSupport -Name[da]=TDevelop Pascal-understøttelse -Name[de]=Sprachunterstützung für Pascal (TDevelop) -Name[hi]=के-डेव-पॉस्कल-समर्थन -Name[nds]=Pascal-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaPascala -Name[sk]=KDev Pascal podpora -Name[sv]=TDevelop Pascal-stöd -Name[ta]=கெடெவ் பாஸ்கல் ஆதரவு -Name[zh_TW]=TDevelop Pascal 支援 -GenericName=Pascal Language Support -GenericName[ca]=Suport per al llenguatge Pascal -GenericName[da]=Pascal sprogunderstøttelse -GenericName[de]=Sprachunterstützung für Pascal -GenericName[el]=Υποστήριξη γλώσσας Pascal -GenericName[es]=Soporte para el lenguaje Pascal -GenericName[et]=Pascali keele toetus -GenericName[eu]=Pascal lenguaiaren euskarria -GenericName[fa]=پشتیبانی زبان پاسکال -GenericName[fr]=Prise en charge du langage PASCAL -GenericName[ga]=Tacaíocht Pascal -GenericName[gl]=Soporte para linguaxe Pascal -GenericName[hi]=पास्कल भाषा समर्थन -GenericName[hu]=Pascal-támogatás -GenericName[it]=Supporto per il linguaggio Pascal -GenericName[ja]=Pascal 言語サポート -GenericName[nds]=Ünnerstütten för de Spraak Pascal -GenericName[ne]=पास्कल भाषा समर्थन -GenericName[nl]=Ondersteuning voor Pascal -GenericName[pl]=Obsługa języka Pascal -GenericName[pt]=Suporte à Linguagem Pascal -GenericName[pt_BR]=Suporte à Linguagem Pascal -GenericName[ru]=Поддержка языка Pascal -GenericName[sk]=Podpora jazyka Pascal -GenericName[sl]=Podpora jezicu pascal -GenericName[sr]=Језичка подршка за Pascal -GenericName[sr@Latn]=Jezička podrška za Pascal -GenericName[sv]=Stöd för språket Pascal -GenericName[ta]=பாஸ்கல் மொழி ஆதரவு -GenericName[tg]=Ёрӣ намудани забони Pascal -GenericName[tr]=Pascal Dil Desteği -GenericName[zh_CN]=Pascal 语言支持 -GenericName[zh_TW]=Pascal 語言支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevpascalsupport -X-TDevelop-Version=5 -X-TDevelop-Language=Pascal diff --git a/languages/pascal/tdevpascalsupport.rc b/languages/pascal/tdevpascalsupport.rc deleted file mode 100644 index 4335b2a6..00000000 --- a/languages/pascal/tdevpascalsupport.rc +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/languages/perl/CMakeLists.txt b/languages/perl/CMakeLists.txt index 01327acb..e458c240 100644 --- a/languages/perl/CMakeLists.txt +++ b/languages/perl/CMakeLists.txt @@ -30,13 +30,13 @@ link_directories( ##### other data ################################ -install( FILES tdevperlsupport.desktop perldoc.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevperlsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevperlsupport ) +install( FILES kdevperlsupport.desktop perldoc.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevperlsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevperlsupport ) -##### libtdevperlsupport (module) ############### +##### libkdevperlsupport (module) ############### -tde_add_kpart( libtdevperlsupport AUTOMOC +tde_add_kpart( libkdevperlsupport AUTOMOC SOURCES perlparser.cpp perlsupportpart.cpp perlconfigwidget.cpp perlconfigwidgetbase.ui diff --git a/languages/perl/Makefile.am b/languages/perl/Makefile.am index f498dfd3..fcedfa23 100644 --- a/languages/perl/Makefile.am +++ b/languages/perl/Makefile.am @@ -6,11 +6,11 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ SUBDIRS = app_templates file_templates doc -kde_module_LTLIBRARIES = libtdevperlsupport.la tdeio_perldoc.la -libtdevperlsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevperlsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevperlsupport.la tdeio_perldoc.la +libkdevperlsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevperlsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevperlsupport_la_SOURCES = perlparser.cpp perlsupportpart.cpp perlconfigwidget.cpp perlconfigwidgetbase.ui +libkdevperlsupport_la_SOURCES = perlparser.cpp perlsupportpart.cpp perlconfigwidget.cpp perlconfigwidgetbase.ui tdeio_perldoc_la_SOURCES = perldoc.cpp tdeio_perldoc_la_LIBADD = $(LIB_TDEIO) @@ -19,7 +19,7 @@ tdeio_perldoc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevperlsupport.desktop perldoc.protocol +service_DATA = kdevperlsupport.desktop perldoc.protocol -rcdir = $(kde_datadir)/tdevperlsupport -rc_DATA = tdevperlsupport.rc +rcdir = $(kde_datadir)/kdevperlsupport +rc_DATA = kdevperlsupport.rc diff --git a/languages/perl/app_templates/perlhello/CMakeLists.txt b/languages/perl/app_templates/perlhello/CMakeLists.txt index 6537b51c..bf51d851 100644 --- a/languages/perl/app_templates/perlhello/CMakeLists.txt +++ b/languages/perl/app_templates/perlhello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( perlhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/perlhello.tar.gz perlhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - perlhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + perlhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/perl/app_templates/perlhello/Makefile.am b/languages/perl/app_templates/perlhello/Makefile.am index a7987969..b483b35b 100644 --- a/languages/perl/app_templates/perlhello/Makefile.am +++ b/languages/perl/app_templates/perlhello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.pl app.tdevelop templateName = perlhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/perl/app_templates/perlhello/app.tdevelop b/languages/perl/app_templates/perlhello/app.tdevelop index 2ae93215..a83391b7 100644 --- a/languages/perl/app_templates/perlhello/app.tdevelop +++ b/languages/perl/app_templates/perlhello/app.tdevelop @@ -9,7 +9,7 @@ . false - + ./%{APPNAMELC}.pl @@ -17,8 +17,8 @@ *.pl,*.pm *~ - - + + ada ada_bugs_gcc @@ -65,13 +65,13 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/perl/app_templates/perlhello/perlhello.kdevtemplate b/languages/perl/app_templates/perlhello/perlhello.kdevtemplate new file mode 100644 index 00000000..8ec5a560 --- /dev/null +++ b/languages/perl/app_templates/perlhello/perlhello.kdevtemplate @@ -0,0 +1,108 @@ +# KDE Config File +[General] +Name=Simple Perl script +Name[ca]=Simple script en Perl +Name[da]=Simpelt Perl script +Name[de]=Einfaches Perl-Skript +Name[el]=Απλό σενάριο Perl +Name[es]=Guión sencillo en Perl +Name[et]=Lihtne Perli skript +Name[eu]=Perl script sinplea +Name[fa]=دست‌نوشتۀ سادۀ پرل +Name[fr]=Script Perl simple +Name[ga]=Script shimplí Perl +Name[gl]=Script sinxelo en Perl +Name[hu]=Egyszerű Perl-szkript +Name[it]=Semplice script Perl +Name[ja]=簡単な Perl スクリプト +Name[nds]=Eenfach Perl-Skript +Name[ne]=साधारण पर्ल स्क्रिप्ट +Name[nl]=Eenvoudig Perl-script +Name[pl]=Prosty skrypt w Perlu +Name[pt]=Programa simples em Perl +Name[pt_BR]=Programa simples em Perl +Name[ru]=Простой скрипт Perl +Name[sk]=Jednoduchý Perl skript +Name[sr]=Једноставна Perl скрипта +Name[sr@Latn]=Jednostavna Perl skripta +Name[sv]=Enkelt Perl-skript +Name[tr]=Basit Perl betiği +Name[zh_CN]=简单 Perl 脚本 +Name[zh_TW]=簡單的 Perl 文稿 +Icon=camel.png +Category=Perl +Comment=This generates a simplistic 'Hello world' program in Perl (http://www.perl.org) +Comment[ca]=Genera un simple programa de 'Hello world' en Perl (http://www.perl.org) +Comment[da]=Dette genererer et simplistisk 'Goddag verden' program i Perl (http://www.perl.org) +Comment[de]=Hiermit wird ein einfaches "Hello World"-Programm in Perl erstellt (http://www.perl.org). +Comment[el]=Αυτό δημιουργεί ένα απλό πρόγραμμα 'Γεια σου κόσμε' σε Perl (http://www.perl.org) +Comment[es]=Genera un programa «Hola mundo» sencillo en Perl (http://www.perl.org) +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Perlis (http://www.perl.org) +Comment[eu]=Honek "Kaixo mundua" Perl-en (http://www.perl.org) idatzitako programa sinple bat sortzen du. +Comment[fa]=یک برنامۀ سادۀ «Hello world» در پرل (http://www.perl.org) تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Perl (http://www.perl.org) +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello world" i Perl (http://www.perl.org/) +Comment[gl]=Isto xera un programa sinxelo en Perl 'Ola mundo'(http://www.perl.org) +Comment[hu]=Létrehoz egy egyszerű 'Hello world' programot Perlben (http://www.perl.org) +Comment[it]=Genera un semplice programma di "Hello world" in Perl (http://www.perl.org) +Comment[ja]=Perl で書かれた簡単な Hello world プログラムを作成します +Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm in Perl op.(http://www.perl.org). +Comment[ne]=यसले पर्लमा साधारण 'हेल्लो वोल्ड' कार्यक्रम उत्पन्न गर्दछ (http://www.perl.org) +Comment[nl]=Dit genereert een eenvoudig Hello World-programma in Perl (http://www.perl.org) +Comment[pl]=Generuje prosty skrypt "Witaj świecie" w Perlu (http://www.perl.org) +Comment[pt]=Isto gera um programa simples 'Olá mundo' em Perl (http://www.perl.org) +Comment[pt_BR]=Isto gera um programa simples 'Olá mundo' em Perl (http://www.perl.org) +Comment[ru]=Создание простой программы 'Hello world' на Perl (http://www.perl.org) +Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v Perl (http://www.perl.org) +Comment[sr]=Прави једноставан „Здраво свете“ програм у Perl-у (http://www.perl.org) +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u Perl-u (http://www.perl.org) +Comment[sv]=Detta skapar ett förenklat 'Hello world'-program i Perl (http://www.perl.org) +Comment[tr]=Bu, Perl'de basit bir "Merhaba Dünya" programı yaratır (http://www.perl.org) +Comment[zh_CN]=这将生成一个简单的 Perl 语言“Hello world”程序 +Comment[zh_TW]=產生一個簡單的 Perl (http://www.perl.org) 的 Hello world 程式 +FileTemplates=perl,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.pl +Archive=perlhello.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app.pl +Dest=%{dest}/%{APPNAMELC}.pl + +[MSG] +Type=message +Comment=A simple Perl script was created in %{dest} +Comment[ca]=Un simple script en Perl ha estat creat en %{dest} +Comment[da]=Et simpelt Perl script blev oprettet i %{dest} +Comment[de]=Ein einfaches Perl-Skript wurde in %{dest} erstellt. +Comment[el]=Ένα απλό σενάριο Perl δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo guión en Perl ha sido creado en %{dest} +Comment[et]=Lihtne Perli skript loodi asukohta %{dest} +Comment[eu]=Perl script sinple bat sortu da hemen: %{dest} +Comment[fa]=یک دست‌نوشتۀ سادۀ پرل در %{dest} ایجاد شد +Comment[fr]=Un script Perl simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh script shimplí Perl i %{dest} +Comment[gl]=Creouse un script sinxelo en Perl en %{dest} +Comment[hu]=Létrejött egy egyszerű Perl-szkript itt: %{dest} +Comment[it]=È stato creato un semplice script Perl in %{dest} +Comment[ja]=簡単な Perl スクリプトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach Perl-Skript opstellt. +Comment[ne]=साधारण पर्ल स्क्रिप्ट %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig Perl-script is aangemaakt in %{dest} +Comment[pl]=Prosty skrypt w Perlu został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples em Perl em %{dest} +Comment[pt_BR]=Foi criado um programa simples em Perl em %{dest} +Comment[ru]=Простой скрипт Perl создан в %{dest} +Comment[sk]=Jednoduchý Perl skript bol vytvorený v %{dest} +Comment[sr]=Једноставна Perl скрипта направљена је у %{dest} +Comment[sr@Latn]=Jednostavna Perl skripta napravljena je u %{dest} +Comment[sv]=Ett enkelt Perl-skript skapades i %{dest} +Comment[tr]=Basit Perl betiği %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简单的 Perl 脚本 +Comment[zh_TW]=一個簡單的 Perl 文稿已建立於 %{dest} diff --git a/languages/perl/app_templates/perlhello/perlhello.tdevtemplate b/languages/perl/app_templates/perlhello/perlhello.tdevtemplate deleted file mode 100644 index 8ec5a560..00000000 --- a/languages/perl/app_templates/perlhello/perlhello.tdevtemplate +++ /dev/null @@ -1,108 +0,0 @@ -# KDE Config File -[General] -Name=Simple Perl script -Name[ca]=Simple script en Perl -Name[da]=Simpelt Perl script -Name[de]=Einfaches Perl-Skript -Name[el]=Απλό σενάριο Perl -Name[es]=Guión sencillo en Perl -Name[et]=Lihtne Perli skript -Name[eu]=Perl script sinplea -Name[fa]=دست‌نوشتۀ سادۀ پرل -Name[fr]=Script Perl simple -Name[ga]=Script shimplí Perl -Name[gl]=Script sinxelo en Perl -Name[hu]=Egyszerű Perl-szkript -Name[it]=Semplice script Perl -Name[ja]=簡単な Perl スクリプト -Name[nds]=Eenfach Perl-Skript -Name[ne]=साधारण पर्ल स्क्रिप्ट -Name[nl]=Eenvoudig Perl-script -Name[pl]=Prosty skrypt w Perlu -Name[pt]=Programa simples em Perl -Name[pt_BR]=Programa simples em Perl -Name[ru]=Простой скрипт Perl -Name[sk]=Jednoduchý Perl skript -Name[sr]=Једноставна Perl скрипта -Name[sr@Latn]=Jednostavna Perl skripta -Name[sv]=Enkelt Perl-skript -Name[tr]=Basit Perl betiği -Name[zh_CN]=简单 Perl 脚本 -Name[zh_TW]=簡單的 Perl 文稿 -Icon=camel.png -Category=Perl -Comment=This generates a simplistic 'Hello world' program in Perl (http://www.perl.org) -Comment[ca]=Genera un simple programa de 'Hello world' en Perl (http://www.perl.org) -Comment[da]=Dette genererer et simplistisk 'Goddag verden' program i Perl (http://www.perl.org) -Comment[de]=Hiermit wird ein einfaches "Hello World"-Programm in Perl erstellt (http://www.perl.org). -Comment[el]=Αυτό δημιουργεί ένα απλό πρόγραμμα 'Γεια σου κόσμε' σε Perl (http://www.perl.org) -Comment[es]=Genera un programa «Hola mundo» sencillo en Perl (http://www.perl.org) -Comment[et]=Lihtsa "Tere, maailm" programmi loomine Perlis (http://www.perl.org) -Comment[eu]=Honek "Kaixo mundua" Perl-en (http://www.perl.org) idatzitako programa sinple bat sortzen du. -Comment[fa]=یک برنامۀ سادۀ «Hello world» در پرل (http://www.perl.org) تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en Perl (http://www.perl.org) -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello world" i Perl (http://www.perl.org/) -Comment[gl]=Isto xera un programa sinxelo en Perl 'Ola mundo'(http://www.perl.org) -Comment[hu]=Létrehoz egy egyszerű 'Hello world' programot Perlben (http://www.perl.org) -Comment[it]=Genera un semplice programma di "Hello world" in Perl (http://www.perl.org) -Comment[ja]=Perl で書かれた簡単な Hello world プログラムを作成します -Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm in Perl op.(http://www.perl.org). -Comment[ne]=यसले पर्लमा साधारण 'हेल्लो वोल्ड' कार्यक्रम उत्पन्न गर्दछ (http://www.perl.org) -Comment[nl]=Dit genereert een eenvoudig Hello World-programma in Perl (http://www.perl.org) -Comment[pl]=Generuje prosty skrypt "Witaj świecie" w Perlu (http://www.perl.org) -Comment[pt]=Isto gera um programa simples 'Olá mundo' em Perl (http://www.perl.org) -Comment[pt_BR]=Isto gera um programa simples 'Olá mundo' em Perl (http://www.perl.org) -Comment[ru]=Создание простой программы 'Hello world' на Perl (http://www.perl.org) -Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v Perl (http://www.perl.org) -Comment[sr]=Прави једноставан „Здраво свете“ програм у Perl-у (http://www.perl.org) -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u Perl-u (http://www.perl.org) -Comment[sv]=Detta skapar ett förenklat 'Hello world'-program i Perl (http://www.perl.org) -Comment[tr]=Bu, Perl'de basit bir "Merhaba Dünya" programı yaratır (http://www.perl.org) -Comment[zh_CN]=这将生成一个简单的 Perl 语言“Hello world”程序 -Comment[zh_TW]=產生一個簡單的 Perl (http://www.perl.org) 的 Hello world 程式 -FileTemplates=perl,ShellStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.pl -Archive=perlhello.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.pl -Dest=%{dest}/%{APPNAMELC}.pl - -[MSG] -Type=message -Comment=A simple Perl script was created in %{dest} -Comment[ca]=Un simple script en Perl ha estat creat en %{dest} -Comment[da]=Et simpelt Perl script blev oprettet i %{dest} -Comment[de]=Ein einfaches Perl-Skript wurde in %{dest} erstellt. -Comment[el]=Ένα απλό σενάριο Perl δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo guión en Perl ha sido creado en %{dest} -Comment[et]=Lihtne Perli skript loodi asukohta %{dest} -Comment[eu]=Perl script sinple bat sortu da hemen: %{dest} -Comment[fa]=یک دست‌نوشتۀ سادۀ پرل در %{dest} ایجاد شد -Comment[fr]=Un script Perl simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh script shimplí Perl i %{dest} -Comment[gl]=Creouse un script sinxelo en Perl en %{dest} -Comment[hu]=Létrejött egy egyszerű Perl-szkript itt: %{dest} -Comment[it]=È stato creato un semplice script Perl in %{dest} -Comment[ja]=簡単な Perl スクリプトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach Perl-Skript opstellt. -Comment[ne]=साधारण पर्ल स्क्रिप्ट %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig Perl-script is aangemaakt in %{dest} -Comment[pl]=Prosty skrypt w Perlu został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples em Perl em %{dest} -Comment[pt_BR]=Foi criado um programa simples em Perl em %{dest} -Comment[ru]=Простой скрипт Perl создан в %{dest} -Comment[sk]=Jednoduchý Perl skript bol vytvorený v %{dest} -Comment[sr]=Једноставна Perl скрипта направљена је у %{dest} -Comment[sr@Latn]=Jednostavna Perl skripta napravljena je u %{dest} -Comment[sv]=Ett enkelt Perl-skript skapades i %{dest} -Comment[tr]=Basit Perl betiği %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个简单的 Perl 脚本 -Comment[zh_TW]=一個簡單的 Perl 文稿已建立於 %{dest} diff --git a/languages/perl/doc/CMakeLists.txt b/languages/perl/doc/CMakeLists.txt index 2e8ed498..653dc0d7 100644 --- a/languages/perl/doc/CMakeLists.txt +++ b/languages/perl/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES perl.toc perl_bugs.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/perl/doc/Makefile.am b/languages/perl/doc/Makefile.am index b62295ed..dae5d699 100644 --- a/languages/perl/doc/Makefile.am +++ b/languages/perl/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = perl.toc perl_bugs.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/perl/file_templates/CMakeLists.txt b/languages/perl/file_templates/CMakeLists.txt index 96c5fa74..7faec8fc 100644 --- a/languages/perl/file_templates/CMakeLists.txt +++ b/languages/perl/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES pl pm - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/perl/file_templates/Makefile.am b/languages/perl/file_templates/Makefile.am index 5dd94646..f1f8457d 100644 --- a/languages/perl/file_templates/Makefile.am +++ b/languages/perl/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = pl pm diff --git a/languages/perl/kdevperlsupport.desktop b/languages/perl/kdevperlsupport.desktop new file mode 100644 index 00000000..9c637679 --- /dev/null +++ b/languages/perl/kdevperlsupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Perl Support +Comment[ca]=Suport per a Perl +Comment[da]=Perl-understøttelse +Comment[de]=Perl-Unterstützung für TDevelop +Comment[el]=Υποστήριξη Perl +Comment[es]=Soporte para Perl +Comment[et]=Perli toetus +Comment[eu]=Perl euskarria +Comment[fa]=پشتیبانی پرل +Comment[fr]=Prise en charge du langage Perl +Comment[ga]=Tacaíocht Perl +Comment[gl]=Soporte para Perl +Comment[hi]=पर्ल समर्थन +Comment[hu]=Perl-támogatás +Comment[is]=Perl stuðningur +Comment[it]=Supporto Perl +Comment[ja]=Perl サポート +Comment[nds]=Ünnerstütten för Perl +Comment[ne]=पर्ल समर्थन +Comment[nl]=Ondersteuning voor Perl +Comment[pl]=Obsługa Perla +Comment[pt]=Suporte a Perl +Comment[pt_BR]=Suporte ao Perl +Comment[ru]=Поддержка языка Perl +Comment[sk]=Perl podpora +Comment[sl]=Podpora za perl +Comment[sr]=Подршка за Perl +Comment[sr@Latn]=Podrška za Perl +Comment[sv]=Perl-stöd +Comment[ta]=பெர்ல் ஆதரவு +Comment[tg]=Ёрӣ намудани забони Perl +Comment[tr]=Perl Desteği +Comment[zh_CN]=Perl 支持 +Comment[zh_TW]=Perl 支援 +Name=KDevPerlSupport +Name[da]=TDevelop Perl-understøttelse +Name[de]=Unterstützung für Perl (TDevelop) +Name[hi]=के-डेव-पर्ल-समर्थन +Name[nds]=Perl-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaPerla +Name[sk]=KDev Perl podpora +Name[sv]=TDevelop Perl-stöd +Name[ta]=கெடெவ் பெர்ல் ஆதரவு +Name[zh_TW]=TDevelop Perl 支援 +GenericName=Perl Support +GenericName[ca]=Suport per a Perl +GenericName[da]=Perl-understøttelse +GenericName[de]=Unterstützung für Perl +GenericName[el]=Υποστήριξη Perl +GenericName[es]=Soporte para Perl +GenericName[et]=Perli toetus +GenericName[eu]=Perl euskarria +GenericName[fa]=پشتیبانی پرل +GenericName[fr]=Prise en charge du langage PERL +GenericName[ga]=Tacaíocht Perl +GenericName[gl]=Soporte para Perl +GenericName[hi]=पर्ल समर्थन +GenericName[hu]=Perl-támogatás +GenericName[it]=Supporto per Perl +GenericName[ja]=Perl サポート +GenericName[nds]=Ünnerstütten för Perl +GenericName[ne]=पर्ल समर्थन +GenericName[nl]=Ondersteuning voor Perl +GenericName[pl]=Obsługa Perla +GenericName[pt]=Suporte a Perl +GenericName[pt_BR]=Suporte ao Perl +GenericName[ru]=Поддержка языка Perl +GenericName[sk]=Perl podpora +GenericName[sl]=Podpora za perl +GenericName[sr]=Подршка за Perl +GenericName[sr@Latn]=Podrška za Perl +GenericName[sv]=Perl-stöd +GenericName[ta]=பெர்ல் ஆதரவு +GenericName[tg]=Ёрӣ намудани забони Perl +GenericName[tr]=Perl Desteği +GenericName[zh_CN]=Perl 支持 +GenericName[zh_TW]=Perl 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevperlsupport +X-TDevelop-Version=5 +X-TDevelop-Language=Perl + diff --git a/languages/perl/kdevperlsupport.rc b/languages/perl/kdevperlsupport.rc new file mode 100644 index 00000000..9f5f4ee9 --- /dev/null +++ b/languages/perl/kdevperlsupport.rc @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/languages/perl/perlparser.cpp b/languages/perl/perlparser.cpp index ca7b8dff..60cca8f5 100644 --- a/languages/perl/perlparser.cpp +++ b/languages/perl/perlparser.cpp @@ -22,7 +22,7 @@ #include #include -perlparser::perlparser(TDevCore* core,CodeModel* model, TQString interpreter) { +perlparser::perlparser(KDevCore* core,CodeModel* model, TQString interpreter) { m_core = core; m_model = model; m_interpreter=interpreter; diff --git a/languages/perl/perlparser.h b/languages/perl/perlparser.h index 6249ce15..b536596b 100644 --- a/languages/perl/perlparser.h +++ b/languages/perl/perlparser.h @@ -18,7 +18,7 @@ #ifndef PERLPARSER_H #define PERLPARSER_H -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include @@ -28,7 +28,7 @@ class perlparser { public: - perlparser(TDevCore* core,CodeModel* model, TQString interpreter); + perlparser(KDevCore* core,CodeModel* model, TQString interpreter); perlparser(); ~perlparser(); @@ -70,7 +70,7 @@ class perlparser { //CodeModel CodeModel* m_model; - TDevCore* m_core; + KDevCore* m_core; FileDom m_file; //this willhav a list of INC paths diff --git a/languages/perl/perlsupportpart.cpp b/languages/perl/perlsupportpart.cpp index 08627ea5..c8379c77 100644 --- a/languages/perl/perlsupportpart.cpp +++ b/languages/perl/perlsupportpart.cpp @@ -19,24 +19,24 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include "tdevmainwindow.h" +#include "kdevmainwindow.h" #include #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" -#include "tdevplugininfo.h" -#include "tdevappfrontend.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" +#include "kdevplugininfo.h" +#include "kdevappfrontend.h" //#include "classstore.h" //#include "parsedclass.h" //#include "parsedmethod.h" @@ -44,16 +44,16 @@ #include "domutil.h" //#include "programmingbycontract.h" -typedef TDevGenericFactory PerlSupportFactory; -static const TDevPluginInfo data("tdevperlsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevperlsupport, PerlSupportFactory( data ) ) +typedef KDevGenericFactory PerlSupportFactory; +static const KDevPluginInfo data("kdevperlsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevperlsupport, PerlSupportFactory( data ) ) PerlSupportPart::PerlSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "PerlSupportPart") + : KDevLanguageSupport(&data, parent, name ? name : "PerlSupportPart") { setInstance(PerlSupportFactory::instance()); - setXMLFile("tdevperlsupport.rc"); + setXMLFile("kdevperlsupport.rc"); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -174,9 +174,9 @@ void PerlSupportPart::savedFile(const KURL &fileName) } -TDevLanguageSupport::Features PerlSupportPart::features() +KDevLanguageSupport::Features PerlSupportPart::features() { - return TDevLanguageSupport::Features(Classes | Functions | Variables | Namespaces | /*Scripts | */NewClass | AddMethod | AddAttribute /*| NewScript*/); + return KDevLanguageSupport::Features(Classes | Functions | Variables | Namespaces | /*Scripts | */NewClass | AddMethod | AddAttribute /*| NewScript*/); // return Functions; } @@ -193,7 +193,7 @@ TQString PerlSupportPart::interpreter() void PerlSupportPart::startApplication(const TQString &program) { bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevperlsupport/run/terminal"); - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, inTerminal); } diff --git a/languages/perl/perlsupportpart.h b/languages/perl/perlsupportpart.h index b6517bbc..00c6bc69 100644 --- a/languages/perl/perlsupportpart.h +++ b/languages/perl/perlsupportpart.h @@ -12,11 +12,11 @@ #ifndef _PERLSUPPORTPART_H_ #define _PERLSUPPORTPART_H_ -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include #include "perlparser.h" -class PerlSupportPart : public TDevLanguageSupport +class PerlSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/perl/tdevperlsupport.desktop b/languages/perl/tdevperlsupport.desktop deleted file mode 100644 index 472be4f3..00000000 --- a/languages/perl/tdevperlsupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Perl Support -Comment[ca]=Suport per a Perl -Comment[da]=Perl-understøttelse -Comment[de]=Perl-Unterstützung für TDevelop -Comment[el]=Υποστήριξη Perl -Comment[es]=Soporte para Perl -Comment[et]=Perli toetus -Comment[eu]=Perl euskarria -Comment[fa]=پشتیبانی پرل -Comment[fr]=Prise en charge du langage Perl -Comment[ga]=Tacaíocht Perl -Comment[gl]=Soporte para Perl -Comment[hi]=पर्ल समर्थन -Comment[hu]=Perl-támogatás -Comment[is]=Perl stuðningur -Comment[it]=Supporto Perl -Comment[ja]=Perl サポート -Comment[nds]=Ünnerstütten för Perl -Comment[ne]=पर्ल समर्थन -Comment[nl]=Ondersteuning voor Perl -Comment[pl]=Obsługa Perla -Comment[pt]=Suporte a Perl -Comment[pt_BR]=Suporte ao Perl -Comment[ru]=Поддержка языка Perl -Comment[sk]=Perl podpora -Comment[sl]=Podpora za perl -Comment[sr]=Подршка за Perl -Comment[sr@Latn]=Podrška za Perl -Comment[sv]=Perl-stöd -Comment[ta]=பெர்ல் ஆதரவு -Comment[tg]=Ёрӣ намудани забони Perl -Comment[tr]=Perl Desteği -Comment[zh_CN]=Perl 支持 -Comment[zh_TW]=Perl 支援 -Name=KDevPerlSupport -Name[da]=TDevelop Perl-understøttelse -Name[de]=Unterstützung für Perl (TDevelop) -Name[hi]=के-डेव-पर्ल-समर्थन -Name[nds]=Perl-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaPerla -Name[sk]=KDev Perl podpora -Name[sv]=TDevelop Perl-stöd -Name[ta]=கெடெவ் பெர்ல் ஆதரவு -Name[zh_TW]=TDevelop Perl 支援 -GenericName=Perl Support -GenericName[ca]=Suport per a Perl -GenericName[da]=Perl-understøttelse -GenericName[de]=Unterstützung für Perl -GenericName[el]=Υποστήριξη Perl -GenericName[es]=Soporte para Perl -GenericName[et]=Perli toetus -GenericName[eu]=Perl euskarria -GenericName[fa]=پشتیبانی پرل -GenericName[fr]=Prise en charge du langage PERL -GenericName[ga]=Tacaíocht Perl -GenericName[gl]=Soporte para Perl -GenericName[hi]=पर्ल समर्थन -GenericName[hu]=Perl-támogatás -GenericName[it]=Supporto per Perl -GenericName[ja]=Perl サポート -GenericName[nds]=Ünnerstütten för Perl -GenericName[ne]=पर्ल समर्थन -GenericName[nl]=Ondersteuning voor Perl -GenericName[pl]=Obsługa Perla -GenericName[pt]=Suporte a Perl -GenericName[pt_BR]=Suporte ao Perl -GenericName[ru]=Поддержка языка Perl -GenericName[sk]=Perl podpora -GenericName[sl]=Podpora za perl -GenericName[sr]=Подршка за Perl -GenericName[sr@Latn]=Podrška za Perl -GenericName[sv]=Perl-stöd -GenericName[ta]=பெர்ல் ஆதரவு -GenericName[tg]=Ёрӣ намудани забони Perl -GenericName[tr]=Perl Desteği -GenericName[zh_CN]=Perl 支持 -GenericName[zh_TW]=Perl 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevperlsupport -X-TDevelop-Version=5 -X-TDevelop-Language=Perl - diff --git a/languages/perl/tdevperlsupport.rc b/languages/perl/tdevperlsupport.rc deleted file mode 100644 index 9f5f4ee9..00000000 --- a/languages/perl/tdevperlsupport.rc +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/languages/php/CMakeLists.txt b/languages/php/CMakeLists.txt index 02faa3cc..3a9e4123 100644 --- a/languages/php/CMakeLists.txt +++ b/languages/php/CMakeLists.txt @@ -32,20 +32,20 @@ link_directories( ##### other data ################################ -install( FILES tdevphpsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevphpsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevphpsupport ) -install( FILES phptemplates DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev/templates ) +install( FILES kdevphpsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevphpsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevphpsupport ) +install( FILES phptemplates DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev/templates ) -##### libtdevphpsupport (module) ################ +##### libkdevphpsupport (module) ################ -tde_add_kpart( libtdevphpsupport AUTOMOC +tde_add_kpart( libkdevphpsupport AUTOMOC SOURCES phpsupportpart.cpp phpconfigwidgetbase.ui phpconfigwidget.cpp phpinfodlg.ui phphtmlview.cpp phperrorview.cpp phpconfigdata.cpp phpcodecompletion.cpp phpparser.cpp phpnewclassdlgbase.ui phpnewclassdlg.cpp phpfile.cpp - LINK tdevwidgets-shared tdevelop-shared + LINK kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/php/Makefile.am b/languages/php/Makefile.am index bc4bb9d9..a10604e5 100644 --- a/languages/php/Makefile.am +++ b/languages/php/Makefile.am @@ -6,19 +6,19 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ SUBDIRS = data app_templates file_templates doc -kde_module_LTLIBRARIES = libtdevphpsupport.la -libtdevphpsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevphpsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevphpsupport.la +libkdevphpsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevphpsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) -libtdevphpsupport_la_SOURCES = phpsupportpart.cpp phpconfigwidgetbase.ui phpconfigwidget.cpp phpinfodlg.ui phphtmlview.cpp phperrorview.cpp phpconfigdata.cpp phpcodecompletion.cpp phpparser.cpp phpnewclassdlgbase.ui phpnewclassdlg.cpp phpfile.cpp +libkdevphpsupport_la_SOURCES = phpsupportpart.cpp phpconfigwidgetbase.ui phpconfigwidget.cpp phpinfodlg.ui phphtmlview.cpp phperrorview.cpp phpconfigdata.cpp phpcodecompletion.cpp phpparser.cpp phpnewclassdlgbase.ui phpnewclassdlg.cpp phpfile.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevphpsupport.desktop +service_DATA = kdevphpsupport.desktop -rcdir = $(kde_datadir)/tdevphpsupport -rc_DATA = tdevphpsupport.rc +rcdir = $(kde_datadir)/kdevphpsupport +rc_DATA = kdevphpsupport.rc -templatedir = ${kde_datadir}/tdevabbrev/templates +templatedir = ${kde_datadir}/kdevabbrev/templates template_DATA = phptemplates diff --git a/languages/php/app_templates/phphello/CMakeLists.txt b/languages/php/app_templates/phphello/CMakeLists.txt index c858f07a..4e534e08 100644 --- a/languages/php/app_templates/phphello/CMakeLists.txt +++ b/languages/php/app_templates/phphello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( phphello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/phphello.tar.gz phphello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - phphello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + phphello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/php/app_templates/phphello/Makefile.am b/languages/php/app_templates/phphello/Makefile.am index c1457307..bc983960 100644 --- a/languages/php/app_templates/phphello/Makefile.am +++ b/languages/php/app_templates/phphello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.php app.tdevelop templateName = phphello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/php/app_templates/phphello/app.tdevelop b/languages/php/app_templates/phphello/app.tdevelop index 961e0f4d..2cdb1c70 100644 --- a/languages/php/app_templates/phphello/app.tdevelop +++ b/languages/php/app_templates/phphello/app.tdevelop @@ -15,13 +15,13 @@ KDevVisualBoyAdvance - + *.php,*.phps,*.php3,*.inc - - + + ada ada_bugs_gcc @@ -65,23 +65,23 @@ KDE Libraries (Doxygen) - - + + true true true - - + + - - + + - + diff --git a/languages/php/app_templates/phphello/phphello.kdevtemplate b/languages/php/app_templates/phphello/phphello.kdevtemplate new file mode 100644 index 00000000..481f2748 --- /dev/null +++ b/languages/php/app_templates/phphello/phphello.kdevtemplate @@ -0,0 +1,108 @@ +# KDE Config File +[General] +Name=Simple PHP script +Name[ca]=Simple script en PHP +Name[da]=Simpelt PHP script +Name[de]=Einfaches PHP-Skript +Name[el]=Απλό σενάριο PHP +Name[es]=Guión sencillo en PHP +Name[et]=Lihtne PHP skript +Name[eu]=PHP script sinplea +Name[fa]=دست‌نوشتۀ سادۀ پی‌اچ‌پی +Name[fr]=Script PHP simple +Name[ga]=Script Simplí PHP +Name[gl]=Script sinxelo en PHP +Name[hu]=Egyszerű PHP-szkript +Name[it]=Semplice script PHP +Name[ja]=簡単な PHP スクリプト +Name[nds]=Eenfach PHP-Skript +Name[ne]=साधारण पी एच पी स्क्रिप्ट +Name[nl]=Eenvoudig PHP-script +Name[pl]=Prosty skrypt w PHP +Name[pt]=Programa simples em PHP +Name[pt_BR]=Programa simples em PHP +Name[ru]=Простой скрипт PHP +Name[sk]=Jednoduchý PHP skript +Name[sr]=Једноставна PHP скрипта +Name[sr@Latn]=Jednostavna PHP skripta +Name[sv]=Enkelt PHP-skript +Name[tr]=Basit PHP betiği +Name[zh_CN]=简单 PHP 脚本 +Name[zh_TW]=簡單的 PHP 文稿 +Category=PHP +Comment=This generates a simplistic 'Hello world' program in PHP (http://www.php.net) +Comment[ca]=Genera un simple programa de 'Hello world' en PHP (http://www.php.net) +Comment[da]=Dette genererer et simplistisk 'Goddag verden' program i PHP (http://www.php.net) +Comment[de]=Hiermit wird ein einfaches "Hello World"-Programm in PHP erstellt (http://www.php.net). +Comment[el]=Αυτό δημιουργεί ένα πρόγραμμα 'Γεια σου κόσμε' σε PHP (http://www.php.net) +Comment[es]=Genera un programa «Hola mundo» sencillo en PHP (http://www.php.net) +Comment[et]=Lihtsa "Tere, maailm" programmi loomine PHP-s (http://www.php.net) +Comment[eu]=Honek PHP-n (http://www.php.net) idatzitako "Kaixo mundua" programa sinple bat sortzen du +Comment[fa]=یک برنامۀ سادۀ «Hello world» در پی‌اچ‌پی ( http://www.php.net)تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en PHP (http://www.php.net) +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello world" i PHP (http://www.php.net/) +Comment[gl]=Isto xera un programa sinxelo en PHP 'Ola mundo'(http://www.php.net) +Comment[hu]=Létrehoz egy egyszerű 'Hello world' programot PHP-ban (http://www.php.net) +Comment[it]=Genera un semplice programma di "Hello world" in PHP (http://www.php.net) +Comment[ja]=PHP で書かれた簡単な Hello world プログラムを作成します +Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm in PHP op. (http://www.php.net) +Comment[ne]=यसले पी एच पी मा साधारण 'हेल्लो वोल्ड' कार्यक्रम उत्पन्न गर्दछ(http://www.php.net) +Comment[nl]=Dit genereert een eenvoudig 'Hello World'-programma in PHP (http://www.php.net) +Comment[pl]=Generuje prosty program "Witaj świecie" w PHP (http://www.php.net) +Comment[pt]=Isto gera uma programa simples 'Olá Mundo' em PHP (http://www.php.net) +Comment[pt_BR]=Isto gera uma programa simples 'Olá Mundo' em PHP (http://www.php.net) +Comment[ru]=Создание простой программы 'Hello world' на PHP (http://www.php.net) +Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v PHP (http://www.php.net) +Comment[sr]=Ово прави једноставан „Здраво свете“ програм у PHP-у (http://www.php.net) +Comment[sr@Latn]=Ovo pravi jednostavan „Zdravo svete“ program u PHP-u (http://www.php.net) +Comment[sv]=Detta skapar ett förenklat 'Hello world'-program i PHP (http://www.php.net) +Comment[tr]=Bu PHP'de basit bir "Merhaba Dünya "programı yaratır (http://www.php.net) +Comment[zh_CN]=这将生成一个简单的 PHP 语言“Hello world”程序 +Comment[zh_TW]=產生一個 PHP(http://www.php.net)的 Hello world 程式 +DefaultDestinatonDir=HOMEDIR/public_html +FileTemplates=php,CPPStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.php +Archive=phphello.tar.gz + +[PROJECT] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[APP.PHP] +Type=install +Source=%{src}/app.php +Dest=%{dest}/%{APPNAMELC}.php + +[MGS] +Type=message +Comment=A simple PHP project was created in %{dest}. +Comment[ca]=Un simple projecte en PHP ha estat creat en %{dest}. +Comment[da]=Et simpelt PHP projekt blev oprettet i %{dest}. +Comment[de]=Ein einfaches PHP-Projekt wurde in %{dest} erstellt. +Comment[el]=Ένα απλό έργο PHP δημιουργήθηκε στο %{dest}. +Comment[es]=Un sencillo proyecto en PHP ha sido creado en %{dest}. +Comment[et]=Lihtne PHP projekt loodi asukohta %{dest}. +Comment[eu]=PHP-n idatzitako programa sinple bat sortu da hemen: %{dest}. +Comment[fa]=یک پروژۀ سادۀ پی‌اچ‌پی در %{dest} ایجاد شد. +Comment[fr]=Un projet PHP simple a été créé dans %{dest}. +Comment[ga]=Cruthaíodh tionscadal simplí PHP i %{dest} +Comment[gl]=Creouse un proxecto sinxelo en PHP en %{dest} +Comment[hu]=Létrejött egy egyszerű PHP-alapú projekt itt: %{dest}. +Comment[it]=È stato creato un semplice progetto PHP in %{dest}. +Comment[ja]=簡単な PHP プロジェクトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach PHP-Projekt opstellt. +Comment[ne]=साधारण PHP परियोजना %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig PHP-project is aangemaakt in %{dest}. +Comment[pl]=Prosty projekt w PHP został utworzony w %{dest}. +Comment[pt]=Foi criado um projecto simples em PHP em %{dest}. +Comment[pt_BR]=Foi criado um projecto simples em PHP em %{dest}. +Comment[ru]=Простой скрипт PHP создан в %{dest}. +Comment[sk]=Jednoduchý PHP projekt bol vytvorený v %{dest}. +Comment[sr]=Једноставан PHP пројекат направљен је у %{dest}. +Comment[sr@Latn]=Jednostavan PHP projekat napravljen je u %{dest}. +Comment[sv]=Ett enkelt PHP-projekt skapades i %{dest}. +Comment[tr]=Basit bir PHP projesi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简单的 PHP 工程。 +Comment[zh_TW]=一個簡單的 PHP 專案已建立於 %{dest} diff --git a/languages/php/app_templates/phphello/phphello.tdevtemplate b/languages/php/app_templates/phphello/phphello.tdevtemplate deleted file mode 100644 index 481f2748..00000000 --- a/languages/php/app_templates/phphello/phphello.tdevtemplate +++ /dev/null @@ -1,108 +0,0 @@ -# KDE Config File -[General] -Name=Simple PHP script -Name[ca]=Simple script en PHP -Name[da]=Simpelt PHP script -Name[de]=Einfaches PHP-Skript -Name[el]=Απλό σενάριο PHP -Name[es]=Guión sencillo en PHP -Name[et]=Lihtne PHP skript -Name[eu]=PHP script sinplea -Name[fa]=دست‌نوشتۀ سادۀ پی‌اچ‌پی -Name[fr]=Script PHP simple -Name[ga]=Script Simplí PHP -Name[gl]=Script sinxelo en PHP -Name[hu]=Egyszerű PHP-szkript -Name[it]=Semplice script PHP -Name[ja]=簡単な PHP スクリプト -Name[nds]=Eenfach PHP-Skript -Name[ne]=साधारण पी एच पी स्क्रिप्ट -Name[nl]=Eenvoudig PHP-script -Name[pl]=Prosty skrypt w PHP -Name[pt]=Programa simples em PHP -Name[pt_BR]=Programa simples em PHP -Name[ru]=Простой скрипт PHP -Name[sk]=Jednoduchý PHP skript -Name[sr]=Једноставна PHP скрипта -Name[sr@Latn]=Jednostavna PHP skripta -Name[sv]=Enkelt PHP-skript -Name[tr]=Basit PHP betiği -Name[zh_CN]=简单 PHP 脚本 -Name[zh_TW]=簡單的 PHP 文稿 -Category=PHP -Comment=This generates a simplistic 'Hello world' program in PHP (http://www.php.net) -Comment[ca]=Genera un simple programa de 'Hello world' en PHP (http://www.php.net) -Comment[da]=Dette genererer et simplistisk 'Goddag verden' program i PHP (http://www.php.net) -Comment[de]=Hiermit wird ein einfaches "Hello World"-Programm in PHP erstellt (http://www.php.net). -Comment[el]=Αυτό δημιουργεί ένα πρόγραμμα 'Γεια σου κόσμε' σε PHP (http://www.php.net) -Comment[es]=Genera un programa «Hola mundo» sencillo en PHP (http://www.php.net) -Comment[et]=Lihtsa "Tere, maailm" programmi loomine PHP-s (http://www.php.net) -Comment[eu]=Honek PHP-n (http://www.php.net) idatzitako "Kaixo mundua" programa sinple bat sortzen du -Comment[fa]=یک برنامۀ سادۀ «Hello world» در پی‌اچ‌پی ( http://www.php.net)تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en PHP (http://www.php.net) -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello world" i PHP (http://www.php.net/) -Comment[gl]=Isto xera un programa sinxelo en PHP 'Ola mundo'(http://www.php.net) -Comment[hu]=Létrehoz egy egyszerű 'Hello world' programot PHP-ban (http://www.php.net) -Comment[it]=Genera un semplice programma di "Hello world" in PHP (http://www.php.net) -Comment[ja]=PHP で書かれた簡単な Hello world プログラムを作成します -Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm in PHP op. (http://www.php.net) -Comment[ne]=यसले पी एच पी मा साधारण 'हेल्लो वोल्ड' कार्यक्रम उत्पन्न गर्दछ(http://www.php.net) -Comment[nl]=Dit genereert een eenvoudig 'Hello World'-programma in PHP (http://www.php.net) -Comment[pl]=Generuje prosty program "Witaj świecie" w PHP (http://www.php.net) -Comment[pt]=Isto gera uma programa simples 'Olá Mundo' em PHP (http://www.php.net) -Comment[pt_BR]=Isto gera uma programa simples 'Olá Mundo' em PHP (http://www.php.net) -Comment[ru]=Создание простой программы 'Hello world' на PHP (http://www.php.net) -Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v PHP (http://www.php.net) -Comment[sr]=Ово прави једноставан „Здраво свете“ програм у PHP-у (http://www.php.net) -Comment[sr@Latn]=Ovo pravi jednostavan „Zdravo svete“ program u PHP-u (http://www.php.net) -Comment[sv]=Detta skapar ett förenklat 'Hello world'-program i PHP (http://www.php.net) -Comment[tr]=Bu PHP'de basit bir "Merhaba Dünya "programı yaratır (http://www.php.net) -Comment[zh_CN]=这将生成一个简单的 PHP 语言“Hello world”程序 -Comment[zh_TW]=產生一個 PHP(http://www.php.net)的 Hello world 程式 -DefaultDestinatonDir=HOMEDIR/public_html -FileTemplates=php,CPPStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.php -Archive=phphello.tar.gz - -[PROJECT] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[APP.PHP] -Type=install -Source=%{src}/app.php -Dest=%{dest}/%{APPNAMELC}.php - -[MGS] -Type=message -Comment=A simple PHP project was created in %{dest}. -Comment[ca]=Un simple projecte en PHP ha estat creat en %{dest}. -Comment[da]=Et simpelt PHP projekt blev oprettet i %{dest}. -Comment[de]=Ein einfaches PHP-Projekt wurde in %{dest} erstellt. -Comment[el]=Ένα απλό έργο PHP δημιουργήθηκε στο %{dest}. -Comment[es]=Un sencillo proyecto en PHP ha sido creado en %{dest}. -Comment[et]=Lihtne PHP projekt loodi asukohta %{dest}. -Comment[eu]=PHP-n idatzitako programa sinple bat sortu da hemen: %{dest}. -Comment[fa]=یک پروژۀ سادۀ پی‌اچ‌پی در %{dest} ایجاد شد. -Comment[fr]=Un projet PHP simple a été créé dans %{dest}. -Comment[ga]=Cruthaíodh tionscadal simplí PHP i %{dest} -Comment[gl]=Creouse un proxecto sinxelo en PHP en %{dest} -Comment[hu]=Létrejött egy egyszerű PHP-alapú projekt itt: %{dest}. -Comment[it]=È stato creato un semplice progetto PHP in %{dest}. -Comment[ja]=簡単な PHP プロジェクトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach PHP-Projekt opstellt. -Comment[ne]=साधारण PHP परियोजना %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig PHP-project is aangemaakt in %{dest}. -Comment[pl]=Prosty projekt w PHP został utworzony w %{dest}. -Comment[pt]=Foi criado um projecto simples em PHP em %{dest}. -Comment[pt_BR]=Foi criado um projecto simples em PHP em %{dest}. -Comment[ru]=Простой скрипт PHP создан в %{dest}. -Comment[sk]=Jednoduchý PHP projekt bol vytvorený v %{dest}. -Comment[sr]=Једноставан PHP пројекат направљен је у %{dest}. -Comment[sr@Latn]=Jednostavan PHP projekat napravljen je u %{dest}. -Comment[sv]=Ett enkelt PHP-projekt skapades i %{dest}. -Comment[tr]=Basit bir PHP projesi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个简单的 PHP 工程。 -Comment[zh_TW]=一個簡單的 PHP 專案已建立於 %{dest} diff --git a/languages/php/data/CMakeLists.txt b/languages/php/data/CMakeLists.txt index 1662f9c9..f89943bc 100644 --- a/languages/php/data/CMakeLists.txt +++ b/languages/php/data/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES phpfunctions - DESTINATION ${DATA_INSTALL_DIR}/tdevphpsupport ) + DESTINATION ${DATA_INSTALL_DIR}/kdevphpsupport ) diff --git a/languages/php/data/Makefile.am b/languages/php/data/Makefile.am index c48e5460..e54b0415 100644 --- a/languages/php/data/Makefile.am +++ b/languages/php/data/Makefile.am @@ -1,4 +1,4 @@ -phpsupportdatadir = ${kde_datadir}/tdevphpsupport +phpsupportdatadir = ${kde_datadir}/kdevphpsupport install-data-local: mkdir -p $(DESTDIR)$(phpsupportdatadir) diff --git a/languages/php/doc/CMakeLists.txt b/languages/php/doc/CMakeLists.txt index 8b7e6b10..59ea2199 100644 --- a/languages/php/doc/CMakeLists.txt +++ b/languages/php/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES php.toc php_bugs.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/php/doc/Makefile.am b/languages/php/doc/Makefile.am index 2b2ce6aa..163d435b 100644 --- a/languages/php/doc/Makefile.am +++ b/languages/php/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = php.toc php_bugs.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/php/file_templates/CMakeLists.txt b/languages/php/file_templates/CMakeLists.txt index 3b034ae7..5de3a576 100644 --- a/languages/php/file_templates/CMakeLists.txt +++ b/languages/php/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES php - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/php/file_templates/Makefile.am b/languages/php/file_templates/Makefile.am index 765157b2..7f031b4a 100644 --- a/languages/php/file_templates/Makefile.am +++ b/languages/php/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = php diff --git a/languages/php/kdevphpsupport.desktop b/languages/php/kdevphpsupport.desktop new file mode 100644 index 00000000..eea6c168 --- /dev/null +++ b/languages/php/kdevphpsupport.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=PHP Support +Comment[ca]=Suport per a PHP +Comment[da]=PHP-understøttelse +Comment[de]=PHP-Unterstützung für TDevelop +Comment[el]=Υποστήριξη PHP +Comment[es]=Soporte para PHP +Comment[et]=PHP toetus +Comment[eu]=PHP euskarria +Comment[fa]=پشتیبانی پی‌اچ‌پی +Comment[fr]=Prise en charge du langage PHP +Comment[ga]=Tacaíocht PHP +Comment[gl]=Soporte para PHP +Comment[hi]=पीएचपी समर्थन +Comment[hu]=PHP-támogatás +Comment[is]=PHP stuðningur +Comment[it]=Supporto per PHP +Comment[ja]=PHP サポート +Comment[nds]=Ünnerstütten för PHP +Comment[ne]=पी एच पी समर्थन +Comment[nl]=Ondersteuning voor PHP +Comment[pa]=PHP ਸਹਿਯੋਗ +Comment[pl]=Obsługa PHP +Comment[pt]=Suporte a PHP +Comment[pt_BR]=Suporte ao PHP +Comment[ru]=Поддержка языка PHP +Comment[sk]=PHP podpora +Comment[sl]=Podpora za PHP +Comment[sr]=Подршка за PHP +Comment[sr@Latn]=Podrška za PHP +Comment[sv]=PHP-stöd +Comment[ta]=பிஎச்பிஆதரவு +Comment[tg]=Ёрӣ намудани забони PHP +Comment[tr]=PHP Desteği +Comment[zh_CN]=PHP 支持 +Comment[zh_TW]=PHP 支援 +Name=KDevPHPSupport +Name[da]=TDevelop PHP-understøttelse +Name[de]=Unterstützung für PHP (TDevelop) +Name[hi]=के-डेव-पीएचपी-समर्थन +Name[nds]=PHP-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaPHP +Name[sk]=KDev PHP podpora +Name[sv]=TDevelop PHP-stöd +Name[ta]=கெடெவ் பிஎச்பி ஆதரவு +Name[zh_TW]=TDevelop PHP 支援 +GenericName=PHP Support +GenericName[ca]=Suport per a PHP +GenericName[da]=PHP-understøttelse +GenericName[de]=Unterstützung für PHP +GenericName[el]=Υποστήριξη PHP +GenericName[es]=Soporte para PHP +GenericName[et]=PHP toetus +GenericName[eu]=PHP euskarria +GenericName[fa]=پشتیبانی پی‌اچ‌پی +GenericName[fr]=Prise en charge du langage PHP +GenericName[ga]=Tacaíocht PHP +GenericName[gl]=Soporte para PHP +GenericName[hi]=पीएचपी समर्थन +GenericName[hu]=PHP-támogatás +GenericName[it]=Supporto per PHP +GenericName[ja]=PHP サポート +GenericName[nds]=Ünnerstütten för PHP +GenericName[ne]=पी एच पी समर्थन +GenericName[nl]=Ondersteuning voor PHP +GenericName[pl]=Obsługa PHP +GenericName[pt]=Suporte a PHP +GenericName[pt_BR]=Suporte ao PHP +GenericName[ru]=Поддержка языка PHP +GenericName[sk]=PHP podpora +GenericName[sl]=Podpora za PHP +GenericName[sr]=Подршка за PHP +GenericName[sr@Latn]=Podrška za PHP +GenericName[sv]=PHP-stöd +GenericName[ta]=பிஎச்பி ஆதரவு +GenericName[tg]=Ёрӣ намудани забони PHP +GenericName[tr]=PHP Desteği +GenericName[zh_CN]=PHP 支持 +GenericName[zh_TW]=PHP 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevphpsupport +X-TDevelop-Version=5 +X-TDevelop-Language=PHP + diff --git a/languages/php/kdevphpsupport.rc b/languages/php/kdevphpsupport.rc new file mode 100644 index 00000000..14ebd3ba --- /dev/null +++ b/languages/php/kdevphpsupport.rc @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/languages/php/phpcodecompletion.cpp b/languages/php/phpcodecompletion.cpp index 42615f69..af301000 100644 --- a/languages/php/phpcodecompletion.cpp +++ b/languages/php/phpcodecompletion.cpp @@ -21,7 +21,7 @@ #include "phpsupportpart.h" #include "phpconfigdata.h" -#include +#include #include #include #include diff --git a/languages/php/phpcodecompletion.h b/languages/php/phpcodecompletion.h index bac6c44f..65905878 100644 --- a/languages/php/phpcodecompletion.h +++ b/languages/php/phpcodecompletion.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include @@ -36,7 +36,7 @@ #include -class TDevCore; +class KDevCore; class PHPSupportPart; class PHPConfigData; diff --git a/languages/php/phperrorview.cpp b/languages/php/phperrorview.cpp index d408afb9..9af14b0d 100644 --- a/languages/php/phperrorview.cpp +++ b/languages/php/phperrorview.cpp @@ -20,9 +20,9 @@ #include "phperrorview.h" #include "phpsupportpart.h" -#include -#include -#include +#include +#include +#include #include #include diff --git a/languages/php/phpfile.cpp b/languages/php/phpfile.cpp index 1c4e6d04..92d2fc4c 100644 --- a/languages/php/phpfile.cpp +++ b/languages/php/phpfile.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include "phphtmlview.h" #include "phperrorview.h" diff --git a/languages/php/phpfile.h b/languages/php/phpfile.h index 647be68a..ac5a4525 100644 --- a/languages/php/phpfile.h +++ b/languages/php/phpfile.h @@ -30,9 +30,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/languages/php/phphtmlview.cpp b/languages/php/phphtmlview.cpp index 01123bb8..d21a6fa0 100644 --- a/languages/php/phphtmlview.cpp +++ b/languages/php/phphtmlview.cpp @@ -18,7 +18,7 @@ #include "phphtmlview.h" #include "phpsupportpart.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" PHPHTMLView::PHPHTMLView(PHPSupportPart *part):m_part(part) { setOptions(CanOpenInNewWindow); diff --git a/languages/php/phphtmlview.h b/languages/php/phphtmlview.h index 2da25349..e55be392 100644 --- a/languages/php/phphtmlview.h +++ b/languages/php/phphtmlview.h @@ -18,14 +18,14 @@ #ifndef PHPHTMLVIEW_H #define PHPHTMLVIEW_H -#include +#include /** *@author */ class PHPSupportPart; -class PHPHTMLView : public TDevHTMLPart { +class PHPHTMLView : public KDevHTMLPart { Q_OBJECT public: diff --git a/languages/php/phpparser.cpp b/languages/php/phpparser.cpp index 2af89eee..6b725dc8 100644 --- a/languages/php/phpparser.cpp +++ b/languages/php/phpparser.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/languages/php/phpparser.h b/languages/php/phpparser.h index 629e68b6..87093b06 100644 --- a/languages/php/phpparser.h +++ b/languages/php/phpparser.h @@ -31,7 +31,7 @@ #include "phpfile.h" -class TDevCore; +class KDevCore; class PHPSupportPart; /** @@ -56,7 +56,7 @@ public: private: CodeModel* m_model; - TDevCore* m_core; + KDevCore* m_core; PHPSupportPart* m_part; TQMutex m_mutex; diff --git a/languages/php/phpsupportpart.cpp b/languages/php/phpsupportpart.cpp index f5c484a9..4f764f1f 100644 --- a/languages/php/phpsupportpart.cpp +++ b/languages/php/phpsupportpart.cpp @@ -43,13 +43,13 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include +#include #include #include "phpconfigdata.h" @@ -66,18 +66,18 @@ using namespace std; -static const TDevPluginInfo data("tdevphpsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevphpsupport, PHPSupportFactory( data ) ) +static const KDevPluginInfo data("kdevphpsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevphpsupport, PHPSupportFactory( data ) ) PHPSupportPart::PHPSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "PHPSupportPart") + : KDevLanguageSupport(&data, parent, name ? name : "PHPSupportPart") { m_htmlView = 0; m_parser = 0; phpExeProc = 0; setInstance(PHPSupportFactory::instance()); - setXMLFile("tdevphpsupport.rc"); + setXMLFile("kdevphpsupport.rc"); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -545,7 +545,7 @@ TQString PHPSupportPart::getExePath() return configData->getPHPExecPath(); } -TDevLanguageSupport::Features PHPSupportPart::features() +KDevLanguageSupport::Features PHPSupportPart::features() { return Features(Classes | Functions); } diff --git a/languages/php/phpsupportpart.h b/languages/php/phpsupportpart.h index 35203bc7..4dca877b 100644 --- a/languages/php/phpsupportpart.h +++ b/languages/php/phpsupportpart.h @@ -25,9 +25,9 @@ #include #include -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include -#include +#include #include @@ -41,7 +41,7 @@ class PHPCodeCompletion; class PHPParser; class PHPFile; -class PHPSupportPart : public TDevLanguageSupport +class PHPSupportPart : public KDevLanguageSupport { Q_OBJECT @@ -129,6 +129,6 @@ private: VariableDom LastVariable; }; -typedef TDevGenericFactory PHPSupportFactory; +typedef KDevGenericFactory PHPSupportFactory; #endif diff --git a/languages/php/tdevphpsupport.desktop b/languages/php/tdevphpsupport.desktop deleted file mode 100644 index 64fe4329..00000000 --- a/languages/php/tdevphpsupport.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=PHP Support -Comment[ca]=Suport per a PHP -Comment[da]=PHP-understøttelse -Comment[de]=PHP-Unterstützung für TDevelop -Comment[el]=Υποστήριξη PHP -Comment[es]=Soporte para PHP -Comment[et]=PHP toetus -Comment[eu]=PHP euskarria -Comment[fa]=پشتیبانی پی‌اچ‌پی -Comment[fr]=Prise en charge du langage PHP -Comment[ga]=Tacaíocht PHP -Comment[gl]=Soporte para PHP -Comment[hi]=पीएचपी समर्थन -Comment[hu]=PHP-támogatás -Comment[is]=PHP stuðningur -Comment[it]=Supporto per PHP -Comment[ja]=PHP サポート -Comment[nds]=Ünnerstütten för PHP -Comment[ne]=पी एच पी समर्थन -Comment[nl]=Ondersteuning voor PHP -Comment[pa]=PHP ਸਹਿਯੋਗ -Comment[pl]=Obsługa PHP -Comment[pt]=Suporte a PHP -Comment[pt_BR]=Suporte ao PHP -Comment[ru]=Поддержка языка PHP -Comment[sk]=PHP podpora -Comment[sl]=Podpora za PHP -Comment[sr]=Подршка за PHP -Comment[sr@Latn]=Podrška za PHP -Comment[sv]=PHP-stöd -Comment[ta]=பிஎச்பிஆதரவு -Comment[tg]=Ёрӣ намудани забони PHP -Comment[tr]=PHP Desteği -Comment[zh_CN]=PHP 支持 -Comment[zh_TW]=PHP 支援 -Name=KDevPHPSupport -Name[da]=TDevelop PHP-understøttelse -Name[de]=Unterstützung für PHP (TDevelop) -Name[hi]=के-डेव-पीएचपी-समर्थन -Name[nds]=PHP-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaPHP -Name[sk]=KDev PHP podpora -Name[sv]=TDevelop PHP-stöd -Name[ta]=கெடெவ் பிஎச்பி ஆதரவு -Name[zh_TW]=TDevelop PHP 支援 -GenericName=PHP Support -GenericName[ca]=Suport per a PHP -GenericName[da]=PHP-understøttelse -GenericName[de]=Unterstützung für PHP -GenericName[el]=Υποστήριξη PHP -GenericName[es]=Soporte para PHP -GenericName[et]=PHP toetus -GenericName[eu]=PHP euskarria -GenericName[fa]=پشتیبانی پی‌اچ‌پی -GenericName[fr]=Prise en charge du langage PHP -GenericName[ga]=Tacaíocht PHP -GenericName[gl]=Soporte para PHP -GenericName[hi]=पीएचपी समर्थन -GenericName[hu]=PHP-támogatás -GenericName[it]=Supporto per PHP -GenericName[ja]=PHP サポート -GenericName[nds]=Ünnerstütten för PHP -GenericName[ne]=पी एच पी समर्थन -GenericName[nl]=Ondersteuning voor PHP -GenericName[pl]=Obsługa PHP -GenericName[pt]=Suporte a PHP -GenericName[pt_BR]=Suporte ao PHP -GenericName[ru]=Поддержка языка PHP -GenericName[sk]=PHP podpora -GenericName[sl]=Podpora za PHP -GenericName[sr]=Подршка за PHP -GenericName[sr@Latn]=Podrška za PHP -GenericName[sv]=PHP-stöd -GenericName[ta]=பிஎச்பி ஆதரவு -GenericName[tg]=Ёрӣ намудани забони PHP -GenericName[tr]=PHP Desteği -GenericName[zh_CN]=PHP 支持 -GenericName[zh_TW]=PHP 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevphpsupport -X-TDevelop-Version=5 -X-TDevelop-Language=PHP - diff --git a/languages/php/tdevphpsupport.rc b/languages/php/tdevphpsupport.rc deleted file mode 100644 index 14ebd3ba..00000000 --- a/languages/php/tdevphpsupport.rc +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/languages/python/CMakeLists.txt b/languages/python/CMakeLists.txt index ec9d708b..989ea1b1 100644 --- a/languages/python/CMakeLists.txt +++ b/languages/python/CMakeLists.txt @@ -32,14 +32,14 @@ link_directories( ##### other data ################################ -install( FILES tdevpythonsupport.desktop pydoc.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tde_pydoc.py DESTINATION ${DATA_INSTALL_DIR}/tdeio_pydoc ) -install( FILES tdevpythonsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevpythonsupport ) +install( FILES kdevpythonsupport.desktop pydoc.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kde_pydoc.py DESTINATION ${DATA_INSTALL_DIR}/tdeio_pydoc ) +install( FILES kdevpythonsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevpythonsupport ) -##### libtdevpythonsupport (module) ############# +##### libkdevpythonsupport (module) ############# -tde_add_kpart( libtdevpythonsupport AUTOMOC +tde_add_kpart( libkdevpythonsupport AUTOMOC SOURCES pythonsupportpart.cpp pythonconfigwidget.cpp pythonconfigwidgetbase.ui pythonimplementationwidget.cpp diff --git a/languages/python/Makefile.am b/languages/python/Makefile.am index 12ca5a06..feef469d 100644 --- a/languages/python/Makefile.am +++ b/languages/python/Makefile.am @@ -1,5 +1,5 @@ # Here resides the Python support part. -# Do not confuse this with the python part responsible for TDevelop scripting +# Do not confuse this with the python part responsible for KDevelop scripting INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/languages/lib/designer_integration \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util -I$(top_builddir)/languages/lib/designer_integration \ @@ -7,12 +7,12 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/languages/lib/designer SUBDIRS = app_templates file_templates doc -kde_module_LTLIBRARIES = libtdevpythonsupport.la tdeio_pydoc.la +kde_module_LTLIBRARIES = libkdevpythonsupport.la tdeio_pydoc.la -libtdevpythonsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevpythonsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +libkdevpythonsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevpythonsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/languages/lib/designer_integration/libdesignerintegration.la -libtdevpythonsupport_la_SOURCES = pythonsupportpart.cpp pythonconfigwidget.cpp pythonconfigwidgetbase.ui \ +libkdevpythonsupport_la_SOURCES = pythonsupportpart.cpp pythonconfigwidget.cpp pythonconfigwidgetbase.ui \ pythonimplementationwidget.cpp qtdesignerpythonintegration.cpp tdeio_pydoc_la_SOURCES = pydoc.cpp @@ -22,10 +22,10 @@ tdeio_pydoc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) METASOURCES = AUTO slavedir = $(kde_datadir)/tdeio_pydoc -slave_DATA = tde_pydoc.py +slave_DATA = kde_pydoc.py servicedir = $(kde_servicesdir) -service_DATA = tdevpythonsupport.desktop pydoc.protocol +service_DATA = kdevpythonsupport.desktop pydoc.protocol -rcdir = $(kde_datadir)/tdevpythonsupport -rc_DATA = tdevpythonsupport.rc +rcdir = $(kde_datadir)/kdevpythonsupport +rc_DATA = kdevpythonsupport.rc diff --git a/languages/python/app_templates/pyqt/CMakeLists.txt b/languages/python/app_templates/pyqt/CMakeLists.txt index 0beb7976..672d6652 100644 --- a/languages/python/app_templates/pyqt/CMakeLists.txt +++ b/languages/python/app_templates/pyqt/CMakeLists.txt @@ -21,9 +21,9 @@ add_custom_target( pyqt.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/pyqt.tar.gz pyqt.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - pyqt.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + pyqt.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/python/app_templates/pyqt/Makefile.am b/languages/python/app_templates/pyqt/Makefile.am index 7ace4e15..dc12ca69 100644 --- a/languages/python/app_templates/pyqt/Makefile.am +++ b/languages/python/app_templates/pyqt/Makefile.am @@ -6,10 +6,10 @@ dataFiles = app.py app.tdevelop fileopen.pyxpm fileprint.pyxpm \ templateName = pyqt ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/python/app_templates/pyqt/app.tdevelop b/languages/python/app_templates/pyqt/app.tdevelop index 7f2743cb..2abb394e 100644 --- a/languages/python/app_templates/pyqt/app.tdevelop +++ b/languages/python/app_templates/pyqt/app.tdevelop @@ -12,15 +12,15 @@ - + ./%{APPNAMELC}.py - - + + ada ada_bugs_gcc @@ -61,8 +61,8 @@ KDE Libraries (Doxygen) - - + + false *.o,*.lo,CVS @@ -71,11 +71,11 @@ - - + + - + diff --git a/languages/python/app_templates/pyqt/pyqt.kdevtemplate b/languages/python/app_templates/pyqt/pyqt.kdevtemplate new file mode 100644 index 00000000..f19e263c --- /dev/null +++ b/languages/python/app_templates/pyqt/pyqt.kdevtemplate @@ -0,0 +1,168 @@ +# KDE Config File +[General] +Name=Python Qt application +Name[ca]=Aplicació per a Qt en Python +Name[da]=Python Qt program +Name[de]=Python/Qt-Anwendung +Name[el]=Εφαρμογή Python Qt +Name[es]=Aplicación Qt en Python +Name[et]=Pythoni Qt rakendus +Name[eu]=Python Qt aplikazioa +Name[fa]=کاربرد پیتون Qt +Name[fr]=Application Qt Python +Name[ga]=Feidhmchlár Qt Python +Name[gl]=Aplicación Qt en Python +Name[hu]=Python/Qt-alapú alkalmazás +Name[it]=Applicazione Qt Python +Name[ja]=Python Qt アプリケーション +Name[nds]=Python Qt-Programm +Name[ne]=पाइथोन क्यू टी अनुप्रयोग +Name[nl]=Python Qt-toepassing +Name[pl]=Program Qt w Pythonie +Name[pt]=Aplicação Qt em Python +Name[pt_BR]=Aplicação Qt em Python +Name[ru]=Приложение Qt на Python +Name[sk]=Python Qt aplikácia +Name[sr]=Python-Qt програм +Name[sr@Latn]=Python-Qt program +Name[sv]=Python Qt-program +Name[tr]=Python Qt Uygulaması +Name[zh_CN]=Python Qt 应用程序 +Name[zh_TW]=Python Qt 應用程式 +Icon=pyqt.png +Category=Python +Comment=This generates an application framework using Python and Qt +Comment[ca]=Genera una infraestructura d'aplicació usant Python i Qt +Comment[da]=Dette genererer et programskelet ved brug af Python og Qt +Comment[de]=Hiermit wird ein Anwendungsgerüst unter Verwendung von Python und Qt erstellt +Comment[el]=Αυτό δημιουργεί ένα πλαίσιο εφαρμογής χρησιμοποιώντας τις Python και Qt +Comment[es]=Genera una infraestructura de aplicación que usa Python y Qt +Comment[et]=Rakenduse raamistiku loomine Pythoni ja Qt abil +Comment[eu]=Honek Python eta Qt darabiltzan aplikazioen lan-marko bat sortzen du +Comment[fa]=یک چارچوب کاربرد با استفاده از پیتون و Qt تولید می‌کند +Comment[fr]=Génère une infrastructure d'application utilisant Python et Qt +Comment[ga]=Cruthaíonn sé seo creatlach feidhmchláir le Python agus Qt +Comment[gl]=Isto xera un contorno de traballo para unha aplicación usando Python e Qt +Comment[hu]=Létrehoz egy alkalmazás-keretrendszert Python nyelven, a Qt felhasználásával +Comment[it]=Genera l'infrastruttura applicativa usando Python e Qt +Comment[ja]=Python と Qt を使ってアプリケーションフレームワークを作成します +Comment[nds]=Dit stellt mit Python un Qt en Programmrahmenwark op. +Comment[ne]=यसले पाइथोन र क्यू टी प्रयोग गरेर अनुप्रयोग फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Dit genereert een toepassingsframework met behulp van Python en Qt +Comment[pl]=Generuje szablon programu używającego Pythona i Qt +Comment[pt]=Isto cria a plataforma de uma aplicação que usa o Python e o Qt +Comment[pt_BR]=Isto cria a plataforma de uma aplicação que usa o Python e o Qt +Comment[ru]=Создание приложения Qt на Python +Comment[sk]=Vygeneruje aplikačný framework používajúci Python a Qt +Comment[sr]=Прави радни оквир програма користећи Python и Qt +Comment[sr@Latn]=Pravi radni okvir programa koristeći Python i Qt +Comment[sv]=Detta skapar ett programramverk med användning av Python och Qt +Comment[tr]=Bu Python ve Qt kullanan bir uygulama çatısı yaratır. +Comment[zh_CN]=这将生成一个使用 Python 和 Qt 的应用程序框架 +Comment[zh_TW]=產生一個使用 Python 與 Qt 的應用程式框架 +FileTemplates=py,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.py +Archive=pyqt.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app.py +Dest=%{dest}/%{APPNAMELC}.py + +[FILE3] +Type=install +EscapeXML=true +Source=%{src}/documentdetails.ui +Dest=%{dest}/documentdetails.ui + +[FILE4] +Type=install +Source=%{src}/app-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE5] +Type=install +Source=%{src}/app-configure.ac +Dest=%{dest}/configure.ac + +[FILE6] +Type=install +Source=%{src}/app-autogen.sh +Dest=%{dest}/autogen.sh + +[FILE7] +Type=install +Source=%{src}/mkinstalldirs +Dest=%{dest}/mkinstalldirs + +[FILE8] +Type=install +Source=%{src}/missing +Dest=%{dest}/missing + +[FILE9] +Type=install +Source=%{src}/install-sh +Dest=%{dest}/install-sh + +[FILE10] +Type=install +Source=%{src}/pyqt-am-preproc.py +Dest=%{dest}/pyqt-am-preproc.py + +[FILE11] +Type=install +Source=%{src}/fileopen.pyxpm +Dest=%{dest}/fileopen.pyxpm + +[FILE12] +Type=install +Source=%{src}/fileprint.pyxpm +Dest=%{dest}/fileprint.pyxpm + +[FILE13] +Type=install +Source=%{src}/filesave.pyxpm +Dest=%{dest}/filesave.pyxpm + +[MSG] +Type=message +Comment=A Python Qt application was created in %{dest} +Comment[ca]=Una aplicació per a Qt en Python ha estat creada en %{dest} +Comment[da]=Et Python Qt program blev oprettet i %{dest} +Comment[de]=Eine Python/Qt-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή Python Qt δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación Qt en Python ha sido creada en %{dest} +Comment[et]=Pythoni Qt rakendus loodi asukohta %{dest} +Comment[eu]=Python eta Qt darabiltzan aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد پیتون Qt در %{dest} ایجاد شد +Comment[fr]=Une application Qt Python a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár Python Qt i %{dest} +Comment[gl]=Creouse unha aplicación Qt en Python en %{dest} +Comment[hu]=Létrejött egy Python/Qt-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Qt Python in %{dest} +Comment[ja]=Python Qt アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Python-Qt-Programm opstellt. +Comment[ne]=पाइथोन क्यू टी अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Python Qt-toepassing is aangemaakt in %{dest} +Comment[pl]=Program używający Pythona i Qt został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação Qt em Python em %{dest} +Comment[pt_BR]=Foi criada uma aplicação Qt em Python em %{dest} +Comment[ru]=Приложение Qt на Python создано в %{dest} +Comment[sk]=Python Qt aplikácia bola vytvorená v %{dest} +Comment[sr]= Python-Qt програм је направљен у %{dest} +Comment[sr@Latn]= Python-Qt program je napravljen u %{dest} +Comment[sv]=Ett Python Qt-program skapades i %{dest} +Comment[tr]=Bir Python Qt uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个 Python Qt 应用程序 +Comment[zh_TW]=一個 Python Qt 應用程式已建立於 %{dest} diff --git a/languages/python/app_templates/pyqt/pyqt.tdevtemplate b/languages/python/app_templates/pyqt/pyqt.tdevtemplate deleted file mode 100644 index cb0deace..00000000 --- a/languages/python/app_templates/pyqt/pyqt.tdevtemplate +++ /dev/null @@ -1,168 +0,0 @@ -# KDE Config File -[General] -Name=Python Qt application -Name[ca]=Aplicació per a Qt en Python -Name[da]=Python Qt program -Name[de]=Python/Qt-Anwendung -Name[el]=Εφαρμογή Python Qt -Name[es]=Aplicación Qt en Python -Name[et]=Pythoni Qt rakendus -Name[eu]=Python Qt aplikazioa -Name[fa]=کاربرد پیتون Qt -Name[fr]=Application Qt Python -Name[ga]=Feidhmchlár Qt Python -Name[gl]=Aplicación Qt en Python -Name[hu]=Python/Qt-alapú alkalmazás -Name[it]=Applicazione Qt Python -Name[ja]=Python Qt アプリケーション -Name[nds]=Python Qt-Programm -Name[ne]=पाइथोन क्यू टी अनुप्रयोग -Name[nl]=Python Qt-toepassing -Name[pl]=Program Qt w Pythonie -Name[pt]=Aplicação Qt em Python -Name[pt_BR]=Aplicação Qt em Python -Name[ru]=Приложение Qt на Python -Name[sk]=Python Qt aplikácia -Name[sr]=Python-Qt програм -Name[sr@Latn]=Python-Qt program -Name[sv]=Python Qt-program -Name[tr]=Python Qt Uygulaması -Name[zh_CN]=Python Qt 应用程序 -Name[zh_TW]=Python Qt 應用程式 -Icon=pyqt.png -Category=Python -Comment=This generates an application framework using Python and Qt -Comment[ca]=Genera una infraestructura d'aplicació usant Python i Qt -Comment[da]=Dette genererer et programskelet ved brug af Python og Qt -Comment[de]=Hiermit wird ein Anwendungsgerüst unter Verwendung von Python und Qt erstellt -Comment[el]=Αυτό δημιουργεί ένα πλαίσιο εφαρμογής χρησιμοποιώντας τις Python και Qt -Comment[es]=Genera una infraestructura de aplicación que usa Python y Qt -Comment[et]=Rakenduse raamistiku loomine Pythoni ja Qt abil -Comment[eu]=Honek Python eta Qt darabiltzan aplikazioen lan-marko bat sortzen du -Comment[fa]=یک چارچوب کاربرد با استفاده از پیتون و Qt تولید می‌کند -Comment[fr]=Génère une infrastructure d'application utilisant Python et Qt -Comment[ga]=Cruthaíonn sé seo creatlach feidhmchláir le Python agus Qt -Comment[gl]=Isto xera un contorno de traballo para unha aplicación usando Python e Qt -Comment[hu]=Létrehoz egy alkalmazás-keretrendszert Python nyelven, a Qt felhasználásával -Comment[it]=Genera l'infrastruttura applicativa usando Python e Qt -Comment[ja]=Python と Qt を使ってアプリケーションフレームワークを作成します -Comment[nds]=Dit stellt mit Python un Qt en Programmrahmenwark op. -Comment[ne]=यसले पाइथोन र क्यू टी प्रयोग गरेर अनुप्रयोग फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Dit genereert een toepassingsframework met behulp van Python en Qt -Comment[pl]=Generuje szablon programu używającego Pythona i Qt -Comment[pt]=Isto cria a plataforma de uma aplicação que usa o Python e o Qt -Comment[pt_BR]=Isto cria a plataforma de uma aplicação que usa o Python e o Qt -Comment[ru]=Создание приложения Qt на Python -Comment[sk]=Vygeneruje aplikačný framework používajúci Python a Qt -Comment[sr]=Прави радни оквир програма користећи Python и Qt -Comment[sr@Latn]=Pravi radni okvir programa koristeći Python i Qt -Comment[sv]=Detta skapar ett programramverk med användning av Python och Qt -Comment[tr]=Bu Python ve Qt kullanan bir uygulama çatısı yaratır. -Comment[zh_CN]=这将生成一个使用 Python 和 Qt 的应用程序框架 -Comment[zh_TW]=產生一個使用 Python 與 Qt 的應用程式框架 -FileTemplates=py,ShellStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.py -Archive=pyqt.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.py -Dest=%{dest}/%{APPNAMELC}.py - -[FILE3] -Type=install -EscapeXML=true -Source=%{src}/documentdetails.ui -Dest=%{dest}/documentdetails.ui - -[FILE4] -Type=install -Source=%{src}/app-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE5] -Type=install -Source=%{src}/app-configure.ac -Dest=%{dest}/configure.ac - -[FILE6] -Type=install -Source=%{src}/app-autogen.sh -Dest=%{dest}/autogen.sh - -[FILE7] -Type=install -Source=%{src}/mkinstalldirs -Dest=%{dest}/mkinstalldirs - -[FILE8] -Type=install -Source=%{src}/missing -Dest=%{dest}/missing - -[FILE9] -Type=install -Source=%{src}/install-sh -Dest=%{dest}/install-sh - -[FILE10] -Type=install -Source=%{src}/pyqt-am-preproc.py -Dest=%{dest}/pyqt-am-preproc.py - -[FILE11] -Type=install -Source=%{src}/fileopen.pyxpm -Dest=%{dest}/fileopen.pyxpm - -[FILE12] -Type=install -Source=%{src}/fileprint.pyxpm -Dest=%{dest}/fileprint.pyxpm - -[FILE13] -Type=install -Source=%{src}/filesave.pyxpm -Dest=%{dest}/filesave.pyxpm - -[MSG] -Type=message -Comment=A Python Qt application was created in %{dest} -Comment[ca]=Una aplicació per a Qt en Python ha estat creada en %{dest} -Comment[da]=Et Python Qt program blev oprettet i %{dest} -Comment[de]=Eine Python/Qt-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή Python Qt δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación Qt en Python ha sido creada en %{dest} -Comment[et]=Pythoni Qt rakendus loodi asukohta %{dest} -Comment[eu]=Python eta Qt darabiltzan aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد پیتون Qt در %{dest} ایجاد شد -Comment[fr]=Une application Qt Python a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár Python Qt i %{dest} -Comment[gl]=Creouse unha aplicación Qt en Python en %{dest} -Comment[hu]=Létrejött egy Python/Qt-alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione Qt Python in %{dest} -Comment[ja]=Python Qt アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Python-Qt-Programm opstellt. -Comment[ne]=पाइथोन क्यू टी अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Python Qt-toepassing is aangemaakt in %{dest} -Comment[pl]=Program używający Pythona i Qt został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação Qt em Python em %{dest} -Comment[pt_BR]=Foi criada uma aplicação Qt em Python em %{dest} -Comment[ru]=Приложение Qt на Python создано в %{dest} -Comment[sk]=Python Qt aplikácia bola vytvorená v %{dest} -Comment[sr]= Python-Qt програм је направљен у %{dest} -Comment[sr@Latn]= Python-Qt program je napravljen u %{dest} -Comment[sv]=Ett Python Qt-program skapades i %{dest} -Comment[tr]=Bir Python Qt uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个 Python Qt 应用程序 -Comment[zh_TW]=一個 Python Qt 應用程式已建立於 %{dest} diff --git a/languages/python/app_templates/pythonhello/CMakeLists.txt b/languages/python/app_templates/pythonhello/CMakeLists.txt index d6c3f09c..dfdbbc3b 100644 --- a/languages/python/app_templates/pythonhello/CMakeLists.txt +++ b/languages/python/app_templates/pythonhello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( pythonhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/pythonhello.tar.gz pythonhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - pythonhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + pythonhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/python/app_templates/pythonhello/Makefile.am b/languages/python/app_templates/pythonhello/Makefile.am index 7265f7de..2dc4f559 100644 --- a/languages/python/app_templates/pythonhello/Makefile.am +++ b/languages/python/app_templates/pythonhello/Makefile.am @@ -1,10 +1,10 @@ dataFiles = app.py app.tdevelop pythonhello.png templateName = pythonhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/python/app_templates/pythonhello/app.tdevelop b/languages/python/app_templates/pythonhello/app.tdevelop index a93a999c..9826d145 100644 --- a/languages/python/app_templates/pythonhello/app.tdevelop +++ b/languages/python/app_templates/pythonhello/app.tdevelop @@ -11,15 +11,15 @@ - + %{APPNAMELC}.py - - + + ada ada_bugs_gcc @@ -66,8 +66,8 @@ KDE Libraries (Doxygen) - - + + false *.o,*.lo,CVS @@ -75,10 +75,10 @@ - - + + - + diff --git a/languages/python/app_templates/pythonhello/pythonhello.kdevtemplate b/languages/python/app_templates/pythonhello/pythonhello.kdevtemplate new file mode 100644 index 00000000..0e130571 --- /dev/null +++ b/languages/python/app_templates/pythonhello/pythonhello.kdevtemplate @@ -0,0 +1,107 @@ +# KDE Config File +[General] +Name=Simple Python script +Name[ca]=Simple script en Python +Name[da]=Simpelt Python script +Name[de]=Einfaches Python-Skript +Name[el]=Απλό σενάριο Python +Name[es]=Guión sencillo en Python +Name[et]=Lihtne Pythoni skript +Name[eu]=Python script sinplea +Name[fa]=دست‌نوشتۀ سادۀ پیتون +Name[fr]=Script Python simple +Name[ga]=Script shimplí Python +Name[gl]=Script sinxelo en Python +Name[hu]=Egyszerű Python-szkript +Name[it]=Semplice script Python +Name[ja]=簡単な Python スクリプト +Name[nds]=Eenfach Python-Skript +Name[ne]=साधारण पाइथोन स्क्रिप्ट +Name[nl]=Eenvoudig Python-script +Name[pl]=Prosty skrypt w Pythonie +Name[pt]=Programa simples em Python +Name[pt_BR]=Programa simples em Python +Name[ru]=Простой скрипт Python +Name[sk]=Jednoduchý Python skript +Name[sr]=Једноставна Python скрипта +Name[sr@Latn]=Jednostavna Python skripta +Name[sv]=Enkelt Python-skript +Name[tr]=Basit Python betiği +Name[zh_CN]=简单的 Python 脚本 +Name[zh_TW]=簡單的 Python 文稿 +Icon=pythonhello.png +Category=Python +Comment=This generates a simplistic "Hello world" program in Python +Comment[ca]=Genera un simple programa de "Hello world" en Python +Comment[da]=Dette genererer et simplistisk "Goddag verden" program i Python +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Python +Comment[el]=Αυτό δημιουργεί ένα απλό πρόγραμμα "Γεια σου κόσμε" σε Python +Comment[es]=Genera un sencillo programa «Hola mundo» en Python +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Pythonis +Comment[eu]=Honek "Kaixo mundua" programa sinple bat sortzen du Python lengoaian +Comment[fa]=یک برنامۀ سادۀ «Hello world» در پیتون تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Python +Comment[gl]=Isto xera un programa sinxelo "Ola mundo" en Python +Comment[hu]=Létrehoz egy egyszerű Hello world programot Python nyelven +Comment[it]=Genera un semplice programma di "Hello world" in Python +Comment[ja]=簡単な Hello world プログラムを Python で作成します +Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm mit Python op. +Comment[ne]=यसले पाइथोनमा साधारण "हेल्लो वोल्ड" कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Dit genereert een eenvoudig "Hello World"-programma in Python +Comment[pl]=Generuje prosty program "Witaj świecie" w Pythonie +Comment[pt]=Isto gera um programa simples "Olá mundo" em Python +Comment[pt_BR]=Isto gera um programa simples "Olá mundo" em Python +Comment[ru]=Создание простой программы "Hello world" на Python +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Python +Comment[sr]=Прави једноставан „Здраво свете“ програм у Python-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u Python-u +Comment[sv]=Detta skapar ett förenklat "Hello world"-program i Python +Comment[tr]=Bu, Python'da basit bir "Merhaba Dünya" programı yaratır. +Comment[zh_CN]=这将生成一个简单的 Python 语言“Hello world”程序 +Comment[zh_TW]=產生一個 Python 的簡單 Hello world 程式 +FileTemplates=py,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.py +Archive=pythonhello.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app.py +Dest=%{dest}/%{APPNAMELC}.py + +[MSG] +Type=message +Comment=A simple python script was created in %{dest} +Comment[ca]=Un simple script en Python ha estat creat en %{dest} +Comment[da]=Et simpelt python script blev oprettet i %{dest} +Comment[de]=Ein einfaches Python-Skript wurde in %{dest} erstellt. +Comment[el]=Ένα απλό σενάριο python δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa en Python ha sido creado en %{dest} +Comment[et]=Lihtne Pythoni skript loodi asukohta %{dest} +Comment[eu]=Python programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک دست‌نوشتۀ سادۀ پیتون در %{dest} ایجاد شد +Comment[fr]=Un script Python simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh script shimplí Python i %{dest} +Comment[gl]=Creouse un script sinxelo en python en %{dest} +Comment[hu]=Létrejött egy egyszerű Python-szkript itt: %{dest} +Comment[it]=È stato creato un semplice script python in %{dest} +Comment[ja]=簡単な python スクリプトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach Python-Skript opstellt. +Comment[ne]=साधारण पाइथोन स्क्रिप्ट %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig Python-script is aangemaakt in %{dest} +Comment[pl]=Prosty skrypt w Pythonie został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples em Python em %{dest} +Comment[pt_BR]=Foi criado um programa simples em Python em %{dest} +Comment[ru]=Простой скрипт Python создан в %{dest} +Comment[sk]=Jednoduchý Python skript bol vytvorený v %{dest} +Comment[sr]=Једноставна python скрипта направљена је у %{dest} +Comment[sr@Latn]=Jednostavna python skripta napravljena je u %{dest} +Comment[sv]=Ett enkelt Python-skript skapades i %{dest} +Comment[tr]=Basit bir python betiği %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简单的 Python 语言脚本 +Comment[zh_TW]=一個簡單的 python 文稿框架已建立於 %{dest} diff --git a/languages/python/app_templates/pythonhello/pythonhello.tdevtemplate b/languages/python/app_templates/pythonhello/pythonhello.tdevtemplate deleted file mode 100644 index 0e130571..00000000 --- a/languages/python/app_templates/pythonhello/pythonhello.tdevtemplate +++ /dev/null @@ -1,107 +0,0 @@ -# KDE Config File -[General] -Name=Simple Python script -Name[ca]=Simple script en Python -Name[da]=Simpelt Python script -Name[de]=Einfaches Python-Skript -Name[el]=Απλό σενάριο Python -Name[es]=Guión sencillo en Python -Name[et]=Lihtne Pythoni skript -Name[eu]=Python script sinplea -Name[fa]=دست‌نوشتۀ سادۀ پیتون -Name[fr]=Script Python simple -Name[ga]=Script shimplí Python -Name[gl]=Script sinxelo en Python -Name[hu]=Egyszerű Python-szkript -Name[it]=Semplice script Python -Name[ja]=簡単な Python スクリプト -Name[nds]=Eenfach Python-Skript -Name[ne]=साधारण पाइथोन स्क्रिप्ट -Name[nl]=Eenvoudig Python-script -Name[pl]=Prosty skrypt w Pythonie -Name[pt]=Programa simples em Python -Name[pt_BR]=Programa simples em Python -Name[ru]=Простой скрипт Python -Name[sk]=Jednoduchý Python skript -Name[sr]=Једноставна Python скрипта -Name[sr@Latn]=Jednostavna Python skripta -Name[sv]=Enkelt Python-skript -Name[tr]=Basit Python betiği -Name[zh_CN]=简单的 Python 脚本 -Name[zh_TW]=簡單的 Python 文稿 -Icon=pythonhello.png -Category=Python -Comment=This generates a simplistic "Hello world" program in Python -Comment[ca]=Genera un simple programa de "Hello world" en Python -Comment[da]=Dette genererer et simplistisk "Goddag verden" program i Python -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Python -Comment[el]=Αυτό δημιουργεί ένα απλό πρόγραμμα "Γεια σου κόσμε" σε Python -Comment[es]=Genera un sencillo programa «Hola mundo» en Python -Comment[et]=Lihtsa "Tere, maailm" programmi loomine Pythonis -Comment[eu]=Honek "Kaixo mundua" programa sinple bat sortzen du Python lengoaian -Comment[fa]=یک برنامۀ سادۀ «Hello world» در پیتون تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en Python -Comment[gl]=Isto xera un programa sinxelo "Ola mundo" en Python -Comment[hu]=Létrehoz egy egyszerű Hello world programot Python nyelven -Comment[it]=Genera un semplice programma di "Hello world" in Python -Comment[ja]=簡単な Hello world プログラムを Python で作成します -Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm mit Python op. -Comment[ne]=यसले पाइथोनमा साधारण "हेल्लो वोल्ड" कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Dit genereert een eenvoudig "Hello World"-programma in Python -Comment[pl]=Generuje prosty program "Witaj świecie" w Pythonie -Comment[pt]=Isto gera um programa simples "Olá mundo" em Python -Comment[pt_BR]=Isto gera um programa simples "Olá mundo" em Python -Comment[ru]=Создание простой программы "Hello world" на Python -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Python -Comment[sr]=Прави једноставан „Здраво свете“ програм у Python-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u Python-u -Comment[sv]=Detta skapar ett förenklat "Hello world"-program i Python -Comment[tr]=Bu, Python'da basit bir "Merhaba Dünya" programı yaratır. -Comment[zh_CN]=这将生成一个简单的 Python 语言“Hello world”程序 -Comment[zh_TW]=產生一個 Python 的簡單 Hello world 程式 -FileTemplates=py,ShellStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.py -Archive=pythonhello.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.py -Dest=%{dest}/%{APPNAMELC}.py - -[MSG] -Type=message -Comment=A simple python script was created in %{dest} -Comment[ca]=Un simple script en Python ha estat creat en %{dest} -Comment[da]=Et simpelt python script blev oprettet i %{dest} -Comment[de]=Ein einfaches Python-Skript wurde in %{dest} erstellt. -Comment[el]=Ένα απλό σενάριο python δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa en Python ha sido creado en %{dest} -Comment[et]=Lihtne Pythoni skript loodi asukohta %{dest} -Comment[eu]=Python programa sinple bat sortu da hemen: %{dest} -Comment[fa]=یک دست‌نوشتۀ سادۀ پیتون در %{dest} ایجاد شد -Comment[fr]=Un script Python simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh script shimplí Python i %{dest} -Comment[gl]=Creouse un script sinxelo en python en %{dest} -Comment[hu]=Létrejött egy egyszerű Python-szkript itt: %{dest} -Comment[it]=È stato creato un semplice script python in %{dest} -Comment[ja]=簡単な python スクリプトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach Python-Skript opstellt. -Comment[ne]=साधारण पाइथोन स्क्रिप्ट %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig Python-script is aangemaakt in %{dest} -Comment[pl]=Prosty skrypt w Pythonie został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples em Python em %{dest} -Comment[pt_BR]=Foi criado um programa simples em Python em %{dest} -Comment[ru]=Простой скрипт Python создан в %{dest} -Comment[sk]=Jednoduchý Python skript bol vytvorený v %{dest} -Comment[sr]=Једноставна python скрипта направљена је у %{dest} -Comment[sr@Latn]=Jednostavna python skripta napravljena je u %{dest} -Comment[sv]=Ett enkelt Python-skript skapades i %{dest} -Comment[tr]=Basit bir python betiği %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个简单的 Python 语言脚本 -Comment[zh_TW]=一個簡單的 python 文稿框架已建立於 %{dest} diff --git a/languages/python/app_templates/pytk/CMakeLists.txt b/languages/python/app_templates/pytk/CMakeLists.txt index d71c9be1..1a28ddad 100644 --- a/languages/python/app_templates/pytk/CMakeLists.txt +++ b/languages/python/app_templates/pytk/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( pytk.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/pytk.tar.gz pytk.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - pytk.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + pytk.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/python/app_templates/pytk/Makefile.am b/languages/python/app_templates/pytk/Makefile.am index 94fb2122..d1ebe715 100644 --- a/languages/python/app_templates/pytk/Makefile.am +++ b/languages/python/app_templates/pytk/Makefile.am @@ -1,10 +1,10 @@ dataFiles = app.py app.tdevelop pytk.png templateName = pytk ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/python/app_templates/pytk/app.tdevelop b/languages/python/app_templates/pytk/app.tdevelop index 95144f90..1482b842 100644 --- a/languages/python/app_templates/pytk/app.tdevelop +++ b/languages/python/app_templates/pytk/app.tdevelop @@ -11,15 +11,15 @@ - + %{APPNAMELC}.py - - + + ada ada_bugs_gcc @@ -64,8 +64,8 @@ KDE Libraries (Doxygen) - - + + false *.o,*.lo,CVS @@ -73,10 +73,10 @@ - - + + - + diff --git a/languages/python/app_templates/pytk/pytk.kdevtemplate b/languages/python/app_templates/pytk/pytk.kdevtemplate new file mode 100644 index 00000000..3b8ac6bc --- /dev/null +++ b/languages/python/app_templates/pytk/pytk.kdevtemplate @@ -0,0 +1,107 @@ +# KDE Config File +[General] +Name=Simple Python/Tkinter script +Name[ca]=Simple script en Python/Tkinter +Name[da]=Simpelt Python/Tkinter script +Name[de]=Einfaches Python/Tkinter-Skript +Name[el]=Απλό σενάριο Python/Tkinter +Name[es]=Guión sencillo en Python/Tkinter +Name[et]=Lihtne Pythoni/Tkinteri skript +Name[eu]=Python/Tkinter script sinplea +Name[fa]=دست‌نوشتۀ سادۀ پیتون/Tkinter +Name[fr]=Script Python / Tkinter simple +Name[ga]=Script shimplí Python/Tkinter +Name[gl]=Script sinxelo Python/Tkinter +Name[hu]=Egyszerű Python/Tkinter-szkript +Name[it]=Semplice script Python/Tkinter +Name[ja]=簡単な Python/Tkinter スクリプト +Name[nds]=Eenfach Python/Tkinter-Skript +Name[ne]=साधारण पाइथोन/Tkinter स्क्रिप्ट +Name[nl]=Eenvoudig Python/Tkinter-script +Name[pl]=Prosty skrypt Python/Tkinter +Name[pt]=Programa simples em Python/Tkinter +Name[pt_BR]=Programa simples em Python/Tkinter +Name[ru]=Простой скрипт Python/Tkinter +Name[sk]=Jednoduchý Python/Tkinter skript +Name[sr]=Једноставна Python/Tkinter скрипта +Name[sr@Latn]=Jednostavna Python/Tkinter skripta +Name[sv]=Enkelt Python/Tkinter-skript +Name[tr]=Basit Python/Tkinter betiği +Name[zh_CN]=简单的 Python/Tkinter 脚本 +Name[zh_TW]=簡單的 Python/Tkinter 文稿 +Icon=pytk.png +Category=Python +Comment=This generates a simplistic "Hello world" program in Python/Tkinter +Comment[ca]=Genera un simple programa de "Hello world" en Python/Tkinter +Comment[da]=Dette genererer et simplistisk "Goddag verden" program i Python/Tkinter +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Python/Tkinter +Comment[el]=Αυτό δημιουργεί ένα απλό πρόγραμμα "Γεια σου κόσμε" σε Python/Tkinter +Comment[es]=Genera un sencillo programa «Hola mundo» en Python/Tkinter +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Pythonis/Tkinteris +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Python/Tkinter-en +Comment[fa]=یک برنامۀ سادۀ «Hello world» در پیتون/Tkinter تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Python / Tkinter +Comment[gl]=Isto xera un programa sinxelo "Ola mundo" en Python/Tkinter +Comment[hu]=Létrehoz egy egyszerű Hello world programot Python/Tkinter nyelven +Comment[it]=Genera un semplice programma di "Hello world" in Python/Tkinter +Comment[ja]=簡単な Hello world プログラムを Python/Tkinter で作成します +Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm in Python/Tkinter op. +Comment[ne]=यसले पाइथोन/Tkinter मा साधारण "हेल्लो वोल्ड" कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Dit genereert een eenvoudig "Hallo Wereld"-programma in Python/Tkinter +Comment[pl]=Generuje prosty skrypt "Witaj świecie" w Pythonie/Tkinterze +Comment[pt]=Isto gera um programa simples "Olá mundo" em Python/Tkinter +Comment[pt_BR]=Isto gera um programa simples "Olá mundo" em Python/Tkinter +Comment[ru]=Создание простой программы "Hello world" на Python и Tkinter +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Python/Tkinter +Comment[sr]=Прави једноставан „Здраво свете“ у Python/Tkinter-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Python/Tkinter-u +Comment[sv]=Detta skapar ett förenklat "Hello world"-program i Python/Tkinter +Comment[tr]=Bu Python/Tkinter'da basit bir "Merhaba Dünya" programı yaratır. +Comment[zh_CN]=这将生成一个简单的 Python/Tkinter 语言“Hello world”程序 +Comment[zh_TW]=產生一個簡單的 Python/Tkinter 的 Hello World 程式 +FileTemplates=py,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.py +Archive=pytk.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app.py +Dest=%{dest}/%{APPNAMELC}.py + +[MSG] +Type=message +Comment=A simple Python/Tkinter script was created in %{dest} +Comment[ca]=Un simple script en Python/Tkinter ha estat creat en %{dest} +Comment[da]=Et simpelt Python/Tkinter script blev oprettet i %{dest} +Comment[de]=Ein einfaches Python/Tkinter-Skript wurde in %{dest} erstellt. +Comment[el]=Ένα απλό σενάριο Python/Tkinter δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo guión en Python/Tkinter ha sido creado en %{dest} +Comment[et]=Lihtne Pythoni/Tkinteri skript loodi asukohta %{dest} +Comment[eu]=Python/Tkinter script sinple bat sortu da hemen: %{dest} +Comment[fa]=یک دست‌نوشتۀ سادۀ پیتون/Tkinter در %{dest} ایجاد شد +Comment[fr]=Un script Python / Tkinter simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh script shimplí Python/Tkinter i %{dest} +Comment[gl]=Creouse un script sinxelo Python/Tkinter en %{dest} +Comment[hu]=Létrejött egy egyszerű Python/Tkinter-szkript itt: %{dest} +Comment[it]=È stato creato un semplice script Python/Tkinter in %{dest} +Comment[ja]=簡単な Python/Tkinter スクリプトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach Python-/Tkinter-Skript opstellt. +Comment[ne]=साधारण पाइथोन/Tkinter स्क्रिप्ट %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig Python/Tkinter-script is aangemaakt in %{dest} +Comment[pl]=Prosty skrypt Python/Tkinter został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples em Python/Tkinter em %{dest} +Comment[pt_BR]=Foi criado um programa simples em Python/Tkinter em %{dest} +Comment[ru]=Простой скрипт Python/Tkinter создан в %{dest} +Comment[sk]=Jednoduchý Python/Tkinter skript bol vytvorený v %{dest} +Comment[sr]=Једноставна Python/Tkinter скрипта направљена је у %{dest} +Comment[sr@Latn]=Jednostavna Python/Tkinter skripta napravljena je u %{dest} +Comment[sv]=Ett enkelt Python/Tkinter-skript skapades i %{dest} +Comment[tr]=Basit Python/Tkinter betiği %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简单的 Python/Tkinter 脚本 +Comment[zh_TW]=一個簡單的 Python/Tkinter 文稿已建立於 %{dest} diff --git a/languages/python/app_templates/pytk/pytk.tdevtemplate b/languages/python/app_templates/pytk/pytk.tdevtemplate deleted file mode 100644 index 3b8ac6bc..00000000 --- a/languages/python/app_templates/pytk/pytk.tdevtemplate +++ /dev/null @@ -1,107 +0,0 @@ -# KDE Config File -[General] -Name=Simple Python/Tkinter script -Name[ca]=Simple script en Python/Tkinter -Name[da]=Simpelt Python/Tkinter script -Name[de]=Einfaches Python/Tkinter-Skript -Name[el]=Απλό σενάριο Python/Tkinter -Name[es]=Guión sencillo en Python/Tkinter -Name[et]=Lihtne Pythoni/Tkinteri skript -Name[eu]=Python/Tkinter script sinplea -Name[fa]=دست‌نوشتۀ سادۀ پیتون/Tkinter -Name[fr]=Script Python / Tkinter simple -Name[ga]=Script shimplí Python/Tkinter -Name[gl]=Script sinxelo Python/Tkinter -Name[hu]=Egyszerű Python/Tkinter-szkript -Name[it]=Semplice script Python/Tkinter -Name[ja]=簡単な Python/Tkinter スクリプト -Name[nds]=Eenfach Python/Tkinter-Skript -Name[ne]=साधारण पाइथोन/Tkinter स्क्रिप्ट -Name[nl]=Eenvoudig Python/Tkinter-script -Name[pl]=Prosty skrypt Python/Tkinter -Name[pt]=Programa simples em Python/Tkinter -Name[pt_BR]=Programa simples em Python/Tkinter -Name[ru]=Простой скрипт Python/Tkinter -Name[sk]=Jednoduchý Python/Tkinter skript -Name[sr]=Једноставна Python/Tkinter скрипта -Name[sr@Latn]=Jednostavna Python/Tkinter skripta -Name[sv]=Enkelt Python/Tkinter-skript -Name[tr]=Basit Python/Tkinter betiği -Name[zh_CN]=简单的 Python/Tkinter 脚本 -Name[zh_TW]=簡單的 Python/Tkinter 文稿 -Icon=pytk.png -Category=Python -Comment=This generates a simplistic "Hello world" program in Python/Tkinter -Comment[ca]=Genera un simple programa de "Hello world" en Python/Tkinter -Comment[da]=Dette genererer et simplistisk "Goddag verden" program i Python/Tkinter -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Python/Tkinter -Comment[el]=Αυτό δημιουργεί ένα απλό πρόγραμμα "Γεια σου κόσμε" σε Python/Tkinter -Comment[es]=Genera un sencillo programa «Hola mundo» en Python/Tkinter -Comment[et]=Lihtsa "Tere, maailm" programmi loomine Pythonis/Tkinteris -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Python/Tkinter-en -Comment[fa]=یک برنامۀ سادۀ «Hello world» در پیتون/Tkinter تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en Python / Tkinter -Comment[gl]=Isto xera un programa sinxelo "Ola mundo" en Python/Tkinter -Comment[hu]=Létrehoz egy egyszerű Hello world programot Python/Tkinter nyelven -Comment[it]=Genera un semplice programma di "Hello world" in Python/Tkinter -Comment[ja]=簡単な Hello world プログラムを Python/Tkinter で作成します -Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm in Python/Tkinter op. -Comment[ne]=यसले पाइथोन/Tkinter मा साधारण "हेल्लो वोल्ड" कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Dit genereert een eenvoudig "Hallo Wereld"-programma in Python/Tkinter -Comment[pl]=Generuje prosty skrypt "Witaj świecie" w Pythonie/Tkinterze -Comment[pt]=Isto gera um programa simples "Olá mundo" em Python/Tkinter -Comment[pt_BR]=Isto gera um programa simples "Olá mundo" em Python/Tkinter -Comment[ru]=Создание простой программы "Hello world" на Python и Tkinter -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Python/Tkinter -Comment[sr]=Прави једноставан „Здраво свете“ у Python/Tkinter-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Python/Tkinter-u -Comment[sv]=Detta skapar ett förenklat "Hello world"-program i Python/Tkinter -Comment[tr]=Bu Python/Tkinter'da basit bir "Merhaba Dünya" programı yaratır. -Comment[zh_CN]=这将生成一个简单的 Python/Tkinter 语言“Hello world”程序 -Comment[zh_TW]=產生一個簡單的 Python/Tkinter 的 Hello World 程式 -FileTemplates=py,ShellStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.py -Archive=pytk.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.py -Dest=%{dest}/%{APPNAMELC}.py - -[MSG] -Type=message -Comment=A simple Python/Tkinter script was created in %{dest} -Comment[ca]=Un simple script en Python/Tkinter ha estat creat en %{dest} -Comment[da]=Et simpelt Python/Tkinter script blev oprettet i %{dest} -Comment[de]=Ein einfaches Python/Tkinter-Skript wurde in %{dest} erstellt. -Comment[el]=Ένα απλό σενάριο Python/Tkinter δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo guión en Python/Tkinter ha sido creado en %{dest} -Comment[et]=Lihtne Pythoni/Tkinteri skript loodi asukohta %{dest} -Comment[eu]=Python/Tkinter script sinple bat sortu da hemen: %{dest} -Comment[fa]=یک دست‌نوشتۀ سادۀ پیتون/Tkinter در %{dest} ایجاد شد -Comment[fr]=Un script Python / Tkinter simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh script shimplí Python/Tkinter i %{dest} -Comment[gl]=Creouse un script sinxelo Python/Tkinter en %{dest} -Comment[hu]=Létrejött egy egyszerű Python/Tkinter-szkript itt: %{dest} -Comment[it]=È stato creato un semplice script Python/Tkinter in %{dest} -Comment[ja]=簡単な Python/Tkinter スクリプトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach Python-/Tkinter-Skript opstellt. -Comment[ne]=साधारण पाइथोन/Tkinter स्क्रिप्ट %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig Python/Tkinter-script is aangemaakt in %{dest} -Comment[pl]=Prosty skrypt Python/Tkinter został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples em Python/Tkinter em %{dest} -Comment[pt_BR]=Foi criado um programa simples em Python/Tkinter em %{dest} -Comment[ru]=Простой скрипт Python/Tkinter создан в %{dest} -Comment[sk]=Jednoduchý Python/Tkinter skript bol vytvorený v %{dest} -Comment[sr]=Једноставна Python/Tkinter скрипта направљена је у %{dest} -Comment[sr@Latn]=Jednostavna Python/Tkinter skripta napravljena je u %{dest} -Comment[sv]=Ett enkelt Python/Tkinter-skript skapades i %{dest} -Comment[tr]=Basit Python/Tkinter betiği %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个简单的 Python/Tkinter 脚本 -Comment[zh_TW]=一個簡單的 Python/Tkinter 文稿已建立於 %{dest} diff --git a/languages/python/doc/CMakeLists.txt b/languages/python/doc/CMakeLists.txt index 49cdea0d..a3caa5fd 100644 --- a/languages/python/doc/CMakeLists.txt +++ b/languages/python/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES python.toc python_bugs.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/python/doc/Makefile.am b/languages/python/doc/Makefile.am index 1714c774..5159f5f0 100644 --- a/languages/python/doc/Makefile.am +++ b/languages/python/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = python.toc python_bugs.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/python/file_templates/CMakeLists.txt b/languages/python/file_templates/CMakeLists.txt index efd7a0bf..ddc20b95 100644 --- a/languages/python/file_templates/CMakeLists.txt +++ b/languages/python/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES py - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/python/file_templates/Makefile.am b/languages/python/file_templates/Makefile.am index 9073dd5f..0846fdf2 100644 --- a/languages/python/file_templates/Makefile.am +++ b/languages/python/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = py diff --git a/languages/python/kde_pydoc.py b/languages/python/kde_pydoc.py new file mode 100755 index 00000000..0516f172 --- /dev/null +++ b/languages/python/kde_pydoc.py @@ -0,0 +1,131 @@ +#!/usr/bin/env python +""" +""" + +__author__ = "David Nolden, Ka-Ping Yee " +__version__ = "6 April 2006" + +import sys, imp, os, stat, re, types, cgi +from repr import Repr +from string import expandtabs, find, join, lower, split, strip, rstrip +import pydoc + + + + +def cleanlinks(string): + """Changes the links to work with the pydoc:-notation""" + finalstring = "" + string = str(string).replace(".html","") + pos = 0 + mark = " __maxdepth): + notprocessed.append(path) + return + dir = path + for file in os.listdir(dir): + path = os.path.join(dir, file) + if os.path.isdir(path): + writedocs(path, file + '.' + pkgpath, depth) + if os.path.isfile(path): + writedocs(path, pkgpath, depth) + if os.path.isfile(path): + modname = pydoc.inspect.getmodulename(path) + if modname: + writedoc(pkgpath + modname) + + if(depth == 1): + if(len(notprocessed) != 0): + print "
    the following paths were not processed because they are deeper than the maximum depth of " + str(__maxdepth) + ":
    " + for x in notprocessed: + print cgi.escape(x) + "
    " + +def writedoc(key,top=False): + """Write HTML documentation to a file in the current directory.""" + if(type(key) == str and (key == "modules" or key == "/.")): + heading = pydoc.html.heading( + '
     ' + 'Python: Index of Modules' + '', + '#ffffff', '#7799ee') + builtins = [] + for name in sys.builtin_module_names: + builtins.append('
    %s' % (cgi.escape(name,quote=True), cgi.escape(name))) + indices = ['

    Built-in modules: ' + cgi.escape(join(builtins, ', '))] + seen = {} + for dir in pydoc.pathdirs(): + indices.append(pydoc.html.index(dir, seen)) + print cleanlinks(heading + join(indices)) + return + + if(type(key) != types.ModuleType): + object = pydoc.locate(key) + if(object == None and top): + print "could not locate module/object for key " + \ + cgi.escape(key) + "
    go to index"; + else: + object = key + + if object: + print cleanlinks(pydoc.html.page(pydoc.describe(object), pydoc.html.document(object))) + + + +if __name__ == '__main__': + import getopt + class BadUsage: pass + + try: + opts, args = getopt.getopt(sys.argv[1:], 'k:p:w') + + print "" + print "" + print "" + + if args: + for arg in args: + try: + if os.path.isdir(arg): writedocs(arg) + + if os.path.isfile(arg): + arg = pydoc.importfile(arg) + writedoc(arg, True) + except pydoc.ErrorDuringImport, value: + print 'problem in %s - %s' % ( + cgi.escape(value.filename), cgi.escape(value.exc)) + else: + raise BadUsage + + except (getopt.error, BadUsage): + print "need parameters\n" diff --git a/languages/python/kdevpythonsupport.desktop b/languages/python/kdevpythonsupport.desktop new file mode 100644 index 00000000..61f2ff76 --- /dev/null +++ b/languages/python/kdevpythonsupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Python Support +Comment[ca]=Suport per a Python +Comment[da]=Python-understøttelse +Comment[de]=Unterstützung für Python +Comment[el]=Υποστήριξη Python +Comment[es]=Soporte para Python +Comment[et]=Pythoni toetus +Comment[eu]=Python euskarria +Comment[fa]=پشتیبانی پیتون +Comment[fr]=Prise en charge du langage PYTHON +Comment[ga]=Tacaíocht Python +Comment[gl]=Soporte para Python +Comment[hi]=पायथन समर्थन +Comment[hu]=Python-támogatás +Comment[is]=Python stuðningur +Comment[it]=Supporto per Python +Comment[ja]=Python サポート +Comment[nds]=Ünnerstütten för Python +Comment[ne]=पाइथोन समर्थन +Comment[nl]=Ondersteuning voor Python +Comment[pl]=Obsługa Pythona +Comment[pt]=Suporte a Python +Comment[pt_BR]=Suporte ao Python +Comment[ru]=Поддержка языка Python +Comment[sk]=Python podpora +Comment[sl]=Podpora za Python +Comment[sr]=Подршка за Python +Comment[sr@Latn]=Podrška za Python +Comment[sv]=Python-stöd +Comment[ta]=பைதான் ஆதரவு +Comment[tg]=Ёрӣ намудани забони Python +Comment[tr]=Python Desteği +Comment[zh_CN]=Python 支持 +Comment[zh_TW]=Python 支援 +Name=KDevPythonSupport +Name[da]=TDevelop Python-understøttelse +Name[de]=Unterstützung für Python (TDevelop) +Name[hi]=के-डेव-पायथन-समर्थन +Name[nds]=Python-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaPythona +Name[sk]=KDev Python podpora +Name[sv]=TDevelop Python-stöd +Name[ta]=கெடெவ் பைதான் ஆதரவு +Name[tg]=Ёрӣ намудани забони Python +Name[zh_TW]=TDevelop Python 支援 +GenericName=Python Support +GenericName[ca]=Suport per a Python +GenericName[da]=Python-understøttelse +GenericName[de]=Unterstützung für Python +GenericName[el]=Υποστήριξη Python +GenericName[es]=Soporte para Python +GenericName[et]=Pythoni toetus +GenericName[eu]=Python euskarria +GenericName[fa]=پشتیبانی پیتون +GenericName[fr]=Prise en charge du langage PYTHON +GenericName[ga]=Tacaíocht Python +GenericName[gl]=Soporte para Python +GenericName[hi]=पायथन समर्थन +GenericName[hu]=Python-támogatás +GenericName[it]=Supporto per Python +GenericName[ja]=Python サポート +GenericName[nds]=Ünnerstütten för Python +GenericName[ne]=पाइथोन समर्थन +GenericName[nl]=Ondersteuning voor Python +GenericName[pl]=Obsługa Pythona +GenericName[pt]=Suporte a Python +GenericName[pt_BR]=Suporte ao Python +GenericName[ru]=Поддержка языка Python +GenericName[sk]=Python podpora +GenericName[sl]=Podpora za Python +GenericName[sr]=Подршка за Python +GenericName[sr@Latn]=Podrška za Python +GenericName[sv]=Python-stöd +GenericName[ta]=பைதான் ஆதரவு +GenericName[tg]=Ёрӣ намудани забони Python +GenericName[tr]=Python Desteği +GenericName[zh_CN]=Python 支持 +GenericName[zh_TW]=Python 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevpythonsupport +X-TDevelop-Version=5 +X-TDevelop-Language=Python diff --git a/languages/python/kdevpythonsupport.rc b/languages/python/kdevpythonsupport.rc new file mode 100644 index 00000000..d19011b8 --- /dev/null +++ b/languages/python/kdevpythonsupport.rc @@ -0,0 +1,16 @@ + + + +

    + + + + + + + + + + + + diff --git a/languages/python/pydoc.cpp b/languages/python/pydoc.cpp index 43ceb071..bcb38b1e 100644 --- a/languages/python/pydoc.cpp +++ b/languages/python/pydoc.cpp @@ -20,7 +20,7 @@ PydocProtocol::PydocProtocol(const TQCString &pool, const TQCString &app) : SlaveBase("pydoc", pool, app), key() { python = TDEGlobal::dirs()->findExe("python"); - script = locate("data", "tdeio_pydoc/tde_pydoc.py"); + script = locate("data", "tdeio_pydoc/kde_pydoc.py"); } diff --git a/languages/python/pythonconfigwidget.cpp b/languages/python/pythonconfigwidget.cpp index e6915eac..29103705 100644 --- a/languages/python/pythonconfigwidget.cpp +++ b/languages/python/pythonconfigwidget.cpp @@ -20,8 +20,8 @@ PythonConfigWidget::PythonConfigWidget(TQDomDocument &projectDom, TQWidget *parent, const char *name) : PythonConfigWidgetBase(parent, name), dom(projectDom) { - interpreter_edit->setText(DomUtil::readEntry(dom, "/tdepythonsupport/run/interpreter")); - terminal_box->setChecked(DomUtil::readBoolEntry(dom, "/tdepythonsupport/run/terminal")); + interpreter_edit->setText(DomUtil::readEntry(dom, "/kdevpythonsupport/run/interpreter")); + terminal_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevpythonsupport/run/terminal")); } @@ -31,8 +31,8 @@ PythonConfigWidget::~PythonConfigWidget() void PythonConfigWidget::accept() { - DomUtil::writeEntry(dom, "/tdepythonsupport/run/interpreter", interpreter_edit->text()); - DomUtil::writeBoolEntry(dom, "/tdepythonsupport/run/terminal", terminal_box->isChecked()); + DomUtil::writeEntry(dom, "/kdevpythonsupport/run/interpreter", interpreter_edit->text()); + DomUtil::writeBoolEntry(dom, "/kdevpythonsupport/run/terminal", terminal_box->isChecked()); } #include "pythonconfigwidget.moc" diff --git a/languages/python/pythonimplementationwidget.cpp b/languages/python/pythonimplementationwidget.cpp index b89488ef..de351b8e 100644 --- a/languages/python/pythonimplementationwidget.cpp +++ b/languages/python/pythonimplementationwidget.cpp @@ -30,10 +30,10 @@ #include #include -#include -#include +#include +#include -PythonImplementationWidget::PythonImplementationWidget(TDevLanguageSupport* part, +PythonImplementationWidget::PythonImplementationWidget(KDevLanguageSupport* part, TQWidget* parent, const char* name, bool modal) : ImplementationWidget(part, parent, name, modal) { diff --git a/languages/python/pythonimplementationwidget.h b/languages/python/pythonimplementationwidget.h index bc4a945b..c8e1cbde 100644 --- a/languages/python/pythonimplementationwidget.h +++ b/languages/python/pythonimplementationwidget.h @@ -27,7 +27,7 @@ class PythonImplementationWidget : public ImplementationWidget Q_OBJECT public: - PythonImplementationWidget(TDevLanguageSupport* part, TQWidget* parent = 0, const char* name = 0, bool modal = true); + PythonImplementationWidget(KDevLanguageSupport* part, TQWidget* parent = 0, const char* name = 0, bool modal = true); ~PythonImplementationWidget(); diff --git a/languages/python/pythonsupportpart.cpp b/languages/python/pythonsupportpart.cpp index 279688a6..1f2c7b87 100644 --- a/languages/python/pythonsupportpart.cpp +++ b/languages/python/pythonsupportpart.cpp @@ -12,10 +12,10 @@ #include "pythonsupportpart.h" #include "pythonconfigwidget.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -38,16 +38,16 @@ #include "qtdesignerpythonintegration.h" #include "pythonimplementationwidget.h" -typedef TDevGenericFactory PythonSupportFactory; -static const TDevPluginInfo data("tdepythonsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevpythonsupport, PythonSupportFactory( data ) ) +typedef KDevGenericFactory PythonSupportFactory; +static const KDevPluginInfo data("kdevpythonsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevpythonsupport, PythonSupportFactory( data ) ) PythonSupportPart::PythonSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "PythonSupportPart") + : KDevLanguageSupport(&data, parent, name ? name : "PythonSupportPart") { setInstance(PythonSupportFactory::instance()); - setXMLFile("tdepythonsupport.rc"); + setXMLFile("kdevpythonsupport.rc"); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -100,7 +100,7 @@ void PythonSupportPart::contextMenu(TQPopupMenu *popup, const Context *context) { m_contextFileName = url.fileName(); int id = popup->insertItem(i18n("Create or Select Implementation..."), this, TQT_SLOT(slotCreateSubclass())); - popup->setWhatsThis(id, i18n("Create or select implementation

    Creates or selects a subclass of selected form for use with integrated TDevDesigner.")); + popup->setWhatsThis(id, i18n("Create or select implementation

    Creates or selects a subclass of selected form for use with integrated KDevDesigner.")); } } } @@ -217,7 +217,7 @@ void PythonSupportPart::savedFile(const KURL &fileName) } -TDevLanguageSupport::Features PythonSupportPart::features() +KDevLanguageSupport::Features PythonSupportPart::features() { return Features(Classes | Functions); } @@ -316,7 +316,7 @@ void PythonSupportPart::parse(const TQString &fileName) TQString PythonSupportPart::interpreter() { - TQString prog = DomUtil::readEntry(*projectDom(), "/tdepythonsupport/run/interpreter"); + TQString prog = DomUtil::readEntry(*projectDom(), "/kdevpythonsupport/run/interpreter"); if (prog.isEmpty()) prog = "python"; @@ -326,8 +326,8 @@ TQString PythonSupportPart::interpreter() void PythonSupportPart::startApplication(const TQString &program) { - bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/tdepythonsupport/run/terminal"); - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevpythonsupport/run/terminal"); + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, inTerminal); } @@ -369,9 +369,9 @@ void PythonSupportPart::slotPydoc() } } -TDevDesignerIntegration *PythonSupportPart::designer(KInterfaceDesigner::DesignerType type) +KDevDesignerIntegration *PythonSupportPart::designer(KInterfaceDesigner::DesignerType type) { - TDevDesignerIntegration *des = 0; + KDevDesignerIntegration *des = 0; switch (type) { case KInterfaceDesigner::TQtDesigner: @@ -381,7 +381,7 @@ TDevDesignerIntegration *PythonSupportPart::designer(KInterfaceDesigner::Designe PythonImplementationWidget *impl = new PythonImplementationWidget(this); des = new QtDesignerPythonIntegration(this, impl); des->loadSettings(*project()->projectDom(), - "tdepythonsupport/designerintegration"); + "kdevpythonsupport/designerintegration"); m_designers[type] = des; } break; diff --git a/languages/python/pythonsupportpart.h b/languages/python/pythonsupportpart.h index 873e0934..c60a2eb3 100644 --- a/languages/python/pythonsupportpart.h +++ b/languages/python/pythonsupportpart.h @@ -13,14 +13,14 @@ #define _PYTHONSUPPORTPART_H_ -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" class KDialogBase; class TQStringList; class TQPopupMenu; class Context; -class PythonSupportPart : public TDevLanguageSupport +class PythonSupportPart : public KDevLanguageSupport { Q_OBJECT @@ -29,7 +29,7 @@ public: PythonSupportPart( TQObject *parent, const char *name, const TQStringList & ); ~PythonSupportPart(); - virtual TDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); + virtual KDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); public slots: void contextMenu(TQPopupMenu *popup, const Context *context); @@ -60,7 +60,7 @@ private: void maybeParse(const TQString fileName); void parse(const TQString &fileName); - TQMap m_designers; + TQMap m_designers; TQString m_contextFileName; }; diff --git a/languages/python/qtdesignerpythonintegration.cpp b/languages/python/qtdesignerpythonintegration.cpp index ca8bed51..c1627f18 100644 --- a/languages/python/qtdesignerpythonintegration.cpp +++ b/languages/python/qtdesignerpythonintegration.cpp @@ -31,14 +31,14 @@ #include #include -#include -#include -#include +#include +#include +#include #include "codemodel_utils.h" #include "implementationwidget.h" -QtDesignerPythonIntegration::QtDesignerPythonIntegration(TDevLanguageSupport* part, ImplementationWidget* impl) +QtDesignerPythonIntegration::QtDesignerPythonIntegration(KDevLanguageSupport* part, ImplementationWidget* impl) :QtDesignerIntegration(part, impl, false, 0) { } diff --git a/languages/python/qtdesignerpythonintegration.h b/languages/python/qtdesignerpythonintegration.h index 120e6b47..8b171f17 100644 --- a/languages/python/qtdesignerpythonintegration.h +++ b/languages/python/qtdesignerpythonintegration.h @@ -27,7 +27,7 @@ class QtDesignerPythonIntegration : public QtDesignerIntegration Q_OBJECT public: - QtDesignerPythonIntegration(TDevLanguageSupport* part, ImplementationWidget* impl); + QtDesignerPythonIntegration(KDevLanguageSupport* part, ImplementationWidget* impl); ~QtDesignerPythonIntegration(); diff --git a/languages/python/tde_pydoc.py b/languages/python/tde_pydoc.py deleted file mode 100644 index 0516f172..00000000 --- a/languages/python/tde_pydoc.py +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env python -""" -""" - -__author__ = "David Nolden, Ka-Ping Yee " -__version__ = "6 April 2006" - -import sys, imp, os, stat, re, types, cgi -from repr import Repr -from string import expandtabs, find, join, lower, split, strip, rstrip -import pydoc - - - - -def cleanlinks(string): - """Changes the links to work with the pydoc:-notation""" - finalstring = "" - string = str(string).replace(".html","") - pos = 0 - mark = " __maxdepth): - notprocessed.append(path) - return - dir = path - for file in os.listdir(dir): - path = os.path.join(dir, file) - if os.path.isdir(path): - writedocs(path, file + '.' + pkgpath, depth) - if os.path.isfile(path): - writedocs(path, pkgpath, depth) - if os.path.isfile(path): - modname = pydoc.inspect.getmodulename(path) - if modname: - writedoc(pkgpath + modname) - - if(depth == 1): - if(len(notprocessed) != 0): - print "
    the following paths were not processed because they are deeper than the maximum depth of " + str(__maxdepth) + ":
    " - for x in notprocessed: - print cgi.escape(x) + "
    " - -def writedoc(key,top=False): - """Write HTML documentation to a file in the current directory.""" - if(type(key) == str and (key == "modules" or key == "/.")): - heading = pydoc.html.heading( - '
     ' - 'Python: Index of Modules' - '', - '#ffffff', '#7799ee') - builtins = [] - for name in sys.builtin_module_names: - builtins.append('
    %s' % (cgi.escape(name,quote=True), cgi.escape(name))) - indices = ['

    Built-in modules: ' + cgi.escape(join(builtins, ', '))] - seen = {} - for dir in pydoc.pathdirs(): - indices.append(pydoc.html.index(dir, seen)) - print cleanlinks(heading + join(indices)) - return - - if(type(key) != types.ModuleType): - object = pydoc.locate(key) - if(object == None and top): - print "could not locate module/object for key " + \ - cgi.escape(key) + "
    go to index"; - else: - object = key - - if object: - print cleanlinks(pydoc.html.page(pydoc.describe(object), pydoc.html.document(object))) - - - -if __name__ == '__main__': - import getopt - class BadUsage: pass - - try: - opts, args = getopt.getopt(sys.argv[1:], 'k:p:w') - - print "" - print "" - print "" - - if args: - for arg in args: - try: - if os.path.isdir(arg): writedocs(arg) - - if os.path.isfile(arg): - arg = pydoc.importfile(arg) - writedoc(arg, True) - except pydoc.ErrorDuringImport, value: - print 'problem in %s - %s' % ( - cgi.escape(value.filename), cgi.escape(value.exc)) - else: - raise BadUsage - - except (getopt.error, BadUsage): - print "need parameters\n" diff --git a/languages/python/tdevpythonsupport.desktop b/languages/python/tdevpythonsupport.desktop deleted file mode 100644 index 973604ff..00000000 --- a/languages/python/tdevpythonsupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Python Support -Comment[ca]=Suport per a Python -Comment[da]=Python-understøttelse -Comment[de]=Unterstützung für Python -Comment[el]=Υποστήριξη Python -Comment[es]=Soporte para Python -Comment[et]=Pythoni toetus -Comment[eu]=Python euskarria -Comment[fa]=پشتیبانی پیتون -Comment[fr]=Prise en charge du langage PYTHON -Comment[ga]=Tacaíocht Python -Comment[gl]=Soporte para Python -Comment[hi]=पायथन समर्थन -Comment[hu]=Python-támogatás -Comment[is]=Python stuðningur -Comment[it]=Supporto per Python -Comment[ja]=Python サポート -Comment[nds]=Ünnerstütten för Python -Comment[ne]=पाइथोन समर्थन -Comment[nl]=Ondersteuning voor Python -Comment[pl]=Obsługa Pythona -Comment[pt]=Suporte a Python -Comment[pt_BR]=Suporte ao Python -Comment[ru]=Поддержка языка Python -Comment[sk]=Python podpora -Comment[sl]=Podpora za Python -Comment[sr]=Подршка за Python -Comment[sr@Latn]=Podrška za Python -Comment[sv]=Python-stöd -Comment[ta]=பைதான் ஆதரவு -Comment[tg]=Ёрӣ намудани забони Python -Comment[tr]=Python Desteği -Comment[zh_CN]=Python 支持 -Comment[zh_TW]=Python 支援 -Name=KDevPythonSupport -Name[da]=TDevelop Python-understøttelse -Name[de]=Unterstützung für Python (TDevelop) -Name[hi]=के-डेव-पायथन-समर्थन -Name[nds]=Python-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaPythona -Name[sk]=KDev Python podpora -Name[sv]=TDevelop Python-stöd -Name[ta]=கெடெவ் பைதான் ஆதரவு -Name[tg]=Ёрӣ намудани забони Python -Name[zh_TW]=TDevelop Python 支援 -GenericName=Python Support -GenericName[ca]=Suport per a Python -GenericName[da]=Python-understøttelse -GenericName[de]=Unterstützung für Python -GenericName[el]=Υποστήριξη Python -GenericName[es]=Soporte para Python -GenericName[et]=Pythoni toetus -GenericName[eu]=Python euskarria -GenericName[fa]=پشتیبانی پیتون -GenericName[fr]=Prise en charge du langage PYTHON -GenericName[ga]=Tacaíocht Python -GenericName[gl]=Soporte para Python -GenericName[hi]=पायथन समर्थन -GenericName[hu]=Python-támogatás -GenericName[it]=Supporto per Python -GenericName[ja]=Python サポート -GenericName[nds]=Ünnerstütten för Python -GenericName[ne]=पाइथोन समर्थन -GenericName[nl]=Ondersteuning voor Python -GenericName[pl]=Obsługa Pythona -GenericName[pt]=Suporte a Python -GenericName[pt_BR]=Suporte ao Python -GenericName[ru]=Поддержка языка Python -GenericName[sk]=Python podpora -GenericName[sl]=Podpora za Python -GenericName[sr]=Подршка за Python -GenericName[sr@Latn]=Podrška za Python -GenericName[sv]=Python-stöd -GenericName[ta]=பைதான் ஆதரவு -GenericName[tg]=Ёрӣ намудани забони Python -GenericName[tr]=Python Desteği -GenericName[zh_CN]=Python 支持 -GenericName[zh_TW]=Python 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevpythonsupport -X-TDevelop-Version=5 -X-TDevelop-Language=Python diff --git a/languages/python/tdevpythonsupport.rc b/languages/python/tdevpythonsupport.rc deleted file mode 100644 index d19011b8..00000000 --- a/languages/python/tdevpythonsupport.rc +++ /dev/null @@ -1,16 +0,0 @@ - - - -

    - - - - - - - - - - - - diff --git a/languages/ruby/CMakeLists.txt b/languages/ruby/CMakeLists.txt index 8418c5c9..2f1a231e 100644 --- a/languages/ruby/CMakeLists.txt +++ b/languages/ruby/CMakeLists.txt @@ -33,15 +33,15 @@ link_directories( ##### other data ################################ -install( FILES tdevrubysupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES rubytemplates DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev/templates ) -install( FILES tdevrubysupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevrubysupport ) -install( FILES ruby_config.png ruby_run.png DESTINATION ${DATA_INSTALL_DIR}/tdevrubysupport/pics ) +install( FILES kdevrubysupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES rubytemplates DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev/templates ) +install( FILES kdevrubysupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevrubysupport ) +install( FILES ruby_config.png ruby_run.png DESTINATION ${DATA_INSTALL_DIR}/kdevrubysupport/pics ) -##### libtdevrubysupport (module) ############### +##### libkdevrubysupport (module) ############### -tde_add_kpart( libtdevrubysupport AUTOMOC +tde_add_kpart( libkdevrubysupport AUTOMOC SOURCES rubysupport_part.cpp rubyconfigwidgetbase.ui rubyconfigwidget.cpp qtdesignerrubyintegration.cpp diff --git a/languages/ruby/Makefile.am b/languages/ruby/Makefile.am index 95a632cc..e0a3612b 100644 --- a/languages/ruby/Makefile.am +++ b/languages/ruby/Makefile.am @@ -7,25 +7,25 @@ INCLUDES = -I$(top_srcdir)/languages/lib/designer_integration \ SUBDIRS = app_templates file_templates doc debugger -kde_module_LTLIBRARIES = libtdevrubysupport.la -libtdevrubysupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevrubysupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/languages/lib/designer_integration/libdesignerintegration.la $(top_builddir)/lib/util/libtdevutil.la +kde_module_LTLIBRARIES = libkdevrubysupport.la +libkdevrubysupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevrubysupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/languages/lib/designer_integration/libdesignerintegration.la $(top_builddir)/lib/util/libkdevutil.la -libtdevrubysupport_la_SOURCES = rubysupport_part.cpp rubyconfigwidgetbase.ui \ +libkdevrubysupport_la_SOURCES = rubysupport_part.cpp rubyconfigwidgetbase.ui \ rubyconfigwidget.cpp qtdesignerrubyintegration.cpp rubyimplementationwidget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevrubysupport.desktop +service_DATA = kdevrubysupport.desktop -templatedir = ${kde_datadir}/tdevabbrev/templates +templatedir = ${kde_datadir}/kdevabbrev/templates template_DATA = rubytemplates -rcdir = $(kde_datadir)/tdevrubysupport -rc_DATA = tdevrubysupport.rc +rcdir = $(kde_datadir)/kdevrubysupport +rc_DATA = kdevrubysupport.rc -picsdirdir = $(kde_datadir)/tdevrubysupport/pics +picsdirdir = $(kde_datadir)/kdevrubysupport/pics picsdir_DATA = ruby_config.png ruby_run.png noinst_HEADERS = qtdesignerrubyintegration.h rubyimplementationwidget.h diff --git a/languages/ruby/app_templates/CMakeLists.txt b/languages/ruby/app_templates/CMakeLists.txt index 9e642f8e..1f8c054a 100644 --- a/languages/ruby/app_templates/CMakeLists.txt +++ b/languages/ruby/app_templates/CMakeLists.txt @@ -13,7 +13,7 @@ add_subdirectory( rubyhello ) add_subdirectory( qtruby ) add_subdirectory( qtrubyapp ) add_subdirectory( dcopservice ) -add_subdirectory( tdeapp ) +add_subdirectory( kapp ) add_subdirectory( kxt ) add_subdirectory( rails ) add_subdirectory( qtruby4app ) diff --git a/languages/ruby/app_templates/Makefile.am b/languages/ruby/app_templates/Makefile.am index 9e02a942..3150485b 100644 --- a/languages/ruby/app_templates/Makefile.am +++ b/languages/ruby/app_templates/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = rubyhello qtruby qtrubyapp dcopservice tdeapp kxt rails qtruby4app +SUBDIRS = rubyhello qtruby qtrubyapp dcopservice kapp kxt rails qtruby4app profilesdir = $(kde_datadir)/tdevelop/profiles/IDE/ScriptingLanguageIDE/RubyIDE profiles_DATA = ruby.appwizard diff --git a/languages/ruby/app_templates/dcopservice/CMakeLists.txt b/languages/ruby/app_templates/dcopservice/CMakeLists.txt index c971b3cd..f673e72c 100644 --- a/languages/ruby/app_templates/dcopservice/CMakeLists.txt +++ b/languages/ruby/app_templates/dcopservice/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( dcopserviceruby.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/dcopserviceruby.tar.gz dcopserviceruby.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - dcopserviceruby.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + dcopserviceruby.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/dcopservice/Makefile.am b/languages/ruby/app_templates/dcopservice/Makefile.am index 3d7668ef..a7193d6a 100644 --- a/languages/ruby/app_templates/dcopservice/Makefile.am +++ b/languages/ruby/app_templates/dcopservice/Makefile.am @@ -4,10 +4,10 @@ dataFiles = dcopservice.desktop app.cpp app-configure.in.in \ templateName = dcopserviceruby ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/dcopservice/dcopservice.tdevelop b/languages/ruby/app_templates/dcopservice/dcopservice.tdevelop index a1b10215..437aa315 100644 --- a/languages/ruby/app_templates/dcopservice/dcopservice.tdevelop +++ b/languages/ruby/app_templates/dcopservice/dcopservice.tdevelop @@ -13,22 +13,22 @@ KDE - + src/%{APPNAMELC} - - + + - - + + ada ada_bugs_gcc @@ -63,29 +63,29 @@ qmake User Guide - - + + libtool - - + + - - + + ruby false 3 src/main.rb - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/ruby/app_templates/dcopservice/dcopserviceruby.kdevtemplate b/languages/ruby/app_templates/dcopservice/dcopserviceruby.kdevtemplate new file mode 100644 index 00000000..fbadd4e3 --- /dev/null +++ b/languages/ruby/app_templates/dcopservice/dcopserviceruby.kdevtemplate @@ -0,0 +1,199 @@ +# KDE Config File +[General] +Name=DCOP Service +Name[br]=Servij DCOP +Name[ca]=Servei DCOP +Name[de]=DCOP-Dienst +Name[el]=Υπηρεσία DCOP +Name[es]=Servicio DCOP +Name[et]=DCOP-teenus +Name[eu]=DCOP zerbitzua +Name[fa]=خدمت DCOP +Name[fr]=Service DCOP +Name[ga]=Seirbhís DCOP +Name[gl]=Servizo DCOP +Name[hu]=DCOP-szolgáltatás +Name[it]=Servizio DCOP +Name[ja]=DCOP サービス +Name[nds]=DCOP-Deenst +Name[ne]=DCOP सेवा +Name[nl]=DCOP-service +Name[pl]=Usługa DCOP +Name[pt]=Serviço de DCOP +Name[pt_BR]=Serviço DCOP +Name[ru]=Сервис DCOP +Name[sk]=DCOP služba +Name[sr]=DCOP сервис +Name[sr@Latn]=DCOP servis +Name[sv]=DCOP-tjänst +Name[tr]=DCOP Hizmeti +Name[zh_CN]=DCOP 服务 +Name[zh_TW]=DCOP 服務 +Icon=kdcop.png +Category=Ruby/KDE +Comment=Generates a framework for a KDE DCOP service and client access library. +Comment[ca]=Genera una infraestructura per a un servei DCOP de KDE i la biblioteca d'accés del client. +Comment[da]=Genererer et skelet for en KDE dcop-tjeneste og klientadgangsbibliotek. +Comment[de]=Erstellt das Grundgerüst für einen KDE-DCOP-Dienst und eine Bibliothek für den Client-Zugriff. +Comment[el]=Δημιουργεί ένα πλαίσιο για μια υπηρεσία KDE DCOP και μια βιβλιοθήκη πρόσβασης πελάτη. +Comment[es]=Genera una infraestructura para un servicio DCOP de KDE y una biblioteca de acceso cliente. +Comment[et]=KDE DCOP-teenuse raamistiku ja kliendi ligipääsu teegi loomine. +Comment[eu]=KDE-ren DCOP zerbitzu baterako lan-marko bat eta bezero liburutegi bat sortzen ditu. +Comment[fa]=چارچوبی برای خدمت KDE DCOP و کتابخانۀ دستیابی کارخواه تولید می‌کند. +Comment[fr]=Génère une infrastructure pour un service DCOP KDE et une bibliothèque d'accès client. +Comment[ga]=Cruthaigh creatlach do sheirbhís DCOP KDE agus leabharlann rochtana cliaint. +Comment[gl]=Xera un contorno de traballo para un servizo DCOP de KDE e unha biblioteca de acceso para clientes. +Comment[hu]=Létrehoz egy alap KDE DCOP-szolgáltatást és klienselérési programkönyvtárat. +Comment[it]=Genera l'infrastruttura per un servizio DCOP di KDE e una libreria per l'accesso da client. +Comment[ja]=KDE DCOP サービスとクライアントアクセスライブラリのためのフレームワークを作成します +Comment[nds]=Stellt en Rahmenwark för en KDE-DCOP-Deenst un en Clienttogriep-Bibliotheek op. +Comment[ne]=KDE DCOP सेवा र ग्राहक पहुँच लाइब्रेरीका लागि फ्रेमवर्क उत्पन्न गर्दछ । +Comment[nl]=Genereert een framework voor een KDE DCOP-service- en client-bibliotheek. +Comment[pl]=Generuje schemat dla usługi KDE DCOP i biblioteki dostępu użytkownika. +Comment[pt]=Gera a plataforma para um serviço de DCOP do KDE e a biblioteca de acesso dos clientes. +Comment[pt_BR]=Gera a plataforma para um serviço de DCOP do KDE e a biblioteca de acesso dos clientes. +Comment[ru]=Создание сервиса DCOP и библиотеки клиента. +Comment[sk]=Vygeneruje framework pre KDE DCOP službu a klientskú prístupovú knižnicu. +Comment[sr]=Прави једноставан радни оквир за KDE DCOP сервис и приступну библиотеку клијента. +Comment[sr@Latn]=Pravi jednostavan radni okvir za KDE DCOP servis i pristupnu biblioteku klijenta. +Comment[sv]=Skapar ett ramverk för en KDE DCOP-tjänst och klientåtkomstbibliotek. +Comment[tr]=Bir KDE DCOP hizmeti ve istemci erişim kütüphanesi için bir çatı yaratır. +Comment[zh_CN]=生成一个 KDE DCOP 服务和客户访问库的框架。 +Comment[zh_TW]=產生一個 KDE DCOP 服務的架構,以及客戶端存取的函式庫。 +FileTemplates=rb,ShellStyle +ShowFilesAfterGeneration=%{dest}/src/main.rb +Archive=dcopserviceruby.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/dcopservice.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{src}/app-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/dcopservice.rb +Dest=%{dest}/src/%{APPNAMELC}.rb + +[FILE13] +Type=install +Source=%{src}/dcopservice.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE14] +Type=install +Source=%{src}/main.rb +Dest=%{dest}/src/main.rb + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=A KDE DCOP Service was created in %{dest} +Comment[ca]=Un servei DCOP de KDE ha estat creada en %{dest} +Comment[da]=En KDE DCOP tjeneste blev oprettet i %{dest} +Comment[de]=Ein KDE-DCOP-Dienst wurde in %{dest} erstellt. +Comment[el]=Μια υπηρεσία KDE DCOP δημιουργήθηκε στο %{dest} +Comment[es]=Un servicio DCOP de KDE ha sido creado en %{dest} +Comment[et]=KDE DCOP-teenus loodi asukohta %{dest} +Comment[eu]=KDE-ren DCOP zerbitzu bat sortu da hemen: %{dest} +Comment[fa]=یک خدمت KDE DCOP در %{dest} ایجاد شد +Comment[fr]=Un service DCOP KDE a été créé dans %{dest} +Comment[ga]=Cruthaíodh Seirbhís DCOP KDE i %{dest} +Comment[gl]=Creouse un servizo DCOP de KDE en %{dest} +Comment[hu]=Létrejött egy KDE DCOP-szolgáltatás itt: %{dest} +Comment[it]=È stato creato un servizio DCOP di KDE in %{dest} +Comment[ja]=KDE DCOP サービスを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en KDE-DCOP-Deenst opstellt +Comment[ne]=KDE DCOP सेवा %{dest} मा सिर्जना गरियो +Comment[nl]=Een DCOP-service is aangemaakt in %{dest} +Comment[pl]=Usługa KDE DCOP została utworzona w %{dest} +Comment[pt]=Foi criado um serviço de DCOP do KDE em %{dest} +Comment[pt_BR]=Foi criado um serviço de DCOP do KDE em %{dest} +Comment[ru]=Сервис DCOP создан в %{dest} +Comment[sk]=KDE DCOP služba bola vytvorená v %{dest} +Comment[sl]=Storitev DCOP za KDE je bila ustvarjena v %{dest} +Comment[sr]=KDE DCOP сервис направљен је у %{dest} +Comment[sr@Latn]=KDE DCOP servis napravljen je u %{dest} +Comment[sv]=En KDE DCOP-tjänst skapades i %{dest} +Comment[tr]=Bir KDE DCOP Hizmeti %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了一个 KDE DCOP 服务 +Comment[zh_TW]=KDE DCOP 服務已建立於 %{dest} diff --git a/languages/ruby/app_templates/dcopservice/dcopserviceruby.tdevtemplate b/languages/ruby/app_templates/dcopservice/dcopserviceruby.tdevtemplate deleted file mode 100644 index 0bcb93cb..00000000 --- a/languages/ruby/app_templates/dcopservice/dcopserviceruby.tdevtemplate +++ /dev/null @@ -1,199 +0,0 @@ -# KDE Config File -[General] -Name=DCOP Service -Name[br]=Servij DCOP -Name[ca]=Servei DCOP -Name[de]=DCOP-Dienst -Name[el]=Υπηρεσία DCOP -Name[es]=Servicio DCOP -Name[et]=DCOP-teenus -Name[eu]=DCOP zerbitzua -Name[fa]=خدمت DCOP -Name[fr]=Service DCOP -Name[ga]=Seirbhís DCOP -Name[gl]=Servizo DCOP -Name[hu]=DCOP-szolgáltatás -Name[it]=Servizio DCOP -Name[ja]=DCOP サービス -Name[nds]=DCOP-Deenst -Name[ne]=DCOP सेवा -Name[nl]=DCOP-service -Name[pl]=Usługa DCOP -Name[pt]=Serviço de DCOP -Name[pt_BR]=Serviço DCOP -Name[ru]=Сервис DCOP -Name[sk]=DCOP služba -Name[sr]=DCOP сервис -Name[sr@Latn]=DCOP servis -Name[sv]=DCOP-tjänst -Name[tr]=DCOP Hizmeti -Name[zh_CN]=DCOP 服务 -Name[zh_TW]=DCOP 服務 -Icon=kdcop.png -Category=Ruby/KDE -Comment=Generates a framework for a KDE DCOP service and client access library. -Comment[ca]=Genera una infraestructura per a un servei DCOP de KDE i la biblioteca d'accés del client. -Comment[da]=Genererer et skelet for en KDE dcop-tjeneste og klientadgangsbibliotek. -Comment[de]=Erstellt das Grundgerüst für einen KDE-DCOP-Dienst und eine Bibliothek für den Client-Zugriff. -Comment[el]=Δημιουργεί ένα πλαίσιο για μια υπηρεσία KDE DCOP και μια βιβλιοθήκη πρόσβασης πελάτη. -Comment[es]=Genera una infraestructura para un servicio DCOP de KDE y una biblioteca de acceso cliente. -Comment[et]=KDE DCOP-teenuse raamistiku ja kliendi ligipääsu teegi loomine. -Comment[eu]=KDE-ren DCOP zerbitzu baterako lan-marko bat eta bezero liburutegi bat sortzen ditu. -Comment[fa]=چارچوبی برای خدمت KDE DCOP و کتابخانۀ دستیابی کارخواه تولید می‌کند. -Comment[fr]=Génère une infrastructure pour un service DCOP KDE et une bibliothèque d'accès client. -Comment[ga]=Cruthaigh creatlach do sheirbhís DCOP KDE agus leabharlann rochtana cliaint. -Comment[gl]=Xera un contorno de traballo para un servizo DCOP de KDE e unha biblioteca de acceso para clientes. -Comment[hu]=Létrehoz egy alap KDE DCOP-szolgáltatást és klienselérési programkönyvtárat. -Comment[it]=Genera l'infrastruttura per un servizio DCOP di KDE e una libreria per l'accesso da client. -Comment[ja]=KDE DCOP サービスとクライアントアクセスライブラリのためのフレームワークを作成します -Comment[nds]=Stellt en Rahmenwark för en KDE-DCOP-Deenst un en Clienttogriep-Bibliotheek op. -Comment[ne]=KDE DCOP सेवा र ग्राहक पहुँच लाइब्रेरीका लागि फ्रेमवर्क उत्पन्न गर्दछ । -Comment[nl]=Genereert een framework voor een KDE DCOP-service- en client-bibliotheek. -Comment[pl]=Generuje schemat dla usługi KDE DCOP i biblioteki dostępu użytkownika. -Comment[pt]=Gera a plataforma para um serviço de DCOP do KDE e a biblioteca de acesso dos clientes. -Comment[pt_BR]=Gera a plataforma para um serviço de DCOP do KDE e a biblioteca de acesso dos clientes. -Comment[ru]=Создание сервиса DCOP и библиотеки клиента. -Comment[sk]=Vygeneruje framework pre KDE DCOP službu a klientskú prístupovú knižnicu. -Comment[sr]=Прави једноставан радни оквир за KDE DCOP сервис и приступну библиотеку клијента. -Comment[sr@Latn]=Pravi jednostavan radni okvir za KDE DCOP servis i pristupnu biblioteku klijenta. -Comment[sv]=Skapar ett ramverk för en KDE DCOP-tjänst och klientåtkomstbibliotek. -Comment[tr]=Bir KDE DCOP hizmeti ve istemci erişim kütüphanesi için bir çatı yaratır. -Comment[zh_CN]=生成一个 KDE DCOP 服务和客户访问库的框架。 -Comment[zh_TW]=產生一個 KDE DCOP 服務的架構,以及客戶端存取的函式庫。 -FileTemplates=rb,ShellStyle -ShowFilesAfterGeneration=%{dest}/src/main.rb -Archive=dcopserviceruby.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/dcopservice.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{src}/app-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/dcopservice.rb -Dest=%{dest}/src/%{APPNAMELC}.rb - -[FILE13] -Type=install -Source=%{src}/dcopservice.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE14] -Type=install -Source=%{src}/main.rb -Dest=%{dest}/src/main.rb - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=A KDE DCOP Service was created in %{dest} -Comment[ca]=Un servei DCOP de KDE ha estat creada en %{dest} -Comment[da]=En KDE DCOP tjeneste blev oprettet i %{dest} -Comment[de]=Ein KDE-DCOP-Dienst wurde in %{dest} erstellt. -Comment[el]=Μια υπηρεσία KDE DCOP δημιουργήθηκε στο %{dest} -Comment[es]=Un servicio DCOP de KDE ha sido creado en %{dest} -Comment[et]=KDE DCOP-teenus loodi asukohta %{dest} -Comment[eu]=KDE-ren DCOP zerbitzu bat sortu da hemen: %{dest} -Comment[fa]=یک خدمت KDE DCOP در %{dest} ایجاد شد -Comment[fr]=Un service DCOP KDE a été créé dans %{dest} -Comment[ga]=Cruthaíodh Seirbhís DCOP KDE i %{dest} -Comment[gl]=Creouse un servizo DCOP de KDE en %{dest} -Comment[hu]=Létrejött egy KDE DCOP-szolgáltatás itt: %{dest} -Comment[it]=È stato creato un servizio DCOP di KDE in %{dest} -Comment[ja]=KDE DCOP サービスを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en KDE-DCOP-Deenst opstellt -Comment[ne]=KDE DCOP सेवा %{dest} मा सिर्जना गरियो -Comment[nl]=Een DCOP-service is aangemaakt in %{dest} -Comment[pl]=Usługa KDE DCOP została utworzona w %{dest} -Comment[pt]=Foi criado um serviço de DCOP do KDE em %{dest} -Comment[pt_BR]=Foi criado um serviço de DCOP do KDE em %{dest} -Comment[ru]=Сервис DCOP создан в %{dest} -Comment[sk]=KDE DCOP služba bola vytvorená v %{dest} -Comment[sl]=Storitev DCOP za KDE je bila ustvarjena v %{dest} -Comment[sr]=KDE DCOP сервис направљен је у %{dest} -Comment[sr@Latn]=KDE DCOP servis napravljen je u %{dest} -Comment[sv]=En KDE DCOP-tjänst skapades i %{dest} -Comment[tr]=Bir KDE DCOP Hizmeti %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了一个 KDE DCOP 服务 -Comment[zh_TW]=KDE DCOP 服務已建立於 %{dest} diff --git a/languages/ruby/app_templates/kapp/CMakeLists.txt b/languages/ruby/app_templates/kapp/CMakeLists.txt new file mode 100644 index 00000000..6817278b --- /dev/null +++ b/languages/ruby/app_templates/kapp/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_custom_target( kappruby.tar.gz ALL + COMMAND tar zcf kappruby.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + app_client.rb appiface.rb app.rb appview.rb main.rb pref.rb + app.cpp appui.rc app.desktop app.tdevelop app-Makefile.am + app-configure.in.in src-Makefile.am subdirs README +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kappruby.tar.gz kappruby.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kappruby.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/kapp/Makefile.am b/languages/ruby/app_templates/kapp/Makefile.am new file mode 100644 index 00000000..9dbc37b5 --- /dev/null +++ b/languages/ruby/app_templates/kapp/Makefile.am @@ -0,0 +1,19 @@ +dataFiles = app_client.rb appiface.rb app.rb appview.rb main.rb pref.rb app.cpp \ + appui.rc app.desktop app.tdevelop app-Makefile.am app-configure.in.in \ + src-Makefile.am subdirs README + +templateName = kappruby + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz diff --git a/languages/ruby/app_templates/kapp/README b/languages/ruby/app_templates/kapp/README new file mode 100644 index 00000000..39de8b2f --- /dev/null +++ b/languages/ruby/app_templates/kapp/README @@ -0,0 +1,81 @@ +----------------------------------------------- +Kde application framework template quickstart +Author: Thomas Nagy +Date: 2004-03-22 +----------------------------------------------- + +This README file explains you basic things for starting with +this application template. + + +** Building and installing ** + +* Build the configure script by "make -f Makefile.cvs" + +* To clean, use "make clean", and to clean everything +(remove the makefiles, etc), use "make distclean" + +* To distribute your program, try "make dist". +This will make a compact tarball archive of your release with the +necessary scripts inside. + +* Modifying the auto-tools scripts +for automake scripts there is an excellent tutorial there : +http://developer.kde.org/documentation/other/makefile_am_howto.html + +* Simplify your life : install the project in your home directory for +testing purposes. +./configure --prefix=/home/user/dummyfolder/ +In the end when you finished the development you can +rm -rf /home/user/dummyfolder/ +without fear. + + +** Technologies ** + +* Build the menus of your application easily +kde applications now use an xml file (*ui.rc file) to build the menus. +This allow a great customization of the application. However, when +programming the menu is shown only after a "make install" + +For more details, consult : +http://devel-home.kde.org/~larrosa/tutorial/p9.html +http://developer.kde.org/documentation/tutorials/xmlui/preface.html + +* Use TDEConfig XT to create your configuration dialogs and make +them more maintainable. + +For more details, consult : +http://developer.kde.org/documentation/tutorials/tdeconfigxt/tdeconfigxt.html + +* With KParts, you can embed other kde components in your program, or make your program +embeddable in other apps. For example, the kmplayer kpart can be called to play videos +in your app. + +For more details, consult : +http://www-106.ibm.com/developerworks/library/l-tdeparts/ +http://developer.kde.org/documentation/tutorials/dot/writing-plugins.html +http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html + +* With dcop, you can control your app from other applications +Make sure to include K_DCOP and a kdcop: section in your .h file +http://developer.kde.org/documentation/tutorials/dot/dcopiface/dcop-interface.html + + +** Documentation ** + +* For the translations : +1. Download a patched gettext which can be found at: + http://public.kde.planetmirror.com/pub/kde/devel/gettext-kde/ +2. Install that gettext in ~/bin/ +3. cd ~/yourproject, export PATH=~/bin:$PATH, export +TDEDIR=/where_your_KDE3_is +4. make -f admin/Makefile.common package-messages +5. make package-messages +6. Translate the po files (not the pot!!) with kbabel or xemacs + +* Do not forget to write the documentation for your kde app +edit the documentation template index.docbook in doc/ + + + diff --git a/languages/ruby/app_templates/kapp/app-Makefile.am b/languages/ruby/app_templates/kapp/app-Makefile.am new file mode 100644 index 00000000..bfe1c599 --- /dev/null +++ b/languages/ruby/app_templates/kapp/app-Makefile.am @@ -0,0 +1 @@ +SUBDIRS = $(TOPSUBDIRS) diff --git a/languages/ruby/app_templates/kapp/app-configure.in.in b/languages/ruby/app_templates/kapp/app-configure.in.in new file mode 100644 index 00000000..7d849466 --- /dev/null +++ b/languages/ruby/app_templates/kapp/app-configure.in.in @@ -0,0 +1,45 @@ +#MIN_CONFIG(3.0.0) + +AM_INIT_AUTOMAKE(%{APPNAMELC}, 0.1) +AC_C_BIGENDIAN +AC_CHECK_KDEMAXPATHLEN + +AC_PROG_MAKE_SET + +AC_CHECK_PROG(RUBY, ruby, ruby) + +if test -z "$RUBY"; then + DO_NOT_COMPILE="$DO_NOT_COMPILE qtruby" +else + AC_MSG_CHECKING(for ruby dirs) + RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'` + RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'` + RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'` + RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'` + RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` + AC_MSG_RESULT([archdir $RUBY_ARCHDIR, sitearchdir $RUBY_SITEARCHDIR, sitedir $RUBY_SITEDIR, libdir $RUBY_LIBDIR, librubyarg $RUBY_LIBRUBYARG]) + AC_SUBST(RUBY_ARCHDIR) + AC_SUBST(RUBY_SITEARCHDIR) + AC_SUBST(RUBY_SITEDIR) + AC_SUBST(RUBY_LIBDIR) + AC_SUBST(RUBY_LIBRUBYARG) +fi + +# Korundum check +AC_MSG_CHECKING([whether Korundum is installed]) +korundum_present=no +cat >korundumtest.rb </dev/null 2>&1 && korundum_present=yes +AC_MSG_RESULT([$korundum_present]) + +# rbuic check +AC_PATH_PROG([RBUIC],[rbuic]) +if test -z "${RBUIC}" ; then + AC_MSG_ERROR([cannot find rbuic (part of the QtRuby package)]) +fi +AC_SUBST([RBUIC]) +AC_SUBST([RUBY]) + + diff --git a/languages/ruby/app_templates/kapp/app.cpp b/languages/ruby/app_templates/kapp/app.cpp new file mode 100644 index 00000000..04770335 --- /dev/null +++ b/languages/ruby/app_templates/kapp/app.cpp @@ -0,0 +1,30 @@ +#include + +#include +#include +#include +#include + +int main(int argc, char **argv) { + TDEInstance * instance = new TDEInstance("%{APPNAMELC}"); + TQString appdir = ::locate("data", "%{APPNAMELC}/main.rb", instance); + delete instance; + if (appdir.isNull()) { + tqFatal("Error: Can't find \"%{APPNAMELC}/main.rb\"\n"); + } + TQFileInfo program(appdir); + + char ** rubyargs = (char **) calloc(argc+4, sizeof(char *)); + rubyargs[0] = strdup(argv[0]); + rubyargs[1] = strdup("-KU"); + rubyargs[2] = strdup(TQString("-C%1").arg(program.dirPath()).latin1()); + rubyargs[3] = strdup(TQString("-I%1").arg(program.dirPath()).latin1()); + rubyargs[4] = strdup(program.fileName().latin1()); + for (int i = 1; i < argc; i++) { + rubyargs[i+4] = argv[i]; + } + + ruby_init(); + ruby_options(argc+4, rubyargs); + ruby_run(); +} diff --git a/languages/ruby/app_templates/kapp/app.desktop b/languages/ruby/app_templates/kapp/app.desktop new file mode 100644 index 00000000..4587fd3c --- /dev/null +++ b/languages/ruby/app_templates/kapp/app.desktop @@ -0,0 +1,44 @@ +[Desktop Entry] +Name=%{APPNAME} +Exec=ruby %{APPNAMELC}/main.rb %i -caption "%c" +Icon=%{APPNAMELC} +Type=Application +DocPath=%{APPNAMELC}/%{APPNAMELC}.html +Comment=A TDE KPart Application +Comment[br]=Ur meziant Kpart evit TDE +Comment[ca]=Una aplicació KPart per al TDE +Comment[cy]=Cymhwysiad KPart TDE +Comment[da]=Et TDE KPart-program +Comment[de]=Eine auf der Komponententechnik KPart basierende TDE-Anwendung +Comment[el]=Μια εφαρμογή KPart του TDE +Comment[es]=Una aplicación KPart de TDE +Comment[et]=TDE KPart rakendus +Comment[eu]=TDE KPart aplikazio bat +Comment[fa]=یک کاربرد TDE KPart +Comment[fr]=Une application KPart pour TDE +Comment[ga]=Feidhmchlár KPart TDE +Comment[gl]=Unha aplicación KPart de TDE +Comment[hi]=एक केडीई के-पार्ट अनुप्रयोग +Comment[hu]=KPart-alapú TDE-alkalmazás +Comment[is]=TDE KPart forrit +Comment[it]=Applicazione KPart di TDE +Comment[ja]=TDE KPart アプリケーション +Comment[lt]=TDE KPart programa +Comment[nds]=En KPart-Deelprogramm för TDE +Comment[ne]=एउटा केडीई KPart अनुप्रयोग +Comment[nl]=Een TDE KPart-toepassing +Comment[pl]=Osadzalny element KPart TDE +Comment[pt]=Uma Aplicação KPart do TDE +Comment[pt_BR]=Um Aplicativo KPart do TDE +Comment[ru]=Приложение KPart для TDE +Comment[sk]=TDE KPart aplikácia +Comment[sl]=Program KPart za TDE +Comment[sr]=TDE KPart програм +Comment[sr@Latn]=TDE KPart program +Comment[sv]=Ett TDE Kpart-program +Comment[ta]=கெடி கெபார்ட் பயன்பாடு +Comment[tg]=Ба кор андохтани KPart барои TDE +Comment[tr]=Bir TDE KPart Uygulaması +Comment[zh_CN]=一个 TDE KPart 应用程序 +Comment[zh_TW]=TDE KPart 應用程式 +Terminal=false diff --git a/languages/ruby/app_templates/kapp/app.rb b/languages/ruby/app_templates/kapp/app.rb new file mode 100644 index 00000000..61531be2 --- /dev/null +++ b/languages/ruby/app_templates/kapp/app.rb @@ -0,0 +1,216 @@ +=begin + This class serves as the main window for %{APPNAME}. It handles the + menus, toolbars, and status bars. + + @short Main window class + @author %{AUTHOR} <%{EMAIL}> + @version %{VERSION} +=end + +class %{APPNAMESC} < KDE::MainWindow + + Q_SLOTS 'fileNew()', + 'fileOpen()', + 'fileSave()', + 'fileSaveAs()', + 'filePrint()', + 'optionsPreferences()', + 'changeStatusbar(const QString&)', + 'changeCaption(const QString&)' + + def initialize() + super( nil, "%{APPNAMESC}" ) + @view = %{APPNAMESC}View.new(self) + @printer = nil + # accept dnd + setAcceptDrops(true) + + # tell the KDE::MainWindow that this is indeed the main widget + setCentralWidget(@view) + + # then, setup our actions + setupActions() + + # and a status bar + statusBar().show() + + # Apply the create the main window and ask the mainwindow to + # automatically save settings if changed: window size, toolbar + # position, icon size, etc. Also to add actions for the statusbar + # toolbar, and keybindings if necessary. + setupGUI(); + + # allow the view to change the statusbar and caption + connect(@view, SIGNAL('signalChangeStatusbar(const QString&)'), + self, SLOT('changeStatusbar(const QString&)')) + connect(@view, SIGNAL('signalChangeCaption(const QString&)'), + self, SLOT('changeCaption(const QString&)')) + + end + + + def load(url) + target = "" + # the below code is what you should normally do. in this + # example when, we want the url to our own. you probably + # want to use this code instead for your app + + if false + # download the contents + if TDEIO::NetAccess.download(url, target, self) + # set our caption + setCaption(url.url) + + # load in the file (target is always local) + @view.openURL(KDE::URL.new(target)) + + # and remove the temp file + TDEIO::NetAccess.removeTempFile(target) + end + end + + setCaption(url.prettyURL()) + @view.openURL(url) + end + + def setupActions() + KDE::StdAction.openNew(self, SLOT('fileNew()'), actionCollection()) + KDE::StdAction.open(self, SLOT('fileOpen()'), actionCollection()) + KDE::StdAction.save(self, SLOT('fileSave()'), actionCollection()) + KDE::StdAction.saveAs(self, SLOT('fileSaveAs()'), actionCollection()) + KDE::StdAction.print(self, SLOT('filePrint()'), actionCollection()) + KDE::StdAction.quit($kapp, SLOT('quit()'), actionCollection()) + + KDE::StdAction.preferences(self, SLOT('optionsPreferences()'), actionCollection()) + + # this doesn't do anything useful. it's just here to illustrate + # how to insert a custom menu and menu item + custom = KDE::Action.new(i18n("Cus&tom Menuitem"), KDE::Shortcut.new(), + self, SLOT('optionsPreferences()'), + actionCollection(), "custom_action") + end + + def saveProperties(config) + # the 'config' object points to the session managed + # config file. anything you write here will be available + # later when this app is restored + + if !@view.currentURL().empty? + config.writeEntry("lastURL", @view.currentURL()) + end + end + + def readProperties(config) + # the 'config' object points to the session managed + # config file. This function is automatically called whenever + # the app is being restored. read in here whatever you wrote + # in 'saveProperties' + + url = config.readPathEntry("lastURL") + + if !url.empty? + @view.openURL(KDE::URL.new(url)) + end + end + + def dragEnterEvent(event) + # accept uri drops only + event.accept(KDE::URLDrag.canDecode(event)) + end + + def dropEvent(event) + # This is a very simplistic implementation of a drop event. we + # will only accept a dropped URL. the Qt dnd code can do *much* + # much more, so please read the docs there + urls = [] + + # see if we can decode a URI.. if not, just ignore it + if KDE::URLDrag.decode(event, urls) && !urls.empty? + # okay, we have a URI.. process it + url = urls.shift + + # load in the file + load(url) + end + end + + def fileNew() + # This slot is called whenever the File.New menu is selected, + # the New shortcut is pressed (usually CTRL+N) or the New toolbar + # button is clicked + + # create a new window + %{APPNAMESC}.new.show() + end + + def fileOpen() + # This slot is called whenever the File.Open menu is selected, + # the Open shortcut is pressed (usually CTRL+O) or the Open toolbar + # button is clicked + + # This brings up the generic open dialog + url = KDE::URLRequesterDlg.getURL(nil, self, i18n("Open Location") ) + + # standard filedialog + url = KDE::FileDialog.getOpenURL(nil, nil, self, i18n("Open Location")) + if !url.empty? + @view.openURL(url) + end + end + + def fileSave() + # This slot is called whenever the File.Save menu is selected, + # the Save shortcut is pressed (usually CTRL+S) or the Save toolbar + # button is clicked + + # save the current file + end + + def fileSaveAs() + # This slot is called whenever the File.Save As menu is selected, + file_url = KDE::FileDialog.getSaveURL() + if !file_url.empty? && file_url.valid? + # save your info, here + end + end + + def filePrint() + # This slot is called whenever the File.Print menu is selected, + # the Print shortcut is pressed (usually CTRL+P) or the Print toolbar + # button is clicked + if @printer.nil? then @printer = KDE::Printer.new end + if @printer.setup(self) + # setup the printer. with Qt, you always "print" to a + # Qt::Painter.. whether the output medium is a pixmap, a screen, + # or paper + p = Qt::Painter.new + p.begin(@printer) + + # we let our view do the actual printing + metrics = Qt::PaintDeviceMetrics.new(@printer) + @view.print(p, metrics.height(), metrics.width()) + + # and send the result to the printer + p.end() + end + end + + def optionsPreferences() + # popup some sort of preference dialog, here + dlg = %{APPNAMESC}Preferences.new + if dlg.exec() + # redo your settings + end + end + + def changeStatusbar(text) + # display the text on the statusbar + statusBar().message(text) + end + + def changeCaption(text) + # display the text on the caption + setCaption(text) + end + +end diff --git a/languages/ruby/app_templates/kapp/app.tdevelop b/languages/ruby/app_templates/kapp/app.tdevelop new file mode 100644 index 00000000..5c57b8fb --- /dev/null +++ b/languages/ruby/app_templates/kapp/app.tdevelop @@ -0,0 +1,90 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevAutoProject + Ruby + + Ruby + Qt + KDE + + + KDevDoxygen + KDevdistpart + KDevVisualBoyAdvance + KDevDebugger + + + + + + + + src/%{APPNAMELC} + + + + + false + CVS,.svn + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + c++_bugs_gcc + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + libc + libstdc++ + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + sdl + stl + w3c-svg + sw + w3c-uaag10 + wxwindows_bugs + + + + + + + + + + + ruby + false + 3 + src/main.rb + + + diff --git a/languages/ruby/app_templates/kapp/app_client.rb b/languages/ruby/app_templates/kapp/app_client.rb new file mode 100644 index 00000000..b08e9b21 --- /dev/null +++ b/languages/ruby/app_templates/kapp/app_client.rb @@ -0,0 +1,18 @@ +require 'Korundum' +include KDE + +about = AboutData.new("%{APPNAMELC}_client", "%{APPNAME} client", "0.1") +CmdLineArgs.init(ARGV, about) + +app = Application.new + +# get our DCOP client and attach so that we may use it +client = app.dcopClient +client.attach + +# do a 'send' for now +dcopRef = DCOPRef.new("%{APPNAMELC}", "%{APPNAMESC}Iface") +dcopRef.openURL("http://www.kde.org") + +app.exec + diff --git a/languages/ruby/app_templates/kapp/appiface.rb b/languages/ruby/app_templates/kapp/appiface.rb new file mode 100644 index 00000000..a8be16b5 --- /dev/null +++ b/languages/ruby/app_templates/kapp/appiface.rb @@ -0,0 +1,14 @@ +class %{APPNAMESC}Iface < KDE::DCOPObject + + k_dcop 'void openURL(QString)' + + def initialize(app) + super("%{APPNAMESC}Iface") + @app = app + end + + def openURL(url) + @app.openURL(url) + end +end + diff --git a/languages/ruby/app_templates/kapp/appui.rc b/languages/ruby/app_templates/kapp/appui.rc new file mode 100644 index 00000000..ceb4f14e --- /dev/null +++ b/languages/ruby/app_templates/kapp/appui.rc @@ -0,0 +1,8 @@ + + + + C&ustom + + + + diff --git a/languages/ruby/app_templates/kapp/appview.rb b/languages/ruby/app_templates/kapp/appview.rb new file mode 100644 index 00000000..e7aabe3c --- /dev/null +++ b/languages/ruby/app_templates/kapp/appview.rb @@ -0,0 +1,103 @@ + +=begin + This is the main view class for %{APPNAME}. Most of the non-menu, + non-toolbar, and non-statusbar (e.g., non frame) GUI code should go + here. + + This %{APPNAMELC} uses an HTML component as an example. + + @short Main view + @author %{AUTHOR} <%{EMAIL}> + @version %{VERSION} +=end +class %{APPNAMESC}View < Qt::Widget + + # + # Use this signal to change the content of the statusbar + # + Q_SIGNALS 'signalChangeStatusbar(const QString&)' + + # + # Use this signal to change the content of the caption + # + Q_SIGNALS 'signalChangeCaption(const QString&)' + + Q_SLOTS 'slotOnURL(const QString&)', + 'slotSetTitle(const QString&)' + + def initialize(parent) + super(parent) + + # keep a reference to the DCOP Interface so it doesn't get gc'd + @dcop = %{APPNAMESC}Iface.new(self) + + # setup our layout manager to automatically add our widgets + top_layout = Qt::HBoxLayout.new(self) + top_layout.setAutoAdd(true) + + # we want to look for all components that satisfy our needs. the + # trader will actually search through *all* registered KDE + # applications and components -- not just KParts. So we have to + # specify two things: a service type and a constraint + # + # the service type is like a mime type. we say that we want all + # applications and components that can handle HTML -- 'text/html' + # + # however, by itself, this will return such things as Netscape.. + # not what we wanted. so we constrain it by saying that the + # string 'KParts/ReadOnlyPart' must be found in the ServiceTypes + # field. with this, only components of the type we want will be + # returned. + offers = KDE::Trader.self().query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes") + + factory = nil + # in theory, we only care about the first one.. but let's try all + # offers just in when the first can't be loaded for some reason + offers.each do |ptr| + # we now know that our offer can handle HTML and is a part. + # since it is a part, it must also have a library... let's try to + # load that now + factory = KDE::LibLoader.self().factory( ptr.library() ) + if ! factory.nil? + @html = factory.create(self, ptr.name(), "KParts::ReadOnlyPart") + break + end + end + + # if our factory is invalid, then we never found our component + # and we might as well just exit now + if factory.nil? + KDE::MessageBox.error(self, i18n("Could not find a suitable HTML component")) + return + end + + connect(@html, SIGNAL('setWindowCaption(const QString&)'), + self, SLOT('slotSetTitle(const QString&)')) + connect(@html, SIGNAL('setStatusBarText(const QString&)'), + self, SLOT('slotOnURL(const QString&)')) + + end + + + def print(p, height, width) + # do the actual printing, here + # p.drawText(etc..) + end + + def currentURL() + return @html.url().url() + end + + def openURL(url) + @html.openURL(KDE::URL.new(url)) + end + + def slotOnURL(url) + emit signalChangeStatusbar(url) + end + + def slotSetTitle(title) + emit signalChangeCaption(title) + end + +end diff --git a/languages/ruby/app_templates/kapp/kappruby.kdevtemplate b/languages/ruby/app_templates/kapp/kappruby.kdevtemplate new file mode 100644 index 00000000..368e0705 --- /dev/null +++ b/languages/ruby/app_templates/kapp/kappruby.kdevtemplate @@ -0,0 +1,238 @@ +# KDE Config File +[General] +Name=Application framework +Name[ca]=Infraestructura d'aplicacions +Name[da]=Programskelet +Name[de]=Anwendungsgrundgerüst +Name[el]=Πλαίσιο εφαρμογής +Name[es]=Infraestructura de aplicación +Name[et]=Rakenduse raamistik +Name[eu]=Aplikazioen lan-markoa +Name[fa]=چارچوب کاربرد +Name[fr]=Infrastructure d'application +Name[ga]=Creatlach feidhmchláir +Name[gl]=Entorno de traballo para aplicación +Name[hu]=Alkalmazás-keretrendszer +Name[it]=Infrastruttura applicativa +Name[ja]=アプリケーションフレームワーク +Name[nds]=Programmrahmenwark +Name[ne]=अनुप्रयोग फ्रेमवर्क +Name[nl]=Applicationframework +Name[pl]=Szablon programu +Name[pt]=Plataforma de aplicações +Name[pt_BR]=Plataforma de aplicações +Name[ru]=Приложение KDE +Name[sk]=Aplikačný framework +Name[sl]=Ogrodje programa +Name[sr]=Радни оквир програма +Name[sr@Latn]=Radni okvir programa +Name[sv]=Programramverk +Name[tr]=Uygulama Çatısı +Name[zh_CN]=应用程序框架 +Name[zh_TW]=應用程式框架 +Icon=kapp.png +Category=Ruby/KDE +Comment=Generates a simple Korundum application with one toplevel window, menus and toolbars. A DCOP interface is also provided, so that your application can provide a scripting interface +Comment[ca]=Genera una simple aplicació Korundum amb una finestra principal, menús i barres d'eines. També es proveeix la interfície DCOP, de manera que la vostra aplicació podrà proveir d'una interfície per a scripts +Comment[da]=Generere et simpelt Korundum program med et vindue på topniveau, menuer og værktøjslinjer. Der sørges også for en DCOP-grænseflade, så dit program kan give en script-grænseflade +Comment[de]=Erstellt eine einfache Korundum-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. Dazu kommt eine DCOP-Schnittstelle, so dass Ihre Anwendung eine Schnittstelle für Skripte anbieten kann. +Comment[el]=Δημιουργεί μια απλή εφαρμογή Korundum με ένα ανώτερο παράθυρο, μενού και γραμμές εργαλείων. Προσφέρεται επίσης μια διασύνδεση DCOP, έτσι ώστε η εφαρμογή σας να προσφέρει ένα περιβάλλον γραφής σεναρίων +Comment[es]=Genera una sencilla aplicación Korundum con una ventana principal, menús y barras de herramientas. También se proporciona una interfaz DCOP para que su aplicación pueda proporcionar una interfaz para guiones de órdenes. +Comment[et]=Lihtsa Korundumi rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. Lisatakse ka DCOP-liides, mis võimaldab rakendusel pakkuda skriptikeelte toetust +Comment[eu]=Goi-mailako lehio bat, menuak eta tresna-barrak dituen Korundum aplikazio sinple bat sortzen du . DCOP interfazea ere sortzen du, eta beraz, zure aplikazioak script-interfaze bat eskainiko du +Comment[fa]=یک کاربرد سادۀ Korundum با یک پنجرۀ سطح بالا، گزینگان و میله ابزارها تولید می‌کند. همچنین یک واسط DCOP فراهم است. بنابراین، کاربرد شما یک واسط دست‌نوشته‌ای را می‌تواند فراهم کند +Comment[fr]=Génère une application Korundum simple comprenant une fenêtre de premier niveau, des menus et des barres d'outils. Une interface DCOP est également fournie, afin que votre application puisse offrir une interface de scriptage +Comment[gl]=Xera unha aplicación sinxela Korundum cunha fiestra, menús e barras de ferramentas. Proporciónase tamén unha interface DCOP de modo que a súa aplicación poida ofrecer unha interface de scripting. +Comment[hu]=Létrehoz egy egyszerű Korundum-alkalmazást egy főablakkal, menükkel és eszköztárakkal. DCOP-felület is tartozik az alkalmazáshoz, így könnyen kialakítható hozzá szkriptelési felület. +Comment[it]=Genera una semplice applicazione Korundum con una finestra toplevel, menu e barre degli strumenti. È anche fornita un'interfaccia DCOP, così che l'applicazione può fornire una interfaccia di scripting +Comment[nds]=Stellt en eenfach Korundum-Programm mit een böverst Finster, Menüs un Warktüüchbalkens op. Ok warrt noch en DCOP-Koppelsteed praatstellt, so dat Dien Programm en Skriptkoppelsteed anbeden kann. +Comment[ne]=एउटा उच्च तह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण Korundum अनुप्रयोग उत्पन्न गर्दछ । DCOP इन्टरफेस पनि प्रदान गरिन्छ, जसले गर्दा तपाईँको अनुप्रयोगले स्क्रिप्टिङ इन्टरफेस प्रदान गर्न सक्छ । +Comment[nl]=Dit genereert een eenvoudige Korundum-toepassing met één toplevel window, menu's en toolbars. Een DCOP-interface wordt ook aangeleverd, zodat uw toepassing een scripting interface kan aanleveren. +Comment[pl]=Generuje prosty program Korundum z jednym oknem, menu i paskami narzędzi. Dostępny jest także interfejs DCOP, więc Twój program może umożliwiać korzystanie ze skryptów +Comment[pt]=Gera uma aplicação Korundum simples com uma janela de topo, menus e barras de ferramentas. Também é fornecida uma interface de DCOP, para que a sua aplicação possa oferecer uma interface de programação +Comment[pt_BR]=Gera uma aplicação Korundum simples com uma janela de topo, menus e barras de ferramentas. Também é fornecida uma interface de DCOP, para que a sua aplicação possa oferecer uma interface de programação +Comment[ru]=Создание простого приложения Korundum с окном, меню, панелями инструментов и сервисом DCOP +Comment[sk]=Vygeneruje jednoduchú Korundum aplikáciu s jedným oknom, menu a panelom nástrojov. Taktiež bude poskytnuté DCOP rozhranie, takže aj aplikáciamôže poskytnúť skriptovacie rozhranie +Comment[sr]=Прави једноставан Korundum програм са једним прозором највишег нивоа, менијима и тракама са алатом. Дат је и DCOP интерфејс, тако да ваш програм може да омогући скриптовање +Comment[sr@Latn]=Pravi jednostavan Korundum program sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. Dat je i DCOP interfejs, tako da vaš program može da omogući skriptovanje +Comment[sv]=Skapar ett enkelt Korundum-program med ett toppnivåfönster, menyer och verktygsrader. Ett DCOP-gränssnitt tillhandahålls också, så att programmet kan tillhandahålla ett skriptgränssnitt. +Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir Korundum uygulaması yaratır. Uygulamanızın bir betik arayüzü sağlayabilmesi için bir DCOP arayüzü de sağlanmıştır. +Comment[zh_TW]=產生一個簡單的 Korundum 應用程式,內含頂層視窗、選單與工具列。另外提供一個 DCOP 介面,讓您的應用程式可以使用文稿介面。 +FileTemplates=rb,ShellStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.rb +Archive=kappruby.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{src}/app-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.rb +Dest=%{dest}/src/%{APPNAMELC}.rb + +[FILE17] +Type=install +Source=%{src}/appview.rb +Dest=%{dest}/src/%{APPNAMELC}view.rb + +[FILE18] +Type=install +Source=%{src}/appiface.rb +Dest=%{dest}/src/%{APPNAMELC}iface.rb + +[FILE19] +Type=install +Source=%{src}/app_client.rb +Dest=%{dest}/src/%{APPNAMELC}_client.rb + +[FILE20] +Type=install +Source=%{src}/pref.rb +Dest=%{dest}/src/pref.rb + +[FILE21] +Type=install +Source=%{src}/main.rb +Dest=%{dest}/src/main.rb + +[FILE22] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE23] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[MSG] +Type=message +Comment=A Korundum Application was created at %{dest} +Comment[ca]=Una aplicació Korundum ha estat creada a %{dest} +Comment[da]=Et Korundum program blev oprettet i %{dest} +Comment[de]=Eine Korundum-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή Korundum δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación Korundum ha sido creada en %{dest} +Comment[et]=Korundumi rakendus loodi asukohta %{dest} +Comment[eu]=Korundum aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد Korundum در %{dest} ایجاد شد +Comment[fr]=Une application Korundum a été créée dans %{dest} +Comment[ga]=Cruthaíodh Feidhmchlár Korundum ag %{dest} +Comment[gl]=Creouse unha aplicación Korundum en %{dest} +Comment[hu]=Létrejött egy Korundum-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Korundum in %{dest} +Comment[ja]=Korundum アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Korundum-Programm opstellt. +Comment[ne]=Korundum अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Korundum-toepassing is aangemaakt in %{dest} +Comment[pl]=Program Korundum został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação Korundum em %{dest} +Comment[pt_BR]=Foi criada uma aplicação Korundum em %{dest} +Comment[ru]=Приложение Korundum создано в %{dest} +Comment[sk]=Korundum aplikácia bola vytvorená v %{dest} +Comment[sr]=Korundum програм је направљен у %{dest} +Comment[sr@Latn]=Korundum program je napravljen u %{dest} +Comment[sv]=Ett Korundum-program skapades i %{dest} +Comment[tr]=Bir Korundum Uygulaması %{dest} içinde yaratıldı. +Comment[zh_TW]=一個 Korundum 應用程式已建立於 %{dest} diff --git a/languages/ruby/app_templates/kapp/kappruby.png b/languages/ruby/app_templates/kapp/kappruby.png new file mode 100644 index 00000000..913ebb87 Binary files /dev/null and b/languages/ruby/app_templates/kapp/kappruby.png differ diff --git a/languages/ruby/app_templates/kapp/main.rb b/languages/ruby/app_templates/kapp/main.rb new file mode 100644 index 00000000..47235013 --- /dev/null +++ b/languages/ruby/app_templates/kapp/main.rb @@ -0,0 +1,40 @@ +#!/usr/bin/env ruby + +require 'Korundum' + +require '%{APPNAMELC}iface.rb' +require '%{APPNAMELC}.rb' +require '%{APPNAMELC}view.rb' +require 'pref.rb' + +description = I18N_NOOP("A TDE Application") +version = "%{VERSION}" +options = [ [ "+[URL]", I18N_NOOP( "Document to open" ), "" ] ] + +about = KDE::AboutData.new("%{APPNAMELC}", I18N_NOOP("%{APPNAME}"), version, description, + KDE::AboutData.License_%{LICENSE}, "(C) %{YEAR} %{AUTHOR}", nil, nil, "%{EMAIL}") +about.addAuthor( "%{AUTHOR}", nil, "%{EMAIL}" ) +KDE::CmdLineArgs.init(ARGV, about) +KDE::CmdLineArgs.addCmdLineOptions(options) +app = KDE::Application.new + +# see if we are starting with session management +if app.restored? + RESTORE(%{APPNAMESC}) +else + # no session.. just start up normally + args = KDE::CmdLineArgs.parsedArgs + if args.count == 0 + widget = %{APPNAMESC}.new + widget.show + else + for i in 0...args.count do + widget = %{APPNAMESC}.new + widget.show + widget.load(args.url(i)) + end + end +end + +app.exec + diff --git a/languages/ruby/app_templates/kapp/pref.rb b/languages/ruby/app_templates/kapp/pref.rb new file mode 100644 index 00000000..98669ad2 --- /dev/null +++ b/languages/ruby/app_templates/kapp/pref.rb @@ -0,0 +1,38 @@ + +class %{APPNAMESC}Preferences < KDE::DialogBase + + def initialize() + super(TreeList, i18n("%{APPNAMESC} Preferences"), + Help|Default|Ok|Apply|Cancel, Ok) + # this is the base class for your preferences dialog. it is now + # a Treelist dialog.. but there are a number of other + # possibilities (including Tab, Swallow, and just Plain) + frame = addPage(i18n("First Page"), i18n("Page One Options")) + @pageOne = %{APPNAMESC}PrefPageOne.new(frame) + + frame = addPage(i18n("Second Page"), i18n("Page Two Options")) + @pageTwo = %{APPNAMESC}PrefPageTwo.new(frame) + end +end + +class %{APPNAMESC}PrefPageOne < Qt::Frame + + def initialize(parent) + super(parent) + layout = Qt::HBoxLayout.new(self) + layout.setAutoAdd(true) + + Qt::Label.new(i18n("Add something here"), self) + end +end + +class %{APPNAMESC}PrefPageTwo < Qt::Frame + + def initialize(parent) + super(parent) + layout = Qt::HBoxLayout.new(self) + layout.setAutoAdd(true) + + Qt::Label.new(i18n("Add something here"), self) + end +end diff --git a/languages/ruby/app_templates/kapp/src-Makefile.am b/languages/ruby/app_templates/kapp/src-Makefile.am new file mode 100644 index 00000000..acb41899 --- /dev/null +++ b/languages/ruby/app_templates/kapp/src-Makefile.am @@ -0,0 +1,43 @@ +## Makefile.am for %{APPNAMELC} + +# this is the program that gets installed. it's name is used for all +# of the other Makefile.am variables +bin_PROGRAMS = %{APPNAMELC} + +# set the include path for X, qt and KDE +INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR) + +# the library search path. +%{APPNAMELC}_LDFLAGS = $(all_libraries) $(KDE_RPATH) -L$(RUBY_LIBDIR) + +# the libraries to link against. +%{APPNAMELC}_LDADD = $(LIB_TDEFILE) $(LIB_TDEPRINT) $(RUBY_LIBRUBYARG) + +# which sources should be compiled for %{APPNAMELC} +%{APPNAMELC}_SOURCES = %{APPNAMELC}.cpp + +# let automoc handle all of the meta source files ((moc)) +METASOURCES = AUTO + +KDE_ICON = AUTO + +# this is where the kdelnk file will go +kdelnkdir = $(kde_appsdir)/Utilities +kdelnk_DATA = %{APPNAMELC}.desktop + +# this is where the XML-GUI resource file goes +rcdir = $(kde_datadir)/%{APPNAMELC} +rc_DATA = %{APPNAMELC}ui.rc + +rubysrc_DATA = main.rb %{APPNAMELC}.rb %{APPNAMELC}_client.rb %{APPNAMELC}iface.rb \ + %{APPNAMELC}view.rb pref.rb + +rubysrcdir = $(kde_datadir)/%{APPNAMELC} + +rubyui_DATA = + +rubyuidir = $(kde_datadir)/%{APPNAMELC} + +%.rb: %.ui + $(RBUIC) -tr ${UIC_TR} -kde $< -o $@ + diff --git a/languages/ruby/app_templates/kapp/subdirs b/languages/ruby/app_templates/kapp/subdirs new file mode 100644 index 00000000..0e678106 --- /dev/null +++ b/languages/ruby/app_templates/kapp/subdirs @@ -0,0 +1,3 @@ +doc +po +src diff --git a/languages/ruby/app_templates/kxt/CMakeLists.txt b/languages/ruby/app_templates/kxt/CMakeLists.txt index 482d5e24..539cfdb6 100644 --- a/languages/ruby/app_templates/kxt/CMakeLists.txt +++ b/languages/ruby/app_templates/kxt/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( kxtruby.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kxtruby.tar.gz kxtruby.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kxtruby.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kxtruby.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/kxt/Makefile.am b/languages/ruby/app_templates/kxt/Makefile.am index 66b2b259..2ea8cf5b 100644 --- a/languages/ruby/app_templates/kxt/Makefile.am +++ b/languages/ruby/app_templates/kxt/Makefile.am @@ -6,10 +6,10 @@ dataFiles = app.rb main.rb prefs.rb app.cpp appview.rb appview_base.ui prefs-bas templateName = kxtruby ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/kxt/app.tdevelop b/languages/ruby/app_templates/kxt/app.tdevelop index d416fcdb..5c57b8fb 100644 --- a/languages/ruby/app_templates/kxt/app.tdevelop +++ b/languages/ruby/app_templates/kxt/app.tdevelop @@ -15,18 +15,18 @@ KDevDoxygen KDevdistpart KDevVisualBoyAdvance - TDevDebugger + KDevDebugger
    - + src/%{APPNAMELC} - - + + false CVS,.svn @@ -35,8 +35,8 @@ - - + + ada ada_bugs_gcc @@ -72,19 +72,19 @@ w3c-uaag10 wxwindows_bugs - - + + - - + + ruby false 3 src/main.rb - + diff --git a/languages/ruby/app_templates/kxt/kxtruby.kdevtemplate b/languages/ruby/app_templates/kxt/kxtruby.kdevtemplate new file mode 100644 index 00000000..e4756e1d --- /dev/null +++ b/languages/ruby/app_templates/kxt/kxtruby.kdevtemplate @@ -0,0 +1,251 @@ +# KDE Config File +[General] + +Name=TDEConfig XT application +Name[ca]=Aplicació TDEConfig XT +Name[da]=TDEConfig XT program +Name[de]=TDEConfigXT-Anwendung +Name[el]=Εφαρμογή TDEConfig XT +Name[es]=Aplicación TDEConfig XT +Name[et]=TDEConfig XT rakendus +Name[eu]=TDEConfig XT aplikazioa +Name[fa]=کاربرد TDEConfig XT +Name[fr]=Application TDEConfig XT +Name[ga]=Feidhmchlár XT TDEConfig +Name[gl]=Aplicación TDEConfig XT +Name[hu]=TDEConfig XT-alapú alkalmazás +Name[it]=Applicazione TDEConfig XT +Name[ja]=TDEConfig XT アプリケーション +Name[nds]=TDEConfig-XT-Programm +Name[ne]=TDEConfig XT अनुप्रयोग +Name[nl]=TDEConfig XT-toepassing +Name[pl]=Program TDEConfig XT +Name[pt]=Aplicação do TDEConfig XT +Name[pt_BR]=Aplicação do TDEConfig XT +Name[ru]=Приложение KDE с TDEConfig XT +Name[sk]=TDEConfig XT aplikácia +Name[sr]=TDEConfig XT програм +Name[sr@Latn]=TDEConfig XT program +Name[sv]=TDEConfig XT-program +Name[tr]=TDEConfig XT uygulaması +Name[zh_CN]=TDEConfig XT 应用程序 +Name[zh_TW]=TDEConfig XT 應用程式 +Category=Ruby/KDE +Icon=kxtruby.png +Comment=Generates a simple KDE application with one widget and a configuration dialog +Comment[ca]=Genera una simple aplicació per al KDE amb un estri i un diàleg de configuració +Comment[da]=Genererer et simpelt KDE-program med en kontrol og en indstillingsdialog +Comment[de]=Erstellt eine einfache KDE-Anwendung mit einem Widget und einem Einstellungsdialog. +Comment[el]=Δημιουργεί μια απλή εφαρμογή KDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης +Comment[en_GB]=Generates a simple KDE application with one widget and a configuration dialogue +Comment[es]=Genera una sencilla aplicación para KDE con una ventana y un diálogo de configuración +Comment[et]=Lihtsa KDE rakenduse loomine ühe vidina ja seadistustedialoogiga. +Comment[eu]=Trepeta bat eta konfigurazio elkarrizketa-koadro bat duen KDE aplikazio sinple bat sortzen du +Comment[fa]=یک کاربرد سادۀ KDE، با یک عنصر و یک محاورۀ پیکربندی تولید می‌کند +Comment[fr]=Génère une application KDE simple comprenant un seul élément graphique (widget) et une boîte de dialogue de configuration +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí KDE le giuirléid amháin agus dialóg chumraíochta +Comment[gl]=Xera unha aplicación KDE sinxela cunha compoñente e un diálogo de configuración +Comment[hu]=Létrehoz egy egyszerű KDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal +Comment[it]=Genera una semplice applicazione KDE con un elemento grafico e una finestra di configurazione +Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な KDE アプリケーションを作成します +Comment[nds]=Stellt en eenfach KDE-Programm mit een Element un en Instelldialoog op +Comment[ne]=एउटा विगेट र कन्फिगरेसन संवादसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudige KDE-toepassing met één widget en een configuratiedialoog +Comment[pl]=Generuje prosty program KDE z jednym widgetem i oknem konfiguracyjnym +Comment[pt]=Gera uma aplicação simples do KDE com uma janela principal e outra para configuração +Comment[pt_BR]=Gera uma aplicação simples do KDE com uma janela principal e outra para configuração +Comment[ru]=Создание приложения KDE с окном конфигурации +Comment[sk]=Vygeneruje jednoduchú KDE aplikáciu s jedným oknom a konfiguračným dialógom +Comment[sr]=Прави једноставан KDE програм са једном контролом и дијалогом за подешавање +Comment[sr@Latn]=Pravi jednostavan KDE program sa jednom kontrolom i dijalogom za podešavanje +Comment[sv]=Skapar ett enkelt KDE-program med en grafisk komponent och en inställningsdialogruta +Comment[tr]=Bir parçacığı ve ayar penceresi olan basit bir KDE uygulaması yaratır. +Comment[zh_CN]=生成带一个部件和一个配置对话框的简单 KDE 应用程序 +Comment[zh_TW]=產生一個簡單的 KDE 應用程式,內含一個元件與一個設定對話框。 +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.rb,%{dest}/src/README +Archive=kxtruby.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{src}/app-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.rb +Dest=%{dest}/src/%{APPNAMELC}.rb + +[FILE17] +Type=install +Source=%{src}/appview.rb +Dest=%{dest}/src/%{APPNAMELC}view.rb + +[FILE18] +Type=install +Source=%{src}/appview_base.ui +Dest=%{dest}/src/appview_base.ui + +[FILE19] +Type=install +Source=%{src}/prefs-base.ui +Dest=%{dest}/src/prefs-base.ui + +[FILE20] +Type=install +Source=%{src}/prefs.rb +Dest=%{dest}/src/prefs.rb + +[FILE21] +Type=install +Source=%{src}/main.rb +Dest=%{dest}/src/main.rb + +[FILE22] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE23] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[FILE24] +Type=install +Source=%{src}/app.kcfg +Dest=%{dest}/src/%{APPNAMELC}.kcfg + +[FILE25] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/src/settings.kcfgc + +[MSG] +Type=message +Comment=A Korundum TDEConfig XT Application was created at %{dest} +Comment[ca]=Una aplicació Korundum amb TDEConfig XT ha estat creada a %{dest} +Comment[da]=Et Korundum TDEConfig XT program blev oprettet i %{dest} +Comment[de]=Eine Korundum-TDEConfig-XT-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή Korundum TDEConfig XT δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación Korundum con TDEConfig XT ha sido creada en %{dest} +Comment[et]=Korundumi TDEConfig XT rakendus loodi asukohta %{dest} +Comment[eu]=Korundum TDEConfig XT aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد Korundum TDEConfig XT در %{dest} ایجاد شد +Comment[fr]=Une application TDEConfig XT Korundum a été créée dans %{dest} +Comment[ga]=Cruthaíodh Feidhmchlár Korundum TDEConfig XT ag %{dest} +Comment[gl]=Creouse unha aplicación TDEConfig XT con Korundum en %{dest} +Comment[hu]=Létrejött egy Korundum-alapú TDEConfig XT-s alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Korundum TDEConfig XT in %{dest} +Comment[ja]=Korundum TDEConfig XT アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Korundum/TDEConfig-XT-Programm opstellt. +Comment[ne]=Korundum TDEConfig XT अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Korundum TDEConfig XT-toepassing is aangemaakt in %{dest} +Comment[pl]=Program Korundum TDEConfig XT został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação Korundum com TDEConfig XT em %{dest} +Comment[pt_BR]=Foi criada uma aplicação Korundum com TDEConfig XT em %{dest} +Comment[ru]=Приложение Korundum с TDEConfig XT создано в %{dest} +Comment[sk]=Korundim TDEConfig XT aplikácia bola vytvorená v %{dest} +Comment[sr]=Korundum TDEConfig XT програм направљен је у %{dest} +Comment[sr@Latn]=Korundum TDEConfig XT program napravljen je u %{dest} +Comment[sv]=Ett Korundum TDEConfig XT-program skapades i %{dest} +Comment[tr]=Bir Korundum TDEConfig XT uygulaması %{dest} içinde yaratıldı. +Comment[zh_TW]=一個 Korundum TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/ruby/app_templates/kxt/kxtruby.tdevtemplate b/languages/ruby/app_templates/kxt/kxtruby.tdevtemplate deleted file mode 100644 index f17db17b..00000000 --- a/languages/ruby/app_templates/kxt/kxtruby.tdevtemplate +++ /dev/null @@ -1,251 +0,0 @@ -# KDE Config File -[General] - -Name=TDEConfig XT application -Name[ca]=Aplicació TDEConfig XT -Name[da]=TDEConfig XT program -Name[de]=TDEConfigXT-Anwendung -Name[el]=Εφαρμογή TDEConfig XT -Name[es]=Aplicación TDEConfig XT -Name[et]=TDEConfig XT rakendus -Name[eu]=TDEConfig XT aplikazioa -Name[fa]=کاربرد TDEConfig XT -Name[fr]=Application TDEConfig XT -Name[ga]=Feidhmchlár XT TDEConfig -Name[gl]=Aplicación TDEConfig XT -Name[hu]=TDEConfig XT-alapú alkalmazás -Name[it]=Applicazione TDEConfig XT -Name[ja]=TDEConfig XT アプリケーション -Name[nds]=TDEConfig-XT-Programm -Name[ne]=TDEConfig XT अनुप्रयोग -Name[nl]=TDEConfig XT-toepassing -Name[pl]=Program TDEConfig XT -Name[pt]=Aplicação do TDEConfig XT -Name[pt_BR]=Aplicação do TDEConfig XT -Name[ru]=Приложение KDE с TDEConfig XT -Name[sk]=TDEConfig XT aplikácia -Name[sr]=TDEConfig XT програм -Name[sr@Latn]=TDEConfig XT program -Name[sv]=TDEConfig XT-program -Name[tr]=TDEConfig XT uygulaması -Name[zh_CN]=TDEConfig XT 应用程序 -Name[zh_TW]=TDEConfig XT 應用程式 -Category=Ruby/KDE -Icon=kxtruby.png -Comment=Generates a simple KDE application with one widget and a configuration dialog -Comment[ca]=Genera una simple aplicació per al KDE amb un estri i un diàleg de configuració -Comment[da]=Genererer et simpelt KDE-program med en kontrol og en indstillingsdialog -Comment[de]=Erstellt eine einfache KDE-Anwendung mit einem Widget und einem Einstellungsdialog. -Comment[el]=Δημιουργεί μια απλή εφαρμογή KDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης -Comment[en_GB]=Generates a simple KDE application with one widget and a configuration dialogue -Comment[es]=Genera una sencilla aplicación para KDE con una ventana y un diálogo de configuración -Comment[et]=Lihtsa KDE rakenduse loomine ühe vidina ja seadistustedialoogiga. -Comment[eu]=Trepeta bat eta konfigurazio elkarrizketa-koadro bat duen KDE aplikazio sinple bat sortzen du -Comment[fa]=یک کاربرد سادۀ KDE، با یک عنصر و یک محاورۀ پیکربندی تولید می‌کند -Comment[fr]=Génère une application KDE simple comprenant un seul élément graphique (widget) et une boîte de dialogue de configuration -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí KDE le giuirléid amháin agus dialóg chumraíochta -Comment[gl]=Xera unha aplicación KDE sinxela cunha compoñente e un diálogo de configuración -Comment[hu]=Létrehoz egy egyszerű KDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal -Comment[it]=Genera una semplice applicazione KDE con un elemento grafico e una finestra di configurazione -Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な KDE アプリケーションを作成します -Comment[nds]=Stellt en eenfach KDE-Programm mit een Element un en Instelldialoog op -Comment[ne]=एउटा विगेट र कन्फिगरेसन संवादसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudige KDE-toepassing met één widget en een configuratiedialoog -Comment[pl]=Generuje prosty program KDE z jednym widgetem i oknem konfiguracyjnym -Comment[pt]=Gera uma aplicação simples do KDE com uma janela principal e outra para configuração -Comment[pt_BR]=Gera uma aplicação simples do KDE com uma janela principal e outra para configuração -Comment[ru]=Создание приложения KDE с окном конфигурации -Comment[sk]=Vygeneruje jednoduchú KDE aplikáciu s jedným oknom a konfiguračným dialógom -Comment[sr]=Прави једноставан KDE програм са једном контролом и дијалогом за подешавање -Comment[sr@Latn]=Pravi jednostavan KDE program sa jednom kontrolom i dijalogom za podešavanje -Comment[sv]=Skapar ett enkelt KDE-program med en grafisk komponent och en inställningsdialogruta -Comment[tr]=Bir parçacığı ve ayar penceresi olan basit bir KDE uygulaması yaratır. -Comment[zh_CN]=生成带一个部件和一个配置对话框的简单 KDE 应用程序 -Comment[zh_TW]=產生一個簡單的 KDE 應用程式,內含一個元件與一個設定對話框。 -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.rb,%{dest}/src/README -Archive=kxtruby.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{src}/app-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.rb -Dest=%{dest}/src/%{APPNAMELC}.rb - -[FILE17] -Type=install -Source=%{src}/appview.rb -Dest=%{dest}/src/%{APPNAMELC}view.rb - -[FILE18] -Type=install -Source=%{src}/appview_base.ui -Dest=%{dest}/src/appview_base.ui - -[FILE19] -Type=install -Source=%{src}/prefs-base.ui -Dest=%{dest}/src/prefs-base.ui - -[FILE20] -Type=install -Source=%{src}/prefs.rb -Dest=%{dest}/src/prefs.rb - -[FILE21] -Type=install -Source=%{src}/main.rb -Dest=%{dest}/src/main.rb - -[FILE22] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE23] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[FILE24] -Type=install -Source=%{src}/app.kcfg -Dest=%{dest}/src/%{APPNAMELC}.kcfg - -[FILE25] -Type=install -Source=%{src}/settings.kcfgc -Dest=%{dest}/src/settings.kcfgc - -[MSG] -Type=message -Comment=A Korundum TDEConfig XT Application was created at %{dest} -Comment[ca]=Una aplicació Korundum amb TDEConfig XT ha estat creada a %{dest} -Comment[da]=Et Korundum TDEConfig XT program blev oprettet i %{dest} -Comment[de]=Eine Korundum-TDEConfig-XT-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή Korundum TDEConfig XT δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación Korundum con TDEConfig XT ha sido creada en %{dest} -Comment[et]=Korundumi TDEConfig XT rakendus loodi asukohta %{dest} -Comment[eu]=Korundum TDEConfig XT aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد Korundum TDEConfig XT در %{dest} ایجاد شد -Comment[fr]=Une application TDEConfig XT Korundum a été créée dans %{dest} -Comment[ga]=Cruthaíodh Feidhmchlár Korundum TDEConfig XT ag %{dest} -Comment[gl]=Creouse unha aplicación TDEConfig XT con Korundum en %{dest} -Comment[hu]=Létrejött egy Korundum-alapú TDEConfig XT-s alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione Korundum TDEConfig XT in %{dest} -Comment[ja]=Korundum TDEConfig XT アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Korundum/TDEConfig-XT-Programm opstellt. -Comment[ne]=Korundum TDEConfig XT अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Korundum TDEConfig XT-toepassing is aangemaakt in %{dest} -Comment[pl]=Program Korundum TDEConfig XT został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação Korundum com TDEConfig XT em %{dest} -Comment[pt_BR]=Foi criada uma aplicação Korundum com TDEConfig XT em %{dest} -Comment[ru]=Приложение Korundum с TDEConfig XT создано в %{dest} -Comment[sk]=Korundim TDEConfig XT aplikácia bola vytvorená v %{dest} -Comment[sr]=Korundum TDEConfig XT програм направљен је у %{dest} -Comment[sr@Latn]=Korundum TDEConfig XT program napravljen je u %{dest} -Comment[sv]=Ett Korundum TDEConfig XT-program skapades i %{dest} -Comment[tr]=Bir Korundum TDEConfig XT uygulaması %{dest} içinde yaratıldı. -Comment[zh_TW]=一個 Korundum TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/ruby/app_templates/qtruby/CMakeLists.txt b/languages/ruby/app_templates/qtruby/CMakeLists.txt index edbe6376..beac7f1f 100644 --- a/languages/ruby/app_templates/qtruby/CMakeLists.txt +++ b/languages/ruby/app_templates/qtruby/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( qtruby.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qtruby.tar.gz qtruby.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qtruby.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qtruby.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/qtruby/Makefile.am b/languages/ruby/app_templates/qtruby/Makefile.am index a822765c..919a69f5 100644 --- a/languages/ruby/app_templates/qtruby/Makefile.am +++ b/languages/ruby/app_templates/qtruby/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.rb app.tdevelop app-Makefile app.filelist README templateName = qtruby ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/qtruby/app.filelist b/languages/ruby/app_templates/qtruby/app.filelist index 2458459f..202beb22 100644 --- a/languages/ruby/app_templates/qtruby/app.filelist +++ b/languages/ruby/app_templates/qtruby/app.filelist @@ -1,2 +1,2 @@ -# TDevelop Custom Project File List +# KDevelop Custom Project File List %{APPNAMELC}.rb diff --git a/languages/ruby/app_templates/qtruby/app.tdevelop b/languages/ruby/app_templates/qtruby/app.tdevelop index ad09b42c..3b59130c 100644 --- a/languages/ruby/app_templates/qtruby/app.tdevelop +++ b/languages/ruby/app_templates/qtruby/app.tdevelop @@ -4,7 +4,7 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Ruby Ruby @@ -14,15 +14,15 @@ KDevDoxygen KDevdistpart KDevVisualBoyAdvance - TDevDebugger + KDevDebugger
    - + - - + + false CVS,.svn @@ -31,8 +31,8 @@ - - + + ada ada_bugs_gcc @@ -68,18 +68,18 @@ w3c-uaag10 wxwindows_bugs - - + + - - + + ./%{APPNAMELC}.rb ruby false - + diff --git a/languages/ruby/app_templates/qtruby/qtruby.kdevtemplate b/languages/ruby/app_templates/qtruby/qtruby.kdevtemplate new file mode 100644 index 00000000..da8500dc --- /dev/null +++ b/languages/ruby/app_templates/qtruby/qtruby.kdevtemplate @@ -0,0 +1,114 @@ +# KDE Config File +[General] +Name=QtRuby Hello World +Name[ca]=Hello World en QtRuby +Name[da]=QtRuby Goddag verden +Name[de]=QtRuby-"Hello World"-Programm +Name[el]=Γεια σου κόσμε QtRuby +Name[es]=«Hola mundo» en QtRuby +Name[et]=QtRuby "Tere, maailm" +Name[eu]=QtRuby "Kaixo mundua" programa +Name[fr]=« Bonjour monde » en QtRuby +Name[gl]=Ola mundo en QtRuby +Name[hu]=QtRuby-alapú Hello world program +Name[it]="Hello World" con QtRuby +Name[nds]=QtRuby-"Moin Welt" +Name[ne]=QtRuby हेल्लो वोल्ड +Name[pl]="Witaj świecie" w QtRuby +Name[pt]=Olá Mundo em QtRuby +Name[pt_BR]=Olá Mundo em QtRuby +Name[ru]=Hello World на QtRuby +Name[sk]=QtRuby Ahoj svet +Name[sr]=„Здраво свете“ у QtRuby-ју +Name[sr@Latn]=„Zdravo svete“ u QtRuby-ju +Name[tr]=QtRuby Merhaba Dünya +Category=Ruby/Qt +Comment=This generates a simple QtRuby Hello World application +Comment[ca]=Genera una simple aplicació de Hello World en QtRuby +Comment[da]=Dette generere et simpelt QtRuby Goddag verden program +Comment[de]=Erstellt eine einfache auf QtRuby basierende "Hello World"-Anwendung +Comment[el]=Αυτό δημιουργεί μια απλή εφαρμογή Γεια σου κόσμε σε QtRuby +Comment[es]=Genera una sencilla aplicación «Hola mundo» en QtRuby +Comment[et]=Lihtsa QtRuby "Tere, maailm" rakenduse loomine +Comment[eu]=Honek QtRuby "Kaixo mundua" aplikazio sinple bat sortzen du +Comment[fa]=یک کاربرد سادۀ QtRuby Hello World تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en QtRuby +Comment[gl]=Isto xera unha aplicación sinxela Ola mundo QtRuby +Comment[hu]=Létrehoz egy egyszerű QtRuby-alapú Hello world programot +Comment[it]=Genera una semplice applicazione di "Hello World" con QtRuby +Comment[ja]=簡単な QtRuby Hello World アプリケーションを作成します +Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm mit QtRuby op. +Comment[ne]=यसले साधारण QtRuby हेल्लो वोल्ड अनुप्रयोग उत्पन्न गर्दछ +Comment[nl]=Dit genereert een eenvoudige QtRuby Hello World-toepassing +Comment[pl]=Generuje prosty program "Witaj świecie" w QtRuby +Comment[pt]=Isto gera uma aplicação Olá Mundo simples em QtRuby +Comment[pt_BR]=Isto gera uma aplicação Olá Mundo simples em QtRuby +Comment[ru]=Создание простого приложения Hello World на QtRuby +Comment[sk]=Vygeneruje jednoduchú QtRuby Ahoj svet aplikáciu +Comment[sr]=Ово прави једноставан „Здраво свете“ у QtRuby-ју +Comment[sr@Latn]=Ovo pravi jednostavan „Zdravo svete“ u QtRuby-ju +Comment[sv]=Detta skapar ett enkelt Hello World-program i QtRuby +Comment[tr]=Bu basit bir QtRuby Merhaba Dünya uygulaması yaratır. +Comment[zh_TW]=產生一個簡單的 QtRuby Hello World 應用程式 +FileTemplates=rb,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.rb,%{dest}/README +Icon=qtruby.png +Archive=qtruby.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app.rb +Dest=%{dest}/%{APPNAMELC}.rb + +[FILE3] +Type=install +Source=%{src}/app-Makefile +Dest=%{dest}/Makefile + +[FILE4] +Type=install +Source=%{src}/app.filelist +Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist + +[FILE5] +Type=install +Source=%{src}/README +Dest=%{dest}/README + +[MSG] +Type=message +Comment=A simple QtRuby application was created in %{dest} +Comment[ca]=Una simple aplicació en QtRuby ha estat creada en %{dest} +Comment[da]=Et simpelt QtRuby program blev oprettet i %{dest} +Comment[de]=Eine einfache QtRuby-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια απλή εφαρμογή QtRuby δημιουργήθηκε στο %{dest} +Comment[es]=Una sencilla aplicación en QtRuby ha sido creada en %{dest} +Comment[et]=Lihtne KQtRuby rakendus loodi asukohta %{dest} +Comment[eu]=QtRuby aplikazio sinple bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد سادۀ QtRuby در %{dest} ایجاد شد +Comment[fr]=Une application QtRuby simple a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár simplí QtRuby i %{dest} +Comment[gl]=Creouse unha aplicación sinxela QtRuby en %{dest} +Comment[hu]=Létrejött egy egyszerű QtRuby-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata una semplice applicazione QtRuby in %{dest} +Comment[ja]=簡単な QtRuby アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach QtRuby-Programm opstellt. +Comment[ne]=साधारण QtRuby अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudige QtRuby-toepassing is aangemaakt in %{dest} +Comment[pl]=Prosty program w QtRuby został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação simples de QtRuby em %{dest} +Comment[pt_BR]=Foi criada uma aplicação simples de QtRuby em %{dest} +Comment[ru]=Простое приложение QtRuby создано в %{dest} +Comment[sk]=Jednoduchá QtRuby aplikácia bola vytvorená v %{dest} +Comment[sr]=Једноставан QtRuby програм направљен је у %{dest} +Comment[sr@Latn]=Jednostavan QtRuby program napravljen je u %{dest} +Comment[sv]=Ett enkelt QtRuby-program skapades i %{dest} +Comment[tr]=Basit bir QtRuby uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简单的 QtRuby 应用程序 +Comment[zh_TW]=一個簡單的 QtRuby 應用程式框架已建立於 %{dest} diff --git a/languages/ruby/app_templates/qtruby/qtruby.tdevtemplate b/languages/ruby/app_templates/qtruby/qtruby.tdevtemplate deleted file mode 100644 index da8500dc..00000000 --- a/languages/ruby/app_templates/qtruby/qtruby.tdevtemplate +++ /dev/null @@ -1,114 +0,0 @@ -# KDE Config File -[General] -Name=QtRuby Hello World -Name[ca]=Hello World en QtRuby -Name[da]=QtRuby Goddag verden -Name[de]=QtRuby-"Hello World"-Programm -Name[el]=Γεια σου κόσμε QtRuby -Name[es]=«Hola mundo» en QtRuby -Name[et]=QtRuby "Tere, maailm" -Name[eu]=QtRuby "Kaixo mundua" programa -Name[fr]=« Bonjour monde » en QtRuby -Name[gl]=Ola mundo en QtRuby -Name[hu]=QtRuby-alapú Hello world program -Name[it]="Hello World" con QtRuby -Name[nds]=QtRuby-"Moin Welt" -Name[ne]=QtRuby हेल्लो वोल्ड -Name[pl]="Witaj świecie" w QtRuby -Name[pt]=Olá Mundo em QtRuby -Name[pt_BR]=Olá Mundo em QtRuby -Name[ru]=Hello World на QtRuby -Name[sk]=QtRuby Ahoj svet -Name[sr]=„Здраво свете“ у QtRuby-ју -Name[sr@Latn]=„Zdravo svete“ u QtRuby-ju -Name[tr]=QtRuby Merhaba Dünya -Category=Ruby/Qt -Comment=This generates a simple QtRuby Hello World application -Comment[ca]=Genera una simple aplicació de Hello World en QtRuby -Comment[da]=Dette generere et simpelt QtRuby Goddag verden program -Comment[de]=Erstellt eine einfache auf QtRuby basierende "Hello World"-Anwendung -Comment[el]=Αυτό δημιουργεί μια απλή εφαρμογή Γεια σου κόσμε σε QtRuby -Comment[es]=Genera una sencilla aplicación «Hola mundo» en QtRuby -Comment[et]=Lihtsa QtRuby "Tere, maailm" rakenduse loomine -Comment[eu]=Honek QtRuby "Kaixo mundua" aplikazio sinple bat sortzen du -Comment[fa]=یک کاربرد سادۀ QtRuby Hello World تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en QtRuby -Comment[gl]=Isto xera unha aplicación sinxela Ola mundo QtRuby -Comment[hu]=Létrehoz egy egyszerű QtRuby-alapú Hello world programot -Comment[it]=Genera una semplice applicazione di "Hello World" con QtRuby -Comment[ja]=簡単な QtRuby Hello World アプリケーションを作成します -Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm mit QtRuby op. -Comment[ne]=यसले साधारण QtRuby हेल्लो वोल्ड अनुप्रयोग उत्पन्न गर्दछ -Comment[nl]=Dit genereert een eenvoudige QtRuby Hello World-toepassing -Comment[pl]=Generuje prosty program "Witaj świecie" w QtRuby -Comment[pt]=Isto gera uma aplicação Olá Mundo simples em QtRuby -Comment[pt_BR]=Isto gera uma aplicação Olá Mundo simples em QtRuby -Comment[ru]=Создание простого приложения Hello World на QtRuby -Comment[sk]=Vygeneruje jednoduchú QtRuby Ahoj svet aplikáciu -Comment[sr]=Ово прави једноставан „Здраво свете“ у QtRuby-ју -Comment[sr@Latn]=Ovo pravi jednostavan „Zdravo svete“ u QtRuby-ju -Comment[sv]=Detta skapar ett enkelt Hello World-program i QtRuby -Comment[tr]=Bu basit bir QtRuby Merhaba Dünya uygulaması yaratır. -Comment[zh_TW]=產生一個簡單的 QtRuby Hello World 應用程式 -FileTemplates=rb,ShellStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.rb,%{dest}/README -Icon=qtruby.png -Archive=qtruby.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.rb -Dest=%{dest}/%{APPNAMELC}.rb - -[FILE3] -Type=install -Source=%{src}/app-Makefile -Dest=%{dest}/Makefile - -[FILE4] -Type=install -Source=%{src}/app.filelist -Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist - -[FILE5] -Type=install -Source=%{src}/README -Dest=%{dest}/README - -[MSG] -Type=message -Comment=A simple QtRuby application was created in %{dest} -Comment[ca]=Una simple aplicació en QtRuby ha estat creada en %{dest} -Comment[da]=Et simpelt QtRuby program blev oprettet i %{dest} -Comment[de]=Eine einfache QtRuby-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια απλή εφαρμογή QtRuby δημιουργήθηκε στο %{dest} -Comment[es]=Una sencilla aplicación en QtRuby ha sido creada en %{dest} -Comment[et]=Lihtne KQtRuby rakendus loodi asukohta %{dest} -Comment[eu]=QtRuby aplikazio sinple bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد سادۀ QtRuby در %{dest} ایجاد شد -Comment[fr]=Une application QtRuby simple a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár simplí QtRuby i %{dest} -Comment[gl]=Creouse unha aplicación sinxela QtRuby en %{dest} -Comment[hu]=Létrejött egy egyszerű QtRuby-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata una semplice applicazione QtRuby in %{dest} -Comment[ja]=簡単な QtRuby アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach QtRuby-Programm opstellt. -Comment[ne]=साधारण QtRuby अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudige QtRuby-toepassing is aangemaakt in %{dest} -Comment[pl]=Prosty program w QtRuby został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação simples de QtRuby em %{dest} -Comment[pt_BR]=Foi criada uma aplicação simples de QtRuby em %{dest} -Comment[ru]=Простое приложение QtRuby создано в %{dest} -Comment[sk]=Jednoduchá QtRuby aplikácia bola vytvorená v %{dest} -Comment[sr]=Једноставан QtRuby програм направљен је у %{dest} -Comment[sr@Latn]=Jednostavan QtRuby program napravljen je u %{dest} -Comment[sv]=Ett enkelt QtRuby-program skapades i %{dest} -Comment[tr]=Basit bir QtRuby uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个简单的 QtRuby 应用程序 -Comment[zh_TW]=一個簡單的 QtRuby 應用程式框架已建立於 %{dest} diff --git a/languages/ruby/app_templates/qtruby4app/CMakeLists.txt b/languages/ruby/app_templates/qtruby4app/CMakeLists.txt index 9bf5e3b6..e5045380 100644 --- a/languages/ruby/app_templates/qtruby4app/CMakeLists.txt +++ b/languages/ruby/app_templates/qtruby4app/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( qtruby4app.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qtruby4app.tar.gz qtruby4app.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qtruby4app.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qtruby4app.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/qtruby4app/Makefile.am b/languages/ruby/app_templates/qtruby4app/Makefile.am index 09709aed..8f4adecd 100644 --- a/languages/ruby/app_templates/qtruby4app/Makefile.am +++ b/languages/ruby/app_templates/qtruby4app/Makefile.am @@ -5,10 +5,10 @@ dataFiles = main.rb qtruby4app.rb qtruby4app.png qtruby4app.tdevelop \ templateName = qtruby4app ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/qtruby4app/app.filelist b/languages/ruby/app_templates/qtruby4app/app.filelist index 23f4bc76..339e6998 100644 --- a/languages/ruby/app_templates/qtruby4app/app.filelist +++ b/languages/ruby/app_templates/qtruby4app/app.filelist @@ -1,3 +1,3 @@ -# TDevelop Custom Project File List +# KDevelop Custom Project File List main.rb %{APPNAMELC}.rb diff --git a/languages/ruby/app_templates/qtruby4app/qtruby4app.kdevtemplate b/languages/ruby/app_templates/qtruby4app/qtruby4app.kdevtemplate new file mode 100644 index 00000000..70df2248 --- /dev/null +++ b/languages/ruby/app_templates/qtruby4app/qtruby4app.kdevtemplate @@ -0,0 +1,166 @@ +# KDE Config File +[General] +Name=QtRuby4 Application +Name[ca]=Aplicació en QtRuby4 +Name[da]=QtRuby4-program +Name[de]=QtRuby4-Anwendung +Name[el]=Εφαρμογή QtRuby4 +Name[es]=Aplicación en QtRuby4 +Name[et]=QtRuby4 rakendus +Name[hu]=QtRuby4-alapú alkalmazás +Name[it]=Applicazione QtRuby4 +Name[nds]=QtRuby4-Programm +Name[nl]=QtRuby4-programma +Name[pl]=Program w QtRuby +Name[pt]=Aplicação em QtRuby4 +Name[pt_BR]=Aplicativo QtRuby4 +Name[ru]=Приложение QtRuby4 +Name[sk]=QtRuby4 Aplikácia +Name[sr]=QtRuby4 програм +Name[sr@Latn]=QtRuby4 program +Name[sv]=QtRuby 4-program +Name[zh_TW]=QtRuby4 應用程式 +Icon=qtruby4app.png +Category=Ruby/Qt +Category[fr]=Ruby/Qt +Comment=Generate a QtRuby4 based application (crossplatform compatible) - Needs QtRuby4 +Comment[ca]=Genera una aplicació basada en QtRuby4 (compatible plataforma creuada) - Necessita QtRuby4 +Comment[da]=Genererer et QtRuby4-baseret program (krydsplatformskompatibelt) - kræver QtRuby4 +Comment[de]=Erstellt eine auf QtRuby4 basierende Anwendung (plattformunabhängig). - Benötigt QtRuby4. +Comment[el]=Δημιουργία μιας εφαρμογής βασισμένης στην QtRuby4 (πολλαπλών πλατφόρμων) - Απαιτείται η QtRuby4 +Comment[es]=Genera una aplicación basada en QtRuby4 (con compatibilidad multiplataforma) - Necesita QtRuby4 +Comment[et]=Rakenduse loomine QtRuby4 põhjal (multiplatvormne) - vajalik on QtRuby4 +Comment[hu]=Létrehoz egy QtRuby4-alapú, keresztfordításra is alkalmas alkalmazást - QtRuby4-et igényel +Comment[it]=Genera un'applicazione basata su QtRuby4 (compatibile multipiattaforma) - serve QtRuby4 +Comment[nds]=Stellt en op QRubyt4 opbuut Programm op (över Bedriefümgeven weg kompatibel) - QtRuby4 deit noot +Comment[nl]=Genereer een QtRuby4-gebaseerd programma (crossplatform-compatible) - heeft QtRuby4 nodig +Comment[pl]=Generuje program używający QtRuby4 (wieloplatformowy) - wymaga QtRuby4 +Comment[pt]=Gera uma aplicação baseada no QtRuby4 (compatível com várias plataformas) - Necessita do QtRuby4 +Comment[pt_BR]=Gera uma aplicação baseada no QtRuby4 (compatível com várias plataformas) - Necessita do QtRuby4 +Comment[ru]=Создание кроссплатформенного приложения Qt 4 на Ruby. Требует QtRuby4. +Comment[sk]=Vygeneruje aplikáciu založenú na QtRuby4 (multiplatformovo kompatibilnú) - vyžaduje QtRuby4 +Comment[sr]=Прави програм на основи QtRuby4 (прекоплатформски компатибилан) — захтева QtRuby4 +Comment[sr@Latn]=Pravi program na osnovi QtRuby4 (prekoplatformski kompatibilan) — zahteva QtRuby4 +Comment[sv]=Skapar ett QtRuby 4-baserat program (fungerar på andra plattformar). Kräver QtRuby 4. +Comment[zh_TW]=產生一個 QtRuby4 為基礎的應用程式(跨平台相容)─需要 QtRuby4 +FileTemplates=rb,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.rb,%{dest}/ReadMe +Archive=qtruby4app.tar.gz + +[FILE1] +Type=install +Source=%{src}/qtruby4app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/main.rb +Dest=%{dest}/main.rb + +[FILE3] +Type=install +Source=%{src}/qtruby4app.rb +Dest=%{dest}/%{APPNAMELC}.rb + +[FILE4] +Type=install +Source=%{src}/app-Makefile +Dest=%{dest}/Makefile + +[FILE5] +Type=install +Source=%{src}/fileopen.xpm +Dest=%{dest}/fileopen.xpm + +[FILE6] +Type=install +Source=%{src}/filesave.xpm +Dest=%{dest}/filesave.xpm + +[FILE7] +Type=install +Source=%{src}/filenew.xpm +Dest=%{dest}/filenew.xpm + +[FILE8] +Type=install +Source=%{src}/editcopy.xpm +Dest=%{dest}/editcopy.xpm + +[FILE9] +Type=install +Source=%{src}/editpaste.xpm +Dest=%{dest}/editpaste.xpm + +[FILE10] +Type=install +Source=%{src}/editcut.xpm +Dest=%{dest}/editcut.xpm + +[FILE11] +Type=install +Source=%{src}/application.qrc +Dest=%{dest}/application.qrc + +[FILE12] +Type=install +Source=%{src}/ReadMe +Dest=%{dest}/ReadMe + +[FILE13] +Type=install +Source=%{src}/app.filelist +Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist + +[MSG] +Type=message +Comment=A QtRuby4 based application was created in %{dest} +Comment[ca]=Una aplicació basada en QtRuby4 ha estat creada en %{dest} +Comment[da]=Et QtRuby4-baseret program blev oprettet i %{dest} +Comment[de]=Eine auf QtRuby4 basierende Anwendung wurde in %{dest} erstellt. +Comment[el]=Μία εφαρμογή βασισμένη στην QtRuby4 δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación basada en QtRuby4 ha sido creada en %{dest} +Comment[et]=Rakendus QtRuby4 põhjal loodi asukohta %{dest} +Comment[hu]=Létrejött egy QtRuby4-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione basata su QtRuby4 in %{dest} +Comment[nds]=In %{dest} wöör en op QtRuby4 opbuut Programm opstellt. +Comment[nl]=Een QtRuby4-gebaseerd programma is aangemaakt in %{dest} +Comment[pl]=Program używający QtRuby4 został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação baseada em QtRuby4 em %{dest} +Comment[pt_BR]=Foi criada uma aplicação baseada em QtRuby4 em %{dest} +Comment[ru]=Приложение QtRuby4 создано в %{dest} +Comment[sk]=QtRuby4 aplikácia bola vytvorená v %{dest} +Comment[sr]=QtRuby4 програм је направљен у %{dest} +Comment[sr@Latn]=QtRuby4 program je napravljen u %{dest} +Comment[sv]=Ett program baserat på QtRuby 4 skapades i %{dest} +Comment[zh_TW]=一個 QtRuby4 為基礎的應用程式框架已建立於 %{dest} + +Comment= + +[DESIGNER] +Type=value +ValueType=QString +Value=DESIGNER +Comment=Absolute Path for Designer (Qt4). +Comment[ca]=Ruta absoluta per a Designer (Qt4). +Comment[da]=Absolut søgesti til Designer (Qt4). +Comment[de]=Absoluter Pfad für Designer (Qt4). +Comment[el]=Απόλυτη διαδρομή για τον Σχεδιαστή (Qt4). +Comment[es]=Ruta completa para Designer (Qt4). +Comment[et]=Disaineri (Qt4) absoluutne asukoht. +Comment[fr]=Chemin absolu pour Designer (Qt4). +Comment[hu]=A Designer (Qt4) teljes elérési útja +Comment[it]=Percorso assoluto del Designer (Qt4). +Comment[ja]=Designer (Qt4) の絶対パス +Comment[nds]=Afsluut Padd för Designer (Qt4) +Comment[nl]=Absoluut pad naar Designer (Qt4). +Comment[pl]=Ścieżka bezwzględna do Designera (Qt4). +Comment[pt]=Localização Absoluta do Designer (Qt4). +Comment[pt_BR]=Localização Absoluta do Designer (Qt4). +Comment[ru]=Полный путь к Designer (Qt 4). +Comment[sk]=Absolútna cesta ku Designer (Qt4). +Comment[sr]=Апсолутна путања до Designer-а (Qt4). +Comment[sr@Latn]=Apsolutna putanja do Designer-a (Qt4). +Comment[sv]=Absolut sökväg till Designer (Qt4). +Comment[zh_TW]=設計家(Qt4)的絕對路徑 +Default= diff --git a/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevelop b/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevelop index 84a1a8e3..3df7f3ab 100644 --- a/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevelop +++ b/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevelop @@ -4,19 +4,19 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Ruby Ruby Qt - + - - + + @@ -27,8 +27,8 @@ false CVS,.svn - - + + bash bash_bugs @@ -63,21 +63,21 @@ KDE Libraries (Doxygen) - + - + - - + + ruby false ./main.rb - + diff --git a/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevtemplate b/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevtemplate deleted file mode 100644 index 70df2248..00000000 --- a/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevtemplate +++ /dev/null @@ -1,166 +0,0 @@ -# KDE Config File -[General] -Name=QtRuby4 Application -Name[ca]=Aplicació en QtRuby4 -Name[da]=QtRuby4-program -Name[de]=QtRuby4-Anwendung -Name[el]=Εφαρμογή QtRuby4 -Name[es]=Aplicación en QtRuby4 -Name[et]=QtRuby4 rakendus -Name[hu]=QtRuby4-alapú alkalmazás -Name[it]=Applicazione QtRuby4 -Name[nds]=QtRuby4-Programm -Name[nl]=QtRuby4-programma -Name[pl]=Program w QtRuby -Name[pt]=Aplicação em QtRuby4 -Name[pt_BR]=Aplicativo QtRuby4 -Name[ru]=Приложение QtRuby4 -Name[sk]=QtRuby4 Aplikácia -Name[sr]=QtRuby4 програм -Name[sr@Latn]=QtRuby4 program -Name[sv]=QtRuby 4-program -Name[zh_TW]=QtRuby4 應用程式 -Icon=qtruby4app.png -Category=Ruby/Qt -Category[fr]=Ruby/Qt -Comment=Generate a QtRuby4 based application (crossplatform compatible) - Needs QtRuby4 -Comment[ca]=Genera una aplicació basada en QtRuby4 (compatible plataforma creuada) - Necessita QtRuby4 -Comment[da]=Genererer et QtRuby4-baseret program (krydsplatformskompatibelt) - kræver QtRuby4 -Comment[de]=Erstellt eine auf QtRuby4 basierende Anwendung (plattformunabhängig). - Benötigt QtRuby4. -Comment[el]=Δημιουργία μιας εφαρμογής βασισμένης στην QtRuby4 (πολλαπλών πλατφόρμων) - Απαιτείται η QtRuby4 -Comment[es]=Genera una aplicación basada en QtRuby4 (con compatibilidad multiplataforma) - Necesita QtRuby4 -Comment[et]=Rakenduse loomine QtRuby4 põhjal (multiplatvormne) - vajalik on QtRuby4 -Comment[hu]=Létrehoz egy QtRuby4-alapú, keresztfordításra is alkalmas alkalmazást - QtRuby4-et igényel -Comment[it]=Genera un'applicazione basata su QtRuby4 (compatibile multipiattaforma) - serve QtRuby4 -Comment[nds]=Stellt en op QRubyt4 opbuut Programm op (över Bedriefümgeven weg kompatibel) - QtRuby4 deit noot -Comment[nl]=Genereer een QtRuby4-gebaseerd programma (crossplatform-compatible) - heeft QtRuby4 nodig -Comment[pl]=Generuje program używający QtRuby4 (wieloplatformowy) - wymaga QtRuby4 -Comment[pt]=Gera uma aplicação baseada no QtRuby4 (compatível com várias plataformas) - Necessita do QtRuby4 -Comment[pt_BR]=Gera uma aplicação baseada no QtRuby4 (compatível com várias plataformas) - Necessita do QtRuby4 -Comment[ru]=Создание кроссплатформенного приложения Qt 4 на Ruby. Требует QtRuby4. -Comment[sk]=Vygeneruje aplikáciu založenú na QtRuby4 (multiplatformovo kompatibilnú) - vyžaduje QtRuby4 -Comment[sr]=Прави програм на основи QtRuby4 (прекоплатформски компатибилан) — захтева QtRuby4 -Comment[sr@Latn]=Pravi program na osnovi QtRuby4 (prekoplatformski kompatibilan) — zahteva QtRuby4 -Comment[sv]=Skapar ett QtRuby 4-baserat program (fungerar på andra plattformar). Kräver QtRuby 4. -Comment[zh_TW]=產生一個 QtRuby4 為基礎的應用程式(跨平台相容)─需要 QtRuby4 -FileTemplates=rb,ShellStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.rb,%{dest}/ReadMe -Archive=qtruby4app.tar.gz - -[FILE1] -Type=install -Source=%{src}/qtruby4app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/main.rb -Dest=%{dest}/main.rb - -[FILE3] -Type=install -Source=%{src}/qtruby4app.rb -Dest=%{dest}/%{APPNAMELC}.rb - -[FILE4] -Type=install -Source=%{src}/app-Makefile -Dest=%{dest}/Makefile - -[FILE5] -Type=install -Source=%{src}/fileopen.xpm -Dest=%{dest}/fileopen.xpm - -[FILE6] -Type=install -Source=%{src}/filesave.xpm -Dest=%{dest}/filesave.xpm - -[FILE7] -Type=install -Source=%{src}/filenew.xpm -Dest=%{dest}/filenew.xpm - -[FILE8] -Type=install -Source=%{src}/editcopy.xpm -Dest=%{dest}/editcopy.xpm - -[FILE9] -Type=install -Source=%{src}/editpaste.xpm -Dest=%{dest}/editpaste.xpm - -[FILE10] -Type=install -Source=%{src}/editcut.xpm -Dest=%{dest}/editcut.xpm - -[FILE11] -Type=install -Source=%{src}/application.qrc -Dest=%{dest}/application.qrc - -[FILE12] -Type=install -Source=%{src}/ReadMe -Dest=%{dest}/ReadMe - -[FILE13] -Type=install -Source=%{src}/app.filelist -Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist - -[MSG] -Type=message -Comment=A QtRuby4 based application was created in %{dest} -Comment[ca]=Una aplicació basada en QtRuby4 ha estat creada en %{dest} -Comment[da]=Et QtRuby4-baseret program blev oprettet i %{dest} -Comment[de]=Eine auf QtRuby4 basierende Anwendung wurde in %{dest} erstellt. -Comment[el]=Μία εφαρμογή βασισμένη στην QtRuby4 δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación basada en QtRuby4 ha sido creada en %{dest} -Comment[et]=Rakendus QtRuby4 põhjal loodi asukohta %{dest} -Comment[hu]=Létrejött egy QtRuby4-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione basata su QtRuby4 in %{dest} -Comment[nds]=In %{dest} wöör en op QtRuby4 opbuut Programm opstellt. -Comment[nl]=Een QtRuby4-gebaseerd programma is aangemaakt in %{dest} -Comment[pl]=Program używający QtRuby4 został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação baseada em QtRuby4 em %{dest} -Comment[pt_BR]=Foi criada uma aplicação baseada em QtRuby4 em %{dest} -Comment[ru]=Приложение QtRuby4 создано в %{dest} -Comment[sk]=QtRuby4 aplikácia bola vytvorená v %{dest} -Comment[sr]=QtRuby4 програм је направљен у %{dest} -Comment[sr@Latn]=QtRuby4 program je napravljen u %{dest} -Comment[sv]=Ett program baserat på QtRuby 4 skapades i %{dest} -Comment[zh_TW]=一個 QtRuby4 為基礎的應用程式框架已建立於 %{dest} - -Comment= - -[DESIGNER] -Type=value -ValueType=QString -Value=DESIGNER -Comment=Absolute Path for Designer (Qt4). -Comment[ca]=Ruta absoluta per a Designer (Qt4). -Comment[da]=Absolut søgesti til Designer (Qt4). -Comment[de]=Absoluter Pfad für Designer (Qt4). -Comment[el]=Απόλυτη διαδρομή για τον Σχεδιαστή (Qt4). -Comment[es]=Ruta completa para Designer (Qt4). -Comment[et]=Disaineri (Qt4) absoluutne asukoht. -Comment[fr]=Chemin absolu pour Designer (Qt4). -Comment[hu]=A Designer (Qt4) teljes elérési útja -Comment[it]=Percorso assoluto del Designer (Qt4). -Comment[ja]=Designer (Qt4) の絶対パス -Comment[nds]=Afsluut Padd för Designer (Qt4) -Comment[nl]=Absoluut pad naar Designer (Qt4). -Comment[pl]=Ścieżka bezwzględna do Designera (Qt4). -Comment[pt]=Localização Absoluta do Designer (Qt4). -Comment[pt_BR]=Localização Absoluta do Designer (Qt4). -Comment[ru]=Полный путь к Designer (Qt 4). -Comment[sk]=Absolútna cesta ku Designer (Qt4). -Comment[sr]=Апсолутна путања до Designer-а (Qt4). -Comment[sr@Latn]=Apsolutna putanja do Designer-a (Qt4). -Comment[sv]=Absolut sökväg till Designer (Qt4). -Comment[zh_TW]=設計家(Qt4)的絕對路徑 -Default= diff --git a/languages/ruby/app_templates/qtrubyapp/CMakeLists.txt b/languages/ruby/app_templates/qtrubyapp/CMakeLists.txt index c0a0429e..37f6e5b1 100644 --- a/languages/ruby/app_templates/qtrubyapp/CMakeLists.txt +++ b/languages/ruby/app_templates/qtrubyapp/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( qtrubyapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qtrubyapp.tar.gz qtrubyapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qtrubyapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qtrubyapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/qtrubyapp/Makefile.am b/languages/ruby/app_templates/qtrubyapp/Makefile.am index 2ea3aa4b..7777b886 100644 --- a/languages/ruby/app_templates/qtrubyapp/Makefile.am +++ b/languages/ruby/app_templates/qtrubyapp/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.rb qtrubyapp.rb qtrubyapp.png qtrubyapp.tdevelop \ templateName = qtrubyapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/qtrubyapp/app.filelist b/languages/ruby/app_templates/qtrubyapp/app.filelist index 23f4bc76..339e6998 100644 --- a/languages/ruby/app_templates/qtrubyapp/app.filelist +++ b/languages/ruby/app_templates/qtrubyapp/app.filelist @@ -1,3 +1,3 @@ -# TDevelop Custom Project File List +# KDevelop Custom Project File List main.rb %{APPNAMELC}.rb diff --git a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.kdevtemplate b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.kdevtemplate new file mode 100644 index 00000000..3e2c896a --- /dev/null +++ b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.kdevtemplate @@ -0,0 +1,140 @@ +# KDE Config File +[General] +Name=QtRuby Application +Name[ca]=Aplicació en QtRuby +Name[da]=QtRuby-program +Name[de]=QtRuby-Anwendung +Name[el]=Εφαρμογή QtRuby +Name[es]=Aplicación en QtRuby +Name[et]=QtRuby rakendus +Name[eu]=QtRuby aplikazioa +Name[fa]=کاربرد QtRuby +Name[fr]=Application QtRuby +Name[ga]=Feidhmchlár QtRuby +Name[gl]=Aplicación QtRuby +Name[hu]=QtRuby-alapú alkalmazás +Name[it]=Applicazione QtRuby +Name[ja]=QtRuby アプリケーション +Name[nds]=QtRuby-Programm +Name[ne]=QtRuby अनुप्रयोग +Name[nl]=QtRuby-toepassing +Name[pl]=Program w QtRuby +Name[pt]=Aplicação em QtRuby +Name[pt_BR]=Aplicativo QtRuby +Name[ru]=Приложение QtRuby +Name[sk]=QtRuby Aplikácia +Name[sr]=QtRuby програм +Name[sr@Latn]=QtRuby program +Name[sv]=QtRuby-program +Name[tr]=QtRuby Uygulaması +Name[zh_CN]=QtRuby 应用程序 +Name[zh_TW]=QtRuby 應用程式 +Icon=qtrubyapp.png +Category=Ruby/Qt +Category[fr]=Ruby/Qt +Comment=Generate a QtRuby based application (crossplatform compatible) +Comment[ca]=Genera una aplicació basada en QtRuby (multi plataforma) +Comment[da]=Genererer et QtRuby baseret program (krydsplatform kompatibelt) +Comment[de]=Erstellt eine auf QtRuby basierende Anwendung (plattformunabhängig) +Comment[el]=Δημιουργία μιας εφαρμογής βασισμένης σε QtRuby (συμβατή με πολλαπλές πλατφόρμες) +Comment[es]=Genera una aplicación basada en QtRuby (compatible multiplataforma) +Comment[et]=Rakenduse loomine QtRuby põhjal (mitmeplatvormne) +Comment[eu]=Sortu QtRuby lengoaian oinarritutako aplikazioa (plataforma gurutzatuekin bateragarria) +Comment[fa]=یک کاربرد بر مبنای QtRuby تولید می‌کند )همساز بین سکویی( +Comment[fr]=Génèrer une application basée sur QtRuby (compatible multi-plateforme) +Comment[gl]=Xera unha aplicación baseada en QtRuby (compatibilidade multiplataforma) +Comment[hu]=Létrehoz egy QtRuby-alapú, keresztfordításra is megfelelő alkalmazást +Comment[it]=Genera un'applicazione basata su QtRuby (compatibile multipiattaforma) +Comment[ja]=QtRuby ベースのアプリケーションを作成 (クロスプラットフォーム) +Comment[nds]=Stellt en op QtRuby opbuut Programm op (över Bedriefümgeven weg kompatibel) +Comment[ne]= QtRuby आधारित अनुप्रयोग (क्रसप्लाटफर्म उपयुक्त) उत्पन्न गर्नुहोस् +Comment[nl]=Genereert een QtRuby-toepassing (crossplatform compatible) +Comment[pl]=Generuj program używający QtRuby (wieloplatformowy) +Comment[pt]=Gera uma aplicação baseada em QtRuby (compatível com várias plataformas) +Comment[pt_BR]=Gera um aplicativo baseado no QtRuby (compatível com várias plataformas) +Comment[ru]=Создание кроссплатформенного приложения на QtRuby +Comment[sk]=Vygeneruje QtRuby aplikáciu (multiplatformovo kompatibilnú) +Comment[sr]=Прави програм на основу QtRuby-ја (прекоплатформски компатибилан) +Comment[sr@Latn]=Pravi program na osnovu QtRuby-ja (prekoplatformski kompatibilan) +Comment[sv]=Skapa ett program baserat på QtRuby (fungerar på andra plattformar) +Comment[tr]=QtRuby tabanlı bir uygulama yarat (platformlararası geçimli) +Comment[zh_TW]=產生一個 QtRuby 為基礎的應用程式(跨平台相容) +FileTemplates=rb,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.rb,%{dest}/README +Archive=qtrubyapp.tar.gz + +[FILE1] +Type=install +Source=%{src}/qtrubyapp.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/main.rb +Dest=%{dest}/main.rb + +[FILE3] +Type=install +Source=%{src}/qtrubyapp.rb +Dest=%{dest}/%{APPNAMELC}.rb + +[FILE4] +Type=install +Source=%{src}/fileopen.xpm +Dest=%{dest}/fileopen.xpm + +[FILE5] +Type=install +Source=%{src}/filesave.xpm +Dest=%{dest}/filesave.xpm + +[FILE6] +Type=install +Source=%{src}/fileprint.xpm +Dest=%{dest}/fileprint.xpm + +[FILE7] +Type=install +Source=%{src}/app-Makefile +Dest=%{dest}/Makefile + +[FILE8] +Type=install +Source=%{src}/app.filelist +Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist + +[FILE9] +Type=install +Source=%{src}/README +Dest=%{dest}/README + +[MSG] +Type=message +Comment=A QtRuby based application was created in %{dest} +Comment[ca]=Una aplicació basada en QtRuby ha estat creada en %{dest} +Comment[da]=Et QtRuby baseret program blev oprettet i %{dest} +Comment[de]=Eine auf QtRuby basierende Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή βασισμένη σε QtRuby δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación basada en QtRuby ha sido creada en %{dest} +Comment[et]=Rakendus QtRuby põhjal loodi asukohta %{dest} +Comment[eu]=QtRuby lengoaian oinarritutako aplikazioa sortu da hemen: %{dest} +Comment[fa]=یک کاربرد بر مبنای QtRuby در %{dest} ایجاد شد +Comment[fr]=Une application basée sur QtRuby a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár bunaithe ar QtRuby i %{dest} +Comment[gl]=Creouse unha aplicación baseada en QtRuby en %{dest} +Comment[hu]=Létrejött egy QtRuby-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione basata su QtRuby in %{dest} +Comment[ja]=QtRuby ベースのアプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op QtRuby opbuut Programm opstellt. +Comment[ne]=QtRuby आधारित अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een QtRuby-toepassing is aangemaakt in %{dest} +Comment[pl]=Program używający QtRuby został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação baseada em QtRuby em %{dest} +Comment[pt_BR]=Foi criada uma aplicação baseada em QtRuby em %{dest} +Comment[ru]=Приложение QtRuby создано в %{dest} +Comment[sk]=QtRuby aplikácia bola vytvorená v %{dest} +Comment[sr]=QtRuby програм је направљен у %{dest} +Comment[sr@Latn]=QtRuby program je napravljen u %{dest} +Comment[sv]=Ett program baserat på QtRuby skapades i %{dest} +Comment[tr]=Bir QtRuby tabanlı uygulama %{dest} içinde yaratıldı. +Comment[zh_TW]=一個 QtRuby 為基礎的應用程式框架已建立於 %{dest} diff --git a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevelop b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevelop index 84a1a8e3..3df7f3ab 100644 --- a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevelop +++ b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevelop @@ -4,19 +4,19 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Ruby Ruby Qt - + - - + + @@ -27,8 +27,8 @@ false CVS,.svn - - + + bash bash_bugs @@ -63,21 +63,21 @@ KDE Libraries (Doxygen) - + - + - - + + ruby false ./main.rb - + diff --git a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevtemplate b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevtemplate deleted file mode 100644 index 3e2c896a..00000000 --- a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevtemplate +++ /dev/null @@ -1,140 +0,0 @@ -# KDE Config File -[General] -Name=QtRuby Application -Name[ca]=Aplicació en QtRuby -Name[da]=QtRuby-program -Name[de]=QtRuby-Anwendung -Name[el]=Εφαρμογή QtRuby -Name[es]=Aplicación en QtRuby -Name[et]=QtRuby rakendus -Name[eu]=QtRuby aplikazioa -Name[fa]=کاربرد QtRuby -Name[fr]=Application QtRuby -Name[ga]=Feidhmchlár QtRuby -Name[gl]=Aplicación QtRuby -Name[hu]=QtRuby-alapú alkalmazás -Name[it]=Applicazione QtRuby -Name[ja]=QtRuby アプリケーション -Name[nds]=QtRuby-Programm -Name[ne]=QtRuby अनुप्रयोग -Name[nl]=QtRuby-toepassing -Name[pl]=Program w QtRuby -Name[pt]=Aplicação em QtRuby -Name[pt_BR]=Aplicativo QtRuby -Name[ru]=Приложение QtRuby -Name[sk]=QtRuby Aplikácia -Name[sr]=QtRuby програм -Name[sr@Latn]=QtRuby program -Name[sv]=QtRuby-program -Name[tr]=QtRuby Uygulaması -Name[zh_CN]=QtRuby 应用程序 -Name[zh_TW]=QtRuby 應用程式 -Icon=qtrubyapp.png -Category=Ruby/Qt -Category[fr]=Ruby/Qt -Comment=Generate a QtRuby based application (crossplatform compatible) -Comment[ca]=Genera una aplicació basada en QtRuby (multi plataforma) -Comment[da]=Genererer et QtRuby baseret program (krydsplatform kompatibelt) -Comment[de]=Erstellt eine auf QtRuby basierende Anwendung (plattformunabhängig) -Comment[el]=Δημιουργία μιας εφαρμογής βασισμένης σε QtRuby (συμβατή με πολλαπλές πλατφόρμες) -Comment[es]=Genera una aplicación basada en QtRuby (compatible multiplataforma) -Comment[et]=Rakenduse loomine QtRuby põhjal (mitmeplatvormne) -Comment[eu]=Sortu QtRuby lengoaian oinarritutako aplikazioa (plataforma gurutzatuekin bateragarria) -Comment[fa]=یک کاربرد بر مبنای QtRuby تولید می‌کند )همساز بین سکویی( -Comment[fr]=Génèrer une application basée sur QtRuby (compatible multi-plateforme) -Comment[gl]=Xera unha aplicación baseada en QtRuby (compatibilidade multiplataforma) -Comment[hu]=Létrehoz egy QtRuby-alapú, keresztfordításra is megfelelő alkalmazást -Comment[it]=Genera un'applicazione basata su QtRuby (compatibile multipiattaforma) -Comment[ja]=QtRuby ベースのアプリケーションを作成 (クロスプラットフォーム) -Comment[nds]=Stellt en op QtRuby opbuut Programm op (över Bedriefümgeven weg kompatibel) -Comment[ne]= QtRuby आधारित अनुप्रयोग (क्रसप्लाटफर्म उपयुक्त) उत्पन्न गर्नुहोस् -Comment[nl]=Genereert een QtRuby-toepassing (crossplatform compatible) -Comment[pl]=Generuj program używający QtRuby (wieloplatformowy) -Comment[pt]=Gera uma aplicação baseada em QtRuby (compatível com várias plataformas) -Comment[pt_BR]=Gera um aplicativo baseado no QtRuby (compatível com várias plataformas) -Comment[ru]=Создание кроссплатформенного приложения на QtRuby -Comment[sk]=Vygeneruje QtRuby aplikáciu (multiplatformovo kompatibilnú) -Comment[sr]=Прави програм на основу QtRuby-ја (прекоплатформски компатибилан) -Comment[sr@Latn]=Pravi program na osnovu QtRuby-ja (prekoplatformski kompatibilan) -Comment[sv]=Skapa ett program baserat på QtRuby (fungerar på andra plattformar) -Comment[tr]=QtRuby tabanlı bir uygulama yarat (platformlararası geçimli) -Comment[zh_TW]=產生一個 QtRuby 為基礎的應用程式(跨平台相容) -FileTemplates=rb,ShellStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.rb,%{dest}/README -Archive=qtrubyapp.tar.gz - -[FILE1] -Type=install -Source=%{src}/qtrubyapp.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/main.rb -Dest=%{dest}/main.rb - -[FILE3] -Type=install -Source=%{src}/qtrubyapp.rb -Dest=%{dest}/%{APPNAMELC}.rb - -[FILE4] -Type=install -Source=%{src}/fileopen.xpm -Dest=%{dest}/fileopen.xpm - -[FILE5] -Type=install -Source=%{src}/filesave.xpm -Dest=%{dest}/filesave.xpm - -[FILE6] -Type=install -Source=%{src}/fileprint.xpm -Dest=%{dest}/fileprint.xpm - -[FILE7] -Type=install -Source=%{src}/app-Makefile -Dest=%{dest}/Makefile - -[FILE8] -Type=install -Source=%{src}/app.filelist -Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist - -[FILE9] -Type=install -Source=%{src}/README -Dest=%{dest}/README - -[MSG] -Type=message -Comment=A QtRuby based application was created in %{dest} -Comment[ca]=Una aplicació basada en QtRuby ha estat creada en %{dest} -Comment[da]=Et QtRuby baseret program blev oprettet i %{dest} -Comment[de]=Eine auf QtRuby basierende Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή βασισμένη σε QtRuby δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación basada en QtRuby ha sido creada en %{dest} -Comment[et]=Rakendus QtRuby põhjal loodi asukohta %{dest} -Comment[eu]=QtRuby lengoaian oinarritutako aplikazioa sortu da hemen: %{dest} -Comment[fa]=یک کاربرد بر مبنای QtRuby در %{dest} ایجاد شد -Comment[fr]=Une application basée sur QtRuby a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár bunaithe ar QtRuby i %{dest} -Comment[gl]=Creouse unha aplicación baseada en QtRuby en %{dest} -Comment[hu]=Létrejött egy QtRuby-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione basata su QtRuby in %{dest} -Comment[ja]=QtRuby ベースのアプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en op QtRuby opbuut Programm opstellt. -Comment[ne]=QtRuby आधारित अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een QtRuby-toepassing is aangemaakt in %{dest} -Comment[pl]=Program używający QtRuby został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação baseada em QtRuby em %{dest} -Comment[pt_BR]=Foi criada uma aplicação baseada em QtRuby em %{dest} -Comment[ru]=Приложение QtRuby создано в %{dest} -Comment[sk]=QtRuby aplikácia bola vytvorená v %{dest} -Comment[sr]=QtRuby програм је направљен у %{dest} -Comment[sr@Latn]=QtRuby program je napravljen u %{dest} -Comment[sv]=Ett program baserat på QtRuby skapades i %{dest} -Comment[tr]=Bir QtRuby tabanlı uygulama %{dest} içinde yaratıldı. -Comment[zh_TW]=一個 QtRuby 為基礎的應用程式框架已建立於 %{dest} diff --git a/languages/ruby/app_templates/rails/CMakeLists.txt b/languages/ruby/app_templates/rails/CMakeLists.txt index 8d8fb1e2..6f53dd0d 100644 --- a/languages/ruby/app_templates/rails/CMakeLists.txt +++ b/languages/ruby/app_templates/rails/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( rails.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/rails.tar.gz rails.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - rails.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + rails.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/rails/Makefile.am b/languages/ruby/app_templates/rails/Makefile.am index 915e789c..9d89a708 100644 --- a/languages/ruby/app_templates/rails/Makefile.am +++ b/languages/ruby/app_templates/rails/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.tdevelop templateName= rails ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/rails/app.tdevelop b/languages/ruby/app_templates/rails/app.tdevelop index 272185c7..17a0e6a1 100644 --- a/languages/ruby/app_templates/rails/app.tdevelop +++ b/languages/ruby/app_templates/rails/app.tdevelop @@ -13,16 +13,16 @@ KDevDoxygen KDevdistpart KDevVisualBoyAdvance - TDevDebugger + KDevDebugger
    - + *.rb,*.rhtml,*.rxml,*.rjs,*.css,*.js,*.html.erb,*.js.rjs,*.xml.builder *~ - - + + @@ -34,8 +34,8 @@ - - + + ada ada_bugs_gcc @@ -82,8 +82,8 @@ KDE Libraries (Doxygen) - - + + @@ -95,13 +95,13 @@ - - + + ruby %{dest}/script/console false script/server - + diff --git a/languages/ruby/app_templates/rails/rails.kdevtemplate b/languages/ruby/app_templates/rails/rails.kdevtemplate new file mode 100644 index 00000000..5ed2d78d --- /dev/null +++ b/languages/ruby/app_templates/rails/rails.kdevtemplate @@ -0,0 +1,72 @@ +# KDE Config File +[General] +Name=Ruby On Rails +Name[de]=Ruby on Rails +Name[ne]=रूबि अन रेल्स +Name[sv]=Ruby on Rails +Icon=rails.png +Category=Ruby +Comment=This generates a Ruby On Rails project +Comment[ca]=Genera un projecte Ruby On Rails +Comment[da]=Dette genererer et Ruby On Rails projekt +Comment[de]=Erstellt ein einfaches Ruby-on-Rails-Projekt +Comment[el]=Δημιουργεί ένα έργο Ruby On Rails +Comment[es]=Genera un proyecto Ruby On Rails +Comment[et]=Lihtsa Ruby On Rails projekti loomine +Comment[eu]=Ruby On Rails proiektu bat sortzen du. +Comment[fa]=یک پروژۀ Ruby On Rails تولید می‌کند +Comment[fr]=Génère un projet Ruby On Rails +Comment[gl]=Isto xera un proxecto de Ruby On Rails +Comment[hu]=Létrehoz egy Ruby On Rails-projektet +Comment[it]=Genera un progetto Ruby On Rails +Comment[ja]=Ruby On Rails プロジェクトを作成します +Comment[nds]=Stellt en eenfach "Ruby-On-Rails"-Projekt op +Comment[ne]=यसले रूबि अन रेल्स परियोजना उत्पन्न गर्दछ +Comment[nl]=Genereert een Ruby On Rails-project. +Comment[pl]=Generuje projekt Ruby On Rails +Comment[pt]=Gera um projecto de Ruby On Rails +Comment[pt_BR]=Gera um projecto de Ruby On Rails +Comment[ru]=Создание проекта на Ruby On Rails +Comment[sk]=Vygeneruje Ruby On Rails projekt +Comment[sr]=Прави једноставан Ruby On Rails пројекат +Comment[sr@Latn]=Pravi jednostavan Ruby On Rails projekat +Comment[sv]=Det här skapar ett Ruby on Rails-projekt +Comment[zh_TW]=產生一個 Ruby On Rails 專案 +FileTemplates=rb,ShellStyle,rhtml,XMLStyle,html.erb,XMLStyle,rxml,XMLStyle,xml.builder,XMLStyle,rjs,ShellStyle,js.rjs,ShellStyle,css,CPPStyle,js,CPPStyle +ShowFilesAfterGeneration=%{dest}/script/server +Archive=rails.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MSG] +Type=message +Comment=A Ruby On Rails project created in %{dest} +Comment[ca]=A simple projecte Ruby On Rails ha estat creat en %{dest} +Comment[da]=Et Ruby On Rails projekt oprettet i %{dest} +Comment[de]=Ein einfaches Ruby-on-Rails-Project wurde in %{dest} erstellt. +Comment[el]=Ένα έργο Ruby On Rails δημιουργήθηκε στο %{dest}. +Comment[es]=Un proyecto de Ruby On Rails ha sido creado en %{dest}. +Comment[et]=Lihtne Ruby On Rails projekt loodi asukohta %{dest}. +Comment[eu]=Ruby On Rails proiektu bat sortu da hemen: %{dest}. +Comment[fa]=یک پروژۀ Ruby On Rails در %{dest} ایجاد شد +Comment[fr]=Un projet Ruby On Rails a été créé dans %{dest} +Comment[gl]=Creouse un proxecto de Ruby On Rails en %{dest} +Comment[hu]=Létrejött egy Ruby On Rails-projekt itt: %{dest} +Comment[it]=È stato creato un progetto Ruby On Rails in %{dest} +Comment[ja]=Ruby On Rails プロジェクトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach "Ruby-On-Rails"-Projekt opstellt. +Comment[ne]=रूबि अन रेल्स परियोजना %{dest} मा सिर्जना गरिन्छ +Comment[nl]=Een eenvoudig Ruby On Rails-project is aangemaakt in %{dest}. +Comment[pl]=Projekt Ruby On Rails stworzony w %{dest} +Comment[pt]=Foi criado um projecto de Ruby on Rails em %{dest} +Comment[pt_BR]=Foi criado um projecto de Ruby on Rails em %{dest} +Comment[ru]=Проект на Ruby On Rails создан в %{dest} +Comment[sk]=Ruby On Rails projekt bol vytvorený v %{dest} +Comment[sr]=Ruby On Rails пројекат направљен је у %{dest} +Comment[sr@Latn]=Ruby On Rails projekat napravljen je u %{dest} +Comment[sv]=Ett Ruby on Rails-projekt skapades i %{dest} +Comment[zh_TW]=一個 Ruby On Rails 專案已建立於 %{dest} diff --git a/languages/ruby/app_templates/rails/rails.tdevtemplate b/languages/ruby/app_templates/rails/rails.tdevtemplate deleted file mode 100644 index 5ed2d78d..00000000 --- a/languages/ruby/app_templates/rails/rails.tdevtemplate +++ /dev/null @@ -1,72 +0,0 @@ -# KDE Config File -[General] -Name=Ruby On Rails -Name[de]=Ruby on Rails -Name[ne]=रूबि अन रेल्स -Name[sv]=Ruby on Rails -Icon=rails.png -Category=Ruby -Comment=This generates a Ruby On Rails project -Comment[ca]=Genera un projecte Ruby On Rails -Comment[da]=Dette genererer et Ruby On Rails projekt -Comment[de]=Erstellt ein einfaches Ruby-on-Rails-Projekt -Comment[el]=Δημιουργεί ένα έργο Ruby On Rails -Comment[es]=Genera un proyecto Ruby On Rails -Comment[et]=Lihtsa Ruby On Rails projekti loomine -Comment[eu]=Ruby On Rails proiektu bat sortzen du. -Comment[fa]=یک پروژۀ Ruby On Rails تولید می‌کند -Comment[fr]=Génère un projet Ruby On Rails -Comment[gl]=Isto xera un proxecto de Ruby On Rails -Comment[hu]=Létrehoz egy Ruby On Rails-projektet -Comment[it]=Genera un progetto Ruby On Rails -Comment[ja]=Ruby On Rails プロジェクトを作成します -Comment[nds]=Stellt en eenfach "Ruby-On-Rails"-Projekt op -Comment[ne]=यसले रूबि अन रेल्स परियोजना उत्पन्न गर्दछ -Comment[nl]=Genereert een Ruby On Rails-project. -Comment[pl]=Generuje projekt Ruby On Rails -Comment[pt]=Gera um projecto de Ruby On Rails -Comment[pt_BR]=Gera um projecto de Ruby On Rails -Comment[ru]=Создание проекта на Ruby On Rails -Comment[sk]=Vygeneruje Ruby On Rails projekt -Comment[sr]=Прави једноставан Ruby On Rails пројекат -Comment[sr@Latn]=Pravi jednostavan Ruby On Rails projekat -Comment[sv]=Det här skapar ett Ruby on Rails-projekt -Comment[zh_TW]=產生一個 Ruby On Rails 專案 -FileTemplates=rb,ShellStyle,rhtml,XMLStyle,html.erb,XMLStyle,rxml,XMLStyle,xml.builder,XMLStyle,rjs,ShellStyle,js.rjs,ShellStyle,css,CPPStyle,js,CPPStyle -ShowFilesAfterGeneration=%{dest}/script/server -Archive=rails.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MSG] -Type=message -Comment=A Ruby On Rails project created in %{dest} -Comment[ca]=A simple projecte Ruby On Rails ha estat creat en %{dest} -Comment[da]=Et Ruby On Rails projekt oprettet i %{dest} -Comment[de]=Ein einfaches Ruby-on-Rails-Project wurde in %{dest} erstellt. -Comment[el]=Ένα έργο Ruby On Rails δημιουργήθηκε στο %{dest}. -Comment[es]=Un proyecto de Ruby On Rails ha sido creado en %{dest}. -Comment[et]=Lihtne Ruby On Rails projekt loodi asukohta %{dest}. -Comment[eu]=Ruby On Rails proiektu bat sortu da hemen: %{dest}. -Comment[fa]=یک پروژۀ Ruby On Rails در %{dest} ایجاد شد -Comment[fr]=Un projet Ruby On Rails a été créé dans %{dest} -Comment[gl]=Creouse un proxecto de Ruby On Rails en %{dest} -Comment[hu]=Létrejött egy Ruby On Rails-projekt itt: %{dest} -Comment[it]=È stato creato un progetto Ruby On Rails in %{dest} -Comment[ja]=Ruby On Rails プロジェクトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach "Ruby-On-Rails"-Projekt opstellt. -Comment[ne]=रूबि अन रेल्स परियोजना %{dest} मा सिर्जना गरिन्छ -Comment[nl]=Een eenvoudig Ruby On Rails-project is aangemaakt in %{dest}. -Comment[pl]=Projekt Ruby On Rails stworzony w %{dest} -Comment[pt]=Foi criado um projecto de Ruby on Rails em %{dest} -Comment[pt_BR]=Foi criado um projecto de Ruby on Rails em %{dest} -Comment[ru]=Проект на Ruby On Rails создан в %{dest} -Comment[sk]=Ruby On Rails projekt bol vytvorený v %{dest} -Comment[sr]=Ruby On Rails пројекат направљен је у %{dest} -Comment[sr@Latn]=Ruby On Rails projekat napravljen je u %{dest} -Comment[sv]=Ett Ruby on Rails-projekt skapades i %{dest} -Comment[zh_TW]=一個 Ruby On Rails 專案已建立於 %{dest} diff --git a/languages/ruby/app_templates/ruby.appwizard b/languages/ruby/app_templates/ruby.appwizard index b5937b62..726daeed 100644 --- a/languages/ruby/app_templates/ruby.appwizard +++ b/languages/ruby/app_templates/ruby.appwizard @@ -1,2 +1,2 @@ [General] -List=rubyhello,qtruby,qtrubyapp,dcopserviceruby,tdeappruby,kxtruby,rails +List=rubyhello,qtruby,qtrubyapp,dcopserviceruby,kappruby,kxtruby,rails diff --git a/languages/ruby/app_templates/rubyhello/CMakeLists.txt b/languages/ruby/app_templates/rubyhello/CMakeLists.txt index 103d97e9..74da59e4 100644 --- a/languages/ruby/app_templates/rubyhello/CMakeLists.txt +++ b/languages/ruby/app_templates/rubyhello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( rubyhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/rubyhello.tar.gz rubyhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - rubyhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + rubyhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/rubyhello/Makefile.am b/languages/ruby/app_templates/rubyhello/Makefile.am index 9afc2af8..5d20526e 100644 --- a/languages/ruby/app_templates/rubyhello/Makefile.am +++ b/languages/ruby/app_templates/rubyhello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.rb app.tdevelop templateName= rubyhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/rubyhello/app.tdevelop b/languages/ruby/app_templates/rubyhello/app.tdevelop index 2023467f..c938d122 100644 --- a/languages/ruby/app_templates/rubyhello/app.tdevelop +++ b/languages/ruby/app_templates/rubyhello/app.tdevelop @@ -13,21 +13,21 @@ KDevDoxygen KDevdistpart KDevVisualBoyAdvance - TDevDebugger + KDevDebugger
    - + *.rb *~ - - + + - - + + ada ada_bugs_gcc @@ -74,18 +74,18 @@ KDE Libraries (Doxygen) - - + + - - + + ./%{APPNAMELC}.rb ruby false - + diff --git a/languages/ruby/app_templates/rubyhello/rubyhello.kdevtemplate b/languages/ruby/app_templates/rubyhello/rubyhello.kdevtemplate new file mode 100644 index 00000000..bce79ff9 --- /dev/null +++ b/languages/ruby/app_templates/rubyhello/rubyhello.kdevtemplate @@ -0,0 +1,105 @@ +# KDE Config File +[General] +Name=Simple Ruby script +Name[ca]=Simple script en Ruby +Name[da]=Simpelt Ruby script +Name[de]=Einfaches Ruby-Skript +Name[el]=Απλό σενάριο Ruby +Name[es]=Guión sencillo en Ruby +Name[et]=Lihtne Ruby skript +Name[eu]=Ruby script sinple bat +Name[fa]=دست‌نوشتۀ سادۀ رابی +Name[fr]=Script Ruby simple +Name[ga]=Script shimplí Ruby +Name[gl]=Script sinxelo en Ruby +Name[hu]=Egyszerű Ruby-szkript +Name[it]=Semplice script Ruby +Name[ja]=簡単な Ruby スクリプト +Name[nds]=Eenfach Ruby-Skript +Name[ne]=साधारण रूबि स्क्रिप्ट +Name[nl]=Eenvoudig Ruby-script +Name[pl]=Prosty skrypt w języku Ruby +Name[pt]=Programa simples em Ruby +Name[pt_BR]=Programa simples em Ruby +Name[ru]=Простой скрипт Ruby +Name[sk]=Jednoduchý Ruby skript +Name[sr]=Једноставна Ruby скрипта +Name[sr@Latn]=Jednostavna Ruby skripta +Name[sv]=Enkelt Ruby-skript +Name[tg]=Скрипти Ruby оддӣ +Name[tr]=Basit Ruby Betiği +Name[zh_CN]=简单的 Ruyb 脚本 +Name[zh_TW]=簡單 Ruby 文稿 +Category=Ruby +Comment=This generates a simplistic 'Hello world' program in Ruby +Comment[ca]=Genera un simple programa de 'Hello world' en Ruby +Comment[da]=Dette genererer et simplistisk 'Goddag verden' program i Ruby +Comment[de]=Erstellt ein einfaches "Hello World"'-Programm in Ruby +Comment[el]=Αυτό δημιουργεί ένα απλό πρόγραμμα 'Γεια σου κόσμε' σε Ruby +Comment[es]=Genera un sencillo programa «Hola mundo» en Ruby +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Rubys +Comment[eu]=Honek "Kaixo mundua" programa sinple bat sortzen du Ruby lengoaian +Comment[fa]=یک برنامۀ سادۀ «Hello world» در رابی تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Ruby +Comment[gl]=Isto xera un programa sinxelo 'Ola mundo' en Ruby +Comment[hu]=Létrehoz egy egyszerű 'Hello world' programot Rubyban +Comment[it]=Genera un semplice programma di "Hello world" in Ruby +Comment[ja]=簡単な Hello world プログラムを Ruby で作成します +Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm in Ruby op. +Comment[ne]=यसले रूबिमा साधारण 'हेल्लो वोल्ड' कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Dit genereert een eenvoudig Hello World-programma in Ruby +Comment[pl]=Generuje prosty program "Witaj świecie" w języku Ruby +Comment[pt]=Isto gera um programa simples 'Olá mundo' em Ruby +Comment[pt_BR]=Isto gera um programa simples 'Olá mundo' em Ruby +Comment[ru]=Создание простой программы 'Hello world' на Ruby +Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v Ruby +Comment[sr]=Ово прави једноставан „Здраво свете“ у Ruby-ју +Comment[sr@Latn]=Ovo pravi jednostavan „Zdravo svete“ u Ruby-ju +Comment[sv]=Detta skapar ett förenklat 'Hello world'-program i Ruby +Comment[tr]=Bu Ruby'de basit bir "Merhaba Dünya" programı yaratır. +Comment[zh_TW]=產生一個簡單的 Ruby 的 Hello world 程式 +FileTemplates=rb,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.rb +Archive=rubyhello.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app.rb +Dest=%{dest}/%{APPNAMELC}.rb + +[MSG] +Type=message +Comment=A simple ruby script was created in %{dest} +Comment[ca]=Un simple script en Ruby ha estat creat en %{dest} +Comment[da]=Et simpelt ruby script blev oprettet i %{dest} +Comment[de]=Ein einfaches Ruby-Skript wurde in %{dest} erstellt. +Comment[el]=Ένα απλό σενάριο ruby δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo guión en Ruby ha sido creado en %{dest} +Comment[et]=Lihtne Ruby skript loodi asukohta %{dest} +Comment[eu]=Ruby script sinple bat sortu da hemen: %{dest} +Comment[fa]=یک دست‌نوشتۀ سادۀ رابی در %{dest} ایجاد شد +Comment[fr]=Un script Ruby simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh script shimplí ruby i %{dest} +Comment[gl]=Creouse un scrip sinxelo en ruby en %{dest} +Comment[hu]=Létrejött egy egyszerű Ruby-szkript itt: %{dest} +Comment[it]=È stato creato un semplice script ruby in %{dest} +Comment[ja]=簡単な ruby スクリプトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach Ruby-Skript opstellt. +Comment[ne]=साधारण रूबि स्क्रिप्ट %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig Ruby-script is aangemaakt in %{dest} +Comment[pl]=Prosty skrypt w języku Ruby został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples em Ruby em %{dest} +Comment[pt_BR]=Foi criado um programa simples em Ruby em %{dest} +Comment[ru]=Простой скрипт Ruby создан в %{dest} +Comment[sk]=Jednoduchý Ruby skript bol vytvorený v %{dest} +Comment[sr]=Једноставна ruby скрипта направљена је у %{dest} +Comment[sr@Latn]=Jednostavna ruby skripta napravljena je u %{dest} +Comment[sv]=Ett enkelt Ruby-skript skapades i %{dest} +Comment[tr]=Basit bir Ruby betiği %{dest} içinde yaratıldı. +Comment[zh_TW]=一個簡單的 ruby 文稿已建立於 %{dest} diff --git a/languages/ruby/app_templates/rubyhello/rubyhello.tdevtemplate b/languages/ruby/app_templates/rubyhello/rubyhello.tdevtemplate deleted file mode 100644 index bce79ff9..00000000 --- a/languages/ruby/app_templates/rubyhello/rubyhello.tdevtemplate +++ /dev/null @@ -1,105 +0,0 @@ -# KDE Config File -[General] -Name=Simple Ruby script -Name[ca]=Simple script en Ruby -Name[da]=Simpelt Ruby script -Name[de]=Einfaches Ruby-Skript -Name[el]=Απλό σενάριο Ruby -Name[es]=Guión sencillo en Ruby -Name[et]=Lihtne Ruby skript -Name[eu]=Ruby script sinple bat -Name[fa]=دست‌نوشتۀ سادۀ رابی -Name[fr]=Script Ruby simple -Name[ga]=Script shimplí Ruby -Name[gl]=Script sinxelo en Ruby -Name[hu]=Egyszerű Ruby-szkript -Name[it]=Semplice script Ruby -Name[ja]=簡単な Ruby スクリプト -Name[nds]=Eenfach Ruby-Skript -Name[ne]=साधारण रूबि स्क्रिप्ट -Name[nl]=Eenvoudig Ruby-script -Name[pl]=Prosty skrypt w języku Ruby -Name[pt]=Programa simples em Ruby -Name[pt_BR]=Programa simples em Ruby -Name[ru]=Простой скрипт Ruby -Name[sk]=Jednoduchý Ruby skript -Name[sr]=Једноставна Ruby скрипта -Name[sr@Latn]=Jednostavna Ruby skripta -Name[sv]=Enkelt Ruby-skript -Name[tg]=Скрипти Ruby оддӣ -Name[tr]=Basit Ruby Betiği -Name[zh_CN]=简单的 Ruyb 脚本 -Name[zh_TW]=簡單 Ruby 文稿 -Category=Ruby -Comment=This generates a simplistic 'Hello world' program in Ruby -Comment[ca]=Genera un simple programa de 'Hello world' en Ruby -Comment[da]=Dette genererer et simplistisk 'Goddag verden' program i Ruby -Comment[de]=Erstellt ein einfaches "Hello World"'-Programm in Ruby -Comment[el]=Αυτό δημιουργεί ένα απλό πρόγραμμα 'Γεια σου κόσμε' σε Ruby -Comment[es]=Genera un sencillo programa «Hola mundo» en Ruby -Comment[et]=Lihtsa "Tere, maailm" programmi loomine Rubys -Comment[eu]=Honek "Kaixo mundua" programa sinple bat sortzen du Ruby lengoaian -Comment[fa]=یک برنامۀ سادۀ «Hello world» در رابی تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en Ruby -Comment[gl]=Isto xera un programa sinxelo 'Ola mundo' en Ruby -Comment[hu]=Létrehoz egy egyszerű 'Hello world' programot Rubyban -Comment[it]=Genera un semplice programma di "Hello world" in Ruby -Comment[ja]=簡単な Hello world プログラムを Ruby で作成します -Comment[nds]=Dit stellt en eenfach "Moin Welt"-Programm in Ruby op. -Comment[ne]=यसले रूबिमा साधारण 'हेल्लो वोल्ड' कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Dit genereert een eenvoudig Hello World-programma in Ruby -Comment[pl]=Generuje prosty program "Witaj świecie" w języku Ruby -Comment[pt]=Isto gera um programa simples 'Olá mundo' em Ruby -Comment[pt_BR]=Isto gera um programa simples 'Olá mundo' em Ruby -Comment[ru]=Создание простой программы 'Hello world' на Ruby -Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v Ruby -Comment[sr]=Ово прави једноставан „Здраво свете“ у Ruby-ју -Comment[sr@Latn]=Ovo pravi jednostavan „Zdravo svete“ u Ruby-ju -Comment[sv]=Detta skapar ett förenklat 'Hello world'-program i Ruby -Comment[tr]=Bu Ruby'de basit bir "Merhaba Dünya" programı yaratır. -Comment[zh_TW]=產生一個簡單的 Ruby 的 Hello world 程式 -FileTemplates=rb,ShellStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.rb -Archive=rubyhello.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.rb -Dest=%{dest}/%{APPNAMELC}.rb - -[MSG] -Type=message -Comment=A simple ruby script was created in %{dest} -Comment[ca]=Un simple script en Ruby ha estat creat en %{dest} -Comment[da]=Et simpelt ruby script blev oprettet i %{dest} -Comment[de]=Ein einfaches Ruby-Skript wurde in %{dest} erstellt. -Comment[el]=Ένα απλό σενάριο ruby δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo guión en Ruby ha sido creado en %{dest} -Comment[et]=Lihtne Ruby skript loodi asukohta %{dest} -Comment[eu]=Ruby script sinple bat sortu da hemen: %{dest} -Comment[fa]=یک دست‌نوشتۀ سادۀ رابی در %{dest} ایجاد شد -Comment[fr]=Un script Ruby simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh script shimplí ruby i %{dest} -Comment[gl]=Creouse un scrip sinxelo en ruby en %{dest} -Comment[hu]=Létrejött egy egyszerű Ruby-szkript itt: %{dest} -Comment[it]=È stato creato un semplice script ruby in %{dest} -Comment[ja]=簡単な ruby スクリプトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach Ruby-Skript opstellt. -Comment[ne]=साधारण रूबि स्क्रिप्ट %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig Ruby-script is aangemaakt in %{dest} -Comment[pl]=Prosty skrypt w języku Ruby został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples em Ruby em %{dest} -Comment[pt_BR]=Foi criado um programa simples em Ruby em %{dest} -Comment[ru]=Простой скрипт Ruby создан в %{dest} -Comment[sk]=Jednoduchý Ruby skript bol vytvorený v %{dest} -Comment[sr]=Једноставна ruby скрипта направљена је у %{dest} -Comment[sr@Latn]=Jednostavna ruby skripta napravljena je u %{dest} -Comment[sv]=Ett enkelt Ruby-skript skapades i %{dest} -Comment[tr]=Basit bir Ruby betiği %{dest} içinde yaratıldı. -Comment[zh_TW]=一個簡單的 ruby 文稿已建立於 %{dest} diff --git a/languages/ruby/app_templates/tdeapp/CMakeLists.txt b/languages/ruby/app_templates/tdeapp/CMakeLists.txt deleted file mode 100644 index 598ce743..00000000 --- a/languages/ruby/app_templates/tdeapp/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_custom_target( tdeappruby.tar.gz ALL - COMMAND tar zcf tdeappruby.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - app_client.rb appiface.rb app.rb appview.rb main.rb pref.rb - app.cpp appui.rc app.desktop app.tdevelop app-Makefile.am - app-configure.in.in src-Makefile.am subdirs README -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdeappruby.tar.gz tdeappruby.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdeappruby.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/ruby/app_templates/tdeapp/Makefile.am b/languages/ruby/app_templates/tdeapp/Makefile.am deleted file mode 100644 index ff783b87..00000000 --- a/languages/ruby/app_templates/tdeapp/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -dataFiles = app_client.rb appiface.rb app.rb appview.rb main.rb pref.rb app.cpp \ - appui.rc app.desktop app.tdevelop app-Makefile.am app-configure.in.in \ - src-Makefile.am subdirs README - -templateName = tdeappruby - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(templateName).tar.gz: ${dataFiles} - $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} - $(GZIP_COMMAND) -f9 $(templateName).tar - -archivedir = ${appwizarddatadir} -archive_DATA = $(templateName).tar.gz ${templateName}.png - -CLEANFILES = *.tar.gz diff --git a/languages/ruby/app_templates/tdeapp/README b/languages/ruby/app_templates/tdeapp/README deleted file mode 100644 index 39de8b2f..00000000 --- a/languages/ruby/app_templates/tdeapp/README +++ /dev/null @@ -1,81 +0,0 @@ ------------------------------------------------ -Kde application framework template quickstart -Author: Thomas Nagy -Date: 2004-03-22 ------------------------------------------------ - -This README file explains you basic things for starting with -this application template. - - -** Building and installing ** - -* Build the configure script by "make -f Makefile.cvs" - -* To clean, use "make clean", and to clean everything -(remove the makefiles, etc), use "make distclean" - -* To distribute your program, try "make dist". -This will make a compact tarball archive of your release with the -necessary scripts inside. - -* Modifying the auto-tools scripts -for automake scripts there is an excellent tutorial there : -http://developer.kde.org/documentation/other/makefile_am_howto.html - -* Simplify your life : install the project in your home directory for -testing purposes. -./configure --prefix=/home/user/dummyfolder/ -In the end when you finished the development you can -rm -rf /home/user/dummyfolder/ -without fear. - - -** Technologies ** - -* Build the menus of your application easily -kde applications now use an xml file (*ui.rc file) to build the menus. -This allow a great customization of the application. However, when -programming the menu is shown only after a "make install" - -For more details, consult : -http://devel-home.kde.org/~larrosa/tutorial/p9.html -http://developer.kde.org/documentation/tutorials/xmlui/preface.html - -* Use TDEConfig XT to create your configuration dialogs and make -them more maintainable. - -For more details, consult : -http://developer.kde.org/documentation/tutorials/tdeconfigxt/tdeconfigxt.html - -* With KParts, you can embed other kde components in your program, or make your program -embeddable in other apps. For example, the kmplayer kpart can be called to play videos -in your app. - -For more details, consult : -http://www-106.ibm.com/developerworks/library/l-tdeparts/ -http://developer.kde.org/documentation/tutorials/dot/writing-plugins.html -http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html - -* With dcop, you can control your app from other applications -Make sure to include K_DCOP and a kdcop: section in your .h file -http://developer.kde.org/documentation/tutorials/dot/dcopiface/dcop-interface.html - - -** Documentation ** - -* For the translations : -1. Download a patched gettext which can be found at: - http://public.kde.planetmirror.com/pub/kde/devel/gettext-kde/ -2. Install that gettext in ~/bin/ -3. cd ~/yourproject, export PATH=~/bin:$PATH, export -TDEDIR=/where_your_KDE3_is -4. make -f admin/Makefile.common package-messages -5. make package-messages -6. Translate the po files (not the pot!!) with kbabel or xemacs - -* Do not forget to write the documentation for your kde app -edit the documentation template index.docbook in doc/ - - - diff --git a/languages/ruby/app_templates/tdeapp/app-Makefile.am b/languages/ruby/app_templates/tdeapp/app-Makefile.am deleted file mode 100644 index bfe1c599..00000000 --- a/languages/ruby/app_templates/tdeapp/app-Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = $(TOPSUBDIRS) diff --git a/languages/ruby/app_templates/tdeapp/app-configure.in.in b/languages/ruby/app_templates/tdeapp/app-configure.in.in deleted file mode 100644 index 7d849466..00000000 --- a/languages/ruby/app_templates/tdeapp/app-configure.in.in +++ /dev/null @@ -1,45 +0,0 @@ -#MIN_CONFIG(3.0.0) - -AM_INIT_AUTOMAKE(%{APPNAMELC}, 0.1) -AC_C_BIGENDIAN -AC_CHECK_KDEMAXPATHLEN - -AC_PROG_MAKE_SET - -AC_CHECK_PROG(RUBY, ruby, ruby) - -if test -z "$RUBY"; then - DO_NOT_COMPILE="$DO_NOT_COMPILE qtruby" -else - AC_MSG_CHECKING(for ruby dirs) - RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'` - RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'` - RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'` - RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'` - RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` - AC_MSG_RESULT([archdir $RUBY_ARCHDIR, sitearchdir $RUBY_SITEARCHDIR, sitedir $RUBY_SITEDIR, libdir $RUBY_LIBDIR, librubyarg $RUBY_LIBRUBYARG]) - AC_SUBST(RUBY_ARCHDIR) - AC_SUBST(RUBY_SITEARCHDIR) - AC_SUBST(RUBY_SITEDIR) - AC_SUBST(RUBY_LIBDIR) - AC_SUBST(RUBY_LIBRUBYARG) -fi - -# Korundum check -AC_MSG_CHECKING([whether Korundum is installed]) -korundum_present=no -cat >korundumtest.rb </dev/null 2>&1 && korundum_present=yes -AC_MSG_RESULT([$korundum_present]) - -# rbuic check -AC_PATH_PROG([RBUIC],[rbuic]) -if test -z "${RBUIC}" ; then - AC_MSG_ERROR([cannot find rbuic (part of the QtRuby package)]) -fi -AC_SUBST([RBUIC]) -AC_SUBST([RUBY]) - - diff --git a/languages/ruby/app_templates/tdeapp/app.cpp b/languages/ruby/app_templates/tdeapp/app.cpp deleted file mode 100644 index 04770335..00000000 --- a/languages/ruby/app_templates/tdeapp/app.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include - -#include -#include -#include -#include - -int main(int argc, char **argv) { - TDEInstance * instance = new TDEInstance("%{APPNAMELC}"); - TQString appdir = ::locate("data", "%{APPNAMELC}/main.rb", instance); - delete instance; - if (appdir.isNull()) { - tqFatal("Error: Can't find \"%{APPNAMELC}/main.rb\"\n"); - } - TQFileInfo program(appdir); - - char ** rubyargs = (char **) calloc(argc+4, sizeof(char *)); - rubyargs[0] = strdup(argv[0]); - rubyargs[1] = strdup("-KU"); - rubyargs[2] = strdup(TQString("-C%1").arg(program.dirPath()).latin1()); - rubyargs[3] = strdup(TQString("-I%1").arg(program.dirPath()).latin1()); - rubyargs[4] = strdup(program.fileName().latin1()); - for (int i = 1; i < argc; i++) { - rubyargs[i+4] = argv[i]; - } - - ruby_init(); - ruby_options(argc+4, rubyargs); - ruby_run(); -} diff --git a/languages/ruby/app_templates/tdeapp/app.desktop b/languages/ruby/app_templates/tdeapp/app.desktop deleted file mode 100644 index 4587fd3c..00000000 --- a/languages/ruby/app_templates/tdeapp/app.desktop +++ /dev/null @@ -1,44 +0,0 @@ -[Desktop Entry] -Name=%{APPNAME} -Exec=ruby %{APPNAMELC}/main.rb %i -caption "%c" -Icon=%{APPNAMELC} -Type=Application -DocPath=%{APPNAMELC}/%{APPNAMELC}.html -Comment=A TDE KPart Application -Comment[br]=Ur meziant Kpart evit TDE -Comment[ca]=Una aplicació KPart per al TDE -Comment[cy]=Cymhwysiad KPart TDE -Comment[da]=Et TDE KPart-program -Comment[de]=Eine auf der Komponententechnik KPart basierende TDE-Anwendung -Comment[el]=Μια εφαρμογή KPart του TDE -Comment[es]=Una aplicación KPart de TDE -Comment[et]=TDE KPart rakendus -Comment[eu]=TDE KPart aplikazio bat -Comment[fa]=یک کاربرد TDE KPart -Comment[fr]=Une application KPart pour TDE -Comment[ga]=Feidhmchlár KPart TDE -Comment[gl]=Unha aplicación KPart de TDE -Comment[hi]=एक केडीई के-पार्ट अनुप्रयोग -Comment[hu]=KPart-alapú TDE-alkalmazás -Comment[is]=TDE KPart forrit -Comment[it]=Applicazione KPart di TDE -Comment[ja]=TDE KPart アプリケーション -Comment[lt]=TDE KPart programa -Comment[nds]=En KPart-Deelprogramm för TDE -Comment[ne]=एउटा केडीई KPart अनुप्रयोग -Comment[nl]=Een TDE KPart-toepassing -Comment[pl]=Osadzalny element KPart TDE -Comment[pt]=Uma Aplicação KPart do TDE -Comment[pt_BR]=Um Aplicativo KPart do TDE -Comment[ru]=Приложение KPart для TDE -Comment[sk]=TDE KPart aplikácia -Comment[sl]=Program KPart za TDE -Comment[sr]=TDE KPart програм -Comment[sr@Latn]=TDE KPart program -Comment[sv]=Ett TDE Kpart-program -Comment[ta]=கெடி கெபார்ட் பயன்பாடு -Comment[tg]=Ба кор андохтани KPart барои TDE -Comment[tr]=Bir TDE KPart Uygulaması -Comment[zh_CN]=一个 TDE KPart 应用程序 -Comment[zh_TW]=TDE KPart 應用程式 -Terminal=false diff --git a/languages/ruby/app_templates/tdeapp/app.rb b/languages/ruby/app_templates/tdeapp/app.rb deleted file mode 100644 index 61531be2..00000000 --- a/languages/ruby/app_templates/tdeapp/app.rb +++ /dev/null @@ -1,216 +0,0 @@ -=begin - This class serves as the main window for %{APPNAME}. It handles the - menus, toolbars, and status bars. - - @short Main window class - @author %{AUTHOR} <%{EMAIL}> - @version %{VERSION} -=end - -class %{APPNAMESC} < KDE::MainWindow - - Q_SLOTS 'fileNew()', - 'fileOpen()', - 'fileSave()', - 'fileSaveAs()', - 'filePrint()', - 'optionsPreferences()', - 'changeStatusbar(const QString&)', - 'changeCaption(const QString&)' - - def initialize() - super( nil, "%{APPNAMESC}" ) - @view = %{APPNAMESC}View.new(self) - @printer = nil - # accept dnd - setAcceptDrops(true) - - # tell the KDE::MainWindow that this is indeed the main widget - setCentralWidget(@view) - - # then, setup our actions - setupActions() - - # and a status bar - statusBar().show() - - # Apply the create the main window and ask the mainwindow to - # automatically save settings if changed: window size, toolbar - # position, icon size, etc. Also to add actions for the statusbar - # toolbar, and keybindings if necessary. - setupGUI(); - - # allow the view to change the statusbar and caption - connect(@view, SIGNAL('signalChangeStatusbar(const QString&)'), - self, SLOT('changeStatusbar(const QString&)')) - connect(@view, SIGNAL('signalChangeCaption(const QString&)'), - self, SLOT('changeCaption(const QString&)')) - - end - - - def load(url) - target = "" - # the below code is what you should normally do. in this - # example when, we want the url to our own. you probably - # want to use this code instead for your app - - if false - # download the contents - if TDEIO::NetAccess.download(url, target, self) - # set our caption - setCaption(url.url) - - # load in the file (target is always local) - @view.openURL(KDE::URL.new(target)) - - # and remove the temp file - TDEIO::NetAccess.removeTempFile(target) - end - end - - setCaption(url.prettyURL()) - @view.openURL(url) - end - - def setupActions() - KDE::StdAction.openNew(self, SLOT('fileNew()'), actionCollection()) - KDE::StdAction.open(self, SLOT('fileOpen()'), actionCollection()) - KDE::StdAction.save(self, SLOT('fileSave()'), actionCollection()) - KDE::StdAction.saveAs(self, SLOT('fileSaveAs()'), actionCollection()) - KDE::StdAction.print(self, SLOT('filePrint()'), actionCollection()) - KDE::StdAction.quit($kapp, SLOT('quit()'), actionCollection()) - - KDE::StdAction.preferences(self, SLOT('optionsPreferences()'), actionCollection()) - - # this doesn't do anything useful. it's just here to illustrate - # how to insert a custom menu and menu item - custom = KDE::Action.new(i18n("Cus&tom Menuitem"), KDE::Shortcut.new(), - self, SLOT('optionsPreferences()'), - actionCollection(), "custom_action") - end - - def saveProperties(config) - # the 'config' object points to the session managed - # config file. anything you write here will be available - # later when this app is restored - - if !@view.currentURL().empty? - config.writeEntry("lastURL", @view.currentURL()) - end - end - - def readProperties(config) - # the 'config' object points to the session managed - # config file. This function is automatically called whenever - # the app is being restored. read in here whatever you wrote - # in 'saveProperties' - - url = config.readPathEntry("lastURL") - - if !url.empty? - @view.openURL(KDE::URL.new(url)) - end - end - - def dragEnterEvent(event) - # accept uri drops only - event.accept(KDE::URLDrag.canDecode(event)) - end - - def dropEvent(event) - # This is a very simplistic implementation of a drop event. we - # will only accept a dropped URL. the Qt dnd code can do *much* - # much more, so please read the docs there - urls = [] - - # see if we can decode a URI.. if not, just ignore it - if KDE::URLDrag.decode(event, urls) && !urls.empty? - # okay, we have a URI.. process it - url = urls.shift - - # load in the file - load(url) - end - end - - def fileNew() - # This slot is called whenever the File.New menu is selected, - # the New shortcut is pressed (usually CTRL+N) or the New toolbar - # button is clicked - - # create a new window - %{APPNAMESC}.new.show() - end - - def fileOpen() - # This slot is called whenever the File.Open menu is selected, - # the Open shortcut is pressed (usually CTRL+O) or the Open toolbar - # button is clicked - - # This brings up the generic open dialog - url = KDE::URLRequesterDlg.getURL(nil, self, i18n("Open Location") ) - - # standard filedialog - url = KDE::FileDialog.getOpenURL(nil, nil, self, i18n("Open Location")) - if !url.empty? - @view.openURL(url) - end - end - - def fileSave() - # This slot is called whenever the File.Save menu is selected, - # the Save shortcut is pressed (usually CTRL+S) or the Save toolbar - # button is clicked - - # save the current file - end - - def fileSaveAs() - # This slot is called whenever the File.Save As menu is selected, - file_url = KDE::FileDialog.getSaveURL() - if !file_url.empty? && file_url.valid? - # save your info, here - end - end - - def filePrint() - # This slot is called whenever the File.Print menu is selected, - # the Print shortcut is pressed (usually CTRL+P) or the Print toolbar - # button is clicked - if @printer.nil? then @printer = KDE::Printer.new end - if @printer.setup(self) - # setup the printer. with Qt, you always "print" to a - # Qt::Painter.. whether the output medium is a pixmap, a screen, - # or paper - p = Qt::Painter.new - p.begin(@printer) - - # we let our view do the actual printing - metrics = Qt::PaintDeviceMetrics.new(@printer) - @view.print(p, metrics.height(), metrics.width()) - - # and send the result to the printer - p.end() - end - end - - def optionsPreferences() - # popup some sort of preference dialog, here - dlg = %{APPNAMESC}Preferences.new - if dlg.exec() - # redo your settings - end - end - - def changeStatusbar(text) - # display the text on the statusbar - statusBar().message(text) - end - - def changeCaption(text) - # display the text on the caption - setCaption(text) - end - -end diff --git a/languages/ruby/app_templates/tdeapp/app.tdevelop b/languages/ruby/app_templates/tdeapp/app.tdevelop deleted file mode 100644 index d416fcdb..00000000 --- a/languages/ruby/app_templates/tdeapp/app.tdevelop +++ /dev/null @@ -1,90 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevAutoProject - Ruby - - Ruby - Qt - KDE - - - KDevDoxygen - KDevdistpart - KDevVisualBoyAdvance - TDevDebugger - - - - - - - - src/%{APPNAMELC} - - - - - false - CVS,.svn - - - - - - - - - ada - ada_bugs_gcc - bash - bash_bugs - c++_bugs_gcc - clanlib - w3c-dom-level2-html - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - kde2book - libc - libstdc++ - opengl - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - sdl - stl - w3c-svg - sw - w3c-uaag10 - wxwindows_bugs - - - - - - - - - - - ruby - false - 3 - src/main.rb - - - diff --git a/languages/ruby/app_templates/tdeapp/app_client.rb b/languages/ruby/app_templates/tdeapp/app_client.rb deleted file mode 100644 index b08e9b21..00000000 --- a/languages/ruby/app_templates/tdeapp/app_client.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'Korundum' -include KDE - -about = AboutData.new("%{APPNAMELC}_client", "%{APPNAME} client", "0.1") -CmdLineArgs.init(ARGV, about) - -app = Application.new - -# get our DCOP client and attach so that we may use it -client = app.dcopClient -client.attach - -# do a 'send' for now -dcopRef = DCOPRef.new("%{APPNAMELC}", "%{APPNAMESC}Iface") -dcopRef.openURL("http://www.kde.org") - -app.exec - diff --git a/languages/ruby/app_templates/tdeapp/appiface.rb b/languages/ruby/app_templates/tdeapp/appiface.rb deleted file mode 100644 index a8be16b5..00000000 --- a/languages/ruby/app_templates/tdeapp/appiface.rb +++ /dev/null @@ -1,14 +0,0 @@ -class %{APPNAMESC}Iface < KDE::DCOPObject - - k_dcop 'void openURL(QString)' - - def initialize(app) - super("%{APPNAMESC}Iface") - @app = app - end - - def openURL(url) - @app.openURL(url) - end -end - diff --git a/languages/ruby/app_templates/tdeapp/appui.rc b/languages/ruby/app_templates/tdeapp/appui.rc deleted file mode 100644 index ceb4f14e..00000000 --- a/languages/ruby/app_templates/tdeapp/appui.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - C&ustom - - - - diff --git a/languages/ruby/app_templates/tdeapp/appview.rb b/languages/ruby/app_templates/tdeapp/appview.rb deleted file mode 100644 index e7aabe3c..00000000 --- a/languages/ruby/app_templates/tdeapp/appview.rb +++ /dev/null @@ -1,103 +0,0 @@ - -=begin - This is the main view class for %{APPNAME}. Most of the non-menu, - non-toolbar, and non-statusbar (e.g., non frame) GUI code should go - here. - - This %{APPNAMELC} uses an HTML component as an example. - - @short Main view - @author %{AUTHOR} <%{EMAIL}> - @version %{VERSION} -=end -class %{APPNAMESC}View < Qt::Widget - - # - # Use this signal to change the content of the statusbar - # - Q_SIGNALS 'signalChangeStatusbar(const QString&)' - - # - # Use this signal to change the content of the caption - # - Q_SIGNALS 'signalChangeCaption(const QString&)' - - Q_SLOTS 'slotOnURL(const QString&)', - 'slotSetTitle(const QString&)' - - def initialize(parent) - super(parent) - - # keep a reference to the DCOP Interface so it doesn't get gc'd - @dcop = %{APPNAMESC}Iface.new(self) - - # setup our layout manager to automatically add our widgets - top_layout = Qt::HBoxLayout.new(self) - top_layout.setAutoAdd(true) - - # we want to look for all components that satisfy our needs. the - # trader will actually search through *all* registered KDE - # applications and components -- not just KParts. So we have to - # specify two things: a service type and a constraint - # - # the service type is like a mime type. we say that we want all - # applications and components that can handle HTML -- 'text/html' - # - # however, by itself, this will return such things as Netscape.. - # not what we wanted. so we constrain it by saying that the - # string 'KParts/ReadOnlyPart' must be found in the ServiceTypes - # field. with this, only components of the type we want will be - # returned. - offers = KDE::Trader.self().query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes") - - factory = nil - # in theory, we only care about the first one.. but let's try all - # offers just in when the first can't be loaded for some reason - offers.each do |ptr| - # we now know that our offer can handle HTML and is a part. - # since it is a part, it must also have a library... let's try to - # load that now - factory = KDE::LibLoader.self().factory( ptr.library() ) - if ! factory.nil? - @html = factory.create(self, ptr.name(), "KParts::ReadOnlyPart") - break - end - end - - # if our factory is invalid, then we never found our component - # and we might as well just exit now - if factory.nil? - KDE::MessageBox.error(self, i18n("Could not find a suitable HTML component")) - return - end - - connect(@html, SIGNAL('setWindowCaption(const QString&)'), - self, SLOT('slotSetTitle(const QString&)')) - connect(@html, SIGNAL('setStatusBarText(const QString&)'), - self, SLOT('slotOnURL(const QString&)')) - - end - - - def print(p, height, width) - # do the actual printing, here - # p.drawText(etc..) - end - - def currentURL() - return @html.url().url() - end - - def openURL(url) - @html.openURL(KDE::URL.new(url)) - end - - def slotOnURL(url) - emit signalChangeStatusbar(url) - end - - def slotSetTitle(title) - emit signalChangeCaption(title) - end - -end diff --git a/languages/ruby/app_templates/tdeapp/main.rb b/languages/ruby/app_templates/tdeapp/main.rb deleted file mode 100644 index 47235013..00000000 --- a/languages/ruby/app_templates/tdeapp/main.rb +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env ruby - -require 'Korundum' - -require '%{APPNAMELC}iface.rb' -require '%{APPNAMELC}.rb' -require '%{APPNAMELC}view.rb' -require 'pref.rb' - -description = I18N_NOOP("A TDE Application") -version = "%{VERSION}" -options = [ [ "+[URL]", I18N_NOOP( "Document to open" ), "" ] ] - -about = KDE::AboutData.new("%{APPNAMELC}", I18N_NOOP("%{APPNAME}"), version, description, - KDE::AboutData.License_%{LICENSE}, "(C) %{YEAR} %{AUTHOR}", nil, nil, "%{EMAIL}") -about.addAuthor( "%{AUTHOR}", nil, "%{EMAIL}" ) -KDE::CmdLineArgs.init(ARGV, about) -KDE::CmdLineArgs.addCmdLineOptions(options) -app = KDE::Application.new - -# see if we are starting with session management -if app.restored? - RESTORE(%{APPNAMESC}) -else - # no session.. just start up normally - args = KDE::CmdLineArgs.parsedArgs - if args.count == 0 - widget = %{APPNAMESC}.new - widget.show - else - for i in 0...args.count do - widget = %{APPNAMESC}.new - widget.show - widget.load(args.url(i)) - end - end -end - -app.exec - diff --git a/languages/ruby/app_templates/tdeapp/pref.rb b/languages/ruby/app_templates/tdeapp/pref.rb deleted file mode 100644 index 98669ad2..00000000 --- a/languages/ruby/app_templates/tdeapp/pref.rb +++ /dev/null @@ -1,38 +0,0 @@ - -class %{APPNAMESC}Preferences < KDE::DialogBase - - def initialize() - super(TreeList, i18n("%{APPNAMESC} Preferences"), - Help|Default|Ok|Apply|Cancel, Ok) - # this is the base class for your preferences dialog. it is now - # a Treelist dialog.. but there are a number of other - # possibilities (including Tab, Swallow, and just Plain) - frame = addPage(i18n("First Page"), i18n("Page One Options")) - @pageOne = %{APPNAMESC}PrefPageOne.new(frame) - - frame = addPage(i18n("Second Page"), i18n("Page Two Options")) - @pageTwo = %{APPNAMESC}PrefPageTwo.new(frame) - end -end - -class %{APPNAMESC}PrefPageOne < Qt::Frame - - def initialize(parent) - super(parent) - layout = Qt::HBoxLayout.new(self) - layout.setAutoAdd(true) - - Qt::Label.new(i18n("Add something here"), self) - end -end - -class %{APPNAMESC}PrefPageTwo < Qt::Frame - - def initialize(parent) - super(parent) - layout = Qt::HBoxLayout.new(self) - layout.setAutoAdd(true) - - Qt::Label.new(i18n("Add something here"), self) - end -end diff --git a/languages/ruby/app_templates/tdeapp/src-Makefile.am b/languages/ruby/app_templates/tdeapp/src-Makefile.am deleted file mode 100644 index acb41899..00000000 --- a/languages/ruby/app_templates/tdeapp/src-Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -## Makefile.am for %{APPNAMELC} - -# this is the program that gets installed. it's name is used for all -# of the other Makefile.am variables -bin_PROGRAMS = %{APPNAMELC} - -# set the include path for X, qt and KDE -INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR) - -# the library search path. -%{APPNAMELC}_LDFLAGS = $(all_libraries) $(KDE_RPATH) -L$(RUBY_LIBDIR) - -# the libraries to link against. -%{APPNAMELC}_LDADD = $(LIB_TDEFILE) $(LIB_TDEPRINT) $(RUBY_LIBRUBYARG) - -# which sources should be compiled for %{APPNAMELC} -%{APPNAMELC}_SOURCES = %{APPNAMELC}.cpp - -# let automoc handle all of the meta source files ((moc)) -METASOURCES = AUTO - -KDE_ICON = AUTO - -# this is where the kdelnk file will go -kdelnkdir = $(kde_appsdir)/Utilities -kdelnk_DATA = %{APPNAMELC}.desktop - -# this is where the XML-GUI resource file goes -rcdir = $(kde_datadir)/%{APPNAMELC} -rc_DATA = %{APPNAMELC}ui.rc - -rubysrc_DATA = main.rb %{APPNAMELC}.rb %{APPNAMELC}_client.rb %{APPNAMELC}iface.rb \ - %{APPNAMELC}view.rb pref.rb - -rubysrcdir = $(kde_datadir)/%{APPNAMELC} - -rubyui_DATA = - -rubyuidir = $(kde_datadir)/%{APPNAMELC} - -%.rb: %.ui - $(RBUIC) -tr ${UIC_TR} -kde $< -o $@ - diff --git a/languages/ruby/app_templates/tdeapp/subdirs b/languages/ruby/app_templates/tdeapp/subdirs deleted file mode 100644 index 0e678106..00000000 --- a/languages/ruby/app_templates/tdeapp/subdirs +++ /dev/null @@ -1,3 +0,0 @@ -doc -po -src diff --git a/languages/ruby/app_templates/tdeapp/tdeappruby.png b/languages/ruby/app_templates/tdeapp/tdeappruby.png deleted file mode 100644 index 913ebb87..00000000 Binary files a/languages/ruby/app_templates/tdeapp/tdeappruby.png and /dev/null differ diff --git a/languages/ruby/app_templates/tdeapp/tdeappruby.tdevtemplate b/languages/ruby/app_templates/tdeapp/tdeappruby.tdevtemplate deleted file mode 100644 index 8a4c0320..00000000 --- a/languages/ruby/app_templates/tdeapp/tdeappruby.tdevtemplate +++ /dev/null @@ -1,238 +0,0 @@ -# KDE Config File -[General] -Name=Application framework -Name[ca]=Infraestructura d'aplicacions -Name[da]=Programskelet -Name[de]=Anwendungsgrundgerüst -Name[el]=Πλαίσιο εφαρμογής -Name[es]=Infraestructura de aplicación -Name[et]=Rakenduse raamistik -Name[eu]=Aplikazioen lan-markoa -Name[fa]=چارچوب کاربرد -Name[fr]=Infrastructure d'application -Name[ga]=Creatlach feidhmchláir -Name[gl]=Entorno de traballo para aplicación -Name[hu]=Alkalmazás-keretrendszer -Name[it]=Infrastruttura applicativa -Name[ja]=アプリケーションフレームワーク -Name[nds]=Programmrahmenwark -Name[ne]=अनुप्रयोग फ्रेमवर्क -Name[nl]=Applicationframework -Name[pl]=Szablon programu -Name[pt]=Plataforma de aplicações -Name[pt_BR]=Plataforma de aplicações -Name[ru]=Приложение KDE -Name[sk]=Aplikačný framework -Name[sl]=Ogrodje programa -Name[sr]=Радни оквир програма -Name[sr@Latn]=Radni okvir programa -Name[sv]=Programramverk -Name[tr]=Uygulama Çatısı -Name[zh_CN]=应用程序框架 -Name[zh_TW]=應用程式框架 -Icon=tdeapp.png -Category=Ruby/KDE -Comment=Generates a simple Korundum application with one toplevel window, menus and toolbars. A DCOP interface is also provided, so that your application can provide a scripting interface -Comment[ca]=Genera una simple aplicació Korundum amb una finestra principal, menús i barres d'eines. També es proveeix la interfície DCOP, de manera que la vostra aplicació podrà proveir d'una interfície per a scripts -Comment[da]=Generere et simpelt Korundum program med et vindue på topniveau, menuer og værktøjslinjer. Der sørges også for en DCOP-grænseflade, så dit program kan give en script-grænseflade -Comment[de]=Erstellt eine einfache Korundum-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. Dazu kommt eine DCOP-Schnittstelle, so dass Ihre Anwendung eine Schnittstelle für Skripte anbieten kann. -Comment[el]=Δημιουργεί μια απλή εφαρμογή Korundum με ένα ανώτερο παράθυρο, μενού και γραμμές εργαλείων. Προσφέρεται επίσης μια διασύνδεση DCOP, έτσι ώστε η εφαρμογή σας να προσφέρει ένα περιβάλλον γραφής σεναρίων -Comment[es]=Genera una sencilla aplicación Korundum con una ventana principal, menús y barras de herramientas. También se proporciona una interfaz DCOP para que su aplicación pueda proporcionar una interfaz para guiones de órdenes. -Comment[et]=Lihtsa Korundumi rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. Lisatakse ka DCOP-liides, mis võimaldab rakendusel pakkuda skriptikeelte toetust -Comment[eu]=Goi-mailako lehio bat, menuak eta tresna-barrak dituen Korundum aplikazio sinple bat sortzen du . DCOP interfazea ere sortzen du, eta beraz, zure aplikazioak script-interfaze bat eskainiko du -Comment[fa]=یک کاربرد سادۀ Korundum با یک پنجرۀ سطح بالا، گزینگان و میله ابزارها تولید می‌کند. همچنین یک واسط DCOP فراهم است. بنابراین، کاربرد شما یک واسط دست‌نوشته‌ای را می‌تواند فراهم کند -Comment[fr]=Génère une application Korundum simple comprenant une fenêtre de premier niveau, des menus et des barres d'outils. Une interface DCOP est également fournie, afin que votre application puisse offrir une interface de scriptage -Comment[gl]=Xera unha aplicación sinxela Korundum cunha fiestra, menús e barras de ferramentas. Proporciónase tamén unha interface DCOP de modo que a súa aplicación poida ofrecer unha interface de scripting. -Comment[hu]=Létrehoz egy egyszerű Korundum-alkalmazást egy főablakkal, menükkel és eszköztárakkal. DCOP-felület is tartozik az alkalmazáshoz, így könnyen kialakítható hozzá szkriptelési felület. -Comment[it]=Genera una semplice applicazione Korundum con una finestra toplevel, menu e barre degli strumenti. È anche fornita un'interfaccia DCOP, così che l'applicazione può fornire una interfaccia di scripting -Comment[nds]=Stellt en eenfach Korundum-Programm mit een böverst Finster, Menüs un Warktüüchbalkens op. Ok warrt noch en DCOP-Koppelsteed praatstellt, so dat Dien Programm en Skriptkoppelsteed anbeden kann. -Comment[ne]=एउटा उच्च तह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण Korundum अनुप्रयोग उत्पन्न गर्दछ । DCOP इन्टरफेस पनि प्रदान गरिन्छ, जसले गर्दा तपाईँको अनुप्रयोगले स्क्रिप्टिङ इन्टरफेस प्रदान गर्न सक्छ । -Comment[nl]=Dit genereert een eenvoudige Korundum-toepassing met één toplevel window, menu's en toolbars. Een DCOP-interface wordt ook aangeleverd, zodat uw toepassing een scripting interface kan aanleveren. -Comment[pl]=Generuje prosty program Korundum z jednym oknem, menu i paskami narzędzi. Dostępny jest także interfejs DCOP, więc Twój program może umożliwiać korzystanie ze skryptów -Comment[pt]=Gera uma aplicação Korundum simples com uma janela de topo, menus e barras de ferramentas. Também é fornecida uma interface de DCOP, para que a sua aplicação possa oferecer uma interface de programação -Comment[pt_BR]=Gera uma aplicação Korundum simples com uma janela de topo, menus e barras de ferramentas. Também é fornecida uma interface de DCOP, para que a sua aplicação possa oferecer uma interface de programação -Comment[ru]=Создание простого приложения Korundum с окном, меню, панелями инструментов и сервисом DCOP -Comment[sk]=Vygeneruje jednoduchú Korundum aplikáciu s jedným oknom, menu a panelom nástrojov. Taktiež bude poskytnuté DCOP rozhranie, takže aj aplikáciamôže poskytnúť skriptovacie rozhranie -Comment[sr]=Прави једноставан Korundum програм са једним прозором највишег нивоа, менијима и тракама са алатом. Дат је и DCOP интерфејс, тако да ваш програм може да омогући скриптовање -Comment[sr@Latn]=Pravi jednostavan Korundum program sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. Dat je i DCOP interfejs, tako da vaš program može da omogući skriptovanje -Comment[sv]=Skapar ett enkelt Korundum-program med ett toppnivåfönster, menyer och verktygsrader. Ett DCOP-gränssnitt tillhandahålls också, så att programmet kan tillhandahålla ett skriptgränssnitt. -Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir Korundum uygulaması yaratır. Uygulamanızın bir betik arayüzü sağlayabilmesi için bir DCOP arayüzü de sağlanmıştır. -Comment[zh_TW]=產生一個簡單的 Korundum 應用程式,內含頂層視窗、選單與工具列。另外提供一個 DCOP 介面,讓您的應用程式可以使用文稿介面。 -FileTemplates=rb,ShellStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.rb -Archive=tdeappruby.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{src}/app-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.rb -Dest=%{dest}/src/%{APPNAMELC}.rb - -[FILE17] -Type=install -Source=%{src}/appview.rb -Dest=%{dest}/src/%{APPNAMELC}view.rb - -[FILE18] -Type=install -Source=%{src}/appiface.rb -Dest=%{dest}/src/%{APPNAMELC}iface.rb - -[FILE19] -Type=install -Source=%{src}/app_client.rb -Dest=%{dest}/src/%{APPNAMELC}_client.rb - -[FILE20] -Type=install -Source=%{src}/pref.rb -Dest=%{dest}/src/pref.rb - -[FILE21] -Type=install -Source=%{src}/main.rb -Dest=%{dest}/src/main.rb - -[FILE22] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE23] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[MSG] -Type=message -Comment=A Korundum Application was created at %{dest} -Comment[ca]=Una aplicació Korundum ha estat creada a %{dest} -Comment[da]=Et Korundum program blev oprettet i %{dest} -Comment[de]=Eine Korundum-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή Korundum δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación Korundum ha sido creada en %{dest} -Comment[et]=Korundumi rakendus loodi asukohta %{dest} -Comment[eu]=Korundum aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد Korundum در %{dest} ایجاد شد -Comment[fr]=Une application Korundum a été créée dans %{dest} -Comment[ga]=Cruthaíodh Feidhmchlár Korundum ag %{dest} -Comment[gl]=Creouse unha aplicación Korundum en %{dest} -Comment[hu]=Létrejött egy Korundum-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione Korundum in %{dest} -Comment[ja]=Korundum アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Korundum-Programm opstellt. -Comment[ne]=Korundum अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Korundum-toepassing is aangemaakt in %{dest} -Comment[pl]=Program Korundum został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação Korundum em %{dest} -Comment[pt_BR]=Foi criada uma aplicação Korundum em %{dest} -Comment[ru]=Приложение Korundum создано в %{dest} -Comment[sk]=Korundum aplikácia bola vytvorená v %{dest} -Comment[sr]=Korundum програм је направљен у %{dest} -Comment[sr@Latn]=Korundum program je napravljen u %{dest} -Comment[sv]=Ett Korundum-program skapades i %{dest} -Comment[tr]=Bir Korundum Uygulaması %{dest} içinde yaratıldı. -Comment[zh_TW]=一個 Korundum 應用程式已建立於 %{dest} diff --git a/languages/ruby/debugger/CMakeLists.txt b/languages/ruby/debugger/CMakeLists.txt index 7fb74000..8290afd7 100644 --- a/languages/ruby/debugger/CMakeLists.txt +++ b/languages/ruby/debugger/CMakeLists.txt @@ -29,20 +29,20 @@ link_directories( ##### other data ################################ tde_install_icons( ) -install( FILES tdevrbdebugger.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES debuggee.rb DESTINATION ${DATA_INSTALL_DIR}/tdevrbdebugger ) -install( FILES tdevrbdebugger.rc DESTINATION ${DATA_INSTALL_DIR}/tdevrbdebugger ) +install( FILES kdevrbdebugger.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES debuggee.rb DESTINATION ${DATA_INSTALL_DIR}/kdevrbdebugger ) +install( FILES kdevrbdebugger.rc DESTINATION ${DATA_INSTALL_DIR}/kdevrbdebugger ) -##### libtdevrbdebugger (module) ################ +##### libkdevrbdebugger (module) ################ -tde_add_kpart( libtdevrbdebugger AUTOMOC +tde_add_kpart( libkdevrbdebugger AUTOMOC SOURCES debuggerpart.cpp dbgcontroller.cpp rdbcontroller.cpp dbgcommand.cpp rdbcommand.cpp rdbparser.cpp stty.cpp breakpoint.cpp variablewidget.cpp rdbbreakpointwidget.cpp framestackwidget.cpp dbgpsdlg.cpp dbgtoolbar.cpp rdboutputwidget.cpp rdbtable.cpp - LINK lang_debugger-shared tdevwidgets-shared tdevelop-shared + LINK lang_debugger-shared kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/ruby/debugger/Makefile.am b/languages/ruby/debugger/Makefile.am index 0bbe445b..88e03f03 100644 --- a/languages/ruby/debugger/Makefile.am +++ b/languages/ruby/debugger/Makefile.am @@ -4,22 +4,22 @@ INCLUDES = -I$(top_srcdir)/languages/lib/debugger \ -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevrbdebugger.la -libtdevrbdebugger_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevrbdebugger_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) \ +kde_module_LTLIBRARIES = libkdevrbdebugger.la +libkdevrbdebugger_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevrbdebugger_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) \ $(top_builddir)/languages/lib/debugger/liblang_debugger.la -libtdevrbdebugger_la_SOURCES = debuggerpart.cpp dbgcontroller.cpp rdbcontroller.cpp dbgcommand.cpp rdbcommand.cpp rdbparser.cpp stty.cpp breakpoint.cpp variablewidget.cpp rdbbreakpointwidget.cpp framestackwidget.cpp dbgpsdlg.cpp dbgtoolbar.cpp rdboutputwidget.cpp rdbtable.cpp +libkdevrbdebugger_la_SOURCES = debuggerpart.cpp dbgcontroller.cpp rdbcontroller.cpp dbgcommand.cpp rdbcommand.cpp rdbparser.cpp stty.cpp breakpoint.cpp variablewidget.cpp rdbbreakpointwidget.cpp framestackwidget.cpp dbgpsdlg.cpp dbgtoolbar.cpp rdboutputwidget.cpp rdbtable.cpp METASOURCES = AUTO KDE_ICON = AUTO rubysrc_DATA = debuggee.rb -rubysrcdir = $(kde_datadir)/tdevrbdebugger +rubysrcdir = $(kde_datadir)/kdevrbdebugger servicedir = $(kde_servicesdir) -service_DATA = tdevrbdebugger.desktop +service_DATA = kdevrbdebugger.desktop -rcdir = $(kde_datadir)/tdevrbdebugger -rc_DATA = tdevrbdebugger.rc +rcdir = $(kde_datadir)/kdevrbdebugger +rc_DATA = kdevrbdebugger.rc noinst_HEADERS = rdbtable.h diff --git a/languages/ruby/debugger/debuggerpart.cpp b/languages/ruby/debugger/debuggerpart.cpp index 9d0c9767..35e6a2d2 100644 --- a/languages/ruby/debugger/debuggerpart.cpp +++ b/languages/ruby/debugger/debuggerpart.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -40,12 +40,12 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" -#include "tdevdebugger.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" +#include "kdevdebugger.h" #include "domutil.h" #include "variablewidget.h" #include "rdbbreakpointwidget.h" @@ -61,25 +61,25 @@ #include -#include +#include #include namespace RDBDebugger { -static const TDevPluginInfo data("tdevrbdebugger"); +static const KDevPluginInfo data("kdevrbdebugger"); -typedef TDevGenericFactory RubyDebuggerFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevrbdebugger, RubyDebuggerFactory( data ) ) +typedef KDevGenericFactory RubyDebuggerFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevrbdebugger, RubyDebuggerFactory( data ) ) RubyDebuggerPart::RubyDebuggerPart( TQObject *parent, const char *name, const TQStringList & ) : - TDevPlugin( &data, parent, name ? name : "RubyDebuggerPart" ), + KDevPlugin( &data, parent, name ? name : "RubyDebuggerPart" ), controller(0) { // setObjId("RubyDebuggerInterface"); setInstance(RubyDebuggerFactory::instance()); - setXMLFile("tdevrbdebugger.rc"); + setXMLFile("kdevrbdebugger.rc"); m_debugger = new Debugger( partController() ); @@ -245,8 +245,8 @@ RubyDebuggerPart::RubyDebuggerPart( TQObject *parent, const char *name, const TQ connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStop(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStop(KDevPlugin*)) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -616,7 +616,7 @@ void RubyDebuggerPart::slotRun() -void RubyDebuggerPart::slotStop(TDevPlugin* which) +void RubyDebuggerPart::slotStop(KDevPlugin* which) { if( which != 0 && which != this ) return; @@ -772,12 +772,12 @@ void RubyDebuggerPart::savePartialProjectSession(TQDomElement* el) } -TDevAppFrontend * RDBDebugger::RubyDebuggerPart::appFrontend( ) +KDevAppFrontend * RDBDebugger::RubyDebuggerPart::appFrontend( ) { - return extension("TDevelop/AppFrontend"); + return extension("TDevelop/AppFrontend"); } -TDevDebugger * RDBDebugger::RubyDebuggerPart::debugger() +KDevDebugger * RDBDebugger::RubyDebuggerPart::debugger() { return m_debugger; } diff --git a/languages/ruby/debugger/debuggerpart.h b/languages/ruby/debugger/debuggerpart.h index 9b554a8f..498a159e 100644 --- a/languages/ruby/debugger/debuggerpart.h +++ b/languages/ruby/debugger/debuggerpart.h @@ -21,8 +21,8 @@ #define _DEBUGGERPART_H_ #include -#include "tdevplugin.h" -#include "tdevcore.h" +#include "kdevplugin.h" +#include "kdevcore.h" namespace KParts { class Part; } @@ -31,8 +31,8 @@ class TQPopupMenu; class KDialogBase; class ProcessWidget; class ProcessLineMaker; -class TDevAppFrontend; -class TDevDebugger; +class KDevAppFrontend; +class KDevDebugger; namespace RDBDebugger { @@ -45,7 +45,7 @@ class DbgToolBar; class VariableWidget; class RDBOutputWidget; -class RubyDebuggerPart : public TDevPlugin +class RubyDebuggerPart : public KDevPlugin { Q_OBJECT @@ -68,7 +68,7 @@ private slots: void slotRun(); void slotStopDebugger(); - void slotStop(TDevPlugin* which = 0); + void slotStop(KDevPlugin* which = 0); void slotPause(); void slotRunToCursor(); void slotStepOver(); @@ -84,8 +84,8 @@ signals: void rubyInspect(const TQString&); private: - TDevAppFrontend *appFrontend(); - TDevDebugger *debugger(); + KDevAppFrontend *appFrontend(); + KDevDebugger *debugger(); bool startDebugger(); void setupController(); @@ -103,7 +103,7 @@ private: TQString m_contextIdent; TQCString m_drkonqi; - TDevDebugger *m_debugger; + KDevDebugger *m_debugger; }; } diff --git a/languages/ruby/debugger/kdevrbdebugger.desktop b/languages/ruby/debugger/kdevrbdebugger.desktop new file mode 100644 index 00000000..714b51a3 --- /dev/null +++ b/languages/ruby/debugger/kdevrbdebugger.desktop @@ -0,0 +1,73 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin provides a frontend for the source-level debugger for Ruby. +Comment[ca]=Aquest connector proveeix una interfície per a la depuració a nivell de codi per a Ruby. +Comment[da]=Dette plugin sørger for en grænseflade til Ruby kildekode-fejlretteren. +Comment[de]=Dieses Modul stellt eine Oberfläche für den Quelltext-Debugger für Ruby bereit. +Comment[el]=Αυτό το πρόσθετο προσφέρει ένα πρόγραμμα για τον αποσφαλματωτή πηγαίου κώδικα της γλώσσας Ruby. +Comment[es]=Este complemento proporciona un entorno para depurar código de Ruby. +Comment[et]=See plugin pakub Ruby lähtekoodi siluri kasutajaliidest. +Comment[eu]=Plugin honek Ruby-ren iturburu-mailako araztailearen interfaze bat bat eskeintzen du. +Comment[fa]=این وصله، یک پایانه برای اشکال‌زدای سطح منبع رابی فراهم می‌کند. +Comment[fr]=Ce module externe fournit une interface pour le débogueur au niveau source pour Ruby. +Comment[gl]=Esta extensión proporciona un frontal para o depurador a nivel de código de Ruby. +Comment[hu]=Ez a bővítőmodul grafikus felületet biztosít a Ruby forrásszintű nyomkövetőjének használatához. +Comment[it]=Questo plugin fornisce un'interfaccia per il debugger a livello sorgente di Ruby. +Comment[ja]=このプラグインは、Ruby のソースレベルデバッガのフロントエンドを提供します。 +Comment[nds]=Dit Moduul stellt en Böversiet för den Ruby-Borntextfehlersöker praat. +Comment[ne]=यो प्लगइनले रूबिका लागि स्रोत-तह डिबगरका लागि फ्रेन्टइन्ड प्रदान गर्दछ । +Comment[nl]=Deze plugin biedt een grafische schil voor de broncode-debugger voor Ruby. +Comment[pl]=Ta wtyczka udostępnia interfejs do debugera poziomu źródłowego dla języka Ruby. +Comment[pt]=Este 'plugin' oferece uma interface o depurador ao nível do código para Ruby. +Comment[pt_BR]=Este plug-in fornece uma interface para o depurador a nível de código para Ruby. +Comment[ru]=Этот модуль предоставляет интерфейс к отладчику исходного кода для Ruby. +Comment[sk]=Modul pre rozhranie debugera pre Ruby. +Comment[sr]=Овај прикључак обезбеђује интерфејс за исправљач на нивоу изворног кода за Ruby. +Comment[sr@Latn]=Ovaj priključak obezbeđuje interfejs za ispravljač na nivou izvornog koda za Ruby. +Comment[sv]=Insticksprogrammet tillhandahåller ett gränssnitt till källkodsavlusaren för Ruby. +Comment[tr]=Bu eklenti, Ruby için kaynak-düzeyi hata ayıklayıcıya bir önuç sağlar. +Comment[zh_CN]=此插件提供了一个 Ruby 的源代码级调试器的前端。 +Comment[zh_TW]=此外掛程式提供 Ruby 除錯器的前端介面。 +Name=KDevRbDebugger +Name[da]=TDevelop Ruby fejlretter +Name[nds]=Ruby-Fehlersöök för TDevelop +Name[pl]=KDevDebugerRb +Name[sk]=KDev Ruby debuger +Name[sv]=TDevelop Ruby-avlusare +Name[zh_TW]=TDevelop Ruby 除錯器 +GenericName=Ruby Debugger Frontend +GenericName[ca]=Interfície per al depurador Ruby +GenericName[da]=Ruby fejlretningsgrænseflade +GenericName[de]=Debugger-Oberfläche für Ruby +GenericName[el]=Πρόγραμμα αποσφαλματωτή Ruby +GenericName[es]=Interfaz para el depurador de Ruby +GenericName[et]=Ruby siluri kasutajaliides +GenericName[eu]=Ruby araztailearen interfazea +GenericName[fa]=پایانۀ اشکال‌زدای رابی +GenericName[fr]=Interface du débogueur pour Ruby +GenericName[gl]=Frontal do depurador Ruby +GenericName[hu]=Grafikus felület a Ruby nyomkövetőjéhez +GenericName[it]=Interfaccia di debug per Ruby +GenericName[ja]=Ruby デバッガフロントエンド +GenericName[nds]=Böversiet för den Ruby-Fehlersöker +GenericName[ne]=रूबि डिबगर फ्रेन्टइन्ड +GenericName[nl]=Grafische schil voor de Ruby-debugger +GenericName[pl]=Interfejs do debugera dla języka Ruby +GenericName[pt]=Interface de Depuração Ruby +GenericName[pt_BR]=Interface para o Depurador Ruby +GenericName[ru]=Интегрированный отладчик Ruby +GenericName[sk]=Ruby debuger rozhranie +GenericName[sr]=Интерфејс исправљача за Ruby +GenericName[sr@Latn]=Interfejs ispravljača za Ruby +GenericName[sv]=Gränssnitt för Ruby-avlusare +GenericName[tr]=Ruby Hata Ayıklayıcı Önucu +GenericName[zh_CN]=Ruby 调试器前端 +GenericName[zh_TW]=Ruby 除錯器前端介面 +Icon= +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevrbdebugger +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-ProgrammingLanguages=Ruby +X-TDevelop-Properties=RubyDebugger diff --git a/languages/ruby/debugger/kdevrbdebugger.rc b/languages/ruby/debugger/kdevrbdebugger.rc new file mode 100644 index 00000000..c7e3b336 --- /dev/null +++ b/languages/ruby/debugger/kdevrbdebugger.rc @@ -0,0 +1,68 @@ + + + + + &Debug + + + + + + + + + + + + + + + + Debugger Toolbar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/ruby/debugger/tdevrbdebugger.desktop b/languages/ruby/debugger/tdevrbdebugger.desktop deleted file mode 100644 index 8b333642..00000000 --- a/languages/ruby/debugger/tdevrbdebugger.desktop +++ /dev/null @@ -1,73 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin provides a frontend for the source-level debugger for Ruby. -Comment[ca]=Aquest connector proveeix una interfície per a la depuració a nivell de codi per a Ruby. -Comment[da]=Dette plugin sørger for en grænseflade til Ruby kildekode-fejlretteren. -Comment[de]=Dieses Modul stellt eine Oberfläche für den Quelltext-Debugger für Ruby bereit. -Comment[el]=Αυτό το πρόσθετο προσφέρει ένα πρόγραμμα για τον αποσφαλματωτή πηγαίου κώδικα της γλώσσας Ruby. -Comment[es]=Este complemento proporciona un entorno para depurar código de Ruby. -Comment[et]=See plugin pakub Ruby lähtekoodi siluri kasutajaliidest. -Comment[eu]=Plugin honek Ruby-ren iturburu-mailako araztailearen interfaze bat bat eskeintzen du. -Comment[fa]=این وصله، یک پایانه برای اشکال‌زدای سطح منبع رابی فراهم می‌کند. -Comment[fr]=Ce module externe fournit une interface pour le débogueur au niveau source pour Ruby. -Comment[gl]=Esta extensión proporciona un frontal para o depurador a nivel de código de Ruby. -Comment[hu]=Ez a bővítőmodul grafikus felületet biztosít a Ruby forrásszintű nyomkövetőjének használatához. -Comment[it]=Questo plugin fornisce un'interfaccia per il debugger a livello sorgente di Ruby. -Comment[ja]=このプラグインは、Ruby のソースレベルデバッガのフロントエンドを提供します。 -Comment[nds]=Dit Moduul stellt en Böversiet för den Ruby-Borntextfehlersöker praat. -Comment[ne]=यो प्लगइनले रूबिका लागि स्रोत-तह डिबगरका लागि फ्रेन्टइन्ड प्रदान गर्दछ । -Comment[nl]=Deze plugin biedt een grafische schil voor de broncode-debugger voor Ruby. -Comment[pl]=Ta wtyczka udostępnia interfejs do debugera poziomu źródłowego dla języka Ruby. -Comment[pt]=Este 'plugin' oferece uma interface o depurador ao nível do código para Ruby. -Comment[pt_BR]=Este plug-in fornece uma interface para o depurador a nível de código para Ruby. -Comment[ru]=Этот модуль предоставляет интерфейс к отладчику исходного кода для Ruby. -Comment[sk]=Modul pre rozhranie debugera pre Ruby. -Comment[sr]=Овај прикључак обезбеђује интерфејс за исправљач на нивоу изворног кода за Ruby. -Comment[sr@Latn]=Ovaj priključak obezbeđuje interfejs za ispravljač na nivou izvornog koda za Ruby. -Comment[sv]=Insticksprogrammet tillhandahåller ett gränssnitt till källkodsavlusaren för Ruby. -Comment[tr]=Bu eklenti, Ruby için kaynak-düzeyi hata ayıklayıcıya bir önuç sağlar. -Comment[zh_CN]=此插件提供了一个 Ruby 的源代码级调试器的前端。 -Comment[zh_TW]=此外掛程式提供 Ruby 除錯器的前端介面。 -Name=KDevRbDebugger -Name[da]=TDevelop Ruby fejlretter -Name[nds]=Ruby-Fehlersöök för TDevelop -Name[pl]=KDevDebugerRb -Name[sk]=KDev Ruby debuger -Name[sv]=TDevelop Ruby-avlusare -Name[zh_TW]=TDevelop Ruby 除錯器 -GenericName=Ruby Debugger Frontend -GenericName[ca]=Interfície per al depurador Ruby -GenericName[da]=Ruby fejlretningsgrænseflade -GenericName[de]=Debugger-Oberfläche für Ruby -GenericName[el]=Πρόγραμμα αποσφαλματωτή Ruby -GenericName[es]=Interfaz para el depurador de Ruby -GenericName[et]=Ruby siluri kasutajaliides -GenericName[eu]=Ruby araztailearen interfazea -GenericName[fa]=پایانۀ اشکال‌زدای رابی -GenericName[fr]=Interface du débogueur pour Ruby -GenericName[gl]=Frontal do depurador Ruby -GenericName[hu]=Grafikus felület a Ruby nyomkövetőjéhez -GenericName[it]=Interfaccia di debug per Ruby -GenericName[ja]=Ruby デバッガフロントエンド -GenericName[nds]=Böversiet för den Ruby-Fehlersöker -GenericName[ne]=रूबि डिबगर फ्रेन्टइन्ड -GenericName[nl]=Grafische schil voor de Ruby-debugger -GenericName[pl]=Interfejs do debugera dla języka Ruby -GenericName[pt]=Interface de Depuração Ruby -GenericName[pt_BR]=Interface para o Depurador Ruby -GenericName[ru]=Интегрированный отладчик Ruby -GenericName[sk]=Ruby debuger rozhranie -GenericName[sr]=Интерфејс исправљача за Ruby -GenericName[sr@Latn]=Interfejs ispravljača za Ruby -GenericName[sv]=Gränssnitt för Ruby-avlusare -GenericName[tr]=Ruby Hata Ayıklayıcı Önucu -GenericName[zh_CN]=Ruby 调试器前端 -GenericName[zh_TW]=Ruby 除錯器前端介面 -Icon= -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevrbdebugger -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-ProgrammingLanguages=Ruby -X-TDevelop-Properties=RubyDebugger diff --git a/languages/ruby/debugger/tdevrbdebugger.rc b/languages/ruby/debugger/tdevrbdebugger.rc deleted file mode 100644 index c7e3b336..00000000 --- a/languages/ruby/debugger/tdevrbdebugger.rc +++ /dev/null @@ -1,68 +0,0 @@ - - - - - &Debug - - - - - - - - - - - - - - - - Debugger Toolbar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/languages/ruby/doc/CMakeLists.txt b/languages/ruby/doc/CMakeLists.txt index 127248cd..781fa2ba 100644 --- a/languages/ruby/doc/CMakeLists.txt +++ b/languages/ruby/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES ruby.toc ruby_bugs.toc qtruby.toc rails.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/ruby/doc/Makefile.am b/languages/ruby/doc/Makefile.am index 38fd2b45..245b8fe5 100644 --- a/languages/ruby/doc/Makefile.am +++ b/languages/ruby/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = ruby.toc ruby_bugs.toc qtruby.toc rails.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/ruby/file_templates/CMakeLists.txt b/languages/ruby/file_templates/CMakeLists.txt index ef75c4e1..617e829c 100644 --- a/languages/ruby/file_templates/CMakeLists.txt +++ b/languages/ruby/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES rb rhtml rxml rjs js css html.erb xml.builder js.rjs - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/ruby/file_templates/Makefile.am b/languages/ruby/file_templates/Makefile.am index 591930a0..7b449085 100644 --- a/languages/ruby/file_templates/Makefile.am +++ b/languages/ruby/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = rb rhtml rxml rjs js css html.erb xml.builder js.rjs diff --git a/languages/ruby/kdevrubysupport.desktop b/languages/ruby/kdevrubysupport.desktop new file mode 100644 index 00000000..9b5c6771 --- /dev/null +++ b/languages/ruby/kdevrubysupport.desktop @@ -0,0 +1,84 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Ruby Support +Comment[ca]=Suport per a Ruby +Comment[da]=Ruby-understøttelse +Comment[de]=Ruby-Unterstützung für TDevelop +Comment[el]=Υποστήριξη Ruby +Comment[es]=Soporte para Ruby +Comment[et]=Ruby toetus +Comment[eu]=Ruby euskarria +Comment[fa]=پشتیبانی رابی +Comment[fr]=Prise en charge du langage Ruby +Comment[ga]=Tacaíocht Ruby +Comment[gl]=Soporte para Ruby +Comment[hi]=रूबी समर्थन +Comment[hu]=Ruby-támogatás +Comment[is]=Ruby stuðningur +Comment[it]=Supporto per Ruby +Comment[ja]=Ruby サポート +Comment[nds]=Ünnerstütten för Ruby +Comment[ne]=रूबि समर्थन +Comment[nl]=Ondersteuning voor Ruby +Comment[pl]=Obsługa: Ruby +Comment[pt]=Suporte a Ruby +Comment[pt_BR]=Suporte ao Ruby +Comment[ru]=Поддержка языка Ruby +Comment[sk]=Ruby podpora +Comment[sl]=Podpora za Ruby +Comment[sr]=Подршка за Ruby +Comment[sr@Latn]=Podrška za Ruby +Comment[sv]=Ruby-stöd +Comment[ta]=ருபி ஆதரவு +Comment[tg]=Ёрӣ намудани забони Ruby +Comment[tr]=Ruby Desteği +Comment[zh_CN]=Ruby 支持 +Comment[zh_TW]=Ruby 支援 +Name=KDevRubySupport +Name[da]=TDevelop Ruby-understøttelse +Name[de]=Unterstützung für Ruby (TDevelop) +Name[hi]=के-डेव-रूबी-समर्थन +Name[nds]=Ünnerstütten för Ruby (TDevelop) +Name[pl]=KDevObsługaRuby +Name[sk]=KDev Ruby podpora +Name[sv]=TDevelop Ruby-stöd +Name[ta]=கெடெவ் ருபி ஆதரவு +Name[zh_TW]=TDevelop Ruby 支援 +GenericName=Ruby Support +GenericName[ca]=Suport per a Ruby +GenericName[da]=Ruby-understøttelse +GenericName[de]=Unterstützung für Ruby +GenericName[el]=Υποστήριξη Ruby +GenericName[es]=Soporte para Ruby +GenericName[et]=Ruby toetus +GenericName[eu]=Ruby euskarria +GenericName[fa]=پشتیبانی رابی +GenericName[fr]=Prise en charge du langage Ruby +GenericName[ga]=Tacaíocht Ruby +GenericName[gl]=Soporte para Ruby +GenericName[hi]=रूबी समर्थन +GenericName[hu]=Ruby-támogatás +GenericName[it]=Supporto a Ruby +GenericName[ja]=Ruby サポート +GenericName[nds]=Ünnerstütten för Ruby +GenericName[ne]=रूबि समर्थन +GenericName[nl]=Ondersteuning voor Ruby +GenericName[pl]=Obsługa: Ruby +GenericName[pt]=Suporte a Ruby +GenericName[pt_BR]=Suporte ao Ruby +GenericName[ru]=Поддержка языка Ruby +GenericName[sk]=Ruby podpora +GenericName[sl]=Podpora za Ruby +GenericName[sr]=Подршка за Ruby +GenericName[sr@Latn]=Podrška za Ruby +GenericName[sv]=Ruby-stöd +GenericName[ta]=ருபி ஆதரவு +GenericName[tg]=Ёрӣ намудани забони Ruby +GenericName[tr]=Ruby Desteği +GenericName[zh_CN]=Ruby 支持 +GenericName[zh_TW]=Ruby 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevrubysupport +X-TDevelop-Version=5 +X-TDevelop-Language=Ruby diff --git a/languages/ruby/kdevrubysupport.rc b/languages/ruby/kdevrubysupport.rc new file mode 100644 index 00000000..b9269aa2 --- /dev/null +++ b/languages/ruby/kdevrubysupport.rc @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/languages/ruby/qtdesignerrubyintegration.cpp b/languages/ruby/qtdesignerrubyintegration.cpp index 7172b9e0..bb9c0113 100644 --- a/languages/ruby/qtdesignerrubyintegration.cpp +++ b/languages/ruby/qtdesignerrubyintegration.cpp @@ -32,14 +32,14 @@ #include #include -#include -#include -#include +#include +#include +#include #include "codemodel_utils.h" #include "implementationwidget.h" -QtDesignerRubyIntegration::QtDesignerRubyIntegration(TDevLanguageSupport *part, +QtDesignerRubyIntegration::QtDesignerRubyIntegration(KDevLanguageSupport *part, ImplementationWidget *impl) :QtDesignerIntegration(part, impl, false, 0) { diff --git a/languages/ruby/qtdesignerrubyintegration.h b/languages/ruby/qtdesignerrubyintegration.h index 91776afa..38722167 100644 --- a/languages/ruby/qtdesignerrubyintegration.h +++ b/languages/ruby/qtdesignerrubyintegration.h @@ -27,7 +27,7 @@ class QtDesignerRubyIntegration : public QtDesignerIntegration Q_OBJECT public: - QtDesignerRubyIntegration(TDevLanguageSupport *part, ImplementationWidget *impl); + QtDesignerRubyIntegration(KDevLanguageSupport *part, ImplementationWidget *impl); protected: void addFunctionToClass(KInterfaceDesigner::Function function, ClassDom klass); diff --git a/languages/ruby/rubyimplementationwidget.cpp b/languages/ruby/rubyimplementationwidget.cpp index 9a7cde7a..ba371526 100644 --- a/languages/ruby/rubyimplementationwidget.cpp +++ b/languages/ruby/rubyimplementationwidget.cpp @@ -30,10 +30,10 @@ #include #include -#include -#include +#include +#include -RubyImplementationWidget::RubyImplementationWidget(TDevLanguageSupport* part, +RubyImplementationWidget::RubyImplementationWidget(KDevLanguageSupport* part, TQWidget* parent, const char* name, bool modal) :ImplementationWidget(part, parent, name, modal) { diff --git a/languages/ruby/rubyimplementationwidget.h b/languages/ruby/rubyimplementationwidget.h index dac75fb1..a5d8e491 100644 --- a/languages/ruby/rubyimplementationwidget.h +++ b/languages/ruby/rubyimplementationwidget.h @@ -26,7 +26,7 @@ class RubyImplementationWidget : public ImplementationWidget { Q_OBJECT public: - RubyImplementationWidget(TDevLanguageSupport* part, TQWidget* parent = 0, + RubyImplementationWidget(KDevLanguageSupport* part, TQWidget* parent = 0, const char* name = 0, bool modal = true); virtual TQStringList createClassFiles(); diff --git a/languages/ruby/rubysupport_part.cpp b/languages/ruby/rubysupport_part.cpp index 915d12a1..e1745a02 100644 --- a/languages/ruby/rubysupport_part.cpp +++ b/languages/ruby/rubysupport_part.cpp @@ -5,15 +5,15 @@ #include "qtdesignerrubyintegration.h" #include "rubyimplementationwidget.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevlanguagesupport.h" -#include "tdevpartcontroller.h" -#include "tdevproject.h" -#include "tdevappfrontend.h" -#include "tdevplugininfo.h" -#include "tdevshellwidget.h" -#include "tdevquickopen.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevlanguagesupport.h" +#include "kdevpartcontroller.h" +#include "kdevproject.h" +#include "kdevappfrontend.h" +#include "kdevplugininfo.h" +#include "kdevshellwidget.h" +#include "kdevquickopen.h" #include #include @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include @@ -37,15 +37,15 @@ #include -typedef TDevGenericFactory RubySupportFactory; -static const TDevPluginInfo data("tdevrubysupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevrubysupport, RubySupportFactory( data ) ) +typedef KDevGenericFactory RubySupportFactory; +static const KDevPluginInfo data("kdevrubysupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevrubysupport, RubySupportFactory( data ) ) RubySupportPart::RubySupportPart(TQObject *parent, const char *name, const TQStringList& ) - : TDevLanguageSupport (&data, parent, name ? name : "RubySupportPart" ) + : KDevLanguageSupport (&data, parent, name ? name : "RubySupportPart" ) { setInstance(RubySupportFactory::instance()); - setXMLFile("tdevrubysupport.rc"); + setXMLFile("kdevrubysupport.rc"); TDEAction *action; action = new TDEAction( i18n("&Run"), "exec", SHIFT + Key_F9, @@ -72,7 +72,7 @@ RubySupportPart::RubySupportPart(TQObject *parent, const char *name, const TQStr kdDebug() << "Creating RubySupportPart" << endl; - m_shellWidget = new TDevShellWidget( 0, "irb console"); + m_shellWidget = new KDevShellWidget( 0, "irb console"); m_shellWidget->setIcon( SmallIcon("ruby_config.png", TDEIcon::SizeMedium, TDEIcon::DefaultState, RubySupportPart::instance())); m_shellWidget->setCaption(i18n("Ruby Shell")); mainWindow()->embedOutputView( m_shellWidget, i18n("Ruby Shell"), i18n("Ruby Shell")); @@ -127,7 +127,7 @@ void RubySupportPart::projectOpened() TQFileInfo server(project()->projectDirectory() + "/script/server"); if (! server.exists()) { cmd += "rails " + project()->projectDirectory(); - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(project()->projectDirectory(), cmd, false); } } @@ -211,7 +211,7 @@ void RubySupportPart::savedFile(const KURL &fileName) } } -TDevLanguageSupport::Features RubySupportPart::features() +KDevLanguageSupport::Features RubySupportPart::features() { return Features(Classes | Functions | Variables | Declarations | Signals | Slots); } @@ -528,7 +528,7 @@ void RubySupportPart::slotRun () // Starting WEBrick for a Rails app. Translate a SIGTERM signal sent by KDevelop // to a SIGINT expected by WEBrick (ie control&c) to terminate it. cmd += "script/server& \n trap \"kill -s SIGINT $!\" TERM \n wait \n exit 0"; - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(project()->projectDirectory(), cmd, false); } else { TQString cmd = TQString("%1 -K%2 -C\"%3\" -I\"%4\" \"%5\" %6") @@ -613,7 +613,7 @@ TQString RubySupportPart::characterCoding() { void RubySupportPart::startApplication(const TQString &program) { bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevrubysupport/run/terminal"); - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, inTerminal); } @@ -627,9 +627,9 @@ KMimeType::List RubySupportPart::mimeTypes( ) return list; } -TDevDesignerIntegration *RubySupportPart::designer(KInterfaceDesigner::DesignerType type) +KDevDesignerIntegration *RubySupportPart::designer(KInterfaceDesigner::DesignerType type) { - TDevDesignerIntegration *des = 0; + KDevDesignerIntegration *des = 0; switch (type) { case KInterfaceDesigner::TQtDesigner: @@ -651,7 +651,7 @@ TDevDesignerIntegration *RubySupportPart::designer(KInterfaceDesigner::DesignerT void RubySupportPart::projectClosed( ) { - for (TQMap::const_iterator it = m_designers.begin(); + for (TQMap::const_iterator it = m_designers.begin(); it != m_designers.end(); ++it) { kdDebug() << "calling save settings fro designer integration" << endl; @@ -669,7 +669,7 @@ void RubySupportPart::contextMenu( TQPopupMenu * popup, const Context * context { m_contextFileName = url.fileName(); int id = popup->insertItem(i18n("Create or Select Implementation..."), this, TQT_SLOT(slotCreateSubclass())); - popup->setWhatsThis(id, i18n("Create or select implementation

    Creates or selects a subclass of selected form for use with integrated TDevDesigner.")); + popup->setWhatsThis(id, i18n("Create or select implementation

    Creates or selects a subclass of selected form for use with integrated KDevDesigner.")); } } } diff --git a/languages/ruby/rubysupport_part.h b/languages/ruby/rubysupport_part.h index c0bfc36e..024eae60 100644 --- a/languages/ruby/rubysupport_part.h +++ b/languages/ruby/rubysupport_part.h @@ -3,19 +3,19 @@ */ -#ifndef __TDEVPART_RUBYSUPPORT_H__ -#define __TDEVPART_RUBYSUPPORT_H__ +#ifndef __KDEVPART_RUBYSUPPORT_H__ +#define __KDEVPART_RUBYSUPPORT_H__ #include -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" class KDialogBase; class TQPopupMenu; class Context; -class TDevShellWidget; +class KDevShellWidget; -class RubySupportPart : public TDevLanguageSupport +class RubySupportPart : public KDevLanguageSupport { Q_OBJECT @@ -25,7 +25,7 @@ public: RubySupportPart(TQObject *parent, const char *name, const TQStringList &); virtual ~RubySupportPart(); - virtual TDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); + virtual KDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); protected: virtual Features features(); @@ -63,12 +63,12 @@ private: void maybeParse(const TQString fileName); void parse(const TQString &fileName); - TQMap m_designers; + TQMap m_designers; TQString m_contextFileName; TQCString m_shell; - TQGuardedPtr m_shellWidget; + TQGuardedPtr m_shellWidget; }; diff --git a/languages/ruby/tdevrubysupport.desktop b/languages/ruby/tdevrubysupport.desktop deleted file mode 100644 index 1a507ffd..00000000 --- a/languages/ruby/tdevrubysupport.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Ruby Support -Comment[ca]=Suport per a Ruby -Comment[da]=Ruby-understøttelse -Comment[de]=Ruby-Unterstützung für TDevelop -Comment[el]=Υποστήριξη Ruby -Comment[es]=Soporte para Ruby -Comment[et]=Ruby toetus -Comment[eu]=Ruby euskarria -Comment[fa]=پشتیبانی رابی -Comment[fr]=Prise en charge du langage Ruby -Comment[ga]=Tacaíocht Ruby -Comment[gl]=Soporte para Ruby -Comment[hi]=रूबी समर्थन -Comment[hu]=Ruby-támogatás -Comment[is]=Ruby stuðningur -Comment[it]=Supporto per Ruby -Comment[ja]=Ruby サポート -Comment[nds]=Ünnerstütten för Ruby -Comment[ne]=रूबि समर्थन -Comment[nl]=Ondersteuning voor Ruby -Comment[pl]=Obsługa: Ruby -Comment[pt]=Suporte a Ruby -Comment[pt_BR]=Suporte ao Ruby -Comment[ru]=Поддержка языка Ruby -Comment[sk]=Ruby podpora -Comment[sl]=Podpora za Ruby -Comment[sr]=Подршка за Ruby -Comment[sr@Latn]=Podrška za Ruby -Comment[sv]=Ruby-stöd -Comment[ta]=ருபி ஆதரவு -Comment[tg]=Ёрӣ намудани забони Ruby -Comment[tr]=Ruby Desteği -Comment[zh_CN]=Ruby 支持 -Comment[zh_TW]=Ruby 支援 -Name=KDevRubySupport -Name[da]=TDevelop Ruby-understøttelse -Name[de]=Unterstützung für Ruby (TDevelop) -Name[hi]=के-डेव-रूबी-समर्थन -Name[nds]=Ünnerstütten för Ruby (TDevelop) -Name[pl]=KDevObsługaRuby -Name[sk]=KDev Ruby podpora -Name[sv]=TDevelop Ruby-stöd -Name[ta]=கெடெவ் ருபி ஆதரவு -Name[zh_TW]=TDevelop Ruby 支援 -GenericName=Ruby Support -GenericName[ca]=Suport per a Ruby -GenericName[da]=Ruby-understøttelse -GenericName[de]=Unterstützung für Ruby -GenericName[el]=Υποστήριξη Ruby -GenericName[es]=Soporte para Ruby -GenericName[et]=Ruby toetus -GenericName[eu]=Ruby euskarria -GenericName[fa]=پشتیبانی رابی -GenericName[fr]=Prise en charge du langage Ruby -GenericName[ga]=Tacaíocht Ruby -GenericName[gl]=Soporte para Ruby -GenericName[hi]=रूबी समर्थन -GenericName[hu]=Ruby-támogatás -GenericName[it]=Supporto a Ruby -GenericName[ja]=Ruby サポート -GenericName[nds]=Ünnerstütten för Ruby -GenericName[ne]=रूबि समर्थन -GenericName[nl]=Ondersteuning voor Ruby -GenericName[pl]=Obsługa: Ruby -GenericName[pt]=Suporte a Ruby -GenericName[pt_BR]=Suporte ao Ruby -GenericName[ru]=Поддержка языка Ruby -GenericName[sk]=Ruby podpora -GenericName[sl]=Podpora za Ruby -GenericName[sr]=Подршка за Ruby -GenericName[sr@Latn]=Podrška za Ruby -GenericName[sv]=Ruby-stöd -GenericName[ta]=ருபி ஆதரவு -GenericName[tg]=Ёрӣ намудани забони Ruby -GenericName[tr]=Ruby Desteği -GenericName[zh_CN]=Ruby 支持 -GenericName[zh_TW]=Ruby 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevrubysupport -X-TDevelop-Version=5 -X-TDevelop-Language=Ruby diff --git a/languages/ruby/tdevrubysupport.rc b/languages/ruby/tdevrubysupport.rc deleted file mode 100644 index b9269aa2..00000000 --- a/languages/ruby/tdevrubysupport.rc +++ /dev/null @@ -1,20 +0,0 @@ - - - -

    - - - - - - - - - - - - - - - - diff --git a/languages/sql/CMakeLists.txt b/languages/sql/CMakeLists.txt index 67d5aef5..8e7d41cc 100644 --- a/languages/sql/CMakeLists.txt +++ b/languages/sql/CMakeLists.txt @@ -30,13 +30,13 @@ link_directories( ##### other data ################################ -install( FILES tdevsqlsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevsqlsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevsqlsupport ) +install( FILES kdevsqlsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevsqlsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevsqlsupport ) -##### libtdevsqlsupport (module) ################ +##### libkdevsqlsupport (module) ################ -tde_add_kpart( libtdevsqlsupport AUTOMOC +tde_add_kpart( libkdevsqlsupport AUTOMOC SOURCES sqlconfigwidget.ui sqlsupport_part.cpp sqlactions.cpp sqloutputwidget.cpp diff --git a/languages/sql/Makefile.am b/languages/sql/Makefile.am index eb48a72f..ba410a98 100644 --- a/languages/sql/Makefile.am +++ b/languages/sql/Makefile.am @@ -5,16 +5,16 @@ INCLUDES = -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/interfaces \ $(all_includes) SUBDIRS = app_templates doc -kde_module_LTLIBRARIES = libtdevsqlsupport.la -libtdevsqlsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevsqlsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevsqlsupport.la +libkdevsqlsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevsqlsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevsqlsupport_la_SOURCES = sqlconfigwidget.ui sqlsupport_part.cpp sqlactions.cpp sqloutputwidget.cpp +libkdevsqlsupport_la_SOURCES = sqlconfigwidget.ui sqlsupport_part.cpp sqlactions.cpp sqloutputwidget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevsqlsupport.desktop +service_DATA = kdevsqlsupport.desktop -rcdir = $(kde_datadir)/tdevsqlsupport -rc_DATA = tdevsqlsupport.rc +rcdir = $(kde_datadir)/kdevsqlsupport +rc_DATA = kdevsqlsupport.rc diff --git a/languages/sql/app_templates/sqlsimple/CMakeLists.txt b/languages/sql/app_templates/sqlsimple/CMakeLists.txt index 290dd962..05ddb17f 100644 --- a/languages/sql/app_templates/sqlsimple/CMakeLists.txt +++ b/languages/sql/app_templates/sqlsimple/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( sqlsimple.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/sqlsimple.tar.gz sqlsimple.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - sqlsimple.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + sqlsimple.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/sql/app_templates/sqlsimple/Makefile.am b/languages/sql/app_templates/sqlsimple/Makefile.am index 1b49cc21..6bfae1c4 100644 --- a/languages/sql/app_templates/sqlsimple/Makefile.am +++ b/languages/sql/app_templates/sqlsimple/Makefile.am @@ -2,10 +2,10 @@ templateName = sqlsimple dataFiles = app.sql app.tdevelop ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/sql/app_templates/sqlsimple/app.tdevelop b/languages/sql/app_templates/sqlsimple/app.tdevelop index 6977b304..7fc4efc9 100644 --- a/languages/sql/app_templates/sqlsimple/app.tdevelop +++ b/languages/sql/app_templates/sqlsimple/app.tdevelop @@ -11,22 +11,22 @@ KDevdistpart - TDevDebugger + KDevDebugger - + src *.sql *~ - - + + - - + + ada ada_bugs_gcc @@ -75,10 +75,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/sql/app_templates/sqlsimple/sqlsimple.kdevtemplate b/languages/sql/app_templates/sqlsimple/sqlsimple.kdevtemplate new file mode 100644 index 00000000..5081e992 --- /dev/null +++ b/languages/sql/app_templates/sqlsimple/sqlsimple.kdevtemplate @@ -0,0 +1,106 @@ +# KDE Config File +[General] +Name=Simple SQL Project +Name[ca]=Simple projecte en SQL +Name[da]=Simpelt SQL-projekt +Name[de]=Einfaches SQL-Projekt +Name[el]=Απλό έργο SQL +Name[es]=Proyecto SQL sencillo +Name[et]=Lihtne SQL projekt +Name[eu]=SQL proiektu sinplea +Name[fa]=پروژۀ سادۀ SQL +Name[fr]=Projet SQL simple +Name[ga]=Tionscadal Simplí SQL +Name[gl]=Proxecto sinxelo en SQL +Name[hu]=Egyszerű SQL-projekt +Name[it]=Semplice progetto SQL +Name[ja]=簡単な SQL プロジェクト +Name[nds]=Eenfach SQL-Projekt +Name[ne]=साधारण SQL परियोजना +Name[nl]=Eenvoudig SQL-project +Name[pl]=Prosty projekt w SQL-u +Name[pt]=Projecto Simples em SQL +Name[pt_BR]=Projecto Simples em SQL +Name[ru]=Простой проект SQL +Name[sk]=Jednoduchý SQL projekt +Name[sr]=Једноставан SQL пројекат +Name[sr@Latn]=Jednostavan SQL projekat +Name[sv]=Enkelt SQL-projekt +Name[tr]=Basit SQL Projesi +Name[zh_CN]=简单的 SQL 工程 +Name[zh_TW]=簡單的 SQL 專案 +Category=Database +Comment=Generates a simple SQL project. +Comment[ca]=Genera un simple projecte en SQL. +Comment[da]=Genererer et simpelt SQL projekt. +Comment[de]=Erstellt ein einfaches SQL-Projekt. +Comment[el]=Δημιουργεί ένα απλό έργο SQL. +Comment[es]=Genera un sencillo proyecto SQL. +Comment[et]=Lihtsa SQL projekti loomine. +Comment[eu]=SQL proiektu sinple bat sortzen du. +Comment[fa]=یک پروژۀ سادۀ SQL تولید می‌کند. +Comment[fr]=Génère un projet SQL simple. +Comment[gl]=Xera un proxecto sinxelo en SQL. +Comment[hu]=Létrehoz egy egyszerű SQL-projektet. +Comment[it]=Genera un semplice progetto SQL. +Comment[ja]=簡単な SQL プロジェクトを作成します +Comment[nds]=Stellt en eenfach SQL-Projekt op. +Comment[ne]=साधारण SQL परियोजना उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig SQL-project. +Comment[pl]=Generuje prosty projekt w SQL-u. +Comment[pt]=Gera um projecto simples em SQL. +Comment[pt_BR]=Gera um projecto simples em SQL. +Comment[ru]=Простой проект SQL +Comment[sk]=Vygeneruje jednoduchý SQL projekt. +Comment[sr]=Прави једноставан SQL пројекат. +Comment[sr@Latn]=Pravi jednostavan SQL projekat. +Comment[sv]=Skapar ett enkelt SQL-projekt. +Comment[tr]=Basit bir SQL Projesi yaratır +Comment[zh_CN]=生成一个简单的 SQL 工程。 +Comment[zh_TW]=產生一個簡單的 SQL 專案 +FileTemplates=sql,AdaStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.sql +Archive=sqlsimple.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/app.sql +Dest=%{dest}/%{APPNAMELC}.sql + +[MSG] +Type=install +Comment=A simple SQL project was created in %{dest} +Comment[ca]=Un simple projecte en SQL ha estat creat en %{dest} +Comment[da]=Et simpelt SQL projekt blev oprettet i %{dest} +Comment[de]=Ein einfaches SQL-Projekt wurde in %{dest} erstellt. +Comment[el]=Ένα απλό έργο SQL δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo proyecto SQL ha sido creado en %{dest} +Comment[et]=Lihtne SQL projekt loodi asukohta %{dest} +Comment[eu]=SQL proiektu sinple bat sortu da hemen: %{dest} +Comment[fa]=یک پروژۀ سادۀ SQL در %{dest} ایجاد شد +Comment[fr]=Un projet SQL simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh tionscadal simplí SQL i %{dest} +Comment[gl]=Creouse un proxecto sinxelo en SQL en %{dest} +Comment[hu]=Létrejött egy egyszerű SQL-projekt itt: %{dest} +Comment[it]=È stato creato un semplice progetto SQL in %{dest} +Comment[ja]=簡単な SQL プロジェクトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach SQL-Projekt opstellt. +Comment[ne]=साधारण SQL परियोजना %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig SQL-project is aangemaakt in %{dest} +Comment[pl]=Prosty projekt w SQL-u został utworzony w %{dest} +Comment[pt]=Foi criado um projecto simples de SQL em %{dest} +Comment[pt_BR]=Foi criado um projecto simples de SQL em %{dest} +Comment[ru]=Простой проект SQL создан в %{dest} +Comment[sk]=Jednoduchý SQL projekt bol vytvorený v %{dest} +Comment[sr]=Једноставан SQL пројекат направљен је у %{dest} +Comment[sr@Latn]=Jednostavan SQL projekat napravljen je u %{dest} +Comment[sv]=Ett enkelt SQL-projekt skapades i %{dest} +Comment[tr]=Basit bir SQL projesi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了简单的 SQL 工程 +Comment[zh_TW]=一個簡單的 SQL 專案已建立於 %{dest} diff --git a/languages/sql/app_templates/sqlsimple/sqlsimple.tdevtemplate b/languages/sql/app_templates/sqlsimple/sqlsimple.tdevtemplate deleted file mode 100644 index 5081e992..00000000 --- a/languages/sql/app_templates/sqlsimple/sqlsimple.tdevtemplate +++ /dev/null @@ -1,106 +0,0 @@ -# KDE Config File -[General] -Name=Simple SQL Project -Name[ca]=Simple projecte en SQL -Name[da]=Simpelt SQL-projekt -Name[de]=Einfaches SQL-Projekt -Name[el]=Απλό έργο SQL -Name[es]=Proyecto SQL sencillo -Name[et]=Lihtne SQL projekt -Name[eu]=SQL proiektu sinplea -Name[fa]=پروژۀ سادۀ SQL -Name[fr]=Projet SQL simple -Name[ga]=Tionscadal Simplí SQL -Name[gl]=Proxecto sinxelo en SQL -Name[hu]=Egyszerű SQL-projekt -Name[it]=Semplice progetto SQL -Name[ja]=簡単な SQL プロジェクト -Name[nds]=Eenfach SQL-Projekt -Name[ne]=साधारण SQL परियोजना -Name[nl]=Eenvoudig SQL-project -Name[pl]=Prosty projekt w SQL-u -Name[pt]=Projecto Simples em SQL -Name[pt_BR]=Projecto Simples em SQL -Name[ru]=Простой проект SQL -Name[sk]=Jednoduchý SQL projekt -Name[sr]=Једноставан SQL пројекат -Name[sr@Latn]=Jednostavan SQL projekat -Name[sv]=Enkelt SQL-projekt -Name[tr]=Basit SQL Projesi -Name[zh_CN]=简单的 SQL 工程 -Name[zh_TW]=簡單的 SQL 專案 -Category=Database -Comment=Generates a simple SQL project. -Comment[ca]=Genera un simple projecte en SQL. -Comment[da]=Genererer et simpelt SQL projekt. -Comment[de]=Erstellt ein einfaches SQL-Projekt. -Comment[el]=Δημιουργεί ένα απλό έργο SQL. -Comment[es]=Genera un sencillo proyecto SQL. -Comment[et]=Lihtsa SQL projekti loomine. -Comment[eu]=SQL proiektu sinple bat sortzen du. -Comment[fa]=یک پروژۀ سادۀ SQL تولید می‌کند. -Comment[fr]=Génère un projet SQL simple. -Comment[gl]=Xera un proxecto sinxelo en SQL. -Comment[hu]=Létrehoz egy egyszerű SQL-projektet. -Comment[it]=Genera un semplice progetto SQL. -Comment[ja]=簡単な SQL プロジェクトを作成します -Comment[nds]=Stellt en eenfach SQL-Projekt op. -Comment[ne]=साधारण SQL परियोजना उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig SQL-project. -Comment[pl]=Generuje prosty projekt w SQL-u. -Comment[pt]=Gera um projecto simples em SQL. -Comment[pt_BR]=Gera um projecto simples em SQL. -Comment[ru]=Простой проект SQL -Comment[sk]=Vygeneruje jednoduchý SQL projekt. -Comment[sr]=Прави једноставан SQL пројекат. -Comment[sr@Latn]=Pravi jednostavan SQL projekat. -Comment[sv]=Skapar ett enkelt SQL-projekt. -Comment[tr]=Basit bir SQL Projesi yaratır -Comment[zh_CN]=生成一个简单的 SQL 工程。 -Comment[zh_TW]=產生一個簡單的 SQL 專案 -FileTemplates=sql,AdaStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.sql -Archive=sqlsimple.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.sql -Dest=%{dest}/%{APPNAMELC}.sql - -[MSG] -Type=install -Comment=A simple SQL project was created in %{dest} -Comment[ca]=Un simple projecte en SQL ha estat creat en %{dest} -Comment[da]=Et simpelt SQL projekt blev oprettet i %{dest} -Comment[de]=Ein einfaches SQL-Projekt wurde in %{dest} erstellt. -Comment[el]=Ένα απλό έργο SQL δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo proyecto SQL ha sido creado en %{dest} -Comment[et]=Lihtne SQL projekt loodi asukohta %{dest} -Comment[eu]=SQL proiektu sinple bat sortu da hemen: %{dest} -Comment[fa]=یک پروژۀ سادۀ SQL در %{dest} ایجاد شد -Comment[fr]=Un projet SQL simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh tionscadal simplí SQL i %{dest} -Comment[gl]=Creouse un proxecto sinxelo en SQL en %{dest} -Comment[hu]=Létrejött egy egyszerű SQL-projekt itt: %{dest} -Comment[it]=È stato creato un semplice progetto SQL in %{dest} -Comment[ja]=簡単な SQL プロジェクトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach SQL-Projekt opstellt. -Comment[ne]=साधारण SQL परियोजना %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig SQL-project is aangemaakt in %{dest} -Comment[pl]=Prosty projekt w SQL-u został utworzony w %{dest} -Comment[pt]=Foi criado um projecto simples de SQL em %{dest} -Comment[pt_BR]=Foi criado um projecto simples de SQL em %{dest} -Comment[ru]=Простой проект SQL создан в %{dest} -Comment[sk]=Jednoduchý SQL projekt bol vytvorený v %{dest} -Comment[sr]=Једноставан SQL пројекат направљен је у %{dest} -Comment[sr@Latn]=Jednostavan SQL projekat napravljen je u %{dest} -Comment[sv]=Ett enkelt SQL-projekt skapades i %{dest} -Comment[tr]=Basit bir SQL projesi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了简单的 SQL 工程 -Comment[zh_TW]=一個簡單的 SQL 專案已建立於 %{dest} diff --git a/languages/sql/doc/Makefile.am b/languages/sql/doc/Makefile.am index f6fd6d52..d42aec82 100644 --- a/languages/sql/doc/Makefile.am +++ b/languages/sql/doc/Makefile.am @@ -1,4 +1,4 @@ -#tocdir = ${kde_datadir}/tdevdoctreeview/tocs +#tocdir = ${kde_datadir}/kdevdoctreeview/tocs #toc_DATA = #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/sql/kdevsqlsupport.desktop b/languages/sql/kdevsqlsupport.desktop new file mode 100644 index 00000000..f5ee67ab --- /dev/null +++ b/languages/sql/kdevsqlsupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=SQL Support +Comment[ca]=Suport per a SQL +Comment[da]=SQL-understøttelse +Comment[de]=Unterstützung für SQL +Comment[el]=Υποστήριξη SQL +Comment[es]=Soporte para SQL +Comment[et]=SQL toetus +Comment[eu]=SQL euskarria +Comment[fa]=پشتیبانی SQL +Comment[fr]=Prise en charge du langage SQL +Comment[ga]=Tacaíocht SQL +Comment[gl]=Soporte para SQL +Comment[hi]=एसक्यूएल समर्थन +Comment[hu]=SQL-támogatás +Comment[is]=SQL stuðningur +Comment[it]=Supporto SQL +Comment[ja]=SQL サポート +Comment[nds]=SQL-Ünnerstütten +Comment[ne]=SQL समर्थन +Comment[nl]=Ondersteuning voor SQL +Comment[pl]=Obsługa SQL-a +Comment[pt]=Suporte a SQL +Comment[pt_BR]=Suporte ao SQL +Comment[ru]=Поддержка языка SQL +Comment[sk]=SQL podpora +Comment[sl]=Podpora za SQL +Comment[sr]=Подршка за SQL +Comment[sr@Latn]=Podrška za SQL +Comment[sv]=SQL-stöd +Comment[ta]=SQL ஆதரவு +Comment[tg]=Ёрӣ намудани забони SQL +Comment[tr]=SQL Desteği +Comment[zh_CN]=SQL 语言支持 +Comment[zh_TW]=SQL 支援 +Name=KDevSQLSupport +Name[da]=TDevelop SQL-understøttelse +Name[de]=Unterstützung für SQL (TDevelop) +Name[hi]=के-डेव-एसक्यूएल-समर्थन +Name[nds]=SQL-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaSQL +Name[sk]=KDev SQL podpora +Name[sv]=TDevelop SQL-stöd +Name[ta]=கெடெவ் எஸ்கியேல் ஆதரவு +Name[zh_TW]=TDevelop SQL 支援 +GenericName=SQL Support +GenericName[ca]=Suport per a SQL +GenericName[da]=SQL-understøttelse +GenericName[de]=Unterstützung für SQL +GenericName[el]=Υποστήριξη SQL +GenericName[es]=Soporte para SQL +GenericName[et]=SQL toetus +GenericName[eu]=SQL euskarria +GenericName[fa]=پشتیبانی SQL +GenericName[fr]=Langage SQL +GenericName[ga]=Tacaíocht SQL +GenericName[gl]=Soporte para SQL +GenericName[hi]=एसक्यूएल समर्थन +GenericName[hu]=SQL-támogatás +GenericName[it]=Supporto SQL +GenericName[ja]=SQL サポート +GenericName[nds]=SQL-Ünnerstütten +GenericName[ne]=SQL समर्थन +GenericName[nl]=Ondersteuning voor SQL +GenericName[pl]=Obsługa SQL-a +GenericName[pt]=Suporte a SQL +GenericName[pt_BR]=Suporte ao SQL +GenericName[ru]=Поддержка языка SQL +GenericName[sk]=SQL podpora +GenericName[sl]=Podpora za SQL +GenericName[sr]=Подршка за SQL +GenericName[sr@Latn]=Podrška za SQL +GenericName[sv]=SQL-stöd +GenericName[ta]=SQL ஆதரவு +GenericName[tg]=Ёрӣ намудани забони SQL +GenericName[tr]=SQL Desteği +GenericName[zh_CN]=SQL 支持 +GenericName[zh_TW]=SQL 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevsqlsupport +X-TDevelop-Version=5 +X-TDevelop-Language=SQL +X-TDevelop-Args=SQL diff --git a/languages/sql/kdevsqlsupport.rc b/languages/sql/kdevsqlsupport.rc new file mode 100644 index 00000000..36b91d7a --- /dev/null +++ b/languages/sql/kdevsqlsupport.rc @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/languages/sql/sqlactions.cpp b/languages/sql/sqlactions.cpp index f737b694..1d1a5b14 100644 --- a/languages/sql/sqlactions.cpp +++ b/languages/sql/sqlactions.cpp @@ -21,8 +21,8 @@ #include #include -#include "tdevplugin.h" -#include "tdevlanguagesupport.h" +#include "kdevplugin.h" +#include "kdevlanguagesupport.h" #include "sqlsupport_part.h" SqlListAction::SqlListAction(SQLSupportPart *part, const TQString &text, diff --git a/languages/sql/sqlconfigwidget.ui.h b/languages/sql/sqlconfigwidget.ui.h index e58930f9..c06413e7 100644 --- a/languages/sql/sqlconfigwidget.ui.h +++ b/languages/sql/sqlconfigwidget.ui.h @@ -195,7 +195,7 @@ void SqlConfigWidget::accept() { Q_ASSERT( doc ); - TQDomElement dbElem = DomUtil::createElementByPath( *doc, "/tdevsqlsupport/servers" ); + TQDomElement dbElem = DomUtil::createElementByPath( *doc, "/kdevsqlsupport/servers" ); DomUtil::makeEmpty( dbElem ); for ( int i = 0; i < dbTable->numRows() - 1; i++ ) { @@ -206,7 +206,7 @@ void SqlConfigWidget::accept() << SQLSupportPart::cryptStr( ((PasswordTableItem*)dbTable->item( i, 5 ))->password ); DomUtil::writeListEntry( *doc, - "/tdevsqlsupport/servers/server" + TQString::number( i ), + "/kdevsqlsupport/servers/server" + TQString::number( i ), "el", db ); } if ( changed ) @@ -227,7 +227,7 @@ void SqlConfigWidget::loadConfig() TQStringList db; int i = 0; while ( true ) { - TQStringList db = DomUtil::readListEntry( *doc, "tdevsqlsupport/servers/server" + TQString::number( i ), "el" ); + TQStringList db = DomUtil::readListEntry( *doc, "kdevsqlsupport/servers/server" + TQString::number( i ), "el" ); if ( db.isEmpty() ) return; diff --git a/languages/sql/sqlsupport_part.cpp b/languages/sql/sqlsupport_part.cpp index c4d0a235..2ecb2ec4 100644 --- a/languages/sql/sqlsupport_part.cpp +++ b/languages/sql/sqlsupport_part.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,28 +16,28 @@ #include #include -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevlanguagesupport.h" -#include "tdevpartcontroller.h" -#include "tdevproject.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevlanguagesupport.h" +#include "kdevpartcontroller.h" +#include "kdevproject.h" #include "codemodel.h" -#include "tdevplugininfo.h" +#include "kdevplugininfo.h" #include "sqlconfigwidget.h" #include "sqlactions.h" #include "sqloutputwidget.h" #include "domutil.h" -typedef TDevGenericFactory SQLSupportFactory; -static const TDevPluginInfo data("tdevsqlsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevsqlsupport, SQLSupportFactory( data ) ) +typedef KDevGenericFactory SQLSupportFactory; +static const KDevPluginInfo data("kdevsqlsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevsqlsupport, SQLSupportFactory( data ) ) SQLSupportPart::SQLSupportPart( TQObject *parent, const char *name, const TQStringList& ) - : TDevLanguageSupport ( &data, parent, name ? name : "SQLSupportPart" ) + : KDevLanguageSupport ( &data, parent, name ? name : "SQLSupportPart" ) { setInstance( SQLSupportFactory::instance() ); - setXMLFile( "tdevsqlsupport.rc" ); + setXMLFile( "kdevsqlsupport.rc" ); TDEAction *action; action = new TDEAction( i18n( "&Run" ), "exec", Key_F9, this, TQT_SLOT( slotRun() ), actionCollection(), "build_execute" ); @@ -106,7 +106,7 @@ void SQLSupportPart::loadConfig() int i = 0; TQString conName; while ( true ) { - TQStringList sdb = DomUtil::readListEntry( *doc, "tdevsqlsupport/servers/server" + TQString::number( i ), "el" ); + TQStringList sdb = DomUtil::readListEntry( *doc, "kdevsqlsupport/servers/server" + TQString::number( i ), "el" ); if ( (int)sdb.size() < 6 ) break; @@ -267,7 +267,7 @@ void SQLSupportPart::savedFile( const KURL &fileName ) } } -TDevLanguageSupport::Features SQLSupportPart::features() +KDevLanguageSupport::Features SQLSupportPart::features() { return Features( Classes | Functions ); } diff --git a/languages/sql/sqlsupport_part.h b/languages/sql/sqlsupport_part.h index 4798d7fa..d5efca5b 100644 --- a/languages/sql/sqlsupport_part.h +++ b/languages/sql/sqlsupport_part.h @@ -1,5 +1,5 @@ -#ifndef __TDEVPART_SQLSUPPORT_H__ -#define __TDEVPART_SQLSUPPORT_H__ +#ifndef __KDEVPART_SQLSUPPORT_H__ +#define __KDEVPART_SQLSUPPORT_H__ #include #include @@ -7,14 +7,14 @@ #include #include -#include "tdevplugin.h" -#include "tdevlanguagesupport.h" +#include "kdevplugin.h" +#include "kdevlanguagesupport.h" class SqlListAction; class SqlOutputWidget; class CodeModel; -class SQLSupportPart : public TDevLanguageSupport +class SQLSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/sql/tdevsqlsupport.desktop b/languages/sql/tdevsqlsupport.desktop deleted file mode 100644 index 5357d127..00000000 --- a/languages/sql/tdevsqlsupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=SQL Support -Comment[ca]=Suport per a SQL -Comment[da]=SQL-understøttelse -Comment[de]=Unterstützung für SQL -Comment[el]=Υποστήριξη SQL -Comment[es]=Soporte para SQL -Comment[et]=SQL toetus -Comment[eu]=SQL euskarria -Comment[fa]=پشتیبانی SQL -Comment[fr]=Prise en charge du langage SQL -Comment[ga]=Tacaíocht SQL -Comment[gl]=Soporte para SQL -Comment[hi]=एसक्यूएल समर्थन -Comment[hu]=SQL-támogatás -Comment[is]=SQL stuðningur -Comment[it]=Supporto SQL -Comment[ja]=SQL サポート -Comment[nds]=SQL-Ünnerstütten -Comment[ne]=SQL समर्थन -Comment[nl]=Ondersteuning voor SQL -Comment[pl]=Obsługa SQL-a -Comment[pt]=Suporte a SQL -Comment[pt_BR]=Suporte ao SQL -Comment[ru]=Поддержка языка SQL -Comment[sk]=SQL podpora -Comment[sl]=Podpora za SQL -Comment[sr]=Подршка за SQL -Comment[sr@Latn]=Podrška za SQL -Comment[sv]=SQL-stöd -Comment[ta]=SQL ஆதரவு -Comment[tg]=Ёрӣ намудани забони SQL -Comment[tr]=SQL Desteği -Comment[zh_CN]=SQL 语言支持 -Comment[zh_TW]=SQL 支援 -Name=KDevSQLSupport -Name[da]=TDevelop SQL-understøttelse -Name[de]=Unterstützung für SQL (TDevelop) -Name[hi]=के-डेव-एसक्यूएल-समर्थन -Name[nds]=SQL-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaSQL -Name[sk]=KDev SQL podpora -Name[sv]=TDevelop SQL-stöd -Name[ta]=கெடெவ் எஸ்கியேல் ஆதரவு -Name[zh_TW]=TDevelop SQL 支援 -GenericName=SQL Support -GenericName[ca]=Suport per a SQL -GenericName[da]=SQL-understøttelse -GenericName[de]=Unterstützung für SQL -GenericName[el]=Υποστήριξη SQL -GenericName[es]=Soporte para SQL -GenericName[et]=SQL toetus -GenericName[eu]=SQL euskarria -GenericName[fa]=پشتیبانی SQL -GenericName[fr]=Langage SQL -GenericName[ga]=Tacaíocht SQL -GenericName[gl]=Soporte para SQL -GenericName[hi]=एसक्यूएल समर्थन -GenericName[hu]=SQL-támogatás -GenericName[it]=Supporto SQL -GenericName[ja]=SQL サポート -GenericName[nds]=SQL-Ünnerstütten -GenericName[ne]=SQL समर्थन -GenericName[nl]=Ondersteuning voor SQL -GenericName[pl]=Obsługa SQL-a -GenericName[pt]=Suporte a SQL -GenericName[pt_BR]=Suporte ao SQL -GenericName[ru]=Поддержка языка SQL -GenericName[sk]=SQL podpora -GenericName[sl]=Podpora za SQL -GenericName[sr]=Подршка за SQL -GenericName[sr@Latn]=Podrška za SQL -GenericName[sv]=SQL-stöd -GenericName[ta]=SQL ஆதரவு -GenericName[tg]=Ёрӣ намудани забони SQL -GenericName[tr]=SQL Desteği -GenericName[zh_CN]=SQL 支持 -GenericName[zh_TW]=SQL 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevsqlsupport -X-TDevelop-Version=5 -X-TDevelop-Language=SQL -X-TDevelop-Args=SQL diff --git a/languages/sql/tdevsqlsupport.rc b/languages/sql/tdevsqlsupport.rc deleted file mode 100644 index 36b91d7a..00000000 --- a/languages/sql/tdevsqlsupport.rc +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e9088337..0398ddf0 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -31,9 +31,9 @@ link_directories( tde_add_library( tdevelop SHARED SOURCES dummy.cpp VERSION 1.0.0 - EMBED tdevutil-static tdevinterfaces-static + EMBED kdevutil-static kdevinterfaces-static LINK - tdevpropertyeditor-shared + kdevpropertyeditor-shared tdescript-shared tdeparts-shared tdetexteditor-shared DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/lib/Makefile.am b/lib/Makefile.am index 55b974c5..d590051e 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,4 +1,4 @@ -# Here resides the library of general TDevelop-related utilities, +# Here resides the library of general KDevelop-related utilities, # which may be linked by any plugin or part. This is installed # as a shared library, including header files @@ -6,11 +6,11 @@ INCLUDES = $(all_includes) lib_LTLIBRARIES = libtdevelop.la libtdevelop_la_LDFLAGS = -no-undefined $(all_libraries) -version-info 1:0 -libtdevelop_la_LIBADD = $(top_builddir)/lib/interfaces/libtdevinterfaces.la \ - $(top_builddir)/lib/widgets/propeditor/libtdevpropertyeditor.la $(LIB_TDEIO) +libtdevelop_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la \ + $(top_builddir)/lib/widgets/propeditor/libkdevpropertyeditor.la $(LIB_TDEIO) -# $(top_builddir)/lib/util/libtdevutil.la $(top_builddir)/lib/widgets/propeditor/libtdevpropertyeditor.la \ -# $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la \ +# $(top_builddir)/lib/util/libkdevutil.la $(top_builddir)/lib/widgets/propeditor/libkdevpropertyeditor.la \ +# $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la \ # -ltdetexteditor $(LIB_TDEPARTS) $(LIB_TDEIO) -ltdescript libtdevelop_la_SOURCES = dummy.cpp diff --git a/lib/catalog/CMakeLists.txt b/lib/catalog/CMakeLists.txt index 13b008d1..5c1b4f2b 100644 --- a/lib/catalog/CMakeLists.txt +++ b/lib/catalog/CMakeLists.txt @@ -28,9 +28,9 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/catalog ) -##### tdevcatalog (shared) ###################### +##### kdevcatalog (shared) ###################### -tde_add_library( tdevcatalog SHARED AUTOMOC +tde_add_library( kdevcatalog SHARED AUTOMOC SOURCES tag.cpp catalog.cpp VERSION 0.0.0 LINK tdecore-shared ${BDB_LIBRARY} diff --git a/lib/catalog/Makefile.am b/lib/catalog/Makefile.am index e45a2530..c8c7ddc1 100644 --- a/lib/catalog/Makefile.am +++ b/lib/catalog/Makefile.am @@ -1,13 +1,13 @@ INCLUDES = $(all_includes) $(DB3INCLUDES) -lib_LTLIBRARIES = libtdevcatalog.la -libtdevcatalog_la_SOURCES = tag.cpp catalog.cpp -libtdevcatalog_la_LDFLAGS = -no-undefined $(all_libraries) $(DB3LDFLAGS) -libtdevcatalog_la_LIBADD = -l$(DB3LIB) $(LIB_TDECORE) $(LIB_QT) +lib_LTLIBRARIES = libkdevcatalog.la +libkdevcatalog_la_SOURCES = tag.cpp catalog.cpp +libkdevcatalog_la_LDFLAGS = -no-undefined $(all_libraries) $(DB3LDFLAGS) +libkdevcatalog_la_LIBADD = -l$(DB3LIB) $(LIB_TDECORE) $(LIB_QT) -tdevcatalogincludedir = $(includedir)/tdevelop/catalog -tdevcataloginclude_HEADERS = catalog.h tag.h +kdevcatalogincludedir = $(includedir)/tdevelop/catalog +kdevcataloginclude_HEADERS = catalog.h tag.h DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils DOXYGEN_PROJECTNAME = TDevelop Catalog Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_DOCDIRPREFIX = kdev include ../../Doxyfile.am diff --git a/lib/cppparser/CMakeLists.txt b/lib/cppparser/CMakeLists.txt index 20db36c5..3b53e900 100644 --- a/lib/cppparser/CMakeLists.txt +++ b/lib/cppparser/CMakeLists.txt @@ -31,13 +31,13 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/cppparser ) -##### tdevcppparser (shared) #################### +##### kdevcppparser (shared) #################### -tde_add_library( tdevcppparser SHARED AUTOMOC +tde_add_library( kdevcppparser SHARED AUTOMOC SOURCES ast.cpp cachemanager.cpp driver.cpp errors.cpp lexer.cpp lexercache.cpp lookup.cpp parser.cpp tree_parser.cpp VERSION 0.0.0 - LINK tdevinterfaces-static tdeio-shared + LINK kdevinterfaces-static tdeio-shared DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/lib/cppparser/Makefile.am b/lib/cppparser/Makefile.am index 082c8227..4e62cebf 100644 --- a/lib/cppparser/Makefile.am +++ b/lib/cppparser/Makefile.am @@ -1,11 +1,11 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces $(all_includes) AM_CXXFLAGS = -DKDEVELOP_BGPARSER -lib_LTLIBRARIES = libtdevcppparser.la -libtdevcppparser_la_LDFLAGS = $(all_libraries) -libtdevcppparser_la_LIBADD = $(LIB_QT) $(LIB_TDECORE) $(top_builddir)/lib/interfaces/libtdevinterfaces.la -lDCOP $(LIB_TDEUI) $(LIB_TDEPARTS) -ltdetexteditor $(LIB_TDEIO) -ltdescript -libtdevcppparser_la_SOURCES = ast.cpp cachemanager.cpp driver.cpp errors.cpp \ +lib_LTLIBRARIES = libkdevcppparser.la +libkdevcppparser_la_LDFLAGS = $(all_libraries) +libkdevcppparser_la_LIBADD = $(LIB_QT) $(LIB_TDECORE) $(top_builddir)/lib/interfaces/libkdevinterfaces.la -lDCOP $(LIB_TDEUI) $(LIB_TDEPARTS) -ltdetexteditor $(LIB_TDEIO) -ltdescript +libkdevcppparser_la_SOURCES = ast.cpp cachemanager.cpp driver.cpp errors.cpp \ lexer.cpp lexercache.cpp lookup.cpp parser.cpp tree_parser.cpp -tdevcppparserincludedir = $(includedir)/tdevelop/cppparser -tdevcppparserinclude_HEADERS = ast.h driver.h lexer.h parser.h tree_parser.h errors.h lookup.h cachemanager.h lexercache.h macro.h +kdevcppparserincludedir = $(includedir)/tdevelop/cppparser +kdevcppparserinclude_HEADERS = ast.h driver.h lexer.h parser.h tree_parser.h errors.h lookup.h cachemanager.h lexercache.h macro.h diff --git a/lib/cppparser/lexer.cpp b/lib/cppparser/lexer.cpp index 5f01a19e..5325c80f 100644 --- a/lib/cppparser/lexer.cpp +++ b/lib/cppparser/lexer.cpp @@ -30,7 +30,7 @@ #if defined( KDEVELOP_BGPARSER ) #include -class TDevTread: public TQThread +class KDevTread: public TQThread { public: static void yield() @@ -41,7 +41,7 @@ public: inline void qthread_yield() { - TDevTread::yield(); + KDevTread::yield(); } #endif diff --git a/lib/interfaces/CMakeLists.txt b/lib/interfaces/CMakeLists.txt index 47d6855d..94b07bec 100644 --- a/lib/interfaces/CMakeLists.txt +++ b/lib/interfaces/CMakeLists.txt @@ -27,12 +27,12 @@ include_directories( ##### headers ################################### install( FILES - tdevlanguagesupport.h tdevmainwindow.h tdevpartcontroller.h - tdevplugin.h tdevproject.h tdevcore.h tdevcoderepository.h + kdevlanguagesupport.h kdevmainwindow.h kdevpartcontroller.h + kdevplugin.h kdevproject.h kdevcore.h kdevcoderepository.h codemodel.h codemodel_utils.h codemodel_treeparser.h - tdevgenericfactory.h tdevapi.h tdevdesignerintegration.h - tdevplugincontroller.h tdevplugininfo.h TDevCoreIface.h - TDevPartControllerIface.h katedocumentmanagerinterface.h + kdevgenericfactory.h kdevapi.h kdevdesignerintegration.h + kdevplugincontroller.h kdevplugininfo.h KDevCoreIface.h + KDevPartControllerIface.h katedocumentmanagerinterface.h hashedstring.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/interfaces ) @@ -42,20 +42,20 @@ install( FILES DESTINATION ${SERVICETYPES_INSTALL_DIR} ) -##### tdevinterfaces (static) ################### +##### kdevinterfaces (static) ################### -tde_add_library( tdevinterfaces STATIC_PIC AUTOMOC +tde_add_library( kdevinterfaces STATIC_PIC AUTOMOC SOURCES - tdevcore.cpp tdevproject.cpp tdevlanguagesupport.cpp - tdevpartcontroller.cpp tdevapi.cpp TDevCoreIface.skel - tdevmainwindow.cpp TDevPartControllerIface.skel - tdevplugin.cpp tdevcoderepository.cpp + kdevcore.cpp kdevproject.cpp kdevlanguagesupport.cpp + kdevpartcontroller.cpp kdevapi.cpp KDevCoreIface.skel + kdevmainwindow.cpp KDevPartControllerIface.skel + kdevplugin.cpp kdevcoderepository.cpp codemodel.cpp codemodel_treeparser.cpp - codemodel_utils.cpp tdevdesignerintegration.cpp - tdevplugincontroller.cpp tdevplugininfo.cpp - TDevCoreIface.cpp TDevPartControllerIface.cpp + codemodel_utils.cpp kdevdesignerintegration.cpp + kdevplugincontroller.cpp kdevplugininfo.cpp + KDevCoreIface.cpp KDevPartControllerIface.cpp katedocumentmanagerinterface.cpp - katedocumentmanagerinterface.skel tdevprojectiface.cpp - tdevprojectiface.skel tdevdesignerintegrationiface.cpp - tdevdesignerintegrationiface.skel hashedstring.cpp + katedocumentmanagerinterface.skel kdevprojectiface.cpp + kdevprojectiface.skel kdevdesignerintegrationiface.cpp + kdevdesignerintegrationiface.skel hashedstring.cpp ) diff --git a/lib/interfaces/KDevCoreIface.cpp b/lib/interfaces/KDevCoreIface.cpp new file mode 100644 index 00000000..aa70e01b --- /dev/null +++ b/lib/interfaces/KDevCoreIface.cpp @@ -0,0 +1,59 @@ + + +/* This file is part of the KDE project + Copyright (C) 2001 Bernd Gehrmann + Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 Roberto Raggi + + 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 "KDevCoreIface.h" +#include "kdevcore.h" + + +KDevCoreIface::KDevCoreIface(KDevCore *core) + : TQObject(core), DCOPObject("KDevCore"), m_core(core) +{ + connect( m_core, TQT_SIGNAL(projectOpened()), this, TQT_SLOT(forwardProjectOpened()) ); + connect( m_core, TQT_SIGNAL(projectClosed()), this, TQT_SLOT(forwardProjectClosed()) ); +} + + +KDevCoreIface::~KDevCoreIface() +{} + + +void KDevCoreIface::forwardProjectOpened() +{ + kdDebug(9000) << "dcop emitting project opened" << endl; + emitDCOPSignal("projectOpened()", TQByteArray()); +} + + +void KDevCoreIface::forwardProjectClosed() +{ + kdDebug(9000) << "dcop emitting project closed" << endl; + emitDCOPSignal("projectClosed()", TQByteArray()); +} + +void KDevCoreIface::openProject( const TQString & projectFileName ) +{ + m_core->openProject(projectFileName); +} + +#include "KDevCoreIface.moc" diff --git a/lib/interfaces/KDevCoreIface.h b/lib/interfaces/KDevCoreIface.h new file mode 100644 index 00000000..612c8457 --- /dev/null +++ b/lib/interfaces/KDevCoreIface.h @@ -0,0 +1,52 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Bernd Gehrmann + Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 Roberto Raggi + + 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 _KDEVCOREIFACE_H_ +#define _KDEVCOREIFACE_H_ + +#include +#include + +class KDevCore; + + +class KDevCoreIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP + +public: + + KDevCoreIface( KDevCore *core ); + ~KDevCoreIface(); + +k_dcop: + void openProject(const TQString& projectFileName); + +private slots: + void forwardProjectOpened(); + void forwardProjectClosed(); + +private: + KDevCore *m_core; +}; + +#endif diff --git a/lib/interfaces/KDevPartControllerIface.cpp b/lib/interfaces/KDevPartControllerIface.cpp new file mode 100644 index 00000000..1b184453 --- /dev/null +++ b/lib/interfaces/KDevPartControllerIface.cpp @@ -0,0 +1,95 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + + 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 "KDevPartControllerIface.h" +#include "kdevpartcontroller.h" + + +KDevPartControllerIface::KDevPartControllerIface(KDevPartController *pc) + : TQObject(pc), DCOPObject("KDevPartController"), m_controller(pc) +{ + connect(pc, TQT_SIGNAL(loadedFile(const KURL &)), this, TQT_SLOT(forwardLoadedFile(const KURL &))); + connect(pc, TQT_SIGNAL(savedFile(const KURL &)), this, TQT_SLOT(forwardSavedFile(const KURL &))); + connect(pc, TQT_SIGNAL(closedFile(const KURL &)), this, TQT_SLOT(forwardClosedFile(const KURL &))); +} + + +KDevPartControllerIface::~KDevPartControllerIface() +{ +} + + +void KDevPartControllerIface::editDocument(const TQString &url, int lineNum) +{ + m_controller->editDocument(KURL(url), lineNum); +} + + +void KDevPartControllerIface::showDocument(const TQString &url, bool newWin) +{ + m_controller->showDocument(KURL(url), newWin); +} + + +void KDevPartControllerIface::saveAllFiles() +{ + m_controller->saveAllFiles(); +} + + +void KDevPartControllerIface::revertAllFiles() +{ + m_controller->revertAllFiles(); +} + + +void KDevPartControllerIface::forwardLoadedFile(const KURL &fileName) +{ + kdDebug(9000) << "dcop emitting loadedFile " << fileName << endl; + emitDCOPSignal("projectOpened()", TQByteArray()); +} + + +void KDevPartControllerIface::forwardSavedFile(const KURL &fileName) +{ + kdDebug(9000) << "dcop emitting savedFile " << fileName << endl; + emitDCOPSignal("projectClosed()", TQByteArray()); +} + +void KDevPartControllerIface::forwardClosedFile(const KURL &fileName) +{ + kdDebug(9000) << "dcop emitting closedFile " << fileName << endl; + emitDCOPSignal("projectClosed()", TQByteArray()); +} + +bool KDevPartControllerIface::closeAllFiles( ) +{ + return m_controller->closeAllFiles(); +} + +uint KDevPartControllerIface::documentState( const KURL & url ) +{ + return (uint) m_controller->documentState(url); +} + +#include "KDevPartControllerIface.moc" diff --git a/lib/interfaces/KDevPartControllerIface.h b/lib/interfaces/KDevPartControllerIface.h new file mode 100644 index 00000000..8c3647ea --- /dev/null +++ b/lib/interfaces/KDevPartControllerIface.h @@ -0,0 +1,64 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + + 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 _KDEVPARTCONTROLLERIFACE_H_ +#define _KDEVPARTCONTROLLERIFACE_H_ + +#include +#include +#include + +class KDevPartController; + +class KDevPartControllerIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP + +public: + + KDevPartControllerIface(KDevPartController *pc); + ~KDevPartControllerIface(); + + +k_dcop: + + void editDocument(const TQString &url, int lineNum); + void showDocument(const TQString &url, bool newWin); + + void saveAllFiles(); + void revertAllFiles(); + + bool closeAllFiles(); + uint documentState( const KURL & url ); + +private slots: + + void forwardLoadedFile(const KURL &fileName); + void forwardSavedFile(const KURL &fileName); + void forwardClosedFile(const KURL &fileName); + +private: + + KDevPartController *m_controller; + +}; + + +#endif diff --git a/lib/interfaces/Makefile.am b/lib/interfaces/Makefile.am index 93533492..1944f4f9 100644 --- a/lib/interfaces/Makefile.am +++ b/lib/interfaces/Makefile.am @@ -1,27 +1,27 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/cppparser \ $(all_includes) -noinst_LTLIBRARIES = libtdevinterfaces.la +noinst_LTLIBRARIES = libkdevinterfaces.la -libtdevinterfaces_la_SOURCES = tdevcore.cpp tdevproject.cpp \ - tdevlanguagesupport.cpp tdevpartcontroller.cpp tdevapi.cpp TDevCoreIface.skel \ - tdevmainwindow.cpp TDevPartControllerIface.skel tdevplugin.cpp tdevcoderepository.cpp \ +libkdevinterfaces_la_SOURCES = kdevcore.cpp kdevproject.cpp \ + kdevlanguagesupport.cpp kdevpartcontroller.cpp kdevapi.cpp KDevCoreIface.skel \ + kdevmainwindow.cpp KDevPartControllerIface.skel kdevplugin.cpp kdevcoderepository.cpp \ codemodel.cpp codemodel_treeparser.cpp codemodel_utils.cpp \ - tdevdesignerintegration.cpp tdevplugincontroller.cpp tdevplugininfo.cpp TDevCoreIface.cpp \ - TDevPartControllerIface.cpp katedocumentmanagerinterface.cpp katedocumentmanagerinterface.skel \ - tdevprojectiface.cpp tdevprojectiface.skel tdevdesignerintegrationiface.cpp \ - tdevdesignerintegrationiface.skel hashedstring.cpp -libtdevinterfaces_la_LDFLAGS = -no-undefined $(all_libraries) -libtdevinterfaces_la_LIBADD = $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la \ - $(top_builddir)/lib/util/libtdevutil.la \ + kdevdesignerintegration.cpp kdevplugincontroller.cpp kdevplugininfo.cpp KDevCoreIface.cpp \ + KDevPartControllerIface.cpp katedocumentmanagerinterface.cpp katedocumentmanagerinterface.skel \ + kdevprojectiface.cpp kdevprojectiface.skel kdevdesignerintegrationiface.cpp \ + kdevdesignerintegrationiface.skel hashedstring.cpp +libkdevinterfaces_la_LDFLAGS = -no-undefined $(all_libraries) +libkdevinterfaces_la_LIBADD = $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la \ + $(top_builddir)/lib/util/libkdevutil.la \ $(LIB_TDEUI) $(LIB_TDEHTML) $(LIB_TDEPARTS) -ltdetexteditor -ltdescript -lDCOP tdevelopincludedir = $(includedir)/tdevelop/interfaces -tdevelopinclude_HEADERS = tdevlanguagesupport.h tdevmainwindow.h \ - tdevpartcontroller.h tdevplugin.h tdevproject.h tdevcore.h tdevcoderepository.h codemodel.h \ - codemodel_utils.h codemodel_treeparser.h tdevgenericfactory.h tdevapi.h \ - tdevdesignerintegration.h tdevplugincontroller.h tdevplugininfo.h TDevCoreIface.h \ - TDevPartControllerIface.h katedocumentmanagerinterface.h \ +tdevelopinclude_HEADERS = kdevlanguagesupport.h kdevmainwindow.h \ + kdevpartcontroller.h kdevplugin.h kdevproject.h kdevcore.h kdevcoderepository.h codemodel.h \ + codemodel_utils.h codemodel_treeparser.h kdevgenericfactory.h kdevapi.h \ + kdevdesignerintegration.h kdevplugincontroller.h kdevplugininfo.h KDevCoreIface.h \ + KDevPartControllerIface.h katedocumentmanagerinterface.h \ hashedstring.h @@ -33,8 +33,8 @@ METASOURCES = AUTO SUBDIRS = extensions external extras -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil designer_integration tdevcatalog tdevprofileslib tdevextensions +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil designer_integration kdevcatalog kdevprofileslib kdevextensions DOXYGEN_PROJECTNAME = TDevelop Interfaces Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_DOCDIRPREFIX = kdev include ../../Doxyfile.am -noinst_HEADERS = tdevprojectiface.h tdevdesignerintegrationiface.h +noinst_HEADERS = kdevprojectiface.h kdevdesignerintegrationiface.h diff --git a/lib/interfaces/TDevCoreIface.cpp b/lib/interfaces/TDevCoreIface.cpp deleted file mode 100644 index 39d4bb97..00000000 --- a/lib/interfaces/TDevCoreIface.cpp +++ /dev/null @@ -1,59 +0,0 @@ - - -/* This file is part of the KDE project - Copyright (C) 2001 Bernd Gehrmann - Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 Roberto Raggi - - 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 "TDevCoreIface.h" -#include "tdevcore.h" - - -TDevCoreIface::TDevCoreIface(TDevCore *core) - : TQObject(core), DCOPObject("TDevCore"), m_core(core) -{ - connect( m_core, TQT_SIGNAL(projectOpened()), this, TQT_SLOT(forwardProjectOpened()) ); - connect( m_core, TQT_SIGNAL(projectClosed()), this, TQT_SLOT(forwardProjectClosed()) ); -} - - -TDevCoreIface::~TDevCoreIface() -{} - - -void TDevCoreIface::forwardProjectOpened() -{ - kdDebug(9000) << "dcop emitting project opened" << endl; - emitDCOPSignal("projectOpened()", TQByteArray()); -} - - -void TDevCoreIface::forwardProjectClosed() -{ - kdDebug(9000) << "dcop emitting project closed" << endl; - emitDCOPSignal("projectClosed()", TQByteArray()); -} - -void TDevCoreIface::openProject( const TQString & projectFileName ) -{ - m_core->openProject(projectFileName); -} - -#include "TDevCoreIface.moc" diff --git a/lib/interfaces/TDevCoreIface.h b/lib/interfaces/TDevCoreIface.h deleted file mode 100644 index f259005a..00000000 --- a/lib/interfaces/TDevCoreIface.h +++ /dev/null @@ -1,52 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Bernd Gehrmann - Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 Roberto Raggi - - 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 _TDEVCOREIFACE_H_ -#define _TDEVCOREIFACE_H_ - -#include -#include - -class TDevCore; - - -class TDevCoreIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP - -public: - - TDevCoreIface( TDevCore *core ); - ~TDevCoreIface(); - -k_dcop: - void openProject(const TQString& projectFileName); - -private slots: - void forwardProjectOpened(); - void forwardProjectClosed(); - -private: - TDevCore *m_core; -}; - -#endif diff --git a/lib/interfaces/TDevPartControllerIface.cpp b/lib/interfaces/TDevPartControllerIface.cpp deleted file mode 100644 index e8bd1bb7..00000000 --- a/lib/interfaces/TDevPartControllerIface.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - - 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 "TDevPartControllerIface.h" -#include "tdevpartcontroller.h" - - -TDevPartControllerIface::TDevPartControllerIface(TDevPartController *pc) - : TQObject(pc), DCOPObject("TDevPartController"), m_controller(pc) -{ - connect(pc, TQT_SIGNAL(loadedFile(const KURL &)), this, TQT_SLOT(forwardLoadedFile(const KURL &))); - connect(pc, TQT_SIGNAL(savedFile(const KURL &)), this, TQT_SLOT(forwardSavedFile(const KURL &))); - connect(pc, TQT_SIGNAL(closedFile(const KURL &)), this, TQT_SLOT(forwardClosedFile(const KURL &))); -} - - -TDevPartControllerIface::~TDevPartControllerIface() -{ -} - - -void TDevPartControllerIface::editDocument(const TQString &url, int lineNum) -{ - m_controller->editDocument(KURL(url), lineNum); -} - - -void TDevPartControllerIface::showDocument(const TQString &url, bool newWin) -{ - m_controller->showDocument(KURL(url), newWin); -} - - -void TDevPartControllerIface::saveAllFiles() -{ - m_controller->saveAllFiles(); -} - - -void TDevPartControllerIface::revertAllFiles() -{ - m_controller->revertAllFiles(); -} - - -void TDevPartControllerIface::forwardLoadedFile(const KURL &fileName) -{ - kdDebug(9000) << "dcop emitting loadedFile " << fileName << endl; - emitDCOPSignal("projectOpened()", TQByteArray()); -} - - -void TDevPartControllerIface::forwardSavedFile(const KURL &fileName) -{ - kdDebug(9000) << "dcop emitting savedFile " << fileName << endl; - emitDCOPSignal("projectClosed()", TQByteArray()); -} - -void TDevPartControllerIface::forwardClosedFile(const KURL &fileName) -{ - kdDebug(9000) << "dcop emitting closedFile " << fileName << endl; - emitDCOPSignal("projectClosed()", TQByteArray()); -} - -bool TDevPartControllerIface::closeAllFiles( ) -{ - return m_controller->closeAllFiles(); -} - -uint TDevPartControllerIface::documentState( const KURL & url ) -{ - return (uint) m_controller->documentState(url); -} - -#include "TDevPartControllerIface.moc" diff --git a/lib/interfaces/TDevPartControllerIface.h b/lib/interfaces/TDevPartControllerIface.h deleted file mode 100644 index 87a4e04e..00000000 --- a/lib/interfaces/TDevPartControllerIface.h +++ /dev/null @@ -1,64 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - - 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 _TDEVPARTCONTROLLERIFACE_H_ -#define _TDEVPARTCONTROLLERIFACE_H_ - -#include -#include -#include - -class TDevPartController; - -class TDevPartControllerIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP - -public: - - TDevPartControllerIface(TDevPartController *pc); - ~TDevPartControllerIface(); - - -k_dcop: - - void editDocument(const TQString &url, int lineNum); - void showDocument(const TQString &url, bool newWin); - - void saveAllFiles(); - void revertAllFiles(); - - bool closeAllFiles(); - uint documentState( const KURL & url ); - -private slots: - - void forwardLoadedFile(const KURL &fileName); - void forwardSavedFile(const KURL &fileName); - void forwardClosedFile(const KURL &fileName); - -private: - - TDevPartController *m_controller; - -}; - - -#endif diff --git a/lib/interfaces/extensions/CMakeLists.txt b/lib/interfaces/extensions/CMakeLists.txt index cf5514be..459c1197 100644 --- a/lib/interfaces/extensions/CMakeLists.txt +++ b/lib/interfaces/extensions/CMakeLists.txt @@ -22,9 +22,9 @@ include_directories( ##### headers ################################### install( FILES - codebrowserfrontend.h tdevappfrontend.h tdevcreatefile.h - tdevdifffrontend.h tdevmakefrontend.h tdevquickopen.h - tdevsourceformatter.h tdevversioncontrol.h + codebrowserfrontend.h kdevappfrontend.h kdevcreatefile.h + kdevdifffrontend.h kdevmakefrontend.h kdevquickopen.h + kdevsourceformatter.h kdevversioncontrol.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/interfaces/extensions ) install( FILES @@ -35,20 +35,20 @@ install( FILES DESTINATION ${SERVICETYPES_INSTALL_DIR} ) -##### tdevextensions (static) ################### +##### kdevextensions (static) ################### add_custom_command( OUTPUT codebrowserfrontend.moc.cpp COMMAND ${TMOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/codebrowserfrontend.h -o codebrowserfrontend.moc.cpp DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/codebrowserfrontend.h ) -add_custom_command( OUTPUT tdevversioncontrol.moc.cpp +add_custom_command( OUTPUT kdevversioncontrol.moc.cpp COMMAND - ${TMOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tdevversioncontrol.h -o tdevversioncontrol.moc.cpp - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tdevversioncontrol.h ) + ${TMOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/kdevversioncontrol.h -o kdevversioncontrol.moc.cpp + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kdevversioncontrol.h ) -tde_add_library( tdevextensions STATIC_PIC AUTOMOC +tde_add_library( kdevextensions STATIC_PIC AUTOMOC SOURCES - tdevappfrontend.cpp tdevappfrontend.cpp tdevmakefrontend.cpp - codebrowserfrontend.moc.cpp tdevversioncontrol.moc.cpp + kdevappfrontend.cpp kdevappfrontend.cpp kdevmakefrontend.cpp + codebrowserfrontend.moc.cpp kdevversioncontrol.moc.cpp ) diff --git a/lib/interfaces/extensions/Mainpage.dox b/lib/interfaces/extensions/Mainpage.dox index 37c72c16..3b493fde 100644 --- a/lib/interfaces/extensions/Mainpage.dox +++ b/lib/interfaces/extensions/Mainpage.dox @@ -10,8 +10,8 @@ This library contains extension interfaces used by TDevelop plugin architecture. \section whatisextension What is the TDevelop extension Extension is a TDevelop plugin which implements one of extension interfaces. -Extension is usually not important enough to be returned by @ref TDevApi and @ref TDevPlugin -methods. Therefore extension instance can be obtained by @ref TDevPlugin::extension method. +Extension is usually not important enough to be returned by @ref KDevApi and @ref KDevPlugin +methods. Therefore extension instance can be obtained by @ref KDevPlugin::extension method. Note: extension plugins can be either core, global and project plugins. They are loaded in the same way other plugins are. But extensions differ from usual plugins. @@ -36,10 +36,10 @@ those should be loaded at a time. This can be accomplished by: @endcode - Define an abstract base class for an extension like: @code - class KDevMyExtension: public TDevPlugin { + class KDevMyExtension: public KDevPlugin { public: - KDevMyExtension(const TDevPluginInfo *info, QObject* parent, const char* name) - :TDevPlugin(info, parent, name) {} + KDevMyExtension(const KDevPluginInfo *info, QObject* parent, const char* name) + :KDevPlugin(info, parent, name) {} virtual void doSomething() = 0; }; diff --git a/lib/interfaces/extensions/Makefile.am b/lib/interfaces/extensions/Makefile.am index 55f4d774..a6d00bc2 100644 --- a/lib/interfaces/extensions/Makefile.am +++ b/lib/interfaces/extensions/Makefile.am @@ -1,7 +1,7 @@ tdevelopincludeextdir = $(includedir)/tdevelop/interfaces/extensions -tdevelopincludeext_HEADERS = codebrowserfrontend.h tdevappfrontend.h \ - tdevcreatefile.h tdevdifffrontend.h tdevmakefrontend.h tdevquickopen.h \ - tdevsourceformatter.h tdevversioncontrol.h +tdevelopincludeext_HEADERS = codebrowserfrontend.h kdevappfrontend.h \ + kdevcreatefile.h kdevdifffrontend.h kdevmakefrontend.h kdevquickopen.h \ + kdevsourceformatter.h kdevversioncontrol.h servicetypedir = $(kde_servicetypesdir) servicetype_DATA = tdevelopappfrontend.desktop \ @@ -10,14 +10,14 @@ servicetype_DATA = tdevelopappfrontend.desktop \ tdevelopversioncontrol.desktop SUBDIRS = dcop -libtdevextensions_la_LDFLAGS = $(all_libraries) -noinst_LTLIBRARIES = libtdevextensions.la -libtdevextensions_la_SOURCES = tdevappfrontend.cpp tdevmakefrontend.cpp +libkdevextensions_la_LDFLAGS = $(all_libraries) +noinst_LTLIBRARIES = libkdevextensions.la +libkdevextensions_la_SOURCES = kdevappfrontend.cpp kdevmakefrontend.cpp INCLUDES = -I$(top_srcdir)/lib/interfaces $(all_includes) METASOURCES = AUTO -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevinterfaces -DOXYGEN_PROJECTNAME = TDevelop Extension Interfaces Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevinterfaces +DOXYGEN_PROJECTNAME = KDevelop Extension Interfaces Library +DOXYGEN_DOCDIRPREFIX = kdev include ../../../Doxyfile.am noinst_HEADERS = codebrowserfrontend.h diff --git a/lib/interfaces/extensions/codebrowserfrontend.h b/lib/interfaces/extensions/codebrowserfrontend.h index 68c4e90f..e8158fe4 100644 --- a/lib/interfaces/extensions/codebrowserfrontend.h +++ b/lib/interfaces/extensions/codebrowserfrontend.h @@ -20,18 +20,18 @@ #define CODEBROWSERRONTEND_H -#include +#include #include namespace Extensions { -class TDevCodeBrowserFrontend : public TDevPlugin { +class KDevCodeBrowserFrontend : public KDevPlugin { Q_OBJECT public: - TDevCodeBrowserFrontend(const TDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) - :TDevPlugin(info, parent, name ? name : "CodeBrowserFrontend") {} + KDevCodeBrowserFrontend(const KDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) + :KDevPlugin(info, parent, name ? name : "CodeBrowserFrontend") {} ///Used by the quickopen-plugin to notify extensions that it jumped to a searched item virtual bool jumpedToItem( ItemDom item ) = 0; diff --git a/lib/interfaces/extensions/dcop/CMakeLists.txt b/lib/interfaces/extensions/dcop/CMakeLists.txt index 8658d320..b6255fc6 100644 --- a/lib/interfaces/extensions/dcop/CMakeLists.txt +++ b/lib/interfaces/extensions/dcop/CMakeLists.txt @@ -21,14 +21,14 @@ include_directories( ##### headers ################################### install( FILES - TDevAppFrontendIface.h TDevMakeFrontendIface.h + KDevAppFrontendIface.h KDevMakeFrontendIface.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/interfaces/extensions/dcop ) -##### tdevdcopextensions (static) ############### +##### kdevdcopextensions (static) ############### -tde_add_library( tdevdcopextensions STATIC_PIC +tde_add_library( kdevdcopextensions STATIC_PIC SOURCES - TDevAppFrontendIface.cpp TDevMakeFrontendIface.cpp - TDevAppFrontendIface.skel TDevMakeFrontendIface.skel + KDevAppFrontendIface.cpp KDevMakeFrontendIface.cpp + KDevAppFrontendIface.skel KDevMakeFrontendIface.skel ) diff --git a/lib/interfaces/extensions/dcop/KDevAppFrontendIface.cpp b/lib/interfaces/extensions/dcop/KDevAppFrontendIface.cpp new file mode 100644 index 00000000..1eca4bfc --- /dev/null +++ b/lib/interfaces/extensions/dcop/KDevAppFrontendIface.cpp @@ -0,0 +1,76 @@ + + +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 Roberto Raggi + Copyright (C) 2002 Bernd Gehrmann + Copyright (C) 2003 Amilcar do Carmo Lucas + + 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 "KDevAppFrontendIface.h" +#include "kdevappfrontend.h" + + +KDevAppFrontendIface::KDevAppFrontendIface(KDevAppFrontend *appFrontend) + : DCOPObject("KDevAppFrontend"), m_appFrontend(appFrontend) +{ +} + + +KDevAppFrontendIface::~KDevAppFrontendIface() +{} + + +void KDevAppFrontendIface::startAppCommand(const TQString &directory, const TQString &command, bool inTerminal) +{ + m_appFrontend->startAppCommand(directory, command, inTerminal); +} + +void KDevAppFrontendIface::stopApplication( ) +{ + m_appFrontend->stopApplication(); +} + +bool KDevAppFrontendIface::isRunning( ) +{ + return m_appFrontend->isRunning(); +} + +void KDevAppFrontendIface::clearView( ) +{ + m_appFrontend->clearView(); +} + +void KDevAppFrontendIface::insertStderrLine( const TQCString & line ) +{ + m_appFrontend->insertStderrLine(line); +} + +void KDevAppFrontendIface::insertStdoutLine( const TQCString & line ) +{ + m_appFrontend->insertStdoutLine(line); +} + +void KDevAppFrontendIface::addPartialStderrLine( const TQCString& line ) +{ + m_appFrontend->addPartialStderrLine(line); +} + +void KDevAppFrontendIface::addPartialStdoutLine( const TQCString& line ) +{ + m_appFrontend->addPartialStdoutLine(line); +} diff --git a/lib/interfaces/extensions/dcop/KDevAppFrontendIface.h b/lib/interfaces/extensions/dcop/KDevAppFrontendIface.h new file mode 100644 index 00000000..3903e897 --- /dev/null +++ b/lib/interfaces/extensions/dcop/KDevAppFrontendIface.h @@ -0,0 +1,52 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 Roberto Raggi + Copyright (C) 2002 Bernd Gehrmann + Copyright (C) 2003 Amilcar do Carmo Lucas + + 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 _KDEVAPPFRONTENDIFACE_H_ +#define _KDEVAPPFRONTENDIFACE_H_ + +#include + +class KDevAppFrontend; + +class KDevAppFrontendIface : public DCOPObject +{ + K_DCOP + +public: + + KDevAppFrontendIface( KDevAppFrontend *appFrontend ); + ~KDevAppFrontendIface(); + +k_dcop: + void startAppCommand(const TQString &directory, const TQString &command, bool inTerminal); + void stopApplication(); + bool isRunning(); + void clearView(); + void insertStderrLine(const TQCString &line); + void insertStdoutLine(const TQCString &line); + void addPartialStderrLine(const TQCString &line); + void addPartialStdoutLine(const TQCString &line); + +private: + KDevAppFrontend *m_appFrontend; +}; + +#endif diff --git a/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.cpp b/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.cpp new file mode 100644 index 00000000..73305e4a --- /dev/null +++ b/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.cpp @@ -0,0 +1,46 @@ + + +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001 Bernd Gehrmann + Copyright (C) 2002 Roberto Raggi + + 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 "KDevMakeFrontendIface.h" +#include "kdevmakefrontend.h" + + +KDevMakeFrontendIface::KDevMakeFrontendIface(KDevMakeFrontend *makeFrontend) + : DCOPObject("KDevMakeFrontend") +{ + m_makeFrontend = makeFrontend; +} + + +KDevMakeFrontendIface::~KDevMakeFrontendIface() +{} + + +void KDevMakeFrontendIface::queueCommand(const TQString &dir, const TQString &command) +{ + m_makeFrontend->queueCommand(dir, command); +} + +bool KDevMakeFrontendIface::isRunning( ) +{ + return m_makeFrontend->isRunning(); +} diff --git a/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.h b/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.h new file mode 100644 index 00000000..53217359 --- /dev/null +++ b/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.h @@ -0,0 +1,45 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001 Bernd Gehrmann + Copyright (C) 2002 Roberto Raggi + + 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 _KDEVMAKEFRONTENDIFACE_H_ +#define _KDEVMAKEFRONTENDIFACE_H_ + +#include + +class KDevMakeFrontend; + +class KDevMakeFrontendIface : public DCOPObject +{ + K_DCOP + +public: + + KDevMakeFrontendIface( KDevMakeFrontend *makeFrontend ); + ~KDevMakeFrontendIface(); + +k_dcop: + void queueCommand(const TQString &dir, const TQString &command); + bool isRunning(); + +private: + KDevMakeFrontend *m_makeFrontend; +}; + +#endif diff --git a/lib/interfaces/extensions/dcop/Makefile.am b/lib/interfaces/extensions/dcop/Makefile.am index e46606ac..116c4979 100644 --- a/lib/interfaces/extensions/dcop/Makefile.am +++ b/lib/interfaces/extensions/dcop/Makefile.am @@ -1,10 +1,10 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions $(all_includes) METASOURCES = AUTO -noinst_LTLIBRARIES = libtdevdcopextensions.la -libtdevdcopextensions_la_LDFLAGS = $(all_libraries) -libtdevdcopextensions_la_SOURCES = TDevAppFrontendIface.cpp \ - TDevMakeFrontendIface.cpp TDevAppFrontendIface.skel TDevMakeFrontendIface.skel +noinst_LTLIBRARIES = libkdevdcopextensions.la +libkdevdcopextensions_la_LDFLAGS = $(all_libraries) +libkdevdcopextensions_la_SOURCES = KDevAppFrontendIface.cpp \ + KDevMakeFrontendIface.cpp KDevAppFrontendIface.skel KDevMakeFrontendIface.skel dcopincludeextdir = $(includedir)/tdevelop/interfaces/extensions/dcop -dcopincludeext_HEADERS = TDevAppFrontendIface.h TDevMakeFrontendIface.h +dcopincludeext_HEADERS = KDevAppFrontendIface.h KDevMakeFrontendIface.h diff --git a/lib/interfaces/extensions/dcop/TDevAppFrontendIface.cpp b/lib/interfaces/extensions/dcop/TDevAppFrontendIface.cpp deleted file mode 100644 index a42d0d7d..00000000 --- a/lib/interfaces/extensions/dcop/TDevAppFrontendIface.cpp +++ /dev/null @@ -1,76 +0,0 @@ - - -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 Roberto Raggi - Copyright (C) 2002 Bernd Gehrmann - Copyright (C) 2003 Amilcar do Carmo Lucas - - 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 "TDevAppFrontendIface.h" -#include "tdevappfrontend.h" - - -TDevAppFrontendIface::TDevAppFrontendIface(TDevAppFrontend *appFrontend) - : DCOPObject("TDevAppFrontend"), m_appFrontend(appFrontend) -{ -} - - -TDevAppFrontendIface::~TDevAppFrontendIface() -{} - - -void TDevAppFrontendIface::startAppCommand(const TQString &directory, const TQString &command, bool inTerminal) -{ - m_appFrontend->startAppCommand(directory, command, inTerminal); -} - -void TDevAppFrontendIface::stopApplication( ) -{ - m_appFrontend->stopApplication(); -} - -bool TDevAppFrontendIface::isRunning( ) -{ - return m_appFrontend->isRunning(); -} - -void TDevAppFrontendIface::clearView( ) -{ - m_appFrontend->clearView(); -} - -void TDevAppFrontendIface::insertStderrLine( const TQCString & line ) -{ - m_appFrontend->insertStderrLine(line); -} - -void TDevAppFrontendIface::insertStdoutLine( const TQCString & line ) -{ - m_appFrontend->insertStdoutLine(line); -} - -void TDevAppFrontendIface::addPartialStderrLine( const TQCString& line ) -{ - m_appFrontend->addPartialStderrLine(line); -} - -void TDevAppFrontendIface::addPartialStdoutLine( const TQCString& line ) -{ - m_appFrontend->addPartialStdoutLine(line); -} diff --git a/lib/interfaces/extensions/dcop/TDevAppFrontendIface.h b/lib/interfaces/extensions/dcop/TDevAppFrontendIface.h deleted file mode 100644 index 5061c782..00000000 --- a/lib/interfaces/extensions/dcop/TDevAppFrontendIface.h +++ /dev/null @@ -1,52 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 Roberto Raggi - Copyright (C) 2002 Bernd Gehrmann - Copyright (C) 2003 Amilcar do Carmo Lucas - - 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 _TDEVAPPFRONTENDIFACE_H_ -#define _TDEVAPPFRONTENDIFACE_H_ - -#include - -class TDevAppFrontend; - -class TDevAppFrontendIface : public DCOPObject -{ - K_DCOP - -public: - - TDevAppFrontendIface( TDevAppFrontend *appFrontend ); - ~TDevAppFrontendIface(); - -k_dcop: - void startAppCommand(const TQString &directory, const TQString &command, bool inTerminal); - void stopApplication(); - bool isRunning(); - void clearView(); - void insertStderrLine(const TQCString &line); - void insertStdoutLine(const TQCString &line); - void addPartialStderrLine(const TQCString &line); - void addPartialStdoutLine(const TQCString &line); - -private: - TDevAppFrontend *m_appFrontend; -}; - -#endif diff --git a/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.cpp b/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.cpp deleted file mode 100644 index 06bd432f..00000000 --- a/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.cpp +++ /dev/null @@ -1,46 +0,0 @@ - - -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2001 Bernd Gehrmann - Copyright (C) 2002 Roberto Raggi - - 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 "TDevMakeFrontendIface.h" -#include "tdevmakefrontend.h" - - -TDevMakeFrontendIface::TDevMakeFrontendIface(TDevMakeFrontend *makeFrontend) - : DCOPObject("TDevMakeFrontend") -{ - m_makeFrontend = makeFrontend; -} - - -TDevMakeFrontendIface::~TDevMakeFrontendIface() -{} - - -void TDevMakeFrontendIface::queueCommand(const TQString &dir, const TQString &command) -{ - m_makeFrontend->queueCommand(dir, command); -} - -bool TDevMakeFrontendIface::isRunning( ) -{ - return m_makeFrontend->isRunning(); -} diff --git a/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.h b/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.h deleted file mode 100644 index 3aee75be..00000000 --- a/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.h +++ /dev/null @@ -1,45 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2001 Bernd Gehrmann - Copyright (C) 2002 Roberto Raggi - - 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 _TDEVMAKEFRONTENDIFACE_H_ -#define _TDEVMAKEFRONTENDIFACE_H_ - -#include - -class TDevMakeFrontend; - -class TDevMakeFrontendIface : public DCOPObject -{ - K_DCOP - -public: - - TDevMakeFrontendIface( TDevMakeFrontend *makeFrontend ); - ~TDevMakeFrontendIface(); - -k_dcop: - void queueCommand(const TQString &dir, const TQString &command); - bool isRunning(); - -private: - TDevMakeFrontend *m_makeFrontend; -}; - -#endif diff --git a/lib/interfaces/extensions/kdevappfrontend.cpp b/lib/interfaces/extensions/kdevappfrontend.cpp new file mode 100644 index 00000000..3d918fe2 --- /dev/null +++ b/lib/interfaces/extensions/kdevappfrontend.cpp @@ -0,0 +1,2 @@ +#include "kdevappfrontend.h" +#include "kdevappfrontend.moc" diff --git a/lib/interfaces/extensions/kdevappfrontend.h b/lib/interfaces/extensions/kdevappfrontend.h new file mode 100644 index 00000000..76952f35 --- /dev/null +++ b/lib/interfaces/extensions/kdevappfrontend.h @@ -0,0 +1,116 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001-2002 Bernd Gehrmann + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2002 John Firebaugh + Copyright (C) 2003 Amilcar do Carmo Lucas + Copyright (C) 2003 Hamish Rodda + Copyright (C) 2003 Jens Dagerbo + + 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 KDEVAPPFRONTEND_H +#define KDEVAPPFRONTEND_H + +#include +#include + +/** +@file kdevappfrontend.h +Application frontend interface. +*/ + +/** +Application frontend interface. +This interface is responsible for handling the running of an application in KDevelop. +Currently, this interface defines ways to do the following: +- check if the application is running; +- execute the application; +- stop the currently running application; +- control the output view as seen in the 'Application' tool dock. + +Instances that implement this interface are available through extension architecture: +@code +KDevAppFrontend *apf = extension("TDevelop/AppFrontend"); +if (apf) { + // do something +} else { + // fail +} +@endcode +@sa KDevPlugin::extension method documentation. +*/ +class KDevAppFrontend : public KDevPlugin +{ + Q_OBJECT + + +public: + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevAppFrontend(const KDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) + :KDevPlugin(info, parent, name ? name : "KDevAppFrontend") {} + + /**@return Whether the application is currently running.*/ + virtual bool isRunning() = 0; + +public slots: + /** + * The component shall start to execute an app-like command. + * Running the application is always asynchronous. + * @param directory The working directory to start the app in, + * if empty then the user's home directory is used. + * @param program A program to start. + * @param inTerminal If true then the program is started in an external konsole. + */ + virtual void startAppCommand(const TQString &directory, const TQString &program, bool inTerminal) = 0; + + /** + * Stops the currently running application. + */ + virtual void stopApplication() = 0; + + /** + * Inserts a string into the application output view. + * @param line A string to insert. + */ + virtual void insertStdoutLine(const TQCString &line) = 0; + + /** + * Inserts a string into the application output view marked as stderr output + * (usually colored). + * @param line An error string to insert. + */ + virtual void insertStderrLine(const TQCString &line) = 0; + + virtual void addPartialStderrLine( const TQCString& line ) = 0; + virtual void addPartialStdoutLine( const TQCString& line ) = 0; + + /** + * Clears the output view. + */ + virtual void clearView() = 0; +}; + +#endif diff --git a/lib/interfaces/extensions/kdevcreatefile.h b/lib/interfaces/extensions/kdevcreatefile.h new file mode 100644 index 00000000..35b98d19 --- /dev/null +++ b/lib/interfaces/extensions/kdevcreatefile.h @@ -0,0 +1,146 @@ +/* This file is part of the KDE project + Copyright (C) 2003 Julian Rockey + Copyright (C) 2003 Roberto Raggi + + 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 KDEVCREATEFILE_H +#define KDEVCREATEFILE_H + +#include + +#include + +/** +@file kdevcreatefile.h +File creation facility interface. +*/ + +/** +File creation facility interface. + +An abstract class for all extensions that are responsible for file creation. + +Instances that implement this interface are available through extension architecture: +@code +KDevCreateFile *cf = extension("TDevelop/CreateFile"); +if (cf) { + // do something +} else { + // fail +} +@endcode +@sa KDevPlugin::extension method documentation. +*/ +class KDevCreateFile : public KDevPlugin +{ + +public: + /**File created with @ref KDevCreateFile implementation.*/ + class CreatedFile { + + public: + /**The status of a file.*/ + enum Status { + STATUS_OK /** + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Roberto Raggi + + 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 "kdevdifffrontend.h" + + +KDevDiffFrontend::KDevDiffFrontend(const KDevPluginInfo *info, TQObject *parent, const char *name) + : KDevPlugin(info, parent, name ? name : "KDevDiffFrontend") +{ +} + +KDevDiffFrontend::~KDevDiffFrontend() +{ +} + +#include "kdevdifffrontend.moc" diff --git a/lib/interfaces/extensions/kdevdifffrontend.h b/lib/interfaces/extensions/kdevdifffrontend.h new file mode 100644 index 00000000..6d4cb2b6 --- /dev/null +++ b/lib/interfaces/extensions/kdevdifffrontend.h @@ -0,0 +1,79 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Harald Fernengel + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Roberto Raggi + + 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 KDEVDIFFFRONTEND_H +#define KDEVDIFFFRONTEND_H + +#include +#include + +/** +@file kdevdifffrontend.h +Diff frontend interface. +*/ + +/** +KDevelop diff frontend interface. +This is the abstract base class for plugins that want to display differencies between +files. + +Instances that implement this interface are available through extension architecture: +@code +KDevDiffFrontend *df = extension("TDevelop/DiffFrontend"); +if (df) { + // do something +} else { + // fail +} +@endcode +@sa KDevPlugin::extension method documentation. +*/ +class KDevDiffFrontend : public KDevPlugin +{ + +public: + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevDiffFrontend( const KDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) + :KDevPlugin(info, parent, name ? name : "KDevDiffFrontend") {} + + /**Displays the patch. + @param diff A string which contains a patch in unified format.*/ + virtual void showDiff( const TQString& diff ) = 0; + + /**Displays a patch file. + @param url An url of the patch file.*/ + virtual void openURL( const KURL &url ) = 0; + + /**Displays the difference between the two files. + @param url1 First file to compare. + @param url2 Second file to compare.*/ + virtual void showDiff( const KURL &url1, const KURL &url2 ) = 0; + +}; + +#endif diff --git a/lib/interfaces/extensions/kdevmakefrontend.cpp b/lib/interfaces/extensions/kdevmakefrontend.cpp new file mode 100644 index 00000000..5e035270 --- /dev/null +++ b/lib/interfaces/extensions/kdevmakefrontend.cpp @@ -0,0 +1,2 @@ +#include "kdevmakefrontend.h" +#include "kdevmakefrontend.moc" diff --git a/lib/interfaces/extensions/kdevmakefrontend.h b/lib/interfaces/extensions/kdevmakefrontend.h new file mode 100644 index 00000000..52afa3d3 --- /dev/null +++ b/lib/interfaces/extensions/kdevmakefrontend.h @@ -0,0 +1,107 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001 Sandy Meier + Copyright (C) 2001-2002 Bernd Gehrmann + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Amilcar do Carmo Lucas + Copyright (C) 2003 Hamish Rodda + + 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 KDEVMAKEFRONTEND_H +#define KDEVMAKEFRONTEND_H + +#include +#include + +/** +@file kdevmakefrontend.h +Make frontend interface. +*/ + +/** +KDevelop make frontend interface. +This is the abstract base class for plugins that are able to run "make" +or similar commands to build a project, api documentation, etc. + +Instances that implement this interface are available through extension architecture: +@code +KDevMakeFrontend *mf = extension("TDevelop/MakeFrontend"); +if (mf) { + // do something +} else { + // fail +} +@endcode +@sa KDevPlugin::extension method documentation. +*/ +class KDevMakeFrontend : public KDevPlugin +{ + Q_OBJECT + + +public: + + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevMakeFrontend(const KDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) + :KDevPlugin(info, parent, name ? name : "KDevMakeFrontend") {} + + /**@return The widget where the make output is shown.*/ + virtual TQWidget* widget() { return 0L; } + + /**The component shall start to execute a make-like command. + * Commands are always asynchronous. You can submit several jobs + * without caring about another job already running. There are + * executed in the order in which they are submitted. If one of + * then fails, all following jobs are dropped. + * You should not make any assumptions about the directory in which + * the command is started. If the command depends on that, put and + * explicit 'cd' into the command. + * @param dir A starting directory to find files when parsing compiler error + * messages. + * @param command A shell command to execute. + */ + virtual void queueCommand(const TQString &dir, const TQString &command) = 0; + + /**@return Whether the application is currently running.*/ + virtual bool isRunning() = 0; + + /**Advices to synchronize the settings from TDEConfig because they were changed externally.*/ + virtual void updateSettingsFromConfig() = 0; + +signals: + /** + * Only emitted if the command was succesfully finished. + */ + void commandFinished(const TQString &command); + + /** + * Emitted if a command failed. + */ + void commandFailed(const TQString &command); +}; + +#endif diff --git a/lib/interfaces/extensions/kdevquickopen.h b/lib/interfaces/extensions/kdevquickopen.h new file mode 100644 index 00000000..91dce7ca --- /dev/null +++ b/lib/interfaces/extensions/kdevquickopen.h @@ -0,0 +1,130 @@ +/* This file is part of the KDE project + Copyright (C) 2007 Alexander Dymo + + 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 KDEVQUICKOPEN_H +#define KDEVQUICKOPEN_H + +#include +#include + +/** +@file kdevquickopen.h +Source formatter interface. +*/ + +/** +Quick open plugin interface. + +Use it when you need to present a dialog to choose between files to open. +@code +KDevQuickOpen *qo = extension("TDevelop/QuickOpen"); +if (qo) { + // do something +} else { + // fail +} +@endcode +@sa @ref KDevPlugin::extension method documentation. +@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. +*/ +class KDevQuickOpen : public KDevPlugin +{ +public: + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevQuickOpen(const KDevPluginInfo *info, TQObject* parent, const char* name) + :KDevPlugin(info, parent, name) {} + + /**Shows the file selection dialog. + @param text A list of urls to open.*/ + virtual void quickOpenFile(const KURL::List urls) = 0; +}; + +#endif +/* This file is part of the KDE project + Copyright (C) 2007 Alexander Dymo + + 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 KDEVQUICKOPEN_H +#define KDEVQUICKOPEN_H + +#include +#include + +/** +@file kdevquickopen.h +Source formatter interface. +*/ + +/** +Quick open plugin interface. + +Use it when you need to present a dialog to choose between files to open. +@code +KDevQuickOpen *qo = extension("TDevelop/QuickOpen"); +if (qo) { + // do something +} else { + // fail +} +@endcode +@sa @ref KDevPlugin::extension method documentation. +@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. +*/ +class KDevQuickOpen : public KDevPlugin +{ +public: + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevQuickOpen(const KDevPluginInfo *info, TQObject* parent, const char* name) + :KDevPlugin(info, parent, name) {} + + /**Shows the file selection dialog. + @param text A list of urls to open.*/ + virtual void quickOpenFile(const KURL::List urls) = 0; +}; + +#endif diff --git a/lib/interfaces/extensions/kdevsourceformatter.h b/lib/interfaces/extensions/kdevsourceformatter.h new file mode 100644 index 00000000..c4a380cf --- /dev/null +++ b/lib/interfaces/extensions/kdevsourceformatter.h @@ -0,0 +1,69 @@ +/* This file is part of the KDE project + Copyright (C) 2003-2004 Alexander Dymo + + 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 KDEVSOURCEFORMATTER_H +#define KDEVSOURCEFORMATTER_H + +#include + +/** +@file kdevsourceformatter.h +Source formatter interface. +*/ + +/** +Source formatter interface. +This interface is responsible for formatting source files and strings of code. + +Instances that implement this interface are available through extension architecture: +@code +KDevSourceFormatter *sf = extension("TDevelop/SourceFormatter"); +if (sf) { + // do something +} else { + // fail +} +@endcode +@sa @ref KDevPlugin::extension method documentation. +@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. +*/ +class KDevSourceFormatter : public KDevPlugin +{ +public: + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevSourceFormatter(const KDevPluginInfo *info, TQObject* parent, const char* name) + :KDevPlugin(info, parent, name) {} + + /**Formats the source. + @param text A string with a code. + @return The formatted string.*/ + virtual TQString formatSource(const TQString text) = 0; + + /**@return The indentation string. For example, tab or four spaces can be returned.*/ + virtual TQString indentString() const = 0; +}; + +#endif diff --git a/lib/interfaces/extensions/kdevversioncontrol.h b/lib/interfaces/extensions/kdevversioncontrol.h new file mode 100644 index 00000000..a19c6275 --- /dev/null +++ b/lib/interfaces/extensions/kdevversioncontrol.h @@ -0,0 +1,239 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2003 Mario Scalas + Copyright (C) 2004 Alexander Dymo + + 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 KDEVVERSIONCONTROL_H +#define KDEVVERSIONCONTROL_H + +#include +#include +#include +#include +#include + +#include + +/** +@file kdevversioncontrol.h +Version control system interface and utility classes. +*/ + +/** +Info about file state in VCS. + +Used, for example in file views to display VCS related information about files. +*/ +struct VCSFileInfo +{ + /**State of the file.*/ + enum FileState { + Unknown /** VCSFileInfoMap; @endcode +*/ +typedef TQMap VCSFileInfoMap; + +class KDevVCSFileInfoProvider; + + +/** +KDevelop version control system interface. +This is the abstract base class which encapsulates everything +necessary for communicating with version control systems. +VCS support plugins should implement this interface. + +Instances that implement this interface are available through extension architecture: +@code +KDevVersionControl *vcs = extension("TDevelop/VersionControl"); +if (vcs) { + // do something +} else { + // fail +} +@endcode +@sa KDevPlugin::extension method documentation. +*/ +class KDevVersionControl: public KDevPlugin +{ + Q_OBJECT + + +public: + /**Constructs a VCS plugin. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevVersionControl(const KDevPluginInfo *info, TQObject *parent, const char *name ) + :KDevPlugin(info, parent, name ) {} + + /**Creates a new project in the passed path @p dir. This should instantiate + VCS infrastructure and import a project into the VCS in that directory. + @param dir The absolute path to the directory where VCS infrastructure should be + created.*/ + virtual void createNewProject(const TQString& dir) = 0; + + /**Fetches a module from remote repository, so it can be used for importing. + @return true in case of success.*/ + virtual bool fetchFromRepository() = 0; + + /**@return The file info provider for this version control (0 if none is available).*/ + virtual KDevVCSFileInfoProvider *fileInfoProvider() const = 0; + + /**Checks if the directory is valid for this version control (for example + CVS may check for the presence of "/CVS/" subdir and something else) + @param dirPath The absolute path of the directory. + @return true if the directory is valid for this version control + warning: this returns false by default.*/ + virtual bool isValidDirectory(const TQString &dirPath) const = 0; + + +signals: + /**Emitted when the Version Control has finished importing a module from remote + repository + @param destinationDir The directory where the module has been fetched.*/ + void finishedFetching(TQString destinationDir); + +}; + +/** +Basic interface for providing info on file registered in a version control repository repository. +*/ +class KDevVCSFileInfoProvider: public TQObject +{ + Q_OBJECT + +public: + /**Constructor. + @param parent The parent VCS plugin. + @param name The name of a provider object.*/ + KDevVCSFileInfoProvider(KDevVersionControl *parent, const char *name) + : TQObject( parent, name ), m_owner(parent) {} + + /**Gets the status for local files in the specified directory: + the info are collected locally so they are necessarily in sync with the repository + + This is a synchronous operation (blocking). + @param dirPath The relative (to project dir) directory path to stat. + @return Status for all registered files.*/ + virtual const VCSFileInfoMap *status(const TQString &dirPath) = 0; + + /**Starts a request for directory status to the remote repository. + Requests and answers are asynchronous. + + This is an asynchronous operation for requesting data, so + for obvious reasons: the caller must connect the statusReady() signal and + check for the return value of this method. + @param dirPath The (relative to project directory) directory which status you are asking for. + @param callerData The pointer to some data you want the provider will return + to you when it has done. + @param recursive If false, retrieve information only for dirPath's immediate children. + @param checkRepos If true, contact remote repository and augment repository's status. + If false, retrieve only for local modification information. + @return true if the request has been successfully started, false otherwise.*/ + virtual bool requestStatus( const TQString &dirPath, void *callerData, bool recursive = true, bool checkRepos = true ) = 0; + +signals: + /**Emitted when the status request to remote repository has finished. + @param fileInfoMap The status for registered in repository files. + @param callerData The pointer to some data you want the provider will return + to you when it has done + @see requestStatus for to find out when this signal should be used.*/ + void statusReady(const VCSFileInfoMap &fileInfoMap, void *callerData); + +protected: + /**@return The version control which owns this provider.*/ + KDevVersionControl *owner() const { return m_owner; } + +private: + KDevVersionControl *m_owner; + +private: + KDevVCSFileInfoProvider( const KDevVCSFileInfoProvider & ); + KDevVCSFileInfoProvider &operator=( const KDevVCSFileInfoProvider & ); +}; + +#endif diff --git a/lib/interfaces/extensions/tdevappfrontend.cpp b/lib/interfaces/extensions/tdevappfrontend.cpp deleted file mode 100644 index 4f7c52a7..00000000 --- a/lib/interfaces/extensions/tdevappfrontend.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#include "tdevappfrontend.h" -#include "tdevappfrontend.moc" diff --git a/lib/interfaces/extensions/tdevappfrontend.h b/lib/interfaces/extensions/tdevappfrontend.h deleted file mode 100644 index 085d3c9d..00000000 --- a/lib/interfaces/extensions/tdevappfrontend.h +++ /dev/null @@ -1,116 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2001-2002 Bernd Gehrmann - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2002 Simon Hausmann - Copyright (C) 2002 John Firebaugh - Copyright (C) 2003 Amilcar do Carmo Lucas - Copyright (C) 2003 Hamish Rodda - Copyright (C) 2003 Jens Dagerbo - - 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 TDEVAPPFRONTEND_H -#define TDEVAPPFRONTEND_H - -#include -#include - -/** -@file tdevappfrontend.h -Application frontend interface. -*/ - -/** -Application frontend interface. -This interface is responsible for handling the running of an application in KDevelop. -Currently, this interface defines ways to do the following: -- check if the application is running; -- execute the application; -- stop the currently running application; -- control the output view as seen in the 'Application' tool dock. - -Instances that implement this interface are available through extension architecture: -@code -TDevAppFrontend *apf = extension("TDevelop/AppFrontend"); -if (apf) { - // do something -} else { - // fail -} -@endcode -@sa TDevPlugin::extension method documentation. -*/ -class TDevAppFrontend : public TDevPlugin -{ - Q_OBJECT - - -public: - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - TDevAppFrontend(const TDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) - :TDevPlugin(info, parent, name ? name : "TDevAppFrontend") {} - - /**@return Whether the application is currently running.*/ - virtual bool isRunning() = 0; - -public slots: - /** - * The component shall start to execute an app-like command. - * Running the application is always asynchronous. - * @param directory The working directory to start the app in, - * if empty then the user's home directory is used. - * @param program A program to start. - * @param inTerminal If true then the program is started in an external konsole. - */ - virtual void startAppCommand(const TQString &directory, const TQString &program, bool inTerminal) = 0; - - /** - * Stops the currently running application. - */ - virtual void stopApplication() = 0; - - /** - * Inserts a string into the application output view. - * @param line A string to insert. - */ - virtual void insertStdoutLine(const TQCString &line) = 0; - - /** - * Inserts a string into the application output view marked as stderr output - * (usually colored). - * @param line An error string to insert. - */ - virtual void insertStderrLine(const TQCString &line) = 0; - - virtual void addPartialStderrLine( const TQCString& line ) = 0; - virtual void addPartialStdoutLine( const TQCString& line ) = 0; - - /** - * Clears the output view. - */ - virtual void clearView() = 0; -}; - -#endif diff --git a/lib/interfaces/extensions/tdevcreatefile.h b/lib/interfaces/extensions/tdevcreatefile.h deleted file mode 100644 index b1148e94..00000000 --- a/lib/interfaces/extensions/tdevcreatefile.h +++ /dev/null @@ -1,146 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003 Julian Rockey - Copyright (C) 2003 Roberto Raggi - - 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 TDEVCREATEFILE_H -#define TDEVCREATEFILE_H - -#include - -#include - -/** -@file tdevcreatefile.h -File creation facility interface. -*/ - -/** -File creation facility interface. - -An abstract class for all extensions that are responsible for file creation. - -Instances that implement this interface are available through extension architecture: -@code -TDevCreateFile *cf = extension("TDevelop/CreateFile"); -if (cf) { - // do something -} else { - // fail -} -@endcode -@sa TDevPlugin::extension method documentation. -*/ -class TDevCreateFile : public TDevPlugin -{ - -public: - /**File created with @ref TDevCreateFile implementation.*/ - class CreatedFile { - - public: - /**The status of a file.*/ - enum Status { - STATUS_OK /** - Copyright (C) 2002 F@lk Brettschneider - Copyright (C) 2003 Roberto Raggi - - 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 "tdevdifffrontend.h" - - -TDevDiffFrontend::TDevDiffFrontend(const TDevPluginInfo *info, TQObject *parent, const char *name) - : TDevPlugin(info, parent, name ? name : "TDevDiffFrontend") -{ -} - -TDevDiffFrontend::~TDevDiffFrontend() -{ -} - -#include "tdevdifffrontend.moc" diff --git a/lib/interfaces/extensions/tdevdifffrontend.h b/lib/interfaces/extensions/tdevdifffrontend.h deleted file mode 100644 index c0c343cb..00000000 --- a/lib/interfaces/extensions/tdevdifffrontend.h +++ /dev/null @@ -1,79 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Harald Fernengel - Copyright (C) 2002 F@lk Brettschneider - Copyright (C) 2003 Roberto Raggi - - 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 TDEVDIFFFRONTEND_H -#define TDEVDIFFFRONTEND_H - -#include -#include - -/** -@file tdevdifffrontend.h -Diff frontend interface. -*/ - -/** -KDevelop diff frontend interface. -This is the abstract base class for plugins that want to display differencies between -files. - -Instances that implement this interface are available through extension architecture: -@code -TDevDiffFrontend *df = extension("TDevelop/DiffFrontend"); -if (df) { - // do something -} else { - // fail -} -@endcode -@sa TDevPlugin::extension method documentation. -*/ -class TDevDiffFrontend : public TDevPlugin -{ - -public: - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - TDevDiffFrontend( const TDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) - :TDevPlugin(info, parent, name ? name : "TDevDiffFrontend") {} - - /**Displays the patch. - @param diff A string which contains a patch in unified format.*/ - virtual void showDiff( const TQString& diff ) = 0; - - /**Displays a patch file. - @param url An url of the patch file.*/ - virtual void openURL( const KURL &url ) = 0; - - /**Displays the difference between the two files. - @param url1 First file to compare. - @param url2 Second file to compare.*/ - virtual void showDiff( const KURL &url1, const KURL &url2 ) = 0; - -}; - -#endif diff --git a/lib/interfaces/extensions/tdevmakefrontend.cpp b/lib/interfaces/extensions/tdevmakefrontend.cpp deleted file mode 100644 index 140d074d..00000000 --- a/lib/interfaces/extensions/tdevmakefrontend.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#include "tdevmakefrontend.h" -#include "tdevmakefrontend.moc" diff --git a/lib/interfaces/extensions/tdevmakefrontend.h b/lib/interfaces/extensions/tdevmakefrontend.h deleted file mode 100644 index 47b14fc4..00000000 --- a/lib/interfaces/extensions/tdevmakefrontend.h +++ /dev/null @@ -1,107 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2001 Sandy Meier - Copyright (C) 2001-2002 Bernd Gehrmann - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2002 Simon Hausmann - Copyright (C) 2002 F@lk Brettschneider - Copyright (C) 2003 Amilcar do Carmo Lucas - Copyright (C) 2003 Hamish Rodda - - 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 TDEVMAKEFRONTEND_H -#define TDEVMAKEFRONTEND_H - -#include -#include - -/** -@file tdevmakefrontend.h -Make frontend interface. -*/ - -/** -KDevelop make frontend interface. -This is the abstract base class for plugins that are able to run "make" -or similar commands to build a project, api documentation, etc. - -Instances that implement this interface are available through extension architecture: -@code -TDevMakeFrontend *mf = extension("TDevelop/MakeFrontend"); -if (mf) { - // do something -} else { - // fail -} -@endcode -@sa TDevPlugin::extension method documentation. -*/ -class TDevMakeFrontend : public TDevPlugin -{ - Q_OBJECT - - -public: - - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - TDevMakeFrontend(const TDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) - :TDevPlugin(info, parent, name ? name : "TDevMakeFrontend") {} - - /**@return The widget where the make output is shown.*/ - virtual TQWidget* widget() { return 0L; } - - /**The component shall start to execute a make-like command. - * Commands are always asynchronous. You can submit several jobs - * without caring about another job already running. There are - * executed in the order in which they are submitted. If one of - * then fails, all following jobs are dropped. - * You should not make any assumptions about the directory in which - * the command is started. If the command depends on that, put and - * explicit 'cd' into the command. - * @param dir A starting directory to find files when parsing compiler error - * messages. - * @param command A shell command to execute. - */ - virtual void queueCommand(const TQString &dir, const TQString &command) = 0; - - /**@return Whether the application is currently running.*/ - virtual bool isRunning() = 0; - - /**Advices to synchronize the settings from TDEConfig because they were changed externally.*/ - virtual void updateSettingsFromConfig() = 0; - -signals: - /** - * Only emitted if the command was succesfully finished. - */ - void commandFinished(const TQString &command); - - /** - * Emitted if a command failed. - */ - void commandFailed(const TQString &command); -}; - -#endif diff --git a/lib/interfaces/extensions/tdevquickopen.h b/lib/interfaces/extensions/tdevquickopen.h deleted file mode 100644 index e1fd2f65..00000000 --- a/lib/interfaces/extensions/tdevquickopen.h +++ /dev/null @@ -1,130 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 Alexander Dymo - - 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 TDEVQUICKOPEN_H -#define TDEVQUICKOPEN_H - -#include -#include - -/** -@file tdevquickopen.h -Source formatter interface. -*/ - -/** -Quick open plugin interface. - -Use it when you need to present a dialog to choose between files to open. -@code -KDevQuickOpen *qo = extension("TDevelop/QuickOpen"); -if (qo) { - // do something -} else { - // fail -} -@endcode -@sa @ref TDevPlugin::extension method documentation. -@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. -*/ -class KDevQuickOpen : public TDevPlugin -{ -public: - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - KDevQuickOpen(const TDevPluginInfo *info, TQObject* parent, const char* name) - :TDevPlugin(info, parent, name) {} - - /**Shows the file selection dialog. - @param text A list of urls to open.*/ - virtual void quickOpenFile(const KURL::List urls) = 0; -}; - -#endif -/* This file is part of the KDE project - Copyright (C) 2007 Alexander Dymo - - 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 TDEVQUICKOPEN_H -#define TDEVQUICKOPEN_H - -#include -#include - -/** -@file tdevquickopen.h -Source formatter interface. -*/ - -/** -Quick open plugin interface. - -Use it when you need to present a dialog to choose between files to open. -@code -KDevQuickOpen *qo = extension("TDevelop/QuickOpen"); -if (qo) { - // do something -} else { - // fail -} -@endcode -@sa @ref TDevPlugin::extension method documentation. -@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. -*/ -class KDevQuickOpen : public TDevPlugin -{ -public: - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - KDevQuickOpen(const TDevPluginInfo *info, TQObject* parent, const char* name) - :TDevPlugin(info, parent, name) {} - - /**Shows the file selection dialog. - @param text A list of urls to open.*/ - virtual void quickOpenFile(const KURL::List urls) = 0; -}; - -#endif diff --git a/lib/interfaces/extensions/tdevsourceformatter.h b/lib/interfaces/extensions/tdevsourceformatter.h deleted file mode 100644 index 3403a5d2..00000000 --- a/lib/interfaces/extensions/tdevsourceformatter.h +++ /dev/null @@ -1,69 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003-2004 Alexander Dymo - - 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 TDEVSOURCEFORMATTER_H -#define TDEVSOURCEFORMATTER_H - -#include - -/** -@file tdevsourceformatter.h -Source formatter interface. -*/ - -/** -Source formatter interface. -This interface is responsible for formatting source files and strings of code. - -Instances that implement this interface are available through extension architecture: -@code -KDevSourceFormatter *sf = extension("TDevelop/SourceFormatter"); -if (sf) { - // do something -} else { - // fail -} -@endcode -@sa @ref TDevPlugin::extension method documentation. -@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. -*/ -class KDevSourceFormatter : public TDevPlugin -{ -public: - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - KDevSourceFormatter(const TDevPluginInfo *info, TQObject* parent, const char* name) - :TDevPlugin(info, parent, name) {} - - /**Formats the source. - @param text A string with a code. - @return The formatted string.*/ - virtual TQString formatSource(const TQString text) = 0; - - /**@return The indentation string. For example, tab or four spaces can be returned.*/ - virtual TQString indentString() const = 0; -}; - -#endif diff --git a/lib/interfaces/extensions/tdevversioncontrol.h b/lib/interfaces/extensions/tdevversioncontrol.h deleted file mode 100644 index d796e31f..00000000 --- a/lib/interfaces/extensions/tdevversioncontrol.h +++ /dev/null @@ -1,239 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2002 Simon Hausmann - Copyright (C) 2003 Mario Scalas - Copyright (C) 2004 Alexander Dymo - - 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 TDEVVERSIONCONTROL_H -#define TDEVVERSIONCONTROL_H - -#include -#include -#include -#include -#include - -#include - -/** -@file tdevversioncontrol.h -Version control system interface and utility classes. -*/ - -/** -Info about file state in VCS. - -Used, for example in file views to display VCS related information about files. -*/ -struct VCSFileInfo -{ - /**State of the file.*/ - enum FileState { - Unknown /** VCSFileInfoMap; @endcode -*/ -typedef TQMap VCSFileInfoMap; - -class TDevVCSFileInfoProvider; - - -/** -KDevelop version control system interface. -This is the abstract base class which encapsulates everything -necessary for communicating with version control systems. -VCS support plugins should implement this interface. - -Instances that implement this interface are available through extension architecture: -@code -TDevVersionControl *vcs = extension("TDevelop/VersionControl"); -if (vcs) { - // do something -} else { - // fail -} -@endcode -@sa TDevPlugin::extension method documentation. -*/ -class TDevVersionControl: public TDevPlugin -{ - Q_OBJECT - - -public: - /**Constructs a VCS plugin. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - TDevVersionControl(const TDevPluginInfo *info, TQObject *parent, const char *name ) - :TDevPlugin(info, parent, name ) {} - - /**Creates a new project in the passed path @p dir. This should instantiate - VCS infrastructure and import a project into the VCS in that directory. - @param dir The absolute path to the directory where VCS infrastructure should be - created.*/ - virtual void createNewProject(const TQString& dir) = 0; - - /**Fetches a module from remote repository, so it can be used for importing. - @return true in case of success.*/ - virtual bool fetchFromRepository() = 0; - - /**@return The file info provider for this version control (0 if none is available).*/ - virtual TDevVCSFileInfoProvider *fileInfoProvider() const = 0; - - /**Checks if the directory is valid for this version control (for example - CVS may check for the presence of "/CVS/" subdir and something else) - @param dirPath The absolute path of the directory. - @return true if the directory is valid for this version control - warning: this returns false by default.*/ - virtual bool isValidDirectory(const TQString &dirPath) const = 0; - - -signals: - /**Emitted when the Version Control has finished importing a module from remote - repository - @param destinationDir The directory where the module has been fetched.*/ - void finishedFetching(TQString destinationDir); - -}; - -/** -Basic interface for providing info on file registered in a version control repository repository. -*/ -class TDevVCSFileInfoProvider: public TQObject -{ - Q_OBJECT - -public: - /**Constructor. - @param parent The parent VCS plugin. - @param name The name of a provider object.*/ - TDevVCSFileInfoProvider(TDevVersionControl *parent, const char *name) - : TQObject( parent, name ), m_owner(parent) {} - - /**Gets the status for local files in the specified directory: - the info are collected locally so they are necessarily in sync with the repository - - This is a synchronous operation (blocking). - @param dirPath The relative (to project dir) directory path to stat. - @return Status for all registered files.*/ - virtual const VCSFileInfoMap *status(const TQString &dirPath) = 0; - - /**Starts a request for directory status to the remote repository. - Requests and answers are asynchronous. - - This is an asynchronous operation for requesting data, so - for obvious reasons: the caller must connect the statusReady() signal and - check for the return value of this method. - @param dirPath The (relative to project directory) directory which status you are asking for. - @param callerData The pointer to some data you want the provider will return - to you when it has done. - @param recursive If false, retrieve information only for dirPath's immediate children. - @param checkRepos If true, contact remote repository and augment repository's status. - If false, retrieve only for local modification information. - @return true if the request has been successfully started, false otherwise.*/ - virtual bool requestStatus( const TQString &dirPath, void *callerData, bool recursive = true, bool checkRepos = true ) = 0; - -signals: - /**Emitted when the status request to remote repository has finished. - @param fileInfoMap The status for registered in repository files. - @param callerData The pointer to some data you want the provider will return - to you when it has done - @see requestStatus for to find out when this signal should be used.*/ - void statusReady(const VCSFileInfoMap &fileInfoMap, void *callerData); - -protected: - /**@return The version control which owns this provider.*/ - TDevVersionControl *owner() const { return m_owner; } - -private: - TDevVersionControl *m_owner; - -private: - TDevVCSFileInfoProvider( const TDevVCSFileInfoProvider & ); - TDevVCSFileInfoProvider &operator=( const TDevVCSFileInfoProvider & ); -}; - -#endif diff --git a/lib/interfaces/external/Mainpage.dox b/lib/interfaces/external/Mainpage.dox index 6c2fb2b9..4ed571dd 100644 --- a/lib/interfaces/external/Mainpage.dox +++ b/lib/interfaces/external/Mainpage.dox @@ -30,7 +30,7 @@ are connected to corresponding Q_SLOTS of TDevelop designer integration engine w Each language support which wants to use integrated designer, must reimplement @code -virtual TDevDesignerIntegration *TDevLanguageSupport::designer(KInterfaceDesigner::DesignerType type) +virtual KDevDesignerIntegration *KDevLanguageSupport::designer(KInterfaceDesigner::DesignerType type) @endcode method and return designer integration object. @@ -39,15 +39,15 @@ developers. With the convenience library writing %Qt designer integration for th trivial task. -\section tdevdesigner KDevelop Designer technical overview -KDevelop version >= 3.1 comes with a customized version (fork ;)) of %Qt Designer. It is called KDevelop Designer (TDevDesigner, tdevdesigner from the command line). TDevDesigner has some important differences: -- TDevDesigner provides a read/write KPart which can be embedded into any application which wants to edit .ui files. TDevelop IDE embeds TDevDesigner this way. -- TDevDesigner uses %KDE icons and dialogs and thus provides better integration with a system. +\section kdevdesigner KDevelop Designer technical overview +KDevelop version >= 3.1 comes with a customized version (fork ;)) of %Qt Designer. It is called KDevelop Designer (KDevDesigner, kdevdesigner from the command line). KDevDesigner has some important differences: +- KDevDesigner provides a read/write KPart which can be embedded into any application which wants to edit .ui files. TDevelop IDE embeds KDevDesigner this way. +- KDevDesigner uses %KDE icons and dialogs and thus provides better integration with a system. . -It is safe to preview forms with some %KDE widgets from tdeui and tdeio libraries - TDevDesigner part is linked to those libraries so it will not crash under some circumstances. +It is safe to preview forms with some %KDE widgets from tdeui and tdeio libraries - KDevDesigner part is linked to those libraries so it will not crash under some circumstances. -TDevDesigner will not create .ui.h files - this feature is completely disabled. Integrated TDevDesigner will use subclassing approach, standalone does not allow to enter code. +KDevDesigner will not create .ui.h files - this feature is completely disabled. Integrated KDevDesigner will use subclassing approach, standalone does not allow to enter code. \section other Other information diff --git a/lib/interfaces/extras/CMakeLists.txt b/lib/interfaces/extras/CMakeLists.txt index afe233aa..eb4cdb75 100644 --- a/lib/interfaces/extras/CMakeLists.txt +++ b/lib/interfaces/extras/CMakeLists.txt @@ -22,7 +22,7 @@ link_directories( ##### headers ################################### install( FILES - tdevcompileroptions.h tdevvcsintegrator.h + kdevcompileroptions.h kdevvcsintegrator.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/interfaces/extras ) install( FILES @@ -30,10 +30,10 @@ install( FILES DESTINATION ${SERVICETYPES_INSTALL_DIR} ) -##### tdevextras (shared) ####################### +##### kdevextras (shared) ####################### -tde_add_library( tdevextras SHARED AUTOMOC - SOURCES tdevcompileroptions.cpp tdevvcsintegrator.cpp +tde_add_library( kdevextras SHARED AUTOMOC + SOURCES kdevcompileroptions.cpp kdevvcsintegrator.cpp VERSION 0.0.0 LINK ${TQT_LIBRARIES} DESTINATION ${LIB_INSTALL_DIR} diff --git a/lib/interfaces/extras/Makefile.am b/lib/interfaces/extras/Makefile.am index c504621e..67615223 100644 --- a/lib/interfaces/extras/Makefile.am +++ b/lib/interfaces/extras/Makefile.am @@ -1,18 +1,18 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util \ $(all_includes) METASOURCES = AUTO -libtdevextras_la_LIBADD = $(LIB_QT) -libtdevextras_la_LDFLAGS = $(all_libraries) -lib_LTLIBRARIES = libtdevextras.la +libkdevextras_la_LIBADD = $(LIB_QT) +libkdevextras_la_LDFLAGS = $(all_libraries) +lib_LTLIBRARIES = libkdevextras.la tdevelopincludedir = $(includedir)/tdevelop/interfaces/extras servicetypedir = $(kde_servicetypesdir) -tdevelopinclude_HEADERS = tdevcompileroptions.h tdevvcsintegrator.h -libtdevextras_la_SOURCES = tdevcompileroptions.cpp tdevvcsintegrator.cpp +tdevelopinclude_HEADERS = kdevcompileroptions.h kdevvcsintegrator.h +libkdevextras_la_SOURCES = kdevcompileroptions.cpp kdevvcsintegrator.cpp servicetype_DATA = tdevelopcompileroptions.desktop \ tdevelopvcsintegrator.desktop -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevinterfaces +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevinterfaces DOXYGEN_PROJECTNAME = TDevelop Extra Interfaces Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_DOCDIRPREFIX = kdev include ../../../Doxyfile.am diff --git a/lib/interfaces/extras/kdevcompileroptions.cpp b/lib/interfaces/extras/kdevcompileroptions.cpp new file mode 100644 index 00000000..22c701f1 --- /dev/null +++ b/lib/interfaces/extras/kdevcompileroptions.cpp @@ -0,0 +1,8 @@ +#include "kdevcompileroptions.h" + +KDevCompilerOptions::KDevCompilerOptions( TQObject * parent, const char * name ) + :TQObject(parent, name) +{ +} + +#include "kdevcompileroptions.moc" diff --git a/lib/interfaces/extras/kdevcompileroptions.h b/lib/interfaces/extras/kdevcompileroptions.h new file mode 100644 index 00000000..6544c5d0 --- /dev/null +++ b/lib/interfaces/extras/kdevcompileroptions.h @@ -0,0 +1,91 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 Roberto Raggi + + 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. +*/ + +/** +@file kdevcompileroptions.h +The interface to compiler options configuration. +*/ + +#ifndef _KDEVCOMPILEROPTIONS_H_ +#define _KDEVCOMPILEROPTIONS_H_ + +#include + +/** +The interface to compiler options configuration. +Used by build systems to give users a compiler options configuration dialog. + +Common use case: +@code +static KDevCompilerOptions *createCompilerOptions( const TQString &name, TQObject *parent ) +{ + KService::Ptr service = KService::serviceByDesktopName( name ); + if ( !service ) + return 0; + + KLibFactory *factory = KLibLoader::self()->factory(TQFile::encodeName(service->library())); + if (!factory) + return 0; + + TQStringList args; + TQVariant prop = service->property("X-TDevelop-Args"); + if (prop.isValid()) + args = TQStringList::split(" ", prop.toString()); + + TQObject *obj = factory->create(parent, service->name().latin1(), + "KDevCompilerOptions", args); + + if (!obj->inherits("KDevCompilerOptions")) + return 0; + + KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj; + return dlg; +} + +... +KDevCompilerOptions *plugin = createCompilerOptions(compilerName, parent); +TQString flags = ""; //old compiler flags +if ( plugin ) +{ + flags = plugin->exec( parent, flags ); //new compiler flags are returned + delete plugin; +} +@endcode +*/ +class KDevCompilerOptions : public TQObject +{ + Q_OBJECT + + +public: + KDevCompilerOptions( TQObject *parent=0, const char *name=0 ); + + /** + * Opens a dialog which allows the user to configure the + * compiler options. The initial settings in the dialog + * will be set from the flags argument of this method. + * After the dialog is accepted, the new settings will + * be returned as a string. If the dialog was cancelled, + * TQString() is returned. + */ + virtual TQString exec(TQWidget *parent, const TQString &flags) = 0; +}; + +#endif diff --git a/lib/interfaces/extras/kdevvcsintegrator.cpp b/lib/interfaces/extras/kdevvcsintegrator.cpp new file mode 100644 index 00000000..5a6ab429 --- /dev/null +++ b/lib/interfaces/extras/kdevvcsintegrator.cpp @@ -0,0 +1,26 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Alexander Dymo + + 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 "kdevvcsintegrator.h" + +KDevVCSIntegrator::KDevVCSIntegrator(TQObject *parent, const char *name) + :TQObject(parent, name) +{ +} + +#include "kdevvcsintegrator.moc" diff --git a/lib/interfaces/extras/kdevvcsintegrator.h b/lib/interfaces/extras/kdevvcsintegrator.h new file mode 100644 index 00000000..793070b3 --- /dev/null +++ b/lib/interfaces/extras/kdevvcsintegrator.h @@ -0,0 +1,77 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Alexander Dymo + + 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 KDEVVCSINTEGRATOR_H +#define KDEVVCSINTEGRATOR_H + +#include + +/** +@file kdevvcsintegrator.h +The interface to VCS integrators. +*/ + +class TQDomDocument; +class TQWidget; + +/** +VCS Integration Dialog. + +Usually it is created as: +@code +class MyVCSDialog: public TQWidget, public VCSDialog { + MyVCSDialog(TQWidget *parent = 0, const char *name = 0); + virtual void accept() { ... } + virtual void init(const TQString &projectName, const TQString &projectLocation) { ... } + virtual TQWidget *self() { + return const_cast(this); + } +} +@endcode +*/ +class VCSDialog { +public: + VCSDialog() { } + /**Implement all integration actions here. Do not use TQDialog::accept method + to perform integration actions.*/ + virtual void accept() = 0; + /**Init integration dialog with the project name and location.*/ + virtual void init(const TQString &projectName, const TQString &projectLocation) = 0; + /**Reimplement to return an actual integration widget. Use TQWidgets for that, not + TQDialogs because integrator dialogs are usually have parent containers.*/ + virtual TQWidget *self() = 0; +}; + +/** +The interface to VCS integrators. +VCS integrator takes care about setting up VCS for new and existing projects. +It can, for example, perform checkout or import operations. +*/ +class KDevVCSIntegrator: public TQObject { + Q_OBJECT + +public: + KDevVCSIntegrator(TQObject *parent = 0, const char *name = 0); + + /**Reimplement to return a dialog to fetch the project from VCS.*/ + virtual VCSDialog *fetcher(TQWidget *parent) = 0; + /**Reimplement to return a dialog to integrate the project into VCS.*/ + virtual VCSDialog *integrator(TQWidget *parent) = 0; +}; + +#endif diff --git a/lib/interfaces/extras/tdevcompileroptions.cpp b/lib/interfaces/extras/tdevcompileroptions.cpp deleted file mode 100644 index 9eead32f..00000000 --- a/lib/interfaces/extras/tdevcompileroptions.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "tdevcompileroptions.h" - -TDevCompilerOptions::TDevCompilerOptions( TQObject * parent, const char * name ) - :TQObject(parent, name) -{ -} - -#include "tdevcompileroptions.moc" diff --git a/lib/interfaces/extras/tdevcompileroptions.h b/lib/interfaces/extras/tdevcompileroptions.h deleted file mode 100644 index b8509a99..00000000 --- a/lib/interfaces/extras/tdevcompileroptions.h +++ /dev/null @@ -1,91 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 Roberto Raggi - - 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. -*/ - -/** -@file tdevcompileroptions.h -The interface to compiler options configuration. -*/ - -#ifndef _TDEVCOMPILEROPTIONS_H_ -#define _TDEVCOMPILEROPTIONS_H_ - -#include - -/** -The interface to compiler options configuration. -Used by build systems to give users a compiler options configuration dialog. - -Common use case: -@code -static TDevCompilerOptions *createCompilerOptions( const TQString &name, TQObject *parent ) -{ - KService::Ptr service = KService::serviceByDesktopName( name ); - if ( !service ) - return 0; - - KLibFactory *factory = KLibLoader::self()->factory(TQFile::encodeName(service->library())); - if (!factory) - return 0; - - TQStringList args; - TQVariant prop = service->property("X-TDevelop-Args"); - if (prop.isValid()) - args = TQStringList::split(" ", prop.toString()); - - TQObject *obj = factory->create(parent, service->name().latin1(), - "TDevCompilerOptions", args); - - if (!obj->inherits("TDevCompilerOptions")) - return 0; - - TDevCompilerOptions *dlg = (TDevCompilerOptions*) obj; - return dlg; -} - -... -TDevCompilerOptions *plugin = createCompilerOptions(compilerName, parent); -TQString flags = ""; //old compiler flags -if ( plugin ) -{ - flags = plugin->exec( parent, flags ); //new compiler flags are returned - delete plugin; -} -@endcode -*/ -class TDevCompilerOptions : public TQObject -{ - Q_OBJECT - - -public: - TDevCompilerOptions( TQObject *parent=0, const char *name=0 ); - - /** - * Opens a dialog which allows the user to configure the - * compiler options. The initial settings in the dialog - * will be set from the flags argument of this method. - * After the dialog is accepted, the new settings will - * be returned as a string. If the dialog was cancelled, - * TQString() is returned. - */ - virtual TQString exec(TQWidget *parent, const TQString &flags) = 0; -}; - -#endif diff --git a/lib/interfaces/extras/tdevvcsintegrator.cpp b/lib/interfaces/extras/tdevvcsintegrator.cpp deleted file mode 100644 index 26bf915d..00000000 --- a/lib/interfaces/extras/tdevvcsintegrator.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Alexander Dymo - - 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 "tdevvcsintegrator.h" - -TDevVCSIntegrator::TDevVCSIntegrator(TQObject *parent, const char *name) - :TQObject(parent, name) -{ -} - -#include "tdevvcsintegrator.moc" diff --git a/lib/interfaces/extras/tdevvcsintegrator.h b/lib/interfaces/extras/tdevvcsintegrator.h deleted file mode 100644 index 23ee6c22..00000000 --- a/lib/interfaces/extras/tdevvcsintegrator.h +++ /dev/null @@ -1,77 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Alexander Dymo - - 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 TDEVVCSINTEGRATOR_H -#define TDEVVCSINTEGRATOR_H - -#include - -/** -@file tdevvcsintegrator.h -The interface to VCS integrators. -*/ - -class TQDomDocument; -class TQWidget; - -/** -VCS Integration Dialog. - -Usually it is created as: -@code -class MyVCSDialog: public TQWidget, public VCSDialog { - MyVCSDialog(TQWidget *parent = 0, const char *name = 0); - virtual void accept() { ... } - virtual void init(const TQString &projectName, const TQString &projectLocation) { ... } - virtual TQWidget *self() { - return const_cast(this); - } -} -@endcode -*/ -class VCSDialog { -public: - VCSDialog() { } - /**Implement all integration actions here. Do not use TQDialog::accept method - to perform integration actions.*/ - virtual void accept() = 0; - /**Init integration dialog with the project name and location.*/ - virtual void init(const TQString &projectName, const TQString &projectLocation) = 0; - /**Reimplement to return an actual integration widget. Use TQWidgets for that, not - TQDialogs because integrator dialogs are usually have parent containers.*/ - virtual TQWidget *self() = 0; -}; - -/** -The interface to VCS integrators. -VCS integrator takes care about setting up VCS for new and existing projects. -It can, for example, perform checkout or import operations. -*/ -class TDevVCSIntegrator: public TQObject { - Q_OBJECT - -public: - TDevVCSIntegrator(TQObject *parent = 0, const char *name = 0); - - /**Reimplement to return a dialog to fetch the project from VCS.*/ - virtual VCSDialog *fetcher(TQWidget *parent) = 0; - /**Reimplement to return a dialog to integrate the project into VCS.*/ - virtual VCSDialog *integrator(TQWidget *parent) = 0; -}; - -#endif diff --git a/lib/interfaces/katedocumentmanagerinterface.cpp b/lib/interfaces/katedocumentmanagerinterface.cpp index 360be1c4..0afbcc81 100644 --- a/lib/interfaces/katedocumentmanagerinterface.cpp +++ b/lib/interfaces/katedocumentmanagerinterface.cpp @@ -17,7 +17,7 @@ Boston, MA 02110-1301, USA. */ #include "katedocumentmanagerinterface.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" #include #include #include @@ -26,7 +26,7 @@ #include #include -KateDocumentManagerInterface::KateDocumentManagerInterface( TDevPartController *pc) +KateDocumentManagerInterface::KateDocumentManagerInterface( KDevPartController *pc) : TQObject(pc), DCOPObject("KateDocumentManager"), m_controller(pc) { diff --git a/lib/interfaces/katedocumentmanagerinterface.h b/lib/interfaces/katedocumentmanagerinterface.h index 235c7738..8bdbdf8f 100644 --- a/lib/interfaces/katedocumentmanagerinterface.h +++ b/lib/interfaces/katedocumentmanagerinterface.h @@ -23,7 +23,7 @@ #include #include #include -class TDevPartController; +class KDevPartController; /** This is an emulated interface to provide compatibility with Kate scripts. @@ -36,7 +36,7 @@ class KateDocumentManagerInterface : public TQObject, public DCOPObject { // K_DCOP public: - KateDocumentManagerInterface( TDevPartController *pc ); + KateDocumentManagerInterface( KDevPartController *pc ); ~KateDocumentManagerInterface(); @@ -53,7 +53,7 @@ k_dcop: uint documents(); private: - TDevPartController *m_controller; + KDevPartController *m_controller; }; #endif diff --git a/lib/interfaces/kdevapi.cpp b/lib/interfaces/kdevapi.cpp new file mode 100644 index 00000000..04cf078d --- /dev/null +++ b/lib/interfaces/kdevapi.cpp @@ -0,0 +1,93 @@ +/* This file is part of the KDE project + Copyright (C) 2000-2001 Bernd Gehrmann + Copyright (C) 2004 Alexander Dymo + + 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 "kdevapi.h" + +#include "kdevcoderepository.h" + +/////////////////////////////////////////////////////////////////////////////// +// class KDevApi::Private +/////////////////////////////////////////////////////////////////////////////// + +class KDevApi::Private +{ +public: + Private() + : m_projectDom(0), m_project(0), m_languageSupport(0), + m_codeRepository(0) + {} + + TQDomDocument *m_projectDom; + KDevProject *m_project; + KDevLanguageSupport *m_languageSupport; + KDevCodeRepository* m_codeRepository; +}; + +/////////////////////////////////////////////////////////////////////////////// +// class KDevApi +/////////////////////////////////////////////////////////////////////////////// + +KDevApi::KDevApi() +{ + d = new KDevApi::Private; + d->m_codeRepository = new KDevCodeRepository(); +} + +KDevApi::~KDevApi() +{ + delete d->m_codeRepository; + delete d; +} + +KDevProject *KDevApi::project() const +{ + return d->m_project; +} + +void KDevApi::setProject(KDevProject *project) +{ + d->m_project = project; +} + +KDevLanguageSupport *KDevApi::languageSupport() const +{ + return d->m_languageSupport; +} + +void KDevApi::setLanguageSupport(KDevLanguageSupport *languageSupport) +{ + d->m_languageSupport = languageSupport; +} + +TQDomDocument *KDevApi::projectDom() const +{ + return d->m_projectDom; +} + +void KDevApi::setProjectDom(TQDomDocument *dom) +{ + d->m_projectDom = dom; +} + +KDevCodeRepository *KDevApi::codeRepository() const +{ + return d->m_codeRepository; +} + +#include "kdevapi.moc" diff --git a/lib/interfaces/kdevapi.h b/lib/interfaces/kdevapi.h new file mode 100644 index 00000000..d1f4f5cc --- /dev/null +++ b/lib/interfaces/kdevapi.h @@ -0,0 +1,104 @@ +/* This file is part of the KDE project + Copyright (C) 2000-2001 Bernd Gehrmann + Copyright (C) 2004 Alexander Dymo + + 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 KDEVAPI_H +#define KDEVAPI_H + +#include + +class TQStringList; +class TQDomDocument; +class KDevCore; +class KDevProject; +class KDevLanguageSupport; +class CodeModel; +class KDevPartController; +class KDevMainWindow; +class KDevCodeRepository; +class KDevPlugin; +class KDevPluginController; + +/** +@file kdevapi.h +KDevelop API interface. +*/ + +/** +The interface to KDevelop's core components. +Needs to be implemented in a shell. Developers do not need to use this +class because @ref KDevPlugin already provides API convenience methods. +*/ +class KDevApi: public TQObject +{ + Q_OBJECT + +public: + /**Constructor.*/ + KDevApi(); + + /**Destructor.*/ + virtual ~KDevApi(); + + /**@return A reference to the toplevel widget.*/ + virtual KDevMainWindow *mainWindow() const = 0; + + /**@return A reference to the part controller which is used to manipulate loaded KParts.*/ + virtual KDevPartController *partController() const = 0; + + /**@return A reference to the plugin controller which is used to manipulate loaded plugin.*/ + virtual KDevPluginController *pluginController() const = 0; + + /**@return A reference to the application core - an object which provides + basic functionalities for inter-parts communications / cooperation.*/ + virtual KDevCore *core() const = 0; + + /**@return A reference to the memory symbol store.*/ + virtual CodeModel *codeModel() const = 0; + + /**@return A reference to the DOM tree that represents the project file or 0 if no project is loaded.*/ + TQDomDocument *projectDom() const; + + /**Sets the Document Object Model for the current project. + @param dom The project DOM.*/ + void setProjectDom(TQDomDocument *dom); + + /**@return A reference to the current project component or 0 if no project is loaded.*/ + KDevProject *project() const; + + /**Sets the current project. + @param project The project plugin which becames the current project.*/ + void setProject(KDevProject *project); + + /**@return A reference to the language support component or 0 if no support available.*/ + KDevLanguageSupport *languageSupport() const; + + /**Sets the object charged of providing handling for the source files written in particular + language (languages support component). + @param languageSupport The language support plugin.*/ + void setLanguageSupport(KDevLanguageSupport *languageSupport); + + /**@return A reference to the code repository (accessor to persistent symbol stores).*/ + KDevCodeRepository *codeRepository() const; + +private: + class Private; + Private *d; +}; + +#endif diff --git a/lib/interfaces/kdevcoderepository.cpp b/lib/interfaces/kdevcoderepository.cpp new file mode 100644 index 00000000..26249544 --- /dev/null +++ b/lib/interfaces/kdevcoderepository.cpp @@ -0,0 +1,71 @@ +/* This file is part of the KDE project + Copyright (C) 2003 Roberto Raggi + + 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 "kdevcoderepository.h" + +struct KDevCodeRepositoryData +{ + Catalog* mainCatalog; + TQValueList catalogs; + + KDevCodeRepositoryData(): mainCatalog( 0 ) {} +}; + +KDevCodeRepository::KDevCodeRepository( ) + : d( new KDevCodeRepositoryData ) +{ +} + +KDevCodeRepository::~KDevCodeRepository( ) +{ + delete( d ); +} + +Catalog* KDevCodeRepository::mainCatalog() +{ + return d->mainCatalog; +} + +void KDevCodeRepository::setMainCatalog( Catalog * mainCatalog ) +{ + d->mainCatalog = mainCatalog; +} + +void KDevCodeRepository::registerCatalog( Catalog * catalog ) +{ + d->catalogs.append( catalog ); + emit catalogRegistered( catalog ); +} + +void KDevCodeRepository::unregisterCatalog( Catalog * catalog ) +{ + d->catalogs.remove( catalog ); + emit catalogUnregistered( catalog ); +} + +void KDevCodeRepository::touchCatalog( Catalog * catalog ) +{ + emit catalogChanged( catalog ); +} + +TQValueList< Catalog * > KDevCodeRepository::registeredCatalogs( ) +{ + return d->catalogs; +} + +#include "kdevcoderepository.moc" diff --git a/lib/interfaces/kdevcoderepository.h b/lib/interfaces/kdevcoderepository.h new file mode 100644 index 00000000..4e1dd765 --- /dev/null +++ b/lib/interfaces/kdevcoderepository.h @@ -0,0 +1,95 @@ +/* This file is part of the KDE project + Copyright (C) 2003 Roberto Raggi + + 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 KDEVCODEREPOSITORY_H +#define KDEVCODEREPOSITORY_H + +#include +#include + +/** +@file kdevcoderepository.h +Code repository - the persistent symbol store accessor. +*/ + +class KDevCodeRepositoryData; +class Catalog; + +/** +Code repository - the persistent symbol store accessor. +Symbols from parsed files can be saved to the persistent symbol store. +Persistence in this case means that symbol database is never loaded into memory +and works like a usual database which executes queries. + +Code repository consists from @ref Catalog objects that represent separate symbol +databases. Catalogs can be created/loaded/unloaded dynamically. +To find a symbol in the repository each catalog should be queried. + +Persistent symbol store is useful to keep information about code that +never or rarely changes. System libraries are perfect examples of such code. +Symbols from code contained in project files are better stored in memory +symbol store like @ref CodeModel. +*/ +class KDevCodeRepository : public TQObject +{ + Q_OBJECT + +public: + /**Constructor.*/ + KDevCodeRepository(); + /**Destructor.*/ + virtual ~KDevCodeRepository(); + + /**@return The main catalog. Each catalog can be marked is main + to provide easy access to it.*/ + Catalog* mainCatalog(); + /**Sets the main catalog. + @param mainCatalog The catalog to be marked as main.*/ + void setMainCatalog( Catalog* mainCatalog ); + + /**@return The list of registered catalogs.*/ + TQValueList registeredCatalogs(); + + /**Registers catalog in the repository. + @param catalog The catalog to register.*/ + void registerCatalog( Catalog* catalog ); + /**Unregisters catalog from the repository. + @param catalog The catalog to unregister.*/ + void unregisterCatalog( Catalog* catalog ); + /**Marks catalog as changed and emits @ref catalogChanged signal. + @param catalog The catalog to touch.*/ + void touchCatalog( Catalog* catalog ); + +signals: + /**Emitted when a new catalog is registered. + @param catalog The new catalog.*/ + void catalogRegistered( Catalog* catalog ); + + /**Emitted when a catalog in removed + @param catalog The catalog that was removed.*/ + void catalogUnregistered( Catalog* catalog ); + + /**Emitted when the contens of catalog is changed. + @param catalog Changed catalog.*/ + void catalogChanged( Catalog* catalog ); + +private: + KDevCodeRepositoryData* d; +}; + +#endif diff --git a/lib/interfaces/kdevcore.cpp b/lib/interfaces/kdevcore.cpp new file mode 100644 index 00000000..dda66cbf --- /dev/null +++ b/lib/interfaces/kdevcore.cpp @@ -0,0 +1,298 @@ +/* This file is part of the KDE project + Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2003 Mario Scalas + Copyright (C) 2003 Amilcar do Carmo Lucas + Copyright (C) 2003 Jens Dagerbo + Copyright (C) 2004 Alexander Dymo + + 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 "KDevCoreIface.h" +#include "kdevcore.h" + +#include "urlutil.h" + +/////////////////////////////////////////////////////////////////////////////// +// class Context +/////////////////////////////////////////////////////////////////////////////// + +Context::Context() +{ +} + +Context::~Context() +{ +} + +bool Context::hasType( int aType ) const +{ + return aType == this->type(); +} + +/////////////////////////////////////////////////////////////////////////////// +// class EditorContext +/////////////////////////////////////////////////////////////////////////////// + +class EditorContext::Private +{ +public: + Private( const KURL &url, int line, int col, const TQString &linestr, + const TQString &wordstr ) + : m_url(url), m_line(line), m_col(col), + m_linestr(linestr), m_wordstr(wordstr) + { + } + + KURL m_url; + int m_line, m_col; + TQString m_linestr, m_wordstr; +}; + +EditorContext::EditorContext( const KURL &url, int line, int col, + const TQString &linestr, const TQString &wordstr ) + : Context(), d( new Private(url, line, col, linestr, wordstr) ) +{ +} + +EditorContext::~EditorContext() +{ + delete d; + d = 0; +} + +int EditorContext::type() const +{ + return Context::EditorContext; +} + +const KURL &EditorContext::url() const +{ + return d->m_url; +} + +int EditorContext::line() const +{ + return d->m_line; +} + +int EditorContext::col() const +{ + return d->m_col; +} + +TQString EditorContext::currentLine() const +{ + return d->m_linestr; +} + +TQString EditorContext::currentWord() const +{ + return d->m_wordstr; +} + +/////////////////////////////////////////////////////////////////////////////// +// class FileContext +/////////////////////////////////////////////////////////////////////////////// + +class FileContext::Private +{ +public: + Private( const KURL::List &someURLs ) : m_urls(someURLs) + { + if (m_urls.count() == 0) + { + m_fileName = "INVALID-FILENAME"; + m_isDirectory = false; // well, "true" should be ok too ... + } + else + { + m_fileName = m_urls[0].path(); + m_isDirectory = URLUtil::isDirectory( m_urls[0] ); + } + } + Private( const TQString &fileName, bool isDirectory ) + : m_fileName(fileName), m_isDirectory(isDirectory) + { + } + + KURL::List m_urls; + /// \FIXME the following data members should be removed, but first other + // parts should be modified to comply with this change. + TQString m_fileName; + bool m_isDirectory; +}; + +FileContext::FileContext( const KURL::List &someURLs ) + : Context(), d( new Private(someURLs) ) +{ +} + +FileContext::~FileContext() +{ + delete d; + d = 0; +} + +int FileContext::type() const +{ + return Context::FileContext; +} + +const KURL::List &FileContext::urls() const +{ + return d->m_urls; +} + +/////////////////////////////////////////////////////////////////////////////// +// class DocumentationContext +/////////////////////////////////////////////////////////////////////////////// + +class DocumentationContext::Private +{ +public: + Private( const TQString &url, const TQString &selection ) + : m_url(url), m_selection(selection) + { + } + + TQString m_url; + TQString m_selection; +}; + +DocumentationContext::DocumentationContext( const TQString &url, const TQString &selection ) + : Context(), d( new Private(url, selection) ) +{ +} + +DocumentationContext::DocumentationContext( const DocumentationContext &aContext ) + : Context(), d( 0 ) +{ + *this = aContext; +} + +DocumentationContext &DocumentationContext::operator=( const DocumentationContext &aContext) +{ + if (d) { + delete d; d = 0; + } + d = new Private( *aContext.d ); + return *this; +} + +DocumentationContext::~DocumentationContext() +{ + delete d; + d = 0; +} + +int DocumentationContext::type() const +{ + return Context::DocumentationContext; +} + +TQString DocumentationContext::url() const +{ + return d->m_url; +} + +TQString DocumentationContext::selection() const +{ + return d->m_selection; +} + +/////////////////////////////////////////////////////////////////////////////// +// class CodeModelItemContext +/////////////////////////////////////////////////////////////////////////////// + +class CodeModelItemContext::Private +{ +public: + Private( const CodeModelItem* item ) : m_item( item ) {} + + const CodeModelItem* m_item; +}; + +CodeModelItemContext::CodeModelItemContext( const CodeModelItem* item ) + : Context(), d( new Private(item) ) +{ +} + +CodeModelItemContext::~CodeModelItemContext() +{ + delete d; + d = 0; +} + +int CodeModelItemContext::type() const +{ + return Context::CodeModelItemContext; +} + +const CodeModelItem* CodeModelItemContext::item() const +{ + return d->m_item; +} + +/////////////////////////////////////////////////////////////////////////////// +// class ProjectModelItemContext +/////////////////////////////////////////////////////////////////////////////// + +class ProjectModelItemContext::Private +{ +public: + Private( const ProjectModelItem* item ) : m_item( item ) {} + + const ProjectModelItem* m_item; +}; + +ProjectModelItemContext::ProjectModelItemContext( const ProjectModelItem* item ) + : Context(), d( new Private(item) ) +{ +} + +ProjectModelItemContext::~ProjectModelItemContext() +{ + delete d; + d = 0; +} + +int ProjectModelItemContext::type() const +{ + return Context::ProjectModelItemContext; +} + +const ProjectModelItem* ProjectModelItemContext::item() const +{ + return d->m_item; +} + + +/////////////////////////////////////////////////////////////////////////////// +// class KDevCore +/////////////////////////////////////////////////////////////////////////////// + +KDevCore::KDevCore( TQObject *parent, const char *name ) + : TQObject( parent, name ) +{ + new KDevCoreIface(this); +} + +KDevCore::~KDevCore() +{ +} + +#include "kdevcore.moc" diff --git a/lib/interfaces/kdevcore.h b/lib/interfaces/kdevcore.h new file mode 100644 index 00000000..fad2891a --- /dev/null +++ b/lib/interfaces/kdevcore.h @@ -0,0 +1,388 @@ +/* This file is part of the KDE project + Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2001-2002 Bernd Gehrmann + Copyright (C) 2001 Sandy Meier + Copyright (C) 2002 Daniel Engelschalt + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2003 Mario Scalas + Copyright (C) 2003 Harald Fernengel + Copyright (C) 2003 Hamish Rodda + Copyright (C) 2004 Alexander Dymo + + 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 KDEVCORE_H +#define KDEVCORE_H + +/** +@file kdevcore.h +The interface to the application core and context menu classes. +*/ + +#include +#include +#include + +#include + +class KDialogBase; +class KDevPlugin; +class CodeModelItem; +class ProjectModelItem; + +namespace KParts +{ + class Part; +} + +class TQStatusBar; +class TQPopupMenu; + +/** +Base class for every context. +Think of a Context-based class as "useful +info associated to a context menu". Several context menu can be defined, +each defining different information: because of these context menus being +used in many modules, they are defined here. + +When context menu with a certain "context" associated appears, KDevelop core +sends a notification signal and all plugins which receive this signal have +the ability to add own items into the menu. For example, VCS plugin could +add "commit" and "update" menu items to the context menu of a file. + +How to use context from a plugin: +-# Create a popup menu in context menu event handler: @code TDEPopupMenu menu(this); @endcode +-# Create a context: @code MyContext context(param). @endcode +-# Fill a context menu: @code core()->fillContextMenu(&menu, &context); @endcode +-# Show the popup menu: @code menu.exec(event->globalPos()); @endcode +. +In this example @em event is an object of TQContextMenuEvent class which you have access +to if you reimplement TQWidget::contextMenuEvent method. + +How to fill context menu from a plugin: +-# Create a @code contextMenu(TQPopupMenu *, const Context *) @endcode slot in your plugin class. +-# Connect KDevCore::contextMenu(TQPopupMenu *, const Context *) signal to that slot in +the constructor of your plugin:\n +@code +connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); +@endcode +-# Fill the menu in the slot you created, for example:\n +@code +if (context->hasType(Context::EditorContext)) +{ + const EditorContext *econtext = static_cast(context); + int id = popup->insertItem(i18n("My Menu Item 1"), this, TQT_SLOT(myMenuAction1())); + popup->setWhatsThis(id, i18n("What's this for my menu item 1")); +} +else if context->hasType(MyContext)) +{ + int id = popup->insertItem(... + ... +} +... +@endcode +*/ +class Context +{ +public: + /**Pre-defined context types. More may be added so it is possible to add custom + contexts. We reserve enum values until 1000 (yeah, it is one thousand ) + for tdevelop official context types.*/ + enum Type + { + EditorContext, /** + + 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 "kdevdesignerintegration.h" +#include "kdevdesignerintegrationiface.h" + +class KDevDesignerIntegration::KDevDesignerIntegrationPrivate { +public: + KDevDesignerIntegrationIface *m_iface; +}; + +KDevDesignerIntegration::KDevDesignerIntegration(TQObject *parent, const char *name) + : TQObject(parent, name) +{ + dptr = new KDevDesignerIntegrationPrivate(); + + dptr->m_iface = new KDevDesignerIntegrationIface(this); +} + +KDevDesignerIntegration::~KDevDesignerIntegration() +{ + delete dptr; +} + +#include "kdevdesignerintegration.moc" diff --git a/lib/interfaces/kdevdesignerintegration.h b/lib/interfaces/kdevdesignerintegration.h new file mode 100644 index 00000000..528926cb --- /dev/null +++ b/lib/interfaces/kdevdesignerintegration.h @@ -0,0 +1,98 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Alexander Dymo + + 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 KDEVDESIGNERINTEGRATION_H +#define KDEVDESIGNERINTEGRATION_H + +#include +#include +#include + +/** +@file kdevdesignerintegration.h +TDevelop designer integration interface. +*/ + +/** +TDevelop designer integration interface. +Designer integration object provides functionality which is used by integrated +into KDevelop GUI designers: +- adding/removing/editing functions (class methods); +- opening form implementation files; +- saving and loading designer integration settings. +. + +Designer integration is a layer between visual form (GUI) designer of any type +and the current language support. Usually designers create some kind of forms +and allow developers to define actions which are executed upon some GUI events +(for example, TQt Designer allows to define slots connected to GUI signals). +The actual code with action implementations needs to be written by hand in source +files. Designer integration captures such implementation requests and opens +necessary files at desired line numbers and adds (edits, removes) code for implementations. + +For example, TQt Designer integration should be able to create an subclass for a form +and reimplement slots defined in the form. +*/ +class KDevDesignerIntegration : public TQObject +{ +Q_OBJECT + +public: + /**Constructor. + @param parent Parent object. + @param name Internal name.*/ + KDevDesignerIntegration(TQObject *parent = 0, const char *name = 0); + /**Destructor.*/ + ~KDevDesignerIntegration(); + + /**Saves designer integration settings.*/ + virtual void saveSettings(TQDomDocument dom, TQString path) = 0; + /**Loads designer integration settings.*/ + virtual void loadSettings(TQDomDocument dom, TQString path) = 0; + +public slots: + /**Adds the implementation for a function. + @param formName The name of a GUI form. + @param function The function which needs to be implemented in the source.*/ + virtual void addFunction(const TQString &formName, KInterfaceDesigner::Function function) = 0; + + /**Removes the implementation of a function. + @param formName The name of a GUI form. + @param function The function which needs to be removed from the source.*/ + virtual void removeFunction(const TQString &formName, KInterfaceDesigner::Function function) = 0; + + /**Edites the implementation of a function. + @param formName The name of a GUI form. + @param oldFunction The function which needs to be edited from the source. + @param function The new function declaration.*/ + virtual void editFunction(const TQString &formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function) = 0; + + /**Opens the function and jumps to the line number of its definition (declaration). + @param formName The name of a GUI form. + @param functionName The name of a function to find in the source.*/ + virtual void openFunction(const TQString &formName, const TQString &functionName) = 0; + + /**Opens the form source. + @param formName The name of a GUI form.*/ + virtual void openSource(const TQString &formName) = 0; + private: + class KDevDesignerIntegrationPrivate; + KDevDesignerIntegrationPrivate *dptr; +}; + +#endif diff --git a/lib/interfaces/kdevdesignerintegrationiface.cpp b/lib/interfaces/kdevdesignerintegrationiface.cpp new file mode 100644 index 00000000..964ca340 --- /dev/null +++ b/lib/interfaces/kdevdesignerintegrationiface.cpp @@ -0,0 +1,63 @@ +/* This file is part of the KDE project + Copyright (C) 2005 Ian Reinhart Geiser + + 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 "kdevdesignerintegrationiface.h" +#include +#include "kdevdesignerintegration.h" + +KDevDesignerIntegrationIface::KDevDesignerIntegrationIface(KDevDesignerIntegration *p) + : DCOPObject("GUIDesigner"), m_designer(p) +{ + //FIXME figure out what number our interface is... +} + + +KDevDesignerIntegrationIface::~KDevDesignerIntegrationIface() +{ +} + +void KDevDesignerIntegrationIface::addFunction( const TQString & formName, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) +{ + KInterfaceDesigner::Function f = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; + m_designer->addFunction(formName, f); +} + +void KDevDesignerIntegrationIface::removeFunction( const TQString & formName, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) +{ + KInterfaceDesigner::Function f = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; + m_designer->addFunction(formName, f); +} + +void KDevDesignerIntegrationIface::editFunction( const TQString & formName, TQString oldReturnType, TQString oldFunction, TQString oldSpecifier, TQString oldAccess, uint oldType, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) +{ + KInterfaceDesigner::Function fold = {oldReturnType, oldFunction, oldSpecifier, oldAccess, (KInterfaceDesigner::FunctionType)oldType }; + KInterfaceDesigner::Function fnew = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; + m_designer->editFunction(formName,fold,fnew); +} + +void KDevDesignerIntegrationIface::openFunction( const TQString & formName, const TQString & functionName ) +{ + m_designer->openFunction(formName,functionName); +} + +void KDevDesignerIntegrationIface::openSource( const TQString & formName ) +{ + m_designer->openSource(formName); +} + + diff --git a/lib/interfaces/kdevdesignerintegrationiface.h b/lib/interfaces/kdevdesignerintegrationiface.h new file mode 100644 index 00000000..c6c8988a --- /dev/null +++ b/lib/interfaces/kdevdesignerintegrationiface.h @@ -0,0 +1,49 @@ +/* I am drunk. + Copyright (C) 2005 Ian Reinhart Geiser + + 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 KDEVDESIGNERINTEGRATIONIFACE_H +#define KDEVDESIGNERINTEGRATIONIFACE_H + +#include +class KDevDesignerIntegration; +/** +The dcop interface for GUI designers in KDevelop. + +@author KDevelop Authors +*/ +class KDevDesignerIntegrationIface : public DCOPObject +{ + K_DCOP +public: + KDevDesignerIntegrationIface(KDevDesignerIntegration *p); + + ~KDevDesignerIntegrationIface(); +k_dcop: + void addFunction(const TQString &formName, TQString returnType, TQString function,TQString specifier,TQString access,uint type); + void removeFunction(const TQString &formName, TQString returnType, TQString function,TQString specifier,TQString access,uint type); + void editFunction(const TQString &formName, TQString oldReturnType, TQString oldFunction, + TQString oldSpecifier,TQString oldAccess,uint oldType, + TQString returnType, TQString function,TQString specifier,TQString access,uint type); + void openFunction(const TQString &formName, const TQString &functionName); + void openSource(const TQString &formName); + + private: + KDevDesignerIntegration *m_designer; +}; + +#endif diff --git a/lib/interfaces/kdevgenericfactory.h b/lib/interfaces/kdevgenericfactory.h new file mode 100644 index 00000000..6f8d3dc9 --- /dev/null +++ b/lib/interfaces/kdevgenericfactory.h @@ -0,0 +1,91 @@ +/* This file is part of the KDE project + * Copyright (C) 2003 Harald Fernengel + * Copyright (C) 2004 Alexander Dymo + * + * 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 + +/** +@file kdevgenericfactory.h +KDevelop generic plugin factory. +*/ + +/** +This class provides a generic implementation of a KLibFactory for +use with TDevelop plugins. +Usually it is convenient to use K_EXPORT_COMPONENT_FACTORY macro +to create factories for TDevelop plugins. For example, for DummyPlugin +the factory can be created (in dummyplugin.cpp file) as: +@code +typedef KDevGenericFactory DummyPluginFactory; +K_EXPORT_COMPONENT_FACTORY(libkdevdummyplugin, DummyPluginFactory( data ) ) +@endcode +Data should be a const static object. This way it complies with the requirements +for data objecs of KDevGenericFactory constructor. + +Important:
    +There is no need to create @ref TDEAboutData objects. It is more useful to create +a static const @ref KDevPluginInfo object which can be used also in the constructor +of a plugin. + +For example, dummyplugin.cpp file could contain: +@code +#include + +static const KDevPluginInfo data("KDevDummyPlugin"); +typedef KDevGenericFactory DummyPluginFactory; +K_EXPORT_COMPONENT_FACTORY(libkdevdummyplugin, DummyPluginFactory( data ) ) + +DummyPlugin::DummyPlugin(TQObject *parent, const char *name, const TQStringList & ) + :KDevPlugin(&data, parent, name) +{ +} +@endcode + +In the example above the duplication of information is avoided as same @ref KDevPluginInfo +objects are used for plugin and for plugin factory. This is possible because @ref KDevPluginInfo +class has an operator to cast @ref KDevPluginInfo to @ref TDEAboutData. +*/ +template +class KDevGenericFactory: public KGenericFactory +{ +public: + /**Constructor. + @param data A reference to TDEAboutData with an information about the plugin. + Data should have: + - plugin name as an application name; + - untranslated plugin generic name as a product name; + - license type number. + . + data object should live as long as factory lives.*/ + KDevGenericFactory(TDEAboutData *data) + :KGenericFactory(data->appName()), aboutData(data) + { + } + + /**Creates an instance.*/ + TDEInstance *createInstance() + { + return new TDEInstance(aboutData); + } + +private: + TDEAboutData *aboutData; + +}; + diff --git a/lib/interfaces/kdevlanguagesupport.cpp b/lib/interfaces/kdevlanguagesupport.cpp new file mode 100644 index 00000000..aa5b560c --- /dev/null +++ b/lib/interfaces/kdevlanguagesupport.cpp @@ -0,0 +1,166 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001-2002 Bernd Gehrmann + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Alexander Dymo + Copyright (C) 2003 Amilcar do Carmo Lucas + + 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 "codemodel.h" + +#include + +#include "kdevdesignerintegration.h" +#include "kdevlanguagesupport.h" + +KDevLanguageSupport::KDevLanguageSupport(const KDevPluginInfo *info, TQObject *parent, const char *name) + : KDevPlugin(info, parent, name ? name : "KDevLanguageSupport" ) +{ +} + +KDevLanguageSupport::~KDevLanguageSupport() +{ +} + +KDevLanguageSupport::Features KDevLanguageSupport::features() +{ + return Features(0); +} + +KMimeType::List KDevLanguageSupport::mimeTypes() +{ + return KMimeType::List(); +} + +TQString KDevLanguageSupport::formatTag( const Tag& /*tag*/ ) +{ + return TQString(); +} + +TQString KDevLanguageSupport::formatClassName(const TQString &name) +{ + return name; +} + +TQString KDevLanguageSupport::unformatClassName(const TQString &name) +{ + return name; +} + +bool KDevLanguageSupport::shouldSplitDocument(const KURL &url) +{ + return false; +} + +Qt::Orientation KDevLanguageSupport::splitOrientation() const +{ + return Qt::Vertical; +} + +void KDevLanguageSupport::addClass() +{ +} + +void KDevLanguageSupport::addMethod( ClassDom /*klass*/ ) +{ +} + +void KDevLanguageSupport::implementVirtualMethods( ClassDom /*klass*/ ) +{ +} + +void KDevLanguageSupport::addAttribute( ClassDom /*klass*/ ) +{ +} + +TQStringList KDevLanguageSupport::subclassWidget(const TQString& /*formName*/) +{ + return TQStringList(); +} + +TQStringList KDevLanguageSupport::updateWidget(const TQString& /*formName*/, const TQString& /*fileName*/) +{ + return TQStringList(); +} + +TQString KDevLanguageSupport::formatModelItem( const CodeModelItem *item, bool /*shortDescription*/ ) +{ + return item->name(); +} + +void KDevLanguageSupport::addFunction( DesignerType type, const TQString & formName, Function function ) +{ +// kdDebug() << "KDevLanguageSupport::addFunction: 1" << endl; + KDevDesignerIntegration *designerIntegration = designer(type); +// kdDebug() << "KDevLanguageSupport::addFunction: 2" << endl; + if (!designerIntegration) + { +// kdDebug() << "KDevLanguageSupport::addFunction: x" << endl; + return; + } +// kdDebug() << "KDevLanguageSupport::addFunction: 3" << endl; + designerIntegration->addFunction(formName, function); +// kdDebug() << "KDevLanguageSupport::addFunction: 4" << endl; +} + +void KDevLanguageSupport::editFunction( DesignerType type, const TQString & formName, Function oldFunction, Function function ) +{ + KDevDesignerIntegration *designerIntegration = designer(type); + if (!designerIntegration) + return; + designerIntegration->editFunction(formName, oldFunction, function); +} + +void KDevLanguageSupport::removeFunction( DesignerType type, const TQString & formName, Function function ) +{ + KDevDesignerIntegration *designerIntegration = designer(type); + if (!designerIntegration) + return; + designerIntegration->removeFunction(formName, function); +} + +KDevDesignerIntegration * KDevLanguageSupport::designer( DesignerType // type + ) +{ + return 0; +} + +void KDevLanguageSupport::openFunction( DesignerType type, const TQString & formName, const TQString & functionName ) +{ + KDevDesignerIntegration *designerIntegration = designer(type); + if (!designerIntegration) + return; + designerIntegration->openFunction(formName, functionName); +} + +void KDevLanguageSupport::createAccessMethods( ClassDom // theClass + , VariableDom // theVariable + ) +{ +} + +void KDevLanguageSupport::openSource( DesignerType type, const TQString & formName) +{ + KDevDesignerIntegration *designerIntegration = designer(type); + if (!designerIntegration) + return; + designerIntegration->openSource(formName); +} + +#include "kdevlanguagesupport.moc" diff --git a/lib/interfaces/kdevlanguagesupport.h b/lib/interfaces/kdevlanguagesupport.h new file mode 100644 index 00000000..42221868 --- /dev/null +++ b/lib/interfaces/kdevlanguagesupport.h @@ -0,0 +1,261 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001-2002 Bernd Gehrmann + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Amilcar do Carmo Lucas + Copyright (C) 2003-2004 Alexander Dymo + + 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 KDEVLANGUAGESUPPORT_H +#define KDEVLANGUAGESUPPORT_H + +#include +#include +#include +#include "kdevplugin.h" +#include "codemodel.h" +#include + +/** +@file kdevlanguagesupport.h +Interface to programming language specific features. +*/ + +class Tag; +class KDevDesignerIntegration; + +using namespace KInterfaceDesigner; + +/** +KDevelop language support interface - the base class for all programming language support plugins. +Language support is used to load facilities specific to certain programming language. +Language supports are usually loaded among with a project. In this case project file defines +which language support to load. + +Language support plugin is a good place for: +- a language parser which fills memory and persistent symbol store +(see @ref CodeModel and @ref KDevCodeRepository); +- code wizards specific to a programming language (like new class wizard); +- GUI designer integration (see @ref KDevLanguageSupport::designer method +documentation and @ref KDevDesignerIntegration class documentation; +- symbol (class, function, etc.) name formatting to a human-readable convention (pretty +formatted name). +. +*/ +class KDevLanguageSupport: public KDevPlugin +{ + Q_OBJECT + + +public: + + /**Features supported by this language support.*/ + enum Features { + /*features of the language itself*/ + Classes=1 /**loadSettings(*project()->projectDom(), "kdevmylangsupport/designerintegration"); + saveDesignerToCache(type, des); + } + break; + } + return des; + @endcode + @ref ImplementationWidget and @ref TQtDesignerIntegration classes are available + from designerintegration support library. + @param type The type of the designer to integrate. + @return The pointer to designer integration of given type or 0.*/ + virtual KDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); + +public slots: + /**Adds a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param function The function to implement (add).*/ + void addFunction(DesignerType type, const TQString &formName, Function function); + + /**Removes a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param function The function to remove.*/ + void removeFunction(DesignerType type, const TQString &formName, Function function); + + /**Edits a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param oldFunction The old function signature before editing. + @param function The new function signature after editing.*/ + void editFunction(DesignerType type, const TQString &formName, Function oldFunction, Function function); + + /**Opens a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param functionName The name of a function to seek in the code for.*/ + void openFunction(DesignerType type, const TQString &formName, const TQString &functionName); + + /**Opens a form source requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form.*/ + void openSource(DesignerType type, const TQString &formName); + +signals: + /**Emitted when the content of the memory symbol store has been modified.*/ + void updatedSourceInfo(); + + /**Emitted before removing the file from the memory symbol store.*/ + void aboutToRemoveSourceInfo(const TQString& fileName); + + /**Emitted when a file has been removed from the memory symbol store.*/ + void removedSourceInfo(const TQString& fileName); + + /**Emitted when a file has been added to the memory symbol store.*/ + void addedSourceInfo( const TQString& fileName ); + + /**Emitted when the language part changes the Split View orientation.*/ + void splitOrientationChanged( Qt::Orientation orientation ); +}; + +#endif diff --git a/lib/interfaces/kdevmainwindow.cpp b/lib/interfaces/kdevmainwindow.cpp new file mode 100644 index 00000000..4b95f669 --- /dev/null +++ b/lib/interfaces/kdevmainwindow.cpp @@ -0,0 +1,28 @@ +/* This file is part of the KDE project + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 John Firebaugh + + 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 "kdevmainwindow.h" + +#include +#include + +KStatusBar *KDevMainWindow::statusBar() +{ + return main()->statusBar(); +} diff --git a/lib/interfaces/kdevmainwindow.h b/lib/interfaces/kdevmainwindow.h new file mode 100644 index 00000000..8138ab78 --- /dev/null +++ b/lib/interfaces/kdevmainwindow.h @@ -0,0 +1,101 @@ +/* This file is part of the KDE project + Copyright (C) 2003 F@lk Brettschneider + Copyright (C) 2003 John Firebaugh + Copyright (C) 2003 Amilcar do Carmo Lucas + Copyright (C) 2004 Alexander Dymo + + 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 KDEV_MAINWINDOW_H +#define KDEV_MAINWINDOW_H + +#include + +class TQWidget; +class KStatusBar; +class TDEMainWindow; + +/** +@file kdevmainwindow.h +KDevelop main window interface. +*/ + +/** +KDevelop main window interface. +Provides methods to control the main window of an application. +*/ +class KDevMainWindow +{ +public: + /**Destroys the main window*/ + virtual ~KDevMainWindow() {} // must be virtual! + + /**Embeds a view of a part into the main window. + @param view The view to embed. Must be a KPart. + @param title The title of a view. + @param toolTip The tooltip of a view.*/ + virtual void embedPartView(TQWidget *view, const TQString &title, const TQString& toolTip = TQString()) = 0; + + /**Embeds a toolview at the left of the main window. + @param view The view to embed. Must be a KPart. + @param title The title of a view. + @param toolTip The tooltip of a view.*/ + virtual void embedSelectView(TQWidget *view, const TQString &title, const TQString &toolTip) = 0; + + /**Embeds a toolview at the bottom of the main window. + @param view The view to embed. Must be a KPart. + @param title The title of a view. + @param toolTip The tooltip of a view.*/ + virtual void embedOutputView(TQWidget *view, const TQString &title, const TQString &toolTip) = 0; + + /**Embeds a toolview at the right of the main window. + @param view The view to embed. Must be a KPart. + @param title The title of a view. + @param toolTip The tooltip of a view.*/ + virtual void embedSelectViewRight(TQWidget* view, const TQString& title, const TQString &toolTip) = 0; + + /**Removes a view from the main window. + @param view The view to remove.*/ + virtual void removeView(TQWidget *view) = 0; + + /**Shows or hides a view. + @param pView The view to show or hide. + @param bEnabled true if view should be shown, false it it is not.*/ + virtual void setViewAvailable(TQWidget *pView, bool bEnabled) = 0; + + /**Raises a view (shows it if it was minimized). + @param view The view to be raised.*/ + virtual void raiseView(TQWidget *view) = 0; + + /**Minimize a view. + @param view The view to be lowered.*/ + virtual void lowerView(TQWidget *view) = 0; + + /**Loads main window settings.*/ + virtual void loadSettings() = 0; + + /**Sets the current document's caption, if applicable. + @param caption the caption to set.*/ + virtual void setCurrentDocumentCaption( const TQString &caption ) = 0; + + /**@return TDEMainWindow object which actually represents the main window.*/ + virtual TDEMainWindow *main() = 0; + + /**@return KStatusBar object which actually represents the status bar in the main window.*/ + KStatusBar *statusBar(); +}; + +#endif diff --git a/lib/interfaces/kdevpartcontroller.cpp b/lib/interfaces/kdevpartcontroller.cpp new file mode 100644 index 00000000..58f1dc2a --- /dev/null +++ b/lib/interfaces/kdevpartcontroller.cpp @@ -0,0 +1,30 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + + 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 "KDevPartControllerIface.h" +#include "kdevpartcontroller.h" +#include "katedocumentmanagerinterface.h" + +KDevPartController::KDevPartController(TQWidget *parent) + : KParts::PartManager(parent) +{ + new KDevPartControllerIface(this); + new KateDocumentManagerInterface(this); +} + +#include "kdevpartcontroller.moc" diff --git a/lib/interfaces/kdevpartcontroller.h b/lib/interfaces/kdevpartcontroller.h new file mode 100644 index 00000000..fd8e6830 --- /dev/null +++ b/lib/interfaces/kdevpartcontroller.h @@ -0,0 +1,176 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 Bernd Gehrmann + Copyright (C) 2003 Roberto Raggi + Copyright (C) 2003 Hamish Rodda + Copyright (C) 2003 Harald Fernengel + Copyright (C) 2003 Jens Dagerbo + Copyright (C) 2004 Alexander Dymo + + 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 KDEV_PARTCONTROLLER_H +#define KDEV_PARTCONTROLLER_H + +#include +#include +#include + +/** +@file kdevpartcontroller.h +KDevelop part controller interface. +*/ + +namespace KParts +{ + class ReadOnlyPart; +} + +/**Document state enum.*/ +enum DocumentState +{ + Clean, /** + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 Harald Fernengel + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Julian Rockey + Copyright (C) 2003 Roberto Raggi + Copyright (C) 2003 Jens Dagerbo + Copyright (C) 2003 Mario Scalas + Copyright (C) 2003-2004 Alexander Dymo + + 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 "kdevplugin.h" + +#include "kdevapi.h" +#include "kdevcore.h" +#include "kdevplugininfo.h" +#include "kdevpartcontroller.h" +#include "kdevplugincontroller.h" + +#include +#include +#include + +#include +#include + +#include + +/////////////////////////////////////////////////////////////////////////////// +// struct KDevPlugin::Private +/////////////////////////////////////////////////////////////////////////////// + +struct KDevPlugin::Private +{ + const KDevPluginInfo *info; +}; + +/////////////////////////////////////////////////////////////////////////////// +// class KDevPlugin +/////////////////////////////////////////////////////////////////////////////// + +KDevPlugin::KDevPlugin(const KDevPluginInfo *info, TQObject *parent, const char *name) + :TQObject(parent, name), d(new Private) +{ + assert(parent->inherits( "KDevApi" )); + m_api = static_cast( parent ); + + actionCollection()->setHighlightingEnabled( true ); + + d->info = info; + TDEGlobal::iconLoader()->addAppDir("tdevelop"); +} + +KDevPlugin::~KDevPlugin() +{ + delete( d ); +} + +KDevMainWindow *KDevPlugin::mainWindow() +{ + return m_api->mainWindow(); +} + +KDevCore *KDevPlugin::core() const +{ + return m_api->core(); +} + +KDevProject *KDevPlugin::project() const +{ + return m_api->project(); +} + +CodeModel *KDevPlugin::codeModel() const +{ + return m_api->codeModel(); +} + +TQDomDocument *KDevPlugin::projectDom() const +{ + return m_api->projectDom(); +} + +KDevLanguageSupport *KDevPlugin::languageSupport() const +{ + return m_api->languageSupport(); +} + +KDevPartController *KDevPlugin::partController() const +{ + return m_api->partController(); +} + +KDevPluginController *KDevPlugin::pluginController() const +{ + return m_api->pluginController(); +} + +void KDevPlugin::restorePartialProjectSession(const TQDomElement* /*el*/) +{ + // there's still nothing to do in the base class +} + +void KDevPlugin::savePartialProjectSession(TQDomElement* /*el*/) +{ + // there's still nothing to do in the base class +} + +KDevCodeRepository * KDevPlugin::codeRepository() const +{ + return m_api->codeRepository(); +} + +KDevPlugin * KDevPlugin::extension_internal(const TQString &serviceType, const TQString &constraint) +{ + return m_api->pluginController()->extension(serviceType, constraint); +} + +const KDevPluginInfo *KDevPlugin::info() +{ + return d->info; +} + +#include "kdevplugin.moc" diff --git a/lib/interfaces/kdevplugin.h b/lib/interfaces/kdevplugin.h new file mode 100644 index 00000000..31cc5550 --- /dev/null +++ b/lib/interfaces/kdevplugin.h @@ -0,0 +1,201 @@ +/* This file is part of the KDE project + Copyright (C) 1999-2001 Bernd Gehrmann + Copyright (C) 2004 Alexander Dymo + + 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 KDEVPLUGIN_H +#define KDEVPLUGIN_H + +#include +#include +#include "kdevapi.h" + +class KDevCore; +class KDevProject; +class KDevVersionControl; +class KDevLanguageSupport; +class KDevPartController; +class KDevMainWindow; +class KDevCodeRepository; +class CodeModel; +class KDevPluginInfo; +class TQDomElement; + +/** +@file kdevplugin.h +TDevelop plugin interface. +*/ + +/**Current TDevelop plugin interface version. Interfaces declare plugin version to make sure +old source (or binary) incompatible plugins are not loaded. Increase this if +it is necessary that old plugins stop working.*/ +#define TDEVELOP_PLUGIN_VERSION 5 + +/** +The base class for all TDevelop plugins. +Plugin is a component which is loaded into TDevelop shell at startup or by request. +Each plugin should have corresponding .desktop file with a description. +.desktop file template looks like: +@code +[Desktop Entry] +Encoding=UTF-8 +Type=Service +Name= +GenericName= +Comment= +Icon= +X-TDevelop-Plugin-Version= +X-TDevelop-Plugin-Homepage= +X-TDevelop-Plugin-BugsEmailAddress= +X-TDevelop-Plugin-Copyright= +X-TDE-Library= +X-TDevelop-Version= +X-TDevelop-Scope= +X-TDevelop-Properties= +X-TDevelop-Args= +@endcode +Description of parameters in .desktop file: +- Name is a non-translatable name of a plugin, it is used in TDETrader queries +to search for a plugin (required); +- GenericName is a translatable name of a plugin, it is used to show +plugin names in GUI (required); +- Comment is a short description about the plugin (optional); +- Icon is a plugin icon (preferred); +- X-TDevelop-Plugin-Version is a version of a plugin (optional); +- X-TDevelop-Plugin-Homepage is a home page of a plugin (optional); +- X-TDevelop-Plugin-License is a license (optional). can be: GPL, LGPL, BSD, Artistic, +TQPL or Custom. If this property is not set, license is considered as unknown; +- X-TDevelop-Plugin-BugsEmailAddress is an email address for bug reports (optional); +- X-TDevelop-Plugin-Copyright is a copyright statement (optional); +- X-TDE-Library is a name of library which contains the plugin (required); +- X-TDevelop-Version is a version of TDevelop interfaces which is supported by the plugin (required); +- X-TDevelop-Scope is a scope of a plugin (see below for explanation) (required); +- X-TDevelop-Args is a list of additional arguments passed to plugins constructor (optional); +- X-TDevelop-Properties is a list of properties which this plugin supports, see @ref Profile class documentation for explanation (required to work with shells that support profiles). +. +Plugin scope can be either: +- Core +- Global +- Project +. +Global plugins are plugins which require only shell to be loaded and do not operate on @ref KDevProject interface and/or do not use project wide information.\n +Core plugins are global plugins which offer some important "core" functionality and thus +are not selectable by user in plugin configuration pages.\n +Project plugins require a project to be loaded and are usually loaded/unloaded among with the project. +If your plugin use @ref KDevProject interface and/or operate on project-related information then this is the project plugin. + +@sa KDevGenericFactory class documentation for an information about plugin instantiation +and writing factories for plugins. + +@sa KDevCore class documentation for an information about features which are available to plugins +from shell applications. +*/ +class KDevPlugin: public TQObject, public KXMLGUIClient +{ + Q_OBJECT + + +public: + /**Constructs a plugin. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevPlugin(const KDevPluginInfo *info, TQObject *parent, const char *name = 0); + + /**Destructs a plugin.*/ + virtual ~KDevPlugin(); + + /**Provides an information about the plugin. + @return TDEAboutData object which was initialized in the constructor.*/ + const KDevPluginInfo* info(); + + /**@return A reference to the toplevel widget.*/ + KDevMainWindow *mainWindow(); + + /**@return A reference to the application core - an object which provides + basic functionalities for inter-parts communications / cooperation.*/ + KDevCore *core() const; + + /**@return A reference to the current project component or 0 if no project is loaded.*/ + KDevProject *project() const; + + /**@return A reference to the language support component or 0 if no support available.*/ + KDevLanguageSupport *languageSupport() const; + + /**@return A reference to the memory symbol store.*/ + CodeModel *codeModel() const; + + /**@return A reference to the DOM tree that represents the project file or 0 if no project is loaded.*/ + TQDomDocument *projectDom() const; + + /**@return A reference to the part controller which is used to manipulate loaded KParts.*/ + KDevPartController *partController() const; + + /**@return A reference to the plugin controller which is used to manipulate loaded plugin.*/ + virtual KDevPluginController *pluginController() const; + + /**@return A reference to the code repository (accessor to persistent symbol stores).*/ + KDevCodeRepository* codeRepository() const; + + /**Queries for the plugin which supports given service type (such plugins are called extensions in KDevelop). + All already loaded plugins will be queried and the first loaded one to support + the service type will be returned. Any plugin can be an extension, only "ServiceTypes=..." + entry is required in .desktop file for that plugin. + + Template argument is used as a type to cast the result to. This is done because extension + is usually derived from a certain base class and not directly from KDevPlugin. + @param serviceType The service type of an extension (like "TDevelop/SourceFormatter"). + @param constraint The constraint which is applied when quering for the service. This + constraint is a usual TDETrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'"). + @return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/ + template + Extension *extension(const TQString &serviceType, const TQString &constraint = "") + { + return static_cast(extension_internal(serviceType, constraint)); + } + + /**Override this base class method to restore any settings which differs from project to project. + Data can be read from a certain subtree of the project session file. + During project loading, respectively project session (.kdevses) loading, + this method will be called to give a chance to adapt the plugin to + the newly loaded project. For instance, the debugger plugin might restore the + list of breakpoints from the previous debug session for the certain project. + @note Take attention to the difference to common not-project-related session stuff. + They belong to the application rc file (tdeveloprc) + @note Project session file is useful for settings which cannot be shared between + developers. If a setting should be shared, modify projectDom instead. + @param el The parent DOM element for plugins session settings.*/ + virtual void restorePartialProjectSession(const TQDomElement* el); + + /**Saves session settings. + @sa restorePartialProjectSession - this is the other way round, the same just for saving.*/ + virtual void savePartialProjectSession(TQDomElement* el); + +private: + KDevPlugin *extension_internal(const TQString &serviceType, const TQString &constraint = ""); + + KDevApi *m_api; + class Private; + Private *d; +}; + +#endif diff --git a/lib/interfaces/kdevplugincontroller.cpp b/lib/interfaces/kdevplugincontroller.cpp new file mode 100644 index 00000000..1cc6caa3 --- /dev/null +++ b/lib/interfaces/kdevplugincontroller.cpp @@ -0,0 +1,49 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Alexander Dymo + + 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 "kdevplugincontroller.h" + +#include "kdevplugin.h" + +KDevPluginController::KDevPluginController() +{ +} + +TDETrader::OfferList KDevPluginController::query(const TQString &serviceType, + const TQString &constraint) +{ + return TDETrader::self()->query(serviceType, + TQString("%1 and [X-TDevelop-Version] == %2").arg(constraint).arg(TDEVELOP_PLUGIN_VERSION)); +} + +TDETrader::OfferList KDevPluginController::queryPlugins(const TQString &constraint) +{ + return query("TDevelop/Plugin", constraint); +} + +KURL::List KDevPluginController::profileResources(const TQString &/*nameFilter*/) +{ + return KURL::List(); +} + +KURL::List KDevPluginController::profileResourcesRecursive(const TQString &/*nameFilter*/) +{ + return KURL::List(); +} + +#include "kdevplugincontroller.moc" diff --git a/lib/interfaces/kdevplugincontroller.h b/lib/interfaces/kdevplugincontroller.h new file mode 100644 index 00000000..05ee050b --- /dev/null +++ b/lib/interfaces/kdevplugincontroller.h @@ -0,0 +1,119 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Alexander Dymo + + 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 KDEVPLUGINCONTROLLER_H +#define KDEVPLUGINCONTROLLER_H + +#include + +#include +#include + +/** +@file kdevplugincontroller.h +TDevelop plugin controller interface. +*/ + +class KDevPlugin; +class ProfileEngine; + +/** +The base class for TDevelop plugin controller. +Plugin controller is responsible for quering, loading and unloading available plugins. +*/ +class KDevPluginController: public TQObject +{ + Q_OBJECT + +public: + + /** + * Returns a uniquely specified plugin. If it isn't already loaded, it will be. + * Use with caution! See extension for parameter details. + */ + virtual KDevPlugin * loadPlugin( const TQString & serviceType, const TQString & constraint ) = 0; + + /** + * Unloads the plugin specified by @p plugin + * @param plugin The plugin desktopEntryName of the plugin to unload + */ + virtual void unloadPlugin( const TQString & plugin ) = 0; + + /**Unloads plugins specified by @p list. + @param list The list of plugin names to unload. plugin name corresponds + to the "Name" property in plugin .desktop file.*/ + virtual void unloadPlugins(TQStringList const &list) = 0; + + /**@return The list of currently loaded plugins.*/ + virtual const TQValueList loadedPlugins() = 0; + + /**Queries for the plugin which supports given service type. + All already loaded plugins will be queried and the first one to support the service type + will be returned. Any plugin can be an extension, only "ServiceTypes=..." entry is + required in .desktop file for that plugin. + @param serviceType The service type of an extension (like "TDevelop/SourceFormatter") + @param constraint The constraint which is applied when quering for the service. This + constraint is a usual TDETrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'"). + @return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/ + virtual KDevPlugin *extension(const TQString &serviceType, const TQString &constraint = "") = 0; + + /**Queries KDevelop services. Version is checked automatically + by adding proper X-TDevelop-Version=N statement into the query. + @param serviceType The service type to query, for example "TDevelop/Plugin" or + "TDevelop/SourceFormatter." + @param constraint A constraint for the service. Do not include plugin version number - it + is done automatically. + @return The list of plugin offers.*/ + static TDETrader::OfferList query(const TQString &serviceType, const TQString &constraint); + + /**Queries TDevelop plugins. Works like + KDevPluginController::query with serviceType set to "TDevelop/Plugin". + @param constraint A constraint for the service. Do not include plugin version number - it + is done automatically. + @return The list of plugin offers.*/ + static TDETrader::OfferList queryPlugins(const TQString &constraint); + + /**Reimplement this function only if your shell supports plugin profiles. + @return The list of URLs to the profile resources (files) with given @p extension. + @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation + for name filters syntax.*/ + virtual KURL::List profileResources(const TQString &nameFilter); + + /**Reimplement this function only if your shell supports plugin profiles. + @return The list of URLs to the resources (files) with given @p extension. + This list is obtained by a recursive search that process given profile + and all it's subprofiles. + @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation + for name filters syntax.*/ + virtual KURL::List profileResourcesRecursive(const TQString &nameFilter); + + /** @return The current Profile Engine */ + virtual ProfileEngine &engine() = 0; + +signals: + /**Emitted when a plugin profile was changed (reloaded, other profile opened, etc.). + Should work only on shells with plugin profiles support.*/ + void profileChanged(); + +protected: + /**Constructor.*/ + KDevPluginController(); + +}; + +#endif diff --git a/lib/interfaces/kdevplugininfo.cpp b/lib/interfaces/kdevplugininfo.cpp new file mode 100644 index 00000000..e80385cb --- /dev/null +++ b/lib/interfaces/kdevplugininfo.cpp @@ -0,0 +1,181 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Alexander Dymo + + 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 "kdevplugininfo.h" + +#include + +#include +#include + +#include "kdevplugincontroller.h" + +struct KDevPluginInfo::Private { + TQString m_pluginName; + TQString m_rawGenericName; + + TQString m_genericName; + TQString m_description; + TQString m_icon; + + TQString m_version; + int m_licenseType; + TQString m_copyrightStatement; + TQString m_homePageAddress; + TQString m_bugsEmailAddress; + + TQValueList m_authors; + TQValueList m_credits; + + TDEAboutData *m_data; +}; + + +KDevPluginInfo::KDevPluginInfo(const TQString &pluginName) + :d(new Private()) +{ + d->m_pluginName = pluginName; + + KService::Ptr offer = KService::serviceByDesktopName(pluginName); + if (offer != 0) + { + d->m_genericName = offer->genericName(); + d->m_icon = offer->icon(); + d->m_description = offer->comment(); + + d->m_rawGenericName = offer->untranslatedGenericName(); + + d->m_version = offer->property("X-TDevelop-Plugin-Version").toString(); + d->m_homePageAddress = offer->property("X-TDevelop-Plugin-Homepage").toString(); + d->m_bugsEmailAddress = offer->property("X-TDevelop-Plugin-BugsEmailAddress").toString(); + d->m_copyrightStatement = offer->property("X-TDevelop-Plugin-Copyright").toString(); + + TQString lic = offer->property("X-TDevelop-Plugin-License").toString(); + if (lic == "GPL") + d->m_licenseType = TDEAboutData::License_GPL; + else if (lic == "LGPL") + d->m_licenseType = TDEAboutData::License_LGPL; + else if (lic == "BSD") + d->m_licenseType = TDEAboutData::License_BSD; + else if (lic == "QPL") + d->m_licenseType = TDEAboutData::License_QPL; + else if (lic == "Artistic") + d->m_licenseType = TDEAboutData::License_Artistic; + else if (lic == "Custom") + d->m_licenseType = TDEAboutData::License_Custom; + else + d->m_licenseType = TDEAboutData::License_Unknown; + + d->m_data = new TDEAboutData(d->m_pluginName.ascii(), d->m_rawGenericName.ascii(), "1", 0, d->m_licenseType); + } + else + kdDebug() << "Unable to load information for plugin: " << pluginName + << ". Check if " << pluginName << ".desktop exists." << endl; +} + + +KDevPluginInfo::operator TDEAboutData *() const +{ + return d->m_data; +} + +TQString KDevPluginInfo::pluginName() const +{ + return d->m_pluginName; +} + +TQString KDevPluginInfo::genericName() const +{ + return d->m_genericName; +} + +TQString KDevPluginInfo::icon() const +{ + return d->m_icon; +} + +TQString KDevPluginInfo::description() const +{ + return d->m_description; +} + +TQString KDevPluginInfo::version() const +{ + return d->m_version; +} + +int KDevPluginInfo::licenseType() const +{ + return d->m_licenseType; +} + +TQString KDevPluginInfo::license() const +{ + KDevPluginInfo &info = *const_cast(this); +// return TDEAboutData(info).license(); + TDEAboutData *data = info; + return data->license(); +} + +TQString KDevPluginInfo::copyrightStatement() const +{ + return d->m_copyrightStatement; +} + +TQString KDevPluginInfo::homePageAddress() const +{ + return d->m_homePageAddress; +} + +TQString KDevPluginInfo::bugsEmailAddress() const +{ + return d->m_bugsEmailAddress; +} + +TQVariant KDevPluginInfo::property(const TQString &name) const +{ + TDETrader::OfferList offers = KDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName)); + if (offers.count() == 1) + return offers.first()->property(name); + return TQVariant(); +} + +TQVariant KDevPluginInfo::operator [](const TQString &name) const +{ + return property(name); +} + +TQStringList KDevPluginInfo::propertyNames( ) const +{ + TDETrader::OfferList offers = KDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName)); + if (offers.count() == 1) + return offers.first()->propertyNames(); + return TQStringList(); +} + +void KDevPluginInfo::addAuthor(const char *name, const char *task, + const char *emailAddress, const char *webAddress) +{ + d->m_authors.append(TDEAboutPerson(name, task, emailAddress, webAddress)); +} + +void KDevPluginInfo::addCredit(const char *name, const char *task, + const char *emailAddress, const char *webAddress) +{ + d->m_credits.append(TDEAboutPerson(name, task, emailAddress, webAddress)); +} diff --git a/lib/interfaces/kdevplugininfo.h b/lib/interfaces/kdevplugininfo.h new file mode 100644 index 00000000..ffd1c46e --- /dev/null +++ b/lib/interfaces/kdevplugininfo.h @@ -0,0 +1,111 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Alexander Dymo + + 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 KDEVPLUGININFO_H +#define KDEVPLUGININFO_H + +#include + +#include + +/** +@file kdevplugininfo.h +TDevelop plugin information container class. +*/ + +/** +Information about TDevelop plugin. +It uses plugin name to query plugin .desktop files and +retrieve most information. Names of authors and credits to other people +must be added manually using KDevPluginInfo::addAuthor and KDevPluginInfo::addCredit +methods. +@sa KDevPlugin class documentation for more information about .desktop files. +*/ +class KDevPluginInfo +{ +public: + /**Constructor. + @param pluginName A name of a plugin. Must be the same as the name of a .desktop file + and the same as the location of plugin resource files.*/ + KDevPluginInfo(const TQString &pluginName); + + /**Casts KDevPluginInfo to TDEAboutData. Uses KDevPluginInfo::pluginName as TDEAboutData::appName, + KDevPluginInfo::rawGenericName as TDEAboutData::programName KDevPluginInfo::licenseType as TDEAboutData::licenseType. Other parameters are ignored.*/ + operator TDEAboutData*() const; + + /**@return A name of a plugin (always untranslated).*/ + TQString pluginName() const; + /**@return A generic name of a plugin (translated). Use this in GUI. Information is taken from .desktop file.*/ + TQString genericName() const; + /**@return An icon name of a plugin. Information is taken from .desktop file.*/ + TQString icon() const; + /**@return A description of a plugin. Information is taken from .desktop file.*/ + TQString description() const; + /**@return A version of a plugin. Information is taken from .desktop file.*/ + TQString version() const; + /**@return A license type of a plugin. Information is taken from .desktop file.*/ + int licenseType() const; + /**@return A license text for known license types (GPL, LGPL, BSD, Artistic, TQPL).*/ + TQString license() const; + /**@return A copyright statement of a plugin. Information is taken from .desktop file.*/ + TQString copyrightStatement() const; + /**@return A home page of a plugin. Information is taken from .desktop file.*/ + TQString homePageAddress() const; + /**@return A email address for bugs of a plugin. Information is taken from .desktop file.*/ + TQString bugsEmailAddress() const; + + /**@param name The name of a property. + @return Any property value which exists in .desktop file.*/ + TQVariant property(const TQString &name) const; + /**@param name The name of a property. + @return Any property value which exists in .desktop file.*/ + TQVariant operator [] (const TQString &name) const; + /**@return A list of property names set in .desktop file.*/ + TQStringList propertyNames() const; + + /**@return A list of plugin authors.*/ + const TQValueList authors() const; + /**@return A list of other plugin contributors.*/ + const TQValueList credits() const; + + /**Adds an author to the list of authors. + You can call this function as many times you need. Each entry is appended to a list. + @param name The developer's name in UTF-8 encoding. + @param task What the person is responsible for. This text can contain newlines. It should be marked for translation like this: I18N_NOOP("Task description..."). Can be 0. + @param emailAddress An Email address where the person can be reached. Can be 0. + @param webAddress The person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is correct, "some.domain" is not. Can be 0.*/ + void addAuthor(const char *name, const char *task, + const char *emailAddress = 0, const char *webAddress = 0); + /**Adds a contributor to the list of contributors. + You can call this function as many times you need. Each entry is appended to a list. + @param name The developer's name in UTF-8 encoding. + @param task What the person is responsible for. This text can contain newlines. It should be marked for translation like this: I18N_NOOP("Task description..."). Can be 0. + @param emailAddress An Email address where the person can be reached. Can be 0. + @param webAddress The person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is correct, "some.domain" is not. Can be 0.*/ + void addCredit(const char *name, const char *task = 0, + const char *emailAddress = 0, const char *webAddress = 0); + +private: + /**Returns the untranslated generic name of a plugin as set in .desktop file.*/ + const char *rawGenericName() const; + + class Private; + Private *d; +}; + +#endif diff --git a/lib/interfaces/kdevproject.cpp b/lib/interfaces/kdevproject.cpp new file mode 100644 index 00000000..e8616df1 --- /dev/null +++ b/lib/interfaces/kdevproject.cpp @@ -0,0 +1,164 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2003 Jens Dagerbo + Copyright (C) 2003 Mario Scalas + Copyright (C) 2003-2004 Alexander Dymo + + 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 "kdevproject.h" +#include +#include +#include +#include "kdevprojectiface.h" + +struct KDevProject::Private { + TQMap m_absToRel; + TQStringList m_symlinkList; + TQTimer *m_timer; + KDevProjectIface *m_iface; +}; + +KDevProject::KDevProject(const KDevPluginInfo *info, TQObject *parent, const char *name) + : KDevPlugin(info, parent, name), d(new KDevProject::Private()) +{ + connect( this, TQT_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQT_SLOT(buildFileMap()) ); + connect( this, TQT_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQT_SLOT(buildFileMap()) ); + + connect( this, TQT_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQT_SLOT(slotAddFilesToFileMap(const TQStringList& )) ); + connect( this, TQT_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQT_SLOT(slotRemoveFilesFromFileMap(const TQStringList& )) ); + + d->m_timer = new TQTimer(this); + connect(d->m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotBuildFileMap())); + d->m_iface = new KDevProjectIface(this); +} + +KDevProject::~KDevProject() +{ + d->m_timer->stop(); + delete d->m_iface; + delete d->m_timer; + delete d; +} + +void KDevProject::changedFile( const TQString & fileName ) +{ + TQStringList fileList; + fileList.append ( fileName ); + + emit changedFilesInProject( fileList ); + +} + +void KDevProject::changedFiles( const TQStringList & fileList ) +{ + emit changedFilesInProject( fileList ); +} + +KDevProject::Options KDevProject::options() const +{ + return (KDevProject::Options)0; +} + +bool KDevProject::isProjectFile( const TQString & absFileName ) +{ + return d->m_absToRel.contains( absFileName ); +} + +TQString KDevProject::relativeProjectFile( const TQString & absFileName ) +{ + if( isProjectFile(absFileName) ) + return d->m_absToRel[ absFileName ]; + return TQString(); +} + +void KDevProject::buildFileMap() +{ + d->m_timer->stop(); + d->m_timer->start(0, true); +} + +void KDevProject::slotBuildFileMap() +{ + kdDebug(9000) << k_funcinfo << endl; + + d->m_absToRel.clear(); + d->m_symlinkList.clear(); + const TQStringList fileList = allFiles(); + for( TQStringList::ConstIterator it=fileList.begin(); it!=fileList.end(); ++it ) + { + TQFileInfo fileInfo( projectDirectory() + "/" + *it ); + d->m_absToRel[ URLUtil::canonicalPath(fileInfo.absFilePath()) ] = *it; + + if ( URLUtil::canonicalPath( fileInfo.absFilePath() ) != fileInfo.absFilePath() ) + { + d->m_symlinkList << *it; + } + } +} + +void KDevProject::openProject( const TQString & /*dirName*/, const TQString & /*projectName*/ ) +{ + buildFileMap(); +} + +TQStringList KDevProject::symlinkProjectFiles( ) +{ + return d->m_symlinkList; +} + +TQString KDevProject::defaultRunDirectory(const TQString& projectPluginName) const +{ + return DomUtil::readEntry(*projectDom(), "/" + projectPluginName + "/run/globalcwd"); +} + +void KDevProject::slotAddFilesToFileMap( const TQStringList & fileList ) +{ + TQStringList::ConstIterator it = fileList.begin(); + while( it != fileList.end() ) + { + TQFileInfo fileInfo( projectDirectory() + "/" + *it ); + d->m_absToRel[ URLUtil::canonicalPath(fileInfo.absFilePath()) ] = *it; + + if ( URLUtil::canonicalPath( fileInfo.absFilePath() ) != fileInfo.absFilePath() ) + { + d->m_symlinkList << *it; + } + + ++it; + } +} + +void KDevProject::slotRemoveFilesFromFileMap( const TQStringList & fileList ) +{ + TQStringList::ConstIterator it = fileList.begin(); + while( it != fileList.end() ) + { + TQFileInfo fileInfo( projectDirectory() + "/" + *it ); + d->m_absToRel.remove( URLUtil::canonicalPath(fileInfo.absFilePath()) ); + + d->m_symlinkList.remove( *it ); + + ++it; + } +} + +#include "kdevproject.moc" diff --git a/lib/interfaces/kdevproject.h b/lib/interfaces/kdevproject.h new file mode 100644 index 00000000..256b0c0c --- /dev/null +++ b/lib/interfaces/kdevproject.h @@ -0,0 +1,219 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001-2002 Bernd Gehrmann + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2003 Jens Dagerbo + Copyright (C) 2003 Mario Scalas + Copyright (C) 2003-2004 Alexander Dymo + + 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 KDEVPROJECT_H +#define KDEVPROJECT_H + +#include "kdevplugin.h" +#include "domutil.h" + +#include +#include + +/** +@file kdevproject.h +KDevelop project interface. +*/ + +class TQTimer; + +/** +KDevelop project interface. +Plugins implementing the KDevProject interfaces are used to manage projects. + +Project can be considered as a way of grouping files (in text editors) or +as a way of providing support for a build system (like it is done in TDevelop IDE buildtools). +*/ +class KDevProject: public KDevPlugin +{ + Q_OBJECT + +public: + /**Constructs a project plugin. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevProject(const KDevPluginInfo *info, TQObject *parent=0, const char *name=0); + /**Destructor.*/ + virtual ~KDevProject(); + + /**Options of the project plugin.*/ + enum Options { + UsesOtherBuildSystem = 0 /**/run/directoryradio == executable + * The directory where the executable is. + * if //run/directoryradio == build + * The build directory. + * if /kdevautoproject/run/directoryradio == custom + * The custom directory absolute path. + * Derived classes are supposed to explicitly call this implementation + */ + TQString defaultRunDirectory(const TQString& projectPluginName) const; + +private slots: + void buildFileMap(); + void slotBuildFileMap(); + void slotAddFilesToFileMap(const TQStringList & fileList ); + void slotRemoveFilesFromFileMap(const TQStringList & fileList ); + +signals: + /**Emitted when a new list of files has been added to the + project. Provided for convenience when many files were added. + @param fileList The file names relative to the project directory.*/ + void addedFilesToProject(const TQStringList& fileList); + + /**Emitted when a list of files has been removed from the project. + Provided for convenience when many files were removed. + @param fileList The file names relative to the project directory.*/ + void removedFilesFromProject(const TQStringList& fileList); + + /**Emitted when a list of files has changed in the project. + @param fileList The file names relative to the project directory.*/ + void changedFilesInProject(const TQStringList& fileList); + + /**Emitted when one compile related command (make, make install, make ...) ends sucessfuly. + Used to reparse the files after a sucessful compilation.*/ + void projectCompiled(); + + /**Emitted when the active directory of the project changes + * @param olddir The old active directory + * @param newdir The new active directory + */ + void activeDirectoryChanged( const TQString& olddir, const TQString& newdir ); + +private: + class Private; + Private *d; +}; + +#endif diff --git a/lib/interfaces/kdevprojectiface.cpp b/lib/interfaces/kdevprojectiface.cpp new file mode 100644 index 00000000..28d4501c --- /dev/null +++ b/lib/interfaces/kdevprojectiface.cpp @@ -0,0 +1,186 @@ + + +/* This file is part of the KDE project + Copyright (C) 2005 Ian Reinhart Geiser + + 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 "kdevprojectiface.h" +#include "kdevproject.h" +#include "domutil.h" + +KDevProjectIface::KDevProjectIface(KDevProject *prj) + : TQObject(prj), DCOPObject("KDevProject"), m_prj(prj) +{ +} + + +KDevProjectIface::~KDevProjectIface() +{ +} + +void KDevProjectIface::openProject( const TQString & dirName, const TQString & projectName ) +{ + m_prj->openProject(dirName,projectName); +} + +void KDevProjectIface::closeProject( ) +{ + m_prj->closeProject(); +} + +uint KDevProjectIface::options( ) const +{ + return (uint)m_prj->options(); +} + +TQString KDevProjectIface::projectDirectory( ) const +{ + return m_prj->projectDirectory(); +} + +TQString KDevProjectIface::projectName( ) const +{ + return m_prj->projectName(); +} + +TQString KDevProjectIface::mainProgram() const +{ + return m_prj->mainProgram(); +} + +TQString KDevProjectIface::runDirectory( ) const +{ + return m_prj->runDirectory(); +} + +TQString KDevProjectIface::activeDirectory( ) const +{ + return m_prj->activeDirectory(); +} + +TQString KDevProjectIface::buildDirectory( ) const +{ + return m_prj->buildDirectory(); +} + +TQStringList KDevProjectIface::allFiles( ) const +{ + return m_prj->allFiles(); +} + +TQStringList KDevProjectIface::distFiles( ) const +{ + return m_prj->distFiles(); +} + +void KDevProjectIface::addFiles( const TQStringList & fileList ) +{ + m_prj->addFiles(fileList); +} + +void KDevProjectIface::addFile( const TQString & fileName ) +{ + m_prj->addFile(fileName); +} + +void KDevProjectIface::removeFiles( const TQStringList & fileList ) +{ + m_prj->removeFiles(fileList); +} + +void KDevProjectIface::removeFile( const TQString & fileName ) +{ + m_prj->removeFile(fileName); +} + +void KDevProjectIface::changedFiles( const TQStringList & fileList ) +{ + m_prj->changedFiles(fileList); +} + +void KDevProjectIface::changedFile( const TQString & fileName ) +{ + m_prj->changedFile(fileName); +} + +bool KDevProjectIface::isProjectFile( const TQString & absFileName ) +{ + return m_prj->isProjectFile(absFileName); +} + +TQString KDevProjectIface::relativeProjectFile( const TQString & absFileName ) +{ + return m_prj->relativeProjectFile(absFileName); +} + +TQStringList KDevProjectIface::symlinkProjectFiles( ) +{ + return m_prj->symlinkProjectFiles(); +} + +TQString KDevProjectIface::readEntry( const TQString & path, const TQString & defaultEntry ) +{ + return DomUtil::readEntry( *m_prj->projectDom(), path, defaultEntry); +} + +int KDevProjectIface::readIntEntry( const TQString & path, int defaultEntry ) +{ + return DomUtil::readIntEntry(*m_prj->projectDom(), path,defaultEntry); +} + +bool KDevProjectIface::readBoolEntry( const TQString & path, bool defaultEntry ) +{ + return DomUtil::readBoolEntry(*m_prj->projectDom(), path, defaultEntry); +} + +TQStringList KDevProjectIface::readListEntry( const TQString & path, const TQString & tag ) +{ + return DomUtil::readListEntry(*m_prj->projectDom(), path, tag); +} + +TQMap< TQString, TQString > KDevProjectIface::readMapEntry( const TQString & path ) +{ + return DomUtil::readMapEntry(*m_prj->projectDom(), path); +} + +void KDevProjectIface::writeEntry( const TQString & path, const TQString & value ) +{ + DomUtil::writeEntry(*m_prj->projectDom(), path, value); +} + +void KDevProjectIface::writeIntEntry( const TQString & path, int value ) +{ + DomUtil::writeIntEntry(*m_prj->projectDom(), path, value); +} + +void KDevProjectIface::writeBoolEntry( const TQString & path, bool value ) +{ + DomUtil::writeBoolEntry(*m_prj->projectDom(), path, value); +} + +void KDevProjectIface::writeListEntry( const TQString & path, const TQString & tag, const TQStringList & value ) +{ + DomUtil::writeListEntry(*m_prj->projectDom(), path, tag, value); +} + +void KDevProjectIface::writeMapEntry( const TQString & path, const TQMap< TQString, TQString > & map ) +{ + DomUtil::writeMapEntry(*m_prj->projectDom(), path, map); +} + +#include "kdevprojectiface.moc" diff --git a/lib/interfaces/kdevprojectiface.h b/lib/interfaces/kdevprojectiface.h new file mode 100644 index 00000000..e30cd6cc --- /dev/null +++ b/lib/interfaces/kdevprojectiface.h @@ -0,0 +1,82 @@ +/* This file is part of the KDE project + Copyright (C) 2005 Ian Reinhart Geiser + + 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 KDEVPROJECTIFACE_H +#define KDEVPROJECTIFACE_H + +#include +#include +#include + +class KDevProject; + +/** +DCOP Interface for the @ref KDevProject object. + +@author KDevelop Authors +*/ +class KDevProjectIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP +public: + KDevProjectIface(KDevProject *prj); + + ~KDevProjectIface(); +k_dcop: + void openProject(const TQString &dirName, const TQString &projectName); + void closeProject(); + uint options() const; + TQString projectDirectory() const; + TQString projectName() const; + TQString mainProgram() const; + TQString runDirectory() const; + TQString activeDirectory() const; + TQString buildDirectory() const; + TQStringList allFiles() const; + TQStringList distFiles() const; + void addFiles(const TQStringList &fileList); + void addFile(const TQString &fileName); + void removeFiles(const TQStringList& fileList); + void removeFile(const TQString &fileName); + void changedFiles(const TQStringList &fileList); + void changedFile(const TQString &fileName); + bool isProjectFile(const TQString &absFileName); + TQString relativeProjectFile(const TQString &absFileName); + TQStringList symlinkProjectFiles(); + + // Project DOM access + TQString readEntry(const TQString &path, const TQString &defaultEntry = TQString()); + int readIntEntry(const TQString &path, int defaultEntry = 0); + bool readBoolEntry(const TQString &path, bool defaultEntry = false); + TQStringList readListEntry(const TQString &path, const TQString &tag); + TQMap readMapEntry(const TQString &path); + + void writeEntry(const TQString &path, const TQString &value); + void writeIntEntry(const TQString &path, int value); + void writeBoolEntry( const TQString &path, bool value); + void writeListEntry(const TQString &path, const TQString &tag, const TQStringList &value); + void writeMapEntry(const TQString& path, const TQMap &map); + + private: + KDevProject *m_prj; +}; + +#endif diff --git a/lib/interfaces/tdevapi.cpp b/lib/interfaces/tdevapi.cpp deleted file mode 100644 index 4f726107..00000000 --- a/lib/interfaces/tdevapi.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000-2001 Bernd Gehrmann - Copyright (C) 2004 Alexander Dymo - - 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 "tdevapi.h" - -#include "tdevcoderepository.h" - -/////////////////////////////////////////////////////////////////////////////// -// class TDevApi::Private -/////////////////////////////////////////////////////////////////////////////// - -class TDevApi::Private -{ -public: - Private() - : m_projectDom(0), m_project(0), m_languageSupport(0), - m_codeRepository(0) - {} - - TQDomDocument *m_projectDom; - TDevProject *m_project; - TDevLanguageSupport *m_languageSupport; - TDevCodeRepository* m_codeRepository; -}; - -/////////////////////////////////////////////////////////////////////////////// -// class TDevApi -/////////////////////////////////////////////////////////////////////////////// - -TDevApi::TDevApi() -{ - d = new TDevApi::Private; - d->m_codeRepository = new TDevCodeRepository(); -} - -TDevApi::~TDevApi() -{ - delete d->m_codeRepository; - delete d; -} - -TDevProject *TDevApi::project() const -{ - return d->m_project; -} - -void TDevApi::setProject(TDevProject *project) -{ - d->m_project = project; -} - -TDevLanguageSupport *TDevApi::languageSupport() const -{ - return d->m_languageSupport; -} - -void TDevApi::setLanguageSupport(TDevLanguageSupport *languageSupport) -{ - d->m_languageSupport = languageSupport; -} - -TQDomDocument *TDevApi::projectDom() const -{ - return d->m_projectDom; -} - -void TDevApi::setProjectDom(TQDomDocument *dom) -{ - d->m_projectDom = dom; -} - -TDevCodeRepository *TDevApi::codeRepository() const -{ - return d->m_codeRepository; -} - -#include "tdevapi.moc" diff --git a/lib/interfaces/tdevapi.h b/lib/interfaces/tdevapi.h deleted file mode 100644 index a2e38f7c..00000000 --- a/lib/interfaces/tdevapi.h +++ /dev/null @@ -1,104 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000-2001 Bernd Gehrmann - Copyright (C) 2004 Alexander Dymo - - 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 TDEVAPI_H -#define TDEVAPI_H - -#include - -class TQStringList; -class TQDomDocument; -class TDevCore; -class TDevProject; -class TDevLanguageSupport; -class CodeModel; -class TDevPartController; -class TDevMainWindow; -class TDevCodeRepository; -class TDevPlugin; -class TDevPluginController; - -/** -@file tdevapi.h -KDevelop API interface. -*/ - -/** -The interface to KDevelop's core components. -Needs to be implemented in a shell. Developers do not need to use this -class because @ref TDevPlugin already provides API convenience methods. -*/ -class TDevApi: public TQObject -{ - Q_OBJECT - -public: - /**Constructor.*/ - TDevApi(); - - /**Destructor.*/ - virtual ~TDevApi(); - - /**@return A reference to the toplevel widget.*/ - virtual TDevMainWindow *mainWindow() const = 0; - - /**@return A reference to the part controller which is used to manipulate loaded KParts.*/ - virtual TDevPartController *partController() const = 0; - - /**@return A reference to the plugin controller which is used to manipulate loaded plugin.*/ - virtual TDevPluginController *pluginController() const = 0; - - /**@return A reference to the application core - an object which provides - basic functionalities for inter-parts communications / cooperation.*/ - virtual TDevCore *core() const = 0; - - /**@return A reference to the memory symbol store.*/ - virtual CodeModel *codeModel() const = 0; - - /**@return A reference to the DOM tree that represents the project file or 0 if no project is loaded.*/ - TQDomDocument *projectDom() const; - - /**Sets the Document Object Model for the current project. - @param dom The project DOM.*/ - void setProjectDom(TQDomDocument *dom); - - /**@return A reference to the current project component or 0 if no project is loaded.*/ - TDevProject *project() const; - - /**Sets the current project. - @param project The project plugin which becames the current project.*/ - void setProject(TDevProject *project); - - /**@return A reference to the language support component or 0 if no support available.*/ - TDevLanguageSupport *languageSupport() const; - - /**Sets the object charged of providing handling for the source files written in particular - language (languages support component). - @param languageSupport The language support plugin.*/ - void setLanguageSupport(TDevLanguageSupport *languageSupport); - - /**@return A reference to the code repository (accessor to persistent symbol stores).*/ - TDevCodeRepository *codeRepository() const; - -private: - class Private; - Private *d; -}; - -#endif diff --git a/lib/interfaces/tdevcoderepository.cpp b/lib/interfaces/tdevcoderepository.cpp deleted file mode 100644 index f5716294..00000000 --- a/lib/interfaces/tdevcoderepository.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003 Roberto Raggi - - 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 "tdevcoderepository.h" - -struct TDevCodeRepositoryData -{ - Catalog* mainCatalog; - TQValueList catalogs; - - TDevCodeRepositoryData(): mainCatalog( 0 ) {} -}; - -TDevCodeRepository::TDevCodeRepository( ) - : d( new TDevCodeRepositoryData ) -{ -} - -TDevCodeRepository::~TDevCodeRepository( ) -{ - delete( d ); -} - -Catalog* TDevCodeRepository::mainCatalog() -{ - return d->mainCatalog; -} - -void TDevCodeRepository::setMainCatalog( Catalog * mainCatalog ) -{ - d->mainCatalog = mainCatalog; -} - -void TDevCodeRepository::registerCatalog( Catalog * catalog ) -{ - d->catalogs.append( catalog ); - emit catalogRegistered( catalog ); -} - -void TDevCodeRepository::unregisterCatalog( Catalog * catalog ) -{ - d->catalogs.remove( catalog ); - emit catalogUnregistered( catalog ); -} - -void TDevCodeRepository::touchCatalog( Catalog * catalog ) -{ - emit catalogChanged( catalog ); -} - -TQValueList< Catalog * > TDevCodeRepository::registeredCatalogs( ) -{ - return d->catalogs; -} - -#include "tdevcoderepository.moc" diff --git a/lib/interfaces/tdevcoderepository.h b/lib/interfaces/tdevcoderepository.h deleted file mode 100644 index b87d66e8..00000000 --- a/lib/interfaces/tdevcoderepository.h +++ /dev/null @@ -1,95 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003 Roberto Raggi - - 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 TDEVCODEREPOSITORY_H -#define TDEVCODEREPOSITORY_H - -#include -#include - -/** -@file tdevcoderepository.h -Code repository - the persistent symbol store accessor. -*/ - -class TDevCodeRepositoryData; -class Catalog; - -/** -Code repository - the persistent symbol store accessor. -Symbols from parsed files can be saved to the persistent symbol store. -Persistence in this case means that symbol database is never loaded into memory -and works like a usual database which executes queries. - -Code repository consists from @ref Catalog objects that represent separate symbol -databases. Catalogs can be created/loaded/unloaded dynamically. -To find a symbol in the repository each catalog should be queried. - -Persistent symbol store is useful to keep information about code that -never or rarely changes. System libraries are perfect examples of such code. -Symbols from code contained in project files are better stored in memory -symbol store like @ref CodeModel. -*/ -class TDevCodeRepository : public TQObject -{ - Q_OBJECT - -public: - /**Constructor.*/ - TDevCodeRepository(); - /**Destructor.*/ - virtual ~TDevCodeRepository(); - - /**@return The main catalog. Each catalog can be marked is main - to provide easy access to it.*/ - Catalog* mainCatalog(); - /**Sets the main catalog. - @param mainCatalog The catalog to be marked as main.*/ - void setMainCatalog( Catalog* mainCatalog ); - - /**@return The list of registered catalogs.*/ - TQValueList registeredCatalogs(); - - /**Registers catalog in the repository. - @param catalog The catalog to register.*/ - void registerCatalog( Catalog* catalog ); - /**Unregisters catalog from the repository. - @param catalog The catalog to unregister.*/ - void unregisterCatalog( Catalog* catalog ); - /**Marks catalog as changed and emits @ref catalogChanged signal. - @param catalog The catalog to touch.*/ - void touchCatalog( Catalog* catalog ); - -signals: - /**Emitted when a new catalog is registered. - @param catalog The new catalog.*/ - void catalogRegistered( Catalog* catalog ); - - /**Emitted when a catalog in removed - @param catalog The catalog that was removed.*/ - void catalogUnregistered( Catalog* catalog ); - - /**Emitted when the contens of catalog is changed. - @param catalog Changed catalog.*/ - void catalogChanged( Catalog* catalog ); - -private: - TDevCodeRepositoryData* d; -}; - -#endif diff --git a/lib/interfaces/tdevcore.cpp b/lib/interfaces/tdevcore.cpp deleted file mode 100644 index 726bf2cb..00000000 --- a/lib/interfaces/tdevcore.cpp +++ /dev/null @@ -1,298 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2003 Mario Scalas - Copyright (C) 2003 Amilcar do Carmo Lucas - Copyright (C) 2003 Jens Dagerbo - Copyright (C) 2004 Alexander Dymo - - 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 "TDevCoreIface.h" -#include "tdevcore.h" - -#include "urlutil.h" - -/////////////////////////////////////////////////////////////////////////////// -// class Context -/////////////////////////////////////////////////////////////////////////////// - -Context::Context() -{ -} - -Context::~Context() -{ -} - -bool Context::hasType( int aType ) const -{ - return aType == this->type(); -} - -/////////////////////////////////////////////////////////////////////////////// -// class EditorContext -/////////////////////////////////////////////////////////////////////////////// - -class EditorContext::Private -{ -public: - Private( const KURL &url, int line, int col, const TQString &linestr, - const TQString &wordstr ) - : m_url(url), m_line(line), m_col(col), - m_linestr(linestr), m_wordstr(wordstr) - { - } - - KURL m_url; - int m_line, m_col; - TQString m_linestr, m_wordstr; -}; - -EditorContext::EditorContext( const KURL &url, int line, int col, - const TQString &linestr, const TQString &wordstr ) - : Context(), d( new Private(url, line, col, linestr, wordstr) ) -{ -} - -EditorContext::~EditorContext() -{ - delete d; - d = 0; -} - -int EditorContext::type() const -{ - return Context::EditorContext; -} - -const KURL &EditorContext::url() const -{ - return d->m_url; -} - -int EditorContext::line() const -{ - return d->m_line; -} - -int EditorContext::col() const -{ - return d->m_col; -} - -TQString EditorContext::currentLine() const -{ - return d->m_linestr; -} - -TQString EditorContext::currentWord() const -{ - return d->m_wordstr; -} - -/////////////////////////////////////////////////////////////////////////////// -// class FileContext -/////////////////////////////////////////////////////////////////////////////// - -class FileContext::Private -{ -public: - Private( const KURL::List &someURLs ) : m_urls(someURLs) - { - if (m_urls.count() == 0) - { - m_fileName = "INVALID-FILENAME"; - m_isDirectory = false; // well, "true" should be ok too ... - } - else - { - m_fileName = m_urls[0].path(); - m_isDirectory = URLUtil::isDirectory( m_urls[0] ); - } - } - Private( const TQString &fileName, bool isDirectory ) - : m_fileName(fileName), m_isDirectory(isDirectory) - { - } - - KURL::List m_urls; - /// \FIXME the following data members should be removed, but first other - // parts should be modified to comply with this change. - TQString m_fileName; - bool m_isDirectory; -}; - -FileContext::FileContext( const KURL::List &someURLs ) - : Context(), d( new Private(someURLs) ) -{ -} - -FileContext::~FileContext() -{ - delete d; - d = 0; -} - -int FileContext::type() const -{ - return Context::FileContext; -} - -const KURL::List &FileContext::urls() const -{ - return d->m_urls; -} - -/////////////////////////////////////////////////////////////////////////////// -// class DocumentationContext -/////////////////////////////////////////////////////////////////////////////// - -class DocumentationContext::Private -{ -public: - Private( const TQString &url, const TQString &selection ) - : m_url(url), m_selection(selection) - { - } - - TQString m_url; - TQString m_selection; -}; - -DocumentationContext::DocumentationContext( const TQString &url, const TQString &selection ) - : Context(), d( new Private(url, selection) ) -{ -} - -DocumentationContext::DocumentationContext( const DocumentationContext &aContext ) - : Context(), d( 0 ) -{ - *this = aContext; -} - -DocumentationContext &DocumentationContext::operator=( const DocumentationContext &aContext) -{ - if (d) { - delete d; d = 0; - } - d = new Private( *aContext.d ); - return *this; -} - -DocumentationContext::~DocumentationContext() -{ - delete d; - d = 0; -} - -int DocumentationContext::type() const -{ - return Context::DocumentationContext; -} - -TQString DocumentationContext::url() const -{ - return d->m_url; -} - -TQString DocumentationContext::selection() const -{ - return d->m_selection; -} - -/////////////////////////////////////////////////////////////////////////////// -// class CodeModelItemContext -/////////////////////////////////////////////////////////////////////////////// - -class CodeModelItemContext::Private -{ -public: - Private( const CodeModelItem* item ) : m_item( item ) {} - - const CodeModelItem* m_item; -}; - -CodeModelItemContext::CodeModelItemContext( const CodeModelItem* item ) - : Context(), d( new Private(item) ) -{ -} - -CodeModelItemContext::~CodeModelItemContext() -{ - delete d; - d = 0; -} - -int CodeModelItemContext::type() const -{ - return Context::CodeModelItemContext; -} - -const CodeModelItem* CodeModelItemContext::item() const -{ - return d->m_item; -} - -/////////////////////////////////////////////////////////////////////////////// -// class ProjectModelItemContext -/////////////////////////////////////////////////////////////////////////////// - -class ProjectModelItemContext::Private -{ -public: - Private( const ProjectModelItem* item ) : m_item( item ) {} - - const ProjectModelItem* m_item; -}; - -ProjectModelItemContext::ProjectModelItemContext( const ProjectModelItem* item ) - : Context(), d( new Private(item) ) -{ -} - -ProjectModelItemContext::~ProjectModelItemContext() -{ - delete d; - d = 0; -} - -int ProjectModelItemContext::type() const -{ - return Context::ProjectModelItemContext; -} - -const ProjectModelItem* ProjectModelItemContext::item() const -{ - return d->m_item; -} - - -/////////////////////////////////////////////////////////////////////////////// -// class TDevCore -/////////////////////////////////////////////////////////////////////////////// - -TDevCore::TDevCore( TQObject *parent, const char *name ) - : TQObject( parent, name ) -{ - new TDevCoreIface(this); -} - -TDevCore::~TDevCore() -{ -} - -#include "tdevcore.moc" diff --git a/lib/interfaces/tdevcore.h b/lib/interfaces/tdevcore.h deleted file mode 100644 index fadcdfde..00000000 --- a/lib/interfaces/tdevcore.h +++ /dev/null @@ -1,388 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2001-2002 Bernd Gehrmann - Copyright (C) 2001 Sandy Meier - Copyright (C) 2002 Daniel Engelschalt - Copyright (C) 2002 Simon Hausmann - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2003 Mario Scalas - Copyright (C) 2003 Harald Fernengel - Copyright (C) 2003 Hamish Rodda - Copyright (C) 2004 Alexander Dymo - - 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 TDEVCORE_H -#define TDEVCORE_H - -/** -@file tdevcore.h -The interface to the application core and context menu classes. -*/ - -#include -#include -#include - -#include - -class KDialogBase; -class TDevPlugin; -class CodeModelItem; -class ProjectModelItem; - -namespace KParts -{ - class Part; -} - -class TQStatusBar; -class TQPopupMenu; - -/** -Base class for every context. -Think of a Context-based class as "useful -info associated to a context menu". Several context menu can be defined, -each defining different information: because of these context menus being -used in many modules, they are defined here. - -When context menu with a certain "context" associated appears, KDevelop core -sends a notification signal and all plugins which receive this signal have -the ability to add own items into the menu. For example, VCS plugin could -add "commit" and "update" menu items to the context menu of a file. - -How to use context from a plugin: --# Create a popup menu in context menu event handler: @code TDEPopupMenu menu(this); @endcode --# Create a context: @code MyContext context(param). @endcode --# Fill a context menu: @code core()->fillContextMenu(&menu, &context); @endcode --# Show the popup menu: @code menu.exec(event->globalPos()); @endcode -. -In this example @em event is an object of TQContextMenuEvent class which you have access -to if you reimplement TQWidget::contextMenuEvent method. - -How to fill context menu from a plugin: --# Create a @code contextMenu(TQPopupMenu *, const Context *) @endcode slot in your plugin class. --# Connect TDevCore::contextMenu(TQPopupMenu *, const Context *) signal to that slot in -the constructor of your plugin:\n -@code -connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), - this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); -@endcode --# Fill the menu in the slot you created, for example:\n -@code -if (context->hasType(Context::EditorContext)) -{ - const EditorContext *econtext = static_cast(context); - int id = popup->insertItem(i18n("My Menu Item 1"), this, TQT_SLOT(myMenuAction1())); - popup->setWhatsThis(id, i18n("What's this for my menu item 1")); -} -else if context->hasType(MyContext)) -{ - int id = popup->insertItem(... - ... -} -... -@endcode -*/ -class Context -{ -public: - /**Pre-defined context types. More may be added so it is possible to add custom - contexts. We reserve enum values until 1000 (yeah, it is one thousand ) - for tdevelop official context types.*/ - enum Type - { - EditorContext, /** - - 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 "tdevdesignerintegration.h" -#include "tdevdesignerintegrationiface.h" - -class TDevDesignerIntegration::TDevDesignerIntegrationPrivate { -public: - TDevDesignerIntegrationIface *m_iface; -}; - -TDevDesignerIntegration::TDevDesignerIntegration(TQObject *parent, const char *name) - : TQObject(parent, name) -{ - dptr = new TDevDesignerIntegrationPrivate(); - - dptr->m_iface = new TDevDesignerIntegrationIface(this); -} - -TDevDesignerIntegration::~TDevDesignerIntegration() -{ - delete dptr; -} - -#include "tdevdesignerintegration.moc" diff --git a/lib/interfaces/tdevdesignerintegration.h b/lib/interfaces/tdevdesignerintegration.h deleted file mode 100644 index 532d8b8b..00000000 --- a/lib/interfaces/tdevdesignerintegration.h +++ /dev/null @@ -1,98 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Alexander Dymo - - 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 TDEVDESIGNERINTEGRATION_H -#define TDEVDESIGNERINTEGRATION_H - -#include -#include -#include - -/** -@file tdevdesignerintegration.h -TDevelop designer integration interface. -*/ - -/** -TDevelop designer integration interface. -Designer integration object provides functionality which is used by integrated -into KDevelop GUI designers: -- adding/removing/editing functions (class methods); -- opening form implementation files; -- saving and loading designer integration settings. -. - -Designer integration is a layer between visual form (GUI) designer of any type -and the current language support. Usually designers create some kind of forms -and allow developers to define actions which are executed upon some GUI events -(for example, TQt Designer allows to define slots connected to GUI signals). -The actual code with action implementations needs to be written by hand in source -files. Designer integration captures such implementation requests and opens -necessary files at desired line numbers and adds (edits, removes) code for implementations. - -For example, TQt Designer integration should be able to create an subclass for a form -and reimplement slots defined in the form. -*/ -class TDevDesignerIntegration : public TQObject -{ -Q_OBJECT - -public: - /**Constructor. - @param parent Parent object. - @param name Internal name.*/ - TDevDesignerIntegration(TQObject *parent = 0, const char *name = 0); - /**Destructor.*/ - ~TDevDesignerIntegration(); - - /**Saves designer integration settings.*/ - virtual void saveSettings(TQDomDocument dom, TQString path) = 0; - /**Loads designer integration settings.*/ - virtual void loadSettings(TQDomDocument dom, TQString path) = 0; - -public slots: - /**Adds the implementation for a function. - @param formName The name of a GUI form. - @param function The function which needs to be implemented in the source.*/ - virtual void addFunction(const TQString &formName, KInterfaceDesigner::Function function) = 0; - - /**Removes the implementation of a function. - @param formName The name of a GUI form. - @param function The function which needs to be removed from the source.*/ - virtual void removeFunction(const TQString &formName, KInterfaceDesigner::Function function) = 0; - - /**Edites the implementation of a function. - @param formName The name of a GUI form. - @param oldFunction The function which needs to be edited from the source. - @param function The new function declaration.*/ - virtual void editFunction(const TQString &formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function) = 0; - - /**Opens the function and jumps to the line number of its definition (declaration). - @param formName The name of a GUI form. - @param functionName The name of a function to find in the source.*/ - virtual void openFunction(const TQString &formName, const TQString &functionName) = 0; - - /**Opens the form source. - @param formName The name of a GUI form.*/ - virtual void openSource(const TQString &formName) = 0; - private: - class TDevDesignerIntegrationPrivate; - TDevDesignerIntegrationPrivate *dptr; -}; - -#endif diff --git a/lib/interfaces/tdevdesignerintegrationiface.cpp b/lib/interfaces/tdevdesignerintegrationiface.cpp deleted file mode 100644 index bd4f349b..00000000 --- a/lib/interfaces/tdevdesignerintegrationiface.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2005 Ian Reinhart Geiser - - 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 "tdevdesignerintegrationiface.h" -#include -#include "tdevdesignerintegration.h" - -TDevDesignerIntegrationIface::TDevDesignerIntegrationIface(TDevDesignerIntegration *p) - : DCOPObject("GUIDesigner"), m_designer(p) -{ - //FIXME figure out what number our interface is... -} - - -TDevDesignerIntegrationIface::~TDevDesignerIntegrationIface() -{ -} - -void TDevDesignerIntegrationIface::addFunction( const TQString & formName, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) -{ - KInterfaceDesigner::Function f = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; - m_designer->addFunction(formName, f); -} - -void TDevDesignerIntegrationIface::removeFunction( const TQString & formName, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) -{ - KInterfaceDesigner::Function f = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; - m_designer->addFunction(formName, f); -} - -void TDevDesignerIntegrationIface::editFunction( const TQString & formName, TQString oldReturnType, TQString oldFunction, TQString oldSpecifier, TQString oldAccess, uint oldType, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) -{ - KInterfaceDesigner::Function fold = {oldReturnType, oldFunction, oldSpecifier, oldAccess, (KInterfaceDesigner::FunctionType)oldType }; - KInterfaceDesigner::Function fnew = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; - m_designer->editFunction(formName,fold,fnew); -} - -void TDevDesignerIntegrationIface::openFunction( const TQString & formName, const TQString & functionName ) -{ - m_designer->openFunction(formName,functionName); -} - -void TDevDesignerIntegrationIface::openSource( const TQString & formName ) -{ - m_designer->openSource(formName); -} - - diff --git a/lib/interfaces/tdevdesignerintegrationiface.h b/lib/interfaces/tdevdesignerintegrationiface.h deleted file mode 100644 index 0dd6f8d1..00000000 --- a/lib/interfaces/tdevdesignerintegrationiface.h +++ /dev/null @@ -1,49 +0,0 @@ -/* I am drunk. - Copyright (C) 2005 Ian Reinhart Geiser - - 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 TDEVDESIGNERINTEGRATIONIFACE_H -#define TDEVDESIGNERINTEGRATIONIFACE_H - -#include -class TDevDesignerIntegration; -/** -The dcop interface for GUI designers in KDevelop. - -@author KDevelop Authors -*/ -class TDevDesignerIntegrationIface : public DCOPObject -{ - K_DCOP -public: - TDevDesignerIntegrationIface(TDevDesignerIntegration *p); - - ~TDevDesignerIntegrationIface(); -k_dcop: - void addFunction(const TQString &formName, TQString returnType, TQString function,TQString specifier,TQString access,uint type); - void removeFunction(const TQString &formName, TQString returnType, TQString function,TQString specifier,TQString access,uint type); - void editFunction(const TQString &formName, TQString oldReturnType, TQString oldFunction, - TQString oldSpecifier,TQString oldAccess,uint oldType, - TQString returnType, TQString function,TQString specifier,TQString access,uint type); - void openFunction(const TQString &formName, const TQString &functionName); - void openSource(const TQString &formName); - - private: - TDevDesignerIntegration *m_designer; -}; - -#endif diff --git a/lib/interfaces/tdevgenericfactory.h b/lib/interfaces/tdevgenericfactory.h deleted file mode 100644 index 7fdbdb28..00000000 --- a/lib/interfaces/tdevgenericfactory.h +++ /dev/null @@ -1,91 +0,0 @@ -/* This file is part of the KDE project - * Copyright (C) 2003 Harald Fernengel - * Copyright (C) 2004 Alexander Dymo - * - * 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 - -/** -@file tdevgenericfactory.h -KDevelop generic plugin factory. -*/ - -/** -This class provides a generic implementation of a KLibFactory for -use with TDevelop plugins. -Usually it is convenient to use K_EXPORT_COMPONENT_FACTORY macro -to create factories for TDevelop plugins. For example, for DummyPlugin -the factory can be created (in dummyplugin.cpp file) as: -@code -typedef TDevGenericFactory DummyPluginFactory; -K_EXPORT_COMPONENT_FACTORY(libtdevdummyplugin, DummyPluginFactory( data ) ) -@endcode -Data should be a const static object. This way it complies with the requirements -for data objecs of TDevGenericFactory constructor. - -Important:
    -There is no need to create @ref TDEAboutData objects. It is more useful to create -a static const @ref TDevPluginInfo object which can be used also in the constructor -of a plugin. - -For example, dummyplugin.cpp file could contain: -@code -#include - -static const TDevPluginInfo data("KDevDummyPlugin"); -typedef TDevGenericFactory DummyPluginFactory; -K_EXPORT_COMPONENT_FACTORY(libtdevdummyplugin, DummyPluginFactory( data ) ) - -DummyPlugin::DummyPlugin(TQObject *parent, const char *name, const TQStringList & ) - :TDevPlugin(&data, parent, name) -{ -} -@endcode - -In the example above the duplication of information is avoided as same @ref TDevPluginInfo -objects are used for plugin and for plugin factory. This is possible because @ref TDevPluginInfo -class has an operator to cast @ref TDevPluginInfo to @ref TDEAboutData. -*/ -template -class TDevGenericFactory: public KGenericFactory -{ -public: - /**Constructor. - @param data A reference to TDEAboutData with an information about the plugin. - Data should have: - - plugin name as an application name; - - untranslated plugin generic name as a product name; - - license type number. - . - data object should live as long as factory lives.*/ - TDevGenericFactory(TDEAboutData *data) - :KGenericFactory(data->appName()), aboutData(data) - { - } - - /**Creates an instance.*/ - TDEInstance *createInstance() - { - return new TDEInstance(aboutData); - } - -private: - TDEAboutData *aboutData; - -}; - diff --git a/lib/interfaces/tdevlanguagesupport.cpp b/lib/interfaces/tdevlanguagesupport.cpp deleted file mode 100644 index d283a434..00000000 --- a/lib/interfaces/tdevlanguagesupport.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2001-2002 Bernd Gehrmann - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2002 Simon Hausmann - Copyright (C) 2002 F@lk Brettschneider - Copyright (C) 2003 Alexander Dymo - Copyright (C) 2003 Amilcar do Carmo Lucas - - 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 "codemodel.h" - -#include - -#include "tdevdesignerintegration.h" -#include "tdevlanguagesupport.h" - -TDevLanguageSupport::TDevLanguageSupport(const TDevPluginInfo *info, TQObject *parent, const char *name) - : TDevPlugin(info, parent, name ? name : "TDevLanguageSupport" ) -{ -} - -TDevLanguageSupport::~TDevLanguageSupport() -{ -} - -TDevLanguageSupport::Features TDevLanguageSupport::features() -{ - return Features(0); -} - -KMimeType::List TDevLanguageSupport::mimeTypes() -{ - return KMimeType::List(); -} - -TQString TDevLanguageSupport::formatTag( const Tag& /*tag*/ ) -{ - return TQString(); -} - -TQString TDevLanguageSupport::formatClassName(const TQString &name) -{ - return name; -} - -TQString TDevLanguageSupport::unformatClassName(const TQString &name) -{ - return name; -} - -bool TDevLanguageSupport::shouldSplitDocument(const KURL &url) -{ - return false; -} - -Qt::Orientation TDevLanguageSupport::splitOrientation() const -{ - return Qt::Vertical; -} - -void TDevLanguageSupport::addClass() -{ -} - -void TDevLanguageSupport::addMethod( ClassDom /*klass*/ ) -{ -} - -void TDevLanguageSupport::implementVirtualMethods( ClassDom /*klass*/ ) -{ -} - -void TDevLanguageSupport::addAttribute( ClassDom /*klass*/ ) -{ -} - -TQStringList TDevLanguageSupport::subclassWidget(const TQString& /*formName*/) -{ - return TQStringList(); -} - -TQStringList TDevLanguageSupport::updateWidget(const TQString& /*formName*/, const TQString& /*fileName*/) -{ - return TQStringList(); -} - -TQString TDevLanguageSupport::formatModelItem( const CodeModelItem *item, bool /*shortDescription*/ ) -{ - return item->name(); -} - -void TDevLanguageSupport::addFunction( DesignerType type, const TQString & formName, Function function ) -{ -// kdDebug() << "TDevLanguageSupport::addFunction: 1" << endl; - TDevDesignerIntegration *designerIntegration = designer(type); -// kdDebug() << "TDevLanguageSupport::addFunction: 2" << endl; - if (!designerIntegration) - { -// kdDebug() << "TDevLanguageSupport::addFunction: x" << endl; - return; - } -// kdDebug() << "TDevLanguageSupport::addFunction: 3" << endl; - designerIntegration->addFunction(formName, function); -// kdDebug() << "TDevLanguageSupport::addFunction: 4" << endl; -} - -void TDevLanguageSupport::editFunction( DesignerType type, const TQString & formName, Function oldFunction, Function function ) -{ - TDevDesignerIntegration *designerIntegration = designer(type); - if (!designerIntegration) - return; - designerIntegration->editFunction(formName, oldFunction, function); -} - -void TDevLanguageSupport::removeFunction( DesignerType type, const TQString & formName, Function function ) -{ - TDevDesignerIntegration *designerIntegration = designer(type); - if (!designerIntegration) - return; - designerIntegration->removeFunction(formName, function); -} - -TDevDesignerIntegration * TDevLanguageSupport::designer( DesignerType // type - ) -{ - return 0; -} - -void TDevLanguageSupport::openFunction( DesignerType type, const TQString & formName, const TQString & functionName ) -{ - TDevDesignerIntegration *designerIntegration = designer(type); - if (!designerIntegration) - return; - designerIntegration->openFunction(formName, functionName); -} - -void TDevLanguageSupport::createAccessMethods( ClassDom // theClass - , VariableDom // theVariable - ) -{ -} - -void TDevLanguageSupport::openSource( DesignerType type, const TQString & formName) -{ - TDevDesignerIntegration *designerIntegration = designer(type); - if (!designerIntegration) - return; - designerIntegration->openSource(formName); -} - -#include "tdevlanguagesupport.moc" diff --git a/lib/interfaces/tdevlanguagesupport.h b/lib/interfaces/tdevlanguagesupport.h deleted file mode 100644 index a1778ff6..00000000 --- a/lib/interfaces/tdevlanguagesupport.h +++ /dev/null @@ -1,261 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2001-2002 Bernd Gehrmann - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2002 Simon Hausmann - Copyright (C) 2002 F@lk Brettschneider - Copyright (C) 2003 Amilcar do Carmo Lucas - Copyright (C) 2003-2004 Alexander Dymo - - 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 TDEVLANGUAGESUPPORT_H -#define TDEVLANGUAGESUPPORT_H - -#include -#include -#include -#include "tdevplugin.h" -#include "codemodel.h" -#include - -/** -@file tdevlanguagesupport.h -Interface to programming language specific features. -*/ - -class Tag; -class TDevDesignerIntegration; - -using namespace KInterfaceDesigner; - -/** -KDevelop language support interface - the base class for all programming language support plugins. -Language support is used to load facilities specific to certain programming language. -Language supports are usually loaded among with a project. In this case project file defines -which language support to load. - -Language support plugin is a good place for: -- a language parser which fills memory and persistent symbol store -(see @ref CodeModel and @ref TDevCodeRepository); -- code wizards specific to a programming language (like new class wizard); -- GUI designer integration (see @ref TDevLanguageSupport::designer method -documentation and @ref TDevDesignerIntegration class documentation; -- symbol (class, function, etc.) name formatting to a human-readable convention (pretty -formatted name). -. -*/ -class TDevLanguageSupport: public TDevPlugin -{ - Q_OBJECT - - -public: - - /**Features supported by this language support.*/ - enum Features { - /*features of the language itself*/ - Classes=1 /**loadSettings(*project()->projectDom(), "kdevmylangsupport/designerintegration"); - saveDesignerToCache(type, des); - } - break; - } - return des; - @endcode - @ref ImplementationWidget and @ref TQtDesignerIntegration classes are available - from designerintegration support library. - @param type The type of the designer to integrate. - @return The pointer to designer integration of given type or 0.*/ - virtual TDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); - -public slots: - /**Adds a function requested by a GUI designer. No need to reimplement this slot - unless you want to use specific implementation of TDevDesignerIntegration interface. - @param type The type of integrated designer. - @param formName The name of a GUI form. - @param function The function to implement (add).*/ - void addFunction(DesignerType type, const TQString &formName, Function function); - - /**Removes a function requested by a GUI designer. No need to reimplement this slot - unless you want to use specific implementation of TDevDesignerIntegration interface. - @param type The type of integrated designer. - @param formName The name of a GUI form. - @param function The function to remove.*/ - void removeFunction(DesignerType type, const TQString &formName, Function function); - - /**Edits a function requested by a GUI designer. No need to reimplement this slot - unless you want to use specific implementation of TDevDesignerIntegration interface. - @param type The type of integrated designer. - @param formName The name of a GUI form. - @param oldFunction The old function signature before editing. - @param function The new function signature after editing.*/ - void editFunction(DesignerType type, const TQString &formName, Function oldFunction, Function function); - - /**Opens a function requested by a GUI designer. No need to reimplement this slot - unless you want to use specific implementation of TDevDesignerIntegration interface. - @param type The type of integrated designer. - @param formName The name of a GUI form. - @param functionName The name of a function to seek in the code for.*/ - void openFunction(DesignerType type, const TQString &formName, const TQString &functionName); - - /**Opens a form source requested by a GUI designer. No need to reimplement this slot - unless you want to use specific implementation of TDevDesignerIntegration interface. - @param type The type of integrated designer. - @param formName The name of a GUI form.*/ - void openSource(DesignerType type, const TQString &formName); - -signals: - /**Emitted when the content of the memory symbol store has been modified.*/ - void updatedSourceInfo(); - - /**Emitted before removing the file from the memory symbol store.*/ - void aboutToRemoveSourceInfo(const TQString& fileName); - - /**Emitted when a file has been removed from the memory symbol store.*/ - void removedSourceInfo(const TQString& fileName); - - /**Emitted when a file has been added to the memory symbol store.*/ - void addedSourceInfo( const TQString& fileName ); - - /**Emitted when the language part changes the Split View orientation.*/ - void splitOrientationChanged( Qt::Orientation orientation ); -}; - -#endif diff --git a/lib/interfaces/tdevmainwindow.cpp b/lib/interfaces/tdevmainwindow.cpp deleted file mode 100644 index e73250e9..00000000 --- a/lib/interfaces/tdevmainwindow.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 F@lk Brettschneider - Copyright (C) 2003 John Firebaugh - - 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 "tdevmainwindow.h" - -#include -#include - -KStatusBar *TDevMainWindow::statusBar() -{ - return main()->statusBar(); -} diff --git a/lib/interfaces/tdevmainwindow.h b/lib/interfaces/tdevmainwindow.h deleted file mode 100644 index 83aef3b0..00000000 --- a/lib/interfaces/tdevmainwindow.h +++ /dev/null @@ -1,101 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003 F@lk Brettschneider - Copyright (C) 2003 John Firebaugh - Copyright (C) 2003 Amilcar do Carmo Lucas - Copyright (C) 2004 Alexander Dymo - - 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 TDEV_MAINWINDOW_H -#define TDEV_MAINWINDOW_H - -#include - -class TQWidget; -class KStatusBar; -class TDEMainWindow; - -/** -@file tdevmainwindow.h -KDevelop main window interface. -*/ - -/** -KDevelop main window interface. -Provides methods to control the main window of an application. -*/ -class TDevMainWindow -{ -public: - /**Destroys the main window*/ - virtual ~TDevMainWindow() {} // must be virtual! - - /**Embeds a view of a part into the main window. - @param view The view to embed. Must be a KPart. - @param title The title of a view. - @param toolTip The tooltip of a view.*/ - virtual void embedPartView(TQWidget *view, const TQString &title, const TQString& toolTip = TQString()) = 0; - - /**Embeds a toolview at the left of the main window. - @param view The view to embed. Must be a KPart. - @param title The title of a view. - @param toolTip The tooltip of a view.*/ - virtual void embedSelectView(TQWidget *view, const TQString &title, const TQString &toolTip) = 0; - - /**Embeds a toolview at the bottom of the main window. - @param view The view to embed. Must be a KPart. - @param title The title of a view. - @param toolTip The tooltip of a view.*/ - virtual void embedOutputView(TQWidget *view, const TQString &title, const TQString &toolTip) = 0; - - /**Embeds a toolview at the right of the main window. - @param view The view to embed. Must be a KPart. - @param title The title of a view. - @param toolTip The tooltip of a view.*/ - virtual void embedSelectViewRight(TQWidget* view, const TQString& title, const TQString &toolTip) = 0; - - /**Removes a view from the main window. - @param view The view to remove.*/ - virtual void removeView(TQWidget *view) = 0; - - /**Shows or hides a view. - @param pView The view to show or hide. - @param bEnabled true if view should be shown, false it it is not.*/ - virtual void setViewAvailable(TQWidget *pView, bool bEnabled) = 0; - - /**Raises a view (shows it if it was minimized). - @param view The view to be raised.*/ - virtual void raiseView(TQWidget *view) = 0; - - /**Minimize a view. - @param view The view to be lowered.*/ - virtual void lowerView(TQWidget *view) = 0; - - /**Loads main window settings.*/ - virtual void loadSettings() = 0; - - /**Sets the current document's caption, if applicable. - @param caption the caption to set.*/ - virtual void setCurrentDocumentCaption( const TQString &caption ) = 0; - - /**@return TDEMainWindow object which actually represents the main window.*/ - virtual TDEMainWindow *main() = 0; - - /**@return KStatusBar object which actually represents the status bar in the main window.*/ - KStatusBar *statusBar(); -}; - -#endif diff --git a/lib/interfaces/tdevpartcontroller.cpp b/lib/interfaces/tdevpartcontroller.cpp deleted file mode 100644 index e718ecf4..00000000 --- a/lib/interfaces/tdevpartcontroller.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - - 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 "TDevPartControllerIface.h" -#include "tdevpartcontroller.h" -#include "katedocumentmanagerinterface.h" - -TDevPartController::TDevPartController(TQWidget *parent) - : KParts::PartManager(parent) -{ - new TDevPartControllerIface(this); - new KateDocumentManagerInterface(this); -} - -#include "tdevpartcontroller.moc" diff --git a/lib/interfaces/tdevpartcontroller.h b/lib/interfaces/tdevpartcontroller.h deleted file mode 100644 index 2bb593e6..00000000 --- a/lib/interfaces/tdevpartcontroller.h +++ /dev/null @@ -1,176 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 Bernd Gehrmann - Copyright (C) 2003 Roberto Raggi - Copyright (C) 2003 Hamish Rodda - Copyright (C) 2003 Harald Fernengel - Copyright (C) 2003 Jens Dagerbo - Copyright (C) 2004 Alexander Dymo - - 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 TDEV_PARTCONTROLLER_H -#define TDEV_PARTCONTROLLER_H - -#include -#include -#include - -/** -@file tdevpartcontroller.h -KDevelop part controller interface. -*/ - -namespace KParts -{ - class ReadOnlyPart; -} - -/**Document state enum.*/ -enum DocumentState -{ - Clean, /** - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 Harald Fernengel - Copyright (C) 2002 F@lk Brettschneider - Copyright (C) 2003 Julian Rockey - Copyright (C) 2003 Roberto Raggi - Copyright (C) 2003 Jens Dagerbo - Copyright (C) 2003 Mario Scalas - Copyright (C) 2003-2004 Alexander Dymo - - 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 "tdevplugin.h" - -#include "tdevapi.h" -#include "tdevcore.h" -#include "tdevplugininfo.h" -#include "tdevpartcontroller.h" -#include "tdevplugincontroller.h" - -#include -#include -#include - -#include -#include - -#include - -/////////////////////////////////////////////////////////////////////////////// -// struct TDevPlugin::Private -/////////////////////////////////////////////////////////////////////////////// - -struct TDevPlugin::Private -{ - const TDevPluginInfo *info; -}; - -/////////////////////////////////////////////////////////////////////////////// -// class TDevPlugin -/////////////////////////////////////////////////////////////////////////////// - -TDevPlugin::TDevPlugin(const TDevPluginInfo *info, TQObject *parent, const char *name) - :TQObject(parent, name), d(new Private) -{ - assert(parent->inherits( "TDevApi" )); - m_api = static_cast( parent ); - - actionCollection()->setHighlightingEnabled( true ); - - d->info = info; - TDEGlobal::iconLoader()->addAppDir("tdevelop"); -} - -TDevPlugin::~TDevPlugin() -{ - delete( d ); -} - -TDevMainWindow *TDevPlugin::mainWindow() -{ - return m_api->mainWindow(); -} - -TDevCore *TDevPlugin::core() const -{ - return m_api->core(); -} - -TDevProject *TDevPlugin::project() const -{ - return m_api->project(); -} - -CodeModel *TDevPlugin::codeModel() const -{ - return m_api->codeModel(); -} - -TQDomDocument *TDevPlugin::projectDom() const -{ - return m_api->projectDom(); -} - -TDevLanguageSupport *TDevPlugin::languageSupport() const -{ - return m_api->languageSupport(); -} - -TDevPartController *TDevPlugin::partController() const -{ - return m_api->partController(); -} - -TDevPluginController *TDevPlugin::pluginController() const -{ - return m_api->pluginController(); -} - -void TDevPlugin::restorePartialProjectSession(const TQDomElement* /*el*/) -{ - // there's still nothing to do in the base class -} - -void TDevPlugin::savePartialProjectSession(TQDomElement* /*el*/) -{ - // there's still nothing to do in the base class -} - -TDevCodeRepository * TDevPlugin::codeRepository() const -{ - return m_api->codeRepository(); -} - -TDevPlugin * TDevPlugin::extension_internal(const TQString &serviceType, const TQString &constraint) -{ - return m_api->pluginController()->extension(serviceType, constraint); -} - -const TDevPluginInfo *TDevPlugin::info() -{ - return d->info; -} - -#include "tdevplugin.moc" diff --git a/lib/interfaces/tdevplugin.h b/lib/interfaces/tdevplugin.h deleted file mode 100644 index eaa66146..00000000 --- a/lib/interfaces/tdevplugin.h +++ /dev/null @@ -1,201 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1999-2001 Bernd Gehrmann - Copyright (C) 2004 Alexander Dymo - - 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 TDEVPLUGIN_H -#define TDEVPLUGIN_H - -#include -#include -#include "tdevapi.h" - -class TDevCore; -class TDevProject; -class TDevVersionControl; -class TDevLanguageSupport; -class TDevPartController; -class TDevMainWindow; -class TDevCodeRepository; -class CodeModel; -class TDevPluginInfo; -class TQDomElement; - -/** -@file tdevplugin.h -TDevelop plugin interface. -*/ - -/**Current TDevelop plugin interface version. Interfaces declare plugin version to make sure -old source (or binary) incompatible plugins are not loaded. Increase this if -it is necessary that old plugins stop working.*/ -#define TDEVELOP_PLUGIN_VERSION 5 - -/** -The base class for all TDevelop plugins. -Plugin is a component which is loaded into TDevelop shell at startup or by request. -Each plugin should have corresponding .desktop file with a description. -.desktop file template looks like: -@code -[Desktop Entry] -Encoding=UTF-8 -Type=Service -Name= -GenericName= -Comment= -Icon= -X-TDevelop-Plugin-Version= -X-TDevelop-Plugin-Homepage= -X-TDevelop-Plugin-BugsEmailAddress= -X-TDevelop-Plugin-Copyright= -X-TDE-Library= -X-TDevelop-Version= -X-TDevelop-Scope= -X-TDevelop-Properties= -X-TDevelop-Args= -@endcode -Description of parameters in .desktop file: -- Name is a non-translatable name of a plugin, it is used in TDETrader queries -to search for a plugin (required); -- GenericName is a translatable name of a plugin, it is used to show -plugin names in GUI (required); -- Comment is a short description about the plugin (optional); -- Icon is a plugin icon (preferred); -- X-TDevelop-Plugin-Version is a version of a plugin (optional); -- X-TDevelop-Plugin-Homepage is a home page of a plugin (optional); -- X-TDevelop-Plugin-License is a license (optional). can be: GPL, LGPL, BSD, Artistic, -TQPL or Custom. If this property is not set, license is considered as unknown; -- X-TDevelop-Plugin-BugsEmailAddress is an email address for bug reports (optional); -- X-TDevelop-Plugin-Copyright is a copyright statement (optional); -- X-TDE-Library is a name of library which contains the plugin (required); -- X-TDevelop-Version is a version of TDevelop interfaces which is supported by the plugin (required); -- X-TDevelop-Scope is a scope of a plugin (see below for explanation) (required); -- X-TDevelop-Args is a list of additional arguments passed to plugins constructor (optional); -- X-TDevelop-Properties is a list of properties which this plugin supports, see @ref Profile class documentation for explanation (required to work with shells that support profiles). -. -Plugin scope can be either: -- Core -- Global -- Project -. -Global plugins are plugins which require only shell to be loaded and do not operate on @ref TDevProject interface and/or do not use project wide information.\n -Core plugins are global plugins which offer some important "core" functionality and thus -are not selectable by user in plugin configuration pages.\n -Project plugins require a project to be loaded and are usually loaded/unloaded among with the project. -If your plugin use @ref TDevProject interface and/or operate on project-related information then this is the project plugin. - -@sa TDevGenericFactory class documentation for an information about plugin instantiation -and writing factories for plugins. - -@sa TDevCore class documentation for an information about features which are available to plugins -from shell applications. -*/ -class TDevPlugin: public TQObject, public KXMLGUIClient -{ - Q_OBJECT - - -public: - /**Constructs a plugin. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - TDevPlugin(const TDevPluginInfo *info, TQObject *parent, const char *name = 0); - - /**Destructs a plugin.*/ - virtual ~TDevPlugin(); - - /**Provides an information about the plugin. - @return TDEAboutData object which was initialized in the constructor.*/ - const TDevPluginInfo* info(); - - /**@return A reference to the toplevel widget.*/ - TDevMainWindow *mainWindow(); - - /**@return A reference to the application core - an object which provides - basic functionalities for inter-parts communications / cooperation.*/ - TDevCore *core() const; - - /**@return A reference to the current project component or 0 if no project is loaded.*/ - TDevProject *project() const; - - /**@return A reference to the language support component or 0 if no support available.*/ - TDevLanguageSupport *languageSupport() const; - - /**@return A reference to the memory symbol store.*/ - CodeModel *codeModel() const; - - /**@return A reference to the DOM tree that represents the project file or 0 if no project is loaded.*/ - TQDomDocument *projectDom() const; - - /**@return A reference to the part controller which is used to manipulate loaded KParts.*/ - TDevPartController *partController() const; - - /**@return A reference to the plugin controller which is used to manipulate loaded plugin.*/ - virtual TDevPluginController *pluginController() const; - - /**@return A reference to the code repository (accessor to persistent symbol stores).*/ - TDevCodeRepository* codeRepository() const; - - /**Queries for the plugin which supports given service type (such plugins are called extensions in KDevelop). - All already loaded plugins will be queried and the first loaded one to support - the service type will be returned. Any plugin can be an extension, only "ServiceTypes=..." - entry is required in .desktop file for that plugin. - - Template argument is used as a type to cast the result to. This is done because extension - is usually derived from a certain base class and not directly from TDevPlugin. - @param serviceType The service type of an extension (like "TDevelop/SourceFormatter"). - @param constraint The constraint which is applied when quering for the service. This - constraint is a usual TDETrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'"). - @return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/ - template - Extension *extension(const TQString &serviceType, const TQString &constraint = "") - { - return static_cast(extension_internal(serviceType, constraint)); - } - - /**Override this base class method to restore any settings which differs from project to project. - Data can be read from a certain subtree of the project session file. - During project loading, respectively project session (.kdevses) loading, - this method will be called to give a chance to adapt the plugin to - the newly loaded project. For instance, the debugger plugin might restore the - list of breakpoints from the previous debug session for the certain project. - @note Take attention to the difference to common not-project-related session stuff. - They belong to the application rc file (tdeveloprc) - @note Project session file is useful for settings which cannot be shared between - developers. If a setting should be shared, modify projectDom instead. - @param el The parent DOM element for plugins session settings.*/ - virtual void restorePartialProjectSession(const TQDomElement* el); - - /**Saves session settings. - @sa restorePartialProjectSession - this is the other way round, the same just for saving.*/ - virtual void savePartialProjectSession(TQDomElement* el); - -private: - TDevPlugin *extension_internal(const TQString &serviceType, const TQString &constraint = ""); - - TDevApi *m_api; - class Private; - Private *d; -}; - -#endif diff --git a/lib/interfaces/tdevplugincontroller.cpp b/lib/interfaces/tdevplugincontroller.cpp deleted file mode 100644 index bf1eb5e7..00000000 --- a/lib/interfaces/tdevplugincontroller.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Alexander Dymo - - 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 "tdevplugincontroller.h" - -#include "tdevplugin.h" - -TDevPluginController::TDevPluginController() -{ -} - -TDETrader::OfferList TDevPluginController::query(const TQString &serviceType, - const TQString &constraint) -{ - return TDETrader::self()->query(serviceType, - TQString("%1 and [X-TDevelop-Version] == %2").arg(constraint).arg(TDEVELOP_PLUGIN_VERSION)); -} - -TDETrader::OfferList TDevPluginController::queryPlugins(const TQString &constraint) -{ - return query("TDevelop/Plugin", constraint); -} - -KURL::List TDevPluginController::profileResources(const TQString &/*nameFilter*/) -{ - return KURL::List(); -} - -KURL::List TDevPluginController::profileResourcesRecursive(const TQString &/*nameFilter*/) -{ - return KURL::List(); -} - -#include "tdevplugincontroller.moc" diff --git a/lib/interfaces/tdevplugincontroller.h b/lib/interfaces/tdevplugincontroller.h deleted file mode 100644 index ee44764d..00000000 --- a/lib/interfaces/tdevplugincontroller.h +++ /dev/null @@ -1,119 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Alexander Dymo - - 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 TDEVPLUGINCONTROLLER_H -#define TDEVPLUGINCONTROLLER_H - -#include - -#include -#include - -/** -@file tdevplugincontroller.h -TDevelop plugin controller interface. -*/ - -class TDevPlugin; -class ProfileEngine; - -/** -The base class for TDevelop plugin controller. -Plugin controller is responsible for quering, loading and unloading available plugins. -*/ -class TDevPluginController: public TQObject -{ - Q_OBJECT - -public: - - /** - * Returns a uniquely specified plugin. If it isn't already loaded, it will be. - * Use with caution! See extension for parameter details. - */ - virtual TDevPlugin * loadPlugin( const TQString & serviceType, const TQString & constraint ) = 0; - - /** - * Unloads the plugin specified by @p plugin - * @param plugin The plugin desktopEntryName of the plugin to unload - */ - virtual void unloadPlugin( const TQString & plugin ) = 0; - - /**Unloads plugins specified by @p list. - @param list The list of plugin names to unload. plugin name corresponds - to the "Name" property in plugin .desktop file.*/ - virtual void unloadPlugins(TQStringList const &list) = 0; - - /**@return The list of currently loaded plugins.*/ - virtual const TQValueList loadedPlugins() = 0; - - /**Queries for the plugin which supports given service type. - All already loaded plugins will be queried and the first one to support the service type - will be returned. Any plugin can be an extension, only "ServiceTypes=..." entry is - required in .desktop file for that plugin. - @param serviceType The service type of an extension (like "TDevelop/SourceFormatter") - @param constraint The constraint which is applied when quering for the service. This - constraint is a usual TDETrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'"). - @return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/ - virtual TDevPlugin *extension(const TQString &serviceType, const TQString &constraint = "") = 0; - - /**Queries KDevelop services. Version is checked automatically - by adding proper X-TDevelop-Version=N statement into the query. - @param serviceType The service type to query, for example "TDevelop/Plugin" or - "TDevelop/SourceFormatter." - @param constraint A constraint for the service. Do not include plugin version number - it - is done automatically. - @return The list of plugin offers.*/ - static TDETrader::OfferList query(const TQString &serviceType, const TQString &constraint); - - /**Queries TDevelop plugins. Works like - TDevPluginController::query with serviceType set to "TDevelop/Plugin". - @param constraint A constraint for the service. Do not include plugin version number - it - is done automatically. - @return The list of plugin offers.*/ - static TDETrader::OfferList queryPlugins(const TQString &constraint); - - /**Reimplement this function only if your shell supports plugin profiles. - @return The list of URLs to the profile resources (files) with given @p extension. - @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation - for name filters syntax.*/ - virtual KURL::List profileResources(const TQString &nameFilter); - - /**Reimplement this function only if your shell supports plugin profiles. - @return The list of URLs to the resources (files) with given @p extension. - This list is obtained by a recursive search that process given profile - and all it's subprofiles. - @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation - for name filters syntax.*/ - virtual KURL::List profileResourcesRecursive(const TQString &nameFilter); - - /** @return The current Profile Engine */ - virtual ProfileEngine &engine() = 0; - -signals: - /**Emitted when a plugin profile was changed (reloaded, other profile opened, etc.). - Should work only on shells with plugin profiles support.*/ - void profileChanged(); - -protected: - /**Constructor.*/ - TDevPluginController(); - -}; - -#endif diff --git a/lib/interfaces/tdevplugininfo.cpp b/lib/interfaces/tdevplugininfo.cpp deleted file mode 100644 index 2f607431..00000000 --- a/lib/interfaces/tdevplugininfo.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Alexander Dymo - - 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 "tdevplugininfo.h" - -#include - -#include -#include - -#include "tdevplugincontroller.h" - -struct TDevPluginInfo::Private { - TQString m_pluginName; - TQString m_rawGenericName; - - TQString m_genericName; - TQString m_description; - TQString m_icon; - - TQString m_version; - int m_licenseType; - TQString m_copyrightStatement; - TQString m_homePageAddress; - TQString m_bugsEmailAddress; - - TQValueList m_authors; - TQValueList m_credits; - - TDEAboutData *m_data; -}; - - -TDevPluginInfo::TDevPluginInfo(const TQString &pluginName) - :d(new Private()) -{ - d->m_pluginName = pluginName; - - KService::Ptr offer = KService::serviceByDesktopName(pluginName); - if (offer != 0) - { - d->m_genericName = offer->genericName(); - d->m_icon = offer->icon(); - d->m_description = offer->comment(); - - d->m_rawGenericName = offer->untranslatedGenericName(); - - d->m_version = offer->property("X-TDevelop-Plugin-Version").toString(); - d->m_homePageAddress = offer->property("X-TDevelop-Plugin-Homepage").toString(); - d->m_bugsEmailAddress = offer->property("X-TDevelop-Plugin-BugsEmailAddress").toString(); - d->m_copyrightStatement = offer->property("X-TDevelop-Plugin-Copyright").toString(); - - TQString lic = offer->property("X-TDevelop-Plugin-License").toString(); - if (lic == "GPL") - d->m_licenseType = TDEAboutData::License_GPL; - else if (lic == "LGPL") - d->m_licenseType = TDEAboutData::License_LGPL; - else if (lic == "BSD") - d->m_licenseType = TDEAboutData::License_BSD; - else if (lic == "QPL") - d->m_licenseType = TDEAboutData::License_QPL; - else if (lic == "Artistic") - d->m_licenseType = TDEAboutData::License_Artistic; - else if (lic == "Custom") - d->m_licenseType = TDEAboutData::License_Custom; - else - d->m_licenseType = TDEAboutData::License_Unknown; - - d->m_data = new TDEAboutData(d->m_pluginName.ascii(), d->m_rawGenericName.ascii(), "1", 0, d->m_licenseType); - } - else - kdDebug() << "Unable to load information for plugin: " << pluginName - << ". Check if " << pluginName << ".desktop exists." << endl; -} - - -TDevPluginInfo::operator TDEAboutData *() const -{ - return d->m_data; -} - -TQString TDevPluginInfo::pluginName() const -{ - return d->m_pluginName; -} - -TQString TDevPluginInfo::genericName() const -{ - return d->m_genericName; -} - -TQString TDevPluginInfo::icon() const -{ - return d->m_icon; -} - -TQString TDevPluginInfo::description() const -{ - return d->m_description; -} - -TQString TDevPluginInfo::version() const -{ - return d->m_version; -} - -int TDevPluginInfo::licenseType() const -{ - return d->m_licenseType; -} - -TQString TDevPluginInfo::license() const -{ - TDevPluginInfo &info = *const_cast(this); -// return TDEAboutData(info).license(); - TDEAboutData *data = info; - return data->license(); -} - -TQString TDevPluginInfo::copyrightStatement() const -{ - return d->m_copyrightStatement; -} - -TQString TDevPluginInfo::homePageAddress() const -{ - return d->m_homePageAddress; -} - -TQString TDevPluginInfo::bugsEmailAddress() const -{ - return d->m_bugsEmailAddress; -} - -TQVariant TDevPluginInfo::property(const TQString &name) const -{ - TDETrader::OfferList offers = TDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName)); - if (offers.count() == 1) - return offers.first()->property(name); - return TQVariant(); -} - -TQVariant TDevPluginInfo::operator [](const TQString &name) const -{ - return property(name); -} - -TQStringList TDevPluginInfo::propertyNames( ) const -{ - TDETrader::OfferList offers = TDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName)); - if (offers.count() == 1) - return offers.first()->propertyNames(); - return TQStringList(); -} - -void TDevPluginInfo::addAuthor(const char *name, const char *task, - const char *emailAddress, const char *webAddress) -{ - d->m_authors.append(TDEAboutPerson(name, task, emailAddress, webAddress)); -} - -void TDevPluginInfo::addCredit(const char *name, const char *task, - const char *emailAddress, const char *webAddress) -{ - d->m_credits.append(TDEAboutPerson(name, task, emailAddress, webAddress)); -} diff --git a/lib/interfaces/tdevplugininfo.h b/lib/interfaces/tdevplugininfo.h deleted file mode 100644 index 419d61aa..00000000 --- a/lib/interfaces/tdevplugininfo.h +++ /dev/null @@ -1,111 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Alexander Dymo - - 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 TDEVPLUGININFO_H -#define TDEVPLUGININFO_H - -#include - -#include - -/** -@file tdevplugininfo.h -TDevelop plugin information container class. -*/ - -/** -Information about TDevelop plugin. -It uses plugin name to query plugin .desktop files and -retrieve most information. Names of authors and credits to other people -must be added manually using TDevPluginInfo::addAuthor and TDevPluginInfo::addCredit -methods. -@sa TDevPlugin class documentation for more information about .desktop files. -*/ -class TDevPluginInfo -{ -public: - /**Constructor. - @param pluginName A name of a plugin. Must be the same as the name of a .desktop file - and the same as the location of plugin resource files.*/ - TDevPluginInfo(const TQString &pluginName); - - /**Casts TDevPluginInfo to TDEAboutData. Uses TDevPluginInfo::pluginName as TDEAboutData::appName, - TDevPluginInfo::rawGenericName as TDEAboutData::programName TDevPluginInfo::licenseType as TDEAboutData::licenseType. Other parameters are ignored.*/ - operator TDEAboutData*() const; - - /**@return A name of a plugin (always untranslated).*/ - TQString pluginName() const; - /**@return A generic name of a plugin (translated). Use this in GUI. Information is taken from .desktop file.*/ - TQString genericName() const; - /**@return An icon name of a plugin. Information is taken from .desktop file.*/ - TQString icon() const; - /**@return A description of a plugin. Information is taken from .desktop file.*/ - TQString description() const; - /**@return A version of a plugin. Information is taken from .desktop file.*/ - TQString version() const; - /**@return A license type of a plugin. Information is taken from .desktop file.*/ - int licenseType() const; - /**@return A license text for known license types (GPL, LGPL, BSD, Artistic, TQPL).*/ - TQString license() const; - /**@return A copyright statement of a plugin. Information is taken from .desktop file.*/ - TQString copyrightStatement() const; - /**@return A home page of a plugin. Information is taken from .desktop file.*/ - TQString homePageAddress() const; - /**@return A email address for bugs of a plugin. Information is taken from .desktop file.*/ - TQString bugsEmailAddress() const; - - /**@param name The name of a property. - @return Any property value which exists in .desktop file.*/ - TQVariant property(const TQString &name) const; - /**@param name The name of a property. - @return Any property value which exists in .desktop file.*/ - TQVariant operator [] (const TQString &name) const; - /**@return A list of property names set in .desktop file.*/ - TQStringList propertyNames() const; - - /**@return A list of plugin authors.*/ - const TQValueList authors() const; - /**@return A list of other plugin contributors.*/ - const TQValueList credits() const; - - /**Adds an author to the list of authors. - You can call this function as many times you need. Each entry is appended to a list. - @param name The developer's name in UTF-8 encoding. - @param task What the person is responsible for. This text can contain newlines. It should be marked for translation like this: I18N_NOOP("Task description..."). Can be 0. - @param emailAddress An Email address where the person can be reached. Can be 0. - @param webAddress The person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is correct, "some.domain" is not. Can be 0.*/ - void addAuthor(const char *name, const char *task, - const char *emailAddress = 0, const char *webAddress = 0); - /**Adds a contributor to the list of contributors. - You can call this function as many times you need. Each entry is appended to a list. - @param name The developer's name in UTF-8 encoding. - @param task What the person is responsible for. This text can contain newlines. It should be marked for translation like this: I18N_NOOP("Task description..."). Can be 0. - @param emailAddress An Email address where the person can be reached. Can be 0. - @param webAddress The person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is correct, "some.domain" is not. Can be 0.*/ - void addCredit(const char *name, const char *task = 0, - const char *emailAddress = 0, const char *webAddress = 0); - -private: - /**Returns the untranslated generic name of a plugin as set in .desktop file.*/ - const char *rawGenericName() const; - - class Private; - Private *d; -}; - -#endif diff --git a/lib/interfaces/tdevproject.cpp b/lib/interfaces/tdevproject.cpp deleted file mode 100644 index 77136ca0..00000000 --- a/lib/interfaces/tdevproject.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2002 Simon Hausmann - Copyright (C) 2003 Jens Dagerbo - Copyright (C) 2003 Mario Scalas - Copyright (C) 2003-2004 Alexander Dymo - - 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 "tdevproject.h" -#include -#include -#include -#include "tdevprojectiface.h" - -struct TDevProject::Private { - TQMap m_absToRel; - TQStringList m_symlinkList; - TQTimer *m_timer; - TDevProjectIface *m_iface; -}; - -TDevProject::TDevProject(const TDevPluginInfo *info, TQObject *parent, const char *name) - : TDevPlugin(info, parent, name), d(new TDevProject::Private()) -{ - connect( this, TQT_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQT_SLOT(buildFileMap()) ); - connect( this, TQT_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQT_SLOT(buildFileMap()) ); - - connect( this, TQT_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQT_SLOT(slotAddFilesToFileMap(const TQStringList& )) ); - connect( this, TQT_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQT_SLOT(slotRemoveFilesFromFileMap(const TQStringList& )) ); - - d->m_timer = new TQTimer(this); - connect(d->m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotBuildFileMap())); - d->m_iface = new TDevProjectIface(this); -} - -TDevProject::~TDevProject() -{ - d->m_timer->stop(); - delete d->m_iface; - delete d->m_timer; - delete d; -} - -void TDevProject::changedFile( const TQString & fileName ) -{ - TQStringList fileList; - fileList.append ( fileName ); - - emit changedFilesInProject( fileList ); - -} - -void TDevProject::changedFiles( const TQStringList & fileList ) -{ - emit changedFilesInProject( fileList ); -} - -TDevProject::Options TDevProject::options() const -{ - return (TDevProject::Options)0; -} - -bool TDevProject::isProjectFile( const TQString & absFileName ) -{ - return d->m_absToRel.contains( absFileName ); -} - -TQString TDevProject::relativeProjectFile( const TQString & absFileName ) -{ - if( isProjectFile(absFileName) ) - return d->m_absToRel[ absFileName ]; - return TQString(); -} - -void TDevProject::buildFileMap() -{ - d->m_timer->stop(); - d->m_timer->start(0, true); -} - -void TDevProject::slotBuildFileMap() -{ - kdDebug(9000) << k_funcinfo << endl; - - d->m_absToRel.clear(); - d->m_symlinkList.clear(); - const TQStringList fileList = allFiles(); - for( TQStringList::ConstIterator it=fileList.begin(); it!=fileList.end(); ++it ) - { - TQFileInfo fileInfo( projectDirectory() + "/" + *it ); - d->m_absToRel[ URLUtil::canonicalPath(fileInfo.absFilePath()) ] = *it; - - if ( URLUtil::canonicalPath( fileInfo.absFilePath() ) != fileInfo.absFilePath() ) - { - d->m_symlinkList << *it; - } - } -} - -void TDevProject::openProject( const TQString & /*dirName*/, const TQString & /*projectName*/ ) -{ - buildFileMap(); -} - -TQStringList TDevProject::symlinkProjectFiles( ) -{ - return d->m_symlinkList; -} - -TQString TDevProject::defaultRunDirectory(const TQString& projectPluginName) const -{ - return DomUtil::readEntry(*projectDom(), "/" + projectPluginName + "/run/globalcwd"); -} - -void TDevProject::slotAddFilesToFileMap( const TQStringList & fileList ) -{ - TQStringList::ConstIterator it = fileList.begin(); - while( it != fileList.end() ) - { - TQFileInfo fileInfo( projectDirectory() + "/" + *it ); - d->m_absToRel[ URLUtil::canonicalPath(fileInfo.absFilePath()) ] = *it; - - if ( URLUtil::canonicalPath( fileInfo.absFilePath() ) != fileInfo.absFilePath() ) - { - d->m_symlinkList << *it; - } - - ++it; - } -} - -void TDevProject::slotRemoveFilesFromFileMap( const TQStringList & fileList ) -{ - TQStringList::ConstIterator it = fileList.begin(); - while( it != fileList.end() ) - { - TQFileInfo fileInfo( projectDirectory() + "/" + *it ); - d->m_absToRel.remove( URLUtil::canonicalPath(fileInfo.absFilePath()) ); - - d->m_symlinkList.remove( *it ); - - ++it; - } -} - -#include "tdevproject.moc" diff --git a/lib/interfaces/tdevproject.h b/lib/interfaces/tdevproject.h deleted file mode 100644 index fa320edf..00000000 --- a/lib/interfaces/tdevproject.h +++ /dev/null @@ -1,219 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2001-2002 Bernd Gehrmann - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2002 Simon Hausmann - Copyright (C) 2003 Jens Dagerbo - Copyright (C) 2003 Mario Scalas - Copyright (C) 2003-2004 Alexander Dymo - - 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 TDEVPROJECT_H -#define TDEVPROJECT_H - -#include "tdevplugin.h" -#include "domutil.h" - -#include -#include - -/** -@file tdevproject.h -KDevelop project interface. -*/ - -class TQTimer; - -/** -KDevelop project interface. -Plugins implementing the TDevProject interfaces are used to manage projects. - -Project can be considered as a way of grouping files (in text editors) or -as a way of providing support for a build system (like it is done in TDevelop IDE buildtools). -*/ -class TDevProject: public TDevPlugin -{ - Q_OBJECT - -public: - /**Constructs a project plugin. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - TDevProject(const TDevPluginInfo *info, TQObject *parent=0, const char *name=0); - /**Destructor.*/ - virtual ~TDevProject(); - - /**Options of the project plugin.*/ - enum Options { - UsesOtherBuildSystem = 0 /**/run/directoryradio == executable - * The directory where the executable is. - * if //run/directoryradio == build - * The build directory. - * if /kdevautoproject/run/directoryradio == custom - * The custom directory absolute path. - * Derived classes are supposed to explicitly call this implementation - */ - TQString defaultRunDirectory(const TQString& projectPluginName) const; - -private slots: - void buildFileMap(); - void slotBuildFileMap(); - void slotAddFilesToFileMap(const TQStringList & fileList ); - void slotRemoveFilesFromFileMap(const TQStringList & fileList ); - -signals: - /**Emitted when a new list of files has been added to the - project. Provided for convenience when many files were added. - @param fileList The file names relative to the project directory.*/ - void addedFilesToProject(const TQStringList& fileList); - - /**Emitted when a list of files has been removed from the project. - Provided for convenience when many files were removed. - @param fileList The file names relative to the project directory.*/ - void removedFilesFromProject(const TQStringList& fileList); - - /**Emitted when a list of files has changed in the project. - @param fileList The file names relative to the project directory.*/ - void changedFilesInProject(const TQStringList& fileList); - - /**Emitted when one compile related command (make, make install, make ...) ends sucessfuly. - Used to reparse the files after a sucessful compilation.*/ - void projectCompiled(); - - /**Emitted when the active directory of the project changes - * @param olddir The old active directory - * @param newdir The new active directory - */ - void activeDirectoryChanged( const TQString& olddir, const TQString& newdir ); - -private: - class Private; - Private *d; -}; - -#endif diff --git a/lib/interfaces/tdevprojectiface.cpp b/lib/interfaces/tdevprojectiface.cpp deleted file mode 100644 index 625a4118..00000000 --- a/lib/interfaces/tdevprojectiface.cpp +++ /dev/null @@ -1,186 +0,0 @@ - - -/* This file is part of the KDE project - Copyright (C) 2005 Ian Reinhart Geiser - - 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 "tdevprojectiface.h" -#include "tdevproject.h" -#include "domutil.h" - -TDevProjectIface::TDevProjectIface(TDevProject *prj) - : TQObject(prj), DCOPObject("TDevProject"), m_prj(prj) -{ -} - - -TDevProjectIface::~TDevProjectIface() -{ -} - -void TDevProjectIface::openProject( const TQString & dirName, const TQString & projectName ) -{ - m_prj->openProject(dirName,projectName); -} - -void TDevProjectIface::closeProject( ) -{ - m_prj->closeProject(); -} - -uint TDevProjectIface::options( ) const -{ - return (uint)m_prj->options(); -} - -TQString TDevProjectIface::projectDirectory( ) const -{ - return m_prj->projectDirectory(); -} - -TQString TDevProjectIface::projectName( ) const -{ - return m_prj->projectName(); -} - -TQString TDevProjectIface::mainProgram() const -{ - return m_prj->mainProgram(); -} - -TQString TDevProjectIface::runDirectory( ) const -{ - return m_prj->runDirectory(); -} - -TQString TDevProjectIface::activeDirectory( ) const -{ - return m_prj->activeDirectory(); -} - -TQString TDevProjectIface::buildDirectory( ) const -{ - return m_prj->buildDirectory(); -} - -TQStringList TDevProjectIface::allFiles( ) const -{ - return m_prj->allFiles(); -} - -TQStringList TDevProjectIface::distFiles( ) const -{ - return m_prj->distFiles(); -} - -void TDevProjectIface::addFiles( const TQStringList & fileList ) -{ - m_prj->addFiles(fileList); -} - -void TDevProjectIface::addFile( const TQString & fileName ) -{ - m_prj->addFile(fileName); -} - -void TDevProjectIface::removeFiles( const TQStringList & fileList ) -{ - m_prj->removeFiles(fileList); -} - -void TDevProjectIface::removeFile( const TQString & fileName ) -{ - m_prj->removeFile(fileName); -} - -void TDevProjectIface::changedFiles( const TQStringList & fileList ) -{ - m_prj->changedFiles(fileList); -} - -void TDevProjectIface::changedFile( const TQString & fileName ) -{ - m_prj->changedFile(fileName); -} - -bool TDevProjectIface::isProjectFile( const TQString & absFileName ) -{ - return m_prj->isProjectFile(absFileName); -} - -TQString TDevProjectIface::relativeProjectFile( const TQString & absFileName ) -{ - return m_prj->relativeProjectFile(absFileName); -} - -TQStringList TDevProjectIface::symlinkProjectFiles( ) -{ - return m_prj->symlinkProjectFiles(); -} - -TQString TDevProjectIface::readEntry( const TQString & path, const TQString & defaultEntry ) -{ - return DomUtil::readEntry( *m_prj->projectDom(), path, defaultEntry); -} - -int TDevProjectIface::readIntEntry( const TQString & path, int defaultEntry ) -{ - return DomUtil::readIntEntry(*m_prj->projectDom(), path,defaultEntry); -} - -bool TDevProjectIface::readBoolEntry( const TQString & path, bool defaultEntry ) -{ - return DomUtil::readBoolEntry(*m_prj->projectDom(), path, defaultEntry); -} - -TQStringList TDevProjectIface::readListEntry( const TQString & path, const TQString & tag ) -{ - return DomUtil::readListEntry(*m_prj->projectDom(), path, tag); -} - -TQMap< TQString, TQString > TDevProjectIface::readMapEntry( const TQString & path ) -{ - return DomUtil::readMapEntry(*m_prj->projectDom(), path); -} - -void TDevProjectIface::writeEntry( const TQString & path, const TQString & value ) -{ - DomUtil::writeEntry(*m_prj->projectDom(), path, value); -} - -void TDevProjectIface::writeIntEntry( const TQString & path, int value ) -{ - DomUtil::writeIntEntry(*m_prj->projectDom(), path, value); -} - -void TDevProjectIface::writeBoolEntry( const TQString & path, bool value ) -{ - DomUtil::writeBoolEntry(*m_prj->projectDom(), path, value); -} - -void TDevProjectIface::writeListEntry( const TQString & path, const TQString & tag, const TQStringList & value ) -{ - DomUtil::writeListEntry(*m_prj->projectDom(), path, tag, value); -} - -void TDevProjectIface::writeMapEntry( const TQString & path, const TQMap< TQString, TQString > & map ) -{ - DomUtil::writeMapEntry(*m_prj->projectDom(), path, map); -} - -#include "tdevprojectiface.moc" diff --git a/lib/interfaces/tdevprojectiface.h b/lib/interfaces/tdevprojectiface.h deleted file mode 100644 index c3e0ddd4..00000000 --- a/lib/interfaces/tdevprojectiface.h +++ /dev/null @@ -1,82 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2005 Ian Reinhart Geiser - - 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 TDEVPROJECTIFACE_H -#define TDEVPROJECTIFACE_H - -#include -#include -#include - -class TDevProject; - -/** -DCOP Interface for the @ref TDevProject object. - -@author KDevelop Authors -*/ -class TDevProjectIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP -public: - TDevProjectIface(TDevProject *prj); - - ~TDevProjectIface(); -k_dcop: - void openProject(const TQString &dirName, const TQString &projectName); - void closeProject(); - uint options() const; - TQString projectDirectory() const; - TQString projectName() const; - TQString mainProgram() const; - TQString runDirectory() const; - TQString activeDirectory() const; - TQString buildDirectory() const; - TQStringList allFiles() const; - TQStringList distFiles() const; - void addFiles(const TQStringList &fileList); - void addFile(const TQString &fileName); - void removeFiles(const TQStringList& fileList); - void removeFile(const TQString &fileName); - void changedFiles(const TQStringList &fileList); - void changedFile(const TQString &fileName); - bool isProjectFile(const TQString &absFileName); - TQString relativeProjectFile(const TQString &absFileName); - TQStringList symlinkProjectFiles(); - - // Project DOM access - TQString readEntry(const TQString &path, const TQString &defaultEntry = TQString()); - int readIntEntry(const TQString &path, int defaultEntry = 0); - bool readBoolEntry(const TQString &path, bool defaultEntry = false); - TQStringList readListEntry(const TQString &path, const TQString &tag); - TQMap readMapEntry(const TQString &path); - - void writeEntry(const TQString &path, const TQString &value); - void writeIntEntry(const TQString &path, int value); - void writeBoolEntry( const TQString &path, bool value); - void writeListEntry(const TQString &path, const TQString &tag, const TQStringList &value); - void writeMapEntry(const TQString& path, const TQMap &map); - - private: - TDevProject *m_prj; -}; - -#endif diff --git a/lib/util/CMakeLists.txt b/lib/util/CMakeLists.txt index 0114b5ae..1eb17f35 100644 --- a/lib/util/CMakeLists.txt +++ b/lib/util/CMakeLists.txt @@ -26,13 +26,13 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/util ) -##### tdevutil (static) ######################### +##### kdevutil (static) ######################### -tde_add_library( tdevutil STATIC_PIC AUTOMOC +tde_add_library( kdevutil STATIC_PIC AUTOMOC SOURCES blockingkprocess.cpp configwidgetproxy.cpp domutil.cpp execcommand.cpp filetemplate.cpp - tdeveditorutil.cpp tdevjobtimer.cpp - tdevshellwidget.cpp tdescriptactionmanager.cpp + kdeveditorutil.cpp kdevjobtimer.cpp + kdevshellwidget.cpp tdescriptactionmanager.cpp rurl.cpp settings.cpp urlutil.cpp ) diff --git a/lib/util/Makefile.am b/lib/util/Makefile.am index 52ededb0..8bf28091 100644 --- a/lib/util/Makefile.am +++ b/lib/util/Makefile.am @@ -1,10 +1,10 @@ INCLUDES = -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/sourceinfo $(all_includes) -noinst_LTLIBRARIES = libtdevutil.la +noinst_LTLIBRARIES = libkdevutil.la -libtdevutil_la_SOURCES = blockingkprocess.cpp configwidgetproxy.cpp domutil.cpp \ - execcommand.cpp filetemplate.cpp tdeveditorutil.cpp tdevjobtimer.cpp \ - tdevshellwidget.cpp tdescriptactionmanager.cpp rurl.cpp settings.cpp urlutil.cpp +libkdevutil_la_SOURCES = blockingkprocess.cpp configwidgetproxy.cpp domutil.cpp \ + execcommand.cpp filetemplate.cpp kdeveditorutil.cpp kdevjobtimer.cpp \ + kdevshellwidget.cpp tdescriptactionmanager.cpp rurl.cpp settings.cpp urlutil.cpp METASOURCES = AUTO @@ -12,10 +12,10 @@ tdevelopincludedir = $(includedir)/tdevelop/util tdevelopinclude_HEADERS = domutil.h execcommand.h filetemplate.h urlutil.h \ configwidgetproxy.h rurl.h tdescriptactionmanager.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevextensions tdevinterfaces -DOXYGEN_PROJECTNAME = TDevelop Utility Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevextensions kdevinterfaces +DOXYGEN_PROJECTNAME = KDevelop Utility Library +DOXYGEN_DOCDIRPREFIX = kdev include ../../Doxyfile.am -noinst_HEADERS = blockingkprocess.h tdeveditorutil.h tdevjobtimer.h \ - tdevshellwidget.h settings.h +noinst_HEADERS = blockingkprocess.h kdeveditorutil.h kdevjobtimer.h \ + kdevshellwidget.h settings.h diff --git a/lib/util/configwidgetproxy.cpp b/lib/util/configwidgetproxy.cpp index c2251158..bea1c79a 100644 --- a/lib/util/configwidgetproxy.cpp +++ b/lib/util/configwidgetproxy.cpp @@ -26,13 +26,13 @@ #include #include -#include +#include #include "configwidgetproxy.h" -ConfigWidgetProxy::ConfigWidgetProxy( TDevCore * core ) +ConfigWidgetProxy::ConfigWidgetProxy( KDevCore * core ) { connect( core, TQT_SIGNAL(configWidget(KDialogBase*)), this, TQT_SLOT(slotConfigWidget( KDialogBase*)) ); connect( core, TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(slotProjectConfigWidget( KDialogBase*)) ); diff --git a/lib/util/configwidgetproxy.h b/lib/util/configwidgetproxy.h index f1ced178..7881f830 100644 --- a/lib/util/configwidgetproxy.h +++ b/lib/util/configwidgetproxy.h @@ -24,7 +24,7 @@ #include #include -class TDevCore; +class KDevCore; class KDialogBase; /** @@ -65,8 +65,8 @@ void MyPart::insertConfigWidget( TQObject const * dlg, TQWidget * page, unsigned } @endcode -Note that this replaces the functionality of typical TDevCore::configWidget() and -TDevCore::projectConfigWidget() slots. +Note that this replaces the functionality of typical KDevCore::configWidget() and +KDevCore::projectConfigWidget() slots. */ class ConfigWidgetProxy : public TQObject { @@ -76,7 +76,7 @@ Q_OBJECT public: /**Constructor. @param core An instance of KDevelop Core.*/ - ConfigWidgetProxy( TDevCore * core ); + ConfigWidgetProxy( KDevCore * core ); virtual ~ConfigWidgetProxy(); /** diff --git a/lib/util/filetemplate.cpp b/lib/util/filetemplate.cpp index 4d0facdf..c2454580 100644 --- a/lib/util/filetemplate.cpp +++ b/lib/util/filetemplate.cpp @@ -27,12 +27,12 @@ #include -#include "tdevplugin.h" -#include "tdevproject.h" +#include "kdevplugin.h" +#include "kdevproject.h" #include "domutil.h" -bool FileTemplate::exists(TDevPlugin *part, const TQString &name, Policy p) +bool FileTemplate::exists(KDevPlugin *part, const TQString &name, Policy p) { //TQString fileName = (p == Default) ? // (part->project()->projectDirectory() + "/templates/" + name) : name; @@ -40,17 +40,17 @@ bool FileTemplate::exists(TDevPlugin *part, const TQString &name, Policy p) return TQFile::exists( fullPathForName(part,name,p) ); } -TQString FileTemplate::read(TDevPlugin *part, const TQString &name, Policy p) +TQString FileTemplate::read(KDevPlugin *part, const TQString &name, Policy p) { - //TDevProject *project = part->project(); + //KDevProject *project = part->project(); //TQString fileName = (p == Default) ? (project->projectDirectory() + // "/templates/" + name) : name; return readFile(part, fullPathForName(part, name, p) ); } -TQString FileTemplate::readFile(TDevPlugin *part, const TQString &fileName) +TQString FileTemplate::readFile(KDevPlugin *part, const TQString &fileName) { TQDomDocument &dom = *part->projectDom(); @@ -87,7 +87,7 @@ TQString FileTemplate::makeSubstitutions( TQDomDocument & dom, const TQString & } -bool FileTemplate::copy(TDevPlugin *part, const TQString &name, +bool FileTemplate::copy(KDevPlugin *part, const TQString &name, const TQString &dest, Policy p) { TQString text = read(part, name, p); @@ -109,7 +109,7 @@ bool FileTemplate::copy(TDevPlugin *part, const TQString &name, return true; } -TQString FileTemplate::fullPathForName(TDevPlugin *part, const TQString &name, +TQString FileTemplate::fullPathForName(KDevPlugin *part, const TQString &name, Policy p) { // if Policy is not default, full path is just the name if (p!=Default) return name; @@ -123,6 +123,6 @@ TQString FileTemplate::fullPathForName(TDevPlugin *part, const TQString &name, } // next try global - TQString globalName = ::locate("data", "tdevfilecreate/file-templates/" + name); + TQString globalName = ::locate("data", "kdevfilecreate/file-templates/" + name); return globalName.isNull() ? fileName : globalName; } diff --git a/lib/util/filetemplate.h b/lib/util/filetemplate.h index 7802f9b7..8f863535 100644 --- a/lib/util/filetemplate.h +++ b/lib/util/filetemplate.h @@ -22,7 +22,7 @@ #include -class TDevPlugin; +class KDevPlugin; class TQDomDocument; /** @@ -49,21 +49,21 @@ public: * exists in the current project. File templates * are stored in the "templates" subdirectory of a project or in application shared dirs. */ - static bool exists(TDevPlugin *part, const TQString &name, Policy p = Default); + static bool exists(KDevPlugin *part, const TQString &name, Policy p = Default); /** * Reads a template with the given name (e.g. "cpp") * and makes variable substitutions (like $AUTHOR$ etc.) * in it. The resulting string is returned. */ - static TQString read(TDevPlugin *part, const TQString &name, Policy p = Default); + static TQString read(KDevPlugin *part, const TQString &name, Policy p = Default); /** * Reads a template with the given URL * and makes variable substitutions (like $AUTHOR$ etc.) * in it. The resulting string is returned. */ - static TQString readFile(TDevPlugin *part, const TQString &fileName); + static TQString readFile(KDevPlugin *part, const TQString &fileName); /** * Makes variable substitutions on a text, based on a specified TQDomDocument @@ -76,13 +76,13 @@ public: * file with the name dest and - while copying - * performs variable substitutions. */ - static bool copy(TDevPlugin *part, const TQString &name, + static bool copy(KDevPlugin *part, const TQString &name, const TQString &dest, Policy p = Default); /** * Translates a template name into a full path, or suggests a full path * for the template in the project directory if it doesn't exist. */ - static TQString fullPathForName(TDevPlugin *part, const TQString &name, Policy p = Default); + static TQString fullPathForName(KDevPlugin *part, const TQString &name, Policy p = Default); }; #endif diff --git a/lib/util/kdeveditorutil.cpp b/lib/util/kdeveditorutil.cpp new file mode 100644 index 00000000..198e9a42 --- /dev/null +++ b/lib/util/kdeveditorutil.cpp @@ -0,0 +1,89 @@ +/*************************************************************************** + * Copyright (C) 2007 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program 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. * + * * + ***************************************************************************/ + +#include "kdeveditorutil.h" + +#include +#include +#include +#include +#include + +bool KDevEditorUtil::currentPositionReal( unsigned int * line, unsigned int * col, KTextEditor::Document * doc, KTextEditor::View * view ) +{ + if ( !line || !col ) return false; + + KTextEditor::EditInterface * editIface = dynamic_cast( doc ); + if ( !editIface ) return false; + + view = view ? view : dynamic_cast( doc->widget() ); + + KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); + if ( !cursorIface ) return false; + + cursorIface->cursorPositionReal( line, col ); + return true; +} + +TQString KDevEditorUtil::currentLine( KTextEditor::Document * doc, KTextEditor::View * view ) +{ + KTextEditor::EditInterface * editIface = dynamic_cast( doc ); + if ( !editIface ) return TQString(); + + view = view ? view : dynamic_cast( doc->widget() ); + + KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); + if ( !cursorIface ) return TQString(); + + uint line = 0; + uint col = 0; + cursorIface->cursorPositionReal(&line, &col); + + return editIface->textLine(line); +} + +TQString KDevEditorUtil::currentWord( KTextEditor::Document * doc, KTextEditor::View * view ) +{ + KTextEditor::EditInterface * editIface = dynamic_cast( doc ); + if ( !editIface ) return TQString(); + + view = view ? view : dynamic_cast( doc->widget() ); + + KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); + if ( !cursorIface ) return TQString(); + + uint line = 0; + uint col = 0; + cursorIface->cursorPositionReal(&line, &col); + + TQString linestr = editIface->textLine(line); + + int startPos = TQMAX( TQMIN( (int)col, (int)linestr.length()-1 ), 0 ); + int endPos = startPos; + startPos--; + while (startPos >= 0 && ( linestr[startPos].isLetterOrNumber() || linestr[startPos] == '_' || linestr[startPos] == '~') ) + startPos--; + while (endPos < (int)linestr.length() && ( linestr[endPos].isLetterOrNumber() || linestr[endPos] == '_' ) ) + endPos++; + + return ( ( startPos == endPos ) ? TQString() : linestr.mid( startPos+1, endPos-startPos-1 ) ); +} + + +TQString KDevEditorUtil::currentSelection( KTextEditor::Document * doc ) +{ + KTextEditor::SelectionInterface * selectIface = dynamic_cast( doc ); + return selectIface ? selectIface->selection() : TQString(); +} + + +// kate: space-indent off; indent-width 4; tab-width 4; show-tabs on; + diff --git a/lib/util/kdeveditorutil.h b/lib/util/kdeveditorutil.h new file mode 100644 index 00000000..79a64fe1 --- /dev/null +++ b/lib/util/kdeveditorutil.h @@ -0,0 +1,67 @@ +/*************************************************************************** + * Copyright (C) 2007 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program 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. * + * * + ***************************************************************************/ + +#ifndef KDEVEDITOR_H +#define KDEVEDITOR_H + +namespace KTextEditor +{ +class Document; +class View; +} + +#include + +/** +Class with some common utility operations not currently supported by KTE + + @author Jens Dagerbo +*/ +class KDevEditorUtil +{ + KDevEditorUtil() {} +public: + + /** + * + * @param line + * @param col + * @param doc + * @param view + * @return + */ + static bool currentPositionReal( unsigned int * line, unsigned int * col, KTextEditor::Document * doc, KTextEditor::View * view = 0 ); + + /** + * + * @param doc + * @param view + * @return + */ + static TQString currentLine( KTextEditor::Document * doc, KTextEditor::View * view = 0 ); + + /** + * Call to get the text under the cursor of the currently active view. + * @return the text under the cursor of the currently active view + */ + static TQString currentWord( KTextEditor::Document * doc, KTextEditor::View * view = 0 ); + + /** + * Call to get the selection in the currently active view + * @return the selection in the currently active view + */ + static TQString currentSelection( KTextEditor::Document * doc ); +}; + +#endif + + +// kate: space-indent off; indent-width 4; tab-width 4; show-tabs on; diff --git a/lib/util/kdevjobtimer.cpp b/lib/util/kdevjobtimer.cpp new file mode 100644 index 00000000..b0b78250 --- /dev/null +++ b/lib/util/kdevjobtimer.cpp @@ -0,0 +1,39 @@ +/*************************************************************************** + * Copyright (C) 2006 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program 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. * + * * + ***************************************************************************/ + +#include "kdevjobtimer.h" + +KDevJobTimer::KDevJobTimer( void * payload, TQObject *parent, const char *name) + : TQTimer(parent, name) +{ + m_payload = payload; + connect( this, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()) ); +} + +KDevJobTimer::~KDevJobTimer() +{ +} + +void KDevJobTimer::singleShot(int msec, TQObject * receiver, const char * member, void * payload) +{ + KDevJobTimer * p = new KDevJobTimer( payload ); + p->start( msec, true ); + connect( p, TQT_SIGNAL(timeout(void*)), receiver, member ); +} + +void KDevJobTimer::slotTimeout() +{ + emit timeout( m_payload ); + m_payload = 0; + deleteLater(); +} + +#include "kdevjobtimer.moc" diff --git a/lib/util/kdevjobtimer.h b/lib/util/kdevjobtimer.h new file mode 100644 index 00000000..b0fa829e --- /dev/null +++ b/lib/util/kdevjobtimer.h @@ -0,0 +1,40 @@ +/*************************************************************************** + * Copyright (C) 2006 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program 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. * + * * + ***************************************************************************/ + +#ifndef KDEVJOBTIMER_H +#define KDEVJOBTIMER_H + +#include + +class KDevJobTimer : public TQTimer +{ +Q_OBJECT + +public: + static void singleShot( int msec, TQObject * receiver, const char * member, void * payload ); + +signals: + void timeout(void*); + +private: + KDevJobTimer( void * payload, TQObject *parent = 0, const char *name = 0); + ~KDevJobTimer(); + +private slots: + void slotTimeout(); + +private: + void * m_payload; + +}; + + +#endif diff --git a/lib/util/kdevshellwidget.cpp b/lib/util/kdevshellwidget.cpp new file mode 100644 index 00000000..b9220250 --- /dev/null +++ b/lib/util/kdevshellwidget.cpp @@ -0,0 +1,125 @@ +/*************************************************************************** + * Copyright (C) 2006 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program 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. * + * * + ***************************************************************************/ + +#include +#include + +#include +#include +#include +#include +#include + +#include "kdevshellwidget.h" + +KDevShellWidget::KDevShellWidget(TQWidget *parent, const char *name) + : TQVBox(parent, name), m_doAutoActivate( false ), m_isRunning( false ) +{ +} + + +KDevShellWidget::~KDevShellWidget() +{ +} + +void KDevShellWidget::setShell( const TQString & shell, const TQStrList & arguments ) +{ + m_shellName = shell; + m_shellArguments = arguments; +} + +void KDevShellWidget::activate( ) +{ + KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart"); + if ( !factory ) return; + + m_konsolePart = (KParts::ReadOnlyPart *) factory->create( TQT_TQOBJECT(this), "libkonsolepart", "KParts::ReadOnlyPart" ); + if ( !m_konsolePart ) return; + + connect( m_konsolePart, TQT_SIGNAL( processExited(TDEProcess *) ), this, TQT_SLOT( processExited(TDEProcess *) ) ); + connect( m_konsolePart, TQT_SIGNAL( receivedData( const TQString& ) ), this, TQT_SIGNAL( receivedData( const TQString& ) ) ); + connect( m_konsolePart, TQT_SIGNAL(destroyed()), this, TQT_SLOT(partDestroyed()) ); + + m_konsolePart->widget()->setFocusPolicy( TQ_WheelFocus ); + setFocusProxy( m_konsolePart->widget() ); + m_konsolePart->widget()->setFocus(); + + if ( m_konsolePart->widget()->inherits(TQFRAME_OBJECT_NAME_STRING) ) + ((TQFrame*)m_konsolePart->widget())->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + + m_konsolePart->widget()->show(); + + TerminalInterface* ti = static_cast( m_konsolePart->tqt_cast( "TerminalInterface" ) ); + if( !ti ) return; + + if ( !m_shellName.isEmpty() ) + ti->startProgram( m_shellName, m_shellArguments ); + + m_isRunning = true; + +} + +void KDevShellWidget::partDestroyed( ) +{ + if ( m_doAutoActivate ) + { + activate(); + } +} + +void KDevShellWidget::processExited( TDEProcess * proc ) +{ + m_isRunning = false; + + if ( !proc ) return; + + kdDebug(9000) << proc->args() << endl; + + if ( proc->normalExit() ) + emit shellExited( proc->exitStatus() ); + else if ( proc->signalled() ) + emit shellSignalled( proc->exitSignal() ); +} + +void KDevShellWidget::sendInput( const TQString & text ) +{ + if ( !m_konsolePart ) return; + TerminalInterface* ti = static_cast( m_konsolePart->tqt_cast( "TerminalInterface" ) ); + if( !ti ) return; + + ti->sendInput( text ); +} + +bool KDevShellWidget::isRunning( ) +{ + return m_isRunning; +} + +void KDevShellWidget::setAutoReactivateOnClose( bool doAutoActivate ) +{ + // to auto reactivate can be dangerous, do it like this to avoid + // reactivating with a non-working setting (the partDestroyed() + // slot will have ran before m_doAutoActivate is set) + if ( doAutoActivate ) + TQTimer::singleShot( 3000, this, TQT_SLOT(setAutoReactivateOnCloseDelayed()) ); + else + m_doAutoActivate = false; +} + +void KDevShellWidget::setAutoReactivateOnCloseDelayed( ) +{ + m_doAutoActivate = true; +} + + +#include "kdevshellwidget.moc" + +// kate: space-indent off; indent-width 4; tab-width 4; show-tabs off; diff --git a/lib/util/kdevshellwidget.h b/lib/util/kdevshellwidget.h new file mode 100644 index 00000000..6bb6a8d7 --- /dev/null +++ b/lib/util/kdevshellwidget.h @@ -0,0 +1,101 @@ +/*************************************************************************** + * Copyright (C) 2006 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program 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. * + * * + ***************************************************************************/ + + +#ifndef KDEVSHELLWIDGET_H +#define KDEVSHELLWIDGET_H + +#include +#include +#include + +class TDEProcess; +namespace KParts +{ + class ReadOnlyPart; +} + +class KDevShellWidget : public TQVBox +{ + +Q_OBJECT + + +public: + KDevShellWidget(TQWidget *parent = 0, const char *name = 0); + virtual ~KDevShellWidget(); + + /** + * Stores the shell name and arguments, that will be used in @ref activate() + * @param shell The shell name, for example 'irb' or '/bin/bash' + * @param arguments Any optional arguments + */ + void setShell( const TQString & shell, const TQStrList & arguments = TQStrList() ); + + /** + * Executes the previously set shell. If @ref setShell wasn't called before + * konsolepart will decide what to use. + */ + void activate(); + + /** + * Should we auto launch the shell again if it was terminated? + * @param doAutoActivate + */ + void setAutoReactivateOnClose( bool doAutoActivate ); + + /** + * Send text to the running shell + * @param text The text to send to the shell + */ + void sendInput( const TQString & text ); + + /** + * Call to check if the shell is currently running + * @return true if the shell is currently running + */ + bool isRunning(); + +signals: + /** + * This signal will be emmitted when the started shell exits normally + * @param exitcode The return code of the process + */ + void shellExited( int exitcode ); + + /** + * This signal will be emitted when the started shell is terminated by a signal + * @param signalcode The signal the process was killed with + */ + void shellSignalled( int signalcode ); + + /** + * This signal will be emitted when the process receives data + * @param text received data + */ + void receivedData( const TQString & ); + +private slots: + void partDestroyed(); + void processExited( TDEProcess * ); + void setAutoReactivateOnCloseDelayed( ); + +private: + TQGuardedPtr m_konsolePart; + TQString m_shellName; + TQStrList m_shellArguments; + bool m_doAutoActivate; + bool m_isRunning; +}; + +#endif + +// kate: space-indent off; indent-width 4; tab-width 4; show-tabs off; diff --git a/lib/util/tdeveditorutil.cpp b/lib/util/tdeveditorutil.cpp deleted file mode 100644 index 455909f8..00000000 --- a/lib/util/tdeveditorutil.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program 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. * - * * - ***************************************************************************/ - -#include "tdeveditorutil.h" - -#include -#include -#include -#include -#include - -bool TDevEditorUtil::currentPositionReal( unsigned int * line, unsigned int * col, KTextEditor::Document * doc, KTextEditor::View * view ) -{ - if ( !line || !col ) return false; - - KTextEditor::EditInterface * editIface = dynamic_cast( doc ); - if ( !editIface ) return false; - - view = view ? view : dynamic_cast( doc->widget() ); - - KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); - if ( !cursorIface ) return false; - - cursorIface->cursorPositionReal( line, col ); - return true; -} - -TQString TDevEditorUtil::currentLine( KTextEditor::Document * doc, KTextEditor::View * view ) -{ - KTextEditor::EditInterface * editIface = dynamic_cast( doc ); - if ( !editIface ) return TQString(); - - view = view ? view : dynamic_cast( doc->widget() ); - - KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); - if ( !cursorIface ) return TQString(); - - uint line = 0; - uint col = 0; - cursorIface->cursorPositionReal(&line, &col); - - return editIface->textLine(line); -} - -TQString TDevEditorUtil::currentWord( KTextEditor::Document * doc, KTextEditor::View * view ) -{ - KTextEditor::EditInterface * editIface = dynamic_cast( doc ); - if ( !editIface ) return TQString(); - - view = view ? view : dynamic_cast( doc->widget() ); - - KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); - if ( !cursorIface ) return TQString(); - - uint line = 0; - uint col = 0; - cursorIface->cursorPositionReal(&line, &col); - - TQString linestr = editIface->textLine(line); - - int startPos = TQMAX( TQMIN( (int)col, (int)linestr.length()-1 ), 0 ); - int endPos = startPos; - startPos--; - while (startPos >= 0 && ( linestr[startPos].isLetterOrNumber() || linestr[startPos] == '_' || linestr[startPos] == '~') ) - startPos--; - while (endPos < (int)linestr.length() && ( linestr[endPos].isLetterOrNumber() || linestr[endPos] == '_' ) ) - endPos++; - - return ( ( startPos == endPos ) ? TQString() : linestr.mid( startPos+1, endPos-startPos-1 ) ); -} - - -TQString TDevEditorUtil::currentSelection( KTextEditor::Document * doc ) -{ - KTextEditor::SelectionInterface * selectIface = dynamic_cast( doc ); - return selectIface ? selectIface->selection() : TQString(); -} - - -// kate: space-indent off; indent-width 4; tab-width 4; show-tabs on; - diff --git a/lib/util/tdeveditorutil.h b/lib/util/tdeveditorutil.h deleted file mode 100644 index d69e914b..00000000 --- a/lib/util/tdeveditorutil.h +++ /dev/null @@ -1,67 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program 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. * - * * - ***************************************************************************/ - -#ifndef TDEVEDITOR_H -#define TDEVEDITOR_H - -namespace KTextEditor -{ -class Document; -class View; -} - -#include - -/** -Class with some common utility operations not currently supported by KTE - - @author Jens Dagerbo -*/ -class TDevEditorUtil -{ - TDevEditorUtil() {} -public: - - /** - * - * @param line - * @param col - * @param doc - * @param view - * @return - */ - static bool currentPositionReal( unsigned int * line, unsigned int * col, KTextEditor::Document * doc, KTextEditor::View * view = 0 ); - - /** - * - * @param doc - * @param view - * @return - */ - static TQString currentLine( KTextEditor::Document * doc, KTextEditor::View * view = 0 ); - - /** - * Call to get the text under the cursor of the currently active view. - * @return the text under the cursor of the currently active view - */ - static TQString currentWord( KTextEditor::Document * doc, KTextEditor::View * view = 0 ); - - /** - * Call to get the selection in the currently active view - * @return the selection in the currently active view - */ - static TQString currentSelection( KTextEditor::Document * doc ); -}; - -#endif - - -// kate: space-indent off; indent-width 4; tab-width 4; show-tabs on; diff --git a/lib/util/tdevjobtimer.cpp b/lib/util/tdevjobtimer.cpp deleted file mode 100644 index 0e1465e0..00000000 --- a/lib/util/tdevjobtimer.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program 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. * - * * - ***************************************************************************/ - -#include "tdevjobtimer.h" - -TDevJobTimer::TDevJobTimer( void * payload, TQObject *parent, const char *name) - : TQTimer(parent, name) -{ - m_payload = payload; - connect( this, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()) ); -} - -TDevJobTimer::~TDevJobTimer() -{ -} - -void TDevJobTimer::singleShot(int msec, TQObject * receiver, const char * member, void * payload) -{ - TDevJobTimer * p = new TDevJobTimer( payload ); - p->start( msec, true ); - connect( p, TQT_SIGNAL(timeout(void*)), receiver, member ); -} - -void TDevJobTimer::slotTimeout() -{ - emit timeout( m_payload ); - m_payload = 0; - deleteLater(); -} - -#include "tdevjobtimer.moc" diff --git a/lib/util/tdevjobtimer.h b/lib/util/tdevjobtimer.h deleted file mode 100644 index 313e56e5..00000000 --- a/lib/util/tdevjobtimer.h +++ /dev/null @@ -1,40 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program 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. * - * * - ***************************************************************************/ - -#ifndef TDEVJOBTIMER_H -#define TDEVJOBTIMER_H - -#include - -class TDevJobTimer : public TQTimer -{ -Q_OBJECT - -public: - static void singleShot( int msec, TQObject * receiver, const char * member, void * payload ); - -signals: - void timeout(void*); - -private: - TDevJobTimer( void * payload, TQObject *parent = 0, const char *name = 0); - ~TDevJobTimer(); - -private slots: - void slotTimeout(); - -private: - void * m_payload; - -}; - - -#endif diff --git a/lib/util/tdevshellwidget.cpp b/lib/util/tdevshellwidget.cpp deleted file mode 100644 index b5b8d195..00000000 --- a/lib/util/tdevshellwidget.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program 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. * - * * - ***************************************************************************/ - -#include -#include - -#include -#include -#include -#include -#include - -#include "tdevshellwidget.h" - -TDevShellWidget::TDevShellWidget(TQWidget *parent, const char *name) - : TQVBox(parent, name), m_doAutoActivate( false ), m_isRunning( false ) -{ -} - - -TDevShellWidget::~TDevShellWidget() -{ -} - -void TDevShellWidget::setShell( const TQString & shell, const TQStrList & arguments ) -{ - m_shellName = shell; - m_shellArguments = arguments; -} - -void TDevShellWidget::activate( ) -{ - KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart"); - if ( !factory ) return; - - m_konsolePart = (KParts::ReadOnlyPart *) factory->create( TQT_TQOBJECT(this), "libkonsolepart", "KParts::ReadOnlyPart" ); - if ( !m_konsolePart ) return; - - connect( m_konsolePart, TQT_SIGNAL( processExited(TDEProcess *) ), this, TQT_SLOT( processExited(TDEProcess *) ) ); - connect( m_konsolePart, TQT_SIGNAL( receivedData( const TQString& ) ), this, TQT_SIGNAL( receivedData( const TQString& ) ) ); - connect( m_konsolePart, TQT_SIGNAL(destroyed()), this, TQT_SLOT(partDestroyed()) ); - - m_konsolePart->widget()->setFocusPolicy( TQ_WheelFocus ); - setFocusProxy( m_konsolePart->widget() ); - m_konsolePart->widget()->setFocus(); - - if ( m_konsolePart->widget()->inherits(TQFRAME_OBJECT_NAME_STRING) ) - ((TQFrame*)m_konsolePart->widget())->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - - m_konsolePart->widget()->show(); - - TerminalInterface* ti = static_cast( m_konsolePart->tqt_cast( "TerminalInterface" ) ); - if( !ti ) return; - - if ( !m_shellName.isEmpty() ) - ti->startProgram( m_shellName, m_shellArguments ); - - m_isRunning = true; - -} - -void TDevShellWidget::partDestroyed( ) -{ - if ( m_doAutoActivate ) - { - activate(); - } -} - -void TDevShellWidget::processExited( TDEProcess * proc ) -{ - m_isRunning = false; - - if ( !proc ) return; - - kdDebug(9000) << proc->args() << endl; - - if ( proc->normalExit() ) - emit shellExited( proc->exitStatus() ); - else if ( proc->signalled() ) - emit shellSignalled( proc->exitSignal() ); -} - -void TDevShellWidget::sendInput( const TQString & text ) -{ - if ( !m_konsolePart ) return; - TerminalInterface* ti = static_cast( m_konsolePart->tqt_cast( "TerminalInterface" ) ); - if( !ti ) return; - - ti->sendInput( text ); -} - -bool TDevShellWidget::isRunning( ) -{ - return m_isRunning; -} - -void TDevShellWidget::setAutoReactivateOnClose( bool doAutoActivate ) -{ - // to auto reactivate can be dangerous, do it like this to avoid - // reactivating with a non-working setting (the partDestroyed() - // slot will have ran before m_doAutoActivate is set) - if ( doAutoActivate ) - TQTimer::singleShot( 3000, this, TQT_SLOT(setAutoReactivateOnCloseDelayed()) ); - else - m_doAutoActivate = false; -} - -void TDevShellWidget::setAutoReactivateOnCloseDelayed( ) -{ - m_doAutoActivate = true; -} - - -#include "tdevshellwidget.moc" - -// kate: space-indent off; indent-width 4; tab-width 4; show-tabs off; diff --git a/lib/util/tdevshellwidget.h b/lib/util/tdevshellwidget.h deleted file mode 100644 index f6476814..00000000 --- a/lib/util/tdevshellwidget.h +++ /dev/null @@ -1,101 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program 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. * - * * - ***************************************************************************/ - - -#ifndef TDEVSHELLWIDGET_H -#define TDEVSHELLWIDGET_H - -#include -#include -#include - -class TDEProcess; -namespace KParts -{ - class ReadOnlyPart; -} - -class TDevShellWidget : public TQVBox -{ - -Q_OBJECT - - -public: - TDevShellWidget(TQWidget *parent = 0, const char *name = 0); - virtual ~TDevShellWidget(); - - /** - * Stores the shell name and arguments, that will be used in @ref activate() - * @param shell The shell name, for example 'irb' or '/bin/bash' - * @param arguments Any optional arguments - */ - void setShell( const TQString & shell, const TQStrList & arguments = TQStrList() ); - - /** - * Executes the previously set shell. If @ref setShell wasn't called before - * konsolepart will decide what to use. - */ - void activate(); - - /** - * Should we auto launch the shell again if it was terminated? - * @param doAutoActivate - */ - void setAutoReactivateOnClose( bool doAutoActivate ); - - /** - * Send text to the running shell - * @param text The text to send to the shell - */ - void sendInput( const TQString & text ); - - /** - * Call to check if the shell is currently running - * @return true if the shell is currently running - */ - bool isRunning(); - -signals: - /** - * This signal will be emmitted when the started shell exits normally - * @param exitcode The return code of the process - */ - void shellExited( int exitcode ); - - /** - * This signal will be emitted when the started shell is terminated by a signal - * @param signalcode The signal the process was killed with - */ - void shellSignalled( int signalcode ); - - /** - * This signal will be emitted when the process receives data - * @param text received data - */ - void receivedData( const TQString & ); - -private slots: - void partDestroyed(); - void processExited( TDEProcess * ); - void setAutoReactivateOnCloseDelayed( ); - -private: - TQGuardedPtr m_konsolePart; - TQString m_shellName; - TQStrList m_shellArguments; - bool m_doAutoActivate; - bool m_isRunning; -}; - -#endif - -// kate: space-indent off; indent-width 4; tab-width 4; show-tabs off; diff --git a/lib/widgets/CMakeLists.txt b/lib/widgets/CMakeLists.txt index 86303b6d..30e0ba3e 100644 --- a/lib/widgets/CMakeLists.txt +++ b/lib/widgets/CMakeLists.txt @@ -28,22 +28,22 @@ link_directories( install( FILES tdelistviewaction.h qcomboview.h flagboxes.h ksavealldialog.h resizablecombo.h kcomboview.h - tdevhtmlpart.h processlinemaker.h processwidget.h + kdevhtmlpart.h processlinemaker.h processwidget.h fancylistviewitem.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/widgets ) ##### other data ################################ -install( FILES tdevhtml_partui.rc DESTINATION ${DATA_INSTALL_DIR}/tdevelop ) +install( FILES kdevhtml_partui.rc DESTINATION ${DATA_INSTALL_DIR}/tdevelop ) -##### tdevwidgets (shared) ###################### +##### kdevwidgets (shared) ###################### -tde_add_library( tdevwidgets SHARED AUTOMOC +tde_add_library( kdevwidgets SHARED AUTOMOC SOURCES flagboxes.cpp qcomboview.cpp tdelistviewaction.cpp - kcomboview.cpp resizablecombo.cpp tdevhtmlpart.cpp + kcomboview.cpp resizablecombo.cpp kdevhtmlpart.cpp processlinemaker.cpp processwidget.cpp ksavealldialog.cpp fancylistviewitem.cpp VERSION 0.0.0 diff --git a/lib/widgets/Makefile.am b/lib/widgets/Makefile.am index 7181151e..69be7a11 100644 --- a/lib/widgets/Makefile.am +++ b/lib/widgets/Makefile.am @@ -2,29 +2,29 @@ INCLUDES = -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/interfaces $(all_inclu METASOURCES = AUTO -lib_LTLIBRARIES = libtdevwidgets.la +lib_LTLIBRARIES = libkdevwidgets.la -tdevwidgetsincludedir = $(includedir)/tdevelop/widgets +kdevwidgetsincludedir = $(includedir)/tdevelop/widgets -libtdevwidgets_la_SOURCES = flagboxes.cpp qcomboview.cpp tdelistviewaction.cpp \ - kcomboview.cpp resizablecombo.cpp tdevhtmlpart.cpp processlinemaker.cpp \ +libkdevwidgets_la_SOURCES = flagboxes.cpp qcomboview.cpp tdelistviewaction.cpp \ + kcomboview.cpp resizablecombo.cpp kdevhtmlpart.cpp processlinemaker.cpp \ processwidget.cpp ksavealldialog.cpp fancylistviewitem.cpp -tdevwidgetsinclude_HEADERS = tdelistviewaction.h qcomboview.h flagboxes.h \ - ksavealldialog.h resizablecombo.h kcomboview.h tdevhtmlpart.h processlinemaker.h \ +kdevwidgetsinclude_HEADERS = tdelistviewaction.h qcomboview.h flagboxes.h \ + ksavealldialog.h resizablecombo.h kcomboview.h kdevhtmlpart.h processlinemaker.h \ processwidget.h fancylistviewitem.h SUBDIRS = propeditor -libtdevwidgets_la_LIBADD = $(top_builddir)/lib/interfaces/libtdevinterfaces.la -libtdevwidgets_la_LDFLAGS = -no-undefined $(all_libraries) +libkdevwidgets_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la +libkdevwidgets_la_LDFLAGS = -no-undefined $(all_libraries) rcdir = $(kde_datadir)/tdevelop -rc_DATA = tdevhtml_partui.rc +rc_DATA = kdevhtml_partui.rc -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces -DOXYGEN_PROJECTNAME = TDevelop Widgets Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces +DOXYGEN_PROJECTNAME = KDevelop Widgets Library +DOXYGEN_DOCDIRPREFIX = kdev include ../../Doxyfile.am diff --git a/lib/widgets/kdevhtml_partui.rc b/lib/widgets/kdevhtml_partui.rc new file mode 100644 index 00000000..5a55b7bf --- /dev/null +++ b/lib/widgets/kdevhtml_partui.rc @@ -0,0 +1,18 @@ + + + + + &File + + + + + + + + + + + + + diff --git a/lib/widgets/kdevhtmlpart.cpp b/lib/widgets/kdevhtmlpart.cpp new file mode 100644 index 00000000..76697cfa --- /dev/null +++ b/lib/widgets/kdevhtmlpart.cpp @@ -0,0 +1,512 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +#include "kdevhtmlpart.h" + +KDevHTMLPart::KDevHTMLPart() + : TDEHTMLPart(0L, 0L, 0L, "KDevHTMLPart", DefaultGUI ) +{ + setXMLFile(locate("data", "tdevelop/kdevhtml_partui.rc"), true); + + connect(browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &,const KParts::URLArgs &)), + this, TQT_SLOT(openURLRequest(const KURL &)) ); + + connect(this, TQT_SIGNAL(started(TDEIO::Job *)), this, TQT_SLOT(slotStarted(TDEIO::Job* ))); + connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(slotCompleted())); + connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotCancelled(const TQString &))); + + TDEActionCollection * actions = actionCollection();// new TDEActionCollection( this ); + reloadAction = new TDEAction( i18n( "Reload" ), "reload", 0, + this, TQT_SLOT( slotReload() ), actions, "doc_reload" ); + reloadAction->setWhatsThis(i18n("Reload

    Reloads the current document.")); + stopAction = new TDEAction( i18n( "Stop" ), "stop", 0, + this, TQT_SLOT( slotStop() ), actions, "doc_stop" ); + stopAction->setWhatsThis(i18n("Stop

    Stops the loading of current document.")); + duplicateAction = new TDEAction( i18n( "Duplicate Tab" ), "window_new", 0, + this, TQT_SLOT( slotDuplicate() ), actions, "doc_dup" ); + duplicateAction->setWhatsThis(i18n("Duplicate window

    Opens current document in a new window.")); + printAction = KStdAction::print(this, TQT_SLOT(slotPrint()), actions, "print_doc"); + copyAction = KStdAction::copy(this, TQT_SLOT(slotCopy()), actions, "copy_doc_selection"); + + connect( this, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(popup(const TQString &, const TQPoint &))); + connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); + +//BEGIN documentation history stuff + + m_backAction = new TDEToolBarPopupAction(i18n("Back"), "back", 0, + this, TQT_SLOT(slotBack()), + actions, "browser_back"); + m_backAction->setEnabled( false ); + m_backAction->setToolTip(i18n("Back")); + m_backAction->setWhatsThis(i18n("Back

    Moves backwards one step in the documentation browsing history.")); + + connect(m_backAction->popupMenu(), TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(slotBackAboutToShow())); + connect(m_backAction->popupMenu(), TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPopupActivated(int))); + + m_forwardAction = new TDEToolBarPopupAction(i18n("Forward"), "forward", 0, + this, TQT_SLOT(slotForward()), + actions, "browser_forward"); + m_forwardAction->setEnabled( false ); + m_forwardAction->setToolTip(i18n("Forward")); + m_forwardAction->setWhatsThis(i18n("Forward

    Moves forward one step in the documentation browsing history.")); + + connect(m_forwardAction->popupMenu(), TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(slotForwardAboutToShow())); + connect(m_forwardAction->popupMenu(), TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPopupActivated(int))); + + m_restoring = false; + m_Current = m_history.end(); +//END documentation history stuff + + //settings: + TDEConfig *appConfig = TDEGlobal::config(); + appConfig->setGroup("TDEHTMLPart"); + setStandardFont(appConfig->readEntry("StandardFont", + settings()->stdFontName())); + setFixedFont(appConfig->readEntry("FixedFont", + settings()->fixedFontName())); + setZoomFactor(appConfig->readEntry("Zoom", "100").toInt()); +} + +void KDevHTMLPart::popup( const TQString & url, const TQPoint & p ) +{ +// TDEPopupMenu popup( i18n( "Documentation Viewer" ), this->widget() ); + TDEPopupMenu popup(this->widget()); + + bool needSep = false; + int idNewWindow = -2; + if (!url.isEmpty() && (m_options & CanOpenInNewWindow)) + { + idNewWindow = popup.insertItem(SmallIcon("window_new"),i18n("Open in New Tab")); + popup.TQMenuData::setWhatsThis(idNewWindow, i18n("Open in new window

    Opens current link in a new window.")); + needSep = true; + } + if (m_options & CanDuplicate) + { + duplicateAction->plug(&popup); + needSep = true; + } + if (needSep) + popup.insertSeparator(); + + m_backAction->plug( &popup ); + m_forwardAction->plug( &popup ); + reloadAction->plug(&popup); +// stopAction->plug(&popup); + popup.insertSeparator(); + + copyAction->plug( &popup ); + popup.insertSeparator(); + + printAction->plug(&popup); + popup.insertSeparator(); + + TDEAction * incFontAction = this->action("incFontSizes"); + TDEAction * decFontAction = this->action("decFontSizes"); + if ( incFontAction && decFontAction ) + { + incFontAction->plug( &popup ); + decFontAction->plug( &popup ); + popup.insertSeparator(); + } + + TDEAction *ac = action("setEncoding"); + if (ac) + ac->plug(&popup); + + int r = popup.exec(p); + + if (r == idNewWindow) + { + KURL kurl; + if (!KURL(url).path().startsWith("/")) + { + kdDebug() << "processing relative url: " << url << endl; + if (url.startsWith("#")) + { + kurl = KURL(KDevHTMLPart::url()); + kurl.setRef(url.mid(1)); + } + else + kurl = KURL(KDevHTMLPart::url().upURL().url(true)+url); + } + else + kurl = KURL(url); + + if (kurl.isValid()) + slotOpenInNewWindow(kurl); + } +} + +void KDevHTMLPart::setContext(const TQString &context) +{ + m_context = context; +} + + +TQString KDevHTMLPart::context() const +{ + return m_context; +} + + +// Note: this function is a copy of code in tdecore/tdeconfigbase.cpp ;) +static bool isUtf8(const char *buf) { + int i, n; + register unsigned char c; + bool gotone = false; + +#define F 0 /* character never appears in text */ +#define T 1 /* character appears in plain ASCII text */ +#define I 2 /* character appears in ISO-8859 text */ +#define X 3 /* character appears in non-ISO extended ASCII (Mac, IBM PC) */ + + static const unsigned char text_chars[256] = { + /* BEL BS HT LF FF CR */ + F, F, F, F, F, F, F, T, T, T, T, F, T, T, F, F, /* 0x0X */ + /* ESC */ + F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, /* 0x1X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x2X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x3X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x4X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x5X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x6X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, F, /* 0x7X */ + /* NEL */ + X, X, X, X, X, T, X, X, X, X, X, X, X, X, X, X, /* 0x8X */ + X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, /* 0x9X */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xaX */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xbX */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xcX */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xdX */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xeX */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I /* 0xfX */ + }; + + /* *ulen = 0; */ + for (i = 0; (c = buf[i]); i++) { + if ((c & 0x80) == 0) { /* 0xxxxxxx is plain ASCII */ + /* + * Even if the whole file is valid UTF-8 sequences, + * still reject it if it uses weird control characters. + */ + + if (text_chars[c] != T) + return false; + + } else if ((c & 0x40) == 0) { /* 10xxxxxx never 1st byte */ + return false; + } else { /* 11xxxxxx begins UTF-8 */ + int following; + + if ((c & 0x20) == 0) { /* 110xxxxx */ + following = 1; + } else if ((c & 0x10) == 0) { /* 1110xxxx */ + following = 2; + } else if ((c & 0x08) == 0) { /* 11110xxx */ + following = 3; + } else if ((c & 0x04) == 0) { /* 111110xx */ + following = 4; + } else if ((c & 0x02) == 0) { /* 1111110x */ + following = 5; + } else + return false; + + for (n = 0; n < following; n++) { + i++; + if (!(c = buf[i])) + goto done; + + if ((c & 0x80) == 0 || (c & 0x40)) + return false; + } + gotone = true; + } + } +done: + return gotone; /* don't claim it's UTF-8 if it's all 7-bit */ +} +#undef F +#undef T +#undef I +#undef X + +TQString KDevHTMLPart::resolveEnvVarsInURL(const TQString& url) +{ + // check for environment variables and make necessary translations + TQString path = url; + int nDollarPos = path.find( '$' ); + + // Note: the while loop below is a copy of code in tdecore/tdeconfigbase.cpp ;) + while( nDollarPos != -1 && nDollarPos+1 < static_cast(path.length())) { + // there is at least one $ + if( (path)[nDollarPos+1] == '(' ) { + uint nEndPos = nDollarPos+1; + // the next character is no $ + while ( (nEndPos <= path.length()) && (path[nEndPos]!=')') ) + nEndPos++; + nEndPos++; + TQString cmd = path.mid( nDollarPos+2, nEndPos-nDollarPos-3 ); + + TQString result; + FILE *fs = popen(TQFile::encodeName(cmd).data(), "r"); + if (fs) + { + TQTextStream ts(fs, IO_ReadOnly); + result = ts.read().stripWhiteSpace(); + pclose(fs); + } + path.replace( nDollarPos, nEndPos-nDollarPos, result ); + } else if( (path)[nDollarPos+1] != '$' ) { + uint nEndPos = nDollarPos+1; + // the next character is no $ + TQString aVarName; + if (path[nEndPos]=='{') + { + while ( (nEndPos <= path.length()) && (path[nEndPos]!='}') ) + nEndPos++; + nEndPos++; + aVarName = path.mid( nDollarPos+2, nEndPos-nDollarPos-3 ); + } + else + { + while ( nEndPos <= path.length() && (path[nEndPos].isNumber() + || path[nEndPos].isLetter() || path[nEndPos]=='_' ) ) + nEndPos++; + aVarName = path.mid( nDollarPos+1, nEndPos-nDollarPos-1 ); + } + const char* pEnv = 0; + if (!aVarName.isEmpty()) + pEnv = getenv( aVarName.ascii() ); + if( pEnv ) { + // !!! Sergey A. Sukiyazov !!! + // A environment variables may contain values in 8bit + // locale cpecified encoding or in UTF8 encoding. + if (isUtf8( pEnv )) + path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromUtf8(pEnv) ); + else + path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromLocal8Bit(pEnv) ); + } else + path.remove( nDollarPos, nEndPos-nDollarPos ); + } else { + // remove one of the dollar signs + path.remove( nDollarPos, 1 ); + nDollarPos++; + } + nDollarPos = path.find( '$', nDollarPos ); + } + + return path; +} + +bool KDevHTMLPart::openURL(const KURL &url) +{ + TQString path = resolveEnvVarsInURL(url.url()); + KURL newUrl(path); + + bool retval = TDEHTMLPart::openURL(newUrl); + if ( retval ) + { + emit fileNameChanged(this); + if ( !m_restoring ) + { + addHistoryEntry(); + } + } + + m_backAction->setEnabled( m_Current != m_history.begin() ); + m_forwardAction->setEnabled( m_Current != m_history.fromLast() ); + + return retval; +} + +void KDevHTMLPart::openURLRequest(const KURL &url) +{ + openURL( url ); +} + +void KDevHTMLPart::slotReload( ) +{ + openURL( url() ); +} + +void KDevHTMLPart::slotStop( ) +{ + closeURL(); +} + +void KDevHTMLPart::slotStarted( TDEIO::Job * ) +{ + stopAction->setEnabled(true); +} + +void KDevHTMLPart::slotCompleted( ) +{ + stopAction->setEnabled(false); +} + +void KDevHTMLPart::slotCancelled( const TQString & /*errMsg*/ ) +{ + stopAction->setEnabled(false); +} + +/*void KDevHTMLPart::slotDuplicate( ) +{ + PartController::getInstance()->showDocument(url(), true); +}*/ + +void KDevHTMLPart::slotPrint( ) +{ + view()->print(); +} + +void KDevHTMLPart::slotBack() +{ + if ( m_Current != m_history.begin() ) + { + --m_Current; + m_restoring = true; + openURL( (*m_Current).url ); + m_restoring = false; + } +} + +void KDevHTMLPart::slotForward() +{ + if ( m_Current != m_history.fromLast() ) + { + ++m_Current; + m_restoring = true; + openURL( (*m_Current).url ); + m_restoring = false; + } +} + +void KDevHTMLPart::slotBackAboutToShow() +{ + TDEPopupMenu *popup = m_backAction->popupMenu(); + popup->clear(); + + if ( m_Current == m_history.begin() ) return; + + TQValueList::Iterator it = m_Current; + --it; + + int i = 0; + while( i < 10 ) + { + if ( it == m_history.begin() ) + { + popup->insertItem( (*it).url.url(), (*it).id ); + return; + } + + popup->insertItem( (*it).url.url(), (*it).id ); + ++i; + --it; + } +} + +void KDevHTMLPart::slotForwardAboutToShow() +{ + TDEPopupMenu *popup = m_forwardAction->popupMenu(); + popup->clear(); + + if ( m_Current == m_history.fromLast() ) return; + + TQValueList::Iterator it = m_Current; + ++it; + + int i = 0; + while( i < 10 ) + { + if ( it == m_history.fromLast() ) + { + popup->insertItem( (*it).url.url(), (*it).id ); + return; + } + + popup->insertItem( (*it).url.url(), (*it).id ); + ++i; + ++it; + } +} + +void KDevHTMLPart::slotPopupActivated( int id ) +{ + kdDebug(9000) << "id: " << id << endl; + + TQValueList::Iterator it = m_history.begin(); + while( it != m_history.end() ) + { + kdDebug(9000) << "(*it).id: " << (*it).id << endl; + if ( (*it).id == id ) + { + m_Current = it; + m_restoring = true; + openURL( (*m_Current).url ); + m_restoring = false; + return; + } + ++it; + } +} + +void KDevHTMLPart::addHistoryEntry() +{ + TQValueList::Iterator it = m_Current; + + // if We're not already the last entry, we truncate the list here before adding an entry + if ( it != m_history.end() && it != m_history.fromLast() ) + { + m_history.erase( ++it, m_history.end() ); + } + + DocumentationHistoryEntry newEntry( url() ); + + // Only save the new entry if it is different from the last + if ( newEntry.url != (*m_Current).url ) + { + m_history.append( newEntry ); + m_Current = m_history.fromLast(); + } +} + +void KDevHTMLPart::slotCopy( ) +{ + TQString text = selectedText(); + text.replace( TQChar( 0xa0 ), ' ' ); + TQClipboard *cb = TQApplication::clipboard(); + disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); + cb->setText(text); + connect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); +} + +void KDevHTMLPart::slotSelectionChanged( ) +{ + if (selectedText().isEmpty()) + copyAction->setEnabled(false); + else + copyAction->setEnabled(true); +} + +#include "kdevhtmlpart.moc" diff --git a/lib/widgets/kdevhtmlpart.h b/lib/widgets/kdevhtmlpart.h new file mode 100644 index 00000000..6c8f7dc3 --- /dev/null +++ b/lib/widgets/kdevhtmlpart.h @@ -0,0 +1,111 @@ +#ifndef __KDEVHTMLPART_H__ +#define __KDEVHTMLPART_H__ + +#include + +#include + +#include + +/** +@file kdevhtmlpart.h +Customized TDEHTML part for KDevelop. +*/ + +class TDEAction; +class TDEToolBarPopupAction; + +struct DocumentationHistoryEntry { + KURL url; + int id; + + DocumentationHistoryEntry() {} + DocumentationHistoryEntry( const KURL& u ): url( u ) + { + id = abs( TQTime::currentTime().msecsTo( TQTime() ) ); // nasty, but should provide a reasonably unique number + } +}; + +/** +Customized TDEHTML part for KDevelop. +Used as HTML documentation and file viewer. + +Represents customized BrowserViewGUI mode of TDEHTMLPart. Provides also actions for: +- reload; +- stop; +- duplicate; +- print; +- copy text; +- back; +- forward. +. +It has it's own popup menu and font/zoom settings. +*/ +class KDevHTMLPart : public TDEHTMLPart +{ + Q_OBJECT + + +public: + + enum Options { CanDuplicate=1, CanOpenInNewWindow=2 }; + + KDevHTMLPart(); + + void setContext(const TQString &context); + TQString context() const; + virtual bool openURL(const KURL &url); + static TQString resolveEnvVarsInURL(const TQString& url); + + void setOptions(int options) { m_options = options; } + +signals: + void fileNameChanged(KParts::ReadOnlyPart *part); + +protected slots: + + void slotStarted(TDEIO::Job *); + void slotCompleted(); + void slotCancelled(const TQString &errMsg); + + void openURLRequest(const KURL &url); + void popup( const TQString & url, const TQPoint & p ); + + void slotReload(); + void slotStop(); + virtual void slotDuplicate() = 0; + virtual void slotOpenInNewWindow(const KURL &url) = 0; + void slotPrint(); + void slotCopy(); + void slotSelectionChanged(); + + void slotBack(); + void slotForward(); + void slotBackAboutToShow(); + void slotForwardAboutToShow(); + + void slotPopupActivated( int id ); + void addHistoryEntry(); + + +private: + + TQValueList< DocumentationHistoryEntry > m_history; + TQValueList< DocumentationHistoryEntry >::Iterator m_Current; + + TDEToolBarPopupAction* m_backAction; + TDEToolBarPopupAction* m_forwardAction; + + bool m_restoring; + + TQString m_context; + TDEAction *stopAction; + TDEAction *reloadAction; + TDEAction *duplicateAction; + TDEAction *printAction; + TDEAction *copyAction; + + int m_options; +}; + +#endif diff --git a/lib/widgets/kdevtabwidget.cpp b/lib/widgets/kdevtabwidget.cpp new file mode 100644 index 00000000..33c9f733 --- /dev/null +++ b/lib/widgets/kdevtabwidget.cpp @@ -0,0 +1,66 @@ +/*************************************************************************** + * Copyright (C) 2001-2003 * + * The KDevelop Team * + * * + * This program 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. * + * * + ***************************************************************************/ + +#include + +#include +#include +#include +#include + +#include "kdevtabwidget.h" + +KDevTabWidget::KDevTabWidget(TQWidget *parent, const char *name) : TQTabWidget(parent,name) +{ + m_pTabBar = new KTabBar(this, "tabbar"); + setTabBar(m_pTabBar); + connect(m_pTabBar, TQT_SIGNAL(closeWindow(const TQWidget*)), this, TQT_SIGNAL(closeWindow(const TQWidget*))); + connect(m_pTabBar, TQT_SIGNAL(closeOthers(TQWidget*)), this, TQT_SIGNAL(closeOthers(TQWidget*))); +} + +KTabBar::KTabBar(TQWidget *parent, const char *name) : TQTabBar(parent,name) +{ + m_pPopupMenu = new TQPopupMenu(this); + + TQPixmap closePixmap = TDEGlobal::instance()->iconLoader()->loadIcon( "tab_remove", TDEIcon::Small, 0, TDEIcon::DefaultState, 0, true ); + if (closePixmap.isNull()) + closePixmap = SmallIcon("fileclose"); + + m_pPopupMenu->insertItem(closePixmap, i18n("&Close"), this, TQT_SLOT(closeWindowSlot())); + m_pPopupMenu->insertItem(i18n("Close &Others"), this, TQT_SLOT(closeOthersSlot())); +} + +void KTabBar::closeWindowSlot() +{ + emit closeWindow(m_pPage); +} + +void KTabBar::closeOthersSlot() +{ + emit closeOthers(m_pPage); +} + +void KTabBar::mousePressEvent(TQMouseEvent *e) +{ + if(e->button() == Qt::RightButton) { + + TQTab *tab = selectTab(e->pos() ); + if( tab == 0L ) return; + + m_pPage = ((KDevTabWidget*)parent())->page(indexOf(tab->identifier() ) ); + if(m_pPage == 0L) return; + + m_pPopupMenu->exec(mapToGlobal(e->pos())); + } + TQTabBar::mousePressEvent(e); +} + +#include "kdevtabwidget.moc" diff --git a/lib/widgets/propeditor/CMakeLists.txt b/lib/widgets/propeditor/CMakeLists.txt index 1cffb908..2620aaa0 100644 --- a/lib/widgets/propeditor/CMakeLists.txt +++ b/lib/widgets/propeditor/CMakeLists.txt @@ -38,9 +38,9 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/propeditor ) -##### tdevpropertyeditor (shared) ############### +##### kdevpropertyeditor (shared) ############### -tde_add_library( tdevpropertyeditor SHARED AUTOMOC +tde_add_library( kdevpropertyeditor SHARED AUTOMOC SOURCES childproperty.cpp pcombobox.cpp pdummywidget.cpp ppointedit.cpp propertymachinefactory.cpp diff --git a/lib/widgets/propeditor/Makefile.am b/lib/widgets/propeditor/Makefile.am index a01eb4d3..e07d5c69 100644 --- a/lib/widgets/propeditor/Makefile.am +++ b/lib/widgets/propeditor/Makefile.am @@ -1,18 +1,18 @@ INCLUDES = -I$(top_srcdir)/lib/compat $(all_includes) METASOURCES = AUTO -lib_LTLIBRARIES = libtdevpropertyeditor.la -libtdevpropertyeditor_la_LIBADD = $(LIB_TDEIO) -libtdevpropertyeditor_la_LDFLAGS = -no-undefined $(all_libraries) -libtdevpropertyeditor_la_SOURCES = childproperty.cpp pcombobox.cpp pdummywidget.cpp ppointedit.cpp propertymachinefactory.cpp pstringlistedit.cpp\ +lib_LTLIBRARIES = libkdevpropertyeditor.la +libkdevpropertyeditor_la_LIBADD = $(LIB_TDEIO) +libkdevpropertyeditor_la_LDFLAGS = -no-undefined $(all_libraries) +libkdevpropertyeditor_la_SOURCES = childproperty.cpp pcombobox.cpp pdummywidget.cpp ppointedit.cpp propertymachinefactory.cpp pstringlistedit.cpp\ multiproperty.cpp pcursoredit.cpp pfontbutton.cpp prectedit.cpp propertywidget.cpp psymbolcombo.cpp\ pcheckbox.cpp pdateedit.cpp pfontcombo.cpp property.cpp psizeedit.cpp purledit.cpp\ pcolorbutton.cpp pdatetimeedit.cpp plineedit.cpp propertyeditor.cpp psizepolicyedit.cpp pyesnobutton.cpp\ pcolorcombo.cpp pdoublenuminput.cpp ppixmapedit.cpp propertylist.cpp pspinbox.cpp propertywidgetproxy.cpp plinestyleedit.cpp qeditlistbox.cpp -tdevpropeditorincludedir = $(includedir)/tdevelop/propeditor -tdevpropeditorinclude_HEADERS = childproperty.h pcombobox.h pdummywidget.h ppointedit.h propertymachinefactory.h pcursoredit.h pfontbutton.h prectedit.h propertywidget.h pdateedit.h pfontcombo.h property.h psizeedit.h pdatetimeedit.h plineedit.h propertyeditor.h psizepolicyedit.h pdoublenuminput.h ppixmapedit.h propertylist.h pspinbox.h propertywidgetproxy.h multiproperty.h pyesnobutton.h purledit.h psymbolcombo.h pstringlistedit.h pcolorcombo.h pcolorbutton.h pcheckbox.h plinestyleedit.h +kdevpropeditorincludedir = $(includedir)/tdevelop/propeditor +kdevpropeditorinclude_HEADERS = childproperty.h pcombobox.h pdummywidget.h ppointedit.h propertymachinefactory.h pcursoredit.h pfontbutton.h prectedit.h propertywidget.h pdateedit.h pfontcombo.h property.h psizeedit.h pdatetimeedit.h plineedit.h propertyeditor.h psizepolicyedit.h pdoublenuminput.h ppixmapedit.h propertylist.h pspinbox.h propertywidgetproxy.h multiproperty.h pyesnobutton.h purledit.h psymbolcombo.h pstringlistedit.h pcolorcombo.h pcolorbutton.h pcheckbox.h plinestyleedit.h DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils -DOXYGEN_PROJECTNAME = TDevelop Property Editing Library +DOXYGEN_PROJECTNAME = KDevelop Property Editing Library include ../../../Doxyfile.am diff --git a/lib/widgets/tdevhtml_partui.rc b/lib/widgets/tdevhtml_partui.rc deleted file mode 100644 index a62fa22f..00000000 --- a/lib/widgets/tdevhtml_partui.rc +++ /dev/null @@ -1,18 +0,0 @@ - - - - -

    &File - - - - - - - - - - - - - diff --git a/lib/widgets/tdevhtmlpart.cpp b/lib/widgets/tdevhtmlpart.cpp deleted file mode 100644 index 6ec74651..00000000 --- a/lib/widgets/tdevhtmlpart.cpp +++ /dev/null @@ -1,512 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - - -#include "tdevhtmlpart.h" - -TDevHTMLPart::TDevHTMLPart() - : TDEHTMLPart(0L, 0L, 0L, "TDevHTMLPart", DefaultGUI ) -{ - setXMLFile(locate("data", "tdevelop/tdevhtml_partui.rc"), true); - - connect(browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &,const KParts::URLArgs &)), - this, TQT_SLOT(openURLRequest(const KURL &)) ); - - connect(this, TQT_SIGNAL(started(TDEIO::Job *)), this, TQT_SLOT(slotStarted(TDEIO::Job* ))); - connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(slotCompleted())); - connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotCancelled(const TQString &))); - - TDEActionCollection * actions = actionCollection();// new TDEActionCollection( this ); - reloadAction = new TDEAction( i18n( "Reload" ), "reload", 0, - this, TQT_SLOT( slotReload() ), actions, "doc_reload" ); - reloadAction->setWhatsThis(i18n("Reload

    Reloads the current document.")); - stopAction = new TDEAction( i18n( "Stop" ), "stop", 0, - this, TQT_SLOT( slotStop() ), actions, "doc_stop" ); - stopAction->setWhatsThis(i18n("Stop

    Stops the loading of current document.")); - duplicateAction = new TDEAction( i18n( "Duplicate Tab" ), "window_new", 0, - this, TQT_SLOT( slotDuplicate() ), actions, "doc_dup" ); - duplicateAction->setWhatsThis(i18n("Duplicate window

    Opens current document in a new window.")); - printAction = KStdAction::print(this, TQT_SLOT(slotPrint()), actions, "print_doc"); - copyAction = KStdAction::copy(this, TQT_SLOT(slotCopy()), actions, "copy_doc_selection"); - - connect( this, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(popup(const TQString &, const TQPoint &))); - connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); - -//BEGIN documentation history stuff - - m_backAction = new TDEToolBarPopupAction(i18n("Back"), "back", 0, - this, TQT_SLOT(slotBack()), - actions, "browser_back"); - m_backAction->setEnabled( false ); - m_backAction->setToolTip(i18n("Back")); - m_backAction->setWhatsThis(i18n("Back

    Moves backwards one step in the documentation browsing history.")); - - connect(m_backAction->popupMenu(), TQT_SIGNAL(aboutToShow()), - this, TQT_SLOT(slotBackAboutToShow())); - connect(m_backAction->popupMenu(), TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotPopupActivated(int))); - - m_forwardAction = new TDEToolBarPopupAction(i18n("Forward"), "forward", 0, - this, TQT_SLOT(slotForward()), - actions, "browser_forward"); - m_forwardAction->setEnabled( false ); - m_forwardAction->setToolTip(i18n("Forward")); - m_forwardAction->setWhatsThis(i18n("Forward

    Moves forward one step in the documentation browsing history.")); - - connect(m_forwardAction->popupMenu(), TQT_SIGNAL(aboutToShow()), - this, TQT_SLOT(slotForwardAboutToShow())); - connect(m_forwardAction->popupMenu(), TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotPopupActivated(int))); - - m_restoring = false; - m_Current = m_history.end(); -//END documentation history stuff - - //settings: - TDEConfig *appConfig = TDEGlobal::config(); - appConfig->setGroup("TDEHTMLPart"); - setStandardFont(appConfig->readEntry("StandardFont", - settings()->stdFontName())); - setFixedFont(appConfig->readEntry("FixedFont", - settings()->fixedFontName())); - setZoomFactor(appConfig->readEntry("Zoom", "100").toInt()); -} - -void TDevHTMLPart::popup( const TQString & url, const TQPoint & p ) -{ -// TDEPopupMenu popup( i18n( "Documentation Viewer" ), this->widget() ); - TDEPopupMenu popup(this->widget()); - - bool needSep = false; - int idNewWindow = -2; - if (!url.isEmpty() && (m_options & CanOpenInNewWindow)) - { - idNewWindow = popup.insertItem(SmallIcon("window_new"),i18n("Open in New Tab")); - popup.TQMenuData::setWhatsThis(idNewWindow, i18n("Open in new window

    Opens current link in a new window.")); - needSep = true; - } - if (m_options & CanDuplicate) - { - duplicateAction->plug(&popup); - needSep = true; - } - if (needSep) - popup.insertSeparator(); - - m_backAction->plug( &popup ); - m_forwardAction->plug( &popup ); - reloadAction->plug(&popup); -// stopAction->plug(&popup); - popup.insertSeparator(); - - copyAction->plug( &popup ); - popup.insertSeparator(); - - printAction->plug(&popup); - popup.insertSeparator(); - - TDEAction * incFontAction = this->action("incFontSizes"); - TDEAction * decFontAction = this->action("decFontSizes"); - if ( incFontAction && decFontAction ) - { - incFontAction->plug( &popup ); - decFontAction->plug( &popup ); - popup.insertSeparator(); - } - - TDEAction *ac = action("setEncoding"); - if (ac) - ac->plug(&popup); - - int r = popup.exec(p); - - if (r == idNewWindow) - { - KURL kurl; - if (!KURL(url).path().startsWith("/")) - { - kdDebug() << "processing relative url: " << url << endl; - if (url.startsWith("#")) - { - kurl = KURL(TDevHTMLPart::url()); - kurl.setRef(url.mid(1)); - } - else - kurl = KURL(TDevHTMLPart::url().upURL().url(true)+url); - } - else - kurl = KURL(url); - - if (kurl.isValid()) - slotOpenInNewWindow(kurl); - } -} - -void TDevHTMLPart::setContext(const TQString &context) -{ - m_context = context; -} - - -TQString TDevHTMLPart::context() const -{ - return m_context; -} - - -// Note: this function is a copy of code in tdecore/tdeconfigbase.cpp ;) -static bool isUtf8(const char *buf) { - int i, n; - register unsigned char c; - bool gotone = false; - -#define F 0 /* character never appears in text */ -#define T 1 /* character appears in plain ASCII text */ -#define I 2 /* character appears in ISO-8859 text */ -#define X 3 /* character appears in non-ISO extended ASCII (Mac, IBM PC) */ - - static const unsigned char text_chars[256] = { - /* BEL BS HT LF FF CR */ - F, F, F, F, F, F, F, T, T, T, T, F, T, T, F, F, /* 0x0X */ - /* ESC */ - F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, /* 0x1X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x2X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x3X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x4X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x5X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x6X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, F, /* 0x7X */ - /* NEL */ - X, X, X, X, X, T, X, X, X, X, X, X, X, X, X, X, /* 0x8X */ - X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, /* 0x9X */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xaX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xbX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xcX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xdX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xeX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I /* 0xfX */ - }; - - /* *ulen = 0; */ - for (i = 0; (c = buf[i]); i++) { - if ((c & 0x80) == 0) { /* 0xxxxxxx is plain ASCII */ - /* - * Even if the whole file is valid UTF-8 sequences, - * still reject it if it uses weird control characters. - */ - - if (text_chars[c] != T) - return false; - - } else if ((c & 0x40) == 0) { /* 10xxxxxx never 1st byte */ - return false; - } else { /* 11xxxxxx begins UTF-8 */ - int following; - - if ((c & 0x20) == 0) { /* 110xxxxx */ - following = 1; - } else if ((c & 0x10) == 0) { /* 1110xxxx */ - following = 2; - } else if ((c & 0x08) == 0) { /* 11110xxx */ - following = 3; - } else if ((c & 0x04) == 0) { /* 111110xx */ - following = 4; - } else if ((c & 0x02) == 0) { /* 1111110x */ - following = 5; - } else - return false; - - for (n = 0; n < following; n++) { - i++; - if (!(c = buf[i])) - goto done; - - if ((c & 0x80) == 0 || (c & 0x40)) - return false; - } - gotone = true; - } - } -done: - return gotone; /* don't claim it's UTF-8 if it's all 7-bit */ -} -#undef F -#undef T -#undef I -#undef X - -TQString TDevHTMLPart::resolveEnvVarsInURL(const TQString& url) -{ - // check for environment variables and make necessary translations - TQString path = url; - int nDollarPos = path.find( '$' ); - - // Note: the while loop below is a copy of code in tdecore/tdeconfigbase.cpp ;) - while( nDollarPos != -1 && nDollarPos+1 < static_cast(path.length())) { - // there is at least one $ - if( (path)[nDollarPos+1] == '(' ) { - uint nEndPos = nDollarPos+1; - // the next character is no $ - while ( (nEndPos <= path.length()) && (path[nEndPos]!=')') ) - nEndPos++; - nEndPos++; - TQString cmd = path.mid( nDollarPos+2, nEndPos-nDollarPos-3 ); - - TQString result; - FILE *fs = popen(TQFile::encodeName(cmd).data(), "r"); - if (fs) - { - TQTextStream ts(fs, IO_ReadOnly); - result = ts.read().stripWhiteSpace(); - pclose(fs); - } - path.replace( nDollarPos, nEndPos-nDollarPos, result ); - } else if( (path)[nDollarPos+1] != '$' ) { - uint nEndPos = nDollarPos+1; - // the next character is no $ - TQString aVarName; - if (path[nEndPos]=='{') - { - while ( (nEndPos <= path.length()) && (path[nEndPos]!='}') ) - nEndPos++; - nEndPos++; - aVarName = path.mid( nDollarPos+2, nEndPos-nDollarPos-3 ); - } - else - { - while ( nEndPos <= path.length() && (path[nEndPos].isNumber() - || path[nEndPos].isLetter() || path[nEndPos]=='_' ) ) - nEndPos++; - aVarName = path.mid( nDollarPos+1, nEndPos-nDollarPos-1 ); - } - const char* pEnv = 0; - if (!aVarName.isEmpty()) - pEnv = getenv( aVarName.ascii() ); - if( pEnv ) { - // !!! Sergey A. Sukiyazov !!! - // A environment variables may contain values in 8bit - // locale cpecified encoding or in UTF8 encoding. - if (isUtf8( pEnv )) - path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromUtf8(pEnv) ); - else - path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromLocal8Bit(pEnv) ); - } else - path.remove( nDollarPos, nEndPos-nDollarPos ); - } else { - // remove one of the dollar signs - path.remove( nDollarPos, 1 ); - nDollarPos++; - } - nDollarPos = path.find( '$', nDollarPos ); - } - - return path; -} - -bool TDevHTMLPart::openURL(const KURL &url) -{ - TQString path = resolveEnvVarsInURL(url.url()); - KURL newUrl(path); - - bool retval = TDEHTMLPart::openURL(newUrl); - if ( retval ) - { - emit fileNameChanged(this); - if ( !m_restoring ) - { - addHistoryEntry(); - } - } - - m_backAction->setEnabled( m_Current != m_history.begin() ); - m_forwardAction->setEnabled( m_Current != m_history.fromLast() ); - - return retval; -} - -void TDevHTMLPart::openURLRequest(const KURL &url) -{ - openURL( url ); -} - -void TDevHTMLPart::slotReload( ) -{ - openURL( url() ); -} - -void TDevHTMLPart::slotStop( ) -{ - closeURL(); -} - -void TDevHTMLPart::slotStarted( TDEIO::Job * ) -{ - stopAction->setEnabled(true); -} - -void TDevHTMLPart::slotCompleted( ) -{ - stopAction->setEnabled(false); -} - -void TDevHTMLPart::slotCancelled( const TQString & /*errMsg*/ ) -{ - stopAction->setEnabled(false); -} - -/*void TDevHTMLPart::slotDuplicate( ) -{ - PartController::getInstance()->showDocument(url(), true); -}*/ - -void TDevHTMLPart::slotPrint( ) -{ - view()->print(); -} - -void TDevHTMLPart::slotBack() -{ - if ( m_Current != m_history.begin() ) - { - --m_Current; - m_restoring = true; - openURL( (*m_Current).url ); - m_restoring = false; - } -} - -void TDevHTMLPart::slotForward() -{ - if ( m_Current != m_history.fromLast() ) - { - ++m_Current; - m_restoring = true; - openURL( (*m_Current).url ); - m_restoring = false; - } -} - -void TDevHTMLPart::slotBackAboutToShow() -{ - TDEPopupMenu *popup = m_backAction->popupMenu(); - popup->clear(); - - if ( m_Current == m_history.begin() ) return; - - TQValueList::Iterator it = m_Current; - --it; - - int i = 0; - while( i < 10 ) - { - if ( it == m_history.begin() ) - { - popup->insertItem( (*it).url.url(), (*it).id ); - return; - } - - popup->insertItem( (*it).url.url(), (*it).id ); - ++i; - --it; - } -} - -void TDevHTMLPart::slotForwardAboutToShow() -{ - TDEPopupMenu *popup = m_forwardAction->popupMenu(); - popup->clear(); - - if ( m_Current == m_history.fromLast() ) return; - - TQValueList::Iterator it = m_Current; - ++it; - - int i = 0; - while( i < 10 ) - { - if ( it == m_history.fromLast() ) - { - popup->insertItem( (*it).url.url(), (*it).id ); - return; - } - - popup->insertItem( (*it).url.url(), (*it).id ); - ++i; - ++it; - } -} - -void TDevHTMLPart::slotPopupActivated( int id ) -{ - kdDebug(9000) << "id: " << id << endl; - - TQValueList::Iterator it = m_history.begin(); - while( it != m_history.end() ) - { - kdDebug(9000) << "(*it).id: " << (*it).id << endl; - if ( (*it).id == id ) - { - m_Current = it; - m_restoring = true; - openURL( (*m_Current).url ); - m_restoring = false; - return; - } - ++it; - } -} - -void TDevHTMLPart::addHistoryEntry() -{ - TQValueList::Iterator it = m_Current; - - // if We're not already the last entry, we truncate the list here before adding an entry - if ( it != m_history.end() && it != m_history.fromLast() ) - { - m_history.erase( ++it, m_history.end() ); - } - - DocumentationHistoryEntry newEntry( url() ); - - // Only save the new entry if it is different from the last - if ( newEntry.url != (*m_Current).url ) - { - m_history.append( newEntry ); - m_Current = m_history.fromLast(); - } -} - -void TDevHTMLPart::slotCopy( ) -{ - TQString text = selectedText(); - text.replace( TQChar( 0xa0 ), ' ' ); - TQClipboard *cb = TQApplication::clipboard(); - disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); - cb->setText(text); - connect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); -} - -void TDevHTMLPart::slotSelectionChanged( ) -{ - if (selectedText().isEmpty()) - copyAction->setEnabled(false); - else - copyAction->setEnabled(true); -} - -#include "tdevhtmlpart.moc" diff --git a/lib/widgets/tdevhtmlpart.h b/lib/widgets/tdevhtmlpart.h deleted file mode 100644 index e822488b..00000000 --- a/lib/widgets/tdevhtmlpart.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef __TDEVHTMLPART_H__ -#define __TDEVHTMLPART_H__ - -#include - -#include - -#include - -/** -@file tdevhtmlpart.h -Customized TDEHTML part for KDevelop. -*/ - -class TDEAction; -class TDEToolBarPopupAction; - -struct DocumentationHistoryEntry { - KURL url; - int id; - - DocumentationHistoryEntry() {} - DocumentationHistoryEntry( const KURL& u ): url( u ) - { - id = abs( TQTime::currentTime().msecsTo( TQTime() ) ); // nasty, but should provide a reasonably unique number - } -}; - -/** -Customized TDEHTML part for KDevelop. -Used as HTML documentation and file viewer. - -Represents customized BrowserViewGUI mode of TDEHTMLPart. Provides also actions for: -- reload; -- stop; -- duplicate; -- print; -- copy text; -- back; -- forward. -. -It has it's own popup menu and font/zoom settings. -*/ -class TDevHTMLPart : public TDEHTMLPart -{ - Q_OBJECT - - -public: - - enum Options { CanDuplicate=1, CanOpenInNewWindow=2 }; - - TDevHTMLPart(); - - void setContext(const TQString &context); - TQString context() const; - virtual bool openURL(const KURL &url); - static TQString resolveEnvVarsInURL(const TQString& url); - - void setOptions(int options) { m_options = options; } - -signals: - void fileNameChanged(KParts::ReadOnlyPart *part); - -protected slots: - - void slotStarted(TDEIO::Job *); - void slotCompleted(); - void slotCancelled(const TQString &errMsg); - - void openURLRequest(const KURL &url); - void popup( const TQString & url, const TQPoint & p ); - - void slotReload(); - void slotStop(); - virtual void slotDuplicate() = 0; - virtual void slotOpenInNewWindow(const KURL &url) = 0; - void slotPrint(); - void slotCopy(); - void slotSelectionChanged(); - - void slotBack(); - void slotForward(); - void slotBackAboutToShow(); - void slotForwardAboutToShow(); - - void slotPopupActivated( int id ); - void addHistoryEntry(); - - -private: - - TQValueList< DocumentationHistoryEntry > m_history; - TQValueList< DocumentationHistoryEntry >::Iterator m_Current; - - TDEToolBarPopupAction* m_backAction; - TDEToolBarPopupAction* m_forwardAction; - - bool m_restoring; - - TQString m_context; - TDEAction *stopAction; - TDEAction *reloadAction; - TDEAction *duplicateAction; - TDEAction *printAction; - TDEAction *copyAction; - - int m_options; -}; - -#endif diff --git a/lib/widgets/tdevtabwidget.cpp b/lib/widgets/tdevtabwidget.cpp deleted file mode 100644 index adfd4566..00000000 --- a/lib/widgets/tdevtabwidget.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2001-2003 * - * The KDevelop Team * - * * - * This program 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. * - * * - ***************************************************************************/ - -#include - -#include -#include -#include -#include - -#include "tdevtabwidget.h" - -TDevTabWidget::TDevTabWidget(TQWidget *parent, const char *name) : TQTabWidget(parent,name) -{ - m_pTabBar = new KTabBar(this, "tabbar"); - setTabBar(m_pTabBar); - connect(m_pTabBar, TQT_SIGNAL(closeWindow(const TQWidget*)), this, TQT_SIGNAL(closeWindow(const TQWidget*))); - connect(m_pTabBar, TQT_SIGNAL(closeOthers(TQWidget*)), this, TQT_SIGNAL(closeOthers(TQWidget*))); -} - -KTabBar::KTabBar(TQWidget *parent, const char *name) : TQTabBar(parent,name) -{ - m_pPopupMenu = new TQPopupMenu(this); - - TQPixmap closePixmap = TDEGlobal::instance()->iconLoader()->loadIcon( "tab_remove", TDEIcon::Small, 0, TDEIcon::DefaultState, 0, true ); - if (closePixmap.isNull()) - closePixmap = SmallIcon("fileclose"); - - m_pPopupMenu->insertItem(closePixmap, i18n("&Close"), this, TQT_SLOT(closeWindowSlot())); - m_pPopupMenu->insertItem(i18n("Close &Others"), this, TQT_SLOT(closeOthersSlot())); -} - -void KTabBar::closeWindowSlot() -{ - emit closeWindow(m_pPage); -} - -void KTabBar::closeOthersSlot() -{ - emit closeOthers(m_pPage); -} - -void KTabBar::mousePressEvent(TQMouseEvent *e) -{ - if(e->button() == Qt::RightButton) { - - TQTab *tab = selectTab(e->pos() ); - if( tab == 0L ) return; - - m_pPage = ((TDevTabWidget*)parent())->page(indexOf(tab->identifier() ) ); - if(m_pPage == 0L) return; - - m_pPopupMenu->exec(mapToGlobal(e->pos())); - } - TQTabBar::mousePressEvent(e); -} - -#include "tdevtabwidget.moc" diff --git a/parts/abbrev/CMakeLists.txt b/parts/abbrev/CMakeLists.txt index 6a61f9d8..219ad73d 100644 --- a/parts/abbrev/CMakeLists.txt +++ b/parts/abbrev/CMakeLists.txt @@ -26,14 +26,14 @@ link_directories( ##### other data ################################ -install( FILES tdevabbrev.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES qt_classes cpp_keywords DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev/sources ) -install( FILES tdevabbrev.rc DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev ) +install( FILES kdevabbrev.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES qt_classes cpp_keywords DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev/sources ) +install( FILES kdevabbrev.rc DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev ) -##### libtdevabbrev (module) #################### +##### libkdevabbrev (module) #################### -tde_add_kpart( libtdevabbrev AUTOMOC +tde_add_kpart( libkdevabbrev AUTOMOC SOURCES abbrevpart.cpp abbrevconfigwidget.cpp abbrevconfigwidgetbase.ui addtemplatedlg.cpp diff --git a/parts/abbrev/Makefile.am b/parts/abbrev/Makefile.am index 1c4f559c..f5c3ec2e 100644 --- a/parts/abbrev/Makefile.am +++ b/parts/abbrev/Makefile.am @@ -2,19 +2,19 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevabbrev.la -libtdevabbrev_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevabbrev_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevabbrev.la +libkdevabbrev_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevabbrev_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevabbrev_la_SOURCES = abbrevpart.cpp abbrevconfigwidget.cpp abbrevconfigwidgetbase.ui addtemplatedlg.cpp addtemplatedlgbase.ui +libkdevabbrev_la_SOURCES = abbrevpart.cpp abbrevconfigwidget.cpp abbrevconfigwidgetbase.ui addtemplatedlg.cpp addtemplatedlgbase.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevabbrev.desktop +service_DATA = kdevabbrev.desktop -sourcesdir = $(kde_datadir)/tdevabbrev/sources +sourcesdir = $(kde_datadir)/kdevabbrev/sources sources_DATA = qt_classes cpp_keywords -rcdir = $(kde_datadir)/tdevabbrev -rc_DATA = tdevabbrev.rc +rcdir = $(kde_datadir)/kdevabbrev +rc_DATA = kdevabbrev.rc diff --git a/parts/abbrev/abbrevpart.cpp b/parts/abbrev/abbrevpart.cpp index 87e44e23..80d26599 100644 --- a/parts/abbrev/abbrevpart.cpp +++ b/parts/abbrev/abbrevpart.cpp @@ -24,35 +24,35 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include #include -#include "tdevcore.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevpartcontroller.h" #include "abbrevconfigwidget.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" -static const TDevPluginInfo data("tdevabbrev"); +static const KDevPluginInfo data("kdevabbrev"); -class AbbrevFactory : public TDevGenericFactory +class AbbrevFactory : public KDevGenericFactory { public: AbbrevFactory() - : TDevGenericFactory( data ) + : KDevGenericFactory( data ) { } virtual TDEInstance *createInstance() { - TDEInstance *instance = TDevGenericFactory::createInstance(); + TDEInstance *instance = KDevGenericFactory::createInstance(); TDEStandardDirs *dirs = instance->dirs(); dirs->addResourceType( "codetemplates", TDEStandardDirs::kde_default( "data" ) + "kdevabbrev/templates/" ); @@ -63,13 +63,13 @@ public: } }; -K_EXPORT_COMPONENT_FACTORY( libtdevabbrev, AbbrevFactory ) +K_EXPORT_COMPONENT_FACTORY( libkdevabbrev, AbbrevFactory ) AbbrevPart::AbbrevPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "AbbrevPart") + : KDevPlugin(&data, parent, name ? name : "AbbrevPart") { setInstance(AbbrevFactory::instance()); - setXMLFile("tdevabbrev.rc"); + setXMLFile("kdevabbrev.rc"); connect(partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SLOT(slotActivePartChanged(KParts::Part*)) ); @@ -235,7 +235,7 @@ void AbbrevPart::save() TQString AbbrevPart::currentWord() const { - return TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + return KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); } diff --git a/parts/abbrev/abbrevpart.h b/parts/abbrev/abbrevpart.h index cbb60e50..2b602088 100644 --- a/parts/abbrev/abbrevpart.h +++ b/parts/abbrev/abbrevpart.h @@ -18,7 +18,7 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include @@ -60,7 +60,7 @@ private: TQStringList m_suffixes; }; -class AbbrevPart : public TDevPlugin +class AbbrevPart : public KDevPlugin { Q_OBJECT diff --git a/parts/abbrev/kdevabbrev.desktop b/parts/abbrev/kdevabbrev.desktop new file mode 100644 index 00000000..5c230dd4 --- /dev/null +++ b/parts/abbrev/kdevabbrev.desktop @@ -0,0 +1,83 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides support for customizable abbreviations - short words which expand into commonly needed code structures. +Comment[ca]=Proporciona suport per a abreviatures personalitzables - paraules curtes que en expandir-se formen estructures de codi usades habitualment. +Comment[da]=Sørger for støtte til brugerindrettede forkortelser - korte ord som udvides til almindeligt nyttige kodestrukturer. +Comment[de]=Unterstützung für benutzerdefinierte Abkürzungen - Kurzbegriffe, die zu häufig verwendeten Quelltextstrukturen erweitert werden. +Comment[el]=Προσφέρει υποστήριξη για προσαρμοσμένες συντομογραφίες - σύντομες λέξεις οι οποίες αναπτύσσονται σε συχνά χρησιμοποιούμενες δομές κώδικα. +Comment[en_GB]=Provides support for customisable abbreviations - short words which expand into commonly needed code structures. +Comment[es]=Proporciona soporte para las abreviaturas personalizables - palabras cortas que se expanden en estructuras utilizadas habitualmente. +Comment[et]=Pakub kohandatavate lühendite toetust. Viimased on lühendid, mis laienevad sagedamini vajaminevateks koodistruktuurideks. +Comment[eu]=Laburdura pertsonalizatuen euskarria eskeintzen du-normalean behar diren kode-egitura bezala zabalduko diren hitz motzak. +Comment[fa]=پشتیبانی برای مختصرسازیهای سفارشی فراهم می‌کند - واژه‌های کوتاه که اغلب به ساختارهای کد مورد نیاز بسط می‌یابد. +Comment[fr]=Fournit une prise en charge pour les abréviations personnalisables - mots abrégés qui s'étendent en structures de code communément nécessaires. +Comment[gl]=Proporciona soporte para abreviaturas persoalizadas - palabras curtas que se expanden en estructuras de código usadas frecuentemente. +Comment[hi]=मनपसंद किए जा सकने योग्य संक्षिप्त शब्दों जो कि सामान्यतया आवश्यक कोड स्ट्रक्चर में एक्सपांड हो सकें, के लिए समर्थन प्रदान करता है. +Comment[hu]=Lehetővé teszi különféle rövidítések használatát (rövid kifejezések kódstruktúrává kibontását) +Comment[it]=Offre il supporto per le abbreviazioni personalizzate - brevi parole che vengono espanse in strutture di codice richieste comunemente. +Comment[ja]=短い単語を一般に必要とされるコードに展開する、カスタマイズ可能な略語のサポートを提供します。 +Comment[ms]=Menyediakan sokongan untuk kependekan boleh ditetapkan - perkataan pendek yang berkembang kepada struktur kod yang biasa diperlukan. +Comment[nds]=Ünnerstütten för egen Afkörten - Kortwöör, de na faken bruukt Kodestrukturen utfooldt warrt. +Comment[ne]=साझा आवश्यक सङ्केत बनावटमा विस्तार गरिने छोटो शब्द - अनुकूलन संक्षिप्त रूपका लागि समर्थन प्रदान गर्दछ । +Comment[nl]=Biedt ondersteuning voor afkortingen - korte stukjes tekst die expanderen tot veelgebruikte codestructuren. +Comment[pl]=Umożliwia obsługę konfigurowalnych skrótów - krótkich słow rozszerzających się w często używane struktury kodu. +Comment[pt]=Oferece o suporte para abreviaturas personalizadas - palavras curtas que podem expandir para estruturas de código normalmente necessárias. +Comment[pt_BR]=Fornece suporte para abreviaturas personalizadas - palavras curtas que se expandem em estruturas de código normalmente necessárias. +Comment[ru]=Предоставляет поддержку для настраиваемых сокращений - коротких слов, которые заменяются на часто используемые структуры кода. +Comment[sk]=Poskytuje podporu pre prispôsobiteľné skratky - krátke slová, ktoré sa rozvinú do bežne potrebných kódových štruktúr. +Comment[sr]=Обезбеђује подршку за прилагодљиве скраћенице — кратке речи које се проширују у уобичајено потребне структуре кôда. +Comment[sr@Latn]=Obezbeđuje podršku za prilagodljive skraćenice — kratke reči koje se proširuju u uobičajeno potrebne strukture kôda. +Comment[sv]=Ger stöd för anpassningsbara förkortningar: korta ord som expanderas till vanligt använda kodstrukturer. +Comment[ta]=தேவைக்கேற்ப சுருக்கத்திற்கு இது ஆதரவு தரும்-குறியிடு வடிவத்திற்கு இந்த சுருக்கங்கள் மிகவும் உதவும். +Comment[tg]=Барои кӯтоҳ намоӣ ёрдами худро саҳм мегузорад, яъне калимаҳои кӯтоҳе, ки як хел вақт ба структураҳои коди истифода намоии истифода бурда мешавад. +Comment[tr]=Özelleştirilebilir kısaltmalar için destek sağlar - sık ihtiyaç duyualan kod yapıları yerine geçen kısa kelimeler. +Comment[zh_CN]=为自定义缩写提供支持 - 按需要扩展为所需代码结构的简短文字。 +Comment[zh_TW]=提供可調整的縮寫支援 - 將短的字擴展到常用的程式源碼結構。 +Name=KDevAbbrev +Name[da]=TDevelop Forkortelser +Name[de]=Abkürzungsmodul (TDevelop) +Name[hi]=के-डेव-एब्रिवि +Name[nds]=TDevelop-Afkörtenmoduul +Name[pl]=KDevSkróty +Name[sk]=KDev skratky +Name[sv]=TDevelop förkortningar +Name[zh_TW]=TDevelop 縮寫 +GenericName=Abbreviation Expansion +GenericName[ca]=Expansió d'abreviatures +GenericName[da]=Forkortelsesudvidelse +GenericName[de]=Abkürzungsvervollständigung +GenericName[el]=Ανάπτυξη συντομογραφιών +GenericName[es]=Expansión de abreviaturas +GenericName[et]=Lühendite laienemine +GenericName[eu]=Laburduren zabalkuntza +GenericName[fa]=بسط مختصرسازی +GenericName[fr]=Expansion des abréviations +GenericName[gl]=Expansión de abreviaturas +GenericName[hi]=संक्षिप्त शब्द एक्सपांशन +GenericName[hu]=Rövidítéskezelő +GenericName[it]=Espansione delle abbreviazioni +GenericName[ja]=略語拡張 +GenericName[ms]=Pengembang Kependekan +GenericName[nds]=Afkörtenutfoolden +GenericName[ne]=संक्षिप्त रूप विस्तार +GenericName[nl]=Afkortingen expanderen +GenericName[pl]=Rozwijanie skrótów +GenericName[pt]=Expansão de Abreviaturas +GenericName[pt_BR]=Expansão de Abreviaturas +GenericName[ru]=Расширение сокращений +GenericName[sk]=Rozvinutie skratiek +GenericName[sr]=Проширење скраћеница +GenericName[sr@Latn]=Proširenje skraćenica +GenericName[sv]=Expansion av förkortningar +GenericName[ta]=சுருக்கத்தின் விரிவாக்கம் +GenericName[tg]=Васеъкунии кӯтоҳ карда шуда +GenericName[tr]=Kısaltma Genişlemesi +GenericName[zh_CN]=缩写扩展 +GenericName[zh_TW]=縮寫擴展 +ServiceTypes=TDevelop/Plugin +Icon=fontsizeup +X-TDE-Library=libkdevabbrev +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=CodeEditing diff --git a/parts/abbrev/kdevabbrev.rc b/parts/abbrev/kdevabbrev.rc new file mode 100644 index 00000000..e994ee76 --- /dev/null +++ b/parts/abbrev/kdevabbrev.rc @@ -0,0 +1,10 @@ + + + +

    + + + + + + diff --git a/parts/abbrev/tdevabbrev.desktop b/parts/abbrev/tdevabbrev.desktop deleted file mode 100644 index f06bf2eb..00000000 --- a/parts/abbrev/tdevabbrev.desktop +++ /dev/null @@ -1,83 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides support for customizable abbreviations - short words which expand into commonly needed code structures. -Comment[ca]=Proporciona suport per a abreviatures personalitzables - paraules curtes que en expandir-se formen estructures de codi usades habitualment. -Comment[da]=Sørger for støtte til brugerindrettede forkortelser - korte ord som udvides til almindeligt nyttige kodestrukturer. -Comment[de]=Unterstützung für benutzerdefinierte Abkürzungen - Kurzbegriffe, die zu häufig verwendeten Quelltextstrukturen erweitert werden. -Comment[el]=Προσφέρει υποστήριξη για προσαρμοσμένες συντομογραφίες - σύντομες λέξεις οι οποίες αναπτύσσονται σε συχνά χρησιμοποιούμενες δομές κώδικα. -Comment[en_GB]=Provides support for customisable abbreviations - short words which expand into commonly needed code structures. -Comment[es]=Proporciona soporte para las abreviaturas personalizables - palabras cortas que se expanden en estructuras utilizadas habitualmente. -Comment[et]=Pakub kohandatavate lühendite toetust. Viimased on lühendid, mis laienevad sagedamini vajaminevateks koodistruktuurideks. -Comment[eu]=Laburdura pertsonalizatuen euskarria eskeintzen du-normalean behar diren kode-egitura bezala zabalduko diren hitz motzak. -Comment[fa]=پشتیبانی برای مختصرسازیهای سفارشی فراهم می‌کند - واژه‌های کوتاه که اغلب به ساختارهای کد مورد نیاز بسط می‌یابد. -Comment[fr]=Fournit une prise en charge pour les abréviations personnalisables - mots abrégés qui s'étendent en structures de code communément nécessaires. -Comment[gl]=Proporciona soporte para abreviaturas persoalizadas - palabras curtas que se expanden en estructuras de código usadas frecuentemente. -Comment[hi]=मनपसंद किए जा सकने योग्य संक्षिप्त शब्दों जो कि सामान्यतया आवश्यक कोड स्ट्रक्चर में एक्सपांड हो सकें, के लिए समर्थन प्रदान करता है. -Comment[hu]=Lehetővé teszi különféle rövidítések használatát (rövid kifejezések kódstruktúrává kibontását) -Comment[it]=Offre il supporto per le abbreviazioni personalizzate - brevi parole che vengono espanse in strutture di codice richieste comunemente. -Comment[ja]=短い単語を一般に必要とされるコードに展開する、カスタマイズ可能な略語のサポートを提供します。 -Comment[ms]=Menyediakan sokongan untuk kependekan boleh ditetapkan - perkataan pendek yang berkembang kepada struktur kod yang biasa diperlukan. -Comment[nds]=Ünnerstütten för egen Afkörten - Kortwöör, de na faken bruukt Kodestrukturen utfooldt warrt. -Comment[ne]=साझा आवश्यक सङ्केत बनावटमा विस्तार गरिने छोटो शब्द - अनुकूलन संक्षिप्त रूपका लागि समर्थन प्रदान गर्दछ । -Comment[nl]=Biedt ondersteuning voor afkortingen - korte stukjes tekst die expanderen tot veelgebruikte codestructuren. -Comment[pl]=Umożliwia obsługę konfigurowalnych skrótów - krótkich słow rozszerzających się w często używane struktury kodu. -Comment[pt]=Oferece o suporte para abreviaturas personalizadas - palavras curtas que podem expandir para estruturas de código normalmente necessárias. -Comment[pt_BR]=Fornece suporte para abreviaturas personalizadas - palavras curtas que se expandem em estruturas de código normalmente necessárias. -Comment[ru]=Предоставляет поддержку для настраиваемых сокращений - коротких слов, которые заменяются на часто используемые структуры кода. -Comment[sk]=Poskytuje podporu pre prispôsobiteľné skratky - krátke slová, ktoré sa rozvinú do bežne potrebných kódových štruktúr. -Comment[sr]=Обезбеђује подршку за прилагодљиве скраћенице — кратке речи које се проширују у уобичајено потребне структуре кôда. -Comment[sr@Latn]=Obezbeđuje podršku za prilagodljive skraćenice — kratke reči koje se proširuju u uobičajeno potrebne strukture kôda. -Comment[sv]=Ger stöd för anpassningsbara förkortningar: korta ord som expanderas till vanligt använda kodstrukturer. -Comment[ta]=தேவைக்கேற்ப சுருக்கத்திற்கு இது ஆதரவு தரும்-குறியிடு வடிவத்திற்கு இந்த சுருக்கங்கள் மிகவும் உதவும். -Comment[tg]=Барои кӯтоҳ намоӣ ёрдами худро саҳм мегузорад, яъне калимаҳои кӯтоҳе, ки як хел вақт ба структураҳои коди истифода намоии истифода бурда мешавад. -Comment[tr]=Özelleştirilebilir kısaltmalar için destek sağlar - sık ihtiyaç duyualan kod yapıları yerine geçen kısa kelimeler. -Comment[zh_CN]=为自定义缩写提供支持 - 按需要扩展为所需代码结构的简短文字。 -Comment[zh_TW]=提供可調整的縮寫支援 - 將短的字擴展到常用的程式源碼結構。 -Name=KDevAbbrev -Name[da]=TDevelop Forkortelser -Name[de]=Abkürzungsmodul (TDevelop) -Name[hi]=के-डेव-एब्रिवि -Name[nds]=TDevelop-Afkörtenmoduul -Name[pl]=KDevSkróty -Name[sk]=KDev skratky -Name[sv]=TDevelop förkortningar -Name[zh_TW]=TDevelop 縮寫 -GenericName=Abbreviation Expansion -GenericName[ca]=Expansió d'abreviatures -GenericName[da]=Forkortelsesudvidelse -GenericName[de]=Abkürzungsvervollständigung -GenericName[el]=Ανάπτυξη συντομογραφιών -GenericName[es]=Expansión de abreviaturas -GenericName[et]=Lühendite laienemine -GenericName[eu]=Laburduren zabalkuntza -GenericName[fa]=بسط مختصرسازی -GenericName[fr]=Expansion des abréviations -GenericName[gl]=Expansión de abreviaturas -GenericName[hi]=संक्षिप्त शब्द एक्सपांशन -GenericName[hu]=Rövidítéskezelő -GenericName[it]=Espansione delle abbreviazioni -GenericName[ja]=略語拡張 -GenericName[ms]=Pengembang Kependekan -GenericName[nds]=Afkörtenutfoolden -GenericName[ne]=संक्षिप्त रूप विस्तार -GenericName[nl]=Afkortingen expanderen -GenericName[pl]=Rozwijanie skrótów -GenericName[pt]=Expansão de Abreviaturas -GenericName[pt_BR]=Expansão de Abreviaturas -GenericName[ru]=Расширение сокращений -GenericName[sk]=Rozvinutie skratiek -GenericName[sr]=Проширење скраћеница -GenericName[sr@Latn]=Proširenje skraćenica -GenericName[sv]=Expansion av förkortningar -GenericName[ta]=சுருக்கத்தின் விரிவாக்கம் -GenericName[tg]=Васеъкунии кӯтоҳ карда шуда -GenericName[tr]=Kısaltma Genişlemesi -GenericName[zh_CN]=缩写扩展 -GenericName[zh_TW]=縮寫擴展 -ServiceTypes=TDevelop/Plugin -Icon=fontsizeup -X-TDE-Library=libtdevabbrev -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=CodeEditing diff --git a/parts/abbrev/tdevabbrev.rc b/parts/abbrev/tdevabbrev.rc deleted file mode 100644 index e994ee76..00000000 --- a/parts/abbrev/tdevabbrev.rc +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/parts/appwizard/CMakeLists.txt b/parts/appwizard/CMakeLists.txt index 8a69f06e..bdeaf541 100644 --- a/parts/appwizard/CMakeLists.txt +++ b/parts/appwizard/CMakeLists.txt @@ -35,18 +35,18 @@ link_directories( ##### other data ################################ -install( FILES tdevappwizard.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevappwizard.rc DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) +install( FILES kdevappwizard.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevappwizard.rc DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) -##### libtdevappwizard (module) ################# +##### libkdevappwizard (module) ################# -tde_add_kpart( libtdevappwizard AUTOMOC +tde_add_kpart( libkdevappwizard AUTOMOC SOURCES appwizardfactory.cpp appwizardpart.cpp appwizarddlg.cpp importdlg.cpp filepropspagebase.ui filepropspage.cpp appwizarddlgbase.ui importdlgbase.ui misc.cpp vcs_form.ui - tdevfile.cpp tdevlicense.cpp profilesupport.cpp + kdevfile.cpp kdevlicense.cpp profilesupport.cpp LINK profileengine-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/appwizard/Makefile.am b/parts/appwizard/Makefile.am index 012f6f29..34af3163 100644 --- a/parts/appwizard/Makefile.am +++ b/parts/appwizard/Makefile.am @@ -7,22 +7,22 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extras -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets \ -I$(top_srcdir)/src/profileengine/lib $(all_includes) -kde_module_LTLIBRARIES = libtdevappwizard.la -libtdevappwizard_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevappwizard_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(top_builddir)/lib/util/libtdevutil.la \ - $(top_builddir)/lib/widgets/propeditor/libtdevpropertyeditor.la $(top_builddir)/src/profileengine/lib/libprofileengine.la +kde_module_LTLIBRARIES = libkdevappwizard.la +libkdevappwizard_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevappwizard_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(top_builddir)/lib/util/libkdevutil.la \ + $(top_builddir)/lib/widgets/propeditor/libkdevpropertyeditor.la $(top_builddir)/src/profileengine/lib/libprofileengine.la -libtdevappwizard_la_SOURCES = appwizardfactory.cpp appwizardpart.cpp \ +libkdevappwizard_la_SOURCES = appwizardfactory.cpp appwizardpart.cpp \ appwizarddlg.cpp importdlg.cpp filepropspagebase.ui filepropspage.cpp \ appwizarddlgbase.ui importdlgbase.ui misc.cpp vcs_form.ui\ - tdevfile.cpp tdevlicense.cpp profilesupport.cpp + kdevfile.cpp kdevlicense.cpp profilesupport.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevappwizard.desktop +service_DATA = kdevappwizard.desktop -rcdir = $(kde_datadir)/tdevappwizard -rc_DATA = tdevappwizard.rc +rcdir = $(kde_datadir)/kdevappwizard +rc_DATA = kdevappwizard.rc noinst_HEADERS = profilesupport.h diff --git a/parts/appwizard/appwizarddlg.cpp b/parts/appwizard/appwizarddlg.cpp index 4cbf716d..d5160075 100644 --- a/parts/appwizard/appwizarddlg.cpp +++ b/parts/appwizard/appwizarddlg.cpp @@ -64,14 +64,14 @@ #include #include "domutil.h" -#include "tdevversioncontrol.h" -#include "tdevmakefrontend.h" -#include "tdevpartcontroller.h" -#include "tdevplugincontroller.h" -#include "tdevappfrontend.h" -#include "tdevplugininfo.h" -#include "tdevlicense.h" -#include "tdevcore.h" +#include "kdevversioncontrol.h" +#include "kdevmakefrontend.h" +#include "kdevpartcontroller.h" +#include "kdevplugincontroller.h" +#include "kdevappfrontend.h" +#include "kdevplugininfo.h" +#include "kdevlicense.h" +#include "kdevcore.h" #include "appwizardfactory.h" #include "appwizardpart.h" #include "filepropspage.h" @@ -309,8 +309,8 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, TQWidget *parent, const ch appname_edit->setValidator(appname_edit_validator); // insert the licenses into the license_combo - TQDict< TDevLicense > lics( licenses() ); - TQDictIterator< TDevLicense > dit(lics); + TQDict< KDevLicense > lics( licenses() ); + TQDictIterator< KDevLicense > dit(lics); int idx=1; for( ; dit.current(); ++dit ) { @@ -356,8 +356,8 @@ void AppWizardDialog::loadVcs() } TQStringList args; TQObject *obj = factory->create(0, service->name().latin1(), - "TDevVCSIntegrator", args); - TDevVCSIntegrator *integrator = (TDevVCSIntegrator*) obj; + "KDevVCSIntegrator", args); + KDevVCSIntegrator *integrator = (KDevVCSIntegrator*) obj; if (!integrator) kdDebug(9010) << " failed to create vcs integrator " << service->name() << endl; @@ -418,20 +418,20 @@ void AppWizardDialog::licenseChanged() edit->setText( TQString() ); } } else { - TDevLicense* lic = licenses()[ license_combo->currentText() ]; + KDevLicense* lic = licenses()[ license_combo->currentText() ]; for (it = m_fileTemplates.begin(); it != m_fileTemplates.end(); ++it) { TQString style = (*it).style; TQMultiLineEdit *edit = (*it).edit; - TDevFile::CommentingStyle commentStyle = TDevFile::CPPStyle; + KDevFile::CommentingStyle commentStyle = KDevFile::CPPStyle; if (style == "PStyle") { - commentStyle = TDevFile::PascalStyle; + commentStyle = KDevFile::PascalStyle; } else if (style == "AdaStyle") { - commentStyle = TDevFile::AdaStyle; + commentStyle = KDevFile::AdaStyle; } else if (style == "ShellStyle") { - commentStyle = TDevFile::BashStyle; + commentStyle = KDevFile::BashStyle; } else if (style == "XMLStyle") { - commentStyle = TDevFile::XMLStyle; + commentStyle = KDevFile::XMLStyle; } TQString text; @@ -577,7 +577,7 @@ void AppWizardDialog::accept() if( license_combo->currentItem() != 0 ) { licenseName = license_combo->currentText(); - TDevLicense* lic = licenses()[ licenseName ]; + KDevLicense* lic = licenses()[ licenseName ]; if( lic ) { TQStringList files( lic->copyFiles() ); @@ -1273,7 +1273,7 @@ void AppWizardDialog::setPermissions(const installFile &file) } } -TQDict AppWizardDialog::licenses() +TQDict AppWizardDialog::licenses() { return m_licenses; } @@ -1291,7 +1291,7 @@ void AppWizardDialog::loadLicenses() TQString licPath( dirs->findResource( "licenses", *it ) ); kdDebug(9010) << "Loading license file: " << licPath << endl; TQString licName = licPath.mid( licPath.findRev('/') + 1 ); - TDevLicense* lic = new TDevLicense( licName, licPath ); + KDevLicense* lic = new KDevLicense( licName, licPath ); m_licenses.insert( licName, lic ); } // kdDebug(9010) << "======================== Done loadLicenses" << endl; diff --git a/parts/appwizard/appwizarddlg.h b/parts/appwizard/appwizarddlg.h index 4a160bd2..392cd1b6 100644 --- a/parts/appwizard/appwizarddlg.h +++ b/parts/appwizard/appwizarddlg.h @@ -32,12 +32,12 @@ class ProfileSupport; #include #include #include -#include "tdevversioncontrol.h" -#include "tdevvcsintegrator.h" +#include "kdevversioncontrol.h" +#include "kdevvcsintegrator.h" #include "appwizarddlgbase.h" #include "vcs_form.h" //#include "autoform.h" -#include "tdevlicense.h" +#include "kdevlicense.h" namespace PropertyLib { class PropertyList; @@ -132,7 +132,7 @@ public: protected: virtual void accept(); - virtual TQDict licenses(); + virtual TQDict licenses(); void loadLicenses(); protected slots: @@ -181,7 +181,7 @@ private: //data TQDict m_categoryMap; TQValueList m_categoryItems; //! A list of currently available version control systems -// TQDict m_availVcs; +// TQDict m_availVcs; TQHBoxLayout *m_custom_options_layout; PropertyLib::PropertyEditor *m_customOptions; @@ -195,8 +195,8 @@ private: //data TDEPopupMenu* m_favouritesMenu; TDEPopupMenu* m_templatesMenu; - TQDict m_licenses; - TQDict m_integrators; + TQDict m_licenses; + TQDict m_integrators; TQMap m_integratorDialogs; ProfileSupport *m_profileSupport; diff --git a/parts/appwizard/appwizardfactory.cpp b/parts/appwizard/appwizardfactory.cpp index 6749add0..5288105d 100644 --- a/parts/appwizard/appwizardfactory.cpp +++ b/parts/appwizard/appwizardfactory.cpp @@ -11,30 +11,30 @@ #include -#include +#include #include "appwizardfactory.h" -static const TDevPluginInfo data("tdevappwizard"); -K_EXPORT_COMPONENT_FACTORY( libtdevappwizard, AppWizardFactory ) +static const KDevPluginInfo data("kdevappwizard"); +K_EXPORT_COMPONENT_FACTORY( libkdevappwizard, AppWizardFactory ) AppWizardFactory::AppWizardFactory() - : TDevGenericFactory( data ) + : KDevGenericFactory( data ) { } TDEInstance *AppWizardFactory::createInstance() { - TDEInstance *instance = TDevGenericFactory::createInstance(); + TDEInstance *instance = KDevGenericFactory::createInstance(); TDEStandardDirs *dirs = instance->dirs(); - dirs->addResourceType("apptemplates", TDEStandardDirs::kde_default("data") + "tdevappwizard/templates/"); - dirs->addResourceType("appimports", TDEStandardDirs::kde_default("data") + "tdevappwizard/imports/"); - dirs->addResourceType("appimportfiles", TDEStandardDirs::kde_default("data") + "tdevappwizard/importfiles/"); + dirs->addResourceType("apptemplates", TDEStandardDirs::kde_default("data") + "kdevappwizard/templates/"); + dirs->addResourceType("appimports", TDEStandardDirs::kde_default("data") + "kdevappwizard/imports/"); + dirs->addResourceType("appimportfiles", TDEStandardDirs::kde_default("data") + "kdevappwizard/importfiles/"); return instance; } -const TDevPluginInfo *AppWizardFactory::info() +const KDevPluginInfo *AppWizardFactory::info() { return &data; } diff --git a/parts/appwizard/appwizardfactory.h b/parts/appwizard/appwizardfactory.h index 3de35631..3bbc6e1e 100644 --- a/parts/appwizard/appwizardfactory.h +++ b/parts/appwizard/appwizardfactory.h @@ -12,18 +12,18 @@ #ifndef _APPWIZARDFACTORY_H_ #define _APPWIZARDFACTORY_H_ -#include +#include #include "appwizardpart.h" -class TDevPluginInfo; +class KDevPluginInfo; -class AppWizardFactory : public TDevGenericFactory +class AppWizardFactory : public KDevGenericFactory { public: AppWizardFactory(); - static const TDevPluginInfo *info(); + static const KDevPluginInfo *info(); protected: virtual TDEInstance *createInstance(); diff --git a/parts/appwizard/appwizardpart.cpp b/parts/appwizard/appwizardpart.cpp index ada3b362..dd2fae65 100644 --- a/parts/appwizard/appwizardpart.cpp +++ b/parts/appwizard/appwizardpart.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -28,17 +28,17 @@ #include "importdlg.h" #include "appwizarddlg.h" #include "appwizardfactory.h" -#include -#include -#include -#include +#include +#include +#include +#include #include AppWizardPart::AppWizardPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(AppWizardFactory::info(), parent, name ? name : "AppWizardPart") + : KDevPlugin(AppWizardFactory::info(), parent, name ? name : "AppWizardPart") { setInstance(AppWizardFactory::instance()); - setXMLFile("tdevappwizard.rc"); + setXMLFile("kdevappwizard.rc"); TDEAction *action; diff --git a/parts/appwizard/appwizardpart.h b/parts/appwizard/appwizardpart.h index 901d51ad..59280631 100644 --- a/parts/appwizard/appwizardpart.h +++ b/parts/appwizard/appwizardpart.h @@ -13,7 +13,7 @@ #define _APPWIZARDPART_H_ #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include #include #include @@ -21,7 +21,7 @@ class AppWizardDialog; -class AppWizardPart : public TDevPlugin +class AppWizardPart : public KDevPlugin { Q_OBJECT diff --git a/parts/appwizard/common/CMakeLists.txt b/parts/appwizard/common/CMakeLists.txt index 81ee38b4..62a5b97b 100644 --- a/parts/appwizard/common/CMakeLists.txt +++ b/parts/appwizard/common/CMakeLists.txt @@ -20,7 +20,7 @@ generate_tar( gnome2.tar.gz gnome2 macros ) generate_tar( gnu.tar.gz gnu AUTHORS COPYING ChangeLog INSTALL NEWS README TODO ) generate_tar( wxwidgets.tar.gz wx macros ) generate_tar( incadmin.tar.gz incadmin config.guess config.sub depcomp install-sh ltmain.sh missing mkinstalldirs ) -generate_tar( scons.tar.gz scons configure admin/scons-mini.tar.bz2 admin/generic.py admin/tde.py ) +generate_tar( scons.tar.gz scons configure admin/scons-mini.tar.bz2 admin/generic.py admin/kde.py ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/admin.tar.gz @@ -29,18 +29,18 @@ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/gnome.tar.gz ${CMAKE_CURRENT_BINARY_DIR}/gnome2.tar.gz ${CMAKE_CURRENT_BINARY_DIR}/wxwidgets.tar.gz - tde-app.lsm tde-Makefile.am tde-Makefile.cvs + kde-app.lsm kde-Makefile.am kde-Makefile.cvs tde-configure.in.in tde-index.docbook - tde-po-Makefile.am tde-doc-Makefile.am - tde-doc-en-Makefile.am hi16-app-app.png + kde-po-Makefile.am kde-doc-Makefile.am + kde-doc-en-Makefile.am hi16-app-app.png hi32-app-app.png tde-app.desktop tde-part.desktop gnome-app.lsm gnome-Makefile.am gnome-Makefile.cvs gnome-pixmaps-Makefile.am gnome-app.png wx-configure.in wx-Makefile.am wx-Makefile.cvs COPYING COPYING.LIB LICENSE.QPL LICENSE.BSD - Artistic admin.tdevtemplate gnu.tdevtemplate - dockbook.tdevtemplate incadmin.tdevtemplate - gnome2.tdevtemplate scons.tdevtemplate + Artistic admin.kdevtemplate gnu.kdevtemplate + dockbook.kdevtemplate incadmin.kdevtemplate + gnome2.kdevtemplate scons.kdevtemplate ${CMAKE_CURRENT_BINARY_DIR}/scons.tar.gz - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/template-common ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/template-common ) diff --git a/parts/appwizard/common/Makefile.am b/parts/appwizard/common/Makefile.am index e068df5b..2d6e5278 100644 --- a/parts/appwizard/common/Makefile.am +++ b/parts/appwizard/common/Makefile.am @@ -28,19 +28,19 @@ incadmin.tar.gz: gzip incadmin.tar scons.tar.gz: - $(TAR) -cf scons.tar --exclude=.svn -C $(srcdir)/scons configure admin/scons-mini.tar.bz2 admin/generic.py admin/tde.py + $(TAR) -cf scons.tar --exclude=.svn -C $(srcdir)/scons configure admin/scons-mini.tar.bz2 admin/generic.py admin/kde.py gzip scons.tar -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard commondatadir = ${appwizarddatadir}/template-common commondata_DATA = admin.tar.gz gnu.tar.gz incadmin.tar.gz gnome.tar.gz gnome2.tar.gz wxwidgets.tar.gz \ - tde-app.lsm tde-Makefile.am tde-Makefile.cvs tde-configure.in.in \ - tde-index.docbook tde-po-Makefile.am tde-doc-Makefile.am tde-doc-en-Makefile.am \ + kde-app.lsm kde-Makefile.am kde-Makefile.cvs tde-configure.in.in \ + tde-index.docbook kde-po-Makefile.am kde-doc-Makefile.am kde-doc-en-Makefile.am \ hi16-app-app.png hi32-app-app.png tde-app.desktop tde-part.desktop \ gnome-app.lsm gnome-Makefile.am gnome-Makefile.cvs \ gnome-pixmaps-Makefile.am gnome-app.png \ wx-configure.in wx-Makefile.am wx-Makefile.cvs \ COPYING COPYING.LIB LICENSE.QPL LICENSE.BSD Artistic \ - admin.tdevtemplate gnu.tdevtemplate dockbook.tdevtemplate\ - incadmin.tdevtemplate gnome2.tdevtemplate scons.tdevtemplate scons.tar.gz + admin.kdevtemplate gnu.kdevtemplate dockbook.kdevtemplate\ + incadmin.kdevtemplate gnome2.kdevtemplate scons.kdevtemplate scons.tar.gz diff --git a/parts/appwizard/common/admin.kdevtemplate b/parts/appwizard/common/admin.kdevtemplate new file mode 100644 index 00000000..73573b47 --- /dev/null +++ b/parts/appwizard/common/admin.kdevtemplate @@ -0,0 +1,5 @@ +[ADMIN] +Type=install archive +Source=%{tdevelop}/template-common/admin.tar.gz +Dest=%{dest} +Process=false diff --git a/parts/appwizard/common/admin.tdevtemplate b/parts/appwizard/common/admin.tdevtemplate deleted file mode 100644 index 73573b47..00000000 --- a/parts/appwizard/common/admin.tdevtemplate +++ /dev/null @@ -1,5 +0,0 @@ -[ADMIN] -Type=install archive -Source=%{tdevelop}/template-common/admin.tar.gz -Dest=%{dest} -Process=false diff --git a/parts/appwizard/common/dockbook.kdevtemplate b/parts/appwizard/common/dockbook.kdevtemplate new file mode 100644 index 00000000..41b65f62 --- /dev/null +++ b/parts/appwizard/common/dockbook.kdevtemplate @@ -0,0 +1,64 @@ +[DOCSOPT] +Type = value +ValueType=bool +Value=INSTALL_DOCS +Comment= Install Docbook documentation templates. +Comment[ca]= Instal·la plantilles de documentació en Docbook. +Comment[da]= Installerer Docbook dokumentationsskabeloner. +Comment[de]= Installiert Docbook-Vorlagen für Dokumentation +Comment[el]= Εγκατάσταση προτύπων τεκμηρίωσης Docbook. +Comment[es]=Instalar plantillas de documentación Docbook. +Comment[et]= Docbook-dokumendimallide paigaldamine. +Comment[eu]= Instalatu Docbook dokumentazioaren txantiloiak. +Comment[fa]= قالبهای مستندات Docbook را نصب می‌کند. +Comment[fr]=Installe des modèles de documentation en Docbook. +Comment[gl]=Instalar modelos de documentación Docbook +Comment[hu]=DocBook-alapú dokumentációsablonok telepítése. +Comment[it]=Installa modelli di documentazione docbook. +Comment[ja]=Docbook ドキュメントテンプレートをインストール +Comment[ms]=Pasang templat dokumentasi Docbook. +Comment[nds]= Docbook-Dokmentatschoonvörlagen installeren +Comment[ne]= डकबुक मिसिलीकरण टेम्प्लेट स्थापना गर्नुहोस् +Comment[nl]=Installeert Docbook-documentatie-sjablonen. +Comment[pl]=Instalacja szablonów dokumentacji Docbook. +Comment[pt]= Instala os modelos de documentação em Docbook. +Comment[pt_BR]= Instala os modelos de documentação em Docbook. +Comment[ru]=Установка шаблонов Docbook. +Comment[sk]=Nainštaluje šablóny dokumentácie Docbook. +Comment[sr]=Инсталира Docbook документационе шаблоне. +Comment[sr@Latn]=Instalira Docbook dokumentacione šablone. +Comment[sv]= Installera Docbook-dokumentationsmallar. +Comment[tr]=Docbook belgelendirme şablonlarını yükle. +Comment[zh_CN]=安装 Docbook 文档模板。 +Comment[zh_TW]=安裝 Docbook 文件樣本。 +Default=true + +[DOCSDIR] +Type=mkdir +Dir=%{dest}/doc +Option=INSTALL_DOCS + +[DOCSDIREN] +Type=mkdir +Dir=%{dest}/doc/en +Option=INSTALL_DOCS + +[DOCSMAKEFILE.AM1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am +Option=INSTALL_DOCS + +[DOCSMAKEFILE.AM2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am +Option=INSTALL_DOCS + +[DOCS] +Type=install +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook +Option=INSTALL_DOCS + + diff --git a/parts/appwizard/common/dockbook.tdevtemplate b/parts/appwizard/common/dockbook.tdevtemplate deleted file mode 100644 index 41b65f62..00000000 --- a/parts/appwizard/common/dockbook.tdevtemplate +++ /dev/null @@ -1,64 +0,0 @@ -[DOCSOPT] -Type = value -ValueType=bool -Value=INSTALL_DOCS -Comment= Install Docbook documentation templates. -Comment[ca]= Instal·la plantilles de documentació en Docbook. -Comment[da]= Installerer Docbook dokumentationsskabeloner. -Comment[de]= Installiert Docbook-Vorlagen für Dokumentation -Comment[el]= Εγκατάσταση προτύπων τεκμηρίωσης Docbook. -Comment[es]=Instalar plantillas de documentación Docbook. -Comment[et]= Docbook-dokumendimallide paigaldamine. -Comment[eu]= Instalatu Docbook dokumentazioaren txantiloiak. -Comment[fa]= قالبهای مستندات Docbook را نصب می‌کند. -Comment[fr]=Installe des modèles de documentation en Docbook. -Comment[gl]=Instalar modelos de documentación Docbook -Comment[hu]=DocBook-alapú dokumentációsablonok telepítése. -Comment[it]=Installa modelli di documentazione docbook. -Comment[ja]=Docbook ドキュメントテンプレートをインストール -Comment[ms]=Pasang templat dokumentasi Docbook. -Comment[nds]= Docbook-Dokmentatschoonvörlagen installeren -Comment[ne]= डकबुक मिसिलीकरण टेम्प्लेट स्थापना गर्नुहोस् -Comment[nl]=Installeert Docbook-documentatie-sjablonen. -Comment[pl]=Instalacja szablonów dokumentacji Docbook. -Comment[pt]= Instala os modelos de documentação em Docbook. -Comment[pt_BR]= Instala os modelos de documentação em Docbook. -Comment[ru]=Установка шаблонов Docbook. -Comment[sk]=Nainštaluje šablóny dokumentácie Docbook. -Comment[sr]=Инсталира Docbook документационе шаблоне. -Comment[sr@Latn]=Instalira Docbook dokumentacione šablone. -Comment[sv]= Installera Docbook-dokumentationsmallar. -Comment[tr]=Docbook belgelendirme şablonlarını yükle. -Comment[zh_CN]=安装 Docbook 文档模板。 -Comment[zh_TW]=安裝 Docbook 文件樣本。 -Default=true - -[DOCSDIR] -Type=mkdir -Dir=%{dest}/doc -Option=INSTALL_DOCS - -[DOCSDIREN] -Type=mkdir -Dir=%{dest}/doc/en -Option=INSTALL_DOCS - -[DOCSMAKEFILE.AM1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am -Option=INSTALL_DOCS - -[DOCSMAKEFILE.AM2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am -Option=INSTALL_DOCS - -[DOCS] -Type=install -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook -Option=INSTALL_DOCS - - diff --git a/parts/appwizard/common/gnome2.kdevtemplate b/parts/appwizard/common/gnome2.kdevtemplate new file mode 100644 index 00000000..ce4e3f3d --- /dev/null +++ b/parts/appwizard/common/gnome2.kdevtemplate @@ -0,0 +1,5 @@ +[GNOME2] +Type=install archive +Source=%{tdevelop}/template-common/gnome2.tar.gz +Dest=%{dest} + diff --git a/parts/appwizard/common/gnome2.tdevtemplate b/parts/appwizard/common/gnome2.tdevtemplate deleted file mode 100644 index ce4e3f3d..00000000 --- a/parts/appwizard/common/gnome2.tdevtemplate +++ /dev/null @@ -1,5 +0,0 @@ -[GNOME2] -Type=install archive -Source=%{tdevelop}/template-common/gnome2.tar.gz -Dest=%{dest} - diff --git a/parts/appwizard/common/gnu.kdevtemplate b/parts/appwizard/common/gnu.kdevtemplate new file mode 100644 index 00000000..e1876440 --- /dev/null +++ b/parts/appwizard/common/gnu.kdevtemplate @@ -0,0 +1,5 @@ +[GNU] +Type=install archive +Source=%{tdevelop}/template-common/gnu.tar.gz +Dest=%{dest} + diff --git a/parts/appwizard/common/gnu.tdevtemplate b/parts/appwizard/common/gnu.tdevtemplate deleted file mode 100644 index e1876440..00000000 --- a/parts/appwizard/common/gnu.tdevtemplate +++ /dev/null @@ -1,5 +0,0 @@ -[GNU] -Type=install archive -Source=%{tdevelop}/template-common/gnu.tar.gz -Dest=%{dest} - diff --git a/parts/appwizard/common/incadmin.kdevtemplate b/parts/appwizard/common/incadmin.kdevtemplate new file mode 100644 index 00000000..d7fbfb61 --- /dev/null +++ b/parts/appwizard/common/incadmin.kdevtemplate @@ -0,0 +1,5 @@ +[INCADMIN] +Type=install archive +Source=%{tdevelop}/template-common/incadmin.tar.gz +Dest=%{dest} +Process=false diff --git a/parts/appwizard/common/incadmin.tdevtemplate b/parts/appwizard/common/incadmin.tdevtemplate deleted file mode 100644 index d7fbfb61..00000000 --- a/parts/appwizard/common/incadmin.tdevtemplate +++ /dev/null @@ -1,5 +0,0 @@ -[INCADMIN] -Type=install archive -Source=%{tdevelop}/template-common/incadmin.tar.gz -Dest=%{dest} -Process=false diff --git a/parts/appwizard/common/kde-Makefile.am b/parts/appwizard/common/kde-Makefile.am new file mode 100644 index 00000000..06057100 --- /dev/null +++ b/parts/appwizard/common/kde-Makefile.am @@ -0,0 +1,22 @@ +SUBDIRS = $(TOPSUBDIRS) + +$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs + cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ; + +$(top_srcdir)/subdirs: + cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs + +$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in + @cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4 + +MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files + +package-messages: + cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common package-messages + $(MAKE) -C po merge + +EXTRA_DIST = admin %{LICENSEFILE} configure.in.in + +dist-hook: + cd $(top_distdir) && perl admin/am_edit -padmin + cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs diff --git a/parts/appwizard/common/kde-Makefile.cvs b/parts/appwizard/common/kde-Makefile.cvs new file mode 100644 index 00000000..4c0afd1a --- /dev/null +++ b/parts/appwizard/common/kde-Makefile.cvs @@ -0,0 +1,10 @@ +all: + @echo "This Makefile is only for the CVS repository" + @echo "This will be deleted before making the distribution" + @echo "" + $(MAKE) -f admin/Makefile.common cvs + +dist: + $(MAKE) -f admin/Makefile.common dist + +.SILENT: diff --git a/parts/appwizard/common/kde-app.lsm b/parts/appwizard/common/kde-app.lsm new file mode 100644 index 00000000..06055a96 --- /dev/null +++ b/parts/appwizard/common/kde-app.lsm @@ -0,0 +1,14 @@ +Begin4 +Title: $APPNAME +Version: R14.0.0 +Entered-date: 2010-05-10 +Description: .... for the Trinity Desktop Environment +Keywords: TDE Qt +Author: %{AUTHOR} <%{EMAIL}> +Maintained-by: The Trinity Desktop Environment (TDE) http://www.trinitydesktop.org/ +Primary-site: http://git.trinitydesktop.org/cgit/ +Alternate-site: +Original-site: +Platforms: Linux and other Unices running TDE +Copying-policy: GPL +End diff --git a/parts/appwizard/common/kde-doc-Makefile.am b/parts/appwizard/common/kde-doc-Makefile.am new file mode 100644 index 00000000..a1f777a1 --- /dev/null +++ b/parts/appwizard/common/kde-doc-Makefile.am @@ -0,0 +1,6 @@ +# the SUBDIRS is filled automatically by am_edit. If files are +# in this directory they are installed into the english dir + +KDE_LANG = en +KDE_DOCS = %{APPNAMELC} +SUBDIRS = $(AUTODIRS) diff --git a/parts/appwizard/common/kde-doc-en-Makefile.am b/parts/appwizard/common/kde-doc-en-Makefile.am new file mode 100644 index 00000000..bdd63b79 --- /dev/null +++ b/parts/appwizard/common/kde-doc-en-Makefile.am @@ -0,0 +1,2 @@ +KDE_DOCS = %{APPNAMELC} +KDE_LANG = en diff --git a/parts/appwizard/common/kde-po-Makefile.am b/parts/appwizard/common/kde-po-Makefile.am new file mode 100644 index 00000000..0fa209cd --- /dev/null +++ b/parts/appwizard/common/kde-po-Makefile.am @@ -0,0 +1 @@ +POFILES = AUTO diff --git a/parts/appwizard/common/scons.kdevtemplate b/parts/appwizard/common/scons.kdevtemplate new file mode 100644 index 00000000..84ed350f --- /dev/null +++ b/parts/appwizard/common/scons.kdevtemplate @@ -0,0 +1,5 @@ +[SCONS] +Type=install archive +Source=%{tdevelop}/template-common/scons.tar.gz +Dest=%{dest} +Process=false diff --git a/parts/appwizard/common/scons.tdevtemplate b/parts/appwizard/common/scons.tdevtemplate deleted file mode 100644 index 84ed350f..00000000 --- a/parts/appwizard/common/scons.tdevtemplate +++ /dev/null @@ -1,5 +0,0 @@ -[SCONS] -Type=install archive -Source=%{tdevelop}/template-common/scons.tar.gz -Dest=%{dest} -Process=false diff --git a/parts/appwizard/common/scons/admin/kde.py b/parts/appwizard/common/scons/admin/kde.py new file mode 100644 index 00000000..d194fd84 --- /dev/null +++ b/parts/appwizard/common/scons/admin/kde.py @@ -0,0 +1,856 @@ +# Made from scons qt.py and (heavily) modified into kde.py +# Thomas Nagy, 2004, 2005 + +""" +Run scons -h to display the associated help, or look below .. +""" + +BOLD ="\033[1m" +RED ="\033[91m" +GREEN ="\033[92m" +YELLOW ="\033[1m" #"\033[93m" # unreadable on white backgrounds +CYAN ="\033[96m" +NORMAL ="\033[0m" + +import os, re, types + +# Returns the name of the shared object (i.e. libtdeui.so.4) +# referenced by a libtool archive (like libtdeui.la) +def getSOfromLA(lafile): + contents = open(lafile, 'r').read() + match = re.search("^dlname='([^']*)'$", contents, re.M) + if match: + return match.group(1) + return None + +def exists(env): + return True + +def detect_kde(env): + """ Detect the qt and kde environment using tde-config mostly """ + + prefix = env['ARGS'].get('prefix', None) + execprefix = env['ARGS'].get('execprefix', None) + datadir = env['ARGS'].get('datadir', None) + libdir = env['ARGS'].get('libdir', None) + libsuffix = env['ARGS'].get('libsuffix', '') + kdeincludes = env['ARGS'].get('kdeincludes', None) + tdelibs = env['ARGS'].get('tdelibs', None) + qtincludes = env['ARGS'].get('qtincludes', None) + qtlibs = env['ARGS'].get('qtlibs', None) + + if libdir: + libdir = libdir+libsuffix + + ## Detect the kde libraries + print "Checking for tde-config : ", + kde_config = os.popen("which tde-config 2>/dev/null").read().strip() + if len(kde_config): + print GREEN+"tde-config was found"+NORMAL + else: + print RED+"tde-config was NOT found in your PATH"+NORMAL + print "Make sure kde is installed properly" + print "(missing package tdebase-devel?)" + env.Exit(1) + env['TDEDIR'] = os.popen('tde-config -prefix').read().strip() + + print "Checking for kde version : ", + kde_version = os.popen("tde-config --version|grep KDE").read().strip().split()[1] + if int(kde_version[0]) != 3 or int(kde_version[2]) < 2: + print RED+kde_version + print RED+"Your kde version can be too old"+NORMAL + print RED+"Please make sure kde is at least 3.2"+NORMAL + else: + print GREEN+kde_version+NORMAL + + ## Detect the qt library + print "Checking for the qt library : ", + qtdir = os.getenv("QTDIR") + if qtdir: + print GREEN+"qt is in "+qtdir+NORMAL + else: + libdir = os.popen('tde-config --expandvars --install lib').read().strip() + libtdeuiSO = libdir+'/'+getSOfromLA(libdir+'/libtdeui.la') + m = re.search('(.*)/lib/libqt.*', os.popen('ldd ' + libtdeuiSO + ' | grep libqt').read().strip().split()[2]) + if m: + qtdir = m.group(1) + print YELLOW+"qt was found as "+m.group(1)+NORMAL + else: + print RED+"qt was not found"+NORMAL + print RED+"Please set QTDIR first (/usr/lib/qt3?)"+NORMAL + env.Exit(1) + env['QTDIR'] = qtdir.strip() + + ## Find the necessary programs uic and moc + print "Checking for uic : ", + uic = qtdir + "/bin/uic" + if os.path.isfile(uic): + print GREEN+"uic was found as "+uic+NORMAL + else: + uic = os.popen("which uic 2>/dev/null").read().strip() + if len(uic): + print YELLOW+"uic was found as "+uic+NORMAL + else: + uic = os.popen("which uic 2>/dev/null").read().strip() + if len(uic): + print YELLOW+"uic was found as "+uic+NORMAL + else: + print RED+"uic was not found - set QTDIR put it in your PATH ?"+NORMAL + env.Exit(1) + env['QT_UIC'] = uic + + print "Checking for moc : ", + moc = qtdir + "/bin/moc" + if os.path.isfile(moc): + print GREEN + "moc was found as " + moc + NORMAL + else: + moc = os.popen("which moc 2>/dev/null").read().strip() + if len(moc): + print YELLOW + "moc was found as " + moc + NORMAL + elif os.path.isfile("/usr/share/qt3/bin/moc"): + moc = "/usr/share/qt3/bin/moc" + print YELLOW + "moc was found as " + moc + NORMAL + else: + print RED + "moc was not found - set QTDIR or put it in your PATH ?" + NORMAL + env.Exit(1) + env['QT_MOC'] = moc + + ## check for the qt and kde includes + print "Checking for the qt includes : ", + if qtincludes and os.path.isfile(qtincludes + "/qtqlayout.h"): + # The user told where to look for and it looks valid + print GREEN + "ok " + qtincludes + NORMAL + else: + if os.path.isfile(qtdir + "/include/qtqlayout.h"): + # Automatic detection + print GREEN + "ok " + qtdir + "/include/ " + NORMAL + qtincludes = qtdir + "/include/" + elif os.path.isfile("/usr/include/qt3/qtqlayout.h"): + # Debian probably + print YELLOW + "the qt headers were found in /usr/include/qt3/ " + NORMAL + qtincludes = "/usr/include/qt3" + else: + print RED + "the qt headers were not found" + NORMAL + env.Exit(1) + + print "Checking for the kde includes : ", + kdeprefix = os.popen("tde-config --prefix").read().strip() + if not kdeincludes: + kdeincludes = kdeprefix+"/include/" + if os.path.isfile(kdeincludes + "/klineedit.h"): + print GREEN + "ok " + kdeincludes + NORMAL + else: + if os.path.isfile(kdeprefix+"/include/tde/klineedit.h"): + # Debian, Fedora probably + print YELLOW + "the kde headers were found in " + kdeprefix + "/include/tde/" + NORMAL + kdeincludes = kdeprefix + "/include/tde/" + else: + print RED + "The kde includes were NOT found" + NORMAL + env.Exit(1) + + if prefix: + ## use the user-specified prefix + if not execprefix: + execprefix = prefix + if not datadir: + datadir=prefix+"/share" + if not libdir: + libdir=execprefix+"/lib"+libsuffix + + subst_vars = lambda x: x.replace('${exec_prefix}', execprefix).replace('${datadir}',datadir).replace('${libdir}', libdir) + debian_fix = lambda x: x.replace('/usr/share', '${datadir}') + env['KDEBIN'] = subst_vars(os.popen('tde-config --install exe').read().strip()) + env['KDEAPPS'] = subst_vars(os.popen('tde-config --install apps').read().strip()) + env['KDEDATA'] = subst_vars(os.popen('tde-config --install data').read().strip()) + env['KDEMODULE']= subst_vars(os.popen('tde-config --install module').read().strip()) + env['KDELOCALE']= subst_vars(os.popen('tde-config --install locale').read().strip()) + env['KDEDOC'] = subst_vars( debian_fix(os.popen('tde-config --install html').read().strip()) ) + env['KDEKCFG'] = subst_vars(os.popen('tde-config --install kcfg').read().strip()) + env['KDEXDG'] = subst_vars(os.popen('tde-config --install xdgdata-apps').read().strip()) + env['KDEXDGDIR']= subst_vars(os.popen('tde-config --install xdgdata-dirs').read().strip()) + env['KDEMENU'] = subst_vars(os.popen('tde-config --install apps').read().strip()) + env['KDEMIME'] = subst_vars(os.popen('tde-config --install mime').read().strip()) + env['KDEICONS'] = subst_vars(os.popen('tde-config --install icon').read().strip()) + env['KDESERV'] = subst_vars(os.popen('tde-config --install services').read().strip()) + else: + # the user has given no prefix, install as a normal kde app + env['PREFIX'] = os.popen('tde-config --prefix').read().strip() + env['KDEBIN'] = os.popen('tde-config --expandvars --install exe').read().strip() + env['KDEAPPS'] = os.popen('tde-config --expandvars --install apps').read().strip() + env['KDEDATA'] = os.popen('tde-config --expandvars --install data').read().strip() + env['KDEMODULE']= os.popen('tde-config --expandvars --install module').read().strip() + env['KDELOCALE']= os.popen('tde-config --expandvars --install locale').read().strip() + env['KDEDOC'] = os.popen('tde-config --expandvars --install html').read().strip() + env['KDEKCFG'] = os.popen('tde-config --expandvars --install kcfg').read().strip() + env['KDEXDG'] = os.popen('tde-config --expandvars --install xdgdata-apps').read().strip() + env['KDEXDGDIR']= os.popen('tde-config --expandvars --install xdgdata-dirs').read().strip() + env['KDEMENU'] = os.popen('tde-config --expandvars --install apps').read().strip() + env['KDEMIME'] = os.popen('tde-config --expandvars --install mime').read().strip() + env['KDEICONS'] = os.popen('tde-config --expandvars --install icon').read().strip() + env['KDESERV'] = os.popen('tde-config --expandvars --install services').read().strip() + + env['QTPLUGINS']=os.popen('tde-config --expandvars --install qtplugins').read().strip() + + ## kde libs and includes + env['KDEINCLUDEPATH']=kdeincludes + if not tdelibs: + tdelibs=os.popen('tde-config --expandvars --install lib').read().strip() + env['KDELIBPATH']=tdelibs + + ## qt libs and includes + env['QTINCLUDEPATH']=qtincludes + if not qtlibs: + qtlibs=qtdir+"/lib" + env['QTLIBPATH']=qtlibs + +def generate(env): + """"Set up the qt and kde environment and builders - the moc part is difficult to understand """ + if env['HELP']: + print """ +"""+BOLD+"""*** KDE options *** +-------------------"""+NORMAL+""" +"""+BOLD+"""* prefix """+NORMAL+""": base install path, ie: /usr/local +"""+BOLD+"""* execprefix """+NORMAL+""": install path for binaries, ie: /usr/bin +"""+BOLD+"""* datadir """+NORMAL+""": install path for the data, ie: /usr/local/share +"""+BOLD+"""* libdir """+NORMAL+""": install path for the libs, ie: /usr/lib +"""+BOLD+"""* libsuffix """+NORMAL+""": suffix of libraries on amd64, ie: 64, 32 +"""+BOLD+"""* kdeincludes"""+NORMAL+""": path to the kde includes (/usr/include/tde on debian, ...) +"""+BOLD+"""* qtincludes """+NORMAL+""": same punishment, for qt includes (/usr/include/qt on debian, ...) +"""+BOLD+"""* tdelibs """+NORMAL+""": path to the kde libs, for linking the programs +"""+BOLD+"""* qtlibs """+NORMAL+""": same punishment, for qt libraries +ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt +"""+NORMAL + + import SCons.Defaults + import SCons.Tool + import SCons.Util + + ui_extensions = [".ui"] + header_extensions = [".h", ".hxx", ".hpp", ".hh"] + source_extensions = [".cpp", ".cxx", ".cc"] + + def find_file(filename, paths, node_factory): + retval = None + for dir in paths: + node = node_factory(filename, dir) + if node.rexists(): + return node + return None + + class _Metasources: + """ Callable class, which works as an emitter for Programs, SharedLibraries + and StaticLibraries.""" + + def __init__(self, objBuilderName): + self.objBuilderName = objBuilderName + + def __call__(self, target, source, env): + """ Smart autoscan function. Gets the list of objects for the Program + or Lib. Adds objects and builders for the special qt files. """ + try: + if int(env.subst('$QT_AUTOSCAN')) == 0: + return target, source + except ValueError: + pass + + try: + qtdebug = int(env.subst('$QT_DEBUG')) + except ValueError: + qtdebug = 0 + + # some shortcuts used in the scanner + FS = SCons.Node.FS.default_fs + splitext = SCons.Util.splitext + objBuilder = getattr(env, self.objBuilderName) + + # some regular expressions: + # Q_OBJECT detection + q_object_search = re.compile(r'[^A-Za-z0-9]Q_OBJECT[^A-Za-z0-9]') + + # The following is kind of hacky to get builders working properly (FIXME) ?? + objBuilderEnv = objBuilder.env + objBuilder.env = env + mocBuilderEnv = env.Moc.env + env.Moc.env = env + + # make a deep copy for the result; MocH objects will be appended + out_sources = source[:] + + for obj in source: + if not obj.has_builder(): + # binary obj file provided + if qtdebug: + print "scons: qt: '%s' seems to be a binary. Discarded." % str(obj) + continue + cpp = obj.sources[0] + if not splitext(str(cpp))[1] in source_extensions: + if qtdebug: + print "scons: qt: '%s' is no cxx file. Discarded." % str(cpp) + # c or fortran source + continue + #cpp_contents = comment.sub('', cpp.get_contents()) + cpp_contents = cpp.get_contents() + + h = None + ui = None + + for ui_ext in ui_extensions: + # try to find the ui file in the corresponding source directory + uiname = splitext(cpp.name)[0] + ui_ext + ui = find_file(uiname, (cpp.get_dir(),), FS.File) + if ui: + if qtdebug: + print "scons: qt: found .ui file of header" #% (str(h), str(cpp)) + #h_contents = comment.sub('', h.get_contents()) + break + + # if we have a .ui file, do not continue, it is automatically handled by Uic + if ui: + continue + + for h_ext in header_extensions: + # try to find the header file in the corresponding source + # directory + hname = splitext(cpp.name)[0] + h_ext + h = find_file(hname, (cpp.get_dir(),), FS.File) + if h: + if qtdebug: + print "scons: qt: Scanning '%s' (header of '%s')" % (str(h), str(cpp)) + #h_contents = comment.sub('', h.get_contents()) + h_contents = h.get_contents() + break + + if not h and qtdebug: + print "scons: qt: no header for '%s'." % (str(cpp)) + if h and q_object_search.search(h_contents): + # h file with the Q_OBJECT macro found -> add .moc or _moc.cpp file + moc_cpp = None + + if env.has_key('NOMOCSCAN'): + moc_cpp = env.Moc(h) + else: + reg = '\n\s*#include\s*("|<)'+splitext(cpp.name)[0]+'.moc("|>)' + meta_object_search = re.compile(reg) + if meta_object_search.search(cpp_contents): + moc_cpp = env.Moc(h) + else: + moc_cpp = env.Moccpp(h) + moc_o = objBuilder(moc_cpp) + out_sources.append(moc_o) + if qtdebug: + print "scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp[0])) + + if cpp and q_object_search.search(cpp_contents): + print "error, bksys cannot handle cpp files with Q_OBJECT classes" + print "if you are sure this is a feature worth the effort, " + print "report this to the authors tnagyemail-mail yahoo.fr" + + # restore the original env attributes (FIXME) + objBuilder.env = objBuilderEnv + env.Moc.env = mocBuilderEnv + + return (target, out_sources) + + MetasourcesShared = _Metasources('SharedObject') + MetasourcesStatic = _Metasources('StaticObject') + + CLVar = SCons.Util.CLVar + splitext = SCons.Util.splitext + Builder = SCons.Builder.Builder + + # Detect the environment - replaces ./configure implicitely and store the options into a cache + from SCons.Options import Options + cachefile=env['CACHEDIR']+'kde.cache.py' + opts = Options(cachefile) + opts.AddOptions( + ('PREFIX', 'root of the program installation'), + + ('QTDIR', 'root of qt directory'), + ('QTLIBPATH', 'path to the qt libraries'), + ('QTINCLUDEPATH', 'path to the qt includes'), + ('QT_UIC', 'moc directory'), + ('QT_MOC', 'moc executable command'), + ('QTPLUGINS', 'uic executable command'), + ('TDEDIR', 'root of kde directory'), + ('KDELIBPATH', 'path to the kde libs'), + ('KDEINCLUDEPATH', 'path to the kde includes'), + + ('KDEBIN', 'installation path of the kde binaries'), + ('KDEMODULE', 'installation path of the parts and libs'), + ('KDEAPPS', ''), + ('KDEDATA', 'installation path of the application data'), + ('KDELOCALE', ''), + ('KDEDOC', 'installation path of the application documentation'), + ('KDEKCFG', 'installation path of the .kcfg files'), + ('KDEXDG', 'installation path of the service types'), + ('KDEXDGDIR', 'installation path of the xdg service directories'), + ('KDEMENU', ''), + ('KDEMIME', 'installation path of to the mimetypes'), + ('KDEICONS', ''), + ('KDESERV', ''), + ) + opts.Update(env) + + # reconfigure when things are missing + if not env['HELP'] and (env['_CONFIGURE'] or not env.has_key('QTDIR') or not env.has_key('TDEDIR')): + detect_kde(env) + + # finally save the configuration to the cache file + opts.Save(cachefile, env) + + ## set default variables, one can override them in sconscript files + env.Append(CXXFLAGS = ['-I'+env['KDEINCLUDEPATH'], '-I'+env['QTINCLUDEPATH'] ]) + env.Append(LIBPATH = [env['KDELIBPATH'], env['QTLIBPATH'] ]) + + env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 + + env['QT_AUTOSCAN'] = 1 + env['QT_DEBUG'] = 0 + env['QT_UIC_HFLAGS'] = '-L $QTPLUGINS -nounload' + env['QT_UIC_CFLAGS'] = '$QT_UIC_HFLAGS -tr tr2i18n' + env['QT_LIBS'] = 'qt-mt' + env['QT_UICIMPLPREFIX'] = '' + env['QT_UICIMPLSUFFIX'] = '.cpp' + + env['QT_MOCHPREFIX'] = '' + env['QT_MOCHSUFFIX'] = '.moc' + env['KDE_KCFG_IMPLPREFIX'] = '' + env['KDE_KCFG_IMPL_HSUFFIX'] = '.h' + env['KDE_KCFG_IMPL_CSUFFIX'] = '.cpp' + env['KDE_SKEL_IMPL_SUFFIX'] = '.skel' + env['MEINPROC'] = 'meinproc' + env['MSGFMT'] = 'msgfmt' + + ## ui file processing + def uic_processing(target, source, env): + inc_kde = '#include \n#include \n' + inc_moc = '#include "%s"\n' % target[2].name + comp_h = '$QT_UIC $QT_UIC_HFLAGS -o %s %s' % (target[0].path, source[0].path) + comp_c = '$QT_UIC $QT_UIC_CFLAGS -impl %s %s' % (target[0].path, source[0].path) + comp_moc = '$QT_MOC -o %s %s' % (target[2].path, target[0].path) + + ret = env.Execute(comp_h) + if ret: + return ret + + dest = open( target[1].path, "w" ) + dest.write(inc_kde) + dest.close() + + ret = env.Execute( comp_c+" >> "+target[1].path ) + if ret: + return ret + + dest = open( target[1].path, "a" ) + dest.write(inc_moc) + dest.close() + + ret = env.Execute( comp_moc ) + return ret + + def uicEmitter(target, source, env): + adjustixes = SCons.Util.adjustixes + bs = SCons.Util.splitext(str(source[0].name))[0] + bs = os.path.join(str(target[0].get_dir()),bs) + # first target is automatically added by builder (.h file) + if len(target) < 2: + # second target is .cpp file + target.append(adjustixes(bs, + env.subst('$QT_UICIMPLPREFIX'), + env.subst('$QT_UICIMPLSUFFIX'))) + if len(target) < 3: + # third target is .moc file + target.append(adjustixes(bs, + env.subst('$QT_MOCHPREFIX'), + env.subst('$QT_MOCHSUFFIX'))) + return target, source + + UIC_BUILDER = Builder( + action = uic_processing, + emitter = uicEmitter, + suffix = '.h', + src_suffix = '.ui') + + ## moc file processing + env['QT_MOCCOM'] = ('$QT_MOC -o ${TARGETS[0]} $SOURCE') + + MOC_BUILDER = Builder( + action = '$QT_MOCCOM', + suffix = '.moc', + src_suffix = '.h') + + MOCCPP_BUILDER = Builder( + action = '$QT_MOCCOM', + suffix = '_moc.cpp', + src_suffix = '.h') + + ## kcfg file processing + def kcfgGenerator(target, source, env, for_signature): + act=[] + act.append('tdeconfig_compiler -d'+str(source[0].get_dir())+' '+source[1].path+' '+source[0].path) + return act + + def kcfgEmitter(target, source, env): + adjustixes = SCons.Util.adjustixes + bs = SCons.Util.splitext(str(source[0].name))[0] + bs = os.path.join(str(target[0].get_dir()),bs) + # .h file is automatically added + if len(target) < 2: + # add .cpp file + target.append(adjustixes(bs, env.subst('$KDE_KCFG_IMPLPREFIX'), env.subst('$KDE_KCFG_IMPL_CSUFFIX'))) + + if len(source) <2: + if not os.path.isfile(str(source[0])): + print RED+'kcfg file given'+str(source[0])+' does not exist !'+NORMAL + return target, source + kfcgfilename="" + kcfgFileDeclRx = re.compile("^[fF]ile\s*=\s*(.+)\s*$") + for line in file(str(source[0]), "r").readlines(): + match = kcfgFileDeclRx.match(line.strip()) + if match: + kcfgfilename = match.group(1) + break + source.append(str(source[0].get_dir())+'/'+kcfgfilename) + return target, source + + KCFG_BUILDER = Builder( + generator = kcfgGenerator, + emitter = kcfgEmitter, + suffix = '.h', + src_suffix = '.kcfgc') + + ## dcop processing + def dcopGenerator(target, source, env, for_signature): + act=[] + act.append('dcopidl '+source[0].path+' > '+target[1].path+'|| ( rm -f '+target[1].path+' ; false)') + act.append('dcopidl2cpp --c++-suffix cpp --no-Q_SIGNALS --no-stub '+target[1].path) + return act + + def dcopEmitter(target, source, env): + bs = SCons.Util.splitext(str(source[0].name))[0] + bs = os.path.join(str(target[0].get_dir()),bs) + target.append(bs+'.kidl') + #target.append(bs+'_skel.cpp') + return target, source + + DCOP_BUILDER = Builder( + generator = dcopGenerator, + emitter = dcopEmitter, + suffix = '_skel.cpp', + src_suffix = '.h') + + ## documentation processing + MEINPROC_BUILDER = Builder( + action = '$MEINPROC --check --cache $TARGET $SOURCE', + suffix = '.cache.bz2') + + ## translation files builder + TRANSFILES_BUILDER = Builder( + action = '$MSGFMT $SOURCE -o $TARGET', + suffix = '.gmo', + src_suffix = '.po') + + ## libtool file builder + def la_file(target, source, env): + dest=open(target[0].path, 'w') + sname=source[0].name + dest.write("dlname='%s'\n" % sname) + dest.write("library_names='%s %s %s'\n" % (sname, sname, sname)) + dest.write("old_library=''\n") + dest.write("dependency_libs=''\n") + dest.write("current=0\n") + dest.write("age=0\n") + dest.write("revision=0\n") + dest.write("installed=yes\n") + dest.write("shouldnotlink=no\n") + dest.write("dlopen=''\n") + dest.write("dlpreopen=''\n") + dest.write("libdir='%s'" % env['KDEMODULE']) + dest.close() + return 0 + + LA_BUILDER = Builder( + action = la_file, + suffix = '.la', + src_suffix = env['SHLIBSUFFIX']) + + ## register the builders + env['BUILDERS']['Uic'] = UIC_BUILDER + env['BUILDERS']['Moc'] = MOC_BUILDER + env['BUILDERS']['Moccpp'] = MOCCPP_BUILDER + env['BUILDERS']['Dcop'] = DCOP_BUILDER + env['BUILDERS']['Kcfg'] = KCFG_BUILDER + env['BUILDERS']['LaFile'] = LA_BUILDER + env['BUILDERS']['Meinproc'] = MEINPROC_BUILDER + env['BUILDERS']['Transfiles']= TRANSFILES_BUILDER + + static_obj, shared_obj = SCons.Tool.createObjBuilders(env) + static_obj.src_builder.append('Uic') + shared_obj.src_builder.append('Uic') + static_obj.src_builder.append('Kcfg') + shared_obj.src_builder.append('Kcfg') + static_obj.src_builder.append('LaFile') + shared_obj.src_builder.append('LaFile') + static_obj.src_builder.append('Meinproc') + shared_obj.src_builder.append('Meinproc') + static_obj.src_builder.append('Transfiles') + shared_obj.src_builder.append('Transfiles') + + ## Find the files to moc, dcop, and link against kde and qt + env.AppendUnique(PROGEMITTER = [MetasourcesStatic], SHLIBEMITTER=[MetasourcesShared], LIBEMITTER =[MetasourcesStatic]) + + ## Handy helpers for building kde programs + ## You should not have to modify them .. + + ## return a list of things + def make_list(e): + if type(e) is types.ListType: + return e + else: + return e.split() + + #import SCons.Util + skel_ext = [".skel", ".SKEL"] + def KDEfiles(lenv, target, source): + """ Returns a list of files for scons (handles kde tricks like .skel) + It also makes custom checks against double includes like : ['file.ui', 'file.cpp'] + (file.cpp is already included because of file.ui) """ + + src=[] + ui_files=[] + kcfg_files=[] + skel_files=[] + other_files=[] + + source_=make_list(source) + + # For each file, check wether it is a dcop file or not, and create the complete list of sources + for file in source_: + bs = SCons.Util.splitext(file)[0] + ext = SCons.Util.splitext(file)[1] + if ext in skel_ext: + lenv.Dcop(bs+'.h') + src.append(bs+'_skel.cpp') + elif ext == ".moch": + lenv.Moccpp(bs+'.h') + src.append(bs+'_moc.cpp') + else: + src.append(file) + + if ext == '.ui': + ui_files.append(bs) + elif ext == '.kcfgc': + kcfg_files.append(bs) + elif ext == '.skel': + skel_files.append(bs) + else: + other_files.append(bs) + + # Now check against typical newbie errors + for file in ui_files: + for ofile in other_files: + if ofile == file: + print RED+"WARNING: You have included "+file+".ui and another file of the same prefix"+NORMAL + print "Files generated by uic (file.h, file.cpp must not be included" + for file in kcfg_files: + for ofile in other_files: + if ofile == file: + print RED+"WARNING: You have included "+file+".kcfg and another file of the same prefix"+NORMAL + print "Files generated by tdeconfig_compiler (settings.h, settings.cpp) must not be included" + return src + + + """ + In the future, these functions will contain the code that will dump the + configuration for re-use from an IDE + """ + import glob + def KDEinstall(lenv, restype, subdir, files): + if not env['_INSTALL']: + return + basedir=env['DESTDIR'] + if len(restype)>0: + if not lenv.has_key(restype): + print RED+"unknown resource type "+restype+NORMAL + else: + basedir += lenv[restype]+'/' + #print file # <- useful to trace stuff :) + install_list = env.Install(basedir+subdir+'/', files) + env.Alias('install', install_list) + return install_list + + def KDEinstallas(lenv, restype, destfile, file): + if not env['_INSTALL']: + return + basedir=env['DESTDIR'] + if len(restype)>0: + if not lenv.has_key(restype): + print RED+"unknown resource type "+restype+NORMAL + else: + basedir += lenv[restype]+'/' + install_list = env.InstallAs(basedir+destfile, file) + env.Alias('install', install_list) + return install_list + + def KDEprogram(lenv, target, source): + """ Makes a kde program + The program is installed except if one sets env['NOAUTOINSTALL'] """ + src = KDEfiles(lenv, target, source) + program_list = lenv.Program(target, src) + if not lenv.has_key('NOAUTOINSTALL'): + KDEinstall(lenv, 'KDEBIN', '', target) + return program_list + + def KDEshlib(lenv, target, source, kdelib=0, libprefix='lib'): + """ Makes a shared library for kde (.la file for klibloader) + The library is installed except if one sets env['NOAUTOINSTALL'] """ + src = KDEfiles(lenv, target, source) + lenv['LIBPREFIX']=libprefix + library_list = lenv.SharedLibrary(target, src) + lafile_list = lenv.LaFile(target, library_list) + if not lenv.has_key('NOAUTOINSTALL'): + install_dir = 'KDEMODULE' + if kdelib==1: + install_dir = 'KDELIBPATH' + KDEinstall(lenv, install_dir, '', library_list) + KDEinstall(lenv, install_dir, '', lafile_list) + return library_list + + def KDEstaticlib(lenv, target, source): + """ Makes a static library for kde - in practice you should not use static libraries + 1. they take more memory than shared ones + 2. makefile.am needed it because of limitations + (cannot handle sources in separate folders - takes extra processing) """ + src = KDEfiles(lenv, target, source) + return lenv.StaticLibrary(target, src) + # do not install static libraries by default + + def KDEaddflags_cxx(lenv, fl): + """ Compilation flags for C++ programs """ + lenv.AppendUnique(CXXFLAGS = make_list(fl)) + + def KDEaddflags_c(lenv, fl): + """ Compilation flags for C programs """ + lenv.AppendUnique(CFLAGS = make_list(fl)) + + def KDEaddflags_link(lenv, fl): + """ Add link flags - Use this if KDEaddlibs below is not enough """ + lenv.AppendUnique(LINKFLAGS = make_list(fl)) + + def KDEaddlibs(lenv, libs): + """ Helper function """ + lenv.AppendUnique(LIBS = make_list(libs)) + + def KDEaddpaths_includes(lenv, paths): + """ Add new include paths """ + lenv.AppendUnique(CPPPATH = make_list(paths)) + + def KDEaddpaths_libs(lenv, paths): + """ Add paths to libraries """ + lenv.AppendUnique(LIBPATH = make_list(paths)) + + def KDElang(lenv, folder, appname): + """ Process translations (.po files) in a po/ dir """ + transfiles = glob.glob(folder+'/*.po') + for lang in transfiles: + result = lenv.Transfiles(lang) + country = SCons.Util.splitext(result[0].name)[0] + KDEinstallas(lenv, 'KDELOCALE', country+'/LC_MESSAGES/'+appname+'.mo', result) + + def subdirs(lenv, folderlist): + flist=make_list(folderlist) + for i in flist: + lenv.SConscript(i+"/SConscript") + + def KDEicon(lenv, icname='*', path='./'): + """ Emulates the behaviour of Makefile.am to install icons + Contributed by: "Andrey Golovizin" """ + type_dic = { 'action' : 'actions', 'app' : 'apps', 'device' : + 'devices', 'filesys' : 'filesystems', 'mime' : 'mimetypes' } + dir_dic = { + 'los' :'locolor/16x16', + 'lom' :'locolor/32x32', + 'him' :'hicolor/32x32', + 'hil' :'hicolor/48x48', + 'lo16' :'locolor/16x16', + 'lo22' :'locolor/22x22', + 'lo32' :'locolor/32x32', + 'hi16' :'hicolor/16x16', + 'hi22' :'hicolor/22x22', + 'hi32' :'hicolor/32x32', + 'hi48' :'hicolor/48x48', + 'hi64' :'hicolor/64x64', + 'hi128':'hicolor/128x128', + 'hisc' :'hicolor/scalable', + 'cr16' :'crystalsvg/16x16', + 'cr22' :'crystalsvg/22x22', + 'cr32' :'crystalsvg/32x32', + 'cr48' :'crystalsvg/48x48', + 'cr64' :'crystalsvg/64x64', + 'cr128':'crystalsvg/128x128', + 'crsc' :'crystalsvg/scalable' + } + + iconfiles = [] + for ext in "png xpm mng svg svgz".split(): + files = glob.glob(path+'/'+'*-*-%s.%s' % (icname, ext)) + iconfiles += files + for iconfile in iconfiles: + lst = iconfile.split('/') + filename = lst[ len(lst) - 1 ] + tmp = filename.split('-') + if len(tmp)!=3: + print RED+'WARNING: icon filename has unknown format: '+iconfile+NORMAL + continue + [icon_dir, icon_type, icon_filename]=tmp + try: + destfile = '%s/%s/%s/%s' % (lenv['KDEICONS'], dir_dic[icon_dir], type_dic[icon_type], icon_filename) + except KeyError: + print RED+'WARNING: unknown icon type: '+iconfile+NORMAL + continue + ## Do not use KDEinstallas here, as parsing from an ide will be necessary + if env['_INSTALL']: + env.Alias('install', env.InstallAs( env['DESTDIR']+'/'+destfile, iconfile ) ) + + def KDEuse(lenv, flags): + _flags=make_list(flags) + if 'environ' in _flags: + ## The scons developers advise against using this but it is mostly innocuous :) + import os + lenv.AppendUnique( ENV = os.environ ) + if not 'lang_qt' in _flags: + ## Use this define if you are using the kde translation scheme (.po files) + lenv.Append( CPPFLAGS = '-DQT_NO_TRANSLATION' ) + if 'rpath' in _flags: + ## Use this to set rpath - this may cause trouble if folders are moved (chrpath) + lenv.Append( RPATH = [env['QTLIBPATH'], env['KDELIBPATH'], env['KDEMODULE']] ) + if 'thread' in _flags: + ## Uncomment the following if you need threading support + lenv.KDEaddflags_cxx( ['-DQT_THREAD_SUPPORT', '-D_REENTRANT'] ) + if not 'nohelp' in _flags: + if lenv['_CONFIGURE'] or lenv['HELP']: + env.Exit(0) + + ## To use kdDebug(intvalue)<<"some trace"< - -""" -Run scons -h to display the associated help, or look below .. -""" - -BOLD ="\033[1m" -RED ="\033[91m" -GREEN ="\033[92m" -YELLOW ="\033[1m" #"\033[93m" # unreadable on white backgrounds -CYAN ="\033[96m" -NORMAL ="\033[0m" - -import os, re, types - -# Returns the name of the shared object (i.e. libtdeui.so.4) -# referenced by a libtool archive (like libtdeui.la) -def getSOfromLA(lafile): - contents = open(lafile, 'r').read() - match = re.search("^dlname='([^']*)'$", contents, re.M) - if match: - return match.group(1) - return None - -def exists(env): - return True - -def detect_kde(env): - """ Detect the qt and kde environment using tde-config mostly """ - - prefix = env['ARGS'].get('prefix', None) - execprefix = env['ARGS'].get('execprefix', None) - datadir = env['ARGS'].get('datadir', None) - libdir = env['ARGS'].get('libdir', None) - libsuffix = env['ARGS'].get('libsuffix', '') - kdeincludes = env['ARGS'].get('kdeincludes', None) - tdelibs = env['ARGS'].get('tdelibs', None) - qtincludes = env['ARGS'].get('qtincludes', None) - qtlibs = env['ARGS'].get('qtlibs', None) - - if libdir: - libdir = libdir+libsuffix - - ## Detect the kde libraries - print "Checking for tde-config : ", - kde_config = os.popen("which tde-config 2>/dev/null").read().strip() - if len(kde_config): - print GREEN+"tde-config was found"+NORMAL - else: - print RED+"tde-config was NOT found in your PATH"+NORMAL - print "Make sure kde is installed properly" - print "(missing package tdebase-devel?)" - env.Exit(1) - env['TDEDIR'] = os.popen('tde-config -prefix').read().strip() - - print "Checking for kde version : ", - kde_version = os.popen("tde-config --version|grep KDE").read().strip().split()[1] - if int(kde_version[0]) != 3 or int(kde_version[2]) < 2: - print RED+kde_version - print RED+"Your kde version can be too old"+NORMAL - print RED+"Please make sure kde is at least 3.2"+NORMAL - else: - print GREEN+kde_version+NORMAL - - ## Detect the qt library - print "Checking for the qt library : ", - qtdir = os.getenv("QTDIR") - if qtdir: - print GREEN+"qt is in "+qtdir+NORMAL - else: - libdir = os.popen('tde-config --expandvars --install lib').read().strip() - libtdeuiSO = libdir+'/'+getSOfromLA(libdir+'/libtdeui.la') - m = re.search('(.*)/lib/libqt.*', os.popen('ldd ' + libtdeuiSO + ' | grep libqt').read().strip().split()[2]) - if m: - qtdir = m.group(1) - print YELLOW+"qt was found as "+m.group(1)+NORMAL - else: - print RED+"qt was not found"+NORMAL - print RED+"Please set QTDIR first (/usr/lib/qt3?)"+NORMAL - env.Exit(1) - env['QTDIR'] = qtdir.strip() - - ## Find the necessary programs uic and moc - print "Checking for uic : ", - uic = qtdir + "/bin/uic" - if os.path.isfile(uic): - print GREEN+"uic was found as "+uic+NORMAL - else: - uic = os.popen("which uic 2>/dev/null").read().strip() - if len(uic): - print YELLOW+"uic was found as "+uic+NORMAL - else: - uic = os.popen("which uic 2>/dev/null").read().strip() - if len(uic): - print YELLOW+"uic was found as "+uic+NORMAL - else: - print RED+"uic was not found - set QTDIR put it in your PATH ?"+NORMAL - env.Exit(1) - env['QT_UIC'] = uic - - print "Checking for moc : ", - moc = qtdir + "/bin/moc" - if os.path.isfile(moc): - print GREEN + "moc was found as " + moc + NORMAL - else: - moc = os.popen("which moc 2>/dev/null").read().strip() - if len(moc): - print YELLOW + "moc was found as " + moc + NORMAL - elif os.path.isfile("/usr/share/qt3/bin/moc"): - moc = "/usr/share/qt3/bin/moc" - print YELLOW + "moc was found as " + moc + NORMAL - else: - print RED + "moc was not found - set QTDIR or put it in your PATH ?" + NORMAL - env.Exit(1) - env['QT_MOC'] = moc - - ## check for the qt and kde includes - print "Checking for the qt includes : ", - if qtincludes and os.path.isfile(qtincludes + "/qtqlayout.h"): - # The user told where to look for and it looks valid - print GREEN + "ok " + qtincludes + NORMAL - else: - if os.path.isfile(qtdir + "/include/qtqlayout.h"): - # Automatic detection - print GREEN + "ok " + qtdir + "/include/ " + NORMAL - qtincludes = qtdir + "/include/" - elif os.path.isfile("/usr/include/qt3/qtqlayout.h"): - # Debian probably - print YELLOW + "the qt headers were found in /usr/include/qt3/ " + NORMAL - qtincludes = "/usr/include/qt3" - else: - print RED + "the qt headers were not found" + NORMAL - env.Exit(1) - - print "Checking for the kde includes : ", - kdeprefix = os.popen("tde-config --prefix").read().strip() - if not kdeincludes: - kdeincludes = kdeprefix+"/include/" - if os.path.isfile(kdeincludes + "/klineedit.h"): - print GREEN + "ok " + kdeincludes + NORMAL - else: - if os.path.isfile(kdeprefix+"/include/tde/klineedit.h"): - # Debian, Fedora probably - print YELLOW + "the kde headers were found in " + kdeprefix + "/include/tde/" + NORMAL - kdeincludes = kdeprefix + "/include/tde/" - else: - print RED + "The kde includes were NOT found" + NORMAL - env.Exit(1) - - if prefix: - ## use the user-specified prefix - if not execprefix: - execprefix = prefix - if not datadir: - datadir=prefix+"/share" - if not libdir: - libdir=execprefix+"/lib"+libsuffix - - subst_vars = lambda x: x.replace('${exec_prefix}', execprefix).replace('${datadir}',datadir).replace('${libdir}', libdir) - debian_fix = lambda x: x.replace('/usr/share', '${datadir}') - env['KDEBIN'] = subst_vars(os.popen('tde-config --install exe').read().strip()) - env['KDEAPPS'] = subst_vars(os.popen('tde-config --install apps').read().strip()) - env['KDEDATA'] = subst_vars(os.popen('tde-config --install data').read().strip()) - env['KDEMODULE']= subst_vars(os.popen('tde-config --install module').read().strip()) - env['KDELOCALE']= subst_vars(os.popen('tde-config --install locale').read().strip()) - env['KDEDOC'] = subst_vars( debian_fix(os.popen('tde-config --install html').read().strip()) ) - env['KDEKCFG'] = subst_vars(os.popen('tde-config --install kcfg').read().strip()) - env['KDEXDG'] = subst_vars(os.popen('tde-config --install xdgdata-apps').read().strip()) - env['KDEXDGDIR']= subst_vars(os.popen('tde-config --install xdgdata-dirs').read().strip()) - env['KDEMENU'] = subst_vars(os.popen('tde-config --install apps').read().strip()) - env['KDEMIME'] = subst_vars(os.popen('tde-config --install mime').read().strip()) - env['KDEICONS'] = subst_vars(os.popen('tde-config --install icon').read().strip()) - env['KDESERV'] = subst_vars(os.popen('tde-config --install services').read().strip()) - else: - # the user has given no prefix, install as a normal kde app - env['PREFIX'] = os.popen('tde-config --prefix').read().strip() - env['KDEBIN'] = os.popen('tde-config --expandvars --install exe').read().strip() - env['KDEAPPS'] = os.popen('tde-config --expandvars --install apps').read().strip() - env['KDEDATA'] = os.popen('tde-config --expandvars --install data').read().strip() - env['KDEMODULE']= os.popen('tde-config --expandvars --install module').read().strip() - env['KDELOCALE']= os.popen('tde-config --expandvars --install locale').read().strip() - env['KDEDOC'] = os.popen('tde-config --expandvars --install html').read().strip() - env['KDEKCFG'] = os.popen('tde-config --expandvars --install kcfg').read().strip() - env['KDEXDG'] = os.popen('tde-config --expandvars --install xdgdata-apps').read().strip() - env['KDEXDGDIR']= os.popen('tde-config --expandvars --install xdgdata-dirs').read().strip() - env['KDEMENU'] = os.popen('tde-config --expandvars --install apps').read().strip() - env['KDEMIME'] = os.popen('tde-config --expandvars --install mime').read().strip() - env['KDEICONS'] = os.popen('tde-config --expandvars --install icon').read().strip() - env['KDESERV'] = os.popen('tde-config --expandvars --install services').read().strip() - - env['QTPLUGINS']=os.popen('tde-config --expandvars --install qtplugins').read().strip() - - ## kde libs and includes - env['KDEINCLUDEPATH']=kdeincludes - if not tdelibs: - tdelibs=os.popen('tde-config --expandvars --install lib').read().strip() - env['KDELIBPATH']=tdelibs - - ## qt libs and includes - env['QTINCLUDEPATH']=qtincludes - if not qtlibs: - qtlibs=qtdir+"/lib" - env['QTLIBPATH']=qtlibs - -def generate(env): - """"Set up the qt and kde environment and builders - the moc part is difficult to understand """ - if env['HELP']: - print """ -"""+BOLD+"""*** KDE options *** --------------------"""+NORMAL+""" -"""+BOLD+"""* prefix """+NORMAL+""": base install path, ie: /usr/local -"""+BOLD+"""* execprefix """+NORMAL+""": install path for binaries, ie: /usr/bin -"""+BOLD+"""* datadir """+NORMAL+""": install path for the data, ie: /usr/local/share -"""+BOLD+"""* libdir """+NORMAL+""": install path for the libs, ie: /usr/lib -"""+BOLD+"""* libsuffix """+NORMAL+""": suffix of libraries on amd64, ie: 64, 32 -"""+BOLD+"""* kdeincludes"""+NORMAL+""": path to the kde includes (/usr/include/tde on debian, ...) -"""+BOLD+"""* qtincludes """+NORMAL+""": same punishment, for qt includes (/usr/include/qt on debian, ...) -"""+BOLD+"""* tdelibs """+NORMAL+""": path to the kde libs, for linking the programs -"""+BOLD+"""* qtlibs """+NORMAL+""": same punishment, for qt libraries -ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt -"""+NORMAL - - import SCons.Defaults - import SCons.Tool - import SCons.Util - - ui_extensions = [".ui"] - header_extensions = [".h", ".hxx", ".hpp", ".hh"] - source_extensions = [".cpp", ".cxx", ".cc"] - - def find_file(filename, paths, node_factory): - retval = None - for dir in paths: - node = node_factory(filename, dir) - if node.rexists(): - return node - return None - - class _Metasources: - """ Callable class, which works as an emitter for Programs, SharedLibraries - and StaticLibraries.""" - - def __init__(self, objBuilderName): - self.objBuilderName = objBuilderName - - def __call__(self, target, source, env): - """ Smart autoscan function. Gets the list of objects for the Program - or Lib. Adds objects and builders for the special qt files. """ - try: - if int(env.subst('$QT_AUTOSCAN')) == 0: - return target, source - except ValueError: - pass - - try: - qtdebug = int(env.subst('$QT_DEBUG')) - except ValueError: - qtdebug = 0 - - # some shortcuts used in the scanner - FS = SCons.Node.FS.default_fs - splitext = SCons.Util.splitext - objBuilder = getattr(env, self.objBuilderName) - - # some regular expressions: - # Q_OBJECT detection - q_object_search = re.compile(r'[^A-Za-z0-9]Q_OBJECT[^A-Za-z0-9]') - - # The following is kind of hacky to get builders working properly (FIXME) ?? - objBuilderEnv = objBuilder.env - objBuilder.env = env - mocBuilderEnv = env.Moc.env - env.Moc.env = env - - # make a deep copy for the result; MocH objects will be appended - out_sources = source[:] - - for obj in source: - if not obj.has_builder(): - # binary obj file provided - if qtdebug: - print "scons: qt: '%s' seems to be a binary. Discarded." % str(obj) - continue - cpp = obj.sources[0] - if not splitext(str(cpp))[1] in source_extensions: - if qtdebug: - print "scons: qt: '%s' is no cxx file. Discarded." % str(cpp) - # c or fortran source - continue - #cpp_contents = comment.sub('', cpp.get_contents()) - cpp_contents = cpp.get_contents() - - h = None - ui = None - - for ui_ext in ui_extensions: - # try to find the ui file in the corresponding source directory - uiname = splitext(cpp.name)[0] + ui_ext - ui = find_file(uiname, (cpp.get_dir(),), FS.File) - if ui: - if qtdebug: - print "scons: qt: found .ui file of header" #% (str(h), str(cpp)) - #h_contents = comment.sub('', h.get_contents()) - break - - # if we have a .ui file, do not continue, it is automatically handled by Uic - if ui: - continue - - for h_ext in header_extensions: - # try to find the header file in the corresponding source - # directory - hname = splitext(cpp.name)[0] + h_ext - h = find_file(hname, (cpp.get_dir(),), FS.File) - if h: - if qtdebug: - print "scons: qt: Scanning '%s' (header of '%s')" % (str(h), str(cpp)) - #h_contents = comment.sub('', h.get_contents()) - h_contents = h.get_contents() - break - - if not h and qtdebug: - print "scons: qt: no header for '%s'." % (str(cpp)) - if h and q_object_search.search(h_contents): - # h file with the Q_OBJECT macro found -> add .moc or _moc.cpp file - moc_cpp = None - - if env.has_key('NOMOCSCAN'): - moc_cpp = env.Moc(h) - else: - reg = '\n\s*#include\s*("|<)'+splitext(cpp.name)[0]+'.moc("|>)' - meta_object_search = re.compile(reg) - if meta_object_search.search(cpp_contents): - moc_cpp = env.Moc(h) - else: - moc_cpp = env.Moccpp(h) - moc_o = objBuilder(moc_cpp) - out_sources.append(moc_o) - if qtdebug: - print "scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp[0])) - - if cpp and q_object_search.search(cpp_contents): - print "error, bksys cannot handle cpp files with Q_OBJECT classes" - print "if you are sure this is a feature worth the effort, " - print "report this to the authors tnagyemail-mail yahoo.fr" - - # restore the original env attributes (FIXME) - objBuilder.env = objBuilderEnv - env.Moc.env = mocBuilderEnv - - return (target, out_sources) - - MetasourcesShared = _Metasources('SharedObject') - MetasourcesStatic = _Metasources('StaticObject') - - CLVar = SCons.Util.CLVar - splitext = SCons.Util.splitext - Builder = SCons.Builder.Builder - - # Detect the environment - replaces ./configure implicitely and store the options into a cache - from SCons.Options import Options - cachefile=env['CACHEDIR']+'kde.cache.py' - opts = Options(cachefile) - opts.AddOptions( - ('PREFIX', 'root of the program installation'), - - ('QTDIR', 'root of qt directory'), - ('QTLIBPATH', 'path to the qt libraries'), - ('QTINCLUDEPATH', 'path to the qt includes'), - ('QT_UIC', 'moc directory'), - ('QT_MOC', 'moc executable command'), - ('QTPLUGINS', 'uic executable command'), - ('TDEDIR', 'root of kde directory'), - ('KDELIBPATH', 'path to the kde libs'), - ('KDEINCLUDEPATH', 'path to the kde includes'), - - ('KDEBIN', 'installation path of the kde binaries'), - ('KDEMODULE', 'installation path of the parts and libs'), - ('KDEAPPS', ''), - ('KDEDATA', 'installation path of the application data'), - ('KDELOCALE', ''), - ('KDEDOC', 'installation path of the application documentation'), - ('KDEKCFG', 'installation path of the .kcfg files'), - ('KDEXDG', 'installation path of the service types'), - ('KDEXDGDIR', 'installation path of the xdg service directories'), - ('KDEMENU', ''), - ('KDEMIME', 'installation path of to the mimetypes'), - ('KDEICONS', ''), - ('KDESERV', ''), - ) - opts.Update(env) - - # reconfigure when things are missing - if not env['HELP'] and (env['_CONFIGURE'] or not env.has_key('QTDIR') or not env.has_key('TDEDIR')): - detect_kde(env) - - # finally save the configuration to the cache file - opts.Save(cachefile, env) - - ## set default variables, one can override them in sconscript files - env.Append(CXXFLAGS = ['-I'+env['KDEINCLUDEPATH'], '-I'+env['QTINCLUDEPATH'] ]) - env.Append(LIBPATH = [env['KDELIBPATH'], env['QTLIBPATH'] ]) - - env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 - - env['QT_AUTOSCAN'] = 1 - env['QT_DEBUG'] = 0 - env['QT_UIC_HFLAGS'] = '-L $QTPLUGINS -nounload' - env['QT_UIC_CFLAGS'] = '$QT_UIC_HFLAGS -tr tr2i18n' - env['QT_LIBS'] = 'qt-mt' - env['QT_UICIMPLPREFIX'] = '' - env['QT_UICIMPLSUFFIX'] = '.cpp' - - env['QT_MOCHPREFIX'] = '' - env['QT_MOCHSUFFIX'] = '.moc' - env['KDE_KCFG_IMPLPREFIX'] = '' - env['KDE_KCFG_IMPL_HSUFFIX'] = '.h' - env['KDE_KCFG_IMPL_CSUFFIX'] = '.cpp' - env['KDE_SKEL_IMPL_SUFFIX'] = '.skel' - env['MEINPROC'] = 'meinproc' - env['MSGFMT'] = 'msgfmt' - - ## ui file processing - def uic_processing(target, source, env): - inc_kde = '#include \n#include \n' - inc_moc = '#include "%s"\n' % target[2].name - comp_h = '$QT_UIC $QT_UIC_HFLAGS -o %s %s' % (target[0].path, source[0].path) - comp_c = '$QT_UIC $QT_UIC_CFLAGS -impl %s %s' % (target[0].path, source[0].path) - comp_moc = '$QT_MOC -o %s %s' % (target[2].path, target[0].path) - - ret = env.Execute(comp_h) - if ret: - return ret - - dest = open( target[1].path, "w" ) - dest.write(inc_kde) - dest.close() - - ret = env.Execute( comp_c+" >> "+target[1].path ) - if ret: - return ret - - dest = open( target[1].path, "a" ) - dest.write(inc_moc) - dest.close() - - ret = env.Execute( comp_moc ) - return ret - - def uicEmitter(target, source, env): - adjustixes = SCons.Util.adjustixes - bs = SCons.Util.splitext(str(source[0].name))[0] - bs = os.path.join(str(target[0].get_dir()),bs) - # first target is automatically added by builder (.h file) - if len(target) < 2: - # second target is .cpp file - target.append(adjustixes(bs, - env.subst('$QT_UICIMPLPREFIX'), - env.subst('$QT_UICIMPLSUFFIX'))) - if len(target) < 3: - # third target is .moc file - target.append(adjustixes(bs, - env.subst('$QT_MOCHPREFIX'), - env.subst('$QT_MOCHSUFFIX'))) - return target, source - - UIC_BUILDER = Builder( - action = uic_processing, - emitter = uicEmitter, - suffix = '.h', - src_suffix = '.ui') - - ## moc file processing - env['QT_MOCCOM'] = ('$QT_MOC -o ${TARGETS[0]} $SOURCE') - - MOC_BUILDER = Builder( - action = '$QT_MOCCOM', - suffix = '.moc', - src_suffix = '.h') - - MOCCPP_BUILDER = Builder( - action = '$QT_MOCCOM', - suffix = '_moc.cpp', - src_suffix = '.h') - - ## kcfg file processing - def kcfgGenerator(target, source, env, for_signature): - act=[] - act.append('tdeconfig_compiler -d'+str(source[0].get_dir())+' '+source[1].path+' '+source[0].path) - return act - - def kcfgEmitter(target, source, env): - adjustixes = SCons.Util.adjustixes - bs = SCons.Util.splitext(str(source[0].name))[0] - bs = os.path.join(str(target[0].get_dir()),bs) - # .h file is automatically added - if len(target) < 2: - # add .cpp file - target.append(adjustixes(bs, env.subst('$KDE_KCFG_IMPLPREFIX'), env.subst('$KDE_KCFG_IMPL_CSUFFIX'))) - - if len(source) <2: - if not os.path.isfile(str(source[0])): - print RED+'kcfg file given'+str(source[0])+' does not exist !'+NORMAL - return target, source - kfcgfilename="" - kcfgFileDeclRx = re.compile("^[fF]ile\s*=\s*(.+)\s*$") - for line in file(str(source[0]), "r").readlines(): - match = kcfgFileDeclRx.match(line.strip()) - if match: - kcfgfilename = match.group(1) - break - source.append(str(source[0].get_dir())+'/'+kcfgfilename) - return target, source - - KCFG_BUILDER = Builder( - generator = kcfgGenerator, - emitter = kcfgEmitter, - suffix = '.h', - src_suffix = '.kcfgc') - - ## dcop processing - def dcopGenerator(target, source, env, for_signature): - act=[] - act.append('dcopidl '+source[0].path+' > '+target[1].path+'|| ( rm -f '+target[1].path+' ; false)') - act.append('dcopidl2cpp --c++-suffix cpp --no-Q_SIGNALS --no-stub '+target[1].path) - return act - - def dcopEmitter(target, source, env): - bs = SCons.Util.splitext(str(source[0].name))[0] - bs = os.path.join(str(target[0].get_dir()),bs) - target.append(bs+'.kidl') - #target.append(bs+'_skel.cpp') - return target, source - - DCOP_BUILDER = Builder( - generator = dcopGenerator, - emitter = dcopEmitter, - suffix = '_skel.cpp', - src_suffix = '.h') - - ## documentation processing - MEINPROC_BUILDER = Builder( - action = '$MEINPROC --check --cache $TARGET $SOURCE', - suffix = '.cache.bz2') - - ## translation files builder - TRANSFILES_BUILDER = Builder( - action = '$MSGFMT $SOURCE -o $TARGET', - suffix = '.gmo', - src_suffix = '.po') - - ## libtool file builder - def la_file(target, source, env): - dest=open(target[0].path, 'w') - sname=source[0].name - dest.write("dlname='%s'\n" % sname) - dest.write("library_names='%s %s %s'\n" % (sname, sname, sname)) - dest.write("old_library=''\n") - dest.write("dependency_libs=''\n") - dest.write("current=0\n") - dest.write("age=0\n") - dest.write("revision=0\n") - dest.write("installed=yes\n") - dest.write("shouldnotlink=no\n") - dest.write("dlopen=''\n") - dest.write("dlpreopen=''\n") - dest.write("libdir='%s'" % env['KDEMODULE']) - dest.close() - return 0 - - LA_BUILDER = Builder( - action = la_file, - suffix = '.la', - src_suffix = env['SHLIBSUFFIX']) - - ## register the builders - env['BUILDERS']['Uic'] = UIC_BUILDER - env['BUILDERS']['Moc'] = MOC_BUILDER - env['BUILDERS']['Moccpp'] = MOCCPP_BUILDER - env['BUILDERS']['Dcop'] = DCOP_BUILDER - env['BUILDERS']['Kcfg'] = KCFG_BUILDER - env['BUILDERS']['LaFile'] = LA_BUILDER - env['BUILDERS']['Meinproc'] = MEINPROC_BUILDER - env['BUILDERS']['Transfiles']= TRANSFILES_BUILDER - - static_obj, shared_obj = SCons.Tool.createObjBuilders(env) - static_obj.src_builder.append('Uic') - shared_obj.src_builder.append('Uic') - static_obj.src_builder.append('Kcfg') - shared_obj.src_builder.append('Kcfg') - static_obj.src_builder.append('LaFile') - shared_obj.src_builder.append('LaFile') - static_obj.src_builder.append('Meinproc') - shared_obj.src_builder.append('Meinproc') - static_obj.src_builder.append('Transfiles') - shared_obj.src_builder.append('Transfiles') - - ## Find the files to moc, dcop, and link against kde and qt - env.AppendUnique(PROGEMITTER = [MetasourcesStatic], SHLIBEMITTER=[MetasourcesShared], LIBEMITTER =[MetasourcesStatic]) - - ## Handy helpers for building kde programs - ## You should not have to modify them .. - - ## return a list of things - def make_list(e): - if type(e) is types.ListType: - return e - else: - return e.split() - - #import SCons.Util - skel_ext = [".skel", ".SKEL"] - def KDEfiles(lenv, target, source): - """ Returns a list of files for scons (handles kde tricks like .skel) - It also makes custom checks against double includes like : ['file.ui', 'file.cpp'] - (file.cpp is already included because of file.ui) """ - - src=[] - ui_files=[] - kcfg_files=[] - skel_files=[] - other_files=[] - - source_=make_list(source) - - # For each file, check wether it is a dcop file or not, and create the complete list of sources - for file in source_: - bs = SCons.Util.splitext(file)[0] - ext = SCons.Util.splitext(file)[1] - if ext in skel_ext: - lenv.Dcop(bs+'.h') - src.append(bs+'_skel.cpp') - elif ext == ".moch": - lenv.Moccpp(bs+'.h') - src.append(bs+'_moc.cpp') - else: - src.append(file) - - if ext == '.ui': - ui_files.append(bs) - elif ext == '.kcfgc': - kcfg_files.append(bs) - elif ext == '.skel': - skel_files.append(bs) - else: - other_files.append(bs) - - # Now check against typical newbie errors - for file in ui_files: - for ofile in other_files: - if ofile == file: - print RED+"WARNING: You have included "+file+".ui and another file of the same prefix"+NORMAL - print "Files generated by uic (file.h, file.cpp must not be included" - for file in kcfg_files: - for ofile in other_files: - if ofile == file: - print RED+"WARNING: You have included "+file+".kcfg and another file of the same prefix"+NORMAL - print "Files generated by tdeconfig_compiler (settings.h, settings.cpp) must not be included" - return src - - - """ - In the future, these functions will contain the code that will dump the - configuration for re-use from an IDE - """ - import glob - def KDEinstall(lenv, restype, subdir, files): - if not env['_INSTALL']: - return - basedir=env['DESTDIR'] - if len(restype)>0: - if not lenv.has_key(restype): - print RED+"unknown resource type "+restype+NORMAL - else: - basedir += lenv[restype]+'/' - #print file # <- useful to trace stuff :) - install_list = env.Install(basedir+subdir+'/', files) - env.Alias('install', install_list) - return install_list - - def KDEinstallas(lenv, restype, destfile, file): - if not env['_INSTALL']: - return - basedir=env['DESTDIR'] - if len(restype)>0: - if not lenv.has_key(restype): - print RED+"unknown resource type "+restype+NORMAL - else: - basedir += lenv[restype]+'/' - install_list = env.InstallAs(basedir+destfile, file) - env.Alias('install', install_list) - return install_list - - def KDEprogram(lenv, target, source): - """ Makes a kde program - The program is installed except if one sets env['NOAUTOINSTALL'] """ - src = KDEfiles(lenv, target, source) - program_list = lenv.Program(target, src) - if not lenv.has_key('NOAUTOINSTALL'): - KDEinstall(lenv, 'KDEBIN', '', target) - return program_list - - def KDEshlib(lenv, target, source, kdelib=0, libprefix='lib'): - """ Makes a shared library for kde (.la file for klibloader) - The library is installed except if one sets env['NOAUTOINSTALL'] """ - src = KDEfiles(lenv, target, source) - lenv['LIBPREFIX']=libprefix - library_list = lenv.SharedLibrary(target, src) - lafile_list = lenv.LaFile(target, library_list) - if not lenv.has_key('NOAUTOINSTALL'): - install_dir = 'KDEMODULE' - if kdelib==1: - install_dir = 'KDELIBPATH' - KDEinstall(lenv, install_dir, '', library_list) - KDEinstall(lenv, install_dir, '', lafile_list) - return library_list - - def KDEstaticlib(lenv, target, source): - """ Makes a static library for kde - in practice you should not use static libraries - 1. they take more memory than shared ones - 2. makefile.am needed it because of limitations - (cannot handle sources in separate folders - takes extra processing) """ - src = KDEfiles(lenv, target, source) - return lenv.StaticLibrary(target, src) - # do not install static libraries by default - - def KDEaddflags_cxx(lenv, fl): - """ Compilation flags for C++ programs """ - lenv.AppendUnique(CXXFLAGS = make_list(fl)) - - def KDEaddflags_c(lenv, fl): - """ Compilation flags for C programs """ - lenv.AppendUnique(CFLAGS = make_list(fl)) - - def KDEaddflags_link(lenv, fl): - """ Add link flags - Use this if KDEaddlibs below is not enough """ - lenv.AppendUnique(LINKFLAGS = make_list(fl)) - - def KDEaddlibs(lenv, libs): - """ Helper function """ - lenv.AppendUnique(LIBS = make_list(libs)) - - def KDEaddpaths_includes(lenv, paths): - """ Add new include paths """ - lenv.AppendUnique(CPPPATH = make_list(paths)) - - def KDEaddpaths_libs(lenv, paths): - """ Add paths to libraries """ - lenv.AppendUnique(LIBPATH = make_list(paths)) - - def KDElang(lenv, folder, appname): - """ Process translations (.po files) in a po/ dir """ - transfiles = glob.glob(folder+'/*.po') - for lang in transfiles: - result = lenv.Transfiles(lang) - country = SCons.Util.splitext(result[0].name)[0] - KDEinstallas(lenv, 'KDELOCALE', country+'/LC_MESSAGES/'+appname+'.mo', result) - - def subdirs(lenv, folderlist): - flist=make_list(folderlist) - for i in flist: - lenv.SConscript(i+"/SConscript") - - def KDEicon(lenv, icname='*', path='./'): - """ Emulates the behaviour of Makefile.am to install icons - Contributed by: "Andrey Golovizin" """ - type_dic = { 'action' : 'actions', 'app' : 'apps', 'device' : - 'devices', 'filesys' : 'filesystems', 'mime' : 'mimetypes' } - dir_dic = { - 'los' :'locolor/16x16', - 'lom' :'locolor/32x32', - 'him' :'hicolor/32x32', - 'hil' :'hicolor/48x48', - 'lo16' :'locolor/16x16', - 'lo22' :'locolor/22x22', - 'lo32' :'locolor/32x32', - 'hi16' :'hicolor/16x16', - 'hi22' :'hicolor/22x22', - 'hi32' :'hicolor/32x32', - 'hi48' :'hicolor/48x48', - 'hi64' :'hicolor/64x64', - 'hi128':'hicolor/128x128', - 'hisc' :'hicolor/scalable', - 'cr16' :'crystalsvg/16x16', - 'cr22' :'crystalsvg/22x22', - 'cr32' :'crystalsvg/32x32', - 'cr48' :'crystalsvg/48x48', - 'cr64' :'crystalsvg/64x64', - 'cr128':'crystalsvg/128x128', - 'crsc' :'crystalsvg/scalable' - } - - iconfiles = [] - for ext in "png xpm mng svg svgz".split(): - files = glob.glob(path+'/'+'*-*-%s.%s' % (icname, ext)) - iconfiles += files - for iconfile in iconfiles: - lst = iconfile.split('/') - filename = lst[ len(lst) - 1 ] - tmp = filename.split('-') - if len(tmp)!=3: - print RED+'WARNING: icon filename has unknown format: '+iconfile+NORMAL - continue - [icon_dir, icon_type, icon_filename]=tmp - try: - destfile = '%s/%s/%s/%s' % (lenv['KDEICONS'], dir_dic[icon_dir], type_dic[icon_type], icon_filename) - except KeyError: - print RED+'WARNING: unknown icon type: '+iconfile+NORMAL - continue - ## Do not use KDEinstallas here, as parsing from an ide will be necessary - if env['_INSTALL']: - env.Alias('install', env.InstallAs( env['DESTDIR']+'/'+destfile, iconfile ) ) - - def KDEuse(lenv, flags): - _flags=make_list(flags) - if 'environ' in _flags: - ## The scons developers advise against using this but it is mostly innocuous :) - import os - lenv.AppendUnique( ENV = os.environ ) - if not 'lang_qt' in _flags: - ## Use this define if you are using the kde translation scheme (.po files) - lenv.Append( CPPFLAGS = '-DQT_NO_TRANSLATION' ) - if 'rpath' in _flags: - ## Use this to set rpath - this may cause trouble if folders are moved (chrpath) - lenv.Append( RPATH = [env['QTLIBPATH'], env['KDELIBPATH'], env['KDEMODULE']] ) - if 'thread' in _flags: - ## Uncomment the following if you need threading support - lenv.KDEaddflags_cxx( ['-DQT_THREAD_SUPPORT', '-D_REENTRANT'] ) - if not 'nohelp' in _flags: - if lenv['_CONFIGURE'] or lenv['HELP']: - env.Exit(0) - - ## To use kdDebug(intvalue)<<"some trace"< acinclude.m4 - -MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files - -package-messages: - cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common package-messages - $(MAKE) -C po merge - -EXTRA_DIST = admin %{LICENSEFILE} configure.in.in - -dist-hook: - cd $(top_distdir) && perl admin/am_edit -padmin - cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs diff --git a/parts/appwizard/common/tde-Makefile.cvs b/parts/appwizard/common/tde-Makefile.cvs deleted file mode 100644 index 4c0afd1a..00000000 --- a/parts/appwizard/common/tde-Makefile.cvs +++ /dev/null @@ -1,10 +0,0 @@ -all: - @echo "This Makefile is only for the CVS repository" - @echo "This will be deleted before making the distribution" - @echo "" - $(MAKE) -f admin/Makefile.common cvs - -dist: - $(MAKE) -f admin/Makefile.common dist - -.SILENT: diff --git a/parts/appwizard/common/tde-app.lsm b/parts/appwizard/common/tde-app.lsm deleted file mode 100644 index 06055a96..00000000 --- a/parts/appwizard/common/tde-app.lsm +++ /dev/null @@ -1,14 +0,0 @@ -Begin4 -Title: $APPNAME -Version: R14.0.0 -Entered-date: 2010-05-10 -Description: .... for the Trinity Desktop Environment -Keywords: TDE Qt -Author: %{AUTHOR} <%{EMAIL}> -Maintained-by: The Trinity Desktop Environment (TDE) http://www.trinitydesktop.org/ -Primary-site: http://git.trinitydesktop.org/cgit/ -Alternate-site: -Original-site: -Platforms: Linux and other Unices running TDE -Copying-policy: GPL -End diff --git a/parts/appwizard/common/tde-doc-Makefile.am b/parts/appwizard/common/tde-doc-Makefile.am deleted file mode 100644 index a1f777a1..00000000 --- a/parts/appwizard/common/tde-doc-Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -# the SUBDIRS is filled automatically by am_edit. If files are -# in this directory they are installed into the english dir - -KDE_LANG = en -KDE_DOCS = %{APPNAMELC} -SUBDIRS = $(AUTODIRS) diff --git a/parts/appwizard/common/tde-doc-en-Makefile.am b/parts/appwizard/common/tde-doc-en-Makefile.am deleted file mode 100644 index bdd63b79..00000000 --- a/parts/appwizard/common/tde-doc-en-Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -KDE_DOCS = %{APPNAMELC} -KDE_LANG = en diff --git a/parts/appwizard/common/tde-po-Makefile.am b/parts/appwizard/common/tde-po-Makefile.am deleted file mode 100644 index 0fa209cd..00000000 --- a/parts/appwizard/common/tde-po-Makefile.am +++ /dev/null @@ -1 +0,0 @@ -POFILES = AUTO diff --git a/parts/appwizard/importdlg.cpp b/parts/appwizard/importdlg.cpp index 15f432b2..5f07f5b4 100644 --- a/parts/appwizard/importdlg.cpp +++ b/parts/appwizard/importdlg.cpp @@ -37,9 +37,9 @@ #include #include -#include "tdevcore.h" -#include "tdevversioncontrol.h" -#include "tdevplugincontroller.h" +#include "kdevcore.h" +#include "kdevversioncontrol.h" +#include "kdevplugincontroller.h" #include "domutil.h" #include "settings.h" @@ -272,7 +272,7 @@ void ImportDialog::dirChanged() // KDevelop legacy project? TQStringList files = dir.entryList("*.kdevprj"); if (!files.isEmpty()) { - scanLegacyTDevelopProject(dir.absFilePath(files.first())); + scanLegacyKDevelopProject(dir.absFilePath(files.first())); return; } @@ -328,7 +328,7 @@ void ImportDialog::dirChanged() } -void ImportDialog::scanLegacyTDevelopProject(const TQString &fileName) +void ImportDialog::scanLegacyKDevelopProject(const TQString &fileName) { kdDebug(9010) << "Scanning legacy KDevelop project file " << fileName << endl; @@ -524,7 +524,7 @@ void ImportDialog::slotFinishedCheckout( TQString destinationDir ) void ImportDialog::slotFetchModulesFromRepository() { - TDevVersionControl *vcs = m_part->versionControlByName( vcsCombo->currentText() ); + KDevVersionControl *vcs = m_part->versionControlByName( vcsCombo->currentText() ); if (!vcs) return; diff --git a/parts/appwizard/importdlg.h b/parts/appwizard/importdlg.h index af4d3859..5b334668 100644 --- a/parts/appwizard/importdlg.h +++ b/parts/appwizard/importdlg.h @@ -48,7 +48,7 @@ private slots: void slotProjectNameChanged( const TQString &_text ); private: // void scanAvailableVCS(); - void scanLegacyTDevelopProject(const TQString &fileName); + void scanLegacyKDevelopProject(const TQString &fileName); void scanLegacyStudioProject(const TQString &fileName); void scanAutomakeProject(const TQString &dirName); void setProjectType(const TQString &type); diff --git a/parts/appwizard/imports/CMakeLists.txt b/parts/appwizard/imports/CMakeLists.txt index d59750c4..e7b303c3 100644 --- a/parts/appwizard/imports/CMakeLists.txt +++ b/parts/appwizard/imports/CMakeLists.txt @@ -10,16 +10,16 @@ ################################################# install( FILES - c-auto cpp-auto fortran-auto java-auto tde gnome c cpp + c-auto cpp-auto fortran-auto java-auto kde gnome c cpp fortran python php perl java java-ant qttmake qtqmake qt4qmake ruby pascal ada - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/imports ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/imports ) install( FILES c-auto.tdevelop cpp-auto.tdevelop fortran-auto.tdevelop - java-auto.tdevelop tde.tdevelop gnome.tdevelop + java-auto.tdevelop kde.tdevelop gnome.tdevelop c.tdevelop cpp.tdevelop fortran.tdevelop python.tdevelop php.tdevelop perl.tdevelop java.tdevelop java-ant.tdevelop qttmake.tdevelop qtqmake.tdevelop qt4qmake.tdevelop ruby.tdevelop pascal.tdevelop ada.tdevelop - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/importfiles ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/importfiles ) diff --git a/parts/appwizard/imports/Makefile.am b/parts/appwizard/imports/Makefile.am index aaefd91f..c7f74dcd 100644 --- a/parts/appwizard/imports/Makefile.am +++ b/parts/appwizard/imports/Makefile.am @@ -1,7 +1,7 @@ -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard importsdir = ${appwizarddatadir}/imports importfilesdir = ${appwizarddatadir}/importfiles -imports_DATA = c-auto cpp-auto fortran-auto java-auto tde gnome c cpp fortran python php perl java java-ant qttmake qtqmake qt4qmake ruby pascal ada -importfiles_DATA = c-auto.tdevelop cpp-auto.tdevelop fortran-auto.tdevelop java-auto.tdevelop tde.tdevelop gnome.tdevelop c.tdevelop cpp.tdevelop fortran.tdevelop python.tdevelop php.tdevelop perl.tdevelop java.tdevelop java-ant.tdevelop qttmake.tdevelop qtqmake.tdevelop qt4qmake.tdevelop ruby.tdevelop pascal.tdevelop ada.tdevelop +imports_DATA = c-auto cpp-auto fortran-auto java-auto kde gnome c cpp fortran python php perl java java-ant qttmake qtqmake qt4qmake ruby pascal ada +importfiles_DATA = c-auto.tdevelop cpp-auto.tdevelop fortran-auto.tdevelop java-auto.tdevelop kde.tdevelop gnome.tdevelop c.tdevelop cpp.tdevelop fortran.tdevelop python.tdevelop php.tdevelop perl.tdevelop java.tdevelop java-ant.tdevelop qttmake.tdevelop qtqmake.tdevelop qt4qmake.tdevelop ruby.tdevelop pascal.tdevelop ada.tdevelop diff --git a/parts/appwizard/imports/ada.tdevelop b/parts/appwizard/imports/ada.tdevelop index 188fbea6..cdb35b40 100644 --- a/parts/appwizard/imports/ada.tdevelop +++ b/parts/appwizard/imports/ada.tdevelop @@ -11,12 +11,12 @@ Code - + true - - + + bash bash_bugs @@ -63,11 +63,11 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/c-auto.tdevelop b/parts/appwizard/imports/c-auto.tdevelop index 002e6e1d..892dd88d 100644 --- a/parts/appwizard/imports/c-auto.tdevelop +++ b/parts/appwizard/imports/c-auto.tdevelop @@ -9,7 +9,7 @@ - + debug @@ -32,13 +32,13 @@ -O0 -g3 - - + + libtool - - + + ada ada_bugs_gcc @@ -85,12 +85,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/c.tdevelop b/parts/appwizard/imports/c.tdevelop index e578fba4..e0c06089 100644 --- a/parts/appwizard/imports/c.tdevelop +++ b/parts/appwizard/imports/c.tdevelop @@ -4,21 +4,21 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C - + - - + + - - + + ada ada_bugs_gcc @@ -65,12 +65,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/cpp-auto.tdevelop b/parts/appwizard/imports/cpp-auto.tdevelop index 0a1b05b1..74de8db0 100644 --- a/parts/appwizard/imports/cpp-auto.tdevelop +++ b/parts/appwizard/imports/cpp-auto.tdevelop @@ -9,7 +9,7 @@ - + debug @@ -30,13 +30,13 @@ -O0 -g3 - - + + libtool - - + + ada ada_bugs_gcc @@ -81,13 +81,13 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/cpp.tdevelop b/parts/appwizard/imports/cpp.tdevelop index 3eade8de..b351de38 100644 --- a/parts/appwizard/imports/cpp.tdevelop +++ b/parts/appwizard/imports/cpp.tdevelop @@ -4,21 +4,21 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C++ - + - - + + - - + + ada ada_bugs_gcc @@ -63,13 +63,13 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/fortran-auto.tdevelop b/parts/appwizard/imports/fortran-auto.tdevelop index 4be630a6..8fdd5f89 100644 --- a/parts/appwizard/imports/fortran-auto.tdevelop +++ b/parts/appwizard/imports/fortran-auto.tdevelop @@ -9,7 +9,7 @@ - + ada ada_bugs_gcc @@ -57,15 +57,15 @@ KDE Libraries (Doxygen) - - + + libtool - - + + - + diff --git a/parts/appwizard/imports/fortran.tdevelop b/parts/appwizard/imports/fortran.tdevelop index e7141b4f..c852870e 100644 --- a/parts/appwizard/imports/fortran.tdevelop +++ b/parts/appwizard/imports/fortran.tdevelop @@ -4,16 +4,16 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Fortran77 - + - - + + ada ada_bugs_gcc @@ -61,15 +61,15 @@ KDE Libraries (Doxygen) - - + + - - + + - + diff --git a/parts/appwizard/imports/gnome.tdevelop b/parts/appwizard/imports/gnome.tdevelop index cad92fda..0b8c5c95 100644 --- a/parts/appwizard/imports/gnome.tdevelop +++ b/parts/appwizard/imports/gnome.tdevelop @@ -7,10 +7,10 @@ KDevAutoProject C - TDevJavaDebugger + KDevJavaDebugger - + debug @@ -31,8 +31,8 @@ -O0 -g3 - - + + @@ -40,8 +40,8 @@ - - + + ada ada_bugs_gcc @@ -85,16 +85,16 @@ KDE Libraries (Doxygen) - - + + libtool - - + + - + diff --git a/parts/appwizard/imports/java-ant.tdevelop b/parts/appwizard/imports/java-ant.tdevelop index 1d64dc64..a4db806b 100644 --- a/parts/appwizard/imports/java-ant.tdevelop +++ b/parts/appwizard/imports/java-ant.tdevelop @@ -7,15 +7,15 @@ KDevAntProject Java - TDevDebugger + KDevDebugger - + ant - - + + ada ada_bugs_gcc @@ -59,10 +59,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/java-auto.tdevelop b/parts/appwizard/imports/java-auto.tdevelop index f5de6138..9a42ec82 100644 --- a/parts/appwizard/imports/java-auto.tdevelop +++ b/parts/appwizard/imports/java-auto.tdevelop @@ -7,10 +7,10 @@ KDevAutoProject Java - TDevDebugger + KDevDebugger - + ada ada_bugs_gcc @@ -54,10 +54,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/java.tdevelop b/parts/appwizard/imports/java.tdevelop index f5de6138..9a42ec82 100644 --- a/parts/appwizard/imports/java.tdevelop +++ b/parts/appwizard/imports/java.tdevelop @@ -7,10 +7,10 @@ KDevAutoProject Java - TDevDebugger + KDevDebugger - + ada ada_bugs_gcc @@ -54,10 +54,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/kde b/parts/appwizard/imports/kde new file mode 100644 index 00000000..13614802 --- /dev/null +++ b/parts/appwizard/imports/kde @@ -0,0 +1,5 @@ +# KDE Config File +[General] +Comment=KDE C++ Application (Automake based) +Comment[fr]=Une application KDE (Makefiles bass sur Automake) + diff --git a/parts/appwizard/imports/kde.tdevelop b/parts/appwizard/imports/kde.tdevelop new file mode 100644 index 00000000..5bff727f --- /dev/null +++ b/parts/appwizard/imports/kde.tdevelop @@ -0,0 +1,73 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + Qt + KDE + + + + + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + stl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + qmake User Guide + + + + + libtool + + + + + + + + + + diff --git a/parts/appwizard/imports/pascal.tdevelop b/parts/appwizard/imports/pascal.tdevelop index 7db5a9d8..551ac91e 100644 --- a/parts/appwizard/imports/pascal.tdevelop +++ b/parts/appwizard/imports/pascal.tdevelop @@ -11,12 +11,12 @@ Code - + true - - + + ada ada_bugs_gcc @@ -64,12 +64,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/perl.tdevelop b/parts/appwizard/imports/perl.tdevelop index 0b4f4fba..bbf18ee3 100644 --- a/parts/appwizard/imports/perl.tdevelop +++ b/parts/appwizard/imports/perl.tdevelop @@ -9,11 +9,11 @@ - + - - + + ada ada_bugs_gcc @@ -60,10 +60,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/php.tdevelop b/parts/appwizard/imports/php.tdevelop index 4135828b..64651d3b 100644 --- a/parts/appwizard/imports/php.tdevelop +++ b/parts/appwizard/imports/php.tdevelop @@ -11,11 +11,11 @@ KDevdistpart
    - + - - + + gtk kde @@ -23,15 +23,15 @@ python perl - - + + true true false - - + + ada ada_bugs_gcc @@ -75,10 +75,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/python.tdevelop b/parts/appwizard/imports/python.tdevelop index d85480b9..3c6ece1a 100644 --- a/parts/appwizard/imports/python.tdevelop +++ b/parts/appwizard/imports/python.tdevelop @@ -7,15 +7,15 @@ KDevScriptProject Python - TDevDebugger - TDevJavaDebugger + KDevDebugger + KDevJavaDebugger - + - - + + bash bash_bugs @@ -60,10 +60,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/qt-auto.tdevelop b/parts/appwizard/imports/qt-auto.tdevelop index a8ac37de..b4bba39e 100644 --- a/parts/appwizard/imports/qt-auto.tdevelop +++ b/parts/appwizard/imports/qt-auto.tdevelop @@ -10,7 +10,7 @@ Qt - + @@ -18,8 +18,8 @@ - - + + gtk gnustep @@ -27,17 +27,17 @@ php perl - - + + libtool - - + + - + diff --git a/parts/appwizard/imports/qt.tdevelop b/parts/appwizard/imports/qt.tdevelop index 713510e0..6b716a7b 100644 --- a/parts/appwizard/imports/qt.tdevelop +++ b/parts/appwizard/imports/qt.tdevelop @@ -4,13 +4,13 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C++ Qt - + @@ -18,21 +18,21 @@ - - + + - - + + - - + + - + diff --git a/parts/appwizard/imports/qt4qmake.tdevelop b/parts/appwizard/imports/qt4qmake.tdevelop index e211a470..3be6c94c 100644 --- a/parts/appwizard/imports/qt4qmake.tdevelop +++ b/parts/appwizard/imports/qt4qmake.tdevelop @@ -10,15 +10,15 @@ Qt - + - - + + bash bash_bugs @@ -55,26 +55,26 @@ KDE Libraries (Doxygen) - - + + - - + + 4 true 4 ExternalDesigner - - + + - + diff --git a/parts/appwizard/imports/qtqmake.tdevelop b/parts/appwizard/imports/qtqmake.tdevelop index 8a9d6b17..2e9b089a 100644 --- a/parts/appwizard/imports/qtqmake.tdevelop +++ b/parts/appwizard/imports/qtqmake.tdevelop @@ -10,15 +10,15 @@ Qt - + - - + + bash bash_bugs @@ -55,25 +55,25 @@ KDE Libraries (Doxygen) - - + + - - + + 3 true 3 KDevEmbeddedDesigner - - + + - + diff --git a/parts/appwizard/imports/qttmake.tdevelop b/parts/appwizard/imports/qttmake.tdevelop index 015f4278..713655b6 100644 --- a/parts/appwizard/imports/qttmake.tdevelop +++ b/parts/appwizard/imports/qttmake.tdevelop @@ -10,15 +10,15 @@ Qt - + - - + + bash bash_bugs @@ -58,17 +58,17 @@ KDE Libraries (Doxygen) - - + + - - + + - + diff --git a/parts/appwizard/imports/ruby.tdevelop b/parts/appwizard/imports/ruby.tdevelop index 0a29b0a7..90dbe34a 100644 --- a/parts/appwizard/imports/ruby.tdevelop +++ b/parts/appwizard/imports/ruby.tdevelop @@ -13,22 +13,22 @@ KDevDoxygen KDevdistpart KDevVisualBoyAdvance - TDevDebugger + KDevDebugger
    - + src *.rb *~ - - + + - - + + bash bash_bugs @@ -73,10 +73,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/tde b/parts/appwizard/imports/tde deleted file mode 100644 index 13614802..00000000 --- a/parts/appwizard/imports/tde +++ /dev/null @@ -1,5 +0,0 @@ -# KDE Config File -[General] -Comment=KDE C++ Application (Automake based) -Comment[fr]=Une application KDE (Makefiles bass sur Automake) - diff --git a/parts/appwizard/imports/tde.tdevelop b/parts/appwizard/imports/tde.tdevelop deleted file mode 100644 index fe54fadc..00000000 --- a/parts/appwizard/imports/tde.tdevelop +++ /dev/null @@ -1,73 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - Qt - KDE - - - - - - - - - - - - - - ada - ada_bugs_gcc - bash - bash_bugs - clanlib - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - opengl - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - ruby - ruby_bugs - sdl - stl - sw - w3c-dom-level2-html - w3c-svg - w3c-uaag10 - wxwidgets_bugs - - - qmake User Guide - - - - - libtool - - - - - - - - - - diff --git a/parts/appwizard/kdevappwizard.desktop b/parts/appwizard/kdevappwizard.desktop new file mode 100644 index 00000000..fa9dd541 --- /dev/null +++ b/parts/appwizard/kdevappwizard.desktop @@ -0,0 +1,87 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Application Wizard +Comment[br]=Skoazeller meziant +Comment[ca]=Assistent d'aplicacions +Comment[da]=Programguide +Comment[de]=Anwendungs-Assistent für TDevelop +Comment[el]=Μάγος εφαρμογής +Comment[es]=Asistente de aplicaciones +Comment[et]=Rakenduse nõustaja +Comment[eu]=Aplikazio morroia +Comment[fa]=جادوگر کاربرد +Comment[fr]=Assistant de création d'applications +Comment[ga]=Treoraí Feidhmchláir +Comment[gl]=Asistente de aplicación +Comment[hi]=अनुप्रयोग विज़ार्ड +Comment[hu]=Alkalmazásvarázsló +Comment[it]=Procedura guidata applicazione +Comment[ja]=アプリケーションウィザード +Comment[ms]=Wizard Aplikasi +Comment[nds]=Programm-Hölper +Comment[ne]=अनुप्रयोग विजार्ड +Comment[nl]=Toepassingassistent +Comment[pl]=Asystent tworzenia programu +Comment[pt]=Assistente de Aplicações +Comment[pt_BR]=Assistente de Aplicativo +Comment[ru]=Мастер создания приложений +Comment[sk]=Aplikačný sprievodca +Comment[sl]=Čarovnik za programe +Comment[sr]=Чаробњак за програме +Comment[sr@Latn]=Čarobnjak za programe +Comment[sv]=Programguide +Comment[ta]=பயன்பாட்டு வழிகாட்டி +Comment[tg]=Устои сохтани гузориш +Comment[tr]=Uygulama Sihirbazı +Comment[zh_CN]=应用程序向导 +Comment[zh_TW]=應用程式精靈 +Name=KDevAppWizard +Name[da]=TDevelop Programguide +Name[de]=Anwendungs-Assistent (TDevelop) +Name[hi]=के-डेव-एप-विज़ार्ड +Name[nds]=Programm-Hölper (TDevelop) +Name[pl]=KDevAsystentApli +Name[sk]=KDev aplikačný sprievodca +Name[sv]=TDevelop programguide +Name[zh_TW]=TDevelop 應用程式精靈 +GenericName=Application Wizard +GenericName[br]=Skoazeller meziant +GenericName[ca]=Assistent d'aplicacions +GenericName[da]=Programguide +GenericName[de]=Anwendungs-Assistent +GenericName[el]=Μάγος εφαρμογής +GenericName[es]=Asistente de aplicaciones +GenericName[et]=Rakenduse nõustaja +GenericName[eu]=Aplikazio morroia +GenericName[fa]=جادوگر کاربرد +GenericName[fr]=Assistant d'applications +GenericName[ga]=Treoraí Feidhmchláir +GenericName[gl]=Asistente de aplicación +GenericName[hi]=अनुप्रयोग विज़ार्ड +GenericName[hu]=Alkalmazásvarázsló +GenericName[it]=Procedura guidata applicazione +GenericName[ja]=アプリケーションウィザード +GenericName[ms]=Wizard Aplikasi +GenericName[nds]=Programm-Hölper +GenericName[ne]=अनुप्रयोग विजार्ड +GenericName[nl]=Toepassingassistent +GenericName[pl]=Asystent tworzenia programu +GenericName[pt]=Assistente de Aplicações +GenericName[pt_BR]=Assistente de Aplicativo +GenericName[ru]=Мастер создания приложений +GenericName[sk]=Aplikačný sprievodca +GenericName[sl]=Čarovnik za programe +GenericName[sr]=Чаробњак за програме +GenericName[sr@Latn]=Čarobnjak za programe +GenericName[sv]=Programguide +GenericName[ta]=பயன்பாடு வழிகாட்டி +GenericName[tg]=Устои сохтани гузориш +GenericName[tr]=Uygulama Sihirbazı +GenericName[zh_CN]=应用程序向导 +GenericName[zh_TW]=應用程式精靈 +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevappwizard +X-TDevelop-Scope=Core +X-TDevelop-Version=5 +X-TDevelop-Properties=ProjectCreation diff --git a/parts/appwizard/kdevappwizard.rc b/parts/appwizard/kdevappwizard.rc new file mode 100644 index 00000000..c86e0f44 --- /dev/null +++ b/parts/appwizard/kdevappwizard.rc @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/parts/appwizard/kdevfile.cpp b/parts/appwizard/kdevfile.cpp new file mode 100644 index 00000000..4edb62c7 --- /dev/null +++ b/parts/appwizard/kdevfile.cpp @@ -0,0 +1,59 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Sascha Cunz + + 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 "kdevfile.h" + +static struct MimeTypeMapping +{ + const char* szMimeType; + KDevFile::CommentingStyle commentStyle; +} mimeTypeMapping[] = { +{ "text/x-c++hdr", KDevFile::CPPStyle }, +{ "text/x-c++src", KDevFile::CPPStyle }, +{ "text/x-chdr", KDevFile::CStyle }, +{ "text/x-csrc", KDevFile::CStyle }, +{ "text/adasrc", KDevFile::AdaStyle }, +{ "text/x-pascal", KDevFile::PascalStyle }, +{ "text/x-perl", KDevFile::BashStyle }, +{ "text/xml", KDevFile::XMLStyle }, +{ "text/x-xslt", KDevFile::XMLStyle }, +{ "text/x-xslfo", KDevFile::XMLStyle }, +{ "text/html", KDevFile::XMLStyle }, +{ "text/docbook", KDevFile::XMLStyle }, +{ "application/x-php", KDevFile::CPPStyle }, +{ "application/x-shellscript",KDevFile::BashStyle }, +{ NULL, KDevFile::NoCommenting } +}; + +KDevFile::CommentingStyle KDevFile::commentingStyleFromMimeType( const TQString& mimeType ) +{ + int idx = 0; + while( mimeTypeMapping[idx].szMimeType ) + { + if( mimeType == mimeTypeMapping[idx].szMimeType ) + return mimeTypeMapping[idx].commentStyle; + idx++; + } + return KDevFile::NoCommenting; +} + +KDevFile::CommentingStyle KDevFile::commentingStyleFromMimeType( KMimeType::Ptr mimeType ) +{ + return commentingStyleFromMimeType( mimeType->name() ); +} + diff --git a/parts/appwizard/kdevfile.h b/parts/appwizard/kdevfile.h new file mode 100644 index 00000000..6b2e2699 --- /dev/null +++ b/parts/appwizard/kdevfile.h @@ -0,0 +1,57 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Sascha Cunz + + 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. +*/ + +/** +@file kdevfile.h +File abstraction layer. +*/ +#ifndef KDEVFILE_H +#define KDEVFILE_H + +#include + +/** +File abstraction. +*/ +class KDevFile +{ +public: + /**Styles of comment-formats a source file can have.*/ + enum CommentingStyle + { + NoCommenting, //!< file seems to be unable to contain comments + CPPStyle, //!< C Style:
    /* comment */
    + CStyle, //!< C++ Style:
    // comment
    + AdaStyle, //!< Ada Style:
    -- comment --
    + PascalStyle, //!< Pascal Style:
    {  comment  }
    + BashStyle, //!< Shell Style:
    #  comment
    + XMLStyle //!< XML Style:
    + }; + +public: + /**@return A commenting style for a given mime type. + @param mimeType A string which defines a mime type (like "text/x-c+++src").*/ + static CommentingStyle commentingStyleFromMimeType(const TQString& mimeType); + + /**@return A commenting style for a given mime type. + @param mimeType The mime type.*/ + static CommentingStyle commentingStyleFromMimeType( KMimeType::Ptr mimeType ); +}; + +#endif diff --git a/parts/appwizard/kdevlicense.cpp b/parts/appwizard/kdevlicense.cpp new file mode 100644 index 00000000..5e189422 --- /dev/null +++ b/parts/appwizard/kdevlicense.cpp @@ -0,0 +1,116 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Sascha Cunz + + 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 "kdevlicense.h" + +#include +#include +#include + +KDevLicense::KDevLicense( const TQString& name, const TQString& fileName ) + : m_name( name ) +{ + readFile( fileName ); +} + +void KDevLicense::readFile( const TQString& fileName ) +{ + TQFile f(fileName); + if (!f.open(IO_ReadOnly)) + return; + TQTextStream stream(&f); + TQString str; + enum { readingText, readingFiles } mode = readingText; + for(;;) + { + str = stream.readLine(); + if( str.isNull() ) + break; + if( str == "[FILES]" ) + mode = readingFiles; + else if( str == "[PREFIX]" ) + mode = readingText; + else if( mode == readingFiles ) + { + if( !str.isEmpty() ) + { + m_copyFiles.append( str ); + } + } else + m_rawLines.append( str ); + } + +} + +TQString KDevLicense::assemble( KDevFile::CommentingStyle commentingStyle, const TQString& author, const TQString& email, int leadingSpaces ) +{ + // first, build a CPP Style license + + TQString strFill; + strFill.fill( ' ', leadingSpaces ); + + TQString str = + strFill + "/***************************************************************************\n" + + strFill + " * Copyright (C) $YEAR$ by $AUTHOR$ *\n" + + strFill + " * $EMAIL$ *\n" + + strFill + " * *\n"; + +// str = str.arg(TQDate::currentDate().year()).arg(author.left(45),-45).arg(email.left(67),-67); + + TQStringList::Iterator it; + for( it = m_rawLines.begin(); it != m_rawLines.end(); ++it ) + { + str += TQString( "%1 * %2 *\n").arg( strFill ).arg( *it, -69 ); + } + + str += strFill + " ***************************************************************************/\n"; + + switch( commentingStyle ) + { + case KDevFile::CPPStyle: + case KDevFile::CStyle: + return str; + + case KDevFile::PascalStyle: + str.replace(TQRegExp("/\\**\n \\*"), "{\n "); + str.replace(TQRegExp("\\*\n \\*"), " \n "); + str.replace(TQRegExp(" *\\**/\n"), "}\n"); + return str; + + case KDevFile::AdaStyle: + str.replace(TQRegExp("/\\*"), "--"); + str.replace(TQRegExp(" \\*"), "--"); + str.replace(TQRegExp("\\*/"), "*"); + return str; + + case KDevFile::BashStyle: + str.replace(TQRegExp("\\*|/"), "#"); + str.replace(TQRegExp("\n ##"), "\n##"); + str.replace(TQRegExp("\n #"), "\n# "); + return str; + + case KDevFile::XMLStyle: + str.replace(TQRegExp("/\\*"), "\n"); + str.replace(TQRegExp("\\*"), "_"); + return str; + } + + return "currently unknown/unsupported commenting style"; +} diff --git a/parts/appwizard/kdevlicense.h b/parts/appwizard/kdevlicense.h new file mode 100644 index 00000000..2e81c9ec --- /dev/null +++ b/parts/appwizard/kdevlicense.h @@ -0,0 +1,75 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Sascha Cunz + + 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 KDEVLICENSE_H +#define KDEVLICENSE_H + +/** +@file kdevfile.h +The interface to installed licenses. +*/ + +#include + +#include "kdevfile.h" + +/*The interface to installed licenses.*/ +class KDevLicense +{ +public: + /**Constructs a KDevLicense and loads the given license template file. + @param name The name of this license. + @param fileName The file name where license template text is kept.*/ + KDevLicense(const TQString& name, const TQString& fileName); + +public: + /**Assembles the license to a string suitable for replacement of a %{LICENSE} .*/ + TQString assemble(KDevFile::CommentingStyle commentingStyle, const TQString& author, const TQString& email, int leadingSpaces ); + + /** + * returns the name of this license. + */ + TQString name() const { return m_name; } + + /** + * returns list of files tat must be present in the project's root directory + * if any source files uses this license. + */ + TQStringList copyFiles(){ return m_copyFiles; } + +private: + void readFile( const TQString& fileName ); + +private: + /** + * Name of this license + */ + TQString m_name; + /** + * Raw lines of the license. Should contain no spaces at + * the start or end of each line. + */ + TQStringList m_rawLines; + /** + * List of files that must be added to the project, if any + * file in the project uses this license. + */ + TQStringList m_copyFiles; +}; + +#endif diff --git a/parts/appwizard/profilesupport.cpp b/parts/appwizard/profilesupport.cpp index 3c5a5a35..ac5da870 100644 --- a/parts/appwizard/profilesupport.cpp +++ b/parts/appwizard/profilesupport.cpp @@ -24,9 +24,9 @@ #include #include -#include +#include -ProfileSupport::ProfileSupport(TDevPlugin *parent) +ProfileSupport::ProfileSupport(KDevPlugin *parent) { KURL::List resources = parent->pluginController()->profileResourcesRecursive("*.appwizard"); diff --git a/parts/appwizard/profilesupport.h b/parts/appwizard/profilesupport.h index 11e9b201..b18a9620 100644 --- a/parts/appwizard/profilesupport.h +++ b/parts/appwizard/profilesupport.h @@ -20,11 +20,11 @@ #ifndef PROFILESUPPORT_H #define PROFILESUPPORT_H -#include +#include class ProfileSupport{ public: - ProfileSupport(TDevPlugin *parent); + ProfileSupport(KDevPlugin *parent); bool isInTemplateList(const TQString &templateUrl); private: diff --git a/parts/appwizard/tdevappwizard.desktop b/parts/appwizard/tdevappwizard.desktop deleted file mode 100644 index bda84ba5..00000000 --- a/parts/appwizard/tdevappwizard.desktop +++ /dev/null @@ -1,87 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Application Wizard -Comment[br]=Skoazeller meziant -Comment[ca]=Assistent d'aplicacions -Comment[da]=Programguide -Comment[de]=Anwendungs-Assistent für TDevelop -Comment[el]=Μάγος εφαρμογής -Comment[es]=Asistente de aplicaciones -Comment[et]=Rakenduse nõustaja -Comment[eu]=Aplikazio morroia -Comment[fa]=جادوگر کاربرد -Comment[fr]=Assistant de création d'applications -Comment[ga]=Treoraí Feidhmchláir -Comment[gl]=Asistente de aplicación -Comment[hi]=अनुप्रयोग विज़ार्ड -Comment[hu]=Alkalmazásvarázsló -Comment[it]=Procedura guidata applicazione -Comment[ja]=アプリケーションウィザード -Comment[ms]=Wizard Aplikasi -Comment[nds]=Programm-Hölper -Comment[ne]=अनुप्रयोग विजार्ड -Comment[nl]=Toepassingassistent -Comment[pl]=Asystent tworzenia programu -Comment[pt]=Assistente de Aplicações -Comment[pt_BR]=Assistente de Aplicativo -Comment[ru]=Мастер создания приложений -Comment[sk]=Aplikačný sprievodca -Comment[sl]=Čarovnik za programe -Comment[sr]=Чаробњак за програме -Comment[sr@Latn]=Čarobnjak za programe -Comment[sv]=Programguide -Comment[ta]=பயன்பாட்டு வழிகாட்டி -Comment[tg]=Устои сохтани гузориш -Comment[tr]=Uygulama Sihirbazı -Comment[zh_CN]=应用程序向导 -Comment[zh_TW]=應用程式精靈 -Name=TDevAppWizard -Name[da]=TDevelop Programguide -Name[de]=Anwendungs-Assistent (TDevelop) -Name[hi]=के-डेव-एप-विज़ार्ड -Name[nds]=Programm-Hölper (TDevelop) -Name[pl]=KDevAsystentApli -Name[sk]=KDev aplikačný sprievodca -Name[sv]=TDevelop programguide -Name[zh_TW]=TDevelop 應用程式精靈 -GenericName=Application Wizard -GenericName[br]=Skoazeller meziant -GenericName[ca]=Assistent d'aplicacions -GenericName[da]=Programguide -GenericName[de]=Anwendungs-Assistent -GenericName[el]=Μάγος εφαρμογής -GenericName[es]=Asistente de aplicaciones -GenericName[et]=Rakenduse nõustaja -GenericName[eu]=Aplikazio morroia -GenericName[fa]=جادوگر کاربرد -GenericName[fr]=Assistant d'applications -GenericName[ga]=Treoraí Feidhmchláir -GenericName[gl]=Asistente de aplicación -GenericName[hi]=अनुप्रयोग विज़ार्ड -GenericName[hu]=Alkalmazásvarázsló -GenericName[it]=Procedura guidata applicazione -GenericName[ja]=アプリケーションウィザード -GenericName[ms]=Wizard Aplikasi -GenericName[nds]=Programm-Hölper -GenericName[ne]=अनुप्रयोग विजार्ड -GenericName[nl]=Toepassingassistent -GenericName[pl]=Asystent tworzenia programu -GenericName[pt]=Assistente de Aplicações -GenericName[pt_BR]=Assistente de Aplicativo -GenericName[ru]=Мастер создания приложений -GenericName[sk]=Aplikačný sprievodca -GenericName[sl]=Čarovnik za programe -GenericName[sr]=Чаробњак за програме -GenericName[sr@Latn]=Čarobnjak za programe -GenericName[sv]=Programguide -GenericName[ta]=பயன்பாடு வழிகாட்டி -GenericName[tg]=Устои сохтани гузориш -GenericName[tr]=Uygulama Sihirbazı -GenericName[zh_CN]=应用程序向导 -GenericName[zh_TW]=應用程式精靈 -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevappwizard -X-TDevelop-Scope=Core -X-TDevelop-Version=5 -X-TDevelop-Properties=ProjectCreation diff --git a/parts/appwizard/tdevappwizard.rc b/parts/appwizard/tdevappwizard.rc deleted file mode 100644 index 2705a29f..00000000 --- a/parts/appwizard/tdevappwizard.rc +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/parts/appwizard/tdevfile.cpp b/parts/appwizard/tdevfile.cpp deleted file mode 100644 index 4a748d47..00000000 --- a/parts/appwizard/tdevfile.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Sascha Cunz - - 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 "tdevfile.h" - -static struct MimeTypeMapping -{ - const char* szMimeType; - TDevFile::CommentingStyle commentStyle; -} mimeTypeMapping[] = { -{ "text/x-c++hdr", TDevFile::CPPStyle }, -{ "text/x-c++src", TDevFile::CPPStyle }, -{ "text/x-chdr", TDevFile::CStyle }, -{ "text/x-csrc", TDevFile::CStyle }, -{ "text/adasrc", TDevFile::AdaStyle }, -{ "text/x-pascal", TDevFile::PascalStyle }, -{ "text/x-perl", TDevFile::BashStyle }, -{ "text/xml", TDevFile::XMLStyle }, -{ "text/x-xslt", TDevFile::XMLStyle }, -{ "text/x-xslfo", TDevFile::XMLStyle }, -{ "text/html", TDevFile::XMLStyle }, -{ "text/docbook", TDevFile::XMLStyle }, -{ "application/x-php", TDevFile::CPPStyle }, -{ "application/x-shellscript",TDevFile::BashStyle }, -{ NULL, TDevFile::NoCommenting } -}; - -TDevFile::CommentingStyle TDevFile::commentingStyleFromMimeType( const TQString& mimeType ) -{ - int idx = 0; - while( mimeTypeMapping[idx].szMimeType ) - { - if( mimeType == mimeTypeMapping[idx].szMimeType ) - return mimeTypeMapping[idx].commentStyle; - idx++; - } - return TDevFile::NoCommenting; -} - -TDevFile::CommentingStyle TDevFile::commentingStyleFromMimeType( KMimeType::Ptr mimeType ) -{ - return commentingStyleFromMimeType( mimeType->name() ); -} - diff --git a/parts/appwizard/tdevfile.h b/parts/appwizard/tdevfile.h deleted file mode 100644 index b1280f54..00000000 --- a/parts/appwizard/tdevfile.h +++ /dev/null @@ -1,57 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Sascha Cunz - - 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. -*/ - -/** -@file tdevfile.h -File abstraction layer. -*/ -#ifndef TDEVFILE_H -#define TDEVFILE_H - -#include - -/** -File abstraction. -*/ -class TDevFile -{ -public: - /**Styles of comment-formats a source file can have.*/ - enum CommentingStyle - { - NoCommenting, //!< file seems to be unable to contain comments - CPPStyle, //!< C Style:
    /* comment */
    - CStyle, //!< C++ Style:
    // comment
    - AdaStyle, //!< Ada Style:
    -- comment --
    - PascalStyle, //!< Pascal Style:
    {  comment  }
    - BashStyle, //!< Shell Style:
    #  comment
    - XMLStyle //!< XML Style:
    - }; - -public: - /**@return A commenting style for a given mime type. - @param mimeType A string which defines a mime type (like "text/x-c+++src").*/ - static CommentingStyle commentingStyleFromMimeType(const TQString& mimeType); - - /**@return A commenting style for a given mime type. - @param mimeType The mime type.*/ - static CommentingStyle commentingStyleFromMimeType( KMimeType::Ptr mimeType ); -}; - -#endif diff --git a/parts/appwizard/tdevlicense.cpp b/parts/appwizard/tdevlicense.cpp deleted file mode 100644 index a720c6c3..00000000 --- a/parts/appwizard/tdevlicense.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Sascha Cunz - - 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 "tdevlicense.h" - -#include -#include -#include - -TDevLicense::TDevLicense( const TQString& name, const TQString& fileName ) - : m_name( name ) -{ - readFile( fileName ); -} - -void TDevLicense::readFile( const TQString& fileName ) -{ - TQFile f(fileName); - if (!f.open(IO_ReadOnly)) - return; - TQTextStream stream(&f); - TQString str; - enum { readingText, readingFiles } mode = readingText; - for(;;) - { - str = stream.readLine(); - if( str.isNull() ) - break; - if( str == "[FILES]" ) - mode = readingFiles; - else if( str == "[PREFIX]" ) - mode = readingText; - else if( mode == readingFiles ) - { - if( !str.isEmpty() ) - { - m_copyFiles.append( str ); - } - } else - m_rawLines.append( str ); - } - -} - -TQString TDevLicense::assemble( TDevFile::CommentingStyle commentingStyle, const TQString& author, const TQString& email, int leadingSpaces ) -{ - // first, build a CPP Style license - - TQString strFill; - strFill.fill( ' ', leadingSpaces ); - - TQString str = - strFill + "/***************************************************************************\n" + - strFill + " * Copyright (C) $YEAR$ by $AUTHOR$ *\n" + - strFill + " * $EMAIL$ *\n" + - strFill + " * *\n"; - -// str = str.arg(TQDate::currentDate().year()).arg(author.left(45),-45).arg(email.left(67),-67); - - TQStringList::Iterator it; - for( it = m_rawLines.begin(); it != m_rawLines.end(); ++it ) - { - str += TQString( "%1 * %2 *\n").arg( strFill ).arg( *it, -69 ); - } - - str += strFill + " ***************************************************************************/\n"; - - switch( commentingStyle ) - { - case TDevFile::CPPStyle: - case TDevFile::CStyle: - return str; - - case TDevFile::PascalStyle: - str.replace(TQRegExp("/\\**\n \\*"), "{\n "); - str.replace(TQRegExp("\\*\n \\*"), " \n "); - str.replace(TQRegExp(" *\\**/\n"), "}\n"); - return str; - - case TDevFile::AdaStyle: - str.replace(TQRegExp("/\\*"), "--"); - str.replace(TQRegExp(" \\*"), "--"); - str.replace(TQRegExp("\\*/"), "*"); - return str; - - case TDevFile::BashStyle: - str.replace(TQRegExp("\\*|/"), "#"); - str.replace(TQRegExp("\n ##"), "\n##"); - str.replace(TQRegExp("\n #"), "\n# "); - return str; - - case TDevFile::XMLStyle: - str.replace(TQRegExp("/\\*"), "\n"); - str.replace(TQRegExp("\\*"), "_"); - return str; - } - - return "currently unknown/unsupported commenting style"; -} diff --git a/parts/appwizard/tdevlicense.h b/parts/appwizard/tdevlicense.h deleted file mode 100644 index d61aebc3..00000000 --- a/parts/appwizard/tdevlicense.h +++ /dev/null @@ -1,75 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Sascha Cunz - - 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 TDEVLICENSE_H -#define TDEVLICENSE_H - -/** -@file tdevfile.h -The interface to installed licenses. -*/ - -#include - -#include "tdevfile.h" - -/*The interface to installed licenses.*/ -class TDevLicense -{ -public: - /**Constructs a TDevLicense and loads the given license template file. - @param name The name of this license. - @param fileName The file name where license template text is kept.*/ - TDevLicense(const TQString& name, const TQString& fileName); - -public: - /**Assembles the license to a string suitable for replacement of a %{LICENSE} .*/ - TQString assemble(TDevFile::CommentingStyle commentingStyle, const TQString& author, const TQString& email, int leadingSpaces ); - - /** - * returns the name of this license. - */ - TQString name() const { return m_name; } - - /** - * returns list of files tat must be present in the project's root directory - * if any source files uses this license. - */ - TQStringList copyFiles(){ return m_copyFiles; } - -private: - void readFile( const TQString& fileName ); - -private: - /** - * Name of this license - */ - TQString m_name; - /** - * Raw lines of the license. Should contain no spaces at - * the start or end of each line. - */ - TQStringList m_rawLines; - /** - * List of files that must be added to the project, if any - * file in the project uses this license. - */ - TQStringList m_copyFiles; -}; - -#endif diff --git a/parts/astyle/CMakeLists.txt b/parts/astyle/CMakeLists.txt index aba6c00f..bac3e50a 100644 --- a/parts/astyle/CMakeLists.txt +++ b/parts/astyle/CMakeLists.txt @@ -28,13 +28,13 @@ link_directories( ##### other data ################################ -install( FILES tdevastyle.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_astyle.rc DESTINATION ${DATA_INSTALL_DIR}/tdevastyle ) +install( FILES kdevastyle.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_astyle.rc DESTINATION ${DATA_INSTALL_DIR}/kdevastyle ) -##### libtdevastyle (module) #################### +##### libkdevastyle (module) #################### -tde_add_kpart( libtdevastyle AUTOMOC +tde_add_kpart( libkdevastyle AUTOMOC SOURCES astyle_part.cpp astyleconfig.ui astyle_widget.cpp astyle_adaptor.cpp diff --git a/parts/astyle/Makefile.am b/parts/astyle/Makefile.am index 4247625d..739ba2b8 100644 --- a/parts/astyle/Makefile.am +++ b/parts/astyle/Makefile.am @@ -1,16 +1,16 @@ INCLUDES = -I$(top_srcdir)/lib/astyle -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevastyle.la -libtdevastyle_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevastyle_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +kde_module_LTLIBRARIES = libkdevastyle.la +libkdevastyle_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevastyle_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/lib/astyle/libastyle.la -libtdevastyle_la_SOURCES = astyle_part.cpp astyleconfig.ui astyle_widget.cpp astyle_adaptor.cpp +libkdevastyle_la_SOURCES = astyle_part.cpp astyleconfig.ui astyle_widget.cpp astyle_adaptor.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevastyle.desktop +service_DATA = kdevastyle.desktop -rc_DATA = tdevpart_astyle.rc -rcdir = $(kde_datadir)/tdevastyle +rc_DATA = kdevpart_astyle.rc +rcdir = $(kde_datadir)/kdevastyle diff --git a/parts/astyle/astyle_adaptor.cpp b/parts/astyle/astyle_adaptor.cpp index 6f6bed50..05fb0901 100644 --- a/parts/astyle/astyle_adaptor.cpp +++ b/parts/astyle/astyle_adaptor.cpp @@ -38,7 +38,7 @@ string ASStringIterator::nextLine() } -TDevFormatter::TDevFormatter(const TQMap& options) +KDevFormatter::KDevFormatter(const TQMap& options) { // for ( TQMap::ConstIterator iter = options.begin();iter != options.end();iter++ ) // { @@ -116,7 +116,7 @@ TDevFormatter::TDevFormatter(const TQMap& options) setSingleStatementsMode(!options["KeepStatements"].toBool()); } -TDevFormatter::TDevFormatter( AStyleWidget * widget ) +KDevFormatter::KDevFormatter( AStyleWidget * widget ) { setCStyle(); @@ -215,7 +215,7 @@ TDevFormatter::TDevFormatter( AStyleWidget * widget ) setSingleStatementsMode( !widget->Keep_Statements->isChecked() ); } -bool TDevFormatter::predefinedStyle( const TQString & style ) +bool KDevFormatter::predefinedStyle( const TQString & style ) { if (style == "ANSI") { diff --git a/parts/astyle/astyle_adaptor.h b/parts/astyle/astyle_adaptor.h index df2ab818..21398fbb 100644 --- a/parts/astyle/astyle_adaptor.h +++ b/parts/astyle/astyle_adaptor.h @@ -33,12 +33,12 @@ private: class AStyleWidget; -class TDevFormatter : public astyle::ASFormatter +class KDevFormatter : public astyle::ASFormatter { public: - TDevFormatter(const TQMap& options); - TDevFormatter( AStyleWidget * widget ); + KDevFormatter(const TQMap& options); + KDevFormatter( AStyleWidget * widget ); TQString indentString() const { return m_indentString; diff --git a/parts/astyle/astyle_part.cpp b/parts/astyle/astyle_part.cpp index 57d032c8..16d590ab 100644 --- a/parts/astyle/astyle_part.cpp +++ b/parts/astyle/astyle_part.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include @@ -17,10 +17,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -33,22 +33,22 @@ #include "astyle_widget.h" #include "astyle_adaptor.h" -static const TDevPluginInfo data("tdevastyle"); +static const KDevPluginInfo data("kdevastyle"); namespace { const char* defaultFormatExtensions = "*.cpp *.h *.hpp,*.c *.h,*.cxx *.hxx,*.c++ *.h++,*.cc *.hh,*.C *.H,*.diff ,*.inl,*.java,*.moc,*.patch,*.tlh,*.xpm"; } -typedef TDevGenericFactory AStyleFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevastyle, AStyleFactory( data ) ) +typedef KDevGenericFactory AStyleFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevastyle, AStyleFactory( data ) ) AStylePart::AStylePart(TQObject *parent, const char *name, const TQStringList &) : KDevSourceFormatter(&data, parent, name ? name : "AStylePart") { setInstance(AStyleFactory::instance()); - setXMLFile("tdevpart_astyle.rc"); + setXMLFile("kdevpart_astyle.rc"); formatTextAction = new TDEAction(i18n("&Reformat Source"), 0, this, TQT_SLOT(beautifySource()), actionCollection(), "edit_astyle"); formatTextAction->setEnabled(false); @@ -161,7 +161,7 @@ void AStylePart::beautifySource() //if there is a selection, we only format it. ASStringIterator is(has_selection ? sel_iface->selection() : iface->text()); - TDevFormatter formatter(m_project); + KDevFormatter formatter(m_project); formatter.init(&is); @@ -346,7 +346,7 @@ void AStylePart::activePartChanged ( KParts::Part *part ) TQString AStylePart::formatSource( const TQString text, AStyleWidget * widget, const TQMap& options ) { ASStringIterator is(text); - TDevFormatter * formatter = ( widget)? new TDevFormatter( widget ) : new TDevFormatter(options); + KDevFormatter * formatter = ( widget)? new KDevFormatter( widget ) : new KDevFormatter(options); formatter->init(&is); @@ -390,7 +390,7 @@ TQString AStylePart::formatSource( const TQString text ) TQString AStylePart::indentString( ) const { - TDevFormatter formatter(m_project); + KDevFormatter formatter(m_project); return formatter.indentString(); } diff --git a/parts/astyle/astyle_part.h b/parts/astyle/astyle_part.h index 675bada5..61b5a382 100644 --- a/parts/astyle/astyle_part.h +++ b/parts/astyle/astyle_part.h @@ -3,14 +3,14 @@ */ -#ifndef __TDEVPART_ASTYLE_H__ -#define __TDEVPART_ASTYLE_H__ +#ifndef __KDEVPART_ASTYLE_H__ +#define __KDEVPART_ASTYLE_H__ class KDialogBase; -#include +#include #include #include -#include +#include #include #include #include diff --git a/parts/astyle/astyle_widget.cpp b/parts/astyle/astyle_widget.cpp index bcb810e5..a70c6771 100644 --- a/parts/astyle/astyle_widget.cpp +++ b/parts/astyle/astyle_widget.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include AStyleWidget::AStyleWidget(AStylePart * part, bool global, TQWidget *parent, const char *name) diff --git a/parts/astyle/astyle_widget.h b/parts/astyle/astyle_widget.h index 89b3f2cd..91963e54 100644 --- a/parts/astyle/astyle_widget.h +++ b/parts/astyle/astyle_widget.h @@ -4,7 +4,7 @@ #include "astyleconfig.h" class AStylePart; -class TDevPart; +class KDevPart; class AStyleWidget : public AStyleConfig diff --git a/parts/astyle/kdevastyle.desktop b/parts/astyle/kdevastyle.desktop new file mode 100644 index 00000000..ceeaabfc --- /dev/null +++ b/parts/astyle/kdevastyle.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=A plugin for formatting of sourcecode according to a specified set of rules. When loaded it is found in the Tools menu. +Comment[ca]=Un connector per a donar format al codi font d'acord a una sèrie de regles especificades. Quan està carregat apareixerà en el menú Eines. +Comment[da]=Et plugin til at formatere kildekode ifølge et angivet sæt regler. Når det er indlæst er det i værktøjsmenuen. +Comment[de]=Ein Modul zur Formatierung der Quelltexte nach vorgegebenen Regeln. Ist das Modul geladen, kann es über das Menü "Werkzeuge" aufgerufen werden. +Comment[el]=Ένα πρόσθετο για τη μορφοποίηση του πηγαίου κώδικα σύμφωνα με το ορισμένο σύνολο κανόνων. Όταν φορτωθεί μπορεί να βρεθεί στο μενού εργαλείων. +Comment[es]=Un complemento para dar formato al código fuente de acuerdo una serie de reglas especificadas. Cuando está cargado, aparece en el menú Herramientas. +Comment[et]=Plugin lähtekoodi vormindamiseks vastavalt konkreetsetele reeglitele. Kasutamisel leiab selle tööriistade menüüst. +Comment[eu]=Iturburu kodea emandako arau sorten arabera formateatuko da. Kargatzean Tresnak menuan aurkituko duzu. +Comment[fa]=وصله‌ای برای قالب‌بندی کد منبع طبق یک سری قوانین مشخص‌شده. در هنگام بارگذاری در گزینگان ابزار یافت می‌شود. +Comment[fr]=Un module externe pour le formatage du code source selon un ensemble de règles spécifié. Lorsqu'il est chargé, ce module externe se trouve dans le menu « Outils ». +Comment[gl]=Unha extensión para formatear código seguindo un conxunto de regras. Cando se carga atópase no menú Ferramentas. +Comment[hu]=Bővítőmodul forráskód formázásához, megadott szabályok alapján. Az Eszközök menüből érhető el, ha be van töltve. +Comment[it]=Un plugin per formattare il codice sorgente secondo uno specifico insieme di regole. Quando sarà caricato lo troverai nel menu Strumenti. +Comment[ja]=指定された規則にソースコードを書式化するためのプラグイン。読み込まれるとツールメニューで見つかります。 +Comment[ms]=Plugin untuk memformat kod sumber mengikut set peraturan yang ditetapkan. Apabila dimuatkan ia berada di menu Alatan. +Comment[nds]=En Moduul för't Borntextformateren na angeven Regeln. Wenn dat Moduul laadt is, lett sik dat binnen dat Warktüüchmenü finnen. +Comment[ne]=नियमको निर्दिष्ट सेट अनुसार स्रोतसङ्केतको ढाँचाबद्धताका लागि प्लगइन । लोड भएपछि यो उपकरण मेनुमा फेला पार्न सकिन्छ । +Comment[nl]=Een plugin om broncode te formatteren volgens een speciale set regels. Te vinden onder het menu Gereedschap. +Comment[pl]=Wtyczka do formatowania kodu źródłowego zgodnie z podanymi zasadami. Po wczytaniu pojawia się w menu Narzędzia. +Comment[pt]=Um 'plugin' para a formatação do código-fonte de acordo com um conjunto específico de regras. Quando é carregado, encontrar-se-á no menu Ferramentas. +Comment[pt_BR]=Um plug-in para formatação do código fonte de acordo com um conjunto específico de regras. Quando carregado é encontrado no menu Ferramentas. +Comment[ru]=Модуль для форматирования кода по установленным правилам. +Comment[sk]=Modul pre formátovanie zdrojového kódu podľa špecifických pravidiel.Po načítaní ho nájdete v menu Nástroje. +Comment[sr]=Прикључак за форматирање изворног кôда према прецизираном скупу правила. Када је учитан, налази се у менију „Алати“. +Comment[sr@Latn]=Priključak za formatiranje izvornog kôda prema preciziranom skupu pravila. Kada je učitan, nalazi se u meniju „Alati“. +Comment[sv]=Ett insticksprogram för att formatera källkod enligt en given uppsättning regler. När det laddats finns det i verktygsmenyn. +Comment[ta]=மூல குறிமுறை வடிவத்தை மாற்றும் சொருகிக்கு சில குறிப்பிட்ட விதிமுறைகள் உள்ளது. ஏற்றியபின் இதனை கருவிப்பட்டியில் காணலாம். +Comment[tg]=Модул барои қолабгузории код аз рӯи қонунҳои гузошта шуда. +Comment[tr]=Belli kurallara göre kaynak kodu biçimlendirmeye yarayan bir eklenti. Yüklendiğinde Araçlar menüsünde bulunabilir. +Comment[zh_CN]=一个按照指定规则格式化源代码的插件。启动后显示在工具菜单。 +Comment[zh_TW]=一個根據特定規則將程式源碼格式化的外掛程式。載入後可以在工具選單中找到。 +Name=KDevAStyle +Name[da]=TDevelop en stil +Name[de]=Artistic-Style-Unterstützung (TDevelop) +Name[hi]=के-डेव-ए-स्टाइल +Name[nds]=Kodestil-Ünnerstütten för TDevelop +Name[pl]=KDevStylA +Name[sk]=KDev štýl +Name[sv]=TDevelop A-stil +Name[zh_TW]=TDevelop AStyle +GenericName=Source Code Formatter +GenericName[ca]=Formatador de codi font +GenericName[da]=Kildekode-formatering +GenericName[de]=Quelltext-Formatierer +GenericName[el]=Μορφοποιητής πηγαίου κώδικα +GenericName[es]=Formateador de código fuente +GenericName[et]=Lähtekoodi vormindaja +GenericName[eu]=Iturburu kode formateatzailea +GenericName[fa]=قالب‌دهندۀ کد منبع +GenericName[fr]=Formatage de code source +GenericName[gl]=Formateador de código +GenericName[hi]=स्रोत कोड फ़ॉर्मेटर +GenericName[hu]=Forráskód-formázó +GenericName[it]=Formattatore del codice sorgente +GenericName[ja]=ソースコードフォーマッタ +GenericName[ms]=Pemformat Kod Sumber +GenericName[nds]=Borntext-Formateren +GenericName[ne]=स्रोत सङ्केत ढाँचाबद्धक +GenericName[nl]=Broncode formatteren +GenericName[pl]=Formatowanie kodu źródłowego +GenericName[pt]=Formatador de Código Fonte +GenericName[pt_BR]=Formatador de Código Fonte +GenericName[ru]=Форматирование исходного кода +GenericName[sk]=Formátovač zdrojového kódu +GenericName[sl]=Oblikovalec izvorne kode +GenericName[sr]=Форматер изворног кода +GenericName[sr@Latn]=Formater izvornog koda +GenericName[sv]=Källkodsformatering +GenericName[ta]=மூல குறியை வடிவமைப்பவர் +GenericName[tg]=Қолабгузори коди берунӣ +GenericName[tr]=Kaynak Kodu Biçimlendirici +GenericName[zh_CN]=源代码格式化 +GenericName[zh_TW]=程式源碼格式器 +Icon=tdevelop +ServiceTypes=TDevelop/SourceFormatter +X-TDE-Library=libkdevastyle +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=CDevelopment,CPPDevelopment,JavaDevelopment diff --git a/parts/astyle/kdevpart_astyle.rc b/parts/astyle/kdevpart_astyle.rc new file mode 100644 index 00000000..69037425 --- /dev/null +++ b/parts/astyle/kdevpart_astyle.rc @@ -0,0 +1,17 @@ + + + + + + + + + + + + Astyle Toolbar + + + + + diff --git a/parts/astyle/tdevastyle.desktop b/parts/astyle/tdevastyle.desktop deleted file mode 100644 index b77c4745..00000000 --- a/parts/astyle/tdevastyle.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=A plugin for formatting of sourcecode according to a specified set of rules. When loaded it is found in the Tools menu. -Comment[ca]=Un connector per a donar format al codi font d'acord a una sèrie de regles especificades. Quan està carregat apareixerà en el menú Eines. -Comment[da]=Et plugin til at formatere kildekode ifølge et angivet sæt regler. Når det er indlæst er det i værktøjsmenuen. -Comment[de]=Ein Modul zur Formatierung der Quelltexte nach vorgegebenen Regeln. Ist das Modul geladen, kann es über das Menü "Werkzeuge" aufgerufen werden. -Comment[el]=Ένα πρόσθετο για τη μορφοποίηση του πηγαίου κώδικα σύμφωνα με το ορισμένο σύνολο κανόνων. Όταν φορτωθεί μπορεί να βρεθεί στο μενού εργαλείων. -Comment[es]=Un complemento para dar formato al código fuente de acuerdo una serie de reglas especificadas. Cuando está cargado, aparece en el menú Herramientas. -Comment[et]=Plugin lähtekoodi vormindamiseks vastavalt konkreetsetele reeglitele. Kasutamisel leiab selle tööriistade menüüst. -Comment[eu]=Iturburu kodea emandako arau sorten arabera formateatuko da. Kargatzean Tresnak menuan aurkituko duzu. -Comment[fa]=وصله‌ای برای قالب‌بندی کد منبع طبق یک سری قوانین مشخص‌شده. در هنگام بارگذاری در گزینگان ابزار یافت می‌شود. -Comment[fr]=Un module externe pour le formatage du code source selon un ensemble de règles spécifié. Lorsqu'il est chargé, ce module externe se trouve dans le menu « Outils ». -Comment[gl]=Unha extensión para formatear código seguindo un conxunto de regras. Cando se carga atópase no menú Ferramentas. -Comment[hu]=Bővítőmodul forráskód formázásához, megadott szabályok alapján. Az Eszközök menüből érhető el, ha be van töltve. -Comment[it]=Un plugin per formattare il codice sorgente secondo uno specifico insieme di regole. Quando sarà caricato lo troverai nel menu Strumenti. -Comment[ja]=指定された規則にソースコードを書式化するためのプラグイン。読み込まれるとツールメニューで見つかります。 -Comment[ms]=Plugin untuk memformat kod sumber mengikut set peraturan yang ditetapkan. Apabila dimuatkan ia berada di menu Alatan. -Comment[nds]=En Moduul för't Borntextformateren na angeven Regeln. Wenn dat Moduul laadt is, lett sik dat binnen dat Warktüüchmenü finnen. -Comment[ne]=नियमको निर्दिष्ट सेट अनुसार स्रोतसङ्केतको ढाँचाबद्धताका लागि प्लगइन । लोड भएपछि यो उपकरण मेनुमा फेला पार्न सकिन्छ । -Comment[nl]=Een plugin om broncode te formatteren volgens een speciale set regels. Te vinden onder het menu Gereedschap. -Comment[pl]=Wtyczka do formatowania kodu źródłowego zgodnie z podanymi zasadami. Po wczytaniu pojawia się w menu Narzędzia. -Comment[pt]=Um 'plugin' para a formatação do código-fonte de acordo com um conjunto específico de regras. Quando é carregado, encontrar-se-á no menu Ferramentas. -Comment[pt_BR]=Um plug-in para formatação do código fonte de acordo com um conjunto específico de regras. Quando carregado é encontrado no menu Ferramentas. -Comment[ru]=Модуль для форматирования кода по установленным правилам. -Comment[sk]=Modul pre formátovanie zdrojového kódu podľa špecifických pravidiel.Po načítaní ho nájdete v menu Nástroje. -Comment[sr]=Прикључак за форматирање изворног кôда према прецизираном скупу правила. Када је учитан, налази се у менију „Алати“. -Comment[sr@Latn]=Priključak za formatiranje izvornog kôda prema preciziranom skupu pravila. Kada je učitan, nalazi se u meniju „Alati“. -Comment[sv]=Ett insticksprogram för att formatera källkod enligt en given uppsättning regler. När det laddats finns det i verktygsmenyn. -Comment[ta]=மூல குறிமுறை வடிவத்தை மாற்றும் சொருகிக்கு சில குறிப்பிட்ட விதிமுறைகள் உள்ளது. ஏற்றியபின் இதனை கருவிப்பட்டியில் காணலாம். -Comment[tg]=Модул барои қолабгузории код аз рӯи қонунҳои гузошта шуда. -Comment[tr]=Belli kurallara göre kaynak kodu biçimlendirmeye yarayan bir eklenti. Yüklendiğinde Araçlar menüsünde bulunabilir. -Comment[zh_CN]=一个按照指定规则格式化源代码的插件。启动后显示在工具菜单。 -Comment[zh_TW]=一個根據特定規則將程式源碼格式化的外掛程式。載入後可以在工具選單中找到。 -Name=KDevAStyle -Name[da]=TDevelop en stil -Name[de]=Artistic-Style-Unterstützung (TDevelop) -Name[hi]=के-डेव-ए-स्टाइल -Name[nds]=Kodestil-Ünnerstütten för TDevelop -Name[pl]=KDevStylA -Name[sk]=KDev štýl -Name[sv]=TDevelop A-stil -Name[zh_TW]=TDevelop AStyle -GenericName=Source Code Formatter -GenericName[ca]=Formatador de codi font -GenericName[da]=Kildekode-formatering -GenericName[de]=Quelltext-Formatierer -GenericName[el]=Μορφοποιητής πηγαίου κώδικα -GenericName[es]=Formateador de código fuente -GenericName[et]=Lähtekoodi vormindaja -GenericName[eu]=Iturburu kode formateatzailea -GenericName[fa]=قالب‌دهندۀ کد منبع -GenericName[fr]=Formatage de code source -GenericName[gl]=Formateador de código -GenericName[hi]=स्रोत कोड फ़ॉर्मेटर -GenericName[hu]=Forráskód-formázó -GenericName[it]=Formattatore del codice sorgente -GenericName[ja]=ソースコードフォーマッタ -GenericName[ms]=Pemformat Kod Sumber -GenericName[nds]=Borntext-Formateren -GenericName[ne]=स्रोत सङ्केत ढाँचाबद्धक -GenericName[nl]=Broncode formatteren -GenericName[pl]=Formatowanie kodu źródłowego -GenericName[pt]=Formatador de Código Fonte -GenericName[pt_BR]=Formatador de Código Fonte -GenericName[ru]=Форматирование исходного кода -GenericName[sk]=Formátovač zdrojového kódu -GenericName[sl]=Oblikovalec izvorne kode -GenericName[sr]=Форматер изворног кода -GenericName[sr@Latn]=Formater izvornog koda -GenericName[sv]=Källkodsformatering -GenericName[ta]=மூல குறியை வடிவமைப்பவர் -GenericName[tg]=Қолабгузори коди берунӣ -GenericName[tr]=Kaynak Kodu Biçimlendirici -GenericName[zh_CN]=源代码格式化 -GenericName[zh_TW]=程式源碼格式器 -Icon=tdevelop -ServiceTypes=TDevelop/SourceFormatter -X-TDE-Library=libtdevastyle -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=CDevelopment,CPPDevelopment,JavaDevelopment diff --git a/parts/astyle/tdevpart_astyle.rc b/parts/astyle/tdevpart_astyle.rc deleted file mode 100644 index 69037425..00000000 --- a/parts/astyle/tdevpart_astyle.rc +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - Astyle Toolbar - - - - - diff --git a/parts/bookmarks/CMakeLists.txt b/parts/bookmarks/CMakeLists.txt index 98022378..0422965c 100644 --- a/parts/bookmarks/CMakeLists.txt +++ b/parts/bookmarks/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevbookmarks.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevbookmarks.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevbookmarks (module) ################# +##### libkdevbookmarks (module) ################# -tde_add_kpart( libtdevbookmarks AUTOMOC +tde_add_kpart( libkdevbookmarks AUTOMOC SOURCES bookmarks_part.cpp bookmarks_widget.cpp bookmarks_settings_base.ui bookmarks_settings.cpp bookmarks_config.cpp diff --git a/parts/bookmarks/Makefile.am b/parts/bookmarks/Makefile.am index 6f2e6b8d..2ac7b233 100644 --- a/parts/bookmarks/Makefile.am +++ b/parts/bookmarks/Makefile.am @@ -1,14 +1,14 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevbookmarks.la -libtdevbookmarks_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevbookmarks_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevbookmarks.la +libkdevbookmarks_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevbookmarks_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevbookmarks_la_SOURCES = bookmarks_part.cpp bookmarks_widget.cpp bookmarks_settings_base.ui bookmarks_settings.cpp bookmarks_config.cpp +libkdevbookmarks_la_SOURCES = bookmarks_part.cpp bookmarks_widget.cpp bookmarks_settings_base.ui bookmarks_settings.cpp bookmarks_config.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevbookmarks.desktop +service_DATA = kdevbookmarks.desktop noinst_HEADERS = bookmarks_settings.h bookmarks_config.h diff --git a/parts/bookmarks/bookmarks_part.cpp b/parts/bookmarks/bookmarks_part.cpp index 50672642..f7ac78cb 100644 --- a/parts/bookmarks/bookmarks_part.cpp +++ b/parts/bookmarks/bookmarks_part.cpp @@ -18,16 +18,16 @@ #include #include #include -#include +#include #include #include #include #include #include -#include -#include -#include +#include +#include +#include #include "domutil.h" #include "bookmarks_widget.h" @@ -36,16 +36,16 @@ #include "bookmarks_config.h" #include -#include +#include #define BOOKMARKSETTINGSPAGE 1 -typedef TDevGenericFactory BookmarksFactory; -static const TDevPluginInfo data("tdevbookmarks"); -K_EXPORT_COMPONENT_FACTORY( libtdevbookmarks, BookmarksFactory( data ) ) +typedef KDevGenericFactory BookmarksFactory; +static const KDevPluginInfo data("kdevbookmarks"); +K_EXPORT_COMPONENT_FACTORY( libkdevbookmarks, BookmarksFactory( data ) ) BookmarksPart::BookmarksPart(TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin(&data, parent, name ? name : "BookmarksPart" ) + : KDevPlugin(&data, parent, name ? name : "BookmarksPart" ) { setInstance(BookmarksFactory::instance()); diff --git a/parts/bookmarks/bookmarks_part.h b/parts/bookmarks/bookmarks_part.h index b8015f54..f51603d7 100644 --- a/parts/bookmarks/bookmarks_part.h +++ b/parts/bookmarks/bookmarks_part.h @@ -10,8 +10,8 @@ ***************************************************************************/ -#ifndef __TDEVPART_BOOKMARKS_H__ -#define __TDEVPART_BOOKMARKS_H__ +#ifndef __KDEVPART_BOOKMARKS_H__ +#define __KDEVPART_BOOKMARKS_H__ #include @@ -22,7 +22,7 @@ #include #include -#include +#include class TQTimer; class KDialogBase; @@ -38,7 +38,7 @@ struct EditorData class BookmarksWidget; class TQDomElement; -class BookmarksPart : public TDevPlugin +class BookmarksPart : public KDevPlugin { Q_OBJECT @@ -48,7 +48,7 @@ public: BookmarksPart(TQObject *parent, const char *name, const TQStringList &); ~BookmarksPart(); - // reimplemented from TDevPlugin + // reimplemented from KDevPlugin void restorePartialProjectSession( const TQDomElement * el ); void savePartialProjectSession( TQDomElement * el ); diff --git a/parts/bookmarks/bookmarks_widget.cpp b/parts/bookmarks/bookmarks_widget.cpp index dbf892fe..cc7316c8 100644 --- a/parts/bookmarks/bookmarks_widget.cpp +++ b/parts/bookmarks/bookmarks_widget.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include "bookmarks_part.h" diff --git a/parts/bookmarks/kdevbookmarks.desktop b/parts/bookmarks/kdevbookmarks.desktop new file mode 100644 index 00000000..3cbdb233 --- /dev/null +++ b/parts/bookmarks/kdevbookmarks.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Plugin that provides navigation and overview of active source bookmarks and persists them between sessions. +Comment[ca]=Connector que proporciona navegació i visió de conjunt dels marcadors actius en el codi font i els manté entre sessions. +Comment[da]=Plugin der sørger for navigation og overblik for aktive kilde-bogmærker og lader dem overleve mellem sessioner. +Comment[de]=Ein Modul, das die Navigation in und die Übersicht über Quelltext-Lesezeichen ermöglicht und diese zwischen den Arbeitssitzungen speichert. +Comment[el]=Πρόσθετο που προσφέρει πλοήγηση και περίληψη των ενεργών σελιδοδεικτών στον κώδικα καθώς και τη διατήρηση αυτών μεταξύ των συνεδριών. +Comment[es]=Complemento que proporciona navegación de marcadores del código activos y los mantiene entre sesiones. +Comment[et]=Plugin, mis võimaldab näha ja liikuda aktiivse koodi järjehoidjate vahel ning peab need seansside vahel meeles. +Comment[eu]=Iturburu laster-marka aktiboen arakatze eta ikuspegi orokorra eskeintzen duen plugina da eta hauek sesioen artean mantentzen ditu. +Comment[fa]=وصله‌ای که ناوش و خلاصۀ چوب الفهای فعال منبع را فراهم می‌کند و آنها را در بین نشستها می‌گذارد +Comment[fr]=Module externe qui fournit une navigation et une vue d'ensemble des signets du source actif, et les maintient persistants entre les sessions. +Comment[gl]=Extensión que proporciona navegación e vista xeral de marcadores activos no código e que se encarga de mantelos entre sesións. +Comment[hu]=Bővítőmodul a forrásfájlok könyvjelzőinek áttekintéséhez, eltárolásához +Comment[it]=Plugin che offre la navigazione e l'anteprima dei segnalibri nel codice attivo e rimane nelle varie sessioni. +Comment[ja]=セッション間でアクティブなソースのブックマークや主張の外観やナビゲーションを提供するプラグイン。 +Comment[ms]=Plugin yang menyediakan pengemudian dan pandangan umum bagi tandalaman sumber aktif dan mengekalkan mereka antara sesi. +Comment[nds]=En Moduul, wat dat Stüern twischen un de Översicht över Borntext-Leestekens praatstellt, un disse över Törns wohrt. +Comment[ne]=प्लगइनले सक्रिय स्रोत पुस्तकचिनोको नेभिगेसन र समिक्षा प्रदान गर्दछ र सत्रहरू बिच तिनीहरूलाई राख्दछ । +Comment[nl]=Plugin die bladwijzers biedt die ook blijven bestaan tussen opeenvolgende sessies. +Comment[pl]=Wtyczka umożliwiająca nawigację i uzyskiwanie informacji na temat aktywnych zakładek w kodzie oraz przenoszenie ich między sesjami. +Comment[pt]=Um 'plugin' que oferece uma navegação e uma vista geral sobre os favoritos de código activos, mantendo-os persistentes entre sessões. +Comment[pt_BR]=Plug-in que fornece navegação e uma visão geral dos marcadores de código ativos e persiste entre sessões. +Comment[ru]=Модуль, который обеспечивает навигацию и просмотр активных закладок в коде, а также их сохранение в проекте. +Comment[sk]=Modul proskytuje navigáciu a prehľad aktívnych zdrojových záložiek a ich pretrvanie medzi sedeniami. +Comment[sr]=Прикључак који обезбеђује навигацију и преглед активних маркера изворног кôда и одржава их између сесија. +Comment[sr@Latn]=Priključak koji obezbeđuje navigaciju i pregled aktivnih markera izvornog kôda i održava ih između sesija. +Comment[sv]=Insticksprogram som tillhandahåller navigering och översikt över aktiva källkodsbokmärken och gör dem bestående mellan sessioner. +Comment[ta]=நடப்பில் உள்ள புத்தக குறியீடு மூலத்திற்கு மேற்பார்வை மற்றும் வழிசெலுத்தும் வசதிகளை சொருகி உங்களுக்கு தரும் மற்றும் அமர்வுக்கு இடையே இதனை பரிசோதிக்கும். +Comment[tg]=Модуле, ки навигатсия ва намоиши поягузории фаъолро дар код таъмин месозад, ва боз барои нигоҳ доштан дар лоиҳа ҳам. +Comment[tr]=Etkin kaynak yerimlerinin dolaşımını, gözden geçirilmesini ve oturumlar arasında devamlılığını sağlayan bir eklenti. +Comment[zh_CN]=提供当前源文件书签的浏览、预览和保存的插件。 +Comment[zh_TW]=提供目前程式碼書籤的導覽與概觀,並保持在工作階段間。 +Name=KDevBookmarks +Name[da]=TDevelop bogmærker +Name[de]=Lesezeichen-Unterstützung (TDevelop) +Name[hi]=के-डेव-बुकमार्क्स +Name[nds]=Leestekens-Ünnerstütten (TDevelop) +Name[pl]=KDevZakładki +Name[sk]=KDev záložky +Name[sv]=TDevelop bokmärken +Name[zh_TW]=TDevelop 書籤 +GenericName=Bookmarks +GenericName[br]=Sinedoù +GenericName[ca]=Marcadors +GenericName[cy]=Tudnodau +GenericName[da]=Bogmærker +GenericName[de]=Unterstützung für Lesezeichen +GenericName[el]=Σελιδοδείκτες +GenericName[es]=Marcadores +GenericName[et]=Järjehoidjad +GenericName[eu]=Laster-markak +GenericName[fa]=چوب‌ الفها +GenericName[fr]=Signets +GenericName[ga]=Leabharmharcanna +GenericName[gl]=Marcadores +GenericName[hi]= पसंदीदा +GenericName[hu]=Könyvjelzők +GenericName[it]=Segnalibri +GenericName[ja]=ブックマーク +GenericName[ms]=Tandabuku +GenericName[nds]=Leestekens-Ünnerstütten +GenericName[ne]=पुस्तकचिनो +GenericName[nl]=Bladwijzers +GenericName[pl]=Zakładki +GenericName[pt]=Favoritos +GenericName[pt_BR]=Marcadores +GenericName[ru]=Закладки +GenericName[sk]=Záložky +GenericName[sl]=Zaznamki +GenericName[sr]=Маркери +GenericName[sr@Latn]=Markeri +GenericName[sv]=Bokmärken +GenericName[ta]=புத்தகக்குறியின் +GenericName[tg]=Поягузор +GenericName[tr]=Yerimleri +GenericName[zh_CN]=书签 +GenericName[zh_TW]=書籤 +Icon=bookmark +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Project +X-TDE-Library=libkdevbookmarks +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeEditing diff --git a/parts/bookmarks/tdevbookmarks.desktop b/parts/bookmarks/tdevbookmarks.desktop deleted file mode 100644 index 0ec9ae11..00000000 --- a/parts/bookmarks/tdevbookmarks.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Plugin that provides navigation and overview of active source bookmarks and persists them between sessions. -Comment[ca]=Connector que proporciona navegació i visió de conjunt dels marcadors actius en el codi font i els manté entre sessions. -Comment[da]=Plugin der sørger for navigation og overblik for aktive kilde-bogmærker og lader dem overleve mellem sessioner. -Comment[de]=Ein Modul, das die Navigation in und die Übersicht über Quelltext-Lesezeichen ermöglicht und diese zwischen den Arbeitssitzungen speichert. -Comment[el]=Πρόσθετο που προσφέρει πλοήγηση και περίληψη των ενεργών σελιδοδεικτών στον κώδικα καθώς και τη διατήρηση αυτών μεταξύ των συνεδριών. -Comment[es]=Complemento que proporciona navegación de marcadores del código activos y los mantiene entre sesiones. -Comment[et]=Plugin, mis võimaldab näha ja liikuda aktiivse koodi järjehoidjate vahel ning peab need seansside vahel meeles. -Comment[eu]=Iturburu laster-marka aktiboen arakatze eta ikuspegi orokorra eskeintzen duen plugina da eta hauek sesioen artean mantentzen ditu. -Comment[fa]=وصله‌ای که ناوش و خلاصۀ چوب الفهای فعال منبع را فراهم می‌کند و آنها را در بین نشستها می‌گذارد -Comment[fr]=Module externe qui fournit une navigation et une vue d'ensemble des signets du source actif, et les maintient persistants entre les sessions. -Comment[gl]=Extensión que proporciona navegación e vista xeral de marcadores activos no código e que se encarga de mantelos entre sesións. -Comment[hu]=Bővítőmodul a forrásfájlok könyvjelzőinek áttekintéséhez, eltárolásához -Comment[it]=Plugin che offre la navigazione e l'anteprima dei segnalibri nel codice attivo e rimane nelle varie sessioni. -Comment[ja]=セッション間でアクティブなソースのブックマークや主張の外観やナビゲーションを提供するプラグイン。 -Comment[ms]=Plugin yang menyediakan pengemudian dan pandangan umum bagi tandalaman sumber aktif dan mengekalkan mereka antara sesi. -Comment[nds]=En Moduul, wat dat Stüern twischen un de Översicht över Borntext-Leestekens praatstellt, un disse över Törns wohrt. -Comment[ne]=प्लगइनले सक्रिय स्रोत पुस्तकचिनोको नेभिगेसन र समिक्षा प्रदान गर्दछ र सत्रहरू बिच तिनीहरूलाई राख्दछ । -Comment[nl]=Plugin die bladwijzers biedt die ook blijven bestaan tussen opeenvolgende sessies. -Comment[pl]=Wtyczka umożliwiająca nawigację i uzyskiwanie informacji na temat aktywnych zakładek w kodzie oraz przenoszenie ich między sesjami. -Comment[pt]=Um 'plugin' que oferece uma navegação e uma vista geral sobre os favoritos de código activos, mantendo-os persistentes entre sessões. -Comment[pt_BR]=Plug-in que fornece navegação e uma visão geral dos marcadores de código ativos e persiste entre sessões. -Comment[ru]=Модуль, который обеспечивает навигацию и просмотр активных закладок в коде, а также их сохранение в проекте. -Comment[sk]=Modul proskytuje navigáciu a prehľad aktívnych zdrojových záložiek a ich pretrvanie medzi sedeniami. -Comment[sr]=Прикључак који обезбеђује навигацију и преглед активних маркера изворног кôда и одржава их између сесија. -Comment[sr@Latn]=Priključak koji obezbeđuje navigaciju i pregled aktivnih markera izvornog kôda i održava ih između sesija. -Comment[sv]=Insticksprogram som tillhandahåller navigering och översikt över aktiva källkodsbokmärken och gör dem bestående mellan sessioner. -Comment[ta]=நடப்பில் உள்ள புத்தக குறியீடு மூலத்திற்கு மேற்பார்வை மற்றும் வழிசெலுத்தும் வசதிகளை சொருகி உங்களுக்கு தரும் மற்றும் அமர்வுக்கு இடையே இதனை பரிசோதிக்கும். -Comment[tg]=Модуле, ки навигатсия ва намоиши поягузории фаъолро дар код таъмин месозад, ва боз барои нигоҳ доштан дар лоиҳа ҳам. -Comment[tr]=Etkin kaynak yerimlerinin dolaşımını, gözden geçirilmesini ve oturumlar arasında devamlılığını sağlayan bir eklenti. -Comment[zh_CN]=提供当前源文件书签的浏览、预览和保存的插件。 -Comment[zh_TW]=提供目前程式碼書籤的導覽與概觀,並保持在工作階段間。 -Name=KDevBookmarks -Name[da]=TDevelop bogmærker -Name[de]=Lesezeichen-Unterstützung (TDevelop) -Name[hi]=के-डेव-बुकमार्क्स -Name[nds]=Leestekens-Ünnerstütten (TDevelop) -Name[pl]=KDevZakładki -Name[sk]=KDev záložky -Name[sv]=TDevelop bokmärken -Name[zh_TW]=TDevelop 書籤 -GenericName=Bookmarks -GenericName[br]=Sinedoù -GenericName[ca]=Marcadors -GenericName[cy]=Tudnodau -GenericName[da]=Bogmærker -GenericName[de]=Unterstützung für Lesezeichen -GenericName[el]=Σελιδοδείκτες -GenericName[es]=Marcadores -GenericName[et]=Järjehoidjad -GenericName[eu]=Laster-markak -GenericName[fa]=چوب‌ الفها -GenericName[fr]=Signets -GenericName[ga]=Leabharmharcanna -GenericName[gl]=Marcadores -GenericName[hi]= पसंदीदा -GenericName[hu]=Könyvjelzők -GenericName[it]=Segnalibri -GenericName[ja]=ブックマーク -GenericName[ms]=Tandabuku -GenericName[nds]=Leestekens-Ünnerstütten -GenericName[ne]=पुस्तकचिनो -GenericName[nl]=Bladwijzers -GenericName[pl]=Zakładki -GenericName[pt]=Favoritos -GenericName[pt_BR]=Marcadores -GenericName[ru]=Закладки -GenericName[sk]=Záložky -GenericName[sl]=Zaznamki -GenericName[sr]=Маркери -GenericName[sr@Latn]=Markeri -GenericName[sv]=Bokmärken -GenericName[ta]=புத்தகக்குறியின் -GenericName[tg]=Поягузор -GenericName[tr]=Yerimleri -GenericName[zh_CN]=书签 -GenericName[zh_TW]=書籤 -Icon=bookmark -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Project -X-TDE-Library=libtdevbookmarks -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeEditing diff --git a/parts/classview/CMakeLists.txt b/parts/classview/CMakeLists.txt index a5ec68dc..2d19388a 100644 --- a/parts/classview/CMakeLists.txt +++ b/parts/classview/CMakeLists.txt @@ -30,17 +30,17 @@ link_directories( ##### other data ################################ -install( FILES tdevclassview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevclassview.rc DESTINATION ${DATA_INSTALL_DIR}/tdevclassview ) +install( FILES kdevclassview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevclassview.rc DESTINATION ${DATA_INSTALL_DIR}/kdevclassview ) -##### libtdevclassview (module) ################# +##### libkdevclassview (module) ################# -tde_add_kpart( libtdevclassview AUTOMOC +tde_add_kpart( libkdevclassview AUTOMOC SOURCES classviewpart.cpp classviewwidget.cpp digraphview.cpp hierarchydlg.cpp navigator.cpp viewcombos.cpp LINK - tdevextensions-static tdevelop-shared tdevwidgets-shared + kdevextensions-static tdevelop-shared kdevwidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/classview/Makefile.am b/parts/classview/Makefile.am index ccc02078..3041259e 100644 --- a/parts/classview/Makefile.am +++ b/parts/classview/Makefile.am @@ -3,20 +3,20 @@ INCLUDES = -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions \ -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevclassview.la -libtdevclassview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevclassview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la +kde_module_LTLIBRARIES = libkdevclassview.la +libkdevclassview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevclassview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la -libtdevclassview_la_SOURCES = classviewpart.cpp classviewwidget.cpp \ +libkdevclassview_la_SOURCES = classviewpart.cpp classviewwidget.cpp \ digraphview.cpp hierarchydlg.cpp navigator.cpp viewcombos.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevclassview.desktop +service_DATA = kdevclassview.desktop -rcdir = $(kde_datadir)/tdevclassview -rc_DATA = tdevclassview.rc +rcdir = $(kde_datadir)/kdevclassview +rc_DATA = kdevclassview.rc QTDIR = /home/bernd/kdesrc/qt-copy diff --git a/parts/classview/classtooldlg.cpp b/parts/classview/classtooldlg.cpp index f0c49d46..c0cc21a2 100644 --- a/parts/classview/classtooldlg.cpp +++ b/parts/classview/classtooldlg.cpp @@ -20,7 +20,7 @@ #include #include -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include "classstore.h" #include "parsedclass.h" #include "classviewpart.h" @@ -119,8 +119,8 @@ ClassToolDialog::ClassToolDialog( ClassViewPart *part ) connect( methods_button, TQT_SIGNAL(clicked()), TQT_SLOT(viewMethods())); connect( attributes_button, TQT_SIGNAL(clicked()), TQT_SLOT(viewAttributes())); - connect( part, TQT_SIGNAL(setLanguageSupport(TDevLanguageSupport*)), - this, TQT_SLOT(setLanguageSupport(TDevLanguageSupport*)) ); + connect( part, TQT_SIGNAL(setLanguageSupport(KDevLanguageSupport*)), + this, TQT_SLOT(setLanguageSupport(KDevLanguageSupport*)) ); m_part->registerClassToolDialog(this); } @@ -132,7 +132,7 @@ ClassToolDialog::~ClassToolDialog() } -void ClassToolDialog::setLanguageSupport(TDevLanguageSupport *ls) +void ClassToolDialog::setLanguageSupport(KDevLanguageSupport *ls) { if (ls) { disconnect(ls, 0, this, 0); diff --git a/parts/classview/classtooldlg.h b/parts/classview/classtooldlg.h index c4b2e79a..d143e66e 100644 --- a/parts/classview/classtooldlg.h +++ b/parts/classview/classtooldlg.h @@ -59,7 +59,7 @@ public slots: void viewAttributes(); private slots: - void setLanguageSupport(TDevLanguageSupport *ls); + void setLanguageSupport(KDevLanguageSupport *ls); void refresh(); void delayedClose(); @@ -85,7 +85,7 @@ private: /** Store that holds all classes in the system. */ ClassStore *m_store; - TDevLanguageSupport *m_ls; + KDevLanguageSupport *m_ls; ClassViewPart *m_part; /** The class we are currently viewing. */ diff --git a/parts/classview/classtreebase.cpp b/parts/classview/classtreebase.cpp index 66e23173..9e052418 100644 --- a/parts/classview/classtreebase.cpp +++ b/parts/classview/classtreebase.cpp @@ -22,10 +22,10 @@ #include #include -#include "tdevcore.h" -#include "tdevlanguagesupport.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevlanguagesupport.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" #include "classstore.h" #include "classviewpart.h" @@ -36,10 +36,10 @@ TDEPopupMenu *ClassTreeItem::createPopup() if (!m_item || m_item->itemType() == PIT_SCOPE) return 0; - TDevLanguageSupport::Features features = classTree()->m_part->languageSupport()->features(); + KDevLanguageSupport::Features features = classTree()->m_part->languageSupport()->features(); TDEPopupMenu *popup = new TDEPopupMenu(); - if (features & TDevLanguageSupport::Declarations) + if (features & KDevLanguageSupport::Declarations) popup->insertItem( i18n("Go to Declaration"), classTree(), TQT_SLOT(slotGotoDeclaration()) ); if (m_item->itemType() == PIT_METHOD) popup->insertItem( i18n("Go to Definition"), classTree(), TQT_SLOT(slotGotoImplementation()) ); @@ -49,8 +49,8 @@ TDEPopupMenu *ClassTreeItem::createPopup() case PIT_CLASS: { title = i18n("Class"); - bool hasAddMethod = features & TDevLanguageSupport::AddMethod; - bool hasAddAttribute = features & TDevLanguageSupport::AddAttribute; + bool hasAddMethod = features & KDevLanguageSupport::AddMethod; + bool hasAddAttribute = features & KDevLanguageSupport::AddAttribute; if (hasAddMethod) popup->insertItem( i18n("Add Method..."), classTree(), TQT_SLOT(slotAddMethod())); if (hasAddAttribute) @@ -168,7 +168,7 @@ void ClassTreeScopeItem::setOpen(bool o) ClassTreeItem *lastItem = 0; // Ok, this is a hack... - TDevLanguageSupport::Features features = classTree()->m_part->languageSupport()->features(); + KDevLanguageSupport::Features features = classTree()->m_part->languageSupport()->features(); // Add namespaces TQValueList scopeList = pScope->getSortedScopeList(); @@ -176,7 +176,7 @@ void ClassTreeScopeItem::setOpen(bool o) for (it = scopeList.begin(); it != scopeList.end(); ++it) lastItem = new ClassTreeScopeItem(this, lastItem, *it); - if (features & TDevLanguageSupport::Classes) { + if (features & KDevLanguageSupport::Classes) { // Add classes TQValueList classList = pScope->getSortedClassList(); TQValueList::ConstIterator it; @@ -184,7 +184,7 @@ void ClassTreeScopeItem::setOpen(bool o) lastItem = new ClassTreeClassItem(this, lastItem, *it); } - if (features & TDevLanguageSupport::Structs) { + if (features & KDevLanguageSupport::Structs) { // Add structs TQValueList structList = pScope->getSortedStructList(); TQValueList::ConstIterator it; @@ -192,7 +192,7 @@ void ClassTreeScopeItem::setOpen(bool o) lastItem = new ClassTreeClassItem(this, lastItem, *it, true); } - if (features & TDevLanguageSupport::Functions) { + if (features & KDevLanguageSupport::Functions) { // Add functions TQValueList methodList = pScope->getSortedMethodList(); TQValueList::ConstIterator it; @@ -200,7 +200,7 @@ void ClassTreeScopeItem::setOpen(bool o) lastItem = new ClassTreeMethodItem(this, lastItem, *it); } - if (features & TDevLanguageSupport::Variables) { + if (features & KDevLanguageSupport::Variables) { // Add attributes TQValueList attrList = pScope->getSortedAttributeList(); TQValueList::ConstIterator it; diff --git a/parts/classview/classviewpart.cpp b/parts/classview/classviewpart.cpp index 7cdf8cbd..92e26bd0 100644 --- a/parts/classview/classviewpart.cpp +++ b/parts/classview/classviewpart.cpp @@ -26,19 +26,19 @@ #include #include -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include -#include -#include +#include +#include #include -#include +#include #include #include @@ -138,17 +138,17 @@ class FunctionCompletion : public CustomCompleter { }; -typedef TDevGenericFactory ClassViewFactory; -static const TDevPluginInfo data("tdevclassview"); -K_EXPORT_COMPONENT_FACTORY( libtdevclassview, ClassViewFactory( data ) ) +typedef KDevGenericFactory ClassViewFactory; +static const KDevPluginInfo data("kdevclassview"); +K_EXPORT_COMPONENT_FACTORY( libkdevclassview, ClassViewFactory( data ) ) ClassViewPart::ClassViewPart(TQObject *parent, const char *name, const TQStringList& ) - :/// TDevPlugin( &data, parent, name ? name : "ClassViewPart" ), - TDevCodeBrowserFrontend( &data, parent, name ? name : "ClassViewPart" ), + :/// KDevPlugin( &data, parent, name ? name : "ClassViewPart" ), + KDevCodeBrowserFrontend( &data, parent, name ? name : "ClassViewPart" ), m_activeDocument(0), m_activeView(0), m_activeSelection(0), m_activeEditor(0), m_activeViewCursor(0), m_hierarchyDlg(0) { setInstance(ClassViewFactory::instance()); - setXMLFile("tdevclassview.rc"); + setXMLFile("kdevclassview.rc"); navigator = new Navigator(this); @@ -207,7 +207,7 @@ void ClassViewPart::setupActions( ) new TDEAction( i18n("Focus Navigator"), 0, this, TQT_SLOT(slotFocusNavbar()), actionCollection(), "focus_navigator" ); - if (langHasFeature(TDevLanguageSupport::Classes)) + if (langHasFeature(KDevLanguageSupport::Classes)) { TDEAction *ac = new TDEAction(i18n("Class Inheritance Diagram"), "view_tree", 0, this, TQT_SLOT(graphicalClassView()), actionCollection(), "inheritance_dia"); ac->setToolTip(i18n("Class inheritance diagram")); @@ -216,7 +216,7 @@ void ClassViewPart::setupActions( ) } } -bool ClassViewPart::langHasFeature(TDevLanguageSupport::Features feature) +bool ClassViewPart::langHasFeature(KDevLanguageSupport::Features feature) { bool result = false; if (languageSupport()) diff --git a/parts/classview/classviewpart.h b/parts/classview/classviewpart.h index 70d00cc9..16e18def 100644 --- a/parts/classview/classviewpart.h +++ b/parts/classview/classviewpart.h @@ -18,16 +18,16 @@ * */ -#ifndef __TDEVPART_CLASSVIEW_H__ -#define __TDEVPART_CLASSVIEW_H__ +#ifndef __KDEVPART_CLASSVIEW_H__ +#define __KDEVPART_CLASSVIEW_H__ -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include "viewcombos.h" #include #include -#include +#include #include #include @@ -52,7 +52,7 @@ class TDEToolBarPopupAction; class NamespaceItem; class Navigator; class HierarchyDialog; -class ClassViewPart : public Extensions::TDevCodeBrowserFrontend +class ClassViewPart : public Extensions::KDevCodeBrowserFrontend { Q_OBJECT @@ -60,7 +60,7 @@ public: ClassViewPart(TQObject *parent, const char *name, const TQStringList &); virtual ~ClassViewPart(); - bool langHasFeature(TDevLanguageSupport::Features feature); + bool langHasFeature(KDevLanguageSupport::Features feature); TDEListViewAction *m_functionsnav; Navigator *navigator; diff --git a/parts/classview/classviewwidget.cpp b/parts/classview/classviewwidget.cpp index cede06f3..22b865ef 100644 --- a/parts/classview/classviewwidget.cpp +++ b/parts/classview/classviewwidget.cpp @@ -31,10 +31,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -252,7 +252,7 @@ void ClassViewWidget::insertFile( const TQString& fileName ) } break; - case TDevelop2ViewMode: + case KDevelop2ViewMode: { } break; @@ -293,7 +293,7 @@ void ClassViewWidget::removeFile( const TQString& fileName ) } break; - case TDevelop2ViewMode: + case KDevelop2ViewMode: { } break; @@ -332,19 +332,19 @@ void ClassViewWidget::contentsContextMenuEvent( TQContextMenuEvent * ev ) bool sep = false; if( item && item->isClass() ){ - if( m_part->langHasFeature(TDevLanguageSupport::AddMethod) ) { + if( m_part->langHasFeature(KDevLanguageSupport::AddMethod) ) { m_actionAddMethod->plug( &menu ); sep = true; } - if( m_part->langHasFeature(TDevLanguageSupport::AddAttribute) ) { + if( m_part->langHasFeature(KDevLanguageSupport::AddAttribute) ) { m_actionAddAttribute->plug( &menu ); sep = true; } } if (item && item->isVariable()){ - if( m_part->langHasFeature(TDevLanguageSupport::CreateAccessMethods) ) + if( m_part->langHasFeature(KDevLanguageSupport::CreateAccessMethods) ) m_actionCreateAccessMethods->plug( &menu ); } @@ -1108,7 +1108,7 @@ TQString VariableDomBrowserItem::key( int , bool ) const void ClassViewWidget::slotNewClass( ) { - if( m_part->languageSupport()->features() & TDevLanguageSupport::NewClass ) + if( m_part->languageSupport()->features() & KDevLanguageSupport::NewClass ) m_part->languageSupport()->addClass(); } @@ -1116,7 +1116,7 @@ void ClassViewWidget::slotAddMethod( ) { if ( !selectedItem() ) return; - if( m_part->languageSupport()->features() & TDevLanguageSupport::AddMethod ) + if( m_part->languageSupport()->features() & KDevLanguageSupport::AddMethod ) m_part->languageSupport()->addMethod( static_cast( selectedItem() )->dom() ); } @@ -1124,7 +1124,7 @@ void ClassViewWidget::slotAddAttribute( ) { if ( !selectedItem() ) return; - if( m_part->languageSupport()->features() & TDevLanguageSupport::AddAttribute ) + if( m_part->languageSupport()->features() & KDevLanguageSupport::AddAttribute ) m_part->languageSupport()->addAttribute( static_cast( selectedItem() )->dom() ); } @@ -1271,7 +1271,7 @@ void ClassViewWidget::slotCreateAccessMethods( ) { if ( !selectedItem() ) return; - if( m_part->languageSupport()->features() & TDevLanguageSupport::CreateAccessMethods ) + if( m_part->languageSupport()->features() & KDevLanguageSupport::CreateAccessMethods ) { VariableDomBrowserItem* item = dynamic_cast( selectedItem() ); if (item == 0) diff --git a/parts/classview/classviewwidget.h b/parts/classview/classviewwidget.h index 1d17efec..d74448f5 100644 --- a/parts/classview/classviewwidget.h +++ b/parts/classview/classviewwidget.h @@ -31,7 +31,7 @@ #include #include -class TDevProject; +class KDevProject; class ClassViewPart; class ClassViewItem; class FolderBrowserItem; @@ -51,7 +51,7 @@ public: enum ViewMode { KDevelop3ViewMode = 0, - TDevelop2ViewMode, + KDevelop2ViewMode, JavaLikeViewMode }; diff --git a/parts/classview/hierarchydlg.cpp b/parts/classview/hierarchydlg.cpp index 6901926b..c8761861 100644 --- a/parts/classview/hierarchydlg.cpp +++ b/parts/classview/hierarchydlg.cpp @@ -28,7 +28,7 @@ #include #include -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include "kcomboview.h" #include "classviewpart.h" @@ -105,7 +105,7 @@ void HierarchyDialog::save() { TQFileInfo fi(dlg.selectedURL().pathOrURL()); TQApplication::setOverrideCursor( TQt::waitCursor ); - TDevLanguageSupport *ls = m_part->languageSupport(); + KDevLanguageSupport *ls = m_part->languageSupport(); for (TQMap::const_iterator it = classes.begin(); it != classes.end(); ++it) { kdDebug(9003) << "Adding class to graph: " << it.key() << endl; @@ -134,7 +134,7 @@ void HierarchyDialog::refresh() ViewCombosOp::refreshNamespaces(m_part, namespace_combo); processNamespace("", m_part->codeModel()->globalNamespace()); - TDevLanguageSupport *ls = m_part->languageSupport(); + KDevLanguageSupport *ls = m_part->languageSupport(); for (TQMap::const_iterator it = classes.begin(); it != classes.end(); ++it) { @@ -154,7 +154,7 @@ void HierarchyDialog::refresh() digraph->process(); } -void HierarchyDialog::setLanguageSupport(TDevLanguageSupport *ls) +void HierarchyDialog::setLanguageSupport(KDevLanguageSupport *ls) { if (ls) connect(ls, TQT_SIGNAL(updatedSourceInfo()), this, TQT_SLOT(refresh())); @@ -169,7 +169,7 @@ void HierarchyDialog::slotClassComboChoice(TQListViewItem * item) if (!ci) return; - TDevLanguageSupport *ls = m_part->languageSupport(); + KDevLanguageSupport *ls = m_part->languageSupport(); TQString className = ls->formatClassName(uclasses[item->text(0)]); digraph->setSelected(className); @@ -188,7 +188,7 @@ void HierarchyDialog::slotClassComboChoice( const TQString& itemText ) if (!ci) return; - TDevLanguageSupport *ls = m_part->languageSupport(); + KDevLanguageSupport *ls = m_part->languageSupport(); TQString className = ls->formatClassName(uclasses[item->text(0)]); digraph->setSelected(className); @@ -205,10 +205,10 @@ void HierarchyDialog::classSelected(const TQString &/*className*/) /* ParsedClass *currentClass = m_part->classStore()->getClassByName(className); member_tree->clear(); if (currentClass) { - TDevLanguageSupport::Features features = m_part->languageSupport()->features(); - if (features & TDevLanguageSupport::Functions) + KDevLanguageSupport::Features features = m_part->languageSupport()->features(); + if (features & KDevLanguageSupport::Functions) member_tree->insertAllClassMethods(currentClass, (PIAccess)-1); - if (features & TDevLanguageSupport::Variables) + if (features & KDevLanguageSupport::Variables) member_tree->insertAllClassAttributes(currentClass, (PIAccess)-1); }*/ } diff --git a/parts/classview/hierarchydlg.h b/parts/classview/hierarchydlg.h index 9d26ebd0..1c41a8f0 100644 --- a/parts/classview/hierarchydlg.h +++ b/parts/classview/hierarchydlg.h @@ -17,7 +17,7 @@ #include "codemodel.h" class ClassViewPart; -class TDevLanguageSupport; +class KDevLanguageSupport; class DigraphView; class ClassToolWidget; class KComboView; @@ -35,7 +35,7 @@ public slots: void refresh(); private slots: - void setLanguageSupport(TDevLanguageSupport *ls); + void setLanguageSupport(KDevLanguageSupport *ls); void slotClassComboChoice(TQListViewItem *item); void slotNamespaceComboChoice(TQListViewItem *item); void slotClassComboChoice(const TQString&); diff --git a/parts/classview/kdevclassview.desktop b/parts/classview/kdevclassview.desktop new file mode 100644 index 00000000..49bfa43c --- /dev/null +++ b/parts/classview/kdevclassview.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin displays a graphical view of all the classes in the project, complete with methods and attributes, and provides a way of direct source navigation. +Comment[ca]=Aquest connector mostra una vista gràfica de totes les classes del projecte, completant-lo amb mètodes i atributs, i proporciona una forma de navegar directament a través del codi font. +Comment[da]=Dette plugin giver en grafisk visning af alle klasserne i projektet, fuldstændig med metoder og attributter og sørger for en måde at have direkte kildenavigation. +Comment[de]=Dieses Modul zeigt eine grafische Ansicht aller Klassen im Projekt, einschließlich der Methoden und Attribute und ermöglicht die Navigation in den betreffenden Quelltexten. +Comment[el]=Αυτό το πρόσθετο εμφανίζει μια γραφική προβολή όλων των κλάσεων του έργου, πλήρης με μεθόδους και χαρακτηριστικά, και προσφέρει μια μέθοδο απευθείας πλοήγησης στον κώδικα. +Comment[es]=Este complemento muestra una vista gráfica de todas las clases del proyecto, completándolo con métodos y atributos, y proporciona una forma de navegar directamente por el código fuente. +Comment[et]=See plugin näitab graafiliselt kõiki projekti klasse koos meetodite ja atribuutidega ning võimaldab nende vahel kiiresti liikuda. +Comment[eu]=Plugin honek proiektuak dituen klase guztien ikuspegi grafiko bat bistaratzen du, metodo eta atributuekin osatuta, eta iturburuen arteko nabigazio zuzena eskeintzen du. +Comment[fa]=این وصله یک نمای نگاره‌ای از همۀ رده‌ها در پروژه را نمایش می‌دهد، با روشها و ویژگیها کامل می‌کند و یک راه ناوش مستقیم منبع فراهم می‌کند. +Comment[fr]=Ce module externe affiche une vue graphique de toutes les classes dans le projet, la complète avec des méthodes et des attributs, et offre un moyen de naviguer directement dans le source. +Comment[gl]=Esta extensión mostra unha vista gráfica de tódalas clases do proxecto, cos métodos e os atributos, e proporciona unha maneira para navegar o código directamente. +Comment[hu]=Bővítőmodul egy projekt osztályainak áttekintéséhez, a tagfüggvényekkel és az attribútumokkal együtt, navigálási lehetőséggel +Comment[it]=Questo plugin offre una rappresentazione grafica di tutte le classi nel progetto, complete con metodi e attributi, e fornisce un modo per la navigazione diretta nei sorgenti. +Comment[ja]=このプラグインは、プロジェクトの中のすべてのクラスを視覚的に表示します。また、メソッドや属性を補完し、直接的なソース操作を提供します。 +Comment[ms]=Plugin ini memaparkan paparan bergrafik bagi semua kelas dalam projek, lengkap dengan kaedah dan ciri, dan menyediakan kaedah kemudian sumber secara terus. +Comment[nds]=Dit Moduul wiest en graafsch Ansicht vun all Klassen vun en Projekt, komplett mit Metoden un Attributen, un stellt dat Stüern binnen de Borntexten praat. +Comment[ne]=यो प्लगइनले विधि र विशेषतासँग परियोजनामा सबै कक्षको ग्राफिकल दृश्य प्रर्दशन गर्दछ र प्रत्यक्ष स्रोत नेभिगेसनको उपाय प्रदान गर्दछ । +Comment[nl]=Deze plugin toont een grafische weergave van alle klassen in een project, compleet met methoden en attributen, en biedt directe navigatie hiertussen. +Comment[pl]=Ta wtyczka pokazuje graficzny widok wszystkich klas w projekcie z metodami i atrybutami oraz umożliwia bezpośrednią nawigację w kodzie źródłowym.. +Comment[pt]=Este 'plugin' mostra uma vista gráfica de todas as classes no projecto, completas com os métodos e atributos, oferecendo uma forma de navegação directa sobre o código. +Comment[pt_BR]=Este plug-in exibe uma visão gráfica de todas as classes no projeto, juntamente com métodos e atributos, e fornece uma maneira de navegar diretamente no código. +Comment[ru]=Этот модуль показывает список классов в проекте, включая методы и атрибуты, а также предоставляет возможности навигации по коду. +Comment[sk]=Modul zobrazí grafický pohľad na triedy v projekte, spolu s metódami a atribútmi, a umožní priamy prístup k zdrojovému kódu. +Comment[sr]=Овај прикључак приказује графички изглед свих класа у пројекту, заједно са методама и атрибутима, и обезбеђује начин директне навигације кроз изворни кôд. +Comment[sr@Latn]=Ovaj priključak prikazuje grafički izgled svih klasa u projektu, zajedno sa metodama i atributima, i obezbeđuje način direktne navigacije kroz izvorni kôd. +Comment[sv]=Insticksprogrammet visar en grafisk bild av alla klasser i ett projekt, tillsammans med metoder och egenskaper, och ger möjlighet till direkt navigering i källkoden. +Comment[ta]=இந்த சொருகி திட்டப்பணியில் உள்ள வகுப்புகளின், முறைகள் மற்றும் பண்புகளை உங்களுக்கு வரைகலை பார்வையில் அளிக்கும்,மற்றும் மூலத்தை வழி செலுத்த இது நேர்வழி அளிக்கும். +Comment[tg]=Ин модул рӯйхати синфҳоро дар лоиҳа намоиш медиҳад, ва боз методҳо ва атрибутҳо ва боз ҳам имкони кодро роҳ медиҳад. +Comment[tr]=Bu eklenti projedeki sınıfların bütün yöntem ve öznitelikleri ile grafiksel bir görünümü gösterir ve doğrudan kaynak dolaşımını sağlar. +Comment[zh_CN]=这个插件以图形显示工程中所有的类,包括完整的方法和属性,并提供浏览源文件的方法。 +Comment[zh_TW]=這個外掛程式顯示專案中所有類別、完整方法與屬性的圖形檢視,並提供源碼導覽。 +Name=KDevClassView +Name[da]=TDevelop klassevisning +Name[de]=Klassenansicht (TDevelop) +Name[hi]=के-डेव-क्लॉस-व्यू +Name[nds]=KlassKieker (TDevelop) +Name[pl]=KDevWidokKlas +Name[sk]=KDev pohľad na triedy +Name[sv]=TDevelop klassvisning +Name[tg]=Намоиши снфи KDev +Name[zh_TW]=TDevelop 類別檢視 +GenericName=Class View +GenericName[ca]=Visor de classes +GenericName[da]=Klassevisning +GenericName[de]=Klassenansicht +GenericName[el]=Προβολή κλάσεων +GenericName[es]=Visor de clases +GenericName[et]=Klasside vaade +GenericName[eu]=Klase ikuspegia +GenericName[fa]=نمای رده +GenericName[fr]=Vue des classes +GenericName[gl]=Vista de clases +GenericName[hi]=क्लॉस व्यू +GenericName[hu]=Osztálynézegető +GenericName[it]=Visualizza classe +GenericName[ja]=クラスビュー +GenericName[ms]=Paparan Kelas +GenericName[nds]=Klasskieker +GenericName[ne]=कक्ष दृश्य +GenericName[nl]=Klassenweergave +GenericName[pl]=Widok klas +GenericName[pt]=Vista de Classe +GenericName[pt_BR]=Visualizador de Classe +GenericName[ru]=Просмотр классов +GenericName[sk]=Pohľad na triedy +GenericName[sl]=Prikaz razreda +GenericName[sr]=Преглед класа +GenericName[sr@Latn]=Pregled klasa +GenericName[sv]=Klassvisning +GenericName[ta]=வகுப்புக்காட்சி +GenericName[tg]=Намоиши синфҳо +GenericName[tr]=Sınıf Görünümü +GenericName[zh_CN]=类查看器 +GenericName[zh_TW]=類別檢視 +ServiceTypes=TDevelop/CodeBrowserFrontend +X-TDE-Library=libkdevclassview +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=CodeNavigation diff --git a/parts/classview/kdevclassview.rc b/parts/classview/kdevclassview.rc new file mode 100644 index 00000000..b5f7a9fb --- /dev/null +++ b/parts/classview/kdevclassview.rc @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + Browser Toolbar + + + + + + diff --git a/parts/classview/navigator.cpp b/parts/classview/navigator.cpp index a7e3ac85..694aa0d4 100644 --- a/parts/classview/navigator.cpp +++ b/parts/classview/navigator.cpp @@ -31,9 +31,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include "classviewpart.h" #include "classviewwidget.h" diff --git a/parts/classview/tdevclassview.desktop b/parts/classview/tdevclassview.desktop deleted file mode 100644 index 10200b50..00000000 --- a/parts/classview/tdevclassview.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin displays a graphical view of all the classes in the project, complete with methods and attributes, and provides a way of direct source navigation. -Comment[ca]=Aquest connector mostra una vista gràfica de totes les classes del projecte, completant-lo amb mètodes i atributs, i proporciona una forma de navegar directament a través del codi font. -Comment[da]=Dette plugin giver en grafisk visning af alle klasserne i projektet, fuldstændig med metoder og attributter og sørger for en måde at have direkte kildenavigation. -Comment[de]=Dieses Modul zeigt eine grafische Ansicht aller Klassen im Projekt, einschließlich der Methoden und Attribute und ermöglicht die Navigation in den betreffenden Quelltexten. -Comment[el]=Αυτό το πρόσθετο εμφανίζει μια γραφική προβολή όλων των κλάσεων του έργου, πλήρης με μεθόδους και χαρακτηριστικά, και προσφέρει μια μέθοδο απευθείας πλοήγησης στον κώδικα. -Comment[es]=Este complemento muestra una vista gráfica de todas las clases del proyecto, completándolo con métodos y atributos, y proporciona una forma de navegar directamente por el código fuente. -Comment[et]=See plugin näitab graafiliselt kõiki projekti klasse koos meetodite ja atribuutidega ning võimaldab nende vahel kiiresti liikuda. -Comment[eu]=Plugin honek proiektuak dituen klase guztien ikuspegi grafiko bat bistaratzen du, metodo eta atributuekin osatuta, eta iturburuen arteko nabigazio zuzena eskeintzen du. -Comment[fa]=این وصله یک نمای نگاره‌ای از همۀ رده‌ها در پروژه را نمایش می‌دهد، با روشها و ویژگیها کامل می‌کند و یک راه ناوش مستقیم منبع فراهم می‌کند. -Comment[fr]=Ce module externe affiche une vue graphique de toutes les classes dans le projet, la complète avec des méthodes et des attributs, et offre un moyen de naviguer directement dans le source. -Comment[gl]=Esta extensión mostra unha vista gráfica de tódalas clases do proxecto, cos métodos e os atributos, e proporciona unha maneira para navegar o código directamente. -Comment[hu]=Bővítőmodul egy projekt osztályainak áttekintéséhez, a tagfüggvényekkel és az attribútumokkal együtt, navigálási lehetőséggel -Comment[it]=Questo plugin offre una rappresentazione grafica di tutte le classi nel progetto, complete con metodi e attributi, e fornisce un modo per la navigazione diretta nei sorgenti. -Comment[ja]=このプラグインは、プロジェクトの中のすべてのクラスを視覚的に表示します。また、メソッドや属性を補完し、直接的なソース操作を提供します。 -Comment[ms]=Plugin ini memaparkan paparan bergrafik bagi semua kelas dalam projek, lengkap dengan kaedah dan ciri, dan menyediakan kaedah kemudian sumber secara terus. -Comment[nds]=Dit Moduul wiest en graafsch Ansicht vun all Klassen vun en Projekt, komplett mit Metoden un Attributen, un stellt dat Stüern binnen de Borntexten praat. -Comment[ne]=यो प्लगइनले विधि र विशेषतासँग परियोजनामा सबै कक्षको ग्राफिकल दृश्य प्रर्दशन गर्दछ र प्रत्यक्ष स्रोत नेभिगेसनको उपाय प्रदान गर्दछ । -Comment[nl]=Deze plugin toont een grafische weergave van alle klassen in een project, compleet met methoden en attributen, en biedt directe navigatie hiertussen. -Comment[pl]=Ta wtyczka pokazuje graficzny widok wszystkich klas w projekcie z metodami i atrybutami oraz umożliwia bezpośrednią nawigację w kodzie źródłowym.. -Comment[pt]=Este 'plugin' mostra uma vista gráfica de todas as classes no projecto, completas com os métodos e atributos, oferecendo uma forma de navegação directa sobre o código. -Comment[pt_BR]=Este plug-in exibe uma visão gráfica de todas as classes no projeto, juntamente com métodos e atributos, e fornece uma maneira de navegar diretamente no código. -Comment[ru]=Этот модуль показывает список классов в проекте, включая методы и атрибуты, а также предоставляет возможности навигации по коду. -Comment[sk]=Modul zobrazí grafický pohľad na triedy v projekte, spolu s metódami a atribútmi, a umožní priamy prístup k zdrojovému kódu. -Comment[sr]=Овај прикључак приказује графички изглед свих класа у пројекту, заједно са методама и атрибутима, и обезбеђује начин директне навигације кроз изворни кôд. -Comment[sr@Latn]=Ovaj priključak prikazuje grafički izgled svih klasa u projektu, zajedno sa metodama i atributima, i obezbeđuje način direktne navigacije kroz izvorni kôd. -Comment[sv]=Insticksprogrammet visar en grafisk bild av alla klasser i ett projekt, tillsammans med metoder och egenskaper, och ger möjlighet till direkt navigering i källkoden. -Comment[ta]=இந்த சொருகி திட்டப்பணியில் உள்ள வகுப்புகளின், முறைகள் மற்றும் பண்புகளை உங்களுக்கு வரைகலை பார்வையில் அளிக்கும்,மற்றும் மூலத்தை வழி செலுத்த இது நேர்வழி அளிக்கும். -Comment[tg]=Ин модул рӯйхати синфҳоро дар лоиҳа намоиш медиҳад, ва боз методҳо ва атрибутҳо ва боз ҳам имкони кодро роҳ медиҳад. -Comment[tr]=Bu eklenti projedeki sınıfların bütün yöntem ve öznitelikleri ile grafiksel bir görünümü gösterir ve doğrudan kaynak dolaşımını sağlar. -Comment[zh_CN]=这个插件以图形显示工程中所有的类,包括完整的方法和属性,并提供浏览源文件的方法。 -Comment[zh_TW]=這個外掛程式顯示專案中所有類別、完整方法與屬性的圖形檢視,並提供源碼導覽。 -Name=KDevClassView -Name[da]=TDevelop klassevisning -Name[de]=Klassenansicht (TDevelop) -Name[hi]=के-डेव-क्लॉस-व्यू -Name[nds]=KlassKieker (TDevelop) -Name[pl]=KDevWidokKlas -Name[sk]=KDev pohľad na triedy -Name[sv]=TDevelop klassvisning -Name[tg]=Намоиши снфи KDev -Name[zh_TW]=TDevelop 類別檢視 -GenericName=Class View -GenericName[ca]=Visor de classes -GenericName[da]=Klassevisning -GenericName[de]=Klassenansicht -GenericName[el]=Προβολή κλάσεων -GenericName[es]=Visor de clases -GenericName[et]=Klasside vaade -GenericName[eu]=Klase ikuspegia -GenericName[fa]=نمای رده -GenericName[fr]=Vue des classes -GenericName[gl]=Vista de clases -GenericName[hi]=क्लॉस व्यू -GenericName[hu]=Osztálynézegető -GenericName[it]=Visualizza classe -GenericName[ja]=クラスビュー -GenericName[ms]=Paparan Kelas -GenericName[nds]=Klasskieker -GenericName[ne]=कक्ष दृश्य -GenericName[nl]=Klassenweergave -GenericName[pl]=Widok klas -GenericName[pt]=Vista de Classe -GenericName[pt_BR]=Visualizador de Classe -GenericName[ru]=Просмотр классов -GenericName[sk]=Pohľad na triedy -GenericName[sl]=Prikaz razreda -GenericName[sr]=Преглед класа -GenericName[sr@Latn]=Pregled klasa -GenericName[sv]=Klassvisning -GenericName[ta]=வகுப்புக்காட்சி -GenericName[tg]=Намоиши синфҳо -GenericName[tr]=Sınıf Görünümü -GenericName[zh_CN]=类查看器 -GenericName[zh_TW]=類別檢視 -ServiceTypes=TDevelop/CodeBrowserFrontend -X-TDE-Library=libtdevclassview -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=CodeNavigation diff --git a/parts/classview/tdevclassview.rc b/parts/classview/tdevclassview.rc deleted file mode 100644 index b5f7a9fb..00000000 --- a/parts/classview/tdevclassview.rc +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - Browser Toolbar - - - - - - diff --git a/parts/ctags2/CMakeLists.txt b/parts/ctags2/CMakeLists.txt index a88415d6..a8f4b582 100644 --- a/parts/ctags2/CMakeLists.txt +++ b/parts/ctags2/CMakeLists.txt @@ -27,13 +27,13 @@ link_directories( ##### other data ################################ -install( FILES tdevctags2.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_ctags2.rc DESTINATION ${DATA_INSTALL_DIR}/tdevctags2 ) +install( FILES kdevctags2.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_ctags2.rc DESTINATION ${DATA_INSTALL_DIR}/kdevctags2 ) -##### libtdevctags2 (module) #################### +##### libkdevctags2 (module) #################### -tde_add_kpart( libtdevctags2 AUTOMOC +tde_add_kpart( libkdevctags2 AUTOMOC SOURCES ctags2_part.cpp readtags.c ctags2_widgetbase.ui ctags2_widget.cpp tags.cpp ctagskinds.cpp diff --git a/parts/ctags2/Makefile.am b/parts/ctags2/Makefile.am index f12fdada..f92a819c 100644 --- a/parts/ctags2/Makefile.am +++ b/parts/ctags2/Makefile.am @@ -1,11 +1,11 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevctags2.la -libtdevctags2_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevctags2_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevctags2.la +libkdevctags2_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevctags2_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevctags2_la_SOURCES = ctags2_part.cpp readtags.c ctags2_widgetbase.ui \ +libkdevctags2_la_SOURCES = ctags2_part.cpp readtags.c ctags2_widgetbase.ui \ ctags2_widget.cpp tags.cpp ctagskinds.cpp ctags2_settingswidgetbase.ui \ ctags2_settingswidget.cpp ctags2_selecttagfilebase.ui ctags2_selecttagfile.cpp \ ctags2_createtagfilebase.ui ctags2_createtagfile.cpp @@ -13,10 +13,10 @@ libtdevctags2_la_SOURCES = ctags2_part.cpp readtags.c ctags2_widgetbase.ui \ METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevctags2.desktop +service_DATA = kdevctags2.desktop -rc_DATA = tdevpart_ctags2.rc -rcdir = $(kde_datadir)/tdevctags2 +rc_DATA = kdevpart_ctags2.rc +rcdir = $(kde_datadir)/kdevctags2 noinst_HEADERS = ctags2_widget.h tags.h readtags.h ctagskinds.h \ ctags2_settingswidget.h diff --git a/parts/ctags2/ctags2_part.cpp b/parts/ctags2/ctags2_part.cpp index 371ff7e5..324ded8a 100644 --- a/parts/ctags2/ctags2_part.cpp +++ b/parts/ctags2/ctags2_part.cpp @@ -31,16 +31,16 @@ #include #include -#include "tdevappfrontend.h" -#include -#include -#include -#include -#include -#include +#include "kdevappfrontend.h" +#include +#include +#include +#include +#include +#include #include "configwidgetproxy.h" #include "domutil.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" #include "ctags2_settingswidget.h" #include "ctags2_widget.h" @@ -54,15 +54,15 @@ namespace ctags #include "readtags.h" } -typedef TDevGenericFactory CTags2Factory; -static const TDevPluginInfo data("tdevctags2"); -K_EXPORT_COMPONENT_FACTORY( libtdevctags2, CTags2Factory( data ) ) +typedef KDevGenericFactory CTags2Factory; +static const KDevPluginInfo data("kdevctags2"); +K_EXPORT_COMPONENT_FACTORY( libkdevctags2, CTags2Factory( data ) ) CTags2Part::CTags2Part(TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin(&data, parent, name ? name : "ctags2Part" ) + : KDevPlugin(&data, parent, name ? name : "ctags2Part" ) { setInstance(CTags2Factory::instance()); - setXMLFile("tdevpart_ctags2.rc"); + setXMLFile("kdevpart_ctags2.rc"); TQDomDocument & dom = *projectDom(); TQString customTagFile = DomUtil::readEntry( dom, "/ctagspart/customTagfilePath" ); @@ -164,7 +164,7 @@ bool CTags2Part::createTagsFile(const TQString& tagFile, const TQString& dir) commandline += " "; commandline += dir; - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(dir, commandline, false); return true; @@ -330,7 +330,7 @@ int CTags2Part::getFileLineFromPattern( KURL const & url, TQString const & patte void CTags2Part::slotLookupDeclaration( ) { - m_contextString = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + m_contextString = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( !m_contextString.isEmpty() ) { slotGotoDeclaration(); @@ -339,7 +339,7 @@ void CTags2Part::slotLookupDeclaration( ) void CTags2Part::slotLookupDefinition( ) { - m_contextString = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + m_contextString = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( !m_contextString.isEmpty() ) { slotGotoDefinition(); @@ -348,7 +348,7 @@ void CTags2Part::slotLookupDefinition( ) void CTags2Part::slotLookup( ) { - m_contextString = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + m_contextString = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( !m_contextString.isEmpty() ) { slotGotoTag(); diff --git a/parts/ctags2/ctags2_part.h b/parts/ctags2/ctags2_part.h index ca33e801..93af5f7f 100644 --- a/parts/ctags2/ctags2_part.h +++ b/parts/ctags2/ctags2_part.h @@ -9,13 +9,13 @@ * * ***************************************************************************/ -#ifndef __TDEVPART_CTAGS2_H__ -#define __TDEVPART_CTAGS2_H__ +#ifndef __KDEVPART_CTAGS2_H__ +#define __KDEVPART_CTAGS2_H__ #include #include -#include +#include #include "tags.h" class TQPopupMenu; @@ -26,7 +26,7 @@ class CTags2Widget; class ConfigWidgetProxy; class KDialogBase; -class CTags2Part : public TDevPlugin +class CTags2Part : public KDevPlugin { Q_OBJECT diff --git a/parts/ctags2/ctags2_settingswidget.cpp b/parts/ctags2/ctags2_settingswidget.cpp index c44f91d6..b45a41be 100644 --- a/parts/ctags2/ctags2_settingswidget.cpp +++ b/parts/ctags2/ctags2_settingswidget.cpp @@ -15,13 +15,13 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include "ctags2_settingswidget.h" diff --git a/parts/ctags2/ctags2_widget.cpp b/parts/ctags2/ctags2_widget.cpp index cb44937d..bd1b138d 100644 --- a/parts/ctags2/ctags2_widget.cpp +++ b/parts/ctags2/ctags2_widget.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include "ctags2_widget.h" #include "tags.h" diff --git a/parts/ctags2/kdevctags2.desktop b/parts/ctags2/kdevctags2.desktop new file mode 100644 index 00000000..db79f503 --- /dev/null +++ b/parts/ctags2/kdevctags2.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Icon=tdevelop +Comment=CTags is a source navigation tool with support for many languages. When loaded it provides a context menu for finding type declarations/definitions and also a query dialog. http://ctags.sourceforge.net/ +Comment[ca]=CTags és una eina de navegació de codi font amb suport per a diversos llenguatges. En carregar-se proporciona un menú de context per a localitzar les declaracions/definicions de tipus i també un diàleg de consultes. http://ctags.sourceforge.net/ +Comment[da]=CTags er et kildenavigationsværktøj med støtte for mange sprog. Når det er indlæst sørger det for en sammenhængsmenu til at finde type-deklarationer/definitioner og også en forespørgselsdialog. http://ctags.sourceforge.net/ +Comment[de]=CTags ist ein Navigationswerkzeug, das viele Sprachen unterstützt. Ist es geladen, bietet es ein Kontextmenü zum Suchen von Typ-Deklarationen und -Definitionen und einen Abfragedialog im Menü "Werkzeuge". http://ctags.sourceforge.net/ +Comment[el]=Το CTags είναι ένα εργαλείο πλοήγησης κώδικα με υποστήριξη πολλών γλωσσών. Όταν φορτωθεί προσφέρει ένα σχετικό μενού εύρεσης δηλώσεων/ορισμών τύπων και ένα διάλογο αναζήτησης. http://ctags.sourceforge.net/ +Comment[en_GB]=CTags is a source navigation tool with support for many languages. When loaded it provides a context menu for finding type declarations/definitions and also a query dialogue. http://ctags.sourceforge.net/ +Comment[es]=CTags es una herramienta de navegación del código fuente con soporte para varios lenguajes. Al cargarse, proporciona un menú contextual para localizar las declaraciones/definiciones de tipos y también un diálogo de consultas. http://ctags.sourceforge.net/ +Comment[et]=CTags on liikumisvahend paljude keelte toega. Laadimisel pakub see kontekstimenüüd deklaratsioonide/definitsioonide tüübi leidmiseks, samuti päringudialoogi tööriistade menüü vahendusel. Vaata internetis http://ctags.sourceforge.net/ +Comment[eu]=CTags hizkuntza askotako euskarria duen iturburu nabigazio tresna bat da. Kargatzean mota deklarazio/definizioak aurkitzeko testuinguru menu bat eskeintzen du eta baita kontsulta elkarrizketa-koadro bat ere Tresnak menuan.http://ctags.sourceforge.net/ +Comment[fa]=CTags یک ابزار ناوش منبع با پشتیبانی از زبانهای زیادی است. در هنگام بارگذاری، یک گزینگان متن برای یافتن تعاریف/اعلانهای نوع و همچنین یک محاورۀ پرس‌وجو فراهم می‌کند. http://ctags.sourceforge.net/ +Comment[fr]=CTags est un outil de navigation dans les sources comprenant une prise en charge pour de nombreux langages. Une fois chargé, il fournit un menu contextuel pour la recherche de déclarations / définitions de types, ainsi qu'une boîte de dialogue de requête. http://ctags.sourceforge.net/ +Comment[gl]=CTags é unha ferramenta para a navegación de código con soporte para moitas linguaxes. Cando se carga proporciona un menú contextual para atopar declaracións/definicións de tipos e tamén un diálogo de peticións. http://ctags.sourceforge.net/ +Comment[hu]=A CTags egy többféle nyelvet is támogató forrásnavigációs eszköz. Lehetővé teszi felbukkanó menüből típusdeklarációk és -megvalósítások keresését, lekérdezését. http://ctags.sourceforge.net/ +Comment[it]=CTags è uno strumento per la navigazione nel codice sorgente con supporto per molti linguaggi. Quando caricato offre un menu contestuale per ricercare i tipi di dichiarazioni/definizioni e anche una finestra per compiere interrogazioni. http://ctags.sourceforge.net/ +Comment[ja]=CTags は色々な言語をサポートしたソースナビゲーションツールです。読み込まれると、型の宣言や定義を見つけたり、ツールメニューの中で対話的な問い合わせを行うコンテキストメニューを提供します。http://ctags.sourceforge.net/ +Comment[ms]=CTags adalah alatan pengemudi sumber dengan sokongan untuk banyak bahasa. Apabila dimuatkan ia menyediakan menu konteks untuk mencari pengisytiharan/definisi dan juga dialog pertanyaan. http://ctags.sourceforge.net/ +Comment[nds]=CTags is en Navigatschoonwarktüüch, wat vele Spraken ünnerstütt. Wenn dat laadt is, stellt dat en Rechtsklickmenü för't Söken na Typ-Deklaratschonen un -Definitschonen praat, un ok noch en Affraagdialoog. http://ctags.sourceforge.net/ +Comment[ne]=CTags स्रोत नेभिगेसन उपकरण हो जसले धेरै भाषा समर्थन गर्दछ । लोड गरेपछि यसले टाइप घोषणा/परिभाषा र क्वेरी संवाद पनि फेला पार्नका लागि प्रसङ्ग मेनु प्रदान गर्दछ । http://ctags.sourceforge.net/ +Comment[nl]=CTags is een krachtige tool voor het navigeren in broncode met ondersteuning voor veel talen. Wanneer de plugin geladen is biedt deze een contextmenu voor het vinden van typedeclaraties, en ook een ondervragingsdialoog. Web: http://ctags.sourceforge.net/ +Comment[pl]=CTags to narzędzie do nawigacji w kodzie źródłowym obsługujące wiele języków. Po wczytaniu udostępnia menu kontekstowe pozwalające znajdować deklaracje/definicje oraz okno dialogowe w menu Narzędzia. http://ctags.sourceforge.net/ +Comment[pt]=O CTags é uma ferramenta de navegação no código com suporte para várias linguagens. Quando é carregado, oferece um menu de contexto para encontrar as declarações/definições de tipos, assim como uma janela de pesquisa. http://ctags.sourceforge.net/ +Comment[pt_BR]=CTags é uma ferramenta de navegação de código com suporte para muitas linguagens. Quando carregada ela oferece um menu de contexto para encontrar declarações/definições de tipo e também um diálogo de consulta no menu Ferramentas. http://ctags.sourceforge.net/ +Comment[ru]=CTags - это средство навигации по коду, поддерживающее многие языки. Будучи загружено, оно предоставляет контекстное меню для нахождения описания и определения типа выбранного символа, а также диалог запроса. http://ctags.sourceforge.net/ +Comment[sk]=CTags je navigačný nástroj pre zdrojový kód pre veľa jazykov.Po načítaní poskytuje kontextové menu pre hľadanie deklarácie/definície a tiež vyhľadávací dialóg. http://ctags.sourceforge.net/ +Comment[sr]=CTags је алат за навигацију кроз изворни кôд са подршком за многе језике. Када је учитан, обезбеђује контекстни мени за проналажење декларација/дефиниција типова, а такође и дијалог за упите. http://ctags.sourceforge.net/ +Comment[sr@Latn]=CTags je alat za navigaciju kroz izvorni kôd sa podrškom za mnoge jezike. Kada je učitan, obezbeđuje kontekstni meni za pronalaženje deklaracija/definicija tipova, a takođe i dijalog za upite. http://ctags.sourceforge.net/ +Comment[sv]=Ctags är ett verktyg för källkodsnavigering med stöd för många språk. När det laddats tillhandahåller det en sammanhangsberoende meny för att hitta typdeklarationer eller definitioner, och dessutom en frågedialogruta. http://ctags.sourceforge.net/ +Comment[ta]=Cதத்தல்கள் இது ஒரு மூல வழி செலுத்தும் கருவி இது நிறைய மொழிகளை ஆதரிக்கும். ஏற்றும் பொழுது எழுத்து உருவை காண உதவும் ஒரு பட்டியலும் மற்றும் கருவிப்பட்டியலில் கேள்வி உரையாடல்களும் இது அளிக்கும்.http://ctags.sourceforge.net/ +Comment[tg]=CTags-ин воситаи навигадсия дар код мебошад, ки бисёр забонҳоро дастрасӣ менамояд. Ҳангоми пурбор намудан, вай менюи қаринагинро пешниҳод менамояд, барои ёфтани тасвир ва муаян сохтани намуди нишонаҳои интихоб карда шуда ва боз гуфтугӯи дархостро мегузорад. http://ctags.sourceforge.net/ +Comment[tr]=CTags birçok dili destekleyen bir kaynak dolaşım aracıdır. Yüklendiğinde tip tanımlamalarını bulmayı sağlayan bir bağlam menüsü ve bir sorgu penceresi sunar. +Comment[zh_CN]=CTags 是一个支持多种语言源文件浏览的工具。启动后在上下文菜单中提供查找类型的声明/定义,并在工具菜单中提供查询对话框。http://ctags.sourceforge.net/ +Comment[zh_TW]=CTags 是支援許多種語言的程式源碼導覽工具。它載入後會提供一個選單,尋找型態的宣告、定義,並提供一個查詢對話框。http://ctags.sourceforge.net/ +Name=KDevCTags2 +Name[da]=TDevelop CTags2 +Name[nds]=TDevelop-CTags2 +Name[sk]=KDev CTags2 +Name[sv]=TDevelop ctags-2 +Name[tg]=KDevCТегҳо2 +Name[zh_TW]=TDevelop CTags2 +GenericName=CTags Frontend +GenericName[ca]=Entorn per a CTags +GenericName[da]=CTags-grænseflade +GenericName[de]=Unterstützung für CTags +GenericName[el]=Πρόγραμμα CTags +GenericName[es]=Entorno de CTags +GenericName[et]=CTagsi kasutajaliides +GenericName[eu]=CTags interfazea +GenericName[fa]=پایانۀ CTags +GenericName[fr]=Interface pour CTags +GenericName[ga]=Comhéadan CTags +GenericName[gl]=Frontal para CTags +GenericName[hi]=सी-टैग्स-फ्रन्टएन्ड +GenericName[hu]=CTags-kezelő +GenericName[it]=Interfaccia a CTags +GenericName[ja]=CTags フロントエンド +GenericName[ms]=Antaradepan CTags +GenericName[nds]=CTags-Böversiet +GenericName[ne]=CTags फ्रेन्टइन्ड +GenericName[nl]=Frontend voor CTags +GenericName[pl]=Interfejs do CTags +GenericName[pt]=Interface de CTags +GenericName[pt_BR]=Interface do CTags +GenericName[ru]=Интерфейс к CTags +GenericName[sk]=CTags rozhranie +GenericName[sl]=Vmesnik za CTags +GenericName[sr]=Интерфејс CTags-а +GenericName[sr@Latn]=Interfejs CTags-a +GenericName[sv]=Ctags-gränssnitt +GenericName[ta]=CTags முன்பகுதி +GenericName[tg]=Интерфейс дар CTags +GenericName[tr]=CTags Önucu +GenericName[zh_CN]=CTags前端 +GenericName[zh_TW]=CTags 前端介面 +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Project +X-TDE-Library=libkdevctags2 +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeNavigation diff --git a/parts/ctags2/kdevpart_ctags2.rc b/parts/ctags2/kdevpart_ctags2.rc new file mode 100644 index 00000000..e8745b3b --- /dev/null +++ b/parts/ctags2/kdevpart_ctags2.rc @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/parts/ctags2/tdevctags2.desktop b/parts/ctags2/tdevctags2.desktop deleted file mode 100644 index 86720c8e..00000000 --- a/parts/ctags2/tdevctags2.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Icon=tdevelop -Comment=CTags is a source navigation tool with support for many languages. When loaded it provides a context menu for finding type declarations/definitions and also a query dialog. http://ctags.sourceforge.net/ -Comment[ca]=CTags és una eina de navegació de codi font amb suport per a diversos llenguatges. En carregar-se proporciona un menú de context per a localitzar les declaracions/definicions de tipus i també un diàleg de consultes. http://ctags.sourceforge.net/ -Comment[da]=CTags er et kildenavigationsværktøj med støtte for mange sprog. Når det er indlæst sørger det for en sammenhængsmenu til at finde type-deklarationer/definitioner og også en forespørgselsdialog. http://ctags.sourceforge.net/ -Comment[de]=CTags ist ein Navigationswerkzeug, das viele Sprachen unterstützt. Ist es geladen, bietet es ein Kontextmenü zum Suchen von Typ-Deklarationen und -Definitionen und einen Abfragedialog im Menü "Werkzeuge". http://ctags.sourceforge.net/ -Comment[el]=Το CTags είναι ένα εργαλείο πλοήγησης κώδικα με υποστήριξη πολλών γλωσσών. Όταν φορτωθεί προσφέρει ένα σχετικό μενού εύρεσης δηλώσεων/ορισμών τύπων και ένα διάλογο αναζήτησης. http://ctags.sourceforge.net/ -Comment[en_GB]=CTags is a source navigation tool with support for many languages. When loaded it provides a context menu for finding type declarations/definitions and also a query dialogue. http://ctags.sourceforge.net/ -Comment[es]=CTags es una herramienta de navegación del código fuente con soporte para varios lenguajes. Al cargarse, proporciona un menú contextual para localizar las declaraciones/definiciones de tipos y también un diálogo de consultas. http://ctags.sourceforge.net/ -Comment[et]=CTags on liikumisvahend paljude keelte toega. Laadimisel pakub see kontekstimenüüd deklaratsioonide/definitsioonide tüübi leidmiseks, samuti päringudialoogi tööriistade menüü vahendusel. Vaata internetis http://ctags.sourceforge.net/ -Comment[eu]=CTags hizkuntza askotako euskarria duen iturburu nabigazio tresna bat da. Kargatzean mota deklarazio/definizioak aurkitzeko testuinguru menu bat eskeintzen du eta baita kontsulta elkarrizketa-koadro bat ere Tresnak menuan.http://ctags.sourceforge.net/ -Comment[fa]=CTags یک ابزار ناوش منبع با پشتیبانی از زبانهای زیادی است. در هنگام بارگذاری، یک گزینگان متن برای یافتن تعاریف/اعلانهای نوع و همچنین یک محاورۀ پرس‌وجو فراهم می‌کند. http://ctags.sourceforge.net/ -Comment[fr]=CTags est un outil de navigation dans les sources comprenant une prise en charge pour de nombreux langages. Une fois chargé, il fournit un menu contextuel pour la recherche de déclarations / définitions de types, ainsi qu'une boîte de dialogue de requête. http://ctags.sourceforge.net/ -Comment[gl]=CTags é unha ferramenta para a navegación de código con soporte para moitas linguaxes. Cando se carga proporciona un menú contextual para atopar declaracións/definicións de tipos e tamén un diálogo de peticións. http://ctags.sourceforge.net/ -Comment[hu]=A CTags egy többféle nyelvet is támogató forrásnavigációs eszköz. Lehetővé teszi felbukkanó menüből típusdeklarációk és -megvalósítások keresését, lekérdezését. http://ctags.sourceforge.net/ -Comment[it]=CTags è uno strumento per la navigazione nel codice sorgente con supporto per molti linguaggi. Quando caricato offre un menu contestuale per ricercare i tipi di dichiarazioni/definizioni e anche una finestra per compiere interrogazioni. http://ctags.sourceforge.net/ -Comment[ja]=CTags は色々な言語をサポートしたソースナビゲーションツールです。読み込まれると、型の宣言や定義を見つけたり、ツールメニューの中で対話的な問い合わせを行うコンテキストメニューを提供します。http://ctags.sourceforge.net/ -Comment[ms]=CTags adalah alatan pengemudi sumber dengan sokongan untuk banyak bahasa. Apabila dimuatkan ia menyediakan menu konteks untuk mencari pengisytiharan/definisi dan juga dialog pertanyaan. http://ctags.sourceforge.net/ -Comment[nds]=CTags is en Navigatschoonwarktüüch, wat vele Spraken ünnerstütt. Wenn dat laadt is, stellt dat en Rechtsklickmenü för't Söken na Typ-Deklaratschonen un -Definitschonen praat, un ok noch en Affraagdialoog. http://ctags.sourceforge.net/ -Comment[ne]=CTags स्रोत नेभिगेसन उपकरण हो जसले धेरै भाषा समर्थन गर्दछ । लोड गरेपछि यसले टाइप घोषणा/परिभाषा र क्वेरी संवाद पनि फेला पार्नका लागि प्रसङ्ग मेनु प्रदान गर्दछ । http://ctags.sourceforge.net/ -Comment[nl]=CTags is een krachtige tool voor het navigeren in broncode met ondersteuning voor veel talen. Wanneer de plugin geladen is biedt deze een contextmenu voor het vinden van typedeclaraties, en ook een ondervragingsdialoog. Web: http://ctags.sourceforge.net/ -Comment[pl]=CTags to narzędzie do nawigacji w kodzie źródłowym obsługujące wiele języków. Po wczytaniu udostępnia menu kontekstowe pozwalające znajdować deklaracje/definicje oraz okno dialogowe w menu Narzędzia. http://ctags.sourceforge.net/ -Comment[pt]=O CTags é uma ferramenta de navegação no código com suporte para várias linguagens. Quando é carregado, oferece um menu de contexto para encontrar as declarações/definições de tipos, assim como uma janela de pesquisa. http://ctags.sourceforge.net/ -Comment[pt_BR]=CTags é uma ferramenta de navegação de código com suporte para muitas linguagens. Quando carregada ela oferece um menu de contexto para encontrar declarações/definições de tipo e também um diálogo de consulta no menu Ferramentas. http://ctags.sourceforge.net/ -Comment[ru]=CTags - это средство навигации по коду, поддерживающее многие языки. Будучи загружено, оно предоставляет контекстное меню для нахождения описания и определения типа выбранного символа, а также диалог запроса. http://ctags.sourceforge.net/ -Comment[sk]=CTags je navigačný nástroj pre zdrojový kód pre veľa jazykov.Po načítaní poskytuje kontextové menu pre hľadanie deklarácie/definície a tiež vyhľadávací dialóg. http://ctags.sourceforge.net/ -Comment[sr]=CTags је алат за навигацију кроз изворни кôд са подршком за многе језике. Када је учитан, обезбеђује контекстни мени за проналажење декларација/дефиниција типова, а такође и дијалог за упите. http://ctags.sourceforge.net/ -Comment[sr@Latn]=CTags je alat za navigaciju kroz izvorni kôd sa podrškom za mnoge jezike. Kada je učitan, obezbeđuje kontekstni meni za pronalaženje deklaracija/definicija tipova, a takođe i dijalog za upite. http://ctags.sourceforge.net/ -Comment[sv]=Ctags är ett verktyg för källkodsnavigering med stöd för många språk. När det laddats tillhandahåller det en sammanhangsberoende meny för att hitta typdeklarationer eller definitioner, och dessutom en frågedialogruta. http://ctags.sourceforge.net/ -Comment[ta]=Cதத்தல்கள் இது ஒரு மூல வழி செலுத்தும் கருவி இது நிறைய மொழிகளை ஆதரிக்கும். ஏற்றும் பொழுது எழுத்து உருவை காண உதவும் ஒரு பட்டியலும் மற்றும் கருவிப்பட்டியலில் கேள்வி உரையாடல்களும் இது அளிக்கும்.http://ctags.sourceforge.net/ -Comment[tg]=CTags-ин воситаи навигадсия дар код мебошад, ки бисёр забонҳоро дастрасӣ менамояд. Ҳангоми пурбор намудан, вай менюи қаринагинро пешниҳод менамояд, барои ёфтани тасвир ва муаян сохтани намуди нишонаҳои интихоб карда шуда ва боз гуфтугӯи дархостро мегузорад. http://ctags.sourceforge.net/ -Comment[tr]=CTags birçok dili destekleyen bir kaynak dolaşım aracıdır. Yüklendiğinde tip tanımlamalarını bulmayı sağlayan bir bağlam menüsü ve bir sorgu penceresi sunar. -Comment[zh_CN]=CTags 是一个支持多种语言源文件浏览的工具。启动后在上下文菜单中提供查找类型的声明/定义,并在工具菜单中提供查询对话框。http://ctags.sourceforge.net/ -Comment[zh_TW]=CTags 是支援許多種語言的程式源碼導覽工具。它載入後會提供一個選單,尋找型態的宣告、定義,並提供一個查詢對話框。http://ctags.sourceforge.net/ -Name=KDevCTags2 -Name[da]=TDevelop CTags2 -Name[nds]=TDevelop-CTags2 -Name[sk]=KDev CTags2 -Name[sv]=TDevelop ctags-2 -Name[tg]=KDevCТегҳо2 -Name[zh_TW]=TDevelop CTags2 -GenericName=CTags Frontend -GenericName[ca]=Entorn per a CTags -GenericName[da]=CTags-grænseflade -GenericName[de]=Unterstützung für CTags -GenericName[el]=Πρόγραμμα CTags -GenericName[es]=Entorno de CTags -GenericName[et]=CTagsi kasutajaliides -GenericName[eu]=CTags interfazea -GenericName[fa]=پایانۀ CTags -GenericName[fr]=Interface pour CTags -GenericName[ga]=Comhéadan CTags -GenericName[gl]=Frontal para CTags -GenericName[hi]=सी-टैग्स-फ्रन्टएन्ड -GenericName[hu]=CTags-kezelő -GenericName[it]=Interfaccia a CTags -GenericName[ja]=CTags フロントエンド -GenericName[ms]=Antaradepan CTags -GenericName[nds]=CTags-Böversiet -GenericName[ne]=CTags फ्रेन्टइन्ड -GenericName[nl]=Frontend voor CTags -GenericName[pl]=Interfejs do CTags -GenericName[pt]=Interface de CTags -GenericName[pt_BR]=Interface do CTags -GenericName[ru]=Интерфейс к CTags -GenericName[sk]=CTags rozhranie -GenericName[sl]=Vmesnik za CTags -GenericName[sr]=Интерфејс CTags-а -GenericName[sr@Latn]=Interfejs CTags-a -GenericName[sv]=Ctags-gränssnitt -GenericName[ta]=CTags முன்பகுதி -GenericName[tg]=Интерфейс дар CTags -GenericName[tr]=CTags Önucu -GenericName[zh_CN]=CTags前端 -GenericName[zh_TW]=CTags 前端介面 -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Project -X-TDE-Library=libtdevctags2 -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeNavigation diff --git a/parts/ctags2/tdevpart_ctags2.rc b/parts/ctags2/tdevpart_ctags2.rc deleted file mode 100644 index c217c256..00000000 --- a/parts/ctags2/tdevpart_ctags2.rc +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/parts/diff/CMakeLists.txt b/parts/diff/CMakeLists.txt index a4135dc6..09987fd7 100644 --- a/parts/diff/CMakeLists.txt +++ b/parts/diff/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevdiff.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevdiff.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdiff ) +install( FILES kdevdiff.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevdiff.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdiff ) -##### libtdevdiff (module) ###################### +##### libkdevdiff (module) ###################### -tde_add_kpart( libtdevdiff AUTOMOC +tde_add_kpart( libkdevdiff AUTOMOC SOURCES diffpart.cpp diffwidget.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/diff/Makefile.am b/parts/diff/Makefile.am index 3d9396eb..ea521442 100644 --- a/parts/diff/Makefile.am +++ b/parts/diff/Makefile.am @@ -3,16 +3,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions $(all_includes) -kde_module_LTLIBRARIES = libtdevdiff.la -libtdevdiff_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevdiff_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevdiff.la +libkdevdiff_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevdiff_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevdiff_la_SOURCES = diffpart.cpp diffwidget.cpp +libkdevdiff_la_SOURCES = diffpart.cpp diffwidget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdiff.desktop +service_DATA = kdevdiff.desktop -rcdir = $(kde_datadir)/tdevdiff -rc_DATA = tdevdiff.rc +rcdir = $(kde_datadir)/kdevdiff +rc_DATA = kdevdiff.rc diff --git a/parts/diff/diffpart.cpp b/parts/diff/diffpart.cpp index b48e8136..a0dbafdd 100644 --- a/parts/diff/diffpart.cpp +++ b/parts/diff/diffpart.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include @@ -28,24 +28,24 @@ #include #include -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" -#include "tdevplugininfo.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevplugininfo.h" #include "diffdlg.h" #include "diffwidget.h" -static const TDevPluginInfo data("tdevdiff"); +static const KDevPluginInfo data("kdevdiff"); -typedef TDevGenericFactory DiffFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevdiff, DiffFactory( data ) ) +typedef KDevGenericFactory DiffFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevdiff, DiffFactory( data ) ) DiffPart::DiffPart(TQObject *parent, const char *name, const TQStringList &) - : TDevDiffFrontend(&data, parent, name ? name : "DiffPart"), proc(0) + : KDevDiffFrontend(&data, parent, name ? name : "DiffPart"), proc(0) { setInstance(DiffFactory::instance()); - setXMLFile("tdevdiff.rc"); + setXMLFile("kdevdiff.rc"); diffWidget = new DiffWidget(this, 0, "diffWidget"); diffWidget->setIcon( SmallIcon("editcopy") ); @@ -83,7 +83,7 @@ static bool urlIsEqual(const KURL &a, const KURL &b) return a == b; } -static KParts::ReadWritePart* partForURL(const KURL &url, TDevPartController* pc) +static KParts::ReadWritePart* partForURL(const KURL &url, KDevPartController* pc) { if ( !pc ) return 0; diff --git a/parts/diff/diffpart.h b/parts/diff/diffpart.h index 984c2c06..6fe89efe 100644 --- a/parts/diff/diffpart.h +++ b/parts/diff/diffpart.h @@ -15,8 +15,8 @@ #include #include -#include "tdevplugin.h" -#include "tdevdifffrontend.h" +#include "kdevplugin.h" +#include "kdevdifffrontend.h" class TQPopupMenu; class Context; @@ -24,7 +24,7 @@ class TDEProcess; class DiffWidget; class TQCString; -class DiffPart : public TDevDiffFrontend +class DiffPart : public KDevDiffFrontend { Q_OBJECT diff --git a/parts/diff/diffwidget.cpp b/parts/diff/diffwidget.cpp index 24435611..51dabcaf 100644 --- a/parts/diff/diffwidget.cpp +++ b/parts/diff/diffwidget.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include "diffpart.h" #include "diffwidget.h" diff --git a/parts/diff/kdevdiff.desktop b/parts/diff/kdevdiff.desktop new file mode 100644 index 00000000..13b22e9f --- /dev/null +++ b/parts/diff/kdevdiff.desktop @@ -0,0 +1,84 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Difference Viewer +Comment[ca]=Visor de diferències +Comment[da]=Diff-fremviser +Comment[de]=Betrachter für Abweichungen +Comment[el]=Προβολέας διαφορών +Comment[es]=Visor de diferencias +Comment[et]=Erinevuste näitaja +Comment[eu]=Desberdintasun ikustailea +Comment[fa]=مشاهده‌گر تفاوت +Comment[fr]=Afficheur de différences +Comment[ga]=Amharcán Difríochtaí +Comment[gl]=Visor de diferenzas +Comment[hi]=भिन्नता प्रदर्शक +Comment[hu]=Fájlok közötti eltérések megjelenítése +Comment[it]=Visualizzatore di differenze +Comment[ja]=差分ビューア +Comment[ms]=Pelihat Perbezaan +Comment[nds]=En Verscheelkieker +Comment[ne]=फरक दृश्यकर्ता +Comment[nl]=Weergave van verschillen +Comment[pl]=Przeglądarka różnic +Comment[pt]=Visualizador de Diferenças +Comment[pt_BR]=Visualizador de Diferenças +Comment[ru]=Просмотр различий +Comment[sk]=Prezerač rozdielov +Comment[sl]=Pregledovalnik razlik +Comment[sr]=Програм за прегледање разлика +Comment[sr@Latn]=Program za pregledanje razlika +Comment[sv]=Visning av jämförelser +Comment[ta]=பாகுபாடு காட்சியாளர் +Comment[tg]=Намоишгари фарқкунанда +Comment[tr]=Fark Görüntüleyicisi +Comment[zh_CN]=差别查看器 +Comment[zh_TW]=比較檢視器 +Name=KDevDiff +Name[da]=TDevelop diff-fremviser +Name[de]=Abweichungsansicht (TDevelop) +Name[hi]=के-डेव-डिफ़ +Name[nds]=TDevelop-Verscheelkieker +Name[sk]=KDev rozdiel +Name[sv]=TDevelop jämför +Name[zh_TW]=TDevelop 比較 +GenericName=Difference Viewer +GenericName[ca]=Visor de diferències +GenericName[da]=Diff-fremviser +GenericName[de]=Betrachter für Abweichungen +GenericName[el]=Προβολέας διαφορών +GenericName[es]=Visor de diferencias +GenericName[et]=Erinevuste näitaja +GenericName[eu]=Desberdintasun ikustailea +GenericName[fa]=مشاهده‌گر تفاوت +GenericName[fr]=Afficheur de différences +GenericName[ga]=Amharcán Difríochtaí +GenericName[gl]=Visor de diferenzas +GenericName[hi]=भिन्नता प्रदर्शक +GenericName[hu]=Diff-megjelenítő +GenericName[it]=Visualizzatore delle differenze +GenericName[ja]=差分ビューア +GenericName[ms]=Pelihat Perbezaan +GenericName[nds]=Verscheelkieker +GenericName[ne]=फरक दृश्यकर्ता +GenericName[nl]=Weergave van verschillen +GenericName[pl]=Przeglądarka różnic +GenericName[pt]=Visualizador de Diferenças +GenericName[pt_BR]=Visualizador de Diferenças +GenericName[ru]=Просмотр различий +GenericName[sk]=Prezerač rozdielov +GenericName[sl]=Pregledovalnik razlik +GenericName[sr]=Програм за прегледање разлика +GenericName[sr@Latn]=Program za pregledanje razlika +GenericName[sv]=Visning av jämförelser +GenericName[ta]=வெவ்வேறு பார்வையாளர்கள் +GenericName[tg]=Намоишгари фарқкунанда +GenericName[tr]=Fark Görüntüleyicisi +GenericName[zh_CN]=差别查看器 +GenericName[zh_TW]=比較檢視器 +ServiceTypes=TDevelop/DiffFrontend +X-TDE-Library=libkdevdiff +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeEditing +X-TDevelop-Scope=Core diff --git a/parts/diff/kdevdiff.rc b/parts/diff/kdevdiff.rc new file mode 100644 index 00000000..37059573 --- /dev/null +++ b/parts/diff/kdevdiff.rc @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/parts/diff/tdevdiff.desktop b/parts/diff/tdevdiff.desktop deleted file mode 100644 index db2d0428..00000000 --- a/parts/diff/tdevdiff.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Difference Viewer -Comment[ca]=Visor de diferències -Comment[da]=Diff-fremviser -Comment[de]=Betrachter für Abweichungen -Comment[el]=Προβολέας διαφορών -Comment[es]=Visor de diferencias -Comment[et]=Erinevuste näitaja -Comment[eu]=Desberdintasun ikustailea -Comment[fa]=مشاهده‌گر تفاوت -Comment[fr]=Afficheur de différences -Comment[ga]=Amharcán Difríochtaí -Comment[gl]=Visor de diferenzas -Comment[hi]=भिन्नता प्रदर्शक -Comment[hu]=Fájlok közötti eltérések megjelenítése -Comment[it]=Visualizzatore di differenze -Comment[ja]=差分ビューア -Comment[ms]=Pelihat Perbezaan -Comment[nds]=En Verscheelkieker -Comment[ne]=फरक दृश्यकर्ता -Comment[nl]=Weergave van verschillen -Comment[pl]=Przeglądarka różnic -Comment[pt]=Visualizador de Diferenças -Comment[pt_BR]=Visualizador de Diferenças -Comment[ru]=Просмотр различий -Comment[sk]=Prezerač rozdielov -Comment[sl]=Pregledovalnik razlik -Comment[sr]=Програм за прегледање разлика -Comment[sr@Latn]=Program za pregledanje razlika -Comment[sv]=Visning av jämförelser -Comment[ta]=பாகுபாடு காட்சியாளர் -Comment[tg]=Намоишгари фарқкунанда -Comment[tr]=Fark Görüntüleyicisi -Comment[zh_CN]=差别查看器 -Comment[zh_TW]=比較檢視器 -Name=TDevDiff -Name[da]=TDevelop diff-fremviser -Name[de]=Abweichungsansicht (TDevelop) -Name[hi]=के-डेव-डिफ़ -Name[nds]=TDevelop-Verscheelkieker -Name[sk]=KDev rozdiel -Name[sv]=TDevelop jämför -Name[zh_TW]=TDevelop 比較 -GenericName=Difference Viewer -GenericName[ca]=Visor de diferències -GenericName[da]=Diff-fremviser -GenericName[de]=Betrachter für Abweichungen -GenericName[el]=Προβολέας διαφορών -GenericName[es]=Visor de diferencias -GenericName[et]=Erinevuste näitaja -GenericName[eu]=Desberdintasun ikustailea -GenericName[fa]=مشاهده‌گر تفاوت -GenericName[fr]=Afficheur de différences -GenericName[ga]=Amharcán Difríochtaí -GenericName[gl]=Visor de diferenzas -GenericName[hi]=भिन्नता प्रदर्शक -GenericName[hu]=Diff-megjelenítő -GenericName[it]=Visualizzatore delle differenze -GenericName[ja]=差分ビューア -GenericName[ms]=Pelihat Perbezaan -GenericName[nds]=Verscheelkieker -GenericName[ne]=फरक दृश्यकर्ता -GenericName[nl]=Weergave van verschillen -GenericName[pl]=Przeglądarka różnic -GenericName[pt]=Visualizador de Diferenças -GenericName[pt_BR]=Visualizador de Diferenças -GenericName[ru]=Просмотр различий -GenericName[sk]=Prezerač rozdielov -GenericName[sl]=Pregledovalnik razlik -GenericName[sr]=Програм за прегледање разлика -GenericName[sr@Latn]=Program za pregledanje razlika -GenericName[sv]=Visning av jämförelser -GenericName[ta]=வெவ்வேறு பார்வையாளர்கள் -GenericName[tg]=Намоишгари фарқкунанда -GenericName[tr]=Fark Görüntüleyicisi -GenericName[zh_CN]=差别查看器 -GenericName[zh_TW]=比較檢視器 -ServiceTypes=TDevelop/DiffFrontend -X-TDE-Library=libtdevdiff -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeEditing -X-TDevelop-Scope=Core diff --git a/parts/diff/tdevdiff.rc b/parts/diff/tdevdiff.rc deleted file mode 100644 index ca944508..00000000 --- a/parts/diff/tdevdiff.rc +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/parts/distpart/CMakeLists.txt b/parts/distpart/CMakeLists.txt index 586b5346..15fcb85e 100644 --- a/parts/distpart/CMakeLists.txt +++ b/parts/distpart/CMakeLists.txt @@ -27,13 +27,13 @@ link_directories( ##### other data ################################ -install( FILES tdevdistpart.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_distpart.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdistpart ) +install( FILES kdevdistpart.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_distpart.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdistpart ) -##### libtdevdistpart (module) ################## +##### libkdevdistpart (module) ################## -tde_add_kpart( libtdevdistpart AUTOMOC +tde_add_kpart( libkdevdistpart AUTOMOC SOURCES distpart_ui.ui distpart_part.cpp distpart_widget.cpp packagebase.cpp lsmsupport.cpp specsupport.cpp diff --git a/parts/distpart/Makefile.am b/parts/distpart/Makefile.am index 8b5e69db..52f4a5ba 100644 --- a/parts/distpart/Makefile.am +++ b/parts/distpart/Makefile.am @@ -1,16 +1,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevdistpart.la -libtdevdistpart_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevdistpart_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevdistpart.la +libkdevdistpart_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevdistpart_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevdistpart_la_SOURCES = distpart_ui.ui distpart_part.cpp distpart_widget.cpp packagebase.cpp lsmsupport.cpp specsupport.cpp +libkdevdistpart_la_SOURCES = distpart_ui.ui distpart_part.cpp distpart_widget.cpp packagebase.cpp lsmsupport.cpp specsupport.cpp METASOURCES = AUTO KDEICON = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdistpart.desktop +service_DATA = kdevdistpart.desktop -rc_DATA = tdevpart_distpart.rc -rcdir = $(kde_datadir)/tdevdistpart +rc_DATA = kdevpart_distpart.rc +rcdir = $(kde_datadir)/kdevdistpart diff --git a/parts/distpart/distpart_part.cpp b/parts/distpart/distpart_part.cpp index 01ef30b0..e8a3e11a 100644 --- a/parts/distpart/distpart_part.cpp +++ b/parts/distpart/distpart_part.cpp @@ -23,27 +23,27 @@ #include #include -#include +#include #include -#include "tdevcore.h" -#include +#include "kdevcore.h" +#include #include "distpart_widget.h" #include -typedef TDevGenericFactory DistpartFactory; -static const TDevPluginInfo data("tdevdistpart"); -K_EXPORT_COMPONENT_FACTORY( libtdevdistpart, DistpartFactory( data ) ) +typedef KDevGenericFactory DistpartFactory; +static const KDevPluginInfo data("kdevdistpart"); +K_EXPORT_COMPONENT_FACTORY( libkdevdistpart, DistpartFactory( data ) ) DistpartPart::DistpartPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "DistpartPart") { + : KDevPlugin(&data, parent, name ? name : "DistpartPart") { kdDebug(9007) << "DistpartPart::DistpartPart()" << endl; setInstance(DistpartFactory::instance()); - setXMLFile("tdevpart_distpart.rc"); + setXMLFile("kdevpart_distpart.rc"); m_action = new TDEAction( i18n("Distribution && Publishing"), "package", 0, this, TQT_SLOT(show()), diff --git a/parts/distpart/distpart_part.h b/parts/distpart/distpart_part.h index d1d05a24..aa019c4d 100644 --- a/parts/distpart/distpart_part.h +++ b/parts/distpart/distpart_part.h @@ -19,12 +19,12 @@ ***************************************************************************/ -#ifndef __TDEVPART_DISTPART_H__ -#define __TDEVPART_DISTPART_H__ +#ifndef __KDEVPART_DISTPART_H__ +#define __KDEVPART_DISTPART_H__ #include -#include +#include #include #include "packagebase.h" @@ -32,7 +32,7 @@ class DistpartDialog; class KDialogBase; -class DistpartPart : public TDevPlugin { +class DistpartPart : public KDevPlugin { Q_OBJECT diff --git a/parts/distpart/distpart_widget.cpp b/parts/distpart/distpart_widget.cpp index 0999ca72..c628fe26 100644 --- a/parts/distpart/distpart_widget.cpp +++ b/parts/distpart/distpart_widget.cpp @@ -27,12 +27,12 @@ #include #include #include -#include "tdevproject.h" +#include "kdevproject.h" #include "domutil.h" #include #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ #include #include #include -#include "tdevmakefrontend.h" +#include "kdevmakefrontend.h" #include #include diff --git a/parts/distpart/distpart_widget.h b/parts/distpart/distpart_widget.h index 1e5bf68f..7a684a5a 100644 --- a/parts/distpart/distpart_widget.h +++ b/parts/distpart/distpart_widget.h @@ -32,7 +32,7 @@ #include #include -class TDevProject; +class KDevProject; class DistpartPart; class TQUrlOperator; class TDEProcess; diff --git a/parts/distpart/kdevdistpart.desktop b/parts/distpart/kdevdistpart.desktop new file mode 100644 index 00000000..1b3d095d --- /dev/null +++ b/parts/distpart/kdevdistpart.desktop @@ -0,0 +1,70 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Aids in building and publishing the final project. Supports creation of RPM packages or source packages. +Comment[ca]=Ajuda en la construcció i publicació del projecte final. Suporta la creació de paquets RPM o paquets font. +Comment[da]=Hjælper til med at bygge og publicere det færdige projekt. Understøtter at oprette RPM-pakker og kildekodepakker. +Comment[de]=Unterstützt beim Erstellen und Ausliefern des fertigen Projekts. Derzeit werden RPM- und Quell-Pakete unterstützt. +Comment[el]=Βοηθά στην κατασκευή και δημοσίευση του τελικού έργου. Για την ώρα υποστηρίζεται μόνο η μορφή RPM. +Comment[es]=Ayuda en la construcción y publicación del proyecto final. Contempla la creación de paquetes RPM y de código fuente. +Comment[et]=Abi valmisprojekti ehitamisel ja avaldamisel. Toetatud on RPM-pakettide ja lähtekoodipakettide loomine. +Comment[fr]=Outil d'aide à la construction et à la publication du projet final. Prend en charge la création de paquetages RPM ou de paquetages de sources. +Comment[hu]=A projekt felépítésében és publikálásában segít. RPM és forráscsomagok készítését teszi lehetővé. +Comment[it]=Aiuta nella compilazione e pubblicazione del progetto finale. Supporta la creazione di pacchetti RPM o di pacchetti sorgenti. +Comment[ms]=Membantu dalam membina dan menerbitkan projek akhir. Menyokong penciptaan pakej RPM atau pakej sumber. +Comment[nds]=Ünnerstütten för't Opstellen un Apenmaken vun't fardige Projekt. Ünnerstütt dat Opstellen vun RPMs un Bornpaketen. +Comment[nl]=Helpt bij het bouwen en publiceren van het uiteindelijke project. Ondersteunt het aanmaken van RPM-pakketten of broncodepakketten. +Comment[pl]=Pomoc w budowaniu i publikowaniu projektu. Obsługuje tworzenie pakietów RPM i paczek ze źródłami. +Comment[pt]=Ajuda na construção e publicação do projecto final. Suporta a criação de pacotes RPM ou pacotes com código-fonte. +Comment[pt_BR]=Auxilia na compilação e publicação do projeto final. Suporta a criação de pacotes RPM ou pacotes fontes. +Comment[ru]=Помощник по сборке и распространению окончательных версий проекта. Поддерживает создание пакетов RPM или пакетов с исходным кодом. +Comment[sk]=Pomáha pri vytváraní a publikovaní finálneho projektu. Podporované sú RPM a zdrojové balíčky. +Comment[sr]=Помаже у грађењу и објављивању коначног пројекта. За сада је подржано стварање RPM и изворних пакета. +Comment[sr@Latn]=Pomaže u građenju i objavljivanju konačnog projekta. Za sada je podržano stvaranje RPM i izvornih paketa. +Comment[sv]=Hjälper till att bygga och publicera det färdiga projektet. Stöder att skapa RPM-paket och källkodspaket. +Comment[zh_TW]=協助建立與發布最終專案版本。支援建立 RPM 套件與 RPM 源碼套件。 +Name=KDevdistpart +Name[da]=TDevelop distpart +Name[de]=Unterstützung für Paketerstellung (TDevelop) +Name[hi]=के-डेव-डिस्टपार्ट +Name[nds]=Paketopstell-Ünnerstütten för't TDevelop +Name[sk]=KDev distribúcia +Name[sv]=TDevelop distributionsdel +Name[zh_TW]=TDevelop 發布元件 +GenericName=Final Packaging Support +GenericName[ca]=Suport per a l'empaquetat final +GenericName[da]=Endelig pakkestøtte +GenericName[de]=Unterstützung für Paketerstellung +GenericName[el]=Υποστήριξη τελικού πακέτου +GenericName[es]=Soporte para empaquetado final +GenericName[et]=Lõpp-pakendamise toetus +GenericName[eu]=Azken paketatze euskarria +GenericName[fa]=پشتیبانی بسته‌بندی نهایی +GenericName[fr]=Gestion du conditionnement final +GenericName[gl]=Soporte para empaquetado final +GenericName[hu]=Csomagelőkészítő +GenericName[it]=Supporto finale per la creazione di pacchetti +GenericName[ja]=最終パッケージ化サポート +GenericName[nds]=Ünnerstütten för't Paketopstellen +GenericName[ne]=अन्तिम प्याकेजिङ समर्थन +GenericName[nl]=Ondersteuning voor projectpublicatie +GenericName[pl]=Obsługa ostatecznego pakowania +GenericName[pt]=Suporte a Empacotamento Final +GenericName[pt_BR]=Suporte ao Empacotamento Final +GenericName[ru]=Сборка и распространение пакетов +GenericName[sk]=Podpora finálneho balíčkovania +GenericName[sl]=Podpora končnemu ustarjanju paketov +GenericName[sr]=Подршка за коначно паковање +GenericName[sr@Latn]=Podrška za konačno pakovanje +GenericName[sv]=Stöd för slutpaketering +GenericName[ta]=ஆதரவுள்ள கடைசி தொகுப்பு +GenericName[tg]=Ҷамъкунӣ ва ҷорӣ намудани пакетҳо +GenericName[tr]=Son Paketleme Desteği +GenericName[zh_CN]=最终打包支持 +GenericName[zh_TW]=最終包裝支援 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevdistpart +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=ProjectPackaging diff --git a/parts/distpart/kdevpart_distpart.rc b/parts/distpart/kdevpart_distpart.rc new file mode 100644 index 00000000..8b142d04 --- /dev/null +++ b/parts/distpart/kdevpart_distpart.rc @@ -0,0 +1,8 @@ + + + + &Project + + + + diff --git a/parts/distpart/specsupport.cpp b/parts/distpart/specsupport.cpp index 38f8f385..06a0bb67 100644 --- a/parts/distpart/specsupport.cpp +++ b/parts/distpart/specsupport.cpp @@ -19,8 +19,8 @@ ***************************************************************************/ #include "specsupport.h" -#include "tdevproject.h" -#include "tdevmakefrontend.h" +#include "kdevproject.h" +#include "kdevmakefrontend.h" #include "distpart_widget.h" #include @@ -79,11 +79,11 @@ void SpecSupport::slotbuildAllPushButtonPressed() { return; } else - if (TDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir,"cd " + TDEProcess::quote(dir) + " && cp " + TDEProcess::quote(getAppSource()) + " " + TDEProcess::quote(*(map.find("_sourcedir")))); } - if (TDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir,"cd " + TDEProcess::quote((((it = map.find("_specdir")) != map.end()) ? (*it) : dir)) + " && rpmbuild -ba " + m_part->project()->projectName() + ".spec"); } @@ -178,11 +178,11 @@ void SpecSupport::slotsrcPackagePushButtonPressed() { return; } else - if (TDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir,"cd " + TDEProcess::quote(dir) + " && cp " + TDEProcess::quote(getAppSource()) + " " + TDEProcess::quote(*(map.find("_sourcedir")))); } - if (TDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir,"cd " + TDEProcess::quote((((it = map.find("_specdir")) != map.end()) ? (*it) : dir)) + " && rpmbuild -bs " + m_part->project()->projectName() + ".spec"); } diff --git a/parts/distpart/tdevdistpart.desktop b/parts/distpart/tdevdistpart.desktop deleted file mode 100644 index 290a0a8d..00000000 --- a/parts/distpart/tdevdistpart.desktop +++ /dev/null @@ -1,70 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Aids in building and publishing the final project. Supports creation of RPM packages or source packages. -Comment[ca]=Ajuda en la construcció i publicació del projecte final. Suporta la creació de paquets RPM o paquets font. -Comment[da]=Hjælper til med at bygge og publicere det færdige projekt. Understøtter at oprette RPM-pakker og kildekodepakker. -Comment[de]=Unterstützt beim Erstellen und Ausliefern des fertigen Projekts. Derzeit werden RPM- und Quell-Pakete unterstützt. -Comment[el]=Βοηθά στην κατασκευή και δημοσίευση του τελικού έργου. Για την ώρα υποστηρίζεται μόνο η μορφή RPM. -Comment[es]=Ayuda en la construcción y publicación del proyecto final. Contempla la creación de paquetes RPM y de código fuente. -Comment[et]=Abi valmisprojekti ehitamisel ja avaldamisel. Toetatud on RPM-pakettide ja lähtekoodipakettide loomine. -Comment[fr]=Outil d'aide à la construction et à la publication du projet final. Prend en charge la création de paquetages RPM ou de paquetages de sources. -Comment[hu]=A projekt felépítésében és publikálásában segít. RPM és forráscsomagok készítését teszi lehetővé. -Comment[it]=Aiuta nella compilazione e pubblicazione del progetto finale. Supporta la creazione di pacchetti RPM o di pacchetti sorgenti. -Comment[ms]=Membantu dalam membina dan menerbitkan projek akhir. Menyokong penciptaan pakej RPM atau pakej sumber. -Comment[nds]=Ünnerstütten för't Opstellen un Apenmaken vun't fardige Projekt. Ünnerstütt dat Opstellen vun RPMs un Bornpaketen. -Comment[nl]=Helpt bij het bouwen en publiceren van het uiteindelijke project. Ondersteunt het aanmaken van RPM-pakketten of broncodepakketten. -Comment[pl]=Pomoc w budowaniu i publikowaniu projektu. Obsługuje tworzenie pakietów RPM i paczek ze źródłami. -Comment[pt]=Ajuda na construção e publicação do projecto final. Suporta a criação de pacotes RPM ou pacotes com código-fonte. -Comment[pt_BR]=Auxilia na compilação e publicação do projeto final. Suporta a criação de pacotes RPM ou pacotes fontes. -Comment[ru]=Помощник по сборке и распространению окончательных версий проекта. Поддерживает создание пакетов RPM или пакетов с исходным кодом. -Comment[sk]=Pomáha pri vytváraní a publikovaní finálneho projektu. Podporované sú RPM a zdrojové balíčky. -Comment[sr]=Помаже у грађењу и објављивању коначног пројекта. За сада је подржано стварање RPM и изворних пакета. -Comment[sr@Latn]=Pomaže u građenju i objavljivanju konačnog projekta. Za sada je podržano stvaranje RPM i izvornih paketa. -Comment[sv]=Hjälper till att bygga och publicera det färdiga projektet. Stöder att skapa RPM-paket och källkodspaket. -Comment[zh_TW]=協助建立與發布最終專案版本。支援建立 RPM 套件與 RPM 源碼套件。 -Name=KDevdistpart -Name[da]=TDevelop distpart -Name[de]=Unterstützung für Paketerstellung (TDevelop) -Name[hi]=के-डेव-डिस्टपार्ट -Name[nds]=Paketopstell-Ünnerstütten för't TDevelop -Name[sk]=KDev distribúcia -Name[sv]=TDevelop distributionsdel -Name[zh_TW]=TDevelop 發布元件 -GenericName=Final Packaging Support -GenericName[ca]=Suport per a l'empaquetat final -GenericName[da]=Endelig pakkestøtte -GenericName[de]=Unterstützung für Paketerstellung -GenericName[el]=Υποστήριξη τελικού πακέτου -GenericName[es]=Soporte para empaquetado final -GenericName[et]=Lõpp-pakendamise toetus -GenericName[eu]=Azken paketatze euskarria -GenericName[fa]=پشتیبانی بسته‌بندی نهایی -GenericName[fr]=Gestion du conditionnement final -GenericName[gl]=Soporte para empaquetado final -GenericName[hu]=Csomagelőkészítő -GenericName[it]=Supporto finale per la creazione di pacchetti -GenericName[ja]=最終パッケージ化サポート -GenericName[nds]=Ünnerstütten för't Paketopstellen -GenericName[ne]=अन्तिम प्याकेजिङ समर्थन -GenericName[nl]=Ondersteuning voor projectpublicatie -GenericName[pl]=Obsługa ostatecznego pakowania -GenericName[pt]=Suporte a Empacotamento Final -GenericName[pt_BR]=Suporte ao Empacotamento Final -GenericName[ru]=Сборка и распространение пакетов -GenericName[sk]=Podpora finálneho balíčkovania -GenericName[sl]=Podpora končnemu ustarjanju paketov -GenericName[sr]=Подршка за коначно паковање -GenericName[sr@Latn]=Podrška za konačno pakovanje -GenericName[sv]=Stöd för slutpaketering -GenericName[ta]=ஆதரவுள்ள கடைசி தொகுப்பு -GenericName[tg]=Ҷамъкунӣ ва ҷорӣ намудани пакетҳо -GenericName[tr]=Son Paketleme Desteği -GenericName[zh_CN]=最终打包支持 -GenericName[zh_TW]=最終包裝支援 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevdistpart -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=ProjectPackaging diff --git a/parts/distpart/tdevpart_distpart.rc b/parts/distpart/tdevpart_distpart.rc deleted file mode 100644 index 8b142d04..00000000 --- a/parts/distpart/tdevpart_distpart.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - &Project - - - - diff --git a/parts/documentation/CMakeLists.txt b/parts/documentation/CMakeLists.txt index 4b13b342..accc3401 100644 --- a/parts/documentation/CMakeLists.txt +++ b/parts/documentation/CMakeLists.txt @@ -33,13 +33,13 @@ link_directories( ##### other data ################################ -install( FILES tdevdocumentation.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_documentation.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation ) +install( FILES kdevdocumentation.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_documentation.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation ) -##### libtdevdocumentation (module) ############# +##### libkdevdocumentation (module) ############# -tde_add_kpart( libtdevdocumentation AUTOMOC +tde_add_kpart( libkdevdocumentation AUTOMOC SOURCES documentation_part.cpp documentation_widget.cpp contentsview.cpp indexview.cpp docglobalconfigwidgetbase.ui @@ -50,8 +50,8 @@ tde_add_kpart( libtdevdocumentation AUTOMOC find_documentation.cpp find_documentation_optionsbase.ui find_documentation_options.cpp selecttopicbase.ui selecttopic.cpp docprojectconfigwidgetbase.ui - docprojectconfigwidget.cpp TDevDocumentationIface.cpp - TDevDocumentationIface.skel addcatalogdlgbase.ui + docprojectconfigwidget.cpp KDevDocumentationIface.cpp + KDevDocumentationIface.skel addcatalogdlgbase.ui addcatalogdlg.cpp LINK documentation_interfaces-shared tdevelop-shared tdehtml-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/documentation/KDevDocumentationIface.cpp b/parts/documentation/KDevDocumentationIface.cpp new file mode 100644 index 00000000..329b8474 --- /dev/null +++ b/parts/documentation/KDevDocumentationIface.cpp @@ -0,0 +1,83 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@mksat.net * + * * + * This program 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 program 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 "KDevDocumentationIface.h" + +#include "documentation_part.h" + +KDevDocumentationIface::KDevDocumentationIface(DocumentationPart *part) + :TQObject(part), DCOPObject("KDevDocumentation"), m_part(part) +{ +} + +KDevDocumentationIface::~KDevDocumentationIface() +{ +} + +void KDevDocumentationIface::lookupInIndex(TQString term) +{ + m_part->lookInDocumentationIndex(term); +} + +void KDevDocumentationIface::findInFinder(TQString term) +{ + m_part->findInDocumentation(term); +} + +void KDevDocumentationIface::searchInDocumentation(TQString term) +{ + m_part->searchInDocumentation(term); +} + +void KDevDocumentationIface::lookupInIndex() +{ + m_part->lookInDocumentationIndex(); +} + +void KDevDocumentationIface::searchInDocumentation() +{ + m_part->searchInDocumentation(); +} + +void KDevDocumentationIface::manPage(TQString term) +{ + m_part->manPage(term); +} + +void KDevDocumentationIface::infoPage(TQString term) +{ + m_part->infoPage(term); +} + +void KDevDocumentationIface::manPage() +{ + m_part->manPage(); +} + +void KDevDocumentationIface::infoPage() +{ + m_part->infoPage(); +} + +void KDevDocumentationIface::findInFinder( ) +{ + m_part->findInDocumentation(); +} + +#include "KDevDocumentationIface.moc" diff --git a/parts/documentation/KDevDocumentationIface.h b/parts/documentation/KDevDocumentationIface.h new file mode 100644 index 00000000..c55143e7 --- /dev/null +++ b/parts/documentation/KDevDocumentationIface.h @@ -0,0 +1,53 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@mksat.net * + * * + * This program 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 program 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 KDEVDOCUMENTATIONIFACE_H +#define KDEVDOCUMENTATIONIFACE_H + +#include +#include + +class DocumentationPart; + +class KDevDocumentationIface : public TQObject, public DCOPObject { + Q_OBJECT +// + K_DCOP +public: + KDevDocumentationIface(DocumentationPart *part); + ~KDevDocumentationIface(); + +k_dcop: + void lookupInIndex(TQString term); + void findInFinder(TQString term); + void searchInDocumentation(TQString term); + void manPage(TQString term); + void infoPage(TQString term); + + void lookupInIndex(); + void findInFinder(); + void searchInDocumentation(); + void manPage(); + void infoPage(); + +private: + DocumentationPart *m_part; +}; + +#endif diff --git a/parts/documentation/Makefile.am b/parts/documentation/Makefile.am index 118c8041..13c4db3f 100644 --- a/parts/documentation/Makefile.am +++ b/parts/documentation/Makefile.am @@ -1,31 +1,31 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/parts/documentation/interfaces $(all_includes) -kde_module_LTLIBRARIES = libtdevdocumentation.la -libtdevdocumentation_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevdocumentation_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +kde_module_LTLIBRARIES = libkdevdocumentation.la +libkdevdocumentation_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevdocumentation_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/parts/documentation/interfaces/libdocumentation_interfaces.la $(LIB_TDEHTML) -libtdevdocumentation_la_SOURCES = documentation_part.cpp \ +libkdevdocumentation_la_SOURCES = documentation_part.cpp \ documentation_widget.cpp contentsview.cpp indexview.cpp docglobalconfigwidgetbase.ui \ docglobalconfigwidget.cpp docconfiglistview.cpp editcatalogdlgbase.ui editcatalogdlg.cpp \ docutils.cpp searchview.cpp bookmarkview.cpp editbookmarkdlg.ui \ find_documentationbase.ui find_documentation.cpp find_documentation_optionsbase.ui \ find_documentation_options.cpp selecttopicbase.ui selecttopic.cpp docprojectconfigwidgetbase.ui \ - docprojectconfigwidget.cpp TDevDocumentationIface.cpp TDevDocumentationIface.skel \ + docprojectconfigwidget.cpp KDevDocumentationIface.cpp KDevDocumentationIface.skel \ addcatalogdlgbase.ui addcatalogdlg.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdocumentation.desktop +service_DATA = kdevdocumentation.desktop -rcdir = $(kde_datadir)/tdevdocumentation -rc_DATA = tdevpart_documentation.rc +rcdir = $(kde_datadir)/kdevdocumentation +rc_DATA = kdevpart_documentation.rc noinst_HEADERS = contentsview.h indexview.h docglobalconfigwidget.h \ docconfiglistview.h editcatalogdlg.h docutils.h searchview.h bookmarkview.h selecttopic.h \ - docprojectconfigwidget.h TDevDocumentationIface.h addcatalogdlg.h + docprojectconfigwidget.h KDevDocumentationIface.h addcatalogdlg.h SUBDIRS = interfaces plugins tools data protocols DOXYGEN_EMPTY = YES diff --git a/parts/documentation/TDevDocumentationIface.cpp b/parts/documentation/TDevDocumentationIface.cpp deleted file mode 100644 index 0441eb4a..00000000 --- a/parts/documentation/TDevDocumentationIface.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@mksat.net * - * * - * This program 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 program 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 "TDevDocumentationIface.h" - -#include "documentation_part.h" - -TDevDocumentationIface::TDevDocumentationIface(DocumentationPart *part) - :TQObject(part), DCOPObject("TDevDocumentation"), m_part(part) -{ -} - -TDevDocumentationIface::~TDevDocumentationIface() -{ -} - -void TDevDocumentationIface::lookupInIndex(TQString term) -{ - m_part->lookInDocumentationIndex(term); -} - -void TDevDocumentationIface::findInFinder(TQString term) -{ - m_part->findInDocumentation(term); -} - -void TDevDocumentationIface::searchInDocumentation(TQString term) -{ - m_part->searchInDocumentation(term); -} - -void TDevDocumentationIface::lookupInIndex() -{ - m_part->lookInDocumentationIndex(); -} - -void TDevDocumentationIface::searchInDocumentation() -{ - m_part->searchInDocumentation(); -} - -void TDevDocumentationIface::manPage(TQString term) -{ - m_part->manPage(term); -} - -void TDevDocumentationIface::infoPage(TQString term) -{ - m_part->infoPage(term); -} - -void TDevDocumentationIface::manPage() -{ - m_part->manPage(); -} - -void TDevDocumentationIface::infoPage() -{ - m_part->infoPage(); -} - -void TDevDocumentationIface::findInFinder( ) -{ - m_part->findInDocumentation(); -} - -#include "TDevDocumentationIface.moc" diff --git a/parts/documentation/TDevDocumentationIface.h b/parts/documentation/TDevDocumentationIface.h deleted file mode 100644 index 565070f3..00000000 --- a/parts/documentation/TDevDocumentationIface.h +++ /dev/null @@ -1,53 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@mksat.net * - * * - * This program 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 program 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 TDEVDOCUMENTATIONIFACE_H -#define TDEVDOCUMENTATIONIFACE_H - -#include -#include - -class DocumentationPart; - -class TDevDocumentationIface : public TQObject, public DCOPObject { - Q_OBJECT -// - K_DCOP -public: - TDevDocumentationIface(DocumentationPart *part); - ~TDevDocumentationIface(); - -k_dcop: - void lookupInIndex(TQString term); - void findInFinder(TQString term); - void searchInDocumentation(TQString term); - void manPage(TQString term); - void infoPage(TQString term); - - void lookupInIndex(); - void findInFinder(); - void searchInDocumentation(); - void manPage(); - void infoPage(); - -private: - DocumentationPart *m_part; -}; - -#endif diff --git a/parts/documentation/addcatalogdlg.cpp b/parts/documentation/addcatalogdlg.cpp index 51e6fe96..21913089 100644 --- a/parts/documentation/addcatalogdlg.cpp +++ b/parts/documentation/addcatalogdlg.cpp @@ -29,7 +29,7 @@ #include #include "docutils.h" -#include "tdevdocumentationplugin.h" +#include "kdevdocumentationplugin.h" AddCatalogDlg::AddCatalogDlg( TQValueList const & plugins, TQWidget* parent, const char* name, bool modal, WFlags fl) diff --git a/parts/documentation/bookmarkview.cpp b/parts/documentation/bookmarkview.cpp index 9e6f85df..f626e246 100644 --- a/parts/documentation/bookmarkview.cpp +++ b/parts/documentation/bookmarkview.cpp @@ -34,8 +34,8 @@ #include #include -#include -#include +#include +#include #include "documentation_part.h" #include "documentation_widget.h" @@ -44,7 +44,7 @@ DocBookmarkManager::DocBookmarkManager(DocumentationPart */*part*/) :KBookmarkManager(locateLocal("data", - "tdevdocumentation/bookmarks/bookmarks.xml"), false) + "kdevdocumentation/bookmarks/bookmarks.xml"), false) { setEditorOptions(i18n("Documentation"), false); } diff --git a/parts/documentation/contentsview.cpp b/parts/documentation/contentsview.cpp index ff3c9a31..532feefd 100644 --- a/parts/documentation/contentsview.cpp +++ b/parts/documentation/contentsview.cpp @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include "documentation_widget.h" #include "documentation_part.h" diff --git a/parts/documentation/data/CMakeLists.txt b/parts/documentation/data/CMakeLists.txt index 5bb6d766..77d380d4 100644 --- a/parts/documentation/data/CMakeLists.txt +++ b/parts/documentation/data/CMakeLists.txt @@ -11,8 +11,8 @@ install( FILES long.html nomatch.html short.html syntax.html wrapper.html - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/en ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/en ) install( FILES checked.xpm htdig.png star.png star_blank.png unchecked.xpm - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/pics ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/pics ) diff --git a/parts/documentation/data/Makefile.am b/parts/documentation/data/Makefile.am index ae52bf11..920c492a 100644 --- a/parts/documentation/data/Makefile.am +++ b/parts/documentation/data/Makefile.am @@ -1,6 +1,6 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) METASOURCES = AUTO -htmldir = $(kde_datadir)/tdevdocumentation/en -picsdir = $(kde_datadir)/tdevdocumentation/pics +htmldir = $(kde_datadir)/kdevdocumentation/en +picsdir = $(kde_datadir)/kdevdocumentation/pics html_DATA = long.html nomatch.html short.html syntax.html wrapper.html pics_DATA = checked.xpm htdig.png star.png star_blank.png unchecked.xpm diff --git a/parts/documentation/data/nomatch.html b/parts/documentation/data/nomatch.html index 5cbd5c49..8951a604 100644 --- a/parts/documentation/data/nomatch.html +++ b/parts/documentation/data/nomatch.html @@ -1,6 +1,6 @@ No match for '$&(LOGICAL_WORDS)' -

    +

    Search results


    No matches were found for '$&(LOGICAL_WORDS)'

    @@ -17,5 +17,5 @@ word with "All," try using one or more of the same words with "Any."


    -ht://Dig $(VERSION) +ht://Dig $(VERSION) diff --git a/parts/documentation/data/syntax.html b/parts/documentation/data/syntax.html index 21a2ab2a..9701c37f 100644 --- a/parts/documentation/data/syntax.html +++ b/parts/documentation/data/syntax.html @@ -1,6 +1,6 @@ Error in Boolean search for '$&(WORDS)' -

    +

    Error in Boolean search for '$&(LOGICAL_WORDS)'


    Boolean expressions need to be 'correct' in order for the search @@ -14,6 +14,6 @@ $(SYNTAXERROR)
    -ht://Dig $(VERSION) +ht://Dig $(VERSION) diff --git a/parts/documentation/data/wrapper.html b/parts/documentation/data/wrapper.html index 187ffd61..20c1bbf2 100644 --- a/parts/documentation/data/wrapper.html +++ b/parts/documentation/data/wrapper.html @@ -1,10 +1,10 @@ Search results for '$&(WORDS)' -

    +

    Search results for '$&(LOGICAL_WORDS)'


    -More *'s indicate a better match. +More *'s indicate a better match.
    $(HTSEARCH_RESULTS) @@ -12,5 +12,5 @@ $(PAGEHEADER) $(PREVPAGE) $(PAGELIST) $(NEXTPAGE)
    -ht://Dig $(VERSION) +ht://Dig $(VERSION) diff --git a/parts/documentation/docconfiglistview.cpp b/parts/documentation/docconfiglistview.cpp index ba6f30fb..d2753653 100644 --- a/parts/documentation/docconfiglistview.cpp +++ b/parts/documentation/docconfiglistview.cpp @@ -21,7 +21,7 @@ #include -#include "tdevdocumentationplugin.h" +#include "kdevdocumentationplugin.h" DocConfigListView::DocConfigListView(TQWidget *parent, const char *name) :TDEListView(parent, name) diff --git a/parts/documentation/docglobalconfigwidget.cpp b/parts/documentation/docglobalconfigwidget.cpp index 5f66ef4a..cb6c3776 100644 --- a/parts/documentation/docglobalconfigwidget.cpp +++ b/parts/documentation/docglobalconfigwidget.cpp @@ -38,8 +38,8 @@ #include #include -#include "tdevdocumentationplugin.h" -#include "tdevpartcontroller.h" +#include "kdevdocumentationplugin.h" +#include "kdevpartcontroller.h" #include "docconfiglistview.h" #include "documentation_part.h" @@ -67,7 +67,7 @@ DocGlobalConfigWidget::DocGlobalConfigWidget(DocumentationPart *part, //read full text search settings config->setGroup("htdig"); TQString databaseDir = kapp->dirs()->saveLocation("data", - "tdevdocumentation/search"); + "kdevdocumentation/search"); databaseDirEdit->setURL(config->readPathEntry("databaseDir", databaseDir)); htdigbinEdit->setURL(config->readPathEntry("htdigbin", kapp->dirs()->findExe("htdig"))); htmergebinEdit->setURL(config->readPathEntry("htmergebin", kapp->dirs()->findExe("htmerge"))); @@ -99,8 +99,8 @@ DocGlobalConfigWidget::DocGlobalConfigWidget(DocumentationPart *part, useAssistant_box->setChecked(m_part->isAssistantUsed()); - // Having app-specific settings isn't pretty, but this setting is nonsensical in tdevassistant - if ( kapp->instanceName().find("tdevassistant") != -1 ) + // Having app-specific settings isn't pretty, but this setting is nonsensical in kdevassistant + if ( kapp->instanceName().find("kdevassistant") != -1 ) useAssistant_box->hide(); //font sizes and zoom levels @@ -182,7 +182,7 @@ void DocGlobalConfigWidget::accept() config->writePathEntry("htsearchbin", DocUtils::envURL(htsearchbinEdit)); //write full text search locations file - TQString ftsLocationsFile = locateLocal("data", "tdevdocumentation/search/locations.txt"); + TQString ftsLocationsFile = locateLocal("data", "kdevdocumentation/search/locations.txt"); TQFile f(ftsLocationsFile); TQStringList locs; if (f.open(IO_ReadWrite | IO_Truncate)) diff --git a/parts/documentation/docprojectconfigwidget.cpp b/parts/documentation/docprojectconfigwidget.cpp index 1d6678d7..a37ad5cb 100644 --- a/parts/documentation/docprojectconfigwidget.cpp +++ b/parts/documentation/docprojectconfigwidget.cpp @@ -27,8 +27,8 @@ #include "domutil.h" #include "urlutil.h" -#include "tdevproject.h" -#include "tdevdocumentationplugin.h" +#include "kdevproject.h" +#include "kdevdocumentationplugin.h" #include "documentation_part.h" #include "documentation_widget.h" @@ -45,7 +45,7 @@ DocProjectConfigWidget::DocProjectConfigWidget(DocumentationPart *part, TQWidget m_plugins[(*it)->pluginName()] = *it; } } - TQString projectDocSystem = DomUtil::readEntry(*(m_part->projectDom()), "/tdevdocumentation/projectdoc/docsystem"); + TQString projectDocSystem = DomUtil::readEntry(*(m_part->projectDom()), "/kdevdocumentation/projectdoc/docsystem"); bool hasProjectDoc = false; for (int i = 0; i < docSystemCombo->count(); ++i) @@ -64,7 +64,7 @@ DocProjectConfigWidget::DocProjectConfigWidget(DocumentationPart *part, TQWidget changeDocSystem(docSystemCombo->currentText()); } - manualURL->setURL(DomUtil::readEntry(*(m_part->projectDom()), "/tdevdocumentation/projectdoc/usermanualurl")); + manualURL->setURL(DomUtil::readEntry(*(m_part->projectDom()), "/kdevdocumentation/projectdoc/usermanualurl")); } void DocProjectConfigWidget::changeDocSystem(const TQString &text) @@ -79,7 +79,7 @@ void DocProjectConfigWidget::changeDocSystem(const TQString &text) catalogURL->setMode(plugin->catalogLocatorProps().first); catalogURL->setFilter(plugin->catalogLocatorProps().second); - TQString projectDocURL = DomUtil::readEntry(*(m_part->projectDom()), "/tdevdocumentation/projectdoc/docurl"); + TQString projectDocURL = DomUtil::readEntry(*(m_part->projectDom()), "/kdevdocumentation/projectdoc/docurl"); if (!projectDocURL.isEmpty()) projectDocURL = TQDir::cleanDirPath(m_part->project()->projectDirectory() + "/" + projectDocURL); diff --git a/parts/documentation/documentation_part.cpp b/parts/documentation/documentation_part.cpp index 9515fad7..75bb7c13 100644 --- a/parts/documentation/documentation_part.cpp +++ b/parts/documentation/documentation_part.cpp @@ -48,17 +48,17 @@ #include #include -#include "tdevplugininfo.h" -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevgenericfactory.h" -#include "tdevdocumentationplugin.h" +#include "kdevplugininfo.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevgenericfactory.h" +#include "kdevdocumentationplugin.h" #include "configwidgetproxy.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" #include "domutil.h" #include "urlutil.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" #include "documentation_widget.h" #include "docglobalconfigwidget.h" @@ -66,22 +66,22 @@ #include "contentsview.h" #include "find_documentation.h" -#include "TDevDocumentationIface.h" +#include "KDevDocumentationIface.h" #define GLOBALDOC_OPTIONS 1 #define PROJECTDOC_OPTIONS 2 -static const TDevPluginInfo data("tdevdocumentation"); +static const KDevPluginInfo data("kdevdocumentation"); -typedef TDevGenericFactory DocumentationFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevdocumentation, DocumentationFactory( data ) ) +typedef KDevGenericFactory DocumentationFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevdocumentation, DocumentationFactory( data ) ) DocumentationPart::DocumentationPart(TQObject *parent, const char *name, const TQStringList& ) - :TDevPlugin(&data, parent, name ? name : "DocumentationPart" ), + :KDevPlugin(&data, parent, name ? name : "DocumentationPart" ), m_projectDocumentationPlugin(0), m_userManualPlugin(0), m_hasIndex(false) { setInstance(DocumentationFactory::instance()); - setXMLFile("tdevpart_documentation.rc"); + setXMLFile("kdevpart_documentation.rc"); m_configProxy = new ConfigWidgetProxy(core()); m_configProxy->createGlobalConfigPage(i18n("Documentation"), GLOBALDOC_OPTIONS, info()->icon() ); @@ -109,7 +109,7 @@ DocumentationPart::DocumentationPart(TQObject *parent, const char *name, const T TQTimer::singleShot(0, this, TQT_SLOT(init())); - new TDevDocumentationIface(this); + new KDevDocumentationIface(this); } DocumentationPart::~DocumentationPart() @@ -250,12 +250,6 @@ void DocumentationPart::setupActions() "all possible sources of documentation like " "table of contents, index, man and info databases, " "Google, etc.")); - action = new TDEAction(i18n("TDevelop Programming Handbook"), 0, - this, TQT_SLOT(programmingHandbook()), - actionCollection(), "help_programming_handbook" ); - action->setToolTip(i18n("Open the TDevelop Programming Handbook")); - action->setWhatsThis(i18n("Open the TDevelop Programming Handbook

    Opens Open the TDevelop Programming Handbook.")); - } void DocumentationPart::emitBookmarkLocation(const TQString &title, const KURL &url) @@ -265,12 +259,12 @@ void DocumentationPart::emitBookmarkLocation(const TQString &title, const KURL & void DocumentationPart::searchInDocumentation() { - TQString word = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( word.isEmpty() ) { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "searchInDocumentation()" ); + callAssistant ( "KDevDocumentation", "searchInDocumentation()" ); else { mainWindow()->raiseView ( m_widget ); @@ -280,7 +274,7 @@ void DocumentationPart::searchInDocumentation() else { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "searchInDocumentation(TQString)", word ); + callAssistant ( "KDevDocumentation", "searchInDocumentation(TQString)", word ); else { mainWindow()->raiseView ( m_widget ); @@ -298,29 +292,24 @@ void DocumentationPart::searchInDocumentation(const TQString &term) void DocumentationPart::contextSearchInDocumentation() { if (isAssistantUsed()) - callAssistant("TDevDocumentation", "searchInDocumentation(TQString)", m_contextStr); + callAssistant("KDevDocumentation", "searchInDocumentation(TQString)", m_contextStr); else searchInDocumentation(m_contextStr); } -void DocumentationPart::programmingHandbook() -{ - kapp->invokeHelp (TQString::null, "tde_app_devel"); -} - void DocumentationPart::manPage() { - TQString word = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( isAssistantUsed() ) { if ( word.isEmpty() ) { - callAssistant ( "TDevDocumentation", "manPage()" ); + callAssistant ( "KDevDocumentation", "manPage()" ); } else { - callAssistant ( "TDevDocumentation", "manPage(TQString)", word ); + callAssistant ( "KDevDocumentation", "manPage(TQString)", word ); } } else @@ -334,17 +323,17 @@ void DocumentationPart::manPage() void DocumentationPart::infoPage() { - TQString word = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( isAssistantUsed() ) { if ( word.isEmpty() ) { - callAssistant ( "TDevDocumentation", "infoPage()" ); + callAssistant ( "KDevDocumentation", "infoPage()" ); } else { - callAssistant ( "TDevDocumentation", "infoPage(TQString)", word ); + callAssistant ( "KDevDocumentation", "infoPage(TQString)", word ); } } else @@ -371,7 +360,7 @@ void DocumentationPart::infoPage(const TQString &term) void DocumentationPart::contextManPage() { if (isAssistantUsed()) - callAssistant("TDevDocumentation", "manPage(TQString)", m_contextStr); + callAssistant("KDevDocumentation", "manPage(TQString)", m_contextStr); else manPage(m_contextStr); } @@ -379,7 +368,7 @@ void DocumentationPart::contextManPage() void DocumentationPart::contextInfoPage() { if (isAssistantUsed()) - callAssistant("TDevDocumentation", "infoPage(TQString)", m_contextStr); + callAssistant("KDevDocumentation", "infoPage(TQString)", m_contextStr); else infoPage(m_contextStr); } @@ -387,19 +376,19 @@ void DocumentationPart::contextInfoPage() void DocumentationPart::contextFindDocumentation() { if (isAssistantUsed()) - callAssistant("TDevDocumentation", "findInFinder(TQString)", m_contextStr); + callAssistant("KDevDocumentation", "findInFinder(TQString)", m_contextStr); else findInDocumentation(m_contextStr); } void DocumentationPart::findInDocumentation() { - TQString word = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( word.isEmpty() ) { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "findInFinder()" ); + callAssistant ( "KDevDocumentation", "findInFinder()" ); else { mainWindow()->raiseView ( m_widget ); @@ -409,7 +398,7 @@ void DocumentationPart::findInDocumentation() else { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "findInFinder(TQString)", word ); + callAssistant ( "KDevDocumentation", "findInFinder(TQString)", word ); else { mainWindow()->raiseView ( m_widget ); @@ -426,12 +415,12 @@ void DocumentationPart::findInDocumentation(const TQString &term) void DocumentationPart::lookInDocumentationIndex() { - TQString word = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( word.isEmpty() ) { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "lookupInIndex()" ); + callAssistant ( "KDevDocumentation", "lookupInIndex()" ); else { mainWindow()->raiseView ( m_widget ); @@ -441,7 +430,7 @@ void DocumentationPart::lookInDocumentationIndex() else { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "lookupInIndex(TQString)", word ); + callAssistant ( "KDevDocumentation", "lookupInIndex(TQString)", word ); else { mainWindow()->raiseView ( m_widget ); @@ -459,7 +448,7 @@ void DocumentationPart::lookInDocumentationIndex(const TQString &term) void DocumentationPart::contextLookInDocumentationIndex() { if (isAssistantUsed()) - callAssistant("TDevDocumentation", "lookupInIndex(TQString)", m_contextStr); + callAssistant("KDevDocumentation", "lookupInIndex(TQString)", m_contextStr); else lookInDocumentationIndex(m_contextStr); } @@ -575,11 +564,11 @@ void DocumentationPart::setContextFeature(ContextFeature feature, bool b) void DocumentationPart::projectOpened() { - TQString projectDocSystem = DomUtil::readEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docsystem"); - TQString projectDocURL = DomUtil::readEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docurl"); + TQString projectDocSystem = DomUtil::readEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docsystem"); + TQString projectDocURL = DomUtil::readEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docurl"); if (!projectDocURL.isEmpty()) projectDocURL = TQDir::cleanDirPath(project()->projectDirectory() + "/" + projectDocURL); - TQString userManualURL = DomUtil::readEntry(*(projectDom()), "/tdevdocumentation/projectdoc/usermanualurl"); + TQString userManualURL = DomUtil::readEntry(*(projectDom()), "/kdevdocumentation/projectdoc/usermanualurl"); for (TQValueList::const_iterator it = m_plugins.constBegin(); it != m_plugins.constEnd(); ++it) @@ -613,21 +602,21 @@ void DocumentationPart::saveProjectDocumentationInfo() { if (m_projectDocumentationPlugin) { - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docsystem", m_projectDocumentationPlugin->pluginName()); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docsystem", m_projectDocumentationPlugin->pluginName()); TQString relPath = URLUtil::extractPathNameRelative(project()->projectDirectory(), m_projectDocumentationPlugin->catalogURL()); - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docurl", relPath); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docurl", relPath); } else { - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docsystem", ""); - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docurl", ""); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docsystem", ""); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docurl", ""); } if (m_userManualPlugin) - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/usermanualurl", m_userManualPlugin->catalogURL()); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/usermanualurl", m_userManualPlugin->catalogURL()); else - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/usermanualurl", ""); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/usermanualurl", ""); } TQCString DocumentationPart::startAssistant() @@ -638,7 +627,7 @@ TQCString DocumentationPart::startAssistant() return lastAssistant; const char *function = 0; - TQString app = "tdevassistant"; + TQString app = "kdevassistant"; function = "start_service_by_desktop_name(TQString,TQStringList)"; TQStringList URLs; @@ -676,7 +665,7 @@ TQCString DocumentationPart::startAssistant() kdDebug() << dcopName.data() << endl; //@fixme: is there another way to wait for the remote object to be loaded - while (!TDEApplication::dcopClient()->remoteObjects(dcopName).contains("TDevDocumentation")) + while (!TDEApplication::dcopClient()->remoteObjects(dcopName).contains("KDevDocumentation")) usleep(500); } } @@ -685,8 +674,8 @@ TQCString DocumentationPart::startAssistant() bool DocumentationPart::isAssistantUsed() const { - // hack to solve BR #90334 - don't call tdevassistant via DCOP if we ARE tdevassistant - if ( kapp->instanceName().find("tdevassistant") != -1 ) + // hack to solve BR #90334 - don't call kdevassistant via DCOP if we ARE kdevassistant + if ( kapp->instanceName().find("kdevassistant") != -1 ) { return false; } @@ -697,7 +686,7 @@ bool DocumentationPart::isAssistantUsed() const void DocumentationPart::setAssistantUsed(bool b) { m_assistantUsed = b; - //use global config to store different settings for tdevassistant and tdevelop + //use global config to store different settings for kdevassistant and tdevelop TDEConfig *config = kapp->config(); config->setGroup("Documentation"); config->writeEntry("UseAssistant", isAssistantUsed()); @@ -750,7 +739,7 @@ void DocumentationPart::loadSettings() config->setGroup("Documentation"); m_assistantUsed = config->readBoolEntry("UseAssistant", false); - if (TQString(TDEGlobal::instance()->aboutData()->appName()) == "tdevassistant") + if (TQString(TDEGlobal::instance()->aboutData()->appName()) == "kdevassistant") { int page = config->readNumEntry("LastPage", 0); switch (page) diff --git a/parts/documentation/documentation_part.h b/parts/documentation/documentation_part.h index aafe1669..722ad4bd 100644 --- a/parts/documentation/documentation_part.h +++ b/parts/documentation/documentation_part.h @@ -17,11 +17,11 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef __TDEVPART_DOCUMENTATION_H__ -#define __TDEVPART_DOCUMENTATION_H__ +#ifndef __KDEVPART_DOCUMENTATION_H__ +#define __KDEVPART_DOCUMENTATION_H__ #include -#include +#include class FindDocumentation; @@ -39,7 +39,7 @@ class TQPopupMenu; /* Please read the README.dox file for more info about this part */ -class DocumentationPart : public TDevPlugin +class DocumentationPart : public KDevPlugin { Q_OBJECT @@ -69,7 +69,6 @@ public slots: void searchInDocumentation(); void searchInDocumentation(const TQString &term); void contextSearchInDocumentation(); - void programmingHandbook(); void manPage(); void manPage(const TQString &term); void contextManPage(); diff --git a/parts/documentation/documentation_widget.cpp b/parts/documentation/documentation_widget.cpp index b69e80a5..b1ab69ca 100644 --- a/parts/documentation/documentation_widget.cpp +++ b/parts/documentation/documentation_widget.cpp @@ -31,8 +31,8 @@ #include #include -#include -#include +#include +#include #include "documentation_part.h" #include "contentsview.h" diff --git a/parts/documentation/documentation_widget.h b/parts/documentation/documentation_widget.h index fccd03b9..a813b393 100644 --- a/parts/documentation/documentation_widget.h +++ b/parts/documentation/documentation_widget.h @@ -23,7 +23,7 @@ #include class FindDocumentation; -class TDevProject; +class KDevProject; class DocumentationPart; class ContentsView; class IndexView; diff --git a/parts/documentation/docutils.cpp b/parts/documentation/docutils.cpp index ba00ea83..5360a73f 100644 --- a/parts/documentation/docutils.cpp +++ b/parts/documentation/docutils.cpp @@ -27,9 +27,9 @@ #include #include -#include +#include -#include "tdevdocumentationplugin.h" +#include "kdevdocumentationplugin.h" #include "documentation_part.h" TQString DocUtils::noEnvURL(const TQString &url) diff --git a/parts/documentation/editcatalogdlg.cpp b/parts/documentation/editcatalogdlg.cpp index 2fb81fec..8bdc19d5 100644 --- a/parts/documentation/editcatalogdlg.cpp +++ b/parts/documentation/editcatalogdlg.cpp @@ -26,7 +26,7 @@ #include #include "docutils.h" -#include "tdevdocumentationplugin.h" +#include "kdevdocumentationplugin.h" EditCatalogDlg::EditCatalogDlg(DocumentationPlugin *plugin, TQWidget* parent, const char* name, bool modal, WFlags fl) diff --git a/parts/documentation/find_documentation.cpp b/parts/documentation/find_documentation.cpp index 2f730b81..ebddcd4c 100644 --- a/parts/documentation/find_documentation.cpp +++ b/parts/documentation/find_documentation.cpp @@ -29,8 +29,8 @@ #include #include -#include -#include +#include +#include #include "documentation_widget.h" #include "documentation_part.h" diff --git a/parts/documentation/indexview.cpp b/parts/documentation/indexview.cpp index 25762451..cae33db5 100644 --- a/parts/documentation/indexview.cpp +++ b/parts/documentation/indexview.cpp @@ -30,8 +30,8 @@ #include #include -#include -#include +#include +#include #include "docutils.h" #include "selecttopic.h" diff --git a/parts/documentation/interfaces/CMakeLists.txt b/parts/documentation/interfaces/CMakeLists.txt index 2e1f0ae3..f4a2ff08 100644 --- a/parts/documentation/interfaces/CMakeLists.txt +++ b/parts/documentation/interfaces/CMakeLists.txt @@ -23,7 +23,7 @@ link_directories( ##### headers ################################### install( FILES - tdevdocumentationplugin.h + kdevdocumentationplugin.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/parts/documentation ) @@ -37,7 +37,7 @@ install( FILES ##### documentation_interfaces (shared) ######### tde_add_library( documentation_interfaces SHARED AUTOMOC - SOURCES tdevdocumentationplugin.cpp + SOURCES kdevdocumentationplugin.cpp VERSION 0.0.0 LINK tdeio-shared DESTINATION ${LIB_INSTALL_DIR} diff --git a/parts/documentation/interfaces/Makefile.am b/parts/documentation/interfaces/Makefile.am index b0feb598..f128dabc 100644 --- a/parts/documentation/interfaces/Makefile.am +++ b/parts/documentation/interfaces/Makefile.am @@ -5,12 +5,12 @@ partincludedirdir = $(includedir)/tdevelop/parts/documentation lib_LTLIBRARIES = libdocumentation_interfaces.la libdocumentation_interfaces_la_LDFLAGS = $(all_libraries) libdocumentation_interfaces_la_LIBADD = $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEIO) -libdocumentation_interfaces_la_SOURCES = tdevdocumentationplugin.cpp -partincludedir_HEADERS = tdevdocumentationplugin.h +libdocumentation_interfaces_la_SOURCES = kdevdocumentationplugin.cpp +partincludedir_HEADERS = kdevdocumentationplugin.h servicetypedir = $(kde_servicetypesdir) servicetype_DATA = tdevelopdocumentationplugins.desktop -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces -DOXYGEN_PROJECTNAME = TDevelop Documentation Part Interfaces Library -DOXYGEN_DOCDIRPREFIX = tdevdoc +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces +DOXYGEN_PROJECTNAME = KDevelop Documentation Part Interfaces Library +DOXYGEN_DOCDIRPREFIX = kdevdoc include ../../../Doxyfile.am diff --git a/parts/documentation/interfaces/kdevdocumentationplugin.cpp b/parts/documentation/interfaces/kdevdocumentationplugin.cpp new file mode 100644 index 00000000..afc9abad --- /dev/null +++ b/parts/documentation/interfaces/kdevdocumentationplugin.cpp @@ -0,0 +1,721 @@ +/* This file is part of the KDE project + Copyright (C) 2004 by Alexander Dymo + + 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 "kdevdocumentationplugin.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +//class DocumentationItem + +DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListView *parent, + const TQString &name) + :TDEListViewItem(parent, name), m_type(type) +{ + init(); +} + +DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListViewItem *parent, + const TQString &name) + :TDEListViewItem(parent, name), m_type(type) +{ + init(); +} + +DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListView *parent, + TDEListViewItem *after, const TQString &name) + :TDEListViewItem(parent, after, name), m_type(type) +{ + init(); +} + +DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListViewItem * parent, + TDEListViewItem * after, const TQString & name ) + :TDEListViewItem(parent, after, name), m_type(type) +{ + init(); +} + + +void DocumentationItem::init( ) +{ + TQString icon; + + switch (m_type) + { + case Collection: + case Catalog: + icon = "folder"; + break; + case Book: + icon = "contents"; + break; + default: + icon = "document"; + } + + setPixmap(0, SmallIcon(icon)); +} + + + + + +//class DocumentationCatalogItem + + +DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, + TDEListView *parent, const TQString &name) + :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), + isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) +{ + setExpandable(true); + m_plugin->addCatalog(this); +} + +DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, + DocumentationItem *parent, const TQString &name) + :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), + isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) +{ + setExpandable(true); + m_plugin->addCatalog(this); +} + +DocumentationCatalogItem::~ DocumentationCatalogItem( ) +{ + m_plugin->clearCatalog(this); +} + +void DocumentationCatalogItem::setOpen(bool o) +{ + if (o) + { + load(); + } + DocumentationItem::setOpen(o); +} + +void DocumentationCatalogItem::load() +{ +if(isLoaded) +return; + + plugin()->createTOC(this); + isLoaded = true; +} + +void DocumentationCatalogItem::activate() +{ + if (!isActivated) + { + plugin()->setCatalogURL(this); + isActivated = true; + } + DocumentationItem::activate(); +} + + + + +//class IndexItemProto + +IndexItemProto::IndexItemProto(DocumentationPlugin *plugin, DocumentationCatalogItem *catalog, + IndexBox *listbox, const TQString &text, const TQString &description) + : m_listbox(listbox), m_text(text), m_description(description) +{ + plugin->indexes[catalog].append(this); + m_listbox->addIndexItem(this); +} + +IndexItemProto::~IndexItemProto() +{ + m_listbox->removeIndexItem(this); +} + + +//class IndexItem + +IndexItem::IndexItem(IndexBox *listbox, const TQString &text) + :TQListBoxText(listbox, text), m_listbox(listbox) +{ +} + +IndexItem::List IndexItem::urls() const +{ + List urlList; + TQValueList itemProtos = m_listbox->items[text()]; + for (TQValueList::const_iterator it = itemProtos.begin(); + it != itemProtos.end(); ++it) + urlList.append(tqMakePair((*it)->description(), (*it)->url())); + return urlList; +} + + + + +//class ConfigurationItem + +ConfigurationItem::ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, + bool indexPossible, bool fullTextSearchPossible) + :TQCheckListItem(parent, "", TQCheckListItem::CheckBox), m_title(title), m_url(url), + m_origTitle(title), m_contents(true), m_index(false), m_fullTextSearch(false), + m_indexPossible(indexPossible), m_fullTextSearchPossible(fullTextSearchPossible), + m_docPlugin( plugin ) +{ + setText(3, m_title); + setText(4, m_url); +} + +void ConfigurationItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, + int width, int align) +{ + if ( (column == 0) || (column == 1) || (column == 2) ) + { + if ( !p ) + return; + + TQListView *lv = listView(); + if ( !lv ) + return; + + const BackgroundMode bgmode = lv->viewport()->backgroundMode(); + const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); + p->fillRect(0, 0, width, height(), cg.brush(crole)); + + TQFontMetrics fm(lv->fontMetrics()); + int boxsize = lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); + int marg = lv->itemMargin(); + int styleflags = TQStyle::Style_Default; + + if (((column == 0) && m_contents) || ((column == 1) && m_index) || ((column == 2) && m_fullTextSearch)) + styleflags |= TQStyle::Style_On; + else + styleflags |= TQStyle::Style_Off; + if ((column == 0) || ((column == 1) && m_indexPossible) || ((column == 2) && m_fullTextSearchPossible)) + styleflags |= TQStyle::Style_Enabled; + + int x = 0; + int y = 0; + x += 3; + if (align & AlignVCenter) + y = ((height() - boxsize) / 2) + marg; + else + y = (fm.height() + 2 + marg - boxsize) / 2; + + TQStyleOption opt(this); + lv->style().tqdrawPrimitive(TQStyle::PE_CheckListIndicator, p, + TQRect(x, y, boxsize, fm.height() + 2 + marg), cg, styleflags, opt); + + return; + } + TQListViewItem::paintCell(p, cg, column, width, align); +} + +int ConfigurationItem::width(const TQFontMetrics &fm, const TQListView *lv, int c) const +{ + if ((c == 0) || (c == 1) || (c == 2)) + return lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; + return TQListViewItem::width(fm, lv, c); +} + + + + + + + + +//class DocumentationPlugin + +DocumentationPlugin::DocumentationPlugin(TDEConfig *pluginConfig, TQObject *parent, const char *name) + :TQObject(parent, name), config(pluginConfig), m_indexCreated(false) +{ +} + +DocumentationPlugin::~DocumentationPlugin() +{ +} + +void DocumentationPlugin::autoSetup() +{ + config->setGroup("General"); + if ( ! config->readBoolEntry("Autosetup", false) ) + { + autoSetupPlugin(); + config->setGroup("General"); + config->writeEntry("Autosetup", true); + config->sync(); + } +} + +void DocumentationPlugin::reload() +{ + clear(); + for (TQValueList::iterator it = catalogs.begin(); + it != catalogs.end(); ++it) + { + createTOC(*it); + } +} + +void DocumentationPlugin::clear() +{ + for (TQValueList::iterator it = catalogs.begin(); + it != catalogs.end(); ++it) + { + clearCatalog(*it); + } +} + +void DocumentationPlugin::clearCatalog(DocumentationCatalogItem *item) +{ + //clear named catalog map + for (TQMap::iterator it = namedCatalogs.begin(); + it != namedCatalogs.end(); ++it) + { + if (it.data() == item) + { + namedCatalogs.remove(it); + break; + } + } + //clear indexes for catalog + TQValueList idx = indexes[item]; + for (TQValueList::iterator it = idx.begin(); it != idx.end(); ++it) + { + delete *it; + } + indexes.remove(item); + + //remove catalog + catalogs.remove(item); +} + +void DocumentationPlugin::createIndex(IndexBox *index) +{ + if (m_indexCreated) + return; + + for (TQValueList::iterator it = catalogs.begin(); + it != catalogs.end(); ++it) + { + loadIndex(index, *it); + } + m_indexCreated = true; +} + +void DocumentationPlugin::cacheIndex(DocumentationCatalogItem *item) +{ + kdDebug() << "Creating index cache for " << item->text(0) << endl; + + TQString cacheName = locateLocal("data", TQString("kdevdocumentation/index/cache_") + item->text(0)); + TQFile cacheFile(cacheName); + if (!cacheFile.open(IO_WriteOnly)) + return; + + TQTextStream str(&cacheFile); + str.setEncoding(TQTextStream::Unicode); + str << CACHE_VERSION << endl; + + TQValueList catalogIndexes = indexes[item]; + for (TQValueList::const_iterator it = catalogIndexes.constBegin(); + it != catalogIndexes.constEnd(); ++it) + { + str << (*it)->text() << endl; + str << (*it)->description() << endl; + str << (*it)->url().url() << endl; + } + + cacheFile.close(); +} + +bool DocumentationPlugin::loadCachedIndex(IndexBox *index, DocumentationCatalogItem *item) +{ + TQString cacheName = locateLocal("data", TQString("kdevdocumentation/index/cache_") + item->cacheVersion() + item->text(0)); + TQFile cacheFile(cacheName); + if (!cacheFile.open(IO_ReadOnly)) + return false; + + kdDebug() << "Using cached index for item: " << item->text(0) << endl; + + TQTextStream str(&cacheFile); + str.setEncoding(TQTextStream::Unicode); + TQString cache = str.read(); + TQStringList cacheList = TQStringList::split("\n", cache, true); + TQString ver = cacheList.first(); + if (ver != CACHE_VERSION) + { + kdDebug() << "Wrong cache version: " << ver << endl; + return false; + } + TQStringList::const_iterator it = cacheList.begin(); + it++; + TQString s[3]; int c = 0; + for (; it != cacheList.end(); ++it) + { + s[c] = *it; + if (c == 2) + { + IndexItemProto *ii = new IndexItemProto(this, item, index, s[0], s[1]); + ii->addURL(KURL(s[2])); + c = 0; + } + else c++; + } + cacheFile.close(); + + return true; +} + +void DocumentationPlugin::addCatalog(DocumentationCatalogItem *item) +{ + catalogs.append(item); + namedCatalogs[item->text(0)] = item; +// indexes[item] = TQValueList(); +} + +void DocumentationPlugin::addCatalogConfiguration(TDEListView *configurationView, + const TQString &title, const TQString &url) +{ + new ConfigurationItem(configurationView, this, title, url, + hasCapability(Index), hasCapability(FullTextSearch)); +} + +void DocumentationPlugin::editCatalogConfiguration(ConfigurationItem *configurationItem, + const TQString &title, const TQString &url) +{ + configurationItem->setTitle(title); + configurationItem->setURL(url); +} + +void DocumentationPlugin::deleteCatalogConfiguration(const ConfigurationItem *const configurationItem) +{ + deletedConfigurationItems << configurationItem->title(); +} + +void DocumentationPlugin::clearCatalogIndex(DocumentationCatalogItem *item) +{ + //clear indexes for catalog + TQValueList idx = indexes[item]; + for (TQValueList::iterator it = idx.begin(); it != idx.end(); ++it) + { + delete *it; + } + indexes.remove(item); +} + +void DocumentationPlugin::loadIndex(IndexBox *index, DocumentationCatalogItem *item) +{ + if (!indexEnabled(item)) + return; + if (!needRefreshIndex(item) && loadCachedIndex(index, item)) + return; + createIndex(index, item); + cacheIndex(item); +} + +void DocumentationPlugin::init(TDEListView *contents) +{ + config->setGroup("Locations"); + TQMap entryMap = config->entryMap("Locations"); + + for (TQMap::const_iterator it = entryMap.begin(); + it != entryMap.end(); ++it) + { + if (catalogEnabled(it.key())) + createCatalog(contents, it.key(), config->readPathEntry(it.key())); + } +} + +void DocumentationPlugin::reinit(TDEListView *contents, IndexBox *index, TQStringList restrictions) +{ + config->setGroup("Locations"); + TQMap entryMap = config->entryMap("Locations"); + + //remove deleted in configuration catalogs + for (TQStringList::const_iterator it = deletedConfigurationItems.constBegin(); + it != deletedConfigurationItems.constEnd(); ++it) + { + if (namedCatalogs.contains(*it)) + delete namedCatalogs[*it]; + } + deletedConfigurationItems.clear(); + + //update configuration + for (TQMap::const_iterator it = entryMap.begin(); + it != entryMap.end(); ++it) + { + config->setGroup("Locations"); + if (restrictions.contains(it.key()) || (!catalogEnabled(it.key()))) + { + if (namedCatalogs.contains(it.key())) + delete namedCatalogs[it.key()]; + } + else + { + kdDebug() << "updating 1" << endl; + if (!namedCatalogs.contains(it.key())) //create catalog if it does not exist + { + DocumentationCatalogItem * item = createCatalog(contents, it.key(), config->readPathEntry(it.key())); + loadIndex(index, item); + index->setDirty(true); +// index->refill(indexes[item]); + } + else if (!indexEnabled(namedCatalogs[it.key()])) //clear index if it is disabled in configuration + { + kdDebug() << " updating: clearCatalogIndex" << endl; + clearCatalogIndex(namedCatalogs[it.key()]); + } + else if ( (indexEnabled(namedCatalogs[it.key()])) //index is requested in configuration but does not yet exist + && (!indexes.contains(namedCatalogs[it.key()])) ) + { + kdDebug() << " index requested " << endl; + loadIndex(index, namedCatalogs[it.key()]); + index->setDirty(true); + } + m_indexCreated = true; + } + } +} + +void DocumentationPlugin::loadCatalogConfiguration(TDEListView *configurationView) +{ + config->setGroup("Locations"); + TQMap entryMap = config->entryMap("Locations"); + + for (TQMap::const_iterator it = entryMap.begin(); + it != entryMap.end(); ++it) + { + if (namedCatalogs.contains(it.key()) + && namedCatalogs[it.key()]->isProjectDocumentationItem()) + continue; + + config->setGroup("Locations"); + ConfigurationItem *item = new ConfigurationItem(configurationView, this, it.key(), + config->readPathEntry(it.key()), + hasCapability(Index), hasCapability(FullTextSearch)); + config->setGroup("TOC Settings"); + item->setContents(config->readBoolEntry(item->title(), true)); + config->setGroup("Index Settings"); + item->setIndex(config->readBoolEntry(item->title(), false)); + config->setGroup("Search Settings"); + item->setFullTextSearch(config->readBoolEntry(item->title(), false)); + } +} + +void DocumentationPlugin::saveCatalogConfiguration(TDEListView *configurationView) +{ + config->setGroup("Locations"); + + for (TQStringList::const_iterator it = deletedConfigurationItems.constBegin(); + it != deletedConfigurationItems.constEnd(); ++it) + { + config->deleteEntry(*it); + } + + TQListViewItemIterator it(configurationView); + while (it.current()) + { + ConfigurationItem *confItem = dynamic_cast(it.current()); + if ( confItem->docPlugin() != this ) + { + ++it; + continue; + } + + config->setGroup("Locations"); + if (confItem->isChanged()) + config->deleteEntry(confItem->origTitle()); + config->writePathEntry(confItem->title(), confItem->url()); + + config->setGroup("TOC Settings"); + if (confItem->isChanged()) + config->deleteEntry(confItem->origTitle()); + config->writeEntry(confItem->title(), confItem->contents()); + + config->setGroup("Index Settings"); + if (confItem->isChanged()) + config->deleteEntry(confItem->origTitle()); + config->writeEntry(confItem->title(), confItem->index()); + + config->setGroup("Search Settings"); + if (confItem->isChanged()) + config->deleteEntry(confItem->origTitle()); + config->writeEntry(confItem->title(), confItem->fullTextSearch()); + + ++it; + } + config->sync(); +} + +void DocumentationPlugin::setIndexEnabled( DocumentationCatalogItem * item, bool e ) +{ + TQString group = config->group(); + config->setGroup("Index Settings"); + config->writeEntry(item->text(0), e); + config->setGroup(group); +} + +bool DocumentationPlugin::indexEnabled( DocumentationCatalogItem * item ) const +{ + TQString group = config->group(); + config->setGroup("Index Settings"); + bool b = config->readBoolEntry(item->text(0), false); + config->setGroup(group); + return b; +} + +bool DocumentationPlugin::catalogEnabled(const TQString &name) const +{ + TQString group = config->group(); + config->setGroup("TOC Settings"); + bool b = config->readBoolEntry(name, true); + config->setGroup(group); + return b; +} + +void DocumentationPlugin::setCatalogEnabled(const TQString &name, bool e) +{ + TQString group = config->group(); + config->setGroup("TOC Settings"); + config->writeEntry(name, e); + config->setGroup(group); +} + + + + +//class IndexBox + +IndexBox::IndexBox(TQWidget *parent, const char *name) + :TDEListBox(parent, name), m_dirty(false) +{ +} + +void IndexBox::addIndexItem(IndexItemProto *item) +{ + items[item->text()].append(item); +} + +void IndexBox::removeIndexItem(IndexItemProto *item) +{ + TQString text = item->text(); + items[text].remove(item); + if (items[text].count() == 0) + { + items.remove(text); + TQListBoxItem *item = findItem(text, TQt::CaseSensitive | TQt::ExactMatch); + if (item) + delete item; + } +} + +void IndexBox::fill() +{ + for (TQMap >::const_iterator it = items.begin(); + it != items.end(); ++it) + { + new IndexItem(this, it.key()); + } +} + +void IndexBox::setDirty(bool dirty) +{ + m_dirty = dirty; +} + +void IndexBox::refill() +{ + if (m_dirty) + { + clear(); + fill(); + setDirty(false); + } +} + + +ProjectDocumentationPlugin::ProjectDocumentationPlugin(DocumentationPlugin *docPlugin, DocumentationPlugin::ProjectDocType type) + :TQObject(0, 0), m_docPlugin(docPlugin), m_catalog(0), m_type(type), m_contents(0), m_index(0) +{ + kdDebug() << "ProjectDocumentationPlugin::ProjectDocumentationPlugin for type " << type << endl; + + m_watch = new KDirWatch(this); + connect(m_watch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(reinit())); + m_watch->startScan(); +} + +ProjectDocumentationPlugin::~ProjectDocumentationPlugin() +{ + deinit(); +} + +void ProjectDocumentationPlugin::init(TDEListView *contents, IndexBox *index, const TQString &url) +{ + m_contents = contents; + m_index = index; + m_url = url; + + if (m_catalog) + deinit(); + m_catalog = m_docPlugin->createCatalog(contents, + m_type == DocumentationPlugin::APIDocs ? i18n("Project API Documentation") + : i18n("Project User Manual"), url); + if (m_catalog) + { + m_catalog->setProjectDocumentationItem(true); + m_watch->addFile(url); + } +} + +void ProjectDocumentationPlugin::reinit() +{ + deinit(); + if (m_contents != 0 && m_index != 0 && m_url != 0) + init(m_contents, m_index, m_url); +} + +void ProjectDocumentationPlugin::deinit() +{ + m_watch->removeFile(m_url); + delete m_catalog; + m_catalog = 0; +} + +TQString ProjectDocumentationPlugin::pluginName() const +{ + return m_docPlugin->pluginName(); +} + +TQString ProjectDocumentationPlugin::catalogURL() const +{ + return m_url; +} + +#include "kdevdocumentationplugin.moc" diff --git a/parts/documentation/interfaces/kdevdocumentationplugin.h b/parts/documentation/interfaces/kdevdocumentationplugin.h new file mode 100644 index 00000000..a5dbe458 --- /dev/null +++ b/parts/documentation/interfaces/kdevdocumentationplugin.h @@ -0,0 +1,423 @@ +/* This file is part of the KDE project + Copyright (C) 2004 by Alexander Dymo + + 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 KDEV_DOC_PLUGIN_H +#define KDEV_DOC_PLUGIN_H + +#include +#include +#include + +#include +#include +#include +#include + +#define CACHE_VERSION "3" + +/**Documentation list item. +Stores the type of a documentation it represents and an URL.*/ +class DocumentationItem: public TDEListViewItem +{ +public: + /**Type of documentation which is represented by this item.*/ + enum Type { + Collection /** URL; + typedef TQValueList List; + + IndexItem(IndexBox *listbox, const TQString &text); + + List urls() const; + +private: + IndexBox *m_listbox; +}; + +/**Documentation index view.*/ +class IndexBox: public TDEListBox{ +public: + IndexBox(TQWidget *parent = 0, const char *name = 0); + + virtual void addIndexItem(IndexItemProto *item); + virtual void removeIndexItem(IndexItemProto *item); + virtual void fill(); + virtual void refill(); + virtual void setDirty(bool dirty); +// virtual void refill(TQValueList &items); + +private: + TQMap > items; + friend class IndexItem; + + bool m_dirty; +}; + +class TQPainter; +class TQColorGroup; +class TQFontMetrics; +class DocumentationPlugin; + +/**Documentation configuration item.*/ +class ConfigurationItem: public TQCheckListItem +{ +public: + ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, + bool indexPossible, bool fullTextSearchPossible); + + virtual TQString title() const { return m_title; } + virtual void setTitle(const TQString title) { setText(3, m_title = title); } + virtual TQString url() const { return m_url; } + virtual void setURL(const TQString url) { setText(4, m_url = url); } + + virtual bool isChanged() const { return m_title == m_origTitle; } + virtual TQString origTitle() const {return m_origTitle; } + + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); + virtual int width(const TQFontMetrics &fm, const TQListView *lv, int c) const; + + bool contents() const { return m_contents; } + void setContents(bool contents) { m_contents = contents; } + bool index() const { return m_index; } + void setIndex(bool index) { m_index = index; } + bool fullTextSearch() const { return m_fullTextSearch; } + void setFullTextSearch(bool fullTextSearch) { m_fullTextSearch = fullTextSearch; } + + bool indexPossible() const { return m_indexPossible; } + bool fullTextSearchPossible() const { return m_fullTextSearchPossible; } + + DocumentationPlugin * docPlugin() { return m_docPlugin; } + +private: + TQString m_title; + TQString m_url; + TQString m_origTitle; + + bool m_contents; + bool m_index; + bool m_fullTextSearch; + + bool m_indexPossible; + bool m_fullTextSearchPossible; + + DocumentationPlugin * m_docPlugin; +}; + + +class ProjectDocumentationPlugin; + +/** +@short Documentation Plugin Interface + +All KDevelop documentation plugins must implement this interface. +Documentation plugin handles certain documentation type. It provides +methods to load documentation catalogs and indexes for a documentation +of that type. It also has methods to configure catalogs and provides +a list of URL's for the full text search tool. +*/ +class DocumentationPlugin: public TQObject +{ + Q_OBJECT + +public: + /**Capability of documentation plugin.*/ + enum Capability { Index=1 /** catalogLocatorProps() = 0; + /**Returns a title of catalog defined by an url parameter.*/ + virtual TQString catalogTitle(const TQString &url) = 0; + + /**Reloads documentation catalogs and indices.*/ + virtual void reload(); + /**Clears documentation catalogs and indices.*/ + virtual void clear(); + + /**Checks if documentation plugin has given capability.*/ + bool hasCapability(Capability cap) const { return m_capabilities & cap; } + + /**Sets dirty flag for all indices. Index caching algorythm will update + the cache next time @ref createIndex is called.*/ + void setDirtyIndex(bool dirty) { m_indexCreated = dirty; } + + /**Caches index for documentation catalog. Reimplement this only if custom + caching algorythm is used (do not forget to reimplement also @ref loadCachedIndex + and @ref createIndex).*/ + virtual void cacheIndex(DocumentationCatalogItem *item); + /**Loads index from the cache. Reimplement this only if custom + caching algorythm is used (do not forget to reimplement also @ref cacheIndex + and @ref createIndex).*/ + virtual bool loadCachedIndex(IndexBox *index, DocumentationCatalogItem *item); + + /**Returns associated project documentation plugin. Default implementation returns zero. + Reimplement this if the documentation plugin can also handle project documentation.*/ + virtual ProjectDocumentationPlugin *projectDocumentationPlugin(ProjectDocType /* type */) { return 0; } + +public slots: + /**Creates index and fills index listbox. Reimplement this only if custom + caching algorythm is used (do not forget to reimplement also @ref cacheIndex + and @ref loadCachedIndex).*/ + virtual void createIndex(IndexBox *index); + +protected: + /**A list of loaded documentation catalogs.*/ + TQValueList catalogs; + /**A map of names of loaded documentation catalogs.*/ + TQMap namedCatalogs; + /**A map of indices of loaded documentation catalogs.*/ + TQMap > indexes; + + /**Sets capabilities of documentation plugin.*/ + void setCapabilities(int caps) { m_capabilities = caps; } + /**Clears index of given catalog.*/ + virtual void clearCatalogIndex(DocumentationCatalogItem *item); + /**Loads index from cache or creates and caches it if does not exist.*/ + void loadIndex(IndexBox *index, DocumentationCatalogItem *item); + + /**Stores items deleted from configuration. @ref saveCatalogConfiguration + uses this to remove entries from configuration file.*/ + TQStringList deletedConfigurationItems; + + /**Configuration object used by a plugin.*/ + TDEConfig *config; + +private: + /**Adds catalog item to catalogs, namedCatalogs and indexes lists and maps.*/ + virtual void addCatalog(DocumentationCatalogItem *item); + /**Removes catalog item from catalogs, namedCatalogs and indexes lists and maps.*/ + virtual void clearCatalog(DocumentationCatalogItem *item); + + int m_capabilities; + bool m_indexCreated; + + +friend class IndexItemProto; +friend class DocumentationCatalogItem; +}; + + +/** +@short Project documentation plugin + +Represents functionality to display project documentation catalog and index in documentation browser. +*/ +class ProjectDocumentationPlugin: public TQObject { + Q_OBJECT + +public: + ProjectDocumentationPlugin(DocumentationPlugin *docPlugin, DocumentationPlugin::ProjectDocType type); + virtual ~ProjectDocumentationPlugin(); + + /**Initializes project documentation plugin - creates documentation catalog.*/ + virtual void init(TDEListView *contents, IndexBox *index, const TQString &url); + /**Deinitializes project documentation plugin - removes documentation catalog.*/ + virtual void deinit(); + + TQString pluginName() const; + TQString catalogURL() const; + +public slots: + /**Performs reinitialization if project documentation has changed (after building api documentation).*/ + virtual void reinit(); + +protected: + DocumentationPlugin *m_docPlugin; + DocumentationCatalogItem *m_catalog; + +private: + DocumentationPlugin::ProjectDocType m_type; + + class KDirWatch *m_watch; + class TDEListView *m_contents; + class IndexBox *m_index; + TQString m_url; +}; + +#endif diff --git a/parts/documentation/interfaces/tdevdocumentationplugin.cpp b/parts/documentation/interfaces/tdevdocumentationplugin.cpp deleted file mode 100644 index f3c20841..00000000 --- a/parts/documentation/interfaces/tdevdocumentationplugin.cpp +++ /dev/null @@ -1,721 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 by Alexander Dymo - - 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 "tdevdocumentationplugin.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -//class DocumentationItem - -DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListView *parent, - const TQString &name) - :TDEListViewItem(parent, name), m_type(type) -{ - init(); -} - -DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListViewItem *parent, - const TQString &name) - :TDEListViewItem(parent, name), m_type(type) -{ - init(); -} - -DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListView *parent, - TDEListViewItem *after, const TQString &name) - :TDEListViewItem(parent, after, name), m_type(type) -{ - init(); -} - -DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListViewItem * parent, - TDEListViewItem * after, const TQString & name ) - :TDEListViewItem(parent, after, name), m_type(type) -{ - init(); -} - - -void DocumentationItem::init( ) -{ - TQString icon; - - switch (m_type) - { - case Collection: - case Catalog: - icon = "folder"; - break; - case Book: - icon = "contents"; - break; - default: - icon = "document"; - } - - setPixmap(0, SmallIcon(icon)); -} - - - - - -//class DocumentationCatalogItem - - -DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, - TDEListView *parent, const TQString &name) - :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), - isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) -{ - setExpandable(true); - m_plugin->addCatalog(this); -} - -DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, - DocumentationItem *parent, const TQString &name) - :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), - isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) -{ - setExpandable(true); - m_plugin->addCatalog(this); -} - -DocumentationCatalogItem::~ DocumentationCatalogItem( ) -{ - m_plugin->clearCatalog(this); -} - -void DocumentationCatalogItem::setOpen(bool o) -{ - if (o) - { - load(); - } - DocumentationItem::setOpen(o); -} - -void DocumentationCatalogItem::load() -{ -if(isLoaded) -return; - - plugin()->createTOC(this); - isLoaded = true; -} - -void DocumentationCatalogItem::activate() -{ - if (!isActivated) - { - plugin()->setCatalogURL(this); - isActivated = true; - } - DocumentationItem::activate(); -} - - - - -//class IndexItemProto - -IndexItemProto::IndexItemProto(DocumentationPlugin *plugin, DocumentationCatalogItem *catalog, - IndexBox *listbox, const TQString &text, const TQString &description) - : m_listbox(listbox), m_text(text), m_description(description) -{ - plugin->indexes[catalog].append(this); - m_listbox->addIndexItem(this); -} - -IndexItemProto::~IndexItemProto() -{ - m_listbox->removeIndexItem(this); -} - - -//class IndexItem - -IndexItem::IndexItem(IndexBox *listbox, const TQString &text) - :TQListBoxText(listbox, text), m_listbox(listbox) -{ -} - -IndexItem::List IndexItem::urls() const -{ - List urlList; - TQValueList itemProtos = m_listbox->items[text()]; - for (TQValueList::const_iterator it = itemProtos.begin(); - it != itemProtos.end(); ++it) - urlList.append(tqMakePair((*it)->description(), (*it)->url())); - return urlList; -} - - - - -//class ConfigurationItem - -ConfigurationItem::ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, - bool indexPossible, bool fullTextSearchPossible) - :TQCheckListItem(parent, "", TQCheckListItem::CheckBox), m_title(title), m_url(url), - m_origTitle(title), m_contents(true), m_index(false), m_fullTextSearch(false), - m_indexPossible(indexPossible), m_fullTextSearchPossible(fullTextSearchPossible), - m_docPlugin( plugin ) -{ - setText(3, m_title); - setText(4, m_url); -} - -void ConfigurationItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, - int width, int align) -{ - if ( (column == 0) || (column == 1) || (column == 2) ) - { - if ( !p ) - return; - - TQListView *lv = listView(); - if ( !lv ) - return; - - const BackgroundMode bgmode = lv->viewport()->backgroundMode(); - const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); - p->fillRect(0, 0, width, height(), cg.brush(crole)); - - TQFontMetrics fm(lv->fontMetrics()); - int boxsize = lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); - int marg = lv->itemMargin(); - int styleflags = TQStyle::Style_Default; - - if (((column == 0) && m_contents) || ((column == 1) && m_index) || ((column == 2) && m_fullTextSearch)) - styleflags |= TQStyle::Style_On; - else - styleflags |= TQStyle::Style_Off; - if ((column == 0) || ((column == 1) && m_indexPossible) || ((column == 2) && m_fullTextSearchPossible)) - styleflags |= TQStyle::Style_Enabled; - - int x = 0; - int y = 0; - x += 3; - if (align & AlignVCenter) - y = ((height() - boxsize) / 2) + marg; - else - y = (fm.height() + 2 + marg - boxsize) / 2; - - TQStyleOption opt(this); - lv->style().tqdrawPrimitive(TQStyle::PE_CheckListIndicator, p, - TQRect(x, y, boxsize, fm.height() + 2 + marg), cg, styleflags, opt); - - return; - } - TQListViewItem::paintCell(p, cg, column, width, align); -} - -int ConfigurationItem::width(const TQFontMetrics &fm, const TQListView *lv, int c) const -{ - if ((c == 0) || (c == 1) || (c == 2)) - return lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; - return TQListViewItem::width(fm, lv, c); -} - - - - - - - - -//class DocumentationPlugin - -DocumentationPlugin::DocumentationPlugin(TDEConfig *pluginConfig, TQObject *parent, const char *name) - :TQObject(parent, name), config(pluginConfig), m_indexCreated(false) -{ -} - -DocumentationPlugin::~DocumentationPlugin() -{ -} - -void DocumentationPlugin::autoSetup() -{ - config->setGroup("General"); - if ( ! config->readBoolEntry("Autosetup", false) ) - { - autoSetupPlugin(); - config->setGroup("General"); - config->writeEntry("Autosetup", true); - config->sync(); - } -} - -void DocumentationPlugin::reload() -{ - clear(); - for (TQValueList::iterator it = catalogs.begin(); - it != catalogs.end(); ++it) - { - createTOC(*it); - } -} - -void DocumentationPlugin::clear() -{ - for (TQValueList::iterator it = catalogs.begin(); - it != catalogs.end(); ++it) - { - clearCatalog(*it); - } -} - -void DocumentationPlugin::clearCatalog(DocumentationCatalogItem *item) -{ - //clear named catalog map - for (TQMap::iterator it = namedCatalogs.begin(); - it != namedCatalogs.end(); ++it) - { - if (it.data() == item) - { - namedCatalogs.remove(it); - break; - } - } - //clear indexes for catalog - TQValueList idx = indexes[item]; - for (TQValueList::iterator it = idx.begin(); it != idx.end(); ++it) - { - delete *it; - } - indexes.remove(item); - - //remove catalog - catalogs.remove(item); -} - -void DocumentationPlugin::createIndex(IndexBox *index) -{ - if (m_indexCreated) - return; - - for (TQValueList::iterator it = catalogs.begin(); - it != catalogs.end(); ++it) - { - loadIndex(index, *it); - } - m_indexCreated = true; -} - -void DocumentationPlugin::cacheIndex(DocumentationCatalogItem *item) -{ - kdDebug() << "Creating index cache for " << item->text(0) << endl; - - TQString cacheName = locateLocal("data", TQString("tdevdocumentation/index/cache_") + item->text(0)); - TQFile cacheFile(cacheName); - if (!cacheFile.open(IO_WriteOnly)) - return; - - TQTextStream str(&cacheFile); - str.setEncoding(TQTextStream::Unicode); - str << CACHE_VERSION << endl; - - TQValueList catalogIndexes = indexes[item]; - for (TQValueList::const_iterator it = catalogIndexes.constBegin(); - it != catalogIndexes.constEnd(); ++it) - { - str << (*it)->text() << endl; - str << (*it)->description() << endl; - str << (*it)->url().url() << endl; - } - - cacheFile.close(); -} - -bool DocumentationPlugin::loadCachedIndex(IndexBox *index, DocumentationCatalogItem *item) -{ - TQString cacheName = locateLocal("data", TQString("tdevdocumentation/index/cache_") + item->cacheVersion() + item->text(0)); - TQFile cacheFile(cacheName); - if (!cacheFile.open(IO_ReadOnly)) - return false; - - kdDebug() << "Using cached index for item: " << item->text(0) << endl; - - TQTextStream str(&cacheFile); - str.setEncoding(TQTextStream::Unicode); - TQString cache = str.read(); - TQStringList cacheList = TQStringList::split("\n", cache, true); - TQString ver = cacheList.first(); - if (ver != CACHE_VERSION) - { - kdDebug() << "Wrong cache version: " << ver << endl; - return false; - } - TQStringList::const_iterator it = cacheList.begin(); - it++; - TQString s[3]; int c = 0; - for (; it != cacheList.end(); ++it) - { - s[c] = *it; - if (c == 2) - { - IndexItemProto *ii = new IndexItemProto(this, item, index, s[0], s[1]); - ii->addURL(KURL(s[2])); - c = 0; - } - else c++; - } - cacheFile.close(); - - return true; -} - -void DocumentationPlugin::addCatalog(DocumentationCatalogItem *item) -{ - catalogs.append(item); - namedCatalogs[item->text(0)] = item; -// indexes[item] = TQValueList(); -} - -void DocumentationPlugin::addCatalogConfiguration(TDEListView *configurationView, - const TQString &title, const TQString &url) -{ - new ConfigurationItem(configurationView, this, title, url, - hasCapability(Index), hasCapability(FullTextSearch)); -} - -void DocumentationPlugin::editCatalogConfiguration(ConfigurationItem *configurationItem, - const TQString &title, const TQString &url) -{ - configurationItem->setTitle(title); - configurationItem->setURL(url); -} - -void DocumentationPlugin::deleteCatalogConfiguration(const ConfigurationItem *const configurationItem) -{ - deletedConfigurationItems << configurationItem->title(); -} - -void DocumentationPlugin::clearCatalogIndex(DocumentationCatalogItem *item) -{ - //clear indexes for catalog - TQValueList idx = indexes[item]; - for (TQValueList::iterator it = idx.begin(); it != idx.end(); ++it) - { - delete *it; - } - indexes.remove(item); -} - -void DocumentationPlugin::loadIndex(IndexBox *index, DocumentationCatalogItem *item) -{ - if (!indexEnabled(item)) - return; - if (!needRefreshIndex(item) && loadCachedIndex(index, item)) - return; - createIndex(index, item); - cacheIndex(item); -} - -void DocumentationPlugin::init(TDEListView *contents) -{ - config->setGroup("Locations"); - TQMap entryMap = config->entryMap("Locations"); - - for (TQMap::const_iterator it = entryMap.begin(); - it != entryMap.end(); ++it) - { - if (catalogEnabled(it.key())) - createCatalog(contents, it.key(), config->readPathEntry(it.key())); - } -} - -void DocumentationPlugin::reinit(TDEListView *contents, IndexBox *index, TQStringList restrictions) -{ - config->setGroup("Locations"); - TQMap entryMap = config->entryMap("Locations"); - - //remove deleted in configuration catalogs - for (TQStringList::const_iterator it = deletedConfigurationItems.constBegin(); - it != deletedConfigurationItems.constEnd(); ++it) - { - if (namedCatalogs.contains(*it)) - delete namedCatalogs[*it]; - } - deletedConfigurationItems.clear(); - - //update configuration - for (TQMap::const_iterator it = entryMap.begin(); - it != entryMap.end(); ++it) - { - config->setGroup("Locations"); - if (restrictions.contains(it.key()) || (!catalogEnabled(it.key()))) - { - if (namedCatalogs.contains(it.key())) - delete namedCatalogs[it.key()]; - } - else - { - kdDebug() << "updating 1" << endl; - if (!namedCatalogs.contains(it.key())) //create catalog if it does not exist - { - DocumentationCatalogItem * item = createCatalog(contents, it.key(), config->readPathEntry(it.key())); - loadIndex(index, item); - index->setDirty(true); -// index->refill(indexes[item]); - } - else if (!indexEnabled(namedCatalogs[it.key()])) //clear index if it is disabled in configuration - { - kdDebug() << " updating: clearCatalogIndex" << endl; - clearCatalogIndex(namedCatalogs[it.key()]); - } - else if ( (indexEnabled(namedCatalogs[it.key()])) //index is requested in configuration but does not yet exist - && (!indexes.contains(namedCatalogs[it.key()])) ) - { - kdDebug() << " index requested " << endl; - loadIndex(index, namedCatalogs[it.key()]); - index->setDirty(true); - } - m_indexCreated = true; - } - } -} - -void DocumentationPlugin::loadCatalogConfiguration(TDEListView *configurationView) -{ - config->setGroup("Locations"); - TQMap entryMap = config->entryMap("Locations"); - - for (TQMap::const_iterator it = entryMap.begin(); - it != entryMap.end(); ++it) - { - if (namedCatalogs.contains(it.key()) - && namedCatalogs[it.key()]->isProjectDocumentationItem()) - continue; - - config->setGroup("Locations"); - ConfigurationItem *item = new ConfigurationItem(configurationView, this, it.key(), - config->readPathEntry(it.key()), - hasCapability(Index), hasCapability(FullTextSearch)); - config->setGroup("TOC Settings"); - item->setContents(config->readBoolEntry(item->title(), true)); - config->setGroup("Index Settings"); - item->setIndex(config->readBoolEntry(item->title(), false)); - config->setGroup("Search Settings"); - item->setFullTextSearch(config->readBoolEntry(item->title(), false)); - } -} - -void DocumentationPlugin::saveCatalogConfiguration(TDEListView *configurationView) -{ - config->setGroup("Locations"); - - for (TQStringList::const_iterator it = deletedConfigurationItems.constBegin(); - it != deletedConfigurationItems.constEnd(); ++it) - { - config->deleteEntry(*it); - } - - TQListViewItemIterator it(configurationView); - while (it.current()) - { - ConfigurationItem *confItem = dynamic_cast(it.current()); - if ( confItem->docPlugin() != this ) - { - ++it; - continue; - } - - config->setGroup("Locations"); - if (confItem->isChanged()) - config->deleteEntry(confItem->origTitle()); - config->writePathEntry(confItem->title(), confItem->url()); - - config->setGroup("TOC Settings"); - if (confItem->isChanged()) - config->deleteEntry(confItem->origTitle()); - config->writeEntry(confItem->title(), confItem->contents()); - - config->setGroup("Index Settings"); - if (confItem->isChanged()) - config->deleteEntry(confItem->origTitle()); - config->writeEntry(confItem->title(), confItem->index()); - - config->setGroup("Search Settings"); - if (confItem->isChanged()) - config->deleteEntry(confItem->origTitle()); - config->writeEntry(confItem->title(), confItem->fullTextSearch()); - - ++it; - } - config->sync(); -} - -void DocumentationPlugin::setIndexEnabled( DocumentationCatalogItem * item, bool e ) -{ - TQString group = config->group(); - config->setGroup("Index Settings"); - config->writeEntry(item->text(0), e); - config->setGroup(group); -} - -bool DocumentationPlugin::indexEnabled( DocumentationCatalogItem * item ) const -{ - TQString group = config->group(); - config->setGroup("Index Settings"); - bool b = config->readBoolEntry(item->text(0), false); - config->setGroup(group); - return b; -} - -bool DocumentationPlugin::catalogEnabled(const TQString &name) const -{ - TQString group = config->group(); - config->setGroup("TOC Settings"); - bool b = config->readBoolEntry(name, true); - config->setGroup(group); - return b; -} - -void DocumentationPlugin::setCatalogEnabled(const TQString &name, bool e) -{ - TQString group = config->group(); - config->setGroup("TOC Settings"); - config->writeEntry(name, e); - config->setGroup(group); -} - - - - -//class IndexBox - -IndexBox::IndexBox(TQWidget *parent, const char *name) - :TDEListBox(parent, name), m_dirty(false) -{ -} - -void IndexBox::addIndexItem(IndexItemProto *item) -{ - items[item->text()].append(item); -} - -void IndexBox::removeIndexItem(IndexItemProto *item) -{ - TQString text = item->text(); - items[text].remove(item); - if (items[text].count() == 0) - { - items.remove(text); - TQListBoxItem *item = findItem(text, TQt::CaseSensitive | TQt::ExactMatch); - if (item) - delete item; - } -} - -void IndexBox::fill() -{ - for (TQMap >::const_iterator it = items.begin(); - it != items.end(); ++it) - { - new IndexItem(this, it.key()); - } -} - -void IndexBox::setDirty(bool dirty) -{ - m_dirty = dirty; -} - -void IndexBox::refill() -{ - if (m_dirty) - { - clear(); - fill(); - setDirty(false); - } -} - - -ProjectDocumentationPlugin::ProjectDocumentationPlugin(DocumentationPlugin *docPlugin, DocumentationPlugin::ProjectDocType type) - :TQObject(0, 0), m_docPlugin(docPlugin), m_catalog(0), m_type(type), m_contents(0), m_index(0) -{ - kdDebug() << "ProjectDocumentationPlugin::ProjectDocumentationPlugin for type " << type << endl; - - m_watch = new KDirWatch(this); - connect(m_watch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(reinit())); - m_watch->startScan(); -} - -ProjectDocumentationPlugin::~ProjectDocumentationPlugin() -{ - deinit(); -} - -void ProjectDocumentationPlugin::init(TDEListView *contents, IndexBox *index, const TQString &url) -{ - m_contents = contents; - m_index = index; - m_url = url; - - if (m_catalog) - deinit(); - m_catalog = m_docPlugin->createCatalog(contents, - m_type == DocumentationPlugin::APIDocs ? i18n("Project API Documentation") - : i18n("Project User Manual"), url); - if (m_catalog) - { - m_catalog->setProjectDocumentationItem(true); - m_watch->addFile(url); - } -} - -void ProjectDocumentationPlugin::reinit() -{ - deinit(); - if (m_contents != 0 && m_index != 0 && m_url != 0) - init(m_contents, m_index, m_url); -} - -void ProjectDocumentationPlugin::deinit() -{ - m_watch->removeFile(m_url); - delete m_catalog; - m_catalog = 0; -} - -TQString ProjectDocumentationPlugin::pluginName() const -{ - return m_docPlugin->pluginName(); -} - -TQString ProjectDocumentationPlugin::catalogURL() const -{ - return m_url; -} - -#include "tdevdocumentationplugin.moc" diff --git a/parts/documentation/interfaces/tdevdocumentationplugin.h b/parts/documentation/interfaces/tdevdocumentationplugin.h deleted file mode 100644 index ed18a86a..00000000 --- a/parts/documentation/interfaces/tdevdocumentationplugin.h +++ /dev/null @@ -1,423 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 by Alexander Dymo - - 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 TDEV_DOC_PLUGIN_H -#define TDEV_DOC_PLUGIN_H - -#include -#include -#include - -#include -#include -#include -#include - -#define CACHE_VERSION "3" - -/**Documentation list item. -Stores the type of a documentation it represents and an URL.*/ -class DocumentationItem: public TDEListViewItem -{ -public: - /**Type of documentation which is represented by this item.*/ - enum Type { - Collection /** URL; - typedef TQValueList List; - - IndexItem(IndexBox *listbox, const TQString &text); - - List urls() const; - -private: - IndexBox *m_listbox; -}; - -/**Documentation index view.*/ -class IndexBox: public TDEListBox{ -public: - IndexBox(TQWidget *parent = 0, const char *name = 0); - - virtual void addIndexItem(IndexItemProto *item); - virtual void removeIndexItem(IndexItemProto *item); - virtual void fill(); - virtual void refill(); - virtual void setDirty(bool dirty); -// virtual void refill(TQValueList &items); - -private: - TQMap > items; - friend class IndexItem; - - bool m_dirty; -}; - -class TQPainter; -class TQColorGroup; -class TQFontMetrics; -class DocumentationPlugin; - -/**Documentation configuration item.*/ -class ConfigurationItem: public TQCheckListItem -{ -public: - ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, - bool indexPossible, bool fullTextSearchPossible); - - virtual TQString title() const { return m_title; } - virtual void setTitle(const TQString title) { setText(3, m_title = title); } - virtual TQString url() const { return m_url; } - virtual void setURL(const TQString url) { setText(4, m_url = url); } - - virtual bool isChanged() const { return m_title == m_origTitle; } - virtual TQString origTitle() const {return m_origTitle; } - - virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); - virtual int width(const TQFontMetrics &fm, const TQListView *lv, int c) const; - - bool contents() const { return m_contents; } - void setContents(bool contents) { m_contents = contents; } - bool index() const { return m_index; } - void setIndex(bool index) { m_index = index; } - bool fullTextSearch() const { return m_fullTextSearch; } - void setFullTextSearch(bool fullTextSearch) { m_fullTextSearch = fullTextSearch; } - - bool indexPossible() const { return m_indexPossible; } - bool fullTextSearchPossible() const { return m_fullTextSearchPossible; } - - DocumentationPlugin * docPlugin() { return m_docPlugin; } - -private: - TQString m_title; - TQString m_url; - TQString m_origTitle; - - bool m_contents; - bool m_index; - bool m_fullTextSearch; - - bool m_indexPossible; - bool m_fullTextSearchPossible; - - DocumentationPlugin * m_docPlugin; -}; - - -class ProjectDocumentationPlugin; - -/** -@short Documentation Plugin Interface - -All KDevelop documentation plugins must implement this interface. -Documentation plugin handles certain documentation type. It provides -methods to load documentation catalogs and indexes for a documentation -of that type. It also has methods to configure catalogs and provides -a list of URL's for the full text search tool. -*/ -class DocumentationPlugin: public TQObject -{ - Q_OBJECT - -public: - /**Capability of documentation plugin.*/ - enum Capability { Index=1 /** catalogLocatorProps() = 0; - /**Returns a title of catalog defined by an url parameter.*/ - virtual TQString catalogTitle(const TQString &url) = 0; - - /**Reloads documentation catalogs and indices.*/ - virtual void reload(); - /**Clears documentation catalogs and indices.*/ - virtual void clear(); - - /**Checks if documentation plugin has given capability.*/ - bool hasCapability(Capability cap) const { return m_capabilities & cap; } - - /**Sets dirty flag for all indices. Index caching algorythm will update - the cache next time @ref createIndex is called.*/ - void setDirtyIndex(bool dirty) { m_indexCreated = dirty; } - - /**Caches index for documentation catalog. Reimplement this only if custom - caching algorythm is used (do not forget to reimplement also @ref loadCachedIndex - and @ref createIndex).*/ - virtual void cacheIndex(DocumentationCatalogItem *item); - /**Loads index from the cache. Reimplement this only if custom - caching algorythm is used (do not forget to reimplement also @ref cacheIndex - and @ref createIndex).*/ - virtual bool loadCachedIndex(IndexBox *index, DocumentationCatalogItem *item); - - /**Returns associated project documentation plugin. Default implementation returns zero. - Reimplement this if the documentation plugin can also handle project documentation.*/ - virtual ProjectDocumentationPlugin *projectDocumentationPlugin(ProjectDocType /* type */) { return 0; } - -public slots: - /**Creates index and fills index listbox. Reimplement this only if custom - caching algorythm is used (do not forget to reimplement also @ref cacheIndex - and @ref loadCachedIndex).*/ - virtual void createIndex(IndexBox *index); - -protected: - /**A list of loaded documentation catalogs.*/ - TQValueList catalogs; - /**A map of names of loaded documentation catalogs.*/ - TQMap namedCatalogs; - /**A map of indices of loaded documentation catalogs.*/ - TQMap > indexes; - - /**Sets capabilities of documentation plugin.*/ - void setCapabilities(int caps) { m_capabilities = caps; } - /**Clears index of given catalog.*/ - virtual void clearCatalogIndex(DocumentationCatalogItem *item); - /**Loads index from cache or creates and caches it if does not exist.*/ - void loadIndex(IndexBox *index, DocumentationCatalogItem *item); - - /**Stores items deleted from configuration. @ref saveCatalogConfiguration - uses this to remove entries from configuration file.*/ - TQStringList deletedConfigurationItems; - - /**Configuration object used by a plugin.*/ - TDEConfig *config; - -private: - /**Adds catalog item to catalogs, namedCatalogs and indexes lists and maps.*/ - virtual void addCatalog(DocumentationCatalogItem *item); - /**Removes catalog item from catalogs, namedCatalogs and indexes lists and maps.*/ - virtual void clearCatalog(DocumentationCatalogItem *item); - - int m_capabilities; - bool m_indexCreated; - - -friend class IndexItemProto; -friend class DocumentationCatalogItem; -}; - - -/** -@short Project documentation plugin - -Represents functionality to display project documentation catalog and index in documentation browser. -*/ -class ProjectDocumentationPlugin: public TQObject { - Q_OBJECT - -public: - ProjectDocumentationPlugin(DocumentationPlugin *docPlugin, DocumentationPlugin::ProjectDocType type); - virtual ~ProjectDocumentationPlugin(); - - /**Initializes project documentation plugin - creates documentation catalog.*/ - virtual void init(TDEListView *contents, IndexBox *index, const TQString &url); - /**Deinitializes project documentation plugin - removes documentation catalog.*/ - virtual void deinit(); - - TQString pluginName() const; - TQString catalogURL() const; - -public slots: - /**Performs reinitialization if project documentation has changed (after building api documentation).*/ - virtual void reinit(); - -protected: - DocumentationPlugin *m_docPlugin; - DocumentationCatalogItem *m_catalog; - -private: - DocumentationPlugin::ProjectDocType m_type; - - class KDirWatch *m_watch; - class TDEListView *m_contents; - class IndexBox *m_index; - TQString m_url; -}; - -#endif diff --git a/parts/documentation/kdevdocumentation.desktop b/parts/documentation/kdevdocumentation.desktop new file mode 100644 index 00000000..674812f4 --- /dev/null +++ b/parts/documentation/kdevdocumentation.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=The Documentation plugin offers browsing and searching in local and online documentation with support for multiple documentation systems. +Comment[ca]=El connector de documentació ofereix navegació i recerca en documentació local i en línia amb suport per a múltiples sistemes de documentació. +Comment[da]=Dokumentations-plugin tilbyder visning og søgning i lokal og online dokumentation med understøttelse af flere dokumentations-systemer. +Comment[de]=Die Dokumentations-Komponente bietet eine Browsefunktion und Unterstützung für die Suche in mehreren Hilfedokumenten und Dokumentationssystemen. +Comment[el]=Το πρόσθετο τεκμηρίωσης προσφέρει περιήγηση και αναζήτηση σε τοπική και απομακρυσμένη τεκμηρίωση για πολλαπλά συστήματα τεκμηρίωσης. +Comment[es]=El complemento de documentación proporciona navegación y búsqueda en la documentación, tanto local como en línea, y permite múltiples sistemas de documentación. +Comment[et]=Dokumentatsiooniplugin võimaldab lehitseda ja otsida nii kohalikus kui võrgudokumentatsioonis paljusid dokumentatsioonisüsteeme kasutades. +Comment[eu]=Dokumentazio-pluginak lokaleko eta urruneko dokumentazio arakatzeko eta bilatzeko aukera ematen dizu, eta dokumentazio-sistema anitz onartzen ditu. +Comment[fa]=وصلۀ مستندسازی، مرور و جستجو در مستندات محلی و برخط را با پشتیبانی از سیستمهای مستندسازی چندگانه، ارائه می‌کند. +Comment[fr]=Le module externe de documentation offre une navigation et une recherche dans la documentation locale et en ligne ainsi que la prise en charge de systèmes de documentation mutiples. +Comment[gl]=A extensión de documentación ofrece navegación e búsqueda en documentación local e en liña con soporte para múltiples sistemas de documentación. +Comment[hu]=Dokumentációmegjelenítő elem helyi és távoli dokumentáció böngészéséhez, keresési lehetőséggel. Többféle formátumot támogat. +Comment[it]=Il plugin di documentazione offre navigazione e ricerca in locale e documentazione in linea con supporto per sistemi di documentazione multipla. +Comment[ms]=Plugin dokumentasi menawarkan pelungsuran dan pencarian dalam dokumentasi tempatan dan dalam talian dengan sokongan untuk pelbagai sistem dokumentasi. +Comment[nds]=Mit dat Dokmentatschoon-Moduul kannst Du lokale un Tokoppel-Dokmentatschoon dörkieken un -söken, mehr Dokmentatschoonsystemen warrt ünnerstütt. +Comment[ne]=मिसिलीकरण प्लगइनले बहुविध मिसिलीकरण प्रणालीको समर्थनसँग अनलाइन मिसिलीकरण र स्थानीय रूपमा ब्राउज र खोजी गर्न दिन्छ । +Comment[nl]=De documentatieplugin welke het mogelijk maakt om door lokale documentatie en documentatie op afstand te bladeren en te zoeken. Met ondersteuning voor verschillende documentatiesystemen. +Comment[pl]=Kontrola dokumentacji z obsługą przeglądania i wyszukiwania w różnych plikach pomocy i systemach dokumentacji. +Comment[pt]=O 'plugin' de documentação oferece navegação e procura em documentação local e em rede com suporte para vários sistemas de documentação. +Comment[pt_BR]=A documentação do plug-in oferece navegação e busca na documentação local e online com suporte para diversos sistemas de documentação. +Comment[ru]=Модуль документации позволяет упростить работу с документацией. +Comment[sk]=Dokumentačný modul proskytuje prehliadanie a vyhľadávanie v lokálnej a online dokumentácie s podporou viacerých dokumentačných systémov. +Comment[sr]=Прикључак за документацију са подршком за прегледање и тражење у локалној и документацији на вези, за више документационих система. +Comment[sr@Latn]=Priključak za dokumentaciju sa podrškom za pregledanje i traženje u lokalnoj i dokumentaciji na vezi, za više dokumentacionih sistema. +Comment[sv]=Dokumentationsinsticksprogrammet erbjuder bläddring och sökning i lokal dokumentation och dokumentation på nätet, med stöd för flera dokumentationssystem. +Comment[tr]=Belgelendirme eklentisi, çoklu belgelendirme sistemlerine destek ile, yerel ve çevrimiçi belgelere gözatma ve bu belgelerde arama yapılmasına izin verir. +Comment[zh_CN]=文档插件提供了本地和在线文档中提供浏览和搜索功能,支持多种文档系统 +Comment[zh_TW]=文件外掛程式提供對本地與線上文件的瀏覽與搜尋功能,並支援多重文件系統。 +Name=KDevDocumentation +Name[da]=TDevelop dokumentation +Name[nds]=TDevelop-Dokmentatschoon +Name[pt_BR]=KDevDocumentação +Name[sk]=KDev dokumentácia +Name[sv]=TDevelop dokumentation +Name[ta]=KDev ஆவணமாக்கல் +Name[tg]=Ҳуҷҷатҳои KDev +Name[zh_TW]=TDevelop 文件 +GenericName=Documentation +GenericName[br]=Teuliadur +GenericName[ca]=Documentació +GenericName[cy]=Dogfenniaeth +GenericName[da]=Dokumentation +GenericName[de]=Dokumentationsbaum +GenericName[el]=Τεκμηρίωση +GenericName[es]=Documentación +GenericName[et]=Dokumentatsioon +GenericName[eu]=Dokumentazioa +GenericName[fa]=مستندات +GenericName[ga]=Doiciméadú +GenericName[gl]=Documentación +GenericName[hi]=दस्तावेज़ीकरण +GenericName[hu]=Dokumentáció +GenericName[it]=Documentazione +GenericName[ja]=ドキュメンテーション +GenericName[ms]=Dokumentasi +GenericName[nds]=Dokmentatschoon +GenericName[ne]=मिसिलीकरण +GenericName[nl]=Documentatie +GenericName[pl]=Dokumentacja +GenericName[pt]=Documentação +GenericName[pt_BR]=Documentação +GenericName[ru]=Просмотр документации +GenericName[sk]=Dokumentácia +GenericName[sl]=Dokumentacija +GenericName[sr]=Документација +GenericName[sr@Latn]=Dokumentacija +GenericName[sv]=Dokumentation +GenericName[ta]=ஆவணமாக்கல் +GenericName[tg]=Намоиши ҳуҷҷатҳо +GenericName[tr]=Belgelendirme +GenericName[zh_CN]=文档 +GenericName[zh_TW]=文件 +Icon=khelpcenter +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Global +X-TDE-Library=libkdevdocumentation +X-TDevelop-Version=5 +X-TDevelop-Mode=AssistantMode +X-TDevelop-Properties=Documentation diff --git a/parts/documentation/kdevpart_documentation.rc b/parts/documentation/kdevpart_documentation.rc new file mode 100644 index 00000000..f8dac85a --- /dev/null +++ b/parts/documentation/kdevpart_documentation.rc @@ -0,0 +1,19 @@ + + + + + +

    + + + + + + + + + diff --git a/parts/documentation/plugins/CMakeLists.txt b/parts/documentation/plugins/CMakeLists.txt index 116e7674..281c40f8 100644 --- a/parts/documentation/plugins/CMakeLists.txt +++ b/parts/documentation/plugins/CMakeLists.txt @@ -12,6 +12,6 @@ add_subdirectory( qt ) add_subdirectory( doxygen ) add_subdirectory( devhelp ) -add_subdirectory( tdevtoc ) +add_subdirectory( kdevtoc ) add_subdirectory( chm ) add_subdirectory( custom ) diff --git a/parts/documentation/plugins/Makefile.am b/parts/documentation/plugins/Makefile.am index 253a0193..c2002f78 100644 --- a/parts/documentation/plugins/Makefile.am +++ b/parts/documentation/plugins/Makefile.am @@ -1,3 +1,3 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) METASOURCES = AUTO -SUBDIRS = qt doxygen devhelp tdevtoc chm custom +SUBDIRS = qt doxygen devhelp kdevtoc chm custom diff --git a/parts/documentation/plugins/chm/docchmplugin.cpp b/parts/documentation/plugins/chm/docchmplugin.cpp index f3287540..5acecce3 100644 --- a/parts/documentation/plugins/chm/docchmplugin.cpp +++ b/parts/documentation/plugins/chm/docchmplugin.cpp @@ -28,14 +28,14 @@ #include #include #include -#include -#include +#include +#include #include #include "../../../../config.h" -static const TDevPluginInfo data("docchmplugin"); -typedef TDevGenericFactory DocCHMPluginFactory; +static const KDevPluginInfo data("docchmplugin"); +typedef KDevGenericFactory DocCHMPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocchmplugin, DocCHMPluginFactory(data) ) DocCHMPlugin::DocCHMPlugin(TQObject* parent, const char* name, TQStringList // args diff --git a/parts/documentation/plugins/chm/docchmplugin.h b/parts/documentation/plugins/chm/docchmplugin.h index e814248f..452e1c09 100644 --- a/parts/documentation/plugins/chm/docchmplugin.h +++ b/parts/documentation/plugins/chm/docchmplugin.h @@ -20,7 +20,7 @@ #ifndef DOCCHMPLUGIN_H #define DOCCHMPLUGIN_H -#include +#include class DocCHMPlugin :public DocumentationPlugin { diff --git a/parts/documentation/plugins/custom/doccustomplugin.cpp b/parts/documentation/plugins/custom/doccustomplugin.cpp index 55d6c9c6..dd141eba 100644 --- a/parts/documentation/plugins/custom/doccustomplugin.cpp +++ b/parts/documentation/plugins/custom/doccustomplugin.cpp @@ -25,11 +25,11 @@ #include #include -#include -#include +#include +#include -static const TDevPluginInfo data("doccustomplugin"); -typedef TDevGenericFactory DocCustomPluginFactory; +static const KDevPluginInfo data("doccustomplugin"); +typedef KDevGenericFactory DocCustomPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdoccustomplugin, DocCustomPluginFactory(data) ) DocCustomPlugin::DocCustomPlugin(TQObject* parent, const char* name, const TQStringList // args diff --git a/parts/documentation/plugins/custom/doccustomplugin.h b/parts/documentation/plugins/custom/doccustomplugin.h index 315e0864..f83daf1a 100644 --- a/parts/documentation/plugins/custom/doccustomplugin.h +++ b/parts/documentation/plugins/custom/doccustomplugin.h @@ -20,7 +20,7 @@ #ifndef DOCCUSTOMPLUGIN_H #define DOCCUSTOMPLUGIN_H -#include +#include class DocCustomPlugin : public DocumentationPlugin { public: diff --git a/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp b/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp index d644df4f..4f2d50d6 100644 --- a/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp +++ b/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include #include "../../../../config.h" @@ -69,8 +69,8 @@ private: }; -static const TDevPluginInfo data("docdevhelpplugin"); -typedef TDevGenericFactory DocDevHelpPluginFactory; +static const KDevPluginInfo data("docdevhelpplugin"); +typedef KDevGenericFactory DocDevHelpPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocdevhelpplugin, DocDevHelpPluginFactory(data) ) DocDevHelpPlugin::DocDevHelpPlugin(TQObject* parent, const char* name, diff --git a/parts/documentation/plugins/devhelp/docdevhelpplugin.h b/parts/documentation/plugins/devhelp/docdevhelpplugin.h index 11339098..6436a1d8 100644 --- a/parts/documentation/plugins/devhelp/docdevhelpplugin.h +++ b/parts/documentation/plugins/devhelp/docdevhelpplugin.h @@ -23,7 +23,7 @@ #include #include -#include +#include class DocDevHelpPlugin: public DocumentationPlugin { diff --git a/parts/documentation/plugins/djvu/docdjvuplugin.cpp b/parts/documentation/plugins/djvu/docdjvuplugin.cpp index dafdfa1f..7851a516 100644 --- a/parts/documentation/plugins/djvu/docdjvuplugin.cpp +++ b/parts/documentation/plugins/djvu/docdjvuplugin.cpp @@ -25,10 +25,10 @@ #include #include -#include +#include static const TDEAboutData data("docdjvuplugin", I18N_NOOP("Djvu documentation plugin"), "1.0"); -typedef TDevGenericFactory DocDjvuPluginFactory; +typedef KDevGenericFactory DocDjvuPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocdjvuplugin, DocDjvuPluginFactory(&data) ) DocDjvuPlugin::DocDjvuPlugin(TQObject* parent, const char* name, const TQStringList args) diff --git a/parts/documentation/plugins/djvu/docdjvuplugin.h b/parts/documentation/plugins/djvu/docdjvuplugin.h index 15415c65..6bff409c 100644 --- a/parts/documentation/plugins/djvu/docdjvuplugin.h +++ b/parts/documentation/plugins/djvu/docdjvuplugin.h @@ -20,7 +20,7 @@ #ifndef DOCDJVUPLUGIN_H #define DOCDVJUPLUGIN_H -#include +#include class DocDjvuPlugin : public DocumentationPlugin { public: diff --git a/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp b/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp index e5a7da93..9a5a6912 100644 --- a/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp +++ b/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp @@ -35,8 +35,8 @@ #include #include -#include -#include +#include +#include #include "../../../../config.h" @@ -60,8 +60,8 @@ private: }; -static const TDevPluginInfo data("docdoxygenplugin"); -typedef TDevGenericFactory DocDoxygenPluginFactory; +static const KDevPluginInfo data("docdoxygenplugin"); +typedef KDevGenericFactory DocDoxygenPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocdoxygenplugin, DocDoxygenPluginFactory(data) ) DocDoxygenPlugin::DocDoxygenPlugin(TQObject* parent, const char* name, const TQStringList) diff --git a/parts/documentation/plugins/doxygen/docdoxygenplugin.h b/parts/documentation/plugins/doxygen/docdoxygenplugin.h index 8382f98e..ebd4a540 100644 --- a/parts/documentation/plugins/doxygen/docdoxygenplugin.h +++ b/parts/documentation/plugins/doxygen/docdoxygenplugin.h @@ -20,7 +20,7 @@ #ifndef DOCDOXYGENPLUGIN_H #define DOCDOXYGENPLUGIN_H -#include +#include class TQDomDocument; class TQDomElement; diff --git a/parts/documentation/plugins/kdevtoc/CMakeLists.txt b/parts/documentation/plugins/kdevtoc/CMakeLists.txt new file mode 100644 index 00000000..c12c26e3 --- /dev/null +++ b/parts/documentation/plugins/kdevtoc/CMakeLists.txt @@ -0,0 +1,39 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_definitions( ${KDE_PLUGIN} ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/lib/interfaces + ${CMAKE_SOURCE_DIR}/lib/util + ${CMAKE_SOURCE_DIR}/parts/documentation/interfaces + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES dockdevtocplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) + + +##### libdockdevtocplugin (module) ############## + +tde_add_kpart( libdockdevtocplugin AUTOMOC + SOURCES dockdevtocplugin.cpp + LINK documentation_interfaces-shared tdevelop-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/parts/documentation/plugins/kdevtoc/Makefile.am b/parts/documentation/plugins/kdevtoc/Makefile.am new file mode 100644 index 00000000..22dab380 --- /dev/null +++ b/parts/documentation/plugins/kdevtoc/Makefile.am @@ -0,0 +1,10 @@ +INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util \ + -I$(top_srcdir)/parts/documentation/interfaces $(all_includes) +METASOURCES = AUTO +kde_module_LTLIBRARIES = libdockdevtocplugin.la +libdockdevtocplugin_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) +kde_services_DATA = dockdevtocplugin.desktop +noinst_HEADERS = dockdevtocplugin.h +libdockdevtocplugin_la_SOURCES = dockdevtocplugin.cpp +libdockdevtocplugin_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/parts/documentation/interfaces/libdocumentation_interfaces.la diff --git a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp new file mode 100644 index 00000000..fa17549b --- /dev/null +++ b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp @@ -0,0 +1,277 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program 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 program 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 "dockdevtocplugin.h" + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "../../../../config.h" + +class TOCDocumentationCatalogItem: public DocumentationCatalogItem +{ +public: + TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, + TDEListView *parent, const TQString &name) + :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) + { + } + TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, + DocumentationItem *parent, const TQString &name) + :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) + { + } + TQString tocFile() const { return m_tocFile; } + +private: + TQString m_tocFile; +}; + + +static const KDevPluginInfo data("dockdevtocplugin"); +typedef KDevGenericFactory DocKDevTOCPluginFactory; +K_EXPORT_COMPONENT_FACTORY( libdockdevtocplugin, DocKDevTOCPluginFactory(data) ) + +DocKDevTOCPlugin::DocKDevTOCPlugin(TQObject* parent, const char* name, + const TQStringList /*args*/) + :DocumentationPlugin(DocKDevTOCPluginFactory::instance()->config(), parent, name) +{ + setCapabilities(Index); + autoSetup(); +} + +DocKDevTOCPlugin::~DocKDevTOCPlugin() +{ +} + +TQString DocKDevTOCPlugin::pluginName() const +{ + return i18n("TDevelopTOC Documentation Collection"); +} + +DocumentationCatalogItem* DocKDevTOCPlugin::createCatalog(TDEListView* contents, const TQString& title, const TQString& url) +{ + return new TOCDocumentationCatalogItem(url, this, contents, title); +} + +TQPair DocKDevTOCPlugin::catalogLocatorProps() +{ + return TQPair(KFile::File, "*.toc"); +} + +TQString DocKDevTOCPlugin::catalogTitle(const TQString& url) +{ + TQFileInfo fi(url); + if (!fi.exists()) + return TQString(); + + TQFile f(url); + if (!f.open(IO_ReadOnly)) + return TQString(); + + TQDomDocument doc; + if (!doc.setContent(&f) || (doc.doctype().name() != "tdeveloptoc")) + return TQString(); + f.close(); + + TQDomElement titleEl = doc.documentElement().namedItem("title").toElement(); + + return titleEl.firstChild().toText().data(); +} + + +TQStringList DocKDevTOCPlugin::fullTextSearchLocations() +{ + return TQStringList(); +} + +bool DocKDevTOCPlugin::needRefreshIndex(DocumentationCatalogItem* /*item*/) +{ + return false; +} + +void DocKDevTOCPlugin::autoSetupPlugin() +{ + TQStringList tocsDir = DocKDevTOCPluginFactory::instance()->dirs()->findAllResources("data", "kdevdocumentation/tocs/*.toc"); + + for (TQStringList::const_iterator it = tocsDir.begin(); it != tocsDir.end(); ++it) + { + config->setGroup("Locations"); + config->writePathEntry(catalogTitle(*it), *it); + } +} + +void DocKDevTOCPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* item) +{ + TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); + if (!tocItem) + return; + + TQFileInfo fi(tocItem->tocFile()); + + TQFile f(tocItem->tocFile()); + if (!f.open(IO_ReadOnly)) + { + kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; + return; + } + TQDomDocument doc; + if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") + { + kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; + return; + } + f.close(); + + TQDomElement docEl = doc.documentElement(); + TQDomElement baseEl = docEl.namedItem("base").toElement(); + + TQString base; + if (!baseEl.isNull()) + base = baseEl.attribute("href", TQString()); + + TQDomElement indexEl = docEl.namedItem("index").toElement(); + TQDomElement childEl = indexEl.firstChild().toElement(); + while (!childEl.isNull()) + { + if (childEl.tagName() == "entry") + { + TQString name = childEl.attribute("name"); + TQString url = childEl.attribute("url"); + + IndexItemProto *ii = new IndexItemProto(this, item, index, name, item->text(0)); + ii->addURL(KURL(constructURL(base, url))); + } + childEl = childEl.nextSibling().toElement(); + } +} + +void DocKDevTOCPlugin::createTOC(DocumentationCatalogItem* item) +{ + TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); + if (!tocItem) + return; + + TQFileInfo fi(tocItem->tocFile()); + + TQFile f(tocItem->tocFile()); + if (!f.open(IO_ReadOnly)) + { + kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; + return; + } + TQDomDocument doc; + if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") + { + kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; + return; + } + f.close(); + + TQDomElement docEl = doc.documentElement(); + TQDomElement baseEl = docEl.namedItem("base").toElement(); + + TQString base; + if (!baseEl.isNull()) + base = baseEl.attribute("href", TQString()); + + TQDomElement childEl = docEl.lastChild().toElement(); + addTocSect(tocItem, childEl, base, 1); +} + +void DocKDevTOCPlugin::addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level) +{ + while (!childEl.isNull()) + { + if (childEl.tagName() == TQString("tocsect%1").arg(level)) + { + TQString name = childEl.attribute("name"); + TQString url = childEl.attribute("url"); + + DocumentationItem *item = new DocumentationItem(level == 1 ? DocumentationItem::Book : DocumentationItem::Document, parent, name); + item->setURL(KURL(constructURL(base, url))); + + TQDomElement grandchildEl = childEl.lastChild().toElement(); + addTocSect(item, grandchildEl, base, level+1); + } + childEl = childEl.previousSibling().toElement(); + } +} + +void DocKDevTOCPlugin::setCatalogURL(DocumentationCatalogItem* item) +{ + TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); + if (!tocItem) + return; + + TQFileInfo fi(tocItem->tocFile()); + + TQFile f(tocItem->tocFile()); + if (!f.open(IO_ReadOnly)) + { + kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; + return; + } + TQDomDocument doc; + if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") + { + kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; + return; + } + f.close(); + + TQDomElement docEl = doc.documentElement(); + TQDomElement baseEl = docEl.namedItem("base").toElement(); + + if (item->url().isEmpty()) + { + if (baseEl.isNull()) + item->setURL(KURL()); + else + item->setURL(KURL(constructURL(baseEl.attribute("href", TQString()), + baseEl.attribute("url", TQString())))); + } +} + +TQString DocKDevTOCPlugin::constructURL(const TQString &base, const TQString &url) +{ + if (base.isEmpty() && !url.isEmpty()) + return url; + if (!url.isEmpty()) + return base.endsWith("/") ? base + url : base + "/" + url; + else + return base; +} + +#include "dockdevtocplugin.moc" diff --git a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.desktop b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.desktop new file mode 100644 index 00000000..1cae3582 --- /dev/null +++ b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.desktop @@ -0,0 +1,43 @@ +[Desktop Entry] +Type=Service +Name=DocKDevTOCPlugin +Name[da]=DocKDevTOC-plugin +Name[sk]=Doc KDevTOC modul +Name[sv]=TDevelop innehållsförteckning-dokumentationsinsticksmodul +Name[ta]=DocKDevTOC சொருகு +Name[zh_TW]=TDevelop 目錄文件外掛程式 +Exec=blubb +Comment=Documentation plugin for TDevelopTOC documentation +Comment[ca]=Connector de documentació per a documentació TDevelopTOC +Comment[da]=Dokumentations-plugin for TDevelopTOC-dokumentation +Comment[de]=Komponente für TDevelopTOC-Dokumentation +Comment[el]=Πρόσθετο τεκμηρίωσης για τεκμηρίωση τύπου TDevelopTOC +Comment[es]=Complemento de documentación para TDevelopTOC +Comment[et]=TDevelopTOC dokumentatsiooni plugin +Comment[eu]=TDevelopTOC dokumentaziorako dokumentazio plugin-a +Comment[fa]=وصلۀ مستندسازی برای مستندات TDevelopTOC +Comment[fr]=Module externe de documentation pour la documentation TDevelopTOC +Comment[gl]=Extensión de documentación para documentación TDevelopTOC +Comment[hu]=Dokumentációmodul TDevelopTOC-dokumentációhoz +Comment[it]=Plugin di documentazione per file di TDevelopTOC +Comment[ja]=TDevelopTOC ドキュメンテーションのためのドキュメンテーションプラグイン +Comment[ms]=Plugin dokumentasi untuk dokumentasi TDevelopTOC +Comment[nds]=Dokmentatschoon-Moduul för TDevelopTOC-Dokmentatschoon +Comment[ne]=TDevelopTOC मिसिलीकरणका लागि मिसिलीकरण प्लगइन +Comment[nl]=Documentatie plugin for TDevelopTOC documentatie +Comment[pl]=Wtyczka dokumentacji dla dokumentacji w formacie TDevelopTOC +Comment[pt]='Plugin' para documentação TDevelopTOC +Comment[pt_BR]=Plug-in de documentação para document TOC do TDevelop +Comment[ru]=Модуль для просмотра TDevelopTOC +Comment[sk]=Dokumentačný modul pre TDevelopTOC dokumentáciu +Comment[sr]=Документациони прикључак за TDevelopTOC документацију +Comment[sr@Latn]=Dokumentacioni priključak za TDevelopTOC dokumentaciju +Comment[sv]=Dokumentationsinsticksmodul för TDevelop innehållsförteckningsdokumentation +Comment[ta]= TDevelopTOC ஆவணத்திற்கான ஆவணச் சொருகு +Comment[tg]=Модул барои наоиши TDevelopTOC +Comment[tr]=TDevelopTOC belgelendirmesi için belgelendirme eklentisi +Comment[zh_CN]=TDevelopTOC 文档的文档插件 +Comment[zh_TW]=TDevelop 目錄文件外掛程式 +ServiceTypes=TDevelop/DocumentationPlugins +X-TDevelop-Version=5 +X-TDE-Library=libdockdevtocplugin diff --git a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h new file mode 100644 index 00000000..7205cc4c --- /dev/null +++ b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h @@ -0,0 +1,55 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program 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 program 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 DOCKDEVTOCPLUGIN_H +#define DOCKDEVTOCPLUGIN_H + +#include + +#include + +class DocKDevTOCPlugin : public DocumentationPlugin +{ + Q_OBJECT + +public: + DocKDevTOCPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); + ~DocKDevTOCPlugin(); + + virtual TQString pluginName() const; + + virtual TQString catalogTitle(const TQString& url); + virtual DocumentationCatalogItem* createCatalog(TDEListView* contents, const TQString& title, const TQString& url); + virtual void createTOC(DocumentationCatalogItem* item); + virtual void setCatalogURL(DocumentationCatalogItem* item); + + virtual bool needRefreshIndex(DocumentationCatalogItem* item); + virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); + + virtual TQStringList fullTextSearchLocations(); + + virtual TQPair catalogLocatorProps(); + virtual void autoSetupPlugin(); + +protected: + void addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level); + static TQString constructURL(const TQString &base, const TQString &url) ; +}; + +#endif diff --git a/parts/documentation/plugins/pdb/docpdbplugin.cpp b/parts/documentation/plugins/pdb/docpdbplugin.cpp index b0ebd29d..fc647d34 100644 --- a/parts/documentation/plugins/pdb/docpdbplugin.cpp +++ b/parts/documentation/plugins/pdb/docpdbplugin.cpp @@ -25,10 +25,10 @@ #include #include -#include +#include static const TDEAboutData data("docpdbplugin", I18N_NOOP("PalmDoc documentation plugin"), "1.0"); -typedef TDevGenericFactory DocPDBPluginFactory; +typedef KDevGenericFactory DocPDBPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocpdbplugin, DocPDBPluginFactory(&data) ) DocPDBPlugin::DocPDBPlugin(TQObject* parent, const char* name, const TQStringList args) diff --git a/parts/documentation/plugins/pdb/docpdbplugin.h b/parts/documentation/plugins/pdb/docpdbplugin.h index d1319012..40dd3a15 100644 --- a/parts/documentation/plugins/pdb/docpdbplugin.h +++ b/parts/documentation/plugins/pdb/docpdbplugin.h @@ -20,7 +20,7 @@ #ifndef DOCPDBPLUGIN_H #define DOCPDBPLUGIN_H -#include +#include class DocPDBPlugin : public DocumentationPlugin { public: diff --git a/parts/documentation/plugins/pdf/docpdfplugin.cpp b/parts/documentation/plugins/pdf/docpdfplugin.cpp index 322a33d3..65bddd1b 100644 --- a/parts/documentation/plugins/pdf/docpdfplugin.cpp +++ b/parts/documentation/plugins/pdf/docpdfplugin.cpp @@ -25,10 +25,10 @@ #include #include -#include +#include static const TDEAboutData data("docpdfplugin", I18N_NOOP("PDF documentation plugin"), "1.0"); -typedef TDevGenericFactory DocPDFPluginFactory; +typedef KDevGenericFactory DocPDFPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocpdfplugin, DocPDFPluginFactory(&data) ) DocPDFPlugin::DocPDFPlugin(TQObject* parent, const char* name, const TQStringList args) diff --git a/parts/documentation/plugins/pdf/docpdfplugin.h b/parts/documentation/plugins/pdf/docpdfplugin.h index a5410196..d5ecc7eb 100644 --- a/parts/documentation/plugins/pdf/docpdfplugin.h +++ b/parts/documentation/plugins/pdf/docpdfplugin.h @@ -20,7 +20,7 @@ #ifndef DOCPDFPLUGIN_H #define DOCPDFPLUGIN_H -#include +#include class DocPDFPlugin : public DocumentationPlugin { public: diff --git a/parts/documentation/plugins/qt/docqtplugin.cpp b/parts/documentation/plugins/qt/docqtplugin.cpp index 301859ca..10271524 100644 --- a/parts/documentation/plugins/qt/docqtplugin.cpp +++ b/parts/documentation/plugins/qt/docqtplugin.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include #include "../../../../config.h" @@ -56,8 +56,8 @@ private: TQString m_dcfFile; }; -static const TDevPluginInfo data("docqtplugin"); -typedef TDevGenericFactory DocQtPluginFactory; +static const KDevPluginInfo data("docqtplugin"); +typedef KDevGenericFactory DocQtPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocqtplugin, DocQtPluginFactory(data) ) DocQtPlugin::DocQtPlugin(TQObject* parent, const char* name, const TQStringList) diff --git a/parts/documentation/plugins/qt/docqtplugin.h b/parts/documentation/plugins/qt/docqtplugin.h index 964ef844..8eac8456 100644 --- a/parts/documentation/plugins/qt/docqtplugin.h +++ b/parts/documentation/plugins/qt/docqtplugin.h @@ -20,7 +20,7 @@ #ifndef DOCTQTPLUGIN_H #define DOCTQTPLUGIN_H -#include +#include #include class TDEConfig; diff --git a/parts/documentation/plugins/tdevtoc/CMakeLists.txt b/parts/documentation/plugins/tdevtoc/CMakeLists.txt deleted file mode 100644 index f3d1efc2..00000000 --- a/parts/documentation/plugins/tdevtoc/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_definitions( ${KDE_PLUGIN} ) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/lib/interfaces - ${CMAKE_SOURCE_DIR}/lib/util - ${CMAKE_SOURCE_DIR}/parts/documentation/interfaces - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES doctdevtocplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - - -##### libdoctdevtocplugin (module) ############## - -tde_add_kpart( libdoctdevtocplugin AUTOMOC - SOURCES doctdevtocplugin.cpp - LINK documentation_interfaces-shared tdevelop-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/parts/documentation/plugins/tdevtoc/Makefile.am b/parts/documentation/plugins/tdevtoc/Makefile.am deleted file mode 100644 index 4baaaa86..00000000 --- a/parts/documentation/plugins/tdevtoc/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util \ - -I$(top_srcdir)/parts/documentation/interfaces $(all_includes) -METASOURCES = AUTO -kde_module_LTLIBRARIES = libdoctdevtocplugin.la -libdoctdevtocplugin_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) -kde_services_DATA = doctdevtocplugin.desktop -noinst_HEADERS = doctdevtocplugin.h -libdoctdevtocplugin_la_SOURCES = doctdevtocplugin.cpp -libdoctdevtocplugin_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/parts/documentation/interfaces/libdocumentation_interfaces.la diff --git a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.cpp b/parts/documentation/plugins/tdevtoc/doctdevtocplugin.cpp deleted file mode 100644 index aa603fbd..00000000 --- a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.cpp +++ /dev/null @@ -1,277 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program 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 program 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 "doctdevtocplugin.h" - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "../../../../config.h" - -class TOCDocumentationCatalogItem: public DocumentationCatalogItem -{ -public: - TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, - TDEListView *parent, const TQString &name) - :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) - { - } - TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, - DocumentationItem *parent, const TQString &name) - :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) - { - } - TQString tocFile() const { return m_tocFile; } - -private: - TQString m_tocFile; -}; - - -static const TDevPluginInfo data("doctdevtocplugin"); -typedef TDevGenericFactory DocTDevTOCPluginFactory; -K_EXPORT_COMPONENT_FACTORY( libdoctdevtocplugin, DocTDevTOCPluginFactory(data) ) - -DocTDevTOCPlugin::DocTDevTOCPlugin(TQObject* parent, const char* name, - const TQStringList /*args*/) - :DocumentationPlugin(DocTDevTOCPluginFactory::instance()->config(), parent, name) -{ - setCapabilities(Index); - autoSetup(); -} - -DocTDevTOCPlugin::~DocTDevTOCPlugin() -{ -} - -TQString DocTDevTOCPlugin::pluginName() const -{ - return i18n("TDevelopTOC Documentation Collection"); -} - -DocumentationCatalogItem* DocTDevTOCPlugin::createCatalog(TDEListView* contents, const TQString& title, const TQString& url) -{ - return new TOCDocumentationCatalogItem(url, this, contents, title); -} - -TQPair DocTDevTOCPlugin::catalogLocatorProps() -{ - return TQPair(KFile::File, "*.toc"); -} - -TQString DocTDevTOCPlugin::catalogTitle(const TQString& url) -{ - TQFileInfo fi(url); - if (!fi.exists()) - return TQString(); - - TQFile f(url); - if (!f.open(IO_ReadOnly)) - return TQString(); - - TQDomDocument doc; - if (!doc.setContent(&f) || (doc.doctype().name() != "tdeveloptoc")) - return TQString(); - f.close(); - - TQDomElement titleEl = doc.documentElement().namedItem("title").toElement(); - - return titleEl.firstChild().toText().data(); -} - - -TQStringList DocTDevTOCPlugin::fullTextSearchLocations() -{ - return TQStringList(); -} - -bool DocTDevTOCPlugin::needRefreshIndex(DocumentationCatalogItem* /*item*/) -{ - return false; -} - -void DocTDevTOCPlugin::autoSetupPlugin() -{ - TQStringList tocsDir = DocTDevTOCPluginFactory::instance()->dirs()->findAllResources("data", "tdevdocumentation/tocs/*.toc"); - - for (TQStringList::const_iterator it = tocsDir.begin(); it != tocsDir.end(); ++it) - { - config->setGroup("Locations"); - config->writePathEntry(catalogTitle(*it), *it); - } -} - -void DocTDevTOCPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* item) -{ - TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); - if (!tocItem) - return; - - TQFileInfo fi(tocItem->tocFile()); - - TQFile f(tocItem->tocFile()); - if (!f.open(IO_ReadOnly)) - { - kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; - return; - } - TQDomDocument doc; - if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") - { - kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; - return; - } - f.close(); - - TQDomElement docEl = doc.documentElement(); - TQDomElement baseEl = docEl.namedItem("base").toElement(); - - TQString base; - if (!baseEl.isNull()) - base = baseEl.attribute("href", TQString()); - - TQDomElement indexEl = docEl.namedItem("index").toElement(); - TQDomElement childEl = indexEl.firstChild().toElement(); - while (!childEl.isNull()) - { - if (childEl.tagName() == "entry") - { - TQString name = childEl.attribute("name"); - TQString url = childEl.attribute("url"); - - IndexItemProto *ii = new IndexItemProto(this, item, index, name, item->text(0)); - ii->addURL(KURL(constructURL(base, url))); - } - childEl = childEl.nextSibling().toElement(); - } -} - -void DocTDevTOCPlugin::createTOC(DocumentationCatalogItem* item) -{ - TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); - if (!tocItem) - return; - - TQFileInfo fi(tocItem->tocFile()); - - TQFile f(tocItem->tocFile()); - if (!f.open(IO_ReadOnly)) - { - kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; - return; - } - TQDomDocument doc; - if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") - { - kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; - return; - } - f.close(); - - TQDomElement docEl = doc.documentElement(); - TQDomElement baseEl = docEl.namedItem("base").toElement(); - - TQString base; - if (!baseEl.isNull()) - base = baseEl.attribute("href", TQString()); - - TQDomElement childEl = docEl.lastChild().toElement(); - addTocSect(tocItem, childEl, base, 1); -} - -void DocTDevTOCPlugin::addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level) -{ - while (!childEl.isNull()) - { - if (childEl.tagName() == TQString("tocsect%1").arg(level)) - { - TQString name = childEl.attribute("name"); - TQString url = childEl.attribute("url"); - - DocumentationItem *item = new DocumentationItem(level == 1 ? DocumentationItem::Book : DocumentationItem::Document, parent, name); - item->setURL(KURL(constructURL(base, url))); - - TQDomElement grandchildEl = childEl.lastChild().toElement(); - addTocSect(item, grandchildEl, base, level+1); - } - childEl = childEl.previousSibling().toElement(); - } -} - -void DocTDevTOCPlugin::setCatalogURL(DocumentationCatalogItem* item) -{ - TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); - if (!tocItem) - return; - - TQFileInfo fi(tocItem->tocFile()); - - TQFile f(tocItem->tocFile()); - if (!f.open(IO_ReadOnly)) - { - kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; - return; - } - TQDomDocument doc; - if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") - { - kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; - return; - } - f.close(); - - TQDomElement docEl = doc.documentElement(); - TQDomElement baseEl = docEl.namedItem("base").toElement(); - - if (item->url().isEmpty()) - { - if (baseEl.isNull()) - item->setURL(KURL()); - else - item->setURL(KURL(constructURL(baseEl.attribute("href", TQString()), - baseEl.attribute("url", TQString())))); - } -} - -TQString DocTDevTOCPlugin::constructURL(const TQString &base, const TQString &url) -{ - if (base.isEmpty() && !url.isEmpty()) - return url; - if (!url.isEmpty()) - return base.endsWith("/") ? base + url : base + "/" + url; - else - return base; -} - -#include "doctdevtocplugin.moc" diff --git a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.desktop b/parts/documentation/plugins/tdevtoc/doctdevtocplugin.desktop deleted file mode 100644 index 5f89e8d7..00000000 --- a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.desktop +++ /dev/null @@ -1,43 +0,0 @@ -[Desktop Entry] -Type=Service -Name=DocTDevTOCPlugin -Name[da]=DocTDevTOC-plugin -Name[sk]=Doc TDevTOC modul -Name[sv]=TDevelop innehållsförteckning-dokumentationsinsticksmodul -Name[ta]=DocTDevTOC சொருகு -Name[zh_TW]=TDevelop 目錄文件外掛程式 -Exec=blubb -Comment=Documentation plugin for TDevelopTOC documentation -Comment[ca]=Connector de documentació per a documentació TDevelopTOC -Comment[da]=Dokumentations-plugin for TDevelopTOC-dokumentation -Comment[de]=Komponente für TDevelopTOC-Dokumentation -Comment[el]=Πρόσθετο τεκμηρίωσης για τεκμηρίωση τύπου TDevelopTOC -Comment[es]=Complemento de documentación para TDevelopTOC -Comment[et]=TDevelopTOC dokumentatsiooni plugin -Comment[eu]=TDevelopTOC dokumentaziorako dokumentazio plugin-a -Comment[fa]=وصلۀ مستندسازی برای مستندات TDevelopTOC -Comment[fr]=Module externe de documentation pour la documentation TDevelopTOC -Comment[gl]=Extensión de documentación para documentación TDevelopTOC -Comment[hu]=Dokumentációmodul TDevelopTOC-dokumentációhoz -Comment[it]=Plugin di documentazione per file di TDevelopTOC -Comment[ja]=TDevelopTOC ドキュメンテーションのためのドキュメンテーションプラグイン -Comment[ms]=Plugin dokumentasi untuk dokumentasi TDevelopTOC -Comment[nds]=Dokmentatschoon-Moduul för TDevelopTOC-Dokmentatschoon -Comment[ne]=TDevelopTOC मिसिलीकरणका लागि मिसिलीकरण प्लगइन -Comment[nl]=Documentatie plugin for TDevelopTOC documentatie -Comment[pl]=Wtyczka dokumentacji dla dokumentacji w formacie TDevelopTOC -Comment[pt]='Plugin' para documentação TDevelopTOC -Comment[pt_BR]=Plug-in de documentação para document TOC do TDevelop -Comment[ru]=Модуль для просмотра TDevelopTOC -Comment[sk]=Dokumentačný modul pre TDevelopTOC dokumentáciu -Comment[sr]=Документациони прикључак за TDevelopTOC документацију -Comment[sr@Latn]=Dokumentacioni priključak za TDevelopTOC dokumentaciju -Comment[sv]=Dokumentationsinsticksmodul för TDevelop innehållsförteckningsdokumentation -Comment[ta]= TDevelopTOC ஆவணத்திற்கான ஆவணச் சொருகு -Comment[tg]=Модул барои наоиши TDevelopTOC -Comment[tr]=TDevelopTOC belgelendirmesi için belgelendirme eklentisi -Comment[zh_CN]=TDevelopTOC 文档的文档插件 -Comment[zh_TW]=TDevelop 目錄文件外掛程式 -ServiceTypes=TDevelop/DocumentationPlugins -X-TDevelop-Version=5 -X-TDE-Library=libdoctdevtocplugin diff --git a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.h b/parts/documentation/plugins/tdevtoc/doctdevtocplugin.h deleted file mode 100644 index 266efb94..00000000 --- a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.h +++ /dev/null @@ -1,55 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program 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 program 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 DOCTDEVTOCPLUGIN_H -#define DOCTDEVTOCPLUGIN_H - -#include - -#include - -class DocTDevTOCPlugin : public DocumentationPlugin -{ - Q_OBJECT - -public: - DocTDevTOCPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); - ~DocTDevTOCPlugin(); - - virtual TQString pluginName() const; - - virtual TQString catalogTitle(const TQString& url); - virtual DocumentationCatalogItem* createCatalog(TDEListView* contents, const TQString& title, const TQString& url); - virtual void createTOC(DocumentationCatalogItem* item); - virtual void setCatalogURL(DocumentationCatalogItem* item); - - virtual bool needRefreshIndex(DocumentationCatalogItem* item); - virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); - - virtual TQStringList fullTextSearchLocations(); - - virtual TQPair catalogLocatorProps(); - virtual void autoSetupPlugin(); - -protected: - void addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level); - static TQString constructURL(const TQString &base, const TQString &url) ; -}; - -#endif diff --git a/parts/documentation/protocols/chm/CMakeLists.txt b/parts/documentation/protocols/chm/CMakeLists.txt index 8d97053e..c444c226 100644 --- a/parts/documentation/protocols/chm/CMakeLists.txt +++ b/parts/documentation/protocols/chm/CMakeLists.txt @@ -43,6 +43,6 @@ tde_add_kpart( tdeio_chm tde_add_kpart( libkchmpart AUTOMOC SOURCES kchmpart.cpp - LINK tdevwidgets-shared + LINK kdevwidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/documentation/protocols/chm/Makefile.am b/parts/documentation/protocols/chm/Makefile.am index de7e0929..5a1092a2 100644 --- a/parts/documentation/protocols/chm/Makefile.am +++ b/parts/documentation/protocols/chm/Makefile.am @@ -9,7 +9,7 @@ tdeio_chm_la_LIBADD = $(LIB_TDEIO) tdeio_chm_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) libkchmpart_la_SOURCES = kchmpart.cpp -libkchmpart_la_LIBADD = -ltdehtml $(LIB_TDEPARTS) $(top_builddir)/lib/widgets/libtdevwidgets.la +libkchmpart_la_LIBADD = -ltdehtml $(LIB_TDEPARTS) $(top_builddir)/lib/widgets/libkdevwidgets.la libkchmpart_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) noinst_HEADERS = chm.h chmfile.h decompress.h kchmpart.h diff --git a/parts/documentation/protocols/chm/kchmpart.cpp b/parts/documentation/protocols/chm/kchmpart.cpp index ab688ff7..952228c4 100644 --- a/parts/documentation/protocols/chm/kchmpart.cpp +++ b/parts/documentation/protocols/chm/kchmpart.cpp @@ -67,7 +67,7 @@ TDEInstance* KChmPartFactory::instance() KChmPart::KChmPart( TQWidget * parent, const char * name ) - : TDevHTMLPart( ), m_job(0) + : KDevHTMLPart( ), m_job(0) { TDEInstance * instance = new TDEInstance( "kchmpart" ); setInstance( instance ); @@ -80,7 +80,7 @@ bool KChmPart::openURL( const KURL &url ) KURL chmURL = url; chmURL.setProtocol("ms-its"); chmURL.addPath("/"); - return TDevHTMLPart::openURL(chmURL); + return KDevHTMLPart::openURL(chmURL); } void KChmPart::slotDuplicate() diff --git a/parts/documentation/protocols/chm/kchmpart.h b/parts/documentation/protocols/chm/kchmpart.h index a3c8d9ec..9d1812b1 100644 --- a/parts/documentation/protocols/chm/kchmpart.h +++ b/parts/documentation/protocols/chm/kchmpart.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include @@ -52,7 +52,7 @@ class KChmPartFactory: public KParts::Factory }; -class KChmPart : public TDevHTMLPart +class KChmPart : public KDevHTMLPart { Q_OBJECT diff --git a/parts/documentation/searchview.cpp b/parts/documentation/searchview.cpp index 2893d574..67dca0ed 100644 --- a/parts/documentation/searchview.cpp +++ b/parts/documentation/searchview.cpp @@ -43,8 +43,8 @@ #include #include -#include -#include +#include +#include #include "documentation_part.h" #include "docutils.h" @@ -160,7 +160,7 @@ void SearchView::search() return; } - TQString indexdir = kapp->dirs()->saveLocation("data", "tdevdocumentation/search"); + TQString indexdir = kapp->dirs()->saveLocation("data", "kdevdocumentation/search"); TQDir d; if (indexdir.isEmpty() || !TQFile::exists(indexdir + "/htdig.conf")) { @@ -177,7 +177,7 @@ void SearchView::search() } } - TQString savedir = kapp->dirs()->saveLocation("data", "tdevdocumentation/search"); + TQString savedir = kapp->dirs()->saveLocation("data", "kdevdocumentation/search"); if (!d.exists(savedir)) d.mkdir(savedir); @@ -191,7 +191,7 @@ void SearchView::search() kdDebug(9002) << "starting kprocess" << endl; kdDebug(9002) << "htdig line:" << exe << " -c " << (indexdir + "/htdig.conf ") << query << endl; TDEProcess *proc = new TDEProcess; - TQString picdir = kapp->dirs()->findResourceDir("data", "tdevdocumentation/pics/htdig.png"); + TQString picdir = kapp->dirs()->findResourceDir("data", "kdevdocumentation/pics/htdig.png"); proc->setEnvironment("PICDIR", picdir); *proc << exe << "-c" << (indexdir + "/htdig.conf") << query; diff --git a/parts/documentation/selecttopic.h b/parts/documentation/selecttopic.h index e7e850bf..6ca5ad8b 100644 --- a/parts/documentation/selecttopic.h +++ b/parts/documentation/selecttopic.h @@ -22,7 +22,7 @@ #include "selecttopicbase.h" -#include "tdevdocumentationplugin.h" +#include "kdevdocumentationplugin.h" class SelectTopic: public SelectTopicBase{ Q_OBJECT diff --git a/parts/documentation/tdevdocumentation.desktop b/parts/documentation/tdevdocumentation.desktop deleted file mode 100644 index 721970e7..00000000 --- a/parts/documentation/tdevdocumentation.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=The Documentation plugin offers browsing and searching in local and online documentation with support for multiple documentation systems. -Comment[ca]=El connector de documentació ofereix navegació i recerca en documentació local i en línia amb suport per a múltiples sistemes de documentació. -Comment[da]=Dokumentations-plugin tilbyder visning og søgning i lokal og online dokumentation med understøttelse af flere dokumentations-systemer. -Comment[de]=Die Dokumentations-Komponente bietet eine Browsefunktion und Unterstützung für die Suche in mehreren Hilfedokumenten und Dokumentationssystemen. -Comment[el]=Το πρόσθετο τεκμηρίωσης προσφέρει περιήγηση και αναζήτηση σε τοπική και απομακρυσμένη τεκμηρίωση για πολλαπλά συστήματα τεκμηρίωσης. -Comment[es]=El complemento de documentación proporciona navegación y búsqueda en la documentación, tanto local como en línea, y permite múltiples sistemas de documentación. -Comment[et]=Dokumentatsiooniplugin võimaldab lehitseda ja otsida nii kohalikus kui võrgudokumentatsioonis paljusid dokumentatsioonisüsteeme kasutades. -Comment[eu]=Dokumentazio-pluginak lokaleko eta urruneko dokumentazio arakatzeko eta bilatzeko aukera ematen dizu, eta dokumentazio-sistema anitz onartzen ditu. -Comment[fa]=وصلۀ مستندسازی، مرور و جستجو در مستندات محلی و برخط را با پشتیبانی از سیستمهای مستندسازی چندگانه، ارائه می‌کند. -Comment[fr]=Le module externe de documentation offre une navigation et une recherche dans la documentation locale et en ligne ainsi que la prise en charge de systèmes de documentation mutiples. -Comment[gl]=A extensión de documentación ofrece navegación e búsqueda en documentación local e en liña con soporte para múltiples sistemas de documentación. -Comment[hu]=Dokumentációmegjelenítő elem helyi és távoli dokumentáció böngészéséhez, keresési lehetőséggel. Többféle formátumot támogat. -Comment[it]=Il plugin di documentazione offre navigazione e ricerca in locale e documentazione in linea con supporto per sistemi di documentazione multipla. -Comment[ms]=Plugin dokumentasi menawarkan pelungsuran dan pencarian dalam dokumentasi tempatan dan dalam talian dengan sokongan untuk pelbagai sistem dokumentasi. -Comment[nds]=Mit dat Dokmentatschoon-Moduul kannst Du lokale un Tokoppel-Dokmentatschoon dörkieken un -söken, mehr Dokmentatschoonsystemen warrt ünnerstütt. -Comment[ne]=मिसिलीकरण प्लगइनले बहुविध मिसिलीकरण प्रणालीको समर्थनसँग अनलाइन मिसिलीकरण र स्थानीय रूपमा ब्राउज र खोजी गर्न दिन्छ । -Comment[nl]=De documentatieplugin welke het mogelijk maakt om door lokale documentatie en documentatie op afstand te bladeren en te zoeken. Met ondersteuning voor verschillende documentatiesystemen. -Comment[pl]=Kontrola dokumentacji z obsługą przeglądania i wyszukiwania w różnych plikach pomocy i systemach dokumentacji. -Comment[pt]=O 'plugin' de documentação oferece navegação e procura em documentação local e em rede com suporte para vários sistemas de documentação. -Comment[pt_BR]=A documentação do plug-in oferece navegação e busca na documentação local e online com suporte para diversos sistemas de documentação. -Comment[ru]=Модуль документации позволяет упростить работу с документацией. -Comment[sk]=Dokumentačný modul proskytuje prehliadanie a vyhľadávanie v lokálnej a online dokumentácie s podporou viacerých dokumentačných systémov. -Comment[sr]=Прикључак за документацију са подршком за прегледање и тражење у локалној и документацији на вези, за више документационих система. -Comment[sr@Latn]=Priključak za dokumentaciju sa podrškom za pregledanje i traženje u lokalnoj i dokumentaciji na vezi, za više dokumentacionih sistema. -Comment[sv]=Dokumentationsinsticksprogrammet erbjuder bläddring och sökning i lokal dokumentation och dokumentation på nätet, med stöd för flera dokumentationssystem. -Comment[tr]=Belgelendirme eklentisi, çoklu belgelendirme sistemlerine destek ile, yerel ve çevrimiçi belgelere gözatma ve bu belgelerde arama yapılmasına izin verir. -Comment[zh_CN]=文档插件提供了本地和在线文档中提供浏览和搜索功能,支持多种文档系统 -Comment[zh_TW]=文件外掛程式提供對本地與線上文件的瀏覽與搜尋功能,並支援多重文件系統。 -Name=TDevDocumentation -Name[da]=TDevelop dokumentation -Name[nds]=TDevelop-Dokmentatschoon -Name[pt_BR]=TDevDocumentação -Name[sk]=KDev dokumentácia -Name[sv]=TDevelop dokumentation -Name[ta]=KDev ஆவணமாக்கல் -Name[tg]=Ҳуҷҷатҳои KDev -Name[zh_TW]=TDevelop 文件 -GenericName=Documentation -GenericName[br]=Teuliadur -GenericName[ca]=Documentació -GenericName[cy]=Dogfenniaeth -GenericName[da]=Dokumentation -GenericName[de]=Dokumentationsbaum -GenericName[el]=Τεκμηρίωση -GenericName[es]=Documentación -GenericName[et]=Dokumentatsioon -GenericName[eu]=Dokumentazioa -GenericName[fa]=مستندات -GenericName[ga]=Doiciméadú -GenericName[gl]=Documentación -GenericName[hi]=दस्तावेज़ीकरण -GenericName[hu]=Dokumentáció -GenericName[it]=Documentazione -GenericName[ja]=ドキュメンテーション -GenericName[ms]=Dokumentasi -GenericName[nds]=Dokmentatschoon -GenericName[ne]=मिसिलीकरण -GenericName[nl]=Documentatie -GenericName[pl]=Dokumentacja -GenericName[pt]=Documentação -GenericName[pt_BR]=Documentação -GenericName[ru]=Просмотр документации -GenericName[sk]=Dokumentácia -GenericName[sl]=Dokumentacija -GenericName[sr]=Документација -GenericName[sr@Latn]=Dokumentacija -GenericName[sv]=Dokumentation -GenericName[ta]=ஆவணமாக்கல் -GenericName[tg]=Намоиши ҳуҷҷатҳо -GenericName[tr]=Belgelendirme -GenericName[zh_CN]=文档 -GenericName[zh_TW]=文件 -Icon=khelpcenter -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Global -X-TDE-Library=libtdevdocumentation -X-TDevelop-Version=5 -X-TDevelop-Mode=AssistantMode -X-TDevelop-Properties=Documentation diff --git a/parts/documentation/tdevpart_documentation.rc b/parts/documentation/tdevpart_documentation.rc deleted file mode 100644 index 6fd8b488..00000000 --- a/parts/documentation/tdevpart_documentation.rc +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/parts/documentation/tools/htdig/htdigindex.cpp b/parts/documentation/tools/htdig/htdigindex.cpp index d422826c..c99c4a2c 100644 --- a/parts/documentation/tools/htdig/htdigindex.cpp +++ b/parts/documentation/tools/htdig/htdigindex.cpp @@ -45,10 +45,10 @@ ProgressDialog::ProgressDialog(bool index, TQWidget *parent, const char *name) { proc = 0; - indexdir = kapp->dirs()->saveLocation("data", "tdevdocumentation/search"); + indexdir = kapp->dirs()->saveLocation("data", "kdevdocumentation/search"); TQDir d; d.mkdir(indexdir); - TDEConfig config("tdevdocumentation", true); + TDEConfig config("kdevdocumentation", true); config.setGroup("htdig"); databaseDir = config.readPathEntry("databaseDir", indexdir); @@ -137,8 +137,8 @@ void ProgressDialog::setFilesDigged(int n) void ProgressDialog::setState(int n) { - TQPixmap unchecked = TQPixmap(locate("data", "tdevdocumentation/pics/unchecked.xpm")); - TQPixmap checked = TQPixmap(locate("data", "tdevdocumentation/pics/checked.xpm")); + TQPixmap unchecked = TQPixmap(locate("data", "kdevdocumentation/pics/unchecked.xpm")); + TQPixmap checked = TQPixmap(locate("data", "kdevdocumentation/pics/checked.xpm")); check1->setPixmap( n > 0 ? checked : unchecked); check2->setPixmap( n > 1 ? checked : unchecked); @@ -182,7 +182,7 @@ void ProgressDialog::addDir(const TQString &dir) void ProgressDialog::scanDirectories() { - TQString ftsLocationsFile = locateLocal("data", "tdevdocumentation/search/locations.txt"); + TQString ftsLocationsFile = locateLocal("data", "kdevdocumentation/search/locations.txt"); TQFile f(ftsLocationsFile); if (!f.open(IO_ReadOnly)) @@ -214,15 +214,15 @@ bool ProgressDialog::createConfig() if (language == "C") language = "en"; - TQString wrapper = locate("data", TQString("tdevdocumentation/%1/wrapper.html").arg(language)); + TQString wrapper = locate("data", TQString("kdevdocumentation/%1/wrapper.html").arg(language)); if (wrapper.isEmpty()) - wrapper = locate("data", TQString("tdevdocumentation/en/wrapper.html")); + wrapper = locate("data", TQString("kdevdocumentation/en/wrapper.html")); if (wrapper.isEmpty()) return false; wrapper = wrapper.left(wrapper.length()-12); // locate the image dir - TQString images = locate("data", "tdevdocumentation/pics/star.png"); + TQString images = locate("data", "kdevdocumentation/pics/star.png"); if (images.isEmpty()) return false; images = images.left(images.length()-8); @@ -300,7 +300,7 @@ bool ProgressDialog::generateIndex() setState(1); procdone = false; // run htdig - TDEConfig config("tdevdocumentation", true); + TDEConfig config("kdevdocumentation", true); config.setGroup("htdig"); exe = config.readPathEntry("htdigbin", kapp->dirs()->findExe("htdig")); if (exe.isEmpty()) @@ -365,7 +365,7 @@ void ProgressDialog::htdigExited(TDEProcess *proc) setFilesDigged(filesToDig); setState(2); - TDEConfig config("tdevdocumentation", true); + TDEConfig config("kdevdocumentation", true); config.setGroup("htdig"); // run htmerge ----------------------------------------------------- exe = config.readPathEntry("htmergebin", kapp->dirs()->findExe("htmerge")); diff --git a/parts/doxygen/CMakeLists.txt b/parts/doxygen/CMakeLists.txt index ed4bfeb9..00a18675 100644 --- a/parts/doxygen/CMakeLists.txt +++ b/parts/doxygen/CMakeLists.txt @@ -28,13 +28,13 @@ link_directories( ##### other data ################################ -install( FILES tdevdoxygen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevdoxygen.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdoxygen ) +install( FILES kdevdoxygen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevdoxygen.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdoxygen ) -##### libtdevdoxygen (module) ################### +##### libkdevdoxygen (module) ################### -tde_add_kpart( libtdevdoxygen AUTOMOC +tde_add_kpart( libkdevdoxygen AUTOMOC SOURCES doxygenpart.cpp doxygenconfigwidget.cpp input.cpp config.cpp version.cpp messages.cpp diff --git a/parts/doxygen/Makefile.am b/parts/doxygen/Makefile.am index e01fa6eb..703760cb 100644 --- a/parts/doxygen/Makefile.am +++ b/parts/doxygen/Makefile.am @@ -4,16 +4,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/src -DDOXYWIZARD \ $(all_includes) -kde_module_LTLIBRARIES = libtdevdoxygen.la -libtdevdoxygen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevdoxygen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevdoxygen.la +libkdevdoxygen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevdoxygen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevdoxygen_la_SOURCES = doxygenpart.cpp doxygenconfigwidget.cpp input.cpp config.cpp version.cpp messages.cpp +libkdevdoxygen_la_SOURCES = doxygenpart.cpp doxygenconfigwidget.cpp input.cpp config.cpp version.cpp messages.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdoxygen.desktop +service_DATA = kdevdoxygen.desktop -rcdir = $(kde_datadir)/tdevdoxygen -rc_DATA = tdevdoxygen.rc +rcdir = $(kde_datadir)/kdevdoxygen +rc_DATA = kdevdoxygen.rc diff --git a/parts/doxygen/doxygenpart.cpp b/parts/doxygen/doxygenpart.cpp index 960eef41..d965d98b 100644 --- a/parts/doxygen/doxygenpart.cpp +++ b/parts/doxygen/doxygenpart.cpp @@ -15,19 +15,19 @@ #include "doxygenconfigwidget.h" #include "configwidgetproxy.h" #include "config.h" -#include "tdevappfrontend.h" +#include "kdevappfrontend.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include @@ -47,15 +47,15 @@ #define PROJECTOPTIONS 1 -typedef TDevGenericFactory DoxygenFactory; -static const TDevPluginInfo data("tdevdoxygen"); -K_EXPORT_COMPONENT_FACTORY( libtdevdoxygen, DoxygenFactory( data ) ) +typedef KDevGenericFactory DoxygenFactory; +static const KDevPluginInfo data("kdevdoxygen"); +K_EXPORT_COMPONENT_FACTORY( libkdevdoxygen, DoxygenFactory( data ) ) DoxygenPart::DoxygenPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "DoxygenPart"), m_activeEditor(0), m_cursor(0) + : KDevPlugin(&data, parent, name ? name : "DoxygenPart"), m_activeEditor(0), m_cursor(0) { setInstance(DoxygenFactory::instance()); - setXMLFile("tdevdoxygen.rc"); + setXMLFile("kdevdoxygen.rc"); TDEAction *action; action = new TDEAction( i18n("Build API Documentation"), 0, @@ -272,7 +272,7 @@ void DoxygenPart::slotDoxygen() kdDebug(9026) << "Doxygen command line: " << cmdline << endl; - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, cmdline); } @@ -340,7 +340,7 @@ void DoxygenPart::slotDoxClean() if (could_be_dirty) { kdDebug(9026) << "Cleaning Doxygen generated API documentation using: " << cmdline << endl; - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(KShellProcess::quote(project()->projectDirectory()), cmdline); } else @@ -350,7 +350,7 @@ void DoxygenPart::slotDoxClean() void DoxygenPart::slotPreviewProcessExited( ) { - TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend"); + KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend"); if ( appFrontend != 0 ) disconnect(appFrontend, 0, this, 0); partController()->showDocument(KURL(m_tmpDir.name()+"html/index.html")); @@ -361,7 +361,7 @@ void DoxygenPart::slotRunPreview( ) if (m_file.isNull()) return; - TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend"); + KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend"); if ( appFrontend == 0 ) return; diff --git a/parts/doxygen/doxygenpart.h b/parts/doxygen/doxygenpart.h index 77bafe46..aaa438de 100644 --- a/parts/doxygen/doxygenpart.h +++ b/parts/doxygen/doxygenpart.h @@ -20,7 +20,7 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" class DoxygenDialog; class TQPopupMenu; @@ -37,7 +37,7 @@ namespace KTextEditor{ class EditInterface; } -class DoxygenPart : public TDevPlugin +class DoxygenPart : public KDevPlugin { Q_OBJECT diff --git a/parts/doxygen/kdevdoxygen.desktop b/parts/doxygen/kdevdoxygen.desktop new file mode 100644 index 00000000..7d50f15b --- /dev/null +++ b/parts/doxygen/kdevdoxygen.desktop @@ -0,0 +1,81 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=The doxygen plugin provides a way to specify and control generation of documentation for a project, based on source code content. You need to have doxygen installed to be able to use this. For more info goto http://www.doxygen.org +Comment[ca]=El connector doxygen proporciona una forma d'especificar i controlar la generació de documentació d'un projecte, basant-se en el contingut del codi font. Necessitareu tenir instal·lat doxygen. Per a més informació visiteu http://www.doxygen.org +Comment[da]=Doxygen-plugin sørger for en måde at angive og kontrollere generering af dokumentation for et projekt, baseret på kildekodens indhold. Du skal have doxygen installeret for at kunne bruge dette. For mere info gå til http://www.doxygen.org +Comment[de]=Diese Komponente bietet Unterstützung bei der Erstellung von Projektdokumentation, die auf den Quelltexten basiert. Um diese Funktionalität zu nutzen, muss Doxygen installiert sein. Weitere Informationen finden sie auf http://www.doxygen.org. +Comment[el]=Το πρόσθετο doxygen προσφέρει μια μέθοδο ορισμού και ελέγχου της δημιουργίας της τεκμηρίωσης για ένα έργο, βασισμένο στον πηγαίο κώδικα. Πρέπει να έχετε το doxygen εγκατεστημένο για να το χρησιμοποιήσετε. Για περισσότερες πληροφορίες πηγαίνετε στο http://www.doxygen.org +Comment[es]=El complemento doxygen proporciona una forma de especificar y controlar la generación de documentación de un proyecto, basándose en el contenido del código fuente. Necesita tener instalado doxygen. Para más información visite http://www.doxygen.org +Comment[et]=Doxygeni plugin võimaldab määrata ja kontrollida projekti dokumentatsiooni loomist vastavalt lähtekoodi sisule. Selleks peab olema paigaldatud ka programm 'doxygen'. Vaata täpsemalt http://www.doxygen.org +Comment[eu]=Doxygen plugin-ak, iturburu kodean oinarrituta, proiektu baterako dokumentazio sorkuntza eta kontrola zehazteko aukera ematen dizu. Doxygen instalatuta eduki behar duzu hau erabiltzeko. Informazio gehiagorako joan hona:http://www.doxygen.org +Comment[fa]=وصلۀ doxygen راهی برای مشخص کردن و کنترل تولید مستندات پروژه بر اساس متن کد منبع فراهم می‌کند. شما برای توانایی در استفاده از این، نیاز به نصب doxygen دارید. برای اطلاعات بیشتر به http://www.doxygen.org بروید +Comment[fr]=Le module externe « doxygen » fournit un moyen de spécifier et de contrôler la génération de la documentation pour un projet, en se basant sur le contenu du code source. Pour pouvoir l'utiliser, vous devez avoir installé « doxygen ». Pour plus d'informations, allez sur le site http://www.doxygen.org +Comment[gl]=A extensión doxigen proporciona unha maneira de especificar e controlar a xeración da documentación dun proxecto, basada nos contidos do código fonte. Necesitará ter doxigen instalado para poder usar isto. Para máis información visite http://www.doxygen.org +Comment[hu]=A Doxygen bővítőmodullal a projekt teljes dokumentációjának készítése elvégezhető, közvetlenül a forráskódból. Használatához előbb telepíteni kell a Doxygen programcsomagot. Részletes információ itt található: http://www.doxygen.org +Comment[it]=Il plugin doxygen offre un modo per specificare e controllare la generazione della documentazione di un progetto, basato sul contenuto del codice sorgente. Devi avere doxygen installato per utilizzarlo. Per maggiori informazioni vai su http://www.doxygen.org +Comment[ja]=doxygen プラグインは、ソースコード内容に基づいて、プロジェクトのためのドキュメンテーションの生成を指定しコントロールする方法を提供します。これを使用するには doxygen をインストールする必要があります。より多くの情報は http://www.doxygen.org にあります。 +Comment[ms]=Plugin doxygen menyediakan cara untuk menyatakan dan mengawal penjanaan dokumentasi untuk projek, berdasarkan pada kandungan kod sumber. Anda perlu mempunyai doxygen dipasang untuk boleh menggunakannya. Untuk lebih maklumat lawat http://www.doxygen.org +Comment[nds]=Dat Doxygen-Moduul stellt en op den Borntextinholt opbuut Ünnerstütten bi't Opstellen vun Projektdokmentatschonen praat. Dormit Du dat bruken kannst, mutt "doxygen" installeert wesen. Mehr Informatschonen laat sik op http://www.doxygen.org finnen. +Comment[ne]=डक्सिजन प्लगइनले स्रोत सङ्केत प्रसङ्गमा आधारित, परियोजनाका लागि मिसिलीकरणको उत्पादन नियन्त्रण र निर्दिष्ट गर्ने तरिका प्रदान गर्दछ । यसलाई प्रयोग गर्न सक्षम हुनका लागि तपाईँले डक्सिजन स्थापना गर्नु पर्दछ । बढी जानकारीका लागि http://www.doxygen.org मा जानुहोस् । +Comment[nl]=De doxygen-plugin biedt hulp bij het vervaardigen van documentatie voor een project, gebaseerd op documentatie in de broncode. Om deze functie te kunnen gebruiken dient u doxygen te hebben geïnstalleerd. Meer info: http://www.doxygen.org/ +Comment[pl]=Wtyczka doxygena pozwala kontrolować generację dokumentacji projektu, bazując na zawartości kodu źródłowego. Aby użyć tej opcji trzeba mieć zainstalowany doxygen. Więcej informacji można uzyskać na http://www.doxygen.org +Comment[pt]=O 'plugin' do doxygen oferece uma forma de especificar e controlar a geração de documentação de um projecto, baseada no conteúdo do código-fonte. Você necessita de ter o 'doxygen' instalado para poder usar isto. Para obter mais informações vá a http://www.doxygen.org +Comment[pt_BR]=O plug-in do doxygen fornece uma maneira de especificar e controlar a geração de documentação para um projeto, baseado no conteúdo do código fonte. Você precisa ter o doxygen instalado para poder usar isto. Para mais informações vá em http://www.doxygen.org +Comment[ru]=Модуль поддержки doxygen предоставляет возможности контроля генерации проектной документации на основе содержимого исходных файлов. Для использования необходим doxygen. Подробнее об этом смотрите на http://www.doxygen.org. +Comment[sk]=Doxygen modul proskytuje spôsob ako špecifikovať a generovať projektovú dokumentáciu na základe obsahu zdrojového kódu. Potrebujete mať nainštalovaný doxygen. Pre viac informácií pozrite http://www.doxygen.org +Comment[sr]=Doxygen прикључак обезбеђује начин да се прецизира и контролише документација за пројекат, на основу садржаја изворног кôда. Потребно је да имате инсталиран doxygen да бисте били у могућности да користите ово. За више информација идите на http://www.doxygen.org +Comment[sr@Latn]=Doxygen priključak obezbeđuje način da se precizira i kontroliše dokumentacija za projekat, na osnovu sadržaja izvornog kôda. Potrebno je da imate instaliran doxygen da biste bili u mogućnosti da koristite ovo. Za više informacija idite na http://www.doxygen.org +Comment[sv]=Doxygen-insticksprogrammet tillhandahåller ett sätt att ange och styra hur dokument skapas för ett projekt, baserat på källkodens innehåll. Du måste ha installerat Doxygen för att kunna använda det. För mer information besök http://www.doxygen.org. +Comment[ta]=டிஆக்சிஜன் சொருகி உங்கள் திட்டப்பணிக்கு குறிப்பிட்ட வழி மற்றும் ஆவணத்தின் கட்டுபாட்டு உற்பத்திக்கு இது உதவும். இதை உபயோகிக்க முதலில் நீங்கள் டிஆக்சிஜன் நிறுவ வேண்டும். மேலும் விவரங்களுக்கு http://www.doxygen.org +Comment[tg]=Модули тарафдорбудаи doxygen барои идора намудани генератсияи ҳуҷҷатҳо дар асоси файлҳои берунӣ буда имконият медиҳад.Барои истифодаи doxygen-и лозимӣ.Барои пурратар гирифтани маълумот ба http://www.doxygen.org назар намоед +Comment[tr]=Doxygen eklentisi, kaynak kod içeriğine göre bir projenin belgelerinin yaratılmasının belirtilmesi ve kontrolü için bir yol sağlar. Bunu kullanabilmek için doxygen'ın kurulu olması lazımdır. Daha fazla bilgi için http://www.doxygen.org adresine gidin. +Comment[zh_CN]=doxygen 是基于源文件产生文档的控制插件。必须安装 doxygen 才能使用。更多信息参考 http://www.doxygen.org +Comment[zh_TW]=Doxygen 外掛程式提供依據程式源碼內容產生並控制專案文件的方式。您需要安裝 doxygen 才能使用。詳情請參考 http://www.doxygen.org +Name=KDevDoxygen +Name[da]=TDevelop Doxygen +Name[de]=Unterstützung für Doxygen (TDevelop) +Name[hi]=के-डेव-डॉक्सीज़ेन +Name[nds]=Doxygen-Ünnerstütten för TDevelop +Name[sk]=KDev Doxygen +Name[sv]=TDevelop Doxygen +Name[zh_TW]=TDevelop Doxygen +GenericName=Doxygen Support +GenericName[ca]=Suport per a doxygen +GenericName[da]=Doxygen understøttelse +GenericName[de]=Unterstützung für Doxygen +GenericName[el]=Υποστήριξη Doxygen +GenericName[es]=Soporte para Doxygen +GenericName[et]=Doxygeni toetus +GenericName[eu]=Doxygen euskarria +GenericName[fa]=پشتیبانی Doxygen +GenericName[fr]=Prise en charge de Doxygen +GenericName[ga]=Tacaíocht Doxygen +GenericName[gl]=Soporte para Doxygen +GenericName[hu]=Doxygen-támogatás +GenericName[it]=Supporto Doxygen +GenericName[ja]=Doxygen サポート +GenericName[ms]=Sokongan Doxygen +GenericName[nds]=Ünnerstütten för Doxygen +GenericName[ne]=डक्सिजन समर्थन +GenericName[nl]=Doxygen ondersteuning +GenericName[pl]=Obsług Doxygena +GenericName[pt]=Suporte a Doxygen +GenericName[pt_BR]=Suporte ao Doxygen +GenericName[ru]=Поддержка Doxygen +GenericName[sk]=Doxygen podpora +GenericName[sl]=Podpora za Doxygen +GenericName[sr]=Doxygen подршка +GenericName[sr@Latn]=Doxygen podrška +GenericName[sv]=Doxygen-stöd +GenericName[ta]=Doxygen ஆதரவு +GenericName[tg]=Тарафдори намудани Doxygen +GenericName[tr]=Doxygen Desteği +GenericName[zh_CN]=Doxygen 支持 +GenericName[zh_TW]=Doxygen 支援 +ServiceTypes=TDevelop/Plugin +Icon=tdevelop +X-TDE-Library=libkdevdoxygen +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=CProjectDocumentation,CPPProjectDocumentation,JavaProjectDocumentation,PHPProjectDocumentation diff --git a/parts/doxygen/kdevdoxygen.rc b/parts/doxygen/kdevdoxygen.rc new file mode 100644 index 00000000..9faa6cd5 --- /dev/null +++ b/parts/doxygen/kdevdoxygen.rc @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/parts/doxygen/tdevdoxygen.desktop b/parts/doxygen/tdevdoxygen.desktop deleted file mode 100644 index a69635ab..00000000 --- a/parts/doxygen/tdevdoxygen.desktop +++ /dev/null @@ -1,81 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=The doxygen plugin provides a way to specify and control generation of documentation for a project, based on source code content. You need to have doxygen installed to be able to use this. For more info goto http://www.doxygen.org -Comment[ca]=El connector doxygen proporciona una forma d'especificar i controlar la generació de documentació d'un projecte, basant-se en el contingut del codi font. Necessitareu tenir instal·lat doxygen. Per a més informació visiteu http://www.doxygen.org -Comment[da]=Doxygen-plugin sørger for en måde at angive og kontrollere generering af dokumentation for et projekt, baseret på kildekodens indhold. Du skal have doxygen installeret for at kunne bruge dette. For mere info gå til http://www.doxygen.org -Comment[de]=Diese Komponente bietet Unterstützung bei der Erstellung von Projektdokumentation, die auf den Quelltexten basiert. Um diese Funktionalität zu nutzen, muss Doxygen installiert sein. Weitere Informationen finden sie auf http://www.doxygen.org. -Comment[el]=Το πρόσθετο doxygen προσφέρει μια μέθοδο ορισμού και ελέγχου της δημιουργίας της τεκμηρίωσης για ένα έργο, βασισμένο στον πηγαίο κώδικα. Πρέπει να έχετε το doxygen εγκατεστημένο για να το χρησιμοποιήσετε. Για περισσότερες πληροφορίες πηγαίνετε στο http://www.doxygen.org -Comment[es]=El complemento doxygen proporciona una forma de especificar y controlar la generación de documentación de un proyecto, basándose en el contenido del código fuente. Necesita tener instalado doxygen. Para más información visite http://www.doxygen.org -Comment[et]=Doxygeni plugin võimaldab määrata ja kontrollida projekti dokumentatsiooni loomist vastavalt lähtekoodi sisule. Selleks peab olema paigaldatud ka programm 'doxygen'. Vaata täpsemalt http://www.doxygen.org -Comment[eu]=Doxygen plugin-ak, iturburu kodean oinarrituta, proiektu baterako dokumentazio sorkuntza eta kontrola zehazteko aukera ematen dizu. Doxygen instalatuta eduki behar duzu hau erabiltzeko. Informazio gehiagorako joan hona:http://www.doxygen.org -Comment[fa]=وصلۀ doxygen راهی برای مشخص کردن و کنترل تولید مستندات پروژه بر اساس متن کد منبع فراهم می‌کند. شما برای توانایی در استفاده از این، نیاز به نصب doxygen دارید. برای اطلاعات بیشتر به http://www.doxygen.org بروید -Comment[fr]=Le module externe « doxygen » fournit un moyen de spécifier et de contrôler la génération de la documentation pour un projet, en se basant sur le contenu du code source. Pour pouvoir l'utiliser, vous devez avoir installé « doxygen ». Pour plus d'informations, allez sur le site http://www.doxygen.org -Comment[gl]=A extensión doxigen proporciona unha maneira de especificar e controlar a xeración da documentación dun proxecto, basada nos contidos do código fonte. Necesitará ter doxigen instalado para poder usar isto. Para máis información visite http://www.doxygen.org -Comment[hu]=A Doxygen bővítőmodullal a projekt teljes dokumentációjának készítése elvégezhető, közvetlenül a forráskódból. Használatához előbb telepíteni kell a Doxygen programcsomagot. Részletes információ itt található: http://www.doxygen.org -Comment[it]=Il plugin doxygen offre un modo per specificare e controllare la generazione della documentazione di un progetto, basato sul contenuto del codice sorgente. Devi avere doxygen installato per utilizzarlo. Per maggiori informazioni vai su http://www.doxygen.org -Comment[ja]=doxygen プラグインは、ソースコード内容に基づいて、プロジェクトのためのドキュメンテーションの生成を指定しコントロールする方法を提供します。これを使用するには doxygen をインストールする必要があります。より多くの情報は http://www.doxygen.org にあります。 -Comment[ms]=Plugin doxygen menyediakan cara untuk menyatakan dan mengawal penjanaan dokumentasi untuk projek, berdasarkan pada kandungan kod sumber. Anda perlu mempunyai doxygen dipasang untuk boleh menggunakannya. Untuk lebih maklumat lawat http://www.doxygen.org -Comment[nds]=Dat Doxygen-Moduul stellt en op den Borntextinholt opbuut Ünnerstütten bi't Opstellen vun Projektdokmentatschonen praat. Dormit Du dat bruken kannst, mutt "doxygen" installeert wesen. Mehr Informatschonen laat sik op http://www.doxygen.org finnen. -Comment[ne]=डक्सिजन प्लगइनले स्रोत सङ्केत प्रसङ्गमा आधारित, परियोजनाका लागि मिसिलीकरणको उत्पादन नियन्त्रण र निर्दिष्ट गर्ने तरिका प्रदान गर्दछ । यसलाई प्रयोग गर्न सक्षम हुनका लागि तपाईँले डक्सिजन स्थापना गर्नु पर्दछ । बढी जानकारीका लागि http://www.doxygen.org मा जानुहोस् । -Comment[nl]=De doxygen-plugin biedt hulp bij het vervaardigen van documentatie voor een project, gebaseerd op documentatie in de broncode. Om deze functie te kunnen gebruiken dient u doxygen te hebben geïnstalleerd. Meer info: http://www.doxygen.org/ -Comment[pl]=Wtyczka doxygena pozwala kontrolować generację dokumentacji projektu, bazując na zawartości kodu źródłowego. Aby użyć tej opcji trzeba mieć zainstalowany doxygen. Więcej informacji można uzyskać na http://www.doxygen.org -Comment[pt]=O 'plugin' do doxygen oferece uma forma de especificar e controlar a geração de documentação de um projecto, baseada no conteúdo do código-fonte. Você necessita de ter o 'doxygen' instalado para poder usar isto. Para obter mais informações vá a http://www.doxygen.org -Comment[pt_BR]=O plug-in do doxygen fornece uma maneira de especificar e controlar a geração de documentação para um projeto, baseado no conteúdo do código fonte. Você precisa ter o doxygen instalado para poder usar isto. Para mais informações vá em http://www.doxygen.org -Comment[ru]=Модуль поддержки doxygen предоставляет возможности контроля генерации проектной документации на основе содержимого исходных файлов. Для использования необходим doxygen. Подробнее об этом смотрите на http://www.doxygen.org. -Comment[sk]=Doxygen modul proskytuje spôsob ako špecifikovať a generovať projektovú dokumentáciu na základe obsahu zdrojového kódu. Potrebujete mať nainštalovaný doxygen. Pre viac informácií pozrite http://www.doxygen.org -Comment[sr]=Doxygen прикључак обезбеђује начин да се прецизира и контролише документација за пројекат, на основу садржаја изворног кôда. Потребно је да имате инсталиран doxygen да бисте били у могућности да користите ово. За више информација идите на http://www.doxygen.org -Comment[sr@Latn]=Doxygen priključak obezbeđuje način da se precizira i kontroliše dokumentacija za projekat, na osnovu sadržaja izvornog kôda. Potrebno je da imate instaliran doxygen da biste bili u mogućnosti da koristite ovo. Za više informacija idite na http://www.doxygen.org -Comment[sv]=Doxygen-insticksprogrammet tillhandahåller ett sätt att ange och styra hur dokument skapas för ett projekt, baserat på källkodens innehåll. Du måste ha installerat Doxygen för att kunna använda det. För mer information besök http://www.doxygen.org. -Comment[ta]=டிஆக்சிஜன் சொருகி உங்கள் திட்டப்பணிக்கு குறிப்பிட்ட வழி மற்றும் ஆவணத்தின் கட்டுபாட்டு உற்பத்திக்கு இது உதவும். இதை உபயோகிக்க முதலில் நீங்கள் டிஆக்சிஜன் நிறுவ வேண்டும். மேலும் விவரங்களுக்கு http://www.doxygen.org -Comment[tg]=Модули тарафдорбудаи doxygen барои идора намудани генератсияи ҳуҷҷатҳо дар асоси файлҳои берунӣ буда имконият медиҳад.Барои истифодаи doxygen-и лозимӣ.Барои пурратар гирифтани маълумот ба http://www.doxygen.org назар намоед -Comment[tr]=Doxygen eklentisi, kaynak kod içeriğine göre bir projenin belgelerinin yaratılmasının belirtilmesi ve kontrolü için bir yol sağlar. Bunu kullanabilmek için doxygen'ın kurulu olması lazımdır. Daha fazla bilgi için http://www.doxygen.org adresine gidin. -Comment[zh_CN]=doxygen 是基于源文件产生文档的控制插件。必须安装 doxygen 才能使用。更多信息参考 http://www.doxygen.org -Comment[zh_TW]=Doxygen 外掛程式提供依據程式源碼內容產生並控制專案文件的方式。您需要安裝 doxygen 才能使用。詳情請參考 http://www.doxygen.org -Name=KDevDoxygen -Name[da]=TDevelop Doxygen -Name[de]=Unterstützung für Doxygen (TDevelop) -Name[hi]=के-डेव-डॉक्सीज़ेन -Name[nds]=Doxygen-Ünnerstütten för TDevelop -Name[sk]=KDev Doxygen -Name[sv]=TDevelop Doxygen -Name[zh_TW]=TDevelop Doxygen -GenericName=Doxygen Support -GenericName[ca]=Suport per a doxygen -GenericName[da]=Doxygen understøttelse -GenericName[de]=Unterstützung für Doxygen -GenericName[el]=Υποστήριξη Doxygen -GenericName[es]=Soporte para Doxygen -GenericName[et]=Doxygeni toetus -GenericName[eu]=Doxygen euskarria -GenericName[fa]=پشتیبانی Doxygen -GenericName[fr]=Prise en charge de Doxygen -GenericName[ga]=Tacaíocht Doxygen -GenericName[gl]=Soporte para Doxygen -GenericName[hu]=Doxygen-támogatás -GenericName[it]=Supporto Doxygen -GenericName[ja]=Doxygen サポート -GenericName[ms]=Sokongan Doxygen -GenericName[nds]=Ünnerstütten för Doxygen -GenericName[ne]=डक्सिजन समर्थन -GenericName[nl]=Doxygen ondersteuning -GenericName[pl]=Obsług Doxygena -GenericName[pt]=Suporte a Doxygen -GenericName[pt_BR]=Suporte ao Doxygen -GenericName[ru]=Поддержка Doxygen -GenericName[sk]=Doxygen podpora -GenericName[sl]=Podpora za Doxygen -GenericName[sr]=Doxygen подршка -GenericName[sr@Latn]=Doxygen podrška -GenericName[sv]=Doxygen-stöd -GenericName[ta]=Doxygen ஆதரவு -GenericName[tg]=Тарафдори намудани Doxygen -GenericName[tr]=Doxygen Desteği -GenericName[zh_CN]=Doxygen 支持 -GenericName[zh_TW]=Doxygen 支援 -ServiceTypes=TDevelop/Plugin -Icon=tdevelop -X-TDE-Library=libtdevdoxygen -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=CProjectDocumentation,CPPProjectDocumentation,JavaProjectDocumentation,PHPProjectDocumentation diff --git a/parts/doxygen/tdevdoxygen.rc b/parts/doxygen/tdevdoxygen.rc deleted file mode 100644 index 9faa6cd5..00000000 --- a/parts/doxygen/tdevdoxygen.rc +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/parts/filecreate/CMakeLists.txt b/parts/filecreate/CMakeLists.txt index 5655e7b9..a562f8e1 100644 --- a/parts/filecreate/CMakeLists.txt +++ b/parts/filecreate/CMakeLists.txt @@ -31,13 +31,13 @@ link_directories( ##### other data ################################ -install( FILES tdevfilecreate.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_filecreate.rc template-info.xml DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate ) +install( FILES kdevfilecreate.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_filecreate.rc template-info.xml DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate ) -##### libtdevfilecreate (module) ################ +##### libkdevfilecreate (module) ################ -tde_add_kpart( libtdevfilecreate AUTOMOC +tde_add_kpart( libkdevfilecreate AUTOMOC SOURCES filecreate_part.cpp filecreate_listitem.cpp filecreate_filetype.cpp filecreate_filedialog.cpp diff --git a/parts/filecreate/Makefile.am b/parts/filecreate/Makefile.am index ca0f1790..efe204d9 100644 --- a/parts/filecreate/Makefile.am +++ b/parts/filecreate/Makefile.am @@ -5,11 +5,11 @@ SUBDIRS = file-templates INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevfilecreate.la -libtdevfilecreate_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfilecreate_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfilecreate.la +libkdevfilecreate_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfilecreate_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfilecreate_la_SOURCES = filecreate_part.cpp filecreate_listitem.cpp \ +libkdevfilecreate_la_SOURCES = filecreate_part.cpp filecreate_listitem.cpp \ filecreate_filetype.cpp filecreate_filedialog.cpp fcconfigwidgetbase.ui fcconfigwidget.cpp \ fctypeeditbase.ui fctypeedit.cpp fctemplateeditbase.ui fctemplateedit.cpp \ filecreate_newfile.cpp @@ -17,7 +17,7 @@ libtdevfilecreate_la_SOURCES = filecreate_part.cpp filecreate_listitem.cpp \ METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfilecreate.desktop +service_DATA = kdevfilecreate.desktop -rcdir = $(kde_datadir)/tdevfilecreate -rc_DATA = tdevpart_filecreate.rc template-info.xml +rcdir = $(kde_datadir)/kdevfilecreate +rc_DATA = kdevpart_filecreate.rc template-info.xml diff --git a/parts/filecreate/README.dox b/parts/filecreate/README.dox index fc0fbc76..34a7882d 100644 --- a/parts/filecreate/README.dox +++ b/parts/filecreate/README.dox @@ -20,7 +20,7 @@ Example XML: \verbatim - + @@ -28,7 +28,7 @@ Example XML: - + \endverbatim @@ -36,14 +36,14 @@ You can also use global template definitions supplied with the FileCreate part: \verbatim - + - + \endverbatim diff --git a/parts/filecreate/fcconfigwidget.cpp b/parts/filecreate/fcconfigwidget.cpp index 14066c11..7c6fabc4 100644 --- a/parts/filecreate/fcconfigwidget.cpp +++ b/parts/filecreate/fcconfigwidget.cpp @@ -35,8 +35,8 @@ #include "fcconfigwidget.h" #include "filecreate_part.h" #include "filecreate_filetype.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" FCConfigWidget::FCConfigWidget(FileCreatePart * part, bool global, TQWidget *parent, const char *name): @@ -90,7 +90,7 @@ void FCConfigWidget::accept() void FCConfigWidget::loadGlobalConfig(TQListView *view, bool checkmarks) { - TQString globalXMLFile = ::locate("data", "tdevfilecreate/template-info.xml"); + TQString globalXMLFile = ::locate("data", "kdevfilecreate/template-info.xml"); TQDomDocument globalDom; if (!globalXMLFile.isNull() && DomUtil::openDOMFile(globalDom,globalXMLFile)) { @@ -103,7 +103,7 @@ void FCConfigWidget::loadGlobalConfig(TQListView *view, bool checkmarks) if (checkmarks) { TQDomElement useGlobalTypes = - DomUtil::elementByPath(*(m_part->projectDom()),"/tdevfilecreate/useglobaltypes"); + DomUtil::elementByPath(*(m_part->projectDom()),"/kdevfilecreate/useglobaltypes"); for(TQDomNode node = useGlobalTypes.firstChild(); !node.isNull();node=node.nextSibling()) { if (node.isElement() && node.nodeName()=="type") @@ -171,14 +171,14 @@ void FCConfigWidget::saveGlobalConfig() TQDomDocument globalDom; TQDomElement element = globalDom.createElement("tdevelop" ); globalDom.appendChild(element); - TQDomElement apPart = globalDom.createElement("tdevfilecreate"); + TQDomElement apPart = globalDom.createElement("kdevfilecreate"); element.appendChild(apPart); TQDomElement fileTypes = globalDom.createElement( "filetypes" ); apPart.appendChild( fileTypes ); saveConfiguration(globalDom, fileTypes, true); - TQFile config( TDEGlobal::dirs()->saveLocation("data", "tdevfilecreate/", true) + "template-info.xml" ); + TQFile config( TDEGlobal::dirs()->saveLocation("data", "kdevfilecreate/", true) + "template-info.xml" ); config.open(IO_WriteOnly | IO_Truncate); TQTextStream stream(&config); stream << ""; @@ -190,10 +190,10 @@ void FCConfigWidget::saveProjectConfig() { TQDomDocument dom = *m_part->projectDom( ); TQDomElement element = dom.documentElement( ); - TQDomElement apPart = element.namedItem( "tdevfilecreate" ).toElement( ); + TQDomElement apPart = element.namedItem( "kdevfilecreate" ).toElement( ); if( apPart.isNull( ) ) { - apPart = dom.createElement( "tdevfilecreate" ); + apPart = dom.createElement( "kdevfilecreate" ); element.appendChild( apPart ); } @@ -291,7 +291,7 @@ void FCConfigWidget::saveConfiguration(TQDomDocument &dom, TQDomElement &element { TQString dest; if (global) - dest = TDEGlobal::dirs()->saveLocation("data", "/tdevfilecreate/file-templates/", true); + dest = TDEGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true); else dest = m_part->project()->projectDirectory() + "/templates/"; if (it.current()->text(4) == "create") @@ -318,7 +318,7 @@ void FCConfigWidget::saveConfiguration(TQDomDocument &dom, TQDomElement &element { TQString dest; if (global) - dest = TDEGlobal::dirs()->saveLocation("data", "/tdevfilecreate/file-templates/", true); + dest = TDEGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true); else dest = m_part->project()->projectDirectory() + "/templates/"; if (lastChild->text(4) == "create") @@ -440,7 +440,7 @@ void FCConfigWidget::copyToProject_button_clicked() it->parent()->text(1), it->parent()->text(2), it->parent()->text(3), - locate("data", "tdevfilecreate/file-templates/"+ it->parent()->text(0))); + locate("data", "kdevfilecreate/file-templates/"+ it->parent()->text(0))); destParent += it->parent()->text(0) + "-"; TQCheckListItem *chk = dynamic_cast(it->parent()); if (chk) @@ -452,13 +452,13 @@ void FCConfigWidget::copyToProject_button_clicked() it->text(1), it->text(2), it->text(3), - locate("data", "tdevfilecreate/file-templates/"+destParent + it->text(0))); + locate("data", "kdevfilecreate/file-templates/"+destParent + it->text(0))); else it_copy = new TQListViewItem(fc_view, it->text(0), it->text(1), it->text(2), it->text(3), - locate("data", "tdevfilecreate/file-templates/" +destParent+ it->text(0))); + locate("data", "kdevfilecreate/file-templates/" +destParent+ it->text(0))); TQCheckListItem *chk = dynamic_cast(it); if (chk) chk->setOn(false); @@ -470,7 +470,7 @@ void FCConfigWidget::copyToProject_button_clicked() it_child->text(1), it_child->text(2), it_child->text(3), - locate("data", "tdevfilecreate/file-templates/"+ it_copy->text(0) + "-" + it_child->text(0))); + locate("data", "kdevfilecreate/file-templates/"+ it_copy->text(0) + "-" + it_child->text(0))); TQCheckListItem *chk_child = dynamic_cast(it_child); if (chk_child) chk_child->setOn(false); @@ -683,7 +683,7 @@ void FCConfigWidget::edit_type_content_button_clicked( ) } else { - TQString dest = TDEGlobal::dirs()->saveLocation("data", "/tdevfilecreate/file-templates/", true); + TQString dest = TDEGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true); TQString typePath = dest + type_name; KURL content; content.setPath(typePath); @@ -691,7 +691,7 @@ void FCConfigWidget::edit_type_content_button_clicked( ) { TQFileInfo fi(dest+type_name); if (!fi.exists()) - copyTemplate(locate("data", "tdevfilecreate/file-templates/" + type_name), dest, type_name); + copyTemplate(locate("data", "kdevfilecreate/file-templates/" + type_name), dest, type_name); m_part->partController()->editDocument(content); } else diff --git a/parts/filecreate/file-templates/CMakeLists.txt b/parts/filecreate/file-templates/CMakeLists.txt index 37b9a309..04405e1a 100644 --- a/parts/filecreate/file-templates/CMakeLists.txt +++ b/parts/filecreate/file-templates/CMakeLists.txt @@ -14,4 +14,4 @@ install( FILES ui-dialogr ui-tabdialog ui-wizard dox ts ui-mainwin-qt4 ui-widget-qt4 ui-dialogb-qt4 ui-dialogr-qt4 ui-dialog-qt4 qrc - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/parts/filecreate/file-templates/Makefile.am b/parts/filecreate/file-templates/Makefile.am index 631e3554..672a1cfa 100644 --- a/parts/filecreate/file-templates/Makefile.am +++ b/parts/filecreate/file-templates/Makefile.am @@ -1,2 +1,2 @@ -rcdir = $(kde_datadir)/tdevfilecreate/file-templates +rcdir = $(kde_datadir)/kdevfilecreate/file-templates rc_DATA = ui ui-dialog ui-mainwin ui-confdialog ui-dialogb ui-widget ui-dialogr ui-tabdialog ui-wizard dox ts ui-mainwin-qt4 ui-widget-qt4 ui-dialogb-qt4 ui-dialogr-qt4 ui-dialog-qt4 qrc diff --git a/parts/filecreate/filecreate_filedialog.h b/parts/filecreate/filecreate_filedialog.h index 616e9c2d..54365717 100644 --- a/parts/filecreate/filecreate_filedialog.h +++ b/parts/filecreate/filecreate_filedialog.h @@ -10,8 +10,8 @@ -#ifndef __TDEVPART_FILECREATE_FILEDIALOG_H__ -#define __TDEVPART_FILECREATE_FILEDIALOG_H__ +#ifndef __KDEVPART_FILECREATE_FILEDIALOG_H__ +#define __KDEVPART_FILECREATE_FILEDIALOG_H__ #include diff --git a/parts/filecreate/filecreate_part.cpp b/parts/filecreate/filecreate_part.cpp index 11fcfa6c..19deeb66 100644 --- a/parts/filecreate/filecreate_part.cpp +++ b/parts/filecreate/filecreate_part.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -30,10 +30,10 @@ #include #include -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" #include "configwidgetproxy.h" #include "filetemplate.h" @@ -50,23 +50,23 @@ #define PROJECTSETTINGSPAGE 1 #define GLOBALSETTINGSPAGE 2 -#include "tdevplugininfo.h" +#include "kdevplugininfo.h" #include "config.h" -static const TDevPluginInfo data("tdevfilecreate"); +static const KDevPluginInfo data("kdevfilecreate"); -typedef TDevGenericFactory FileCreateFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevfilecreate, FileCreateFactory( data ) ) +typedef KDevGenericFactory FileCreateFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevfilecreate, FileCreateFactory( data ) ) using namespace FileCreate; FileCreatePart::FileCreatePart(TQObject *parent, const char *name, const TQStringList & ) -// : TDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_selectedWidget(-1), m_useSideTab(true), m_subPopups(0) - : TDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_subPopups(0) +// : KDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_selectedWidget(-1), m_useSideTab(true), m_subPopups(0) + : KDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_subPopups(0) { setInstance(FileCreateFactory::instance()); - setXMLFile("tdevpart_filecreate.rc"); + setXMLFile("kdevpart_filecreate.rc"); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(slotProjectClosed()) ); @@ -179,10 +179,10 @@ void FileCreatePart::slotNewFilePopup( int pFileType ) } void FileCreatePart::slotNewFile() { - TDevCreateFile::CreatedFile createdFile = createNewFile(); - if (createdFile.status == TDevCreateFile::CreatedFile::STATUS_NOTCREATED) + KDevCreateFile::CreatedFile createdFile = createNewFile(); + if (createdFile.status == KDevCreateFile::CreatedFile::STATUS_NOTCREATED) KMessageBox::error(0, i18n("Cannot create file. Check whether the directory and filename are valid.")); - else if (createdFile.status != TDevCreateFile::CreatedFile::STATUS_CANCELED) + else if (createdFile.status != KDevCreateFile::CreatedFile::STATUS_CANCELED) openCreatedFile(createdFile); } @@ -209,7 +209,7 @@ void FileCreatePart::slotProjectClosed() { void FileCreatePart::slotFiletypeSelected(const FileType * filetype) { - TDevCreateFile::CreatedFile createdFile = createNewFile(filetype->ext(), + KDevCreateFile::CreatedFile createdFile = createNewFile(filetype->ext(), TQString(), TQString(), filetype->subtypeRef()); @@ -217,9 +217,9 @@ void FileCreatePart::slotFiletypeSelected(const FileType * filetype) { openCreatedFile(createdFile); } -void FileCreatePart::openCreatedFile(const TDevCreateFile::CreatedFile & createdFile) +void FileCreatePart::openCreatedFile(const KDevCreateFile::CreatedFile & createdFile) { - if ( createdFile.status == TDevCreateFile::CreatedFile::STATUS_OK ) + if ( createdFile.status == KDevCreateFile::CreatedFile::STATUS_OK ) { KURL uu( createdFile.dir + "/" + createdFile.filename ); partController()->editDocument ( uu ); @@ -228,7 +228,7 @@ void FileCreatePart::openCreatedFile(const TDevCreateFile::CreatedFile & created int FileCreatePart::readTypes(const TQDomDocument & dom, TQPtrList &m_filetypes, bool enable) { int numRead = 0; - TQDomElement fileTypes = DomUtil::elementByPath(dom,"/tdevfilecreate/filetypes"); + TQDomElement fileTypes = DomUtil::elementByPath(dom,"/kdevfilecreate/filetypes"); if (!fileTypes.isNull()) { for(TQDomNode node = fileTypes.firstChild();!node.isNull();node=node.nextSibling()) { @@ -324,16 +324,16 @@ FileType * FileCreatePart::getEnabledType(const TQString & ex, const TQString su return NULL; } -// TDevFileCreate interface +// KDevFileCreate interface -TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString dir, TQString name, TQString subtype) +KDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString dir, TQString name, TQString subtype) { - TDevCreateFile::CreatedFile result; + KDevCreateFile::CreatedFile result; KURL projectURL; if ( !project() ) { - //result.status = TDevCreateFile::CreatedFile::STATUS_NOTCREATED; + //result.status = KDevCreateFile::CreatedFile::STATUS_NOTCREATED; //return result; } else @@ -373,7 +373,7 @@ TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString int dialogResult = dialog.exec(); if (dialogResult == KDialogBase::Rejected) { - result.status = TDevCreateFile::CreatedFile::STATUS_CANCELED; + result.status = KDevCreateFile::CreatedFile::STATUS_CANCELED; return result; } @@ -383,8 +383,8 @@ TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString selectedURL = dialog.url(); const FileType *selectedFileType = dialog.selectedType(); - if (dialog.addToProject() && !projectURL.isParentOf(selectedURL) && !(project()->options() & TDevProject::UsesTQMakeBuildSystem) ) { - result.status = TDevCreateFile::CreatedFile::STATUS_NOTWITHINPROJECT; + if (dialog.addToProject() && !projectURL.isParentOf(selectedURL) && !(project()->options() & KDevProject::UsesTQMakeBuildSystem) ) { + result.status = KDevCreateFile::CreatedFile::STATUS_NOTWITHINPROJECT; return result; } @@ -416,7 +416,7 @@ TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString } if (!created) { - result.status = TDevCreateFile::CreatedFile::STATUS_NOTCREATED; + result.status = KDevCreateFile::CreatedFile::STATUS_NOTCREATED; return result; } @@ -425,7 +425,7 @@ TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString // work out the path relative to the project directory // TQString relToProj = URLUtil::relativePath(projectURL, selectedURL, URLUtil::SLASH_PREFIX ); TQString relToProj; - if( project()->options() & TDevProject::UsesTQMakeBuildSystem ) + if( project()->options() & KDevProject::UsesTQMakeBuildSystem ) { relToProj = URLUtil::relativePathToFile( project()->projectDirectory(), fullPath ); project()->addFile(relToProj); @@ -445,7 +445,7 @@ TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString result.filename = fileName; result.dir = URLUtil::directory(fullPath); - result.status = TDevCreateFile::CreatedFile::STATUS_OK; + result.status = KDevCreateFile::CreatedFile::STATUS_OK; return result; } @@ -464,7 +464,7 @@ void FileCreatePart::slotInitialize( ) // read in which global templates are to be used for this project TQDomElement useGlobalTypes = - DomUtil::elementByPath(*projectDom(),"/tdevfilecreate/useglobaltypes"); + DomUtil::elementByPath(*projectDom(),"/kdevfilecreate/useglobaltypes"); for(TQDomNode node = useGlobalTypes.firstChild(); !node.isNull();node=node.nextSibling()) { @@ -524,7 +524,7 @@ TQString FileCreatePart::findGlobalXMLFile() const { int version = 0; TQString filename; - TQStringList filenames = TDEGlobal::instance()->dirs()->findAllResources("data", "tdevfilecreate/template-info.xml"); + TQStringList filenames = TDEGlobal::instance()->dirs()->findAllResources("data", "kdevfilecreate/template-info.xml"); for( TQStringList::const_iterator it = filenames.begin(); it != filenames.end(); ++it ) { TQDomDocument globalDom; diff --git a/parts/filecreate/filecreate_part.h b/parts/filecreate/filecreate_part.h index 0b6e5a01..9d090493 100644 --- a/parts/filecreate/filecreate_part.h +++ b/parts/filecreate/filecreate_part.h @@ -10,16 +10,16 @@ -#ifndef __TDEVPART_FILECREATE_H__ -#define __TDEVPART_FILECREATE_H__ +#ifndef __KDEVPART_FILECREATE_H__ +#define __KDEVPART_FILECREATE_H__ #include #include #include -#include -#include +#include +#include #include "filecreate_typechooser.h" @@ -36,7 +36,7 @@ class ConfigWidgetProxy; using namespace FileCreate; -class FileCreatePart : public TDevCreateFile +class FileCreatePart : public KDevCreateFile { Q_OBJECT @@ -57,7 +57,7 @@ public: * The user will be prompted as necessary for the missing information, and the * file created, and added to the project as necessary. */ - virtual TDevCreateFile::CreatedFile createNewFile(TQString ext = TQString(), + virtual KDevCreateFile::CreatedFile createNewFile(TQString ext = TQString(), TQString dir = TQString(), TQString name = TQString(), TQString subtype = TQString()); @@ -106,7 +106,7 @@ private: /** * If a file has been successfully created, open it */ - void openCreatedFile(const TDevCreateFile::CreatedFile & createdFile); + void openCreatedFile(const KDevCreateFile::CreatedFile & createdFile); /** * Reads in file type definitions from a config DOM and adds them diff --git a/parts/filecreate/filecreate_widget2.cpp b/parts/filecreate/filecreate_widget2.cpp index d57fbf48..4638725c 100644 --- a/parts/filecreate/filecreate_widget2.cpp +++ b/parts/filecreate/filecreate_widget2.cpp @@ -19,9 +19,9 @@ #include #include -#include +#include -#include "tdevproject.h" +#include "kdevproject.h" #include "filecreate_part.h" #include "filecreate_widget2.h" #include "filecreate_filetype.h" diff --git a/parts/filecreate/filecreate_widget2.h b/parts/filecreate/filecreate_widget2.h index 3e4df801..217d37ce 100644 --- a/parts/filecreate/filecreate_widget2.h +++ b/parts/filecreate/filecreate_widget2.h @@ -21,7 +21,7 @@ #include "filecreate_typechooser.h" class TDEIconLoader; -class TDevProject; +class KDevProject; class FileCreatePart; namespace FileCreate { diff --git a/parts/filecreate/filecreate_widget3.cpp b/parts/filecreate/filecreate_widget3.cpp index e541038c..caf1ac74 100644 --- a/parts/filecreate/filecreate_widget3.cpp +++ b/parts/filecreate/filecreate_widget3.cpp @@ -18,11 +18,11 @@ #include #include #include -#include +#include #include "filecreate_widget3.h" -#include "tdevproject.h" +#include "kdevproject.h" #include "filecreate_part.h" #include "filecreate_filetype.h" #include "filecreate_listitem.h" @@ -30,7 +30,7 @@ namespace FileCreate { ListWidget::ListWidget(FileCreatePart *part) - : TDEListView(0, "TDevFileCreate"), TypeChooser(part) + : TDEListView(0, "KDevFileCreate"), TypeChooser(part) { setIcon( SmallIcon("filenew2") ); setCaption(i18n("File Create")); diff --git a/parts/filecreate/filecreate_widget3.h b/parts/filecreate/filecreate_widget3.h index 244bf78d..ac8b866e 100644 --- a/parts/filecreate/filecreate_widget3.h +++ b/parts/filecreate/filecreate_widget3.h @@ -19,7 +19,7 @@ #include "filecreate_typechooser.h" -class TDevProject; +class KDevProject; class FileCreatePart; class TQResizeEvent; diff --git a/parts/filecreate/kdevfilecreate.desktop b/parts/filecreate/kdevfilecreate.desktop new file mode 100644 index 00000000..1861090d --- /dev/null +++ b/parts/filecreate/kdevfilecreate.desktop @@ -0,0 +1,77 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=FileCreate +Comment[ca]=Creació de fitxers +Comment[da]=Filoprettelse +Comment[de]=Eine Komponente, die Unterstützung bei der Erstellung von Dateien bietet +Comment[el]=ΔημιουργίαΑρχείου +Comment[es]=Creación de archivos +Comment[eu]=Fitxategi sorkuntza +Comment[fa]=ایجاد پرونده +Comment[fr]=Création de fichiers +Comment[hi]=फ़ाइल-क्रिएट +Comment[hu]=Fájl létrehozása +Comment[it]=Crea file +Comment[ja]=ファイル作成 +Comment[ms]=CiptaFail +Comment[nds]=Dateiopstellen +Comment[ne]=फाइल सिर्जना +Comment[nl]=Bestand aanmaken +Comment[pl]=Tworzenie pliku +Comment[pt]=Criação de Ficheiros +Comment[ru]=Мастер создания файлов +Comment[sk]=Vytvoriť súbor +Comment[sl]=Ustvarjanje datotek +Comment[sr]=Направи фајл +Comment[sr@Latn]=Napravi fajl +Comment[sv]=Skapa filer +Comment[ta]= கோப்பு உருவாக்கப்பட்டது +Comment[tg]=Устои бунёд кардани файлҳо +Comment[zh_CN]=文件创建 +Comment[zh_TW]=檔案建立 +Name=KDevFileCreate +Name[da]=TDevelop filoprettelse +Name[de]=Dateierstellungs-Komponente (TDevelop) +Name[hi]=के-डेव-फ़ाइल-क्रिएट +Name[nds]=TDevelop-Dateiopstellen +Name[pl]=KDevTworzeniePliku +Name[sk]=KDev vytvoriť súbor +Name[sv]=TDevelop skapa filer +Name[ta]=KDev உருவாக்கப்பட்ட கோப்பு +Name[tg]=Сохткунандаи KDev +Name[zh_TW]=TDevelop 檔案建立 +GenericName=FileCreate +GenericName[ca]=Creació de fitxers +GenericName[da]=Filoprettelse +GenericName[de]=Dateierstellungs-Komponente +GenericName[el]=ΔημιουργίαΑρχείου +GenericName[es]=Creación de archivos +GenericName[eu]=Fitxategi sorkuntza +GenericName[fa]=ایجاد پرونده +GenericName[hi]=फ़ाइल-क्रिएट +GenericName[hu]=Fájl létrehozása +GenericName[it]=Crea file +GenericName[ja]=ファイル作成 +GenericName[ms]=CiptaFail +GenericName[nds]=Dateiopstellen +GenericName[ne]=फाइल सिर्जना +GenericName[nl]=Bestand aanmaken +GenericName[pl]=Tworzenie pliku +GenericName[pt]=Criação de Ficheiros +GenericName[ru]=Мастер создания файлов +GenericName[sk]=Vytvoriť súbor +GenericName[sl]=Ustvarjanje datotek +GenericName[sr]=Направи фајл +GenericName[sr@Latn]=Napravi fajl +GenericName[sv]=Skapa filer +GenericName[ta]=கோப்பு உருவாக்கம் +GenericName[tg]=Устои бунёд кардани файлҳо +GenericName[zh_CN]=文件创建 +GenericName[zh_TW]=檔案建立 +Icon=wizard +ServiceTypes=TDevelop/CreateFile +X-TDE-Library=libkdevfilecreate +X-TDevelop-Version=5 +X-TDevelop-Properties=FileCreation +X-TDevelop-Scope=Core diff --git a/parts/filecreate/kdevpart_filecreate.rc b/parts/filecreate/kdevpart_filecreate.rc new file mode 100644 index 00000000..401a1378 --- /dev/null +++ b/parts/filecreate/kdevpart_filecreate.rc @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/parts/filecreate/tdevfilecreate.desktop b/parts/filecreate/tdevfilecreate.desktop deleted file mode 100644 index d9accc3c..00000000 --- a/parts/filecreate/tdevfilecreate.desktop +++ /dev/null @@ -1,77 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=FileCreate -Comment[ca]=Creació de fitxers -Comment[da]=Filoprettelse -Comment[de]=Eine Komponente, die Unterstützung bei der Erstellung von Dateien bietet -Comment[el]=ΔημιουργίαΑρχείου -Comment[es]=Creación de archivos -Comment[eu]=Fitxategi sorkuntza -Comment[fa]=ایجاد پرونده -Comment[fr]=Création de fichiers -Comment[hi]=फ़ाइल-क्रिएट -Comment[hu]=Fájl létrehozása -Comment[it]=Crea file -Comment[ja]=ファイル作成 -Comment[ms]=CiptaFail -Comment[nds]=Dateiopstellen -Comment[ne]=फाइल सिर्जना -Comment[nl]=Bestand aanmaken -Comment[pl]=Tworzenie pliku -Comment[pt]=Criação de Ficheiros -Comment[ru]=Мастер создания файлов -Comment[sk]=Vytvoriť súbor -Comment[sl]=Ustvarjanje datotek -Comment[sr]=Направи фајл -Comment[sr@Latn]=Napravi fajl -Comment[sv]=Skapa filer -Comment[ta]= கோப்பு உருவாக்கப்பட்டது -Comment[tg]=Устои бунёд кардани файлҳо -Comment[zh_CN]=文件创建 -Comment[zh_TW]=檔案建立 -Name=TDevFileCreate -Name[da]=TDevelop filoprettelse -Name[de]=Dateierstellungs-Komponente (TDevelop) -Name[hi]=के-डेव-फ़ाइल-क्रिएट -Name[nds]=TDevelop-Dateiopstellen -Name[pl]=KDevTworzeniePliku -Name[sk]=KDev vytvoriť súbor -Name[sv]=TDevelop skapa filer -Name[ta]=KDev உருவாக்கப்பட்ட கோப்பு -Name[tg]=Сохткунандаи KDev -Name[zh_TW]=TDevelop 檔案建立 -GenericName=FileCreate -GenericName[ca]=Creació de fitxers -GenericName[da]=Filoprettelse -GenericName[de]=Dateierstellungs-Komponente -GenericName[el]=ΔημιουργίαΑρχείου -GenericName[es]=Creación de archivos -GenericName[eu]=Fitxategi sorkuntza -GenericName[fa]=ایجاد پرونده -GenericName[hi]=फ़ाइल-क्रिएट -GenericName[hu]=Fájl létrehozása -GenericName[it]=Crea file -GenericName[ja]=ファイル作成 -GenericName[ms]=CiptaFail -GenericName[nds]=Dateiopstellen -GenericName[ne]=फाइल सिर्जना -GenericName[nl]=Bestand aanmaken -GenericName[pl]=Tworzenie pliku -GenericName[pt]=Criação de Ficheiros -GenericName[ru]=Мастер создания файлов -GenericName[sk]=Vytvoriť súbor -GenericName[sl]=Ustvarjanje datotek -GenericName[sr]=Направи фајл -GenericName[sr@Latn]=Napravi fajl -GenericName[sv]=Skapa filer -GenericName[ta]=கோப்பு உருவாக்கம் -GenericName[tg]=Устои бунёд кардани файлҳо -GenericName[zh_CN]=文件创建 -GenericName[zh_TW]=檔案建立 -Icon=wizard -ServiceTypes=TDevelop/CreateFile -X-TDE-Library=libtdevfilecreate -X-TDevelop-Version=5 -X-TDevelop-Properties=FileCreation -X-TDevelop-Scope=Core diff --git a/parts/filecreate/tdevpart_filecreate.rc b/parts/filecreate/tdevpart_filecreate.rc deleted file mode 100644 index 09a293ee..00000000 --- a/parts/filecreate/tdevpart_filecreate.rc +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/parts/filecreate/template-info.xml b/parts/filecreate/template-info.xml index 9afd9825..664fa376 100644 --- a/parts/filecreate/template-info.xml +++ b/parts/filecreate/template-info.xml @@ -1,6 +1,6 @@ - + @@ -177,5 +177,5 @@ A new empty Qt Linguist translation source file. - + diff --git a/parts/filelist/CMakeLists.txt b/parts/filelist/CMakeLists.txt index 7feb3ae1..ac227b5e 100644 --- a/parts/filelist/CMakeLists.txt +++ b/parts/filelist/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevfilelist.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevfilelist.rc DESTINATION ${DATA_INSTALL_DIR}/tdevfilelist ) +install( FILES kdevfilelist.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevfilelist.rc DESTINATION ${DATA_INSTALL_DIR}/kdevfilelist ) -##### libtdevfilelist (module) ################## +##### libkdevfilelist (module) ################## -tde_add_kpart( libtdevfilelist AUTOMOC +tde_add_kpart( libkdevfilelist AUTOMOC SOURCES filelist_widget.cpp filelist_item.cpp projectviewprojectconfigbase.ui diff --git a/parts/filelist/Makefile.am b/parts/filelist/Makefile.am index 8652a240..83e36d19 100644 --- a/parts/filelist/Makefile.am +++ b/parts/filelist/Makefile.am @@ -1,20 +1,20 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevfilelist.la -libtdevfilelist_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfilelist_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfilelist.la +libkdevfilelist_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfilelist_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfilelist_la_SOURCES = filelist_widget.cpp filelist_item.cpp \ +libkdevfilelist_la_SOURCES = filelist_widget.cpp filelist_item.cpp \ projectviewprojectconfigbase.ui projectviewprojectconfig.cpp projectviewpart.cpp toolbarguibuilder.cpp \ projectviewconfigbase.ui projectviewconfig.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfilelist.desktop +service_DATA = kdevfilelist.desktop -rcdir = $(kde_datadir)/tdevfilelist +rcdir = $(kde_datadir)/kdevfilelist noinst_HEADERS = filelist_item.h filelist_widget.h projectviewprojectconfig.h \ projectviewpart.h toolbarguibuilder.h projectviewconfig.h fileinfo.h -rc_DATA = tdevfilelist.rc +rc_DATA = kdevfilelist.rc diff --git a/parts/filelist/filelist_item.h b/parts/filelist/filelist_item.h index 2d9322c9..6b88b09e 100644 --- a/parts/filelist/filelist_item.h +++ b/parts/filelist/filelist_item.h @@ -18,7 +18,7 @@ #include -#include +#include class FileListItem : public TQListViewItem { diff --git a/parts/filelist/filelist_widget.cpp b/parts/filelist/filelist_widget.cpp index 4b0b2b48..2e415dcd 100644 --- a/parts/filelist/filelist_widget.cpp +++ b/parts/filelist/filelist_widget.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include "projectviewpart.h" #include "filelist_widget.h" diff --git a/parts/filelist/filelist_widget.h b/parts/filelist/filelist_widget.h index f1b4de97..b582a309 100644 --- a/parts/filelist/filelist_widget.h +++ b/parts/filelist/filelist_widget.h @@ -17,7 +17,7 @@ #include #include -#include // for DocumentState +#include // for DocumentState #include #include @@ -25,7 +25,7 @@ #include "projectviewpart.h" -class TDevProject; +class KDevProject; class FileListItem; namespace KParts { class Part; } diff --git a/parts/filelist/kdevfilelist.desktop b/parts/filelist/kdevfilelist.desktop new file mode 100644 index 00000000..da37f14b --- /dev/null +++ b/parts/filelist/kdevfilelist.desktop @@ -0,0 +1,76 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a list of all currently open files. (Handy when the tab bar is not quite wide enough.) +Comment[ca]=Proporciona una llista de tots els fitxers oberts actualment. (Útil quan la barra de pestanyes no és suficientment ample) +Comment[da]=Sørger for en liste over alle filer der er åbne. (Praktisk når tab-linjen ikke er helt bred nok.) +Comment[de]=Stellt eine Liste aller offenen Dateien bereit. +Comment[el]=Προσφέρει μια λίστα των τρέχων ανοιγμένων αρχείων. (Χρήσιμο όταν η γραμμή καρτελών δεν είναι αρκετά πλατιά.) +Comment[es]=Proporciona una lista de los archivos abiertos actualmente (útil cuando la barra de pestañas no es lo suficientemente ancha). +Comment[et]=Näitab kõiki parajasti avatud faile (mugav, kui kaardiriba ei ole piisavalt lai). +Comment[eu]=Uneko irekitako fitxategien zerrenda eskeintzen du. (Erabilgarria fitxa-barra behar den bezain zabala ez bada) +Comment[fa]=فهرستی از همۀ پرونده‌های باز جاری را فراهم می‌کند. )دستی هنگامی که میله ابزار پهنای کافی نداشته باشد.( +Comment[fr]=Fournit une liste de tous les fichiers actuellement ouverts. (Pratique lorsque la barre d'onglets n'est plus assez large.) +Comment[gl]=Proporciona unha lista de tódolos ficheiros abertos actualmente. (Útil cando a barra de pestañas non é suficientemente ancha.) +Comment[hu]=Kilistázza a nyitott fájlokat. (Jól jöhet, ha a lapozósáv nem elég széles.) +Comment[it]=Fornisce una lista di tutti i file aperti correntemente. (Utile quando la barra delle schede non è sufficientemente larga.) +Comment[ja]=現在開かれているファイルのリストを提供します。(タブバーが十分広くない場合に便利です) +Comment[ms]=Menyediakan senarai semua fail yang sedang dibuka. (Berguna apabila bar tab tidak cukup lebar.) +Comment[nds]=Stellt en List vun all apen Dateien praat. (Goot, wenn de Paneelbalken nich wiet noog is.) +Comment[ne]=हालै खुला फाइलको सूची प्रदान गर्दछ (ट्याब बार पर्याप्त चौडा नहुदा सजिलो हुन्छ) +Comment[nl]=Geeft een lijst van alle open bestanden. (Handig als de tabbalk niet breed genoeg is.) +Comment[pl]=Pokazuje listę obecnie otwartych plików (przydaje się, gdy pasek kart nie mieści wszystkich) +Comment[pt]=Fornece uma lista de todos os ficheiros actualmente aberto. (Útil quando a barra de página não é suficientemente larga.) +Comment[pt_BR]=Fornece uma lista de todos os arquivos atualmente abertos (acessível quando a barra de abas não for larga o suficiente). +Comment[ru]=Список открытых в данных момент файлов (полезно, когда они не помещаются на панели вкладок). +Comment[sk]=Poskytne zoznam všetkých aktuálne otvorených súborov. (Užitočné keď panel kariet nie je dostatočne široký.) +Comment[sr]=Даје листу свих отворених фајлова. (Згодно кад трака са језичцима није довољно дугачка.) +Comment[sr@Latn]=Daje listu svih otvorenih fajlova. (Zgodno kad traka sa jezičcima nije dovoljno dugačka.) +Comment[sv]=Tillhandahåller en lista av alla för närvarande öppna filer. (Praktiskt när flikraden inte är riktigt bred nog.) +Comment[ta]=தற்போது திறக்கப்பட்ட கோப்புகளின் பட்டியலை வழங்குகிறது. (தத்தல் போதுமான வசதியை வழங்க இயலாத பொழுது) +Comment[tg]=Рӯйхати кушодашудагиҳои ҳозир будаи файлҳо (вақте ки онҳо дар панелмонӣ омехта намешаванд, фоидаовар аст.) +Comment[tr]=Bütün açık dosyaların bir listesini sunar. (Sekme çubuğu yeteri kadar geniş olmadığında işe yarar) +Comment[zh_CN]=提供目前已打开全部文件的列表。(当标签栏不够宽时非常实用。) +Comment[zh_TW]=提供目前開啟檔案的列表。 +Name=KDevfilelist +Name[da]=TDevelop filliste +Name[nds]=TDevelop-Dateilist +Name[pt_BR]=Lista de arq. do KDev +Name[sk]=KDev zoznam súborov +Name[sv]=TDevelop fillista +Name[ta]=KDev கோப்புக்காட்சி +Name[tg]=Рӯйхати файли KDev +Name[zh_TW]=TDevelop 檔案列表 +GenericName=FileList +GenericName[br]=Roll restr +GenericName[da]=Filliste +GenericName[de]=Dateiliste +GenericName[el]=ΛίσταΑρχείων +GenericName[eu]=Fitxategi zerrenda +GenericName[fa]=فهرست پرونده +GenericName[hu]=Fájllista +GenericName[it]=ListaFile +GenericName[ja]=ファイルリスト +GenericName[ms]=SenaraiFail +GenericName[nds]=Dateilist +GenericName[ne]=फाइल सूची +GenericName[nl]=Bestandenlijst +GenericName[pl]=Lista plików +GenericName[pt]=Lista de Ficheiros +GenericName[pt_BR]=Lista de Arquivos +GenericName[ru]=Список файлов +GenericName[sk]=Zoznam súborov +GenericName[sl]=Seznam datotek +GenericName[sr]=Листа фајлова +GenericName[sr@Latn]=Lista fajlova +GenericName[sv]=Fillista +GenericName[ta]=கோப்புப் பட்டியல் +GenericName[tg]=Рӯйхати файлҳо +GenericName[zh_CN]=文件列表 +GenericName[zh_TW]=檔案列表 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Global +X-TDE-Library=libkdevfilelist +X-TDevelop-Version=5 +X-TDevelop-Properties=OpenFileNavigation diff --git a/parts/filelist/kdevfilelist.rc b/parts/filelist/kdevfilelist.rc new file mode 100644 index 00000000..5ab5de7c --- /dev/null +++ b/parts/filelist/kdevfilelist.rc @@ -0,0 +1,24 @@ + + + + + View + + + View Sessions + + + + + + + + + + View Sessions Toolbar + + + + + + diff --git a/parts/filelist/projectviewpart.cpp b/parts/filelist/projectviewpart.cpp index 76f0c102..517d2f98 100644 --- a/parts/filelist/projectviewpart.cpp +++ b/parts/filelist/projectviewpart.cpp @@ -51,28 +51,28 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -typedef TDevGenericFactory projectviewFactory; -TDevPluginInfo data("tdevfilelist"); -K_EXPORT_COMPONENT_FACTORY(libtdevfilelist, projectviewFactory(data)) +typedef KDevGenericFactory projectviewFactory; +KDevPluginInfo data("kdevfilelist"); +K_EXPORT_COMPONENT_FACTORY(libkdevfilelist, projectviewFactory(data)) #define GLOBALDOC_OPTIONS 1 #define PROJECTDOC_OPTIONS 2 ProjectviewPart::ProjectviewPart(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevPlugin(&data, parent, name ? name : "FileListPart") + : KDevPlugin(&data, parent, name ? name : "FileListPart") { setInstance(projectviewFactory::instance()); - setXMLFile("tdevfilelist.rc"); + setXMLFile("kdevfilelist.rc"); setupActions(); m_configProxy = new ConfigWidgetProxy(core()); diff --git a/parts/filelist/projectviewpart.h b/parts/filelist/projectviewpart.h index 72c6efcd..392a9cdf 100644 --- a/parts/filelist/projectviewpart.h +++ b/parts/filelist/projectviewpart.h @@ -18,8 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef TDEVPROJECTVIEW_H -#define TDEVPROJECTVIEW_H +#ifndef KDEVPROJECTVIEW_H +#define KDEVPROJECTVIEW_H #include "fileinfo.h" @@ -27,7 +27,7 @@ #include #include -#include +#include #include @@ -53,7 +53,7 @@ this is a reimplementation of the project views in Quanta @TODO save html parts too FIXME at project open I get the default view and the open files at last close */ -class ProjectviewPart: public TDevPlugin +class ProjectviewPart: public KDevPlugin { Q_OBJECT @@ -66,7 +66,7 @@ public: ProjectviewPart(TQObject *parent, const char *name, const TQStringList &args); ~ProjectviewPart(); - // reimplemented from TDevPlugin + // reimplemented from KDevPlugin void restorePartialProjectSession(const TQDomElement * el); void savePartialProjectSession(TQDomElement * el); diff --git a/parts/filelist/tdevfilelist.desktop b/parts/filelist/tdevfilelist.desktop deleted file mode 100644 index 17a20ad6..00000000 --- a/parts/filelist/tdevfilelist.desktop +++ /dev/null @@ -1,76 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a list of all currently open files. (Handy when the tab bar is not quite wide enough.) -Comment[ca]=Proporciona una llista de tots els fitxers oberts actualment. (Útil quan la barra de pestanyes no és suficientment ample) -Comment[da]=Sørger for en liste over alle filer der er åbne. (Praktisk når tab-linjen ikke er helt bred nok.) -Comment[de]=Stellt eine Liste aller offenen Dateien bereit. -Comment[el]=Προσφέρει μια λίστα των τρέχων ανοιγμένων αρχείων. (Χρήσιμο όταν η γραμμή καρτελών δεν είναι αρκετά πλατιά.) -Comment[es]=Proporciona una lista de los archivos abiertos actualmente (útil cuando la barra de pestañas no es lo suficientemente ancha). -Comment[et]=Näitab kõiki parajasti avatud faile (mugav, kui kaardiriba ei ole piisavalt lai). -Comment[eu]=Uneko irekitako fitxategien zerrenda eskeintzen du. (Erabilgarria fitxa-barra behar den bezain zabala ez bada) -Comment[fa]=فهرستی از همۀ پرونده‌های باز جاری را فراهم می‌کند. )دستی هنگامی که میله ابزار پهنای کافی نداشته باشد.( -Comment[fr]=Fournit une liste de tous les fichiers actuellement ouverts. (Pratique lorsque la barre d'onglets n'est plus assez large.) -Comment[gl]=Proporciona unha lista de tódolos ficheiros abertos actualmente. (Útil cando a barra de pestañas non é suficientemente ancha.) -Comment[hu]=Kilistázza a nyitott fájlokat. (Jól jöhet, ha a lapozósáv nem elég széles.) -Comment[it]=Fornisce una lista di tutti i file aperti correntemente. (Utile quando la barra delle schede non è sufficientemente larga.) -Comment[ja]=現在開かれているファイルのリストを提供します。(タブバーが十分広くない場合に便利です) -Comment[ms]=Menyediakan senarai semua fail yang sedang dibuka. (Berguna apabila bar tab tidak cukup lebar.) -Comment[nds]=Stellt en List vun all apen Dateien praat. (Goot, wenn de Paneelbalken nich wiet noog is.) -Comment[ne]=हालै खुला फाइलको सूची प्रदान गर्दछ (ट्याब बार पर्याप्त चौडा नहुदा सजिलो हुन्छ) -Comment[nl]=Geeft een lijst van alle open bestanden. (Handig als de tabbalk niet breed genoeg is.) -Comment[pl]=Pokazuje listę obecnie otwartych plików (przydaje się, gdy pasek kart nie mieści wszystkich) -Comment[pt]=Fornece uma lista de todos os ficheiros actualmente aberto. (Útil quando a barra de página não é suficientemente larga.) -Comment[pt_BR]=Fornece uma lista de todos os arquivos atualmente abertos (acessível quando a barra de abas não for larga o suficiente). -Comment[ru]=Список открытых в данных момент файлов (полезно, когда они не помещаются на панели вкладок). -Comment[sk]=Poskytne zoznam všetkých aktuálne otvorených súborov. (Užitočné keď panel kariet nie je dostatočne široký.) -Comment[sr]=Даје листу свих отворених фајлова. (Згодно кад трака са језичцима није довољно дугачка.) -Comment[sr@Latn]=Daje listu svih otvorenih fajlova. (Zgodno kad traka sa jezičcima nije dovoljno dugačka.) -Comment[sv]=Tillhandahåller en lista av alla för närvarande öppna filer. (Praktiskt när flikraden inte är riktigt bred nog.) -Comment[ta]=தற்போது திறக்கப்பட்ட கோப்புகளின் பட்டியலை வழங்குகிறது. (தத்தல் போதுமான வசதியை வழங்க இயலாத பொழுது) -Comment[tg]=Рӯйхати кушодашудагиҳои ҳозир будаи файлҳо (вақте ки онҳо дар панелмонӣ омехта намешаванд, фоидаовар аст.) -Comment[tr]=Bütün açık dosyaların bir listesini sunar. (Sekme çubuğu yeteri kadar geniş olmadığında işe yarar) -Comment[zh_CN]=提供目前已打开全部文件的列表。(当标签栏不够宽时非常实用。) -Comment[zh_TW]=提供目前開啟檔案的列表。 -Name=KDevfilelist -Name[da]=TDevelop filliste -Name[nds]=TDevelop-Dateilist -Name[pt_BR]=Lista de arq. do KDev -Name[sk]=KDev zoznam súborov -Name[sv]=TDevelop fillista -Name[ta]=KDev கோப்புக்காட்சி -Name[tg]=Рӯйхати файли KDev -Name[zh_TW]=TDevelop 檔案列表 -GenericName=FileList -GenericName[br]=Roll restr -GenericName[da]=Filliste -GenericName[de]=Dateiliste -GenericName[el]=ΛίσταΑρχείων -GenericName[eu]=Fitxategi zerrenda -GenericName[fa]=فهرست پرونده -GenericName[hu]=Fájllista -GenericName[it]=ListaFile -GenericName[ja]=ファイルリスト -GenericName[ms]=SenaraiFail -GenericName[nds]=Dateilist -GenericName[ne]=फाइल सूची -GenericName[nl]=Bestandenlijst -GenericName[pl]=Lista plików -GenericName[pt]=Lista de Ficheiros -GenericName[pt_BR]=Lista de Arquivos -GenericName[ru]=Список файлов -GenericName[sk]=Zoznam súborov -GenericName[sl]=Seznam datotek -GenericName[sr]=Листа фајлова -GenericName[sr@Latn]=Lista fajlova -GenericName[sv]=Fillista -GenericName[ta]=கோப்புப் பட்டியல் -GenericName[tg]=Рӯйхати файлҳо -GenericName[zh_CN]=文件列表 -GenericName[zh_TW]=檔案列表 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Global -X-TDE-Library=libtdevfilelist -X-TDevelop-Version=5 -X-TDevelop-Properties=OpenFileNavigation diff --git a/parts/filelist/tdevfilelist.rc b/parts/filelist/tdevfilelist.rc deleted file mode 100644 index 5ab5de7c..00000000 --- a/parts/filelist/tdevfilelist.rc +++ /dev/null @@ -1,24 +0,0 @@ - - - - - View - - - View Sessions - - - - - - - - - - View Sessions Toolbar - - - - - - diff --git a/parts/fileselector/CMakeLists.txt b/parts/fileselector/CMakeLists.txt index b310f791..8f18792e 100644 --- a/parts/fileselector/CMakeLists.txt +++ b/parts/fileselector/CMakeLists.txt @@ -27,12 +27,12 @@ link_directories( ##### other data ################################ -install( FILES tdevfileselector.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevfileselector.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevfileselector (module) ############## +##### libkdevfileselector (module) ############## -tde_add_kpart( libtdevfileselector AUTOMOC +tde_add_kpart( libkdevfileselector AUTOMOC SOURCES fileselector_part.cpp fileselector_widget.cpp tdeactionselector.cpp kbookmarkhandler.cpp diff --git a/parts/fileselector/Makefile.am b/parts/fileselector/Makefile.am index 43ee404b..f0c2fc35 100644 --- a/parts/fileselector/Makefile.am +++ b/parts/fileselector/Makefile.am @@ -2,17 +2,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/sourceinfo $(all_includes) -kde_module_LTLIBRARIES = libtdevfileselector.la -libtdevfileselector_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfileselector_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfileselector.la +libkdevfileselector_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfileselector_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfileselector_la_SOURCES = fileselector_part.cpp fileselector_widget.cpp tdeactionselector.cpp kbookmarkhandler.cpp +libkdevfileselector_la_SOURCES = fileselector_part.cpp fileselector_widget.cpp tdeactionselector.cpp kbookmarkhandler.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfileselector.desktop +service_DATA = kdevfileselector.desktop # not used currently -#rcdir = $(kde_datadir)/tdevfileselector -#rc_DATA = tdevfileselector.rc +#rcdir = $(kde_datadir)/kdevfileselector +#rc_DATA = kdevfileselector.rc diff --git a/parts/fileselector/fileselector_part.cpp b/parts/fileselector/fileselector_part.cpp index 331bb639..a6b4a6bb 100644 --- a/parts/fileselector/fileselector_part.cpp +++ b/parts/fileselector/fileselector_part.cpp @@ -13,33 +13,33 @@ #include #include #include -#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include "fileselector_widget.h" -typedef TDevGenericFactory FileSelectorFactory; -static const TDevPluginInfo data("tdevfileselector"); -K_EXPORT_COMPONENT_FACTORY( libtdevfileselector, FileSelectorFactory( data ) ) +typedef KDevGenericFactory FileSelectorFactory; +static const KDevPluginInfo data("kdevfileselector"); +K_EXPORT_COMPONENT_FACTORY( libkdevfileselector, FileSelectorFactory( data ) ) FileSelectorPart::FileSelectorPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "FileSelectorPart") + : KDevPlugin(&data, parent, name ? name : "FileSelectorPart") { setInstance(FileSelectorFactory::instance()); - m_filetree = new TDevFileSelector( this, mainWindow(), partController(), 0, "fileselectorwidget" ); + m_filetree = new KDevFileSelector( this, mainWindow(), partController(), 0, "fileselectorwidget" ); connect( m_filetree->dirOperator(), TQT_SIGNAL(fileSelected(const KFileItem*)), this, TQT_SLOT(fileSelected(const KFileItem*))); @@ -63,7 +63,7 @@ FileSelectorPart::~FileSelectorPart() mainWindow()->removeView( m_filetree ); } - delete (TDevFileSelector*) m_filetree; + delete (KDevFileSelector*) m_filetree; } void FileSelectorPart::fileSelected( const KFileItem * file ) @@ -90,14 +90,14 @@ void FileSelectorPart::slotConfigWidget( KDialogBase * dlg ) void FileSelectorPart::newFile() { - TDevCreateFile *creator = extension("TDevelop/CreateFile"); + KDevCreateFile *creator = extension("TDevelop/CreateFile"); if (creator) { - TDevCreateFile::CreatedFile file = creator->createNewFile("", + KDevCreateFile::CreatedFile file = creator->createNewFile("", m_filetree->dirOperator()->url().path()); - if (file.status == TDevCreateFile::CreatedFile::STATUS_NOTCREATED) + if (file.status == KDevCreateFile::CreatedFile::STATUS_NOTCREATED) KMessageBox::error(0, i18n("Cannot create file. Check whether the directory and filename are valid.")); - else if (file.status != TDevCreateFile::CreatedFile::STATUS_CANCELED) + else if (file.status != KDevCreateFile::CreatedFile::STATUS_CANCELED) { partController()->editDocument(KURL::fromPathOrURL( file.dir + "/" + file.filename)); diff --git a/parts/fileselector/fileselector_part.h b/parts/fileselector/fileselector_part.h index 80841deb..f415444d 100644 --- a/parts/fileselector/fileselector_part.h +++ b/parts/fileselector/fileselector_part.h @@ -1,17 +1,17 @@ -#ifndef __TDEVPART_FILESELECTOR_H__ -#define __TDEVPART_FILESELECTOR_H__ +#ifndef __KDEVPART_FILESELECTOR_H__ +#define __KDEVPART_FILESELECTOR_H__ -#include +#include #include #include #include -class TDevFileSelector; +class KDevFileSelector; class KDialogBase; -class FileSelectorPart : public TDevPlugin +class FileSelectorPart : public KDevPlugin { Q_OBJECT @@ -33,7 +33,7 @@ private slots: void slotConfigWidget( KDialogBase * ); private: - TQGuardedPtr m_filetree; + TQGuardedPtr m_filetree; TDEAction *m_newFileAction; }; diff --git a/parts/fileselector/fileselector_widget.cpp b/parts/fileselector/fileselector_widget.cpp index 1d6fb154..894bf185 100644 --- a/parts/fileselector/fileselector_widget.cpp +++ b/parts/fileselector/fileselector_widget.cpp @@ -26,9 +26,9 @@ #include "tdeactionselector.h" #include "kbookmarkhandler.h" -#include -#include -#include +#include +#include +#include #include #include @@ -76,32 +76,32 @@ static void silenceTQToolBar(TQtMsgType, const char *) {} -TDevFileSelectorToolBar::TDevFileSelectorToolBar(TQWidget *parent) +KDevFileSelectorToolBar::KDevFileSelectorToolBar(TQWidget *parent) : TDEToolBar( parent, "KDev FileSelector Toolbar", true ) { setMinimumWidth(10); } -TDevFileSelectorToolBar::~TDevFileSelectorToolBar() +KDevFileSelectorToolBar::~KDevFileSelectorToolBar() {} -void TDevFileSelectorToolBar::setMovingEnabled( bool) +void KDevFileSelectorToolBar::setMovingEnabled( bool) { TDEToolBar::setMovingEnabled(false); } -TDevFileSelectorToolBarParent::TDevFileSelectorToolBarParent(TQWidget *parent) +KDevFileSelectorToolBarParent::KDevFileSelectorToolBarParent(TQWidget *parent) :TQFrame(parent),m_tb(0) {} -TDevFileSelectorToolBarParent::~TDevFileSelectorToolBarParent() +KDevFileSelectorToolBarParent::~KDevFileSelectorToolBarParent() {} -void TDevFileSelectorToolBarParent::setToolBar(TDevFileSelectorToolBar *tb) +void KDevFileSelectorToolBarParent::setToolBar(KDevFileSelectorToolBar *tb) { m_tb=tb; } -void TDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * ) +void KDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * ) { if (m_tb) { @@ -113,8 +113,8 @@ void TDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * ) //BEGIN Constructor/destructor -TDevFileSelector::TDevFileSelector( FileSelectorPart *part, TDevMainWindow *mainWindow, - TDevPartController *partController, +KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *mainWindow, + KDevPartController *partController, TQWidget * parent, const char * name ) : TQWidget(parent, name), m_part(part), @@ -127,8 +127,8 @@ TDevFileSelector::TDevFileSelector( FileSelectorPart *part, TDevMainWindow *main TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceTQToolBar ); - TDevFileSelectorToolBarParent *tbp=new TDevFileSelectorToolBarParent(this); - toolbar = new TDevFileSelectorToolBar(tbp); + KDevFileSelectorToolBarParent *tbp=new KDevFileSelectorToolBarParent(this); + toolbar = new KDevFileSelectorToolBar(tbp); tbp->setToolBar(toolbar); lo->addWidget(tbp); toolbar->setMovingEnabled(false); @@ -142,7 +142,7 @@ TDevFileSelector::TDevFileSelector( FileSelectorPart *part, TDevMainWindow *main lo->addWidget(cmbPath); cmbPath->listBox()->installEventFilter( this ); - dir = new TDevDirOperator(m_part, KURL(), this, "operator"); + dir = new KDevDirOperator(m_part, KURL(), this, "operator"); dir->setView(KFile::/*Simple*/Detail); TDEActionCollection *coll = dir->actionCollection(); @@ -229,7 +229,7 @@ TDevFileSelector::TDevFileSelector( FileSelectorPart *part, TDevMainWindow *main "reapplies the last filter used when toggled on.") ); } -TDevFileSelector::~TDevFileSelector() +KDevFileSelector::~KDevFileSelector() { writeConfig( m_part->instance()->config(), "fileselector" ); } @@ -237,7 +237,7 @@ TDevFileSelector::~TDevFileSelector() //BEGIN Public Methods -void TDevFileSelector::readConfig(TDEConfig *config, const TQString & name) +void KDevFileSelector::readConfig(TDEConfig *config, const TQString & name) { dir->readConfig(config, name + ":dir"); dir->setView( KFile::Default ); @@ -283,12 +283,12 @@ void TDevFileSelector::readConfig(TDEConfig *config, const TQString & name) } -void TDevFileSelector::initialDirChangeHack() +void KDevFileSelector::initialDirChangeHack() { setDir( waitingDir ); } -void TDevFileSelector::setupToolbar( TDEConfig *config ) +void KDevFileSelector::setupToolbar( TDEConfig *config ) { toolbar->clear(); TQStringList tbactions = config->readListEntry( "toolbar actions", ',' ); @@ -311,7 +311,7 @@ void TDevFileSelector::setupToolbar( TDEConfig *config ) } } -void TDevFileSelector::writeConfig(TDEConfig *config, const TQString & name) +void KDevFileSelector::writeConfig(TDEConfig *config, const TQString & name) { dir->writeConfig(config,name + ":dir"); @@ -332,7 +332,7 @@ void TDevFileSelector::writeConfig(TDEConfig *config, const TQString & name) config->writeEntry( "AutoSyncEvents", autoSyncEvents ); } -void TDevFileSelector::setView(KFile::FileView view) +void KDevFileSelector::setView(KFile::FileView view) { dir->setView(view); } @@ -341,7 +341,7 @@ void TDevFileSelector::setView(KFile::FileView view) //BEGIN Public Slots -void TDevFileSelector::slotFilterChange( const TQString & nf ) +void KDevFileSelector::slotFilterChange( const TQString & nf ) { TQToolTip::remove( btnFilter ); TQString f = nf.stripWhiteSpace(); @@ -371,7 +371,7 @@ void TDevFileSelector::slotFilterChange( const TQString & nf ) btnFilter->setEnabled( !( empty && lastFilter.isEmpty() ) ); } -void TDevFileSelector::setDir( KURL u ) +void KDevFileSelector::setDir( KURL u ) { dir->setURL(u, true); } @@ -380,12 +380,12 @@ void TDevFileSelector::setDir( KURL u ) //BEGIN Private Slots -void TDevFileSelector::cmbPathActivated( const KURL& u ) +void KDevFileSelector::cmbPathActivated( const KURL& u ) { cmbPathReturnPressed( u.url() ); } -void TDevFileSelector::cmbPathReturnPressed( const TQString& u ) +void KDevFileSelector::cmbPathReturnPressed( const TQString& u ) { TQStringList urls = cmbPath->urls(); urls.remove( u ); @@ -395,12 +395,12 @@ void TDevFileSelector::cmbPathReturnPressed( const TQString& u ) dir->setURL( KURL(u), true ); } -void TDevFileSelector::dirUrlEntered( const KURL& u ) +void KDevFileSelector::dirUrlEntered( const KURL& u ) { cmbPath->setURL( u ); } -void TDevFileSelector::dirFinishedLoading() +void KDevFileSelector::dirFinishedLoading() {} @@ -411,7 +411,7 @@ void TDevFileSelector::dirFinishedLoading() If on: Set last filter. */ -void TDevFileSelector::btnFilterClick() +void KDevFileSelector::btnFilterClick() { if ( !btnFilter->isOn() ) { @@ -425,9 +425,9 @@ void TDevFileSelector::btnFilterClick() } -void TDevFileSelector::autoSync() +void KDevFileSelector::autoSync() { - kdDebug()<<"TDevFileSelector::autoSync()"<( part ); if( !doc ) return; // as above, but using document url. - kdDebug()<<"TDevFileSelector::autoSync( KTextEditor::Document )"<url() ); if ( u.isEmpty() ) { @@ -468,15 +468,15 @@ void TDevFileSelector::autoSync( KParts::Part *part ) } } /// \FIXME crash on shutdown -void TDevFileSelector::setActiveDocumentDir() +void KDevFileSelector::setActiveDocumentDir() { - //kdDebug()<<"TDevFileSelector::setActiveDocumentDir()"<setFocus(); } -void TDevFileSelector::showEvent( TQShowEvent * ) +void KDevFileSelector::showEvent( TQShowEvent * ) { // sync if we should if ( autoSyncEvents & GotVisible ) @@ -509,7 +509,7 @@ void TDevFileSelector::showEvent( TQShowEvent * ) } } -bool TDevFileSelector::eventFilter( TQObject* o, TQEvent *e ) +bool KDevFileSelector::eventFilter( TQObject* o, TQEvent *e ) { /* This is rather unfortunate, but: @@ -559,7 +559,7 @@ private: TQString _str; }; -KURL TDevFileSelector::activeDocumentUrl( ) +KURL KDevFileSelector::activeDocumentUrl( ) { KParts::ReadOnlyPart * part = dynamic_cast( partController->activePart() ); if ( part ) @@ -575,7 +575,7 @@ KURL TDevFileSelector::activeDocumentUrl( ) //////////////////////////////////////////////////////////////////////////////// // KFSConfigPage implementation //////////////////////////////////////////////////////////////////////////////// -KFSConfigPage::KFSConfigPage( TQWidget *parent, const char *name, TDevFileSelector *kfs ) +KFSConfigPage::KFSConfigPage( TQWidget *parent, const char *name, KDevFileSelector *kfs ) : TQWidget( parent, name ), fileSelector( kfs ), bDirty( false ) @@ -706,20 +706,20 @@ void KFSConfigPage::apply() // sync int s = 0; if ( cbSyncActive->isChecked() ) - s |= TDevFileSelector::DocumentChanged; + s |= KDevFileSelector::DocumentChanged; if ( cbSyncOpen->isChecked() ) - s |= TDevFileSelector::DocumentOpened; + s |= KDevFileSelector::DocumentOpened; if ( cbSyncShow->isChecked() ) - s |= TDevFileSelector::GotVisible; + s |= KDevFileSelector::GotVisible; fileSelector->autoSyncEvents = s; // reset connections disconnect( fileSelector->partController, 0, fileSelector, TQT_SLOT( autoSync() ) ); disconnect( fileSelector->partController, 0, fileSelector, TQT_SLOT( autoSync( KParts::Part *) ) ); - if ( s & TDevFileSelector::DocumentChanged ) + if ( s & KDevFileSelector::DocumentChanged ) connect( fileSelector->partController, TQT_SIGNAL( viewChanged() ), fileSelector, TQT_SLOT( autoSync() ) ); - if ( s & TDevFileSelector::DocumentOpened ) + if ( s & KDevFileSelector::DocumentOpened ) connect( fileSelector->partController, TQT_SIGNAL( partAdded(KParts::Part *) ), fileSelector, TQT_SLOT( autoSync(KParts::Part *) ) ); @@ -773,9 +773,9 @@ void KFSConfigPage::init() // sync int s = fileSelector->autoSyncEvents; - cbSyncActive->setChecked( s & TDevFileSelector::DocumentChanged ); - cbSyncOpen->setChecked( s & TDevFileSelector::DocumentOpened ); - cbSyncShow->setChecked( s & TDevFileSelector::GotVisible ); + cbSyncActive->setChecked( s & KDevFileSelector::DocumentChanged ); + cbSyncOpen->setChecked( s & KDevFileSelector::DocumentOpened ); + cbSyncShow->setChecked( s & KDevFileSelector::GotVisible ); // histories sbPathHistLength->setValue( fileSelector->cmbPath->maxItems() ); sbFilterHistLength->setValue( fileSelector->filter->maxCount() ); @@ -791,9 +791,9 @@ void KFSConfigPage::slotChanged() //END KFSConfigPage -//BEGIN TDevDirOperator +//BEGIN KDevDirOperator -void TDevDirOperator::activatedMenu( const KFileItem *fi, const TQPoint & pos ) +void KDevDirOperator::activatedMenu( const KFileItem *fi, const TQPoint & pos ) { setupMenu(); updateSelectionDependentActions(); @@ -816,6 +816,6 @@ void TDevDirOperator::activatedMenu( const KFileItem *fi, const TQPoint & pos ) popup->popup(pos); } -//END TDevDirOperator +//END KDevDirOperator #include "fileselector_widget.moc" diff --git a/parts/fileselector/fileselector_widget.h b/parts/fileselector/fileselector_widget.h index 1c30eadd..ef64f88c 100644 --- a/parts/fileselector/fileselector_widget.h +++ b/parts/fileselector/fileselector_widget.h @@ -29,8 +29,8 @@ #include #include -class TDevMainWindow; -class TDevPartController; +class KDevMainWindow; +class KDevPartController; class FileSelectorPart; class TDEActionCollection; class TDEActionSelector; @@ -57,39 +57,39 @@ namespace KTextEditor */ /* I think this fix for not moving toolbars is better */ -class TDevFileSelectorToolBar: public TDEToolBar +class KDevFileSelectorToolBar: public TDEToolBar { Q_OBJECT public: - TDevFileSelectorToolBar(TQWidget *parent); - virtual ~TDevFileSelectorToolBar(); + KDevFileSelectorToolBar(TQWidget *parent); + virtual ~KDevFileSelectorToolBar(); virtual void setMovingEnabled( bool b ); }; -class TDevFileSelectorToolBarParent: public TQFrame +class KDevFileSelectorToolBarParent: public TQFrame { Q_OBJECT public: - TDevFileSelectorToolBarParent(TQWidget *parent); - ~TDevFileSelectorToolBarParent(); - void setToolBar(TDevFileSelectorToolBar *tb); + KDevFileSelectorToolBarParent(TQWidget *parent); + ~KDevFileSelectorToolBarParent(); + void setToolBar(KDevFileSelectorToolBar *tb); private: - TDevFileSelectorToolBar *m_tb; + KDevFileSelectorToolBar *m_tb; protected: virtual void resizeEvent ( TQResizeEvent * ); }; -class TDevDirOperator: public KDirOperator +class KDevDirOperator: public KDirOperator { Q_OBJECT public: - TDevDirOperator(FileSelectorPart *part, const KURL &urlName=KURL(), TQWidget *parent=0, const char *name=0) + KDevDirOperator(FileSelectorPart *part, const KURL &urlName=KURL(), TQWidget *parent=0, const char *name=0) :KDirOperator(urlName, parent, name), m_part(part) { } @@ -101,7 +101,7 @@ private: FileSelectorPart *m_part; }; -class TDevFileSelector : public TQWidget +class KDevFileSelector : public TQWidget { Q_OBJECT @@ -112,15 +112,15 @@ public: /* When to sync to current document directory */ enum AutoSyncEvent { DocumentChanged=1, DocumentOpened=2, GotVisible=4 }; - TDevFileSelector( FileSelectorPart *part, TDevMainWindow *mainWindow=0, TDevPartController *partController=0, + KDevFileSelector( FileSelectorPart *part, KDevMainWindow *mainWindow=0, KDevPartController *partController=0, TQWidget * parent = 0, const char * name = 0 ); - ~TDevFileSelector(); + ~KDevFileSelector(); void readConfig( TDEConfig *, const TQString & ); void writeConfig( TDEConfig *, const TQString & ); void setupToolbar( TDEConfig * ); void setView( KFile::FileView ); - TDevDirOperator *dirOperator(){ return dir; } + KDevDirOperator *dirOperator(){ return dir; } TDEActionCollection *actionCollection() { return mActionCollection; }; public slots: @@ -146,18 +146,18 @@ protected: KURL activeDocumentUrl(); private: - class TDevFileSelectorToolBar *toolbar; + class KDevFileSelectorToolBar *toolbar; TDEActionCollection *mActionCollection; class KBookmarkHandler *bookmarkHandler; KURLComboBox *cmbPath; - TDevDirOperator * dir; + KDevDirOperator * dir; class TDEAction *acSyncDir; KHistoryCombo * filter; class TQToolButton *btnFilter; FileSelectorPart *m_part; - TDevMainWindow *mainwin; - TDevPartController *partController; + KDevMainWindow *mainwin; + KDevPartController *partController; TQString lastFilter; int autoSyncEvents; // enabled autosync events @@ -183,7 +183,7 @@ class KFSConfigPage : public TQWidget Q_OBJECT public: - KFSConfigPage( TQWidget* parent=0, const char *name=0, TDevFileSelector *kfs=0); + KFSConfigPage( TQWidget* parent=0, const char *name=0, KDevFileSelector *kfs=0); virtual ~KFSConfigPage() {}; public slots: @@ -194,7 +194,7 @@ public slots: private: void init(); - TDevFileSelector *fileSelector; + KDevFileSelector *fileSelector; bool bDirty; //class TQListBox *lbAvailableActions, *lbUsedActions; TDEActionSelector *acSel; diff --git a/parts/fileselector/kbookmarkhandler.cpp b/parts/fileselector/kbookmarkhandler.cpp index 059f0d78..935b9d86 100644 --- a/parts/fileselector/kbookmarkhandler.cpp +++ b/parts/fileselector/kbookmarkhandler.cpp @@ -35,7 +35,7 @@ #include "kbookmarkhandler.moc" -KBookmarkHandler::KBookmarkHandler( TDevFileSelector *parent, TDEPopupMenu* tdepopupmenu ) +KBookmarkHandler::KBookmarkHandler( KDevFileSelector *parent, TDEPopupMenu* tdepopupmenu ) : TQObject( parent, "KBookmarkHandler" ), KBookmarkOwner(), mParent( parent ), @@ -45,9 +45,9 @@ KBookmarkHandler::KBookmarkHandler( TDevFileSelector *parent, TDEPopupMenu* tdep if (!m_menu) m_menu = new TDEPopupMenu( parent, "bookmark menu" ); - TQString file = locate( "data", "tdevfileselector/fsbookmarks.xml" ); + TQString file = locate( "data", "kdevfileselector/fsbookmarks.xml" ); if ( file.isEmpty() ) - file = locateLocal( "data", "tdevfileselector/fsbookmarks.xml" ); + file = locateLocal( "data", "kdevfileselector/fsbookmarks.xml" ); KBookmarkManager *manager = KBookmarkManager::managerForFile( file, false); manager->setUpdate( true ); diff --git a/parts/fileselector/kbookmarkhandler.h b/parts/fileselector/kbookmarkhandler.h index 7d232107..4ec065aa 100644 --- a/parts/fileselector/kbookmarkhandler.h +++ b/parts/fileselector/kbookmarkhandler.h @@ -34,7 +34,7 @@ class KBookmarkHandler : public TQObject, public KBookmarkOwner public: - KBookmarkHandler( TDevFileSelector *parent, TDEPopupMenu *tdepopupmenu=0 ); + KBookmarkHandler( KDevFileSelector *parent, TDEPopupMenu *tdepopupmenu=0 ); ~KBookmarkHandler(); // KBookmarkOwner interface: @@ -58,7 +58,7 @@ protected: virtual void virtual_hook( int id, void* data ); private: - TDevFileSelector *mParent; + KDevFileSelector *mParent; TDEPopupMenu *m_menu; KBookmarkMenu *m_bookmarkMenu; diff --git a/parts/fileselector/kdevfileselector.desktop b/parts/fileselector/kdevfileselector.desktop new file mode 100644 index 00000000..785db621 --- /dev/null +++ b/parts/fileselector/kdevfileselector.desktop @@ -0,0 +1,89 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Powerful network transparent file browser utility. +Comment[ca]=Potent utilitat per a la navegació entre fitxers, transparent a la xarxa. +Comment[da]=Stærkt netværkstransparent filsøgerredskab. +Comment[de]=Ein mächtiges, netzwerktransparentes Dateiverwaltungswerkzeug. +Comment[el]=Ισχυρό εργαλείο περιηγητή αρχείων με δικτυακή υποστήριξη. +Comment[es]=Potente utilidad de navegación de archivos transparente a la red. +Comment[et]=Võimas failide lehitsemise rakendus. +Comment[eu]=Fitxategiak arakatzeko sare gardeneko tresna ahaltsua. +Comment[fa]=برنامۀ سودمند مرورگر پروندۀ شفاف شبکۀ قوی +Comment[fr]=Puissant utilitaire de navigateur de fichiers transparent vis-à-vis du réseau. +Comment[gl]=Potente utilidade de navegación de ficheiros con soporte para navegación da rede de forma transparente. +Comment[hi]=शक्तिशाली नेटवर्क ट्रांसपेरेन्ट फ़ाइल ब्राउज़र यूटिलिटी +Comment[hu]=Fájlböngésző program (hálózatkezeléssel) +Comment[it]=Utilità per la navigazione trasparente dei file in rete. +Comment[ja]=強力なネットワーク透過ファイルブラウザユーティリティ +Comment[ms]=Utiliti pelayar fail telus rangkaian yang berkuasa +Comment[nds]=En mächtig, nettwarktransparent Dateigrieper. +Comment[ne]=शक्तिशाली सञ्जाल पारदर्शी फाइल ब्राउजर युटिलिटी +Comment[nl]=Krachtige, netwerktransparante bestandsbrowser. +Comment[pl]=Potężne narzędzie do przeglądania plików z obsługą sieci. +Comment[pt]=Utilitário de navegação de ficheiros poderoso. +Comment[pt_BR]=Poderoso utilitário de navegação de arquivos transparente à rede. +Comment[ru]=Средство просмотра списка файлов с поддержкой работы по сети. +Comment[sk]=Výkonný sieťovo-transparentný nástroj na prezeranie súborov. +Comment[sr]=Моћан програмчић за претраживање фајлова који је независтан од мреже. +Comment[sr@Latn]=Moćan programčić za pretraživanje fajlova koji je nezavistan od mreže. +Comment[sv]=Kraftfullt nätverkstransparent filbläddringsverktyg +Comment[ta]=வலிமையுள்ள வலை பின்னல் ஊடக கோப்பினை தேடும் வசதி. +Comment[tg]=Воситаи намоиши файлҳо бо тарафдории корҳо бо шабака. +Comment[tr]=Güçlü, ağdan saydam, dosya gözatma yardımcı programı +Comment[zh_CN]=强有力的网络文件浏览工具。 +Comment[zh_TW]=強大的網路檔案瀏覽工具。 +Name=KDevFileSelector +Name[da]=TDevelop filvælger +Name[de]=Datei-Selektor (TDevelop) +Name[hi]=के-डेव-फ़ाइल-चयनक +Name[nds]=TDevelop-Dateigrieper +Name[pl]=KDevWybórPliku +Name[sk]=KDev voľba súboru +Name[sv]=TDevelop filväljare +Name[ta]=KDev கோப்பு தேர்வாளன் +Name[tg]=Ҷудосози файли KDev +Name[zh_TW]=TDevelop 檔案選擇器 +GenericName=File Selector +GenericName[br]=Dibaber ar restr +GenericName[ca]=Selector de fitxers +GenericName[cy]=Dewisydd Ffeiliau +GenericName[da]=Filvælger +GenericName[de]=Datei-Selektor +GenericName[el]=Επιλογέας αρχείων +GenericName[es]=Selector de archivos +GenericName[et]=Failide valija +GenericName[eu]=Fitxategi hautatzailea +GenericName[fa]=گزینندۀ پرونده +GenericName[fr]=Sélecteur de fichiers +GenericName[ga]=Roghnóir na gComhad +GenericName[gl]=Selector de ficheiros +GenericName[hi]=फ़ाइल चयनक +GenericName[hu]=Fájlválasztó +GenericName[it]=Selettore file +GenericName[ja]=ファイル選択 +GenericName[ms]=Pemilih Fail +GenericName[nds]=Dateigrieper +GenericName[ne]=फाइल चयनकर्ता +GenericName[nl]=Bestandsselector +GenericName[pl]=Wybór plików +GenericName[pt]=Selector de Ficheiros +GenericName[pt_BR]=Seletor de Arquivo +GenericName[ru]=Выбор файлов +GenericName[sk]=Voľba súboru +GenericName[sl]=Izbirnik datotek +GenericName[sr]=Бирач фајлова +GenericName[sr@Latn]=Birač fajlova +GenericName[sv]=Filväljare +GenericName[ta]=கோப்பு தேர்வாளர் +GenericName[tg]=Селектори файлҳо +GenericName[tr]=Dosya Seçici +GenericName[zh_CN]=文件选择器 +GenericName[zh_TW]=檔案選擇器 +Icon=fileopen +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevfileselector +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Mode=AssistantMode +X-TDevelop-Properties=GlobalFileManagement diff --git a/parts/fileselector/kdevpart_fileselector.rc b/parts/fileselector/kdevpart_fileselector.rc new file mode 100644 index 00000000..940e2ab2 --- /dev/null +++ b/parts/fileselector/kdevpart_fileselector.rc @@ -0,0 +1,8 @@ + + + + &Help + + + + diff --git a/parts/fileselector/tdevfileselector.desktop b/parts/fileselector/tdevfileselector.desktop deleted file mode 100644 index a1d13627..00000000 --- a/parts/fileselector/tdevfileselector.desktop +++ /dev/null @@ -1,89 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Powerful network transparent file browser utility. -Comment[ca]=Potent utilitat per a la navegació entre fitxers, transparent a la xarxa. -Comment[da]=Stærkt netværkstransparent filsøgerredskab. -Comment[de]=Ein mächtiges, netzwerktransparentes Dateiverwaltungswerkzeug. -Comment[el]=Ισχυρό εργαλείο περιηγητή αρχείων με δικτυακή υποστήριξη. -Comment[es]=Potente utilidad de navegación de archivos transparente a la red. -Comment[et]=Võimas failide lehitsemise rakendus. -Comment[eu]=Fitxategiak arakatzeko sare gardeneko tresna ahaltsua. -Comment[fa]=برنامۀ سودمند مرورگر پروندۀ شفاف شبکۀ قوی -Comment[fr]=Puissant utilitaire de navigateur de fichiers transparent vis-à-vis du réseau. -Comment[gl]=Potente utilidade de navegación de ficheiros con soporte para navegación da rede de forma transparente. -Comment[hi]=शक्तिशाली नेटवर्क ट्रांसपेरेन्ट फ़ाइल ब्राउज़र यूटिलिटी -Comment[hu]=Fájlböngésző program (hálózatkezeléssel) -Comment[it]=Utilità per la navigazione trasparente dei file in rete. -Comment[ja]=強力なネットワーク透過ファイルブラウザユーティリティ -Comment[ms]=Utiliti pelayar fail telus rangkaian yang berkuasa -Comment[nds]=En mächtig, nettwarktransparent Dateigrieper. -Comment[ne]=शक्तिशाली सञ्जाल पारदर्शी फाइल ब्राउजर युटिलिटी -Comment[nl]=Krachtige, netwerktransparante bestandsbrowser. -Comment[pl]=Potężne narzędzie do przeglądania plików z obsługą sieci. -Comment[pt]=Utilitário de navegação de ficheiros poderoso. -Comment[pt_BR]=Poderoso utilitário de navegação de arquivos transparente à rede. -Comment[ru]=Средство просмотра списка файлов с поддержкой работы по сети. -Comment[sk]=Výkonný sieťovo-transparentný nástroj na prezeranie súborov. -Comment[sr]=Моћан програмчић за претраживање фајлова који је независтан од мреже. -Comment[sr@Latn]=Moćan programčić za pretraživanje fajlova koji je nezavistan od mreže. -Comment[sv]=Kraftfullt nätverkstransparent filbläddringsverktyg -Comment[ta]=வலிமையுள்ள வலை பின்னல் ஊடக கோப்பினை தேடும் வசதி. -Comment[tg]=Воситаи намоиши файлҳо бо тарафдории корҳо бо шабака. -Comment[tr]=Güçlü, ağdan saydam, dosya gözatma yardımcı programı -Comment[zh_CN]=强有力的网络文件浏览工具。 -Comment[zh_TW]=強大的網路檔案瀏覽工具。 -Name=TDevFileSelector -Name[da]=TDevelop filvælger -Name[de]=Datei-Selektor (TDevelop) -Name[hi]=के-डेव-फ़ाइल-चयनक -Name[nds]=TDevelop-Dateigrieper -Name[pl]=KDevWybórPliku -Name[sk]=KDev voľba súboru -Name[sv]=TDevelop filväljare -Name[ta]=KDev கோப்பு தேர்வாளன் -Name[tg]=Ҷудосози файли KDev -Name[zh_TW]=TDevelop 檔案選擇器 -GenericName=File Selector -GenericName[br]=Dibaber ar restr -GenericName[ca]=Selector de fitxers -GenericName[cy]=Dewisydd Ffeiliau -GenericName[da]=Filvælger -GenericName[de]=Datei-Selektor -GenericName[el]=Επιλογέας αρχείων -GenericName[es]=Selector de archivos -GenericName[et]=Failide valija -GenericName[eu]=Fitxategi hautatzailea -GenericName[fa]=گزینندۀ پرونده -GenericName[fr]=Sélecteur de fichiers -GenericName[ga]=Roghnóir na gComhad -GenericName[gl]=Selector de ficheiros -GenericName[hi]=फ़ाइल चयनक -GenericName[hu]=Fájlválasztó -GenericName[it]=Selettore file -GenericName[ja]=ファイル選択 -GenericName[ms]=Pemilih Fail -GenericName[nds]=Dateigrieper -GenericName[ne]=फाइल चयनकर्ता -GenericName[nl]=Bestandsselector -GenericName[pl]=Wybór plików -GenericName[pt]=Selector de Ficheiros -GenericName[pt_BR]=Seletor de Arquivo -GenericName[ru]=Выбор файлов -GenericName[sk]=Voľba súboru -GenericName[sl]=Izbirnik datotek -GenericName[sr]=Бирач фајлова -GenericName[sr@Latn]=Birač fajlova -GenericName[sv]=Filväljare -GenericName[ta]=கோப்பு தேர்வாளர் -GenericName[tg]=Селектори файлҳо -GenericName[tr]=Dosya Seçici -GenericName[zh_CN]=文件选择器 -GenericName[zh_TW]=檔案選擇器 -Icon=fileopen -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevfileselector -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Mode=AssistantMode -X-TDevelop-Properties=GlobalFileManagement diff --git a/parts/fileselector/tdevpart_fileselector.rc b/parts/fileselector/tdevpart_fileselector.rc deleted file mode 100644 index 940e2ab2..00000000 --- a/parts/fileselector/tdevpart_fileselector.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - &Help - - - - diff --git a/parts/fileview/CMakeLists.txt b/parts/fileview/CMakeLists.txt index 49539df2..4f5f87dc 100644 --- a/parts/fileview/CMakeLists.txt +++ b/parts/fileview/CMakeLists.txt @@ -28,13 +28,13 @@ link_directories( ##### other data ################################ install( FILES - tdevfileview.desktop tdevfilegroups.desktop + kdevfileview.desktop kdevfilegroups.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevfileview (module) ################## +##### libkdevfileview (module) ################## -tde_add_kpart( libtdevfileview AUTOMOC +tde_add_kpart( libkdevfileview AUTOMOC SOURCES fileviewpart.cpp filetreewidget.cpp partwidget.cpp vcscolorsconfigwidgetbase.ui vcscolorsconfigwidget.cpp @@ -45,9 +45,9 @@ tde_add_kpart( libtdevfileview AUTOMOC ) -##### libtdevfilegroups (module) ################ +##### libkdevfilegroups (module) ################ -tde_add_kpart( libtdevfilegroups AUTOMOC +tde_add_kpart( libkdevfilegroups AUTOMOC SOURCES filegroupswidget.cpp addfilegroupdlg.cpp filegroupsconfigwidget.cpp filegroupsconfigwidgetbase.ui diff --git a/parts/fileview/Makefile.am b/parts/fileview/Makefile.am index 76f1460b..3211d736 100644 --- a/parts/fileview/Makefile.am +++ b/parts/fileview/Makefile.am @@ -3,24 +3,24 @@ INCLUDES = -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevfileview.la libtdevfilegroups.la +kde_module_LTLIBRARIES = libkdevfileview.la libkdevfilegroups.la -libtdevfileview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfileview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +libkdevfileview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfileview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfilegroups_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfilegroups_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +libkdevfilegroups_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfilegroups_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfileview_la_SOURCES = fileviewpart.cpp filetreewidget.cpp partwidget.cpp vcscolorsconfigwidgetbase.ui vcscolorsconfigwidget.cpp stdfiletreewidgetimpl.cpp filetreeviewwidgetimpl.cpp vcsfiletreewidgetimpl.cpp fileitemfactory.cpp +libkdevfileview_la_SOURCES = fileviewpart.cpp filetreewidget.cpp partwidget.cpp vcscolorsconfigwidgetbase.ui vcscolorsconfigwidget.cpp stdfiletreewidgetimpl.cpp filetreeviewwidgetimpl.cpp vcsfiletreewidgetimpl.cpp fileitemfactory.cpp -libtdevfilegroups_la_SOURCES = filegroupswidget.cpp addfilegroupdlg.cpp filegroupsconfigwidget.cpp filegroupsconfigwidgetbase.ui filegroupspart.cpp +libkdevfilegroups_la_SOURCES = filegroupswidget.cpp addfilegroupdlg.cpp filegroupsconfigwidget.cpp filegroupsconfigwidgetbase.ui filegroupspart.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfileview.desktop tdevfilegroups.desktop +service_DATA = kdevfileview.desktop kdevfilegroups.desktop # not used currently -#rcdir = $(kde_datadir)/tdevfileview -#rc_DATA = tdevfileview.rc +#rcdir = $(kde_datadir)/kdevfileview +#rc_DATA = kdevfileview.rc noinst_HEADERS = vcscolorsconfigwidget.h stdfiletreewidgetimpl.h filetreeviewwidgetimpl.h vcsfiletreewidgetimpl.h fileitemfactory.h diff --git a/parts/fileview/filegroupsconfigwidget.cpp b/parts/fileview/filegroupsconfigwidget.cpp index bf8d39a6..4f8fe422 100644 --- a/parts/fileview/filegroupsconfigwidget.cpp +++ b/parts/fileview/filegroupsconfigwidget.cpp @@ -39,7 +39,7 @@ FileGroupsConfigWidget::~FileGroupsConfigWidget() void FileGroupsConfigWidget::readConfig() { TQDomDocument &dom = *m_part->projectDom(); - DomUtil::PairList list = DomUtil::readPairListEntry(dom, "/tdevfileview/groups", + DomUtil::PairList list = DomUtil::readPairListEntry(dom, "/kdevfileview/groups", "group", "name", "pattern"); TQListViewItem *lastItem = 0; @@ -64,7 +64,7 @@ void FileGroupsConfigWidget::storeConfig() item = item->nextSibling(); } - DomUtil::writePairListEntry(*m_part->projectDom(), "/tdevfileview/groups", + DomUtil::writePairListEntry(*m_part->projectDom(), "/kdevfileview/groups", "group", "name", "pattern", list); } diff --git a/parts/fileview/filegroupspart.cpp b/parts/fileview/filegroupspart.cpp index 7b83b8ef..77fc9646 100644 --- a/parts/fileview/filegroupspart.cpp +++ b/parts/fileview/filegroupspart.cpp @@ -19,25 +19,25 @@ #include #include #include -#include +#include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevplugininfo.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevplugininfo.h" #include "filegroupswidget.h" #include "filegroupsconfigwidget.h" #define FILEGROUPS_OPTIONS 1 -typedef TDevGenericFactory FileGroupsFactory; -static const TDevPluginInfo data("tdevfilegroups"); -K_EXPORT_COMPONENT_FACTORY( libtdevfilegroups, FileGroupsFactory( data ) ) +typedef KDevGenericFactory FileGroupsFactory; +static const KDevPluginInfo data("kdevfilegroups"); +K_EXPORT_COMPONENT_FACTORY( libkdevfilegroups, FileGroupsFactory( data ) ) FileGroupsPart::FileGroupsPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "FileGroupsPart") + : KDevPlugin(&data, parent, name ? name : "FileGroupsPart") { deleteRequested = false; setInstance(FileGroupsFactory::instance()); diff --git a/parts/fileview/filegroupspart.h b/parts/fileview/filegroupspart.h index 88bed704..314f1663 100644 --- a/parts/fileview/filegroupspart.h +++ b/parts/fileview/filegroupspart.h @@ -15,12 +15,12 @@ #include //#include #include -#include "tdevplugin.h" +#include "kdevplugin.h" class FileGroupsWidget; class KDialogBase; -class FileGroupsPart : public TDevPlugin +class FileGroupsPart : public KDevPlugin { Q_OBJECT diff --git a/parts/fileview/filegroupswidget.cpp b/parts/fileview/filegroupswidget.cpp index 3c1c348f..8a3e19b4 100644 --- a/parts/fileview/filegroupswidget.cpp +++ b/parts/fileview/filegroupswidget.cpp @@ -27,10 +27,10 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" #include "domutil.h" #include "filegroupspart.h" @@ -191,16 +191,16 @@ FileGroupsWidget::FileGroupsWidget(FileGroupsPart *part) (void) translations; // supress compiler warning TQDomDocument &dom = *m_part->projectDom(); - m_actionToggleShowNonProjectFiles->setChecked( !DomUtil::readBoolEntry(dom, "/tdevfileview/groups/hidenonprojectfiles") ); - m_actionToggleDisplayLocation->setChecked( !DomUtil::readBoolEntry(dom, "/tdevfileview/groups/hidenonlocation") ); + m_actionToggleShowNonProjectFiles->setChecked( !DomUtil::readBoolEntry(dom, "/kdevfileview/groups/hidenonprojectfiles") ); + m_actionToggleDisplayLocation->setChecked( !DomUtil::readBoolEntry(dom, "/kdevfileview/groups/hidenonlocation") ); } FileGroupsWidget::~FileGroupsWidget() { TQDomDocument &dom = *m_part->projectDom(); - DomUtil::writeBoolEntry( dom, "/tdevfileview/groups/hidenonprojectfiles", !m_actionToggleShowNonProjectFiles->isChecked() ); - DomUtil::writeBoolEntry( dom, "/tdevfileview/groups/hidenonlocation", !m_actionToggleDisplayLocation->isChecked() ); + DomUtil::writeBoolEntry( dom, "/kdevfileview/groups/hidenonprojectfiles", !m_actionToggleShowNonProjectFiles->isChecked() ); + DomUtil::writeBoolEntry( dom, "/kdevfileview/groups/hidenonlocation", !m_actionToggleDisplayLocation->isChecked() ); } @@ -319,7 +319,7 @@ void FileGroupsWidget::refresh() } TQDomDocument &dom = *m_part->projectDom(); DomUtil::PairList list = - DomUtil::readPairListEntry(dom, "/tdevfileview/groups", "group", "name", "pattern"); + DomUtil::readPairListEntry(dom, "/kdevfileview/groups", "group", "name", "pattern"); FileViewFolderItem *lastGroup = 0; diff --git a/parts/fileview/filegroupswidget.h b/parts/fileview/filegroupswidget.h index 62ec5d6f..3294db32 100644 --- a/parts/fileview/filegroupswidget.h +++ b/parts/fileview/filegroupswidget.h @@ -15,7 +15,7 @@ #include class FileGroupsPart; -class TDevProject; +class KDevProject; class FileGroupsWidget : public TDEListView diff --git a/parts/fileview/filetreeviewwidgetimpl.cpp b/parts/fileview/filetreeviewwidgetimpl.cpp index 3764a3f2..af6f9e1f 100644 --- a/parts/fileview/filetreeviewwidgetimpl.cpp +++ b/parts/fileview/filetreeviewwidgetimpl.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include "fileviewpart.h" #include "filetreewidget.h" @@ -44,7 +44,7 @@ FileTreeViewWidgetImpl::FileTreeViewWidgetImpl( FileTreeWidget *parent, const ch // Reload good ol' settings TQDomDocument &dom = *m_part->projectDom(); - m_actionToggleShowNonProjectFiles->setChecked( !DomUtil::readBoolEntry(dom, "/tdevfileview/tree/hidenonprojectfiles") ); + m_actionToggleShowNonProjectFiles->setChecked( !DomUtil::readBoolEntry(dom, "/kdevfileview/tree/hidenonprojectfiles") ); } /////////////////////////////////////////////////////////////////////////////// @@ -56,7 +56,7 @@ FileTreeViewWidgetImpl::~FileTreeViewWidgetImpl() delete m_branchItemFactory; TQDomDocument &dom = *m_part->projectDom(); - DomUtil::writeBoolEntry( dom, "/tdevfileview/tree/hidenonprojectfiles", !showNonProjectFiles() ); + DomUtil::writeBoolEntry( dom, "/kdevfileview/tree/hidenonprojectfiles", !showNonProjectFiles() ); } /////////////////////////////////////////////////////////////////////////////// diff --git a/parts/fileview/filetreewidget.cpp b/parts/fileview/filetreewidget.cpp index 0a1c5346..f89bf71d 100644 --- a/parts/fileview/filetreewidget.cpp +++ b/parts/fileview/filetreewidget.cpp @@ -26,11 +26,11 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" -#include "tdevversioncontrol.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" +#include "kdevversioncontrol.h" #include "domutil.h" #include "urlutil.h" @@ -51,7 +51,7 @@ using namespace filetreeview; // class FileTreeWidget /////////////////////////////////////////////////////////////////////////////// -FileTreeWidget::FileTreeWidget( FileViewPart *part, TQWidget *parent, TDevVCSFileInfoProvider *infoProvider ) +FileTreeWidget::FileTreeWidget( FileViewPart *part, TQWidget *parent, KDevVCSFileInfoProvider *infoProvider ) : KFileTreeView( parent, "filetreewidget" ), m_part( part ), m_rootBranch( 0 ) { kdDebug(9017) << "Requested FileTree for: " << projectDirectory() << endl; @@ -87,7 +87,7 @@ FileTreeWidget::FileTreeWidget( FileViewPart *part, TQWidget *parent, TDevVCSFil // Hide pattern for files TQDomDocument &dom = *m_part->projectDom(); TQString defaultHidePattern = "*.o,*.lo,CVS"; - TQString hidePattern = DomUtil::readEntry( dom, "/tdevfileview/tree/hidepatterns", defaultHidePattern ); + TQString hidePattern = DomUtil::readEntry( dom, "/kdevfileview/tree/hidepatterns", defaultHidePattern ); m_hidePatterns = TQStringList::split( ",", hidePattern ); } @@ -98,7 +98,7 @@ FileTreeWidget::~FileTreeWidget() kdDebug(9017) << "FileTreeWidget::~FileTreeWidget()" << endl; TQDomDocument &dom = *m_part->projectDom(); - DomUtil::writeEntry( dom, "/tdevfileview/tree/hidepatterns", hidePatterns() ); + DomUtil::writeEntry( dom, "/kdevfileview/tree/hidepatterns", hidePatterns() ); // delete m_impl; } @@ -343,7 +343,7 @@ TQString FileTreeWidget::hidePatterns() const /////////////////////////////////////////////////////////////////////////////// -TDevVersionControl *FileTreeWidget::versionControl() const +KDevVersionControl *FileTreeWidget::versionControl() const { if (part() && part()->versionControl()) return part()->versionControl(); diff --git a/parts/fileview/filetreewidget.h b/parts/fileview/filetreewidget.h index a8d3e2bf..f6abb0c6 100644 --- a/parts/fileview/filetreewidget.h +++ b/parts/fileview/filetreewidget.h @@ -17,11 +17,11 @@ #include #include -#include +#include class FileViewPart; class FileTreeViewWidgetImpl; -class TDevVersionControl; +class KDevVersionControl; /** * This is FileTree widget for listing files belonging to the project. It does feature: @@ -33,8 +33,8 @@ class TDevVersionControl; * Design notes * The class uses two different implementations (referred by m_impl data member): * - @see VCSFileTreeWidgetImpl for VCS support -* VCS support is detencted by the constructor looking for the @see TDevPlugin::versionControl() member: -* if the current VCS plug-in does offer a @see TDevVCSFileInfoProvider object than this will be used for +* VCS support is detencted by the constructor looking for the @see KDevPlugin::versionControl() member: +* if the current VCS plug-in does offer a @see KDevVCSFileInfoProvider object than this will be used for * querying about files' data. If neither VCS plugin nor valid info provider is found then the filetreeview * will fallback to the standard implementation * - @see StdFileTreeWidgetImpl for standard visualization, just like the KFileTreeView @@ -49,7 +49,7 @@ class FileTreeWidget : public KFileTreeView Q_OBJECT public: - FileTreeWidget( FileViewPart *part, TQWidget *parent, TDevVCSFileInfoProvider *infoProvider ); + FileTreeWidget( FileViewPart *part, TQWidget *parent, KDevVCSFileInfoProvider *infoProvider ); virtual ~FileTreeWidget(); void openDirectory(const TQString &dirName); @@ -60,7 +60,7 @@ public: FileViewPart *part() const { return m_part; } - //TDevVCSFileInfoProvider *vcsFileInfoProvider() const; + //KDevVCSFileInfoProvider *vcsFileInfoProvider() const; void applyHidePatterns( const TQString &hidePatterns ); TQString hidePatterns() const; @@ -85,7 +85,7 @@ private slots: private: bool matchesHidePattern(const TQString &fileName); - TDevVersionControl *versionControl() const; + KDevVersionControl *versionControl() const; TQStringList m_hidePatterns; /** diff --git a/parts/fileview/fileviewpart.cpp b/parts/fileview/fileviewpart.cpp index 7da44996..414cea52 100644 --- a/parts/fileview/fileviewpart.cpp +++ b/parts/fileview/fileviewpart.cpp @@ -23,19 +23,19 @@ #include #include #include -#include +#include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" #include "partwidget.h" #include "domutil.h" #include "filetreewidget.h" #include "vcscolorsconfigwidget.h" -#include "tdevversioncontrol.h" -#include "tdevplugininfo.h" +#include "kdevversioncontrol.h" +#include "kdevplugininfo.h" #define FILETREE_OPTIONS 1 @@ -49,20 +49,20 @@ VCSColors FileViewPart::vcsColors; // class factory /////////////////////////////////////////////////////////////////////////////// -typedef TDevGenericFactory FileViewFactory; -static const TDevPluginInfo data("tdevfileview"); -K_EXPORT_COMPONENT_FACTORY( libtdevfileview, FileViewFactory( data ) ) +typedef KDevGenericFactory FileViewFactory; +static const KDevPluginInfo data("kdevfileview"); +K_EXPORT_COMPONENT_FACTORY( libkdevfileview, FileViewFactory( data ) ) /////////////////////////////////////////////////////////////////////////////// // class FileTreeWidget /////////////////////////////////////////////////////////////////////////////// FileViewPart::FileViewPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "FileViewPart"), + : KDevPlugin(&data, parent, name ? name : "FileViewPart"), m_widget( 0 ) { setInstance( FileViewFactory::instance() ); - // setXMLFile("tdevfileview.rc"); + // setXMLFile("kdevfileview.rc"); _configProxy = new ConfigWidgetProxy( core() ); _configProxy->createProjectConfigPage( i18n("File Tree"), FILETREE_OPTIONS, info()->icon() ); @@ -153,9 +153,9 @@ void FileViewPart::insertConfigWidget( const KDialogBase* dlg, TQWidget * page, } } -TDevVersionControl *FileViewPart::versionControl() +KDevVersionControl *FileViewPart::versionControl() { - return extension("TDevelop/VersionControl"); + return extension("TDevelop/VersionControl"); } #include "fileviewpart.moc" diff --git a/parts/fileview/fileviewpart.h b/parts/fileview/fileviewpart.h index c1c8c776..68eb6a56 100644 --- a/parts/fileview/fileviewpart.h +++ b/parts/fileview/fileviewpart.h @@ -14,14 +14,14 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include "vcscolorsconfigwidget.h" class PartWidget; class KDialogBase; -class TDevVersionControl; +class KDevVersionControl; -class FileViewPart : public TDevPlugin +class FileViewPart : public KDevPlugin { Q_OBJECT @@ -33,7 +33,7 @@ public: //! Colors to use for VCS visual feed-back static VCSColors vcsColors; - TDevVersionControl *versionControl(); + KDevVersionControl *versionControl(); private slots: void insertConfigWidget( const KDialogBase* dlg, TQWidget * page, unsigned int ); diff --git a/parts/fileview/kdevfilegroups.desktop b/parts/fileview/kdevfilegroups.desktop new file mode 100644 index 00000000..bfa3e699 --- /dev/null +++ b/parts/fileview/kdevfilegroups.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Allows for grouping of project files according to filename patterns. +Comment[ca]=Permet l'agrupació de fitxers del projecte d'acord als patrons dels noms de fitxer. +Comment[da]=Tillader gruppering af projektfiler efter filnavnemønstre. +Comment[de]=Erlaubt die Gruppierung von Projektdateien nach Dateimustern. +Comment[el]=Επιτρέπει την ομαδοποίηση των αρχείων του έργου σύμφωνα με διάφορα μοτίβα. +Comment[es]=Permite la agrupación de archivos del proyecto de acuerdo a patrones en sus nombres. +Comment[et]=Võimaldab rühmitada projekti faile vastavalt failinimede mustritele. +Comment[eu]=Proiektu fitxategiak fitxategi-izen ereduen arabera taldekatzeko aukera ematen du. +Comment[fa]=اجازۀ گروه کردن پرونده‌های پروژه را طبق الگوهای نام پرونده می‌دهد. +Comment[fr]=Permet de grouper des fichiers projet en fonction des motifs de noms de fichier. +Comment[gl]=Permite o agrupamento dos arquivos do proxecto seguindo patróns nos seus nomes. +Comment[hi]=फ़ाइल-नाम पैटर्न के आधार पर परियोजना फ़ाइलों का समूह बनाना स्वीकारता है. +Comment[hu]=Lehetővé teszi projektfájlok csoportosítását fájlnévminta alapján +Comment[it]=Permette il raggruppamento dei file di progetto per schemi del nome file. +Comment[ja]=ファイル名のパターンによりプロジェクトファイルのグルーピングを可能にします。 +Comment[ms]=Membenarkan pengumpulan bagi fail projek mengikut corak namafail. +Comment[nds]=Maakt dat Sorteren vun Projektdateien na Dateinaam-Mustern mööglich. +Comment[ne]=फाइल नाम बाँन्की अनुसार परियोजना फाइलहरू समूहबद्ध गर्न अनुमति दिन्छ । +Comment[nl]=Groepeert projectbestanden op grond van patronen in bestandsnamen. +Comment[pl]=Umożliwia grupowanie plików projektu zgodnie z wzorcami nazw plików. +Comment[pt]=Permite o agrupamento de ficheiros de projecto, de acordo com padrões de nomes de ficheiros. +Comment[pt_BR]=Permite agrupar arquivos de projetos de acordo com padrões de nome de arquivo. +Comment[ru]=Позволяет группировать файлы в проекте согласно шаблонам имён. +Comment[sk]=Umožní zoskupenie projektových súborov podľa vzoru mien súborov. +Comment[sr]=Дозвољава груписање пројектних фајлова према облицима имена фајлова. +Comment[sr@Latn]=Dozvoljava grupisanje projektnih fajlova prema oblicima imena fajlova. +Comment[sv]=Tillåter att projektfiler grupperas enligt filnamnsmönster. +Comment[ta]=திட்ட பணிகோப்புகளை கோப்பின் பெயர் அடிப்படையில் அதனை குழுவாக பிரிக்கும். +Comment[tg]=Барои файлҳои дар номҳои қолиб имкон медиҳад. +Comment[tr]=Dosya adı desenlerine göre proje dosyalarının gruplanmasını sağlar. +Comment[zh_CN]=允许你根据文件名模式规类工程文件。 +Comment[zh_TW]=允許專案檔案根據檔名樣式來分群組。 +Name=KDevFileGroups +Name[da]=TDevelop filgrupper +Name[de]=Dateigruppen-Komponente (TDevelop) +Name[hi]=के-डेव-फ़ाइल-ग्रुप्स +Name[nds]=TDevelop-Dateikoppeln +Name[pl]=KDevGrupyPlików +Name[sk]=KDev zoskupenie súborov +Name[sv]=TDevelop filgrupper +Name[ta]=KDev கோப்பு குழுக்கள் +Name[tg]=Гурӯҳҳои файли KDev +Name[zh_TW]=TDevelop 檔案群組 +GenericName=File Groups +GenericName[br]=Strolladoù a restroù +GenericName[ca]=Grups de fitxers +GenericName[da]=Filgrupper +GenericName[de]=Dateigruppen +GenericName[el]=Ομάδες αρχείων +GenericName[es]=Grupos de archivos +GenericName[et]=Failigrupid +GenericName[eu]=Fitxategi taldeak +GenericName[fa]=گروههای پرونده +GenericName[fr]=Groupes de fichiers +GenericName[gl]=Grupos de arquivos +GenericName[hi]=फ़ाइल समूह +GenericName[hu]=Fájlcsoportok +GenericName[it]=Gruppi file +GenericName[ja]=ファイルグループ +GenericName[ms]=Kumpulan Fail +GenericName[nds]=Dateikoppeln +GenericName[ne]=फाइल समूह +GenericName[nl]=Bestandsgroepen +GenericName[pl]=Grupy plików +GenericName[pt]=Grupos de Ficheiros +GenericName[pt_BR]=Grupos de Arquivo +GenericName[ru]=Группы файлов +GenericName[sk]=Zoskupenie súborov +GenericName[sl]=Skupine datotek +GenericName[sr]=Групе фајлова +GenericName[sr@Latn]=Grupe fajlova +GenericName[sv]=Filgrupper +GenericName[ta]=கோப்புக்குழுக்கள் +GenericName[tg]=Гурӯҳи файлҳо +GenericName[tr]=Dosya Grupları +GenericName[zh_CN]=文件分组 +GenericName[zh_TW]=檔案群組 +ServiceTypes=TDevelop/Plugin +Icon=attach +X-TDE-Library=libkdevfilegroups +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=ProjectFileGroupsManagement diff --git a/parts/fileview/kdevfileview.desktop b/parts/fileview/kdevfileview.desktop new file mode 100644 index 00000000..6a702e1b --- /dev/null +++ b/parts/fileview/kdevfileview.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a way of navigating and interacting with the source files of the current project. +Comment[ca]=Proporciona un mètode de navegació i interacció amb els fitxers de codi font del projecte actual. +Comment[da]=Sørger for en måde at navigere og interagere med kildefiler for dette projekt. +Comment[de]=Bietet Funktionalität zur Navigation und zum Umgang mit den Quelltexten des aktuellen Projektes. +Comment[el]=Προσφέρει μια μέθοδο πλοήγησης και αλληλεπίδρασης με τα αρχεία πηγαίου κώδικα του τρέχοντος έργου. +Comment[es]=Proporciona un método de navegación e interacción con los archivos de código fuente del proyecto actual. +Comment[et]=Võimaldab aktiivse projekti lähtekoodifailide vahel liikuda ja neis üht-teist ette võtta. +Comment[eu]=Uneko proiektuko itruburu fitxategiekin lan egiteko eta hauen artean nabigatzeko aukera ematen du. +Comment[fa]=راهی برای ناوش و تعامل با پرونده‌های منبع پروژۀ جاری را فراهم می‌کند. +Comment[fr]=Fournit un moyen de naviguer et d'interagir avec les fichiers source du projet actuel. +Comment[gl]=Proporciona unha maneira de navegar e interactuar cos ficheiros fonte do proxecto actual. +Comment[hu]=Lehetővé teszi az aktuális projekthez tartozó forrásfájlok áttekintését, kezelését +Comment[it]=Offre un modo per navigare e interagire con il file sorgente del progetto attuale. +Comment[ja]=現在のプロジェクトのソースファイルでナビゲーションおよび対話する方法を提供します。 +Comment[ms]=Menyediakan cara untuk pandu arah dan berinteraksi dengan fail sumber bagi projek semasa. +Comment[nds]=Stellt Ünnerstütten bi't Stüern binnen un för't Hanteren vun de Borndateien vun't aktuelle Projekt praat. +Comment[ne]=हालको परियोजनाको स्रोत फाइलसँग नेभिगेटिङ र अन्तरक्रिया गर्ने तरिका प्रदान गर्दछ । +Comment[nl]=Handig bladeren en zoeken in de broncode-bestanden van het huidige project. +Comment[pl]=Umożliwia metodę nawigacji i interacji z plikami źródłowymi bieżącego projektu. +Comment[pt]=Oferece uma forma de navegar e de interagir com os ficheiros de código do projecto actual. +Comment[pt_BR]=Fornece uma maneira de navegar e interagir com arquivos fonte do projeto atual. +Comment[ru]=Предоставляет способ навигации и взаимодействия с исходными файлами в каталоге текущего проекта. +Comment[sk]=Umožní navigáciu a interakciu so zdrojovými súbormi v aktálnom projekte. +Comment[sr]=Обезбеђује начин навигације и рада са фајловима изворног кôда текућег пројекта. +Comment[sr@Latn]=Obezbeđuje način navigacije i rada sa fajlovima izvornog kôda tekućeg projekta. +Comment[sv]=Erbjuder ett sätt att navigera och arbeta med källkodsfilerna i det aktuella projektet. +Comment[ta]=நடப்பு திட்ட பணியில் உள்ள மூல கோப்பிற்கு வழி செலுத்த மற்றும் உறையாட இது வழி செலுத்தும். +Comment[tg]=Тариқи навигатсияро ва ҳангоми ҳамкорӣ намудан бо файлҳои берунии дар каталоги лоиҳаи ҷорӣ имкон медиҳад. +Comment[tr]=Geçerli projenin kaynak dosyalarında gezinme ve onlarla etkileşime geçme yolu sunar. +Comment[zh_CN]=提供当前工程源文件的浏览和相互关系。 +Comment[zh_TW]=提供目前專案的程式源碼檔的導覽與互動。 +Name=KDevFileView +Name[da]=TDevelop filvisning +Name[de]=Dateibaum (TDevelop) +Name[hi]=के-डेव-फ़ाइल-व्यू +Name[nds]=TDevelop-Dateiboom +Name[pl]=KDevWidokPliku +Name[sk]=KDev pohľad na súbor +Name[sv]=TDevelop filvisning +Name[ta]=KDev கோப்பு காட்சி +Name[tg]=Намоиши файл KDev +Name[zh_TW]=TDevelop 檔案檢視 +GenericName=File Tree +GenericName[br]=Gwezenn restr +GenericName[ca]=Arbre de fitxers +GenericName[da]=Filtræ +GenericName[de]=Dateibaum +GenericName[el]=Δέντρο αρχείων +GenericName[es]=Árbol de archivos +GenericName[et]=Failipuu +GenericName[eu]=Fitxategi zuhaitza +GenericName[fa]=درخت پرونده +GenericName[fr]=Arborescence de fichiers +GenericName[gl]=Árbore de arquivos +GenericName[hi]=फ़ाइल ट्री +GenericName[hu]=Fájl-fa +GenericName[it]=Albero file +GenericName[ja]=ファイルツリー +GenericName[ms]=Pepohon Fail +GenericName[nds]=Dateiboom +GenericName[ne]=फाइल ट्रि +GenericName[nl]=Bestandsboomstructuur +GenericName[pl]=Drzewo plików +GenericName[pt]=Árvore de Ficheiros +GenericName[pt_BR]=Árvore de Arquivo +GenericName[ru]=Дерево файлов +GenericName[sk]=Strom súborov +GenericName[sl]=Datotečno drevo +GenericName[sr]=Дрво фајлова +GenericName[sr@Latn]=Drvo fajlova +GenericName[sv]=Filträd +GenericName[ta]=கோப்பு மரம் +GenericName[tg]=Дарахти файлҳо +GenericName[tr]=Dosya Ağacı +GenericName[zh_CN]=文件树 +GenericName[zh_TW]=檔案樹 +ServiceTypes=TDevelop/Plugin +Icon=folder +X-TDE-Library=libkdevfileview +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=ProjectFileManagement diff --git a/parts/fileview/partwidget.cpp b/parts/fileview/partwidget.cpp index 49cfe7d5..bf68de83 100644 --- a/parts/fileview/partwidget.cpp +++ b/parts/fileview/partwidget.cpp @@ -22,10 +22,10 @@ #include #include -#include "tdevversioncontrol.h" -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" +#include "kdevversioncontrol.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" #include "fileviewpart.h" #include "filetreewidget.h" @@ -40,7 +40,7 @@ PartWidget::PartWidget( FileViewPart *part, TQWidget *parent ) { Q_ASSERT( part && parent ); - TDevVCSFileInfoProvider *infoProvider = 0; + KDevVCSFileInfoProvider *infoProvider = 0; if (part && part->versionControl() && part->versionControl()->fileInfoProvider()) infoProvider = part->versionControl()->fileInfoProvider(); diff --git a/parts/fileview/tdevfilegroups.desktop b/parts/fileview/tdevfilegroups.desktop deleted file mode 100644 index 4c04c274..00000000 --- a/parts/fileview/tdevfilegroups.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Allows for grouping of project files according to filename patterns. -Comment[ca]=Permet l'agrupació de fitxers del projecte d'acord als patrons dels noms de fitxer. -Comment[da]=Tillader gruppering af projektfiler efter filnavnemønstre. -Comment[de]=Erlaubt die Gruppierung von Projektdateien nach Dateimustern. -Comment[el]=Επιτρέπει την ομαδοποίηση των αρχείων του έργου σύμφωνα με διάφορα μοτίβα. -Comment[es]=Permite la agrupación de archivos del proyecto de acuerdo a patrones en sus nombres. -Comment[et]=Võimaldab rühmitada projekti faile vastavalt failinimede mustritele. -Comment[eu]=Proiektu fitxategiak fitxategi-izen ereduen arabera taldekatzeko aukera ematen du. -Comment[fa]=اجازۀ گروه کردن پرونده‌های پروژه را طبق الگوهای نام پرونده می‌دهد. -Comment[fr]=Permet de grouper des fichiers projet en fonction des motifs de noms de fichier. -Comment[gl]=Permite o agrupamento dos arquivos do proxecto seguindo patróns nos seus nomes. -Comment[hi]=फ़ाइल-नाम पैटर्न के आधार पर परियोजना फ़ाइलों का समूह बनाना स्वीकारता है. -Comment[hu]=Lehetővé teszi projektfájlok csoportosítását fájlnévminta alapján -Comment[it]=Permette il raggruppamento dei file di progetto per schemi del nome file. -Comment[ja]=ファイル名のパターンによりプロジェクトファイルのグルーピングを可能にします。 -Comment[ms]=Membenarkan pengumpulan bagi fail projek mengikut corak namafail. -Comment[nds]=Maakt dat Sorteren vun Projektdateien na Dateinaam-Mustern mööglich. -Comment[ne]=फाइल नाम बाँन्की अनुसार परियोजना फाइलहरू समूहबद्ध गर्न अनुमति दिन्छ । -Comment[nl]=Groepeert projectbestanden op grond van patronen in bestandsnamen. -Comment[pl]=Umożliwia grupowanie plików projektu zgodnie z wzorcami nazw plików. -Comment[pt]=Permite o agrupamento de ficheiros de projecto, de acordo com padrões de nomes de ficheiros. -Comment[pt_BR]=Permite agrupar arquivos de projetos de acordo com padrões de nome de arquivo. -Comment[ru]=Позволяет группировать файлы в проекте согласно шаблонам имён. -Comment[sk]=Umožní zoskupenie projektových súborov podľa vzoru mien súborov. -Comment[sr]=Дозвољава груписање пројектних фајлова према облицима имена фајлова. -Comment[sr@Latn]=Dozvoljava grupisanje projektnih fajlova prema oblicima imena fajlova. -Comment[sv]=Tillåter att projektfiler grupperas enligt filnamnsmönster. -Comment[ta]=திட்ட பணிகோப்புகளை கோப்பின் பெயர் அடிப்படையில் அதனை குழுவாக பிரிக்கும். -Comment[tg]=Барои файлҳои дар номҳои қолиб имкон медиҳад. -Comment[tr]=Dosya adı desenlerine göre proje dosyalarının gruplanmasını sağlar. -Comment[zh_CN]=允许你根据文件名模式规类工程文件。 -Comment[zh_TW]=允許專案檔案根據檔名樣式來分群組。 -Name=TDevFileGroups -Name[da]=TDevelop filgrupper -Name[de]=Dateigruppen-Komponente (TDevelop) -Name[hi]=के-डेव-फ़ाइल-ग्रुप्स -Name[nds]=TDevelop-Dateikoppeln -Name[pl]=KDevGrupyPlików -Name[sk]=KDev zoskupenie súborov -Name[sv]=TDevelop filgrupper -Name[ta]=KDev கோப்பு குழுக்கள் -Name[tg]=Гурӯҳҳои файли KDev -Name[zh_TW]=TDevelop 檔案群組 -GenericName=File Groups -GenericName[br]=Strolladoù a restroù -GenericName[ca]=Grups de fitxers -GenericName[da]=Filgrupper -GenericName[de]=Dateigruppen -GenericName[el]=Ομάδες αρχείων -GenericName[es]=Grupos de archivos -GenericName[et]=Failigrupid -GenericName[eu]=Fitxategi taldeak -GenericName[fa]=گروههای پرونده -GenericName[fr]=Groupes de fichiers -GenericName[gl]=Grupos de arquivos -GenericName[hi]=फ़ाइल समूह -GenericName[hu]=Fájlcsoportok -GenericName[it]=Gruppi file -GenericName[ja]=ファイルグループ -GenericName[ms]=Kumpulan Fail -GenericName[nds]=Dateikoppeln -GenericName[ne]=फाइल समूह -GenericName[nl]=Bestandsgroepen -GenericName[pl]=Grupy plików -GenericName[pt]=Grupos de Ficheiros -GenericName[pt_BR]=Grupos de Arquivo -GenericName[ru]=Группы файлов -GenericName[sk]=Zoskupenie súborov -GenericName[sl]=Skupine datotek -GenericName[sr]=Групе фајлова -GenericName[sr@Latn]=Grupe fajlova -GenericName[sv]=Filgrupper -GenericName[ta]=கோப்புக்குழுக்கள் -GenericName[tg]=Гурӯҳи файлҳо -GenericName[tr]=Dosya Grupları -GenericName[zh_CN]=文件分组 -GenericName[zh_TW]=檔案群組 -ServiceTypes=TDevelop/Plugin -Icon=attach -X-TDE-Library=libtdevfilegroups -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=ProjectFileGroupsManagement diff --git a/parts/fileview/tdevfileview.desktop b/parts/fileview/tdevfileview.desktop deleted file mode 100644 index b589b5ef..00000000 --- a/parts/fileview/tdevfileview.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a way of navigating and interacting with the source files of the current project. -Comment[ca]=Proporciona un mètode de navegació i interacció amb els fitxers de codi font del projecte actual. -Comment[da]=Sørger for en måde at navigere og interagere med kildefiler for dette projekt. -Comment[de]=Bietet Funktionalität zur Navigation und zum Umgang mit den Quelltexten des aktuellen Projektes. -Comment[el]=Προσφέρει μια μέθοδο πλοήγησης και αλληλεπίδρασης με τα αρχεία πηγαίου κώδικα του τρέχοντος έργου. -Comment[es]=Proporciona un método de navegación e interacción con los archivos de código fuente del proyecto actual. -Comment[et]=Võimaldab aktiivse projekti lähtekoodifailide vahel liikuda ja neis üht-teist ette võtta. -Comment[eu]=Uneko proiektuko itruburu fitxategiekin lan egiteko eta hauen artean nabigatzeko aukera ematen du. -Comment[fa]=راهی برای ناوش و تعامل با پرونده‌های منبع پروژۀ جاری را فراهم می‌کند. -Comment[fr]=Fournit un moyen de naviguer et d'interagir avec les fichiers source du projet actuel. -Comment[gl]=Proporciona unha maneira de navegar e interactuar cos ficheiros fonte do proxecto actual. -Comment[hu]=Lehetővé teszi az aktuális projekthez tartozó forrásfájlok áttekintését, kezelését -Comment[it]=Offre un modo per navigare e interagire con il file sorgente del progetto attuale. -Comment[ja]=現在のプロジェクトのソースファイルでナビゲーションおよび対話する方法を提供します。 -Comment[ms]=Menyediakan cara untuk pandu arah dan berinteraksi dengan fail sumber bagi projek semasa. -Comment[nds]=Stellt Ünnerstütten bi't Stüern binnen un för't Hanteren vun de Borndateien vun't aktuelle Projekt praat. -Comment[ne]=हालको परियोजनाको स्रोत फाइलसँग नेभिगेटिङ र अन्तरक्रिया गर्ने तरिका प्रदान गर्दछ । -Comment[nl]=Handig bladeren en zoeken in de broncode-bestanden van het huidige project. -Comment[pl]=Umożliwia metodę nawigacji i interacji z plikami źródłowymi bieżącego projektu. -Comment[pt]=Oferece uma forma de navegar e de interagir com os ficheiros de código do projecto actual. -Comment[pt_BR]=Fornece uma maneira de navegar e interagir com arquivos fonte do projeto atual. -Comment[ru]=Предоставляет способ навигации и взаимодействия с исходными файлами в каталоге текущего проекта. -Comment[sk]=Umožní navigáciu a interakciu so zdrojovými súbormi v aktálnom projekte. -Comment[sr]=Обезбеђује начин навигације и рада са фајловима изворног кôда текућег пројекта. -Comment[sr@Latn]=Obezbeđuje način navigacije i rada sa fajlovima izvornog kôda tekućeg projekta. -Comment[sv]=Erbjuder ett sätt att navigera och arbeta med källkodsfilerna i det aktuella projektet. -Comment[ta]=நடப்பு திட்ட பணியில் உள்ள மூல கோப்பிற்கு வழி செலுத்த மற்றும் உறையாட இது வழி செலுத்தும். -Comment[tg]=Тариқи навигатсияро ва ҳангоми ҳамкорӣ намудан бо файлҳои берунии дар каталоги лоиҳаи ҷорӣ имкон медиҳад. -Comment[tr]=Geçerli projenin kaynak dosyalarında gezinme ve onlarla etkileşime geçme yolu sunar. -Comment[zh_CN]=提供当前工程源文件的浏览和相互关系。 -Comment[zh_TW]=提供目前專案的程式源碼檔的導覽與互動。 -Name=TDevFileView -Name[da]=TDevelop filvisning -Name[de]=Dateibaum (TDevelop) -Name[hi]=के-डेव-फ़ाइल-व्यू -Name[nds]=TDevelop-Dateiboom -Name[pl]=KDevWidokPliku -Name[sk]=KDev pohľad na súbor -Name[sv]=TDevelop filvisning -Name[ta]=KDev கோப்பு காட்சி -Name[tg]=Намоиши файл KDev -Name[zh_TW]=TDevelop 檔案檢視 -GenericName=File Tree -GenericName[br]=Gwezenn restr -GenericName[ca]=Arbre de fitxers -GenericName[da]=Filtræ -GenericName[de]=Dateibaum -GenericName[el]=Δέντρο αρχείων -GenericName[es]=Árbol de archivos -GenericName[et]=Failipuu -GenericName[eu]=Fitxategi zuhaitza -GenericName[fa]=درخت پرونده -GenericName[fr]=Arborescence de fichiers -GenericName[gl]=Árbore de arquivos -GenericName[hi]=फ़ाइल ट्री -GenericName[hu]=Fájl-fa -GenericName[it]=Albero file -GenericName[ja]=ファイルツリー -GenericName[ms]=Pepohon Fail -GenericName[nds]=Dateiboom -GenericName[ne]=फाइल ट्रि -GenericName[nl]=Bestandsboomstructuur -GenericName[pl]=Drzewo plików -GenericName[pt]=Árvore de Ficheiros -GenericName[pt_BR]=Árvore de Arquivo -GenericName[ru]=Дерево файлов -GenericName[sk]=Strom súborov -GenericName[sl]=Datotečno drevo -GenericName[sr]=Дрво фајлова -GenericName[sr@Latn]=Drvo fajlova -GenericName[sv]=Filträd -GenericName[ta]=கோப்பு மரம் -GenericName[tg]=Дарахти файлҳо -GenericName[tr]=Dosya Ağacı -GenericName[zh_CN]=文件树 -GenericName[zh_TW]=檔案樹 -ServiceTypes=TDevelop/Plugin -Icon=folder -X-TDE-Library=libtdevfileview -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=ProjectFileManagement diff --git a/parts/fileview/vcsfiletreewidgetimpl.cpp b/parts/fileview/vcsfiletreewidgetimpl.cpp index e08068db..450a6a58 100644 --- a/parts/fileview/vcsfiletreewidgetimpl.cpp +++ b/parts/fileview/vcsfiletreewidgetimpl.cpp @@ -18,7 +18,7 @@ #include #include -//#include +//#include #include #include @@ -127,13 +127,13 @@ class VCSFileTreeBranchItem : public filetreeview::FileTreeBranchItem { public: VCSFileTreeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix, - TDevVCSFileInfoProvider *vcsInfoProvider ) + KDevVCSFileInfoProvider *vcsInfoProvider ) : FileTreeBranchItem( view, url, name, pix ), m_vcsInfoProvider( vcsInfoProvider ) {} // virtual ~VCSFileTreeBranchItem() {} virtual KFileTreeViewItem* createTreeViewItem( KFileTreeViewItem* parent, KFileItem* fileItem ); private: - TDevVCSFileInfoProvider *m_vcsInfoProvider; + KDevVCSFileInfoProvider *m_vcsInfoProvider; }; /////////////////////////////////////////////////////////////////////////////// @@ -169,20 +169,20 @@ KFileTreeViewItem* VCSFileTreeBranchItem::createTreeViewItem( KFileTreeViewItem* class VCSBranchItemFactory : public filetreeview::BranchItemFactory { public: - VCSBranchItemFactory( TDevVCSFileInfoProvider *vcsInfoProvider ) : m_vcsInfoProvider( vcsInfoProvider ) {} + VCSBranchItemFactory( KDevVCSFileInfoProvider *vcsInfoProvider ) : m_vcsInfoProvider( vcsInfoProvider ) {} virtual filetreeview::FileTreeBranchItem *makeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix ) { return new VCSFileTreeBranchItem( view, url, name, pix, m_vcsInfoProvider ); } private: - TDevVCSFileInfoProvider *m_vcsInfoProvider; + KDevVCSFileInfoProvider *m_vcsInfoProvider; }; /////////////////////////////////////////////////////////////////////////////// // class VCSFileTreeWidgetImpl /////////////////////////////////////////////////////////////////////////////// -VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *parent, TDevVCSFileInfoProvider *infoProvider ) +VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *parent, KDevVCSFileInfoProvider *infoProvider ) : FileTreeViewWidgetImpl( parent, "vcsfiletreewidgetimpl" ), m_actionToggleShowVCSFields( 0 ), m_actionSyncWithRepository( 0 ), m_vcsInfoProvider( infoProvider ), m_isSyncingWithRepository( false ), m_vcsStatusRequestedItem( 0 ) @@ -216,7 +216,7 @@ VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *parent, TDevVCSFil m_actionSyncWithRepository->setWhatsThis( aboutAction ); TQDomDocument &dom = projectDom(); - m_actionToggleShowVCSFields->setChecked( DomUtil::readBoolEntry(dom, "/tdevfileview/tree/showvcsfields") ); + m_actionToggleShowVCSFields->setChecked( DomUtil::readBoolEntry(dom, "/kdevfileview/tree/showvcsfields") ); slotToggleShowVCSFields( showVCSFields() ); // show or hide fields depending on read settings connect( parent, TQT_SIGNAL(expanded(TQListViewItem*)), this, TQT_SLOT(slotDirectoryExpanded(TQListViewItem*))); } @@ -228,7 +228,7 @@ VCSFileTreeWidgetImpl::~VCSFileTreeWidgetImpl() kdDebug(9017) << "VCSFileTreeWidgetImpl::~VCSFileTreeWidgetImpl()" << endl; TQDomDocument &dom = projectDom(); - DomUtil::writeBoolEntry( dom, "/tdevfileview/tree/showvcsfields", showVCSFields() ); + DomUtil::writeBoolEntry( dom, "/kdevfileview/tree/showvcsfields", showVCSFields() ); } /////////////////////////////////////////////////////////////////////////////// diff --git a/parts/fileview/vcsfiletreewidgetimpl.h b/parts/fileview/vcsfiletreewidgetimpl.h index 928fe544..00a38b32 100644 --- a/parts/fileview/vcsfiletreewidgetimpl.h +++ b/parts/fileview/vcsfiletreewidgetimpl.h @@ -14,7 +14,7 @@ #include "filetreeviewwidgetimpl.h" -class TDevVCSFileInfoProvider; +class KDevVCSFileInfoProvider; class TDEAction; class TDEToggleAction; @@ -27,7 +27,7 @@ class VCSFileTreeWidgetImpl : public FileTreeViewWidgetImpl Q_OBJECT public: - VCSFileTreeWidgetImpl( FileTreeWidget *parent, TDevVCSFileInfoProvider *infoProvider ); + VCSFileTreeWidgetImpl( FileTreeWidget *parent, KDevVCSFileInfoProvider *infoProvider ); virtual ~VCSFileTreeWidgetImpl(); /* @@ -44,7 +44,7 @@ private slots: //! show/hide the header and the additional fields (status and versions) void slotToggleShowVCSFields( bool checked ); //! start a sync operation with the remote repository: this may take a while so we use - //! the async interface provided by the TDevVCSFileInfoProvider interface + //! the async interface provided by the KDevVCSFileInfoProvider interface void slotSyncWithRepository(); //! when the requested info are ready the infoProvider object will be so kind the //! to give them to us in a ready-to-use format: we'll use that info to update all @@ -58,7 +58,7 @@ private: TDEToggleAction *m_actionToggleShowVCSFields; TDEAction *m_actionSyncWithRepository; - TDevVCSFileInfoProvider *m_vcsInfoProvider; + KDevVCSFileInfoProvider *m_vcsInfoProvider; //! We use this guard to avoid enabling the "reload tree" action when performing //! syncing with remote repositories. bool m_isSyncingWithRepository; diff --git a/parts/filter/CMakeLists.txt b/parts/filter/CMakeLists.txt index 7665f6f1..095144d3 100644 --- a/parts/filter/CMakeLists.txt +++ b/parts/filter/CMakeLists.txt @@ -26,16 +26,16 @@ link_directories( ##### other data ################################ -install( FILES tdevfilter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevfilter.rc DESTINATION ${DATA_INSTALL_DIR}/tdevfilter ) +install( FILES kdevfilter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevfilter.rc DESTINATION ${DATA_INSTALL_DIR}/kdevfilter ) -##### libtdevfilter (module) #################### +##### libkdevfilter (module) #################### -tde_add_kpart( libtdevfilter AUTOMOC +tde_add_kpart( libkdevfilter AUTOMOC SOURCES filterpart.cpp shellfilterdlg.cpp shellinsertdlg.cpp - tdevfilterIface.cpp tdevfilterIface.skel + kdevfilterIface.cpp kdevfilterIface.skel LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/filter/Makefile.am b/parts/filter/Makefile.am index 4a3fe722..f68b0cf6 100644 --- a/parts/filter/Makefile.am +++ b/parts/filter/Makefile.am @@ -2,16 +2,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevfilter.la -libtdevfilter_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfilter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfilter.la +libkdevfilter_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfilter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfilter_la_SOURCES = filterpart.cpp shellfilterdlg.cpp shellinsertdlg.cpp tdevfilterIface.cpp tdevfilterIface.skel +libkdevfilter_la_SOURCES = filterpart.cpp shellfilterdlg.cpp shellinsertdlg.cpp kdevfilterIface.cpp kdevfilterIface.skel METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfilter.desktop +service_DATA = kdevfilter.desktop -rcdir = $(kde_datadir)/tdevfilter -rc_DATA = tdevfilter.rc +rcdir = $(kde_datadir)/kdevfilter +rc_DATA = kdevfilter.rc diff --git a/parts/filter/filterpart.cpp b/parts/filter/filterpart.cpp index 3ee5029a..5ebd265e 100644 --- a/parts/filter/filterpart.cpp +++ b/parts/filter/filterpart.cpp @@ -19,21 +19,21 @@ #include #include -#include "tdevcore.h" -#include "tdevpartcontroller.h" -#include "tdevplugininfo.h" +#include "kdevcore.h" +#include "kdevpartcontroller.h" +#include "kdevplugininfo.h" #include "shellfilterdlg.h" #include "shellinsertdlg.h" -#include "tdevfilterIface.h" +#include "kdevfilterIface.h" -static const TDevPluginInfo data("tdevfilter"); -K_EXPORT_COMPONENT_FACTORY( libtdevfilter, FilterFactory( data ) ) +static const KDevPluginInfo data("kdevfilter"); +K_EXPORT_COMPONENT_FACTORY( libkdevfilter, FilterFactory( data ) ) FilterPart::FilterPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "FilterPart") + : KDevPlugin(&data, parent, name ? name : "FilterPart") { setInstance(FilterFactory::instance()); - setXMLFile("tdevfilter.rc"); + setXMLFile("kdevfilter.rc"); TDEAction *action; @@ -52,7 +52,7 @@ FilterPart::FilterPart(TQObject *parent, const char *name, const TQStringList &) m_insertDialog = 0; m_filterDialog = 0; - new TDevFilterIface( this ); + new KDevFilterIface( this ); // (void) dcopClient(); } diff --git a/parts/filter/filterpart.h b/parts/filter/filterpart.h index b1eac334..b8322425 100644 --- a/parts/filter/filterpart.h +++ b/parts/filter/filterpart.h @@ -12,14 +12,14 @@ #ifndef _FILTERPART_H_ #define _FILTERPART_H_ -#include -#include "tdevplugin.h" +#include +#include "kdevplugin.h" class ShellInsertDialog; class ShellFilterDialog; -class FilterPart : public TDevPlugin +class FilterPart : public KDevPlugin { Q_OBJECT @@ -37,6 +37,6 @@ private: ShellFilterDialog *m_filterDialog; }; -typedef TDevGenericFactory FilterFactory; +typedef KDevGenericFactory FilterFactory; #endif diff --git a/parts/filter/kdevfilter.desktop b/parts/filter/kdevfilter.desktop new file mode 100644 index 00000000..1ce8122a --- /dev/null +++ b/parts/filter/kdevfilter.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a way of manipulating editor text using commandline tools. Appears in the Tools menu. +Comment[ca]=Proporciona un mètode per a manipular text a l'editor emprant eines de la línia de comandaments. Apareix al menú Eines. +Comment[da]=Sørger for en måde at manipulere editortekst ved brug af kommandolinje værktøjer. Viser sig i værktøjsmenuen. +Comment[de]=Ermöglicht die Bearbeitung von Editorinhalten mit Konsolenanwendungen. Erscheint im Menü Werkzeuge. +Comment[el]=Προσφέρει μια μέθοδο διαχείρισης κειμένου επεξεργαστή χρησιμοποιώντας εργαλεία γραμμής εντολών. Εμφανίζεται στο μενού εργαλείων. +Comment[es]=Proporciona un método para manipular texto del editor utilizando herramientas de la línea de órdenes. Aparece en el menú Herramientas. +Comment[et]=Võimaldab käsureavahendite abil käsitleda redaktoris olevat teksti. Kättesaadav tööriistade menüüst. +Comment[eu]=Komando-lerro tresnak erabiliz editore testua manipulatzeko aukera ematen dizu. Tresnak menuan dago. +Comment[fa]=راهی برای دستکاری متن ویرایشگر، با استفاده از ابزار خط فرمان فراهم می‌کند. در گزینگان ابزار ظاهر می‌شود. +Comment[fr]=Fournit un moyen de manipuler le texte de l'éditeur à l'aide d'outils en ligne de commande. Cette fonction apparaît dans le menu « Outils ». +Comment[gl]=Proporciona unha maneira para manipular o texto do editor usando ferramentas da liña de comandos. Aparece no menú Ferramentas. +Comment[hu]=Lehetővé teszi a szerkesztett szövegek kezelését parancssoros programokból (az Eszközök menüből érhető el) +Comment[it]=Offre un modo per manipolare il testo utilizzando strumenti a riga di comando. Appare nel menu degli strumenti. +Comment[ja]=コマンドラインツールを使用して、エディタテキストを操作する方法を提供します。ツールメニューに現れます。 +Comment[ms]=Menyediakan cara untuk memanipulasi teks penyunting menggunakan alatan arahan baris. Muncul didalam menu Alatan. +Comment[nds]=Stellt dat Ännern vun Editorinholden mit Befehlsreeg-Warktüüch praat. Dukt in't Menü "Warktüüch" op. +Comment[ne]=आदेशरेखा उपकरण प्रयोग गरेर सम्पादक चलाउने तरिका प्रदान गर्दछ । +Comment[nl]=Maakt het mogelijk de tekstinhoud van de editor met externe commandoregeltools te bewerken. Verschijnt in het menu Gereedschap. +Comment[pl]=Umożliwia manipulowanie tekstem w edytorze za pomocą narzędzi linii komend. Pojawia się w menu Narzędzia. +Comment[pt]=Oferece uma forma de manipular o texto do edito com as ferramentas da linha de comandos. Aparece no menu de Ferramentas. +Comment[pt_BR]=Fornece uma maneira de manipular o editor de texto usando ferramentas de linha de comando. Aparece no menu Ferramentas. +Comment[ru]=Предоставляет функции работы с текстом в редакторе с использованием утилит командной строки. +Comment[sk]=Umožní manipuláciu s textom editora s použitím nástrojov príkazového riadku. Objaví sa v menu Nástroje. +Comment[sr]=Обезбеђује начин манипулисања текстом уређивача коришћењем алата командне линије. Појављује се у менију „Алати“. +Comment[sr@Latn]=Obezbeđuje način manipulisanja tekstom uređivača korišćenjem alata komandne linije. Pojavljuje se u meniju „Alati“. +Comment[sv]=Erbjuder ett sätt att behandla editortext med kommandoradsverktyg. Finns i verktygsmenyn. +Comment[ta]=கட்டளை கருவி உபயோகித்து தொகுப்பான் உறைகளை கையாள இது வழி அளிக்கும். கருவிப்பட்டியலில் இது தோன்றும் +Comment[tg]=Вазифаи корҳо бо матнҳои дар муҳаррир буда бо истифодаи фармони сатр гузориш менамояд. +Comment[tr]=Komut satırı araçlarını kullanarak düzenleyici metni işlemek için bir yol sunar. Araçlar menüsünde durur. +Comment[zh_CN]=使用命令行工具操作编辑器文字。显示在工具菜单中。 +Comment[zh_TW]=提供使用命令列工具操作編輯器文字的方法。會出現在工具選單中。 +Name=KDevFilter +Name[da]=TDevelop filter +Name[de]=Filter (TDevelop) +Name[hi]=के-डेव-फ़िल्टर +Name[nds]=TDevelop-Filter +Name[pl]=KDevFiltr +Name[sk]=KDev filter +Name[sv]=TDevelop filter +Name[ta]=KDev வடிகட்டல் +Name[tg]=Филтри KDev +Name[zh_TW]=TDevelop 過濾器 +GenericName=Shell Filtering and Insertion +GenericName[ca]=Inserció i filtrat de la línia de comandaments +GenericName[da]=Skal-filtrering og indsætning +GenericName[de]=Filtern und Einfügen über Shell-Befehle +GenericName[el]=Εισαγωγή και φιλτράρισμα κελύφους +GenericName[es]=Inserción y filtrado en línea de órdenes +GenericName[et]=Shellifiltrid ja lisamine +GenericName[eu]=Shell iragazte eta txertatzea +GenericName[fa]=پالایش و درج پوسته +GenericName[fr]=Filtrage et insertion dans le shell +GenericName[gl]=Inserción e filtrado shell +GenericName[hi]=शेल फ़िल्टरिंग तथा प्रविष्टि +GenericName[hu]=Szűrés és beszúrás +GenericName[it]=Inserimento e filtraggio da shell +GenericName[ja]=シェルフィルタリングと挿入 +GenericName[nds]=Filtern un Infögen mit Konsool-Befehlen +GenericName[ne]=शेल फिल्टरिङ र घुसाइ +GenericName[nl]=Filteren en invoegen met shellcommando's +GenericName[pl]=Filtrowanie i wstawianie za pomocą powłoki +GenericName[pt]=Filtragem e Inserção por 'Shell' +GenericName[pt_BR]=Shell de Filtro e Inserção +GenericName[ru]=Фильтрация и вставка с помощью команд оболочки +GenericName[sk]=Shell filtrovanie a vkladanie +GenericName[sl]=Filtriranje lupine in vstavljanje +GenericName[sr]=Филтрирање и убацивање шкољке +GenericName[sr@Latn]=Filtriranje i ubacivanje školjke +GenericName[sv]=Skalfiltrering och infogning +GenericName[ta]=உறையகத்தை வடிகட்ட மற்றும் சேர்க்க +GenericName[tg]=Бо пӯсти фармон филтр ва мондан +GenericName[tr]=Kabuk filtreleme ve Ekleme +GenericName[zh_CN]=Shell 过滤和插入 +GenericName[zh_TW]=Shell 過濾與插入 +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevfilter +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=OptionalCodeEditing diff --git a/parts/filter/kdevfilter.rc b/parts/filter/kdevfilter.rc new file mode 100644 index 00000000..6f7f9053 --- /dev/null +++ b/parts/filter/kdevfilter.rc @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/parts/filter/kdevfilterIface.cpp b/parts/filter/kdevfilterIface.cpp new file mode 100644 index 00000000..3df749a4 --- /dev/null +++ b/parts/filter/kdevfilterIface.cpp @@ -0,0 +1,35 @@ +// +// +// C++ Implementation: cpp +// +// Description: +// +// +// Author: KDevelop Authors , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include "kdevfilterIface.h" +#include "filterpart.h" + +KDevFilterIface::KDevFilterIface( FilterPart* part ) + : TQObject( part ), DCOPObject( "KDevFilter" ), m_part( part ) +{ +} + +KDevFilterIface::~KDevFilterIface() +{ +} + +void KDevFilterIface::shellInsert() +{ + m_part->slotShellInsert(); +} + +void KDevFilterIface::shellFilter() +{ + m_part->slotShellFilter(); +} + +#include "kdevfilterIface.moc" diff --git a/parts/filter/kdevfilterIface.h b/parts/filter/kdevfilterIface.h new file mode 100644 index 00000000..fae74022 --- /dev/null +++ b/parts/filter/kdevfilterIface.h @@ -0,0 +1,27 @@ + +#ifndef KDEVFILTERIFACE_H +#define KDEVFILTERIFACE_H + +#include +#include + +class FilterPart; + +class KDevFilterIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP +public: + KDevFilterIface( FilterPart* part ); + ~KDevFilterIface(); + +k_dcop: + void shellInsert(); + void shellFilter(); + +private: + FilterPart* m_part; +}; + +#endif diff --git a/parts/filter/shellfilterdlg.cpp b/parts/filter/shellfilterdlg.cpp index 7d3d0ff5..a5100d5b 100644 --- a/parts/filter/shellfilterdlg.cpp +++ b/parts/filter/shellfilterdlg.cpp @@ -23,7 +23,7 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include "domutil.h" #include "filterpart.h" diff --git a/parts/filter/shellfilterdlg.h b/parts/filter/shellfilterdlg.h index cf9812ab..87657501 100644 --- a/parts/filter/shellfilterdlg.h +++ b/parts/filter/shellfilterdlg.h @@ -16,7 +16,7 @@ class TQComboBox; class TQPushButton; -class TDevPlugin; +class KDevPlugin; class TDEProcess; diff --git a/parts/filter/shellinsertdlg.cpp b/parts/filter/shellinsertdlg.cpp index f9d24c19..057e8121 100644 --- a/parts/filter/shellinsertdlg.cpp +++ b/parts/filter/shellinsertdlg.cpp @@ -24,7 +24,7 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include "domutil.h" #include "filterpart.h" diff --git a/parts/filter/shellinsertdlg.h b/parts/filter/shellinsertdlg.h index df3085a1..fda59678 100644 --- a/parts/filter/shellinsertdlg.h +++ b/parts/filter/shellinsertdlg.h @@ -16,7 +16,7 @@ class TQComboBox; class TQPushButton; -class TDevPlugin; +class KDevPlugin; class TDEProcess; diff --git a/parts/filter/tdevfilter.desktop b/parts/filter/tdevfilter.desktop deleted file mode 100644 index 36854737..00000000 --- a/parts/filter/tdevfilter.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a way of manipulating editor text using commandline tools. Appears in the Tools menu. -Comment[ca]=Proporciona un mètode per a manipular text a l'editor emprant eines de la línia de comandaments. Apareix al menú Eines. -Comment[da]=Sørger for en måde at manipulere editortekst ved brug af kommandolinje værktøjer. Viser sig i værktøjsmenuen. -Comment[de]=Ermöglicht die Bearbeitung von Editorinhalten mit Konsolenanwendungen. Erscheint im Menü Werkzeuge. -Comment[el]=Προσφέρει μια μέθοδο διαχείρισης κειμένου επεξεργαστή χρησιμοποιώντας εργαλεία γραμμής εντολών. Εμφανίζεται στο μενού εργαλείων. -Comment[es]=Proporciona un método para manipular texto del editor utilizando herramientas de la línea de órdenes. Aparece en el menú Herramientas. -Comment[et]=Võimaldab käsureavahendite abil käsitleda redaktoris olevat teksti. Kättesaadav tööriistade menüüst. -Comment[eu]=Komando-lerro tresnak erabiliz editore testua manipulatzeko aukera ematen dizu. Tresnak menuan dago. -Comment[fa]=راهی برای دستکاری متن ویرایشگر، با استفاده از ابزار خط فرمان فراهم می‌کند. در گزینگان ابزار ظاهر می‌شود. -Comment[fr]=Fournit un moyen de manipuler le texte de l'éditeur à l'aide d'outils en ligne de commande. Cette fonction apparaît dans le menu « Outils ». -Comment[gl]=Proporciona unha maneira para manipular o texto do editor usando ferramentas da liña de comandos. Aparece no menú Ferramentas. -Comment[hu]=Lehetővé teszi a szerkesztett szövegek kezelését parancssoros programokból (az Eszközök menüből érhető el) -Comment[it]=Offre un modo per manipolare il testo utilizzando strumenti a riga di comando. Appare nel menu degli strumenti. -Comment[ja]=コマンドラインツールを使用して、エディタテキストを操作する方法を提供します。ツールメニューに現れます。 -Comment[ms]=Menyediakan cara untuk memanipulasi teks penyunting menggunakan alatan arahan baris. Muncul didalam menu Alatan. -Comment[nds]=Stellt dat Ännern vun Editorinholden mit Befehlsreeg-Warktüüch praat. Dukt in't Menü "Warktüüch" op. -Comment[ne]=आदेशरेखा उपकरण प्रयोग गरेर सम्पादक चलाउने तरिका प्रदान गर्दछ । -Comment[nl]=Maakt het mogelijk de tekstinhoud van de editor met externe commandoregeltools te bewerken. Verschijnt in het menu Gereedschap. -Comment[pl]=Umożliwia manipulowanie tekstem w edytorze za pomocą narzędzi linii komend. Pojawia się w menu Narzędzia. -Comment[pt]=Oferece uma forma de manipular o texto do edito com as ferramentas da linha de comandos. Aparece no menu de Ferramentas. -Comment[pt_BR]=Fornece uma maneira de manipular o editor de texto usando ferramentas de linha de comando. Aparece no menu Ferramentas. -Comment[ru]=Предоставляет функции работы с текстом в редакторе с использованием утилит командной строки. -Comment[sk]=Umožní manipuláciu s textom editora s použitím nástrojov príkazového riadku. Objaví sa v menu Nástroje. -Comment[sr]=Обезбеђује начин манипулисања текстом уређивача коришћењем алата командне линије. Појављује се у менију „Алати“. -Comment[sr@Latn]=Obezbeđuje način manipulisanja tekstom uređivača korišćenjem alata komandne linije. Pojavljuje se u meniju „Alati“. -Comment[sv]=Erbjuder ett sätt att behandla editortext med kommandoradsverktyg. Finns i verktygsmenyn. -Comment[ta]=கட்டளை கருவி உபயோகித்து தொகுப்பான் உறைகளை கையாள இது வழி அளிக்கும். கருவிப்பட்டியலில் இது தோன்றும் -Comment[tg]=Вазифаи корҳо бо матнҳои дар муҳаррир буда бо истифодаи фармони сатр гузориш менамояд. -Comment[tr]=Komut satırı araçlarını kullanarak düzenleyici metni işlemek için bir yol sunar. Araçlar menüsünde durur. -Comment[zh_CN]=使用命令行工具操作编辑器文字。显示在工具菜单中。 -Comment[zh_TW]=提供使用命令列工具操作編輯器文字的方法。會出現在工具選單中。 -Name=TDevFilter -Name[da]=TDevelop filter -Name[de]=Filter (TDevelop) -Name[hi]=के-डेव-फ़िल्टर -Name[nds]=TDevelop-Filter -Name[pl]=KDevFiltr -Name[sk]=KDev filter -Name[sv]=TDevelop filter -Name[ta]=KDev வடிகட்டல் -Name[tg]=Филтри KDev -Name[zh_TW]=TDevelop 過濾器 -GenericName=Shell Filtering and Insertion -GenericName[ca]=Inserció i filtrat de la línia de comandaments -GenericName[da]=Skal-filtrering og indsætning -GenericName[de]=Filtern und Einfügen über Shell-Befehle -GenericName[el]=Εισαγωγή και φιλτράρισμα κελύφους -GenericName[es]=Inserción y filtrado en línea de órdenes -GenericName[et]=Shellifiltrid ja lisamine -GenericName[eu]=Shell iragazte eta txertatzea -GenericName[fa]=پالایش و درج پوسته -GenericName[fr]=Filtrage et insertion dans le shell -GenericName[gl]=Inserción e filtrado shell -GenericName[hi]=शेल फ़िल्टरिंग तथा प्रविष्टि -GenericName[hu]=Szűrés és beszúrás -GenericName[it]=Inserimento e filtraggio da shell -GenericName[ja]=シェルフィルタリングと挿入 -GenericName[nds]=Filtern un Infögen mit Konsool-Befehlen -GenericName[ne]=शेल फिल्टरिङ र घुसाइ -GenericName[nl]=Filteren en invoegen met shellcommando's -GenericName[pl]=Filtrowanie i wstawianie za pomocą powłoki -GenericName[pt]=Filtragem e Inserção por 'Shell' -GenericName[pt_BR]=Shell de Filtro e Inserção -GenericName[ru]=Фильтрация и вставка с помощью команд оболочки -GenericName[sk]=Shell filtrovanie a vkladanie -GenericName[sl]=Filtriranje lupine in vstavljanje -GenericName[sr]=Филтрирање и убацивање шкољке -GenericName[sr@Latn]=Filtriranje i ubacivanje školjke -GenericName[sv]=Skalfiltrering och infogning -GenericName[ta]=உறையகத்தை வடிகட்ட மற்றும் சேர்க்க -GenericName[tg]=Бо пӯсти фармон филтр ва мондан -GenericName[tr]=Kabuk filtreleme ve Ekleme -GenericName[zh_CN]=Shell 过滤和插入 -GenericName[zh_TW]=Shell 過濾與插入 -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevfilter -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=OptionalCodeEditing diff --git a/parts/filter/tdevfilter.rc b/parts/filter/tdevfilter.rc deleted file mode 100644 index 4f3d82d9..00000000 --- a/parts/filter/tdevfilter.rc +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/parts/filter/tdevfilterIface.cpp b/parts/filter/tdevfilterIface.cpp deleted file mode 100644 index e0c15687..00000000 --- a/parts/filter/tdevfilterIface.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// -// -// C++ Implementation: cpp -// -// Description: -// -// -// Author: KDevelop Authors , (C) 2003 -// -// Copyright: See COPYING file that comes with this distribution -// -// -#include "tdevfilterIface.h" -#include "filterpart.h" - -TDevFilterIface::TDevFilterIface( FilterPart* part ) - : TQObject( part ), DCOPObject( "TDevFilter" ), m_part( part ) -{ -} - -TDevFilterIface::~TDevFilterIface() -{ -} - -void TDevFilterIface::shellInsert() -{ - m_part->slotShellInsert(); -} - -void TDevFilterIface::shellFilter() -{ - m_part->slotShellFilter(); -} - -#include "tdevfilterIface.moc" diff --git a/parts/filter/tdevfilterIface.h b/parts/filter/tdevfilterIface.h deleted file mode 100644 index 56d2aebf..00000000 --- a/parts/filter/tdevfilterIface.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef TDEVFILTERIFACE_H -#define TDEVFILTERIFACE_H - -#include -#include - -class FilterPart; - -class TDevFilterIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP -public: - TDevFilterIface( FilterPart* part ); - ~TDevFilterIface(); - -k_dcop: - void shellInsert(); - void shellFilter(); - -private: - FilterPart* m_part; -}; - -#endif diff --git a/parts/fullscreen/CMakeLists.txt b/parts/fullscreen/CMakeLists.txt index 548e4f40..84b45df9 100644 --- a/parts/fullscreen/CMakeLists.txt +++ b/parts/fullscreen/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevfullscreen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_fullscreen.rc DESTINATION ${DATA_INSTALL_DIR}/tdevfullscreen ) +install( FILES kdevfullscreen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_fullscreen.rc DESTINATION ${DATA_INSTALL_DIR}/kdevfullscreen ) -##### libtdevfullscreen (module) ################ +##### libkdevfullscreen (module) ################ -tde_add_kpart( libtdevfullscreen AUTOMOC +tde_add_kpart( libkdevfullscreen AUTOMOC SOURCES fullscreen_part.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/fullscreen/Makefile.am b/parts/fullscreen/Makefile.am index a05b0bd1..3f039ef6 100644 --- a/parts/fullscreen/Makefile.am +++ b/parts/fullscreen/Makefile.am @@ -1,15 +1,15 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevfullscreen.la -libtdevfullscreen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfullscreen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfullscreen.la +libkdevfullscreen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfullscreen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfullscreen_la_SOURCES = fullscreen_part.cpp +libkdevfullscreen_la_SOURCES = fullscreen_part.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfullscreen.desktop +service_DATA = kdevfullscreen.desktop -rcdir = $(kde_datadir)/tdevfullscreen -rc_DATA = tdevpart_fullscreen.rc +rcdir = $(kde_datadir)/kdevfullscreen +rc_DATA = kdevpart_fullscreen.rc diff --git a/parts/fullscreen/fullscreen_part.cpp b/parts/fullscreen/fullscreen_part.cpp index a73f33f1..22cecb42 100644 --- a/parts/fullscreen/fullscreen_part.cpp +++ b/parts/fullscreen/fullscreen_part.cpp @@ -11,32 +11,32 @@ #include #include -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include "fullscreen_part.h" -static const TDevPluginInfo data("tdevfullscreen"); +static const KDevPluginInfo data("kdevfullscreen"); -typedef TDevGenericFactory FullScreenFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevfullscreen, FullScreenFactory( data ) ) +typedef KDevGenericFactory FullScreenFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevfullscreen, FullScreenFactory( data ) ) FullScreenPart::FullScreenPart(TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin(&data, parent, name ? name : "FullScreenPart" ) + : KDevPlugin(&data, parent, name ? name : "FullScreenPart" ) { setInstance(FullScreenFactory::instance()); // const TDEAboutData &abdata1 = *(info()); // kdDebug() << abdata1.appName() << endl; - const TDevPluginInfo &_info = *info(); + const KDevPluginInfo &_info = *info(); const TDEAboutData *abdata = _info; kdDebug() << abdata->appName() << endl; - setXMLFile("tdevpart_fullscreen.rc"); + setXMLFile("kdevpart_fullscreen.rc"); m_bFullScreen = false; diff --git a/parts/fullscreen/fullscreen_part.h b/parts/fullscreen/fullscreen_part.h index 2964b5d9..fcb566e8 100644 --- a/parts/fullscreen/fullscreen_part.h +++ b/parts/fullscreen/fullscreen_part.h @@ -9,15 +9,15 @@ * * ***************************************************************************/ -#ifndef __TDEVPART_FULLSCREEN_H__ -#define __TDEVPART_FULLSCREEN_H__ +#ifndef __KDEVPART_FULLSCREEN_H__ +#define __KDEVPART_FULLSCREEN_H__ #include -#include +#include class TDEAction; -class FullScreenPart : public TDevPlugin +class FullScreenPart : public KDevPlugin { Q_OBJECT diff --git a/parts/fullscreen/kdevfullscreen.desktop b/parts/fullscreen/kdevfullscreen.desktop new file mode 100644 index 00000000..6f935c85 --- /dev/null +++ b/parts/fullscreen/kdevfullscreen.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=FullScreen +Comment[br]=Skramm leun +Comment[ca]=Pantalla completa +Comment[da]=Fuldskærm +Comment[de]=Vollbild +Comment[el]=ΠλήρηςΟθόνη +Comment[es]=Pantalla completa +Comment[eu]=Pantaila osoa +Comment[fa]=تمام ‌صفحه +Comment[fr]=Plein écran +Comment[ga]=Lánscáileán +Comment[hi]=फुल-स्क्रीन +Comment[hu]=Teljes képernyő +Comment[it]=Schermo pieno +Comment[ja]=フルスクリーン +Comment[ms]=SkrinPenuh +Comment[nds]=Heel Schirm +Comment[ne]=पूरा पर्दा +Comment[nl]=Volledig scherm +Comment[pl]=Pełny ekran +Comment[pt]=Todo o Ecrã +Comment[pt_BR]=Tela Cheia +Comment[ru]=Полноэкранный режим +Comment[sk]=Celá obrazovka +Comment[sl]=Celozaslonski način +Comment[sr]=Преко целог екрана +Comment[sr@Latn]=Preko celog ekrana +Comment[sv]=Fullskärm +Comment[ta]=முழுத்திரை +Comment[tg]=Тартиботи экрани пурра +Comment[tr]=Tam Ekran +Comment[zh_CN]=全屏 +Comment[zh_TW]=全螢幕 +Name=KDevFullScreen +Name[da]=TDevelop fuldskærm +Name[de]=Vollbild (TDevelop) +Name[hi]=के-डेव-फुलस्क्रीन +Name[nds]=TDevelop-Heelschirm +Name[pl]=KDevPełnyEkran +Name[sk]=KDev celá obrazovka +Name[sv]=TDevelop fullskärm +Name[ta]=KDev முழுத்திரை +Name[tg]=Васеъкуниии KDev +Name[zh_TW]=TDevelop 全螢幕 +GenericName=FullScreen +GenericName[br]=Skramm leun +GenericName[ca]=Pantalla completa +GenericName[da]=Fuldskærm +GenericName[de]=Vollbild +GenericName[el]=ΠλήρηςΟθόνη +GenericName[es]=Pantalla completa +GenericName[et]=Täisekraan +GenericName[eu]=Pantaila osoa +GenericName[fa]=تمام‌ صفحه +GenericName[fr]=Plein écran +GenericName[ga]=Lánscáileán +GenericName[hi]=फुल-स्क्रीन +GenericName[hu]=Teljes képernyő +GenericName[it]=Schermo pieno +GenericName[ja]=フルスクリーン +GenericName[nds]=Heel Schirm +GenericName[ne]=पूरा पर्दा +GenericName[nl]=Volledig scherm +GenericName[pl]=Pełny ekran +GenericName[pt]=Todo o Ecrã +GenericName[pt_BR]=Tela Cheia +GenericName[ru]=Полноэкранный режим +GenericName[sk]=Celá obrazovka +GenericName[sl]=Celozaslonski način +GenericName[sr]=Преко целог екрана +GenericName[sr@Latn]=Preko celog ekrana +GenericName[sv]=Fullskärm +GenericName[ta]=முழுத்திரை +GenericName[tg]=Тартиботи экрани пурра +GenericName[tr]=Tam Ekran +GenericName[zh_CN]=全屏 +GenericName[zh_TW]=全螢幕 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Core +X-TDE-Library=libkdevfullscreen +X-TDevelop-Version=5 +X-TDevelop-Properties=ViewManagement diff --git a/parts/fullscreen/kdevpart_fullscreen.rc b/parts/fullscreen/kdevpart_fullscreen.rc new file mode 100644 index 00000000..3bd67c9d --- /dev/null +++ b/parts/fullscreen/kdevpart_fullscreen.rc @@ -0,0 +1,12 @@ + + + + + &Settings + + + + + + + diff --git a/parts/fullscreen/tdevfullscreen.desktop b/parts/fullscreen/tdevfullscreen.desktop deleted file mode 100644 index 4974af20..00000000 --- a/parts/fullscreen/tdevfullscreen.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=FullScreen -Comment[br]=Skramm leun -Comment[ca]=Pantalla completa -Comment[da]=Fuldskærm -Comment[de]=Vollbild -Comment[el]=ΠλήρηςΟθόνη -Comment[es]=Pantalla completa -Comment[eu]=Pantaila osoa -Comment[fa]=تمام ‌صفحه -Comment[fr]=Plein écran -Comment[ga]=Lánscáileán -Comment[hi]=फुल-स्क्रीन -Comment[hu]=Teljes képernyő -Comment[it]=Schermo pieno -Comment[ja]=フルスクリーン -Comment[ms]=SkrinPenuh -Comment[nds]=Heel Schirm -Comment[ne]=पूरा पर्दा -Comment[nl]=Volledig scherm -Comment[pl]=Pełny ekran -Comment[pt]=Todo o Ecrã -Comment[pt_BR]=Tela Cheia -Comment[ru]=Полноэкранный режим -Comment[sk]=Celá obrazovka -Comment[sl]=Celozaslonski način -Comment[sr]=Преко целог екрана -Comment[sr@Latn]=Preko celog ekrana -Comment[sv]=Fullskärm -Comment[ta]=முழுத்திரை -Comment[tg]=Тартиботи экрани пурра -Comment[tr]=Tam Ekran -Comment[zh_CN]=全屏 -Comment[zh_TW]=全螢幕 -Name=KDevFullScreen -Name[da]=TDevelop fuldskærm -Name[de]=Vollbild (TDevelop) -Name[hi]=के-डेव-फुलस्क्रीन -Name[nds]=TDevelop-Heelschirm -Name[pl]=KDevPełnyEkran -Name[sk]=KDev celá obrazovka -Name[sv]=TDevelop fullskärm -Name[ta]=KDev முழுத்திரை -Name[tg]=Васеъкуниии KDev -Name[zh_TW]=TDevelop 全螢幕 -GenericName=FullScreen -GenericName[br]=Skramm leun -GenericName[ca]=Pantalla completa -GenericName[da]=Fuldskærm -GenericName[de]=Vollbild -GenericName[el]=ΠλήρηςΟθόνη -GenericName[es]=Pantalla completa -GenericName[et]=Täisekraan -GenericName[eu]=Pantaila osoa -GenericName[fa]=تمام‌ صفحه -GenericName[fr]=Plein écran -GenericName[ga]=Lánscáileán -GenericName[hi]=फुल-स्क्रीन -GenericName[hu]=Teljes képernyő -GenericName[it]=Schermo pieno -GenericName[ja]=フルスクリーン -GenericName[nds]=Heel Schirm -GenericName[ne]=पूरा पर्दा -GenericName[nl]=Volledig scherm -GenericName[pl]=Pełny ekran -GenericName[pt]=Todo o Ecrã -GenericName[pt_BR]=Tela Cheia -GenericName[ru]=Полноэкранный режим -GenericName[sk]=Celá obrazovka -GenericName[sl]=Celozaslonski način -GenericName[sr]=Преко целог екрана -GenericName[sr@Latn]=Preko celog ekrana -GenericName[sv]=Fullskärm -GenericName[ta]=முழுத்திரை -GenericName[tg]=Тартиботи экрани пурра -GenericName[tr]=Tam Ekran -GenericName[zh_CN]=全屏 -GenericName[zh_TW]=全螢幕 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Core -X-TDE-Library=libtdevfullscreen -X-TDevelop-Version=5 -X-TDevelop-Properties=ViewManagement diff --git a/parts/fullscreen/tdevpart_fullscreen.rc b/parts/fullscreen/tdevpart_fullscreen.rc deleted file mode 100644 index 3bd67c9d..00000000 --- a/parts/fullscreen/tdevpart_fullscreen.rc +++ /dev/null @@ -1,12 +0,0 @@ - - - - - &Settings - - - - - - - diff --git a/parts/grepview/CMakeLists.txt b/parts/grepview/CMakeLists.txt index 96d4042b..5ad23e4f 100644 --- a/parts/grepview/CMakeLists.txt +++ b/parts/grepview/CMakeLists.txt @@ -27,16 +27,16 @@ link_directories( ##### other data ################################ -install( FILES tdevgrepview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevgrepview.rc DESTINATION ${DATA_INSTALL_DIR}/tdevgrepview ) +install( FILES kdevgrepview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevgrepview.rc DESTINATION ${DATA_INSTALL_DIR}/kdevgrepview ) -##### libtdevgrepview (module) ################## +##### libkdevgrepview (module) ################## -tde_add_kpart( libtdevgrepview AUTOMOC +tde_add_kpart( libkdevgrepview AUTOMOC SOURCES grepviewpart.cpp grepviewwidget.cpp grepdlg.cpp LINK - tdevwidgets-shared tdevelop-shared + kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/grepview/Makefile.am b/parts/grepview/Makefile.am index 8ae4725c..dc5f5fed 100644 --- a/parts/grepview/Makefile.am +++ b/parts/grepview/Makefile.am @@ -3,17 +3,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevgrepview.la -libtdevgrepview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevgrepview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevgrepview.la +libkdevgrepview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevgrepview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) -libtdevgrepview_la_SOURCES = grepviewpart.cpp grepviewwidget.cpp grepdlg.cpp +libkdevgrepview_la_SOURCES = grepviewpart.cpp grepviewwidget.cpp grepdlg.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevgrepview.desktop +service_DATA = kdevgrepview.desktop -rcdir = $(kde_datadir)/tdevgrepview -rc_DATA = tdevgrepview.rc +rcdir = $(kde_datadir)/kdevgrepview +rc_DATA = kdevgrepview.rc diff --git a/parts/grepview/grepdlg.cpp b/parts/grepview/grepdlg.cpp index 8e8b0eb3..6333805f 100644 --- a/parts/grepview/grepdlg.cpp +++ b/parts/grepview/grepdlg.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include "grepviewpart.h" diff --git a/parts/grepview/grepviewpart.cpp b/parts/grepview/grepviewpart.cpp index 9d6b08c5..92f4ebb6 100644 --- a/parts/grepview/grepviewpart.cpp +++ b/parts/grepview/grepviewpart.cpp @@ -23,26 +23,26 @@ #include #include -#include "tdevcore.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" -#include "tdevplugininfo.h" -#include "tdeveditorutil.h" +#include "kdevcore.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" +#include "kdevplugininfo.h" +#include "kdeveditorutil.h" #include "grepviewwidget.h" -static const TDevPluginInfo data("tdevgrepview"); +static const KDevPluginInfo data("kdevgrepview"); -K_EXPORT_COMPONENT_FACTORY(libtdevgrepview, GrepViewFactory(data)) +K_EXPORT_COMPONENT_FACTORY(libkdevgrepview, GrepViewFactory(data)) GrepViewPart::GrepViewPart( TQObject *parent, const char *name, const TQStringList & ) - : TDevPlugin( &data, parent, name ? name : "GrepViewPart" ) + : KDevPlugin( &data, parent, name ? name : "GrepViewPart" ) { setInstance(GrepViewFactory::instance()); - setXMLFile("tdevgrepview.rc"); + setXMLFile("kdevgrepview.rc"); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(stopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(stopButtonClicked(KDevPlugin*)) ); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), @@ -83,7 +83,7 @@ GrepViewPart::~GrepViewPart() } -void GrepViewPart::stopButtonClicked(TDevPlugin* which) +void GrepViewPart::stopButtonClicked(KDevPlugin* which) { if ( which != 0 && which != this ) return; @@ -129,10 +129,10 @@ void GrepViewPart::slotGrep() { if ( !m_widget->isRunning() ) { - TQString contextString = TDevEditorUtil::currentSelection( dynamic_cast( partController()->activePart() ) ); + TQString contextString = KDevEditorUtil::currentSelection( dynamic_cast( partController()->activePart() ) ); if ( contextString.isEmpty() ) { - contextString = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + contextString = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); } m_widget->showDialogWithPattern( contextString ); } diff --git a/parts/grepview/grepviewpart.h b/parts/grepview/grepviewpart.h index 68c4a574..4ebd7638 100644 --- a/parts/grepview/grepviewpart.h +++ b/parts/grepview/grepviewpart.h @@ -13,8 +13,8 @@ #define _GREPVIEWPART_H_ #include -#include -#include "tdevplugin.h" +#include +#include "kdevplugin.h" class KDialogBase; class TQPopupMenu; @@ -22,7 +22,7 @@ class Context; class GrepViewWidget; -class GrepViewPart : public TDevPlugin +class GrepViewPart : public KDevPlugin { Q_OBJECT @@ -32,7 +32,7 @@ public: ~GrepViewPart(); private slots: - void stopButtonClicked(TDevPlugin *which); + void stopButtonClicked(KDevPlugin *which); void projectOpened(); void projectClosed(); void contextMenu(TQPopupMenu *popup, const Context *context); @@ -46,6 +46,6 @@ private: friend class GrepViewWidget; }; -typedef TDevGenericFactory GrepViewFactory; +typedef KDevGenericFactory GrepViewFactory; #endif diff --git a/parts/grepview/grepviewwidget.cpp b/parts/grepview/grepviewwidget.cpp index edcdaa7c..1d709dff 100644 --- a/parts/grepview/grepviewwidget.cpp +++ b/parts/grepview/grepviewwidget.cpp @@ -27,10 +27,10 @@ #include using namespace KTextEditor; -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" #include "grepdlg.h" #include "grepviewpart.h" @@ -181,7 +181,7 @@ void GrepViewWidget::showDialog() } } // Determine if we have a list of project files - TDevProject *openProject = m_part->project(); + KDevProject *openProject = m_part->project(); if (openProject) { grepdlg->setEnableProjectBox(!openProject->allFiles().isEmpty()); @@ -225,7 +225,7 @@ void GrepViewWidget::showDialogWithPattern(TQString pattern) grepdlg->setPattern( pattern ); // Determine if we have a list of project files - TDevProject *openProject = m_part->project(); + KDevProject *openProject = m_part->project(); if (openProject) { grepdlg->setEnableProjectBox(!openProject->allFiles().isEmpty()); @@ -255,7 +255,7 @@ void GrepViewWidget::searchActivated() if (grepdlg->useProjectFilesFlag()) { - TDevProject *openProject = m_part->project(); + KDevProject *openProject = m_part->project(); if (openProject) { TQString tmpFilePath; @@ -430,7 +430,7 @@ void GrepViewProcessWidget::insertStdoutLine(const TQCString &line) } -void GrepViewWidget::projectChanged(TDevProject *project) +void GrepViewWidget::projectChanged(KDevProject *project) { TQString dir = project? project->projectDirectory() : TQDir::homeDirPath(); grepdlg->setDirectory(dir); diff --git a/parts/grepview/grepviewwidget.h b/parts/grepview/grepviewwidget.h index 0f05c136..3bf803b5 100644 --- a/parts/grepview/grepviewwidget.h +++ b/parts/grepview/grepviewwidget.h @@ -18,7 +18,7 @@ class GrepDialog; class GrepViewPart; -class TDevProject; +class KDevProject; class KTabWidget; class TQHBoxLayout; class TQToolButton; @@ -66,7 +66,7 @@ public: GrepViewWidget(GrepViewPart *part); ~GrepViewWidget(); - void projectChanged(TDevProject *project); + void projectChanged(KDevProject *project); void killJob( int signo = SIGTERM ); bool isRunning() const; diff --git a/parts/grepview/kdevgrepview.desktop b/parts/grepview/kdevgrepview.desktop new file mode 100644 index 00000000..0521c804 --- /dev/null +++ b/parts/grepview/kdevgrepview.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Integrates "find|grep" in TDevelop - allows fast searching of multiple files using patterns or regular expressions. +Comment[ca]=Integra "find|grep" en el TDevelop, permetent la recerca ràpida de diversos fitxers emprant patrons o expressions regulars. +Comment[da]=Integrerer "find|grep" i TDevelop - tillader hurtig søgning i flere filer ved brug af mønstre eller regulære udtryk. +Comment[de]=Integration von "find|grep" in TDevelop. - Ermöglicht das schnelle Durchsuchen mehrere Dateien mit Hilfe von Suchmustern und regulären Ausdrücken. +Comment[el]=Ενσωματώνει τα "find|grep" στο TDevelop - επιτρέπει τη γρήγορη αναζήτηση σε πολλά αρχεία χρησιμοποιώντας μοτίβα ή κανονικές εκφράσεις. +Comment[es]=Integra «find|grep» en TDevelop, permitiendo la búsqueda rápida de varios archivos utilizando patrones o expresiones regulares. +Comment[et]=Integreerib TDevelopi programmi "Find|grep", mis lubab mustreid või regulaaravaldisi kasutades kiiresti paljudes failides teksti otsida. +Comment[eu]="find|grep" TDevelop-en txertatzen du - fitxategi anitzetan eredu edo espresio erregularrak erabiliz bilaketa azkarrak egiteko aukera ematen du. +Comment[fa]=«find|grep» را در TDevelop مجتمع‌سازی می‌کند. اجازۀ جستجوی سریع پرونده‌های چندگانه را با استفاده از الگوها یا عبارتهای منظم می‌دهد. +Comment[fr]=Intègre « find|grep » dans TDevelop - permet d'effectuer une recherche rapide dans des fichiers multiples en utilisant des motifs ou des expressions rationnelles. +Comment[gl]=Integra "find|grep" en TDevelop - permite a procura rápida de varios ficheiros usando patróns ou expresións regulares. +Comment[hu]=A "find|grep" programok integrálása a TDevelopba - lehetővé teszi szövegek fájlokban való gyors keresését minták és reguláris kifejezések felhasználásával +Comment[it]=Integra "find|grep" in TDevelop - permette la ricerca rapida di file multipli utilizzando motivi o espressioni regolari. +Comment[ja]="find|grep" を TDevelop 内に統合し、正規表現やパターンを用いて素早く複数のファイルを検索することを可能にします。 +Comment[ms]=Menggabungkan "find|grep" dalam TDevelop - membenarkan carian pantas beberapa fail menggunakan corak atau regular expression. +Comment[nds]=Buut "find|grep" na TDevelop in. - Stellt gau Dörsöken vun mehr Dateien mit Söökmustern oder reguleer Utdrück praat. +Comment[ne]=केडीई विकासमा "find|grep" एकीकरण गर्दछ - जसले नियमित अभिव्यक्ति वा बाँन्की प्रयोग गरेर बहुविध फाइलको छिटो खोजी गर्न अनुमति दिन्छ । +Comment[nl]=Integreert "find|grep" in TDevelop - snel zoeken door verschillende bestanden naar patronen of reguliere expressies. +Comment[pl]=Integracja "find|grep" z TDevelop - pozwala na szybie wyszukiwanie wielu plików przy użyciu wzorców i wyrażeń regularnych. +Comment[pt]=Integra o "find|grep" no TDevelop - permite a procura rápida em vários ficheiros usando padrões ou expressões regulares. +Comment[pt_BR]=Integra o "find/grep" no TDevelop - permite busca rápida de múltiplos arquivos usando padrões e expressões regulares. +Comment[ru]=Интегрирует "find|grep" в TDevelop - позволяет производить быстрый поиск по нескольким файлам с использованием шаблонов или регулярных выражений. +Comment[sk]=Integruje "find|grep" do Kdevelop - umožní rýchle vyhľadávanie rôznych súborov pomocou vzorov alebo regulárnych výrazov. +Comment[sr]=Интегрише „find|grep“ у TDevelop — омогућава брзо претраживање више фајлова коришћењем облика имена или регуларних израза. +Comment[sr@Latn]=Integriše „find|grep“ u TDevelop — omogućava brzo pretraživanje više fajlova korišćenjem oblika imena ili regularnih izraza. +Comment[sv]=Integrerar "find | grep" med TDevelop - tillåter snabb sökning i flera filer med mönster eller reguljära uttryck. +Comment[ta]=TDevelopபில் "find|grep" ஒருங்கினை-வடிவங்கள் அல்லது வழக்கமான தொடர்களை பயன்படுத்தி பல்வகை கோப்பினை மிக வேகமாய் தேடலாம். +Comment[tg]=Интегралёбии "find|grep" дар TDevelop - бо истифодаи қолиб ё инки баёни ботартиб имкон медиҳад бо якчанд файлҳо ковтуковро барпо намоед. +Comment[tr]=TDevelop'a "find|grep"i yerleştirir - desen veya düzenli ifadeler kullanılara çoklu dosyalarda hızlı arama sağlar. +Comment[zh_CN]=在 TDevelop 中集成“查找|grep” - 可以使用模式或正则表达式在多个文件中快速查找。 +Comment[zh_TW]=在 TDevelop 中整合 "find|grep" - 允許使用特定樣式或正規表式示來快速搜尋多個檔案內容。 +Name=KDevGrepView +Name[da]=TDevelop Grep-visning +Name[de]=Grep-Ansicht (TDevelop) +Name[hi]=के-डेव-ग्रेप-व्यू +Name[nds]=TDevelop-Grepkieker +Name[pl]=KDevWidokGrep +Name[sk]=KDev pohľad na grep +Name[sv]=TDevelop grep-visning +Name[ta]=KDevGrep காட்சி +Name[tg]=Намоиши KDevGrep +Name[tr]=KDevGrepView +Name[zh_TW]=TDevelop Grep 檢視 +GenericName=Grep Frontend +GenericName[ca]=Entorn per a grep +GenericName[da]=Grep-grænseflade +GenericName[de]=Grep-Ansicht +GenericName[el]=Πρόγραμμα Grep +GenericName[es]=Entorno para grep +GenericName[et]=Programmi grep kasutajaliides +GenericName[eu]=Grep interfazea +GenericName[fa]=پایانۀ Grep +GenericName[fr]=Interface pour Grep +GenericName[ga]=Comhéadan Grep +GenericName[gl]=Frontal para Grep +GenericName[hi]=ग्रेप फ्रन्टएण्ड +GenericName[hu]=Grafikus felület a Grep-hez +GenericName[it]=Interfaccia a "grep" +GenericName[ja]=Grep フロントエンド +GenericName[ms]=Frontend Grep +GenericName[nds]=Grep-Böversiet +GenericName[ne]=ग्रिप फ्रन्टइन्ड +GenericName[nl]=Grep-frontend +GenericName[pl]=Interfejs do grepa +GenericName[pt]=Interface do Grep +GenericName[pt_BR]=Frontend do Grep +GenericName[ru]=Интеграция Grep +GenericName[sk]=Grep rozhranie +GenericName[sl]=Vmesnik za Grep +GenericName[sr]=Кориснички интерфејс за grep +GenericName[sr@Latn]=Korisnički interfejs za grep +GenericName[sv]=Gränssnitt till grep +GenericName[ta]=Grep முன் பகுதி +GenericName[tg]=Интегратсияи Grep +GenericName[tr]=Grep Önucu +GenericName[zh_CN]=Grep 前端 +GenericName[zh_TW]=Grep 前端介面 +Icon=find +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevgrepview +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=FileSearch diff --git a/parts/grepview/kdevgrepview.rc b/parts/grepview/kdevgrepview.rc new file mode 100644 index 00000000..80b20389 --- /dev/null +++ b/parts/grepview/kdevgrepview.rc @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/parts/grepview/tdevgrepview.desktop b/parts/grepview/tdevgrepview.desktop deleted file mode 100644 index c7b98916..00000000 --- a/parts/grepview/tdevgrepview.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Integrates "find|grep" in TDevelop - allows fast searching of multiple files using patterns or regular expressions. -Comment[ca]=Integra "find|grep" en el TDevelop, permetent la recerca ràpida de diversos fitxers emprant patrons o expressions regulars. -Comment[da]=Integrerer "find|grep" i TDevelop - tillader hurtig søgning i flere filer ved brug af mønstre eller regulære udtryk. -Comment[de]=Integration von "find|grep" in TDevelop. - Ermöglicht das schnelle Durchsuchen mehrere Dateien mit Hilfe von Suchmustern und regulären Ausdrücken. -Comment[el]=Ενσωματώνει τα "find|grep" στο TDevelop - επιτρέπει τη γρήγορη αναζήτηση σε πολλά αρχεία χρησιμοποιώντας μοτίβα ή κανονικές εκφράσεις. -Comment[es]=Integra «find|grep» en TDevelop, permitiendo la búsqueda rápida de varios archivos utilizando patrones o expresiones regulares. -Comment[et]=Integreerib TDevelopi programmi "Find|grep", mis lubab mustreid või regulaaravaldisi kasutades kiiresti paljudes failides teksti otsida. -Comment[eu]="find|grep" TDevelop-en txertatzen du - fitxategi anitzetan eredu edo espresio erregularrak erabiliz bilaketa azkarrak egiteko aukera ematen du. -Comment[fa]=«find|grep» را در TDevelop مجتمع‌سازی می‌کند. اجازۀ جستجوی سریع پرونده‌های چندگانه را با استفاده از الگوها یا عبارتهای منظم می‌دهد. -Comment[fr]=Intègre « find|grep » dans TDevelop - permet d'effectuer une recherche rapide dans des fichiers multiples en utilisant des motifs ou des expressions rationnelles. -Comment[gl]=Integra "find|grep" en TDevelop - permite a procura rápida de varios ficheiros usando patróns ou expresións regulares. -Comment[hu]=A "find|grep" programok integrálása a TDevelopba - lehetővé teszi szövegek fájlokban való gyors keresését minták és reguláris kifejezések felhasználásával -Comment[it]=Integra "find|grep" in TDevelop - permette la ricerca rapida di file multipli utilizzando motivi o espressioni regolari. -Comment[ja]="find|grep" を TDevelop 内に統合し、正規表現やパターンを用いて素早く複数のファイルを検索することを可能にします。 -Comment[ms]=Menggabungkan "find|grep" dalam TDevelop - membenarkan carian pantas beberapa fail menggunakan corak atau regular expression. -Comment[nds]=Buut "find|grep" na TDevelop in. - Stellt gau Dörsöken vun mehr Dateien mit Söökmustern oder reguleer Utdrück praat. -Comment[ne]=केडीई विकासमा "find|grep" एकीकरण गर्दछ - जसले नियमित अभिव्यक्ति वा बाँन्की प्रयोग गरेर बहुविध फाइलको छिटो खोजी गर्न अनुमति दिन्छ । -Comment[nl]=Integreert "find|grep" in TDevelop - snel zoeken door verschillende bestanden naar patronen of reguliere expressies. -Comment[pl]=Integracja "find|grep" z TDevelop - pozwala na szybie wyszukiwanie wielu plików przy użyciu wzorców i wyrażeń regularnych. -Comment[pt]=Integra o "find|grep" no TDevelop - permite a procura rápida em vários ficheiros usando padrões ou expressões regulares. -Comment[pt_BR]=Integra o "find/grep" no TDevelop - permite busca rápida de múltiplos arquivos usando padrões e expressões regulares. -Comment[ru]=Интегрирует "find|grep" в TDevelop - позволяет производить быстрый поиск по нескольким файлам с использованием шаблонов или регулярных выражений. -Comment[sk]=Integruje "find|grep" do Kdevelop - umožní rýchle vyhľadávanie rôznych súborov pomocou vzorov alebo regulárnych výrazov. -Comment[sr]=Интегрише „find|grep“ у TDevelop — омогућава брзо претраживање више фајлова коришћењем облика имена или регуларних израза. -Comment[sr@Latn]=Integriše „find|grep“ u TDevelop — omogućava brzo pretraživanje više fajlova korišćenjem oblika imena ili regularnih izraza. -Comment[sv]=Integrerar "find | grep" med TDevelop - tillåter snabb sökning i flera filer med mönster eller reguljära uttryck. -Comment[ta]=TDevelopபில் "find|grep" ஒருங்கினை-வடிவங்கள் அல்லது வழக்கமான தொடர்களை பயன்படுத்தி பல்வகை கோப்பினை மிக வேகமாய் தேடலாம். -Comment[tg]=Интегралёбии "find|grep" дар TDevelop - бо истифодаи қолиб ё инки баёни ботартиб имкон медиҳад бо якчанд файлҳо ковтуковро барпо намоед. -Comment[tr]=TDevelop'a "find|grep"i yerleştirir - desen veya düzenli ifadeler kullanılara çoklu dosyalarda hızlı arama sağlar. -Comment[zh_CN]=在 TDevelop 中集成“查找|grep” - 可以使用模式或正则表达式在多个文件中快速查找。 -Comment[zh_TW]=在 TDevelop 中整合 "find|grep" - 允許使用特定樣式或正規表式示來快速搜尋多個檔案內容。 -Name=KDevGrepView -Name[da]=TDevelop Grep-visning -Name[de]=Grep-Ansicht (TDevelop) -Name[hi]=के-डेव-ग्रेप-व्यू -Name[nds]=TDevelop-Grepkieker -Name[pl]=KDevWidokGrep -Name[sk]=KDev pohľad na grep -Name[sv]=TDevelop grep-visning -Name[ta]=KDevGrep காட்சி -Name[tg]=Намоиши KDevGrep -Name[tr]=KDevGrepView -Name[zh_TW]=TDevelop Grep 檢視 -GenericName=Grep Frontend -GenericName[ca]=Entorn per a grep -GenericName[da]=Grep-grænseflade -GenericName[de]=Grep-Ansicht -GenericName[el]=Πρόγραμμα Grep -GenericName[es]=Entorno para grep -GenericName[et]=Programmi grep kasutajaliides -GenericName[eu]=Grep interfazea -GenericName[fa]=پایانۀ Grep -GenericName[fr]=Interface pour Grep -GenericName[ga]=Comhéadan Grep -GenericName[gl]=Frontal para Grep -GenericName[hi]=ग्रेप फ्रन्टएण्ड -GenericName[hu]=Grafikus felület a Grep-hez -GenericName[it]=Interfaccia a "grep" -GenericName[ja]=Grep フロントエンド -GenericName[ms]=Frontend Grep -GenericName[nds]=Grep-Böversiet -GenericName[ne]=ग्रिप फ्रन्टइन्ड -GenericName[nl]=Grep-frontend -GenericName[pl]=Interfejs do grepa -GenericName[pt]=Interface do Grep -GenericName[pt_BR]=Frontend do Grep -GenericName[ru]=Интеграция Grep -GenericName[sk]=Grep rozhranie -GenericName[sl]=Vmesnik za Grep -GenericName[sr]=Кориснички интерфејс за grep -GenericName[sr@Latn]=Korisnički interfejs za grep -GenericName[sv]=Gränssnitt till grep -GenericName[ta]=Grep முன் பகுதி -GenericName[tg]=Интегратсияи Grep -GenericName[tr]=Grep Önucu -GenericName[zh_CN]=Grep 前端 -GenericName[zh_TW]=Grep 前端介面 -Icon=find -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevgrepview -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=FileSearch diff --git a/parts/grepview/tdevgrepview.rc b/parts/grepview/tdevgrepview.rc deleted file mode 100644 index 80b20389..00000000 --- a/parts/grepview/tdevgrepview.rc +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/parts/konsole/CMakeLists.txt b/parts/konsole/CMakeLists.txt index 37cd0687..e6b51296 100644 --- a/parts/konsole/CMakeLists.txt +++ b/parts/konsole/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevkonsoleview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevkonsoleview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevkonsoleview (module) ############### +##### libkdevkonsoleview (module) ############### -tde_add_kpart( libtdevkonsoleview AUTOMOC +tde_add_kpart( libkdevkonsoleview AUTOMOC SOURCES konsoleviewpart.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/konsole/Makefile.am b/parts/konsole/Makefile.am index 1cc781d4..085f8e7a 100644 --- a/parts/konsole/Makefile.am +++ b/parts/konsole/Makefile.am @@ -2,15 +2,15 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevkonsoleview.la -libtdevkonsoleview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevkonsoleview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/util/libtdevutil.la +kde_module_LTLIBRARIES = libkdevkonsoleview.la +libkdevkonsoleview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevkonsoleview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/util/libkdevutil.la -libtdevkonsoleview_la_SOURCES = konsoleviewpart.cpp +libkdevkonsoleview_la_SOURCES = konsoleviewpart.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevkonsoleview.desktop +service_DATA = kdevkonsoleview.desktop diff --git a/parts/konsole/kdevkonsoleview.desktop b/parts/konsole/kdevkonsoleview.desktop new file mode 100644 index 00000000..4a9fa14e --- /dev/null +++ b/parts/konsole/kdevkonsoleview.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin gives TDevelop an embedded konsole for quick and easy command line access. +Comment[ca]=Aquest connector ofereix a TDevelop una konsola encastada per a facilitar l'accés a la línia de comandaments. +Comment[da]=Dette plugin giver TDevelop en indlejret terminal for hurtig og nem kommandolinjeadgang. +Comment[de]=Dieses Modul stellt eine eingebettete Konsole für den schnellen und einfachen Zugriff auf die Kommandozeile zur Verfügung. +Comment[el]=Αυτό το πρόσθετο προσφέρει στο TDevelop μια ενσωματωμένη konsole για γρήγορη και εύκολη πρόσβαση σε γραμμή εντολών. +Comment[es]=Este complemento proporciona a TDevelop una consola empotrada para facilitar el acceso a la línea de órdenes. +Comment[et]=See plugin lisab TDevelopile võimaluse põimitult kasutada konsooli käsurea võimaluste kiireks ja hõlpsaks pruukimiseks. +Comment[eu]=Plugin honek TDevelop-i komando-lerroak azkar eta erraz sartzeko kapsultatutako kontsola bat eskeintzen dio. +Comment[fa]=این وصله برای دستیابی سریع و آسان به خط فرمان، به TDevelop یک konsole نهفته می‌دهد. +Comment[fr]=Ce module externe offre à TDevelop une Konsole intégrée permettant un accès à la ligne de commande rapide et facile. +Comment[gl]=Esta extensión engade a TDevelop unha konsole incrustada para un rápido e sinxelo acceso a liña de comandos. +Comment[hu]=Ez a bővítőmodul egy könnyen elérhető, beágyazott parancssort hoz létre a TDevelopon belül. +Comment[it]=Questo plugin offre una console integrata per TDevelop per l'accesso rapido e semplice alla linea di comando. +Comment[ja]=このプラグインは、TDevelop に迅速で容易なコマンドラインアクセス用の埋め込まれた konsole を与えます。 +Comment[ms]=Plugin ini memberikan TDevelop konsol embedded untuk akses arahan baris yang cepat dan mudah. +Comment[nds]=Dit Moduul stellt för't gaue un eenfache Togriepen op de Befehlsreeg en inbett Konsole för TDevelop praat. +Comment[ne]=यो प्लगइनले छिटो र सजिलो आदेशरेखा पहुँचका लागि केडीई विकासमा सम्मिलित कन्सोल प्रदान गर्दछ । +Comment[nl]=Deze plugin geeft TDevelop een ingebedde Konsole voor snelle toegang tot de commandoregel. +Comment[pl]=Ta wtyczka dodaje do TDevelopa wbudowaną konsolę umożliwiając szybki i łatwy dostęp do linii komend. +Comment[pt]=Este 'plugin' dá ao TDevelop um Konsole incorporado para um acesso rápido e simples à linha de comandos. +Comment[pt_BR]=Este plug-in fornece ao TDevelop um konsole embutido para acesso rápido e fácil à linha de comando. +Comment[ru]=Предоставляет встроенную консоль для быстрого вызова командной строки. +Comment[sk]=Modul vložiteľnej konzoly do Kdevelop pre rýchly a jednoduchý prístup k príkazovému riadku. +Comment[sr]=Овај прикључак даје TDevelop-у уграђену конзолу за брз и лак приступ командној линији. +Comment[sr@Latn]=Ovaj priključak daje TDevelop-u ugrađenu konzolu za brz i lak pristup komandnoj liniji. +Comment[sv]=Insticksprogrammet ger TDevelop en inbyggd terminal för snabb och enkel åtkomst av kommandoraden. +Comment[ta]=இந்த சொருகி உங்களுக்கு Kஉருவாக்கத்திற்கு கன்சோல் உட்பொதியின் மூலம் விரைவு மற்றும் எளிய கட்டளை வரி அனுமதி தரும். +Comment[tg]=Барои тез фарёд намудани фармони сатр рафаки бино карда шударо имкон медиҳад. +Comment[tr]=Bu eklenti, TDevelop'a hızlı komut satırı erişimi için gömülü bir terminal verir. +Comment[zh_CN]=这个插件为 TDevelop 提供KDE终端来快速和方便使用命令行。 +Comment[zh_TW]=此外掛程式提供 TDevelop 嵌入式的主控台,可以快速使用命令列。 +Name=KDevKonsoleView +Name[da]=TDevelop Konsole-visning +Name[de]=Unterstützung für Konsole (TDevelop) +Name[hi]=के-डेव-कंसोल-व्यू +Name[nds]=TDevelop-Konsoleünnerstütten +Name[pl]=KDevWidokKonsoli +Name[sk]=KDev pohľad na konzolu +Name[sv]=TDevelop terminalvy +Name[ta]=KDevKonsole காட்சி +Name[tg]=Намоиши KDevKonsole +Name[zh_TW]=TDevelop 主控台檢視 +GenericName=Embedded Konsole +GenericName[br]=Konsole enframmet +GenericName[ca]=Konsola encastada +GenericName[da]=Indlejret konsole +GenericName[de]=Eingebettete Konsole +GenericName[el]=Ενσωματωμένη Konsole +GenericName[es]=Consola empotrada +GenericName[et]=Põimitud Konsool +GenericName[eu]=Konsole kapsulatua +GenericName[fa]=Konsole نهفته +GenericName[fr]=Konsole intégrée +GenericName[ga]=Konsole Leabaithe +GenericName[gl]=Konsole incrustada +GenericName[hi]=अंतर्निर्मित कंसोल +GenericName[hu]=Beágyazott Konsole +GenericName[it]=Konsole integrata +GenericName[ja]=埋め込まれた Konsole +GenericName[ms]=Konsol Embedded +GenericName[nds]=Inbett Konsole +GenericName[ne]=सम्मिलित कन्सोल +GenericName[nl]=Ingebedde Konsole +GenericName[pl]=Wbudowana konsola +GenericName[pt]=Konsole Embebida +GenericName[pt_BR]=Konsole Embutido +GenericName[ru]=Встроенная консоль +GenericName[sk]=Vložiteľná konzola +GenericName[sl]=Vključena Konzola +GenericName[sr]=Уграђена конзола +GenericName[sr@Latn]=Ugrađena konzola +GenericName[sv]=Inbäddad terminal +GenericName[ta]=கன்சோல் உட்பொதி +GenericName[tg]=Бино намудани Embedded +GenericName[tr]=Gömülü Terminal +GenericName[zh_CN]=嵌入的 Konsole +GenericName[zh_TW]=嵌入式主控台 +Icon=konsole +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevkonsoleview +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=Console diff --git a/parts/konsole/konsoleviewpart.cpp b/parts/konsole/konsoleviewpart.cpp index 63f720d9..873ab790 100644 --- a/parts/konsole/konsoleviewpart.cpp +++ b/parts/konsole/konsoleviewpart.cpp @@ -13,27 +13,27 @@ #include -#include +#include #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevplugininfo.h" -#include "tdevshellwidget.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevplugininfo.h" +#include "kdevshellwidget.h" -typedef TDevGenericFactory KonsoleViewFactory; -static const TDevPluginInfo data("tdevkonsoleview"); -K_EXPORT_COMPONENT_FACTORY(libtdevkonsoleview, KonsoleViewFactory(data)) +typedef KDevGenericFactory KonsoleViewFactory; +static const KDevPluginInfo data("kdevkonsoleview"); +K_EXPORT_COMPONENT_FACTORY(libkdevkonsoleview, KonsoleViewFactory(data)) KonsoleViewPart::KonsoleViewPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "KonsoleViewPart") + : KDevPlugin(&data, parent, name ? name : "KonsoleViewPart") { setInstance( KonsoleViewFactory::instance() ); - m_widget = new TDevShellWidget( 0, "konsole widget" ); + m_widget = new KDevShellWidget( 0, "konsole widget" ); TQWhatsThis::add(m_widget, i18n("Konsole

    " "This window contains an embedded konsole window. It will try to follow you when " diff --git a/parts/konsole/konsoleviewpart.h b/parts/konsole/konsoleviewpart.h index 912e00b4..9bcecb38 100644 --- a/parts/konsole/konsoleviewpart.h +++ b/parts/konsole/konsoleviewpart.h @@ -14,12 +14,12 @@ #include -#include "tdevplugin.h" +#include "kdevplugin.h" -class TDevShellWidget; +class KDevShellWidget; -class KonsoleViewPart : public TDevPlugin +class KonsoleViewPart : public KDevPlugin { Q_OBJECT @@ -31,7 +31,7 @@ private slots: void projectOpened(); private: - TQGuardedPtr m_widget; + TQGuardedPtr m_widget; }; #endif diff --git a/parts/konsole/konsoleviewwidget.cpp b/parts/konsole/konsoleviewwidget.cpp index 26ac9e29..7c21cab2 100644 --- a/parts/konsole/konsoleviewwidget.cpp +++ b/parts/konsole/konsoleviewwidget.cpp @@ -20,10 +20,10 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" +#include "kdevcore.h" +#include "kdevproject.h" #include "konsoleviewpart.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" #include "konsoleviewwidget.h" diff --git a/parts/konsole/konsoleviewwidget.h b/parts/konsole/konsoleviewwidget.h index 6a7f6a9f..2bf3160a 100644 --- a/parts/konsole/konsoleviewwidget.h +++ b/parts/konsole/konsoleviewwidget.h @@ -17,7 +17,7 @@ #include -class TDevProject; +class KDevProject; class KonsoleWidgetPrivate; class KonsoleViewPart; namespace KParts { diff --git a/parts/konsole/tdevkonsoleview.desktop b/parts/konsole/tdevkonsoleview.desktop deleted file mode 100644 index edc9018f..00000000 --- a/parts/konsole/tdevkonsoleview.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin gives TDevelop an embedded konsole for quick and easy command line access. -Comment[ca]=Aquest connector ofereix a TDevelop una konsola encastada per a facilitar l'accés a la línia de comandaments. -Comment[da]=Dette plugin giver TDevelop en indlejret terminal for hurtig og nem kommandolinjeadgang. -Comment[de]=Dieses Modul stellt eine eingebettete Konsole für den schnellen und einfachen Zugriff auf die Kommandozeile zur Verfügung. -Comment[el]=Αυτό το πρόσθετο προσφέρει στο TDevelop μια ενσωματωμένη konsole για γρήγορη και εύκολη πρόσβαση σε γραμμή εντολών. -Comment[es]=Este complemento proporciona a TDevelop una consola empotrada para facilitar el acceso a la línea de órdenes. -Comment[et]=See plugin lisab TDevelopile võimaluse põimitult kasutada konsooli käsurea võimaluste kiireks ja hõlpsaks pruukimiseks. -Comment[eu]=Plugin honek TDevelop-i komando-lerroak azkar eta erraz sartzeko kapsultatutako kontsola bat eskeintzen dio. -Comment[fa]=این وصله برای دستیابی سریع و آسان به خط فرمان، به TDevelop یک konsole نهفته می‌دهد. -Comment[fr]=Ce module externe offre à TDevelop une Konsole intégrée permettant un accès à la ligne de commande rapide et facile. -Comment[gl]=Esta extensión engade a TDevelop unha konsole incrustada para un rápido e sinxelo acceso a liña de comandos. -Comment[hu]=Ez a bővítőmodul egy könnyen elérhető, beágyazott parancssort hoz létre a TDevelopon belül. -Comment[it]=Questo plugin offre una console integrata per TDevelop per l'accesso rapido e semplice alla linea di comando. -Comment[ja]=このプラグインは、TDevelop に迅速で容易なコマンドラインアクセス用の埋め込まれた konsole を与えます。 -Comment[ms]=Plugin ini memberikan TDevelop konsol embedded untuk akses arahan baris yang cepat dan mudah. -Comment[nds]=Dit Moduul stellt för't gaue un eenfache Togriepen op de Befehlsreeg en inbett Konsole för TDevelop praat. -Comment[ne]=यो प्लगइनले छिटो र सजिलो आदेशरेखा पहुँचका लागि केडीई विकासमा सम्मिलित कन्सोल प्रदान गर्दछ । -Comment[nl]=Deze plugin geeft TDevelop een ingebedde Konsole voor snelle toegang tot de commandoregel. -Comment[pl]=Ta wtyczka dodaje do TDevelopa wbudowaną konsolę umożliwiając szybki i łatwy dostęp do linii komend. -Comment[pt]=Este 'plugin' dá ao TDevelop um Konsole incorporado para um acesso rápido e simples à linha de comandos. -Comment[pt_BR]=Este plug-in fornece ao TDevelop um konsole embutido para acesso rápido e fácil à linha de comando. -Comment[ru]=Предоставляет встроенную консоль для быстрого вызова командной строки. -Comment[sk]=Modul vložiteľnej konzoly do Kdevelop pre rýchly a jednoduchý prístup k príkazovému riadku. -Comment[sr]=Овај прикључак даје TDevelop-у уграђену конзолу за брз и лак приступ командној линији. -Comment[sr@Latn]=Ovaj priključak daje TDevelop-u ugrađenu konzolu za brz i lak pristup komandnoj liniji. -Comment[sv]=Insticksprogrammet ger TDevelop en inbyggd terminal för snabb och enkel åtkomst av kommandoraden. -Comment[ta]=இந்த சொருகி உங்களுக்கு Kஉருவாக்கத்திற்கு கன்சோல் உட்பொதியின் மூலம் விரைவு மற்றும் எளிய கட்டளை வரி அனுமதி தரும். -Comment[tg]=Барои тез фарёд намудани фармони сатр рафаки бино карда шударо имкон медиҳад. -Comment[tr]=Bu eklenti, TDevelop'a hızlı komut satırı erişimi için gömülü bir terminal verir. -Comment[zh_CN]=这个插件为 TDevelop 提供KDE终端来快速和方便使用命令行。 -Comment[zh_TW]=此外掛程式提供 TDevelop 嵌入式的主控台,可以快速使用命令列。 -Name=KDevKonsoleView -Name[da]=TDevelop Konsole-visning -Name[de]=Unterstützung für Konsole (TDevelop) -Name[hi]=के-डेव-कंसोल-व्यू -Name[nds]=TDevelop-Konsoleünnerstütten -Name[pl]=KDevWidokKonsoli -Name[sk]=KDev pohľad na konzolu -Name[sv]=TDevelop terminalvy -Name[ta]=KDevKonsole காட்சி -Name[tg]=Намоиши KDevKonsole -Name[zh_TW]=TDevelop 主控台檢視 -GenericName=Embedded Konsole -GenericName[br]=Konsole enframmet -GenericName[ca]=Konsola encastada -GenericName[da]=Indlejret konsole -GenericName[de]=Eingebettete Konsole -GenericName[el]=Ενσωματωμένη Konsole -GenericName[es]=Consola empotrada -GenericName[et]=Põimitud Konsool -GenericName[eu]=Konsole kapsulatua -GenericName[fa]=Konsole نهفته -GenericName[fr]=Konsole intégrée -GenericName[ga]=Konsole Leabaithe -GenericName[gl]=Konsole incrustada -GenericName[hi]=अंतर्निर्मित कंसोल -GenericName[hu]=Beágyazott Konsole -GenericName[it]=Konsole integrata -GenericName[ja]=埋め込まれた Konsole -GenericName[ms]=Konsol Embedded -GenericName[nds]=Inbett Konsole -GenericName[ne]=सम्मिलित कन्सोल -GenericName[nl]=Ingebedde Konsole -GenericName[pl]=Wbudowana konsola -GenericName[pt]=Konsole Embebida -GenericName[pt_BR]=Konsole Embutido -GenericName[ru]=Встроенная консоль -GenericName[sk]=Vložiteľná konzola -GenericName[sl]=Vključena Konzola -GenericName[sr]=Уграђена конзола -GenericName[sr@Latn]=Ugrađena konzola -GenericName[sv]=Inbäddad terminal -GenericName[ta]=கன்சோல் உட்பொதி -GenericName[tg]=Бино намудани Embedded -GenericName[tr]=Gömülü Terminal -GenericName[zh_CN]=嵌入的 Konsole -GenericName[zh_TW]=嵌入式主控台 -Icon=konsole -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevkonsoleview -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=Console diff --git a/parts/openwith/CMakeLists.txt b/parts/openwith/CMakeLists.txt index d870a3e0..8384bdaa 100644 --- a/parts/openwith/CMakeLists.txt +++ b/parts/openwith/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevopenwith.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevopenwith.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevopenwith (module) ################## +##### libkdevopenwith (module) ################## -tde_add_kpart( libtdevopenwith AUTOMOC +tde_add_kpart( libkdevopenwith AUTOMOC SOURCES openwithpart.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/openwith/Makefile.am b/parts/openwith/Makefile.am index 316572ef..57503a0e 100644 --- a/parts/openwith/Makefile.am +++ b/parts/openwith/Makefile.am @@ -2,14 +2,14 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevopenwith.la -libtdevopenwith_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevopenwith_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevopenwith.la +libkdevopenwith_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevopenwith_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevopenwith_la_SOURCES = openwithpart.cpp +libkdevopenwith_la_SOURCES = openwithpart.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevopenwith.desktop +service_DATA = kdevopenwith.desktop diff --git a/parts/openwith/kdevopenwith.desktop b/parts/openwith/kdevopenwith.desktop new file mode 100644 index 00000000..0108daaa --- /dev/null +++ b/parts/openwith/kdevopenwith.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin provides additional "open" alternatives for various context menus in TDevelop. +Comment[ca]=Aquest connector proporciona alternatives "open" addicionals per a diversos menús de context a TDevelop. +Comment[da]=Dette plugin sørger for yderligere "åbne" alternativer for forskellige sammenhængsmenuer i TDevelop. +Comment[de]=Dieses Modul stellt in vielen Kontextmenüs Alternativen für den Menüpunkt "Öffnen" zur Verfügung. +Comment[el]=Αυτό το πρόσθετο προσφέρει εναλλακτικές επιλογές "ανοίγματος" για διάφορα σχετικά μενού στο TDevelop. +Comment[es]=Este complemento proporciona alternativas de «abrir» adicionales en varios menús contextuales de TDevelop. +Comment[et]=See plugin lisab TDevelopi erinevatele kontekstimenüüdele täiendavaid faili avamise võimalusi. +Comment[eu]=Plugin honek TDevelop-eko testuinguru menu hainbatentzat beste "ireki" aukera eskeintzen dizkie. +Comment[fa]=این وصله، انتخابهای »باز کردن« اضافی را برای گزینگان متن مختلف در TDevelop فراهم می‌کند. +Comment[fr]=Ce module externe fournit des alternatives « ouvertes » supplémentaires pour divers menus contextuels dans TDevelop. +Comment[gl]=Esta extensión proporciona alternativas "abrir" adicionais a varios menús de contexto de TDevelop. +Comment[hu]=Ez a bővítőmodul további megnyitási lehetőségeket hoz létre a TDevelop felbukkanó menüiben. +Comment[it]=Questo plugin offre alternative aggiuntive per "Apri" per i vari menu contestuali di TDevelop. +Comment[ja]=このプラグインは、TDevelop の中のさまざまなコンテキストメニューに追加の「開く」選択肢を供給します。 +Comment[ms]=Plugin ini menyediakan alternatif "buka" tambahan untuk pelbagai menu konteks dalam TDevelop. +Comment[nds]=Dit Moduul stellt för en Reeg Rechtsklickmenüs in TDevelop mehr Mööglichkeiten för "Opmaken" praat. +Comment[ne]=यो प्लगइनले केडीई विकासमा विविध प्रसङ्ग मेनुका लागि अतिरिक्त "खोल्नुहोस्" विकल्प प्रदान गर्दछ । +Comment[nl]=Deze plugin biedt extra "open"-alternatieven in verschillende contextmenus in TDevelop. +Comment[pl]=Ta wtyczka umożliwia dodanie dodatkowych możliwości otwierania plików w menu kontekstowych TDevelopa. +Comment[pt]=Este 'plugin' oferece várias alternativas adicionais e "abertas" para vários menus de contexto no TDevelop. +Comment[pt_BR]=Este plug-in fornece alternativas adicionais de "abrir" para vários menus de contetxo do TDevelop. +Comment[ru]=Этот модуль предоставляет различные возможности открытия файлов, используя контекстные меню TDevelop. +Comment[sk]=Modul poskytuje dodatočné "Otvoriť pomocou" alternatívy pre rôzne kontextové menu v TDevelop. +Comment[sr]=Овај прикључак обезбеђује додатне алтернативе за „отвори“ за различите контекстне меније у tdevelop-у. +Comment[sr@Latn]=Ovaj priključak obezbeđuje dodatne alternative za „otvori“ za različite kontekstne menije u tdevelop-u. +Comment[sv]=Insticksprogrammet tillhandahåller ytterligare "öppna" alternativ i diverse sammanhangsberoende menyer i TDevelop. +Comment[ta]=இந்த சொருகி Kஉருவாக்கியில் உள்ள வெவ்வேறு சூழுல் பட்டியலிற்கு பதில் "open" என்ற கூடுதல் வசதி தரும். +Comment[tg]=Ин модул як чанд хел кушодани файлҳоро имкон медиҳад, ҳангоми истифода намудани TDevelop. +Comment[tr]=Bu eklenti, TDevelop'taki bir çok bağlam menüleri için fazladan "aç" alternatifleri sunar. +Comment[zh_CN]=这个插件在 TDevelop 多个上下文菜单中提供“打开”菜单项。 +Comment[zh_TW]=此外掛程式提供 TDevelop 額外的「開啟方式」選單。 +Name=KDevOpenWith +Name[da]=TDevelop Åbn med +Name[de]="Öffnen mit"-Menüerweiterung (TDevelop) +Name[hi]=के-डेव-ओपन-विथ +Name[nds]=TDevelop-"Opmaken mit"-Menüverwiedern +Name[pl]=KDevOtwórzW +Name[sk]=KDev otvoriť pomocou +Name[sv]=TDevelop öppna med +Name[ta]=KDev வைத்து திற +Name[tg]=Кушодани аз рӯи KDev +Name[zh_TW]=TDevelop 開啟方式 +GenericName="Open with" Menu Addon +GenericName[ca]=Afegit de menú "Obre amb" +GenericName[da]="Åbn med" menu-tilføjelse +GenericName[de]=Menüerweiterung "Öffnen mit" +GenericName[el]=Πρόσθετο μενού "Άνοιγμα με" +GenericName[es]=Extensión de menú «Abrir con» +GenericName[et]=Menüü "Ava kasutades" lisamine +GenericName[eu]="Ireki honekin" menu gehigarria +GenericName[fa]=»باز کردن با« افزودن گزینگان +GenericName[fr]=Extension de menu « Ouvrir avec... » +GenericName[gl]=Engadido "Abrir con" para menús +GenericName[hu]="Megnyitás ezzel" menübővítés +GenericName[it]=Aggiunta al menu della voce "Apri con" +GenericName[ja]=「アプリケーションで開く」メニューアドオン +GenericName[nds]=Menüverwiedern "Opmaken mit" +GenericName[ne]="यससँग खोल्नुहोस्" मेनु एडअन +GenericName[nl]="Openen met" menutoevoeging +GenericName[pl]=Dodatek do menu "Otwórz za pomocą" +GenericName[pt]=Extra do Menu "Abrir com" +GenericName[pt_BR]=Addon de Menu "Abrir com" +GenericName[ru]=Дополнение меню "Открыть с помощью" +GenericName[sk]="Otvoriť pomocou" prídavok k menu +GenericName[sl]=Menijski dodatek »Odpri z« +GenericName[sr]=Додатак за мени „Отвори помоћу“ +GenericName[sr@Latn]=Dodatak za meni „Otvori pomoću“ +GenericName[sv]=Menytillägg till "Öppna med" +GenericName[ta]="Open with" பட்டியல் அடான் +GenericName[tg]=Менюи иловагӣ "Кушодан бо фармони Ёрӣ" +GenericName[tr]="Birlikte Aç" Menü Eki +GenericName[zh_CN]=“打开方式”菜单项 +GenericName[zh_TW]="開啟方式"選單 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevopenwith +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=GlobalFileManagement,FileOpenWith diff --git a/parts/openwith/openwithpart.cpp b/parts/openwith/openwithpart.cpp index a223f193..63fcc6d9 100644 --- a/parts/openwith/openwithpart.cpp +++ b/parts/openwith/openwithpart.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include @@ -11,18 +11,18 @@ #include #include -#include "tdevpartcontroller.h" -#include "tdevcore.h" -#include "tdevplugininfo.h" +#include "kdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevplugininfo.h" #include "urlutil.h" -typedef TDevGenericFactory OpenWithFactory; +typedef KDevGenericFactory OpenWithFactory; -static const TDevPluginInfo data("tdevopenwith"); -K_EXPORT_COMPONENT_FACTORY(libtdevopenwith, OpenWithFactory(data)) +static const KDevPluginInfo data("kdevopenwith"); +K_EXPORT_COMPONENT_FACTORY(libkdevopenwith, OpenWithFactory(data)) OpenWithPart::OpenWithPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "OpenWithPart") + : KDevPlugin(&data, parent, name ? name : "OpenWithPart") { setInstance( OpenWithFactory::instance() ); diff --git a/parts/openwith/openwithpart.h b/parts/openwith/openwithpart.h index 0c9a20ac..bd338a3f 100644 --- a/parts/openwith/openwithpart.h +++ b/parts/openwith/openwithpart.h @@ -3,13 +3,13 @@ #include -#include "tdevplugin.h" +#include "kdevplugin.h" class TQPopupMenu; class Context; -class OpenWithPart : public TDevPlugin +class OpenWithPart : public KDevPlugin { Q_OBJECT diff --git a/parts/openwith/tdevopenwith.desktop b/parts/openwith/tdevopenwith.desktop deleted file mode 100644 index fa1be30d..00000000 --- a/parts/openwith/tdevopenwith.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin provides additional "open" alternatives for various context menus in TDevelop. -Comment[ca]=Aquest connector proporciona alternatives "open" addicionals per a diversos menús de context a TDevelop. -Comment[da]=Dette plugin sørger for yderligere "åbne" alternativer for forskellige sammenhængsmenuer i TDevelop. -Comment[de]=Dieses Modul stellt in vielen Kontextmenüs Alternativen für den Menüpunkt "Öffnen" zur Verfügung. -Comment[el]=Αυτό το πρόσθετο προσφέρει εναλλακτικές επιλογές "ανοίγματος" για διάφορα σχετικά μενού στο TDevelop. -Comment[es]=Este complemento proporciona alternativas de «abrir» adicionales en varios menús contextuales de TDevelop. -Comment[et]=See plugin lisab TDevelopi erinevatele kontekstimenüüdele täiendavaid faili avamise võimalusi. -Comment[eu]=Plugin honek TDevelop-eko testuinguru menu hainbatentzat beste "ireki" aukera eskeintzen dizkie. -Comment[fa]=این وصله، انتخابهای »باز کردن« اضافی را برای گزینگان متن مختلف در TDevelop فراهم می‌کند. -Comment[fr]=Ce module externe fournit des alternatives « ouvertes » supplémentaires pour divers menus contextuels dans TDevelop. -Comment[gl]=Esta extensión proporciona alternativas "abrir" adicionais a varios menús de contexto de TDevelop. -Comment[hu]=Ez a bővítőmodul további megnyitási lehetőségeket hoz létre a TDevelop felbukkanó menüiben. -Comment[it]=Questo plugin offre alternative aggiuntive per "Apri" per i vari menu contestuali di TDevelop. -Comment[ja]=このプラグインは、TDevelop の中のさまざまなコンテキストメニューに追加の「開く」選択肢を供給します。 -Comment[ms]=Plugin ini menyediakan alternatif "buka" tambahan untuk pelbagai menu konteks dalam TDevelop. -Comment[nds]=Dit Moduul stellt för en Reeg Rechtsklickmenüs in TDevelop mehr Mööglichkeiten för "Opmaken" praat. -Comment[ne]=यो प्लगइनले केडीई विकासमा विविध प्रसङ्ग मेनुका लागि अतिरिक्त "खोल्नुहोस्" विकल्प प्रदान गर्दछ । -Comment[nl]=Deze plugin biedt extra "open"-alternatieven in verschillende contextmenus in TDevelop. -Comment[pl]=Ta wtyczka umożliwia dodanie dodatkowych możliwości otwierania plików w menu kontekstowych TDevelopa. -Comment[pt]=Este 'plugin' oferece várias alternativas adicionais e "abertas" para vários menus de contexto no TDevelop. -Comment[pt_BR]=Este plug-in fornece alternativas adicionais de "abrir" para vários menus de contetxo do TDevelop. -Comment[ru]=Этот модуль предоставляет различные возможности открытия файлов, используя контекстные меню TDevelop. -Comment[sk]=Modul poskytuje dodatočné "Otvoriť pomocou" alternatívy pre rôzne kontextové menu v TDevelop. -Comment[sr]=Овај прикључак обезбеђује додатне алтернативе за „отвори“ за различите контекстне меније у tdevelop-у. -Comment[sr@Latn]=Ovaj priključak obezbeđuje dodatne alternative za „otvori“ za različite kontekstne menije u tdevelop-u. -Comment[sv]=Insticksprogrammet tillhandahåller ytterligare "öppna" alternativ i diverse sammanhangsberoende menyer i TDevelop. -Comment[ta]=இந்த சொருகி Kஉருவாக்கியில் உள்ள வெவ்வேறு சூழுல் பட்டியலிற்கு பதில் "open" என்ற கூடுதல் வசதி தரும். -Comment[tg]=Ин модул як чанд хел кушодани файлҳоро имкон медиҳад, ҳангоми истифода намудани TDevelop. -Comment[tr]=Bu eklenti, TDevelop'taki bir çok bağlam menüleri için fazladan "aç" alternatifleri sunar. -Comment[zh_CN]=这个插件在 TDevelop 多个上下文菜单中提供“打开”菜单项。 -Comment[zh_TW]=此外掛程式提供 TDevelop 額外的「開啟方式」選單。 -Name=KDevOpenWith -Name[da]=TDevelop Åbn med -Name[de]="Öffnen mit"-Menüerweiterung (TDevelop) -Name[hi]=के-डेव-ओपन-विथ -Name[nds]=TDevelop-"Opmaken mit"-Menüverwiedern -Name[pl]=KDevOtwórzW -Name[sk]=KDev otvoriť pomocou -Name[sv]=TDevelop öppna med -Name[ta]=KDev வைத்து திற -Name[tg]=Кушодани аз рӯи KDev -Name[zh_TW]=TDevelop 開啟方式 -GenericName="Open with" Menu Addon -GenericName[ca]=Afegit de menú "Obre amb" -GenericName[da]="Åbn med" menu-tilføjelse -GenericName[de]=Menüerweiterung "Öffnen mit" -GenericName[el]=Πρόσθετο μενού "Άνοιγμα με" -GenericName[es]=Extensión de menú «Abrir con» -GenericName[et]=Menüü "Ava kasutades" lisamine -GenericName[eu]="Ireki honekin" menu gehigarria -GenericName[fa]=»باز کردن با« افزودن گزینگان -GenericName[fr]=Extension de menu « Ouvrir avec... » -GenericName[gl]=Engadido "Abrir con" para menús -GenericName[hu]="Megnyitás ezzel" menübővítés -GenericName[it]=Aggiunta al menu della voce "Apri con" -GenericName[ja]=「アプリケーションで開く」メニューアドオン -GenericName[nds]=Menüverwiedern "Opmaken mit" -GenericName[ne]="यससँग खोल्नुहोस्" मेनु एडअन -GenericName[nl]="Openen met" menutoevoeging -GenericName[pl]=Dodatek do menu "Otwórz za pomocą" -GenericName[pt]=Extra do Menu "Abrir com" -GenericName[pt_BR]=Addon de Menu "Abrir com" -GenericName[ru]=Дополнение меню "Открыть с помощью" -GenericName[sk]="Otvoriť pomocou" prídavok k menu -GenericName[sl]=Menijski dodatek »Odpri z« -GenericName[sr]=Додатак за мени „Отвори помоћу“ -GenericName[sr@Latn]=Dodatak za meni „Otvori pomoću“ -GenericName[sv]=Menytillägg till "Öppna med" -GenericName[ta]="Open with" பட்டியல் அடான் -GenericName[tg]=Менюи иловагӣ "Кушодан бо фармони Ёрӣ" -GenericName[tr]="Birlikte Aç" Menü Eki -GenericName[zh_CN]=“打开方式”菜单项 -GenericName[zh_TW]="開啟方式"選單 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevopenwith -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=GlobalFileManagement,FileOpenWith diff --git a/parts/outputviews/CMakeLists.txt b/parts/outputviews/CMakeLists.txt index 18effab8..48cf38ec 100644 --- a/parts/outputviews/CMakeLists.txt +++ b/parts/outputviews/CMakeLists.txt @@ -30,40 +30,40 @@ link_directories( ##### other data ################################ install( FILES - tdevappoutputview.desktop tdevmakeview.desktop + kdevappoutputview.desktop kdevmakeview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) install( FILES - tdevmakeview.rc - DESTINATION ${DATA_INSTALL_DIR}/tdevappoutputview ) + kdevmakeview.rc + DESTINATION ${DATA_INSTALL_DIR}/kdevappoutputview ) install( FILES - tdevmakeview.rc - DESTINATION ${DATA_INSTALL_DIR}/tdevmakeview ) + kdevmakeview.rc + DESTINATION ${DATA_INSTALL_DIR}/kdevmakeview ) -##### libtdevmakeview (module) ################## +##### libkdevmakeview (module) ################## -tde_add_kpart( libtdevmakeview AUTOMOC +tde_add_kpart( libkdevmakeview AUTOMOC SOURCES makeviewpart.cpp makewidget.cpp directorystatusmessagefilter.cpp outputfilter.cpp compileerrorfilter.cpp commandcontinuationfilter.cpp makeitem.cpp makeactionfilter.cpp otherfilter.cpp LINK - tdevdcopextensions-static tdevextensions-static - tdevwidgets-shared tdevelop-shared + kdevdcopextensions-static kdevextensions-static + kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) -##### libtdevappview (module) ################### +##### libkdevappview (module) ################### -tde_add_kpart( libtdevappview AUTOMOC +tde_add_kpart( libkdevappview AUTOMOC SOURCES appoutputviewpart.cpp appoutputwidget.cpp filterdlg.ui LINK - tdevdcopextensions-static tdevextensions-static - tdevwidgets-shared tdevelop-shared + kdevdcopextensions-static kdevextensions-static + kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/outputviews/Makefile.am b/parts/outputviews/Makefile.am index 6536d0f2..6a890586 100644 --- a/parts/outputviews/Makefile.am +++ b/parts/outputviews/Makefile.am @@ -4,32 +4,32 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/extensions/dcop -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevmakeview.la libtdevappview.la +kde_module_LTLIBRARIES = libkdevmakeview.la libkdevappview.la METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevappoutputview.desktop tdevmakeview.desktop +service_DATA = kdevappoutputview.desktop kdevmakeview.desktop -rc1dir = $(kde_datadir)/tdevappoutputview -rc1_DATA = tdevmakeview.rc +rc1dir = $(kde_datadir)/kdevappoutputview +rc1_DATA = kdevmakeview.rc -rc2dir = $(kde_datadir)/tdevmakeview -rc2_DATA = tdevmakeview.rc +rc2dir = $(kde_datadir)/kdevmakeview +rc2_DATA = kdevmakeview.rc noinst_HEADERS = filterdlg.h -libtdevmakeview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevmakeview_la_LIBADD = $(top_builddir)/lib/widgets/libtdevwidgets.la \ - $(top_builddir)/lib/interfaces/extensions/dcop/libtdevdcopextensions.la $(top_builddir)/lib/libtdevelop.la \ - $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la -libtdevmakeview_la_SOURCES = makeviewpart.cpp makewidget.cpp \ +libkdevmakeview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevmakeview_la_LIBADD = $(top_builddir)/lib/widgets/libkdevwidgets.la \ + $(top_builddir)/lib/interfaces/extensions/dcop/libkdevdcopextensions.la $(top_builddir)/lib/libtdevelop.la \ + $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la +libkdevmakeview_la_SOURCES = makeviewpart.cpp makewidget.cpp \ directorystatusmessagefilter.cpp outputfilter.cpp compileerrorfilter.cpp commandcontinuationfilter.cpp \ makeitem.cpp makeactionfilter.cpp otherfilter.cpp -libtdevappview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevappview_la_LIBADD = $(top_builddir)/lib/widgets/libtdevwidgets.la \ - $(top_builddir)/lib/interfaces/extensions/dcop/libtdevdcopextensions.la $(top_builddir)/lib/libtdevelop.la \ - $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la -libtdevappview_la_SOURCES = appoutputviewpart.cpp appoutputwidget.cpp \ +libkdevappview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevappview_la_LIBADD = $(top_builddir)/lib/widgets/libkdevwidgets.la \ + $(top_builddir)/lib/interfaces/extensions/dcop/libkdevdcopextensions.la $(top_builddir)/lib/libtdevelop.la \ + $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la +libkdevappview_la_SOURCES = appoutputviewpart.cpp appoutputwidget.cpp \ filterdlg.ui diff --git a/parts/outputviews/appoutputviewpart.cpp b/parts/outputviews/appoutputviewpart.cpp index 223d3855..3a0e0e7d 100644 --- a/parts/outputviews/appoutputviewpart.cpp +++ b/parts/outputviews/appoutputviewpart.cpp @@ -18,27 +18,27 @@ #include #include #include -#include -#include +#include +#include #include -#include "tdevproject.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" +#include "kdevproject.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" #include "appoutputwidget.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" #include "settings.h" -static const TDevPluginInfo data("tdevappoutputview"); -typedef TDevGenericFactory< AppOutputViewPart > AppViewFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevappview, AppViewFactory( data ) ) +static const KDevPluginInfo data("kdevappoutputview"); +typedef KDevGenericFactory< AppOutputViewPart > AppViewFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevappview, AppViewFactory( data ) ) AppOutputViewPart::AppOutputViewPart(TQObject *parent, const char *name, const TQStringList &) - : TDevAppFrontend(&data, parent, name ? name : "AppOutputViewPart") + : KDevAppFrontend(&data, parent, name ? name : "AppOutputViewPart") { setInstance(AppViewFactory::instance()); - m_dcop = new TDevAppFrontendIface(this); + m_dcop = new KDevAppFrontendIface(this); m_widget = new AppOutputWidget(this); m_widget->setIcon( SmallIcon("openterm") ); @@ -51,8 +51,8 @@ AppOutputViewPart::AppOutputViewPart(TQObject *parent, const char *name, const T mainWindow()->embedOutputView(m_widget, i18n("Application"), i18n("Output of the executed user program")); hideView(); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) ); connect(m_widget, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotProcessExited())); connect(m_widget, TQT_SIGNAL(processExited(TDEProcess*)), TQT_SIGNAL(processExited())); } @@ -66,7 +66,7 @@ AppOutputViewPart::~AppOutputViewPart() delete m_dcop; } -void AppOutputViewPart::slotStopButtonClicked( TDevPlugin* which ) +void AppOutputViewPart::slotStopButtonClicked( KDevPlugin* which ) { if ( which != 0 && which != this ) return; diff --git a/parts/outputviews/appoutputviewpart.h b/parts/outputviews/appoutputviewpart.h index 306108cd..1067af97 100644 --- a/parts/outputviews/appoutputviewpart.h +++ b/parts/outputviews/appoutputviewpart.h @@ -14,13 +14,13 @@ #include -#include "tdevappfrontend.h" -#include "TDevAppFrontendIface.h" +#include "kdevappfrontend.h" +#include "KDevAppFrontendIface.h" class AppOutputWidget; -class AppOutputViewPart : public TDevAppFrontend +class AppOutputViewPart : public KDevAppFrontend { Q_OBJECT @@ -45,12 +45,12 @@ signals: void processExited(); private slots: - void slotStopButtonClicked(TDevPlugin*); + void slotStopButtonClicked(KDevPlugin*); void slotProcessExited(); private: TQGuardedPtr m_widget; - TDevAppFrontendIface *m_dcop; + KDevAppFrontendIface *m_dcop; bool m_viewIsVisible; }; diff --git a/parts/outputviews/appoutputwidget.cpp b/parts/outputviews/appoutputwidget.cpp index 0201ce5c..50060339 100644 --- a/parts/outputviews/appoutputwidget.cpp +++ b/parts/outputviews/appoutputwidget.cpp @@ -33,9 +33,9 @@ #include "appoutputviewpart.h" #include "filterdlg.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" AppOutputWidget::AppOutputWidget(AppOutputViewPart* part) : ProcessWidget(0, "app output widget"), m_part(part) diff --git a/parts/outputviews/kdevappoutputview.desktop b/parts/outputviews/kdevappoutputview.desktop new file mode 100644 index 00000000..bca43d54 --- /dev/null +++ b/parts/outputviews/kdevappoutputview.desktop @@ -0,0 +1,84 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Application Output View +Comment[ca]=Visor de l'eixida de les aplicacions +Comment[da]=Program-uddata fremvisning +Comment[de]=Anwendungsausgabe für TDevelop +Comment[el]=Προβολή εξόδου εφαρμογής +Comment[es]=Visor de la salida de las aplicaciones +Comment[et]=Rakenduse väljundi vaade +Comment[eu]=Aplikazioen irteera ikustailua +Comment[fa]=نمای خروجی کاربرد +Comment[fr]=Fenêtre de sortie d'une application +Comment[gl]=Vista da saída da aplicación +Comment[hi]=अनुप्रयोग आउटपुट व्यू +Comment[hu]=Alkalmazáskimenet-megjelenítő +Comment[it]=Vista dell'output dell'applicazione +Comment[ja]=アプリケーション出力ビュー +Comment[ms]=Lihat Keluaran Aplikasi +Comment[nds]=Programmutgaav-Kieker +Comment[ne]=अनुप्रयोग निर्गत दृश्य +Comment[nl]=Weergave van toepassingsuitvoer +Comment[pl]=Widok wyjścia programu +Comment[pt]=Vista do Resultado da Aplicação +Comment[pt_BR]=Visão da Saída do Aplicativo +Comment[ru]=Окно вывода приложения +Comment[sk]=Pohľad na výstup aplikácie +Comment[sl]=Prikaz programskega izhoda +Comment[sr]=Приказ излаза апликације +Comment[sr@Latn]=Prikaz izlaza aplikacije +Comment[sv]=Programutmatningsvy +Comment[ta]=பயன்பாட்டு வெளியீட்டுக் காட்சி +Comment[tg]=Тирезаи хориҷ кардани гузориш +Comment[tr]=Uygulama Çıktı Görünümü +Comment[zh_CN]=应用程序输出查看器 +Comment[zh_TW]=應用程式輸出檢視 +Name=KDevAppOutputView +Name[da]=TDevelop Program-uddata fremvisning +Name[de]=Anwendungsausgabe (TDevelop) +Name[hi]=के-डेव-एप्प-आउटपुट-व्यू +Name[nds]=Programmutgaav-Kieker (TDevelop) +Name[pl]=KDevAppWidokWyjścia +Name[sk]=KDev pohľad na výstup aplikácie +Name[sv]=TDevelop programutmatningsvy +Name[ta]=KDevApp வெளியீட்டுக் காட்சி +Name[zh_TW]=TDevelop 應用程式輸出檢視 +GenericName=Application Output View +GenericName[ca]=Visor de l'eixida de les aplicacions +GenericName[da]=Program-uddata fremvisning +GenericName[de]=Anwendungsausgabe +GenericName[el]=Προβολή εξόδου εφαρμογής +GenericName[es]=Visor de la salida de las aplicaciones +GenericName[et]=Rakenduse väljundi vaade +GenericName[eu]=Aplikazioen irteera ikustailua +GenericName[fa]=نمای خروجی کاربرد +GenericName[fr]=Fenêtre de sortie d'une application +GenericName[gl]=Vista da saída da aplicación +GenericName[hi]=अनुप्रयोग आउटपुट व्यू +GenericName[hu]=Alkalmazáskimenet-megjelenítő +GenericName[it]=Visualizza l'output dell'applicazione +GenericName[ja]=アプリケーション出力ビュー +GenericName[nds]=Programmutgaav-Kieker +GenericName[ne]=अनुप्रयोग निर्गत दृश्य +GenericName[nl]=Weergave van toepassingsuitvoer +GenericName[pl]=Widok wyjścia programu +GenericName[pt]=Vista do Resultado da Aplicação +GenericName[pt_BR]=Visão da Saída do Aplicativo +GenericName[ru]=Окно вывода приложения +GenericName[sk]=Pohľad na výstup aplikácie +GenericName[sl]=Prikaz programskega izhoda +GenericName[sr]=Приказ излаза апликације +GenericName[sr@Latn]=Prikaz izlaza aplikacije +GenericName[sv]=Programutmatningsvy +GenericName[ta]=பயன்பாட்டு வெளியீட்டுக் காட்சி +GenericName[tg]=Тирезаи хориҷ кардани гузориш +GenericName[tr]=Uygulama Çıktı Görünümü +GenericName[zh_CN]=应用程序输出查看器 +GenericName[zh_TW]=應用程式輸出檢視 +Icon=exec +ServiceTypes=TDevelop/AppFrontend +X-TDE-Library=libkdevappview +X-TDevelop-Version=5 +X-TDevelop-Scope=Core +X-TDevelop-Properties=OutputTool diff --git a/parts/outputviews/kdevmakeview.desktop b/parts/outputviews/kdevmakeview.desktop new file mode 100644 index 00000000..bfea5cec --- /dev/null +++ b/parts/outputviews/kdevmakeview.desktop @@ -0,0 +1,87 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Compiler Frontend +Comment[ca]=Entorn per al compilador +Comment[da]=Grænseflade til oversætter +Comment[de]=Make-Ausgabe für TDevelop +Comment[el]=Πρόγραμμα μεταγλωττιστή +Comment[es]=Entorno para el compilador +Comment[et]=Kompilaatori kasutajaliides +Comment[eu]=Konpiladore interfazea +Comment[fa]=پایانۀ مترجم +Comment[fr]=Interface pour le compilateur +Comment[ga]=Comhéadan Tiomsaitheora +Comment[gl]=Frontal para o compilador +Comment[hi]=कम्पायलर फ्रन्टएण्ड +Comment[hu]=Grafikus felület fordítóprogramokhoz +Comment[it]=Interfaccia al compilatore +Comment[ja]=コンパイラフロントエンド +Comment[ms]=Frontend Penghimpun +Comment[nds]=Kompilerer-Böversiet +Comment[ne]=कम्पाइलर फ्रन्टइन्ड +Comment[nl]=Compiler-frontend +Comment[pl]=Interfejs do kompilatora +Comment[pt]=Interface de Compilador +Comment[pt_BR]=Frontend do Compilador +Comment[ru]=Интерфейс к компилятору +Comment[sk]=Rozhranie kompilátora +Comment[sl]=Vmesnik prevajalnika +Comment[sr]=Кориснички интерфејс за преводилац +Comment[sr@Latn]=Korisnički interfejs za prevodilac +Comment[sv]=Kompilatorgränssnitt +Comment[ta]=முன்பகுதி தொகுப்பான் +Comment[tg]=Интерфейс ба талфифгар +Comment[tr]=Derleyici Önucu +Comment[zh_CN]=编译器前端 +Comment[zh_TW]=編譯器前端介面 +Name=KDevMakeView +Name[da]=TDevelop Make-visning +Name[de]=Make-Ausgabe (TDevelop) +Name[hi]=के-डेव-मेक-व्यू +Name[nds]=Make-Kieker (TDevelop) +Name[pl]=KDevWIdokMake +Name[sk]=KDev pohľad na make +Name[sv]=TDevelop byggvy +Name[ta]=KDev காட்சியாக்கு +Name[zh_TW]=TDevelop Make 檢視 +GenericName=Compiler Frontend +GenericName[ca]=Entorn per al compilador +GenericName[da]=Grænseflade til oversætter +GenericName[de]=Make-Ausgabe +GenericName[el]=Πρόγραμμα μεταγλωττιστή +GenericName[es]=Entorno para el compilador +GenericName[et]=Kompilaatori kasutajaliides +GenericName[eu]=Konpiladore interfazea +GenericName[fa]=پایانۀ مترجم +GenericName[fr]=Interface pour le compilateur +GenericName[ga]=Comhéadan Tiomsaitheora +GenericName[gl]=Frontal para o compilador +GenericName[hi]=कम्पायलर फ्रन्टएण्ड +GenericName[hu]=Grafikus felület fordítóprogramokhoz +GenericName[it]=Interfaccia al compilatore +GenericName[ja]=コンパイラフロントエンド +GenericName[ms]=Frontend Penghimpun +GenericName[nds]=Kompilerer-Böversiet +GenericName[ne]=कम्पाइलर फ्रन्टइन्ड +GenericName[nl]=Compiler-frontend +GenericName[pl]=Interfejs do kompilatora +GenericName[pt]=Interface de Compilador +GenericName[pt_BR]=Frontend do Compilador +GenericName[ru]=Интерфейс к компилятору +GenericName[sk]=Rozhranie kompilátor +GenericName[sl]=Vmesnik prevajalnika +GenericName[sr]=Кориснички интерфејс преводиоца +GenericName[sr@Latn]=Korisnički interfejs prevodioca +GenericName[sv]=Kompilatorgränssnitt +GenericName[ta]=முன் பகுதி தொகுப்பான் +GenericName[tg]=Интерфейс ба талфифгар +GenericName[tr]=Derleyici Önucu +GenericName[zh_CN]=编译器前端 +GenericName[zh_TW]=編譯器前端介面 +Icon=konsole +ServiceTypes=TDevelop/MakeFrontend +X-TDE-Library=libkdevmakeview +X-TDevelop-Version=5 +X-TDevelop-Scope=Core +X-TDevelop-Properties=OutputTool diff --git a/parts/outputviews/kdevmakeview.rc b/parts/outputviews/kdevmakeview.rc new file mode 100644 index 00000000..fc8c82f6 --- /dev/null +++ b/parts/outputviews/kdevmakeview.rc @@ -0,0 +1,9 @@ + + + +

    + + + + + diff --git a/parts/outputviews/makeactionfilter.cpp b/parts/outputviews/makeactionfilter.cpp index 157a2c2e..ee38d144 100644 --- a/parts/outputviews/makeactionfilter.cpp +++ b/parts/outputviews/makeactionfilter.cpp @@ -184,11 +184,11 @@ void MakeActionFilter::test() "-I/usr/X11R6/include -DTQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W " "-Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion " "-Wchar-subscripts -fno-builtin -g3 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new " - "-fno-common -MT tdevcore.lo -MD -MP -MF \".deps/tdevcore.Tpo\" -c -o tdevcore.lo `test -f " - "'/home/john/src/kde/tdevelop/lib/interfaces/tdevcore.cpp' || echo " - "'/home/john/src/kde/tdevelop/lib/interfaces/'`/home/john/src/kde/tdevelop/lib/interfaces/tdevcore.cpp; then mv " - "\".deps/tdevcore.Tpo\" \".deps/tdevcore.Plo\"; else rm -f \".deps/tdevcore.Tpo\"; exit 1; fi", - "compiling", "g++", "tdevcore.cpp" ) + "-fno-common -MT kdevcore.lo -MD -MP -MF \".deps/kdevcore.Tpo\" -c -o kdevcore.lo `test -f " + "'/home/john/src/kde/tdevelop/lib/interfaces/kdevcore.cpp' || echo " + "'/home/john/src/kde/tdevelop/lib/interfaces/'`/home/john/src/kde/tdevelop/lib/interfaces/kdevcore.cpp; then mv " + "\".deps/kdevcore.Tpo\" \".deps/kdevcore.Plo\"; else rm -f \".deps/kdevcore.Tpo\"; exit 1; fi", + "compiling", "g++", "kdevcore.cpp" ) << TestItem( // automake 1.7, srcdir != builddir "if g++ -DHAVE_CONFIG_H -I. -I/home/john/src/kde/tdevelop/src -I.. -I/home/john/src/kde/tdevelop/lib/interfaces " "-I/home/john/src/kde/tdevelop/lib/sourceinfo -I/home/john/src/kde/tdevelop/lib/util -I/home/john/src/kde/tdevelop/lib " @@ -222,12 +222,12 @@ void MakeActionFilter::test() "/bin/sh ../../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic " "-W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align " "-Wconversion -Wchar-subscripts -fno-builtin -g3 -Wformat-security -Wmissing-format-attribute -fno-exceptions " - "-fno-check-new -fno-common -o libtdevoutputviews.la.closure libtdevoutputviews_la_closure.lo -L/usr/X11R6/lib " + "-fno-check-new -fno-common -o libkdevoutputviews.la.closure libkdevoutputviews_la_closure.lo -L/usr/X11R6/lib " "-L/home/john/src/kde/qt-copy/lib -L/usr/local/kde/lib -avoid-version -module -no-undefined -R /usr/local/kde/lib " "-R /home/john/src/kde/qt-copy/lib -R /usr/X11R6/lib outputviewsfactory.lo makeviewpart.lo makewidget.lo " "appoutputviewpart.lo appoutputwidget.lo directorystatusmessagefilter.lo outputfilter.lo compileerrorfilter.lo " "commandcontinuationfilter.lo makeitem.lo makeactionfilter.lo otherfilter.lo ../../lib/libtdevelop.la", - "linking", "libtool", "libtdevoutputviews.la.closure" ) + "linking", "libtool", "libkdevoutputviews.la.closure" ) << TestItem( //libtool, linking 2 "/bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic " "-W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts " @@ -254,12 +254,12 @@ void MakeActionFilter::test() "echo '/home/andris/cvs-developement/head/quanta/quanta/project/'`/home/andris/cvs-developement/head/quanta/quanta/project/project.cpp ", "compiling", "g++", "project.cpp") << TestItem( - "/usr/local/kde/bin/dcopidl /home/john/src/kde/tdevelop/lib/interfaces/TDevAppFrontendIface.h > TDevAppFrontendIface.kidl " - "|| ( rm -f TDevAppFrontendIface.kidl ; /bin/false )", - "generating", "dcopidl", "TDevAppFrontendIface.kidl" ) + "/usr/local/kde/bin/dcopidl /home/john/src/kde/tdevelop/lib/interfaces/KDevAppFrontendIface.h > KDevAppFrontendIface.kidl " + "|| ( rm -f KDevAppFrontendIface.kidl ; /bin/false )", + "generating", "dcopidl", "KDevAppFrontendIface.kidl" ) << TestItem( - "/usr/local/kde/bin/dcopidl2cpp --c++-suffix cpp --no-signals --no-stub TDevAppFrontendIface.kidl", - "compiling", "dcopidl2cpp", "TDevAppFrontendIface.kidl" ) + "/usr/local/kde/bin/dcopidl2cpp --c++-suffix cpp --no-signals --no-stub KDevAppFrontendIface.kidl", + "compiling", "dcopidl2cpp", "KDevAppFrontendIface.kidl" ) << TestItem( //install "/usr/bin/install -c -p -m 644 /home/andris/development/quanta/quanta/kommander/editor/kmdr-editor.desktop " "/opt/trinity/share/applnk/Editors/kmdr-editor.desktop", "installing", "", "/opt/trinity/share/applnk/Editors/kmdr-editor.desktop") diff --git a/parts/outputviews/makeviewpart.cpp b/parts/outputviews/makeviewpart.cpp index e8eb6a75..9324bcb0 100644 --- a/parts/outputviews/makeviewpart.cpp +++ b/parts/outputviews/makeviewpart.cpp @@ -17,27 +17,27 @@ #include #include #include -#include -#include +#include +#include -#include "tdevproject.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" +#include "kdevproject.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" #include "makewidget.h" -static const TDevPluginInfo data("tdevmakeview"); -typedef TDevGenericFactory< MakeViewPart > MakeViewFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevmakeview, MakeViewFactory( data ) ) +static const KDevPluginInfo data("kdevmakeview"); +typedef KDevGenericFactory< MakeViewPart > MakeViewFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevmakeview, MakeViewFactory( data ) ) MakeViewPart::MakeViewPart(TQObject *parent, const char *name, const TQStringList &) - : TDevMakeFrontend(&data, parent, name) + : KDevMakeFrontend(&data, parent, name) { setInstance(MakeViewFactory::instance()); - setXMLFile("tdevmakeview.rc"); + setXMLFile("kdevmakeview.rc"); - m_dcop = new TDevMakeFrontendIface(this); + m_dcop = new KDevMakeFrontendIface(this); m_widget = new MakeWidget(this); m_widget->setIcon( SmallIcon("exec") ); @@ -61,8 +61,8 @@ MakeViewPart::MakeViewPart(TQObject *parent, const char *name, const TQStringLis action->setToolTip( i18n("Go to the previous error") ); action->setWhatsThis(i18n("Previous error

    Switches to the file and line where the previous error was reported from.")); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) ); } @@ -74,7 +74,7 @@ MakeViewPart::~MakeViewPart() delete m_dcop; } -void MakeViewPart::slotStopButtonClicked(TDevPlugin* which) +void MakeViewPart::slotStopButtonClicked(KDevPlugin* which) { if ( which != 0 && which != this ) return; diff --git a/parts/outputviews/makeviewpart.h b/parts/outputviews/makeviewpart.h index 420eebcb..89f2a8bd 100644 --- a/parts/outputviews/makeviewpart.h +++ b/parts/outputviews/makeviewpart.h @@ -14,13 +14,13 @@ #include -#include "tdevmakefrontend.h" -#include "TDevMakeFrontendIface.h" +#include "kdevmakefrontend.h" +#include "KDevMakeFrontendIface.h" class MakeWidget; -class MakeViewPart : public TDevMakeFrontend +class MakeViewPart : public KDevMakeFrontend { Q_OBJECT @@ -32,7 +32,7 @@ public: virtual void updateSettingsFromConfig(); private slots: - void slotStopButtonClicked(TDevPlugin*); + void slotStopButtonClicked(KDevPlugin*); protected: virtual void queueCommand(const TQString &dir, const TQString &command); @@ -40,7 +40,7 @@ protected: private: TQGuardedPtr m_widget; - TDevMakeFrontendIface *m_dcop; + KDevMakeFrontendIface *m_dcop; friend class MakeWidget; }; diff --git a/parts/outputviews/makewidget.cpp b/parts/outputviews/makewidget.cpp index 0e2e6aef..029efdc6 100644 --- a/parts/outputviews/makewidget.cpp +++ b/parts/outputviews/makewidget.cpp @@ -10,10 +10,10 @@ ***************************************************************************/ #include "makewidget.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" #include "processlinemaker.h" #include "makeviewpart.h" #include "makeitem.h" diff --git a/parts/outputviews/outputviewsfactory.cpp b/parts/outputviews/outputviewsfactory.cpp index d63621d6..55e5bf55 100644 --- a/parts/outputviews/outputviewsfactory.cpp +++ b/parts/outputviews/outputviewsfactory.cpp @@ -11,11 +11,11 @@ #include "outputviewsfactory.h" -static const TDevPluginInfo data("tdevoutputviews", I18N_NOOP("Messages Output"), "1.0"); +static const KDevPluginInfo data("kdevoutputviews", I18N_NOOP("Messages Output"), "1.0"); -K_EXPORT_COMPONENT_FACTORY( libtdevoutputviews, OutputViewsFactory( &data ) ) +K_EXPORT_COMPONENT_FACTORY( libkdevoutputviews, OutputViewsFactory( &data ) ) -const TDevPluginInfo *outputViewsInfo() +const KDevPluginInfo *outputViewsInfo() { return data; } diff --git a/parts/outputviews/outputviewsfactory.h b/parts/outputviews/outputviewsfactory.h index e79e60a2..4bcba666 100644 --- a/parts/outputviews/outputviewsfactory.h +++ b/parts/outputviews/outputviewsfactory.h @@ -12,16 +12,16 @@ #ifndef _OUTPUTVIEWSFACTORY_H_ #define _OUTPUTVIEWSFACTORY_H_ -#include +#include #include "appoutputviewpart.h" #include "makeviewpart.h" -class TDevPluginInfo; +class KDevPluginInfo; typedef K_TYPELIST_2( AppOutputViewPart, MakeViewPart ) OutputViews; -typedef TDevGenericFactory< OutputViews > OutputViewsFactory; +typedef KDevGenericFactory< OutputViews > OutputViewsFactory; -const TDevPluginInfo *outputViewsInfo(); +const KDevPluginInfo *outputViewsInfo(); #endif diff --git a/parts/outputviews/tdevappoutputview.desktop b/parts/outputviews/tdevappoutputview.desktop deleted file mode 100644 index 7791162d..00000000 --- a/parts/outputviews/tdevappoutputview.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Application Output View -Comment[ca]=Visor de l'eixida de les aplicacions -Comment[da]=Program-uddata fremvisning -Comment[de]=Anwendungsausgabe für TDevelop -Comment[el]=Προβολή εξόδου εφαρμογής -Comment[es]=Visor de la salida de las aplicaciones -Comment[et]=Rakenduse väljundi vaade -Comment[eu]=Aplikazioen irteera ikustailua -Comment[fa]=نمای خروجی کاربرد -Comment[fr]=Fenêtre de sortie d'une application -Comment[gl]=Vista da saída da aplicación -Comment[hi]=अनुप्रयोग आउटपुट व्यू -Comment[hu]=Alkalmazáskimenet-megjelenítő -Comment[it]=Vista dell'output dell'applicazione -Comment[ja]=アプリケーション出力ビュー -Comment[ms]=Lihat Keluaran Aplikasi -Comment[nds]=Programmutgaav-Kieker -Comment[ne]=अनुप्रयोग निर्गत दृश्य -Comment[nl]=Weergave van toepassingsuitvoer -Comment[pl]=Widok wyjścia programu -Comment[pt]=Vista do Resultado da Aplicação -Comment[pt_BR]=Visão da Saída do Aplicativo -Comment[ru]=Окно вывода приложения -Comment[sk]=Pohľad na výstup aplikácie -Comment[sl]=Prikaz programskega izhoda -Comment[sr]=Приказ излаза апликације -Comment[sr@Latn]=Prikaz izlaza aplikacije -Comment[sv]=Programutmatningsvy -Comment[ta]=பயன்பாட்டு வெளியீட்டுக் காட்சி -Comment[tg]=Тирезаи хориҷ кардани гузориш -Comment[tr]=Uygulama Çıktı Görünümü -Comment[zh_CN]=应用程序输出查看器 -Comment[zh_TW]=應用程式輸出檢視 -Name=TDevAppOutputView -Name[da]=TDevelop Program-uddata fremvisning -Name[de]=Anwendungsausgabe (TDevelop) -Name[hi]=के-डेव-एप्प-आउटपुट-व्यू -Name[nds]=Programmutgaav-Kieker (TDevelop) -Name[pl]=TDevAppWidokWyjścia -Name[sk]=KDev pohľad na výstup aplikácie -Name[sv]=TDevelop programutmatningsvy -Name[ta]=TDevApp வெளியீட்டுக் காட்சி -Name[zh_TW]=TDevelop 應用程式輸出檢視 -GenericName=Application Output View -GenericName[ca]=Visor de l'eixida de les aplicacions -GenericName[da]=Program-uddata fremvisning -GenericName[de]=Anwendungsausgabe -GenericName[el]=Προβολή εξόδου εφαρμογής -GenericName[es]=Visor de la salida de las aplicaciones -GenericName[et]=Rakenduse väljundi vaade -GenericName[eu]=Aplikazioen irteera ikustailua -GenericName[fa]=نمای خروجی کاربرد -GenericName[fr]=Fenêtre de sortie d'une application -GenericName[gl]=Vista da saída da aplicación -GenericName[hi]=अनुप्रयोग आउटपुट व्यू -GenericName[hu]=Alkalmazáskimenet-megjelenítő -GenericName[it]=Visualizza l'output dell'applicazione -GenericName[ja]=アプリケーション出力ビュー -GenericName[nds]=Programmutgaav-Kieker -GenericName[ne]=अनुप्रयोग निर्गत दृश्य -GenericName[nl]=Weergave van toepassingsuitvoer -GenericName[pl]=Widok wyjścia programu -GenericName[pt]=Vista do Resultado da Aplicação -GenericName[pt_BR]=Visão da Saída do Aplicativo -GenericName[ru]=Окно вывода приложения -GenericName[sk]=Pohľad na výstup aplikácie -GenericName[sl]=Prikaz programskega izhoda -GenericName[sr]=Приказ излаза апликације -GenericName[sr@Latn]=Prikaz izlaza aplikacije -GenericName[sv]=Programutmatningsvy -GenericName[ta]=பயன்பாட்டு வெளியீட்டுக் காட்சி -GenericName[tg]=Тирезаи хориҷ кардани гузориш -GenericName[tr]=Uygulama Çıktı Görünümü -GenericName[zh_CN]=应用程序输出查看器 -GenericName[zh_TW]=應用程式輸出檢視 -Icon=exec -ServiceTypes=TDevelop/AppFrontend -X-TDE-Library=libtdevappview -X-TDevelop-Version=5 -X-TDevelop-Scope=Core -X-TDevelop-Properties=OutputTool diff --git a/parts/outputviews/tdevmakeview.desktop b/parts/outputviews/tdevmakeview.desktop deleted file mode 100644 index 5651f031..00000000 --- a/parts/outputviews/tdevmakeview.desktop +++ /dev/null @@ -1,87 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Compiler Frontend -Comment[ca]=Entorn per al compilador -Comment[da]=Grænseflade til oversætter -Comment[de]=Make-Ausgabe für TDevelop -Comment[el]=Πρόγραμμα μεταγλωττιστή -Comment[es]=Entorno para el compilador -Comment[et]=Kompilaatori kasutajaliides -Comment[eu]=Konpiladore interfazea -Comment[fa]=پایانۀ مترجم -Comment[fr]=Interface pour le compilateur -Comment[ga]=Comhéadan Tiomsaitheora -Comment[gl]=Frontal para o compilador -Comment[hi]=कम्पायलर फ्रन्टएण्ड -Comment[hu]=Grafikus felület fordítóprogramokhoz -Comment[it]=Interfaccia al compilatore -Comment[ja]=コンパイラフロントエンド -Comment[ms]=Frontend Penghimpun -Comment[nds]=Kompilerer-Böversiet -Comment[ne]=कम्पाइलर फ्रन्टइन्ड -Comment[nl]=Compiler-frontend -Comment[pl]=Interfejs do kompilatora -Comment[pt]=Interface de Compilador -Comment[pt_BR]=Frontend do Compilador -Comment[ru]=Интерфейс к компилятору -Comment[sk]=Rozhranie kompilátora -Comment[sl]=Vmesnik prevajalnika -Comment[sr]=Кориснички интерфејс за преводилац -Comment[sr@Latn]=Korisnički interfejs za prevodilac -Comment[sv]=Kompilatorgränssnitt -Comment[ta]=முன்பகுதி தொகுப்பான் -Comment[tg]=Интерфейс ба талфифгар -Comment[tr]=Derleyici Önucu -Comment[zh_CN]=编译器前端 -Comment[zh_TW]=編譯器前端介面 -Name=TDevMakeView -Name[da]=TDevelop Make-visning -Name[de]=Make-Ausgabe (TDevelop) -Name[hi]=के-डेव-मेक-व्यू -Name[nds]=Make-Kieker (TDevelop) -Name[pl]=KDevWIdokMake -Name[sk]=KDev pohľad na make -Name[sv]=TDevelop byggvy -Name[ta]=KDev காட்சியாக்கு -Name[zh_TW]=TDevelop Make 檢視 -GenericName=Compiler Frontend -GenericName[ca]=Entorn per al compilador -GenericName[da]=Grænseflade til oversætter -GenericName[de]=Make-Ausgabe -GenericName[el]=Πρόγραμμα μεταγλωττιστή -GenericName[es]=Entorno para el compilador -GenericName[et]=Kompilaatori kasutajaliides -GenericName[eu]=Konpiladore interfazea -GenericName[fa]=پایانۀ مترجم -GenericName[fr]=Interface pour le compilateur -GenericName[ga]=Comhéadan Tiomsaitheora -GenericName[gl]=Frontal para o compilador -GenericName[hi]=कम्पायलर फ्रन्टएण्ड -GenericName[hu]=Grafikus felület fordítóprogramokhoz -GenericName[it]=Interfaccia al compilatore -GenericName[ja]=コンパイラフロントエンド -GenericName[ms]=Frontend Penghimpun -GenericName[nds]=Kompilerer-Böversiet -GenericName[ne]=कम्पाइलर फ्रन्टइन्ड -GenericName[nl]=Compiler-frontend -GenericName[pl]=Interfejs do kompilatora -GenericName[pt]=Interface de Compilador -GenericName[pt_BR]=Frontend do Compilador -GenericName[ru]=Интерфейс к компилятору -GenericName[sk]=Rozhranie kompilátor -GenericName[sl]=Vmesnik prevajalnika -GenericName[sr]=Кориснички интерфејс преводиоца -GenericName[sr@Latn]=Korisnički interfejs prevodioca -GenericName[sv]=Kompilatorgränssnitt -GenericName[ta]=முன் பகுதி தொகுப்பான் -GenericName[tg]=Интерфейс ба талфифгар -GenericName[tr]=Derleyici Önucu -GenericName[zh_CN]=编译器前端 -GenericName[zh_TW]=編譯器前端介面 -Icon=konsole -ServiceTypes=TDevelop/MakeFrontend -X-TDE-Library=libtdevmakeview -X-TDevelop-Version=5 -X-TDevelop-Scope=Core -X-TDevelop-Properties=OutputTool diff --git a/parts/outputviews/tdevmakeview.rc b/parts/outputviews/tdevmakeview.rc deleted file mode 100644 index 869191cb..00000000 --- a/parts/outputviews/tdevmakeview.rc +++ /dev/null @@ -1,9 +0,0 @@ - - - -

    - - - - - diff --git a/parts/partexplorer/CMakeLists.txt b/parts/partexplorer/CMakeLists.txt index 8b9b130f..7fe5080f 100644 --- a/parts/partexplorer/CMakeLists.txt +++ b/parts/partexplorer/CMakeLists.txt @@ -25,13 +25,13 @@ link_directories( ##### other data ################################ -install( FILES tdevpartexplorer.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpartexplorer.rc DESTINATION ${DATA_INSTALL_DIR}/tdevpartexplorer ) +install( FILES kdevpartexplorer.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpartexplorer.rc DESTINATION ${DATA_INSTALL_DIR}/kdevpartexplorer ) -##### libtdevpartexplorer (module) ############## +##### libkdevpartexplorer (module) ############## -tde_add_kpart( libtdevpartexplorer AUTOMOC +tde_add_kpart( libkdevpartexplorer AUTOMOC SOURCES partexplorerformbase.ui partexplorerform.cpp partexplorer_plugin.cpp diff --git a/parts/partexplorer/Makefile.am b/parts/partexplorer/Makefile.am index b0d8dd8a..fcb6caff 100644 --- a/parts/partexplorer/Makefile.am +++ b/parts/partexplorer/Makefile.am @@ -2,16 +2,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces $(all_includes) -kde_module_LTLIBRARIES = libtdevpartexplorer.la -libtdevpartexplorer_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevpartexplorer_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevpartexplorer.la +libkdevpartexplorer_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevpartexplorer_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevpartexplorer_la_SOURCES = partexplorerformbase.ui partexplorerform.cpp partexplorer_plugin.cpp +libkdevpartexplorer_la_SOURCES = partexplorerformbase.ui partexplorerform.cpp partexplorer_plugin.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevpartexplorer.desktop +service_DATA = kdevpartexplorer.desktop -rcdir = $(kde_datadir)/tdevpartexplorer -rc_DATA = tdevpartexplorer.rc +rcdir = $(kde_datadir)/kdevpartexplorer +rc_DATA = kdevpartexplorer.rc diff --git a/parts/partexplorer/kdevpartexplorer.desktop b/parts/partexplorer/kdevpartexplorer.desktop new file mode 100644 index 00000000..ff432eeb --- /dev/null +++ b/parts/partexplorer/kdevpartexplorer.desktop @@ -0,0 +1,76 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=A Graphical tool for performing TDETrader-like queries about registered services +Comment[ca]=Una eina gràfica per a realitzar consultes del tipus TDETrader sobre els serveis registrats +Comment[da]=Et grafisk værktøj til at udføre TDETrader-lignende forespørgsler om registrerede tjenester +Comment[de]=Ein grafisches Werkzeug, mit dem Abfragen nach im System verfügbaren Komponten durchgeführt werden können +Comment[el]=Ένα γραφικό εργαλείο για την εκτέλεση ερωτήσεων όπως το TDETrader σχετικά με καταχωρημένες υπηρεσίες +Comment[es]=Una herramienta gráfica para realizar consultas del tipo TDETrader sobre los servicios registrados +Comment[et]=Graafiline vahend TDETraderi-laadsete päringute sooritamiseks registreeritud teenuste kohta +Comment[eu]=Erregistratutako zerbitzuei buruzko kontsultak egiteko, TDETrader-en antzeko tresna grafikoa +Comment[fa]=یک ابزار نگاره‌ای برای انجام TDETrader- مثل پرس‌وجوهایی در مورد خدمات ثبت‌شده +Comment[fr]=Un outil graphique pour effectuer des requêtes de type TDETrader sur les services enregistrés +Comment[gl]=Unha ferramente gráfica para realizar peticións tipo TDETrader dos servizos rexistrados +Comment[hu]=Grafikus felületű program a regisztrált szolgáltatások TDETrader-szerű lekérdezéséhez +Comment[it]=Uno strumento grafico per eseguire interrogazioni tipo TDETrader sui servizi registrati +Comment[ja]=登録されたサービスに関する TDETrader のような質問を実行するための視覚化されたツール +Comment[ms]=Alatan bergrafik untuk melaksanakan pertanyaan seperti-TDETrader mengenai servis berdaftar +Comment[nds]=En graafsch Warktüüch för TDETrader-liek Anfragen över indragen Deensten. +Comment[ne]=दर्ता गरेको सेवाका बारेमा क्वेरीहरू जस्तै-TDETrader कार्यसम्पादन गर्नका लागि एउटा ग्राफिकल उपकरण +Comment[nl]=Een grafische tool om naar geregistreerde diensten te zoeken +Comment[pl]=Narzędzie graficzne do wykonywania zapytań na temat zarejestrowanych usług (jak TDETrader) +Comment[pt]=Uma ferramenta gráfica para efectuar pesquisas do tipo TDETrader sobre os serviços registados +Comment[pt_BR]=Uma ferramenta Gráfica para realizar consultas como TDETrader sobre serviços registrados +Comment[ru]=Графическое средство для выполнения запросов TDETrader о зарегистрированных сервисах. +Comment[sk]=Grafický nástroj pre vyhľadávanie TDETraderregistrovaných služieb +Comment[sr]=Графички алат за обављање упита налик TDETrader-овим о регистрованим сервисима +Comment[sr@Latn]=Grafički alat za obavljanje upita nalik TDETrader-ovim o registrovanim servisima +Comment[sv]=Ett grafiskt verktyg för att utföra TDETrader-liknande förfrågningar om registrerade tjänster. +Comment[ta]=வரைகலை கருவி மூலம் பதிப்பு சேவையில் இருந்து Kட்ரேடர் கேள்விகளை செயலாக்கலாம். +Comment[tg]=Воситаи графикӣ барои иҷро намудани дархостҳои TDETrader дар бораи қайдкунии муҳаррирҳо +Comment[tr]=Kayıtlı servisler için TDETrader-benzeri sorgular yapmayı sağlayan bir grafiksel araç +Comment[zh_CN]=调用TDETrader的图形工具-就像查询已经注册的服务。 +Comment[zh_TW]=執行類似 TDETrader 查詢註冊服務的圖形化工具 +Name=KDevPartExplorer +Name[da]=TDevelop Part-søger +Name[nds]=TDevelop-Komponentkieker +Name[sk]=KDev Part prieskumník +Name[sv]=TDevelop delutforskare +Name[zh_TW]=TDevelop 元件探索 +GenericName=Part Explorer Tool +GenericName[ca]=Eina Part per a explorar +GenericName[da]=Partsøger værktøj +GenericName[de]=Komponenten-Explorer +GenericName[el]=Εργαλείο περιηγητή τμημάτων +GenericName[es]=Herramienta de exploración de partes +GenericName[et]=Komponentide näitaja +GenericName[eu]=Parteen arakatzaile tresna +GenericName[fa]=ابزار کاوشگر جزء +GenericName[fr]=Outil d'exploration des composants +GenericName[hu]=Objektumböngésző +GenericName[it]=Strumento per l'esplorazione di componenti +GenericName[ja]=部分調査ツール +GenericName[ms]=Alat Penjelajah Bahagian +GenericName[nds]=Kiekwarktüüch för Komponenten +GenericName[ne]=भाग एक्सप्लोरर उपकरण +GenericName[nl]=Part Explorer gereedschap +GenericName[pl]=Przeglądarka elementów KPart +GenericName[pt]=Ferramenta de Exploração de Partes +GenericName[pt_BR]=Ferramenta de Explorador de Parte +GenericName[ru]=Средство опроса компонентов +GenericName[sk]=Part prieskumník +GenericName[sl]=Orodje Part Explorer +GenericName[sr]=Алат за истраживање делова +GenericName[sr@Latn]=Alat za istraživanje delova +GenericName[sv]=Delutforskningsverktyg +GenericName[ta]=முழுவதும் தேடும் கருவியில் ஒரு பகுதி +GenericName[tg]=Восиати дархости қисматҳо +GenericName[tr]=Bileşen Gezinti Aracı +GenericName[zh_CN]=模块浏览器工具 +GenericName[zh_TW]=元件探索工具 +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevpartexplorer +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=KDEDevelopment diff --git a/parts/partexplorer/kdevpartexplorer.rc b/parts/partexplorer/kdevpartexplorer.rc new file mode 100644 index 00000000..9632115b --- /dev/null +++ b/parts/partexplorer/kdevpartexplorer.rc @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/parts/partexplorer/partexplorer_plugin.cpp b/parts/partexplorer/partexplorer_plugin.cpp index 43ab5717..d5240edb 100644 --- a/parts/partexplorer/partexplorer_plugin.cpp +++ b/parts/partexplorer/partexplorer_plugin.cpp @@ -13,28 +13,28 @@ #include #include -#include +#include #include #include #include -#include -#include +#include +#include #include "partexplorerform.h" -static const TDevPluginInfo data("tdevpartexplorer"); +static const KDevPluginInfo data("kdevpartexplorer"); -typedef TDevGenericFactory PartExplorerPluginFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevpartexplorer, PartExplorerPluginFactory( data ) ) +typedef KDevGenericFactory PartExplorerPluginFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevpartexplorer, PartExplorerPluginFactory( data ) ) PartExplorerPlugin::PartExplorerPlugin( TQObject *parent, const char *name, const TQStringList & ) - : TDevPlugin( &data, parent, name ? name : "PartExplorerPlugin" ) + : KDevPlugin( &data, parent, name ? name : "PartExplorerPlugin" ) { // we need an instance setInstance( PartExplorerPluginFactory::instance() ); - setXMLFile( "tdevpartexplorer.rc" ); + setXMLFile( "kdevpartexplorer.rc" ); // this should be your custom internal widget m_widget = new PartExplorerForm( mainWindow()->main() ); diff --git a/parts/partexplorer/partexplorer_plugin.h b/parts/partexplorer/partexplorer_plugin.h index 622ff002..eea44750 100644 --- a/parts/partexplorer/partexplorer_plugin.h +++ b/parts/partexplorer/partexplorer_plugin.h @@ -14,14 +14,14 @@ #include -#include "tdevplugin.h" +#include "kdevplugin.h" class TQWidget; class TQPainter; class KURL; class PartExplorerForm; -class PartExplorerPlugin : public TDevPlugin +class PartExplorerPlugin : public KDevPlugin { Q_OBJECT diff --git a/parts/partexplorer/tdevpartexplorer.desktop b/parts/partexplorer/tdevpartexplorer.desktop deleted file mode 100644 index 0e1242c4..00000000 --- a/parts/partexplorer/tdevpartexplorer.desktop +++ /dev/null @@ -1,76 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=A Graphical tool for performing TDETrader-like queries about registered services -Comment[ca]=Una eina gràfica per a realitzar consultes del tipus TDETrader sobre els serveis registrats -Comment[da]=Et grafisk værktøj til at udføre TDETrader-lignende forespørgsler om registrerede tjenester -Comment[de]=Ein grafisches Werkzeug, mit dem Abfragen nach im System verfügbaren Komponten durchgeführt werden können -Comment[el]=Ένα γραφικό εργαλείο για την εκτέλεση ερωτήσεων όπως το TDETrader σχετικά με καταχωρημένες υπηρεσίες -Comment[es]=Una herramienta gráfica para realizar consultas del tipo TDETrader sobre los servicios registrados -Comment[et]=Graafiline vahend TDETraderi-laadsete päringute sooritamiseks registreeritud teenuste kohta -Comment[eu]=Erregistratutako zerbitzuei buruzko kontsultak egiteko, TDETrader-en antzeko tresna grafikoa -Comment[fa]=یک ابزار نگاره‌ای برای انجام TDETrader- مثل پرس‌وجوهایی در مورد خدمات ثبت‌شده -Comment[fr]=Un outil graphique pour effectuer des requêtes de type TDETrader sur les services enregistrés -Comment[gl]=Unha ferramente gráfica para realizar peticións tipo TDETrader dos servizos rexistrados -Comment[hu]=Grafikus felületű program a regisztrált szolgáltatások TDETrader-szerű lekérdezéséhez -Comment[it]=Uno strumento grafico per eseguire interrogazioni tipo TDETrader sui servizi registrati -Comment[ja]=登録されたサービスに関する TDETrader のような質問を実行するための視覚化されたツール -Comment[ms]=Alatan bergrafik untuk melaksanakan pertanyaan seperti-TDETrader mengenai servis berdaftar -Comment[nds]=En graafsch Warktüüch för TDETrader-liek Anfragen över indragen Deensten. -Comment[ne]=दर्ता गरेको सेवाका बारेमा क्वेरीहरू जस्तै-TDETrader कार्यसम्पादन गर्नका लागि एउटा ग्राफिकल उपकरण -Comment[nl]=Een grafische tool om naar geregistreerde diensten te zoeken -Comment[pl]=Narzędzie graficzne do wykonywania zapytań na temat zarejestrowanych usług (jak TDETrader) -Comment[pt]=Uma ferramenta gráfica para efectuar pesquisas do tipo TDETrader sobre os serviços registados -Comment[pt_BR]=Uma ferramenta Gráfica para realizar consultas como TDETrader sobre serviços registrados -Comment[ru]=Графическое средство для выполнения запросов TDETrader о зарегистрированных сервисах. -Comment[sk]=Grafický nástroj pre vyhľadávanie TDETraderregistrovaných služieb -Comment[sr]=Графички алат за обављање упита налик TDETrader-овим о регистрованим сервисима -Comment[sr@Latn]=Grafički alat za obavljanje upita nalik TDETrader-ovim o registrovanim servisima -Comment[sv]=Ett grafiskt verktyg för att utföra TDETrader-liknande förfrågningar om registrerade tjänster. -Comment[ta]=வரைகலை கருவி மூலம் பதிப்பு சேவையில் இருந்து Kட்ரேடர் கேள்விகளை செயலாக்கலாம். -Comment[tg]=Воситаи графикӣ барои иҷро намудани дархостҳои TDETrader дар бораи қайдкунии муҳаррирҳо -Comment[tr]=Kayıtlı servisler için TDETrader-benzeri sorgular yapmayı sağlayan bir grafiksel araç -Comment[zh_CN]=调用TDETrader的图形工具-就像查询已经注册的服务。 -Comment[zh_TW]=執行類似 TDETrader 查詢註冊服務的圖形化工具 -Name=TDevPartExplorer -Name[da]=TDevelop Part-søger -Name[nds]=TDevelop-Komponentkieker -Name[sk]=KDev Part prieskumník -Name[sv]=TDevelop delutforskare -Name[zh_TW]=TDevelop 元件探索 -GenericName=Part Explorer Tool -GenericName[ca]=Eina Part per a explorar -GenericName[da]=Partsøger værktøj -GenericName[de]=Komponenten-Explorer -GenericName[el]=Εργαλείο περιηγητή τμημάτων -GenericName[es]=Herramienta de exploración de partes -GenericName[et]=Komponentide näitaja -GenericName[eu]=Parteen arakatzaile tresna -GenericName[fa]=ابزار کاوشگر جزء -GenericName[fr]=Outil d'exploration des composants -GenericName[hu]=Objektumböngésző -GenericName[it]=Strumento per l'esplorazione di componenti -GenericName[ja]=部分調査ツール -GenericName[ms]=Alat Penjelajah Bahagian -GenericName[nds]=Kiekwarktüüch för Komponenten -GenericName[ne]=भाग एक्सप्लोरर उपकरण -GenericName[nl]=Part Explorer gereedschap -GenericName[pl]=Przeglądarka elementów KPart -GenericName[pt]=Ferramenta de Exploração de Partes -GenericName[pt_BR]=Ferramenta de Explorador de Parte -GenericName[ru]=Средство опроса компонентов -GenericName[sk]=Part prieskumník -GenericName[sl]=Orodje Part Explorer -GenericName[sr]=Алат за истраживање делова -GenericName[sr@Latn]=Alat za istraživanje delova -GenericName[sv]=Delutforskningsverktyg -GenericName[ta]=முழுவதும் தேடும் கருவியில் ஒரு பகுதி -GenericName[tg]=Восиати дархости қисматҳо -GenericName[tr]=Bileşen Gezinti Aracı -GenericName[zh_CN]=模块浏览器工具 -GenericName[zh_TW]=元件探索工具 -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevpartexplorer -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=KDEDevelopment diff --git a/parts/partexplorer/tdevpartexplorer.rc b/parts/partexplorer/tdevpartexplorer.rc deleted file mode 100644 index 1dff4ed6..00000000 --- a/parts/partexplorer/tdevpartexplorer.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/parts/quickopen/CMakeLists.txt b/parts/quickopen/CMakeLists.txt index ad6fa926..cb82433f 100644 --- a/parts/quickopen/CMakeLists.txt +++ b/parts/quickopen/CMakeLists.txt @@ -28,13 +28,13 @@ link_directories( ##### other data ################################ -install( FILES tdevquickopen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_quickopen.rc DESTINATION ${DATA_INSTALL_DIR}/tdevquickopen ) +install( FILES kdevquickopen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_quickopen.rc DESTINATION ${DATA_INSTALL_DIR}/kdevquickopen ) -##### libtdevquickopen (module) ################# +##### libkdevquickopen (module) ################# -tde_add_kpart( libtdevquickopen AUTOMOC +tde_add_kpart( libkdevquickopen AUTOMOC SOURCES quickopen_part.cpp quickopendialog.cpp quickopenclassdialog.cpp quickopenbase.ui diff --git a/parts/quickopen/Makefile.am b/parts/quickopen/Makefile.am index cce44ae3..ca7ed3dd 100644 --- a/parts/quickopen/Makefile.am +++ b/parts/quickopen/Makefile.am @@ -1,17 +1,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions \ -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevquickopen.la -libtdevquickopen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevquickopen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevquickopen.la +libkdevquickopen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevquickopen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) -libtdevquickopen_la_SOURCES = quickopen_part.cpp quickopendialog.cpp quickopenclassdialog.cpp quickopenbase.ui quickopenfiledialog.cpp quickopenfunctiondialog.cpp quickopenfunctionchooseformbase.ui quickopenfunctionchooseform.cpp +libkdevquickopen_la_SOURCES = quickopen_part.cpp quickopendialog.cpp quickopenclassdialog.cpp quickopenbase.ui quickopenfiledialog.cpp quickopenfunctiondialog.cpp quickopenfunctionchooseformbase.ui quickopenfunctionchooseform.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevquickopen.desktop +service_DATA = kdevquickopen.desktop -rcdir = $(kde_datadir)/tdevquickopen -rc_DATA = tdevpart_quickopen.rc +rcdir = $(kde_datadir)/kdevquickopen +rc_DATA = kdevpart_quickopen.rc noinst_HEADERS = quickopendialog.h quickopenclassdialog.h quickopenfiledialog.h quickopenfunctiondialog.h quickopenfunctionchooseform.h diff --git a/parts/quickopen/kdevpart_quickopen.rc b/parts/quickopen/kdevpart_quickopen.rc new file mode 100644 index 00000000..6a50fc22 --- /dev/null +++ b/parts/quickopen/kdevpart_quickopen.rc @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/parts/quickopen/kdevquickopen.desktop b/parts/quickopen/kdevquickopen.desktop new file mode 100644 index 00000000..42a8e8ff --- /dev/null +++ b/parts/quickopen/kdevquickopen.desktop @@ -0,0 +1,80 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides an efficient way of finding/opening files, classes and methods in a large project. Appears in the File and Tools menus when loaded. +Comment[ca]=Proporciona un mètode eficient per a cercar i obrir fitxers, classes i mètodes en un projecte gran. Quan està carregat apareix en el menú Fitxer i Eines. +Comment[da]=Giver en effektiv måde at finde/åbne, filer, klasser og metoder i et stort projekt. Viser sig i Fil- og værktøjsmenuerne når den er indlæst. +Comment[de]=Stellt eine effektive Möglichkeit zum Suchen und Öffnen von Dateien in einem großen Projekt zur Verfügung. Erscheint im Menü "Datei", wenn es geladen ist. +Comment[el]=Προσφέρει μια εύχρηστη μέθοδο αναζήτησης/ανοίγματος αρχείων, κλάσεων και μεθόδων σε ένα μεγάλο έργο. Εμφανίζεται στα μενού αρχείων και εργαλείων όταν φορτωθεί. +Comment[es]=Proporciona un método para para buscar/abrir archivos, clases y métodos de un proyecto grande. Aparece en los menús Archivo y Herramientas cuando está cargado. +Comment[et]=Võimaldab hõlpsasti leida/avada faile, klasse ja meetodeid suures projektis. Laadimisel kättesaadav faili- ja tööriistade menüüs. +Comment[eu]=Proiektu handi batean fitxategiak, klaseak eta metodoak aurkitzeko/irekitzeko aukera eskeintzen du. Fitxategia eta Tresnak menutan agertzen da kargatzean. +Comment[fa]=راه مؤثری برای یافتن/باز کردن پرونده‌ها، رده‌ها و روشها در پروژه‌های بزرگ فراهم می‌کند. در هنگام بارگذاری در گزینگان ابزار و پرونده ظاهر می‌شود. +Comment[fr]=Fournit une manière efficace pour chercher / ouvrir des fichiers, classes et méthodes dans des grands projets. Apparaît dans les menus « Fichier » et « Outils » lorsque chargé. +Comment[gl]=Proporciona un método eficiente para atopar/abrir ficheiros, clases e métodos nun proxecto grande. Aparece nos menús Ficheiro e Ferramentas cando se carga. +Comment[hu]=Segítséget nyújt nagy projekteknél fájlok, osztályok és tagfüggvények kereséséhez, megnyitásához. Betöltéskor a Fájl és Eszközök menübe kerül. +Comment[it]=Offre un modo efficiente per trovare/aprire file, classi e metodi in un progetto di ampia dimensione. Appare nel menu File e Strumenti quando caricato. +Comment[ja]=大規模なプロジェクトでのファイルやクラス、メソッドを検索したり開く効率的な方法を提供します。読み込まれると、ファイルとツールのメニューに現れます。 +Comment[ms]=Menyediakan cara efisien untuk mencari/membuka fail, kelas dan kaedah dalam projek besar. Muncul sebagai menu Fail dan Alatan apabila dimuatkan. +Comment[nds]=Stellt en effektiv Metood för't Söken un Opmaken vun Dateien, Klassen un Metoden in grötter Projekten praat. Dukt in't Menü "Datei" un "Warktüüch" op, wenn laadt. +Comment[ne]=ठूलो परियोजनामा फाइल फेला पार्ने/खोल्ने, कक्षहरू र विधिको उपयुक्त तरिका प्रदान गर्दछ । लोड भएको बेलामा फाइल र उपकरणमा देखा पर्दछ । +Comment[nl]=Biedt een snelle manier om bestanden te vinden/openen in een groot project. Verschijnt in menu Bestand en Gereedschap als het geladen is. +Comment[pl]=Umożliwia wyszukiwanie/otwieranie plików, klas i metod w dużym projekcie. Po wczytaniu pojawia się w menu Plik i Narzędzia. +Comment[pt]=Oferece uma forma eficiente de procurar/abrir ficheiros, classes e métodos num projecto grande. Aparece nos menus Ficheiro e Ferramentas quando é carregado. +Comment[pt_BR]=Fornece uma maneira eficiente de procurar/abrir arquivos, classes e métodos em um grande projeto. Aparece nos menus Arquivo e Ferramentas quando carregado. +Comment[ru]=Предоставляет эффективное средство нахождения и открытия файлов и классов в больших проектах. +Comment[sk]=Poskytuje efektívny spôsob hľadania/otvárania súborov, tried a metód vo veľkom projekte. Po načítaní sa objaví v menu Súbor a Nástroje. +Comment[sr]=Обезбеђује ефикасан начин проналажења/отварања фајлова, класа и метода у великом пројекту. Појављује се у менијима „Фајл“ и „Алати“ када је учитан. +Comment[sr@Latn]=Obezbeđuje efikasan način pronalaženja/otvaranja fajlova, klasa i metoda u velikom projektu. Pojavljuje se u menijima „Fajl“ i „Alati“ kada je učitan. +Comment[sv]=Erbjuder ett effektivt sätt att hitta och öppna filer, klasser och metoder i ett stort projekt. Finns i menyn Arkiv och Verktyg när det laddats. +Comment[ta]=பெரிய திட்ட பணிகளில் உள்ள கோப்பினை திறக்க/தேட இது ஒரு நல்ல வழியை தரும். ஏற்றியபின் கோப்பு பட்டியலில் இது தோன்றும். +Comment[tg]=Воситаи зуд ёфтан, кушодани файлҳо ва синфҳо дар лоиҳаҳоро имкон медиҳад. +Comment[tr]=Büyük bir projede dosyaları, sınıfları ve yöntemleri bulmak ve açmak için verimli bir yol sunar. Yüklendiğinde Dosya ve Araçlar menüsünde durur. +Comment[zh_CN]=提供在大工程中查找/打开文件、类和方法的有效方法。启动后显示在文件菜单中。 +Comment[zh_TW]=在大型專案中有效率地尋找/開啟檔案、類別與方法。載入後可以在檔案與工具選單中找到。 +Name=KDevQuickOpen +Name[da]=TDevelop hurtigåbner +Name[de]=Schnellöffner-Komponente (TDevelop) +Name[hi]=के-डेव-क्विक-ओपन +Name[nds]=TDevelop-Fixopmaker +Name[pl]=KDevSzybkieOtwarcie +Name[sk]=KDev rýchle otvorenie +Name[sv]=TDevelop snabböppna +Name[ta]=KDev சீக்கிரம் திற +Name[zh_TW]=TDevelop 快速開啟 +GenericName=QuickOpen +GenericName[ca]=Obertura ràpida +GenericName[da]=Hurtigåbner +GenericName[de]=Schnellöffner +GenericName[el]=ΓρήγοροΆνοιγμα +GenericName[es]=Apertura rápida +GenericName[et]=Kiiresti avamine +GenericName[fa]=باز کردن سریع +GenericName[fr]=Ouverture rapide +GenericName[gl]=Apertura rápida +GenericName[hi]=क्विक-ओपन +GenericName[hu]=Gyors fájlmegnyitó +GenericName[it]=Apertura rapida +GenericName[ja]=簡易読み込み +GenericName[nds]=Gau opmaken +GenericName[ne]=शीघ्र खुला +GenericName[nl]=Snel openen +GenericName[pl]=Szybkie otwarcie +GenericName[pt]=Abertura Rápida +GenericName[ru]=Быстрое открытие +GenericName[sk]=Rýchle otvorenie +GenericName[sl]=Hitro odprtje +GenericName[sr]=Брзо отварање +GenericName[sr@Latn]=Brzo otvaranje +GenericName[sv]=Snabböppna +GenericName[ta]=சீக்கிரம் திற +GenericName[tg]=Ба зуди кушодан +GenericName[tr]=HızlıAç +GenericName[zh_CN]=快速打开 +GenericName[zh_TW]=快速開啟 +Icon=tdevelop +ServiceTypes=TDevelop/QuickOpen +X-TDevelop-Scope=Project +X-TDE-Library=libkdevquickopen +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeNavigation diff --git a/parts/quickopen/quickopen_part.cpp b/parts/quickopen/quickopen_part.cpp index 3a8a10c4..4d316e68 100644 --- a/parts/quickopen/quickopen_part.cpp +++ b/parts/quickopen/quickopen_part.cpp @@ -27,25 +27,25 @@ #include #include #include -#include -#include +#include +#include #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" -typedef TDevGenericFactory QuickOpenFactory; -static const TDevPluginInfo data("tdevquickopen"); -K_EXPORT_COMPONENT_FACTORY( libtdevquickopen, QuickOpenFactory( data ) ) +typedef KDevGenericFactory QuickOpenFactory; +static const KDevPluginInfo data("kdevquickopen"); +K_EXPORT_COMPONENT_FACTORY( libkdevquickopen, QuickOpenFactory( data ) ) using namespace KTextEditor; @@ -53,7 +53,7 @@ QuickOpenPart::QuickOpenPart(TQObject *parent, const char *name, const TQStringL : KDevQuickOpen(&data, parent, name ? name : "QuickOpenPart" ) { setInstance(QuickOpenFactory::instance()); - setXMLFile("tdevpart_quickopen.rc"); + setXMLFile("kdevpart_quickopen.rc"); m_actionQuickOpen = new TDEAction( i18n("Quick Open File..."), CTRL + ALT + Key_O, this, TQT_SLOT(slotQuickFileOpen()), @@ -100,14 +100,14 @@ void QuickOpenPart::slotQuickFileOpen( ) void QuickOpenPart::slotQuickOpenClass( ) { QuickOpenClassDialog dlg( this, mainWindow()->main() ); - dlg.nameEdit->setText( TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ) ); + dlg.nameEdit->setText( KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ) ); dlg.exec(); } void QuickOpenPart::slotQuickOpenFunction() { QuickOpenFunctionDialog dlg( this, mainWindow()->main() ); - dlg.nameEdit->setText( TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ) ); + dlg.nameEdit->setText( KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ) ); dlg.exec(); } @@ -119,7 +119,7 @@ void QuickOpenPart::slotSwitchTo() void QuickOpenPart::selectItem( ItemDom item ) { - Extensions::TDevCodeBrowserFrontend* f = extension< Extensions::TDevCodeBrowserFrontend > ( "KDevelop/CodeBrowserFrontend" ); + Extensions::KDevCodeBrowserFrontend* f = extension< Extensions::KDevCodeBrowserFrontend > ( "KDevelop/CodeBrowserFrontend" ); if(f != 0) { ItemDom itemDom( &(*item) ); diff --git a/parts/quickopen/quickopen_part.h b/parts/quickopen/quickopen_part.h index aff0d4f6..fa1d85e3 100644 --- a/parts/quickopen/quickopen_part.h +++ b/parts/quickopen/quickopen_part.h @@ -18,11 +18,11 @@ * */ -#ifndef __TDEVPART_QUICKOPEN_H__ -#define __TDEVPART_QUICKOPEN_H__ +#ifndef __KDEVPART_QUICKOPEN_H__ +#define __KDEVPART_QUICKOPEN_H__ #include -#include +#include #include class TDEAction; diff --git a/parts/quickopen/quickopenclassdialog.cpp b/parts/quickopen/quickopenclassdialog.cpp index 7dcfd48b..37987166 100644 --- a/parts/quickopen/quickopenclassdialog.cpp +++ b/parts/quickopen/quickopenclassdialog.cpp @@ -18,9 +18,9 @@ * */ -#include -#include -#include +#include +#include +#include #include #include diff --git a/parts/quickopen/quickopenfiledialog.cpp b/parts/quickopen/quickopenfiledialog.cpp index fc8da49a..18f15974 100644 --- a/parts/quickopen/quickopenfiledialog.cpp +++ b/parts/quickopen/quickopenfiledialog.cpp @@ -18,8 +18,8 @@ * */ -#include -#include +#include +#include #include diff --git a/parts/quickopen/quickopenfunctiondialog.cpp b/parts/quickopen/quickopenfunctiondialog.cpp index 14f7a984..bbcab7e4 100644 --- a/parts/quickopen/quickopenfunctiondialog.cpp +++ b/parts/quickopen/quickopenfunctiondialog.cpp @@ -28,11 +28,11 @@ #include #include -#include +#include #include -#include -#include -#include +#include +#include +#include #include diff --git a/parts/quickopen/tdevpart_quickopen.rc b/parts/quickopen/tdevpart_quickopen.rc deleted file mode 100644 index 6a50fc22..00000000 --- a/parts/quickopen/tdevpart_quickopen.rc +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/parts/quickopen/tdevquickopen.desktop b/parts/quickopen/tdevquickopen.desktop deleted file mode 100644 index ed500ad4..00000000 --- a/parts/quickopen/tdevquickopen.desktop +++ /dev/null @@ -1,80 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides an efficient way of finding/opening files, classes and methods in a large project. Appears in the File and Tools menus when loaded. -Comment[ca]=Proporciona un mètode eficient per a cercar i obrir fitxers, classes i mètodes en un projecte gran. Quan està carregat apareix en el menú Fitxer i Eines. -Comment[da]=Giver en effektiv måde at finde/åbne, filer, klasser og metoder i et stort projekt. Viser sig i Fil- og værktøjsmenuerne når den er indlæst. -Comment[de]=Stellt eine effektive Möglichkeit zum Suchen und Öffnen von Dateien in einem großen Projekt zur Verfügung. Erscheint im Menü "Datei", wenn es geladen ist. -Comment[el]=Προσφέρει μια εύχρηστη μέθοδο αναζήτησης/ανοίγματος αρχείων, κλάσεων και μεθόδων σε ένα μεγάλο έργο. Εμφανίζεται στα μενού αρχείων και εργαλείων όταν φορτωθεί. -Comment[es]=Proporciona un método para para buscar/abrir archivos, clases y métodos de un proyecto grande. Aparece en los menús Archivo y Herramientas cuando está cargado. -Comment[et]=Võimaldab hõlpsasti leida/avada faile, klasse ja meetodeid suures projektis. Laadimisel kättesaadav faili- ja tööriistade menüüs. -Comment[eu]=Proiektu handi batean fitxategiak, klaseak eta metodoak aurkitzeko/irekitzeko aukera eskeintzen du. Fitxategia eta Tresnak menutan agertzen da kargatzean. -Comment[fa]=راه مؤثری برای یافتن/باز کردن پرونده‌ها، رده‌ها و روشها در پروژه‌های بزرگ فراهم می‌کند. در هنگام بارگذاری در گزینگان ابزار و پرونده ظاهر می‌شود. -Comment[fr]=Fournit une manière efficace pour chercher / ouvrir des fichiers, classes et méthodes dans des grands projets. Apparaît dans les menus « Fichier » et « Outils » lorsque chargé. -Comment[gl]=Proporciona un método eficiente para atopar/abrir ficheiros, clases e métodos nun proxecto grande. Aparece nos menús Ficheiro e Ferramentas cando se carga. -Comment[hu]=Segítséget nyújt nagy projekteknél fájlok, osztályok és tagfüggvények kereséséhez, megnyitásához. Betöltéskor a Fájl és Eszközök menübe kerül. -Comment[it]=Offre un modo efficiente per trovare/aprire file, classi e metodi in un progetto di ampia dimensione. Appare nel menu File e Strumenti quando caricato. -Comment[ja]=大規模なプロジェクトでのファイルやクラス、メソッドを検索したり開く効率的な方法を提供します。読み込まれると、ファイルとツールのメニューに現れます。 -Comment[ms]=Menyediakan cara efisien untuk mencari/membuka fail, kelas dan kaedah dalam projek besar. Muncul sebagai menu Fail dan Alatan apabila dimuatkan. -Comment[nds]=Stellt en effektiv Metood för't Söken un Opmaken vun Dateien, Klassen un Metoden in grötter Projekten praat. Dukt in't Menü "Datei" un "Warktüüch" op, wenn laadt. -Comment[ne]=ठूलो परियोजनामा फाइल फेला पार्ने/खोल्ने, कक्षहरू र विधिको उपयुक्त तरिका प्रदान गर्दछ । लोड भएको बेलामा फाइल र उपकरणमा देखा पर्दछ । -Comment[nl]=Biedt een snelle manier om bestanden te vinden/openen in een groot project. Verschijnt in menu Bestand en Gereedschap als het geladen is. -Comment[pl]=Umożliwia wyszukiwanie/otwieranie plików, klas i metod w dużym projekcie. Po wczytaniu pojawia się w menu Plik i Narzędzia. -Comment[pt]=Oferece uma forma eficiente de procurar/abrir ficheiros, classes e métodos num projecto grande. Aparece nos menus Ficheiro e Ferramentas quando é carregado. -Comment[pt_BR]=Fornece uma maneira eficiente de procurar/abrir arquivos, classes e métodos em um grande projeto. Aparece nos menus Arquivo e Ferramentas quando carregado. -Comment[ru]=Предоставляет эффективное средство нахождения и открытия файлов и классов в больших проектах. -Comment[sk]=Poskytuje efektívny spôsob hľadania/otvárania súborov, tried a metód vo veľkom projekte. Po načítaní sa objaví v menu Súbor a Nástroje. -Comment[sr]=Обезбеђује ефикасан начин проналажења/отварања фајлова, класа и метода у великом пројекту. Појављује се у менијима „Фајл“ и „Алати“ када је учитан. -Comment[sr@Latn]=Obezbeđuje efikasan način pronalaženja/otvaranja fajlova, klasa i metoda u velikom projektu. Pojavljuje se u menijima „Fajl“ i „Alati“ kada je učitan. -Comment[sv]=Erbjuder ett effektivt sätt att hitta och öppna filer, klasser och metoder i ett stort projekt. Finns i menyn Arkiv och Verktyg när det laddats. -Comment[ta]=பெரிய திட்ட பணிகளில் உள்ள கோப்பினை திறக்க/தேட இது ஒரு நல்ல வழியை தரும். ஏற்றியபின் கோப்பு பட்டியலில் இது தோன்றும். -Comment[tg]=Воситаи зуд ёфтан, кушодани файлҳо ва синфҳо дар лоиҳаҳоро имкон медиҳад. -Comment[tr]=Büyük bir projede dosyaları, sınıfları ve yöntemleri bulmak ve açmak için verimli bir yol sunar. Yüklendiğinde Dosya ve Araçlar menüsünde durur. -Comment[zh_CN]=提供在大工程中查找/打开文件、类和方法的有效方法。启动后显示在文件菜单中。 -Comment[zh_TW]=在大型專案中有效率地尋找/開啟檔案、類別與方法。載入後可以在檔案與工具選單中找到。 -Name=KDevQuickOpen -Name[da]=TDevelop hurtigåbner -Name[de]=Schnellöffner-Komponente (TDevelop) -Name[hi]=के-डेव-क्विक-ओपन -Name[nds]=TDevelop-Fixopmaker -Name[pl]=KDevSzybkieOtwarcie -Name[sk]=KDev rýchle otvorenie -Name[sv]=TDevelop snabböppna -Name[ta]=KDev சீக்கிரம் திற -Name[zh_TW]=TDevelop 快速開啟 -GenericName=QuickOpen -GenericName[ca]=Obertura ràpida -GenericName[da]=Hurtigåbner -GenericName[de]=Schnellöffner -GenericName[el]=ΓρήγοροΆνοιγμα -GenericName[es]=Apertura rápida -GenericName[et]=Kiiresti avamine -GenericName[fa]=باز کردن سریع -GenericName[fr]=Ouverture rapide -GenericName[gl]=Apertura rápida -GenericName[hi]=क्विक-ओपन -GenericName[hu]=Gyors fájlmegnyitó -GenericName[it]=Apertura rapida -GenericName[ja]=簡易読み込み -GenericName[nds]=Gau opmaken -GenericName[ne]=शीघ्र खुला -GenericName[nl]=Snel openen -GenericName[pl]=Szybkie otwarcie -GenericName[pt]=Abertura Rápida -GenericName[ru]=Быстрое открытие -GenericName[sk]=Rýchle otvorenie -GenericName[sl]=Hitro odprtje -GenericName[sr]=Брзо отварање -GenericName[sr@Latn]=Brzo otvaranje -GenericName[sv]=Snabböppna -GenericName[ta]=சீக்கிரம் திற -GenericName[tg]=Ба зуди кушодан -GenericName[tr]=HızlıAç -GenericName[zh_CN]=快速打开 -GenericName[zh_TW]=快速開啟 -Icon=tdevelop -ServiceTypes=TDevelop/QuickOpen -X-TDevelop-Scope=Project -X-TDE-Library=libtdevquickopen -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeNavigation diff --git a/parts/regexptest/CMakeLists.txt b/parts/regexptest/CMakeLists.txt index 3bc96414..608f053c 100644 --- a/parts/regexptest/CMakeLists.txt +++ b/parts/regexptest/CMakeLists.txt @@ -25,13 +25,13 @@ link_directories( ##### other data ################################ -install( FILES tdevregexptest.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevregexptest.rc DESTINATION ${DATA_INSTALL_DIR}/tdevregexptest ) +install( FILES kdevregexptest.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevregexptest.rc DESTINATION ${DATA_INSTALL_DIR}/kdevregexptest ) -##### libtdevregexptest (module) ################ +##### libkdevregexptest (module) ################ -tde_add_kpart( libtdevregexptest AUTOMOC +tde_add_kpart( libkdevregexptest AUTOMOC SOURCES regexptestpart.cpp regexptestdlg.cpp regexptestdlgbase.ui LINK tdevelop-shared diff --git a/parts/regexptest/Makefile.am b/parts/regexptest/Makefile.am index 8e87ac79..df99989f 100644 --- a/parts/regexptest/Makefile.am +++ b/parts/regexptest/Makefile.am @@ -2,16 +2,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces $(all_includes) -kde_module_LTLIBRARIES = libtdevregexptest.la -libtdevregexptest_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevregexptest_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevregexptest.la +libkdevregexptest_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevregexptest_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevregexptest_la_SOURCES = regexptestpart.cpp regexptestdlg.cpp regexptestdlgbase.ui +libkdevregexptest_la_SOURCES = regexptestpart.cpp regexptestdlg.cpp regexptestdlgbase.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevregexptest.desktop +service_DATA = kdevregexptest.desktop -rcdir = $(kde_datadir)/tdevregexptest -rc_DATA = tdevregexptest.rc +rcdir = $(kde_datadir)/kdevregexptest +rc_DATA = kdevregexptest.rc diff --git a/parts/regexptest/kdevregexptest.desktop b/parts/regexptest/kdevregexptest.desktop new file mode 100644 index 00000000..57f93f73 --- /dev/null +++ b/parts/regexptest/kdevregexptest.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Tool to design and test regular expressions against common regexp syntaxes. +Comment[ca]=Eina per a dissenyar i provar expressions regulars amb sintaxis d'expressions regulars comuns. +Comment[da]=Værktøj til at designe og teste regulære udtryk imod almindelige regexp syntakser. +Comment[de]=Ein Werkzeug zum Erstellen und Testen regulärer Ausdrücke. +Comment[el]=Εργαλείο για το σχεδιασμό και τη δοκιμή κανονικών εκφράσεων με κοινή σύνταξη κανονικών εκφράσεων. +Comment[es]=Herramienta para diseñar y probar expresiones regulares con sintaxis comunes. +Comment[et]=Vahend regulaaravaldiste loomiseks ja korrektsuse testimiseks. +Comment[eu]=Ohizko regexp sintaxiaren arabera espresio erregularra diseinatu eta egiaztatzeko tresna. +Comment[fa]=ابزاری برای طراحی و آزمودن عبارتهای منظم در برابر نحوهای مشترک عبارت منظم +Comment[fr]=Outil pour créer et tester des expressions rationnelles par rapport aux syntaxes des expressions rationnnelles communes. +Comment[gl]=Ferramenta para deseñar e probar expresións regulares con sintaxes típicas para expresións regulares +Comment[hu]=Tervezőprogram reguláris kifejezések tervezéséhez és teszteléséhez, többféle szintaxis szerint +Comment[it]=Strumento per progettare e verificare espressioni regolari con le sintassi comuni di regexp. +Comment[ja]=共通の regexp 構文に対する正規表現を設計したりテストするツール +Comment[ms]=Alatan untuk mereka dan menguji regular expressions berbanding sintaks biasa regexp. +Comment[nds]=En Warktüüch för't Opstellen un Utproberen vun reguleer Utdrück in en Reeg "regexp"-Schriefwiesen. +Comment[ne]=साझा रेगेक्प वाक्य संरचनाको बिरूद्ध नियमित अभिव्यक्ति डिजाइन र परीक्षण गर्ने उपकरण । +Comment[nl]=Gereedschap voor het ontwerpen en testen van reguliere expressies. +Comment[pl]=Narzędzie do tworzenia i testowania wyrażeń regularnych. +Comment[pt]=Uma ferramenta para desenhar e testar expressões regulares sobre várias sintaxes comuns de expressões. +Comment[pt_BR]=Ferramenta para desenvolver e testar expressões regulares com base na sintaxe comum das regexp. +Comment[ru]=Средство для определения и проверки регулярных выражений на предмет соответствия их наиболее распространённым вариантам синтаксиса. +Comment[sk]=Nástroj pre dizajn a testovanie regulárnych výrazov. +Comment[sr]=Алат за дизајн и тестирање регуларних израза насупрот уобичајеним рег.из. синтаксама. +Comment[sr@Latn]=Alat za dizajn i testiranje regularnih izraza nasuprot uobičajenim reg.iz. sintaksama. +Comment[sv]=Verktyg för att skapa och testa reguljära uttryck mot vanlig syntax för reguljära uttryck. +Comment[ta]=ரேக்ஸ்ப் தொடரமைப்பதற்கு எதிராக கருவி உபயோகித்து வரைதல் மற்றும் வாடிக்கையான தொடர்களை பரிசோதிக்க. +Comment[tg]=Восита барои муаян намудан ва тафтиш намудани баёни ботартиб дар асоси ҷорӣ шудаи вариантҳои синтаксисӣ менамояд. +Comment[tr]=Genel regexp söz dizimlerine karşı düzenli ifadeleri düzenlemeye ve test etmeye yarayan araç. +Comment[zh_CN]=依据通用正则表达式语法进行正则表达式设计和测试的工具。 +Comment[zh_TW]=設計、測試正規表示式語法的工具。 +Name=KDevRegexpTest +Name[da]=TDevelop test af regulære udtryk +Name[de]=RegExp-Überprüfung (TDevelop) +Name[hi]=के-डेव-रेगएक्सपी-टेक्स्ट +Name[nds]=RegExp-Prööv (TDevelop) +Name[pl]=KDevTestWyrReg +Name[sk]=KDev Regexp test +Name[sv]=TDevelop test av reguljära uttryck +Name[ta]=Kடேவ்ரெக்ஸ்ப் சோதனை +Name[zh_TW]=TDevelop 正規表示式測試 +GenericName=Regular Expression Tester +GenericName[ca]=Comprovador d'expressions regulars +GenericName[da]=Test af regulære udtryk +GenericName[de]=RegExp-Überprüfung +GenericName[el]=Δοκιμαστής κανονικών εκφράσεων +GenericName[es]=Comprobador de expresiones regulares +GenericName[et]=Regulaaravaldiste testija +GenericName[eu]=Espresio erregular egiaztatzailea +GenericName[fa]=آزمایندۀ عبارت منظم +GenericName[fr]=Testeur d'expressions rationnelles +GenericName[gl]=Comprobador de expresións regulares +GenericName[hi]=रेगुलर एक्सप्रेशन टेस्टर +GenericName[hu]=Tesztprogram reguláris kifejezésekhez +GenericName[it]=Verificatore per espressioni regolari +GenericName[ja]=正規表現テスタ +GenericName[ms]=Penguji Regular Expression +GenericName[nds]=RegExp-Prööv +GenericName[ne]=नियमित अभिव्यक्ति परीक्षक +GenericName[nl]=Reguliere expressie-tester +GenericName[pl]=Tester wyrażeń regularnych +GenericName[pt]=Ferramenta de Teste de Expressões Regulares +GenericName[pt_BR]=Testador de Expressão Regular +GenericName[ru]=Проверка регулярных выражений +GenericName[sk]=Tester pre regulárne výrazy +GenericName[sl]=Preverjalnik regularnih izrazov +GenericName[sr]=Тестер регуларних израза +GenericName[sr@Latn]=Tester regularnih izraza +GenericName[sv]=Test av reguljära uttryck +GenericName[ta]=வாடிக்கையான தொடர்களை பரிசோதிப்பவர். +GenericName[tg]=Тафтиши баёни ботартиб +GenericName[tr]=Düzenli İfade Test Edicisi +GenericName[zh_CN]=正则表达式测试 +GenericName[zh_TW]=正規表示式測試器 +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevregexptest +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=ScriptDevelopment,CDevelopment,CPPDevelopment diff --git a/parts/regexptest/kdevregexptest.rc b/parts/regexptest/kdevregexptest.rc new file mode 100644 index 00000000..99893d7f --- /dev/null +++ b/parts/regexptest/kdevregexptest.rc @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/parts/regexptest/regexptestdlg.cpp b/parts/regexptest/regexptestdlg.cpp index 200bee12..bd426411 100644 --- a/parts/regexptest/regexptestdlg.cpp +++ b/parts/regexptest/regexptestdlg.cpp @@ -32,11 +32,11 @@ #include #include -#include "tdevplugin.h" -#include "tdevpartcontroller.h" +#include "kdevplugin.h" +#include "kdevpartcontroller.h" -RegexpTestDialog::RegexpTestDialog(TDevPlugin *part) +RegexpTestDialog::RegexpTestDialog(KDevPlugin *part) : RegexpTestDialogBase(0, "regexp test dialog", false), _regexp_dialog(0) { pattern_edit->setFocus(); diff --git a/parts/regexptest/regexptestdlg.h b/parts/regexptest/regexptestdlg.h index 09e656d2..4c7094a6 100644 --- a/parts/regexptest/regexptestdlg.h +++ b/parts/regexptest/regexptestdlg.h @@ -14,7 +14,7 @@ #include "regexptestdlgbase.h" -class TDevPlugin; +class KDevPlugin; class RegexpTestDialog : public RegexpTestDialogBase @@ -23,7 +23,7 @@ class RegexpTestDialog : public RegexpTestDialogBase public: - RegexpTestDialog( TDevPlugin *part ); + RegexpTestDialog( KDevPlugin *part ); ~RegexpTestDialog(); protected: @@ -39,7 +39,7 @@ private: virtual void checkKRegExp(); virtual void insertQuoted(); - TDevPlugin *m_part; + KDevPlugin *m_part; TQDialog * _regexp_dialog; }; diff --git a/parts/regexptest/regexptestpart.cpp b/parts/regexptest/regexptestpart.cpp index 0ca0b083..6c45a492 100644 --- a/parts/regexptest/regexptestpart.cpp +++ b/parts/regexptest/regexptestpart.cpp @@ -12,23 +12,23 @@ #include "regexptestpart.h" #include -#include -#include +#include +#include #include -#include "tdevcore.h" +#include "kdevcore.h" #include "regexptestdlg.h" -static const TDevPluginInfo data("tdevregexptest"); +static const KDevPluginInfo data("kdevregexptest"); -typedef TDevGenericFactory RegexpTestFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevregexptest, RegexpTestFactory( data ) ) +typedef KDevGenericFactory RegexpTestFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevregexptest, RegexpTestFactory( data ) ) RegexpTestPart::RegexpTestPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "RegexpTestPart") + : KDevPlugin(&data, parent, name ? name : "RegexpTestPart") { setInstance(RegexpTestFactory::instance()); - setXMLFile("tdevregexptest.rc"); + setXMLFile("kdevregexptest.rc"); TDEAction *action; diff --git a/parts/regexptest/regexptestpart.h b/parts/regexptest/regexptestpart.h index 3488e910..ec153d90 100644 --- a/parts/regexptest/regexptestpart.h +++ b/parts/regexptest/regexptestpart.h @@ -14,12 +14,12 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" class RegexpTestDialog; -class RegexpTestPart : public TDevPlugin +class RegexpTestPart : public KDevPlugin { Q_OBJECT diff --git a/parts/regexptest/tdevregexptest.desktop b/parts/regexptest/tdevregexptest.desktop deleted file mode 100644 index e0978750..00000000 --- a/parts/regexptest/tdevregexptest.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Tool to design and test regular expressions against common regexp syntaxes. -Comment[ca]=Eina per a dissenyar i provar expressions regulars amb sintaxis d'expressions regulars comuns. -Comment[da]=Værktøj til at designe og teste regulære udtryk imod almindelige regexp syntakser. -Comment[de]=Ein Werkzeug zum Erstellen und Testen regulärer Ausdrücke. -Comment[el]=Εργαλείο για το σχεδιασμό και τη δοκιμή κανονικών εκφράσεων με κοινή σύνταξη κανονικών εκφράσεων. -Comment[es]=Herramienta para diseñar y probar expresiones regulares con sintaxis comunes. -Comment[et]=Vahend regulaaravaldiste loomiseks ja korrektsuse testimiseks. -Comment[eu]=Ohizko regexp sintaxiaren arabera espresio erregularra diseinatu eta egiaztatzeko tresna. -Comment[fa]=ابزاری برای طراحی و آزمودن عبارتهای منظم در برابر نحوهای مشترک عبارت منظم -Comment[fr]=Outil pour créer et tester des expressions rationnelles par rapport aux syntaxes des expressions rationnnelles communes. -Comment[gl]=Ferramenta para deseñar e probar expresións regulares con sintaxes típicas para expresións regulares -Comment[hu]=Tervezőprogram reguláris kifejezések tervezéséhez és teszteléséhez, többféle szintaxis szerint -Comment[it]=Strumento per progettare e verificare espressioni regolari con le sintassi comuni di regexp. -Comment[ja]=共通の regexp 構文に対する正規表現を設計したりテストするツール -Comment[ms]=Alatan untuk mereka dan menguji regular expressions berbanding sintaks biasa regexp. -Comment[nds]=En Warktüüch för't Opstellen un Utproberen vun reguleer Utdrück in en Reeg "regexp"-Schriefwiesen. -Comment[ne]=साझा रेगेक्प वाक्य संरचनाको बिरूद्ध नियमित अभिव्यक्ति डिजाइन र परीक्षण गर्ने उपकरण । -Comment[nl]=Gereedschap voor het ontwerpen en testen van reguliere expressies. -Comment[pl]=Narzędzie do tworzenia i testowania wyrażeń regularnych. -Comment[pt]=Uma ferramenta para desenhar e testar expressões regulares sobre várias sintaxes comuns de expressões. -Comment[pt_BR]=Ferramenta para desenvolver e testar expressões regulares com base na sintaxe comum das regexp. -Comment[ru]=Средство для определения и проверки регулярных выражений на предмет соответствия их наиболее распространённым вариантам синтаксиса. -Comment[sk]=Nástroj pre dizajn a testovanie regulárnych výrazov. -Comment[sr]=Алат за дизајн и тестирање регуларних израза насупрот уобичајеним рег.из. синтаксама. -Comment[sr@Latn]=Alat za dizajn i testiranje regularnih izraza nasuprot uobičajenim reg.iz. sintaksama. -Comment[sv]=Verktyg för att skapa och testa reguljära uttryck mot vanlig syntax för reguljära uttryck. -Comment[ta]=ரேக்ஸ்ப் தொடரமைப்பதற்கு எதிராக கருவி உபயோகித்து வரைதல் மற்றும் வாடிக்கையான தொடர்களை பரிசோதிக்க. -Comment[tg]=Восита барои муаян намудан ва тафтиш намудани баёни ботартиб дар асоси ҷорӣ шудаи вариантҳои синтаксисӣ менамояд. -Comment[tr]=Genel regexp söz dizimlerine karşı düzenli ifadeleri düzenlemeye ve test etmeye yarayan araç. -Comment[zh_CN]=依据通用正则表达式语法进行正则表达式设计和测试的工具。 -Comment[zh_TW]=設計、測試正規表示式語法的工具。 -Name=KDevRegexpTest -Name[da]=TDevelop test af regulære udtryk -Name[de]=RegExp-Überprüfung (TDevelop) -Name[hi]=के-डेव-रेगएक्सपी-टेक्स्ट -Name[nds]=RegExp-Prööv (TDevelop) -Name[pl]=KDevTestWyrReg -Name[sk]=KDev Regexp test -Name[sv]=TDevelop test av reguljära uttryck -Name[ta]=Kடேவ்ரெக்ஸ்ப் சோதனை -Name[zh_TW]=TDevelop 正規表示式測試 -GenericName=Regular Expression Tester -GenericName[ca]=Comprovador d'expressions regulars -GenericName[da]=Test af regulære udtryk -GenericName[de]=RegExp-Überprüfung -GenericName[el]=Δοκιμαστής κανονικών εκφράσεων -GenericName[es]=Comprobador de expresiones regulares -GenericName[et]=Regulaaravaldiste testija -GenericName[eu]=Espresio erregular egiaztatzailea -GenericName[fa]=آزمایندۀ عبارت منظم -GenericName[fr]=Testeur d'expressions rationnelles -GenericName[gl]=Comprobador de expresións regulares -GenericName[hi]=रेगुलर एक्सप्रेशन टेस्टर -GenericName[hu]=Tesztprogram reguláris kifejezésekhez -GenericName[it]=Verificatore per espressioni regolari -GenericName[ja]=正規表現テスタ -GenericName[ms]=Penguji Regular Expression -GenericName[nds]=RegExp-Prööv -GenericName[ne]=नियमित अभिव्यक्ति परीक्षक -GenericName[nl]=Reguliere expressie-tester -GenericName[pl]=Tester wyrażeń regularnych -GenericName[pt]=Ferramenta de Teste de Expressões Regulares -GenericName[pt_BR]=Testador de Expressão Regular -GenericName[ru]=Проверка регулярных выражений -GenericName[sk]=Tester pre regulárne výrazy -GenericName[sl]=Preverjalnik regularnih izrazov -GenericName[sr]=Тестер регуларних израза -GenericName[sr@Latn]=Tester regularnih izraza -GenericName[sv]=Test av reguljära uttryck -GenericName[ta]=வாடிக்கையான தொடர்களை பரிசோதிப்பவர். -GenericName[tg]=Тафтиши баёни ботартиб -GenericName[tr]=Düzenli İfade Test Edicisi -GenericName[zh_CN]=正则表达式测试 -GenericName[zh_TW]=正規表示式測試器 -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevregexptest -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=ScriptDevelopment,CDevelopment,CPPDevelopment diff --git a/parts/regexptest/tdevregexptest.rc b/parts/regexptest/tdevregexptest.rc deleted file mode 100644 index 99893d7f..00000000 --- a/parts/regexptest/tdevregexptest.rc +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/parts/replace/CMakeLists.txt b/parts/replace/CMakeLists.txt index b32da714..4779e553 100644 --- a/parts/replace/CMakeLists.txt +++ b/parts/replace/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevreplace.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_replace.rc DESTINATION ${DATA_INSTALL_DIR}/tdevreplace ) +install( FILES kdevreplace.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_replace.rc DESTINATION ${DATA_INSTALL_DIR}/kdevreplace ) -##### libtdevreplace (module) ################### +##### libkdevreplace (module) ################### -tde_add_kpart( libtdevreplace AUTOMOC +tde_add_kpart( libkdevreplace AUTOMOC SOURCES replace_part.cpp replace_widget.cpp replacedlg.ui replaceitem.cpp replaceview.cpp replacedlgimpl.cpp diff --git a/parts/replace/Makefile.am b/parts/replace/Makefile.am index 36d8e64f..8d75f0e8 100644 --- a/parts/replace/Makefile.am +++ b/parts/replace/Makefile.am @@ -2,15 +2,15 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevreplace.la -libtdevreplace_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevreplace_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevreplace_la_SOURCES = replace_part.cpp replace_widget.cpp replacedlg.ui replaceitem.cpp replaceview.cpp replacedlgimpl.cpp +kde_module_LTLIBRARIES = libkdevreplace.la +libkdevreplace_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevreplace_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +libkdevreplace_la_SOURCES = replace_part.cpp replace_widget.cpp replacedlg.ui replaceitem.cpp replaceview.cpp replacedlgimpl.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevreplace.desktop +service_DATA = kdevreplace.desktop -rcdir = $(kde_datadir)/tdevreplace -rc_DATA = tdevpart_replace.rc +rcdir = $(kde_datadir)/kdevreplace +rc_DATA = kdevpart_replace.rc diff --git a/parts/replace/kdevpart_replace.rc b/parts/replace/kdevpart_replace.rc new file mode 100644 index 00000000..e3818308 --- /dev/null +++ b/parts/replace/kdevpart_replace.rc @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/parts/replace/kdevreplace.desktop b/parts/replace/kdevreplace.desktop new file mode 100644 index 00000000..d2490c05 --- /dev/null +++ b/parts/replace/kdevreplace.desktop @@ -0,0 +1,80 @@ +[Desktop Entry] +Type=Service +Exec= +Comment=This plugin is an interactive projectwide "Search and Replace" tool. Search using string or regexp matching, and select the replacements to be made from a preview before the action is finalized. When loaded it appears in the Edit menu. +Comment[ca]=Aquest connector és una eina interactiva de "Recerca i substitució" a tot el projecte. Pot cercar mitjançant patrons o expressions regulars, i seleccionar les substitucions en una vista prèvia, abans de que finalitzi l'acció. Quan està carregat apareix en el menú Edita. +Comment[da]=Dette plugin er et interaktivt projektomfattende "Søg og erstat" værktøj. Søg ved brug af streng eller regexp tilpasning, og vælg erstatninger lavet fra en forhåndsvisning før handlingen blive helt udført. Når det er indlæst er det i redigeringsmenuen. +Comment[de]=Diese Komponente ist ein interaktives Werkzeug zum projektweiten "Suchen und Ersetzen" von Begriffen oder regulären Ausdrücken. Die zu ersetzenden Zeichenketten können in einer Vorschau ausgewählt werden. Erscheint im Menü "Bearbeiten", wenn es geladen ist. +Comment[el]=Αυτό το πρόσθετο είναι ένα εργαλείο αλληλεπίδρασης "Αναζήτησης και αντικατάστασης" για όλο το έργο. Αναζητά χρησιμοποιώντας συμβολοσειρές ή κανονικές εκφράσεις, και επιλέγει τις αντικαταστάσεις από μια προεπισκόπηση πριν να εκτελεστεί η ενέργεια. Όταν φορτωθεί είναι διαθέσιμο από το μενού επεξεργασίας. +Comment[en_GB]=This plugin is an interactive projectwide "Search and Replace" tool. Search using string or regexp matching, and select the replacements to be made from a preview before the action is finalised. When loaded it appears in the Edit menu. +Comment[es]=Este complemento es una herramienta interactiva de «Búsqueda y sustitución» para todo el proyecto. Puede buscar mediante patrones o expresiones regulares, y seleccionar las sustituciones en una previsualización, antes de que finalice la acción. Cuando está cargado aparece en el menú Editar. +Comment[et]=See plugin on kogu projekti hõlmav interaktiivne "otsi ja asenda" vahend. Otsida saab stringe või regulaaravaldiste sobivusi, asendusi saab valida eelvaatluse abil, enne kui need päriselt teoks teha. Kasutamisel kättesaadav redigeerimismenüüst. +Comment[eu]=Plugin hau proiektu mailako "Bilatu eta ordeztu" tresna interaktiboa da. Bila ezazu kate edo regexp bat-egitea erabiliz, eta hautatu egin beharreko ordezkapenak aurrebista batetik ekintza amaitu aurretik. Kargatzean Editatu menuan agertzen da. +Comment[fa]=این وصله یک ابزار گسترۀ پروژۀ تعاملی »جستجو و جایگزینی« می‌باشد. با استفاده از تطبیق رشته یا عبارت منظم جستجو می‌کند، و جایگزینهایی را گزینش می‌کند تا قبل از اتمام کنش، از یک پیش‌نمایش ایجاد شود. در هنگام بارگذاری در گزینگان ویرایش ظاهر می‌شود. +Comment[fr]=Ce module externe est un outil de « Recherche et remplacement » à l'échelle du projet. Faites une recherche à l'aide de la correspondance de chaînes ou d'expressions rationnelles, et sélectionnez les remplacements à effectuer à partir d'un aperçu avant que l'action ne soit finalisée. Lorsqu'il est chargé, ce module externe apparaît dans le menu « Édition ». +Comment[gl]=Esta extensión é unha ferramenta interactiva "Procurar e reemprazar" dispoñíbel en todo o proxecto. Busca usando coincidencias con strings ou expresións regulares, e selecciona os reemprazamentos a facer nunha previsualización antes de que as accións finalicen. Cando se carga aparece no menú Editar. +Comment[hu]=Ezzel a bővítőmodullal az egész projektre kiterjedő keresést és cserét lehet végezni. Lehet sztringre és reg. kifejezésre keresni, az elvégzendő műveleteket egy előnézeti ablakban lehet kiválasztani. A modul betöltés után a Szerkesztés menübe kerül. +Comment[it]=Questo plugin è uno strumento interattivo per "Cerca e sostituisci" sui progetti. Cerca tramite stringhe e confronto regexp e seleziona le sostituzioni da compiere da un'anteprima prima che le azioni siano finalizzate. Quando caricato apparirà nel menu Modifica. +Comment[ja]=このプラグインは、プロジェクト規模で検索や置換を行う対話型のツールです。検索は文字列や正規表現の合致を使い、アクションが終了する前にプレビューで作られている置換を選択します。読み込まれると編集メニューに表示されます。 +Comment[ms]=Plugin ini adalah alatan "Cari dan Ganti" serata projek interaktif. Cari menggunakan padanan rentetan atau regexp, dan pilih gantian yang akan dibuat daripada pralihat sebelum tindakan diselesaikan. Apabila dimuatkan ia kelihatan didalam menu Sunting. +Comment[nds]=Dit Moduul is en interaktiv projektwiet "Söken un Utwesseln"-Warktüüch. Du kannst na Tekenkeden oder mit reguleer Utdrück söken un de Ännern in en Vöransicht utsöken, ehr de Akschoon utföhrt warrt. Dukt in't Menü "Bewerken" op, wenn laadt. +Comment[ne]=यो प्लगइन अन्तरक्रियात्मक परियोजनामा "खोजी गरेर प्रतिस्थापन गर्नुहोस्" उपकरण हो । स्ट्रिङ वा regexp मिल्दो प्रयोग गरेर खोजी गर्नुहोस् र कार्य समाप्त गर्नु पूर्व पूर्वावलोकनबाट प्रतिस्थापन गर्नेलाई चयन गर्नुहोस् । लोड भएपछि सम्पादन मेनुमा देखा पर्दछ । +Comment[nl]=Deze plugin biedt een interactieve, projectbrede "zoek en vervang"-tool. U kunt zoeken naar tekens of reguliere expressies en de vervanging kan in een dialoog worden bekeken voordat deze wordt uitgevoerd. Verschijnt in het menu Bewerken. +Comment[pl]=Wtyczka działającego w całym projekcie narzędzia "Znajdź i zamień". Wyszukiwanie odbywa się za pomocą porównywania ciągów lub wyrażen regularnych, a wybór zamienników może być dokonywany przy włączonym podglądzie. Po wczytaniu pojawia się w menu Edycja. +Comment[pt]=Este 'plugin' é uma ferramenta interactiva ao nível do projecto de "Procurar e Substituir". Pode procurar por texto ou por uma expressão regular e seleccionar as substituições a serem feitas, a partir de uma antevisão, antes de a acção terminar. Quando é carregado, aparece no menu Editar. +Comment[pt_BR]=Este plug-in é uma ferramenta interativa de "Procurar e Substituir" por todo o projeto. Procura usando um string ou regexp correspondente, e seleciona as substituições a serem feitas de uma previsão antes da ação ser finalizada. Quando carregado ele aparece no menu Editar. +Comment[ru]=Этот модуль предоставляет интерактивные возможности поиска и замены по файлам в проекте. Сначала проводится поиск по строке или регулярному выражению, далее выбор с предпросмотром и применение замен из списка доступных вариантов. +Comment[sk]=Modul poskytuje interaktívny nástroj pre "Nájsť a Zameniť" v celom projekte.Vyhľadávanie pomocou regexp výrazov a výber nového reťazca z náhľadu pred samotnou zámenou. Po načítaní sa objaví v menu Edit. +Comment[sr]=Овај прикључак је интерактивни „пронађи и замени“ алат широм пројекта. Тражите користећи знаковни низ или рег.из. поклапање, и из прегледа одаберите измене које ће бити извршене пре него што се акција заврши. Када је учитан појављује се у менију „Измени“. +Comment[sr@Latn]=Ovaj priključak je interaktivni „pronađi i zameni“ alat širom projekta. Tražite koristeći znakovni niz ili reg.iz. poklapanje, i iz pregleda odaberite izmene koje će biti izvršene pre nego što se akcija završi. Kada je učitan pojavljuje se u meniju „Izmeni“. +Comment[sv]=Insticksprogrammet är ett interaktivt verktyg för att "söka och ersätta" i hela projektet. Sök med en sträng eller reguljärt uttryck, och välj ersättningen som ska göras från en förhandsgranskning innan åtgärden slutförs. När det laddats visas det i redigeringsmenyn. +Comment[ta]=இந்த சொருகி "Search and Replace" ஒரு சிறந்த திட்ட பணி கருவி. சரத்தை உபயோகித்து தேடுதல் அல்லது ரெக்ஸ்ப் பொருத்துதல், மற்றும் செயல்கள் தீர்மானிப்பதற்கு முன் முன்தோற்றத்தைப் பார்த்து மாற்ற வேண்டியதை தேர்வு செய். +Comment[tg]=Ин модул барои ковтукови интерактивӣ ва ҷой иваз намудан дар лоиҳаро имкон медиҳад.Аввал ковтуков дар сатр оғоз меёбад ва ё дар баёноти ботартиб, баъд аз он интихоби пеш аз намоиш ва истифода барии ҷой ивазкунӣ аз рӯйхати вариантҳои имконпазир гузаронида мешавад. +Comment[tr]=Bu eklenti projenin tamamında "Ara ve Değiştir" aracıdır. Dizgi veya regexp eşleşmesi ara ve işlem sona ermeden bir önizlemeden yapılacak değişiklikleri seç. Yüklendiğinde Düzenle menüsünde durur. +Comment[zh_CN]=这个插件是面向真个工程的“查找和替换”工具。 使用字符串或正则表达式匹配,并在操作完成前提供选择替换预览。启动后显示在编辑菜单中。 +Comment[zh_TW]=這個外掛程式是一個專案的「搜尋與取代」互動工具。使用字串或正規表示式來搜尋,並選擇是否要取代。載入後可以在「編輯」選單中找到。 +Name=KDevReplace +Name[da]=TDevelop Erstat +Name[nds]=TDevelop-Utwesseln +Name[sk]=KDev zameniť +Name[sv]=TDevelop ersätt +Name[zh_TW]=TDevelop 取代 +GenericName=Replace Part +GenericName[ca]=Part per a la substitució +GenericName[da]=Erstatningspart +GenericName[de]=Ersetzen-Komponente +GenericName[el]=Τμήμα αντικατάστασης +GenericName[es]=Servicio de sustitución +GenericName[et]=Asendamise komponent +GenericName[eu]=Ordeztu partea +GenericName[fa]=جزء جایگزینی +GenericName[fr]=Outil de remplacement +GenericName[gl]='Part' reemprazar +GenericName[hi]=रीप्लेस पार्ट +GenericName[hu]=Cserélés +GenericName[it]=Componente per sostituire +GenericName[ja]=置換 +GenericName[ms]=Ganti Bahagian +GenericName[nds]=Utwessel-Komponent +GenericName[ne]=प्रतिस्थापन भाग +GenericName[nl]=Zoeken en vervangen +GenericName[pl]=Program do zastępowania +GenericName[pt]=Parte de Substituição +GenericName[pt_BR]=Parte Substituir +GenericName[ru]=Замена по проекту +GenericName[sk]=Part zameniť +GenericName[sl]=Del za zamenjave +GenericName[sr]=Део за замену +GenericName[sr@Latn]=Deo za zamenu +GenericName[sv]=Ersättning +GenericName[ta]=மாற்றுப் பகுதி +GenericName[tg]=Ҷой иваз намудан бо лоиҳа +GenericName[tr]=Değiştirme Bileşeni +GenericName[zh_CN]=替换模块 +GenericName[zh_TW]=取代元件 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Global +X-TDE-Library=libkdevreplace +X-TDevelop-Version=5 +X-TDevelop-Properties=FileReplace diff --git a/parts/replace/replace_part.cpp b/parts/replace/replace_part.cpp index 40bfb1ea..447548ef 100644 --- a/parts/replace/replace_part.cpp +++ b/parts/replace/replace_part.cpp @@ -15,25 +15,25 @@ #include #include #include -#include -#include +#include +#include #include #include -#include -#include +#include +#include #include "replace_widget.h" -static const TDevPluginInfo data("tdevreplace"); +static const KDevPluginInfo data("kdevreplace"); -typedef TDevGenericFactory ReplaceFactory; -K_EXPORT_COMPONENT_FACTORY(libtdevreplace, ReplaceFactory(data)) +typedef KDevGenericFactory ReplaceFactory; +K_EXPORT_COMPONENT_FACTORY(libkdevreplace, ReplaceFactory(data)) ReplacePart::ReplacePart(TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin( &data, parent, name ? name : "ReplacePart" ) + : KDevPlugin( &data, parent, name ? name : "ReplacePart" ) { setInstance(ReplaceFactory::instance()); - setXMLFile("tdevpart_replace.rc"); + setXMLFile("kdevpart_replace.rc"); m_widget = new ReplaceWidget(this); m_widget->setIcon( SmallIcon("filefind") ); diff --git a/parts/replace/replace_part.h b/parts/replace/replace_part.h index f0316eb0..fbd0f2f7 100644 --- a/parts/replace/replace_part.h +++ b/parts/replace/replace_part.h @@ -9,12 +9,12 @@ * * ***************************************************************************/ -#ifndef __TDEVPART_REPLACE_H__ -#define __TDEVPART_REPLACE_H__ +#ifndef __KDEVPART_REPLACE_H__ +#define __KDEVPART_REPLACE_H__ #include -#include +#include #include @@ -22,7 +22,7 @@ class ReplaceWidget; class TDEAction; class Context; -class ReplacePart : public TDevPlugin +class ReplacePart : public KDevPlugin { Q_OBJECT diff --git a/parts/replace/replace_widget.cpp b/parts/replace/replace_widget.cpp index 34dd3afd..6b1bcbda 100644 --- a/parts/replace/replace_widget.cpp +++ b/parts/replace/replace_widget.cpp @@ -26,11 +26,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -87,7 +87,7 @@ ReplaceWidget::ReplaceWidget(ReplacePart *part) connect( _cancel, TQT_SIGNAL( clicked() ), TQT_SLOT( clear() ) ); connect( _listview, TQT_SIGNAL( editDocument( const TQString &, int ) ), TQT_SLOT( editDocument( const TQString &, int ) ) ); - connect( m_part->core(), TQT_SIGNAL( stopButtonClicked( TDevPlugin * ) ), TQT_SLOT( stopButtonClicked( TDevPlugin * ) ) ); + connect( m_part->core(), TQT_SIGNAL( stopButtonClicked( KDevPlugin * ) ), TQT_SLOT( stopButtonClicked( KDevPlugin * ) ) ); } //BEGIN Slots @@ -184,7 +184,7 @@ void ReplaceWidget::editDocument( TQString const & file, int line ) m_part->partController()->editDocument( KURL( file ), line ); } -void ReplaceWidget::stopButtonClicked( TDevPlugin * which ) +void ReplaceWidget::stopButtonClicked( KDevPlugin * which ) { if ( which != 0 && which != m_part ) return; diff --git a/parts/replace/replace_widget.h b/parts/replace/replace_widget.h index 64ca50e2..c9063928 100644 --- a/parts/replace/replace_widget.h +++ b/parts/replace/replace_widget.h @@ -36,7 +36,7 @@ public: public slots: void showDialog(); - void stopButtonClicked( TDevPlugin * ); + void stopButtonClicked( KDevPlugin * ); protected: virtual void focusInEvent(TQFocusEvent *e); diff --git a/parts/replace/tdevpart_replace.rc b/parts/replace/tdevpart_replace.rc deleted file mode 100644 index e3818308..00000000 --- a/parts/replace/tdevpart_replace.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/parts/replace/tdevreplace.desktop b/parts/replace/tdevreplace.desktop deleted file mode 100644 index cd05c65c..00000000 --- a/parts/replace/tdevreplace.desktop +++ /dev/null @@ -1,80 +0,0 @@ -[Desktop Entry] -Type=Service -Exec= -Comment=This plugin is an interactive projectwide "Search and Replace" tool. Search using string or regexp matching, and select the replacements to be made from a preview before the action is finalized. When loaded it appears in the Edit menu. -Comment[ca]=Aquest connector és una eina interactiva de "Recerca i substitució" a tot el projecte. Pot cercar mitjançant patrons o expressions regulars, i seleccionar les substitucions en una vista prèvia, abans de que finalitzi l'acció. Quan està carregat apareix en el menú Edita. -Comment[da]=Dette plugin er et interaktivt projektomfattende "Søg og erstat" værktøj. Søg ved brug af streng eller regexp tilpasning, og vælg erstatninger lavet fra en forhåndsvisning før handlingen blive helt udført. Når det er indlæst er det i redigeringsmenuen. -Comment[de]=Diese Komponente ist ein interaktives Werkzeug zum projektweiten "Suchen und Ersetzen" von Begriffen oder regulären Ausdrücken. Die zu ersetzenden Zeichenketten können in einer Vorschau ausgewählt werden. Erscheint im Menü "Bearbeiten", wenn es geladen ist. -Comment[el]=Αυτό το πρόσθετο είναι ένα εργαλείο αλληλεπίδρασης "Αναζήτησης και αντικατάστασης" για όλο το έργο. Αναζητά χρησιμοποιώντας συμβολοσειρές ή κανονικές εκφράσεις, και επιλέγει τις αντικαταστάσεις από μια προεπισκόπηση πριν να εκτελεστεί η ενέργεια. Όταν φορτωθεί είναι διαθέσιμο από το μενού επεξεργασίας. -Comment[en_GB]=This plugin is an interactive projectwide "Search and Replace" tool. Search using string or regexp matching, and select the replacements to be made from a preview before the action is finalised. When loaded it appears in the Edit menu. -Comment[es]=Este complemento es una herramienta interactiva de «Búsqueda y sustitución» para todo el proyecto. Puede buscar mediante patrones o expresiones regulares, y seleccionar las sustituciones en una previsualización, antes de que finalice la acción. Cuando está cargado aparece en el menú Editar. -Comment[et]=See plugin on kogu projekti hõlmav interaktiivne "otsi ja asenda" vahend. Otsida saab stringe või regulaaravaldiste sobivusi, asendusi saab valida eelvaatluse abil, enne kui need päriselt teoks teha. Kasutamisel kättesaadav redigeerimismenüüst. -Comment[eu]=Plugin hau proiektu mailako "Bilatu eta ordeztu" tresna interaktiboa da. Bila ezazu kate edo regexp bat-egitea erabiliz, eta hautatu egin beharreko ordezkapenak aurrebista batetik ekintza amaitu aurretik. Kargatzean Editatu menuan agertzen da. -Comment[fa]=این وصله یک ابزار گسترۀ پروژۀ تعاملی »جستجو و جایگزینی« می‌باشد. با استفاده از تطبیق رشته یا عبارت منظم جستجو می‌کند، و جایگزینهایی را گزینش می‌کند تا قبل از اتمام کنش، از یک پیش‌نمایش ایجاد شود. در هنگام بارگذاری در گزینگان ویرایش ظاهر می‌شود. -Comment[fr]=Ce module externe est un outil de « Recherche et remplacement » à l'échelle du projet. Faites une recherche à l'aide de la correspondance de chaînes ou d'expressions rationnelles, et sélectionnez les remplacements à effectuer à partir d'un aperçu avant que l'action ne soit finalisée. Lorsqu'il est chargé, ce module externe apparaît dans le menu « Édition ». -Comment[gl]=Esta extensión é unha ferramenta interactiva "Procurar e reemprazar" dispoñíbel en todo o proxecto. Busca usando coincidencias con strings ou expresións regulares, e selecciona os reemprazamentos a facer nunha previsualización antes de que as accións finalicen. Cando se carga aparece no menú Editar. -Comment[hu]=Ezzel a bővítőmodullal az egész projektre kiterjedő keresést és cserét lehet végezni. Lehet sztringre és reg. kifejezésre keresni, az elvégzendő műveleteket egy előnézeti ablakban lehet kiválasztani. A modul betöltés után a Szerkesztés menübe kerül. -Comment[it]=Questo plugin è uno strumento interattivo per "Cerca e sostituisci" sui progetti. Cerca tramite stringhe e confronto regexp e seleziona le sostituzioni da compiere da un'anteprima prima che le azioni siano finalizzate. Quando caricato apparirà nel menu Modifica. -Comment[ja]=このプラグインは、プロジェクト規模で検索や置換を行う対話型のツールです。検索は文字列や正規表現の合致を使い、アクションが終了する前にプレビューで作られている置換を選択します。読み込まれると編集メニューに表示されます。 -Comment[ms]=Plugin ini adalah alatan "Cari dan Ganti" serata projek interaktif. Cari menggunakan padanan rentetan atau regexp, dan pilih gantian yang akan dibuat daripada pralihat sebelum tindakan diselesaikan. Apabila dimuatkan ia kelihatan didalam menu Sunting. -Comment[nds]=Dit Moduul is en interaktiv projektwiet "Söken un Utwesseln"-Warktüüch. Du kannst na Tekenkeden oder mit reguleer Utdrück söken un de Ännern in en Vöransicht utsöken, ehr de Akschoon utföhrt warrt. Dukt in't Menü "Bewerken" op, wenn laadt. -Comment[ne]=यो प्लगइन अन्तरक्रियात्मक परियोजनामा "खोजी गरेर प्रतिस्थापन गर्नुहोस्" उपकरण हो । स्ट्रिङ वा regexp मिल्दो प्रयोग गरेर खोजी गर्नुहोस् र कार्य समाप्त गर्नु पूर्व पूर्वावलोकनबाट प्रतिस्थापन गर्नेलाई चयन गर्नुहोस् । लोड भएपछि सम्पादन मेनुमा देखा पर्दछ । -Comment[nl]=Deze plugin biedt een interactieve, projectbrede "zoek en vervang"-tool. U kunt zoeken naar tekens of reguliere expressies en de vervanging kan in een dialoog worden bekeken voordat deze wordt uitgevoerd. Verschijnt in het menu Bewerken. -Comment[pl]=Wtyczka działającego w całym projekcie narzędzia "Znajdź i zamień". Wyszukiwanie odbywa się za pomocą porównywania ciągów lub wyrażen regularnych, a wybór zamienników może być dokonywany przy włączonym podglądzie. Po wczytaniu pojawia się w menu Edycja. -Comment[pt]=Este 'plugin' é uma ferramenta interactiva ao nível do projecto de "Procurar e Substituir". Pode procurar por texto ou por uma expressão regular e seleccionar as substituições a serem feitas, a partir de uma antevisão, antes de a acção terminar. Quando é carregado, aparece no menu Editar. -Comment[pt_BR]=Este plug-in é uma ferramenta interativa de "Procurar e Substituir" por todo o projeto. Procura usando um string ou regexp correspondente, e seleciona as substituições a serem feitas de uma previsão antes da ação ser finalizada. Quando carregado ele aparece no menu Editar. -Comment[ru]=Этот модуль предоставляет интерактивные возможности поиска и замены по файлам в проекте. Сначала проводится поиск по строке или регулярному выражению, далее выбор с предпросмотром и применение замен из списка доступных вариантов. -Comment[sk]=Modul poskytuje interaktívny nástroj pre "Nájsť a Zameniť" v celom projekte.Vyhľadávanie pomocou regexp výrazov a výber nového reťazca z náhľadu pred samotnou zámenou. Po načítaní sa objaví v menu Edit. -Comment[sr]=Овај прикључак је интерактивни „пронађи и замени“ алат широм пројекта. Тражите користећи знаковни низ или рег.из. поклапање, и из прегледа одаберите измене које ће бити извршене пре него што се акција заврши. Када је учитан појављује се у менију „Измени“. -Comment[sr@Latn]=Ovaj priključak je interaktivni „pronađi i zameni“ alat širom projekta. Tražite koristeći znakovni niz ili reg.iz. poklapanje, i iz pregleda odaberite izmene koje će biti izvršene pre nego što se akcija završi. Kada je učitan pojavljuje se u meniju „Izmeni“. -Comment[sv]=Insticksprogrammet är ett interaktivt verktyg för att "söka och ersätta" i hela projektet. Sök med en sträng eller reguljärt uttryck, och välj ersättningen som ska göras från en förhandsgranskning innan åtgärden slutförs. När det laddats visas det i redigeringsmenyn. -Comment[ta]=இந்த சொருகி "Search and Replace" ஒரு சிறந்த திட்ட பணி கருவி. சரத்தை உபயோகித்து தேடுதல் அல்லது ரெக்ஸ்ப் பொருத்துதல், மற்றும் செயல்கள் தீர்மானிப்பதற்கு முன் முன்தோற்றத்தைப் பார்த்து மாற்ற வேண்டியதை தேர்வு செய். -Comment[tg]=Ин модул барои ковтукови интерактивӣ ва ҷой иваз намудан дар лоиҳаро имкон медиҳад.Аввал ковтуков дар сатр оғоз меёбад ва ё дар баёноти ботартиб, баъд аз он интихоби пеш аз намоиш ва истифода барии ҷой ивазкунӣ аз рӯйхати вариантҳои имконпазир гузаронида мешавад. -Comment[tr]=Bu eklenti projenin tamamında "Ara ve Değiştir" aracıdır. Dizgi veya regexp eşleşmesi ara ve işlem sona ermeden bir önizlemeden yapılacak değişiklikleri seç. Yüklendiğinde Düzenle menüsünde durur. -Comment[zh_CN]=这个插件是面向真个工程的“查找和替换”工具。 使用字符串或正则表达式匹配,并在操作完成前提供选择替换预览。启动后显示在编辑菜单中。 -Comment[zh_TW]=這個外掛程式是一個專案的「搜尋與取代」互動工具。使用字串或正規表示式來搜尋,並選擇是否要取代。載入後可以在「編輯」選單中找到。 -Name=KDevReplace -Name[da]=TDevelop Erstat -Name[nds]=TDevelop-Utwesseln -Name[sk]=KDev zameniť -Name[sv]=TDevelop ersätt -Name[zh_TW]=TDevelop 取代 -GenericName=Replace Part -GenericName[ca]=Part per a la substitució -GenericName[da]=Erstatningspart -GenericName[de]=Ersetzen-Komponente -GenericName[el]=Τμήμα αντικατάστασης -GenericName[es]=Servicio de sustitución -GenericName[et]=Asendamise komponent -GenericName[eu]=Ordeztu partea -GenericName[fa]=جزء جایگزینی -GenericName[fr]=Outil de remplacement -GenericName[gl]='Part' reemprazar -GenericName[hi]=रीप्लेस पार्ट -GenericName[hu]=Cserélés -GenericName[it]=Componente per sostituire -GenericName[ja]=置換 -GenericName[ms]=Ganti Bahagian -GenericName[nds]=Utwessel-Komponent -GenericName[ne]=प्रतिस्थापन भाग -GenericName[nl]=Zoeken en vervangen -GenericName[pl]=Program do zastępowania -GenericName[pt]=Parte de Substituição -GenericName[pt_BR]=Parte Substituir -GenericName[ru]=Замена по проекту -GenericName[sk]=Part zameniť -GenericName[sl]=Del za zamenjave -GenericName[sr]=Део за замену -GenericName[sr@Latn]=Deo za zamenu -GenericName[sv]=Ersättning -GenericName[ta]=மாற்றுப் பகுதி -GenericName[tg]=Ҷой иваз намудан бо лоиҳа -GenericName[tr]=Değiştirme Bileşeni -GenericName[zh_CN]=替换模块 -GenericName[zh_TW]=取代元件 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Global -X-TDE-Library=libtdevreplace -X-TDevelop-Version=5 -X-TDevelop-Properties=FileReplace diff --git a/parts/scripting/CMakeLists.txt b/parts/scripting/CMakeLists.txt index 371cf8f6..f906bd02 100644 --- a/parts/scripting/CMakeLists.txt +++ b/parts/scripting/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevscripting.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevscripting.rc DESTINATION ${DATA_INSTALL_DIR}/tdevscripting ) +install( FILES kdevscripting.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevscripting.rc DESTINATION ${DATA_INSTALL_DIR}/kdevscripting ) -##### libtdevscripting (module) ################# +##### libkdevscripting (module) ################# -tde_add_kpart( libtdevscripting AUTOMOC +tde_add_kpart( libkdevscripting AUTOMOC SOURCES scriptingpart.cpp scriptingglobalconfigbase.ui scriptingglobalconfig.cpp diff --git a/parts/scripting/Makefile.am b/parts/scripting/Makefile.am index 9de6d889..7262dac9 100644 --- a/parts/scripting/Makefile.am +++ b/parts/scripting/Makefile.am @@ -1,20 +1,20 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevscripting.la -libtdevscripting_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevscripting_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevscripting.la +libkdevscripting_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevscripting_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevscripting_la_SOURCES = scriptingpart.cpp scriptingglobalconfigbase.ui \ +libkdevscripting_la_SOURCES = scriptingpart.cpp scriptingglobalconfigbase.ui \ scriptingglobalconfig.cpp METASOURCES = AUTO -appsharedir = $(kde_datadir)/tdevscripting +appsharedir = $(kde_datadir)/kdevscripting appshare_DATA = servicedir = $(kde_servicesdir) -service_DATA = tdevscripting.desktop +service_DATA = kdevscripting.desktop -rcdir = $(kde_datadir)/tdevscripting -rc_DATA = tdevscripting.rc +rcdir = $(kde_datadir)/kdevscripting +rc_DATA = kdevscripting.rc noinst_HEADERS = scriptingglobalconfig.h scriptingpart.h diff --git a/parts/scripting/kdevscripting.desktop b/parts/scripting/kdevscripting.desktop new file mode 100644 index 00000000..22ef15e8 --- /dev/null +++ b/parts/scripting/kdevscripting.desktop @@ -0,0 +1,77 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Name=KDevscripting +Name[da]=TDevelop scriptning +Name[nds]=TDevelop-Skriptschrieven +Name[sk]=KDev skriptovanie +Name[sv]=TDevelop-skriptanvändning +Name[zh_TW]=TDevelop 文稿 +GenericName=Scripting +GenericName[ca]=Scripts +GenericName[da]=Scriptning +GenericName[de]=Skriptunterstützung +GenericName[el]=Γραφή σεναρίων +GenericName[es]=Guiones +GenericName[et]=Skriptikeele plugin +GenericName[eu]=Script-a +GenericName[fa]=دست‌نوشته +GenericName[fr]=Scriptage +GenericName[ga]=Scriptiú +GenericName[hu]=Szkriptszerkesztő +GenericName[it]=Script +GenericName[nds]=Skriptünnerstütten +GenericName[ne]=स्क्रिप्टिङ +GenericName[pl]=Skrypty +GenericName[pt]='Scripting' +GenericName[ru]=Сценарии +GenericName[sk]=Skriptovanie +GenericName[sl]=Skriptiranje +GenericName[sr]=Скриптовање +GenericName[sr@Latn]=Skriptovanje +GenericName[sv]=Skriptanvändning +GenericName[tr]=Betik Yazma +GenericName[zh_CN]=脚本 +GenericName[zh_TW]=文稿 +Comment=The Scripting plugin offers KScript based scripting of the TDevelop application +Comment[ca]=El connector per als scripts ofereix scripts basats en KScript de l'aplicació TDevelop +Comment[da]=Scriptning-plugin stiller KScript-baseret scriptning til rådighed for TDevelop +Comment[de]=Das "Skript"-Modul bietet KScript-basierte Automatisierung für TDevelop +Comment[el]=Το πρόσθετο γραφής σεναρίων προσφέρει σενάρια της μορφής KScript της εφαρμογής TDevelop +Comment[es]=El complemento de guiones ofrece guiones basados en KScript de la aplicación TDevelop +Comment[et]=Skriptikeele plugin võimaldab TDevelopis kasutada skriptikeelt KScripti alusel +Comment[eu]=Script-a pluginak KScript-en oinarritutako TDevelop aplikazioaren script zerbitzuak eskeintzen ditu +Comment[fa]=وصلۀ دست‌نوشته، دست‌نوشتۀ کاربرد TDevelop بر مبنای KScript را ارائه می‌دهد. +Comment[fr]=Le module externe Scriptage fournit le scriptage basé sur KScript de l'application TDevelop +Comment[gl]=A extensión Scripting ofrece scripting baseado en KScript para a aplicación de TDevelop +Comment[hu]=A Szkriptszerkesztő KScript-alapú szkriptkészítést tesz lehetővé a TDevelophoz +Comment[it]=Il plugin di script offre lo script basato su KScript dell'applicazione TDevelop +Comment[ms]=Plugin Scripting memberikan scripting berasaskan KScript pada aplikasi TDevelop +Comment[nds]=Dat Skript-Moduul stellt en op KSkript opbuut Skriptbewerken för TDevelop praat. +Comment[ne]=यो स्क्रिप्टिङ प्लगइनले केडीई विकास अनुप्रयोगको स्क्रिप्टिङमा आधारित केडीई स्क्रिप्टिङ प्रस्ताव गर्दछ +Comment[nl]=De scripting-plugin maakt KScript gebaseerde scripting van de TDevelop-toepassing mogelijk. +Comment[pl]=Wtyczka skrypty pozwala ja skrypty oparte o KScript w programie TDevelop +Comment[pt]=O 'plugin' de 'scripting' oferece funcionalidade de 'scripting' da aplicação TDevelop baseados no KScript +Comment[pt_BR]=O plug-in de scripting oferece scripts baseados no KScript do aplicativo TDevelop +Comment[ru]=Модуль сценариев позволяет автоматизировать работу с помощью KScript +Comment[sk]=Modul poskytuje KScript skriptovanie TDevelop aplikácie +Comment[sr]=Прикључак за скриптовање нуди скриптовање помоћу KScript-а за TDevelop +Comment[sr@Latn]=Priključak za skriptovanje nudi skriptovanje pomoću KScript-a za TDevelop +Comment[sv]=Skriptinsticksprogrammet erbjuder KScript-baserad styrning av programmet TDevelop. +Comment[tr]=Betik Yazma eklentisi TDevelop uygulamasına KScript tabanlı betik yazmayı sunar. +Comment[zh_CN]=脚本插件可为 TDevelop 应用程序提供基于 KScript 的脚本。 +Comment[zh_TW]=文稿外掛程式提供 TDevelop 應用程式一個 KScript 基礎的文稿機制。 +Icon=shellscript +ServiceTypes=TDevelop/Plugin + +X-TDevelop-Plugin-Version=1 +X-TDevelop-Plugin-Homepage=http://www.sourcextreme.com/projects/tdevelop +X-TDevelop-Plugin-BugsEmailAddress=geiseri@sourcextreme.com +X-TDevelop-Plugin-Copyright=(C) by ian reinhart geiser + +X-TDevelop-Args= + +X-TDevelop-Scope=Global +X-TDE-Library=libkdevscripting +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeEditing diff --git a/parts/scripting/kdevscripting.rc b/parts/scripting/kdevscripting.rc new file mode 100644 index 00000000..217bece1 --- /dev/null +++ b/parts/scripting/kdevscripting.rc @@ -0,0 +1,8 @@ + + + + S&cripts + + + + diff --git a/parts/scripting/scriptingpart.cpp b/parts/scripting/scriptingpart.cpp index 4ebee2b0..80a33c9e 100644 --- a/parts/scripting/scriptingpart.cpp +++ b/parts/scripting/scriptingpart.cpp @@ -29,29 +29,29 @@ #include #include #include -#include -#include +#include +#include -#include -#include +#include +#include #include #include #include #include "scriptingglobalconfig.h" #include "tdescriptactionmanager.h" -typedef TDevGenericFactory scriptingFactory; -TDevPluginInfo data("tdevscripting"); -K_EXPORT_COMPONENT_FACTORY( libtdevscripting, scriptingFactory( data ) ) +typedef KDevGenericFactory scriptingFactory; +KDevPluginInfo data("kdevscripting"); +K_EXPORT_COMPONENT_FACTORY( libkdevscripting, scriptingFactory( data ) ) #define GLOBALDOC_OPTIONS 1 #define PROJECTDOC_OPTIONS 2 scriptingPart::scriptingPart(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevPlugin(&data, parent, name ? name : "scriptingPart"), m_scripts(0L) + : KDevPlugin(&data, parent, name ? name : "scriptingPart"), m_scripts(0L) { setInstance(scriptingFactory::instance()); - setXMLFile("tdevscripting.rc"); + setXMLFile("kdevscripting.rc"); m_configProxy = new ConfigWidgetProxy(core()); m_configProxy->createGlobalConfigPage(i18n("Scripting"), GLOBALDOC_OPTIONS, info()->icon()); diff --git a/parts/scripting/scriptingpart.h b/parts/scripting/scriptingpart.h index ca6bafd9..832318b9 100644 --- a/parts/scripting/scriptingpart.h +++ b/parts/scripting/scriptingpart.h @@ -18,10 +18,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef TDEVSCRIPTING_H -#define TDEVSCRIPTING_H +#ifndef KDEVSCRIPTING_H +#define KDEVSCRIPTING_H -#include +#include #include @@ -34,7 +34,7 @@ class KScriptActionManager; /** Please read the README.dox file for more info about this part */ -class scriptingPart: public TDevPlugin +class scriptingPart: public KDevPlugin { Q_OBJECT diff --git a/parts/scripting/tdevscripting.desktop b/parts/scripting/tdevscripting.desktop deleted file mode 100644 index afa0cc10..00000000 --- a/parts/scripting/tdevscripting.desktop +++ /dev/null @@ -1,77 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Name=KDevscripting -Name[da]=TDevelop scriptning -Name[nds]=TDevelop-Skriptschrieven -Name[sk]=KDev skriptovanie -Name[sv]=TDevelop-skriptanvändning -Name[zh_TW]=TDevelop 文稿 -GenericName=Scripting -GenericName[ca]=Scripts -GenericName[da]=Scriptning -GenericName[de]=Skriptunterstützung -GenericName[el]=Γραφή σεναρίων -GenericName[es]=Guiones -GenericName[et]=Skriptikeele plugin -GenericName[eu]=Script-a -GenericName[fa]=دست‌نوشته -GenericName[fr]=Scriptage -GenericName[ga]=Scriptiú -GenericName[hu]=Szkriptszerkesztő -GenericName[it]=Script -GenericName[nds]=Skriptünnerstütten -GenericName[ne]=स्क्रिप्टिङ -GenericName[pl]=Skrypty -GenericName[pt]='Scripting' -GenericName[ru]=Сценарии -GenericName[sk]=Skriptovanie -GenericName[sl]=Skriptiranje -GenericName[sr]=Скриптовање -GenericName[sr@Latn]=Skriptovanje -GenericName[sv]=Skriptanvändning -GenericName[tr]=Betik Yazma -GenericName[zh_CN]=脚本 -GenericName[zh_TW]=文稿 -Comment=The Scripting plugin offers KScript based scripting of the TDevelop application -Comment[ca]=El connector per als scripts ofereix scripts basats en KScript de l'aplicació TDevelop -Comment[da]=Scriptning-plugin stiller KScript-baseret scriptning til rådighed for TDevelop -Comment[de]=Das "Skript"-Modul bietet KScript-basierte Automatisierung für TDevelop -Comment[el]=Το πρόσθετο γραφής σεναρίων προσφέρει σενάρια της μορφής KScript της εφαρμογής TDevelop -Comment[es]=El complemento de guiones ofrece guiones basados en KScript de la aplicación TDevelop -Comment[et]=Skriptikeele plugin võimaldab TDevelopis kasutada skriptikeelt KScripti alusel -Comment[eu]=Script-a pluginak KScript-en oinarritutako TDevelop aplikazioaren script zerbitzuak eskeintzen ditu -Comment[fa]=وصلۀ دست‌نوشته، دست‌نوشتۀ کاربرد TDevelop بر مبنای KScript را ارائه می‌دهد. -Comment[fr]=Le module externe Scriptage fournit le scriptage basé sur KScript de l'application TDevelop -Comment[gl]=A extensión Scripting ofrece scripting baseado en KScript para a aplicación de TDevelop -Comment[hu]=A Szkriptszerkesztő KScript-alapú szkriptkészítést tesz lehetővé a TDevelophoz -Comment[it]=Il plugin di script offre lo script basato su KScript dell'applicazione TDevelop -Comment[ms]=Plugin Scripting memberikan scripting berasaskan KScript pada aplikasi TDevelop -Comment[nds]=Dat Skript-Moduul stellt en op KSkript opbuut Skriptbewerken för TDevelop praat. -Comment[ne]=यो स्क्रिप्टिङ प्लगइनले केडीई विकास अनुप्रयोगको स्क्रिप्टिङमा आधारित केडीई स्क्रिप्टिङ प्रस्ताव गर्दछ -Comment[nl]=De scripting-plugin maakt KScript gebaseerde scripting van de TDevelop-toepassing mogelijk. -Comment[pl]=Wtyczka skrypty pozwala ja skrypty oparte o KScript w programie TDevelop -Comment[pt]=O 'plugin' de 'scripting' oferece funcionalidade de 'scripting' da aplicação TDevelop baseados no KScript -Comment[pt_BR]=O plug-in de scripting oferece scripts baseados no KScript do aplicativo TDevelop -Comment[ru]=Модуль сценариев позволяет автоматизировать работу с помощью KScript -Comment[sk]=Modul poskytuje KScript skriptovanie TDevelop aplikácie -Comment[sr]=Прикључак за скриптовање нуди скриптовање помоћу KScript-а за TDevelop -Comment[sr@Latn]=Priključak za skriptovanje nudi skriptovanje pomoću KScript-a za TDevelop -Comment[sv]=Skriptinsticksprogrammet erbjuder KScript-baserad styrning av programmet TDevelop. -Comment[tr]=Betik Yazma eklentisi TDevelop uygulamasına KScript tabanlı betik yazmayı sunar. -Comment[zh_CN]=脚本插件可为 TDevelop 应用程序提供基于 KScript 的脚本。 -Comment[zh_TW]=文稿外掛程式提供 TDevelop 應用程式一個 KScript 基礎的文稿機制。 -Icon=shellscript -ServiceTypes=TDevelop/Plugin - -X-TDevelop-Plugin-Version=1 -X-TDevelop-Plugin-Homepage=http://www.sourcextreme.com/projects/tdevelop -X-TDevelop-Plugin-BugsEmailAddress=geiseri@sourcextreme.com -X-TDevelop-Plugin-Copyright=(C) by ian reinhart geiser - -X-TDevelop-Args= - -X-TDevelop-Scope=Global -X-TDE-Library=libtdevscripting -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeEditing diff --git a/parts/scripting/tdevscripting.rc b/parts/scripting/tdevscripting.rc deleted file mode 100644 index 217bece1..00000000 --- a/parts/scripting/tdevscripting.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - S&cripts - - - - diff --git a/parts/snippet/CMakeLists.txt b/parts/snippet/CMakeLists.txt index 43776bf0..704ec3e9 100644 --- a/parts/snippet/CMakeLists.txt +++ b/parts/snippet/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevsnippet.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_snippet.rc DESTINATION ${DATA_INSTALL_DIR}/tdevsnippet ) +install( FILES kdevsnippet.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_snippet.rc DESTINATION ${DATA_INSTALL_DIR}/kdevsnippet ) -##### libtdevsnippet (module) ################### +##### libkdevsnippet (module) ################### -tde_add_kpart( libtdevsnippet AUTOMOC +tde_add_kpart( libkdevsnippet AUTOMOC SOURCES snippet_part.cpp snippet_widget.cpp snippetdlg.ui snippetitem.cpp snippetsettingsbase.ui snippetsettings.cpp diff --git a/parts/snippet/Makefile.am b/parts/snippet/Makefile.am index d2429963..e2c207a4 100644 --- a/parts/snippet/Makefile.am +++ b/parts/snippet/Makefile.am @@ -1,17 +1,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevsnippet.la -libtdevsnippet_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevsnippet_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevsnippet.la +libkdevsnippet_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevsnippet_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevsnippet_la_SOURCES = snippet_part.cpp snippet_widget.cpp snippetdlg.ui snippetitem.cpp snippetsettingsbase.ui snippetsettings.cpp snippetconfig.cpp +libkdevsnippet_la_SOURCES = snippet_part.cpp snippet_widget.cpp snippetdlg.ui snippetitem.cpp snippetsettingsbase.ui snippetsettings.cpp snippetconfig.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevsnippet.desktop +service_DATA = kdevsnippet.desktop -rc_DATA = tdevpart_snippet.rc -rcdir = $(kde_datadir)/tdevsnippet +rc_DATA = kdevpart_snippet.rc +rcdir = $(kde_datadir)/kdevsnippet noinst_HEADERS = snippetdlg.h snippetitem.h snippetsettingsbase.h snippetsettings.h snippetconfig.h diff --git a/parts/snippet/kdevpart_snippet.rc b/parts/snippet/kdevpart_snippet.rc new file mode 100644 index 00000000..4f34ec50 --- /dev/null +++ b/parts/snippet/kdevpart_snippet.rc @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/parts/snippet/kdevsnippet.desktop b/parts/snippet/kdevsnippet.desktop new file mode 100644 index 00000000..f9ba9652 --- /dev/null +++ b/parts/snippet/kdevsnippet.desktop @@ -0,0 +1,102 @@ +[Desktop Entry] +Type=Service +Exec= +Comment=This plugin allows you to store code snippets and add them to your code +Comment[ca]=Aquest connector permet guardar trossos de codi i afegir-los més tard al vostre codi +Comment[da]=Dette plugin tillader dig at opbevare kodestumper og tilføje dem til din kode +Comment[de]=Dieses Modul erlaubt das Abspeichern und Wiederverwenden von Quelltext-Schnipseln +Comment[el]=Αυτό το πρόσθετο σας επιτρέπει να αποθηκεύσετε δείγματα κώδικα και να τα προσθέσετε στον κώδικά σας +Comment[es]=Este complemento permite almacenar trozos de código y añadirlos a su código fuente +Comment[et]=See plugin võimaldab salvestada koodijuppe ja neid koodi lisada +Comment[eu]=Plugin honek kode zatiak gordetzeo eta zure kodeari gehitzeko aukera eskeintzen dizu +Comment[fa]=این وصله، اجازۀ ذخیرۀ تکه‌های کد و افزودن آنها را به کدتان می‌دهد +Comment[fr]=Ce module externe permet de stocker des fragments de code et de les ajouter à votre code +Comment[gl]=Esta extensión permite almacenar fragmentos de código e engadilos ao seu código +Comment[hu]=Ez a modul kódrészletek eltárolását és programkódba való beillesztését teszi lehetővé +Comment[it]=Questo plugin consente di memorizzare frammenti di codice e di aggiungerli al tuo codice +Comment[ja]=このプラグインはコード断片を格納し、あなたのコードにそれらを加えることを可能にします。 +Comment[ms]=Plugin ini membenarkan anda untuk menyimpan petikan kod dan menambahkannya ke dalam kod anda +Comment[nds]=Dit Moduul stellt dat Sekern un Tofögen vun Kode-Snippels praat. +Comment[ne]=यो प्लगइनले तपाईँलाई सङ्केत स्निपेट्स भण्डारण गर्न र तपाईँको सङ्केतमा तिनीहरूलाई थप्न अनुमति दिन्छ +Comment[nl]=Deze plugin staat u toe om tekstblokken op te slaan en deze toe te voegen aan uw code +Comment[pl]=Wtyczka umożliwiająca zapisanie fragmentów kodu i wstawianie ich później do kodu +Comment[pt]=Este 'plugin' permite-lhe guardar pedaços de códigos e adicioná-los ao seu código +Comment[pt_BR]=Este plug-in permite a você armazenar os pedaços de código e adicioná-los em seu código +Comment[ru]=Модуль сохранения часто используемых частей кода в одно место для быстрого доступа к ним +Comment[sk]=Modul umožní uložiť si výňatky kódu a ich vkladať +Comment[sr]=Овај прикључак вам омогућава да чувате исечке кôда и додајете их у сопствени кôд +Comment[sr@Latn]=Ovaj priključak vam omogućava da čuvate isečke kôda i dodajete ih u sopstveni kôd +Comment[sv]=Det här insticksprogrammet gör det möjligt att lagra kodsnuttar och lägga till dem i din kod +Comment[ta]=இந்த உள்ளீடுகள் ஸ்னிப்பட் குறியீடுகளை சேமிக்கவும் மற்றும் அக்குறியீட்டை சேர்க்கவும் வழிவகுக்கிறது +Comment[tg]=Нигоҳ дории модул баъзан истифодашавии як қисми код дар як ҷой барои зуд роҳ гирифтан ба он ҷо +Comment[tr]=Bu eklenti kod parçalarını saklamanızı ve onları kodunuza eklemenizi sağlar +Comment[zh_CN]=这个插件允许您保存代码片段并将这些片段插入到您的代码中 +Comment[zh_TW]=此外掛程式讓您儲存程式碼片段,並可以加入您的程式碼中 +Name=Code Snippets +Name[ca]=Trossos de codi +Name[da]=Kodestumper +Name[de]=Quelltext-Schnipsel +Name[el]=Δείγματα κώδικα +Name[es]=Trozos de código +Name[et]=Koodijupid +Name[eu]=Kode zatiak +Name[fa]=تکه‌های کد +Name[fr]=Fragments de code +Name[ga]=Blúirí Cóid +Name[hu]=Kódrészletek +Name[it]=Frammenti di codice +Name[ja]=コード Snippet +Name[ms]=Petikan Kod +Name[nds]=Kode-Snippels +Name[ne]=सङ्केत स्निपेट्स +Name[pl]=Fragmenty kodu +Name[pt]=Pedaços de Código +Name[pt_BR]=Pedaços de Código +Name[ru]=Заготовки кода +Name[sk]=Výňatky kódu +Name[sl]=Odseki kode +Name[sv]=Kodsnuttar +Name[ta]=ஸ்னிப்பட் குறியீடுகள் +Name[tg]=Тайёр намудани код +Name[tr]=Kod Parçacıkları +Name[zh_CN]=代码片段 +Name[zh_TW]=程式碼片段 +GenericName=Code Snippets +GenericName[ca]=Trossos de codi +GenericName[da]=Kodestumper +GenericName[de]=Quelltext-Schnipsel +GenericName[el]=Δείγματα κώδικα +GenericName[es]=Trozos de código +GenericName[et]=Koodijupid +GenericName[eu]=Kode zatiak +GenericName[fa]=تکه‌های کد +GenericName[fr]=Fragments de code +GenericName[ga]=Blúirí Cóid +GenericName[gl]=Fragmentos de código +GenericName[hu]=Kódrészletek +GenericName[it]=Frammenti di codice +GenericName[ja]=コード Snippet +GenericName[ms]=Petikan Kod +GenericName[nds]=Kode-Snippels +GenericName[ne]=सङ्केत स्निपेट्स +GenericName[nl]=Tekstblokken +GenericName[pl]=Fragmenty kodu +GenericName[pt]=Pedaços de Código +GenericName[pt_BR]=Pedaços de código +GenericName[ru]=Заготовки кода +GenericName[sk]=Výňatky kódu +GenericName[sl]=Odseki kode +GenericName[sr]=Исечци кôда +GenericName[sr@Latn]=Isečci kôda +GenericName[sv]=Kodsnuttar +GenericName[ta]=ஸ்ப்பட் குறியீடு +GenericName[tg]=Тайёр намудани кодҳо +GenericName[tr]=Kod Parçacıkları +GenericName[zh_CN]=代码片段 +GenericName[zh_TW]=程式碼片段 +Icon=editcut +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Global +X-TDE-Library=libkdevsnippet +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeEditing diff --git a/parts/snippet/snippet_part.cpp b/parts/snippet/snippet_part.cpp index e31ebe7a..82969151 100644 --- a/parts/snippet/snippet_part.cpp +++ b/parts/snippet/snippet_part.cpp @@ -20,11 +20,11 @@ #include #include -#include "tdevcore.h" -#include -#include "tdevmainwindow.h" -#include -#include +#include "kdevcore.h" +#include +#include "kdevmainwindow.h" +#include +#include #include @@ -33,15 +33,15 @@ #include "snippetsettings.h" #include "snippetconfig.h" -static const TDevPluginInfo data("tdevsnippet"); -typedef TDevGenericFactory snippetFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevsnippet, snippetFactory( data ) ) +static const KDevPluginInfo data("kdevsnippet"); +typedef KDevGenericFactory snippetFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevsnippet, snippetFactory( data ) ) SnippetPart::SnippetPart(TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin(&data, parent, name ? name : "SnippetPart" ) + : KDevPlugin(&data, parent, name ? name : "SnippetPart" ) { setInstance(snippetFactory::instance()); - setXMLFile("tdevpart_snippet.rc"); + setXMLFile("kdevpart_snippet.rc"); m_widget = new SnippetWidget(this); m_widget->setCaption(i18n("Code Snippets")); diff --git a/parts/snippet/snippet_part.h b/parts/snippet/snippet_part.h index 98a809cf..8ffd8fce 100644 --- a/parts/snippet/snippet_part.h +++ b/parts/snippet/snippet_part.h @@ -7,12 +7,12 @@ */ -#ifndef __TDEVPART_SNIPPET_H__ -#define __TDEVPART_SNIPPET_H__ +#ifndef __KDEVPART_SNIPPET_H__ +#define __KDEVPART_SNIPPET_H__ #include -#include +#include class SnippetWidget; @@ -20,11 +20,11 @@ class TDEAboutData; class KDialogBase; /* -This is the TDevPlugin for the CodeSnippet feature +This is the KDevPlugin for the CodeSnippet feature For more info read the README.dox file @author Robert Gruber */ -class SnippetPart : public TDevPlugin +class SnippetPart : public KDevPlugin { Q_OBJECT diff --git a/parts/snippet/snippet_widget.cpp b/parts/snippet/snippet_widget.cpp index 6b59f16f..9cd4ae4b 100644 --- a/parts/snippet/snippet_widget.cpp +++ b/parts/snippet/snippet_widget.cpp @@ -36,9 +36,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "snippetdlg.h" #include "snippetitem.h" @@ -418,7 +418,7 @@ void SnippetWidget::initConfigOldVersion(TDEConfig *cfg) void SnippetWidget::initConfig() { if (_cfg == NULL) - _cfg = new TDEConfig("tdevsnippetrc", false, false); + _cfg = new TDEConfig("kdevsnippetrc", false, false); _cfg->setGroup("SnippetPart"); diff --git a/parts/snippet/snippet_widget.h b/parts/snippet/snippet_widget.h index 4d534802..8b6c17a1 100644 --- a/parts/snippet/snippet_widget.h +++ b/parts/snippet/snippet_widget.h @@ -19,7 +19,7 @@ #include #include "snippetconfig.h" -class TDevProject; +class KDevProject; class SnippetPart; class TQPushButton; class TDEListView; diff --git a/parts/snippet/tdevpart_snippet.rc b/parts/snippet/tdevpart_snippet.rc deleted file mode 100644 index f4b9d2db..00000000 --- a/parts/snippet/tdevpart_snippet.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/parts/snippet/tdevsnippet.desktop b/parts/snippet/tdevsnippet.desktop deleted file mode 100644 index b257280c..00000000 --- a/parts/snippet/tdevsnippet.desktop +++ /dev/null @@ -1,102 +0,0 @@ -[Desktop Entry] -Type=Service -Exec= -Comment=This plugin allows you to store code snippets and add them to your code -Comment[ca]=Aquest connector permet guardar trossos de codi i afegir-los més tard al vostre codi -Comment[da]=Dette plugin tillader dig at opbevare kodestumper og tilføje dem til din kode -Comment[de]=Dieses Modul erlaubt das Abspeichern und Wiederverwenden von Quelltext-Schnipseln -Comment[el]=Αυτό το πρόσθετο σας επιτρέπει να αποθηκεύσετε δείγματα κώδικα και να τα προσθέσετε στον κώδικά σας -Comment[es]=Este complemento permite almacenar trozos de código y añadirlos a su código fuente -Comment[et]=See plugin võimaldab salvestada koodijuppe ja neid koodi lisada -Comment[eu]=Plugin honek kode zatiak gordetzeo eta zure kodeari gehitzeko aukera eskeintzen dizu -Comment[fa]=این وصله، اجازۀ ذخیرۀ تکه‌های کد و افزودن آنها را به کدتان می‌دهد -Comment[fr]=Ce module externe permet de stocker des fragments de code et de les ajouter à votre code -Comment[gl]=Esta extensión permite almacenar fragmentos de código e engadilos ao seu código -Comment[hu]=Ez a modul kódrészletek eltárolását és programkódba való beillesztését teszi lehetővé -Comment[it]=Questo plugin consente di memorizzare frammenti di codice e di aggiungerli al tuo codice -Comment[ja]=このプラグインはコード断片を格納し、あなたのコードにそれらを加えることを可能にします。 -Comment[ms]=Plugin ini membenarkan anda untuk menyimpan petikan kod dan menambahkannya ke dalam kod anda -Comment[nds]=Dit Moduul stellt dat Sekern un Tofögen vun Kode-Snippels praat. -Comment[ne]=यो प्लगइनले तपाईँलाई सङ्केत स्निपेट्स भण्डारण गर्न र तपाईँको सङ्केतमा तिनीहरूलाई थप्न अनुमति दिन्छ -Comment[nl]=Deze plugin staat u toe om tekstblokken op te slaan en deze toe te voegen aan uw code -Comment[pl]=Wtyczka umożliwiająca zapisanie fragmentów kodu i wstawianie ich później do kodu -Comment[pt]=Este 'plugin' permite-lhe guardar pedaços de códigos e adicioná-los ao seu código -Comment[pt_BR]=Este plug-in permite a você armazenar os pedaços de código e adicioná-los em seu código -Comment[ru]=Модуль сохранения часто используемых частей кода в одно место для быстрого доступа к ним -Comment[sk]=Modul umožní uložiť si výňatky kódu a ich vkladať -Comment[sr]=Овај прикључак вам омогућава да чувате исечке кôда и додајете их у сопствени кôд -Comment[sr@Latn]=Ovaj priključak vam omogućava da čuvate isečke kôda i dodajete ih u sopstveni kôd -Comment[sv]=Det här insticksprogrammet gör det möjligt att lagra kodsnuttar och lägga till dem i din kod -Comment[ta]=இந்த உள்ளீடுகள் ஸ்னிப்பட் குறியீடுகளை சேமிக்கவும் மற்றும் அக்குறியீட்டை சேர்க்கவும் வழிவகுக்கிறது -Comment[tg]=Нигоҳ дории модул баъзан истифодашавии як қисми код дар як ҷой барои зуд роҳ гирифтан ба он ҷо -Comment[tr]=Bu eklenti kod parçalarını saklamanızı ve onları kodunuza eklemenizi sağlar -Comment[zh_CN]=这个插件允许您保存代码片段并将这些片段插入到您的代码中 -Comment[zh_TW]=此外掛程式讓您儲存程式碼片段,並可以加入您的程式碼中 -Name=Code Snippets -Name[ca]=Trossos de codi -Name[da]=Kodestumper -Name[de]=Quelltext-Schnipsel -Name[el]=Δείγματα κώδικα -Name[es]=Trozos de código -Name[et]=Koodijupid -Name[eu]=Kode zatiak -Name[fa]=تکه‌های کد -Name[fr]=Fragments de code -Name[ga]=Blúirí Cóid -Name[hu]=Kódrészletek -Name[it]=Frammenti di codice -Name[ja]=コード Snippet -Name[ms]=Petikan Kod -Name[nds]=Kode-Snippels -Name[ne]=सङ्केत स्निपेट्स -Name[pl]=Fragmenty kodu -Name[pt]=Pedaços de Código -Name[pt_BR]=Pedaços de Código -Name[ru]=Заготовки кода -Name[sk]=Výňatky kódu -Name[sl]=Odseki kode -Name[sv]=Kodsnuttar -Name[ta]=ஸ்னிப்பட் குறியீடுகள் -Name[tg]=Тайёр намудани код -Name[tr]=Kod Parçacıkları -Name[zh_CN]=代码片段 -Name[zh_TW]=程式碼片段 -GenericName=Code Snippets -GenericName[ca]=Trossos de codi -GenericName[da]=Kodestumper -GenericName[de]=Quelltext-Schnipsel -GenericName[el]=Δείγματα κώδικα -GenericName[es]=Trozos de código -GenericName[et]=Koodijupid -GenericName[eu]=Kode zatiak -GenericName[fa]=تکه‌های کد -GenericName[fr]=Fragments de code -GenericName[ga]=Blúirí Cóid -GenericName[gl]=Fragmentos de código -GenericName[hu]=Kódrészletek -GenericName[it]=Frammenti di codice -GenericName[ja]=コード Snippet -GenericName[ms]=Petikan Kod -GenericName[nds]=Kode-Snippels -GenericName[ne]=सङ्केत स्निपेट्स -GenericName[nl]=Tekstblokken -GenericName[pl]=Fragmenty kodu -GenericName[pt]=Pedaços de Código -GenericName[pt_BR]=Pedaços de código -GenericName[ru]=Заготовки кода -GenericName[sk]=Výňatky kódu -GenericName[sl]=Odseki kode -GenericName[sr]=Исечци кôда -GenericName[sr@Latn]=Isečci kôda -GenericName[sv]=Kodsnuttar -GenericName[ta]=ஸ்ப்பட் குறியீடு -GenericName[tg]=Тайёр намудани кодҳо -GenericName[tr]=Kod Parçacıkları -GenericName[zh_CN]=代码片段 -GenericName[zh_TW]=程式碼片段 -Icon=editcut -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Global -X-TDE-Library=libtdevsnippet -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeEditing diff --git a/parts/texttools/CMakeLists.txt b/parts/texttools/CMakeLists.txt index 4a893dd4..2ed4221c 100644 --- a/parts/texttools/CMakeLists.txt +++ b/parts/texttools/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevtexttools.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevtexttools.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevtexttools (module) ################# +##### libkdevtexttools (module) ################# -tde_add_kpart( libtdevtexttools AUTOMOC +tde_add_kpart( libkdevtexttools AUTOMOC SOURCES texttoolspart.cpp texttoolswidget.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/texttools/Makefile.am b/parts/texttools/Makefile.am index 105eec32..725133be 100644 --- a/parts/texttools/Makefile.am +++ b/parts/texttools/Makefile.am @@ -2,17 +2,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/sourceinfo -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevtexttools.la -libtdevtexttools_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevtexttools_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevtexttools.la +libkdevtexttools_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevtexttools_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevtexttools_la_SOURCES = texttoolspart.cpp texttoolswidget.cpp +libkdevtexttools_la_SOURCES = texttoolspart.cpp texttoolswidget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevtexttools.desktop +service_DATA = kdevtexttools.desktop # not used currently -#rcdir = $(kde_datadir)/tdevtexttools -#rc_DATA = tdevtexttools.rc +#rcdir = $(kde_datadir)/kdevtexttools +#rc_DATA = kdevtexttools.rc diff --git a/parts/texttools/kdevtexttools.desktop b/parts/texttools/kdevtexttools.desktop new file mode 100644 index 00000000..fd5fc736 --- /dev/null +++ b/parts/texttools/kdevtexttools.desktop @@ -0,0 +1,84 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a structure overview and navigation for HTML and TEX files +Comment[ca]=Proporciona una vista de conjunt i navegació per a fitxers HTML i TEX +Comment[da]=Giver et strukturoverblik og navigering for HTML- og TeX-filer +Comment[de]=Stellt eine Strukturansicht für HTML- und TeX-Dateien zur Verfügung +Comment[el]=Προσφέρει μια περίληψη δομής και πλοήγηση για αρχεία HTML και TEX +Comment[es]=Proporciona una vista general y navegación para archivos HTML y TEX +Comment[et]=Näitab HTML- ja TEX-failide struktuuri ning võimaldab neis liikuda +Comment[eu]=HTML eta TEX fitxategien egituren laburpen eta nabigazioa eskeintzen du. +Comment[fa]=خلاصۀ ساختار و ناوش را برای پرونده‌های زنگام و متن فراهم می‌کند +Comment[fr]=Fournit une vue d'ensemble et une navigation pour les fichiers HTML et TEX +Comment[gl]=Proporciona unha vista xeral e navegación da estructura de ficheiros HTML e TEX +Comment[hu]=Lehetővé teszi a struktúra áttekintését, navigálását HTML és TEX fájloknál +Comment[it]=Offre un'anteprima di struttura e navigazione per file HTML e TEX +Comment[ja]=HTML や TeX ファイルの構造の概要やナビゲーションを提供します。 +Comment[ms]=Menyediakan struktur menyeluruh dan navigasi untuk HTML dan fail TEX +Comment[nds]=Stellt en Struktuuröversicht un dat Stüern för HTML- un TeX-Dateien praat. +Comment[ne]=HTML र TEX फाइलका लागि नेभिगेसन र बनावट समिक्षा प्रदान गर्दछ +Comment[nl]=Biedt een overzicht van de structuur van HTML- en TeX-bestanden +Comment[pl]=Widok struktury tekstu i nawigacja dla plików HTML i TEX +Comment[pt]=Oferece uma vista geral estruturada e a navegação sobre os ficheiros de HTML e TEX +Comment[pt_BR]=Fornece uma visão de estrutura e navegação para arquivos HTML e TEX +Comment[ru]=Показывает структуру документов в формате HTML и TEX, а также предоставляет возможности навигации по ним. +Comment[sk]=Poskytuje štruktúrovaný náhľad a navigáciu pre HTML a TEX súbory +Comment[sr]=Обезбеђује преглед структуре и навигацију за HTML и TEX фајлове +Comment[sr@Latn]=Obezbeđuje pregled strukture i navigaciju za HTML i TEX fajlove +Comment[sv]=Tillhandahåller en strukturöversikt och navigering för HTML- och Tex-filer +Comment[ta]=HTML மற்றும் TEX கோப்புகளின் அமைப்பை மேற்பார்வையிட மற்றும் வழி செலுத்த இது உதவும். +Comment[tg]=Ҳуҷҷатҳои структуриро дар формати HTML ва TEX тасвир менамояд ва боз ҳам имкони навигатсия намуданро иҷозат медиҳад +Comment[tr]=HTML ve TEX dosyaları için yapı gözden geçirimi ve dolaşımı sağlar. +Comment[zh_CN]=提供HTML和TEX文件的结构预览 +Comment[zh_TW]=提供 HTML 與 TEX 檔的結構化的概觀與導覽 +Name=KDevTextTools +Name[da]=TDevelop tekstværktøjer +Name[de]=Textstrukturansicht (TDevelop) +Name[hi]=के-डेव-टेक्स्ट-टूल्स +Name[nds]=TDevelop-TextWarktüüch +Name[pl]=KDevNarzędziaTekstowe +Name[sk]=KDev textové nástroje +Name[sv]=TDevelop textverktyg +Name[ta]=KDev உரைக்கருவி +Name[tg]=Асбобҳои матни KDev +Name[zh_TW]=TDevelop 文字工具 +GenericName=Text Structure +GenericName[br]=Skeledenn ar skrid +GenericName[ca]=Estructura del text +GenericName[da]=Tekststruktur +GenericName[de]=Textstruktur-Ansicht +GenericName[el]=Δομή κειμένου +GenericName[es]=Estructura de texto +GenericName[et]=Tekstistruktuur +GenericName[eu]=Testuaren egitura +GenericName[fa]=ساختار متن +GenericName[fr]=Structure du texte +GenericName[gl]=Estructura do texto +GenericName[hi]=टेक्स्ट स्ट्रक्चर +GenericName[hu]=Szövegstruktúra +GenericName[it]=Struttura testo +GenericName[ja]=テキスト構造 +GenericName[ms]=Struktur Teks +GenericName[nds]=Textstruktuur +GenericName[ne]=पाठ बनावट +GenericName[nl]=Tekststructuur +GenericName[pl]=Struktura tekstu +GenericName[pt]=Estrutura de Texto +GenericName[pt_BR]=Estrutura de Texto +GenericName[ru]=Показ структуры текста +GenericName[sk]=Textové štruktúry +GenericName[sl]=Besedilna struktura +GenericName[sr]=Структура текста +GenericName[sr@Latn]=Struktura teksta +GenericName[sv]=Textstruktur +GenericName[ta]=உரை வடிவம் +GenericName[tg]=Тасвири матни структурӣ +GenericName[tr]=Metin Yapısı +GenericName[zh_CN]=文件结构 +GenericName[zh_TW]=文字結構 +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevtexttools +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=CodeNavigation diff --git a/parts/texttools/tdevtexttools.desktop b/parts/texttools/tdevtexttools.desktop deleted file mode 100644 index c9caf618..00000000 --- a/parts/texttools/tdevtexttools.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a structure overview and navigation for HTML and TEX files -Comment[ca]=Proporciona una vista de conjunt i navegació per a fitxers HTML i TEX -Comment[da]=Giver et strukturoverblik og navigering for HTML- og TeX-filer -Comment[de]=Stellt eine Strukturansicht für HTML- und TeX-Dateien zur Verfügung -Comment[el]=Προσφέρει μια περίληψη δομής και πλοήγηση για αρχεία HTML και TEX -Comment[es]=Proporciona una vista general y navegación para archivos HTML y TEX -Comment[et]=Näitab HTML- ja TEX-failide struktuuri ning võimaldab neis liikuda -Comment[eu]=HTML eta TEX fitxategien egituren laburpen eta nabigazioa eskeintzen du. -Comment[fa]=خلاصۀ ساختار و ناوش را برای پرونده‌های زنگام و متن فراهم می‌کند -Comment[fr]=Fournit une vue d'ensemble et une navigation pour les fichiers HTML et TEX -Comment[gl]=Proporciona unha vista xeral e navegación da estructura de ficheiros HTML e TEX -Comment[hu]=Lehetővé teszi a struktúra áttekintését, navigálását HTML és TEX fájloknál -Comment[it]=Offre un'anteprima di struttura e navigazione per file HTML e TEX -Comment[ja]=HTML や TeX ファイルの構造の概要やナビゲーションを提供します。 -Comment[ms]=Menyediakan struktur menyeluruh dan navigasi untuk HTML dan fail TEX -Comment[nds]=Stellt en Struktuuröversicht un dat Stüern för HTML- un TeX-Dateien praat. -Comment[ne]=HTML र TEX फाइलका लागि नेभिगेसन र बनावट समिक्षा प्रदान गर्दछ -Comment[nl]=Biedt een overzicht van de structuur van HTML- en TeX-bestanden -Comment[pl]=Widok struktury tekstu i nawigacja dla plików HTML i TEX -Comment[pt]=Oferece uma vista geral estruturada e a navegação sobre os ficheiros de HTML e TEX -Comment[pt_BR]=Fornece uma visão de estrutura e navegação para arquivos HTML e TEX -Comment[ru]=Показывает структуру документов в формате HTML и TEX, а также предоставляет возможности навигации по ним. -Comment[sk]=Poskytuje štruktúrovaný náhľad a navigáciu pre HTML a TEX súbory -Comment[sr]=Обезбеђује преглед структуре и навигацију за HTML и TEX фајлове -Comment[sr@Latn]=Obezbeđuje pregled strukture i navigaciju za HTML i TEX fajlove -Comment[sv]=Tillhandahåller en strukturöversikt och navigering för HTML- och Tex-filer -Comment[ta]=HTML மற்றும் TEX கோப்புகளின் அமைப்பை மேற்பார்வையிட மற்றும் வழி செலுத்த இது உதவும். -Comment[tg]=Ҳуҷҷатҳои структуриро дар формати HTML ва TEX тасвир менамояд ва боз ҳам имкони навигатсия намуданро иҷозат медиҳад -Comment[tr]=HTML ve TEX dosyaları için yapı gözden geçirimi ve dolaşımı sağlar. -Comment[zh_CN]=提供HTML和TEX文件的结构预览 -Comment[zh_TW]=提供 HTML 與 TEX 檔的結構化的概觀與導覽 -Name=KDevTextTools -Name[da]=TDevelop tekstværktøjer -Name[de]=Textstrukturansicht (TDevelop) -Name[hi]=के-डेव-टेक्स्ट-टूल्स -Name[nds]=TDevelop-TextWarktüüch -Name[pl]=KDevNarzędziaTekstowe -Name[sk]=KDev textové nástroje -Name[sv]=TDevelop textverktyg -Name[ta]=KDev உரைக்கருவி -Name[tg]=Асбобҳои матни KDev -Name[zh_TW]=TDevelop 文字工具 -GenericName=Text Structure -GenericName[br]=Skeledenn ar skrid -GenericName[ca]=Estructura del text -GenericName[da]=Tekststruktur -GenericName[de]=Textstruktur-Ansicht -GenericName[el]=Δομή κειμένου -GenericName[es]=Estructura de texto -GenericName[et]=Tekstistruktuur -GenericName[eu]=Testuaren egitura -GenericName[fa]=ساختار متن -GenericName[fr]=Structure du texte -GenericName[gl]=Estructura do texto -GenericName[hi]=टेक्स्ट स्ट्रक्चर -GenericName[hu]=Szövegstruktúra -GenericName[it]=Struttura testo -GenericName[ja]=テキスト構造 -GenericName[ms]=Struktur Teks -GenericName[nds]=Textstruktuur -GenericName[ne]=पाठ बनावट -GenericName[nl]=Tekststructuur -GenericName[pl]=Struktura tekstu -GenericName[pt]=Estrutura de Texto -GenericName[pt_BR]=Estrutura de Texto -GenericName[ru]=Показ структуры текста -GenericName[sk]=Textové štruktúry -GenericName[sl]=Besedilna struktura -GenericName[sr]=Структура текста -GenericName[sr@Latn]=Struktura teksta -GenericName[sv]=Textstruktur -GenericName[ta]=உரை வடிவம் -GenericName[tg]=Тасвири матни структурӣ -GenericName[tr]=Metin Yapısı -GenericName[zh_CN]=文件结构 -GenericName[zh_TW]=文字結構 -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevtexttools -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=CodeNavigation diff --git a/parts/texttools/texttoolspart.cpp b/parts/texttools/texttoolspart.cpp index 857e2bec..4453030a 100644 --- a/parts/texttools/texttoolspart.cpp +++ b/parts/texttools/texttoolspart.cpp @@ -14,25 +14,25 @@ #include #include #include -#include -#include +#include +#include #include -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" #include "texttoolswidget.h" -typedef TDevGenericFactory TextToolsFactory; -static const TDevPluginInfo data("tdevtexttools"); -K_EXPORT_COMPONENT_FACTORY( libtdevtexttools, TextToolsFactory( data ) ) +typedef KDevGenericFactory TextToolsFactory; +static const KDevPluginInfo data("kdevtexttools"); +K_EXPORT_COMPONENT_FACTORY( libkdevtexttools, TextToolsFactory( data ) ) TextToolsPart::TextToolsPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "TextToolsPart") + : KDevPlugin(&data, parent, name ? name : "TextToolsPart") { setInstance(TextToolsFactory::instance()); - // setXMLFile("tdevfileview.rc"); + // setXMLFile("kdevfileview.rc"); m_widget = 0; diff --git a/parts/texttools/texttoolspart.h b/parts/texttools/texttoolspart.h index fa911d98..0d822a65 100644 --- a/parts/texttools/texttoolspart.h +++ b/parts/texttools/texttoolspart.h @@ -14,12 +14,12 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" class TextToolsWidget; -class TextToolsPart : public TDevPlugin +class TextToolsPart : public KDevPlugin { Q_OBJECT diff --git a/parts/texttools/texttoolswidget.cpp b/parts/texttools/texttoolswidget.cpp index ebf0c56b..db2f0acc 100644 --- a/parts/texttools/texttoolswidget.cpp +++ b/parts/texttools/texttoolswidget.cpp @@ -22,8 +22,8 @@ #include #include -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" #include "texttoolspart.h" diff --git a/parts/tipofday/CMakeLists.txt b/parts/tipofday/CMakeLists.txt index c3990be1..753f65e1 100644 --- a/parts/tipofday/CMakeLists.txt +++ b/parts/tipofday/CMakeLists.txt @@ -27,14 +27,14 @@ link_directories( ##### other data ################################ tde_install_icons( ) -install( FILES tdevtipofday.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tips DESTINATION ${DATA_INSTALL_DIR}/tdevtipofday ) -install( FILES tdevpart_tipofday.rc DESTINATION ${DATA_INSTALL_DIR}/tdevtipofday ) +install( FILES kdevtipofday.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES tips DESTINATION ${DATA_INSTALL_DIR}/kdevtipofday ) +install( FILES kdevpart_tipofday.rc DESTINATION ${DATA_INSTALL_DIR}/kdevtipofday ) -##### libtdevtipofday (module) ################## +##### libkdevtipofday (module) ################## -tde_add_kpart( libtdevtipofday AUTOMOC +tde_add_kpart( libkdevtipofday AUTOMOC SOURCES tipofday_part.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/tipofday/Makefile.am b/parts/tipofday/Makefile.am index 22560851..4ec54292 100644 --- a/parts/tipofday/Makefile.am +++ b/parts/tipofday/Makefile.am @@ -1,24 +1,24 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevtipofday.la -libtdevtipofday_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevtipofday_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevtipofday.la +libkdevtipofday_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevtipofday_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevtipofday_la_SOURCES = tipofday_part.cpp +libkdevtipofday_la_SOURCES = tipofday_part.cpp METASOURCES = AUTO KDE_ICON = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevtipofday.desktop +service_DATA = kdevtipofday.desktop tip_DATA = tips -tipdir = $(kde_datadir)/tdevtipofday +tipdir = $(kde_datadir)/kdevtipofday -rc_DATA = tdevpart_tipofday.rc -rcdir = $(kde_datadir)/tdevtipofday +rc_DATA = kdevpart_tipofday.rc +rcdir = $(kde_datadir)/kdevtipofday messages: rc.cpp $(PREPARETIPS) > tips.cc - $(XGETTEXT) *.cpp *.h tips.cc -o $(podir)/tdevtipofday.pot + $(XGETTEXT) *.cpp *.h tips.cc -o $(podir)/kdevtipofday.pot rm -f tips.cc diff --git a/parts/tipofday/kdevpart_tipofday.rc b/parts/tipofday/kdevpart_tipofday.rc new file mode 100644 index 00000000..43f7d1dc --- /dev/null +++ b/parts/tipofday/kdevpart_tipofday.rc @@ -0,0 +1,8 @@ + + + + &Help + + + + diff --git a/parts/tipofday/kdevtipofday.desktop b/parts/tipofday/kdevtipofday.desktop new file mode 100644 index 00000000..7efdbd9f --- /dev/null +++ b/parts/tipofday/kdevtipofday.desktop @@ -0,0 +1,94 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Tip of the Day +Comment[br]=Lagadenn an deiz +Comment[ca]=Consell del dia +Comment[cy]=Awgrymiad y Dydd +Comment[da]=Dagens vink +Comment[de]=Tipp des Tages +Comment[el]=Συμβουλή της ημέρας +Comment[es]=Consejo del día +Comment[et]=Päeva nõuanne +Comment[eu]=Eguneko aholkua +Comment[fa]=نکتۀ روز +Comment[fr]=Astuce du jour +Comment[ga]=Leid an Lae +Comment[gl]=Consello do día +Comment[hi]=टिप ऑफ द डे +Comment[hu]=A nap tippje +Comment[it]=Suggerimento del giorno +Comment[ja]=今日の一言 +Comment[ms]=Tip Hari Ini +Comment[nds]=Tipp för Vundaag +Comment[ne]=आजको टिप +Comment[nl]=Tip van de dag +Comment[pa]=ਅੱਜ ਦਾ ਇਸ਼ਾਰਾ +Comment[pl]=Podpowiedź dnia +Comment[pt]=Dica do Dia +Comment[pt_BR]=Dica do Dia +Comment[ru]=Полезный совет +Comment[sk]=Tip dňa +Comment[sl]=Namig dneva +Comment[sr]=Савет дана +Comment[sr@Latn]=Savet dana +Comment[sv]=Dagens tips +Comment[ta]=இந்த நாளுக்கான யோசனை +Comment[tg]=Маслиҳати фоиданок +Comment[tr]=Günün İpucu +Comment[zh_CN]=日积月累 +Comment[zh_TW]=本日小提示 +Name=KDevTipOfDay +Name[da]=TDevelop Dagens vink +Name[de]="Tipp des Tages"-Modul (TDevelop) +Name[hi]=के-डेव-टिप-ऑफ-डे +Name[nds]=TDevelop-"Tipp för Vundaag" +Name[pl]=KDevPodpowiedźDnia +Name[sk]=KDev tip dňa +Name[sv]=TDevelop dagens tips +Name[ta]=KDevஇந்த நாளுக்கான யோசனை +Name[tg]=KDevЛуқмаи рӯз +Name[zh_TW]=TDevelop 本日小提示 +GenericName=Tip of the Day +GenericName[br]=Lagadenn an deiz +GenericName[ca]=Consell del dia +GenericName[cy]=Awgrymiad y Dydd +GenericName[da]=Dagens vink +GenericName[de]=Tipp des Tages +GenericName[el]=Συμβουλή της ημέρας +GenericName[es]=Consejo del día +GenericName[et]=Päeva nõuanne +GenericName[eu]=Eguneko aholkua +GenericName[fa]=نکتۀ روز +GenericName[fr]=Astuce du jour +GenericName[ga]=Leid an Lae +GenericName[gl]=Consello do día +GenericName[hi]=टिप ऑफ द डे +GenericName[hu]=A nap tippje +GenericName[it]=Suggerimento del giorno +GenericName[ja]=今日の一言 +GenericName[ms]=Tip Hari Ini +GenericName[nds]=Tipp för Vundaag +GenericName[ne]=आजको टिप +GenericName[nl]=Tip van de dag +GenericName[pa]=ਅੱਜ ਦਾ ਇਸ਼ਾਰਾ +GenericName[pl]=Podpowiedź dnia +GenericName[pt]=Dica do Dia +GenericName[pt_BR]=Dica do Dia +GenericName[ru]=Полезный совет +GenericName[sk]=Tip dňa +GenericName[sl]=Namig dneva +GenericName[sr]=Савет дана +GenericName[sr@Latn]=Savet dana +GenericName[sv]=Dagens tips +GenericName[ta]=இந்த நாளுக்கான யோசனை +GenericName[tg]=Маслиҳати фоиданок +GenericName[tr]=Günün İpucu +GenericName[zh_CN]=日积月累 +GenericName[zh_TW]=本日小提示 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevtipofday +X-TDevelop-Version=5 +X-TDevelop-Scope=Core +X-TDevelop-Properties=Documentation diff --git a/parts/tipofday/tdevpart_tipofday.rc b/parts/tipofday/tdevpart_tipofday.rc deleted file mode 100644 index 43f7d1dc..00000000 --- a/parts/tipofday/tdevpart_tipofday.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - &Help - - - - diff --git a/parts/tipofday/tdevtipofday.desktop b/parts/tipofday/tdevtipofday.desktop deleted file mode 100644 index 53d6d9c9..00000000 --- a/parts/tipofday/tdevtipofday.desktop +++ /dev/null @@ -1,94 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Tip of the Day -Comment[br]=Lagadenn an deiz -Comment[ca]=Consell del dia -Comment[cy]=Awgrymiad y Dydd -Comment[da]=Dagens vink -Comment[de]=Tipp des Tages -Comment[el]=Συμβουλή της ημέρας -Comment[es]=Consejo del día -Comment[et]=Päeva nõuanne -Comment[eu]=Eguneko aholkua -Comment[fa]=نکتۀ روز -Comment[fr]=Astuce du jour -Comment[ga]=Leid an Lae -Comment[gl]=Consello do día -Comment[hi]=टिप ऑफ द डे -Comment[hu]=A nap tippje -Comment[it]=Suggerimento del giorno -Comment[ja]=今日の一言 -Comment[ms]=Tip Hari Ini -Comment[nds]=Tipp för Vundaag -Comment[ne]=आजको टिप -Comment[nl]=Tip van de dag -Comment[pa]=ਅੱਜ ਦਾ ਇਸ਼ਾਰਾ -Comment[pl]=Podpowiedź dnia -Comment[pt]=Dica do Dia -Comment[pt_BR]=Dica do Dia -Comment[ru]=Полезный совет -Comment[sk]=Tip dňa -Comment[sl]=Namig dneva -Comment[sr]=Савет дана -Comment[sr@Latn]=Savet dana -Comment[sv]=Dagens tips -Comment[ta]=இந்த நாளுக்கான யோசனை -Comment[tg]=Маслиҳати фоиданок -Comment[tr]=Günün İpucu -Comment[zh_CN]=日积月累 -Comment[zh_TW]=本日小提示 -Name=KDevTipOfDay -Name[da]=TDevelop Dagens vink -Name[de]="Tipp des Tages"-Modul (TDevelop) -Name[hi]=के-डेव-टिप-ऑफ-डे -Name[nds]=TDevelop-"Tipp för Vundaag" -Name[pl]=KDevPodpowiedźDnia -Name[sk]=KDev tip dňa -Name[sv]=TDevelop dagens tips -Name[ta]=KDevஇந்த நாளுக்கான யோசனை -Name[tg]=KDevЛуқмаи рӯз -Name[zh_TW]=TDevelop 本日小提示 -GenericName=Tip of the Day -GenericName[br]=Lagadenn an deiz -GenericName[ca]=Consell del dia -GenericName[cy]=Awgrymiad y Dydd -GenericName[da]=Dagens vink -GenericName[de]=Tipp des Tages -GenericName[el]=Συμβουλή της ημέρας -GenericName[es]=Consejo del día -GenericName[et]=Päeva nõuanne -GenericName[eu]=Eguneko aholkua -GenericName[fa]=نکتۀ روز -GenericName[fr]=Astuce du jour -GenericName[ga]=Leid an Lae -GenericName[gl]=Consello do día -GenericName[hi]=टिप ऑफ द डे -GenericName[hu]=A nap tippje -GenericName[it]=Suggerimento del giorno -GenericName[ja]=今日の一言 -GenericName[ms]=Tip Hari Ini -GenericName[nds]=Tipp för Vundaag -GenericName[ne]=आजको टिप -GenericName[nl]=Tip van de dag -GenericName[pa]=ਅੱਜ ਦਾ ਇਸ਼ਾਰਾ -GenericName[pl]=Podpowiedź dnia -GenericName[pt]=Dica do Dia -GenericName[pt_BR]=Dica do Dia -GenericName[ru]=Полезный совет -GenericName[sk]=Tip dňa -GenericName[sl]=Namig dneva -GenericName[sr]=Савет дана -GenericName[sr@Latn]=Savet dana -GenericName[sv]=Dagens tips -GenericName[ta]=இந்த நாளுக்கான யோசனை -GenericName[tg]=Маслиҳати фоиданок -GenericName[tr]=Günün İpucu -GenericName[zh_CN]=日积月累 -GenericName[zh_TW]=本日小提示 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevtipofday -X-TDevelop-Version=5 -X-TDevelop-Scope=Core -X-TDevelop-Properties=Documentation diff --git a/parts/tipofday/tipofday_part.cpp b/parts/tipofday/tipofday_part.cpp index f86ebf1f..6cd63deb 100644 --- a/parts/tipofday/tipofday_part.cpp +++ b/parts/tipofday/tipofday_part.cpp @@ -8,28 +8,28 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include -#include "tdevapi.h" -#include "tdevcore.h" +#include "kdevapi.h" +#include "kdevcore.h" -static const TDevPluginInfo data("tdevtipofday"); +static const KDevPluginInfo data("kdevtipofday"); -typedef TDevGenericFactory TipOfDayFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevtipofday, TipOfDayFactory( data ) ) +typedef KDevGenericFactory TipOfDayFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevtipofday, TipOfDayFactory( data ) ) TipOfDayPart::TipOfDayPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "TipOfDayPart") + : KDevPlugin(&data, parent, name ? name : "TipOfDayPart") { setInstance(TipOfDayFactory::instance()); - setXMLFile("tdevpart_tipofday.rc"); + setXMLFile("kdevpart_tipofday.rc"); TDEAction *action; diff --git a/parts/tipofday/tipofday_part.h b/parts/tipofday/tipofday_part.h index b5aafe50..4b982800 100644 --- a/parts/tipofday/tipofday_part.h +++ b/parts/tipofday/tipofday_part.h @@ -3,14 +3,14 @@ */ -#ifndef __TDEVPART_TIPOFDAY_H__ -#define __TDEVPART_TIPOFDAY_H__ +#ifndef __KDEVPART_TIPOFDAY_H__ +#define __KDEVPART_TIPOFDAY_H__ -#include +#include -class TipOfDayPart : public TDevPlugin +class TipOfDayPart : public KDevPlugin { Q_OBJECT diff --git a/parts/tools/CMakeLists.txt b/parts/tools/CMakeLists.txt index aaa0d462..7bd64c81 100644 --- a/parts/tools/CMakeLists.txt +++ b/parts/tools/CMakeLists.txt @@ -28,13 +28,13 @@ link_directories( ##### other data ################################ -install( FILES tdevtools.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_tools.rc DESTINATION ${DATA_INSTALL_DIR}/tdevtools ) +install( FILES kdevtools.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_tools.rc DESTINATION ${DATA_INSTALL_DIR}/kdevtools ) -##### libtdevtools (module) ##################### +##### libkdevtools (module) ##################### -tde_add_kpart( libtdevtools AUTOMOC +tde_add_kpart( libkdevtools AUTOMOC SOURCES tools_part.cpp toolsconfig.cpp toolsconfigwidgetbase.ui toolsconfigwidget.cpp kapplicationtree.cpp addtooldlg.ui diff --git a/parts/tools/Makefile.am b/parts/tools/Makefile.am index da4d9d0b..a61da964 100644 --- a/parts/tools/Makefile.am +++ b/parts/tools/Makefile.am @@ -1,16 +1,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevtools.la -libtdevtools_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevtools_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevtools.la +libkdevtools_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevtools_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevtools_la_SOURCES = tools_part.cpp toolsconfig.cpp toolsconfigwidgetbase.ui toolsconfigwidget.cpp kapplicationtree.cpp addtooldlg.ui +libkdevtools_la_SOURCES = tools_part.cpp toolsconfig.cpp toolsconfigwidgetbase.ui toolsconfigwidget.cpp kapplicationtree.cpp addtooldlg.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevtools.desktop +service_DATA = kdevtools.desktop -rc_DATA = tdevpart_tools.rc -rcdir = $(kde_datadir)/tdevtools +rc_DATA = kdevpart_tools.rc +rcdir = $(kde_datadir)/kdevtools diff --git a/parts/tools/addtooldlg.ui b/parts/tools/addtooldlg.ui index 09fd5424..a1a6157e 100644 --- a/parts/tools/addtooldlg.ui +++ b/parts/tools/addtooldlg.ui @@ -159,7 +159,7 @@ executed.</p> The path and name of the application to execute
    - + tree @@ -179,7 +179,7 @@ executed.</p> - TDevApplicationTree + KDevApplicationTree
    kapplicationtree.h
    -1 diff --git a/parts/tools/addtooldlg.ui.h b/parts/tools/addtooldlg.ui.h index cabb91e7..fea69766 100644 --- a/parts/tools/addtooldlg.ui.h +++ b/parts/tools/addtooldlg.ui.h @@ -23,7 +23,7 @@ TQString AddToolDialog::getApp() void AddToolDialog::treeSelectionChanged( TQListViewItem * lvi ) { - TDevAppTreeListItem* item = dynamic_cast ( lvi ); + KDevAppTreeListItem* item = dynamic_cast ( lvi ); if ( !item || item->isDirectory() ) return; execEdit->setURL( item->executable() ); diff --git a/parts/tools/kapplicationtree.cpp b/parts/tools/kapplicationtree.cpp index 18e31265..8c13a4ea 100644 --- a/parts/tools/kapplicationtree.cpp +++ b/parts/tools/kapplicationtree.cpp @@ -1,5 +1,5 @@ /* This file is part of the KDE libraries - Nicked from KDElibs since TDevApplicationTree is not a public class.. + Nicked from KDElibs since KDevApplicationTree is not a public class.. Copyright (C) 1997 Torben Weis Copyright (C) 1999 Dirk A. Mueller @@ -65,7 +65,7 @@ template class TQPtrList; // ---------------------------------------------------------------------- -TDevAppTreeListItem::TDevAppTreeListItem( TDEListView* parent, const TQString & name, +KDevAppTreeListItem::KDevAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ) : TQListViewItem( parent, name ) { @@ -75,7 +75,7 @@ TDevAppTreeListItem::TDevAppTreeListItem( TDEListView* parent, const TQString & // ---------------------------------------------------------------------- -TDevAppTreeListItem::TDevAppTreeListItem( TQListViewItem* parent, const TQString & name, +KDevAppTreeListItem::KDevAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ) : TQListViewItem( parent, name ) { @@ -85,7 +85,7 @@ TDevAppTreeListItem::TDevAppTreeListItem( TQListViewItem* parent, const TQString // ---------------------------------------------------------------------- -void TDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry) +void KDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry) { setPixmap(0, pixmap); parsed = parse; @@ -101,7 +101,7 @@ void TDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, con // ---------------------------------------------------------------------- // Ensure that dirs are sorted in front of files and case is ignored -TQString TDevAppTreeListItem::key(int column, bool /*ascending*/) const +TQString KDevAppTreeListItem::key(int column, bool /*ascending*/) const { if (directory) return TQString::fromLatin1(" ") + text(column).upper(); @@ -109,29 +109,29 @@ TQString TDevAppTreeListItem::key(int column, bool /*ascending*/) const return text(column).upper(); } -void TDevAppTreeListItem::activate() +void KDevAppTreeListItem::activate() { if ( directory ) setOpen(!isOpen()); } -void TDevAppTreeListItem::setOpen( bool o ) +void KDevAppTreeListItem::setOpen( bool o ) { if( o && !parsed ) { // fill the children before opening - ((TDevApplicationTree *) parent())->addDesktopGroup( path, this ); + ((KDevApplicationTree *) parent())->addDesktopGroup( path, this ); parsed = true; } TQListViewItem::setOpen( o ); } -bool TDevAppTreeListItem::isDirectory() +bool KDevAppTreeListItem::isDirectory() { return directory; } // ---------------------------------------------------------------------- -TDevApplicationTree::TDevApplicationTree( TQWidget *parent, const char* name ) +KDevApplicationTree::KDevApplicationTree( TQWidget *parent, const char* name ) : TDEListView( parent, name ), currentitem(0) { addColumn( i18n("Known Applications") ); @@ -145,7 +145,7 @@ TDevApplicationTree::TDevApplicationTree( TQWidget *parent, const char* name ) // ---------------------------------------------------------------------- -bool TDevApplicationTree::isDirSel() +bool KDevApplicationTree::isDirSel() { if (!currentitem) return false; // if currentitem isn't set return currentitem->isDirectory(); @@ -153,12 +153,12 @@ bool TDevApplicationTree::isDirSel() // ---------------------------------------------------------------------- -void TDevApplicationTree::addDesktopGroup( TQString relPath, TDevAppTreeListItem *item) +void KDevApplicationTree::addDesktopGroup( TQString relPath, KDevAppTreeListItem *item) { KServiceGroup::Ptr root = KServiceGroup::group(relPath); KServiceGroup::List list = root->entries(); - TDevAppTreeListItem * newItem; + KDevAppTreeListItem * newItem; for( KServiceGroup::List::ConstIterator it = list.begin(); it != list.end(); it++) { @@ -200,10 +200,10 @@ void TDevApplicationTree::addDesktopGroup( TQString relPath, TDevAppTreeListItem TQPixmap pixmap = SmallIcon( icon ); if (item) - newItem = new TDevAppTreeListItem( item, text, pixmap, false, isDir, + newItem = new KDevAppTreeListItem( item, text, pixmap, false, isDir, relPath, exec, dEntry ); else - newItem = new TDevAppTreeListItem( this, text, pixmap, false, isDir, + newItem = new KDevAppTreeListItem( this, text, pixmap, false, isDir, relPath, exec, dEntry ); if (isDir) newItem->setExpandable( true ); @@ -213,13 +213,13 @@ void TDevApplicationTree::addDesktopGroup( TQString relPath, TDevAppTreeListItem // ---------------------------------------------------------------------- -void TDevApplicationTree::slotItemHighlighted(TQListViewItem* i) +void KDevApplicationTree::slotItemHighlighted(TQListViewItem* i) { // i may be 0 (see documentation) if(!i) return; - TDevAppTreeListItem *item = (TDevAppTreeListItem *) i; + KDevAppTreeListItem *item = (KDevAppTreeListItem *) i; currentitem = item; @@ -230,13 +230,13 @@ void TDevApplicationTree::slotItemHighlighted(TQListViewItem* i) // ---------------------------------------------------------------------- -void TDevApplicationTree::slotSelectionChanged(TQListViewItem* i) +void KDevApplicationTree::slotSelectionChanged(TQListViewItem* i) { // i may be 0 (see documentation) if(!i) return; - TDevAppTreeListItem *item = (TDevAppTreeListItem *) i; + KDevAppTreeListItem *item = (KDevAppTreeListItem *) i; currentitem = item; @@ -246,7 +246,7 @@ void TDevApplicationTree::slotSelectionChanged(TQListViewItem* i) // ---------------------------------------------------------------------- -void TDevApplicationTree::resizeEvent( TQResizeEvent * e) +void KDevApplicationTree::resizeEvent( TQResizeEvent * e) { setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent)); TDEListView::resizeEvent(e); diff --git a/parts/tools/kapplicationtree.h b/parts/tools/kapplicationtree.h index b45bbeac..0ba2cc9f 100644 --- a/parts/tools/kapplicationtree.h +++ b/parts/tools/kapplicationtree.h @@ -16,8 +16,8 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __TDevApplicationTree_h__ -#define __TDevApplicationTree_h__ +#ifndef __KDevApplicationTree_h__ +#define __KDevApplicationTree_h__ #include #include @@ -36,7 +36,7 @@ class TQStringList; /** * @internal */ -class TDevAppTreeListItem : public TQListViewItem +class KDevAppTreeListItem : public TQListViewItem { bool parsed; bool directory; @@ -50,9 +50,9 @@ protected: void init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry); public: - TDevAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, + KDevAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ); - TDevAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, + KDevAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ); bool isDirectory(); @@ -63,7 +63,7 @@ protected: virtual void activate(); virtual void setOpen( bool o ); - friend class TDevApplicationTree; + friend class KDevApplicationTree; }; /* ------------------------------------------------------------------------- */ @@ -71,23 +71,23 @@ protected: /** * @internal */ -class TDevApplicationTree : public TDEListView +class KDevApplicationTree : public TDEListView { Q_OBJECT public: - TDevApplicationTree( TQWidget *parent, const char* name = 0 ); + KDevApplicationTree( TQWidget *parent, const char* name = 0 ); /** * Add a group of .desktop/.kdelnk entries */ - void addDesktopGroup( TQString relPath, TDevAppTreeListItem *item = 0 ); + void addDesktopGroup( TQString relPath, KDevAppTreeListItem *item = 0 ); bool isDirSel(); protected: void resizeEvent( TQResizeEvent *_ev ); - TDevAppTreeListItem* currentitem; + KDevAppTreeListItem* currentitem; public slots: void slotItemHighlighted(TQListViewItem* i); diff --git a/parts/tools/kdevpart_tools.rc b/parts/tools/kdevpart_tools.rc new file mode 100644 index 00000000..ab8a6a98 --- /dev/null +++ b/parts/tools/kdevpart_tools.rc @@ -0,0 +1,14 @@ + + + + + &Tools + + + + + + diff --git a/parts/tools/kdevtools.desktop b/parts/tools/kdevtools.desktop new file mode 100644 index 00000000..225b4b5f --- /dev/null +++ b/parts/tools/kdevtools.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin provides an easy way to add external applications to the Tools menu and toolbar. +Comment[ca]=Aquest connector proporciona un mètode fàcil per afegir aplicacions externes en el menú Eines i a la barra d'eines. +Comment[da]=Dette plugin sørger for en nem måde at tilføje eksterne programmer til værktøjsmenuen og værktøjslinjen. +Comment[de]=Dieses Modul erleichtert das Hinzufügen externer Anwendungen zum Menü "Werkzeuge" und in die Werkzeugleiste. +Comment[el]=Αυτό το πρόσθετο προσφέρει μια εύκολη μέθοδο για τη προσθήκη εξωτερικών εφαρμογών στο μενού εργαλείων και τη γραμμή εργαλείων. +Comment[es]=Este complemento proporciona un método sencillo para añadir aplicaciones externas en el menú de Herramientas y en la barra de herramientas. +Comment[et]=See plugin võimaldab hõlpsasti lisada väliseid rakendusi tööriistade menüüsse ja tööriistaribale. +Comment[eu]=Plugin honek kanpoko aplikazioak Tresnak menu eta tresna-barran erraz gehitzeko aukera eskeintzen du. +Comment[fa]=این وصله، راه آسانی را برای افزودن کاربردهای خارجی به گزینگان ابزار و میله ابزار فراهم می‌کند. +Comment[fr]=Ce module externe fournit un moyen facile d'ajouter des applications externes au menu « Outils » et à la barre d'outils. +Comment[gl]=Esta extensión proporciona un método sinxelo para engadir aplicacións externas ao menú Ferramentas e á barra de ferramentas. +Comment[hu]=Ez a bővítőmodul lehetővé teszi az Eszközök menü és az eszköztár egyszerű kibővítését +Comment[it]=Questo plugin offre un modo per aggiungere applicazioni esterne al menu o alla barra degli strumenti. +Comment[ja]=このプラグインはツールメニューやツールバーに外部のアプリケーションを追加する簡単な方法を提供します。 +Comment[ms]=Plugin ini menyediakan cara mudah untuk menambah aplikasi luaran ke menu Alatan dan bar alatan. +Comment[nds]=Mit dit Moduul laat sik extern Programmen eenfach na dat "Warktüüch"-Menü un den Warktüüchbalken tofögen. +Comment[ne]=यो प्लगइनले उपकरण मेनु र उपकरणपट्टीमा बाह्य अनुप्रयोग थप्न सजिलो तरिका प्रदान गर्दछ । +Comment[nl]=Met deze plugin kunt u op eenvoudige wijze externe toepassingen aan het menu Gereedschap en de werkbalk toevoegen. +Comment[pl]=Ta wtyczka umożliwia łatwe dodawanie zewnętrznych programów do menu Narzędzia i do paska narzędzi. +Comment[pt]=Este 'plugin' oferece uma forma simples de adicionar as aplicações externas ao menu Ferramentas e à barra de ferramentas. +Comment[pt_BR]=Este plug-in fornece uma maneira fácil de adicionar aplicativos externos ao menu Ferramentas e barra de ferramentas. +Comment[ru]=Предоставляет возможности добавления в меню пунктов вызова внешних приложений. +Comment[sk]=Modul poskytuje jednoduchý spôsob ako pridať externú aplikáciu do menu Nástroje a do panelu nástrojov. +Comment[sl]=Ta vstavek omogoča preprost način dodajanja zunanjih programov v meni Orodja in v orodjarno. +Comment[sr]=Овај прикључак обезбеђује лак начин за додавање спољних програма у мени „Алати“ и у траку са алатом. +Comment[sr@Latn]=Ovaj priključak obezbeđuje lak način za dodavanje spoljnih programa u meni „Alati“ i u traku sa alatom. +Comment[sv]=Insticksprogrammet tillhandahåller ett enkelt sätt att lägga till yttre program i verktygsmenyn och verktygsraden. +Comment[ta]=இந்த சொருகி கருவிப்பட்டியல் மற்றும் கருவிப்பட்டையில் வெளிபுற பயன்பாடு எளிய முறையில் சேர்க்கலாம். +Comment[tg]=Барои илова намудан дар меню нуқтаҳои ҷеғ задани гузоришҳои берунро имкон медиҳад. +Comment[zh_CN]=这个插件提供向工具菜单和工具栏添加外部程序的方法。 +Comment[zh_TW]=此外掛程式提供一個簡單的方式,將外部應用程式新增到工具選單與工具列中。 +Name=KDevTools +Name[da]=TDevelop Værktøjer +Name[de]="Werkzeug"-Menüerweiterung (TDevelop) +Name[hi]=के-डेव-टूल्स +Name[nds]=Warktüüch-Menüverwiedern (TDevelop) +Name[pl]=KDevNarzędzia +Name[sk]=KDev nástroje +Name[sv]=TDevelop verktyg +Name[ta]=KDev கருவிகள் +Name[tg]=Асбобҳои KDev +Name[zh_TW]=TDevelop 工具 +GenericName=Tools Menu Addition +GenericName[ca]=Afegiment al menú Eines +GenericName[da]=Værktøjsmenu tilføjelse +GenericName[de]="Werkzeuge"-Menüerweiterung +GenericName[el]=Προσθήκη μενού εργαλείων +GenericName[es]=Añadir al menú Herramientas +GenericName[et]=Tööriistade menüü lisamine +GenericName[eu]=Tresnak menuan gehitu +GenericName[fa]=افزودن گزینگان ابزار +GenericName[fr]=Ajout au menu « Outils » +GenericName[gl]=Engadidos ao menú Ferramentas +GenericName[hu]=Bővítés az Eszközök menühöz +GenericName[it]=Aggiunte al menu Strumenti +GenericName[ja]=ツールメニュー追加 +GenericName[nds]=Warktüüch-Menüverwiedern +GenericName[ne]=उपकरण मेनु अतिरिक्त +GenericName[nl]=Gereedschapsmenu-toevoeging +GenericName[pl]=Dodatek do menu Narzędzia +GenericName[pt]=Adicionar ao Menu de Ferramentas +GenericName[pt_BR]=Adição ao Menu Ferramentas +GenericName[ru]=Дополнение меню инструментов +GenericName[sk]=Prídavky menu Nástroje +GenericName[sl]=Dodatek menija orodij +GenericName[sr]=Додаци менију „Алати“ +GenericName[sr@Latn]=Dodaci meniju „Alati“ +GenericName[sv]=Tillägg i verktygsmenyn +GenericName[ta]=கருவிப்பட்டியல் சேர்ப்பு +GenericName[tg]=Асбобҳои иловагии меню +GenericName[tr]=Araçlar Menü Eklemesi +GenericName[zh_CN]=工具菜单附加 +GenericName[zh_TW]=新增工具選單 +Icon=configure +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevtools +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=AdditionalTools diff --git a/parts/tools/tdevpart_tools.rc b/parts/tools/tdevpart_tools.rc deleted file mode 100644 index ab8a6a98..00000000 --- a/parts/tools/tdevpart_tools.rc +++ /dev/null @@ -1,14 +0,0 @@ - - - - - &Tools - - - - - - diff --git a/parts/tools/tdevtools.desktop b/parts/tools/tdevtools.desktop deleted file mode 100644 index 3b7e8272..00000000 --- a/parts/tools/tdevtools.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin provides an easy way to add external applications to the Tools menu and toolbar. -Comment[ca]=Aquest connector proporciona un mètode fàcil per afegir aplicacions externes en el menú Eines i a la barra d'eines. -Comment[da]=Dette plugin sørger for en nem måde at tilføje eksterne programmer til værktøjsmenuen og værktøjslinjen. -Comment[de]=Dieses Modul erleichtert das Hinzufügen externer Anwendungen zum Menü "Werkzeuge" und in die Werkzeugleiste. -Comment[el]=Αυτό το πρόσθετο προσφέρει μια εύκολη μέθοδο για τη προσθήκη εξωτερικών εφαρμογών στο μενού εργαλείων και τη γραμμή εργαλείων. -Comment[es]=Este complemento proporciona un método sencillo para añadir aplicaciones externas en el menú de Herramientas y en la barra de herramientas. -Comment[et]=See plugin võimaldab hõlpsasti lisada väliseid rakendusi tööriistade menüüsse ja tööriistaribale. -Comment[eu]=Plugin honek kanpoko aplikazioak Tresnak menu eta tresna-barran erraz gehitzeko aukera eskeintzen du. -Comment[fa]=این وصله، راه آسانی را برای افزودن کاربردهای خارجی به گزینگان ابزار و میله ابزار فراهم می‌کند. -Comment[fr]=Ce module externe fournit un moyen facile d'ajouter des applications externes au menu « Outils » et à la barre d'outils. -Comment[gl]=Esta extensión proporciona un método sinxelo para engadir aplicacións externas ao menú Ferramentas e á barra de ferramentas. -Comment[hu]=Ez a bővítőmodul lehetővé teszi az Eszközök menü és az eszköztár egyszerű kibővítését -Comment[it]=Questo plugin offre un modo per aggiungere applicazioni esterne al menu o alla barra degli strumenti. -Comment[ja]=このプラグインはツールメニューやツールバーに外部のアプリケーションを追加する簡単な方法を提供します。 -Comment[ms]=Plugin ini menyediakan cara mudah untuk menambah aplikasi luaran ke menu Alatan dan bar alatan. -Comment[nds]=Mit dit Moduul laat sik extern Programmen eenfach na dat "Warktüüch"-Menü un den Warktüüchbalken tofögen. -Comment[ne]=यो प्लगइनले उपकरण मेनु र उपकरणपट्टीमा बाह्य अनुप्रयोग थप्न सजिलो तरिका प्रदान गर्दछ । -Comment[nl]=Met deze plugin kunt u op eenvoudige wijze externe toepassingen aan het menu Gereedschap en de werkbalk toevoegen. -Comment[pl]=Ta wtyczka umożliwia łatwe dodawanie zewnętrznych programów do menu Narzędzia i do paska narzędzi. -Comment[pt]=Este 'plugin' oferece uma forma simples de adicionar as aplicações externas ao menu Ferramentas e à barra de ferramentas. -Comment[pt_BR]=Este plug-in fornece uma maneira fácil de adicionar aplicativos externos ao menu Ferramentas e barra de ferramentas. -Comment[ru]=Предоставляет возможности добавления в меню пунктов вызова внешних приложений. -Comment[sk]=Modul poskytuje jednoduchý spôsob ako pridať externú aplikáciu do menu Nástroje a do panelu nástrojov. -Comment[sl]=Ta vstavek omogoča preprost način dodajanja zunanjih programov v meni Orodja in v orodjarno. -Comment[sr]=Овај прикључак обезбеђује лак начин за додавање спољних програма у мени „Алати“ и у траку са алатом. -Comment[sr@Latn]=Ovaj priključak obezbeđuje lak način za dodavanje spoljnih programa u meni „Alati“ i u traku sa alatom. -Comment[sv]=Insticksprogrammet tillhandahåller ett enkelt sätt att lägga till yttre program i verktygsmenyn och verktygsraden. -Comment[ta]=இந்த சொருகி கருவிப்பட்டியல் மற்றும் கருவிப்பட்டையில் வெளிபுற பயன்பாடு எளிய முறையில் சேர்க்கலாம். -Comment[tg]=Барои илова намудан дар меню нуқтаҳои ҷеғ задани гузоришҳои берунро имкон медиҳад. -Comment[zh_CN]=这个插件提供向工具菜单和工具栏添加外部程序的方法。 -Comment[zh_TW]=此外掛程式提供一個簡單的方式,將外部應用程式新增到工具選單與工具列中。 -Name=KDevTools -Name[da]=TDevelop Værktøjer -Name[de]="Werkzeug"-Menüerweiterung (TDevelop) -Name[hi]=के-डेव-टूल्स -Name[nds]=Warktüüch-Menüverwiedern (TDevelop) -Name[pl]=KDevNarzędzia -Name[sk]=KDev nástroje -Name[sv]=TDevelop verktyg -Name[ta]=KDev கருவிகள் -Name[tg]=Асбобҳои KDev -Name[zh_TW]=TDevelop 工具 -GenericName=Tools Menu Addition -GenericName[ca]=Afegiment al menú Eines -GenericName[da]=Værktøjsmenu tilføjelse -GenericName[de]="Werkzeuge"-Menüerweiterung -GenericName[el]=Προσθήκη μενού εργαλείων -GenericName[es]=Añadir al menú Herramientas -GenericName[et]=Tööriistade menüü lisamine -GenericName[eu]=Tresnak menuan gehitu -GenericName[fa]=افزودن گزینگان ابزار -GenericName[fr]=Ajout au menu « Outils » -GenericName[gl]=Engadidos ao menú Ferramentas -GenericName[hu]=Bővítés az Eszközök menühöz -GenericName[it]=Aggiunte al menu Strumenti -GenericName[ja]=ツールメニュー追加 -GenericName[nds]=Warktüüch-Menüverwiedern -GenericName[ne]=उपकरण मेनु अतिरिक्त -GenericName[nl]=Gereedschapsmenu-toevoeging -GenericName[pl]=Dodatek do menu Narzędzia -GenericName[pt]=Adicionar ao Menu de Ferramentas -GenericName[pt_BR]=Adição ao Menu Ferramentas -GenericName[ru]=Дополнение меню инструментов -GenericName[sk]=Prídavky menu Nástroje -GenericName[sl]=Dodatek menija orodij -GenericName[sr]=Додаци менију „Алати“ -GenericName[sr@Latn]=Dodaci meniju „Alati“ -GenericName[sv]=Tillägg i verktygsmenyn -GenericName[ta]=கருவிப்பட்டியல் சேர்ப்பு -GenericName[tg]=Асбобҳои иловагии меню -GenericName[tr]=Araçlar Menü Eklemesi -GenericName[zh_CN]=工具菜单附加 -GenericName[zh_TW]=新增工具選單 -Icon=configure -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevtools -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=AdditionalTools diff --git a/parts/tools/tools_part.cpp b/parts/tools/tools_part.cpp index c6e4a242..8734eadc 100644 --- a/parts/tools/tools_part.cpp +++ b/parts/tools/tools_part.cpp @@ -19,14 +19,14 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" -#include "tdevappfrontend.h" -#include "tdevplugininfo.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" +#include "kdevappfrontend.h" +#include "kdevplugininfo.h" #include "urlutil.h" #include "configwidgetproxy.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" #include "toolsconfig.h" #include "toolsconfigwidget.h" @@ -34,17 +34,17 @@ #define TOOLSSETTINGS 1 #define EXTRATOOLSSETTINGS 2 -static const TDevPluginInfo data("tdevtools"); -K_EXPORT_COMPONENT_FACTORY( libtdevtools, ToolsFactory( data ) ) +static const KDevPluginInfo data("kdevtools"); +K_EXPORT_COMPONENT_FACTORY( libkdevtools, ToolsFactory( data ) ) TQMap externalToolMenuEntries; ToolsPart::ToolsPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin( &data, parent, name ? name : "ToolsPart") + : KDevPlugin( &data, parent, name ? name : "ToolsPart") { setInstance(ToolsFactory::instance()); - setXMLFile("tdevpart_tools.rc"); + setXMLFile("kdevpart_tools.rc"); m_configProxy = new ConfigWidgetProxy( core() ); m_configProxy->createGlobalConfigPage( i18n("Tools Menu"), TOOLSSETTINGS, info()->icon() ); @@ -128,11 +128,11 @@ void ToolsPart::startCommand(TQString cmdline, bool captured, TQString fileName) if (project()) projectDirectory = project()->projectDirectory(); - TQString selection = TDevEditorUtil::currentSelection( doc ); + TQString selection = KDevEditorUtil::currentSelection( doc ); if ( !selection.isEmpty() ) selection = KShellProcess::quote( selection ); - TQString word = TDevEditorUtil::currentWord( doc ); + TQString word = KDevEditorUtil::currentWord( doc ); // This should really be checked before inserting into the popup if (cmdline.contains("%D") && projectDirectory.isNull()) @@ -153,7 +153,7 @@ void ToolsPart::startCommand(TQString cmdline, bool captured, TQString fileName) if (captured) { - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), cmdline, false); } else diff --git a/parts/tools/tools_part.h b/parts/tools/tools_part.h index 4eeaf0e1..20af2ea8 100644 --- a/parts/tools/tools_part.h +++ b/parts/tools/tools_part.h @@ -3,13 +3,13 @@ */ -#ifndef __TDEVPART_TOOLS_H__ -#define __TDEVPART_TOOLS_H__ +#ifndef __KDEVPART_TOOLS_H__ +#define __KDEVPART_TOOLS_H__ #include -#include -#include +#include +#include class TQPopupMenu; @@ -20,7 +20,7 @@ class ConfigWidgetProxy; class ToolsWidget; -class ToolsPart : public TDevPlugin +class ToolsPart : public KDevPlugin { Q_OBJECT @@ -51,6 +51,6 @@ private: ConfigWidgetProxy * m_configProxy; }; -typedef TDevGenericFactory ToolsFactory; +typedef KDevGenericFactory ToolsFactory; #endif diff --git a/parts/tools/toolsconfig.cpp b/parts/tools/toolsconfig.cpp index 8d689f40..f21713e9 100644 --- a/parts/tools/toolsconfig.cpp +++ b/parts/tools/toolsconfig.cpp @@ -35,7 +35,7 @@ void ToolsConfig::showEvent(TQShowEvent *e) TQHBoxLayout *hbox = new TQHBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); TQVBoxLayout *vbox = new TQVBoxLayout(hbox); - _tree = new TDevApplicationTree(this); + _tree = new KDevApplicationTree(this); _tree->header()->hide(); TQLabel *l = new TQLabel(_tree, i18n("&Applications:"), this); l->show(); @@ -121,7 +121,7 @@ void ToolsConfig::add(const TQString &desktopFile) void ToolsConfig::toList() { - TDevAppTreeListItem *item = dynamic_cast(_tree->selectedItem()); + KDevAppTreeListItem *item = dynamic_cast(_tree->selectedItem()); if (item && !item->desktopEntryPath().isEmpty()) add(item->desktopEntryPath()); checkButtons(); diff --git a/parts/tools/toolsconfig.h b/parts/tools/toolsconfig.h index 23081676..074d5900 100644 --- a/parts/tools/toolsconfig.h +++ b/parts/tools/toolsconfig.h @@ -9,7 +9,7 @@ class TQListBox; class TQPushButton; -class TDevApplicationTree; +class KDevApplicationTree; class Entry { @@ -60,7 +60,7 @@ private slots: private: - TDevApplicationTree *_tree; + KDevApplicationTree *_tree; TQListBox *_list; TQPushButton *_toList, *_toTree; diff --git a/parts/uimode/CMakeLists.txt b/parts/uimode/CMakeLists.txt index 0eaa5ff6..478a4103 100644 --- a/parts/uimode/CMakeLists.txt +++ b/parts/uimode/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevuichooser.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevuichooser.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevuichooser (module) ################# +##### libkdevuichooser (module) ################# -tde_add_kpart( libtdevuichooser AUTOMOC +tde_add_kpart( libkdevuichooser AUTOMOC SOURCES uichooser_part.cpp uichooser.ui uichooser_widget.cpp LINK tdevelop-shared diff --git a/parts/uimode/Makefile.am b/parts/uimode/Makefile.am index df7ddba9..00792790 100644 --- a/parts/uimode/Makefile.am +++ b/parts/uimode/Makefile.am @@ -1,13 +1,13 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevuichooser.la -libtdevuichooser_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevuichooser_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevuichooser.la +libkdevuichooser_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevuichooser_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevuichooser_la_SOURCES = uichooser_part.cpp uichooser.ui uichooser_widget.cpp +libkdevuichooser_la_SOURCES = uichooser_part.cpp uichooser.ui uichooser_widget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevuichooser.desktop +service_DATA = kdevuichooser.desktop diff --git a/parts/uimode/kdevuichooser.desktop b/parts/uimode/kdevuichooser.desktop new file mode 100644 index 00000000..afb21a50 --- /dev/null +++ b/parts/uimode/kdevuichooser.desktop @@ -0,0 +1,87 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a dialog for UI-mode selection. +Comment[ca]=Proporciona un diàleg per a la selecció del mode de la interfície d'usuari. +Comment[da]=Sørger for en dialog for valg af brugergrænsefladetilstand. +Comment[de]=Stellt einen Dialog für die Auswahl des Fenstermodus zur Verfügung. +Comment[el]=Προσφέρει ένα διάλογο για την επιλογή της λειτουργίας του περιβάλλοντος χρήστη. +Comment[en_GB]=Provides a dialogue for UI-mode selection. +Comment[es]=Proporciona un diálogo para la selección del modo de la interfaz de usuario. +Comment[et]=Pakub dialoogi kasutajaliidese režiimi valikuks. +Comment[eu]=UI-modu hautapenerako elkarrizketa-koadroa eskeintzen du. +Comment[fa]=محاوره‌ای برای گزینش حالت UI فراهم‌ می‌کند. +Comment[fr]=Fournit une boîte de dialogue pour la sélection du mode d'interface graphique. +Comment[gl]=Proporciona un diálogo para a selección do modo da interface de usuario +Comment[hi]=यूआई-मोड चयन के लिए एक संवाद प्रदान करता है. +Comment[hu]=Párbeszédablak a grafikus felület kiválasztásához +Comment[it]=Fornisce una maschera per scegliere la modalità UI. +Comment[ja]=UI モード選択のためのダイアログを提供します。 +Comment[ms]=Menyediakan dialok untuk pemilihan mod-UI. +Comment[nds]=Stellt en Dialoog för de Böversiedenutwahl praat. +Comment[ne]=UI-मोड चयनका लागि संवाद प्रदान गर्दछ +Comment[nl]=Biedt een dialoog voor het selecteren van een UI-modus. +Comment[pl]=Udostępnienie okna dialogowego do wyboru trybu interfejsu. +Comment[pt]=Oferece uma janela para a selecção do modo de UI. +Comment[pt_BR]=Fornece um diálogo para seleção modo-UI. +Comment[ru]=Предоставляет диалог выбора режима интерфейса пользователя. +Comment[sk]=Poskytuje dialóg pre voľbu UI módu. +Comment[sl]=Prikazuje okno za izbiro načina uporabniškega vmesnika. +Comment[sr]=Обезбеђује прозор за избор UI режима. +Comment[sr@Latn]=Obezbeđuje prozor za izbor UI režima. +Comment[sv]=Tillhandahåller en dialogruta för att välja läge för det grafiska gränssnittet. +Comment[ta]=UI-பாங்கு தேர்வுக்காக உரையாடல் பெட்டி வரும். +Comment[tg]=Барои интихоб намудани тартиботи истифодабарандаи интерфейс имкон медиҳад. +Comment[tr]=Arayüz-modu seçim için bir pencere sunar. +Comment[zh_CN]=提供用户界面模式选择对话框 +Comment[zh_TW]=提供使用者介面模式選擇對話框 +Name=KDevUIChooser +Name[da]=TDevelop brugergrænsefladevælger +Name[de]=Fenstermodusauswahl (TDevelop) +Name[hi]=के-डेव-यूआई-चूज़र +Name[nds]=TDevelop-Böversietutwahl +Name[pl]=KDevWybórInterfUżytk +Name[sk]=KDev voľba UI +Name[sv]=TDevelop gränssnittsväljare +Name[ta]=KDevUI தேர்வாளர் +Name[tg]=KDevUIИнтихобкунанда +Name[zh_TW]=TDevelop 使用者介面選擇器 +GenericName=User-Interface Selection +GenericName[ca]=Selecció de la interfície d'usuari +GenericName[da]=Valg af brugergrænseflade +GenericName[de]=Fenstermodusauswahl +GenericName[el]=Επιλογή περιβάλλοντος χρήστη +GenericName[es]=Selección de la interfaz de usuario +GenericName[et]=Kasutajaliidese valimine +GenericName[eu]=Erabiltzaile-interfaze hautapena +GenericName[fa]=گزینش واسط کاربر +GenericName[fr]=Sélection de l'interface utilisateur +GenericName[gl]=Selección da interface de usuario +GenericName[hi]=उपयोक्ता-इंटरफ़ेस चयन +GenericName[hu]=A felhasználói felület kiválasztása +GenericName[it]=Selezione dell'interfaccia utente +GenericName[ja]=ユーザインターフェース選択 +GenericName[nds]=Bruker-Koppelsteedutwahl +GenericName[ne]=प्रयोगकर्ता-इन्टरफेस चयन +GenericName[nl]=Gebruikersinterface selectie +GenericName[pl]=Wybór interfejsu użytkownika +GenericName[pt]=Selecção da Interface de Utilizador +GenericName[pt_BR]=Seleção de Interface-Usuário +GenericName[ru]=Выбор интерфейса пользователя +GenericName[sk]=Voľba užívateľského rozhrania +GenericName[sl]=Izbira uporabniškega vmesnika +GenericName[sr]=Избор корисничког интерфејса +GenericName[sr@Latn]=Izbor korisničkog interfejsa +GenericName[sv]=Användargränssnittsval +GenericName[ta]=பயனரின்-இடைமுக தேர்வு +GenericName[tg]=Интихоби интерфейси истифодабаранда +GenericName[tr]=Kullanıcı Arayüzü Seçimi +GenericName[zh_CN]=用户界面选择 +GenericName[zh_TW]=使用者介面選擇器 +Icon=view_choose +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevuichooser +X-TDevelop-Version=5 +X-TDevelop-Scope=Core +X-TDevelop-Mode=AssistantMode +X-TDevelop-Properties=UISwitching diff --git a/parts/uimode/tdevuichooser.desktop b/parts/uimode/tdevuichooser.desktop deleted file mode 100644 index 65faa5be..00000000 --- a/parts/uimode/tdevuichooser.desktop +++ /dev/null @@ -1,87 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a dialog for UI-mode selection. -Comment[ca]=Proporciona un diàleg per a la selecció del mode de la interfície d'usuari. -Comment[da]=Sørger for en dialog for valg af brugergrænsefladetilstand. -Comment[de]=Stellt einen Dialog für die Auswahl des Fenstermodus zur Verfügung. -Comment[el]=Προσφέρει ένα διάλογο για την επιλογή της λειτουργίας του περιβάλλοντος χρήστη. -Comment[en_GB]=Provides a dialogue for UI-mode selection. -Comment[es]=Proporciona un diálogo para la selección del modo de la interfaz de usuario. -Comment[et]=Pakub dialoogi kasutajaliidese režiimi valikuks. -Comment[eu]=UI-modu hautapenerako elkarrizketa-koadroa eskeintzen du. -Comment[fa]=محاوره‌ای برای گزینش حالت UI فراهم‌ می‌کند. -Comment[fr]=Fournit une boîte de dialogue pour la sélection du mode d'interface graphique. -Comment[gl]=Proporciona un diálogo para a selección do modo da interface de usuario -Comment[hi]=यूआई-मोड चयन के लिए एक संवाद प्रदान करता है. -Comment[hu]=Párbeszédablak a grafikus felület kiválasztásához -Comment[it]=Fornisce una maschera per scegliere la modalità UI. -Comment[ja]=UI モード選択のためのダイアログを提供します。 -Comment[ms]=Menyediakan dialok untuk pemilihan mod-UI. -Comment[nds]=Stellt en Dialoog för de Böversiedenutwahl praat. -Comment[ne]=UI-मोड चयनका लागि संवाद प्रदान गर्दछ -Comment[nl]=Biedt een dialoog voor het selecteren van een UI-modus. -Comment[pl]=Udostępnienie okna dialogowego do wyboru trybu interfejsu. -Comment[pt]=Oferece uma janela para a selecção do modo de UI. -Comment[pt_BR]=Fornece um diálogo para seleção modo-UI. -Comment[ru]=Предоставляет диалог выбора режима интерфейса пользователя. -Comment[sk]=Poskytuje dialóg pre voľbu UI módu. -Comment[sl]=Prikazuje okno za izbiro načina uporabniškega vmesnika. -Comment[sr]=Обезбеђује прозор за избор UI режима. -Comment[sr@Latn]=Obezbeđuje prozor za izbor UI režima. -Comment[sv]=Tillhandahåller en dialogruta för att välja läge för det grafiska gränssnittet. -Comment[ta]=UI-பாங்கு தேர்வுக்காக உரையாடல் பெட்டி வரும். -Comment[tg]=Барои интихоб намудани тартиботи истифодабарандаи интерфейс имкон медиҳад. -Comment[tr]=Arayüz-modu seçim için bir pencere sunar. -Comment[zh_CN]=提供用户界面模式选择对话框 -Comment[zh_TW]=提供使用者介面模式選擇對話框 -Name=KDevUIChooser -Name[da]=TDevelop brugergrænsefladevælger -Name[de]=Fenstermodusauswahl (TDevelop) -Name[hi]=के-डेव-यूआई-चूज़र -Name[nds]=TDevelop-Böversietutwahl -Name[pl]=KDevWybórInterfUżytk -Name[sk]=KDev voľba UI -Name[sv]=TDevelop gränssnittsväljare -Name[ta]=KDevUI தேர்வாளர் -Name[tg]=KDevUIИнтихобкунанда -Name[zh_TW]=TDevelop 使用者介面選擇器 -GenericName=User-Interface Selection -GenericName[ca]=Selecció de la interfície d'usuari -GenericName[da]=Valg af brugergrænseflade -GenericName[de]=Fenstermodusauswahl -GenericName[el]=Επιλογή περιβάλλοντος χρήστη -GenericName[es]=Selección de la interfaz de usuario -GenericName[et]=Kasutajaliidese valimine -GenericName[eu]=Erabiltzaile-interfaze hautapena -GenericName[fa]=گزینش واسط کاربر -GenericName[fr]=Sélection de l'interface utilisateur -GenericName[gl]=Selección da interface de usuario -GenericName[hi]=उपयोक्ता-इंटरफ़ेस चयन -GenericName[hu]=A felhasználói felület kiválasztása -GenericName[it]=Selezione dell'interfaccia utente -GenericName[ja]=ユーザインターフェース選択 -GenericName[nds]=Bruker-Koppelsteedutwahl -GenericName[ne]=प्रयोगकर्ता-इन्टरफेस चयन -GenericName[nl]=Gebruikersinterface selectie -GenericName[pl]=Wybór interfejsu użytkownika -GenericName[pt]=Selecção da Interface de Utilizador -GenericName[pt_BR]=Seleção de Interface-Usuário -GenericName[ru]=Выбор интерфейса пользователя -GenericName[sk]=Voľba užívateľského rozhrania -GenericName[sl]=Izbira uporabniškega vmesnika -GenericName[sr]=Избор корисничког интерфејса -GenericName[sr@Latn]=Izbor korisničkog interfejsa -GenericName[sv]=Användargränssnittsval -GenericName[ta]=பயனரின்-இடைமுக தேர்வு -GenericName[tg]=Интихоби интерфейси истифодабаранда -GenericName[tr]=Kullanıcı Arayüzü Seçimi -GenericName[zh_CN]=用户界面选择 -GenericName[zh_TW]=使用者介面選擇器 -Icon=view_choose -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevuichooser -X-TDevelop-Version=5 -X-TDevelop-Scope=Core -X-TDevelop-Mode=AssistantMode -X-TDevelop-Properties=UISwitching diff --git a/parts/uimode/uichooser_part.cpp b/parts/uimode/uichooser_part.cpp index 5795d829..fdc9fa6a 100644 --- a/parts/uimode/uichooser_part.cpp +++ b/parts/uimode/uichooser_part.cpp @@ -3,23 +3,23 @@ #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include "uichooser_widget.h" #define UICHOOSERSETTINGSPAGE 1 -typedef TDevGenericFactory UIChooserFactory; -static const TDevPluginInfo data("tdevuichooser"); -K_EXPORT_COMPONENT_FACTORY( libtdevuichooser, UIChooserFactory( data ) ) +typedef KDevGenericFactory UIChooserFactory; +static const KDevPluginInfo data("kdevuichooser"); +K_EXPORT_COMPONENT_FACTORY( libkdevuichooser, UIChooserFactory( data ) ) UIChooserPart::UIChooserPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin( &data, parent, name ? name : "UIChooserPart") + : KDevPlugin( &data, parent, name ? name : "UIChooserPart") { setInstance(UIChooserFactory::instance()); diff --git a/parts/uimode/uichooser_part.h b/parts/uimode/uichooser_part.h index e86f9211..ff822e1d 100644 --- a/parts/uimode/uichooser_part.h +++ b/parts/uimode/uichooser_part.h @@ -3,16 +3,16 @@ */ -#ifndef __TDEVPART_UICHOOSER_H__ -#define __TDEVPART_UICHOOSER_H__ +#ifndef __KDEVPART_UICHOOSER_H__ +#define __KDEVPART_UICHOOSER_H__ class KDialogBase; class ConfigWidgetProxy; -#include +#include -class UIChooserPart : public TDevPlugin +class UIChooserPart : public KDevPlugin { Q_OBJECT diff --git a/parts/uimode/uichooser_widget.cpp b/parts/uimode/uichooser_widget.cpp index d70d648d..cb75ec02 100644 --- a/parts/uimode/uichooser_widget.cpp +++ b/parts/uimode/uichooser_widget.cpp @@ -24,7 +24,7 @@ #include #include "uichooser_part.h" -#include "tdevmainwindow.h" +#include "kdevmainwindow.h" #include "uichooser_widget.h" UIChooserWidget::UIChooserWidget( UIChooserPart * part, TQWidget *parent, const char *name) diff --git a/parts/valgrind/CMakeLists.txt b/parts/valgrind/CMakeLists.txt index 611aa4ec..9c32760f 100644 --- a/parts/valgrind/CMakeLists.txt +++ b/parts/valgrind/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevvalgrind.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_valgrind.rc DESTINATION ${DATA_INSTALL_DIR}/tdevvalgrind ) +install( FILES kdevvalgrind.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_valgrind.rc DESTINATION ${DATA_INSTALL_DIR}/kdevvalgrind ) -##### libtdevvalgrind (module) ################## +##### libkdevvalgrind (module) ################## -tde_add_kpart( libtdevvalgrind AUTOMOC +tde_add_kpart( libkdevvalgrind AUTOMOC SOURCES dialog_widget.ui valgrind_part.cpp valgrind_widget.cpp valgrind_dialog.cpp valgrinditem.cpp diff --git a/parts/valgrind/Makefile.am b/parts/valgrind/Makefile.am index 6e9e89c0..e0cd6536 100644 --- a/parts/valgrind/Makefile.am +++ b/parts/valgrind/Makefile.am @@ -1,15 +1,15 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevvalgrind.la -libtdevvalgrind_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevvalgrind_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevvalgrind.la +libkdevvalgrind_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevvalgrind_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevvalgrind_la_SOURCES = dialog_widget.ui valgrind_part.cpp valgrind_widget.cpp valgrind_dialog.cpp valgrinditem.cpp +libkdevvalgrind_la_SOURCES = dialog_widget.ui valgrind_part.cpp valgrind_widget.cpp valgrind_dialog.cpp valgrinditem.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevvalgrind.desktop +service_DATA = kdevvalgrind.desktop -rcdir = $(kde_datadir)/tdevvalgrind -rc_DATA = tdevpart_valgrind.rc +rcdir = $(kde_datadir)/kdevvalgrind +rc_DATA = kdevpart_valgrind.rc diff --git a/parts/valgrind/kdevpart_valgrind.rc b/parts/valgrind/kdevpart_valgrind.rc new file mode 100644 index 00000000..440b62c2 --- /dev/null +++ b/parts/valgrind/kdevpart_valgrind.rc @@ -0,0 +1,9 @@ + + + + &Debug + + + + + diff --git a/parts/valgrind/kdevvalgrind.desktop b/parts/valgrind/kdevvalgrind.desktop new file mode 100644 index 00000000..e2142182 --- /dev/null +++ b/parts/valgrind/kdevvalgrind.desktop @@ -0,0 +1,74 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Valgrind is a tool that helps you find memory management problems in programs. http://valgrind.org/ +Comment[ca]=Valgrind és una eina que us ajuda a trobar problemes en la gestió de la memòria en els programes. http://valgrind.org/ +Comment[da]=Valgrind er et værktøj der hjælper dig med at finde hukommelseshåndteringsproblemer i programmer. http://valgrind.org/ +Comment[de]=Valgrind ist ein Werkzeug zum Auffinden von Speicherverwaltungsproblemen in Anwendungen. http://valgrind.org/ +Comment[el]=Το Valgrind είναι ένα εργαλείο που βοηθά στην εύρεση προβλημάτων διαχείρισης μνήμης στα προγράμματα. http://valgrind.org/ +Comment[es]=Valgrind es una herramienta que le ayuda a encontrar problemas de gestión de memoria en los programas. http://valgrind.org/ +Comment[et]=Valgrind aitab leida programmides mälulekkeid ja muid mäluga seotud asju. http://valgrind.org/ +Comment[fr]=Valgrind est un outil qui vous aide à trouver les problèmes de gestion de la mémoire dans les programmes. http://valgrind.org/ +Comment[hu]=A Valgrind memóriakezelési hibák keresésére alkalmas program - http://valgrind.org +Comment[it]=Valgrind è uno strumento che ti aiuta a trovare problemi di gestione della memoria nei programmi. http://valgrind.org/ +Comment[ja]=Valgrind は、プログラム内のメモリ管理問題を発見することを手助けするツールです。http://valgrind.org/ +Comment[ms]=Valgrind adalah alatan yang membantu anda mencari masalah pengurusan memori dalam program. http://valgrind.org/ +Comment[nds]=Valgrind is en Warktüüch för't Finnen vun t Spiekerpleegproblemen in Programmen. http://valgrind.org/ +Comment[nl]=Valgrind is een hulpprogramma dat u helpt bij het opsporen van geheugenproblemen in programma's. http://valgrind.org/ +Comment[pl]=Valgrind jest narzędziem pomagającym znaleźć w programach problemy z zarządzaniem pamięcią. http://valgrind.org/ +Comment[pt]=O Valgrind é uma ferramenta que o ajuda a descobrir os problemas de gestão de memória nos programas. http://www.valgrind.org/ +Comment[pt_BR]=Valgrind é uma ferramenta ajuda você a encontrar problemas de gerenciamento de memória nos programas. http://www.valgrind.org/ +Comment[ru]=Valgrind - средство нахождения проблем управления памятью в программах. http://valgrind.org/ +Comment[sk]=Valgrind je nástroj, ktorý pomáha nájsť problémy so správou pamäte v programoch. http://valgrind.org/ +Comment[sr]=Valgrind је алат који вам помаже да нађете проблеме са употребом меморије у програмима. http://valgrind.org/ +Comment[sr@Latn]=Valgrind je alat koji vam pomaže da nađete probleme sa upotrebom memorije u programima. http://valgrind.org/ +Comment[sv]=Valgrind är ett verktyg som hjälper dig hitta minneshanteringsproblem i program. Se http://valgrind.org/. +Comment[zh_TW]=Valgrind 能協助您找到程式中記憶體管理上的問題。http://valgrind.org/ +Name=KDevvalgrind +Name[da]=TDevelop Valgrind +Name[de]=Unterstützung für Valgrind (TDevelop) +Name[hi]=के-डेववेलग्रिंड +Name[nds]=Ünnerstütten för Valgrind (TDevelop) +Name[sk]=KDev valgrind +Name[sv]=TDevelop valgrind +Name[zh_TW]=TDevelop Valgrind +GenericName=Valgrind Frontend +GenericName[ca]=Entorn per a Valgrind +GenericName[da]=Valgrind-grænseflade +GenericName[de]=Oberfläche für Valgrind +GenericName[el]=Πρόγραμμα Valgrind +GenericName[es]=Interfaz para Valgrind +GenericName[et]=Valgrindi kasutajaliides +GenericName[eu]=Valgrind interfazea +GenericName[fa]=پایانۀ Valgrind +GenericName[fr]=Interface de Valgrind +GenericName[ga]=Comhéadan Valgrind +GenericName[gl]=Frontal para Valgrind +GenericName[hi]=वेलग्रिन्ड फ्रन्टएण्ड +GenericName[hu]=Valgrind-kezelő +GenericName[it]=Interfaccia a Valgrind +GenericName[ja]=Valgrind フロントエンド +GenericName[ms]=Frontend Valgrind +GenericName[nds]=Valgrind-Böversiet +GenericName[ne]=भलग्रिन्ड फ्रन्टइन्ड +GenericName[nl]=Valgrind-frontend +GenericName[pl]=Interfejs do Valgrinda +GenericName[pt]=Interface para o Valgrind +GenericName[pt_BR]=Frontend do Valgrind +GenericName[ru]=Интерфейс к Valgrind +GenericName[sk]=Valgrind rozhranie +GenericName[sl]=VMesnik za Valgrind +GenericName[sr]=Кориснички интерфејс за Valgrind +GenericName[sr@Latn]=Korisnički interfejs za Valgrind +GenericName[sv]=Valgrind-gränssnitt +GenericName[ta]=Valgrind முன் பகுதி +GenericName[tg]=Интерфейс дар Valgrind +GenericName[tr]=Valgrind Önucu +GenericName[zh_CN]=Valgrind 前端 +GenericName[zh_TW]=Valgrind 前端介面 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Global +X-TDE-Library=libkdevvalgrind +X-TDevelop-Version=5 +X-TDevelop-Properties=CompiledDevelopment diff --git a/parts/valgrind/tdevpart_valgrind.rc b/parts/valgrind/tdevpart_valgrind.rc deleted file mode 100644 index 440b62c2..00000000 --- a/parts/valgrind/tdevpart_valgrind.rc +++ /dev/null @@ -1,9 +0,0 @@ - - - - &Debug - - - - - diff --git a/parts/valgrind/tdevvalgrind.desktop b/parts/valgrind/tdevvalgrind.desktop deleted file mode 100644 index 0c4fa769..00000000 --- a/parts/valgrind/tdevvalgrind.desktop +++ /dev/null @@ -1,74 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Valgrind is a tool that helps you find memory management problems in programs. http://valgrind.org/ -Comment[ca]=Valgrind és una eina que us ajuda a trobar problemes en la gestió de la memòria en els programes. http://valgrind.org/ -Comment[da]=Valgrind er et værktøj der hjælper dig med at finde hukommelseshåndteringsproblemer i programmer. http://valgrind.org/ -Comment[de]=Valgrind ist ein Werkzeug zum Auffinden von Speicherverwaltungsproblemen in Anwendungen. http://valgrind.org/ -Comment[el]=Το Valgrind είναι ένα εργαλείο που βοηθά στην εύρεση προβλημάτων διαχείρισης μνήμης στα προγράμματα. http://valgrind.org/ -Comment[es]=Valgrind es una herramienta que le ayuda a encontrar problemas de gestión de memoria en los programas. http://valgrind.org/ -Comment[et]=Valgrind aitab leida programmides mälulekkeid ja muid mäluga seotud asju. http://valgrind.org/ -Comment[fr]=Valgrind est un outil qui vous aide à trouver les problèmes de gestion de la mémoire dans les programmes. http://valgrind.org/ -Comment[hu]=A Valgrind memóriakezelési hibák keresésére alkalmas program - http://valgrind.org -Comment[it]=Valgrind è uno strumento che ti aiuta a trovare problemi di gestione della memoria nei programmi. http://valgrind.org/ -Comment[ja]=Valgrind は、プログラム内のメモリ管理問題を発見することを手助けするツールです。http://valgrind.org/ -Comment[ms]=Valgrind adalah alatan yang membantu anda mencari masalah pengurusan memori dalam program. http://valgrind.org/ -Comment[nds]=Valgrind is en Warktüüch för't Finnen vun t Spiekerpleegproblemen in Programmen. http://valgrind.org/ -Comment[nl]=Valgrind is een hulpprogramma dat u helpt bij het opsporen van geheugenproblemen in programma's. http://valgrind.org/ -Comment[pl]=Valgrind jest narzędziem pomagającym znaleźć w programach problemy z zarządzaniem pamięcią. http://valgrind.org/ -Comment[pt]=O Valgrind é uma ferramenta que o ajuda a descobrir os problemas de gestão de memória nos programas. http://www.valgrind.org/ -Comment[pt_BR]=Valgrind é uma ferramenta ajuda você a encontrar problemas de gerenciamento de memória nos programas. http://www.valgrind.org/ -Comment[ru]=Valgrind - средство нахождения проблем управления памятью в программах. http://valgrind.org/ -Comment[sk]=Valgrind je nástroj, ktorý pomáha nájsť problémy so správou pamäte v programoch. http://valgrind.org/ -Comment[sr]=Valgrind је алат који вам помаже да нађете проблеме са употребом меморије у програмима. http://valgrind.org/ -Comment[sr@Latn]=Valgrind je alat koji vam pomaže da nađete probleme sa upotrebom memorije u programima. http://valgrind.org/ -Comment[sv]=Valgrind är ett verktyg som hjälper dig hitta minneshanteringsproblem i program. Se http://valgrind.org/. -Comment[zh_TW]=Valgrind 能協助您找到程式中記憶體管理上的問題。http://valgrind.org/ -Name=KDevvalgrind -Name[da]=TDevelop Valgrind -Name[de]=Unterstützung für Valgrind (TDevelop) -Name[hi]=के-डेववेलग्रिंड -Name[nds]=Ünnerstütten för Valgrind (TDevelop) -Name[sk]=KDev valgrind -Name[sv]=TDevelop valgrind -Name[zh_TW]=TDevelop Valgrind -GenericName=Valgrind Frontend -GenericName[ca]=Entorn per a Valgrind -GenericName[da]=Valgrind-grænseflade -GenericName[de]=Oberfläche für Valgrind -GenericName[el]=Πρόγραμμα Valgrind -GenericName[es]=Interfaz para Valgrind -GenericName[et]=Valgrindi kasutajaliides -GenericName[eu]=Valgrind interfazea -GenericName[fa]=پایانۀ Valgrind -GenericName[fr]=Interface de Valgrind -GenericName[ga]=Comhéadan Valgrind -GenericName[gl]=Frontal para Valgrind -GenericName[hi]=वेलग्रिन्ड फ्रन्टएण्ड -GenericName[hu]=Valgrind-kezelő -GenericName[it]=Interfaccia a Valgrind -GenericName[ja]=Valgrind フロントエンド -GenericName[ms]=Frontend Valgrind -GenericName[nds]=Valgrind-Böversiet -GenericName[ne]=भलग्रिन्ड फ्रन्टइन्ड -GenericName[nl]=Valgrind-frontend -GenericName[pl]=Interfejs do Valgrinda -GenericName[pt]=Interface para o Valgrind -GenericName[pt_BR]=Frontend do Valgrind -GenericName[ru]=Интерфейс к Valgrind -GenericName[sk]=Valgrind rozhranie -GenericName[sl]=VMesnik za Valgrind -GenericName[sr]=Кориснички интерфејс за Valgrind -GenericName[sr@Latn]=Korisnički interfejs za Valgrind -GenericName[sv]=Valgrind-gränssnitt -GenericName[ta]=Valgrind முன் பகுதி -GenericName[tg]=Интерфейс дар Valgrind -GenericName[tr]=Valgrind Önucu -GenericName[zh_CN]=Valgrind 前端 -GenericName[zh_TW]=Valgrind 前端介面 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Global -X-TDE-Library=libtdevvalgrind -X-TDevelop-Version=5 -X-TDevelop-Properties=CompiledDevelopment diff --git a/parts/valgrind/valgrind_part.cpp b/parts/valgrind/valgrind_part.cpp index 88d9427c..1b262175 100644 --- a/parts/valgrind/valgrind_part.cpp +++ b/parts/valgrind/valgrind_part.cpp @@ -6,31 +6,31 @@ #include #include -#include +#include #include #include #include #include #include -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" -#include "tdevplugininfo.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" +#include "kdevplugininfo.h" #include "valgrind_widget.h" #include "valgrind_dialog.h" #include "valgrinditem.h" -typedef TDevGenericFactory ValgrindFactory; -static const TDevPluginInfo data("tdevvalgrind"); -K_EXPORT_COMPONENT_FACTORY( libtdevvalgrind, ValgrindFactory( data ) ) +typedef KDevGenericFactory ValgrindFactory; +static const KDevPluginInfo data("kdevvalgrind"); +K_EXPORT_COMPONENT_FACTORY( libkdevvalgrind, ValgrindFactory( data ) ) ValgrindPart::ValgrindPart( TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin( &data, parent, name ? name : "ValgrindPart" ) + : KDevPlugin( &data, parent, name ? name : "ValgrindPart" ) { setInstance( ValgrindFactory::instance() ); - setXMLFile( "tdevpart_valgrind.rc" ); + setXMLFile( "kdevpart_valgrind.rc" ); proc = new KShellProcess(); connect( proc, TQT_SIGNAL(receivedStdout( TDEProcess*, char*, int )), @@ -39,8 +39,8 @@ ValgrindPart::ValgrindPart( TQObject *parent, const char *name, const TQStringLi this, TQT_SLOT(receivedStderr( TDEProcess*, char*, int )) ); connect( proc, TQT_SIGNAL(processExited( TDEProcess* )), this, TQT_SLOT(processExited( TDEProcess* )) ); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) ); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); @@ -196,7 +196,7 @@ void ValgrindPart::slotKillValgrind() proc->kill(); } -void ValgrindPart::slotStopButtonClicked( TDevPlugin* which ) +void ValgrindPart::slotStopButtonClicked( KDevPlugin* which ) { if ( which != 0 && which != this ) return; diff --git a/parts/valgrind/valgrind_part.h b/parts/valgrind/valgrind_part.h index 1982ea33..6a05737b 100644 --- a/parts/valgrind/valgrind_part.h +++ b/parts/valgrind/valgrind_part.h @@ -2,18 +2,18 @@ * Copyright (C) 2002 Harald Fernengel */ -#ifndef __TDEVPART_VALGRIND_H__ -#define __TDEVPART_VALGRIND_H__ +#ifndef __KDEVPART_VALGRIND_H__ +#define __KDEVPART_VALGRIND_H__ #include #include #include -#include +#include class ValgrindWidget; class TDEProcess; -class ValgrindPart : public TDevPlugin +class ValgrindPart : public KDevPlugin { Q_OBJECT @@ -31,7 +31,7 @@ private slots: void slotExecValgrind(); void slotExecCalltree(); void slotKillValgrind(); - void slotStopButtonClicked( TDevPlugin* which ); + void slotStopButtonClicked( KDevPlugin* which ); void receivedStdout( TDEProcess*, char*, int ); void receivedStderr( TDEProcess*, char*, int ); void processExited( TDEProcess* ); diff --git a/parts/valgrind/valgrind_widget.cpp b/parts/valgrind/valgrind_widget.cpp index f32ab9b7..70484704 100644 --- a/parts/valgrind/valgrind_widget.cpp +++ b/parts/valgrind/valgrind_widget.cpp @@ -10,10 +10,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "valgrind_part.h" #include "valgrind_widget.h" diff --git a/parts/vcsmanager/CMakeLists.txt b/parts/vcsmanager/CMakeLists.txt index a672b4ac..de236f81 100644 --- a/parts/vcsmanager/CMakeLists.txt +++ b/parts/vcsmanager/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevvcsmanager.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevvcsmanager.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevvcsmanager (module) ################ +##### libkdevvcsmanager (module) ################ -tde_add_kpart( libtdevvcsmanager AUTOMOC +tde_add_kpart( libkdevvcsmanager AUTOMOC SOURCES vcsmanagerpart.cpp vcsmanagerprojectconfigbase.ui vcsmanagerprojectconfig.cpp diff --git a/parts/vcsmanager/Makefile.am b/parts/vcsmanager/Makefile.am index 66897658..5f7534ee 100644 --- a/parts/vcsmanager/Makefile.am +++ b/parts/vcsmanager/Makefile.am @@ -1,19 +1,19 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevvcsmanager.la -libtdevvcsmanager_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevvcsmanager_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevvcsmanager.la +libkdevvcsmanager_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevvcsmanager_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevvcsmanager_la_SOURCES = vcsmanagerpart.cpp \ +libkdevvcsmanager_la_SOURCES = vcsmanagerpart.cpp \ vcsmanagerprojectconfigbase.ui vcsmanagerprojectconfig.cpp METASOURCES = AUTO -appsharedir = $(kde_datadir)/tdevvcsmanager +appsharedir = $(kde_datadir)/kdevvcsmanager appshare_DATA = servicedir = $(kde_servicesdir) -service_DATA = tdevvcsmanager.desktop +service_DATA = kdevvcsmanager.desktop -rcdir = $(kde_datadir)/tdevvcsmanager +rcdir = $(kde_datadir)/kdevvcsmanager diff --git a/parts/vcsmanager/kdevvcsmanager.desktop b/parts/vcsmanager/kdevvcsmanager.desktop new file mode 100644 index 00000000..35cdf2aa --- /dev/null +++ b/parts/vcsmanager/kdevvcsmanager.desktop @@ -0,0 +1,65 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Name=KDevVCSManager +Name[da]=TDevelop VCS-håndtering +Name[nds]=TDevelop-VKS-Pleger +Name[sk]=KDev VCS manažér +Name[sv]=TDevelop VCS-hantering +Name[tg]=РоҳбариKDevVCS +Name[zh_TW]=TDevelop VCS 管理器 +GenericName=VCSManager +GenericName[da]=VCS-håndtering +GenericName[fa]=مدیر VCS +GenericName[nds]=VKS-Pleger +GenericName[ru]=Управление системами контроля версий +GenericName[sk]=VCS manažér +GenericName[sl]=Upravitelj VCS +GenericName[sr]=VCS менаџер +GenericName[sr@Latn]=VCS menadžer +GenericName[sv]=VCS-hantering +GenericName[tg]=РоҳбариVCS +GenericName[zh_TW]=VCS 管理員 +Comment=Version Control System Manager +Comment[ca]=Gestor per al sistema de control de versions +Comment[da]=Versionskontrolsystem-håndtering +Comment[de]=Verwaltung für VCS +Comment[el]=Διαχειριστής συστήματος ελέγχου εκδόσεων +Comment[es]=Administrador de sistemas de control de versiones +Comment[et]=Versioonikontrollisüsteemi haldur +Comment[eu]=Version Control System (VCS) kudeatzailea +Comment[fa]=مدیر سیستم کنترل نسخه +Comment[fr]=Gestionnaire du système de contrôle de versions +Comment[gl]=Xestor do Sistema de control de versións +Comment[hu]=Kezelőfelület verziókövető rendszerekhez +Comment[it]=Gestore Sistema Controllo Versione +Comment[ms]=Pengurus Sistem Kawalan Versi +Comment[nds]=VKS-Pleger +Comment[ne]=संस्करण नियन्त्रण प्रणाली प्रबन्धक +Comment[nl]=Versie Controle Systeem-beheerder +Comment[pl]=Menedżer Systemu kontroli wersji +Comment[pt]=Gestor de Sistema de Controlo de Versão +Comment[pt_BR]=Gerenciador do Sistema de Controle de Versão +Comment[ru]=Управление системами контроля версий +Comment[sk]=Manažér systému riadenia verzií +Comment[sl]=Upravitelj sistema za nadzor različic +Comment[sr]=Менаџер система контроле верзија +Comment[sr@Latn]=Menadžer sistema kontrole verzija +Comment[sv]=Hantering av versionskontrollsystem +Comment[tr]=Sürüm Kontrol Sistemi Yöneticisi +Comment[zh_CN]=版本控制系统管理器 +Comment[zh_TW]=版本控制系統管理員 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin + +X-TDevelop-Plugin-Version=1 +X-TDevelop-Plugin-Homepage= +X-TDevelop-Plugin-BugsEmailAddress=jens.dagerbo@swipnet.se +X-TDevelop-Plugin-Copyright=(C) by Jens Dagerbo + +X-TDevelop-Args= + +X-TDevelop-Scope=Core +X-TDE-Library=libkdevvcsmanager +X-TDevelop-Version=5 +X-TDevelop-Properties=VCS diff --git a/parts/vcsmanager/tdevvcsmanager.desktop b/parts/vcsmanager/tdevvcsmanager.desktop deleted file mode 100644 index 91fe7c98..00000000 --- a/parts/vcsmanager/tdevvcsmanager.desktop +++ /dev/null @@ -1,65 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Name=TDevVCSManager -Name[da]=TDevelop VCS-håndtering -Name[nds]=TDevelop-VKS-Pleger -Name[sk]=KDev VCS manažér -Name[sv]=TDevelop VCS-hantering -Name[tg]=РоҳбариTDevVCS -Name[zh_TW]=TDevelop VCS 管理器 -GenericName=VCSManager -GenericName[da]=VCS-håndtering -GenericName[fa]=مدیر VCS -GenericName[nds]=VKS-Pleger -GenericName[ru]=Управление системами контроля версий -GenericName[sk]=VCS manažér -GenericName[sl]=Upravitelj VCS -GenericName[sr]=VCS менаџер -GenericName[sr@Latn]=VCS menadžer -GenericName[sv]=VCS-hantering -GenericName[tg]=РоҳбариVCS -GenericName[zh_TW]=VCS 管理員 -Comment=Version Control System Manager -Comment[ca]=Gestor per al sistema de control de versions -Comment[da]=Versionskontrolsystem-håndtering -Comment[de]=Verwaltung für VCS -Comment[el]=Διαχειριστής συστήματος ελέγχου εκδόσεων -Comment[es]=Administrador de sistemas de control de versiones -Comment[et]=Versioonikontrollisüsteemi haldur -Comment[eu]=Version Control System (VCS) kudeatzailea -Comment[fa]=مدیر سیستم کنترل نسخه -Comment[fr]=Gestionnaire du système de contrôle de versions -Comment[gl]=Xestor do Sistema de control de versións -Comment[hu]=Kezelőfelület verziókövető rendszerekhez -Comment[it]=Gestore Sistema Controllo Versione -Comment[ms]=Pengurus Sistem Kawalan Versi -Comment[nds]=VKS-Pleger -Comment[ne]=संस्करण नियन्त्रण प्रणाली प्रबन्धक -Comment[nl]=Versie Controle Systeem-beheerder -Comment[pl]=Menedżer Systemu kontroli wersji -Comment[pt]=Gestor de Sistema de Controlo de Versão -Comment[pt_BR]=Gerenciador do Sistema de Controle de Versão -Comment[ru]=Управление системами контроля версий -Comment[sk]=Manažér systému riadenia verzií -Comment[sl]=Upravitelj sistema za nadzor različic -Comment[sr]=Менаџер система контроле верзија -Comment[sr@Latn]=Menadžer sistema kontrole verzija -Comment[sv]=Hantering av versionskontrollsystem -Comment[tr]=Sürüm Kontrol Sistemi Yöneticisi -Comment[zh_CN]=版本控制系统管理器 -Comment[zh_TW]=版本控制系統管理員 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin - -X-TDevelop-Plugin-Version=1 -X-TDevelop-Plugin-Homepage= -X-TDevelop-Plugin-BugsEmailAddress=jens.dagerbo@swipnet.se -X-TDevelop-Plugin-Copyright=(C) by Jens Dagerbo - -X-TDevelop-Args= - -X-TDevelop-Scope=Core -X-TDE-Library=libtdevvcsmanager -X-TDevelop-Version=5 -X-TDevelop-Properties=VCS diff --git a/parts/vcsmanager/vcsmanagerpart.cpp b/parts/vcsmanager/vcsmanagerpart.cpp index 5f5ad639..ec176c47 100644 --- a/parts/vcsmanager/vcsmanagerpart.cpp +++ b/parts/vcsmanager/vcsmanagerpart.cpp @@ -29,32 +29,32 @@ #include #include #include -#include -#include +#include +#include #include -#include -#include +#include +#include #include -#include +#include #include "domutil.h" #include "vcsmanagerprojectconfig.h" -typedef TDevGenericFactory VCSManagerFactory; -TDevPluginInfo data("tdevvcsmanager"); -K_EXPORT_COMPONENT_FACTORY( libtdevvcsmanager, VCSManagerFactory( data ) ) +typedef KDevGenericFactory VCSManagerFactory; +KDevPluginInfo data("kdevvcsmanager"); +K_EXPORT_COMPONENT_FACTORY( libkdevvcsmanager, VCSManagerFactory( data ) ) #define GLOBALDOC_OPTIONS 1 #define PROJECTDOC_OPTIONS 2 VCSManagerPart::VCSManagerPart(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevPlugin(&data, parent, name ? name : "VCSManagerPart") + : KDevPlugin(&data, parent, name ? name : "VCSManagerPart") { kdDebug() << " ********** VCSManagerPart::VCSManagerPart() ************** " << endl; setInstance(VCSManagerFactory::instance()); -// setXMLFile("tdevvcsmanager.rc"); +// setXMLFile("kdevvcsmanager.rc"); m_configProxy = new ConfigWidgetProxy(core()); m_configProxy->createProjectConfigPage(i18n("Version Control"), PROJECTDOC_OPTIONS, info()->icon()); diff --git a/parts/vcsmanager/vcsmanagerpart.h b/parts/vcsmanager/vcsmanagerpart.h index aa52de94..1fbccbff 100644 --- a/parts/vcsmanager/vcsmanagerpart.h +++ b/parts/vcsmanager/vcsmanagerpart.h @@ -18,10 +18,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef TDEVVCSMANAGER_H -#define TDEVVCSMANAGER_H +#ifndef KDEVVCSMANAGER_H +#define KDEVVCSMANAGER_H -#include +#include #include @@ -35,7 +35,7 @@ class VCSManagerWidget; /** Please read the README.dox file for more info about this part */ -class VCSManagerPart: public TDevPlugin +class VCSManagerPart: public KDevPlugin { Q_OBJECT diff --git a/pics/hi16-app-kdevassistant.png b/pics/hi16-app-kdevassistant.png new file mode 100644 index 00000000..52080a46 Binary files /dev/null and b/pics/hi16-app-kdevassistant.png differ diff --git a/pics/hi16-app-kdevdesigner.png b/pics/hi16-app-kdevdesigner.png new file mode 100644 index 00000000..8286c826 Binary files /dev/null and b/pics/hi16-app-kdevdesigner.png differ diff --git a/pics/hi16-app-tdevassistant.png b/pics/hi16-app-tdevassistant.png deleted file mode 100644 index 52080a46..00000000 Binary files a/pics/hi16-app-tdevassistant.png and /dev/null differ diff --git a/pics/hi16-app-tdevdesigner.png b/pics/hi16-app-tdevdesigner.png deleted file mode 100644 index 8286c826..00000000 Binary files a/pics/hi16-app-tdevdesigner.png and /dev/null differ diff --git a/pics/hi32-app-kdevassistant.png b/pics/hi32-app-kdevassistant.png new file mode 100644 index 00000000..ea042cf3 Binary files /dev/null and b/pics/hi32-app-kdevassistant.png differ diff --git a/pics/hi32-app-kdevdesigner.png b/pics/hi32-app-kdevdesigner.png new file mode 100644 index 00000000..2de4d679 Binary files /dev/null and b/pics/hi32-app-kdevdesigner.png differ diff --git a/pics/hi32-app-tdevassistant.png b/pics/hi32-app-tdevassistant.png deleted file mode 100644 index ea042cf3..00000000 Binary files a/pics/hi32-app-tdevassistant.png and /dev/null differ diff --git a/pics/hi32-app-tdevdesigner.png b/pics/hi32-app-tdevdesigner.png deleted file mode 100644 index 2de4d679..00000000 Binary files a/pics/hi32-app-tdevdesigner.png and /dev/null differ diff --git a/pics/hi48-app-kdevassistant.png b/pics/hi48-app-kdevassistant.png new file mode 100644 index 00000000..29d27dd7 Binary files /dev/null and b/pics/hi48-app-kdevassistant.png differ diff --git a/pics/hi48-app-kdevdesigner.png b/pics/hi48-app-kdevdesigner.png new file mode 100644 index 00000000..df634b85 Binary files /dev/null and b/pics/hi48-app-kdevdesigner.png differ diff --git a/pics/hi48-app-tdevassistant.png b/pics/hi48-app-tdevassistant.png deleted file mode 100644 index 29d27dd7..00000000 Binary files a/pics/hi48-app-tdevassistant.png and /dev/null differ diff --git a/pics/hi48-app-tdevdesigner.png b/pics/hi48-app-tdevdesigner.png deleted file mode 100644 index df634b85..00000000 Binary files a/pics/hi48-app-tdevdesigner.png and /dev/null differ diff --git a/pics/mini/CMakeLists.txt b/pics/mini/CMakeLists.txt index 704cbedf..143ea8d3 100644 --- a/pics/mini/CMakeLists.txt +++ b/pics/mini/CMakeLists.txt @@ -19,4 +19,4 @@ install( FILES CVpublic_signal.png CVpublic_slot.png CVpublic_var.png CVstruct.png CVpackage_meth.png CVpackage_var.png CVtypedef.png - DESTINATION ${DATA_INSTALL_DIR}/tdevclassview/pics ) + DESTINATION ${DATA_INSTALL_DIR}/kdevclassview/pics ) diff --git a/pics/mini/Makefile.am b/pics/mini/Makefile.am index 5b921601..94e74ffb 100644 --- a/pics/mini/Makefile.am +++ b/pics/mini/Makefile.am @@ -1,4 +1,4 @@ -minipicsdir = $(kde_datadir)/tdevclassview/pics +minipicsdir = $(kde_datadir)/kdevclassview/pics minipics_DATA = CTchildren.png CTclients.png CTparents.png CTsuppliers.png \ CTvirtuals.png CVclass.png CVglobal_meth.png CVglobal_var.png CVnamespace.png \ CVprivate_meth.png CVprivate_signal.png CVprivate_slot.png CVprivate_var.png \ diff --git a/pics/misc/CMakeLists.txt b/pics/misc/CMakeLists.txt index 6d156aeb..86b1d049 100644 --- a/pics/misc/CMakeLists.txt +++ b/pics/misc/CMakeLists.txt @@ -10,6 +10,6 @@ ################################################# install( FILES - tdevelop-splash.png tdevassistant-splash.png - tdevdesigner-splash.png + tdevelop-splash.png kdevassistant-splash.png + kdevdesigner-splash.png DESTINATION ${DATA_INSTALL_DIR}/tdevelop/pics ) diff --git a/pics/misc/Makefile.am b/pics/misc/Makefile.am index 5f2435c3..d748146d 100644 --- a/pics/misc/Makefile.am +++ b/pics/misc/Makefile.am @@ -1,3 +1,3 @@ picsdir = $(kde_datadir)/tdevelop/pics -pics_DATA = tdevelop-splash.png tdevassistant-splash.png \ - tdevdesigner-splash.png +pics_DATA = tdevelop-splash.png kdevassistant-splash.png \ + kdevdesigner-splash.png diff --git a/pics/misc/kdevassistant-splash.png b/pics/misc/kdevassistant-splash.png new file mode 100644 index 00000000..eb13d766 Binary files /dev/null and b/pics/misc/kdevassistant-splash.png differ diff --git a/pics/misc/kdevdesigner-splash.png b/pics/misc/kdevdesigner-splash.png new file mode 100644 index 00000000..ace51a84 Binary files /dev/null and b/pics/misc/kdevdesigner-splash.png differ diff --git a/pics/misc/tdevassistant-splash.png b/pics/misc/tdevassistant-splash.png deleted file mode 100644 index eb13d766..00000000 Binary files a/pics/misc/tdevassistant-splash.png and /dev/null differ diff --git a/pics/misc/tdevdesigner-splash.png b/pics/misc/tdevdesigner-splash.png deleted file mode 100644 index ace51a84..00000000 Binary files a/pics/misc/tdevdesigner-splash.png and /dev/null differ diff --git a/pics/toolbar/CMakeLists.txt b/pics/toolbar/CMakeLists.txt index 8b3bfbb8..89891ee4 100644 --- a/pics/toolbar/CMakeLists.txt +++ b/pics/toolbar/CMakeLists.txt @@ -15,17 +15,17 @@ tde_install_icons( dbgnext dbgwatchvar dbgrun dbgstepout dbgmemview dbgparam dbgrunto dbgstep dbgnextinst dbgrestart dbgstepinst dbgvar debugger dbgjumpto - DESTINATION ${DATA_INSTALL_DIR}/tdevdebugger/icons ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdebugger/icons ) tde_install_icons( classnew classwiz - DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport/icons ) + DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport/icons ) tde_install_icons( dbgnext dbgrun dbgstepout dbgrunto dbgstep dbgrestart debugger - DESTINATION ${DATA_INSTALL_DIR}/tdevrbdebugger/icons ) + DESTINATION ${DATA_INSTALL_DIR}/kdevrbdebugger/icons ) tde_install_icons( grep - DESTINATION ${DATA_INSTALL_DIR}/tdevgrepview/icons ) + DESTINATION ${DATA_INSTALL_DIR}/kdevgrepview/icons ) diff --git a/pics/toolbar/Makefile.am b/pics/toolbar/Makefile.am index 0713d5b3..d60121e7 100644 --- a/pics/toolbar/Makefile.am +++ b/pics/toolbar/Makefile.am @@ -1,14 +1,14 @@ tdevelopdir = $(kde_datadir)/tdevelop/icons tdevelop_ICON = AUTO -tdevdebuggerdir = $(kde_datadir)/tdevdebugger/icons -tdevdebugger_ICON = dbgnext dbgwatchvar dbgrun dbgstepout dbgmemview dbgparam dbgrunto dbgstep dbgnextinst dbgrestart dbgstepinst dbgvar debugger dbgjumpto +kdevdebuggerdir = $(kde_datadir)/kdevdebugger/icons +kdevdebugger_ICON = dbgnext dbgwatchvar dbgrun dbgstepout dbgmemview dbgparam dbgrunto dbgstep dbgnextinst dbgrestart dbgstepinst dbgvar debugger dbgjumpto -cppsupportdir = $(kde_datadir)/tdevcppsupport/icons +cppsupportdir = $(kde_datadir)/kdevcppsupport/icons cppsupport_ICON = classnew classwiz -tdevrbdebuggerdir = $(kde_datadir)/tdevrbdebugger/icons -tdevrbdebugger_ICON = dbgnext dbgrun dbgstepout dbgrunto dbgstep dbgrestart debugger +kdevrbdebuggerdir = $(kde_datadir)/kdevrbdebugger/icons +kdevrbdebugger_ICON = dbgnext dbgrun dbgstepout dbgrunto dbgstep dbgrestart debugger -grepdir = $(kde_datadir)/tdevgrepview/icons +grepdir = $(kde_datadir)/kdevgrepview/icons grep_ICON = grep diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b58b6df5..558caeb4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -52,8 +52,8 @@ install( FILES ##### other data ################################ install( FILES tdevelopui.rc eventsrc DESTINATION ${DATA_INSTALL_DIR}/tdevelop ) -install( FILES tdeveloprc tdevassistantrc DESTINATION ${CONFIG_INSTALL_DIR} ) -install( FILES tdevassistantui.rc DESTINATION ${DATA_INSTALL_DIR}/tdevassistant ) +install( FILES tdeveloprc kdevassistantrc DESTINATION ${CONFIG_INSTALL_DIR} ) +install( FILES kdevassistantui.rc DESTINATION ${DATA_INSTALL_DIR}/kdevassistant ) install( FILES projectprofiles DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles ) @@ -61,25 +61,25 @@ install( FILES projectprofiles DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles tde_add_executable( tdevelop SOURCES - main.cpp tdevideextension.cpp settingswidget.ui - LINK tdevshell-shared + main.cpp kdevideextension.cpp settingswidget.ui + LINK kdevshell-shared DESTINATION ${BIN_INSTALL_DIR} ) -##### tdevassistant (executable) ################ +##### kdevassistant (executable) ################ -tde_add_executable( tdevassistant +tde_add_executable( kdevassistant SOURCES - main_assistant.cpp tdevassistantextension.cpp - LINK tdevshell-shared + main_assistant.cpp kdevassistantextension.cpp + LINK kdevshell-shared DESTINATION ${BIN_INSTALL_DIR} ) -##### tdevshell (shared) ######################## +##### kdevshell (shared) ######################## -tde_add_library( tdevshell SHARED AUTOMOC +tde_add_library( kdevshell SHARED AUTOMOC SOURCES api.cpp core.cpp documentationpart.cpp editorproxy.cpp generalinfowidget.cpp generalinfowidgetbase.ui @@ -92,7 +92,7 @@ tde_add_library( tdevshell SHARED AUTOMOC toplevel.cpp VERSION 0.0.0 LINK - tdevutil-static d-shared kinterfacedesigner-shared - profileengine-shared tdevelop-shared tdevwidgets-shared + kdevutil-static d-shared kinterfacedesigner-shared + profileengine-shared tdevelop-shared kdevwidgets-shared DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/src/Mainpage.dox b/src/Mainpage.dox index 7f2255d2..2f055d1b 100644 --- a/src/Mainpage.dox +++ b/src/Mainpage.dox @@ -3,7 +3,7 @@ This library contains the Shell - a profile-based implementation of TDevelop plugin architecture. -Link with: -ltdevshell +Link with: -lkdevshell Include path: -I\$(kde_includes)/tdevelop/shell @@ -109,7 +109,7 @@ Example: } protected: - TDevAssistantExtension(); + KDevAssistantExtension(); }; @endcode diff --git a/src/Makefile.am b/src/Makefile.am index b0b8a04c..047e89a4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,41 +6,41 @@ INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/lib/interfaces \ KDE_OPTIONS=nofinal -lib_LTLIBRARIES = libtdevshell.la -libtdevshell_la_LDFLAGS = $(all_libraries) -ltdevelop -L../lib/.libs -L../lib/interfaces/external/.libs -lkinterfacedesigner -libtdevshell_la_LIBADD = \ +lib_LTLIBRARIES = libkdevshell.la +libkdevshell_la_LDFLAGS = $(all_libraries) -ltdevelop -L../lib/.libs -L../lib/interfaces/external/.libs -lkinterfacedesigner +libkdevshell_la_LIBADD = \ $(top_builddir)/src/profileengine/lib/libprofileengine.la $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(top_builddir)/lib/interfaces/extras/libtdevextras.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(top_builddir)/lib/interfaces/extras/libkdevextras.la \ $(top_builddir)/src/newui/libd.la $(LIB_TDEHTML) -ltdetexteditor -L../lib/interfaces/external/.libs -lkinterfacedesigner -libtdevshell_la_SOURCES = api.cpp core.cpp documentationpart.cpp \ +libkdevshell_la_SOURCES = api.cpp core.cpp documentationpart.cpp \ editorproxy.cpp generalinfowidget.cpp generalinfowidgetbase.ui languageselectwidget.cpp \ mainwindowshare.cpp mimewarningdialog.ui multibuffer.cpp partcontroller.cpp \ plugincontroller.cpp pluginselectdialog.cpp pluginselectdialog.h pluginselectdialogbase.ui \ projectmanager.cpp projectsession.cpp shellextension.cpp simplemainwindow.cpp \ splashscreen.cpp statusbar.cpp toplevel.cpp -bin_PROGRAMS = tdevelop tdevassistant +bin_PROGRAMS = tdevelop kdevassistant -tdevelop_SOURCES = main.cpp tdevideextension.cpp settingswidget.ui +tdevelop_SOURCES = main.cpp kdevideextension.cpp settingswidget.ui tdevelop_METASOURCES = AUTO tdevelop_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -ltdevelop -L../lib/.libs -L../lib/interfaces/external/.libs -lkinterfacedesigner -tdevelop_LDADD = libtdevshell.la -L../lib/interfaces/external/.libs -lkinterfacedesigner +tdevelop_LDADD = libkdevshell.la -L../lib/interfaces/external/.libs -lkinterfacedesigner rcdir = $(kde_datadir)/tdevelop rc_DATA = tdevelopui.rc eventsrc -# default TDevelop configuration +# default KDevelop configuration tdevelopdatadir = $(kde_confdir) -tdevelopdata_DATA = tdeveloprc tdevassistantrc +tdevelopdata_DATA = tdeveloprc kdevassistantrc SUBDIRS = profiles profileengine newui tdeconf_update -tdevassistant_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -ltdevelop -L../lib/.libs -L../lib/interfaces/external/.libs -lkinterfacedesigner -tdevassistant_SOURCES = main_assistant.cpp tdevassistantextension.cpp -tdevassistant_LDADD = libtdevshell.la -L../lib/interfaces/external/.libs -lkinterfacedesigner +kdevassistant_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -ltdevelop -L../lib/.libs -L../lib/interfaces/external/.libs -lkinterfacedesigner +kdevassistant_SOURCES = main_assistant.cpp kdevassistantextension.cpp +kdevassistant_LDADD = libkdevshell.la -L../lib/interfaces/external/.libs -lkinterfacedesigner -rc_assistantdir = $(kde_datadir)/tdevassistant -rc_assistant_DATA = tdevassistantui.rc +rc_assistantdir = $(kde_datadir)/kdevassistant +rc_assistant_DATA = kdevassistantui.rc shellincludedir = $(includedir)/tdevelop/shell shellinclude_HEADERS = api.h core.h documentationpart.h editorproxy.h \ generalinfowidget.h languageselectwidget.h mainwindowshare.h partcontroller.h \ @@ -48,9 +48,9 @@ shellinclude_HEADERS = api.h core.h documentationpart.h editorproxy.h \ statusbar.h toplevel.h generalinfowidgetbase.h mimewarningdialog.h settingswidget.h \ simplemainwindow.h multibuffer.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces tdevextensions -DOXYGEN_PROJECTNAME = TDevelop Generic Shell -DOXYGEN_DOCDIRPREFIX = tdevshell +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces kdevextensions +DOXYGEN_PROJECTNAME = KDevelop Generic Shell +DOXYGEN_DOCDIRPREFIX = kdevshell include ../Doxyfile.am profilesdatadir = $(kde_datadir)/tdevelop/profiles profilesdata_DATA = projectprofiles diff --git a/src/api.cpp b/src/api.cpp index 4053f871..8e56da3d 100644 --- a/src/api.cpp +++ b/src/api.cpp @@ -9,18 +9,18 @@ API *API::s_instance = 0; -TDevMainWindow *API::mainWindow() const +KDevMainWindow *API::mainWindow() const { return TopLevel::getInstance(); } -TDevPartController *API::partController() const +KDevPartController *API::partController() const { return PartController::getInstance(); } -TDevCore *API::core() const +KDevCore *API::core() const { return Core::getInstance(); } @@ -41,7 +41,7 @@ API *API::getInstance() API::API() - : TDevApi() + : KDevApi() { m_classStore = new CodeModel(); } @@ -53,7 +53,7 @@ API::~API() m_classStore = 0; } -TDevPluginController * API::pluginController() const +KDevPluginController * API::pluginController() const { return PluginController::getInstance(); } diff --git a/src/api.h b/src/api.h index 2957b42a..fb20447a 100644 --- a/src/api.h +++ b/src/api.h @@ -2,7 +2,7 @@ #define _API_H_ -#include "tdevapi.h" +#include "kdevapi.h" class CodeModel; @@ -10,14 +10,14 @@ class CodeModel; /** API implementation. */ -class API : public TDevApi +class API : public KDevApi { public: - virtual TDevMainWindow *mainWindow() const; - virtual TDevPartController *partController() const; - virtual TDevPluginController *pluginController() const; - virtual TDevCore *core() const; + virtual KDevMainWindow *mainWindow() const; + virtual KDevPartController *partController() const; + virtual KDevPluginController *pluginController() const; + virtual KDevCore *core() const; virtual CodeModel *codeModel() const; static API *getInstance(); diff --git a/src/core.cpp b/src/core.cpp index 64c3d0b9..ccdd0ace 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -59,7 +59,7 @@ void Core::setupShourtcutTips(KXMLGUIClient * client) } Core::Core() - : TDevCore() + : KDevCore() { } @@ -88,7 +88,7 @@ bool Core::queryClose() } -void Core::running(TDevPlugin * which, bool runs) +void Core::running(KDevPlugin * which, bool runs) { emit activeProcessChanged( which, runs ); } diff --git a/src/core.h b/src/core.h index 9973c7e0..c041eac0 100644 --- a/src/core.h +++ b/src/core.h @@ -7,7 +7,7 @@ #include -#include "tdevcore.h" +#include "kdevcore.h" namespace MainWindowUtils{ @@ -17,7 +17,7 @@ TQString beautifyToolTip(const TQString& text); /** Core implementation. */ -class Core : public TDevCore +class Core : public KDevCore { Q_OBJECT @@ -41,7 +41,7 @@ public: ~Core(); - virtual void running(TDevPlugin *which, bool runs); + virtual void running(KDevPlugin *which, bool runs); virtual void fillContextMenu(TQPopupMenu *popup, const Context *context); virtual void openProject(const TQString& projectFileName); @@ -51,13 +51,13 @@ public: void doEmitCoreInitialized() { emit coreInitialized(); } void doEmitProjectConfigWidget(KDialogBase *base) { emit projectConfigWidget(base); } void doEmitConfigWidget(KDialogBase *base) { emit configWidget(base); } - void doEmitStopButtonPressed(TDevPlugin* which = 0) { emit stopButtonClicked( which ); } + void doEmitStopButtonPressed(KDevPlugin* which = 0) { emit stopButtonClicked( which ); } bool queryClose(); signals: - void activeProcessChanged(TDevPlugin* which, bool runs); + void activeProcessChanged(KDevPlugin* which, bool runs); protected: diff --git a/src/documentationpart.cpp b/src/documentationpart.cpp index 43c9db67..b9ad78d0 100644 --- a/src/documentationpart.cpp +++ b/src/documentationpart.cpp @@ -3,7 +3,7 @@ #include "documentationpart.h" HTMLDocumentationPart::HTMLDocumentationPart() - : TDevHTMLPart() + : KDevHTMLPart() { setOptions(CanDuplicate | CanOpenInNewWindow); } diff --git a/src/documentationpart.h b/src/documentationpart.h index 84f17023..dd86ce8a 100644 --- a/src/documentationpart.h +++ b/src/documentationpart.h @@ -1,14 +1,14 @@ #ifndef __DOCUMENTATIONPART_H__ #define __DOCUMENTATIONPART_H__ -#include +#include /** HTML documentation part. -Implements shell-dependent "duplicate" and "open in new window" actions of TDevHTMLPart. +Implements shell-dependent "duplicate" and "open in new window" actions of KDevHTMLPart. */ -class HTMLDocumentationPart : public TDevHTMLPart +class HTMLDocumentationPart : public KDevHTMLPart { Q_OBJECT diff --git a/src/editorproxy.cpp b/src/editorproxy.cpp index fca4bfdf..73ff852b 100644 --- a/src/editorproxy.cpp +++ b/src/editorproxy.cpp @@ -27,7 +27,7 @@ #include "partcontroller.h" #include "core.h" #include "multibuffer.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" #include "editorproxy.h" @@ -178,20 +178,20 @@ void EditorProxy::popupAboutToShow() unsigned int line; unsigned int col; - if ( !TDevEditorUtil::currentPositionReal( &line, &col, doc ) ) return; + if ( !KDevEditorUtil::currentPositionReal( &line, &col, doc ) ) return; TQString wordstr; - TQString selection = TDevEditorUtil::currentSelection( doc ); + TQString selection = KDevEditorUtil::currentSelection( doc ); if ( !selection.isEmpty() && selection.contains('\n') != 0 ) { wordstr = selection; } else { - wordstr = TDevEditorUtil::currentWord( doc ); + wordstr = KDevEditorUtil::currentWord( doc ); } - TQString linestr = TDevEditorUtil::currentLine( doc ); + TQString linestr = KDevEditorUtil::currentLine( doc ); EditorContext context( doc->url(), line, col, linestr, wordstr ); Core::getInstance()->fillContextMenu( popup, &context ); diff --git a/src/eventsrc b/src/eventsrc index 4032da95..baa16c20 100644 --- a/src/eventsrc +++ b/src/eventsrc @@ -1,6 +1,6 @@ [!Global!] IconName=tdevelop -Comment=TDevelop +Comment=KDevelop Comment[hi]=के-डेवलप [ProcessSuccess] diff --git a/src/kdevassistantextension.cpp b/src/kdevassistantextension.cpp new file mode 100644 index 00000000..ddbfb6bf --- /dev/null +++ b/src/kdevassistantextension.cpp @@ -0,0 +1,40 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program 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 program 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 "kdevassistantextension.h" + +KDevAssistantExtension::KDevAssistantExtension() + : ShellExtension() +{ +} + +void KDevAssistantExtension::init() +{ + s_instance = new KDevAssistantExtension(); +} + +TQString KDevAssistantExtension::xmlFile() +{ + return "kdevassistantui.rc"; +} + +TQString KDevAssistantExtension::defaultProfile() +{ + return "KDevAssistant"; +} diff --git a/src/kdevassistantextension.h b/src/kdevassistantextension.h new file mode 100644 index 00000000..874cafbd --- /dev/null +++ b/src/kdevassistantextension.h @@ -0,0 +1,41 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program 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 program 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 KDEVASSISTANTEXTENSION_H +#define KDEVASSISTANTEXTENSION_H + +#include "shellextension.h" + +class KDevAssistantExtension : public ShellExtension { +public: + static void init(); + + virtual void createGlobalSettingsPage(KDialogBase */*dlg*/) {}; + virtual void acceptGlobalSettingsPage(KDialogBase */*dlg*/) {}; + + virtual TQString xmlFile(); + + virtual TQString defaultProfile(); + +protected: + KDevAssistantExtension(); + +}; + +#endif diff --git a/src/kdevassistantrc b/src/kdevassistantrc new file mode 100644 index 00000000..eaab6fc6 --- /dev/null +++ b/src/kdevassistantrc @@ -0,0 +1,14 @@ +[RightToolWindow] +LastWidget=Documentation +Width=254 + +[UI] +CloseOnHover=false +CloseOnHoverDelay=false +MDIMode=4 +MDIStyle=1 +OpenNewTabAfterCurrent=true +ShowCloseTabsButton=true +ShowTabIcons=true +TabWidgetVisibility=0 +UseSimpleMainWindow=true diff --git a/src/kdevassistantui.rc b/src/kdevassistantui.rc new file mode 100644 index 00000000..a5b202ce --- /dev/null +++ b/src/kdevassistantui.rc @@ -0,0 +1,168 @@ + + + + &File + + + + + + + + + + + + + + + + + + + + + + + + + + &View + + + + + + + + + + + + + + &Settings + + + + + + + + + + + + + + + + + + + + &Window + + + + + + + + + + + + + + + &Help + + + + + + Main Toolbar + + + + + + + + + + + + + + + + + Browser Toolbar + + + + + + + + + + + + + + + + diff --git a/src/kdevideextension.cpp b/src/kdevideextension.cpp new file mode 100644 index 00000000..7bfbf29f --- /dev/null +++ b/src/kdevideextension.cpp @@ -0,0 +1,129 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program 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 program 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 "kdevideextension.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "api.h" +#include "settingswidget.h" + +KDevIDEExtension::KDevIDEExtension() + : ShellExtension() +{ +} + +void KDevIDEExtension::init() +{ + s_instance = new KDevIDEExtension(); +} + +void KDevIDEExtension::createGlobalSettingsPage(KDialogBase *dlg) +{ + TDEConfig* config = kapp->config(); + TQVBox *vbox = dlg->addVBoxPage(i18n("General"), i18n("General"), BarIcon("tdevelop", TDEIcon::SizeMedium) ); + gsw = new SettingsWidget(vbox, "general settings widget"); + + gsw->projectsURL->setMode((int)KFile::Directory); + + config->setGroup("General Options"); + gsw->lastProjectCheckbox->setChecked(config->readBoolEntry("Read Last Project On Startup",true)); + gsw->outputFont->setFont( config->readFontEntry( "OutputViewFont" ) ); + config->setGroup("MakeOutputView"); + gsw->lineWrappingCheckBox->setChecked(config->readBoolEntry("LineWrapping",true)); + gsw->dirNavigMsgCheckBox->setChecked(config->readBoolEntry("ShowDirNavigMsg",false)); + gsw->compileOutputCombo->setCurrentItem(config->readNumEntry("CompilerOutputLevel",2)); + gsw->forceCLocaleRadio->setChecked( config->readBoolEntry( "ForceCLocale", true ) ); + gsw->userLocaleRadio->setChecked( !config->readBoolEntry( "ForceCLocale", true ) ); + + config->setGroup("General Options"); + gsw->projectsURL->setURL(config->readPathEntry("DefaultProjectsDir", TQDir::homeDirPath()+"/")); + gsw->designerButtonGroup->setButton( config->readNumEntry( "DesignerApp", 0 ) ); + + TQString DesignerSetting = config->readEntry( "DesignerSetting", "ExternalDesigner" ); + gsw->qtDesignerRadioButton->setChecked( DesignerSetting == "ExternalDesigner" ); + gsw->seperateAppRadioButton->setChecked( DesignerSetting == "ExternalKDevDesigner" ); + gsw->embeddedDesignerRadioButton->setChecked( DesignerSetting == "EmbeddedKDevDesigner" ); + + config->setGroup("TerminalEmulator"); + gsw->terminalEdit->setText( config->readEntry( "TerminalApplication", TQString::fromLatin1("konsole") ) ); + bool useKDESetting = config->readBoolEntry( "UseKDESetting", true ); + gsw->useKDETerminal->setChecked( useKDESetting ); + gsw->useOtherTerminal->setChecked( !useKDESetting ); +} + +void KDevIDEExtension::acceptGlobalSettingsPage(KDialogBase *dlg) +{ + TDEConfig* config = kapp->config(); + + config->setGroup("General Options"); + config->writeEntry("DesignerApp", gsw->designerButtonGroup->selectedId()); + config->writeEntry("Read Last Project On Startup",gsw->lastProjectCheckbox->isChecked()); + config->writePathEntry("DefaultProjectsDir", gsw->projectsURL->url()); + config->writeEntry("OutputViewFont", gsw->outputFont->font()); + + TQString DesignerSetting; + if ( gsw->qtDesignerRadioButton->isChecked() ) DesignerSetting = "ExternalDesigner"; + if ( gsw->seperateAppRadioButton->isChecked() ) DesignerSetting = "ExternalKDevDesigner"; + if ( gsw->embeddedDesignerRadioButton->isChecked() ) DesignerSetting = "EmbeddedKDevDesigner"; + config->writeEntry( "DesignerSetting", DesignerSetting ); + + config->setGroup("MakeOutputView"); + config->writeEntry("LineWrapping",gsw->lineWrappingCheckBox->isChecked()); + config->writeEntry("ShowDirNavigMsg",gsw->dirNavigMsgCheckBox->isChecked()); + config->writeEntry( "ForceCLocale", gsw->forceCLocaleRadio->isChecked() ); + //current item id must be in sync with the enum! + config->writeEntry("CompilerOutputLevel",gsw->compileOutputCombo->currentItem()); + config->sync(); + if( KDevPlugin *makeExt = API::getInstance()->pluginController()->extension("TDevelop/MakeFrontend")) + { + static_cast(makeExt)->updateSettingsFromConfig(); + } + + config->setGroup("TerminalEmulator"); + config->writeEntry("UseKDESetting", gsw->useKDETerminal->isChecked() ); + config->writeEntry("TerminalApplication", gsw->terminalEdit->text().stripWhiteSpace() ); +} + +TQString KDevIDEExtension::xmlFile() +{ + return "tdevelopui.rc"; +} + +TQString KDevIDEExtension::defaultProfile() +{ + return "IDE"; +} diff --git a/src/kdevideextension.h b/src/kdevideextension.h new file mode 100644 index 00000000..1e25da7e --- /dev/null +++ b/src/kdevideextension.h @@ -0,0 +1,45 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program 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 program 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 KDEVIDEEXTENSION_H +#define KDEVIDEEXTENSION_H + +#include + +class SettingsWidget; + +class KDevIDEExtension : public ShellExtension { +public: + static void init(); + + virtual void createGlobalSettingsPage(KDialogBase *dlg); + virtual void acceptGlobalSettingsPage(KDialogBase *dlg); + + virtual TQString xmlFile(); + + virtual TQString defaultProfile(); + +protected: + KDevIDEExtension(); + +private: + SettingsWidget *gsw; +}; + +#endif diff --git a/src/kdevpluginprofilerc b/src/kdevpluginprofilerc new file mode 100644 index 00000000..1c2abb92 --- /dev/null +++ b/src/kdevpluginprofilerc @@ -0,0 +1,52 @@ +[Plugin Profiles] +profiles=Profile_BASE,Profile_COMPILED,Profile_CPP,Profile_SCRIPT,Profile_WEB +default=Profile_BASE + +[Category] +Ada= +C= +C/GNOME= +C/GBA= +C/PalmOS= +C++=Profile_CPP +C++/Embedded=Profile_CPP +C++/KDE=Profile_CPP +C++/wxWidgets= +C++/KDevelop +C++/Generic +C++/GTK+ +C++/QMake= +PHP= +Database= +Shell= +Java= +Java/KDE= +Java/Ant= +Perl= +Ruby= +Python= +Fortran= +Haskell= +Pascal/Free Pascal= + +[Profile_BASE] +plugins=KDevFileView,KDevClassView,KDevBookmarks,KDevQuickOpen + +[Profile_COMPILED] +inherits=Profile_BASE +plugins= + +[Profile_CPP] +inherits=Profile_COMPILED +plugins=KDevDebugger + +[Profile_SCRIPT] +inherits=Profile_BASE +plugins= + +[Profile_WEB] +inherits=Profile_SCRIPT +plugins=KDevcopyto + + + diff --git a/src/languageselectwidget.cpp b/src/languageselectwidget.cpp index 67723b65..7a8695ff 100644 --- a/src/languageselectwidget.cpp +++ b/src/languageselectwidget.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "domutil.h" #include "languageselectwidget.h" diff --git a/src/main.cpp b/src/main.cpp index 2df35f7e..6f27e415 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,7 +18,7 @@ #include "core.h" #include "projectmanager.h" -#include "tdevideextension.h" +#include "kdevideextension.h" static TDECmdLineOptions options[] = { @@ -86,15 +86,15 @@ int main(int argc, char *argv[]) TDEApplication app; - TDevIDEExtension::init(); + KDevIDEExtension::init(); - TDevSplashScreen *splash = 0; + KDevSplashScreen *splash = 0; TQString splashFile = locate("appdata", "pics/tdevelop-splash.png"); if (!splashFile.isEmpty()) { TQPixmap pm; pm.load(splashFile); - splash = new TDevSplashScreen( pm ); + splash = new KDevSplashScreen( pm ); } app.processEvents(); diff --git a/src/main_assistant.cpp b/src/main_assistant.cpp index 7cd9a98d..ba2c1886 100644 --- a/src/main_assistant.cpp +++ b/src/main_assistant.cpp @@ -18,7 +18,7 @@ #include "core.h" #include "projectmanager.h" -#include "tdevassistantextension.h" +#include "kdevassistantextension.h" static TDECmdLineOptions options[] = { @@ -30,7 +30,7 @@ static TDECmdLineOptions options[] = int main(int argc, char *argv[]) { static const char description[] = I18N_NOOP("The TDevelop Integrated Development Environment:\nassistant and documentation viewer"); - TDEAboutData aboutData("tdevassistant", I18N_NOOP("TDevelop Assistant"), + TDEAboutData aboutData("kdevassistant", I18N_NOOP("TDevelop Assistant"), VERSION, description, TDEAboutData::License_GPL, I18N_NOOP("(c) 1999-2007, The KDevelop developers"), "", "http://www.kdevelop.org"); aboutData.addAuthor("Alexander Dymo", I18N_NOOP("Release coordinator, Overall improvements, Pascal support, C++ support, New File and Documentation parts"), "adymo@kdevelop.org"); @@ -80,15 +80,15 @@ int main(int argc, char *argv[]) TDEApplication app; - TDevAssistantExtension::init(); + KDevAssistantExtension::init(); - TDevSplashScreen *splash = 0; - TQString splashFile = locate("data", "tdevelop/pics/tdevassistant-splash.png"); + KDevSplashScreen *splash = 0; + TQString splashFile = locate("data", "tdevelop/pics/kdevassistant-splash.png"); if (!splashFile.isEmpty()) { TQPixmap pm; pm.load(splashFile); - splash = new TDevSplashScreen( pm ); + splash = new KDevSplashScreen( pm ); } if (splash) splash->show(); @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) if (splash) delete splash; - kapp->dcopClient()->registerAs("tdevassistant"); + kapp->dcopClient()->registerAs("kdevassistant"); return app.exec(); } diff --git a/src/mainwindowshare.cpp b/src/mainwindowshare.cpp index 8e44d7b7..a06dba14 100644 --- a/src/mainwindowshare.cpp +++ b/src/mainwindowshare.cpp @@ -55,11 +55,11 @@ #include "projectmanager.h" #include "core.h" #include "api.h" -#include "tdevmakefrontend.h" +#include "kdevmakefrontend.h" #include "toplevel.h" #include "plugincontroller.h" -#include "tdevplugininfo.h" +#include "kdevplugininfo.h" #include "mainwindowshare.h" @@ -120,8 +120,8 @@ void MainWindowShare::createActions() connect(m_stopProcesses->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotStopPopupActivated(int))); - connect( Core::getInstance(), TQT_SIGNAL(activeProcessChanged(TDevPlugin*, bool)), - this, TQT_SLOT(slotActiveProcessChanged(TDevPlugin*, bool)) ); + connect( Core::getInstance(), TQT_SIGNAL(activeProcessChanged(KDevPlugin*, bool)), + this, TQT_SLOT(slotActiveProcessChanged(KDevPlugin*, bool)) ); action = KStdAction::showMenubar( this, TQT_SLOT(slotShowMenuBar()), @@ -180,7 +180,7 @@ void MainWindowShare::createActions() m_configureEditorAction->setWhatsThis(i18n("Configure editor

    Opens editor configuration dialog.")); m_configureEditorAction->setEnabled( false ); - TDevPartController * partController = API::getInstance()->partController(); + KDevPartController * partController = API::getInstance()->partController(); connect( partController, TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SLOT(slotActivePartChanged(KParts::Part* )) ); } @@ -236,7 +236,7 @@ void MainWindowShare::slotStopButtonPressed() Core::getInstance()->doEmitStopButtonPressed(); } -void MainWindowShare::slotActiveProcessChanged( TDevPlugin* plugin, bool active ) +void MainWindowShare::slotActiveProcessChanged( KDevPlugin* plugin, bool active ) { if ( !plugin ) return; @@ -251,7 +251,7 @@ void MainWindowShare::slotActiveProcessChanged( TDevPlugin* plugin, bool active void MainWindowShare::slotStopPopupActivated( int id ) { - TDevPlugin* plugin = activeProcesses.at( id ); + KDevPlugin* plugin = activeProcesses.at( id ); if ( plugin && plugin->info()->genericName() == m_stopProcesses->popupMenu()->text( id ) ) { Core::getInstance()->doEmitStopButtonPressed( plugin ); return; @@ -273,7 +273,7 @@ void MainWindowShare::slotStopMenuAboutToShow() popup->clear(); int i = 0; - for ( TDevPlugin* plugin = activeProcesses.first(); plugin; plugin = activeProcesses.next() ) { + for ( KDevPlugin* plugin = activeProcesses.first(); plugin; plugin = activeProcesses.next() ) { popup->insertItem( plugin->info()->genericName(), i++ ); } } @@ -325,7 +325,7 @@ void MainWindowShare::slotConfigureEditors() { kdDebug(9000) << " *** MainWindowShare::slotConfigureEditors()" << endl; - TDevPartController * partController = API::getInstance()->partController(); + KDevPartController * partController = API::getInstance()->partController(); KParts::Part * part = partController->activePart(); KTextEditor::ConfigInterface * conf = dynamic_cast( part ); diff --git a/src/mainwindowshare.h b/src/mainwindowshare.h index 7ac08bdb..a9ec620a 100644 --- a/src/mainwindowshare.h +++ b/src/mainwindowshare.h @@ -54,7 +54,7 @@ private slots: void slotConfigureNotifications(); void slotConfigureEditors(); void slotSettings(); - void slotActiveProcessChanged( TDevPlugin*, bool ); + void slotActiveProcessChanged( KDevPlugin*, bool ); void slotActivePartChanged( KParts::Part* part ); void slotStopPopupActivated(int); void slotStopMenuAboutToShow(); @@ -83,7 +83,7 @@ private: TDEToolBarPopupAction* m_stopProcesses; //!< Stops all running processes KParts::MainWindow* m_pMainWnd; - TQPtrList activeProcesses; + TQPtrList activeProcesses; }; #endif // __MAINWINDOWSHARE_H__ diff --git a/src/multibuffer.cpp b/src/multibuffer.cpp index 757eeab7..05a4d26f 100644 --- a/src/multibuffer.cpp +++ b/src/multibuffer.cpp @@ -32,7 +32,7 @@ #include "toplevel.h" #include "editorproxy.h" #include "partcontroller.h" -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include #include @@ -53,7 +53,7 @@ MultiBuffer::MultiBuffer( TQWidget *parent ) m_activeBuffer( 0 ) { EditorProxy::getInstance() ->registerEditor( this ); - if ( TDevLanguageSupport *lang = + if ( KDevLanguageSupport *lang = API::getInstance() ->languageSupport() ) { setOrientation( lang->splitOrientation() ); diff --git a/src/partcontroller.cpp b/src/partcontroller.cpp index 16bffcca..21b78a8c 100644 --- a/src/partcontroller.cpp +++ b/src/partcontroller.cpp @@ -54,14 +54,14 @@ #include "documentationpart.h" #include "ksavealldialog.h" -#include "tdevproject.h" +#include "kdevproject.h" #include "urlutil.h" #include "mimewarningdialog.h" #include "domutil.h" -#include "tdevjobtimer.h" +#include "kdevjobtimer.h" #include "designer.h" -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include "multibuffer.h" #include "partcontroller.h" @@ -90,7 +90,7 @@ struct ModificationData PartController::PartController(TQWidget *parent) - : TDevPartController(parent), _editorFactory(0L), m_currentActivePart(0), m_removingActivePart(false) + : KDevPartController(parent), _editorFactory(0L), m_currentActivePart(0), m_removingActivePart(false) { connect(this, TQT_SIGNAL(partRemoved(KParts::Part*)), this, TQT_SLOT(slotPartRemoved(KParts::Part* )) ); connect(this, TQT_SIGNAL(partAdded(KParts::Part*)), this, TQT_SLOT(slotPartAdded(KParts::Part* )) ); @@ -348,7 +348,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, if ( !addToCurrentBuffer ) { - if ( TDevLanguageSupport *lang = + if ( KDevLanguageSupport *lang = API::getInstance()->languageSupport() ) { // Let the language part override the addToCurrentBuffer flag @@ -406,11 +406,11 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, DesignerSetting = DomUtil::readEntry(*dom, "/kdevcppsupport/qt/designerintegration", DesignerSetting ); designerExec = DomUtil::readEntry(*dom, "/kdevcppsupport/qt/designer", designerExec ); } - if ( DesignerSetting == "ExternalTDevDesigner" ) + if ( DesignerSetting == "ExternalKDevDesigner" ) { - designerExec = "tdevdesigner"; + designerExec = "kdevdesigner"; } - else if ( DesignerSetting == "EmbeddedTDevDesigner" ) + else if ( DesignerSetting == "EmbeddedKDevDesigner" ) { if ( KParts::ReadOnlyPart *designerPart = qtDesignerPart() ) { @@ -419,12 +419,12 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, designerPart->openURL(url); return; } - else if ( KParts::Factory * TDevDesignerFactory = static_cast( KLibLoader::self()->factory( TQFile::encodeName( "libtdevdesignerpart" ) ) ) ) + else if ( KParts::Factory * KDevDesignerFactory = static_cast( KLibLoader::self()->factory( TQFile::encodeName( "libkdevdesignerpart" ) ) ) ) { - KParts::ReadWritePart * tdevpart = static_cast( TDevDesignerFactory->createPart( TopLevel::getInstance()->main(), 0, 0, 0, "KParts::ReadWritePart" ) ); - tdevpart->openURL( url ); + KParts::ReadWritePart * kdevpart = static_cast( KDevDesignerFactory->createPart( TopLevel::getInstance()->main(), 0, 0, 0, "KParts::ReadWritePart" ) ); + kdevpart->openURL( url ); addHistoryEntry(); - integratePart( tdevpart, url ); + integratePart( kdevpart, url ); m_openRecentAction->addURL( url ); m_openRecentAction->saveEntries( kapp->config(), "RecentFiles" ); return; @@ -1386,7 +1386,7 @@ void PartController::slotDocumentDirty( Kate::Document * d, bool isModified, uns p->doc = doc; p->isModified = isModified; p->reason = reason; - TDevJobTimer::singleShot( 0, this, TQT_SLOT(slotDocumentDirtyStepTwo(void*)), p ); + KDevJobTimer::singleShot( 0, this, TQT_SLOT(slotDocumentDirtyStepTwo(void*)), p ); } } diff --git a/src/partcontroller.h b/src/partcontroller.h index 064c6ef6..2e621c38 100644 --- a/src/partcontroller.h +++ b/src/partcontroller.h @@ -1,7 +1,7 @@ #ifndef __PARTCONTROLLER_H__ #define __PARTCONTROLLER_H__ -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" #include #include @@ -40,7 +40,7 @@ class KDirWatch; /** Part controler implementation. */ -class PartController : public TDevPartController +class PartController : public KDevPartController { Q_OBJECT @@ -51,7 +51,7 @@ public: static void createInstance(TQWidget *parent); static PartController *getInstance(); - ///// TDevPartController interface + ///// KDevPartController interface void setEncoding(const TQString &encoding); void editDocument(const KURL &inputUrl, int lineNum=-1, int col=-1); diff --git a/src/plugincontroller.cpp b/src/plugincontroller.cpp index 7b6410b7..30aa9171 100644 --- a/src/plugincontroller.cpp +++ b/src/plugincontroller.cpp @@ -19,14 +19,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -77,7 +77,7 @@ PluginController *PluginController::getInstance() PluginController::PluginController() - : TDevPluginController() + : KDevPluginController() { /* m_defaultProfile = TQString::fromLatin1( "FullIDE" ); m_defaultProfilePath = kapp->dirs()->localtdedir() + "/" + @@ -149,7 +149,7 @@ void PluginController::loadPlugins( TDETrader::OfferList offers, const TQStringL emit loadingPlugin(i18n("Loading: %1").arg((*it)->genericName())); - TDevPlugin *plugin = loadPlugin( *it ); + KDevPlugin *plugin = loadPlugin( *it ); if ( plugin ) { m_parts.insert( name, plugin ); @@ -160,9 +160,9 @@ void PluginController::loadPlugins( TDETrader::OfferList offers, const TQStringL void PluginController::unloadPlugins() { - for( TQDictIterator it( m_parts ); !it.isEmpty(); ) + for( TQDictIterator it( m_parts ); !it.isEmpty(); ) { - TDevPlugin* part = it.current(); + KDevPlugin* part = it.current(); removePart( part ); m_parts.remove( it.currentKey() ); delete part; @@ -180,7 +180,7 @@ void PluginController::unloadProjectPlugins( ) { TQString name = (*it)->desktopEntryName(); - if ( TDevPlugin * plugin = m_parts[ name ] ) + if ( KDevPlugin * plugin = m_parts[ name ] ) { kdDebug(9000) << " *** Removing: " << name << endl; removeAndForgetPart( name, plugin ); @@ -194,7 +194,7 @@ void PluginController::unloadPlugins( TQStringList const & unloadParts ) TQStringList::ConstIterator it = unloadParts.begin(); while ( it != unloadParts.end() ) { - TDevPlugin* part = m_parts[ *it ]; + KDevPlugin* part = m_parts[ *it ]; if( part ) { kdDebug(9000) << " *** Removing: " << *it << endl; @@ -206,11 +206,11 @@ void PluginController::unloadPlugins( TQStringList const & unloadParts ) } } -TDevPlugin *PluginController::loadPlugin( const KService::Ptr &service ) +KDevPlugin *PluginController::loadPlugin( const KService::Ptr &service ) { int err = 0; - TDevPlugin * pl = KParts::ComponentFactory - ::createInstanceFromService( service, API::getInstance(), 0, + KDevPlugin * pl = KParts::ComponentFactory + ::createInstanceFromService( service, API::getInstance(), 0, argumentsFromService( service ), &err ); if (!pl) { @@ -248,7 +248,7 @@ void PluginController::integratePart(KXMLGUIClient *part) TopLevel::getInstance()->main()->actionCollection(), TQT_SIGNAL( actionStatusText( const TQString & ) ) ); } -void PluginController::integrateAndRememberPart(const TQString &name, TDevPlugin *part) +void PluginController::integrateAndRememberPart(const TQString &name, KDevPlugin *part) { m_parts.insert(name, part); integratePart(part); @@ -260,17 +260,17 @@ void PluginController::removePart(KXMLGUIClient *part) TopLevel::getInstance()->main()->guiFactory()->removeClient(part); } -void PluginController::removeAndForgetPart(const TQString &name, TDevPlugin *part) +void PluginController::removeAndForgetPart(const TQString &name, KDevPlugin *part) { kdDebug() << "removing: " << name << endl; m_parts.remove(name); removePart(part); } -const TQValueList PluginController::loadedPlugins() +const TQValueList PluginController::loadedPlugins() { - TQValueList plugins; - TQDictIterator itt(m_parts); + TQValueList plugins; + TQDictIterator itt(m_parts); while( itt.current() ) { plugins.append( itt.current() ); @@ -279,26 +279,26 @@ const TQValueList PluginController::loadedPlugins() return plugins; } -TDevPlugin * PluginController::extension( const TQString & serviceType, const TQString & constraint ) +KDevPlugin * PluginController::extension( const TQString & serviceType, const TQString & constraint ) { - TDETrader::OfferList offers = TDevPluginController::query(serviceType, constraint); + TDETrader::OfferList offers = KDevPluginController::query(serviceType, constraint); for (TDETrader::OfferList::const_iterator it = offers.constBegin(); it != offers.end(); ++it) { - TDevPlugin *ext = m_parts[(*it)->desktopEntryName()]; + KDevPlugin *ext = m_parts[(*it)->desktopEntryName()]; if (ext) return ext; } return 0; } -TDevPlugin * PluginController::loadPlugin( const TQString & serviceType, const TQString & constraint ) +KDevPlugin * PluginController::loadPlugin( const TQString & serviceType, const TQString & constraint ) { - TDETrader::OfferList offers = TDevPluginController::query( serviceType, constraint ); + TDETrader::OfferList offers = KDevPluginController::query( serviceType, constraint ); if ( !offers.size() == 1 ) return 0; TDETrader::OfferList::const_iterator it = offers.constBegin(); TQString name = (*it)->desktopEntryName(); - TDevPlugin * plugin = 0; + KDevPlugin * plugin = 0; if ( plugin = m_parts[ name ] ) { return plugin; @@ -372,12 +372,12 @@ void PluginController::selectPlugins( ) } /* -TDevPlugin * PluginController::getPlugin( const KService::Ptr & service ) +KDevPlugin * PluginController::getPlugin( const KService::Ptr & service ) { - TDevPlugin * plugin = m_parts[ (*it)->name() ]; + KDevPlugin * plugin = m_parts[ (*it)->name() ]; if ( !plugin ) { - TDevPlugin * plugin = loadPlugin( *it ); + KDevPlugin * plugin = loadPlugin( *it ); if ( plugin ) { integratePart( plugin ); diff --git a/src/plugincontroller.h b/src/plugincontroller.h index eb635bb6..d5c3f423 100644 --- a/src/plugincontroller.h +++ b/src/plugincontroller.h @@ -6,13 +6,13 @@ #include -#include +#include #include class KXMLGUIClient; class KService; -class TDevPlugin; +class KDevPlugin; class KDialogBase; class ProjectInfo; @@ -20,7 +20,7 @@ class ProjectInfo; Plugin controller implementation. Loads and unloads plugins. */ -class PluginController : public TDevPluginController +class PluginController : public KDevPluginController { Q_OBJECT @@ -33,7 +33,7 @@ public: static TQStringList argumentsFromService( const KService::Ptr &service ); - virtual TDevPlugin * loadPlugin( const TQString & serviceType, const TQString & constraint ); + virtual KDevPlugin * loadPlugin( const TQString & serviceType, const TQString & constraint ); virtual void unloadPlugin( const TQString & plugin ); TQString currentProfile() const { return m_profile; } @@ -45,18 +45,18 @@ public: void loadGlobalPlugins( const TQStringList & ignorePlugins = TQStringList() ); - // TDevPlugin * getPlugin( const KService::Ptr &service ); + // KDevPlugin * getPlugin( const KService::Ptr &service ); - virtual TDevPlugin *extension(const TQString &serviceType, const TQString &constraint = ""); + virtual KDevPlugin *extension(const TQString &serviceType, const TQString &constraint = ""); void unloadPlugins( TQStringList const & ); void integratePart(KXMLGUIClient *part); - void integrateAndRememberPart(const TQString &name, TDevPlugin *part); + void integrateAndRememberPart(const TQString &name, KDevPlugin *part); void removePart(KXMLGUIClient* part); - void removeAndForgetPart(const TQString &name, TDevPlugin* part); + void removeAndForgetPart(const TQString &name, KDevPlugin* part); - const TQValueList loadedPlugins(); + const TQValueList loadedPlugins(); ProfileEngine &engine() { return m_engine; } @@ -82,10 +82,10 @@ private slots: void unloadPlugins(); private: - static TDevPlugin *loadPlugin( const KService::Ptr &service ); + static KDevPlugin *loadPlugin( const KService::Ptr &service ); - TQDict m_parts; + TQDict m_parts; TQString m_profile; static PluginController *s_instance; diff --git a/src/pluginselectdialog.cpp b/src/pluginselectdialog.cpp index 4f32a37d..2f896b51 100644 --- a/src/pluginselectdialog.cpp +++ b/src/pluginselectdialog.cpp @@ -18,7 +18,7 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include "projectmanager.h" #include "plugincontroller.h" #include "pluginselectdialog.h" @@ -109,9 +109,9 @@ void PluginSelectDialog::itemSelected( TQListViewItem * item ) void PluginSelectDialog::init( ) { - const TQValueList loadedPlugins = PluginController::getInstance()->loadedPlugins(); + const TQValueList loadedPlugins = PluginController::getInstance()->loadedPlugins(); TQStringList loadedPluginDesktopNames; - TQValueList::ConstIterator it = loadedPlugins.begin(); + TQValueList::ConstIterator it = loadedPlugins.begin(); while( it != loadedPlugins.end() ) { loadedPluginDesktopNames << (*it)->instance()->instanceName(); diff --git a/src/profileengine/editor/CMakeLists.txt b/src/profileengine/editor/CMakeLists.txt index 443da696..cfd7c59c 100644 --- a/src/profileengine/editor/CMakeLists.txt +++ b/src/profileengine/editor/CMakeLists.txt @@ -21,9 +21,9 @@ link_directories( ) -##### tdevprofileeditor (executable) ############ +##### kdevprofileeditor (executable) ############ -tde_add_executable( tdevprofileeditor +tde_add_executable( kdevprofileeditor SOURCES main.cpp LINK profileeditor-static profileengine-shared tdeio-shared DESTINATION ${BIN_INSTALL_DIR} diff --git a/src/profileengine/editor/Makefile.am b/src/profileengine/editor/Makefile.am index fae89b48..26f69be6 100644 --- a/src/profileengine/editor/Makefile.am +++ b/src/profileengine/editor/Makefile.am @@ -12,11 +12,11 @@ libprofileeditor_la_SOURCES = profileeditorbase.ui profileeditor.cpp \ noinst_HEADERS = profileeditor.h -bin_PROGRAMS = tdevprofileeditor -tdevprofileeditor_LDFLAGS = $(all_libraries) -tdevprofileeditor_LDADD = \ +bin_PROGRAMS = kdevprofileeditor +kdevprofileeditor_LDFLAGS = $(all_libraries) +kdevprofileeditor_LDADD = \ $(top_builddir)/src/profileengine/lib/libprofileengine.la libprofileeditor.la \ $(LIB_TDEUI) $(LIB_TDEIO) -tdevprofileeditor_SOURCES = main.cpp +kdevprofileeditor_SOURCES = main.cpp diff --git a/src/profileengine/editor/main.cpp b/src/profileengine/editor/main.cpp index 68e942d7..46d128f3 100644 --- a/src/profileengine/editor/main.cpp +++ b/src/profileengine/editor/main.cpp @@ -30,7 +30,7 @@ static TDECmdLineOptions options[] = int main(int argc, char **argv) { - TDEAboutData about("tdevprofileeditor", I18N_NOOP("TDevelop Profile Editor"), "1", "", + TDEAboutData about("kdevprofileeditor", I18N_NOOP("TDevelop Profile Editor"), "1", "", TDEAboutData::License_GPL, I18N_NOOP("(c) 2004, The KDevelop Developers"), 0, 0, ""); about.addAuthor("Alexander Dymo", 0, "adymo@kdevelop.org"); TDECmdLineArgs::init(argc, argv, &about); diff --git a/src/profileengine/lib/Makefile.am b/src/profileengine/lib/Makefile.am index 66b1f159..08b6e7ad 100644 --- a/src/profileengine/lib/Makefile.am +++ b/src/profileengine/lib/Makefile.am @@ -10,7 +10,7 @@ libprofileengine_la_SOURCES = profileengine.cpp profile.cpp profileincludedir = $(includedir)/tdevelop/shell/profileengine profileinclude_HEADERS = profileengine.h profile.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces -DOXYGEN_PROJECTNAME = TDevelop Shell Profiles Library -DOXYGEN_DOCDIRPREFIX = tdevprofiles +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces +DOXYGEN_PROJECTNAME = KDevelop Shell Profiles Library +DOXYGEN_DOCDIRPREFIX = kdevprofiles include ../../../Doxyfile.am diff --git a/src/profileengine/lib/profileengine.cpp b/src/profileengine/lib/profileengine.cpp index 8678732e..fd4d06fa 100644 --- a/src/profileengine/lib/profileengine.cpp +++ b/src/profileengine/lib/profileengine.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include ProfileEngine::ProfileEngine() { diff --git a/src/profileengine/lib/profileengine.h b/src/profileengine/lib/profileengine.h index d630f576..36d85697 100644 --- a/src/profileengine/lib/profileengine.h +++ b/src/profileengine/lib/profileengine.h @@ -61,27 +61,27 @@ public: /** Profile engine. -- Uses TDevelop profiles to form lists of plugin offers; +- Uses KDevelop profiles to form lists of plugin offers; - Provides means of managing profiles; - Provides means to access the resources provided by a profile. -TDevelop profiles form a tree with a root profile named "TDevelop". +KDevelop profiles form a tree with a root profile named "KDevelop". For example, such profiles tree can look as: @code -TDevelop +KDevelop - IDE - CompiledLanguageIDE - AdaIDE - CandCppIDE - CIDE - CppIDE - - TDECppIDE + - KDECppIDE - FortranIDE ... - DatabaseIDE - ScriptingLanguageIDE .. -- TDevAssistant +- KDevAssistant @endcode To manage a tree of profiles, use @ref ProfileEngine::walkProfiles methods. */ @@ -92,7 +92,7 @@ public: /**Type of the plugin offer. Engine will usually find profiles and return offers of selected type. - @sa TDevPlugin class documentation for more information of plugin types.*/ + @sa KDevPlugin class documentation for more information of plugin types.*/ enum OfferType { Global /**= 2 +# +################################################# + +install( FILES + profile.config + DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE ) diff --git a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/Makefile.am b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/Makefile.am new file mode 100644 index 00000000..5e5e943e --- /dev/null +++ b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/Makefile.am @@ -0,0 +1,3 @@ +profilesdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE +profiles_DATA = profile.config + diff --git a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/profile.config b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/profile.config new file mode 100644 index 00000000..b5b45c4c --- /dev/null +++ b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/profile.config @@ -0,0 +1,12 @@ +[Disable] +List= + +[Enable] +List= + +[Information] +Description=C++ IDE for KDE profile +GenericName=C++ IDE for KDE + +[Properties] +List=KDEDevelopment diff --git a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/Makefile.am b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/Makefile.am index fc781b15..79978385 100644 --- a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/Makefile.am +++ b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/Makefile.am @@ -1,3 +1,3 @@ profilesdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE profiles_DATA = profile.config -SUBDIRS = TDECppIDE +SUBDIRS = KDECppIDE diff --git a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/CMakeLists.txt b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/CMakeLists.txt deleted file mode 100644 index a364b7a9..00000000 --- a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - profile.config - DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE ) diff --git a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/Makefile.am b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/Makefile.am deleted file mode 100644 index 9368caac..00000000 --- a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -profilesdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE -profiles_DATA = profile.config - diff --git a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/profile.config b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/profile.config deleted file mode 100644 index b5b45c4c..00000000 --- a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/profile.config +++ /dev/null @@ -1,12 +0,0 @@ -[Disable] -List= - -[Enable] -List= - -[Information] -Description=C++ IDE for KDE profile -GenericName=C++ IDE for KDE - -[Properties] -List=KDEDevelopment diff --git a/src/profiles/IDE/ScriptingLanguageIDE/RubyIDE/profile.config b/src/profiles/IDE/ScriptingLanguageIDE/RubyIDE/profile.config index 99a52802..5e58c161 100644 --- a/src/profiles/IDE/ScriptingLanguageIDE/RubyIDE/profile.config +++ b/src/profiles/IDE/ScriptingLanguageIDE/RubyIDE/profile.config @@ -1,5 +1,5 @@ [Disable] -List=tdevfilelist,kdevsnippet,kdevvalgrind,kdevastyle,kdevctags2,kdevsecurity,kdevregexptest +List=kdevfilelist,kdevsnippet,kdevvalgrind,kdevastyle,kdevctags2,kdevsecurity,kdevregexptest [Enable] List= diff --git a/src/profiles/KDevAssistant/CMakeLists.txt b/src/profiles/KDevAssistant/CMakeLists.txt new file mode 100644 index 00000000..1f22e2e7 --- /dev/null +++ b/src/profiles/KDevAssistant/CMakeLists.txt @@ -0,0 +1,14 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +install( FILES + profile.config + DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/KDevAssistant ) diff --git a/src/profiles/KDevAssistant/Makefile.am b/src/profiles/KDevAssistant/Makefile.am new file mode 100644 index 00000000..dda1dd47 --- /dev/null +++ b/src/profiles/KDevAssistant/Makefile.am @@ -0,0 +1,3 @@ +profilesdir = $(kde_datadir)/tdevelop/profiles/KDevAssistant +profiles_DATA = profile.config + diff --git a/src/profiles/KDevAssistant/profile.config b/src/profiles/KDevAssistant/profile.config new file mode 100644 index 00000000..46edc970 --- /dev/null +++ b/src/profiles/KDevAssistant/profile.config @@ -0,0 +1,12 @@ +[Disable] +List= + +[Enable] +List= + +[Information] +Description=TDevelop Assistant profile +GenericName=TDevelop Assistant + +[Properties] +List=GlobalFileManagement,Documentation,UISwitching,ViewManagement diff --git a/src/profiles/Makefile.am b/src/profiles/Makefile.am index 34789723..3e0a706a 100644 --- a/src/profiles/Makefile.am +++ b/src/profiles/Makefile.am @@ -1,3 +1,3 @@ profilesdir = $(kde_datadir)/tdevelop/profiles profiles_DATA = profile.config -SUBDIRS = IDE TDevAssistant +SUBDIRS = IDE KDevAssistant diff --git a/src/profiles/TDevAssistant/CMakeLists.txt b/src/profiles/TDevAssistant/CMakeLists.txt deleted file mode 100644 index c6f5900f..00000000 --- a/src/profiles/TDevAssistant/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - profile.config - DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/TDevAssistant ) diff --git a/src/profiles/TDevAssistant/Makefile.am b/src/profiles/TDevAssistant/Makefile.am deleted file mode 100644 index 39590a36..00000000 --- a/src/profiles/TDevAssistant/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -profilesdir = $(kde_datadir)/tdevelop/profiles/TDevAssistant -profiles_DATA = profile.config - diff --git a/src/profiles/TDevAssistant/profile.config b/src/profiles/TDevAssistant/profile.config deleted file mode 100644 index 46edc970..00000000 --- a/src/profiles/TDevAssistant/profile.config +++ /dev/null @@ -1,12 +0,0 @@ -[Disable] -List= - -[Enable] -List= - -[Information] -Description=TDevelop Assistant profile -GenericName=TDevelop Assistant - -[Properties] -List=GlobalFileManagement,Documentation,UISwitching,ViewManagement diff --git a/src/projectmanager.cpp b/src/projectmanager.cpp index 3ced0d63..c0380ffb 100644 --- a/src/projectmanager.cpp +++ b/src/projectmanager.cpp @@ -30,11 +30,11 @@ class TQDomDocument; #include #include -#include "tdevproject.h" -#include "tdevlanguagesupport.h" -#include "tdevplugin.h" -#include "tdevcreatefile.h" -#include "tdevversioncontrol.h" +#include "kdevproject.h" +#include "kdevlanguagesupport.h" +#include "kdevplugin.h" +#include "kdevcreatefile.h" +#include "kdevversioncontrol.h" #include "toplevel.h" @@ -97,7 +97,7 @@ void ProjectManager::createActions( TDEActionCollection* ac ) this, TQT_SLOT(slotOpenProject()), ac, "project_open"); action->setToolTip( i18n("Open project")); - action->setWhatsThis(i18n("Open project

    Opens a KDevelop3 or TDevelop2 project.")); + action->setWhatsThis(i18n("Open project

    Opens a KDevelop3 or KDevelop2 project.")); m_openRecentProjectAction = new TDERecentFilesAction(i18n("Open &Recent Project"), 0, @@ -137,8 +137,8 @@ void ProjectManager::slotOpenProject() if( url.isEmpty() ) return; - if (url.path().endsWith("tdevprj")) - loadTDevelop2Project( url ); + if (url.path().endsWith("kdevprj")) + loadKDevelop2Project( url ); else loadProject( url ); } @@ -490,8 +490,8 @@ bool ProjectManager::loadProjectPart() return false; } - TDevProject *projectPart = KParts::ComponentFactory - ::createInstanceFromService< TDevProject >( projectService, API::getInstance(), 0, + KDevProject *projectPart = KParts::ComponentFactory + ::createInstanceFromService< KDevProject >( projectService, API::getInstance(), 0, PluginController::argumentsFromService( projectService ) ); if ( !projectPart ) { KMessageBox::sorry(TopLevel::getInstance()->main(), @@ -517,7 +517,7 @@ bool ProjectManager::loadProjectPart() void ProjectManager::unloadProjectPart() { - TDevProject *projectPart = API::getInstance()->project(); + KDevProject *projectPart = API::getInstance()->project(); if( !projectPart ) return; PluginController::getInstance()->removePart( projectPart ); projectPart->closeProject(); @@ -547,8 +547,8 @@ bool ProjectManager::loadLanguageSupport(const TQString& lang) } KService::Ptr languageSupportService = *languageSupportOffers.begin(); - TDevLanguageSupport *langSupport = KParts::ComponentFactory - ::createInstanceFromService( languageSupportService, + KDevLanguageSupport *langSupport = KParts::ComponentFactory + ::createInstanceFromService( languageSupportService, API::getInstance(), 0, PluginController::argumentsFromService( languageSupportService ) ); @@ -569,7 +569,7 @@ bool ProjectManager::loadLanguageSupport(const TQString& lang) void ProjectManager::unloadLanguageSupport() { - TDevLanguageSupport *langSupport = API::getInstance()->languageSupport(); + KDevLanguageSupport *langSupport = API::getInstance()->languageSupport(); if( !langSupport ) return; kdDebug(9000) << "Language support for " << langSupport->name() << " unloading..." << endl; PluginController::getInstance()->removePart( langSupport ); @@ -611,14 +611,14 @@ ProjectSession* ProjectManager::projectSession() const return m_pProjectSession; } -bool ProjectManager::loadTDevelop2Project( const KURL & url ) +bool ProjectManager::loadKDevelop2Project( const KURL & url ) { if( !url.isValid() || !url.isLocalFile() ){ KMessageBox::sorry(0, i18n("Invalid URL.")); return false; } - TQString cmd = TDEGlobal::dirs()->findExe( "tdevprj2tdevelop" ); + TQString cmd = TDEGlobal::dirs()->findExe( "kdevprj2tdevelop" ); if (cmd.isEmpty()) { KMessageBox::sorry(0, i18n("You do not have 'kdevprj2tdevelop' installed.")); return false; diff --git a/src/projectmanager.h b/src/projectmanager.h index 3c1b3599..3a92409e 100644 --- a/src/projectmanager.h +++ b/src/projectmanager.h @@ -17,7 +17,7 @@ class KService; class ProjectInfo; class ProjectSession; class TDERecentFilesAction; -class TDevPlugin; +class KDevPlugin; class ProjectInfo @@ -65,7 +65,7 @@ public: public slots: bool loadProject( const KURL& url); - bool loadTDevelop2Project( const KURL& url); + bool loadKDevelop2Project( const KURL& url); bool closeProject( bool exiting = false ); private slots: @@ -102,7 +102,7 @@ private: ProjectSession* m_pProjectSession; - TDevPlugin *m_vcsPlugin; + KDevPlugin *m_vcsPlugin; TQString m_vcsName; TQString m_oldProfileName; diff --git a/src/projectprofiles b/src/projectprofiles index b86f9b25..d2224272 100644 --- a/src/projectprofiles +++ b/src/projectprofiles @@ -8,8 +8,8 @@ Profiles=ShellIDE Profiles=CIDE [C++] -Keywords=Empty,TDE -Profiles=CppIDE,TDECppIDE +Keywords=Empty,KDE +Profiles=CppIDE,KDECppIDE [Fortran77] Profiles=FortranIDE diff --git a/src/projectsession.cpp b/src/projectsession.cpp index 1b8173fc..afdaf0b5 100644 --- a/src/projectsession.cpp +++ b/src/projectsession.cpp @@ -34,7 +34,7 @@ #include "domutil.h" #include "documentationpart.h" #include "toplevel.h" -#include "tdevplugin.h" +#include "kdevplugin.h" #include "projectsession.h" #include "projectsession.moc" @@ -68,7 +68,7 @@ void ProjectSession::initXMLTree() } //--------------------------------------------------------------------------- -bool ProjectSession::restoreFromFile( const TQString & sessionFileName, const TQValueList< TDevPlugin * > plugins ) +bool ProjectSession::restoreFromFile( const TQString & sessionFileName, const TQValueList< KDevPlugin * > plugins ) { bool bFileOpenOK = true; @@ -105,10 +105,10 @@ bool ProjectSession::restoreFromFile( const TQString & sessionFileName, const TQ // now also let the plugins load their session stuff TQDomElement pluginListEl = session.namedItem("pluginList").toElement(); - TQValueList::ConstIterator it = plugins.begin(); + TQValueList::ConstIterator it = plugins.begin(); while( it != plugins.end() ) { - TDevPlugin* pPlugin = (*it); + KDevPlugin* pPlugin = (*it); TQString pluginName = pPlugin->instance()->instanceName(); TQDomElement pluginEl = pluginListEl.namedItem(pluginName).toElement(); if (!pluginEl.isNull()) { @@ -230,7 +230,7 @@ void ProjectSession::recreateViews(KURL& url, TQDomElement docEl, bool activate) } //--------------------------------------------------------------------------- -bool ProjectSession::saveToFile( const TQString & sessionFileName, const TQValueList< TDevPlugin * > plugins ) +bool ProjectSession::saveToFile( const TQString & sessionFileName, const TQValueList< KDevPlugin * > plugins ) { TQString section, keyword; TQDomElement session = domdoc.documentElement(); @@ -390,10 +390,10 @@ bool ProjectSession::saveToFile( const TQString & sessionFileName, const TQValue } } - TQValueList::ConstIterator itt = plugins.begin(); + TQValueList::ConstIterator itt = plugins.begin(); while( itt != plugins.end() ) { - TDevPlugin* pPlugin = (*itt); + KDevPlugin* pPlugin = (*itt); TQString pluginName = pPlugin->instance()->instanceName(); TQDomElement pluginEl = domdoc.createElement(pluginName); diff --git a/src/projectsession.h b/src/projectsession.h index 64101496..e386bdbc 100644 --- a/src/projectsession.h +++ b/src/projectsession.h @@ -24,7 +24,7 @@ class TQWidget; class KURL; -class TDevPlugin; +class KDevPlugin; /** * This class stores and restores the last situation before the certain project @@ -42,10 +42,10 @@ public: virtual ~ProjectSession(); /** Opens the .kdevses file and saves the project session in XML format to it. */ - bool saveToFile(const TQString& fileName, const TQValueList plugins ); + bool saveToFile(const TQString& fileName, const TQValueList plugins ); /** Opens the .kdevses file and loads the project session from it. */ - bool restoreFromFile(const TQString& fileName, const TQValueList plugins ); + bool restoreFromFile(const TQString& fileName, const TQValueList plugins ); signals: void sig_restoreMainWindowProperties(const TQDomElement* el); diff --git a/src/simplemainwindow.cpp b/src/simplemainwindow.cpp index f82f4882..3c9db000 100644 --- a/src/simplemainwindow.cpp +++ b/src/simplemainwindow.cpp @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include "api.h" @@ -81,7 +81,7 @@ void SimpleMainWindow::init() createFramework(); createActions(); - new TDevStatusBar(this); + new KDevStatusBar(this); setAcceptDrops(true); @@ -466,7 +466,7 @@ void SimpleMainWindow::createActions() void SimpleMainWindow::raiseEditor() { kdDebug() << "SimpleMainWindow::raiseEditor" << endl; - TDevPartController *partcontroller = API::getInstance()->partController(); + KDevPartController *partcontroller = API::getInstance()->partController(); if (partcontroller->activePart() && partcontroller->activePart()->widget()) partcontroller->activePart()->widget()->setFocus(); } @@ -983,7 +983,7 @@ void SimpleMainWindow::setCaption(const TQString &caption) modified = ( state == Modified || state == DirtyAndModified ); } - TDevProject *project = API::getInstance()->project(); + KDevProject *project = API::getInstance()->project(); if (project) { TQString projectname = project->projectName(); diff --git a/src/simplemainwindow.h b/src/simplemainwindow.h index 1f80119f..7dbf5695 100644 --- a/src/simplemainwindow.h +++ b/src/simplemainwindow.h @@ -21,9 +21,9 @@ #define SIMPLEMAINWINDOW_H #include -#include -#include -#include +#include +#include +#include class TDEAction; class TQPopupMenu; @@ -34,7 +34,7 @@ namespace KParts { class ReadOnlyPart; } -class SimpleMainWindow: public DMainWindow, public TDevMainWindow { +class SimpleMainWindow: public DMainWindow, public KDevMainWindow { Q_OBJECT public: diff --git a/src/splashscreen.cpp b/src/splashscreen.cpp index 446705b8..205656bd 100644 --- a/src/splashscreen.cpp +++ b/src/splashscreen.cpp @@ -10,7 +10,7 @@ #include #include -TDevSplashScreen::TDevSplashScreen(const TQPixmap& pixmap, WFlags f) : TQSplashScreen(pixmap, f) +KDevSplashScreen::KDevSplashScreen(const TQPixmap& pixmap, WFlags f) : TQSplashScreen(pixmap, f) { TQTimer *timer = new TQTimer( this ); TQObject::connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(animate())); @@ -21,19 +21,19 @@ TDevSplashScreen::TDevSplashScreen(const TQPixmap& pixmap, WFlags f) : TQSplashS } -TDevSplashScreen::~TDevSplashScreen() +KDevSplashScreen::~KDevSplashScreen() { } -void TDevSplashScreen::animate() +void KDevSplashScreen::animate() { state = ((state + 1) % (2*progress_bar_size-1)); repaint(); } -void TDevSplashScreen::message( const TQString &str, int flags, const TQColor &color) +void KDevSplashScreen::message( const TQString &str, int flags, const TQColor &color) { TQSplashScreen::message(str,flags,color); animate(); @@ -41,7 +41,7 @@ void TDevSplashScreen::message( const TQString &str, int flags, const TQColor &c } -void TDevSplashScreen::drawContents (TQPainter* painter) +void KDevSplashScreen::drawContents (TQPainter* painter) { int position; TQColor base_color (201,229,165); // Base green color diff --git a/src/splashscreen.h b/src/splashscreen.h index 11a329bc..b8d5563c 100644 --- a/src/splashscreen.h +++ b/src/splashscreen.h @@ -11,14 +11,14 @@ class TQPixmap; /** Splash screen. */ -class TDevSplashScreen : public TQSplashScreen +class KDevSplashScreen : public TQSplashScreen { Q_OBJECT public: - TDevSplashScreen(const TQPixmap& pixmap, WFlags f = 0); - virtual ~TDevSplashScreen(); + KDevSplashScreen(const TQPixmap& pixmap, WFlags f = 0); + virtual ~KDevSplashScreen(); protected: void drawContents (TQPainter * painter); diff --git a/src/statusbar.cpp b/src/statusbar.cpp index e1f8f3b5..b4e11769 100644 --- a/src/statusbar.cpp +++ b/src/statusbar.cpp @@ -27,7 +27,7 @@ #include "statusbar.h" #include "partcontroller.h" -TDevStatusBar::TDevStatusBar(TQWidget *parent, const char *name) +KDevStatusBar::KDevStatusBar(TQWidget *parent, const char *name) : KStatusBar(parent, name), _cursorIface(0), _activePart(0) { TQWidget * w = new TQWidget( this ); @@ -44,10 +44,10 @@ TDevStatusBar::TDevStatusBar(TQWidget *parent, const char *name) } -TDevStatusBar::~TDevStatusBar() +KDevStatusBar::~KDevStatusBar() {} -void TDevStatusBar::activePartChanged(KParts::Part *part) +void KDevStatusBar::activePartChanged(KParts::Part *part) { if ( _activePart && _activePart->widget() ) disconnect( _activePart->widget(), 0, this, 0 ); @@ -80,7 +80,7 @@ void TDevStatusBar::activePartChanged(KParts::Part *part) } } -void TDevStatusBar::cursorPositionChanged() +void KDevStatusBar::cursorPositionChanged() { if (_cursorIface) { @@ -90,18 +90,18 @@ void TDevStatusBar::cursorPositionChanged() } } -void TDevStatusBar::setStatus(const TQString &str) +void KDevStatusBar::setStatus(const TQString &str) { _status->setText(str); } -void TDevStatusBar::setCursorPosition(int line, int col) +void KDevStatusBar::setCursorPosition(int line, int col) { _status->setText(i18n(" Line: %1 Col: %2 ").arg(line+1).arg(col)); } -void TDevStatusBar::addWidget ( TQWidget *widget, int stretch, bool permanent) +void KDevStatusBar::addWidget ( TQWidget *widget, int stretch, bool permanent) { KStatusBar::addWidget(widget,stretch,permanent); diff --git a/src/statusbar.h b/src/statusbar.h index 09f1af97..2f5370ef 100644 --- a/src/statusbar.h +++ b/src/statusbar.h @@ -24,14 +24,14 @@ namespace KParts { class Part; } /** Status bar. */ -class TDevStatusBar : public KStatusBar +class KDevStatusBar : public KStatusBar { Q_OBJECT public: - TDevStatusBar( TQWidget *parent=0, const char *name=0 ); - ~TDevStatusBar(); + KDevStatusBar( TQWidget *parent=0, const char *name=0 ); + ~KDevStatusBar(); void addWidget ( TQWidget *widget, int stretch = 0, bool permanent = FALSE ); private slots: diff --git a/src/tdeconf_update/CMakeLists.txt b/src/tdeconf_update/CMakeLists.txt index 8eb5c732..4b605615 100644 --- a/src/tdeconf_update/CMakeLists.txt +++ b/src/tdeconf_update/CMakeLists.txt @@ -20,13 +20,13 @@ link_directories( ##### other data ################################ -install( FILES tdev-gen-settings.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) +install( FILES kdev-gen-settings.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) -##### tdev-gen-settings-tdeconf_update (executable) +##### kdev-gen-settings-tdeconf_update (executable) -tde_add_executable( tdev-gen-settings-tdeconf_update - SOURCES tdev-gen-settings-tdeconf_update.cpp +tde_add_executable( kdev-gen-settings-tdeconf_update + SOURCES kdev-gen-settings-tdeconf_update.cpp LINK ${TQT_LIBRARIES} DESTINATION ${LIB_INSTALL_DIR}/tdeconf_update_bin ) diff --git a/src/tdeconf_update/Makefile.am b/src/tdeconf_update/Makefile.am index 4cf2dab5..f806baa2 100644 --- a/src/tdeconf_update/Makefile.am +++ b/src/tdeconf_update/Makefile.am @@ -1,18 +1,18 @@ AM_CPPFLAGS = -DKDE_NO_COMPAT -DQT_NO_COMPAT $(all_includes) -update_DATA = tdev-gen-settings.upd +update_DATA = kdev-gen-settings.upd updatedir = $(kde_datadir)/tdeconf_update # The Qt app cannot go into kde_datadir, that is not portable. # install to kde_bindir/tdeconf_update_bin instead. # KDE 3.2 will allow tdeconf_update scripts to run directly from there, # but for us that's too late. Use the .sh script as a workaround. -tdeconf_PROGRAMS = tdev-gen-settings-tdeconf_update +tdeconf_PROGRAMS = kdev-gen-settings-tdeconf_update tdeconfdir = $(libdir)/tdeconf_update_bin -tdev_gen_settings_tdeconf_update_SOURCES = tdev-gen-settings-tdeconf_update.cpp -tdev_gen_settings_tdeconf_update_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -tdev_gen_settings_tdeconf_update_LDADD = $(LIB_QT) +kdev_gen_settings_tdeconf_update_SOURCES = kdev-gen-settings-tdeconf_update.cpp +kdev_gen_settings_tdeconf_update_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +kdev_gen_settings_tdeconf_update_LDADD = $(LIB_QT) # vim: set noet: diff --git a/src/tdeconf_update/kdev-gen-settings-tdeconf_update.cpp b/src/tdeconf_update/kdev-gen-settings-tdeconf_update.cpp new file mode 100644 index 00000000..63e4a834 --- /dev/null +++ b/src/tdeconf_update/kdev-gen-settings-tdeconf_update.cpp @@ -0,0 +1,113 @@ +/* + tdeconf_update app for migrating tdevelop's ui settings to the new + code that will be in 3.3. + + Copyright (c) 2005 by Matt Rogers + Based on code Copyright (c) 2003 by Martijn Klingens + + ************************************************************************* + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + ************************************************************************* +*/ + +#include +#include +#include + +static TQTextStream qcin ( stdin, IO_ReadOnly ); +static TQTextStream qcout( stdout, IO_WriteOnly ); +static TQTextStream qcerr( stderr, IO_WriteOnly ); + +// Group cache. Yes, I know global vars are ugly :) +bool needFlush = false; +TQString newKeyValue; +int newDataValue; + +void parseKey( const TQString &group, const TQString &key, + const TQString &value, const TQString &rawLine ) +{ + + //qcerr << "*** group='" << group << "'" << endl; + if ( group == "General Options" && key == "Embed KDevDesigner") + { + newKeyValue = "Designer App"; + if ( value.lower() == "true" ) + newDataValue = 0; + else + newDataValue = 2; + qcout << newKeyValue << "=" << newDataValue << endl; + qcout << "# DELETE [" << key << "]" << endl; + + } + else if ( group == "General Options" && key == "Application Font" ) + { + newKeyValue = "OutputViewFont"; + qcout << newKeyValue << "=" << value << endl; + qcout << "# DELETE [" << key << "]" << endl; + } + else if ( group == "MakeOutputView" && key == "Messages Font" ) + { + qcout << "# DELETE [" << key << "]" << endl; + } + else if ( group == "TerminalEmulator" && key == "UseKDESetting" ) + { + newKeyValue = "UseKDESetting"; + if ( value.lower() == "true" ) + newDataValue = 0; + else + newDataValue = 1; + qcout << newKeyValue << "=" << newDataValue << endl; + } + else + { + // keys we don't convert. output the raw line instead. + qcout << rawLine << endl; + } +} + +int main() +{ + qcin.setEncoding( TQTextStream::UnicodeUTF8 ); + qcout.setEncoding( TQTextStream::UnicodeUTF8 ); + + TQString curGroup; + + TQRegExp groupRegExp( "^\\[(.*)\\]" ); + TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); + TQRegExp commentRegExp( "^(#.*)?$" ); + + while ( !qcin.atEnd() ) + { + TQString line = qcin.readLine(); + + if ( commentRegExp.exactMatch( line ) ) + { + // We found a comment, leave unchanged + qcout << line << endl; + } + else if ( groupRegExp.exactMatch( line ) ) + { + curGroup = groupRegExp.capturedTexts()[ 1 ]; + qcout << line << endl; + } + else if ( keyRegExp.exactMatch( line ) ) + { + // We found the a key line + parseKey( curGroup, keyRegExp.capturedTexts()[ 1 ], keyRegExp.capturedTexts()[ 2 ], line ); + } + else + { + qcout << line << endl; + } + } + + return 0; +} + +// vim: set noet ts=4 sts=4 sw=4: + diff --git a/src/tdeconf_update/kdev-gen-settings.upd b/src/tdeconf_update/kdev-gen-settings.upd new file mode 100644 index 00000000..1fd3803f --- /dev/null +++ b/src/tdeconf_update/kdev-gen-settings.upd @@ -0,0 +1,8 @@ +#Update the KDevelop General Settings page to work with the +#new UI file created on 20050406 +Id=kdev-gen-settings-update/5 +File=tdeveloprc +Script=kdev-gen-settings-tdeconf_update +Options=overwrite +AllKeys + diff --git a/src/tdeconf_update/tdev-gen-settings-tdeconf_update.cpp b/src/tdeconf_update/tdev-gen-settings-tdeconf_update.cpp deleted file mode 100644 index ae20ae57..00000000 --- a/src/tdeconf_update/tdev-gen-settings-tdeconf_update.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - tdeconf_update app for migrating tdevelop's ui settings to the new - code that will be in 3.3. - - Copyright (c) 2005 by Matt Rogers - Based on code Copyright (c) 2003 by Martijn Klingens - - ************************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Lesser General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - ************************************************************************* -*/ - -#include -#include -#include - -static TQTextStream qcin ( stdin, IO_ReadOnly ); -static TQTextStream qcout( stdout, IO_WriteOnly ); -static TQTextStream qcerr( stderr, IO_WriteOnly ); - -// Group cache. Yes, I know global vars are ugly :) -bool needFlush = false; -TQString newKeyValue; -int newDataValue; - -void parseKey( const TQString &group, const TQString &key, - const TQString &value, const TQString &rawLine ) -{ - - //qcerr << "*** group='" << group << "'" << endl; - if ( group == "General Options" && key == "Embed TDevDesigner") - { - newKeyValue = "Designer App"; - if ( value.lower() == "true" ) - newDataValue = 0; - else - newDataValue = 2; - qcout << newKeyValue << "=" << newDataValue << endl; - qcout << "# DELETE [" << key << "]" << endl; - - } - else if ( group == "General Options" && key == "Application Font" ) - { - newKeyValue = "OutputViewFont"; - qcout << newKeyValue << "=" << value << endl; - qcout << "# DELETE [" << key << "]" << endl; - } - else if ( group == "MakeOutputView" && key == "Messages Font" ) - { - qcout << "# DELETE [" << key << "]" << endl; - } - else if ( group == "TerminalEmulator" && key == "UseKDESetting" ) - { - newKeyValue = "UseKDESetting"; - if ( value.lower() == "true" ) - newDataValue = 0; - else - newDataValue = 1; - qcout << newKeyValue << "=" << newDataValue << endl; - } - else - { - // keys we don't convert. output the raw line instead. - qcout << rawLine << endl; - } -} - -int main() -{ - qcin.setEncoding( TQTextStream::UnicodeUTF8 ); - qcout.setEncoding( TQTextStream::UnicodeUTF8 ); - - TQString curGroup; - - TQRegExp groupRegExp( "^\\[(.*)\\]" ); - TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); - TQRegExp commentRegExp( "^(#.*)?$" ); - - while ( !qcin.atEnd() ) - { - TQString line = qcin.readLine(); - - if ( commentRegExp.exactMatch( line ) ) - { - // We found a comment, leave unchanged - qcout << line << endl; - } - else if ( groupRegExp.exactMatch( line ) ) - { - curGroup = groupRegExp.capturedTexts()[ 1 ]; - qcout << line << endl; - } - else if ( keyRegExp.exactMatch( line ) ) - { - // We found the a key line - parseKey( curGroup, keyRegExp.capturedTexts()[ 1 ], keyRegExp.capturedTexts()[ 2 ], line ); - } - else - { - qcout << line << endl; - } - } - - return 0; -} - -// vim: set noet ts=4 sts=4 sw=4: - diff --git a/src/tdeconf_update/tdev-gen-settings.upd b/src/tdeconf_update/tdev-gen-settings.upd deleted file mode 100644 index 1fd3803f..00000000 --- a/src/tdeconf_update/tdev-gen-settings.upd +++ /dev/null @@ -1,8 +0,0 @@ -#Update the KDevelop General Settings page to work with the -#new UI file created on 20050406 -Id=kdev-gen-settings-update/5 -File=tdeveloprc -Script=kdev-gen-settings-tdeconf_update -Options=overwrite -AllKeys - diff --git a/src/tdevassistantextension.cpp b/src/tdevassistantextension.cpp deleted file mode 100644 index f53d2bc3..00000000 --- a/src/tdevassistantextension.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@kdevelop.org * - * * - * This program 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 program 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 "tdevassistantextension.h" - -TDevAssistantExtension::TDevAssistantExtension() - : ShellExtension() -{ -} - -void TDevAssistantExtension::init() -{ - s_instance = new TDevAssistantExtension(); -} - -TQString TDevAssistantExtension::xmlFile() -{ - return "tdevassistantui.rc"; -} - -TQString TDevAssistantExtension::defaultProfile() -{ - return "TDevAssistant"; -} diff --git a/src/tdevassistantextension.h b/src/tdevassistantextension.h deleted file mode 100644 index a53d9dbd..00000000 --- a/src/tdevassistantextension.h +++ /dev/null @@ -1,41 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@kdevelop.org * - * * - * This program 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 program 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 TDEVASSISTANTEXTENSION_H -#define TDEVASSISTANTEXTENSION_H - -#include "shellextension.h" - -class TDevAssistantExtension : public ShellExtension { -public: - static void init(); - - virtual void createGlobalSettingsPage(KDialogBase */*dlg*/) {}; - virtual void acceptGlobalSettingsPage(KDialogBase */*dlg*/) {}; - - virtual TQString xmlFile(); - - virtual TQString defaultProfile(); - -protected: - TDevAssistantExtension(); - -}; - -#endif diff --git a/src/tdevassistantrc b/src/tdevassistantrc deleted file mode 100644 index eaab6fc6..00000000 --- a/src/tdevassistantrc +++ /dev/null @@ -1,14 +0,0 @@ -[RightToolWindow] -LastWidget=Documentation -Width=254 - -[UI] -CloseOnHover=false -CloseOnHoverDelay=false -MDIMode=4 -MDIStyle=1 -OpenNewTabAfterCurrent=true -ShowCloseTabsButton=true -ShowTabIcons=true -TabWidgetVisibility=0 -UseSimpleMainWindow=true diff --git a/src/tdevassistantui.rc b/src/tdevassistantui.rc deleted file mode 100644 index 39171359..00000000 --- a/src/tdevassistantui.rc +++ /dev/null @@ -1,168 +0,0 @@ - - - -

    &File - - - - - - - - - - - - - - - - - - - - - - - - - - &View - - - - - - - - - - - - - - &Settings - - - - - - - - - - - - - - - - - - - - &Window - - - - - - - - - - - - - - - &Help - - - - - - Main Toolbar - - - - - - - - - - - - - - - - - Browser Toolbar - - - - - - - - - - - - - - - - diff --git a/src/tdevideextension.cpp b/src/tdevideextension.cpp deleted file mode 100644 index a6b62e12..00000000 --- a/src/tdevideextension.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@kdevelop.org * - * * - * This program 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 program 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 "tdevideextension.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "api.h" -#include "settingswidget.h" - -TDevIDEExtension::TDevIDEExtension() - : ShellExtension() -{ -} - -void TDevIDEExtension::init() -{ - s_instance = new TDevIDEExtension(); -} - -void TDevIDEExtension::createGlobalSettingsPage(KDialogBase *dlg) -{ - TDEConfig* config = kapp->config(); - TQVBox *vbox = dlg->addVBoxPage(i18n("General"), i18n("General"), BarIcon("tdevelop", TDEIcon::SizeMedium) ); - gsw = new SettingsWidget(vbox, "general settings widget"); - - gsw->projectsURL->setMode((int)KFile::Directory); - - config->setGroup("General Options"); - gsw->lastProjectCheckbox->setChecked(config->readBoolEntry("Read Last Project On Startup",true)); - gsw->outputFont->setFont( config->readFontEntry( "OutputViewFont" ) ); - config->setGroup("MakeOutputView"); - gsw->lineWrappingCheckBox->setChecked(config->readBoolEntry("LineWrapping",true)); - gsw->dirNavigMsgCheckBox->setChecked(config->readBoolEntry("ShowDirNavigMsg",false)); - gsw->compileOutputCombo->setCurrentItem(config->readNumEntry("CompilerOutputLevel",2)); - gsw->forceCLocaleRadio->setChecked( config->readBoolEntry( "ForceCLocale", true ) ); - gsw->userLocaleRadio->setChecked( !config->readBoolEntry( "ForceCLocale", true ) ); - - config->setGroup("General Options"); - gsw->projectsURL->setURL(config->readPathEntry("DefaultProjectsDir", TQDir::homeDirPath()+"/")); - gsw->designerButtonGroup->setButton( config->readNumEntry( "DesignerApp", 0 ) ); - - TQString DesignerSetting = config->readEntry( "DesignerSetting", "ExternalDesigner" ); - gsw->qtDesignerRadioButton->setChecked( DesignerSetting == "ExternalDesigner" ); - gsw->seperateAppRadioButton->setChecked( DesignerSetting == "ExternalTDevDesigner" ); - gsw->embeddedDesignerRadioButton->setChecked( DesignerSetting == "EmbeddedTDevDesigner" ); - - config->setGroup("TerminalEmulator"); - gsw->terminalEdit->setText( config->readEntry( "TerminalApplication", TQString::fromLatin1("konsole") ) ); - bool useKDESetting = config->readBoolEntry( "UseKDESetting", true ); - gsw->useKDETerminal->setChecked( useKDESetting ); - gsw->useOtherTerminal->setChecked( !useKDESetting ); -} - -void TDevIDEExtension::acceptGlobalSettingsPage(KDialogBase *dlg) -{ - TDEConfig* config = kapp->config(); - - config->setGroup("General Options"); - config->writeEntry("DesignerApp", gsw->designerButtonGroup->selectedId()); - config->writeEntry("Read Last Project On Startup",gsw->lastProjectCheckbox->isChecked()); - config->writePathEntry("DefaultProjectsDir", gsw->projectsURL->url()); - config->writeEntry("OutputViewFont", gsw->outputFont->font()); - - TQString DesignerSetting; - if ( gsw->qtDesignerRadioButton->isChecked() ) DesignerSetting = "ExternalDesigner"; - if ( gsw->seperateAppRadioButton->isChecked() ) DesignerSetting = "ExternalTDevDesigner"; - if ( gsw->embeddedDesignerRadioButton->isChecked() ) DesignerSetting = "EmbeddedTDevDesigner"; - config->writeEntry( "DesignerSetting", DesignerSetting ); - - config->setGroup("MakeOutputView"); - config->writeEntry("LineWrapping",gsw->lineWrappingCheckBox->isChecked()); - config->writeEntry("ShowDirNavigMsg",gsw->dirNavigMsgCheckBox->isChecked()); - config->writeEntry( "ForceCLocale", gsw->forceCLocaleRadio->isChecked() ); - //current item id must be in sync with the enum! - config->writeEntry("CompilerOutputLevel",gsw->compileOutputCombo->currentItem()); - config->sync(); - if( TDevPlugin *makeExt = API::getInstance()->pluginController()->extension("TDevelop/MakeFrontend")) - { - static_cast(makeExt)->updateSettingsFromConfig(); - } - - config->setGroup("TerminalEmulator"); - config->writeEntry("UseKDESetting", gsw->useKDETerminal->isChecked() ); - config->writeEntry("TerminalApplication", gsw->terminalEdit->text().stripWhiteSpace() ); -} - -TQString TDevIDEExtension::xmlFile() -{ - return "tdevelopui.rc"; -} - -TQString TDevIDEExtension::defaultProfile() -{ - return "IDE"; -} diff --git a/src/tdevideextension.h b/src/tdevideextension.h deleted file mode 100644 index 64c1a8ca..00000000 --- a/src/tdevideextension.h +++ /dev/null @@ -1,45 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@kdevelop.org * - * * - * This program 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 program 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 TDEVIDEEXTENSION_H -#define TDEVIDEEXTENSION_H - -#include - -class SettingsWidget; - -class TDevIDEExtension : public ShellExtension { -public: - static void init(); - - virtual void createGlobalSettingsPage(KDialogBase *dlg); - virtual void acceptGlobalSettingsPage(KDialogBase *dlg); - - virtual TQString xmlFile(); - - virtual TQString defaultProfile(); - -protected: - TDevIDEExtension(); - -private: - SettingsWidget *gsw; -}; - -#endif diff --git a/src/tdevpluginprofilerc b/src/tdevpluginprofilerc deleted file mode 100644 index b93ba2c1..00000000 --- a/src/tdevpluginprofilerc +++ /dev/null @@ -1,52 +0,0 @@ -[Plugin Profiles] -profiles=Profile_BASE,Profile_COMPILED,Profile_CPP,Profile_SCRIPT,Profile_WEB -default=Profile_BASE - -[Category] -Ada= -C= -C/GNOME= -C/GBA= -C/PalmOS= -C++=Profile_CPP -C++/Embedded=Profile_CPP -C++/KDE=Profile_CPP -C++/wxWidgets= -C++/TDevelop -C++/Generic -C++/GTK+ -C++/QMake= -PHP= -Database= -Shell= -Java= -Java/KDE= -Java/Ant= -Perl= -Ruby= -Python= -Fortran= -Haskell= -Pascal/Free Pascal= - -[Profile_BASE] -plugins=TDevFileView,KDevClassView,KDevBookmarks,KDevQuickOpen - -[Profile_COMPILED] -inherits=Profile_BASE -plugins= - -[Profile_CPP] -inherits=Profile_COMPILED -plugins=TDevDebugger - -[Profile_SCRIPT] -inherits=Profile_BASE -plugins= - -[Profile_WEB] -inherits=Profile_SCRIPT -plugins=KDevcopyto - - - diff --git a/src/toplevel.cpp b/src/toplevel.cpp index 63416175..129d869c 100644 --- a/src/toplevel.cpp +++ b/src/toplevel.cpp @@ -8,14 +8,14 @@ #include "simplemainwindow.h" -TDevMainWindow *TopLevel::s_instance = 0; +KDevMainWindow *TopLevel::s_instance = 0; bool TopLevel::mainWindowValid() { return s_instance != 0; } -TDevMainWindow *TopLevel::getInstance() +KDevMainWindow *TopLevel::getInstance() { if (!s_instance) { @@ -28,7 +28,7 @@ TDevMainWindow *TopLevel::getInstance() return s_instance; } -void TopLevel::invalidateInstance(TDevMainWindow *instance) +void TopLevel::invalidateInstance(KDevMainWindow *instance) { if ( s_instance == instance ) s_instance = 0; diff --git a/src/toplevel.h b/src/toplevel.h index 081ddcae..8eb0243a 100644 --- a/src/toplevel.h +++ b/src/toplevel.h @@ -2,10 +2,10 @@ #define __TOPLEVEL_H__ -#include "tdevmainwindow.h" +#include "kdevmainwindow.h" -/**\brief This class handles the single object of type TDevMainWindow. +/**\brief This class handles the single object of type KDevMainWindow. It is completely static (all methods and attributes). */ @@ -14,13 +14,13 @@ class TopLevel { public: - static TDevMainWindow *getInstance(); //!< Get a pointer to the single KDevTopLevel object + static KDevMainWindow *getInstance(); //!< Get a pointer to the single KDevTopLevel object static bool mainWindowValid(); - static void invalidateInstance(TDevMainWindow *instance); //!< Signal that the object has been (or is about to be) destroyed + static void invalidateInstance(KDevMainWindow *instance); //!< Signal that the object has been (or is about to be) destroyed private: - static TDevMainWindow *s_instance; //!< Pointer to the single KDevTopLevel object or 0L + static KDevMainWindow *s_instance; //!< Pointer to the single KDevTopLevel object or 0L }; diff --git a/tde_app_devel.desktop b/tde_app_devel.desktop deleted file mode 100644 index ee7ddfc5..00000000 --- a/tde_app_devel.desktop +++ /dev/null @@ -1,6 +0,0 @@ -[Desktop Entry] -Icon=tdevelop -DocPath=tde_app_devel/index.html -Categories=Qt;TDE;Development;IDE;X-TDE-TDevelopIDE -NoDisplay=true -Name=TDevelop Programming diff --git a/tdevassistant.desktop b/tdevassistant.desktop deleted file mode 100644 index d4640788..00000000 --- a/tdevassistant.desktop +++ /dev/null @@ -1,73 +0,0 @@ -[Desktop Entry] -Type=Application -Exec=tdevassistant %u -Icon=tdevelop -DocPath=tdevelop/index.html -Terminal=false -Name=TDevelop Assistant -Name[br]=Skoazeller TDevelop -Name[ca]=Assistent per a TDevelop -Name[cy]=Cymhorthwr TDevelop -Name[da]=TDevelop assistent -Name[de]=TDevelop-Assistent -Name[el]=Βοηθός TDevelop -Name[es]=Asistente de TDevelop -Name[et]=TDevelopi abiline -Name[eu]=TDevelop laguntzailea -Name[fa]=دستیار TDevelop -Name[fr]=Assistant de TDevelop -Name[it]=Assistente di TDevelop -Name[ja]=TDevelop アシスタント -Name[ms]=Pembantu TDevelop -Name[nds]=TDevelop-Hölper -Name[ne]=केडीई विकास सहायक -Name[nl]=TDevelop Assistent -Name[pl]=Asystent TDevelop -Name[pt]=Assistente do TDevelop -Name[pt_BR]=Assistente do TDevelop -Name[sk]=TDevelop asistent -Name[sl]=Pomočnik za TDevelop -Name[sr]=TDevelop-ов асистент -Name[sr@Latn]=TDevelop-ov asistent -Name[sv]=TDevelop assistent -Name[ta]=Kஉருவாக்கு உதவி -Name[tg]=TDevelop Ассистент -Name[zh_CN]=TDevelop 助手 -Name[zh_TW]=TDevelop 助理 -GenericName=Documentation Viewer -GenericName[br]=Gweler an teuliadur -GenericName[ca]=Visor de documentació -GenericName[da]=Dokumentationsfremviser -GenericName[de]=Dokumentationsbetrachter -GenericName[el]=Προβολέας τεκμηρίωσης -GenericName[es]=Visor de documentación -GenericName[et]=Dokumentatsiooninäitaja -GenericName[eu]=Documentazio ikustailea -GenericName[fa]=مشاهده‌گر مستندات -GenericName[fr]=Afficheur de documentation -GenericName[ga]=Amharcán Doiciméadithe -GenericName[gl]=Visor de documentación -GenericName[hu]=Dokumentációmegjelenítő -GenericName[it]=Visualizzatore documentazione -GenericName[ja]=ドキュメンテーションビューア -GenericName[ms]=Pelihat Dokumentasi -GenericName[nds]=Dokmentatschoonkieker -GenericName[ne]=मिलिसीकरण दृश्यकर्ता -GenericName[nl]=Documentatie Browser -GenericName[pa]=ਦਸਤਾਵੇਜ਼ ਦਰਸ਼ਕ -GenericName[pl]=Przeglądarka dokumentacji -GenericName[pt]=Visualizador de Documentação -GenericName[pt_BR]=Visualizador de Documentação -GenericName[ru]=Просмотр документации -GenericName[sk]=Prezerač dokumentácie -GenericName[sl]=Pregledovalnik dokumentacije -GenericName[sr]=Приказивач документације -GenericName[sr@Latn]=Prikazivač dokumentacije -GenericName[sv]=Dokumentationsvisning -GenericName[ta]=ஆவணமாக்கல் காட்சியமைப்பாளர் -GenericName[tg]=Аз назар бо ҳуҷҷатнок гузарондан -GenericName[tr]=Belge Gösterici -GenericName[zh_CN]=文档查看器 -GenericName[zh_TW]=文件檢視器 -X-DCOP-ServiceType=Multi -Categories=Qt;TDE;Development;Documentation;X-TDE-TDevelopIDE; diff --git a/tdevdesigner/AUTHORS b/tdevdesigner/AUTHORS deleted file mode 100644 index 5ecf318c..00000000 --- a/tdevdesigner/AUTHORS +++ /dev/null @@ -1,4 +0,0 @@ -TDevDesigner: Alexander Dymo -Qt Designer Copyright: (C) 2000-2003 Trolltech AS All Rights Reserved - - diff --git a/tdevdesigner/CMakeLists.txt b/tdevdesigner/CMakeLists.txt deleted file mode 100644 index 9584f4c7..00000000 --- a/tdevdesigner/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( shared ) -add_subdirectory( uilib ) -add_subdirectory( designer ) -add_subdirectory( src ) diff --git a/tdevdesigner/LICENSE.GPL b/tdevdesigner/LICENSE.GPL deleted file mode 100644 index c13faf0d..00000000 --- a/tdevdesigner/LICENSE.GPL +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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 program 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 - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/tdevdesigner/Makefile.am b/tdevdesigner/Makefile.am deleted file mode 100644 index 4cc5b44c..00000000 --- a/tdevdesigner/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -SUBDIRS = shared uilib designer src -#plugins - -EXTRA_DIST = COPYING configure.in.in diff --git a/tdevdesigner/NEWS b/tdevdesigner/NEWS deleted file mode 100644 index 0519ecba..00000000 --- a/tdevdesigner/NEWS +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tdevdesigner/README b/tdevdesigner/README deleted file mode 100644 index 23675fdb..00000000 --- a/tdevdesigner/README +++ /dev/null @@ -1,25 +0,0 @@ -TDevDesigner is a port of Qt Designer (code taken from Qt 3.3 distribution) to KDE technologies: -1) XML GUI -2) KParts -3) KFileDialog -4) TDEIconLoader - -TDevDesigner consists of a part and a shell. -Part can be used in Konqueror and KDevelop to edit and view ui files and projects. -Shell loads a part with "in shell" argument so that the part can create projects and ui files. - -Other important notes: -TDevDesignerPart is Read/Write part which ignores readonly mode. -Designer Editor plugins are not loaded. -Available in system designer plugins are loaded if possible (tested with Qt 3.3 version). - -TDevDesignerPart integration: -TDevDesignerPart implements KInterfaceDesigner interface (defined in tdevelop/lib/external_interfaces). - -WARNING: -If you want to modify this code, try to introduce as few modifications to original Qt Designer code as possible. -Write your own classes and wrappers instead. The goal is to ease syncronization between the port and original Qt Designer. -Feel free to modify tdevdesigner_part.h(cpp) though. - -FUTURE: -Trolltech promises that Qt 4 will have easilly embeddable designer. If that happens, this port will be dropped for KDevelop 4. diff --git a/tdevdesigner/TODO b/tdevdesigner/TODO deleted file mode 100644 index 0519ecba..00000000 --- a/tdevdesigner/TODO +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tdevdesigner/designer/CMakeLists.txt b/tdevdesigner/designer/CMakeLists.txt deleted file mode 100644 index c74d2977..00000000 --- a/tdevdesigner/designer/CMakeLists.txt +++ /dev/null @@ -1,107 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_definitions( -DDESIGNER -UQT_NO_ASCII_CAST ) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/tdevdesigner/shared - ${CMAKE_SOURCE_DIR}/lib/interfaces/external - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES - tdevdesigner_part.desktop - DESTINATION ${SERVICES_INSTALL_DIR} ) - -install( FILES - tdevdesigner_part.rc tdevdesigner_part_sh.rc - DESTINATION ${DATA_INSTALL_DIR}/tdevdesignerpart ) - -add_subdirectory( pics ) - - -##### libtdevdesignerpart (module) ############## - -set( SRCS - about.ui dbconnection.ui gotolinedialog.ui - newform.ui actionlistview.cpp asciivalidator.cpp - command.cpp connectionitems.cpp connectiontable.cpp - customwidgeteditor.ui formsettings.ui - multilineeditor.ui customwidgeteditorimpl.cpp - database.cpp dbconnectioneditor.ui iconvieweditor.ui - paletteeditor.ui dbconnectionimpl.cpp dbconnectionsimpl.cpp - dbconnections.ui listboxeditor.ui paletteeditoradvanced.ui - defs.cpp designerapp.cpp designerappiface.cpp - editfunctionsimpl.cpp filechooser.cpp formfile.cpp - formsettingsimpl.cpp formwindow.cpp hierarchyview.cpp - iconvieweditorimpl.cpp layout.cpp listboxdnd.cpp - tdevdesigner_part.cpp actiondnd.cpp actioneditorimpl.cpp - listboxeditorimpl.cpp listboxrename.cpp listdnd.cpp - listeditor.ui pixmapcollectioneditor.ui listviewdnd.cpp - listvieweditorimpl.cpp mainwindow.cpp listvieweditor.ui - pixmapfunction.ui startdialog.ui mainwindowactions.cpp - menubareditor.cpp metadatabase.cpp multilineeditorimpl.cpp - newformimpl.cpp orderindicator.cpp myiconloader.cpp - outputwindow.cpp paletteeditoradvancedimpl.cpp - paletteeditorimpl.cpp pixmapchooser.cpp - pixmapcollection.cpp popupmenueditor.cpp previewframe.cpp - preferences.ui tableeditor.ui designeraction.cpp - previewwidget.ui variabledialog.ui actioneditor.ui - previewwidgetimpl.cpp project.cpp projectsettingsimpl.cpp - projectsettings.ui wizardeditor.ui configtoolboxdialog.ui - propertyeditor.cpp propertyobject.cpp qcompletionedit.cpp - replacedialog.ui connectiondialog.ui editfunctions.ui - resource.cpp sizehandle.cpp sourceeditor.cpp - richtextfontdialog.ui createtemplate.ui finddialog.ui - sourcefile.cpp startdialogimpl.cpp styledbutton.cpp - syntaxhighlighter_html.cpp tableeditorimpl.cpp - timestamp.cpp variabledialogimpl.cpp widgetaction.cpp - widgetfactory.cpp wizardeditorimpl.cpp workspace.cpp -) - -tde_moc( SRCS - actiondnd.h actioneditorimpl.h actionlistview.h - asciivalidator.h command.h connectionitems.h - connectiontable.h customwidgeteditorimpl.h database.h - dbconnectionimpl.h dbconnectionsimpl.h editfunctionsimpl.h - filechooser.h formfile.h formsettingsimpl.h - formwindow.h hierarchyview.h iconvieweditorimpl.h - layout.h listboxdnd.h listboxeditorimpl.h listboxrename.h - listdnd.h listviewdnd.h listvieweditorimpl.h mainwindow.h - menubareditor.h multilineeditorimpl.h newformimpl.h - orderindicator.h outputwindow.h paletteeditoradvancedimpl.h - paletteeditorimpl.h pixmapchooser.h popupmenueditor.h - previewframe.h previewwidgetimpl.h project.h - projectsettingsimpl.h propertyeditor.h qcompletionedit.h - sizehandle.h sourceeditor.h sourcefile.h startdialogimpl.h - styledbutton.h tableeditorimpl.h timestamp.h - variabledialogimpl.h widgetaction.h widgetfactory.h - wizardeditorimpl.h workspace.h - ) - - -tde_add_kpart( libtdevdesignerpart AUTOMOC - SOURCES ${SRCS} - LINK - tdevqui-static shared-static kinterfacedesigner-shared - tdeio-shared tdeparts-shared tqassistantclient - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/tdevdesigner/designer/Makefile.am b/tdevdesigner/designer/Makefile.am deleted file mode 100644 index b486e711..00000000 --- a/tdevdesigner/designer/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -SUBDIRS = pics - -AM_CXXFLAGS=-DDESIGNER -KDE_CXXFLAGS=-UQT_NO_ASCII_CAST -INCLUDES = -I$(top_srcdir)/tdevdesigner/shared \ - -I$(top_srcdir)/lib/interfaces/external $(all_includes) -METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevdesignerpart.la -libtdevdesignerpart_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -libtdevdesignerpart_la_LIBADD = \ - $(top_builddir)/tdevdesigner/uilib/libtdevqui.la $(top_builddir)/tdevdesigner/shared/libshared.la \ - $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) -ltqassistantclient $(LIB_TDEFILE) $(LIB_TDEPARTS) -libtdevdesignerpart_la_SOURCES = tdevdesigner_part.cpp actiondnd.cpp actioneditorimpl.cpp actionlistview.cpp asciivalidator.cpp command.cpp connectionitems.cpp connectiontable.cpp customwidgeteditorimpl.cpp database.cpp dbconnectionimpl.cpp dbconnectionsimpl.cpp defs.cpp designerapp.cpp designerappiface.cpp editfunctionsimpl.cpp filechooser.cpp formfile.cpp formsettingsimpl.cpp formwindow.cpp hierarchyview.cpp iconvieweditorimpl.cpp layout.cpp listboxdnd.cpp listboxeditorimpl.cpp listboxrename.cpp listdnd.cpp listviewdnd.cpp listvieweditorimpl.cpp mainwindow.cpp mainwindowactions.cpp menubareditor.cpp metadatabase.cpp multilineeditorimpl.cpp newformimpl.cpp orderindicator.cpp outputwindow.cpp paletteeditoradvancedimpl.cpp paletteeditorimpl.cpp pixmapchooser.cpp pixmapcollection.cpp popupmenueditor.cpp previewframe.cpp previewwidgetimpl.cpp project.cpp projectsettingsimpl.cpp propertyeditor.cpp propertyobject.cpp qcompletionedit.cpp resource.cpp sizehandle.cpp sourceeditor.cpp sourcefile.cpp startdialogimpl.cpp styledbutton.cpp syntaxhighlighter_html.cpp tableeditorimpl.cpp timestamp.cpp variabledialogimpl.cpp widgetaction.cpp widgetfactory.cpp wizardeditorimpl.cpp workspace.cpp about.ui dbconnection.ui gotolinedialog.ui newform.ui previewwidget.ui variabledialog.ui actioneditor.ui dbconnectioneditor.ui iconvieweditor.ui paletteeditor.ui projectsettings.ui wizardeditor.ui configtoolboxdialog.ui dbconnections.ui listboxeditor.ui paletteeditoradvanced.ui replacedialog.ui connectiondialog.ui editfunctions.ui listeditor.ui pixmapcollectioneditor.ui richtextfontdialog.ui createtemplate.ui finddialog.ui listvieweditor.ui pixmapfunction.ui startdialog.ui customwidgeteditor.ui formsettings.ui multilineeditor.ui preferences.ui tableeditor.ui designeraction.cpp myiconloader.cpp -partrcdir = $(kde_datadir)/tdevdesignerpart -partdesktopdir = $(kde_servicesdir) -partdesktop_DATA = tdevdesigner_part.desktop -partrc_DATA = tdevdesigner_part.rc tdevdesigner_part_sh.rc -noinst_HEADERS = tdevdesigner_part.h designeraction.h myiconloader.h -picsdirdir = $(kde_datadir)/tdevdesignerpart/pics - -KDE_OPTIONS=nofinal diff --git a/tdevdesigner/designer/about.ui b/tdevdesigner/designer/about.ui deleted file mode 100644 index 48d53486..00000000 --- a/tdevdesigner/designer/about.ui +++ /dev/null @@ -1,219 +0,0 @@ - -AboutDialog -********************************************************************* -** Copyright (C) 2001-2003 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - AboutDialog - - - - 0 - 0 - 544 - 667 - - - - Qt Designer - - - - unnamed - - - 11 - - - 6 - - - - aboutPixmap - - - NoFrame - - - Plain - - - "designer_splash.png" - - - false - - - AlignCenter - - - - - - - aboutVersion - - - Version 3.2 - - - AlignCenter - - - - - - - aboutCopyright - - - Copyright (C) 2000-2003 Trolltech AS. All Rights Reserved. - - - AlignCenter - - - - - - - aboutLicense - - - - 1 - 0 - 0 - 0 - - - - <p>Qt Commercial Edition license holders: This program is licensed to you under the terms of the Qt Commercial License Agreement. For details, see the file LICENSE that came with this software distribution.</p><p></p><p>Qt Free Edition users: This program is licensed to you under the terms of the GNU General Public License Version 2. For details, see the file LICENSE.GPL that came with this software distribution.</p><p>The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.</p> - - - WordBreak|AlignVCenter|AlignLeft - - - - - - - Spacer3 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - Spacer2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - PushButton1 - - - &OK - - - true - - - true - - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - - - - - PushButton1 - clicked() - AboutDialog - accept() - - - - myiconloader.h - -BarIcon2 - - - diff --git a/tdevdesigner/designer/actiondnd.cpp b/tdevdesigner/designer/actiondnd.cpp deleted file mode 100644 index 33f0c4bf..00000000 --- a/tdevdesigner/designer/actiondnd.cpp +++ /dev/null @@ -1,728 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "actiondnd.h" -#include "command.h" -#include "defs.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "metadatabase.h" -#include "widgetfactory.h" -#include "hierarchyview.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -TQAction *ActionDrag::the_action = 0; - -ActionDrag::ActionDrag(TQAction *action, TQWidget *source) -: TQStoredDrag("application/x-designer-actions", source) -{ - Q_ASSERT(the_action == 0); - the_action = action; -} - -ActionDrag::ActionDrag(TQActionGroup *group, TQWidget *source) -: TQStoredDrag("application/x-designer-actiongroup", source) -{ - Q_ASSERT(the_action == 0); - the_action = group; -} - -ActionDrag::ActionDrag(const TQString &type, TQAction *action, TQWidget *source) -: TQStoredDrag(type, source) -{ - Q_ASSERT(the_action == 0); - the_action = action; -} - -bool ActionDrag::canDecode(TQDropEvent *e) -{ - return e->provides( "application/x-designer-actions" ) || - e->provides( "application/x-designer-actiongroup" ) || - e->provides( "application/x-designer-separator" ); -} - -ActionDrag::~ActionDrag() -{ - the_action = 0; -} - -void QDesignerAction::init() -{ - MetaDataBase::addEntry( this ); - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( this ) ); - WidgetFactory::saveDefaultProperties( this, id ); - WidgetFactory::saveChangedProperties( this, id ); -} - -void QDesignerActionGroup::init() -{ - MetaDataBase::addEntry( this ); - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( this ) ); - WidgetFactory::saveDefaultProperties( this, id ); - WidgetFactory::saveChangedProperties( this, id ); -} - -bool QDesignerAction::addTo( TQWidget *w ) -{ - if ( !widgetToInsert ) - return TQAction::addTo( w ); - - if ( ::tqqt_cast(w) ) - return FALSE; - - widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE ); - widgetToInsert->show(); - addedTo( widgetToInsert, w ); - return TRUE; -} - -bool QDesignerAction::removeFrom( TQWidget *w ) -{ - if ( !widgetToInsert ) - return TQAction::removeFrom( w ); - - remove(); - return TRUE; -} - -void QDesignerAction::remove() -{ - if ( !widgetToInsert ) - return; - MainWindow::self->formWindow()->selectWidget( TQT_TQOBJECT(widgetToInsert), FALSE ); - widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE ); -} - -QDesignerToolBarSeparator::QDesignerToolBarSeparator(Qt::Orientation o , TQToolBar *parent, - const char* name ) - : TQWidget( parent, name ) -{ - connect( parent, TQT_SIGNAL(orientationChanged(Qt::Orientation)), - this, TQT_SLOT(setOrientation(Qt::Orientation)) ); - setOrientation( o ); - setBackgroundMode( parent->backgroundMode() ); - setBackgroundOrigin( ParentOrigin ); - setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); -} - -void QDesignerToolBarSeparator::setOrientation( Qt::Orientation o ) -{ - orient = o; -} - -void QDesignerToolBarSeparator::styleChange( TQStyle& ) -{ - setOrientation( orient ); -} - -TQSize QDesignerToolBarSeparator::sizeHint() const -{ - int extent = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, - this ); - if ( orient ==Qt::Horizontal ) - return TQSize( extent, 0 ); - else - return TQSize( 0, extent ); -} - -void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) -{ - TQPainter p( this ); - TQStyle::SFlags flags = TQStyle::Style_Default; - - if ( orientation() ==Qt::Horizontal ) - flags |= TQStyle::Style_Horizontal; - - style().tqdrawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(), - colorGroup(), flags ); -} - - - -QSeparatorAction::QSeparatorAction( TQObject *parent ) - : TQAction( parent, "qt_designer_separator" ), wid( 0 ) -{ -} - -bool QSeparatorAction::addTo( TQWidget *w ) -{ - if ( ::tqqt_cast(w) ) { - TQToolBar *tb = (TQToolBar*)w; - wid = new QDesignerToolBarSeparator( tb->orientation(), tb ); - return TRUE; - } else if ( ::tqqt_cast(w) ) { - idx = ( (TQPopupMenu*)w )->count(); - ( (TQPopupMenu*)w )->insertSeparator( idx ); - return TRUE; - } - return FALSE; -} - -bool QSeparatorAction::removeFrom( TQWidget *w ) -{ - if ( ::tqqt_cast(w) ) { - delete wid; - return TRUE; - } else if ( ::tqqt_cast(w) ) { - ( (TQPopupMenu*)w )->removeItemAt( idx ); - return TRUE; - } - return FALSE; -} - -TQWidget *QSeparatorAction::widget() const -{ - return wid; -} - - - -QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw ) - : TQToolBar( mw ), lastIndicatorPos( -1, -1 ) -{ - insertAnchor = 0; - afterAnchor = TRUE; - setAcceptDrops( TRUE ); - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); - lastIndicatorPos = TQPoint( -1, -1 ); - indicator = new QDesignerIndicatorWidget( this ); - indicator->hide(); - installEventFilter( this ); - widgetInserting = FALSE; - findFormWindow(); - mw->setDockEnabled( DockTornOff, FALSE ); -} - -QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock ) - : TQToolBar( TQString(), mw, dock), lastIndicatorPos( -1, -1 ) -{ - insertAnchor = 0; - afterAnchor = TRUE; - setAcceptDrops( TRUE ); - indicator = new QDesignerIndicatorWidget( this ); - indicator->hide(); - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); - installEventFilter( this ); - widgetInserting = FALSE; - findFormWindow(); - mw->setDockEnabled( DockTornOff, FALSE ); -} - -void QDesignerToolBar::findFormWindow() -{ - TQWidget *w = this; - while ( w ) { - formWindow = ::tqqt_cast(w); - if ( formWindow ) - break; - w = w->parentWidget(); - } -} - -void QDesignerToolBar::addAction( TQAction *a ) -{ - actionList.append( a ); - connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) ); - if ( ::tqqt_cast(a) ) { - ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); - actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); - } else if ( ::tqqt_cast(a) ) { - ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); - actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); - } else { - ( (QDesignerAction*)a )->widget()->installEventFilter( this ); - actionMap.insert( ( (QDesignerAction*)a )->widget(), a ); - } -} - -static void fixObject( TQObject *&o ) -{ - while ( o && o->parent() && !::tqqt_cast(o->parent()) ) - o = o->parent(); -} - -bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) -{ - if ( !o || !e || o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) || o->inherits( "TQDockWindowTitleBar" ) ) - return TQToolBar::eventFilter( o, e ); - - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::MouseButtonPress && - ( ( TQMouseEvent*)e )->button() == Qt::LeftButton ) { - mousePressEvent( (TQMouseEvent*)e ); - return TRUE; - } - - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) - return TQToolBar::eventFilter( o, e ); - - if ( e->type() == TQEvent::MouseButtonPress ) { - TQMouseEvent *ke = (TQMouseEvent*)e; - fixObject( o ); - if ( !o ) - return FALSE; - buttonMousePressEvent( ke, o ); - return TRUE; - } else if(e->type() == TQEvent::ContextMenu ) { - TQContextMenuEvent *ce = (TQContextMenuEvent*)e; - fixObject( o ); - if( !o ) - return FALSE; - buttonContextMenuEvent( ce, o ); - return TRUE; - } else if ( e->type() == TQEvent::MouseMove ) { - TQMouseEvent *ke = (TQMouseEvent*)e; - fixObject( o ); - if ( !o ) - return FALSE; - buttonMouseMoveEvent( ke, o ); - return TRUE; - } else if ( e->type() == TQEvent::MouseButtonRelease ) { - TQMouseEvent *ke = (TQMouseEvent*)e; - fixObject( o ); - if ( !o ) - return FALSE; - buttonMouseReleaseEvent( ke, o ); - return TRUE; - } else if ( e->type() == TQEvent::DragEnter ) { - TQDragEnterEvent *de = (TQDragEnterEvent*)e; - if (ActionDrag::canDecode(de)) - de->accept(); - } else if ( e->type() == TQEvent::DragMove ) { - TQDragMoveEvent *de = (TQDragMoveEvent*)e; - if (ActionDrag::canDecode(de)) - de->accept(); - } - - return TQToolBar::eventFilter( o, e ); -} - -void QDesignerToolBar::paintEvent( TQPaintEvent *e ) -{ - TQToolBar::paintEvent( e ); - if ( e->rect() != rect() ) - return; - lastIndicatorPos = TQPoint( -1, -1 ); -} - -void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) -{ - e->accept(); - TQPopupMenu menu( 0 ); - menu.insertItem( i18n( "Delete Toolbar" ), 1 ); - int res = menu.exec( e->globalPos() ); - if ( res != -1 ) { - RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n( "Delete Toolbar '%1'" ).arg( name() ), - formWindow, 0, this ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } -} - -void QDesignerToolBar::mousePressEvent( TQMouseEvent *e ) -{ - widgetInserting = FALSE; - if ( e->button() == Qt::LeftButton && - MainWindow::self->currentTool() != POINTER_TOOL && - MainWindow::self->currentTool() != ORDER_TOOL && - MainWindow::self->currentTool() != CONNECT_TOOL && - MainWindow::self->currentTool() != BUDDY_TOOL ) - widgetInserting = TRUE; -} - -void QDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e ) -{ - if ( widgetInserting ) - doInsertWidget( mapFromGlobal( e->globalPos() ) ); - widgetInserting = FALSE; -} - -void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) -{ - if ( widgetInserting ) - doInsertWidget( mapFromGlobal( e->globalPos() ) ); - else if ( w->isWidgetType() && formWindow->widgets()->find( w ) ) { - formWindow->clearSelection( FALSE ); - formWindow->selectWidget( w ); - } - widgetInserting = FALSE; -} - -void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ) -{ - e->accept(); - TQPopupMenu menu( 0 ); - const int ID_DELETE = 1; - const int ID_SEP = 2; - const int ID_DELTOOLBAR = 3; - TQMap::Iterator it = actionMap.find( (TQWidget*)o ); - if ( it != actionMap.end() && ::tqqt_cast(*it) ) - menu.insertItem( i18n( "Delete Separator" ), ID_DELETE ); - else - menu.insertItem( i18n( "Delete Item" ), ID_DELETE ); - menu.insertItem( i18n( "Insert Separator" ), ID_SEP ); - menu.insertSeparator(); - menu.insertItem( i18n( "Delete Toolbar" ), ID_DELTOOLBAR ); - int res = menu.exec( e->globalPos() ); - if ( res == ID_DELETE ) { - TQMap::Iterator it = actionMap.find( (TQWidget*)o ); - if ( it == actionMap.end() ) - return; - TQAction *a = *it; - int index = actionList.find( a ); - RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( - i18n( "Delete Action '%1' From Toolbar '%2'" ). - arg( a->name() ).arg( caption() ), - formWindow, a, this, index ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( res == ID_SEP ) { - calcIndicatorPos( mapFromGlobal( e->globalPos() ) ); - TQAction *a = new QSeparatorAction( 0 ); - int index = actionList.findRef( *actionMap.find( insertAnchor ) ); - if ( index != -1 && afterAnchor ) - ++index; - if ( !insertAnchor ) - index = 0; - - AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( - i18n( "Add Separator to Toolbar '%1'" ). - arg( a->name() ), - formWindow, a, this, index ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( res == ID_DELTOOLBAR ) { - RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n( "Delete Toolbar '%1'" ).arg( name() ), - formWindow, 0, this ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } -} - -void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) -{ - widgetInserting = FALSE; - - if ( e->button() == Qt::MidButton ) - return; - - if ( e->button() == Qt::LeftButton && - MainWindow::self->currentTool() != POINTER_TOOL && - MainWindow::self->currentTool() != ORDER_TOOL && - MainWindow::self->currentTool() != CONNECT_TOOL && - MainWindow::self->currentTool() != BUDDY_TOOL ) { - widgetInserting = TRUE; - return; - } - - dragStartPos = e->pos(); -} - -void QDesignerToolBar::removeWidget( TQWidget *w ) -{ - TQMap::Iterator it = actionMap.find( w ); - if ( it == actionMap.end() ) - return; - TQAction *a = *it; - int index = actionList.find( a ); - RemoveActionFromToolBarCommand *cmd = - new RemoveActionFromToolBarCommand( i18n( "Delete Action '%1' From Toolbar '%2'" ). - arg( a->name() ).arg( caption() ), - formWindow, a, this, index ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - TQApplication::sendPostedEvents(); - adjustSize(); -} - -void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) -{ - if ( widgetInserting || ( e->state() & Qt::LeftButton ) == 0 ) - return; - if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() ) - return; - TQMap::Iterator it = actionMap.find( (TQWidget*)o ); - if ( it == actionMap.end() ) - return; - TQAction *a = *it; - if ( !a ) - return; - int index = actionList.find( a ); - RemoveActionFromToolBarCommand *cmd = - new RemoveActionFromToolBarCommand( i18n( "Delete Action '%1' From Toolbar '%2'" ). - arg( a->name() ).arg( caption() ), - formWindow, a, this, index ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - TQApplication::sendPostedEvents(); - adjustSize(); - - TQString type = ::tqqt_cast(a) ? TQString( "application/x-designer-actiongroup" ) : - ::tqqt_cast(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); - TQStoredDrag *drag = new ActionDrag( type, a, this ); - drag->setPixmap( a->iconSet().pixmap() ); - if ( ::tqqt_cast(a) ) { - if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) ) - formWindow->selectWidget( ( TQT_TQOBJECT(( (QDesignerAction*)a )->widget())), FALSE ); - } - if ( !drag->drag() ) { - AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Action '%1' to Toolbar '%2'" ). - arg( a->name() ).arg( caption() ), - formWindow, a, this, index ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - lastIndicatorPos = TQPoint( -1, -1 ); - indicator->hide(); -} - -#ifndef TQT_NO_DRAGANDDROP - -void QDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e ) -{ - widgetInserting = FALSE; - lastIndicatorPos = TQPoint( -1, -1 ); - if (ActionDrag::canDecode(e)) - e->accept(); -} - -void QDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e ) -{ - if (ActionDrag::canDecode(e)) { - e->accept(); - drawIndicator( calcIndicatorPos( e->pos() ) ); - } -} - -void QDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * ) -{ - indicator->hide(); - insertAnchor = 0; - afterAnchor = TRUE; -} - -void QDesignerToolBar::dropEvent( TQDropEvent *e ) -{ - if (!ActionDrag::canDecode(e)) - return; - - e->accept(); - - indicator->hide(); - TQAction *a = 0; - int index = actionList.findRef( *actionMap.find( insertAnchor ) ); - if ( index != -1 && afterAnchor ) - ++index; - if ( !insertAnchor ) - index = 0; - if ( e->provides( "application/x-designer-actions" ) || - e->provides( "application/x-designer-separator" ) ) { - if ( e->provides( "application/x-designer-actions" ) ) - a = ::tqqt_cast(ActionDrag::action()); - else - a = ::tqqt_cast(ActionDrag::action()); - } else { - a = ::tqqt_cast(ActionDrag::action()); - } - - if ( actionList.findRef( a ) != -1 ) { - TQMessageBox::warning( MainWindow::self, i18n( "Insert/Move Action" ), - i18n( "Action '%1' has already been added to this toolbar.\n" - "An Action may only occur once in a given toolbar." ). - arg( a->name() ) ); - return; - } - - AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Action '%1' to Toolbar '%2'" ). - arg( a->name() ).arg( caption() ), - formWindow, a, this, index ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - - lastIndicatorPos = TQPoint( -1, -1 ); -} - -#endif - -void QDesignerToolBar::reInsert() -{ - TQAction *a = 0; - actionMap.clear(); - clear(); - for ( a = actionList.first(); a; a = actionList.next() ) { - a->addTo( this ); - if ( ::tqqt_cast(a) ) { - actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); - if ( ( (QDesignerActionGroup*)a )->widget() ) - ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); - } else if ( ::tqqt_cast(a) ) { - actionMap.insert( ( (QDesignerAction*)a )->widget(), a ); - ( (QDesignerAction*)a )->widget()->installEventFilter( this ); - } else if ( ::tqqt_cast(a) ) { - actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); - ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); - } - } - TQApplication::sendPostedEvents(); - adjustSize(); -} - -void QDesignerToolBar::actionRemoved() -{ - actionList.removeRef( (TQAction*)sender() ); -} - -TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) -{ - if ( orientation() ==Qt::Horizontal ) { - TQPoint pnt( width() - 2, 0 ); - insertAnchor = 0; - afterAnchor = TRUE; - TQObjectList clo = childrenListObject(); - if ( clo.isEmpty() ) - return pnt; - pnt = TQPoint( 13, 0 ); - TQObjectListIt it( clo ); - TQObject * obj; - while( (obj=it.current()) != 0 ) { - ++it; - if ( obj->isWidgetType() && - qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) { - TQWidget *w = (TQWidget*)obj; - if ( w->x() < pos.x() ) { - pnt.setX( w->x() + w->width() + 1 ); - insertAnchor = w; - afterAnchor = TRUE; - } - } - } - return pnt; - } else { - TQPoint pnt( 0, height() - 2 ); - insertAnchor = 0; - afterAnchor = TRUE; - TQObjectList clo = childrenListObject(); - if ( clo.isEmpty() ) - return pnt; - pnt = TQPoint( 0, 13 ); - TQObjectListIt it( clo ); - TQObject * obj; - while( (obj=it.current()) != 0 ) { - ++it; - if ( obj->isWidgetType() && - qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) { - TQWidget *w = (TQWidget*)obj; - if ( w->y() < pos.y() ) { - pnt.setY( w->y() + w->height() + 1 ); - insertAnchor = w; - afterAnchor = TRUE; - } - } - } - return pnt; - } -} - -void QDesignerToolBar::drawIndicator( const TQPoint &pos ) -{ - if ( lastIndicatorPos == pos ) - return; - bool wasVsisible = indicator->isVisible(); - if ( orientation() ==Qt::Horizontal ) { - indicator->resize( 3, height() ); - if ( pos != TQPoint( -1, -1 ) ) - indicator->move( pos.x() - 1, 0 ); - indicator->show(); - indicator->raise(); - lastIndicatorPos = pos; - } else { - indicator->resize( width(), 3 ); - if ( pos != TQPoint( -1, -1 ) ) - indicator->move( 0, pos.y() - 1 ); - indicator->show(); - indicator->raise(); - lastIndicatorPos = pos; - } - if ( !wasVsisible ) - TQApplication::sendPostedEvents(); -} - -void QDesignerToolBar::doInsertWidget( const TQPoint &p ) -{ - if ( formWindow != MainWindow::self->formWindow() ) - return; - calcIndicatorPos( p ); - TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, TRUE ); - installEventFilters( w ); - MainWindow::self->formWindow()->insertWidget( w, TRUE ); - QDesignerAction *a = new QDesignerAction( w, parent() ); - int index = actionList.findRef( *actionMap.find( insertAnchor ) ); - if ( index != -1 && afterAnchor ) - ++index; - if ( !insertAnchor ) - index = 0; - AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Widget '%1' to Toolbar '%2'" ). - arg( w->name() ).arg( caption() ), - formWindow, a, this, index ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - MainWindow::self->resetTool(); -} - -void QDesignerToolBar::clear() -{ - for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( ::tqqt_cast(a) ) - ( (QDesignerAction*)a )->remove(); - } - TQToolBar::clear(); -} - -void QDesignerToolBar::installEventFilters( TQWidget *w ) -{ - if ( !w ) - return; - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) - o->installEventFilter( this ); - delete l; -} - -//#include "actiondnd.moc" diff --git a/tdevdesigner/designer/actiondnd.h b/tdevdesigner/designer/actiondnd.h deleted file mode 100644 index 1e9f68b0..00000000 --- a/tdevdesigner/designer/actiondnd.h +++ /dev/null @@ -1,254 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef ACTIONDND_H -#define ACTIONDND_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../shared/widgetdatabase.h" - -//class TQDesignerPopupMenu; -class QDesignerIndicatorWidget; -class FormWindow; -class TQPopupMenu; - -class QDesignerIndicatorWidget : public TQWidget -{ - Q_OBJECT - - -public: - QDesignerIndicatorWidget( TQWidget *p ) - : TQWidget( p, "qt_dockwidget_internal" ) { - setBackgroundColor( red ); - } - -}; - -class ActionDrag : public TQStoredDrag -{ - Q_OBJECT - - -public: - ActionDrag(const TQString &type, TQAction *action, TQWidget *source); - ActionDrag(TQAction *action, TQWidget *source); - ActionDrag(TQActionGroup *group, TQWidget *source); - - ~ActionDrag(); - - static bool canDecode(TQDropEvent *e); - - static TQAction *action() - { - return the_action; - } - -private: - static TQAction *the_action; -}; - -class QDesignerActionGroup : public TQActionGroup -{ - Q_OBJECT - - -public: - QDesignerActionGroup( TQObject *parent ) - : TQActionGroup( ::tqqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); } - - void init(); - - TQWidget *widget() const { return wid; } - TQWidget *widget( TQAction *a ) const { return *widgets.find( a ); } - int index() const { return idx; } - -protected: -#if !defined(TQ_NO_USING_KEYWORD) - using TQActionGroup::addedTo; -#endif - void addedTo( TQWidget *w, TQWidget * ) { - wid = w; - } - void addedTo( TQWidget *w, TQWidget *, TQAction *a ) { - widgets.insert( a, w ); - } - void addedTo( int index, TQPopupMenu * ) { - idx = index; - } - -private: - TQWidget *wid; - TQMap widgets; - int idx; - -}; - -class QDesignerAction : public TQAction -{ - Q_OBJECT - - -public: - QDesignerAction( TQObject *parent ) - : TQAction( ::tqqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); } - QDesignerAction( TQWidget *w, TQObject *parent ) - : TQAction( ::tqqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); } - - void init(); - - TQWidget *widget() const { return wid; } - int index() const { return idx; } - - bool addTo( TQWidget *w ); - bool removeFrom( TQWidget *w ); - - void remove(); - bool supportsMenu() const { return !widgetToInsert; } - -protected: - void addedTo( TQWidget *w, TQWidget * ) { - wid = w; - } - void addedTo( int index, TQPopupMenu * ) { - idx = index; - } - -private: - TQWidget *wid; - int idx; - TQWidget *widgetToInsert; - -}; - -class QDesignerToolBarSeparator : public TQWidget -{ - Q_OBJECT - - -public: - QDesignerToolBarSeparator( Qt::Orientation, TQToolBar *parent, const char* name=0 ); - - TQSize sizeHint() const; - Qt::Orientation orientation() const { return orient; } -public slots: - void setOrientation( Qt::Orientation ); -protected: - void styleChange( TQStyle& ); - void paintEvent( TQPaintEvent * ); -private: - Qt::Orientation orient; -}; - - -class QSeparatorAction : public TQAction -{ - Q_OBJECT - - -public: - QSeparatorAction( TQObject *parent ); - - bool addTo( TQWidget *w ); - bool removeFrom( TQWidget *w ); - TQWidget *widget() const; - int index() const; - -private: - TQWidget *wid; - int idx; - -}; - - -class QDesignerToolBar : public TQToolBar -{ - Q_OBJECT - - -public: - QDesignerToolBar( TQMainWindow *mw ); - QDesignerToolBar( TQMainWindow *mw, Dock dock ); - TQPtrList insertedActions() const { return actionList; } - void addAction( TQAction *a ); - - void clear(); - void installEventFilters( TQWidget *w ); - void insertAction( TQWidget *w, TQAction *a ) { actionMap.insert( w, a ); } - void insertAction( int index, TQAction *a ) { actionList.insert( index, a ); } - void appendAction( TQAction *a ) { actionList.append( a ); } - void removeAction( TQAction *a ) { actionList.remove( a ); } - void reInsert(); - void removeWidget( TQWidget *w ); - -protected: - bool eventFilter( TQObject *, TQEvent * ); - void paintEvent( TQPaintEvent * ); -#ifndef TQT_NO_DRAGANDDROP - void dragEnterEvent( TQDragEnterEvent * ); - void dragMoveEvent( TQDragMoveEvent * ); - void dragLeaveEvent( TQDragLeaveEvent * ); - void dropEvent( TQDropEvent * ); -#endif - void contextMenuEvent( TQContextMenuEvent *e ); - void mousePressEvent( TQMouseEvent *e ); - void mouseReleaseEvent( TQMouseEvent *e ); - -private slots: - void actionRemoved(); - -private: - void drawIndicator( const TQPoint &pos ); - TQPoint calcIndicatorPos( const TQPoint &pos ); - void buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ); - void buttonMousePressEvent( TQMouseEvent *e, TQObject *o ); - void buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ); - void buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *o ); - void doInsertWidget( const TQPoint &p ); - void findFormWindow(); - -private: - TQPoint lastIndicatorPos; - TQWidget *insertAnchor; - bool afterAnchor; - TQPtrList actionList; - TQMap actionMap; - TQPoint dragStartPos; - QDesignerIndicatorWidget *indicator; - bool widgetInserting; - FormWindow *formWindow; - -}; - -#endif diff --git a/tdevdesigner/designer/actioneditor.ui b/tdevdesigner/designer/actioneditor.ui deleted file mode 100644 index 13a56a04..00000000 --- a/tdevdesigner/designer/actioneditor.ui +++ /dev/null @@ -1,227 +0,0 @@ - -ActionEditorBase -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - ActionEditorBase - - - - 0 - 0 - 206 - 227 - - - - Edit Actions - - - - - - unnamed - - - 4 - - - 6 - - - - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - buttonNewAction - - - - - - "designer_filenew.png" - - - true - - - Create new Action - - - - - buttonDeleteAction - - - - - - "designer_s_editcut.png" - - - true - - - Delete current Action - - - - - buttonConnect - - - - - - "designer_connecttool.png" - - - true - - - Connect current Action - - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - - - listActions - - - - - - - ActionListView -
    actionlistview.h
    - - 200 - 200 - - 0 - - 7 - 7 - 0 - 0 - - "image0" - selectionChanged( TQListViewItem * ) - currentChanged( TQListViewItem * ) - clicked( TQListViewItem * ) -
    -
    - - - 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 - - - - - listActions - currentChanged( TQListViewItem * ) - ActionEditorBase - currentActionChanged(TQListViewItem*) - - - listActions - clicked( TQListViewItem * ) - ActionEditorBase - currentActionChanged(TQListViewItem*) - - - listActions - selectionChanged( TQListViewItem * ) - ActionEditorBase - currentActionChanged(TQListViewItem*) - - - buttonNewAction - clicked() - ActionEditorBase - newAction() - - - buttonConnect - clicked() - ActionEditorBase - connectionsClicked() - - - buttonDeleteAction - clicked() - ActionEditorBase - deleteAction() - - - - class TQListViewItem; - - - init() - destroy() - connectionsClicked() - currentActionChanged( TQListViewItem * ) - deleteAction() - newAction() - - - myiconloader.h - -BarIcon2 - - -
    diff --git a/tdevdesigner/designer/actioneditorimpl.cpp b/tdevdesigner/designer/actioneditorimpl.cpp deleted file mode 100644 index 294507a9..00000000 --- a/tdevdesigner/designer/actioneditorimpl.cpp +++ /dev/null @@ -1,321 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "actioneditorimpl.h" -#include "formwindow.h" -#include "metadatabase.h" -#include "actionlistview.h" -#include "connectiondialog.h" -#include "mainwindow.h" -#include "hierarchyview.h" -#include "formfile.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -ActionEditor::ActionEditor( TQWidget* parent, const char* name, WFlags fl ) - : ActionEditorBase( parent, name, fl ), currentAction( 0 ), formWindow( 0 ), - explicitlyClosed(false) -{ - listActions->addColumn( i18n( "Actions" ) ); - setEnabled( FALSE ); - buttonConnect->setEnabled( FALSE ); - - TQPopupMenu *popup = new TQPopupMenu( this ); - popup->insertItem( i18n( "New &Action" ), this, TQT_SLOT( newAction() ) ); - popup->insertItem( i18n( "New Action &Group" ), this, TQT_SLOT( newActionGroup() ) ); - popup->insertItem( i18n( "New &Dropdown Action Group" ), this, TQT_SLOT( newDropDownActionGroup() ) ); - buttonNewAction->setPopup( popup ); - buttonNewAction->setPopupDelay( 0 ); - - connect( listActions, TQT_SIGNAL( insertAction() ), this, TQT_SLOT( newAction() ) ); - connect( listActions, TQT_SIGNAL( insertActionGroup() ), this, TQT_SLOT( newActionGroup() ) ); - connect( listActions, TQT_SIGNAL( insertDropDownActionGroup() ), this, TQT_SLOT( newDropDownActionGroup() ) ); - connect( listActions, TQT_SIGNAL( deleteAction() ), this, TQT_SLOT( deleteAction() ) ); - connect( listActions, TQT_SIGNAL( connectAction() ), this, TQT_SLOT( connectionsClicked() ) ); -} - -void ActionEditor::closeEvent( TQCloseEvent *e ) -{ - emit hidden(); - e->accept(); -} - -void ActionEditor::currentActionChanged( TQListViewItem *i ) -{ - buttonConnect->setEnabled( i != 0 ); - if ( !i ) - return; - currentAction = ( (ActionItem*)i )->action(); - if ( !currentAction ) - currentAction = ( (ActionItem*)i )->actionGroup(); - if ( formWindow && currentAction ) - formWindow->setActiveObject( currentAction ); - MainWindow::self->objectHierarchy()->hierarchyList()->setCurrent( currentAction ); -} - -void ActionEditor::setCurrentAction( TQAction *a ) -{ - TQListViewItemIterator it( listActions ); - while ( it.current() ) { - if ( ( (ActionItem*)it.current() )->action() == a || ( (ActionItem*)it.current() )->actionGroup() == a ) { - listActions->setCurrentItem( it.current() ); - listActions->ensureItemVisible( it.current() ); - break; - } - ++it; - } -} - -TQAction *ActionEditor::newActionEx() -{ - ActionItem *i = new ActionItem( listActions, (bool)FALSE ); - TQAction *a = i->action(); - TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject* ) ) ); - MetaDataBase::addEntry( i->action() ); - TQString n = "Action"; - formWindow->unify( i->action(), n, TRUE ); - i->setText( 0, n ); - i->action()->setName( n ); - i->action()->setText( i->action()->name() ); - MetaDataBase::setPropertyChanged( i->action(), "text", TRUE ); - MetaDataBase::setPropertyChanged( i->action(), "name", TRUE ); - formWindow->actionList().append( i->action() ); - if ( formWindow->formFile() ) - formWindow->formFile()->setModified( TRUE ); - return i->action(); -} - -void ActionEditor::deleteAction() -{ - if ( !currentAction ) - return; - - TQListViewItemIterator it( listActions ); - ActionItem *ai = 0; - while ( it.current() ) { - ai = (ActionItem*)it.current(); - if ( ai->action() == currentAction || ai->actionGroup() == currentAction ) { - emit removing( currentAction ); - formWindow->actionList().removeRef( currentAction ); - delete currentAction; - currentAction = 0; - delete it.current(); - break; - } - ++it; - } - if ( formWindow ) { - formWindow->setActiveObject( TQT_TQOBJECT(formWindow->mainContainer()) ); - if ( formWindow->formFile() ) - formWindow->formFile()->setModified( TRUE ); - } -} - -void ActionEditor::newAction() -{ - ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); - if ( actionParent ) { - if ( !::tqqt_cast(actionParent->actionGroup()) ) - actionParent = (ActionItem*)actionParent->parent(); - } - - ActionItem *i = 0; - if ( actionParent ) - i = new ActionItem( actionParent ); - else - i = new ActionItem( listActions, (bool)FALSE ); - TQAction *a = i->action(); - TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject* ) ) ); - MetaDataBase::addEntry( i->action() ); - TQString n = "Action"; - formWindow->unify( i->action(), n, TRUE ); - i->setText( 0, n ); - i->action()->setName( n ); - i->action()->setText( i->action()->name() ); - if ( actionParent && actionParent->actionGroup() && - actionParent->actionGroup()->usesDropDown() ) { - i->action()->setToggleAction( TRUE ); - MetaDataBase::setPropertyChanged( i->action(), "toggleAction", TRUE ); - } - MetaDataBase::setPropertyChanged( i->action(), "text", TRUE ); - MetaDataBase::setPropertyChanged( i->action(), "name", TRUE ); - listActions->setCurrentItem( i ); - if ( !actionParent ) - formWindow->actionList().append( i->action() ); - if ( formWindow->formFile() ) - formWindow->formFile()->setModified( TRUE ); -} - -void ActionEditor::newActionGroup() -{ - ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); - if ( actionParent ) { - if ( !::tqqt_cast(actionParent->actionGroup()) ) - actionParent = (ActionItem*)actionParent->parent(); - } - - ActionItem *i = 0; - if ( actionParent ) - i = new ActionItem( actionParent, TRUE ); - else - i = new ActionItem( listActions, TRUE ); - TQAction *ag = i->actionGroup(); - TQObject::connect( ag, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject* ) ) ); - MetaDataBase::addEntry( i->actionGroup() ); - MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", TRUE ); - TQString n = "ActionGroup"; - formWindow->unify( i->action(), n, TRUE ); - i->setText( 0, n ); - i->actionGroup()->setName( n ); - i->actionGroup()->setText( i->actionGroup()->name() ); - MetaDataBase::setPropertyChanged( i->actionGroup(), "text", TRUE ); - MetaDataBase::setPropertyChanged( i->actionGroup(), "name", TRUE ); - listActions->setCurrentItem( i ); - i->setOpen( TRUE ); - if ( !actionParent ) - formWindow->actionList().append( i->actionGroup() ); - if ( formWindow->formFile() ) - formWindow->formFile()->setModified( TRUE ); -} - -void ActionEditor::newDropDownActionGroup() -{ - newActionGroup(); - ( (ActionItem*)listActions->currentItem() )->actionGroup()->setUsesDropDown( TRUE ); -} - -void ActionEditor::setFormWindow( FormWindow *fw ) -{ - listActions->clear(); - formWindow = fw; - if ( !formWindow || - !::tqqt_cast(formWindow->mainContainer()) ) { - setEnabled( FALSE ); - } else { - setEnabled( TRUE ); - for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) { - ActionItem *i = 0; - if ( ::tqqt_cast(a->parent()) ) - continue; - i = new ActionItem( listActions, a ); - i->setText( 0, a->name() ); - i->setPixmap( 0, a->iconSet().pixmap() ); - // make sure we don't duplicate the connection - TQObject::disconnect( a, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject * ) ) ); - TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject* ) ) ); - if ( ::tqqt_cast(a) ) { - insertChildActions( i ); - } - } - if ( listActions->firstChild() ) { - listActions->setCurrentItem( listActions->firstChild() ); - listActions->setSelected( listActions->firstChild(), TRUE ); - } - } -} - -void ActionEditor::insertChildActions( ActionItem *i ) -{ - TQObjectList clo = i->actionGroup()->childrenListObject(); - if ( !i->actionGroup() || clo.isEmpty() ) - return; - TQObjectListIt it( clo ); - while ( it.current() ) { - TQObject *o = it.current(); - ++it; - if ( !::tqqt_cast(o) ) - continue; - TQAction *a = (TQAction*)o; - ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a ); - i->setOpen( TRUE ); - i2->setText( 0, a->name() ); - i2->setPixmap( 0, a->iconSet().pixmap() ); - // make sure we don't duplicate the connection - TQObject::disconnect( o, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject * ) ) ); - TQObject::connect( o, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject * ) ) ); - if ( ::tqqt_cast(a) ) - insertChildActions( i2 ); - } -} - -void ActionEditor::updateActionName( TQAction *a ) -{ - TQListViewItemIterator it( listActions ); - while ( it.current() ) { - if ( ( (ActionItem*)it.current() )->action() == a ) - ( (ActionItem*)it.current() )->setText( 0, a->name() ); - else if ( ( (ActionItem*)it.current() )->actionGroup() == a ) - ( (ActionItem*)it.current() )->setText( 0, a->name() ); - ++it; - } -} - -void ActionEditor::updateActionIcon( TQAction *a ) -{ - TQListViewItemIterator it( listActions ); - while ( it.current() ) { - if ( ( (ActionItem*)it.current() )->action() == a ) - ( (ActionItem*)it.current() )->setPixmap( 0, a->iconSet().pixmap() ); - else if ( ( (ActionItem*)it.current() )->actionGroup() == a ) - ( (ActionItem*)it.current() )->setPixmap( 0, a->iconSet().pixmap() ); - ++it; - } -} - -void ActionEditor::connectionsClicked() -{ - ConnectionDialog dlg( formWindow->mainWindow() ); - dlg.setDefault( TQT_TQOBJECT(currentAction), TQT_TQOBJECT(formWindow) ); - dlg.addConnection(); - dlg.exec(); -} - -void ActionEditor::removeConnections( TQObject *o ) -{ - TQValueList conns = - MetaDataBase::connections( TQT_TQOBJECT(formWindow), o ); - for ( TQValueList::Iterator it2 = conns.begin(); - it2 != conns.end(); ++it2 ) - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow), (*it2).sender, (*it2).signal, - (*it2).receiver, (*it2).slot ); -} diff --git a/tdevdesigner/designer/actioneditorimpl.h b/tdevdesigner/designer/actioneditorimpl.h deleted file mode 100644 index 9e67ed9a..00000000 --- a/tdevdesigner/designer/actioneditorimpl.h +++ /dev/null @@ -1,82 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef ACTIONEDITORIMPL_H -#define ACTIONEDITORIMPL_H - -#include - -#include "actioneditor.h" - -class TQAction; -class FormWindow; -class ActionItem; - -class ActionEditor : public ActionEditorBase -{ - Q_OBJECT - - -public: - ActionEditor( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); - void setFormWindow( FormWindow *fw ); - void updateActionName( TQAction *a ); - void updateActionIcon( TQAction *a ); - FormWindow *form() const { return formWindow; } - - bool wantToBeShown() const { return !explicitlyClosed; } - void setWantToBeShown( bool b ) { explicitlyClosed = !b; } - - void setCurrentAction( TQAction *a ); - TQAction *newActionEx(); - -protected: - void closeEvent( TQCloseEvent *e ); - -protected slots: - void currentActionChanged( TQListViewItem * ); - void deleteAction(); - void newAction(); - void newActionGroup(); - void newDropDownActionGroup(); - void connectionsClicked(); - void removeConnections( TQObject *o ); - -signals: - void hidden(); - void removing( TQAction * ); - -private: - void insertChildActions( ActionItem *i ); - -private: - TQAction *currentAction; - FormWindow *formWindow; - bool explicitlyClosed; - -}; - -#endif // ACTIONEDITORIMPL_H diff --git a/tdevdesigner/designer/actionlistview.cpp b/tdevdesigner/designer/actionlistview.cpp deleted file mode 100644 index 3e8c95c2..00000000 --- a/tdevdesigner/designer/actionlistview.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "actiondnd.h" -#include "actionlistview.h" -#include - -#include - -ActionListView::ActionListView( TQWidget *parent, const char *name ) - : TQListView( parent, name ) -{ - setShowSortIndicator( TRUE ); - setResizeMode( LastColumn ); - setRootIsDecorated( TRUE ); - connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), - this, TQT_SLOT( rmbMenu( TQListViewItem *, const TQPoint & ) ) ); -} - -ActionItem::ActionItem( TQListView *lv, TQAction *ac ) - : TQListViewItem( lv ), a( 0 ), g( 0 ) -{ - g = ::tqqt_cast(ac); - if ( !g ) - a = ::tqqt_cast(ac); - setDragEnabled( TRUE ); -} - -ActionItem::ActionItem( TQListViewItem *i, TQAction *ac ) - : TQListViewItem( i ), a( 0 ), g( 0 ) -{ - g = ::tqqt_cast(ac); - if ( !g ) - a = ::tqqt_cast(ac); - setDragEnabled( TRUE ); - moveToEnd(); -} - -void ActionItem::moveToEnd() -{ - TQListViewItem *i = this; - while ( i->nextSibling() ) - i = i->nextSibling(); - if ( i != this ) - moveItem( i ); -} - -TQDragObject *ActionListView::dragObject() -{ - ActionItem *i = (ActionItem*)currentItem(); - if ( !i ) - return 0; - TQStoredDrag *drag = 0; - if ( i->action() ) { - drag = new ActionDrag( i->action(), viewport() ); - drag->setPixmap( i->action()->iconSet().pixmap() ); - } else { - drag = new ActionDrag( i->actionGroup(), viewport() ); - drag->setPixmap( i->actionGroup()->iconSet().pixmap() ); - } - return drag; -} - -void ActionListView::rmbMenu( TQListViewItem *i, const TQPoint &p ) -{ - TQPopupMenu *popup = new TQPopupMenu( this ); - popup->insertItem( i18n( "New &Action" ), 0 ); - popup->insertItem( i18n( "New Action &Group" ), 1 ); - popup->insertItem( i18n( "New &Dropdown Action Group" ), 2 ); - if ( i ) { - popup->insertSeparator(); - popup->insertItem( i18n( "&Connect Action..." ), 3 ); - popup->insertSeparator(); - popup->insertItem( i18n( "Delete Action" ), 4 ); - } - int res = popup->exec( p ); - if ( res == 0 ) - emit insertAction(); - else if ( res == 1 ) - emit insertActionGroup(); - else if ( res == 2 ) - emit insertDropDownActionGroup(); - else if ( res == 3 ) - emit connectAction(); - else if ( res == 4 ) - emit deleteAction(); -} diff --git a/tdevdesigner/designer/actionlistview.h b/tdevdesigner/designer/actionlistview.h deleted file mode 100644 index 047b21bd..00000000 --- a/tdevdesigner/designer/actionlistview.h +++ /dev/null @@ -1,82 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef ACTIONLISTVIEW_H -#define ACTIONLISTVIEW_H - -#include -#include "actiondnd.h" - -class ActionItem : public TQListViewItem -{ -public: - ActionItem( TQListView *lv, bool group ) - : TQListViewItem( lv ), - a( group ? 0 : new QDesignerAction( 0 ) ), - g( group ? new QDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); } - ActionItem( TQListView *lv, TQAction *ac ); - ActionItem( TQListViewItem *i, TQAction *ac ); - ActionItem( ActionItem *parent, bool group = FALSE ) - : TQListViewItem( parent ), - a( group ? 0 : new QDesignerAction( parent->actionGroup() ) ), - g( group ? new QDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); } - - QDesignerAction *action() const { return a; } - QDesignerActionGroup *actionGroup() const { return g; } - -private: - void moveToEnd(); - -private: - QDesignerAction *a; - QDesignerActionGroup *g; - -}; - -class ActionListView : public TQListView -{ - Q_OBJECT - - -public: - ActionListView( TQWidget *parent = 0, const char *name = 0 ); - -protected: - TQDragObject *dragObject(); - -private slots: - void rmbMenu( TQListViewItem *i, const TQPoint &p ); - -signals: - void insertAction(); - void insertActionGroup(); - void insertDropDownActionGroup(); - void deleteAction(); - void connectAction(); - -}; - -#endif diff --git a/tdevdesigner/designer/asciivalidator.cpp b/tdevdesigner/designer/asciivalidator.cpp deleted file mode 100644 index 667b0a61..00000000 --- a/tdevdesigner/designer/asciivalidator.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "asciivalidator.h" - -#include - -AsciiValidator::AsciiValidator( TQObject * parent, const char *name ) - : TQValidator( parent, name ), functionName( FALSE ) -{ -} - -AsciiValidator::AsciiValidator( bool funcName, TQObject * parent, const char *name ) - : TQValidator( parent, name ), functionName( funcName ) -{ -} - -AsciiValidator::AsciiValidator( const TQString &allow, TQObject * parent, const char *name ) - : TQValidator( parent, name ), functionName( FALSE ), allowedChars( allow ) -{ -} - -AsciiValidator::~AsciiValidator() -{ -} - -TQValidator::State AsciiValidator::validate( TQString &s, int & ) const -{ - bool inParen = FALSE; - bool outParen = FALSE; - if ( !s.isEmpty() && s[0].row() == 0 && s[0].cell() >= '0' && s[0].cell() <= '9' ) - s[0] = '_'; - for ( int i = 0, j = 0; i < (int) s.length(); i++ ) { - uchar r = s[i].row(); - uchar c = s[i].cell(); - - if ( outParen ) { // check if we have 'const' or 'volatile' - static const TQString con = " const"; - static const TQString vol = " volatile"; - TQString mid = s.mid( j ); - if ( !( con.startsWith( mid ) || vol.startsWith( mid ) ) ) - return TQValidator::Invalid; - } - - if ( inParen && c != ')' ) - continue; - - if ( r == 0 && ( ( c >= '0' && c <= '9' ) || - ( c >= 'a' && c <= 'z' ) || - ( c >= 'A' && c <= 'Z' ) ) ) - continue; - - if ( functionName ) { - if ( c == '(' ) { - inParen = TRUE; - continue; - } - if ( c == ')' ) { - outParen = TRUE; - j = i + 1; - continue; - } - } - - if ( allowedChars.find( s[ i ] ) != -1 ) - continue; - - s[i] = '_'; - } - return TQValidator::Acceptable; -} diff --git a/tdevdesigner/designer/asciivalidator.h b/tdevdesigner/designer/asciivalidator.h deleted file mode 100644 index a284f6ab..00000000 --- a/tdevdesigner/designer/asciivalidator.h +++ /dev/null @@ -1,53 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef ASCIIVALIDATOR_H -#define ASCIIVALIDATOR_H - - -#include - - -class AsciiValidator: public TQValidator -{ - Q_OBJECT - -public: - AsciiValidator( TQObject * parent, const char *name = 0 ); - AsciiValidator( bool funcName, TQObject * parent, const char *name = 0 ); - AsciiValidator( const TQString &allow, TQObject * parent, const char *name = 0 ); - ~AsciiValidator(); - - TQValidator::State validate( TQString &, int & ) const; - -private: - bool functionName; - TQString allowedChars; - -}; - - -#endif diff --git a/tdevdesigner/designer/command.cpp b/tdevdesigner/designer/command.cpp deleted file mode 100644 index cce10a34..00000000 --- a/tdevdesigner/designer/command.cpp +++ /dev/null @@ -1,2475 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ -#include "command.h" -#include "formwindow.h" -#include "widgetfactory.h" -#include "propertyeditor.h" -#include "metadatabase.h" -#include -#include "mainwindow.h" -#include "hierarchyview.h" -#include "workspace.h" -#include "actioneditorimpl.h" -#include "actiondnd.h" -#include "formfile.h" -#include "../interfaces/languageinterface.h" -#include "menubareditor.h" -#include "popupmenueditor.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef TQT_NO_TABLE -#include -#endif -#include - -#include "tdevdesigner_part.h" - -#include - -CommandHistory::CommandHistory( int s ) - : current( -1 ), steps( s ), savedAt( -1 ) -{ - history.setAutoDelete( TRUE ); - modified = FALSE; - compressedCommand = 0; -} - -void CommandHistory::addCommand( Command *cmd, bool tryCompress ) -{ - if ( tryCompress ) { - if ( !compressedCommand || - compressedCommand->type() != cmd->type() || - !compressedCommand->canMerge( cmd ) ) { - checkCompressedCommand(); - compressedCommand = 0; - } - - if ( compressedCommand ) { - compressedCommand->merge( cmd ); - modified = TRUE; - modificationChanged( modified ); - return; - } - compressedCommand = cmd; - } else { - checkCompressedCommand(); - } - - if ( current < (int)history.count() - 1 ) { - if ( current < savedAt ) - savedAt = -2; - - TQPtrList commands; - commands.setAutoDelete( FALSE ); - - for( int i = 0; i <= current; ++i ) { - commands.insert( i, history.at( 0 ) ); - history.take( 0 ); - } - - commands.append( cmd ); - history.clear(); - history = commands; - history.setAutoDelete( TRUE ); - } else { - history.append( cmd ); - } - - if ( (int)history.count() > steps ) { - savedAt--; - history.removeFirst(); - } else { - ++current; - } - - emitUndoRedo(); - modified = TRUE; - modificationChanged( modified ); -} - -void CommandHistory::undo() -{ - checkCompressedCommand(); - compressedCommand = 0; - if ( current > -1 ) { - history.at( current )->unexecute(); - --current; - } - emitUndoRedo(); - modified = savedAt != current; - modificationChanged( modified ); -} - -void CommandHistory::redo() -{ - checkCompressedCommand(); - compressedCommand = 0; - if ( current > -1 ) { - if ( current < (int)history.count() - 1 ) { - ++current; - history.at( current )->execute(); - } - } else { - if ( history.count() > 0 ) { - ++current; - history.at( current )->execute(); - } - } - emitUndoRedo(); - modified = savedAt != current; - modificationChanged( modified ); -} - -void CommandHistory::emitUndoRedo() -{ - Command *undoCmd = 0; - Command *redoCmd = 0; - - if ( current >= 0 && current < (int)history.count() ) - undoCmd = history.at( current ); - if ( current + 1 >= 0 && current + 1 < (int)history.count() ) - redoCmd = history.at( current + 1 ); - - bool ua = (undoCmd != 0); - TQString uc; - if ( ua ) - uc = undoCmd->name(); - bool ra = (redoCmd != 0); - TQString rc; - if ( ra ) - rc = redoCmd->name(); - emit undoRedoChanged( ua, ra, uc, rc ); -} - -void CommandHistory::setModified( bool m ) -{ - modified = m; - if ( !modified ) - savedAt = current; - modificationChanged( modified ); -} - -bool CommandHistory::isModified() const -{ - return modified; -} - -void CommandHistory::checkCompressedCommand() -{ - if ( compressedCommand && compressedCommand->type() == Command::SetProperty ) { - Command *c = compressedCommand; - compressedCommand = 0; - if ( !( (SetPropertyCommand*)c )->checkProperty() ) { - history.remove( current ); - --current; - emitUndoRedo(); - } - } -} - -// ------------------------------------------------------------ - -Command::Command( const TQString &n, FormWindow *fw ) - : cmdName( n ), formWin( fw ) -{ -} - -Command::~Command() -{ -} - -TQString Command::name() const -{ - return cmdName; -} - -FormWindow *Command::formWindow() const -{ - return formWin; -} - -void Command::merge( Command * ) -{ -} - -bool Command::canMerge( Command * ) -{ - return FALSE; -} - -// ------------------------------------------------------------ - -ResizeCommand::ResizeCommand( const TQString &n, FormWindow *fw, - TQWidget *w, const TQRect &oldr, const TQRect &nr ) - : Command( n, fw ), widget( w ), oldRect( oldr ), newRect( nr ) -{ -} - -void ResizeCommand::execute() -{ - widget->setGeometry( newRect ); - formWindow()->updateSelection( widget ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); - if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) - formWindow()->updateChildSelections( widget ); -} - -void ResizeCommand::unexecute() -{ - widget->setGeometry( oldRect ); - formWindow()->updateSelection( widget ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); - if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) - formWindow()->updateChildSelections( widget ); -} - -// ------------------------------------------------------------ - -InsertCommand::InsertCommand( const TQString &n, FormWindow *fw, - TQWidget *w, const TQRect &g ) - : Command( n, fw ), widget( w ), geometry( g ) -{ -} - -void InsertCommand::execute() -{ - if ( geometry.size() == TQSize( 0, 0 ) ) { - widget->move( geometry.topLeft() ); - widget->adjustSize(); - } else { - TQSize s = geometry.size().expandedTo( widget->minimumSize() ); - s = s.expandedTo( widget->minimumSizeHint() ); - TQRect r( geometry.topLeft(), s ); - widget->setGeometry( r ); - } - widget->show(); - formWindow()->widgets()->insert( widget, widget ); - formWindow()->clearSelection( FALSE ); - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); - formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget ); -} - -void InsertCommand::unexecute() -{ - widget->hide(); - formWindow()->selectWidget( TQT_TQOBJECT(widget), FALSE ); - formWindow()->widgets()->remove( TQT_TQOBJECT(widget) ); - formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget ); - } - -// ------------------------------------------------------------ - -MoveCommand::MoveCommand( const TQString &n, FormWindow *fw, - const TQWidgetList &w, - const TQValueList op, - const TQValueList np, - TQWidget *opr, TQWidget *npr ) - : Command( n, fw ), widgets( w ), oldPos( op ), newPos( np ), - oldParent( opr ), newParent( npr ) -{ - widgets.setAutoDelete( FALSE ); -} - -void MoveCommand::merge( Command *c ) -{ - MoveCommand *cmd = (MoveCommand*)c; - newPos = cmd->newPos; -} - -bool MoveCommand::canMerge( Command *c ) -{ - MoveCommand *cmd = (MoveCommand*)c; - return widgets == cmd->widgets; -} - - -void MoveCommand::execute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { - if ( newParent && oldParent && newParent != oldParent ) { - TQPoint pos = newParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); - w->reparent( newParent, pos, TRUE ); - formWindow()->raiseSelection( w ); - formWindow()->raiseChildSelections( w ); - formWindow()->widgetChanged( TQT_TQOBJECT(w) ); - formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); - formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); - } - w->move( newPos[ widgets.at() ] ); - } - formWindow()->updateSelection( w ); - formWindow()->updateChildSelections( w ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); - } -} - -void MoveCommand::unexecute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { - if ( newParent && oldParent && newParent != oldParent ) { - TQPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); - w->reparent( oldParent, pos, TRUE ); - formWindow()->raiseSelection( w ); - formWindow()->raiseChildSelections( w ); - formWindow()->widgetChanged( TQT_TQOBJECT(w) ); - formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); - formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); - } - w->move( oldPos[ widgets.at() ] ); - } - formWindow()->updateSelection( w ); - formWindow()->updateChildSelections( w ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); - } -} - -// ------------------------------------------------------------ - -DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw, - const TQWidgetList &wl ) - : Command( n, fw ), widgets( wl ) -{ - widgets.setAutoDelete( FALSE ); - TQWidgetList copyOfWidgets = widgets; - copyOfWidgets.setAutoDelete(FALSE); - - // Include the children of the selected items when deleting - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - TQObjectList *children = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - for ( TQWidget *c = (TQWidget *)children->first(); c; c = (TQWidget *)children->next() ) { - if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) { - widgets.insert(widgets.at() + 1, c); - widgets.prev(); - copyOfWidgets.append(c); - } - } - delete children; - } -} - -void DeleteCommand::execute() -{ - formWindow()->setPropertyShowingBlocked( TRUE ); - connections.clear(); - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->hide(); - TQString s = w->name(); - s.prepend( "qt_dead_widget_" ); - w->setName( s ); - formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); - formWindow()->widgets()->remove( w ); - TQValueList conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) ); - connections.insert( w, conns ); - TQValueList::Iterator it = conns.begin(); - for ( ; it != conns.end(); ++it ) { - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), (*it).sender, - (*it).signal, (*it).receiver, (*it).slot ); - } - } - formWindow()->setPropertyShowingBlocked( FALSE ); - formWindow()->emitShowProperties(); - formWindow()->mainWindow()->objectHierarchy()->widgetsRemoved( widgets ); - -} - -void DeleteCommand::unexecute() -{ - formWindow()->setPropertyShowingBlocked( TRUE ); - formWindow()->clearSelection( FALSE ); - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->show(); - TQString s = w->name(); - s.remove( 0, TQString( "qt_dead_widget_" ).length() ); - w->setName( s ); - formWindow()->widgets()->insert( w, w ); - formWindow()->selectWidget( TQT_TQOBJECT(w) ); - TQValueList conns = *connections.find( w ); - TQValueList::Iterator it = conns.begin(); - for ( ; it != conns.end(); ++it ) { - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender, - (*it).signal, (*it).receiver, (*it).slot ); - } - } - formWindow()->setPropertyShowingBlocked( FALSE ); - formWindow()->emitShowProperties(); - formWindow()->mainWindow()->objectHierarchy()->widgetsInserted( widgets ); -} - -// ------------------------------------------------------------ - -SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw, - TQObject *w, PropertyEditor *e, - const TQString &pn, const TQVariant &ov, - const TQVariant &nv, const TQString &ncut, - const TQString &ocut, bool reset ) - : Command( n, fw ), widget( w ), editor( e ), propName( pn ), - oldValue( ov ), newValue( nv ), oldCurrentItemText( ocut ), newCurrentItemText( ncut ), - wasChanged( TRUE ), isResetCommand( reset ) -{ - wasChanged = MetaDataBase::isPropertyChanged( w, propName ); - if ( oldCurrentItemText.isNull() ) - oldCurrentItemText = ""; - if ( newCurrentItemText.isNull() ) - newCurrentItemText = ""; -} - - -void SetPropertyCommand::execute() -{ - if ( !wasChanged ) - MetaDataBase::setPropertyChanged( widget, propName, TRUE ); - if ( isResetCommand ) { - MetaDataBase::setPropertyChanged( widget, propName, FALSE ); - if ( WidgetFactory::resetProperty( widget, propName ) ) { - if ( !formWindow()->isWidgetSelected( widget ) && TQT_TQOBJECT(formWindow()) != TQT_TQOBJECT(widget) ) - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); - if ( editor->widget() != widget ) - editor->setWidget( widget, formWindow() ); - editor->propertyList()->setCurrentProperty( propName ); - PropertyItem *i = (PropertyItem*)editor->propertyList()->currentItem(); - if ( !i ) - return; - i->setValue( widget->property( propName ) ); - i->setChanged( FALSE ); - editor->refetchData(); - editor->emitWidgetChanged(); - return; - } - } - setProperty( newValue, newCurrentItemText ); -} - -void SetPropertyCommand::unexecute() -{ - if ( !wasChanged ) - MetaDataBase::setPropertyChanged( widget, propName, FALSE ); - if ( isResetCommand ) - MetaDataBase::setPropertyChanged( widget, propName, TRUE ); - setProperty( oldValue, oldCurrentItemText ); -} - -bool SetPropertyCommand::canMerge( Command *c ) -{ - SetPropertyCommand *cmd = (SetPropertyCommand*)c; - if ( !widget ) - return FALSE; - const TQMetaProperty *p = - widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE ); - if ( !p ) { - if ( propName == "toolTip" || propName == "whatsThis" ) - return TRUE; - if ( ::tqqt_cast((TQObject *)widget) ) { - MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget(); - if ( !cw ) - return FALSE; - for ( TQValueList::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { - if ( TQString( (*it ).property ) == propName ) { - if ( (*it).type == "String" || (*it).type == "CString" || (*it).type == "Int" || (*it).type == "UInt" ) - return TRUE; - } - } - } - return FALSE; - } - TQVariant::Type t = TQVariant::nameToType( p->type() ); - return ( cmd->propName == propName && - t == TQVariant::String || t == TQVariant::CString || t == TQVariant::Int || t == TQVariant::UInt ); -} - -void SetPropertyCommand::merge( Command *c ) -{ - SetPropertyCommand *cmd = (SetPropertyCommand*)c; - newValue = cmd->newValue; - newCurrentItemText = cmd->newCurrentItemText; -} - -bool SetPropertyCommand::checkProperty() -{ - if ( propName == "name" /*|| propName == "itemName"*/ ) { // ### fix that - TQString s = newValue.toString(); - if ( !formWindow()->unify( widget, s, FALSE ) ) { - TQMessageBox::information( formWindow()->mainWindow(), - i18n( "Set 'name' Property" ), - i18n( "The name of a widget must be unique.\n" - "'%1' is already used in form '%2',\n" - "so the name has been reverted to '%3'." ). - arg( newValue.toString() ). - arg( formWindow()->name() ). - arg( oldValue.toString() )); - setProperty( oldValue, oldCurrentItemText, FALSE ); - return FALSE; - } - if ( s.isEmpty() ) { - TQMessageBox::information( formWindow()->mainWindow(), - i18n( "Set 'name' Property" ), - i18n( "The name of a widget must not be null.\n" - "The name has been reverted to '%1'." ). - arg( oldValue.toString() )); - setProperty( oldValue, oldCurrentItemText, FALSE ); - return FALSE; - } - - if ( ::tqqt_cast(widget->parent()) ) - formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() ); - } - return TRUE; -} - -void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤tItemText, bool select ) -{ - if ( !widget ) - return; - - if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select ) - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); - if ( editor->widget() != widget && select ) - editor->setWidget( widget, formWindow() ); - if ( select ) - editor->propertyList()->setCurrentProperty( propName ); - const TQMetaProperty *p = - widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE ); - if ( !p ) { - if ( propName == "hAlign" ) { - p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE ); - int align = widget->property( "alignment" ).toInt(); - align &= ~( AlignHorizontal_Mask ); - align |= p->keyToValue( currentItemText ); - widget->setProperty( "alignment", TQVariant( align ) ); - } else if ( propName == "vAlign" ) { - p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE ); - int align = widget->property( "alignment" ).toInt(); - align &= ~( AlignVertical_Mask ); - align |= p->keyToValue( currentItemText ); - widget->setProperty( "alignment", TQVariant( align ) ); - } else if ( propName == "wordwrap" ) { - int align = widget->property( "alignment" ).toInt(); - align &= ~WordBreak; - if ( v.toBool() ) - align |= WordBreak; - widget->setProperty( "alignment", TQVariant( align ) ); - } else if ( propName == "layoutSpacing" ) { - TQVariant val = v; - if ( val.toString() == "default" ) - val = -1; - MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); - } else if ( propName == "layoutMargin" ) { - TQVariant val = v; - if ( val.toString() == "default" ) - val = -1; - MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); - } else if ( propName == "resizeMode" ) { - MetaDataBase::setResizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), currentItemText ); - } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) { - MetaDataBase::setFakeProperty( editor->widget(), propName, v ); - } else if ( ::tqqt_cast(editor->widget()) ) { - MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget(); - if ( cw ) { - MetaDataBase::setFakeProperty( editor->widget(), propName, v ); - } - } - editor->refetchData(); - editor->emitWidgetChanged(); - ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) ); -#ifndef TQT_NO_SQL - if ( propName == "database" ) { - formWindow()->mainWindow()->objectHierarchy()->databasePropertyChanged( (TQWidget*)((TQObject *)widget), MetaDataBase::fakeProperty( widget, "database" ).toStringList() ); - } -#endif - return; - } - - if ( p->isSetType() ) { - TQStrList strlst; - TQStringList lst = TQStringList::split( "|", currentItemText ); - TQValueListConstIterator it = lst.begin(); - for ( ; it != lst.end(); ++it ) - strlst.append( (*it).latin1() ); - widget->setProperty( propName, p->keysToValue( strlst ) ); - } else if ( p->isEnumType() ) { - widget->setProperty( propName, p->keyToValue( currentItemText ) ); - } else if ( qstrcmp( p->name(), "buddy" ) == 0 ) { - widget->setProperty( propName, currentItemText ); - } else { - TQVariant ov; - if ( propName == "name" || propName == "itemName" ) - ov = widget->property( propName ); - int oldSerNum = -1; - if ( v.type() == TQVariant::Pixmap ) - oldSerNum = v.toPixmap().serialNumber(); - widget->setProperty( propName, v ); - if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() ) - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formWindow()), - widget->property( propName ).toPixmap().serialNumber(), - MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) ); - if ( propName == "cursor" ) { - MetaDataBase::setCursor( (TQWidget*)((TQObject *)widget), v.toCursor() ); - } - if ( propName == "name" && widget->isWidgetType() ) { - formWindow()->mainWindow()->objectHierarchy()->namePropertyChanged( ((TQWidget*)(TQObject *)widget), ov ); - if ( formWindow()->isMainContainer( widget ) ) - formWindow()->setName( v.toCString() ); - } - if ( propName == "name" && ::tqqt_cast((TQObject *)widget) && ::tqqt_cast(formWindow()->mainContainer()) ) { - formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget ); - } - if ( propName == "iconSet" && ::tqqt_cast((TQObject *)widget) && ::tqqt_cast(formWindow()->mainContainer()) ) { - formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget ); - } - if ( propName == "caption" ) { - if ( formWindow()->isMainContainer( widget ) ) - formWindow()->setCaption( v.toString() ); - } - if ( propName == "icon" ) { - if ( formWindow()->isMainContainer( widget ) ) - formWindow()->setIcon( v.toPixmap() ); - } - } - editor->refetchData(); - if ( editor->propertyList()->currentItem() && select ) { - ( ( PropertyItem* )editor->propertyList()->currentItem() )->showEditor(); - ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) ); - } - editor->emitWidgetChanged(); - formWindow()->killAccels( TQT_TQOBJECT(widget) ); -} - -// ------------------------------------------------------------ - -LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase ) -{ -} - -void LayoutHorizontalCommand::execute() -{ - formWindow()->clearSelection( FALSE ); - layout.doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void LayoutHorizontalCommand::unexecute() -{ - formWindow()->clearSelection( FALSE ); - layout.undoLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE ) -{ -} - -void LayoutHorizontalSplitCommand::execute() -{ - formWindow()->clearSelection( FALSE ); - layout.doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void LayoutHorizontalSplitCommand::unexecute() -{ - formWindow()->clearSelection( FALSE ); - layout.undoLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase ) -{ -} - -void LayoutVerticalCommand::execute() -{ - formWindow()->clearSelection( FALSE ); - layout.doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void LayoutVerticalCommand::unexecute() -{ - formWindow()->clearSelection( FALSE ); - layout.undoLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE ) -{ -} - -void LayoutVerticalSplitCommand::execute() -{ - formWindow()->clearSelection( FALSE ); - layout.doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void LayoutVerticalSplitCommand::unexecute() -{ - formWindow()->clearSelection( FALSE ); - layout.undoLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl, int xres, int yres ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) ) -{ -} - -void LayoutGridCommand::execute() -{ - formWindow()->clearSelection( FALSE ); - layout.doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void LayoutGridCommand::unexecute() -{ - formWindow()->clearSelection( FALSE ); - layout.undoLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, - TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), lb( layoutBase ), widgets( wl ) -{ - WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase ); - spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) ); - margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) ); - layout = 0; - if ( lay == WidgetFactory::HBox ) - layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast(layoutBase) != 0 ); - else if ( lay == WidgetFactory::VBox ) - layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast(layoutBase) != 0 ); - else if ( lay == WidgetFactory::Grid ) - layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE ); -} - -void BreakLayoutCommand::execute() -{ - if ( !layout ) - return; - formWindow()->clearSelection( FALSE ); - layout->breakLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) - w->resize( TQMAX( 16, w->width() ), TQMAX( 16, w->height() ) ); -} - -void BreakLayoutCommand::unexecute() -{ - if ( !layout ) - return; - formWindow()->clearSelection( FALSE ); - layout->doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); - MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing ); - MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin ); -} - -// ------------------------------------------------------------ - -MacroCommand::MacroCommand( const TQString &n, FormWindow *fw, - const TQPtrList &cmds ) - : Command( n, fw ), commands( cmds ) -{ -} - -void MacroCommand::execute() -{ - for ( Command *c = commands.first(); c; c = commands.next() ) - c->execute(); -} - -void MacroCommand::unexecute() -{ - for ( Command *c = commands.last(); c; c = commands.prev() ) - c->unexecute(); -} - -// ------------------------------------------------------------ - -AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, - TQTabWidget *tw, const TQString &label ) - : Command( n, fw ), tabWidget( tw ), tabLabel( label ) -{ - tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" ); - tabPage->hide(); - index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) ); -} - -void AddTabPageCommand::execute() -{ - if ( index == -1 ) - index = ( (QDesignerTabWidget*)tabWidget )->count(); - tabWidget->insertTab( tabPage, tabLabel, index ); - tabWidget->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -void AddTabPageCommand::unexecute() -{ - tabWidget->removePage( tabPage ); - tabPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -// ------------------------------------------------------------ - -MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw, - TQTabWidget *tw, TQWidget* page, const TQString& label, int nIndex, int oIndex ) - : Command( n, fw ), tabWidget( tw ), tabPage( page ), tabLabel( label ) -{ - newIndex = nIndex; - oldIndex = oIndex; -} - -void MoveTabPageCommand::execute() -{ - ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); - ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); - ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -void MoveTabPageCommand::unexecute() -{ - ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); - ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); - ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -// ------------------------------------------------------------ - -DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw, - TQTabWidget *tw, TQWidget *page ) - : Command( n, fw ), tabWidget( tw ), tabPage( page ) -{ - tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle(); - index = ( (QDesignerTabWidget*)tabWidget )->currentPage(); -} - -void DeleteTabPageCommand::execute() -{ - tabWidget->removePage( tabPage ); - tabPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -void DeleteTabPageCommand::unexecute() -{ - tabWidget->insertTab( tabPage, tabLabel, index ); - tabWidget->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -// ------------------------------------------------------------ - -AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWindow *fw, - QDesignerWidgetStack *ws ) - : Command( n, fw ), widgetStack( ws ) -{ - stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" ); - stackPage->hide(); - index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) ); -} - -void AddWidgetStackPageCommand::execute() -{ - index = widgetStack->insertPage( stackPage, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); -} - -void AddWidgetStackPageCommand::unexecute() -{ - index = widgetStack->removePage( stackPage ); - stackPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); -} - -DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw, - QDesignerWidgetStack *ws, TQWidget *page ) - : Command( n, fw), widgetStack( ws ), stackPage( page ) -{ - index = -1; -} - -void DeleteWidgetStackPageCommand::execute() -{ - index = widgetStack->removePage( stackPage ); - stackPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( stackPage ); -} - -void DeleteWidgetStackPageCommand::unexecute() -{ - index = widgetStack->insertPage( stackPage, index ); - widgetStack->raiseWidget( stackPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->widgetInserted( stackPage ); -} - -// ------------------------------------------------------------ - -AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, const TQString &label, int i, bool s ) - : Command( n, fw ), wizard( w ), pageLabel( label ) -{ - page = new QDesignerWidget( formWindow(), wizard, "WizardPage" ); - page->hide(); - index = i; - show = s; - MetaDataBase::addEntry( TQT_TQOBJECT(page) ); -} - -void AddWizardPageCommand::execute() -{ - if ( index == -1 ) - index = wizard->pageCount(); - wizard->insertPage( page, pageLabel, index ); - if ( show ) - ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -void AddWizardPageCommand::unexecute() -{ - wizard->removePage( page ); - page->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -// ------------------------------------------------------------ - -DeleteWizardPageCommand::DeleteWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, int i, bool s ) - : Command( n, fw ), wizard( w ), index( i ) -{ - show = s; -} - -void DeleteWizardPageCommand::execute() -{ - page = wizard->page( index ); - pageLabel = wizard->title( page ); - wizard->removePage( page ); - page->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -void DeleteWizardPageCommand::unexecute() -{ - wizard->insertPage( page, pageLabel, index ); - if ( show ) - ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -// ------------------------------------------------------------ - -RenameWizardPageCommand::RenameWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, int i, const TQString& name ) - : Command( n, fw ), wizard( w ), index( i ), label( name ) -{ - -} - -void RenameWizardPageCommand::execute() -{ - page = wizard->page( index ); - TQString oldLabel = wizard->title( page ); - - wizard->setTitle( page, label ); - label = oldLabel; - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); -} - -void RenameWizardPageCommand::unexecute() -{ - execute(); -} - -// ------------------------------------------------------------ - -SwapWizardPagesCommand::SwapWizardPagesCommand( const TQString &n, FormWindow *fw, TQWizard *w, int i1, int i2 ) - : Command( n, fw ), wizard( w ), index1( i1 ), index2( i2 ) -{ -} - -void SwapWizardPagesCommand::execute() -{ - TQWidget *page1 = wizard->page( index1 ); - TQWidget *page2 = wizard->page( index2 ); - TQString page1Label = wizard->title( page1 ); - TQString page2Label = wizard->title( page2 ); - wizard->removePage( page1 ); - wizard->removePage( page2 ); - wizard->insertPage( page1, page1Label, index2 ); - wizard->insertPage( page2, page2Label, index1 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -void SwapWizardPagesCommand::unexecute() -{ - execute(); -} - -// ------------------------------------------------------------ - -MoveWizardPageCommand::MoveWizardPageCommand( const TQString &n, FormWindow *fw, TQWizard *w, int i1, int i2 ) - : Command( n, fw ), wizard( w ), index1( i1 ), index2( i2 ) -{ -} - -void MoveWizardPageCommand::execute() -{ - TQWidget *page = wizard->page( index1 ); - TQString pageLabel = wizard->title( page ); - wizard->removePage( page ); - wizard->insertPage( page, pageLabel, index2 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -void MoveWizardPageCommand::unexecute() -{ - // ###FIX: index1 may be the wrong place - TQWidget *page = wizard->page( index2 ); - TQString pageLabel = wizard->title( page ); - wizard->removePage( page ); - wizard->insertPage( page, pageLabel, index1 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -// ------------------------------------------------------------ - -AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw, - MetaDataBase::Connection c ) - : Command( name, fw ), connection( c ) -{ -} - -void AddConnectionCommand::execute() -{ - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, - connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) - formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); -} - -void AddConnectionCommand::unexecute() -{ - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, - connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) - formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); -} - -// ------------------------------------------------------------ - -RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWindow *fw, - MetaDataBase::Connection c ) - : Command( name, fw ), connection( c ) -{ -} - -void RemoveConnectionCommand::execute() -{ - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, - connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) - formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); -} - -void RemoveConnectionCommand::unexecute() -{ - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, - connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) - formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); -} - -// ------------------------------------------------------------ - -AddFunctionCommand::AddFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, - const TQString& spec, const TQString &a, const TQString &t, - const TQString &l, const TQString &rt ) - : Command( name, fw ), function( f ), specifier( spec ), access( a ), functionType( t ), language( l ), - returnType( rt ) -{ -} - -void AddFunctionCommand::execute() -{ - MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (add - execute) - KInterfaceDesigner::Function f; - f.returnType = returnType; - f.function = function; - f.specifier = specifier; - f.access = access; - f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->clearSelection(false); - formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void AddFunctionCommand::unexecute() -{ - MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (add - unexecute) - KInterfaceDesigner::Function f; - f.returnType = returnType; - f.function = function; - f.specifier = specifier; - f.access = access; - f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const TQString &name, FormWindow *fw, MetaDataBase::Function f, - const TQString &on, const TQString &os, - const TQString &oa, const TQString &ot, const TQString &ol, - const TQString &ort ) - : Command( name, fw ), oldName( on ), oldSpec( os ), oldAccess( oa ), - oldType( ot ), oldLang( ol ), oldReturnType( ort ) -{ - newName = f.function; - newSpec = f.specifier; - newAccess = f.access; - newType = f.type; - newLang = f.language; - newReturnType = f.returnType; -} - -void ChangeFunctionAttribCommand::execute() -{ - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), oldName, newName, newSpec, newAccess, - newType, newLang, newReturnType ); - formWindow()->formFile()->functionNameChanged( oldName, newName ); - formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (edit - execute) - KInterfaceDesigner::Function f; - f.returnType = newReturnType; - f.function = newName; - f.specifier = newSpec; - f.access = newAccess; - f.type = (newType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - KInterfaceDesigner::Function of; - f.returnType = oldReturnType; - f.function = oldName; - f.specifier = oldSpec; - f.access = oldAccess; - f.type = (oldType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), of, f); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void ChangeFunctionAttribCommand::unexecute() -{ - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), newName, oldName, oldSpec, oldAccess, - oldType, oldLang, oldReturnType ); - formWindow()->formFile()->functionNameChanged( newName, oldName ); - formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (edit - execute) - KInterfaceDesigner::Function f; - f.returnType = newReturnType; - f.function = newName; - f.specifier = newSpec; - f.access = newAccess; - f.type = (newType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - KInterfaceDesigner::Function of; - f.returnType = oldReturnType; - f.function = oldName; - f.specifier = oldSpec; - f.access = oldAccess; - f.type = (oldType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), f, of); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, - const TQString& spec, const TQString &a, const TQString &t, - const TQString &l, const TQString &rt ) - : Command( name, fw ), function( f ), specifier( spec ), access( a ), functionType( t ), language( l ), - returnType( rt ) -{ - if ( spec.isNull() ) { - TQValueList lst = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); - for ( TQValueList::Iterator it = lst.begin(); it != lst.end(); ++it ) { - if ( MetaDataBase::normalizeFunction( (*it).function ) == - MetaDataBase::normalizeFunction( function ) ) { - specifier = (*it).specifier; - access = (*it).access; - functionType = (*it).type; - returnType = (*it).returnType; - language = (*it).language; - break; - } - } - } -} - -void RemoveFunctionCommand::execute() -{ - MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (remove - execute) - KInterfaceDesigner::Function f; - f.returnType = returnType; - f.function = function; - f.specifier = specifier; - f.access = access; - f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void RemoveFunctionCommand::unexecute() -{ - if ( MetaDataBase::hasFunction( TQT_TQOBJECT(formWindow()), function ) ) - return; - MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (remove - unexecute) - KInterfaceDesigner::Function f; - f.returnType = returnType; - f.function = function; - f.specifier = specifier; - f.access = access; - f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->clearSelection(false); - formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -AddVariableCommand::AddVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn, const TQString &a ) - : Command( name, fw ), varName( vn ), access( a ) -{ -} - -void AddVariableCommand::execute() -{ - MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void AddVariableCommand::unexecute() -{ - MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -SetVariablesCommand::SetVariablesCommand( const TQString &name, FormWindow *fw, - TQValueList lst ) - : Command( name, fw ), newList( lst ) -{ - oldList = MetaDataBase::variables( TQT_TQOBJECT(formWindow()) ); -} - -void SetVariablesCommand::execute() -{ - MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), newList ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void SetVariablesCommand::unexecute() -{ - MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), oldList ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn ) - : Command( name, fw ), varName( vn ) -{ - TQValueList lst = MetaDataBase::variables( TQT_TQOBJECT(fw) ); - for ( TQValueList::Iterator it = lst.begin(); it != lst.end(); ++it ) { - if ( (*it).varName == varName ) { - access = (*it).varAccess; - break; - } - } -} - -void RemoveVariableCommand::execute() -{ - MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void RemoveVariableCommand::unexecute() -{ - MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -EditDefinitionsCommand::EditDefinitionsCommand( const TQString &name, FormWindow *fw, LanguageInterface *lf, - const TQString &n, const TQStringList &nl ) - : Command( name, fw ), lIface( lf ), defName( n ), newList( nl ) -{ - oldList = lIface->definitionEntries( defName, formWindow()->mainWindow()->designerInterface() ); -} - -void EditDefinitionsCommand::execute() -{ - lIface->setDefinitionEntries( defName, newList, formWindow()->mainWindow()->designerInterface() ); - lIface->release(); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void EditDefinitionsCommand::unexecute() -{ - lIface->setDefinitionEntries( defName, oldList, formWindow()->mainWindow()->designerInterface() ); - lIface->release(); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -LowerCommand::LowerCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ) - : Command( name, fw ), widgets( w ) -{ -} - -void LowerCommand::execute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->lower(); - formWindow()->raiseSelection( w ); - } - -} - -void LowerCommand::unexecute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->raise(); - formWindow()->raiseSelection( w ); - } -} - -// ------------------------------------------------------------ - -RaiseCommand::RaiseCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ) - : Command( name, fw ), widgets( w ) -{ -} - -void RaiseCommand::execute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->raise(); - formWindow()->raiseSelection( w ); - } - -} - -void RaiseCommand::unexecute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->lower(); - formWindow()->raiseSelection( w ); - } -} - -// ------------------------------------------------------------ - -PasteCommand::PasteCommand( const TQString &n, FormWindow *fw, - const TQWidgetList &w ) - : Command( n, fw ), widgets( w ) -{ -} - -void PasteCommand::execute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->show(); - formWindow()->selectWidget( TQT_TQOBJECT(w) ); - formWindow()->widgets()->insert( w, w ); - formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); - } -} - -void PasteCommand::unexecute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->hide(); - formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); - formWindow()->widgets()->remove( w ); - formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); - } - } - -// ------------------------------------------------------------ - -TabOrderCommand::TabOrderCommand( const TQString &n, FormWindow *fw, - const TQWidgetList &ol, const TQWidgetList &nl ) - : Command( n, fw ), oldOrder( ol ), newOrder( nl ) -{ -} - -void TabOrderCommand::merge( Command *c ) -{ - TabOrderCommand *cmd = (TabOrderCommand*)c; - newOrder = cmd->newOrder; -} - -bool TabOrderCommand::canMerge( Command * ) -{ - return TRUE; -} - -void TabOrderCommand::execute() -{ - MetaDataBase::setTabOrder( formWindow(), newOrder ); -} - -void TabOrderCommand::unexecute() -{ - MetaDataBase::setTabOrder( formWindow(), oldOrder ); -} - -// ------------------------------------------------------------ - -PopulateListBoxCommand::PopulateListBoxCommand( const TQString &n, FormWindow *fw, - TQListBox *lb, const TQValueList &items ) - : Command( n, fw ), newItems( items ), listbox( lb ) -{ - TQListBoxItem *i = 0; - for ( i = listbox->firstItem(); i; i = i->next() ) { - Item item; - if ( i->pixmap() ) - item.pix = *i->pixmap(); - item.text = i->text(); - oldItems.append( item ); - } -} - -void PopulateListBoxCommand::execute() -{ - listbox->clear(); - for ( TQValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { - Item i = *it; - if ( !i.pix.isNull() ) - (void)new TQListBoxPixmap( listbox, i.pix, i.text ); - else - (void)new TQListBoxText( listbox, i.text ); - } - formWindow()->mainWindow()->propertyeditor()->refetchData(); -} - -void PopulateListBoxCommand::unexecute() -{ - listbox->clear(); - for ( TQValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { - Item i = *it; - if ( !i.pix.isNull() ) - (void)new TQListBoxPixmap( listbox, i.pix, i.text ); - else - (void)new TQListBoxText( listbox, i.text ); - } - formWindow()->mainWindow()->propertyeditor()->refetchData(); -} - -// ------------------------------------------------------------ - -PopulateIconViewCommand::PopulateIconViewCommand( const TQString &n, FormWindow *fw, - TQIconView *iv, const TQValueList &items ) - : Command( n, fw ), newItems( items ), iconview( iv ) -{ -#ifndef TQT_NO_ICONVIEW - TQIconViewItem *i = 0; - for ( i = iconview->firstItem(); i; i = i->nextItem() ) { - Item item; - if ( i->pixmap() ) - item.pix = *i->pixmap(); - item.text = i->text(); - oldItems.append( item ); - } -#endif -} - -void PopulateIconViewCommand::execute() -{ -#ifndef TQT_NO_ICONVIEW - iconview->clear(); - for ( TQValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { - Item i = *it; - (void)new TQIconViewItem( iconview, i.text, i.pix ); - } -#endif -} - -void PopulateIconViewCommand::unexecute() -{ -#ifndef TQT_NO_ICONVIEW - iconview->clear(); - for ( TQValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { - Item i = *it; - (void)new TQIconViewItem( iconview, i.text, i.pix ); - } -#endif -} - -// ------------------------------------------------------------ - -PopulateListViewCommand::PopulateListViewCommand( const TQString &n, FormWindow *fw, - TQListView *lv, TQListView *from ) - : Command( n, fw ), listview( lv ) -{ - newItems = new TQListView(); - newItems->hide(); - transferItems( from, newItems ); - oldItems = new TQListView(); - oldItems->hide(); - transferItems( listview, oldItems ); -} - -void PopulateListViewCommand::execute() -{ - listview->clear(); - transferItems( newItems, listview ); -} - -void PopulateListViewCommand::unexecute() -{ - listview->clear(); - transferItems( oldItems, listview ); -} - -void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to ) -{ - TQHeader *header = to->header(); - while ( header->count() ) - to->removeColumn( 0 ); - TQHeader *h2 = from->header(); - for ( int i = 0; i < h2->count(); ++i ) { - to->addColumn( h2->label( i ) ); - if ( h2->iconSet( i ) && !h2->iconSet( i )->pixmap().isNull() ) - header->setLabel( i, *h2->iconSet( i ), h2->label( i ) ); - header->setResizeEnabled( h2->isResizeEnabled( i ), i ); - header->setClickEnabled( h2->isClickEnabled( i ), i ); - } - - TQListViewItemIterator it( from ); - TQPtrStack fromParents, toParents; - fromParents.push( 0 ); - toParents.push( 0 ); - TQPtrStack toLasts; - TQListViewItem *fromLast = 0; - toLasts.push( 0 ); - int cols = from->columns(); - to->setSorting( -1 ); - from->setSorting( -1 ); - for ( ; it.current(); ++it ) { - TQListViewItem *i = it.current(); - if ( i->parent() == fromParents.top() ) { - TQListViewItem *pi = toParents.top(); - TQListViewItem *ni = 0; - if ( pi ) - ni = new TQListViewItem( pi, toLasts.top() ); - else - ni = new TQListViewItem( to, toLasts.top() ); - for ( int c = 0; c < cols; ++c ) { - ni->setText( c, i->text( c ) ); - if ( i->pixmap( c ) ) - ni->setPixmap( c, *i->pixmap( c ) ); - } - toLasts.pop(); - toLasts.push( ni ); - if ( pi ) - pi->setOpen( TRUE ); - } else { - if ( i->parent() == fromLast ) { - fromParents.push( fromLast ); - toParents.push( toLasts.top() ); - toLasts.push( 0 ); - TQListViewItem *pi = toParents.top(); - TQListViewItem *ni = 0; - if ( pi ) - ni = new TQListViewItem( pi ); - else - ni = new TQListViewItem( to ); - for ( int c = 0; c < cols; ++c ) { - ni->setText( c, i->text( c ) ); - if ( i->pixmap( c ) ) - ni->setPixmap( c, *i->pixmap( c ) ); - } - toLasts.pop(); - toLasts.push( ni ); - if ( pi ) - pi->setOpen( TRUE ); - } else { - while ( fromParents.top() != i->parent() ) { - fromParents.pop(); - toParents.pop(); - toLasts.pop(); - } - - TQListViewItem *pi = toParents.top(); - TQListViewItem *ni = 0; - if ( pi ) - ni = new TQListViewItem( pi, toLasts.top() ); - else - ni = new TQListViewItem( to, toLasts.top() ); - for ( int c = 0; c < cols; ++c ) { - ni->setText( c, i->text( c ) ); - if ( i->pixmap( c ) ) - ni->setPixmap( c, *i->pixmap( c ) ); - } - if ( pi ) - pi->setOpen( TRUE ); - toLasts.pop(); - toLasts.push( ni ); - } - } - fromLast = i; - } -} - - - -// ------------------------------------------------------------ - -PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw, - TQTextEdit *mle, const TQString &txt ) - : Command( n, fw ), newText( txt ), mlined( mle ) -{ - oldText = mlined->text(); - wasChanged = MetaDataBase::isPropertyChanged( TQT_TQOBJECT(mlined), "text" ); -} - -void PopulateMultiLineEditCommand::execute() -{ - mlined->setText( newText ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", TRUE ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); -} - -void PopulateMultiLineEditCommand::unexecute() -{ - mlined->setText( oldText ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", wasChanged ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); -} - -// ------------------------------------------------------------ - -PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t, - const TQValueList &rows, - const TQValueList &columns ) - : Command( n, fw ), newRows( rows ), newColumns( columns ), table( t ) -{ -#ifndef TQT_NO_TABLE - int i = 0; - TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); - for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { - PopulateTableCommand::Column col; - col.text = table->horizontalHeader()->label( i ); - if ( table->horizontalHeader()->iconSet( i ) ) - col.pix = table->horizontalHeader()->iconSet( i )->pixmap(); - col.field = *columnFields.find( col.text ); - oldColumns.append( col ); - } - for ( i = 0; i < table->verticalHeader()->count(); ++i ) { - PopulateTableCommand::Row row; - row.text = table->verticalHeader()->label( i ); - if ( table->verticalHeader()->iconSet( i ) ) - row.pix = table->verticalHeader()->iconSet( i )->pixmap(); - oldRows.append( row ); - } -#endif -} - -void PopulateTableCommand::execute() -{ -#ifndef TQT_NO_TABLE - TQMap columnFields; - table->setNumCols( newColumns.count() ); - int i = 0; - for ( TQValueList::Iterator cit = newColumns.begin(); cit != newColumns.end(); ++cit, ++i ) { - table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text ); - if ( !(*cit).field.isEmpty() ) - columnFields.insert( (*cit).text, (*cit).field ); - } - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); - table->setNumRows( newRows.count() ); - i = 0; - for ( TQValueList::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i ) - table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text ); -#endif -} - -void PopulateTableCommand::unexecute() -{ -#ifndef TQT_NO_TABLE - TQMap columnFields; - table->setNumCols( oldColumns.count() ); - int i = 0; - for ( TQValueList::Iterator cit = oldColumns.begin(); cit != oldColumns.end(); ++cit, ++i ) { - table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text ); - if ( !(*cit).field.isEmpty() ) - columnFields.insert( (*cit).text, (*cit).field ); - } - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); - table->setNumRows( oldRows.count() ); - i = 0; - for ( TQValueList::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i ) - table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text ); -#endif -} - -// ------------------------------------------------------------ - -AddActionToToolBarCommand::AddActionToToolBarCommand( const TQString &n, FormWindow *fw, - TQAction *a, QDesignerToolBar *tb, int idx ) - : Command( n, fw ), action( a ), toolBar( tb ), index( idx ) -{ -} - -void AddActionToToolBarCommand::execute() -{ - action->addTo( toolBar ); - - if ( ::tqqt_cast(action) ) { - TQString s = ( (QDesignerAction*)action )->widget()->name(); - if ( s.startsWith( "qt_dead_widget_" ) ) { - s.remove( 0, TQString( "qt_dead_widget_" ).length() ); - ( (QDesignerAction*)action )->widget()->setName( s ); - } - toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action ); - ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar ); - } else if ( ::tqqt_cast(action) ) { - if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) { - toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action ); - ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); - } - } else if ( ::tqqt_cast(action) ) { - toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action ); - ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar ); - } - if ( !::tqqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { - if ( index == -1 ) - toolBar->appendAction( action ); - else - toolBar->insertAction( index, action ); - toolBar->reInsert(); - TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - } else { - TQObjectList clo = action->childrenListObject(); - if ( !clo.isEmpty() ) { - TQObjectListIt it( clo ); - int i = 0; - while ( it.current() ) { - TQObject *o = it.current(); - ++it; - if ( !::tqqt_cast(o) ) - continue; - // ### fix it for nested actiongroups - if ( ::tqqt_cast(o) ) { - QDesignerAction *ac = (QDesignerAction*)o; - toolBar->insertAction( ac->widget(), ac ); - ac->widget()->installEventFilter( toolBar ); - if ( index == -1 ) - toolBar->appendAction( ac ); - else - toolBar->insertAction( index + (i++), ac ); - } - TQObject::connect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - } - } - toolBar->reInsert(); - TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - } - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void AddActionToToolBarCommand::unexecute() -{ - if ( ::tqqt_cast(action) ) { - TQString s = ( (QDesignerAction*)action )->widget()->name(); - s.prepend( "qt_dead_widget_" ); - ( (QDesignerAction*)action )->widget()->setName( s ); - } - - toolBar->removeAction( action ); - action->removeFrom( toolBar ); - TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - if ( !::tqqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { - action->removeEventFilter( toolBar ); - } else { - TQObjectList clo = action->childrenListObject(); - if ( !clo.isEmpty() ) { - TQObjectListIt it( clo ); - while ( it.current() ) { - TQObject *o = it.current(); - ++it; - if ( !::tqqt_cast(o) ) - continue; - if ( ::tqqt_cast(o) ) { - o->removeEventFilter( toolBar ); - toolBar->removeAction( (TQAction*)o ); - } - TQObject::disconnect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - } - } - } - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -AddToolBarCommand::AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw ) - : Command( n, fw ), toolBar( 0 ), mainWindow( mw ) -{ -} - -void AddToolBarCommand::execute() -{ - if ( !toolBar ) { - toolBar = new QDesignerToolBar( mainWindow ); - TQString n = "Toolbar"; - formWindow()->unify( TQT_TQOBJECT(toolBar), n, TRUE ); - toolBar->setName( n ); - mainWindow->addToolBar( toolBar, n ); - } else { - toolBar->show(); - TQString s = toolBar->name(); - s.remove( 0, TQString( "qt_dead_widget_" ).length() ); - toolBar->setName( s ); - } - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void AddToolBarCommand::unexecute() -{ - toolBar->hide(); - TQString s = toolBar->name(); - s.prepend( "qt_dead_widget_" ); - toolBar->setName( s ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS -AddContainerPageCommand::AddContainerPageCommand( const TQString &n, FormWindow *fw, - TQWidget *c, const TQString &label ) - : Command( n, fw ), container( c ), index( -1 ), pageLabel( label ), page( 0 ) -{ - WidgetInterface *iface = 0; - widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); - if ( !iface ) - return; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); - if ( !wiface ) - return; - wClassName = WidgetFactory::classNameOf( container ); -} - -AddContainerPageCommand::~AddContainerPageCommand() -{ - if ( wiface ) - wiface->release(); -} - -void AddContainerPageCommand::execute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - if ( index == -1 ) - index = wiface->count( wClassName, container ); - if ( !page ) - page = wiface->addPage( wClassName, container, pageLabel, index ); - else - wiface->insertPage( wClassName, container, pageLabel, index, page ); - - MetaDataBase::addEntry( page ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} - -void AddContainerPageCommand::unexecute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - wiface->removePage( wClassName, container, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} - -// ------------------------------------------------------------ - -DeleteContainerPageCommand::DeleteContainerPageCommand( const TQString &n, FormWindow *fw, - TQWidget *c, int idx ) - : Command( n, fw ), container( c ), index( idx ) -{ - WidgetInterface *iface = 0; - widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); - if ( !iface ) - return; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); - if ( !wiface ) - return; - wClassName = WidgetFactory::classNameOf( container ); - page = wiface->page( wClassName, container, index ); - pageLabel = wiface->pageLabel( wClassName, container, index ); -} - -DeleteContainerPageCommand::~DeleteContainerPageCommand() -{ - if ( wiface ) - wiface->release(); -} - -void DeleteContainerPageCommand::execute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - - wiface->removePage( wClassName, container, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} - -void DeleteContainerPageCommand::unexecute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - if ( index == -1 ) - index = wiface->count( wClassName, container ); - - wiface->insertPage( wClassName, container, pageLabel, index, page ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} - -// ------------------------------------------------------------ - -RenameContainerPageCommand::RenameContainerPageCommand( const TQString &n, FormWindow *fw, - TQWidget *c, int idx, - const TQString &label ) - : Command( n, fw ), container( c ), index( idx ), newLabel( label ) -{ - WidgetInterface *iface = 0; - widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); - if ( !iface ) - return; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); - if ( !wiface ) - return; - wClassName = WidgetFactory::classNameOf( container ); - oldLabel = wiface->pageLabel( wClassName, container, index ); -} - -RenameContainerPageCommand::~RenameContainerPageCommand() -{ - if ( wiface ) - wiface->release(); -} - -void RenameContainerPageCommand::execute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - wiface->renamePage( wClassName, container, index, newLabel ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} - -void RenameContainerPageCommand::unexecute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - wiface->renamePage( wClassName, container, index, oldLabel ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} -#endif // TQT_CONTAINER_CUSTOM_WIDGETS -// ------------------------------------------------------------ - -AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n, - FormWindow *fw, - PopupMenuEditor *m, - PopupMenuEditorItem *i, - int idx ) - : Command( n, fw ), menu( m ), item( i ), index( idx ) -{ } - -void AddActionToPopupCommand::execute() -{ - menu->insert( item, index ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void AddActionToPopupCommand::unexecute() -{ - item->hideMenu(); - int i = menu->find( item->action() ); - menu->remove( i ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -RemoveActionFromPopupCommand::RemoveActionFromPopupCommand( const TQString &n, - FormWindow *fw, - PopupMenuEditor *m, - int idx ) - : AddActionToPopupCommand( n, fw, m, 0, idx ) -{ - item = menu->at( index ); -} - -void RemoveActionFromPopupCommand::execute() -{ - AddActionToPopupCommand::unexecute(); -} - -void RemoveActionFromPopupCommand::unexecute() -{ - AddActionToPopupCommand::execute(); -} - -// ------------------------------------------------------------ - -ExchangeActionInPopupCommand::ExchangeActionInPopupCommand( const TQString &n, - FormWindow *fw, - PopupMenuEditor *m, - int a, - int b ) - : Command( n, fw ), menu( m ), c( a ), d( b ) -{ } - -void ExchangeActionInPopupCommand::execute() -{ - menu->exchange( c, d ); -} - -void ExchangeActionInPopupCommand::unexecute() -{ - execute(); -} - -// ------------------------------------------------------------ - -ActionEditor *ActionCommand::actionEditor() -{ - // FIXME: handle multiple action editors - return (ActionEditor *) formWindow()->mainWindow()->child( 0, "ActionEditor" ); -} - -// ------------------------------------------------------------ - -RenameActionCommand::RenameActionCommand( const TQString &n, - FormWindow *fw, - TQAction *a, - PopupMenuEditor *m, - TQString nm ) - : ActionCommand( n, fw, a ), menu( m ), newName( nm ) -{ - oldName = action->menuText(); -} - -void RenameActionCommand::execute() -{ - TQString actionText = newName; - actionText.replace("&&", "&"); - TQString menuText = newName; - action->setText( actionText ); - action->setMenuText( menuText ); - - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void RenameActionCommand::unexecute() -{ - action->setMenuText( oldName ); - action->setText( oldName ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -SetActionIconsCommand::SetActionIconsCommand( const TQString &n, - FormWindow *fw, - TQAction *a, - PopupMenuEditor *m, - TQIconSet &icons ) - : ActionCommand( n, fw, a ), menu( m ), newIcons( icons ) -{ - oldIcons = a->iconSet(); -} - -void SetActionIconsCommand::execute() -{ - action->setIconSet( newIcons ); - ActionEditor *ae = actionEditor(); - if ( ae ) - ae->updateActionIcon( action ); - MetaDataBase::setPropertyChanged( action, "iconSet", TRUE ); -} - -void SetActionIconsCommand::unexecute() -{ - action->setIconSet( oldIcons ); - ActionEditor *ae = actionEditor(); - if ( ae ) - ae->updateActionIcon( action ); - MetaDataBase::setPropertyChanged( action, "iconSet", TRUE ); -} - -// ------------------------------------------------------------ - -AddMenuCommand::AddMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - MenuBarEditorItem *i, - int idx ) - : Command( n, fw ), mb( b ), item( i ), name( 0 ), index( idx ) -{ } - -AddMenuCommand::AddMenuCommand( const TQString &n, - FormWindow *fw, - TQMainWindow *mw, - const TQString &nm ) - : Command( n, fw ), mb( 0 ), item( 0 ), name( nm ), index( -1 ) -{ - if ( mw ) - mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); -} - -void AddMenuCommand::execute() -{ - TQString n; - TQMainWindow *mw = (TQMainWindow*)formWindow()->mainContainer(); - if ( !mb ) { - mb = new MenuBarEditor( formWindow(), mw ); - mb->setName( "MenuBarEditor" ); - formWindow()->insertWidget( mb, TRUE ); - } - if ( !item ) { - PopupMenuEditor *popup = new PopupMenuEditor( formWindow(), mw ); - popup->setName( "PopupMenuEditor" ); - formWindow()->insertWidget( popup, TRUE ); - mb->insertItem( name, popup, index ); - index = mb->findItem( popup ); - item = mb->item( index ); - } else { - PopupMenuEditor *popup = item->menu(); - popup->setName( item->menuText() ); - formWindow()->insertWidget( popup, TRUE ); - mb->insertItem( item, index ); - } - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void AddMenuCommand::unexecute() -{ - if ( !item ) { - tqWarning( "The AddMenuCommand was created without a menu item." ); - return; - } - item->menu()->hide(); - int i = mb->findItem( item ); - formWindow()->removeWidget( item->menu() ); - mb->removeItemAt( i ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -RemoveMenuCommand::RemoveMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - int idx ) - : AddMenuCommand( n, fw, b, 0, idx ) -{ - item = mb->item( index ); -} - -void RemoveMenuCommand::execute() -{ - mb->hideItem( index ); - AddMenuCommand::unexecute(); -} - -void RemoveMenuCommand::unexecute() -{ - AddMenuCommand::execute(); -} - -// ------------------------------------------------------------ - -ExchangeMenuCommand::ExchangeMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - int i, - int j ) - : Command( n, fw ), bar( b ), k( i ), l( j ) -{ } - -void ExchangeMenuCommand::execute() -{ - bar->exchange( k, l ); -} - -void ExchangeMenuCommand::unexecute() -{ - execute(); -} - -// ------------------------------------------------------------ - -MoveMenuCommand::MoveMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - int i, - int j ) - : Command( n, fw ), bar( b ), from( i ), to( j ) -{ } - -void MoveMenuCommand::execute() -{ - bar->hideItem( from ); - MenuBarEditorItem * i = bar->item( from ); - bar->removeItemAt( from ); - int t = ( from > to ? to : to - 1 ); - bar->insertItem( i, t ); -} - -void MoveMenuCommand::unexecute() -{ - bar->hideItem( to ); - int t = ( from > to ? to : to - 1 ); - MenuBarEditorItem * i = bar->item( t ); - bar->removeItemAt( t ); - bar->insertItem( i, from ); -} - -// ------------------------------------------------------------ - -RenameMenuCommand::RenameMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - TQString nm, - MenuBarEditorItem *i ) - : Command( n, fw ), bar( b ), item( i ), newName( nm ) -{ - oldName = item->menu()->name(); -} - -TQString RenameMenuCommand::makeLegal( const TQString &str ) -{ - // remove illegal characters - TQString d; - char c = 0, i = 0; - while ( !str.at(i).isNull() ) { - c = str.at(i).latin1(); - if ( c == '-' || c == ' ' ) - d += '_'; - else if ( ( c >= '0' && c <= '9') || ( c >= 'A' && c <= 'Z' ) - || c == '_' || ( c >= 'a' && c <= 'z' ) ) - d += c; - ++i; - } - return d; -} - -void RenameMenuCommand::execute() -{ - PopupMenuEditor *popup = item->menu(); - item->setMenuText( newName ); - TQString legal = makeLegal( newName ); - formWindow()->unify( TQT_TQOBJECT(popup), legal, TRUE ); - popup->setName( legal ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void RenameMenuCommand::unexecute() -{ - PopupMenuEditor *popup = item->menu(); - item->setMenuText( oldName ); - popup->setName( oldName ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw, - TQToolBox *tw, const TQString &label ) - : Command( n, fw ), toolBox( tw ), toolBoxLabel( label ) -{ - toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" ); - toolBoxPage->hide(); - index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) ); -} - -void AddToolBoxPageCommand::execute() -{ - index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel); - toolBox->setCurrentIndex( index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void AddToolBoxPageCommand::unexecute() -{ - toolBox->removeItem( toolBoxPage ); - toolBoxPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -DeleteToolBoxPageCommand::DeleteToolBoxPageCommand( const TQString &n, FormWindow *fw, - TQToolBox *tw, TQWidget *page ) - : Command( n, fw ), toolBox( tw ), toolBoxPage( page ) -{ - toolBoxLabel = toolBox->itemLabel( toolBox->currentIndex() ); - index = toolBox->currentIndex(); -} - -void DeleteToolBoxPageCommand::execute() -{ - toolBox->removeItem( toolBoxPage ); - toolBoxPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void DeleteToolBoxPageCommand::unexecute() -{ - index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel ); - toolBox->setCurrentIndex( index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} diff --git a/tdevdesigner/designer/command.h b/tdevdesigner/designer/command.h deleted file mode 100644 index b1c7a2a5..00000000 --- a/tdevdesigner/designer/command.h +++ /dev/null @@ -1,1260 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef COMMAND_H -#define COMMAND_H - -#include "metadatabase.h" -#include "layout.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class TQWizard; -class TQTabWidget; -class Command; -class TQWidget; -class FormWindow; -class PropertyEditor; -class TQListBox; -class TQIconView; -class TQTable; -class TQAction; -class QDesignerToolBar; -class TQMainWindow; -class TQTextEdit; -struct LanguageInterface; -class TQToolBox; - -class MenuBarEditor; -class MenuBarEditorItem; -class PopupMenuEditor; -class PopupMenuEditorItem; -class ActionEditor; - -class Command : public TQt -{ -public: - Command( const TQString &n, FormWindow *fw ); - virtual ~Command(); - - enum Type { - Resize, - Insert, - Move, - Delete, - SetProperty, - LayoutHorizontal, - LayoutVertical, - LayoutHorizontalSplitter, - LayoutVerticalSplitter, - LayoutGrid, - BreakLayout, - Macro, - AddTabPage, - DeleteTabPage, - MoveTabPage, - AddWidgetStackPage, - DeleteWidgetStackPage, - AddWizardPage, - DeleteWizardPage, - SwapWizardPages, - MoveWizardPage, - RenameWizardPage, - AddConnection, - RemoveConnection, - Lower, - Raise, - Paste, - TabOrder, - PopulateListBox, - PopulateIconView, - PopulateListView, - PopulateMultiLineEdit, - PopulateTable, - AddActionToToolBar, - RemoveActionFromToolBar, - AddToolBar, - RemoveToolBar, - AddFunction, - ChangeFunctionAttrib, - RemoveFunction, - AddVariable, - SetVariables, - RemoveVariable, - EditDefinitions, - AddContainerPage, - DeleteContainerPage, - RenameContainerPage, - AddActionToPopup, - RemoveActionFromPopup, - ExchangeActionInPopup, - //MoveActionInPopup, - RenameAction, - SetActionIcons, - AddMenu, - RemoveMenu, - ExchangeMenu, - MoveMenu, - RenameMenu, - AddToolBoxPage, - DeleteToolBoxPage - }; - - TQString name() const; - - virtual void execute() = 0; - virtual void unexecute() = 0; - virtual Type type() const = 0; - virtual void merge( Command *c ); - virtual bool canMerge( Command *c ); - - FormWindow *formWindow() const; - -private: - TQString cmdName; - FormWindow *formWin; - -}; - -class CommandHistory : public TQObject -{ - Q_OBJECT - - -public: - CommandHistory( int s ); - - void addCommand( Command *cmd, bool tryCompress = FALSE ); - void undo(); - void redo(); - - void emitUndoRedo(); - - void setModified( bool m ); - bool isModified() const; - -public slots: - void checkCompressedCommand(); - -signals: - void undoRedoChanged( bool undoAvailable, bool redoAvailable, - const TQString &undoCmd, const TQString &redoCmd ); - void modificationChanged( bool m ); - -private: - TQPtrList history; - int current, steps; - bool modified; - int savedAt; - Command *compressedCommand; - -}; - -class ResizeCommand : public Command -{ -public: - ResizeCommand( const TQString &n, FormWindow *fw, - TQWidget *w, const TQRect &oldr, const TQRect &nr ); - - void execute(); - void unexecute(); - Type type() const { return Resize; } - -private: - TQWidget *widget; - TQRect oldRect, newRect; - -}; - -class InsertCommand : public Command -{ -public: - InsertCommand( const TQString &n, FormWindow *fw, TQWidget *w, const TQRect &g ); - - void execute(); - void unexecute(); - Type type() const { return Insert; } - -private: - TQWidget *widget; - TQRect geometry; - -}; - -class MoveCommand : public Command -{ -public: - MoveCommand( const TQString &n, FormWindow *fw, - const TQWidgetList &w, - const TQValueList op, - const TQValueList np, - TQWidget *opr, TQWidget *npr ); - void execute(); - void unexecute(); - Type type() const { return Move; } - void merge( Command *c ); - bool canMerge( Command *c ); - -private: - TQWidgetList widgets; - TQValueList oldPos, newPos; - TQWidget *oldParent, *newParent; - -}; - -class DeleteCommand : public Command -{ -public: - DeleteCommand( const TQString &n, FormWindow *fw, - const TQWidgetList &w ); - void execute(); - void unexecute(); - Type type() const { return Delete; } - -private: - TQWidgetList widgets; - TQMap< TQWidget*, TQValueList > connections; - -}; - -class SetPropertyCommand : public Command -{ -public: - SetPropertyCommand( const TQString &n, FormWindow *fw, - TQObject *w, PropertyEditor *e, - const TQString &pn, const TQVariant &ov, - const TQVariant &nv, const TQString &ncut, - const TQString &ocut, - bool reset = FALSE ); - - void execute(); - void unexecute(); - Type type() const { return SetProperty; } - void merge( Command *c ); - bool canMerge( Command *c ); - bool checkProperty(); - -private: - void setProperty( const TQVariant &v, const TQString ¤tItemText, bool select = TRUE ); - - TQGuardedPtr widget; - PropertyEditor *editor; - TQString propName; - TQVariant oldValue, newValue; - TQString oldCurrentItemText, newCurrentItemText; - bool wasChanged; - bool isResetCommand; - -}; - -class LayoutHorizontalCommand : public Command -{ -public: - LayoutHorizontalCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ); - - void execute(); - void unexecute(); - Type type() const { return LayoutHorizontal; } - -private: - HorizontalLayout layout; - -}; - -class LayoutHorizontalSplitCommand : public Command -{ -public: - LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ); - - void execute(); - void unexecute(); - Type type() const { return LayoutHorizontalSplitter; } - -private: - HorizontalLayout layout; - -}; - -class LayoutVerticalCommand : public Command -{ -public: - LayoutVerticalCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ); - - void execute(); - void unexecute(); - Type type() const { return LayoutVertical; } - -private: - VerticalLayout layout; - -}; - -class LayoutVerticalSplitCommand : public Command -{ -public: - LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ); - - void execute(); - void unexecute(); - Type type() const { return LayoutVerticalSplitter; } - -private: - VerticalLayout layout; - -}; - -class LayoutGridCommand : public Command -{ -public: - LayoutGridCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl, int xres, int yres ); - - void execute(); - void unexecute(); - Type type() const { return LayoutGrid; } - -private: - GridLayout layout; - -}; - -class BreakLayoutCommand : public Command -{ -public: - BreakLayoutCommand( const TQString &n, FormWindow *fw, - TQWidget *layoutBase, const TQWidgetList &wl ); - - void execute(); - void unexecute(); - Type type() const { return BreakLayout; } - -private: - Layout *layout; - int spacing; - int margin; - TQWidget *lb; - TQWidgetList widgets; - -}; - -class MacroCommand : public Command -{ -public: - MacroCommand( const TQString &n, FormWindow *fw, - const TQPtrList &cmds ); - - void execute(); - void unexecute(); - Type type() const { return Macro; } - -private: - TQPtrList commands; - -}; - -class AddTabPageCommand : public Command -{ -public: - AddTabPageCommand( const TQString &n, FormWindow *fw, - TQTabWidget *tw, const TQString &label ); - - void execute(); - void unexecute(); - Type type() const { return AddTabPage; } - -private: - TQTabWidget *tabWidget; - int index; - TQWidget *tabPage; - TQString tabLabel; - -}; - -class DeleteTabPageCommand : public Command -{ -public: - DeleteTabPageCommand( const TQString &n, FormWindow *fw, - TQTabWidget *tw, TQWidget *page ); - - void execute(); - void unexecute(); - Type type() const { return DeleteTabPage; } - -private: - TQTabWidget *tabWidget; - int index; - TQWidget *tabPage; - TQString tabLabel; - -}; - -class MoveTabPageCommand : public Command -{ -public: - MoveTabPageCommand(const TQString &n, FormWindow *fw, - TQTabWidget *tw, TQWidget *page, const TQString& label, int nIndex, int oIndex ); - - void execute(); - void unexecute(); - Type type() const { return MoveTabPage; } - -private: - TQTabWidget *tabWidget; - int newIndex, oldIndex; - TQWidget *tabPage; - TQString tabLabel; - -}; -class QDesignerWidgetStack; -class AddWidgetStackPageCommand : public Command -{ -public: - AddWidgetStackPageCommand( const TQString &n, FormWindow *fw, - QDesignerWidgetStack *ws ); - - void execute(); - void unexecute(); - Type type() const { return AddWidgetStackPage; } - -private: - QDesignerWidgetStack *widgetStack; - int index; - TQWidget *stackPage; -}; - -class DeleteWidgetStackPageCommand : public Command -{ -public: - DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw, - QDesignerWidgetStack *ws, TQWidget *page ); - - void execute(); - void unexecute(); - Type type() const { return DeleteWidgetStackPage; } - -private: - QDesignerWidgetStack *widgetStack; - int index; - TQWidget *stackPage; -}; - - - -class AddWizardPageCommand : public Command -{ -public: - AddWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, const TQString &label, int index = -1, bool show = TRUE ); - - void execute(); - void unexecute(); - Type type() const { return AddWizardPage; } - -private: - TQWizard *wizard; - int index; - bool show; - TQWidget *page; - TQString pageLabel; - -}; - -class DeleteWizardPageCommand : public Command -{ -public: - DeleteWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, int index, bool show = TRUE ); - - void execute(); - void unexecute(); - Type type() const { return DeleteWizardPage; } - -private: - TQWizard *wizard; - int index; - bool show; - TQWidget *page; - TQString pageLabel; - -}; - -class RenameWizardPageCommand : public Command -{ -public: - RenameWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, int index, const TQString& name ); - - void execute(); - void unexecute(); - Type type() const { return RenameWizardPage; } - -private: - TQWizard *wizard; - int index; - TQWidget *page; - TQString label; - -}; - -class SwapWizardPagesCommand : public Command -{ -public: - SwapWizardPagesCommand( const TQString &n, FormWindow *fw, - TQWizard *w, int index1, int index2 ); - - void execute(); - void unexecute(); - Type type() const { return SwapWizardPages; } - -private: - TQWizard *wizard; - int index1, index2; - -}; - -class MoveWizardPageCommand : public Command -{ -public: - MoveWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, int index1, int index2 ); - - void execute(); - void unexecute(); - Type type() const { return MoveWizardPage; } - -private: - TQWizard *wizard; - int index1, index2; - -}; - -class AddConnectionCommand : public Command -{ -public: - AddConnectionCommand( const TQString &name, FormWindow *fw, - MetaDataBase::Connection c ); - - void execute(); - void unexecute(); - Type type() const { return AddConnection; } - -private: - MetaDataBase::Connection connection; - -}; - -class RemoveConnectionCommand : public Command -{ -public: - RemoveConnectionCommand( const TQString &name, FormWindow *fw, - MetaDataBase::Connection c ); - - void execute(); - void unexecute(); - Type type() const { return RemoveConnection; } - -private: - MetaDataBase::Connection connection; - -}; - - -class AddFunctionCommand : public Command -{ -public: - AddFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, const TQString& spec, - const TQString &a, const TQString &t, const TQString &l, const TQString &rt ); - - void execute(); - void unexecute(); - Type type() const { return AddFunction; } - -private: - TQCString function; - TQString specifier; - TQString access; - TQString functionType; - TQString language; - TQString returnType; -}; - -class ChangeFunctionAttribCommand : public Command -{ -public: - ChangeFunctionAttribCommand( const TQString &name, FormWindow *fw, MetaDataBase::Function f, - const TQString &on, const TQString &os, const TQString &oa, - const TQString &ot, const TQString &ol, const TQString &ort ); - - void execute(); - void unexecute(); - Type type() const { return ChangeFunctionAttrib; } - -private: - TQString oldName, newName; - TQString oldSpec, newSpec; - TQString oldAccess, newAccess; - TQString oldType, newType; - TQString oldLang, newLang; - TQString oldReturnType, newReturnType; -}; - -class RemoveFunctionCommand : public Command -{ -public: - RemoveFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, const TQString& spec, - const TQString &a, const TQString &t, const TQString &l, const TQString &rt ); - - void execute(); - void unexecute(); - Type type() const { return RemoveFunction; } - -private: - TQCString function; - TQString specifier; - TQString access; - TQString functionType; - TQString language; - TQString returnType; -}; - -class AddVariableCommand : public Command -{ -public: - AddVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn, const TQString &a ); - void execute(); - void unexecute(); - Type type() const { return AddVariable; } - -private: - TQString varName; - TQString access; -}; - -class SetVariablesCommand : public Command -{ -public: - SetVariablesCommand( const TQString &name, FormWindow *fw, TQValueList lst ); - void execute(); - void unexecute(); - Type type() const { return SetVariables; } - -private: - TQValueList oldList, newList; -}; - -class RemoveVariableCommand : public Command -{ -public: - RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn ); - void execute(); - void unexecute(); - Type type() const { return RemoveVariable; } - -private: - TQString varName; - TQString access; -}; - -class EditDefinitionsCommand : public Command -{ -public: - EditDefinitionsCommand( const TQString &name, FormWindow *fw, LanguageInterface *lf, - const TQString &n, const TQStringList &l ); - void execute(); - void unexecute(); - Type type() const { return EditDefinitions; } - -private: - LanguageInterface *lIface; - TQString defName; - TQStringList newList, oldList; -}; - -class LowerCommand : public Command -{ -public: - LowerCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ); - - void execute(); - void unexecute(); - Type type() const { return Lower; } - -private: - TQWidgetList widgets; - -}; - -class RaiseCommand : public Command -{ -public: - RaiseCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ); - - void execute(); - void unexecute(); - Type type() const { return Raise; } - -private: - TQWidgetList widgets; - -}; - -class PasteCommand : public Command -{ -public: - PasteCommand( const TQString &n, FormWindow *fw, const TQWidgetList &w ); - - void execute(); - void unexecute(); - Type type() const { return Paste; } - -private: - TQWidgetList widgets; - -}; - -class TabOrderCommand : public Command -{ -public: - TabOrderCommand( const TQString &n, FormWindow *fw, const TQWidgetList &ol, const TQWidgetList &nl ); - - void execute(); - void unexecute(); - Type type() const { return TabOrder; } - void merge( Command *c ); - bool canMerge( Command *c ); - -private: - TQWidgetList oldOrder, newOrder; - -}; - -class PopulateListBoxCommand : public Command -{ -public: - struct Item - { - TQString text; - TQPixmap pix; - TQ_DUMMY_COMPARISON_OPERATOR( Item ) - }; - - PopulateListBoxCommand( const TQString &n, FormWindow *fw, - TQListBox *lb, const TQValueList &items ); - void execute(); - void unexecute(); - Type type() const { return PopulateListBox; } - - bool operator==( const PopulateListBoxCommand & ) const; - -private: - TQValueList oldItems, newItems; - TQListBox *listbox; - -}; - -class PopulateIconViewCommand : public Command -{ -public: - struct Item - { - TQString text; - TQPixmap pix; - TQ_DUMMY_COMPARISON_OPERATOR( Item ) - }; - - PopulateIconViewCommand( const TQString &n, FormWindow *fw, - TQIconView *iv, const TQValueList &items ); - void execute(); - void unexecute(); - Type type() const { return PopulateIconView; } - - bool operator==( const PopulateIconViewCommand & ) const; - -private: - TQValueList oldItems, newItems; - TQIconView *iconview; - -}; - -class PopulateListViewCommand : public Command -{ -public: - PopulateListViewCommand( const TQString &n, FormWindow *fw, - TQListView *lv, TQListView *from ); - void execute(); - void unexecute(); - Type type() const { return PopulateListView; } - static void transferItems( TQListView *from, TQListView *to ); - - bool operator==( const PopulateListViewCommand & ) const; - -private: - TQListView *oldItems, *newItems; - TQListView *listview; - -}; - -class PopulateMultiLineEditCommand : public Command -{ -public: - PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw, - TQTextEdit *mle, const TQString &txt ); - void execute(); - void unexecute(); - Type type() const { return PopulateMultiLineEdit; } - -private: - TQString newText, oldText; - TQTextEdit *mlined; - bool wasChanged; - -}; - -class PopulateTableCommand : public Command -{ -public: - struct Row - { - TQString text; - TQPixmap pix; - TQ_DUMMY_COMPARISON_OPERATOR( Row ) - }; - - struct Column - { - TQString text; - TQPixmap pix; - TQString field; - TQ_DUMMY_COMPARISON_OPERATOR( Column ) - }; - - PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t, - const TQValueList &rows, - const TQValueList &columns ); - - void execute(); - void unexecute(); - Type type() const { return PopulateTable; } - -private: - TQValueList oldRows, newRows; - TQValueList oldColumns, newColumns; - TQTable *table; - -}; - -class AddActionToToolBarCommand : public Command -{ -public: - AddActionToToolBarCommand( const TQString &n, FormWindow *fw, - TQAction *a, QDesignerToolBar *tb, int idx ); - - void execute(); - void unexecute(); - Type type() const { return AddActionToToolBar; } - -private: - TQAction *action; - QDesignerToolBar *toolBar; - int index; - -}; - -class RemoveActionFromToolBarCommand : public AddActionToToolBarCommand -{ -public: - RemoveActionFromToolBarCommand( const TQString &n, FormWindow *fw, - TQAction *a, QDesignerToolBar *tb, int idx ) - : AddActionToToolBarCommand( n, fw, a, tb, idx ) {} - - void execute() { AddActionToToolBarCommand::unexecute(); } - void unexecute() { AddActionToToolBarCommand::execute(); } - Type type() const { return RemoveActionFromToolBar; } - -}; - -// MenuCommands - -class AddToolBarCommand : public Command -{ -public: - AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw ); - - void execute(); - void unexecute(); - Type type() const { return AddToolBar; } - -protected: - QDesignerToolBar *toolBar; - TQMainWindow *mainWindow; - -}; - -class RemoveToolBarCommand : public AddToolBarCommand -{ -public: - RemoveToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, QDesignerToolBar *tb ) - : AddToolBarCommand( n, fw, mw ) { toolBar = tb; } - - void execute() { AddToolBarCommand::unexecute(); } - void unexecute() { AddToolBarCommand::execute(); } - Type type() const { return RemoveToolBar; } - -}; - -struct TQWidgetContainerInterfacePrivate; - -class AddContainerPageCommand : public Command -{ -public: - AddContainerPageCommand( const TQString &n, FormWindow *fw, - TQWidget *c, const TQString &label ); - - ~AddContainerPageCommand(); - - void execute(); - void unexecute(); - Type type() const { return AddContainerPage; } - -private: - TQString wClassName; - TQWidget *container; - int index; - TQString pageLabel; - TQWidget *page; - TQWidgetContainerInterfacePrivate *wiface; - -}; - -class DeleteContainerPageCommand : public Command -{ -public: - DeleteContainerPageCommand( const TQString &n, FormWindow *fw, - TQWidget *container, int index ); - ~DeleteContainerPageCommand(); - - void execute(); - void unexecute(); - Type type() const { return DeleteContainerPage; } - -private: - TQString wClassName; - TQWidget *container; - int index; - TQString pageLabel; - TQWidget *page; - TQWidgetContainerInterfacePrivate *wiface; - -}; - -class RenameContainerPageCommand : public Command -{ -public: - RenameContainerPageCommand( const TQString &n, FormWindow *fw, - TQWidget *container, int index, - const TQString &label ); - ~RenameContainerPageCommand(); - - void execute(); - void unexecute(); - Type type() const { return RenameContainerPage; } - -private: - TQString wClassName; - TQWidget *container; - int index; - TQString oldLabel, newLabel; - TQWidgetContainerInterfacePrivate *wiface; - -}; - -class AddActionToPopupCommand : public Command -{ -public: - AddActionToPopupCommand( const TQString &n, - FormWindow *fw, - PopupMenuEditor *m, - PopupMenuEditorItem *i, - int idx = -1 ); - void execute(); - void unexecute(); - Type type() const { return AddActionToPopup; } -protected: - TQString constructName() const; - PopupMenuEditor *menu; - PopupMenuEditorItem *item; - int index; -private: -}; - -class RemoveActionFromPopupCommand : public AddActionToPopupCommand -{ -public: - RemoveActionFromPopupCommand( const TQString &n, - FormWindow *fw, - PopupMenuEditor *m, - int idx ); - void execute(); - void unexecute(); - Type type() const { return RemoveActionFromPopup; } -protected: -private: -}; - -class ExchangeActionInPopupCommand : public Command -{ -public: - ExchangeActionInPopupCommand( const TQString &n, - FormWindow *fw, - PopupMenuEditor *m, - int a, - int b ); - void execute(); - void unexecute(); - Type type() const { return ExchangeActionInPopup; } -protected: -private: - PopupMenuEditor *menu; - int c; - int d; -}; -/* -class MoveActionInPopupCommand : public Command -{ -public: - MoveActionInPopupCommand( const TQString &n, - FormWindow *fw, - PopupMenuEditor *m, - int a, - int b ); - void execute(); - void unexecute(); - Type type() const { return MoveActionInPopup; } -protected: -private: - PopupMenuEditor *menu; - int from; - int to; -}; -*/ -class ActionCommand : public Command -{ -public: - ActionCommand( const TQString &n, - FormWindow *fw, - TQAction *a ) - : Command( n, fw ), action( a ) { } - virtual Type type() const = 0; -protected: - ActionEditor *actionEditor(); - TQAction *action; -}; - -class RenameActionCommand : public ActionCommand -{ -public: - RenameActionCommand( const TQString &n, - FormWindow *fw, - TQAction *a, - PopupMenuEditor *m, - TQString nm ); - void execute(); - void unexecute(); - Type type() const { return RenameAction; } -private: - PopupMenuEditor *menu; - TQString newName; - TQString oldName; -}; - -class SetActionIconsCommand : public ActionCommand -{ -public: - SetActionIconsCommand( const TQString &n, - FormWindow *fw, - TQAction *a, - PopupMenuEditor *m, - TQIconSet &icons ); - void execute(); - void unexecute(); - Type type() const { return SetActionIcons; } -protected: - void updateActionEditorItem(); -private: - PopupMenuEditor *menu; - TQIconSet newIcons; - TQIconSet oldIcons; -}; - -class AddMenuCommand : public Command -{ -public: - AddMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - MenuBarEditorItem *i, - int idx = -1 ); - - AddMenuCommand( const TQString &n, - FormWindow *fw, - TQMainWindow *mw, - const TQString &nm = "Menu" ); - - void execute(); - void unexecute(); - Type type() const { return AddMenu; } -protected: - MenuBarEditor *mb; - MenuBarEditorItem *item; - TQString name; - int index; -private: -}; - -class RemoveMenuCommand : public AddMenuCommand -{ -public: - RemoveMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - int idx ); - void execute(); - void unexecute(); - Type type() const { return RemoveMenu; } -protected: -private: -}; - -class ExchangeMenuCommand : public Command -{ -public: - ExchangeMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - int i, - int j ); - void execute(); - void unexecute(); - Type type() const { return ExchangeMenu; } -protected: -private: - MenuBarEditor *bar; - int k; - int l; -}; - - -class MoveMenuCommand : public Command -{ -public: - MoveMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - int i, - int j ); - void execute(); - void unexecute(); - Type type() const { return MoveMenu; } -protected: -private: - MenuBarEditor *bar; - int from; - int to; -}; - -class RenameMenuCommand : public Command -{ -public: - RenameMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *m, - TQString nm, - MenuBarEditorItem *i ); - void execute(); - void unexecute(); - Type type() const { return RenameMenu; } - static TQString makeLegal( const TQString &str ); -private: - MenuBarEditor *bar; - MenuBarEditorItem *item; - TQString newName; - TQString oldName; -}; - -class AddToolBoxPageCommand : public Command -{ -public: - AddToolBoxPageCommand( const TQString &n, FormWindow *fw, - TQToolBox *tw, const TQString &label ); - - void execute(); - void unexecute(); - Type type() const { return AddToolBoxPage; } - -private: - TQToolBox *toolBox; - int index; - TQWidget *toolBoxPage; - TQString toolBoxLabel; - -}; - -class DeleteToolBoxPageCommand : public Command -{ -public: - DeleteToolBoxPageCommand( const TQString &n, FormWindow *fw, - TQToolBox *tw, TQWidget *page ); - - void execute(); - void unexecute(); - Type type() const { return DeleteToolBoxPage; } - -private: - TQToolBox *toolBox; - int index; - TQWidget *toolBoxPage; - TQString toolBoxLabel; - -}; - -#endif diff --git a/tdevdesigner/designer/configtoolboxdialog.ui b/tdevdesigner/designer/configtoolboxdialog.ui deleted file mode 100644 index 226cdd35..00000000 --- a/tdevdesigner/designer/configtoolboxdialog.ui +++ /dev/null @@ -1,326 +0,0 @@ - -ConfigToolboxDialog -********************************************************************* -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - ConfigToolboxDialog - - - - 0 - 0 - 403 - 467 - - - - Configure Toolbox - - - - unnamed - - - - Layout2 - - - - unnamed - - - - Spacer2 - - - Horizontal - - - Expanding - - - - 342 - 0 - - - - - - PushButton3 - - - &OK - - - true - - - - - PushButton4 - - - &Cancel - - - - - - - Layout4 - - - - unnamed - - - - buttonAdd - - - false - - - &Add - - - - - Spacer3 - - - Horizontal - - - Expanding - - - - 111 - 0 - - - - - - - Available Tools - - - true - - - true - - - - listViewTools - - - Extended - - - LastColumn - - - - - - - Layout5 - - - - unnamed - - - - buttonRemove - - - false - - - &Remove - - - - - - Common Widgets Page - - - true - - - true - - - - listViewCommon - - - Extended - - - LastColumn - - - - - buttonDown - - - false - - - - - - "designer_s_down.png" - - - - - Spacer4 - - - Horizontal - - - Expanding - - - - 41 - 0 - - - - - - buttonUp - - - false - - - - - - "designer_s_up.png" - - - - - - - - - buttonAdd - clicked() - ConfigToolboxDialog - addTool() - - - buttonRemove - clicked() - ConfigToolboxDialog - removeTool() - - - buttonUp - clicked() - ConfigToolboxDialog - moveToolUp() - - - buttonDown - clicked() - ConfigToolboxDialog - moveToolDown() - - - listViewTools - clicked(TQListViewItem*) - ConfigToolboxDialog - currentToolChanged(TQListViewItem*) - - - listViewCommon - clicked(TQListViewItem*) - ConfigToolboxDialog - currentCommonToolChanged(TQListViewItem*) - - - PushButton3 - clicked() - ConfigToolboxDialog - accept() - - - PushButton4 - clicked() - ConfigToolboxDialog - reject() - - - PushButton3 - clicked() - ConfigToolboxDialog - ok() - - - listViewTools - doubleClicked(TQListViewItem*) - ConfigToolboxDialog - addTool() - - - - configtoolboxdialog.ui.h - - - addTool() - removeTool() - moveToolUp() - moveToolDown() - currentToolChanged( TQListViewItem * i ) - currentCommonToolChanged( TQListViewItem * i ) - ok() - - - init() - - - myiconloader.h - -BarIcon2 - - - diff --git a/tdevdesigner/designer/configtoolboxdialog.ui.h b/tdevdesigner/designer/configtoolboxdialog.ui.h deleted file mode 100644 index 7dcd6530..00000000 --- a/tdevdesigner/designer/configtoolboxdialog.ui.h +++ /dev/null @@ -1,215 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "mainwindow.h" -#include "widgetaction.h" -#include "listviewdnd.h" -#include - -void ConfigToolboxDialog::init() -{ - listViewTools->setSorting( -1 ); - listViewCommon->setSorting( -1 ); - - ListViewDnd *toolsDnd = new ListViewDnd( listViewTools ); - toolsDnd->setDragMode( ListViewDnd::External | ListViewDnd::NullDrop | ListViewDnd::Flat ); - - ListViewDnd *commonDnd = new ListViewDnd( listViewCommon ); - commonDnd->setDragMode( ListViewDnd::Both | ListViewDnd::Move | ListViewDnd::Flat ); - - TQObject::connect( toolsDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ), - commonDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) ); - TQObject::connect( commonDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ), - commonDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) ); - - TQDict groups; - TQAction *a; - for ( a = MainWindow::self->toolActions.last(); - a; - a = MainWindow::self->toolActions.prev() ) { - TQString grp = ( (WidgetAction*)a )->group(); - TQListViewItem *parent = groups.find( grp ); - if ( !parent ) { - parent = new TQListViewItem( listViewTools ); - parent->setText( 0, grp ); - parent->setOpen( TRUE ); - groups.insert( grp, parent ); - } - TQListViewItem *i = new TQListViewItem( parent ); - i->setText( 0, a->text() ); - i->setPixmap( 0, a->iconSet().pixmap() ); - } - for ( a = MainWindow::self->commonWidgetsPage.last(); a; - a = MainWindow::self->commonWidgetsPage.prev() ) { - TQListViewItem *i = new TQListViewItem( listViewCommon ); - i->setText( 0, a->text() ); - i->setPixmap( 0, a->iconSet().pixmap() ); - } - -} - - -void ConfigToolboxDialog::addTool() -{ - TQListView *src = listViewTools; - - bool addKids = FALSE; - TQListViewItem *nextSibling = 0; - TQListViewItem *nextParent = 0; - TQListViewItemIterator it = src->firstChild(); - for ( ; *it; it++ ) { - // Hit the nextSibling, turn of child processing - if ( (*it) == nextSibling ) - addKids = FALSE; - - if ( (*it)->isSelected() ) { - if ( (*it)->childCount() == 0 ) { - // Selected, no children - TQListViewItem *i = new TQListViewItem( listViewCommon, listViewCommon->lastItem() ); - i->setText( 0, (*it)->text(0) ); - i->setPixmap( 0, *((*it)->pixmap(0)) ); - listViewCommon->setCurrentItem( i ); - listViewCommon->ensureItemVisible( i ); - } else if ( !addKids ) { - // Children processing not set, so set it - // Also find the item were we shall quit - // processing children...if any such item - addKids = TRUE; - nextSibling = (*it)->nextSibling(); - nextParent = (*it)->parent(); - while ( nextParent && !nextSibling ) { - nextSibling = nextParent->nextSibling(); - nextParent = nextParent->parent(); - } - } - } else if ( ((*it)->childCount() == 0) && addKids ) { - // Leaf node, and we _do_ process children - TQListViewItem *i = new TQListViewItem( listViewCommon, listViewCommon->lastItem() ); - i->setText( 0, (*it)->text(0) ); - i->setPixmap( 0, *((*it)->pixmap(0)) ); - listViewCommon->setCurrentItem( i ); - listViewCommon->ensureItemVisible( i ); - } - } -} - - -void ConfigToolboxDialog::removeTool() -{ - TQListViewItemIterator it = listViewCommon->firstChild(); - while ( *it ) { - if ( (*it)->isSelected() ) - delete (*it); - else - it++; - } -} - - -void ConfigToolboxDialog::moveToolUp() -{ - TQListViewItem *next = 0; - TQListViewItem *item = listViewCommon->firstChild(); - for ( int i = 0; i < listViewCommon->childCount(); ++i ) { - next = item->itemBelow(); - if ( item->isSelected() && (i > 0) && !item->itemAbove()->isSelected() ) - item->itemAbove()->moveItem( item ); - item = next; - } -} - - -void ConfigToolboxDialog::moveToolDown() -{ - int count = listViewCommon->childCount(); - TQListViewItem *next = 0; - TQListViewItem *item = listViewCommon->lastItem(); - for ( int i = 0; i < count; ++i ) { - next = item->itemAbove(); - if ( item->isSelected() && (i > 0) && !item->itemBelow()->isSelected() ) - item->moveItem( item->itemBelow() ); - item = next; - } - - // TQListViewItem *item = listViewCommon->firstChild(); - // for ( int i = 0; i < listViewCommon->childCount(); ++i ) { - //if ( item == listViewCommon->currentItem() ) { - // item->moveItem( item->itemBelow() ); - // currentCommonToolChanged( item ); - // break; - //} - //item = item->itemBelow(); - // } -} - - -void ConfigToolboxDialog::currentToolChanged( TQListViewItem *i ) -{ - bool canAdd = FALSE; - TQListViewItemIterator it = listViewTools->firstChild(); - for ( ; *it; it++ ) { - if ( (*it)->isSelected() ) { - canAdd = TRUE; - break; - } - } - buttonAdd->setEnabled( canAdd || ( i && i->isSelected() ) ); -} - - -void ConfigToolboxDialog::currentCommonToolChanged( TQListViewItem *i ) -{ - buttonUp->setEnabled( (bool) (i && i->itemAbove()) ); - buttonDown->setEnabled( (bool) (i && i->itemBelow()) ); - - bool canRemove = FALSE; - TQListViewItemIterator it = listViewCommon->firstChild(); - for ( ; *it; it++ ) { - if ( (*it)->isSelected() ) { - canRemove = TRUE; - break; - } - } - buttonRemove->setEnabled( canRemove || ( i && i->isSelected() ) ); -} - - -void ConfigToolboxDialog::ok() -{ - MainWindow::self->commonWidgetsPage.clear(); - TQListViewItem *item = listViewCommon->firstChild(); - for ( int j = 0; j < listViewCommon->childCount(); item = item->itemBelow(), ++j ) { - TQAction *a = 0; - for ( a = MainWindow::self->toolActions.last(); - a; - a = MainWindow::self->toolActions.prev() ) { - if ( a->text() == item->text( 0 ) ) - break; - } - if ( a ) - MainWindow::self->commonWidgetsPage.insert( j, a ); - } -} diff --git a/tdevdesigner/designer/connectiondialog.ui b/tdevdesigner/designer/connectiondialog.ui deleted file mode 100644 index 51995633..00000000 --- a/tdevdesigner/designer/connectiondialog.ui +++ /dev/null @@ -1,219 +0,0 @@ - -ConnectionDialog -********************************************************************* -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - ConnectionDialog - - - - 0 - 0 - 600 - 365 - - - - View & Edit Connections - - - - unnamed - - - 11 - - - 6 - - - - PushButton1 - - - &New - - - - - TextLabel1 - - - - 5 - 4 - 0 - 0 - - - - &Connections: - - - connectionsTable - - - - - PushButton2 - - - &Delete - - - - - PushButton3 - - - &Cancel - - - - - PushButton7 - - - &OK - - - true - - - - - Spacer1 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - buttonEditSlots - - - &Edit Slots... - - - - - connectionsTable - - - - - - - ConnectionTable -
    connectiontable.h
    - - 50 - 50 - - 0 - - 7 - 7 - 0 - 0 - - "image0" -
    -
    - - - 789c9597c972e3480e40eff5158ec2ada203cd3549c6c41cbcc9b6bccabbddd1078014bdcb9b6449ee987f9f240072caac9e4357d6c1cf5812890490f4ef3f562e8ff6577efcfeed7d4ad3bb72a5bca5b7951fd5ece969f9c79ffffeebdbf7285a69fec7f14af4fdb76fdf47d39572e5e079326e00c10304f24ff8b9c7d463ee71d9e3aac7e31ed70d67dc2ce1cb9e7cd0e3c957863eaff778d4b3bfe8c97be781a71eaff5f8e82bf37ecfff4dc314364b58fdb966096ff6ecf77af6b70d1771b3841f1b8ef366099ff7ec17bdf8faf7970847cd12f9b2e344f8b563890f5e3a96fda0ea98c45fdc71299c765c354c67c249bb1fcd3a56ff271d8b3d9d1b271a0f1d742c725874acfe9d70eef3a9f65bc2e47fa3f16a7d55411d6a3e4e1b0e03bf349e8171144a7e49ceeb295239cb79c3384ccdff76c7b23f14c269e8ccdfa9716ef6b5b18f407857d88585e57bbf65b39f18971a0fc8fd7b6fc624f723e524f9e3d2b8d4f391d49ba74ae5bed585a3c8e49b1d6b7c929f701ca5e65feac10b9dd967c2519485a9dcaf33ce952110cea3caec23e53830f9863045b5ca79ae1c8741263cec58eb59ed390ecd3e378e8d651e44651c85527f20f51cd55eae5c1b27a1f823b9bf388c0b65b831a6b090fd24be384bc24098a6d65fb5ca29ed58fd5f35eccbaf34ff320f922819ab3e487e93d4b3d6eb9b711d4abda0f44352a685d5f39d709db2ca296c380dd2c238366ee5605c1acb3c96f2d3feff148ed25aeb0d1e955d60fd22f94a63178632df79d5d8fa95971d8b9cee5b8e647ec1d038567b40e1a4d567a9d73475b1f14ecb5a7f2cf94a9d4b343eba304e357e3814ce5c6afd22f33b2d5c6ee7295bb6fc4abda4e40af3f7d972a4f52df79bb223ebff79cb2a2736e650ce470fc2652b67b9cfb4726dff5d195776bead96adbf1e3bd67a9779928ebbfdc898357f34346ee7c3a0658d07359eba5922d7fbaebd3fdd6f6e3c567d96f9e4c22cb4780a63eb7f90f7c525596cf11c1a2791ce9bd8d869bd93e4dba55eaeefc781b1dd17ee1b9b3e4b3e9dcbfcc4107f9fc671a4ef9dcc139765763fa4f6943965947a7355b3c45eceebc65965fb851deb79655e662ecfcddf93716172999759966791f67f689ceb79e9a363951f1b9b3d1e76acf36fcf98544e529fdebc954b3f67d42ce1eb86f3465df3fb2e5c14a5d53b2b53a0f316773ad6f922f32c2fa9cd9fdc6f5e79d6f8768d13ebc79d96559fe47dcd6b8a63cdcfbb71126bfcd21f45e0f5f57dbb357691c63f342e2cbea063d597f7b808c9e6151e1993c573d1b2de0fc8fd1711151a1fdf187324f393671debfe92df22a134d67e93fb2a1cd93c05630ef4fe48f25d641c683de2b171a8f399ef3a56f989b1bd273c6dd9f697f7bcc85b7dca8da348be4f41fabf2838b1f7e9cc38d5f715e4fd2888439b9f53639ba72cf55a701b3f0c8cad3ff9de38b57c4bfd15a5678d6f646cfd87857166ef95f46b51f9fdf57c609cda7b756edcbee7ceb850a671c7faf7809e7fccb9d63b6c1b93d5f7ac63d5d7fcd41c245a8fabc685e68f1f8c49ef93e5bda4c0fbd7f9b16b4c5a9ff060ccf63e4b3d52c889c6433bc685da33195bbfc2bd31dbfc947aa5982bf37fddb1c623f39c7cbbda7c94f889cac4ea4df24f55c9367fe43da47159da3c907ea39ac74ebfdfe5fe39e0dac9f71f4abed87fb02993d42b475562effb5dcb36ff243fec3f3f327d4fd1384db5ffd68c9db1bc579cb6faf8619cdafe321f39f39f33721fb46bec4cfe699c19cf3bd6f3ad1ae7c6f2de71ce2549fe71a9dcc917c685324b7eb8aac6767ff27dc763cf92afd1b4590848c8586285e3deaafc6fd94b61346df5b1c61bbcc53bbcff9bf5808ff884136ff5acfadef70dbee02bbee13b4e71861f38c7052ef1d3af555cc375dcc04d1c6069fae47dbfe2166ee30e0e7117f7701f0ff0108f7084c77882a77886e7788197a6cf3e922baf7d8d018618618c895f293acc30c702478000403831fdd247f90e8c019450610c63a8e1066efd4f15dcc13d3cc0a3d77f8256bff2fa531cc233bcc02bbcc13b4c61061f3087052ce11356c5ff1aac9bfed8ebcf701736bc741306b005dbb00343d8853def611f0ee0d0eb1fc1e827fd0f38861338f5becfe01c2ee0d26b5ec13504de4708d12ffa7388bd2481141c64907bed020f0909604944fc8bfe924a4ca8a231d5e2fb956ee896eee8deeb3fd0e32ffa0b7ac29426f041fed4f442afdee28dde694a33faa0f9aff1d0829618d327add21aadd3066dfafd06b445dbb443c3be3eedd21eed7bfd033aa4231ad1319dd0299dd1395dd0255dfd8dff6b0a28c4042af27fcc907fafc879ed73ff199053f145bfc207463c666062e6d2dfd9d2db2db9a20b1e73cd377cfbe5be4a5fb1eb7cc7f7fcc08ffcc4137ee6177ee5377ee729cff883e7bcf8a91ed8d7f7069ef1923f7995d7789d37789307bc4557bccd3b3ce45ddefba9defc4fbebecfe1fffce305eff1fe4ff50c3ea2015e00f93dd7fcb9beae35ff5bf2da5dbf788b676f71891398c03a8c7a6b1d267effcbfff5e33fe8f7fffcebdb7f01520e2ea3 - - - - - PushButton1 - clicked() - ConnectionDialog - addConnection() - - - PushButton7 - clicked() - ConnectionDialog - okClicked() - - - PushButton3 - clicked() - ConnectionDialog - cancelClicked() - - - PushButton2 - clicked() - ConnectionDialog - deleteClicked() - - - buttonEditSlots - clicked() - ConnectionDialog - editSlots() - - - - tqptrlist.h - connectionitems.h - connectiondialog.ui.h - - - TQPtrList<ConnectionContainer> connections; - TQObject *defaultSender; - TQObject *defaultReceiver; - - - init() - addConnection() - addConnection( TQObject * sender, TQObject * receiver, const TQString & signal, const TQString & slot ) - updateConnectionState( ConnectionContainer * c ) - okClicked() - cancelClicked() - deleteClicked() - editSlots() - setDefault( TQObject * sender, TQObject * receiver ) - updateEditSlotsButton() - updateConnectionContainers() - ensureConnectionVisible() - - -
    diff --git a/tdevdesigner/designer/connectiondialog.ui.h b/tdevdesigner/designer/connectiondialog.ui.h deleted file mode 100644 index 25a5d5f2..00000000 --- a/tdevdesigner/designer/connectiondialog.ui.h +++ /dev/null @@ -1,318 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you wish to add, delete or rename slots use TQt Designer which will -** update this file, preserving your code. Create an init() slot in place of -** a constructor, and a destroy() slot in place of a destructor. -*****************************************************************************/ - -#include "mainwindow.h" -#include "formwindow.h" -#include "editfunctionsimpl.h" - -static const char *valid_connection[] = { - "16 14 7 1", - ". c none", - "# c #00c000", - "a c #008000", - "b c #004000", - "c c #000000", - "d c #c0fcc0", - "e c #400000", - "...............d", - "..............d#", - ".............d#a", - "............d#ab", - "...........d#abc", - "..da......d#abc.", - ".d##a....d#abe..", - "cba##a..d#abc...", - ".cba##ad#abe....", - "..eba###abe.....", - "...cba#abc......", - "....cbabc.......", - ".....cec........", - "................" -}; - -static const char * invalid_connection[] = { - "17 18 7 1", - " c None", - ". c #000000", - "+ c #C3C3C3", - "@ c #FFFFFF", - "# c #C00000", - "$ c #FFC0C0", - "% c #FF0000", - " ", - " . ", - " ... ", - " .+.. ", - " ...+@+.. ", - "..+@@@+#.. ", - ".@@@@$#%#.. ", - ".@@$$#%##.. ", - " .$%%%##.... ", - " .%%%##. .. ", - " .%#.. .. ", - " .. .. ", - " .. ", - " .. ", - " .. ", - " .. ", - " ", - " " -}; - -static TQPixmap *invalidConnection = 0; -static TQPixmap *validConnection = 0; - -void ConnectionDialog::init() -{ - connect( connectionsTable, TQT_SIGNAL( currentChanged( int, int ) ), - this, TQT_SLOT( updateEditSlotsButton() ) ); - connect( connectionsTable, TQT_SIGNAL( resorted() ), - this, TQT_SLOT( updateConnectionContainers() ) ); - buttonEditSlots->setEnabled( FALSE ); - - if ( !invalidConnection ) { - invalidConnection = new TQPixmap( invalid_connection ); - validConnection = new TQPixmap( valid_connection ); - } - - TQValueList conns = - MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); - for ( TQValueList::Iterator it = conns.begin(); - it != conns.end(); ++it ) { - ConnectionContainer *c = addConnection( (*it).sender, (*it).receiver, - (*it).signal, (*it).slot ); - c->setModified( FALSE ); - updateConnectionState( c ); - } - - defaultSender = defaultReceiver = 0; - connectionsTable->setCurrentCell( 0, 0 ); -} - -void ConnectionDialog::addConnection() -{ - addConnection( defaultSender, defaultReceiver, TQString(), TQString() ); - ensureConnectionVisible(); -} - -ConnectionContainer *ConnectionDialog::addConnection( TQObject *sender, TQObject *receiver, - const TQString &signal, - const TQString &slot ) -{ - connectionsTable->insertRows( connectionsTable->numRows() ); - - int row = connectionsTable->numRows() - 1; - SenderItem *se; - SignalItem *si; - ReceiverItem *re; - SlotItem *sl; - connectionsTable->setItem( row, 0, - ( se = new SenderItem( connectionsTable, - MainWindow::self->formWindow() ) ) ); - connectionsTable->setItem( row, 1, - ( si = new SignalItem( connectionsTable, - MainWindow::self->formWindow() ) ) ); - connectionsTable->setItem( row, 2, - ( re = new ReceiverItem( connectionsTable, - MainWindow::self->formWindow() ) ) ); - connectionsTable->setItem( row, 3, - ( sl = new SlotItem( connectionsTable, - MainWindow::self->formWindow() ) ) ); - - si->setSender( se ); - re->setSender( se ); - sl->setSender( se ); - se->setSender( se ); - - se->setSignal( si ); - re->setSignal( si ); - sl->setSignal( si ); - si->setSignal( si ); - - se->setReceiver( re ); - si->setReceiver( re ); - sl->setReceiver( re ); - re->setReceiver( re ); - - se->setSlot( sl ); - si->setSlot( sl ); - re->setSlot( sl ); - sl->setSlot( sl ); - - connect( re, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ), - this, TQT_SLOT( updateEditSlotsButton() ) ); - - ConnectionContainer *c = new ConnectionContainer( TQT_TQOBJECT(this), se, si, re, sl, row ); - connections.append( c ); - connect( c, TQT_SIGNAL( changed( ConnectionContainer * ) ), - this, TQT_SLOT( updateConnectionState( ConnectionContainer * ) ) ); - - connectionsTable->setCurrentCell( row, 0 ); - - connectionsTable->verticalHeader()->setLabel( row, *invalidConnection, TQString() ); - - if ( sender ) - se->setSenderEx( sender ); - defaultSender = sender; - if ( receiver ) - re->setReceiverEx( receiver ); - defaultReceiver = receiver; - - if ( !signal.isEmpty() && !slot.isEmpty() ) { - si->setCurrentItem( signal ); - sl->signalChanged( signal ); - sl->setCurrentItem( slot ); - } - - c->setModified( TRUE ); - return c; -} - -void ConnectionDialog::updateConnectionState( ConnectionContainer *c ) -{ - c->repaint(); - if ( c->isValid() ) - connectionsTable->verticalHeader()->setLabel( c->row(), - *validConnection, TQString() ); - else - connectionsTable->verticalHeader()->setLabel( c->row(), - *invalidConnection, TQString() ); -} - - -void ConnectionDialog::okClicked() -{ - TQValueList oldConnections = - MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); - TQPtrList newConnectionCmds; - TQPtrList oldConnectionCmds; - for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) { - MetaDataBase::Connection conn; - - // find sender widget - conn.sender = MainWindow::self->formWindow()->child( c->senderItem()->currentText() ); - if ( !conn.sender ) // if no sender widget, find sender action - conn.sender = MainWindow::self->formWindow()->findAction( c->senderItem()->currentText() ); - - // find receiver widget - conn.receiver = MainWindow::self->formWindow()->child( c->receiverItem()->currentText() ); - if ( !conn.receiver ) // if no receiver widget, find receiver action - conn.receiver = MainWindow::self->formWindow()->findAction( c->receiverItem()->currentText() ); - - conn.signal = c->signalItem()->currentText(); - conn.slot = c->slotItem()->currentText(); - AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Signal/Slot " - "Connection" ), - MainWindow::self->formWindow(), - conn ); - newConnectionCmds.append( cmd ); - } - - - TQValueList conns = - MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); - for ( TQValueList::Iterator it = conns.begin(); - it != conns.end(); ++it ) { - RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Signal/Slot " - "Connection" ), - MainWindow::self-> - formWindow(), *it ); - oldConnectionCmds.append( cmd ); - } - - MacroCommand *cmd1 = new MacroCommand( i18n( "Add Signal/Slot Connections" ), - MainWindow::self->formWindow(), - newConnectionCmds ); - MacroCommand *cmd2 = new MacroCommand( i18n( "Remove Signal/Slot Connections" ), - MainWindow::self->formWindow(), - oldConnectionCmds ); - TQPtrList cmds; - cmds.append( cmd2 ); - cmds.append( cmd1 ); - MacroCommand *cmd = new MacroCommand( i18n( "Edit Signal/Slot Connections" ), - MainWindow::self->formWindow(), - cmds ); - MainWindow::self->formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - - accept(); -} - - -void ConnectionDialog::cancelClicked() -{ - reject(); -} - - -void ConnectionDialog::deleteClicked() -{ - int cr = connectionsTable->currentRow(); - connections.remove( cr ); - connectionsTable->removeRow( cr ); - int i = 0; - for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) - c->setRow( i++ ); -} - - -void ConnectionDialog::editSlots() -{ - EditFunctions dlg( this, MainWindow::self->formWindow(), TRUE ); - dlg.exec(); - int currentCol = connectionsTable->currentColumn(); - connectionsTable->setCurrentCell( connectionsTable->currentRow(), 0 ); - for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) { - if ( c->receiverItem()->currentText() != - TQString( MainWindow::self->formWindow()->mainContainer()->name() ) ) - continue; - c->slotItem()->customSlotsChanged(); - } - connectionsTable->setCurrentCell( connectionsTable->currentRow(), currentCol ); -} - -void ConnectionDialog::setDefault( TQObject *sender, TQObject *receiver ) -{ - defaultSender = sender; - defaultReceiver = receiver; -} - -void ConnectionDialog::updateEditSlotsButton() -{ - if ( connectionsTable->currentRow() < 0 || - connectionsTable->currentRow() > (int)connections.count() - 1 ) - return; - ConnectionContainer *c = connections.at( connectionsTable->currentRow() ); - if ( !c || !c->receiverItem() ) - return; - buttonEditSlots->setEnabled( c->receiverItem()->currentText() == - TQString( MainWindow::self->formWindow()-> - mainContainer()->name() ) ); -} - -void ConnectionDialog::updateConnectionContainers() -{ - TQPtrList newContainers; - for ( int i = 0; i < connectionsTable->numRows(); ++i ) { - for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) { - if ( c->senderItem() == connectionsTable->item( i, 0 ) ) { - newContainers.append( c ); - c->setRow( i ); - updateConnectionState(c); - break; - } - } - } - connections = newContainers; - updateEditSlotsButton(); -} - -void ConnectionDialog::ensureConnectionVisible() -{ - connectionsTable->ensureCellVisible( connectionsTable->numRows() - 1, 0 ); -} diff --git a/tdevdesigner/designer/connectionitems.cpp b/tdevdesigner/designer/connectionitems.cpp deleted file mode 100644 index 12b03a1d..00000000 --- a/tdevdesigner/designer/connectionitems.cpp +++ /dev/null @@ -1,517 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "connectionitems.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "metadatabase.h" -#include "widgetfactory.h" -#include "project.h" -#include -#include -#include -#include -#include -#include -#include - -static const char* const ignore_slots[] = { - "destroyed()", - "setCaption(const TQString&)", - "setIcon(const TQPixmap&)", - "setIconText(const TQString&)", - "setMouseTracking(bool)", - "clearFocus()", - "setUpdatesEnabled(bool)", - "update()", - "update(int,int,int,int)", - "update(const TQRect&)", - "repaint()", - "repaint(bool)", - "repaint(int,int,int,int,bool)", - "repaint(const TQRect&,bool)", - "repaint(const TQRegion&,bool)", - "show()", - "hide()", - "iconify()", - "showMinimized()", - "showMaximized()", - "showFullScreen()", - "showNormal()", - "polish()", - "constPolish()", - "raise()", - "lower()", - "stackUnder(TQWidget*)", - "move(int,int)", - "move(const TQPoint&)", - "resize(int,int)", - "resize(const TQSize&)", - "setGeometry(int,int,int,int)", - "setGeometry(const TQRect&)", - "focusProxyDestroyed()", - "showExtension(bool)", - "setUpLayout()", - "showDockMenu(const TQPoint&)", - "init()", - "destroy()", - "deleteLater()", - 0 -}; - -ConnectionItem::ConnectionItem( TQTable *table, FormWindow *fw ) - : TQComboTableItem( table, TQStringList(), FALSE ), formWindow( fw ), conn( 0 ) -{ - setReplaceable( FALSE ); -} - -void ConnectionItem::senderChanged( TQObject * ) -{ - emit changed(); - TQWidget *w = table()->cellWidget( row(), col() ); - if ( w ) - setContentFromEditor( w ); -} - -void ConnectionItem::receiverChanged( TQObject * ) -{ - emit changed(); - TQWidget *w = table()->cellWidget( row(), col() ); - if ( w ) - setContentFromEditor( w ); -} - -void ConnectionItem::signalChanged( const TQString & ) -{ - emit changed(); - TQWidget *w = table()->cellWidget( row(), col() ); - if ( w ) - setContentFromEditor( w ); -} - -void ConnectionItem::slotChanged( const TQString & ) -{ - emit changed(); - TQWidget *w = table()->cellWidget( row(), col() ); - if ( w ) - setContentFromEditor( w ); -} - -void ConnectionItem::setSender( SenderItem *i ) -{ - connect( i, TQT_SIGNAL( currentSenderChanged( TQObject * ) ), - this, TQT_SLOT( senderChanged( TQObject * ) ) ); -} - -void ConnectionItem::setReceiver( ReceiverItem *i ) -{ - connect( i, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ), - this, TQT_SLOT( receiverChanged( TQObject * ) ) ); -} - -void ConnectionItem::setSignal( SignalItem *i ) -{ - connect( i, TQT_SIGNAL( currentSignalChanged( const TQString & ) ), - this, TQT_SLOT( signalChanged( const TQString & ) ) ); -} - -void ConnectionItem::setSlot( SlotItem *i ) -{ - connect( i, TQT_SIGNAL( currentSlotChanged( const TQString & ) ), - this, TQT_SLOT( slotChanged( const TQString & ) ) ); -} - -void ConnectionItem::paint( TQPainter *p, const TQColorGroup &cg, - const TQRect &cr, bool selected ) -{ - p->fillRect( 0, 0, cr.width(), cr.height(), - selected ? cg.brush( TQColorGroup::Highlight ) - : cg.brush( TQColorGroup::Base ) ); - - int w = cr.width(); - int h = cr.height(); - - int x = 0; - - if ( currentText()[0] == '<' ) - p->setPen( TQObject::red ); - else if ( selected ) - p->setPen( cg.highlightedText() ); - else - p->setPen( cg.text() ); - - TQFont f( p->font() ); - TQFont oldf( p->font() ); - if ( conn && conn->isModified() ) { - f.setBold( TRUE ); - p->setFont( f ); - } - - p->drawText( x + 2, 0, w - x - 4, h, alignment(), currentText() ); - p->setFont( oldf ); -} - -void ConnectionItem::setConnection( ConnectionContainer *c ) -{ - conn = c; -} - -// ------------------------------------------------------------------ - -static void appendChildActions( TQAction *action, TQStringList &lst ) -{ - TQObjectListIt it( action->childrenListObject() ); - while ( it.current() ) { - TQObject *o = it.current(); - ++it; - if ( !::tqqt_cast(o) ) - continue; - lst << o->name(); - if ( !o->childrenListObject().isEmpty() && ::tqqt_cast(o) ) - appendChildActions( (TQAction*)o, lst ); - } -} - -static TQStringList flatActions( const TQPtrList &l ) -{ - TQStringList lst; - - TQPtrListIterator it( l ); - while ( it.current() ) { - TQAction *action = it.current(); - lst << action->name(); - if ( !action->childrenListObject().isEmpty() && ::tqqt_cast(action) ) - appendChildActions( action, lst ); - ++it; - } - - return lst; -} - -// ------------------------------------------------------------------ - -SenderItem::SenderItem( TQTable *table, FormWindow *fw ) - : ConnectionItem( table, fw ) -{ - TQStringList lst; - - TQPtrDictIterator it( *formWindow->widgets() ); - while ( it.current() ) { - if ( lst.find( it.current()->name() ) != lst.end() ) { - ++it; - continue; - } - if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && - !::tqqt_cast(it.current()) && - !::tqqt_cast(it.current()) && - !::tqqt_cast(it.current()) && - qstrcmp( it.current()->name(), "central widget" ) != 0 ) { - lst << it.current()->name(); - } - ++it; - } - - lst += flatActions( formWindow->actionList() ); - - lst.prepend( "" ); - lst.sort(); - setStringList( lst ); -} - -TQWidget *SenderItem::createEditor() const -{ - TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); - cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); - connect( cb, TQT_SIGNAL( activated( const TQString & ) ), - this, TQT_SLOT( senderChanged( const TQString & ) ) ); - return cb; -} - -void SenderItem::setSenderEx( TQObject *sender ) -{ - setCurrentItem( sender->name() ); - emit currentSenderChanged( sender ); -} - -void SenderItem::senderChanged( const TQString &sender ) -{ - TQObject *o = formWindow->child( sender, TQOBJECT_OBJECT_NAME_STRING ); - if ( !o ) - o = formWindow->findAction( sender ); - if ( !o ) - return; - emit currentSenderChanged( o ); -} - - - -// ------------------------------------------------------------------ - -ReceiverItem::ReceiverItem( TQTable *table, FormWindow *fw ) - : ConnectionItem( table, fw ) -{ - TQStringList lst; - - TQPtrDictIterator it( *formWindow->widgets() ); - while ( it.current() ) { - if ( lst.find( it.current()->name() ) != lst.end() ) { - ++it; - continue; - } - if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && - !::tqqt_cast(it.current()) && - !::tqqt_cast(it.current()) && - !::tqqt_cast(it.current()) && - qstrcmp( it.current()->name(), "central widget" ) != 0 ) { - lst << it.current()->name(); - } - ++it; - } - - lst += flatActions( formWindow->actionList() ); - - lst.prepend( "" ); - lst.sort(); - setStringList( lst ); -} - -TQWidget *ReceiverItem::createEditor() const -{ - TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); - cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); - connect( cb, TQT_SIGNAL( activated( const TQString & ) ), - this, TQT_SLOT( receiverChanged( const TQString & ) ) ); - return cb; -} - -void ReceiverItem::setReceiverEx( TQObject *receiver ) -{ - setCurrentItem( receiver->name() ); - emit currentReceiverChanged( receiver ); -} - -void ReceiverItem::receiverChanged( const TQString &receiver ) -{ - TQObject *o = formWindow->child( receiver, TQOBJECT_OBJECT_NAME_STRING ); - if ( !o ) - o = formWindow->findAction( receiver ); - if ( !o ) - return; - emit currentReceiverChanged( o ); -} - - - -// ------------------------------------------------------------------ - -SignalItem::SignalItem( TQTable *table, FormWindow *fw ) - : ConnectionItem( table, fw ) -{ - TQStringList lst; - lst << ""; - lst.sort(); - setStringList( lst ); -} - -void SignalItem::senderChanged( TQObject *sender ) -{ - TQStrList sigs = sender->metaObject()->signalNames( TRUE ); - sigs.remove( "destroyed()" ); - sigs.remove( "destroyed(TQObject*)" ); - sigs.remove( "accessibilityChanged(int)" ); - sigs.remove( "accessibilityChanged(int,int)" ); - - TQStringList lst = TQStringList::fromStrList( sigs ); - - if ( ::tqqt_cast(sender) ) { - MetaDataBase::CustomWidget *w = ( (CustomWidget*)sender )->customWidget(); - for ( TQValueList::Iterator it = w->lstSignals.begin(); - it != w->lstSignals.end(); ++it ) - lst << MetaDataBase::normalizeFunction( *it ); - } - - if ( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(formWindow->mainContainer()) ) { - TQStringList extra = MetaDataBase::signalList( TQT_TQOBJECT(formWindow) ); - if ( !extra.isEmpty() ) - lst += extra; - } - - lst.prepend( "" ); - - lst.sort(); - setStringList( lst ); - - ConnectionItem::senderChanged( sender ); -} - -TQWidget *SignalItem::createEditor() const -{ - TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); - cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); - connect( cb, TQT_SIGNAL( activated( const TQString & ) ), - this, TQT_SIGNAL( currentSignalChanged( const TQString & ) ) ); - return cb; -} - -// ------------------------------------------------------------------ - -SlotItem::SlotItem( TQTable *table, FormWindow *fw ) - : ConnectionItem( table, fw ) -{ - TQStringList lst; - lst << ""; - lst.sort(); - setStringList( lst ); - - lastReceiver = 0; - lastSignal = ""; -} - -void SlotItem::receiverChanged( TQObject *receiver ) -{ - lastReceiver = receiver; - updateSlotList(); - ConnectionItem::receiverChanged( receiver ); -} - -void SlotItem::signalChanged( const TQString &signal ) -{ - lastSignal = signal; - updateSlotList(); - ConnectionItem::signalChanged( signal ); -} - -bool SlotItem::ignoreSlot( const char* slot ) const -{ -#ifndef TQT_NO_SQL - if ( qstrcmp( slot, "update()" ) == 0 && - ::tqqt_cast(lastReceiver) ) - return FALSE; -#endif - - for ( int i = 0; ignore_slots[i]; i++ ) { - if ( qstrcmp( slot, ignore_slots[i] ) == 0 ) - return TRUE; - } - - if ( !formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) { - if ( qstrcmp( slot, "close()" ) == 0 ) - return TRUE; - } - - if ( qstrcmp( slot, "setFocus()" ) == 0 ) - if ( lastReceiver->isWidgetType() && - ( (TQWidget*)lastReceiver )->focusPolicy() == TQ_NoFocus ) - return TRUE; - - return FALSE; -} - -void SlotItem::updateSlotList() -{ - TQStringList lst; - if ( !lastReceiver || lastSignal == "" ) { - lst << ""; - lst.sort(); - setStringList( lst ); - return; - } - - TQString signal = MetaDataBase::normalizeFunction( lastSignal ); - int n = lastReceiver->metaObject()->numSlots( TRUE ); - TQStringList slts; - - for( int i = 0; i < n; ++i ) { - // accept only public slots. For the form window, also accept protected slots - const TQMetaData* md = lastReceiver->metaObject()->slot( i, TRUE ); - if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->tqt_mo_access == TQMetaData::Public) || - (formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) && - lastReceiver->metaObject()->slot(i, TRUE)->tqt_mo_access == - TQMetaData::Protected) ) && - !ignoreSlot( md->tqt_mo_ci_name ) && - checkConnectArgs( signal.latin1(), lastReceiver, md->tqt_mo_ci_name ) ) - if ( lst.find( md->tqt_mo_ci_name ) == lst.end() ) - lst << MetaDataBase::normalizeFunction( md->tqt_mo_ci_name ); - } - - LanguageInterface *iface = - MetaDataBase::languageInterface( formWindow->project()->language() ); - if ( !iface || iface->supports( LanguageInterface::ConnectionsToCustomSlots ) ) { - if ( formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) { - TQValueList moreSlots = MetaDataBase::slotList( TQT_TQOBJECT(formWindow) ); - if ( !moreSlots.isEmpty() ) { - for ( TQValueList::Iterator it = moreSlots.begin(); - it != moreSlots.end(); ++it ) { - TQCString s = (*it).function; - if ( !s.data() ) - continue; - s = MetaDataBase::normalizeFunction( s ); - if ( checkConnectArgs( signal.latin1(), lastReceiver, s ) ) { - if ( lst.find( (*it).function ) == lst.end() ) - lst << s; - } - } - } - } - } - - if ( ::tqqt_cast(lastReceiver) ) { - MetaDataBase::CustomWidget *w = ( (CustomWidget*)lastReceiver )->customWidget(); - for ( TQValueList::Iterator it = w->lstSlots.begin(); - it != w->lstSlots.end(); ++it ) { - TQCString s = (*it).function; - if ( !s.data() ) - continue; - s = MetaDataBase::normalizeFunction( s ); - if ( checkConnectArgs( signal.latin1(), lastReceiver, s ) ) { - if ( lst.find( (*it).function ) == lst.end() ) - lst << s; - } - } - } - - lst.prepend( "" ); - lst.sort(); - setStringList( lst ); -} - -TQWidget *SlotItem::createEditor() const -{ - TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); - cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); - connect( cb, TQT_SIGNAL( activated( const TQString & ) ), - this, TQT_SIGNAL( currentSlotChanged( const TQString & ) ) ); - return cb; -} - -void SlotItem::customSlotsChanged() -{ - TQString currSlot = currentText(); - updateSlotList(); - setCurrentItem( "" ); - setCurrentItem( currSlot ); - emit currentSlotChanged( currentText() ); -} diff --git a/tdevdesigner/designer/connectionitems.h b/tdevdesigner/designer/connectionitems.h deleted file mode 100644 index fe5e276d..00000000 --- a/tdevdesigner/designer/connectionitems.h +++ /dev/null @@ -1,226 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef CONNECTIONITEMS_H -#define CONNECTIONITEMS_H - -class FormWindow; - -#include - -class SenderItem; -class ReceiverItem; -class SignalItem; -class SlotItem; -class ConnectionContainer; - - -class ConnectionItem : public TQObject, - public TQComboTableItem -{ - Q_OBJECT - - -public: - ConnectionItem( TQTable *table, FormWindow *fw ); - - void paint( TQPainter *p, const TQColorGroup &cg, - const TQRect &cr, bool selected ); - - void setSender( SenderItem *i ); - void setReceiver( ReceiverItem *i ); - void setSignal( SignalItem *i ); - void setSlot( SlotItem *i ); - void setConnection( ConnectionContainer *c ); - -public slots: - virtual void senderChanged( TQObject *sender ); - virtual void receiverChanged( TQObject *receiver ); - virtual void signalChanged( const TQString &sig ); - virtual void slotChanged( const TQString &slot ); - -signals: - void changed(); - -protected: - FormWindow *formWindow; - -private: - ConnectionContainer *conn; - -}; - -// ------------------------------------------------------------------ - -class SenderItem : public ConnectionItem -{ - Q_OBJECT - - -public: - SenderItem( TQTable *table, FormWindow *fw ); - TQWidget *createEditor() const; - void setSenderEx( TQObject *sender ); - -signals: - void currentSenderChanged( TQObject *sender ); - -private slots: - void senderChanged( const TQString &sender ); - -}; - -// ------------------------------------------------------------------ - -class ReceiverItem : public ConnectionItem -{ - Q_OBJECT - - -public: - ReceiverItem( TQTable *table, FormWindow *fw ); - TQWidget *createEditor() const; - void setReceiverEx( TQObject *receiver ); - -signals: - void currentReceiverChanged( TQObject *receiver ); - -private slots: - void receiverChanged( const TQString &receiver ); - -}; - -// ------------------------------------------------------------------ - -class SignalItem : public ConnectionItem -{ - Q_OBJECT - - -public: - SignalItem( TQTable *table, FormWindow *fw ); - - void senderChanged( TQObject *sender ); - TQWidget *createEditor() const; - -signals: - void currentSignalChanged( const TQString & ); - -}; - -// ------------------------------------------------------------------ - -class SlotItem : public ConnectionItem -{ - Q_OBJECT - - -public: - SlotItem( TQTable *table, FormWindow *fw ); - - void receiverChanged( TQObject *receiver ); - void signalChanged( const TQString &signal ); - TQWidget *createEditor() const; - - void customSlotsChanged(); - -signals: - void currentSlotChanged( const TQString & ); - -private: - void updateSlotList(); - bool ignoreSlot( const char* slot ) const; - -private: - TQObject *lastReceiver; - TQString lastSignal; - -}; - -// ------------------------------------------------------------------ - -class ConnectionContainer : public TQObject -{ - Q_OBJECT - - -public: - ConnectionContainer( TQObject *parent, SenderItem *i1, SignalItem *i2, - ReceiverItem *i3, SlotItem *i4, int r ) - : TQObject( parent ), mod( FALSE ), se( i1 ), si( i2 ), - re( i3 ), sl( i4 ), rw ( r ) { - i1->setConnection( this ); - i2->setConnection( this ); - i3->setConnection( this ); - i4->setConnection( this ); - connect( i1, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); - connect( i2, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); - connect( i3, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); - connect( i4, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); - } - - bool isModified() const { return mod; } - void setModified( bool b ) { mod = b; repaint(); } - bool isValid() const { - return se->currentText()[0] != '<' && - si->currentText()[0] != '<' && - re->currentText()[0] != '<' && - sl->currentText()[0] != '<'; - } - - void repaint() { - se->table()->updateCell( se->row(), se->col() ); - si->table()->updateCell( si->row(), si->col() ); - re->table()->updateCell( re->row(), re->col() ); - sl->table()->updateCell( sl->row(), sl->col() ); - } - - int row() const { return rw; } - void setRow( int r ) { rw = r; } - - SenderItem *senderItem() const { return se; } - SignalItem *signalItem() const { return si; } - ReceiverItem *receiverItem() const { return re; } - SlotItem *slotItem() const { return sl; } - -public slots: - void somethingChanged() { mod = TRUE; emit changed( this ); } - -signals: - void changed( ConnectionContainer *c ); - -private: - bool mod; - SenderItem *se; - SignalItem *si; - ReceiverItem *re; - SlotItem *sl; - int rw; - -}; - - -#endif diff --git a/tdevdesigner/designer/connectiontable.cpp b/tdevdesigner/designer/connectiontable.cpp deleted file mode 100644 index 834fdc96..00000000 --- a/tdevdesigner/designer/connectiontable.cpp +++ /dev/null @@ -1,56 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "connectiontable.h" - -#include - -ConnectionTable::ConnectionTable( TQWidget *parent, const char *name ) - : TQTable( 0, 4, parent, name ) -{ - setSorting( TRUE ); - setShowGrid( FALSE ); - setFocusStyle( FollowStyle ); - setSelectionMode( SingleRow ); - horizontalHeader()->setLabel( 0, i18n( "Sender" ) ); - horizontalHeader()->setLabel( 1, i18n( "Signal" ) ); - horizontalHeader()->setLabel( 2, i18n( "Receiver" ) ); - horizontalHeader()->setLabel( 3, i18n( "Slot" ) ); - setColumnStretchable( 0, TRUE ); - setColumnStretchable( 1, TRUE ); - setColumnStretchable( 2, TRUE ); - setColumnStretchable( 3, TRUE ); -} - -void ConnectionTable::sortColumn( int col, bool ascending, bool ) -{ - horizontalHeader()->setSortIndicator( col, ascending ); - if ( isEditing() ) - endEdit( currEditRow(), currEditCol(), FALSE, FALSE ); - TQTable::sortColumn( col, ascending, TRUE ); - setCurrentCell( 0, 0 ); - emit resorted(); -} diff --git a/tdevdesigner/designer/connectiontable.h b/tdevdesigner/designer/connectiontable.h deleted file mode 100644 index 60b84426..00000000 --- a/tdevdesigner/designer/connectiontable.h +++ /dev/null @@ -1,47 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef CONNECTIONTABLE_H -#define CONNECTIONTABLE_H - -#include - -class ConnectionTable : public TQTable -{ - Q_OBJECT - - -public: - ConnectionTable( TQWidget *parent, const char *name ); - - void sortColumn( int col, bool ascending, bool wholeRows ); - -signals: - void resorted(); - -}; - -#endif diff --git a/tdevdesigner/designer/createtemplate.ui b/tdevdesigner/designer/createtemplate.ui deleted file mode 100644 index e03340b1..00000000 --- a/tdevdesigner/designer/createtemplate.ui +++ /dev/null @@ -1,195 +0,0 @@ - -CreateTemplate -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - CreateTemplate - - - - 0 - 0 - 347 - 248 - - - - Create Template - - - true - - - - unnamed - - - 11 - - - 6 - - - - TextLabel1 - - - Template &name: - - - editName - - - - - editName - - - Name of the new template - - - Enter the name of the new template - - - - - listClass - - - Class of the new template - - - Enter the name of the class which should be used as the template's base class - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonCreate - - - C&reate - - - true - - - Creates the new template - - - - - PushButton1 - - - &Cancel - - - Closes the Dialog - - - - - - - TextLabel2 - - - &Baseclass for template: - - - listClass - - - - - Spacer2 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - - - buttonCreate - clicked() - CreateTemplate - accept() - - - PushButton1 - clicked() - CreateTemplate - reject() - - - - - klineedit.h - - diff --git a/tdevdesigner/designer/customwidgeteditor.ui b/tdevdesigner/designer/customwidgeteditor.ui deleted file mode 100644 index db6860f0..00000000 --- a/tdevdesigner/designer/customwidgeteditor.ui +++ /dev/null @@ -1,1378 +0,0 @@ - -CustomWidgetEditorBase -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - CustomWidgetEditorBase - - - - 0 - 0 - 712 - 386 - - - - Edit Custom Widgets - - - true - - - <b>Edit Custom Widgets</b><p>Add or delete custom widgets from <i>Qt Designer</i>'s database, and edit the properties of existing widgets.</p> - - - - unnamed - - - 11 - - - 6 - - - - boxWidgets - - - The list of all custom widgets known to Qt Designer. - - - - - buttonNewWidget - - - &New Widget - - - Add new custom widget. - - - <b>Create an empty custom widget and add it to the list.</b><p>New custom widgets have a default name and header file, which must both be changed to appropriate values.</p> - - - - - buttonDeleteWidget - - - &Delete Widget - - - Delete custom widget - - - <b>Delete the selected custom widget.</b><p>You can only delete widgets that are not used in any open form.</p> - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - helpButton - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonCancel - - - &Close - - - true - - - Closes the Dialog. - - - - - - - Vertical Spacing1 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - buttonLoad - - - &Load Descriptions... - - - Loads widget description file - - - <b>Load Descriptions</b><p>Loads a file which contains descriptions of custom widgets, so that these custom widgets can be used in the Qt Designer.</p> -<p>Since it is a lot of work to type in all the information for custom widgets, you should consider using the tqtcreatecw tool which is in $QTDIR/tools/designer/tools/tqtcreatecw. Using tqtcreatecw you can create custom widget description files for your custom widgets without the need to type in all the information manually. For more information about the README file in the tqtcreatecw directory</p> - - - - - buttonSave - - - &Save Descriptions... - - - Saves widget description file - - - <b>Save Descriptions</b><p>Saves all the descriptions of the shown custom widgets to a file which can then be used to import the custom widgets elsewhere. - - - - - TabWidget1 - - - Change the properties of the selected custom widget. - - - - Widget2 - - - De&finition - - - - unnamed - - - 11 - - - 6 - - - - Layout4 - - - - unnamed - - - 0 - - - 6 - - - - previewPixmap - - - - - - - - buttonChoosePixmap - - - - 30 - 22 - - - - ... - - - Select a Pixmap - - - <b>Select a pixmap file.</b><p>The pixmap will be used to represent the widget in forms.</p> - - - - - - - Layout5 - - - - unnamed - - - 0 - - - 6 - - - - editHeader - - - Enter filename - - - <b>Change the header file's name for the selected custom widget.</b><p>The header file will be included by forms using the widget.</p> - - - - - buttonChooseHeader - - - - 30 - 22 - - - - ... - - - Choose headerfile - - - Look for the header file using a file dialog. - - - - - - Global - - - - - Local - - - - localGlobalCombo - - - Select access - - - <b>Change how the include file will be included.</b><p>Global include files will be included using &lt;&gt;-brackets, while local files will included using quotation marks.</p> - - - - - - - editClass - - - Change classname - - - <b>Enter the classname for the selected custom widget.</b><p>A class of that name must be defined in the header file.</p> - - - - - Label11 - - - Heade&rfile: - - - editHeader - - - - - Label10 - - - Cl&ass: - - - editClass - - - - - Label2 - - - Pixmap: - - - - - Label7 - - - Si&ze hint: - - - spinWidth - - - - - TextLabel1_2 - - - Size p&olicy: - - - sizeHor - - - - - - Fixed - - - - - Minimum - - - - - Maximum - - - - - Preferred - - - - - MinimumExpanding - - - - - Expanding - - - - sizeVer - - - Vertical Sizepolicy - - - Choose theQt::Vertical size policy - - - - - spinWidth - - - 32767 - - - -1 - - - -1 - - - Size hint width - - - <b>Set the size hint for the selected widget.</b><p>The size hint provides the recommended size for the widget. Enter a sizehint of -1/-1 if no size is recommended.</p> - - - - - spinHeight - - - 32767 - - - -1 - - - -1 - - - Size hint height - - - <b>Set the size hint for the selected widget.</b><p>The size hint provides the recommended size for the widget. Enter a sizehint of -1/-1 if no size is recommended.</p> - - - - - - Fixed - - - - - Minimum - - - - - Maximum - - - - - Preferred - - - - - MinimumExpanding - - - - - Expanding - - - - sizeHor - - - Horizontal Sizepolicy - - - Choose the horizontal size policy for the widget - - - - - Spacer1 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - checkContainer - - - Con&tainer widget - - - Container Widget - - - <p><b>Container Widget</b></p> -<p>If this custom widget is able to contain other widgets (children), check this checkbox.</p> - - - - - - - Widget3 - - - Si&gnals - - - - unnamed - - - 11 - - - 6 - - - - listSignals - - - The list of all the Q_SIGNALS that the selected widget can emit. - - - - - Layout40 - - - - unnamed - - - 0 - - - 6 - - - - Spacer1_2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonAddSignal - - - N&ew Signal - - - true - - - Add new signal - - - <b>Add a new signal for the current custom widget.</b><p>An argument list should be provided in the signal's name, and the name must be unique.</p> - - - - - buttonRemoveSignal - - - Dele&te Signal - - - true - - - Delete signal - - - <b>Delete the signal.</b><p>All connections using this signal will also be deleted.</p> - - - - - - - Layout38 - - - - unnamed - - - 0 - - - 6 - - - - TextLabel1 - - - S&ignal: - - - editSignal - - - - - editSignal - - - Change signal name - - - <b>Change the name of the selected slot.</b><p>An argument list should be provided in the signal's name, and the name must be unique.</p> - - - - - - - - - Widget4 - - - S&lots - - - - unnamed - - - 11 - - - 6 - - - - - Slot - - - true - - - true - - - - - Access - - - true - - - true - - - - listSlots - - - true - - - true - - - The list of all the custom widget's slots. - - - - - TextLabel2 - - - Sl&ot: - - - editSlot - - - - - editSlot - - - Change slot name - - - <b>Change the name of the selected slot.</b><p>An argument list should be provided in the signal's name, and the name must be unique.</p> - - - - - TextLabel3 - - - &Access: - - - comboAccess - - - - - - public - - - - - protected - - - - comboAccess - - - Change slot access - - - <b>Change the slot's access policy.</b><p>You can only connect to the widget's public Q_SLOTS.</p> - - - - - Layout7 - - - - unnamed - - - 0 - - - 6 - - - - Spacer2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonAddSlot - - - N&ew Slot - - - true - - - Add new slot - - - <b>Add a new slot to the current custom widget.</b><p>An argument list should be provided in the signal's name, and the name must be unique.</p> - - - - - buttonRemoveSlot - - - Dele&te Slot - - - true - - - Delete slot - - - <b>Delete the slot.</b><p>All connections using this slot will also be deleted.</p> - - - - - - - - - Widget5 - - - &Properties - - - - unnamed - - - 11 - - - 6 - - - - Layout7_2 - - - - unnamed - - - 0 - - - 6 - - - - Spacer2_2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonAddProperty - - - N&ew Property - - - true - - - Add new property - - - <b>Add a new property to the current custom widget.</b><p>The properties must be implemented in the class using Qt's property system.</p> - - - - - buttonRemoveProperty - - - Dele&te Property - - - true - - - Delete property - - - Deletes the selected property. - - - - - - - - String - - - - - CString - - - - - StringList - - - - - Bool - - - - - Int - - - - - UInt - - - - - Font - - - - - Color - - - - - Rect - - - - - Point - - - - - Size - - - - - Pixmap - - - - - Palette - - - - - Cursor - - - - - SizePolicy - - - - comboType - - - Select property type - - - <b>Select the type of the property.</b><p>The property must be implemented in the class using Qt's property system.</p><p>You can use integer types to support enumeration properties in the property editor.</p> - - - - - - Property - - - true - - - true - - - - - Type - - - true - - - true - - - - listProperties - - - true - - - true - - - <b>The list of the current widget's properties.</b><p>The properties of the custom widget can be changed in the property editor.</p> - - - - - editProperty - - - Change property name - - - <b>Enter a name for the property.</b><p>The properties must be implemented in the class using Qt's property system.</p> - - - - - TextLabel2_2 - - - P&roperty name: - - - editProperty - - - - - TextLabel3_2 - - - T&ype: - - - comboType - - - - - - - - - - boxWidgets - selectionChanged(TQListBoxItem*) - CustomWidgetEditorBase - currentWidgetChanged(TQListBoxItem*) - - - boxWidgets - currentChanged(TQListBoxItem*) - CustomWidgetEditorBase - currentWidgetChanged(TQListBoxItem*) - - - buttonNewWidget - clicked() - CustomWidgetEditorBase - addWidgetClicked() - - - buttonDeleteWidget - clicked() - CustomWidgetEditorBase - deleteWidgetClicked() - - - editClass - textChanged(const TQString&) - CustomWidgetEditorBase - classNameChanged(const TQString&) - - - editHeader - textChanged(const TQString&) - CustomWidgetEditorBase - headerFileChanged(const TQString&) - - - spinWidth - valueChanged(int) - CustomWidgetEditorBase - widthChanged(int) - - - spinHeight - valueChanged(int) - CustomWidgetEditorBase - heightChanged(int) - - - buttonChoosePixmap - clicked() - CustomWidgetEditorBase - pixmapChoosen() - - - localGlobalCombo - highlighted(int) - CustomWidgetEditorBase - includePolicyChanged(int) - - - buttonChooseHeader - clicked() - CustomWidgetEditorBase - chooseHeader() - - - buttonCancel - clicked() - CustomWidgetEditorBase - closeClicked() - - - listSignals - currentChanged(TQListBoxItem*) - CustomWidgetEditorBase - currentSignalChanged(TQListBoxItem*) - - - listSignals - selectionChanged(TQListBoxItem*) - CustomWidgetEditorBase - currentSignalChanged(TQListBoxItem*) - - - buttonRemoveSignal - clicked() - CustomWidgetEditorBase - removeSignal() - - - editSignal - textChanged(const TQString&) - CustomWidgetEditorBase - signalNameChanged(const TQString&) - - - listSlots - currentChanged(TQListViewItem*) - CustomWidgetEditorBase - currentSlotChanged(TQListViewItem*) - - - listSlots - selectionChanged(TQListViewItem*) - CustomWidgetEditorBase - currentSlotChanged(TQListViewItem*) - - - buttonRemoveSlot - clicked() - CustomWidgetEditorBase - removeSlot() - - - editSlot - textChanged(const TQString&) - CustomWidgetEditorBase - slotNameChanged(const TQString&) - - - comboAccess - activated(const TQString&) - CustomWidgetEditorBase - slotAccessChanged(const TQString&) - - - listProperties - currentChanged(TQListViewItem*) - CustomWidgetEditorBase - currentPropertyChanged(TQListViewItem*) - - - listProperties - selectionChanged(TQListViewItem*) - CustomWidgetEditorBase - currentPropertyChanged(TQListViewItem*) - - - buttonRemoveProperty - clicked() - CustomWidgetEditorBase - removeProperty() - - - editProperty - textChanged(const TQString&) - CustomWidgetEditorBase - propertyNameChanged(const TQString&) - - - comboType - activated(const TQString&) - CustomWidgetEditorBase - propertyTypeChanged(const TQString&) - - - buttonLoad - clicked() - CustomWidgetEditorBase - loadDescription() - - - buttonSave - clicked() - CustomWidgetEditorBase - saveDescription() - - - sizeHor - activated(int) - CustomWidgetEditorBase - horDataChanged(int) - - - sizeVer - activated(int) - CustomWidgetEditorBase - verDataChanged(int) - - - buttonAddProperty - clicked() - CustomWidgetEditorBase - addProperty() - - - checkContainer - toggled(bool) - CustomWidgetEditorBase - widgetIsContainer(bool) - - - buttonAddSignal - clicked() - CustomWidgetEditorBase - addSignal() - - - buttonAddSlot - clicked() - CustomWidgetEditorBase - addSlot() - - init() - destroy() - addProperty() - addSignal() - addWidgetClicked() - chooseHeader() - classNameChanged( const TQString & ) - closeClicked() - currentPropertyChanged( TQListViewItem * ) - currentSignalChanged( TQListBoxItem * ) - currentSlotChanged( TQListViewItem * ) - currentWidgetChanged( TQListBoxItem * ) - deleteWidgetClicked() - headerFileChanged( const TQString & ) - heightChanged( int ) - horDataChanged(int) - includePolicyChanged( int ) - loadDescription() - addSlot() - pixmapChoosen() - propertyNameChanged( const TQString & ) - propertyTypeChanged( const TQString & ) - removeProperty() - removeSignal() - removeSlot() - saveDescription() - signalNameChanged( const TQString & ) - slotAccessChanged( const TQString & ) - slotNameChanged( const TQString & ) - verDataChanged(int) - widgetIsContainer(bool) - widthChanged( int ) - - - buttonCancel - boxWidgets - buttonNewWidget - buttonDeleteWidget - buttonLoad - buttonSave - TabWidget1 - editClass - editHeader - buttonChooseHeader - localGlobalCombo - buttonChoosePixmap - spinWidth - spinHeight - sizeHor - sizeVer - checkContainer - helpButton - listSignals - buttonAddSignal - buttonRemoveSignal - editSignal - listSlots - buttonAddSlot - buttonRemoveSlot - editSlot - comboAccess - listProperties - buttonAddProperty - buttonRemoveProperty - editProperty - comboType - - diff --git a/tdevdesigner/designer/customwidgeteditorimpl.cpp b/tdevdesigner/designer/customwidgeteditorimpl.cpp deleted file mode 100644 index f417f6f2..00000000 --- a/tdevdesigner/designer/customwidgeteditorimpl.cpp +++ /dev/null @@ -1,842 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "customwidgeteditorimpl.h" -#include "defs.h" -#include "pixmapchooser.h" -#include "mainwindow.h" -#include "asciivalidator.h" -#include "resource.h" -#include "widgetfactory.h" -#include "widgetdatabase.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw ) - : CustomWidgetEditorBase( parent, 0, TRUE ), mainWindow( mw ) -{ - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - checkTimer = new TQTimer( this ); - connect( checkTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( checkWidgetName() ) ); - - editClass->setEnabled( FALSE ); - editHeader->setEnabled( FALSE ); - buttonChooseHeader->setEnabled( FALSE ); - buttonChoosePixmap->setEnabled( FALSE ); - spinWidth->setEnabled( FALSE ); - spinHeight->setEnabled( FALSE ); - sizeHor->setEnabled( FALSE ); - sizeVer->setEnabled( FALSE ); - checkContainer->setEnabled( FALSE ); - localGlobalCombo->setEnabled( FALSE ); - editClass->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(editClass) ) ); - editSignal->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) ); - editSlot->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) ); - editProperty->setValidator( new AsciiValidator( TQT_TQOBJECT(editSignal) ) ); - editSignal->setEnabled( FALSE ); - buttonRemoveSignal->setEnabled( FALSE ); - - setupDefinition(); - setupSignals(); - setupSlots(); - setupProperties(); -} - -void CustomWidgetEditor::setupDefinition() -{ - TQPtrList *lst = MetaDataBase::customWidgets(); - for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - TQListBoxItem *i; - if ( w->pixmap ) - i = new TQListBoxPixmap( boxWidgets, *w->pixmap, w->className ); - else - i = new TQListBoxText( boxWidgets, w->className ); - customWidgets.insert( i, w ); - } - - if ( boxWidgets->firstItem() ) { - boxWidgets->setCurrentItem( boxWidgets->firstItem() ); - boxWidgets->setSelected( boxWidgets->firstItem(), TRUE ); - } - oldItem = 0; -} - -void CustomWidgetEditor::setupSignals() -{ - editSignal->setEnabled( FALSE ); - buttonRemoveSignal->setEnabled( FALSE ); - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( !w ) - return; - listSignals->clear(); - for ( TQValueList::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) - listSignals->insertItem( TQString( *it ) ); - if ( listSignals->firstItem() ) { - listSignals->setCurrentItem( listSignals->firstItem() ); - listSignals->setSelected( listSignals->firstItem(), TRUE ); - } -} - -void CustomWidgetEditor::setupSlots() -{ - editSlot->setEnabled( FALSE ); - comboAccess->setEnabled( FALSE ); - buttonRemoveSlot->setEnabled( FALSE ); - - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( !w ) - return; - listSlots->clear(); - for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) - (void)new TQListViewItem( listSlots, (*it).function, (*it).access ); - - if ( listSlots->firstChild() ) { - listSlots->setCurrentItem( listSlots->firstChild() ); - listSlots->setSelected( listSlots->firstChild(), TRUE ); - } -} - -void CustomWidgetEditor::setupProperties() -{ - editProperty->setEnabled( FALSE ); - comboType->setEnabled( FALSE ); - buttonRemoveProperty->setEnabled( FALSE ); - - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( !w ) - return; - listProperties->clear(); - for ( TQValueList::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it ) - (void)new TQListViewItem( listProperties, (*it).property, (*it).type ); - - if ( listProperties->firstChild() ) { - listProperties->setCurrentItem( listProperties->firstChild() ); - listProperties->setSelected( listProperties->firstChild(), TRUE ); - } -} - -void CustomWidgetEditor::currentWidgetChanged( TQListBoxItem *i ) -{ - checkTimer->stop(); - checkWidgetName(); - - MetaDataBase::CustomWidget *w = findWidget( i ); - if ( !i || !w ) { - buttonChooseHeader->setEnabled( FALSE ); - editClass->setEnabled( FALSE ); - editHeader->setEnabled( FALSE ); - buttonChoosePixmap->setEnabled( FALSE ); - spinWidth->setEnabled( FALSE ); - spinHeight->setEnabled( FALSE ); - localGlobalCombo->setEnabled( FALSE ); - sizeHor->setEnabled( FALSE ); - sizeVer->setEnabled( FALSE ); - checkContainer->setEnabled( FALSE ); - return; - } - - buttonChooseHeader->setEnabled( TRUE ); - editClass->setEnabled( TRUE ); - editHeader->setEnabled( TRUE ); - buttonChoosePixmap->setEnabled( TRUE ); - spinWidth->setEnabled( TRUE ); - spinHeight->setEnabled( TRUE ); - localGlobalCombo->setEnabled( TRUE ); - sizeHor->setEnabled( TRUE ); - sizeVer->setEnabled( TRUE ); - checkContainer->setEnabled( TRUE ); - - editClass->blockSignals( TRUE ); - editClass->setText( w->className ); - editClass->blockSignals( FALSE ); - editHeader->setText( w->includeFile ); - localGlobalCombo->setCurrentItem( (int)w->includePolicy ); - if ( w->pixmap ) - previewPixmap->setPixmap( *w->pixmap ); - else - previewPixmap->setText( "" ); - spinWidth->setValue( w->sizeHint.width() ); - spinHeight->setValue( w->sizeHint.height() ); - sizeHor->setCurrentItem( size_type_to_int( w->sizePolicy.horData() ) ); - sizeVer->setCurrentItem( size_type_to_int( w->sizePolicy.verData() ) ); - checkContainer->setChecked( w->isContainer ); - - setupSignals(); - setupSlots(); - setupProperties(); -} - -void CustomWidgetEditor::addWidgetClicked() -{ - oldItem = 0; - checkTimer->stop(); - checkWidgetName(); - - MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget; - TQString s = w->className; - if ( !MetaDataBase::addCustomWidget( w ) ) { - TQMessageBox::information( this, i18n( "Adding Custom Widget" ), - i18n( "Custom widget names must be unique.\n" - "A custom widget called '%1' already exists, so it is not possible " - "to add another widget with this name." ).arg( s ) ); - return; - } - - TQListBoxPixmap *i = new TQListBoxPixmap( boxWidgets, *w->pixmap, w->className ); - customWidgets.insert( i, w ); - - boxWidgets->setCurrentItem( i ); - boxWidgets->setSelected( i, TRUE ); -} - -void CustomWidgetEditor::classNameChanged( const TQString &s ) -{ - TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - if ( !i || !w ) - return; - - WidgetDatabase::customWidgetClassNameChanged( w->className, s ); - - checkTimer->stop(); - boxWidgets->blockSignals( TRUE ); - oldName = w->className; - w->className = s; - TQListBoxItem *old = i; - if ( w->pixmap ) - boxWidgets->changeItem( *w->pixmap, s, boxWidgets->currentItem() ); - else - boxWidgets->changeItem( s, boxWidgets->currentItem() ); - i = boxWidgets->item( boxWidgets->currentItem() ); - oldItem = i; - customWidgets.insert( i, w ); - customWidgets.remove( old ); - boxWidgets->blockSignals( FALSE ); - checkTimer->start( 1000, TRUE ); -} - -void CustomWidgetEditor::deleteWidgetClicked() -{ - oldItem = 0; - checkTimer->stop(); - checkWidgetName(); - - TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - - if ( mainWindow->isCustomWidgetUsed( w ) ) { - TQMessageBox::information( mainWindow, i18n( "Removing Custom Widget" ), - i18n( "The custom widget '%1' is in use, so it cannot be removed." ). - arg( w->className ) ); - return; - } - - if ( !i || !w ) - return; - - MetaDataBase::CustomWidget *cw = MetaDataBase::customWidget( mainWindow->currentTool() ); - if ( cw == w ) - mainWindow->resetTool(); - - MetaDataBase::removeCustomWidget( w ); - customWidgets.remove( i ); - delete i; - - i = boxWidgets->item( boxWidgets->currentItem() ); - if ( i ) { - boxWidgets->setCurrentItem( i ); - boxWidgets->setSelected( i, TRUE ); - } -} - -void CustomWidgetEditor::headerFileChanged( const TQString &s ) -{ - TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - if ( !i || !w ) - return; - - w->includeFile = s; -} - -void CustomWidgetEditor::heightChanged( int h ) -{ - TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - if ( !i || !w ) - return; - - w->sizeHint.setHeight( h ); - updateCustomWidgetSizes(); -} - -void CustomWidgetEditor::includePolicyChanged( int p ) -{ - TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - if ( !i || !w ) - return; - - w->includePolicy = (MetaDataBase::CustomWidget::IncludePolicy)p; -} - -void CustomWidgetEditor::pixmapChoosen() -{ - TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - if ( !i || !w ) - return; - - TQPixmap pix = qChoosePixmap( this ); - if ( pix.isNull() ) - return; - delete w->pixmap; - w->pixmap = new TQPixmap( pix ); - - boxWidgets->blockSignals( TRUE ); - TQListBoxItem *old = i; - boxWidgets->changeItem( *w->pixmap, w->className, boxWidgets->currentItem() ); - i = boxWidgets->item( boxWidgets->currentItem() ); - customWidgets.insert( i, w ); - customWidgets.remove( old ); - boxWidgets->blockSignals( FALSE ); - previewPixmap->setPixmap( *w->pixmap ); -} - -void CustomWidgetEditor::widthChanged( int wid ) -{ - TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - if ( !i || !w ) - return; - - w->sizeHint.setWidth( wid ); - updateCustomWidgetSizes(); -} - -MetaDataBase::CustomWidget *CustomWidgetEditor::findWidget( TQListBoxItem *i ) -{ - if ( !i ) - return 0; - - TQMap::Iterator it = customWidgets.find( i ); - if ( it == customWidgets.end() ) - return 0; - return *it; -} - -void CustomWidgetEditor::chooseHeader() -{ - TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - if ( !i || !w ) - return; - - TQString h = KFileDialog::getOpenFileName( TQString(), i18n( "*.h *.h++ *.hxx *.hh|Header Files" ), this ); - if ( h.isEmpty() ) - return; - editHeader->setText( h ); - localGlobalCombo->setCurrentItem( (int)MetaDataBase::CustomWidget::Global ); -} - -void CustomWidgetEditor::checkWidgetName() -{ - TQListBoxItem *i = oldItem ? oldItem : boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - oldItem = 0; - if ( !i || !w ) - return; - - if ( MetaDataBase::isWidgetNameUsed( w ) ) { - TQString s = w->className; - w->className = oldName; - TQMessageBox::information( this, i18n( "Renaming Custom Widget" ), - i18n( "Custom widget names must be unique.\n" - "A custom widget called '%1' already exists, so it is not possible " - "to rename this widget with this name." ).arg( s ) ); - if ( i != boxWidgets->item( boxWidgets->currentItem() ) ) { - boxWidgets->setCurrentItem( i ); - tqApp->processEvents(); - } - editClass->setText( w->className ); - classNameChanged( w->className ); - } -} - -void CustomWidgetEditor::closeClicked() -{ - oldItem = 0; - checkTimer->stop(); - checkWidgetName(); - accept(); -} - -void CustomWidgetEditor::currentSignalChanged( TQListBoxItem *i ) -{ - editSignal->blockSignals( TRUE ); - editSignal->setText( "" ); - editSignal->blockSignals( FALSE ); - - if ( !i ) { - editSignal->setEnabled( FALSE ); - buttonRemoveSignal->setEnabled( FALSE ); - return; - } - - editSignal->blockSignals( TRUE ); - editSignal->setEnabled( TRUE ); - buttonRemoveSignal->setEnabled( TRUE ); - editSignal->setText( i->text() ); - editSignal->blockSignals( FALSE ); -} - -void CustomWidgetEditor::addSignal() -{ - TQListBoxItem *i = new TQListBoxText( listSignals, "signal()" ); - listSignals->setCurrentItem( i ); - listSignals->setSelected( i, TRUE ); - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( w ) - w->lstSignals.append( i->text().latin1() ); -} - -void CustomWidgetEditor::removeSignal() -{ - TQString s = listSignals->currentText(); - delete listSignals->item( listSignals->currentItem() ); - if ( listSignals->currentItem() != -1 ) - listSignals->setSelected( listSignals->currentItem(), TRUE ); - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( w ) - w->lstSignals.remove( s.latin1() ); -} - -void CustomWidgetEditor::signalNameChanged( const TQString &s ) -{ - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( !w || listSignals->currentItem() == -1 ) - return; - - TQValueList::Iterator it = w->lstSignals.find( listSignals->currentText().latin1() ); - if ( it != w->lstSignals.end() ) - w->lstSignals.remove( it ); - listSignals->blockSignals( TRUE ); - listSignals->changeItem( s, listSignals->currentItem() ); - listSignals->blockSignals( FALSE ); - w->lstSignals.append( s.latin1() ); -} - -void CustomWidgetEditor::slotAccessChanged( const TQString &s ) -{ - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( !w || !listSlots->currentItem() ) - return; - - MetaDataBase::Function slot; - slot.function = listSlots->currentItem()->text( 0 ); - slot.access = listSlots->currentItem()->text( 1 ); - TQValueList::Iterator it = w->lstSlots.find( slot ); - if ( it != w->lstSlots.end() ) - w->lstSlots.remove( it ); - listSlots->currentItem()->setText( 1, s ); - slot.function = listSlots->currentItem()->text( 0 ); - slot.access = listSlots->currentItem()->text( 1 ); - w->lstSlots.append( slot ); -} - -void CustomWidgetEditor::slotNameChanged( const TQString &s ) -{ - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( !w || !listSlots->currentItem() ) - return; - - MetaDataBase::Function slot; - slot.function = listSlots->currentItem()->text( 0 ); - slot.access = listSlots->currentItem()->text( 1 ); - slot.type = "slot"; - TQValueList::Iterator it = w->lstSlots.find( slot ); - if ( it != w->lstSlots.end() ) - w->lstSlots.remove( it ); - listSlots->currentItem()->setText( 0, s ); - slot.function = listSlots->currentItem()->text( 0 ); - slot.access = listSlots->currentItem()->text( 1 ); - w->lstSlots.append( slot ); -} - -void CustomWidgetEditor::addSlot() -{ - TQListViewItem *i = new TQListViewItem( listSlots, "slot()", "public" ); - listSlots->setCurrentItem( i ); - listSlots->setSelected( i, TRUE ); - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( w ) { - MetaDataBase::Function slot; - slot.function = "slot()"; - slot.access = "public"; - slot.type = "slot"; - w->lstSlots.append( slot ); - } -} - -void CustomWidgetEditor::removeSlot() -{ - MetaDataBase::Function slot; - slot.function = "1 2 3"; - if ( listSlots->currentItem() ) { - slot.function = listSlots->currentItem()->text( 0 ); - slot.access = listSlots->currentItem()->text( 1 ); - } - delete listSlots->currentItem(); - if ( listSlots->currentItem() ) - listSlots->setSelected( listSlots->currentItem(), TRUE ); - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( w && slot.function != "1 2 3" ) - w->lstSlots.remove( slot ); -} - -void CustomWidgetEditor::currentSlotChanged( TQListViewItem *i ) -{ - editSlot->blockSignals( TRUE ); - editSlot->setText( "" ); - editSignal->blockSignals( FALSE ); - - if ( !i ) { - editSlot->setEnabled( FALSE ); - comboAccess->setEnabled( FALSE ); - buttonRemoveSlot->setEnabled( FALSE ); - return; - } - - editSlot->setEnabled( TRUE ); - comboAccess->setEnabled( TRUE ); - buttonRemoveSlot->setEnabled( TRUE ); - editSlot->blockSignals( TRUE ); - comboAccess->blockSignals( TRUE ); - editSlot->setText( i->text( 0 ) ); - if ( i->text( 1 ) == i18n( "protected" ) ) - comboAccess->setCurrentItem( 1 ); - else - comboAccess->setCurrentItem( 0 ); - editSlot->blockSignals( FALSE ); - comboAccess->blockSignals( FALSE ); -} - -void CustomWidgetEditor::propertyTypeChanged( const TQString &s ) -{ - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( !w || !listProperties->currentItem() ) - return; - - MetaDataBase::Property property; - property.property = listProperties->currentItem()->text( 0 ); - property.type = listProperties->currentItem()->text( 1 ); - TQValueList::Iterator it = w->lstProperties.find( property ); - if ( it != w->lstProperties.end() ) - w->lstProperties.remove( it ); - listProperties->currentItem()->setText( 1, s ); - property.property = listProperties->currentItem()->text( 0 ); - property.type = listProperties->currentItem()->text( 1 ); - w->lstProperties.append( property ); -} - -void CustomWidgetEditor::propertyNameChanged( const TQString &s ) -{ - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( !w || !listProperties->currentItem() ) - return; - - MetaDataBase::Property property; - property.property = listProperties->currentItem()->text( 0 ); - property.type = listProperties->currentItem()->text( 1 ); - TQValueList::Iterator it = w->lstProperties.find( property ); - if ( it != w->lstProperties.end() ) - w->lstProperties.remove( it ); - listProperties->currentItem()->setText( 0, s ); - property.property = listProperties->currentItem()->text( 0 ); - property.type = listProperties->currentItem()->text( 1 ); - w->lstProperties.append( property ); -} - -void CustomWidgetEditor::addProperty() -{ - TQListViewItem *i = new TQListViewItem( listProperties, "property", "String" ); - listProperties->setCurrentItem( i ); - listProperties->setSelected( i, TRUE ); - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( w ) { - MetaDataBase::Property prop; - prop.property = "property"; - prop.type = "String"; - w->lstProperties.append( prop ); - } -} - -void CustomWidgetEditor::removeProperty() -{ - MetaDataBase::Property property; - property.property = "1 2 3"; - if ( listProperties->currentItem() ) { - property.property = listProperties->currentItem()->text( 0 ); - property.type = listProperties->currentItem()->text( 1 ); - } - delete listProperties->currentItem(); - if ( listProperties->currentItem() ) - listProperties->setSelected( listProperties->currentItem(), TRUE ); - MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); - if ( w && property.property != "1 2 3" ) - w->lstProperties.remove( property ); -} - -void CustomWidgetEditor::currentPropertyChanged( TQListViewItem *i ) -{ - editProperty->blockSignals( TRUE ); - editProperty->setText( "" ); - editSignal->blockSignals( FALSE ); - - if ( !i ) { - editProperty->setEnabled( FALSE ); - comboType->setEnabled( FALSE ); - buttonRemoveProperty->setEnabled( FALSE ); - return; - } - - editProperty->setEnabled( TRUE ); - comboType->setEnabled( TRUE ); - buttonRemoveProperty->setEnabled( TRUE ); - editProperty->blockSignals( TRUE ); - comboType->blockSignals( TRUE ); - editProperty->setText( i->text( 0 ) ); - - for ( int j = 0; j < comboType->count(); ++j ) { - if ( i->text( 1 ) == comboType->text( j ) ) { - comboType->setCurrentItem( j ); - break; - } - } - editProperty->blockSignals( FALSE ); - comboType->blockSignals( FALSE ); -} - -static TQString makeIndent2( int indent ) -{ - TQString s; - s.fill( ' ', indent * 4 ); - return s; -} - -static TQString entitize2( const TQString &s ) -{ - TQString s2 = s; - s2 = s2.replace( "\"", """ ); - s2 = s2.replace( "&", "&" ); - s2 = s2.replace( ">", ">" ); - s2 = s2.replace( "<", "<" ); - s2 = s2.replace( "'", "'" ); - return s2; -} - -void CustomWidgetEditor::saveDescription() -{ - TQString fn = KFileDialog::getSaveFileName( TQString(), i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this ); - if ( fn.isEmpty() ) - return; - - if ( TQFileInfo( fn ).extension() != "cw" ) - fn += ".cw"; - TQFile f( fn ); - if ( !f.open( IO_WriteOnly ) ) - return; - - TQTextStream ts( &f ); - ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) ); - int indent = 0; - - ts << "" << endl; - - ts << makeIndent2( indent ) << "" << endl; - indent++; - - TQPtrList *lst = MetaDataBase::customWidgets(); - for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - ts << makeIndent2( indent ) << "" << endl; - indent++; - ts << makeIndent2( indent ) << "" << w->className << "" << endl; - ts << makeIndent2( indent ) << "
    includePolicy == MetaDataBase::CustomWidget::Local ? "local" : "global" ) - << "\">" << w->includeFile << "
    " << endl; - ts << makeIndent2( indent ) << "" << endl; - indent++; - ts << makeIndent2( indent ) << "" << w->sizeHint.width() << "" << endl; - ts << makeIndent2( indent ) << "" << w->sizeHint.height() << "" << endl; - indent--; - ts << makeIndent2( indent ) << "" << endl; - ts << makeIndent2( indent ) << "" << (int)w->isContainer << "" << endl; - ts << makeIndent2( indent ) << "" << endl; - indent++; - ts << makeIndent2( indent ) << "" << (int)w->sizePolicy.horData() << "" << endl; - ts << makeIndent2( indent ) << "" << (int)w->sizePolicy.verData() << "" << endl; - indent--; - ts << makeIndent2( indent ) << "" << endl; - ts << makeIndent2( indent ) << "" << endl; - indent++; - Resource::saveImageData( w->pixmap->convertToImage(), ts, indent ); - indent--; - ts << makeIndent2( indent ) << "" << endl; - if ( !w->lstSignals.isEmpty() ) { - for ( TQValueList::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) - ts << makeIndent2( indent ) << "" << entitize2( *it ) << "" << endl; - } - if ( !w->lstSlots.isEmpty() ) { - for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) - ts << makeIndent2( indent ) << "" << entitize2( (*it).function ) << "" << endl; - } - if ( !w->lstProperties.isEmpty() ) { - for ( TQValueList::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it ) - ts << makeIndent2( indent ) << "" << entitize2( (*it).property ) << "" << endl; - } - indent--; - ts << makeIndent2( indent ) << "
    " << endl; - } - - indent--; - ts << makeIndent2( indent ) << "
    " << endl; - ts << "
    " << endl; -} - -void CustomWidgetEditor::loadDescription() -{ - TQString fn = KFileDialog::getOpenFileName( TQString(), i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this ); - if ( fn.isEmpty() ) - return; - - TQFile f( fn ); - if ( !f.open( IO_ReadOnly ) ) - return; - - TQDomDocument doc; - TQString errMsg; - int errLine; - if ( !doc.setContent( &f, &errMsg, &errLine ) ) { - tqDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); - return; - } - - TQDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement(); - - while ( firstWidget.tagName() != "customwidgets" ) - firstWidget = firstWidget.nextSibling().toElement(); - - Resource::loadCustomWidgets( firstWidget, 0 ); - boxWidgets->clear(); - setupDefinition(); - setupSignals(); - setupSlots(); - setupProperties(); -} - -void CustomWidgetEditor::updateCustomWidgetSizes() -{ - if ( cwLst.isEmpty() ) - cwLst = *mainWindow->queryList( "CustomWidget" ); - for ( TQObject *o = cwLst.first(); o; o = cwLst.next() ) - ( (TQWidget*)o )->updateGeometry(); -} - -void CustomWidgetEditor::horDataChanged( int a ) -{ - TQSizePolicy::SizeType st = int_to_size_type( a ); - TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - if ( !i || !w ) - return; - - TQSizePolicy osp = w->sizePolicy; - w->sizePolicy.setHorData( st ); - if ( cwLst.isEmpty() ) - cwLst = *mainWindow->queryList( "CustomWidget" ); - for ( TQObject *o = cwLst.first(); o; o = cwLst.next() ) { - CustomWidget *cw = (CustomWidget*)o; - if ( cw->realClassName() == boxWidgets->currentText() ) { - if ( cw->sizePolicy() == osp ) - cw->setSizePolicy( w->sizePolicy ); - } - } -} - -void CustomWidgetEditor::verDataChanged( int a ) -{ - TQSizePolicy::SizeType st = int_to_size_type( a ); - TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - if ( !i || !w ) - return; - - TQSizePolicy osp = w->sizePolicy; - w->sizePolicy.setVerData( st ); - if ( cwLst.isEmpty() ) - cwLst = *mainWindow->queryList( "CustomWidget" ); - for ( TQObject *o = cwLst.first(); o; o = cwLst.next() ) { - CustomWidget *cw = (CustomWidget*)o; - if ( cw->realClassName() == boxWidgets->currentText() ) { - if ( cw->sizePolicy() == osp ) - cw->setSizePolicy( w->sizePolicy ); - } - } -} - -void CustomWidgetEditor::widgetIsContainer( bool b ) -{ - TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() ); - MetaDataBase::CustomWidget *w = findWidget( i ); - if ( !i || !w ) - return; - - w->isContainer = b; - WidgetDatabaseRecord *r = WidgetDatabase::at( w->id ); - if ( r ) - r->isContainer = b; -} diff --git a/tdevdesigner/designer/customwidgeteditorimpl.h b/tdevdesigner/designer/customwidgeteditorimpl.h deleted file mode 100644 index 9e53b2ce..00000000 --- a/tdevdesigner/designer/customwidgeteditorimpl.h +++ /dev/null @@ -1,99 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef CUSTOMWIDGETEDITORIMPL_H -#define CUSTOMWIDGETEDITORIMPL_H - -#include "customwidgeteditor.h" -#include "metadatabase.h" - -#include -#include - -class TQTimer; -class TQListBoxItem; -class MainWindow; - -class CustomWidgetEditor : public CustomWidgetEditorBase -{ - Q_OBJECT - - -public: - CustomWidgetEditor( TQWidget *parent , MainWindow *mw); - -protected slots: - void addWidgetClicked(); - void classNameChanged( const TQString & ); - void currentWidgetChanged( TQListBoxItem * ); - void deleteWidgetClicked(); - void headerFileChanged( const TQString & ); - void heightChanged( int ); - void includePolicyChanged( int ); - void pixmapChoosen(); - void widthChanged( int ); - void chooseHeader(); - void checkWidgetName(); - void closeClicked(); - void currentSignalChanged( TQListBoxItem *i ); - void addSignal(); - void removeSignal(); - void signalNameChanged( const TQString &s ); - void slotAccessChanged( const TQString & ); - void slotNameChanged( const TQString & ); - void addSlot(); - void removeSlot(); - void currentSlotChanged( TQListViewItem * ); - void propertyTypeChanged( const TQString & ); - void propertyNameChanged( const TQString & ); - void addProperty(); - void removeProperty(); - void currentPropertyChanged( TQListViewItem * ); - void saveDescription(); - void loadDescription(); - void horDataChanged( int ); - void verDataChanged( int ); - void widgetIsContainer( bool ); - -private: - MetaDataBase::CustomWidget *findWidget( TQListBoxItem *i ); - void setupDefinition(); - void setupSignals(); - void setupSlots(); - void setupProperties(); - void updateCustomWidgetSizes(); - -private: - TQMap customWidgets; - TQString oldName; - TQTimer *checkTimer; - TQListBoxItem *oldItem; - MainWindow *mainWindow; - TQObjectList cwLst; - -}; - -#endif diff --git a/tdevdesigner/designer/database.cpp b/tdevdesigner/designer/database.cpp deleted file mode 100644 index b5baea28..00000000 --- a/tdevdesigner/designer/database.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#if defined(DESIGNER) -#include "database.h" -#else -#include "database2.h" -#endif - -#ifndef TQT_NO_SQL - -#if defined(DESIGNER) -#include "formwindow.h" -#include "mainwindow.h" -#endif - -#include -#include -#include -#include - -DatabaseSupport::DatabaseSupport() -{ - con = 0; - frm = 0; - parent = 0; -} - -void DatabaseSupport::initPreview( const TQString &connection, const TQString &table, TQObject *o, - const TQMap &databaseControls ) -{ - tbl = table; - dbControls = databaseControls; - parent = o; - - if ( connection != "(default)" ) - con = TQSqlDatabase::database( connection ); - else - con = TQSqlDatabase::database(); - frm = new TQSqlForm( o, table ); - for ( TQMap::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) { - TQObject *chld = parent->child( it.key(), TQWIDGET_OBJECT_NAME_STRING ); - if ( !chld ) - continue; - frm->insert( (TQWidget*)chld, *it ); - } -} - -QDesignerDataBrowser::QDesignerDataBrowser( TQWidget *parent, const char *name ) - : TQDataBrowser( parent, name ) -{ -} - -bool QDesignerDataBrowser::event( TQEvent* e ) -{ - bool b = TQDataBrowser::event( e ); -#if defined(DESIGNER) - if ( MainWindow::self->isPreviewing() ) { -#endif - if ( e->type() == TQEvent::Show ) { - if ( con ) { - TQSqlCursor* cursor = new TQSqlCursor( tbl, TRUE, con ); - setSqlCursor( cursor, TRUE ); - setForm( frm ); - refresh(); - first(); - } - return TRUE; - } -#if defined(DESIGNER) - } -#endif - return b; -} - -QDesignerDataView::QDesignerDataView( TQWidget *parent, const char *name ) - : TQDataView( parent, name ) -{ -} - -bool QDesignerDataView::event( TQEvent* e ) -{ - bool b = TQDataView::event( e ); -#if defined(DESIGNER) - if ( MainWindow::self->isPreviewing() ) { -#endif - if ( e->type() == TQEvent::Show ) { - setForm( frm ); - readFields(); - return TRUE; - } -#if defined(DESIGNER) - } -#endif - return b; -} - - -#endif diff --git a/tdevdesigner/designer/database.h b/tdevdesigner/designer/database.h deleted file mode 100644 index cbde491f..00000000 --- a/tdevdesigner/designer/database.h +++ /dev/null @@ -1,85 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef DATABASE_H -#define DATABASE_H - -#include "tqfeatures.h" - -#ifndef TQT_NO_SQL -#include -#include -#include -#include - -class TQSqlDatabase; -class TQSqlForm; - -class DatabaseSupport -{ -public: - DatabaseSupport(); - virtual ~DatabaseSupport() {} - - void initPreview( const TQString &connection, const TQString &table, TQObject *o, - const TQMap &databaseControls ); - -protected: - TQSqlDatabase* con; - TQSqlForm* frm; - TQString tbl; - TQMap dbControls; - TQObject *parent; - -}; - -class QDesignerDataBrowser : public TQDataBrowser, public DatabaseSupport -{ - Q_OBJECT - - -public: - QDesignerDataBrowser( TQWidget *parent, const char *name ); - -protected: - bool event( TQEvent* e ); -}; - -class QDesignerDataView : public TQDataView, public DatabaseSupport -{ - Q_OBJECT - - -public: - QDesignerDataView( TQWidget *parent, const char *name ); - -protected: - bool event( TQEvent* e ); - -}; -#endif - -#endif diff --git a/tdevdesigner/designer/dbconnection.ui b/tdevdesigner/designer/dbconnection.ui deleted file mode 100644 index 75b7d5cb..00000000 --- a/tdevdesigner/designer/dbconnection.ui +++ /dev/null @@ -1,222 +0,0 @@ - -DatabaseConnectionWidget -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - DatabaseConnectionWidget - - - - 0 - 0 - 199 - 185 - - - - Edit Database Connection - - - - unnamed - - - 0 - - - 6 - - - - TextLabel3 - - - &Database name: - - - editDatabase - - - - - TextLabel4 - - - &Username: - - - editUsername - - - - - TextLabel4_2 - - - &Password: - - - editPassword - - - - - TextLabel2 - - - D&river: - - - comboDriver - - - - - editName - - - false - - - - - TextLabel5 - - - &Hostname: - - - editHostname - - - - - comboDriver - - - false - - - true - - - - - TextLabel1 - - - &Name: - - - editName - - - - - editHostname - - - false - - - - - TextLabel1_2 - - - P&ort: - - - editPort - - - - - editUsername - - - false - - - - - editPassword - - - false - - - Password - - - - - editDatabase - - - false - - - - - editPort - - - false - - - Default - - - 65535 - - - -1 - - - -1 - - - - - - - - editName - comboDriver - editDatabase - editUsername - editPassword - editHostname - editPort - - - init() - destroy() - - - diff --git a/tdevdesigner/designer/dbconnectioneditor.ui b/tdevdesigner/designer/dbconnectioneditor.ui deleted file mode 100644 index 40ef0a9b..00000000 --- a/tdevdesigner/designer/dbconnectioneditor.ui +++ /dev/null @@ -1,147 +0,0 @@ - -DatabaseConnectionEditorBase -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - DatabaseConnectionEditorBase - - - - 0 - 0 - 393 - 286 - - - - Connect - - - - unnamed - - - 11 - - - 6 - - - - PushButton2 - - - &Cancel - - - - - PushButton1 - - - &OK - - - true - - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - grp - - - Connection Details - - - - unnamed - - - 11 - - - 6 - - - - Spacer2 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - - - - - PushButton2 - clicked() - DatabaseConnectionEditorBase - reject() - - - PushButton1 - clicked() - DatabaseConnectionEditorBase - accept() - - init() - destroy() - - - PushButton1 - PushButton2 - - diff --git a/tdevdesigner/designer/dbconnectionimpl.cpp b/tdevdesigner/designer/dbconnectionimpl.cpp deleted file mode 100644 index 3cfd1fdc..00000000 --- a/tdevdesigner/designer/dbconnectionimpl.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "dbconnectionimpl.h" -#include "dbconnection.h" -#include "project.h" -#include "asciivalidator.h" -#include -#include -#include -#include -#include -#include - -DatabaseConnectionEditor::DatabaseConnectionEditor( DatabaseConnection* connection, TQWidget* parent, - const char* name, bool modal, WFlags fl ) - : DatabaseConnectionEditorBase( parent, name, modal, fl ), conn( connection ) -{ - connectionWidget = new DatabaseConnectionWidget( grp ); - grpLayout->addWidget( connectionWidget, 0, 0 ); - init(); -} - -DatabaseConnectionEditor::~DatabaseConnectionEditor() -{ -} - -void DatabaseConnectionEditor::accept() -{ -#ifndef TQT_NO_SQL - conn->setUsername( connectionWidget->editUsername->text() ); - conn->setPassword( connectionWidget->editPassword->text() ); - conn->setHostname( connectionWidget->editHostname->text() ); -#endif - DatabaseConnectionEditorBase::accept(); -} - -void DatabaseConnectionEditor::init() -{ - connectionWidget->editName->setEnabled( FALSE ); - connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) ); - connectionWidget->editName->setText( conn->name() ); - connectionWidget->comboDriver->setEnabled( FALSE ); - connectionWidget->comboDriver->lineEdit()->setText( conn->driver() ); - connectionWidget->editDatabase->setEnabled( FALSE ); - connectionWidget->editDatabase->setText( conn->database() ); - connectionWidget->editUsername->setEnabled( TRUE ); - connectionWidget->editUsername->setText( conn->username() ); - connectionWidget->editPassword->setEnabled( TRUE ); - connectionWidget->editPassword->setText( "" ); - connectionWidget->editHostname->setEnabled( TRUE ); - connectionWidget->editHostname->setText( conn->hostname() ); - connectionWidget->editPort->setEnabled( TRUE ); - connectionWidget->editPort->setValue( conn->port() ); - connectionWidget->editUsername->setFocus(); - connectionWidget->editUsername->selectAll(); -} diff --git a/tdevdesigner/designer/dbconnectionimpl.h b/tdevdesigner/designer/dbconnectionimpl.h deleted file mode 100644 index e2db2286..00000000 --- a/tdevdesigner/designer/dbconnectionimpl.h +++ /dev/null @@ -1,58 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef DBCONNECTIONIMPL_H -#define DBCONNECTIONIMPL_H - -#include "dbconnectioneditor.h" - -class DatabaseConnection; -class DatabaseConnectionWidget; -class TQGridLayout; - -class DatabaseConnectionEditor : public DatabaseConnectionEditorBase -{ - Q_OBJECT - - -public: - DatabaseConnectionEditor( DatabaseConnection* connection, TQWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); - ~DatabaseConnectionEditor(); - -public slots: - void accept(); -private: - void init(); - -private: - DatabaseConnection *conn; - TQGridLayout* lay; - DatabaseConnectionWidget* connectionWidget; - -}; - -#endif // DBCONNECTIONIMPL_H diff --git a/tdevdesigner/designer/dbconnections.ui b/tdevdesigner/designer/dbconnections.ui deleted file mode 100644 index 27d7d127..00000000 --- a/tdevdesigner/designer/dbconnections.ui +++ /dev/null @@ -1,321 +0,0 @@ - -DatabaseConnectionBase -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - DatabaseConnectionBase - - - - 0 - 0 - 512 - 309 - - - - Edit Database Connections - - - true - - - - unnamed - - - 11 - - - 6 - - - - buttonNew - - - &New Connection - - - - - listConnections - - - - - buttonDelete - - - &Delete Connection - - - - - Layout5 - - - - unnamed - - - 0 - - - 6 - - - - buttonHelp - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonClose - - - &Close - - - true - - - Close the dialog and discard any changes. - - - - - - - Spacer1 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - grp - - - Connection - - - - unnamed - - - 11 - - - 6 - - - - Spacer3 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - - - Layout4 - - - - unnamed - - - 0 - - - 6 - - - - Spacer4 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonConnect - - - false - - - Connec&t - - - - - Spacer5 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - - - Spacer6 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - - - buttonClose - clicked() - DatabaseConnectionBase - accept() - - - buttonNew - clicked() - DatabaseConnectionBase - newConnection() - - - buttonDelete - clicked() - DatabaseConnectionBase - deleteConnection() - - - buttonConnect - clicked() - DatabaseConnectionBase - doConnect() - - - listConnections - highlighted(const TQString&) - DatabaseConnectionBase - currentConnectionChanged(const TQString&) - - - listConnections - selected(const TQString&) - DatabaseConnectionBase - currentConnectionChanged(const TQString&) - - init() - destroy() - currentConnectionChanged( const TQString & ) - deleteConnection() - newConnection() - connectionNameChanged( const TQString & ) - doConnect() - - - buttonClose - listConnections - buttonNew - buttonDelete - buttonConnect - buttonHelp - - diff --git a/tdevdesigner/designer/dbconnectionsimpl.cpp b/tdevdesigner/designer/dbconnectionsimpl.cpp deleted file mode 100644 index e589679b..00000000 --- a/tdevdesigner/designer/dbconnectionsimpl.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "dbconnectionsimpl.h" -#include -#include -#include -#include "project.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "mainwindow.h" -#include "asciivalidator.h" - -#include - -static bool blockChanges = FALSE; - -/* - * Constructs a DatabaseConnectionsEditor which is a child of 'parent', with the - * name 'name' and widget flags set to 'f' - * - * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. - */ -DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl ) - : DatabaseConnectionBase( parent, name, modal, fl ), project( pro ) -{ - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - connectionWidget = new DatabaseConnectionWidget( grp ); - grpLayout->addWidget( connectionWidget, 0, 0 ); -#ifndef TQT_NO_SQL - TQPtrList lst = project->databaseConnections(); - for ( DatabaseConnection *conn = lst.first(); conn; conn = lst.next() ) - listConnections->insertItem( conn->name() ); - connectionWidget->comboDriver->insertStringList( TQSqlDatabase::drivers() ); -#endif - connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) ); - enableAll( FALSE ); -} - -DatabaseConnectionsEditor::~DatabaseConnectionsEditor() -{ -} - -void DatabaseConnectionsEditor::deleteConnection() -{ - if ( listConnections->currentItem() == -1 ) - return; - project->removeDatabaseConnection( listConnections->currentText() ); - delete listConnections->item( listConnections->currentItem() ); - if ( listConnections->count() ) { - listConnections->setCurrentItem( 0 ); - currentConnectionChanged( listConnections->currentText() ); - } else { - enableAll( FALSE ); - } - project->saveConnections(); -} - -void DatabaseConnectionsEditor::newConnection() -{ - blockChanges = TRUE; - enableAll( TRUE ); - TQString n( "(default)" ); - if ( project->databaseConnection( n ) ) { - n = "connection"; - int i = 2; - while ( project->databaseConnection( n + TQString::number( i ) ) ) - ++i; - n = n + TQString::number( i ); - } - connectionWidget->editName->setText( n ); - listConnections->clearSelection(); - buttonConnect->setDefault( TRUE ); - connectionWidget->editName->setFocus(); - blockChanges = FALSE; -} - -void DatabaseConnectionsEditor::doConnect() -{ -#ifndef TQT_NO_SQL - if ( listConnections->currentItem() == -1 || - !listConnections->item( listConnections->currentItem() )->isSelected() ) { // new connection - // ### do error checking for duplicated connection names - DatabaseConnection *conn = new DatabaseConnection( project ); - conn->setName( connectionWidget->editName->text() ); - conn->setDriver( connectionWidget->comboDriver->lineEdit()->text() ); - conn->setDatabase( connectionWidget->editDatabase->text() ); - conn->setUsername( connectionWidget->editUsername->text() ); - conn->setPassword( connectionWidget->editPassword->text() ); - conn->setHostname( connectionWidget->editHostname->text() ); - conn->setPort( connectionWidget->editPort->value() ); - if ( conn->refreshCatalog() ) { - project->addDatabaseConnection( conn ); - listConnections->insertItem( conn->name() ); - listConnections->setCurrentItem( listConnections->count() - 1 ); - project->saveConnections(); - } else { - TQMessageBox::warning( MainWindow::self, i18n( "Connection" ), - i18n( "Could not connect to the database.\n" - "Please ensure that the database server is running " - "and that all the connection information is correct.\n" - "[ " + conn->lastError() + " ]" ) ); - delete conn; - } - } else { // sync // ### should this do something else? right now it just overwrites all info about the connection... - DatabaseConnection *conn = project->databaseConnection( listConnections->currentText() ); - conn->setName( connectionWidget->editName->text() ); - conn->setDriver( connectionWidget->comboDriver->lineEdit()->text() ); - conn->setDatabase( connectionWidget->editDatabase->text() ); - conn->setUsername( connectionWidget->editUsername->text() ); - conn->setPassword( connectionWidget->editPassword->text() ); - conn->setHostname( connectionWidget->editHostname->text() ); - conn->setPort( connectionWidget->editPort->value() ); - conn->refreshCatalog(); - project->saveConnections(); - } -#endif -} - -void DatabaseConnectionsEditor::currentConnectionChanged( const TQString &s ) -{ -#ifndef TQT_NO_SQL - DatabaseConnection *conn = project->databaseConnection( s ); - blockChanges = TRUE; - enableAll( conn != 0 ); - connectionWidget->editName->setEnabled( FALSE ); - blockChanges = FALSE; - if ( !conn ) - return; - blockChanges = TRUE; - connectionWidget->editName->setText( conn->name() ); - blockChanges = FALSE; - connectionWidget->comboDriver->lineEdit()->setText( conn->driver() ); - connectionWidget->editDatabase->setText( conn->database() ); - connectionWidget->editUsername->setText( conn->username() ); - connectionWidget->editPassword->setText( conn->password() ); - connectionWidget->editHostname->setText( conn->hostname() ); - connectionWidget->editPort->setValue( conn->port() ); -#endif -} - -void DatabaseConnectionsEditor::connectionNameChanged( const TQString &s ) -{ - if ( listConnections->currentItem() == 0 || blockChanges ) - return; - listConnections->changeItem( s, listConnections->currentItem() ); -} - -void DatabaseConnectionsEditor::enableAll( bool b ) -{ - connectionWidget->editName->setEnabled( b ); - connectionWidget->editName->setText( "" ); - connectionWidget->comboDriver->setEnabled( b ); - connectionWidget->comboDriver->lineEdit()->setText( "" ); - connectionWidget->editDatabase->setEnabled( b ); - connectionWidget->editDatabase->setText( "" ); - connectionWidget->editUsername->setEnabled( b ); - connectionWidget->editUsername->setText( "" ); - connectionWidget->editPassword->setEnabled( b ); - connectionWidget->editPassword->setText( "" ); - connectionWidget->editHostname->setEnabled( b ); - connectionWidget->editHostname->setText( "" ); - connectionWidget->editPort->setEnabled( b ); - connectionWidget->editPort->setValue( -1 ); - buttonConnect->setEnabled( b ); -} diff --git a/tdevdesigner/designer/dbconnectionsimpl.h b/tdevdesigner/designer/dbconnectionsimpl.h deleted file mode 100644 index e06cc06a..00000000 --- a/tdevdesigner/designer/dbconnectionsimpl.h +++ /dev/null @@ -1,61 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef DBCONNECTIONSIMPL_H -#define DBCONNECTIONSIMPL_H - -#include "dbconnections.h" -#include "dbconnection.h" - -class Project; - -class DatabaseConnectionsEditor : public DatabaseConnectionBase -{ - Q_OBJECT - - -public: - DatabaseConnectionsEditor( Project *pro, TQWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); - ~DatabaseConnectionsEditor(); - -protected slots: - void deleteConnection(); - void newConnection(); - void doConnect(); - void currentConnectionChanged( const TQString & ); - void connectionNameChanged( const TQString &s ); - -private: - void enableAll( bool b ); - -private: - Project *project; - DatabaseConnectionWidget* connectionWidget; - -}; - -#endif // DBCONNECTIONSIMPL_H diff --git a/tdevdesigner/designer/defs.cpp b/tdevdesigner/designer/defs.cpp deleted file mode 100644 index c1aa36de..00000000 --- a/tdevdesigner/designer/defs.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "defs.h" - -int size_type_to_int( TQSizePolicy::SizeType t ) -{ - if ( t == TQSizePolicy::Fixed ) - return 0; - if ( t == TQSizePolicy::Minimum ) - return 1; - if ( t == TQSizePolicy::Maximum ) - return 2; - if ( t == TQSizePolicy::Preferred ) - return 3; - if ( t == TQSizePolicy::MinimumExpanding ) - return 4; - if ( t == TQSizePolicy::Expanding ) - return 5; - if ( t == TQSizePolicy::Ignored ) - return 6; - return 0; -} - -TQString size_type_to_string( TQSizePolicy::SizeType t ) -{ - if ( t == TQSizePolicy::Fixed ) - return "Fixed"; - if ( t == TQSizePolicy::Minimum ) - return "Minimum"; - if ( t == TQSizePolicy::Maximum ) - return "Maximum"; - if ( t == TQSizePolicy::Preferred ) - return "Preferred"; - if ( t == TQSizePolicy::MinimumExpanding ) - return "MinimumExpanding"; - if ( t == TQSizePolicy::Expanding ) - return "Expanding"; - if ( t == TQSizePolicy::Ignored ) - return "Ignored"; - return TQString(); -} - -TQSizePolicy::SizeType int_to_size_type( int i ) -{ - if ( i == 0 ) - return TQSizePolicy::Fixed; - if ( i == 1 ) - return TQSizePolicy::Minimum; - if ( i == 2 ) - return TQSizePolicy::Maximum; - if ( i == 3 ) - return TQSizePolicy::Preferred; - if ( i == 4 ) - return TQSizePolicy::MinimumExpanding; - if ( i == 5 ) - return TQSizePolicy::Expanding; - if ( i == 6 ) - return TQSizePolicy::Ignored; - return TQSizePolicy::Preferred; -} diff --git a/tdevdesigner/designer/defs.h b/tdevdesigner/designer/defs.h deleted file mode 100644 index 45143b81..00000000 --- a/tdevdesigner/designer/defs.h +++ /dev/null @@ -1,42 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef DEFS_H -#define DEFS_H - -#include -#include - -#define POINTER_TOOL 32000 -#define CONNECT_TOOL 32001 -#define ORDER_TOOL 32002 -#define BUDDY_TOOL 32004 - -int size_type_to_int( TQSizePolicy::SizeType t ); -TQString size_type_to_string( TQSizePolicy::SizeType t ); -TQSizePolicy::SizeType int_to_size_type( int i ); - -#endif diff --git a/tdevdesigner/designer/designer_pch.h b/tdevdesigner/designer/designer_pch.h deleted file mode 100644 index fa840181..00000000 --- a/tdevdesigner/designer/designer_pch.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This is a precompiled header file for use in Xcode / Mac GCC / - * GCC >= 3.4 / VC to greatly speed the building of TQt Designer. It may - * also be of use to people developing their own project, but it is - * probably better to define your own header. Use of this header is - * currently UNSUPPORTED. - */ - -#if defined __cplusplus - -#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 "command.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "metadatabase.h" -#include "project.h" -#include "widgetfactory.h" - -#endif diff --git a/tdevdesigner/designer/designeraction.cpp b/tdevdesigner/designer/designeraction.cpp deleted file mode 100644 index 66ecb438..00000000 --- a/tdevdesigner/designer/designeraction.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program 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 program 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 "designeraction.h" - -DesignerAction::~DesignerAction() -{ -} - -void DesignerAction::setDisabled( bool d ) -{ - TQAction::setEnabled(!d); - emit actionEnabled(!d); -} - -void DesignerAction::setEnabled( bool e ) -{ - TQAction::setEnabled(e); - emit actionEnabled(e); -} - -#include "designeraction.moc" diff --git a/tdevdesigner/designer/designeraction.h b/tdevdesigner/designer/designeraction.h deleted file mode 100644 index 85efef6b..00000000 --- a/tdevdesigner/designer/designeraction.h +++ /dev/null @@ -1,52 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program 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 program 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 DESIGNERACTION_H -#define DESIGNERACTION_H - -#include - -class DesignerAction : public TQAction -{ -Q_OBJECT - -public: - DesignerAction(TQObject *parent = 0, const char *name = 0) - :TQAction(parent, name) {} - DesignerAction ( const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 ) - :TQAction(menuText, accel, parent, name) {} - DesignerAction ( const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 ) - :TQAction(icon, menuText, accel, parent, name) {} - DesignerAction ( const TQString & text, const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE ) - :TQAction(text, icon, menuText, accel, parent, name, toggle) {} - DesignerAction ( const TQString & text, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE ) - :TQAction(text, menuText, accel, parent, name, toggle) {} - DesignerAction ( TQObject * parent, const char * name, bool toggle ) - :TQAction(parent, name, toggle) {} - ~DesignerAction(); - - virtual void setEnabled(bool e); - virtual void setDisabled(bool d); - -signals: - void actionEnabled(bool e); - -}; - -#endif diff --git a/tdevdesigner/designer/designerapp.cpp b/tdevdesigner/designer/designerapp.cpp deleted file mode 100644 index 22d1e531..00000000 --- a/tdevdesigner/designer/designerapp.cpp +++ /dev/null @@ -1,176 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "designerappiface.h" -#include "designerapp.h" -#include "mainwindow.h" -#include "formwindow.h" - -#include - -#include -#include -#include -#include - -#ifdef TQ_WS_WIN -#include -#include -#endif - -static TQSplashScreen *splash = 0; - -void set_splash_status( const TQString &txt ) -{ - if ( !splash ) - return; - TQString splashText = "Licensed to " - + TQString::fromLatin1( TQT_PRODUCT_LICENSEE ) + "\n" - + txt; - splash->message( splashText, TQt::AlignRight|TQt::AlignTop ); -} - -DesignerApplication::DesignerApplication( int &argc, char **argv ) - : TQApplication( argc, argv ) -{ -#if defined(TQ_WS_WIN) - if ( winVersion() & TQt::WV_NT_based ) - DESIGNER_OPENFILE = RegisterWindowMessage((TCHAR*)"TQT_DESIGNER_OPEN_FILE"); - else - DESIGNER_OPENFILE = RegisterWindowMessageA("TQT_DESIGNER_OPEN_FILE"); -#endif -} - -TQSplashScreen *DesignerApplication::showSplash() -{ - TQRect screen = TQApplication::desktop()->screenGeometry(); - TQSettings config; - config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); - - TQRect mainRect; - TQString keybase = settingsKey(); - bool show = config.readBoolEntry( keybase + "SplashScreen", TRUE ); - mainRect.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", 0 ) ); - mainRect.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", 0 ) ); - mainRect.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", 500 ) ); - mainRect.setHeight( config.readNumEntry( keybase + "Geometries/MainwindowHeight", 500 ) ); - screen = TQApplication::desktop()->screenGeometry( TQApplication::desktop()->screenNumber( mainRect.center() ) ); - - if ( show ) { - splash = new TQSplashScreen( UserIcon("designer_splash.png") ); - splash->show(); - set_splash_status( "Initializing..." ); - } - - return splash; -} - -void DesignerApplication::closeSplash() -{ - splash->hide(); -} - -static TQString *settings_key = 0; -static TQString *old_settings_key = 0; - -TQString DesignerApplication::settingsKey() -{ - if ( !settings_key ) - settings_key = new TQString( "/TQt Designer/" + - TQString::number( (TQT_VERSION >> 16) & 0xff ) + - "." + TQString::number( (TQT_VERSION >> 8) & 0xff ) + "/" ); - return *settings_key; -} - -TQString DesignerApplication::oldSettingsKey() -{ - if ( !old_settings_key ) { - int majorVer = (TQT_VERSION >> 16) & 0xff; - int minorVer = (TQT_VERSION >> 8) & 0xff; - - // If minorVer is 0 (e.g. 4.0) then we don't want to read the - // old settings, too much might have changed. - if ( !minorVer == 0 ) - minorVer--; - - old_settings_key = new TQString( "/TQt Designer/" + - TQString::number( majorVer ) + - "." + TQString::number( minorVer ) + "/" ); - } - return *old_settings_key; -} - -void DesignerApplication::setSettingsKey( const TQString &key ) -{ - if ( !settings_key ) - settings_key = new TQString( key ); - else - *settings_key = key; -} - -#if defined(TQ_WS_WIN) -bool DesignerApplication::winEventFilter( MSG *msg ) -{ - if ( msg->message == DESIGNER_OPENFILE ) { - TQFile f( TQDir::homeDirPath() + "/.designerargs" ); - TQFileInfo fi(f); - if ( fi.lastModified() == lastMod ) - return TQApplication::winEventFilter( msg ); - lastMod = fi.lastModified(); - f.open( IO_ReadOnly ); - TQString args; - f.readLine( args, f.size() ); - TQStringList lst = TQStringList::split( " ", args ); - - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { - TQString arg = (*it).stripWhiteSpace(); - if ( arg[0] != '-' ) { - TQObjectList* l = MainWindow::self->queryList( "FormWindow" ); - FormWindow* fw = (FormWindow*) l->first(); - FormWindow* totop = 0; - bool haveit = FALSE; - while ( fw ) { - haveit = haveit || fw->fileName() == arg; - if ( haveit ) - totop = fw; - - fw = (FormWindow*) l->next(); - } - - if ( !haveit ) { - FlashWindow( MainWindow::self->winId(), TRUE ); - MainWindow::self->openFormWindow( arg ); - } else if ( totop ) { - totop->setFocus(); - } - delete l; - } - } - return TRUE; - } - return TQApplication::winEventFilter( msg ); -} -#endif diff --git a/tdevdesigner/designer/designerapp.h b/tdevdesigner/designer/designerapp.h deleted file mode 100644 index b3c62a11..00000000 --- a/tdevdesigner/designer/designerapp.h +++ /dev/null @@ -1,58 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef DESIGNERAPP_H -#define DESIGNERAPP_H - -class TQSplashScreen; - -#include - -class DesignerApplication : public TQApplication -{ -public: - const char *className() const { return "DesignerApplication"; } - - DesignerApplication( int &argc, char **argv ); - - TQSplashScreen *showSplash(); - static void closeSplash(); - - static TQString settingsKey(); - static TQString oldSettingsKey(); - static void setSettingsKey( const TQString &key ); - -protected: - TQDateTime lastMod; - -#if defined(TQ_WS_WIN) - bool winEventFilter( MSG *msg ); - uint DESIGNER_OPENFILE; -#endif - -}; - -#endif diff --git a/tdevdesigner/designer/designerappiface.cpp b/tdevdesigner/designer/designerappiface.cpp deleted file mode 100644 index 57ee992e..00000000 --- a/tdevdesigner/designer/designerappiface.cpp +++ /dev/null @@ -1,1093 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include -#include -#include "designerappiface.h" -#include "mainwindow.h" -#include "project.h" -#include "formwindow.h" -#include "workspace.h" -#include "widgetfactory.h" -#include "command.h" -#include "outputwindow.h" -#include "../shared/widgetdatabase.h" -#include -#include -#include -#include -#include "pixmapcollection.h" -#include "hierarchyview.h" -#include -#include -#include "popupmenueditor.h" -#include "menubareditor.h" - -DesignerInterfaceImpl::DesignerInterfaceImpl( MainWindow *mw ) - : mainWindow( mw ) -{ -} - -TQRESULT DesignerInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInterface** iface ) -{ - *iface = 0; - - if ( uuid == IID_TQUnknown ) - *iface = (TQUnknownInterface*)this; - else if ( uuid == IID_TQComponentInformation ) - *iface = (TQComponentInformationInterface*)this; - else if ( uuid == IID_Designer ) - *iface = (DesignerInterface*)this; - else - return TQE_NOINTERFACE; - - (*iface)->addRef(); - return TQS_OK; -} - - -DesignerProject *DesignerInterfaceImpl::currentProject() const -{ - return mainWindow->currProject()->iFace(); -} - -DesignerFormWindow *DesignerInterfaceImpl::currentForm() const -{ - if ( mainWindow->formWindow() ) - return mainWindow->formWindow()->iFace(); - return 0; -} - -DesignerSourceFile *DesignerInterfaceImpl::currentSourceFile() const -{ - if ( mainWindow->sourceFile() ) - return mainWindow->sourceFile()->iFace(); - return 0; -} - -TQPtrList DesignerInterfaceImpl::projectList() const -{ - return mainWindow->projectList(); -} - -void DesignerInterfaceImpl::showStatusMessage( const TQString &text, int ms ) const -{ - if ( text.isEmpty() ) { - mainWindow->statusBar()->clear(); - return; - } - if ( ms ) - mainWindow->statusMessage( text/*, ms*/ ); - else - mainWindow->statusMessage( text ); -} - -DesignerDock *DesignerInterfaceImpl::createDock() const -{ - return 0; -} - -DesignerOutputDock *DesignerInterfaceImpl::outputDock() const -{ - return mainWindow->outputWindow() ? mainWindow->outputWindow()->iFace() : 0; -} - -void DesignerInterfaceImpl::setModified( bool b, TQWidget *window ) -{ - mainWindow->setModified( b, window ); -} - -void DesignerInterfaceImpl::updateFunctionList() -{ - mainWindow->updateFunctionList(); - if ( mainWindow->objectHierarchy()->sourceEditor() ) - mainWindow->objectHierarchy()->updateClassBrowsers(); -} - -void DesignerInterfaceImpl::onProjectChange( TQObject *receiver, const char *slot ) -{ - TQObject::connect( mainWindow, TQT_SIGNAL( projectChanged() ), receiver, slot ); -} - -void DesignerInterfaceImpl::onFormChange( TQObject *receiver, const char *slot ) -{ - TQObject::connect( mainWindow, TQT_SIGNAL( formWindowChanged() ), receiver, slot ); - TQObject::connect( mainWindow, TQT_SIGNAL( editorChanged() ), receiver, slot ); -} - -bool DesignerInterfaceImpl::singleProjectMode() const -{ - return mainWindow->singleProjectMode(); -} - -void DesignerInterfaceImpl::showError( TQWidget *widget, - int line, const TQString &message ) -{ - mainWindow->showErrorMessage( TQT_TQOBJECT(widget), line, message ); -} - -void DesignerInterfaceImpl::runFinished() -{ - mainWindow->finishedRun(); -} - -void DesignerInterfaceImpl::showStackFrame( TQWidget *w, int line ) -{ - mainWindow->showStackFrame( TQT_TQOBJECT(w), line ); -} - -void DesignerInterfaceImpl::showDebugStep( TQWidget *w, int line ) -{ - mainWindow->showDebugStep( TQT_TQOBJECT(w), line ); -} - -void DesignerInterfaceImpl::runProjectPrecondition() -{ - mainWindow->runProjectPrecondition(); -} - -void DesignerInterfaceImpl::runProjectPostcondition( TQObjectList *l ) -{ - mainWindow->runProjectPostcondition( l ); -} - -DesignerProjectImpl::DesignerProjectImpl( Project *pr ) - : project( pr ) -{ -} - -TQPtrList DesignerProjectImpl::formList() const -{ - TQPtrList list; - TQObjectList *forms = project->formList(); - if ( !forms ) - return list; - - TQPtrListIterator it( *forms ); - while ( it.current() ) { - TQObject *obj = it.current(); - ++it; - TQWidget *par = ::tqqt_cast(obj->parent()); - if ( !obj->isWidgetType() || !par ) - continue; - - list.append( ((FormWindow*)par)->iFace() ); - } - - delete forms; - return list; -} - -TQString DesignerProjectImpl::formFileName( const TQString &form ) const -{ - for ( TQPtrListIterator forms = project->formFiles(); - forms.current(); ++forms ) { - if ( TQString( forms.current()->formName() ) == form ) - return forms.current()->fileName(); - } - return TQString(); -} - -TQStringList DesignerProjectImpl::formNames() const -{ - TQStringList l; - for ( TQPtrListIterator forms = project->formFiles(); - forms.current(); ++forms ) { - FormFile* f = forms.current(); - if ( f->isFake() ) - continue; - l << f->formName(); - } - return l; -} - -void DesignerProjectImpl::addForm( DesignerFormWindow * ) -{ -} - -void DesignerProjectImpl::removeForm( DesignerFormWindow * ) -{ -} - -TQString DesignerProjectImpl::fileName() const -{ - return project->fileName(); -} - -void DesignerProjectImpl::setFileName( const TQString & ) -{ -} - -TQString DesignerProjectImpl::projectName() const -{ - return project->projectName(); -} - -void DesignerProjectImpl::setProjectName( const TQString & ) -{ -} - -TQString DesignerProjectImpl::databaseFile() const -{ - return TQString(); -} - -void DesignerProjectImpl::setDatabaseFile( const TQString & ) -{ -} - -void DesignerProjectImpl::setupDatabases() const -{ - MainWindow::self->editDatabaseConnections(); -} - -TQPtrList DesignerProjectImpl::databaseConnections() const -{ - TQPtrList lst; -#ifndef TQT_NO_SQL - TQPtrList conns = project->databaseConnections(); - for ( DatabaseConnection *d = conns.first(); d; d = conns.next() ) - lst.append( d->iFace() ); -#endif - return lst; -} - -void DesignerProjectImpl::addDatabase( DesignerDatabase * ) -{ -} - -void DesignerProjectImpl::removeDatabase( DesignerDatabase * ) -{ -} - -void DesignerProjectImpl::save() const -{ -} - -void DesignerProjectImpl::setLanguage( const TQString &l ) -{ - project->setLanguage( l ); -} - -TQString DesignerProjectImpl::language() const -{ - return project->language(); -} - -void DesignerProjectImpl::setCustomSetting( const TQString &key, const TQString &value ) -{ - project->setCustomSetting( key, value ); -} - -TQString DesignerProjectImpl::customSetting( const TQString &key ) const -{ - if ( key == "QTSCRIPT_PACKAGES" ) { - TQString s = getenv( "QTSCRIPT_PACKAGES" ); - TQString s2 = project->customSetting( "QUICK_PACKAGES" ); - if ( !s.isEmpty() && !s2.isEmpty() ) -#if defined(Q_OS_WIN32) - s += ";"; -#else - s += ":"; -#endif - s += s2; - return s; - } - return project->customSetting( key ); -} - -DesignerPixmapCollection *DesignerProjectImpl::pixmapCollection() const -{ - return project->pixmapCollection()->iFace(); -} - -void DesignerProjectImpl::breakPoints( TQMap > &bps ) const -{ - MainWindow::self->saveAllBreakPoints(); - for ( TQPtrListIterator sources = project->sourceFiles(); - sources.current(); ++sources ) { - SourceFile* f = sources.current(); - bps.insert( project->makeRelative( f->fileName() ) + " ", MetaDataBase::breakPoints( f ) ); - } - for ( TQPtrListIterator forms = project->formFiles(); - forms.current(); ++forms ) { - if ( forms.current()->formWindow() ) - bps.insert( TQString( forms.current()->formWindow()->name() ) + " ", MetaDataBase::breakPoints( TQT_TQOBJECT(forms.current()->formWindow()) ) ); - } -} - -TQString DesignerProjectImpl::breakPointCondition( TQObject *o, int line ) const -{ - return MetaDataBase::breakPointCondition( MainWindow::self->findRealObject( o ), line ); -} - -void DesignerProjectImpl::setBreakPointCondition( TQObject *o, int line, const TQString &condition ) -{ - MetaDataBase::setBreakPointCondition( MainWindow::self->findRealObject( o ), line, condition ); -} - -void DesignerProjectImpl::clearAllBreakpoints() const -{ - TQValueList empty; - for ( TQPtrListIterator sources = project->sourceFiles(); - sources.current(); ++sources ) { - SourceFile* f = sources.current(); - MetaDataBase::setBreakPoints( f, empty ); - } - for ( TQPtrListIterator forms = project->formFiles(); - forms.current(); ++forms ) { - if ( forms.current()->formWindow() ) - MetaDataBase::setBreakPoints( TQT_TQOBJECT(forms.current()->formWindow()), empty ); - MainWindow::self->resetBreakPoints(); - } -} - -void DesignerProjectImpl::setIncludePath( const TQString &platform, const TQString &path ) -{ - project->setIncludePath( platform, path ); -} - -void DesignerProjectImpl::setLibs( const TQString &platform, const TQString &path ) -{ - project->setLibs( platform, path ); -} - -void DesignerProjectImpl::setDefines( const TQString &platform, const TQString &path ) -{ - project->setDefines( platform, path ); -} - -void DesignerProjectImpl::setConfig( const TQString &platform, const TQString &config ) -{ - project->setConfig( platform, config ); -} - -void DesignerProjectImpl::setTemplate( const TQString &t ) -{ - project->setTemplate( t ); -} - -TQString DesignerProjectImpl::config( const TQString &platform ) const -{ - return project->config( platform ); -} - -TQString DesignerProjectImpl::libs( const TQString &platform ) const -{ - return project->libs( platform ); -} - -TQString DesignerProjectImpl::defines( const TQString &platform ) const -{ - return project->defines( platform ); -} - -TQString DesignerProjectImpl::includePath( const TQString &platform ) const -{ - return project->includePath( platform ); -} - -TQString DesignerProjectImpl::templte() const -{ - return project->templte(); -} - -bool DesignerProjectImpl::isGenericObject( TQObject *o ) const -{ - return !!project->fakeFormFileFor( o ); -} - - - - - - - -#ifndef TQT_NO_SQL -DesignerDatabaseImpl::DesignerDatabaseImpl( DatabaseConnection *d ) - : db( d ) -{ -} - -TQString DesignerDatabaseImpl::name() const -{ - return db->name(); -} - -void DesignerDatabaseImpl::setName( const TQString & ) -{ -} - -TQString DesignerDatabaseImpl::driver() const -{ - return db->driver(); -} - -void DesignerDatabaseImpl::setDriver( const TQString & ) -{ -} - -TQString DesignerDatabaseImpl::database() const -{ - return db->database(); -} - -void DesignerDatabaseImpl::setDatabase( const TQString & ) -{ -} - -TQString DesignerDatabaseImpl::userName() const -{ - return db->username(); -} - -void DesignerDatabaseImpl::setUserName( const TQString & ) -{ -} - -TQString DesignerDatabaseImpl::password() const -{ - return db->password(); -} - -void DesignerDatabaseImpl::setPassword( const TQString & ) -{ -} - -TQString DesignerDatabaseImpl::hostName() const -{ - return db->hostname(); -} - -void DesignerDatabaseImpl::setHostName( const TQString & ) -{ -} - -TQStringList DesignerDatabaseImpl::tables() const -{ - return db->tables(); -} - -TQMap DesignerDatabaseImpl::fields() const -{ - return db->fields(); -} - -void DesignerDatabaseImpl::open( bool suppressDialog ) const -{ - db->open( suppressDialog ); -} - -void DesignerDatabaseImpl::close() const -{ - db->close(); -} - -void DesignerDatabaseImpl::setFields( const TQMap & ) -{ -} - -void DesignerDatabaseImpl::setTables( const TQStringList & ) -{ -} - -TQSqlDatabase* DesignerDatabaseImpl::connection() -{ - return db->connection(); -} -#endif - - - -DesignerPixmapCollectionImpl::DesignerPixmapCollectionImpl( PixmapCollection *coll ) - : pixCollection( coll ) -{ -} - -void DesignerPixmapCollectionImpl::addPixmap( const TQPixmap &p, const TQString &name, bool force ) -{ - PixmapCollection::Pixmap pix; - pix.pix = p; - pix.name = name; - pixCollection->addPixmap( pix, force ); - FormWindow *fw = MainWindow::self->formWindow(); - if ( fw ) - MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), p.serialNumber(), name ); -} - -TQPixmap DesignerPixmapCollectionImpl::pixmap( const TQString &name ) const -{ - return pixCollection->pixmap( name ); -} - - - -DesignerFormWindowImpl::DesignerFormWindowImpl( FormWindow *fw ) - : formWindow( fw ) -{ -} - -TQString DesignerFormWindowImpl::name() const -{ - return formWindow->name(); - } - -void DesignerFormWindowImpl::setName( const TQString &n ) -{ - formWindow->setName( n ); -} - -TQString DesignerFormWindowImpl::fileName() const -{ - return formWindow->fileName(); -} - -void DesignerFormWindowImpl::setFileName( const TQString & ) -{ -} - -void DesignerFormWindowImpl::save() const -{ -} - -bool DesignerFormWindowImpl::isModified() const -{ - return formWindow->commandHistory()->isModified(); -} - -void DesignerFormWindowImpl::insertWidget( TQWidget * ) -{ -} - -TQWidget *DesignerFormWindowImpl::create( const char *className, TQWidget *parent, const char *name ) -{ - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name ); - formWindow->insertWidget( w, TRUE ); - formWindow->killAccels( TQT_TQOBJECT(formWindow->mainContainer()) ); - return w; -} - -void DesignerFormWindowImpl::removeWidget( TQWidget * ) -{ -} - -TQWidgetList DesignerFormWindowImpl::widgets() const -{ - return TQWidgetList(); -} - -void DesignerFormWindowImpl::undo() -{ -} - -void DesignerFormWindowImpl::redo() -{ -} - -void DesignerFormWindowImpl::cut() -{ -} - -void DesignerFormWindowImpl::copy() -{ -} - -void DesignerFormWindowImpl::paste() -{ -} - -void DesignerFormWindowImpl::adjustSize() -{ -} - -void DesignerFormWindowImpl::editConnections() -{ -} - -void DesignerFormWindowImpl::checkAccels() -{ -} - -void DesignerFormWindowImpl::layoutH() -{ - formWindow->layoutHorizontal(); -} - -void DesignerFormWindowImpl::layoutV() -{ -} - -void DesignerFormWindowImpl::layoutHSplit() -{ -} - -void DesignerFormWindowImpl::layoutVSplit() -{ -} - -void DesignerFormWindowImpl::layoutG() -{ - formWindow->layoutGrid(); -} - -void DesignerFormWindowImpl::layoutHContainer( TQWidget* w ) -{ - formWindow->layoutHorizontalContainer( w ); -} - -void DesignerFormWindowImpl::layoutVContainer( TQWidget* w ) -{ - formWindow->layoutVerticalContainer( w ); -} - -void DesignerFormWindowImpl::layoutGContainer( TQWidget* w ) -{ - formWindow->layoutGridContainer( w ); -} - -void DesignerFormWindowImpl::breakLayout() -{ -} - -void DesignerFormWindowImpl::selectWidget( TQWidget * w ) -{ - formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); -} - -void DesignerFormWindowImpl::selectAll() -{ -} - -void DesignerFormWindowImpl::clearSelection() -{ - formWindow->clearSelection(); -} - -bool DesignerFormWindowImpl::isWidgetSelected( TQWidget * ) const -{ - return FALSE; -} - -TQWidgetList DesignerFormWindowImpl::selectedWidgets() const -{ - return formWindow->selectedWidgets(); -} - -TQWidget *DesignerFormWindowImpl::currentWidget() const -{ - return formWindow->currentWidget(); -} - -TQWidget *DesignerFormWindowImpl::form() const -{ - return formWindow; -} - - -void DesignerFormWindowImpl::setCurrentWidget( TQWidget * ) -{ -} - -TQPtrList DesignerFormWindowImpl::actionList() const -{ - return TQPtrList(); -} - -TQAction *DesignerFormWindowImpl::createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel, - TQObject* parent, const char* name, bool toggle ) -{ - QDesignerAction *a = new QDesignerAction( parent ); - a->setName( name ); - a->setText( text ); - if ( !icon.isNull() && !icon.pixmap().isNull() ) - a->setIconSet( icon ); - a->setMenuText( menuText ); - a->setAccel( accel ); - a->setToggleAction( toggle ); - return a; -} - -void DesignerFormWindowImpl::addAction( TQAction *a ) -{ - if ( formWindow->actionList().findRef( a ) != -1 ) - return; - formWindow->actionList().append( a ); - MetaDataBase::addEntry( a ); - setPropertyChanged( a, "name", TRUE ); - setPropertyChanged( a, "text", TRUE ); - setPropertyChanged( a, "menuText", TRUE ); - setPropertyChanged( a, "accel", TRUE ); - if ( !a->iconSet().isNull() && !a->iconSet().pixmap().isNull() ) - setPropertyChanged( a, "iconSet", TRUE ); -} - -void DesignerFormWindowImpl::removeAction( TQAction *a ) -{ - formWindow->actionList().removeRef( a ); -} - -void DesignerFormWindowImpl::preview() const -{ -} - -void DesignerFormWindowImpl::addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot ) -{ - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow), sender, signal, receiver, slot ); -} - -void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQString &specifier, - const TQString &access, const TQString &type, - const TQString &language, const TQString &returnType ) -{ - MetaDataBase::addFunction( TQT_TQOBJECT(formWindow), function, specifier, access, type, language, returnType ); - formWindow->mainWindow()->functionsChanged(); -} - - - -void DesignerFormWindowImpl::setProperty( TQObject *o, const char *property, const TQVariant &value ) -{ - int id = o->metaObject()->findProperty( property, TRUE ); - const TQMetaProperty* p = o->metaObject()->property( id, TRUE ); - if ( p && p->isValid() ) - o->setProperty( property, value ); - else - MetaDataBase::setFakeProperty( o, property, value ); -} - -TQVariant DesignerFormWindowImpl::property( TQObject *o, const char *prop ) const -{ - int id = o->metaObject()->findProperty( prop, TRUE ); - const TQMetaProperty* p = o->metaObject()->property( id, TRUE ); - if ( p && p->isValid() ) - return o->property( prop ); - return MetaDataBase::fakeProperty( o, prop ); -} - -void DesignerFormWindowImpl::setPropertyChanged( TQObject *o, const char *property, bool changed ) -{ - MetaDataBase::setPropertyChanged( o, property, changed ); -} - -bool DesignerFormWindowImpl::isPropertyChanged( TQObject *o, const char *property ) const -{ - return MetaDataBase::isPropertyChanged( o, property ); -} - -void DesignerFormWindowImpl::setColumnFields( TQObject *o, const TQMap &f ) -{ - MetaDataBase::setColumnFields( o, f ); -} - -TQStringList DesignerFormWindowImpl::implementationIncludes() const -{ - TQValueList includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); - TQStringList lst; - for ( TQValueList::Iterator it = includes.begin(); it != includes.end(); ++it ) { - MetaDataBase::Include inc = *it; - if ( inc.implDecl != "in implementation" ) - continue; - TQString s = inc.header; - if ( inc.location == "global" ) { - s.prepend( "<" ); - s.append( ">" ); - } else { - s.prepend( "\"" ); - s.append( "\"" ); - } - lst << s; - } - return lst; -} - -TQStringList DesignerFormWindowImpl::declarationIncludes() const -{ - TQValueList includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); - TQStringList lst; - for ( TQValueList::Iterator it = includes.begin(); it != includes.end(); ++it ) { - MetaDataBase::Include inc = *it; - if ( inc.implDecl == "in implementation" ) - continue; - TQString s = inc.header; - if ( inc.location == "global" ) { - s.prepend( "<" ); - s.append( ">" ); - } else { - s.prepend( "\"" ); - s.append( "\"" ); - } - lst << s; - } - return lst; -} - -void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst ) -{ - TQValueList oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); - TQValueList includes; - for ( TQValueList::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) { - MetaDataBase::Include inc = *it; - if ( inc.implDecl == "in implementation" ) - continue; - includes << inc; - } - - for ( TQStringList::ConstIterator sit = lst.begin(); sit != lst.end(); ++sit ) { - TQString s = *sit; - if ( s.startsWith( "#include" ) ) - s.remove( (uint)0, 8 ); - s = s.simplifyWhiteSpace(); - if ( s[ 0 ] != '<' && s[ 0 ] != '"' ) { - s.prepend( "\"" ); - s.append( "\"" ); - } - if ( s[ 0 ] == '<' ) { - s.remove( (uint)0, 1 ); - s.remove( s.length() - 1, 1 ); - MetaDataBase::Include inc; - inc.header = s; - inc.implDecl = "in implementation"; - inc.location = "global"; - includes << inc; - } else { - s.remove( (uint)0, 1 ); - s.remove( s.length() - 1, 1 ); - MetaDataBase::Include inc; - inc.header = s; - inc.implDecl = "in implementation"; - inc.location = "local"; - includes << inc; - } - } - MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes ); - formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); -} - -void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst ) -{ - TQValueList oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); - TQValueList includes; - for ( TQValueList::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) { - MetaDataBase::Include inc = *it; - if ( inc.implDecl == "in declaration" ) - continue; - includes << inc; - } - - for ( TQStringList::ConstIterator sit = lst.begin(); sit != lst.end(); ++sit ) { - TQString s = *sit; - if ( s.startsWith( "#include" ) ) - s.remove( (uint)0, 8 ); - s = s.simplifyWhiteSpace(); - if ( s[ 0 ] != '<' && s[ 0 ] != '"' ) { - s.prepend( "\"" ); - s.append( "\"" ); - } - if ( s[ 0 ] == '<' ) { - s.remove( (uint)0, 1 ); - s.remove( s.length() - 1, 1 ); - MetaDataBase::Include inc; - inc.header = s; - inc.implDecl = "in declaration"; - inc.location = "global"; - includes << inc; - } else { - s.remove( (uint)0, 1 ); - s.remove( s.length() - 1, 1 ); - MetaDataBase::Include inc; - inc.header = s; - inc.implDecl = "in declaration"; - inc.location = "local"; - includes << inc; - } - } - MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes ); - formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); -} - -TQStringList DesignerFormWindowImpl::forwardDeclarations() const -{ - return MetaDataBase::forwards( TQT_TQOBJECT(formWindow) ); -} - -void DesignerFormWindowImpl::setForwardDeclarations( const TQStringList &lst ) -{ - MetaDataBase::setForwards( TQT_TQOBJECT(formWindow), lst ); - formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); -} - -TQStringList DesignerFormWindowImpl::signalList() const -{ - return MetaDataBase::signalList( TQT_TQOBJECT(formWindow) ); -} - -void DesignerFormWindowImpl::setSignalList( const TQStringList &lst ) -{ - MetaDataBase::setSignalList( TQT_TQOBJECT(formWindow), lst ); - formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); -} - -void DesignerFormWindowImpl::onModificationChange( TQObject *receiver, const char *slot ) -{ - TQObject::connect( formWindow, TQT_SIGNAL( modificationChanged( bool, FormWindow * ) ), receiver, slot ); -} - -void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name ) -{ - if ( !::tqqt_cast(formWindow->mainContainer()) ) - return; - - TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); - PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw ); - TQString n = name; - formWindow->unify( TQT_TQOBJECT(popup), n, TRUE ); - popup->setName( n ); - MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); - if ( !mb ) { - mb = new MenuBarEditor( formWindow, mw ); - mb->setName( "MenuBar" ); - MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); - } - mb->insertItem( text, popup ); - MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); -} - -void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a ) -{ - if ( !::tqqt_cast(formWindow->mainContainer()) ) - return; - TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); - if ( !mw->child( 0, "MenuBarEditor" ) ) - return; - PopupMenuEditor *popup = (PopupMenuEditor*)mw->child( menu, "PopupMenuEditor" ); - if ( !popup ) - return; - popup->insert( a ); -} - -void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu ) -{ - if ( !::tqqt_cast(formWindow->mainContainer()) ) - return; - TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); - if ( !mw->child( 0, "MenuBarEditor" ) ) - return; - PopupMenuEditor *popup = (PopupMenuEditor*)mw->child( menu, "PopupMenuEditor" ); - if ( !popup ) - return; - TQAction *a = new QSeparatorAction( 0 ); - popup->insert( a ); -} - -void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &name ) -{ - if ( !::tqqt_cast(formWindow->mainContainer()) ) - return; - TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); - TQToolBar *tb = new QDesignerToolBar( mw ); - TQString n = name; - formWindow->unify( TQT_TQOBJECT(tb), n, TRUE ); - tb->setName( n ); - mw->addToolBar( tb, text ); -} - -void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a ) -{ - if ( !::tqqt_cast(formWindow->mainContainer()) ) - return; - TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); - QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" ); - if ( !tb ) - return; - a->addTo( tb ); - tb->addAction( a ); -} - -void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn ) -{ - if ( !::tqqt_cast(formWindow->mainContainer()) ) - return; - TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); - QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" ); - if ( !tb ) - return; - TQAction *a = new QSeparatorAction( 0 ); - a->addTo( tb ); - tb->addAction( a ); -} - -DesignerDockImpl::DesignerDockImpl() -{ -} - -TQDockWindow *DesignerDockImpl::dockWindow() const -{ - return 0; -} - -DesignerOutputDockImpl::DesignerOutputDockImpl( OutputWindow *ow ) - : outWin( ow ) -{ -} - -TQWidget *DesignerOutputDockImpl::addView( const TQString &title ) -{ - TQWidget *page = new TQWidget( outWin ); - outWin->addTab( page, title ); - return page; -} - -void DesignerOutputDockImpl::appendDebug( const TQString &s ) -{ - outWin->appendDebug( s ); -} - -void DesignerOutputDockImpl::clearDebug() -{ -} - -void DesignerOutputDockImpl::appendError( const TQString &s, int l ) -{ - TQStringList ls; - ls << s; - TQValueList ll; - ll << l; - outWin->setErrorMessages( ls, ll, FALSE, TQStringList(), TQObjectList() ); -} - -void DesignerOutputDockImpl::clearError() -{ -} - -DesignerSourceFileImpl::DesignerSourceFileImpl( SourceFile *e ) - : ed( e ) -{ -} - -TQString DesignerSourceFileImpl::fileName() const -{ - return ed->fileName(); -} diff --git a/tdevdesigner/designer/designerappiface.h b/tdevdesigner/designer/designerappiface.h deleted file mode 100644 index 2ddcd47c..00000000 --- a/tdevdesigner/designer/designerappiface.h +++ /dev/null @@ -1,277 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef DESIGNERAPPIFACE_H -#define DESIGNERAPPIFACE_H - -#include "../interfaces/designerinterface.h" -#include "project.h" - -class FormWindow; -class MainWindow; -class Project; -class OutputWindow; -class SourceFile; - -class DesignerInterfaceImpl : public DesignerInterface -{ -public: - DesignerInterfaceImpl( MainWindow *mw ); - - DesignerProject *currentProject() const; - DesignerFormWindow *currentForm() const; - DesignerSourceFile *currentSourceFile() const; - TQPtrList projectList() const; - void showStatusMessage( const TQString &, int ms = 0 ) const; - DesignerDock *createDock() const; - DesignerOutputDock *outputDock() const; - void setModified( bool b, TQWidget *window ); - void updateFunctionList(); - - void onProjectChange( TQObject *receiver, const char *slot ); - void onFormChange( TQObject *receiver, const char *slot ); - - bool singleProjectMode() const; - void showError( TQWidget *widget, int line, const TQString &message ); - void runFinished(); - void showStackFrame( TQWidget *w, int line ); - void showDebugStep( TQWidget *w, int line ); - void runProjectPrecondition(); - void runProjectPostcondition( TQObjectList *l ); - - - TQRESULT queryInterface( const TQUuid &uuid, TQUnknownInterface** iface ); - TQ_REFCOUNT - -private: - MainWindow *mainWindow; - -}; - -class DesignerProjectImpl: public DesignerProject -{ -public: - DesignerProjectImpl( Project *pr ); - - TQPtrList formList() const; - TQStringList formNames() const; - TQString formFileName( const TQString &form ) const; - void addForm( DesignerFormWindow * ); - void removeForm( DesignerFormWindow * ); - TQString fileName() const; - void setFileName( const TQString & ); - TQString projectName() const; - void setProjectName( const TQString & ); - TQString databaseFile() const; - void setDatabaseFile( const TQString & ); - void setupDatabases() const; - TQPtrList databaseConnections() const; - void addDatabase( DesignerDatabase * ); - void removeDatabase( DesignerDatabase * ); - void save() const; - void setLanguage( const TQString & ); - TQString language() const; - void setCustomSetting( const TQString &key, const TQString &value ); - TQString customSetting( const TQString &key ) const; - DesignerPixmapCollection *pixmapCollection() const; - void breakPoints( TQMap > &bps ) const; - TQString breakPointCondition( TQObject *o, int line ) const; - void setBreakPointCondition( TQObject *o, int line, const TQString &condition ); - void clearAllBreakpoints() const; - void setIncludePath( const TQString &platform, const TQString &path ); - void setLibs( const TQString &platform, const TQString &path ); - void setDefines( const TQString &platform, const TQString &path ); - void setConfig( const TQString &platform, const TQString &config ); - void setTemplate( const TQString &t ); - TQString config( const TQString &platform ) const; - TQString libs( const TQString &platform ) const; - TQString defines( const TQString &platform ) const; - TQString includePath( const TQString &platform ) const; - TQString templte() const; - bool isGenericObject( TQObject *o ) const; - -private: - Project *project; - -}; - -#ifndef TQT_NO_SQL -class TQSqlDatabase; - -class DesignerDatabaseImpl: public DesignerDatabase -{ -public: - DesignerDatabaseImpl( DatabaseConnection *d ); - - TQString name() const; - void setName( const TQString & ); - TQString driver() const; - void setDriver( const TQString & ); - TQString database() const; - void setDatabase( const TQString & ); - TQString userName() const; - void setUserName( const TQString & ); - TQString password() const; - void setPassword( const TQString & ); - TQString hostName() const; - void setHostName( const TQString & ); - TQStringList tables() const; - void setTables( const TQStringList & ); - TQMap fields() const; - void setFields( const TQMap & ); - void open( bool suppressDialog = TRUE ) const; - void close() const; - TQSqlDatabase* connection(); -private: - DatabaseConnection *db; - -}; -#endif - -class DesignerPixmapCollectionImpl : public DesignerPixmapCollection -{ -public: - DesignerPixmapCollectionImpl( PixmapCollection *coll ); - void addPixmap( const TQPixmap &p, const TQString &name, bool force ); - TQPixmap pixmap( const TQString &name ) const; - -private: - PixmapCollection *pixCollection; - -}; - -class DesignerFormWindowImpl: public DesignerFormWindow -{ -public: - DesignerFormWindowImpl( FormWindow *fw ); - - TQString name() const; - void setName( const TQString &n ); - TQString fileName() const; - void setFileName( const TQString & ); - void save() const; - bool isModified() const; - void insertWidget( TQWidget * ); - TQWidget *create( const char *className, TQWidget *parent, const char *name ); - void removeWidget( TQWidget * ); - TQWidgetList widgets() const; - void undo(); - void redo(); - void cut(); - void copy(); - void paste(); - void adjustSize(); - void editConnections(); - void checkAccels(); - void layoutH(); - void layoutV(); - void layoutHSplit(); - void layoutVSplit(); - void layoutG(); - void layoutHContainer( TQWidget* w ); - void layoutVContainer( TQWidget* w ); - void layoutGContainer( TQWidget* w ); - void breakLayout(); - void selectWidget( TQWidget * ); - void selectAll(); - void clearSelection(); - bool isWidgetSelected( TQWidget * ) const; - TQWidgetList selectedWidgets() const; - TQWidget *currentWidget() const; - TQWidget *form() const; - void setCurrentWidget( TQWidget * ); - TQPtrList actionList() const; - TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel, - TQObject* parent, const char* name = 0, bool toggle = FALSE ); - void addAction( TQAction * ); - void removeAction( TQAction * ); - void preview() const; - void addFunction( const TQCString &function, const TQString& specifier, const TQString &access, - const TQString &type, const TQString &language, const TQString &returnType ); - void addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot ); - void setProperty( TQObject *o, const char *property, const TQVariant &value ); - TQVariant property( TQObject *o, const char *property ) const; - void setPropertyChanged( TQObject *o, const char *property, bool changed ); - bool isPropertyChanged( TQObject *o, const char *property ) const; - void setColumnFields( TQObject *o, const TQMap & ); - TQStringList implementationIncludes() const; - TQStringList declarationIncludes() const; - void setImplementationIncludes( const TQStringList &lst ); - void setDeclarationIncludes( const TQStringList &lst ); - TQStringList forwardDeclarations() const; - void setForwardDeclarations( const TQStringList &lst ); - TQStringList signalList() const; - void setSignalList( const TQStringList &lst ); - void addMenu( const TQString &text, const TQString &name ); - void addMenuAction( const TQString &menu, TQAction *a ); - void addMenuSeparator( const TQString &menu ); - void addToolBar( const TQString &text, const TQString &name ); - void addToolBarAction( const TQString &tb, TQAction *a ); - void addToolBarSeparator( const TQString &tb ); - - void onModificationChange( TQObject *receiver, const char *slot ); - -private: - FormWindow *formWindow; - -}; - -class DesignerDockImpl: public DesignerDock -{ -public: - DesignerDockImpl(); - - TQDockWindow *dockWindow() const; -}; - -class DesignerOutputDockImpl: public DesignerOutputDock -{ -public: - DesignerOutputDockImpl( OutputWindow *ow ); - - TQWidget *addView( const TQString &pageName ); - void appendDebug( const TQString & ); - void clearDebug(); - void appendError( const TQString &, int ); - void clearError(); - -private: - OutputWindow *outWin; - -}; - -class DesignerSourceFileImpl : public DesignerSourceFile -{ -public: - DesignerSourceFileImpl( SourceFile *e ); - TQString fileName() const; - -private: - SourceFile *ed; - -}; - -#endif diff --git a/tdevdesigner/designer/editfunctions.ui b/tdevdesigner/designer/editfunctions.ui deleted file mode 100644 index ea59e46a..00000000 --- a/tdevdesigner/designer/editfunctions.ui +++ /dev/null @@ -1,714 +0,0 @@ - -EditFunctionsBase -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - EditFunctionsBase - - - - 0 - 0 - 600 - 371 - - - - Edit Functions - - - true - - - <b>Edit Functions</b><p>Add, edit or delete the current form's slots or functions.</p><p>Click the <b>Add Function</b>-button to create a new function; enter a name, choose an access mode and specify if it should be a slot or normal function.</p><p>Select an entry from the list and click the <b>Delete Function</b>-button to remove a function; in case of a slot all connections using this slot will also be removed.</p> - - - - unnamed - - - 11 - - - 6 - - - - - Function - - - true - - - true - - - - - Return Type - - - true - - - true - - - - - Specifier - - - true - - - true - - - - - Access - - - true - - - true - - - - - Type - - - true - - - true - - - - - In Use - - - true - - - true - - - - functionListView - - - - 7 - 7 - 0 - 0 - - - - StyledPanel - - - Sunken - - - true - - - true - - - <b>This form's functions.</b><p>Select the function you want to change or delete.</p> - - - - - Layout11 - - - - unnamed - - - 6 - - - - showOnlySlots - - - StrongFocus - - - Only d&isplay slots - - - Change displaying mode for functions - - - <b>Check this button if only the slots should be displayed</b><p>Otherwise all functions, i.e. normal C++ functions and slots are displayed.</p> - - - - - - Vertical Spacing1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - addFunction - - - &New Function - - - Add new function - - - <b>Add a new function.</b><p>New functions have a default name and public access.</p> - - - - - deleteFunction - - - &Delete Function - - - Delete function - - - <b>Delete the selected function.</b><p>All connections using this function are also removed.</p> - - - - - - - boxProperties - - - - 5 - 5 - 0 - 0 - - - - Function Properties - - - - unnamed - - - 11 - - - 6 - - - - Layout14 - - - - unnamed - - - 0 - - - - Layout5 - - - - unnamed - - - 0 - - - 6 - - - - Label8 - - - &Function: - - - AlignVCenter|AlignRight - - - functionName - - - - - functionName - - - - 7 - 0 - 0 - 0 - - - - Change function name - - - <b>Change the name of the selected function.</b><p>The name should include the argument list and must be syntactically correct.</p> - - - - - labelType - - - &Return type: - - - AlignVCenter|AlignRight - - - editType - - - - - editType - - - - 5 - 0 - 0 - 0 - - - - Change the return type of the function - - - <b>Change the return type of the selected function.</b><p>Specifiy here the datatype which should be returned by the function.</p> - - - - - - - Spacer6_2 - - - Vertical - - - Fixed - - - - 20 - 16 - - - - - - Layout13 - - - - unnamed - - - 0 - - - - Label9_2 - - - S&pecifier: - - - AlignVCenter|AlignRight - - - functionSpecifier - - - - - - non virtual - - - - - virtual - - - - - pure virtual - - - - - static - - - - functionSpecifier - - - - 1 - 0 - 0 - 0 - - - - Change function access - - - <b>Change the access policy of the function</b><p>All functions are created virtual and should be reimplemented in subclasses.</p> - - - - - TextLabel1 - - - &Access: - - - WordBreak|AlignVCenter|AlignRight - - - functionAccess - - - - - - public - - - - - protected - - - - - private - - - - functionAccess - - - - 1 - 0 - 0 - 0 - - - - Change function access - - - <b>Change the access policy of the function</b><p>All functions are created virtual and should be reimplemented in subclasses.</p> - - - - - TextLabel1_2 - - - &Type: - - - AlignVCenter|AlignRight - - - functionType - - - - - - slot - - - - - function - - - - functionType - - - Change function type - - - <b>Change the type of the function.</b><p>The type specifies if the function is either a slot or a normal C++ function.</p> - - - - - Spacer5 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - - - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - helpButton - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - okButton - - - &OK - - - true - - - true - - - Close the dialog and apply all the changes. - - - - - cancelButton - - - &Cancel - - - true - - - Close the dialog and discard any changes. - - - - - - - - - cancelButton - clicked() - EditFunctionsBase - reject() - - - okButton - clicked() - EditFunctionsBase - okClicked() - - - deleteFunction - clicked() - EditFunctionsBase - functionRemove() - - - addFunction - clicked() - EditFunctionsBase - functionAdd() - - - functionName - textChanged(const TQString&) - EditFunctionsBase - currentTextChanged(const TQString&) - - - functionListView - selectionChanged(TQListViewItem*) - EditFunctionsBase - currentItemChanged(TQListViewItem*) - - - functionListView - currentChanged(TQListViewItem*) - EditFunctionsBase - currentItemChanged(TQListViewItem*) - - - editType - textChanged(const TQString&) - EditFunctionsBase - currentReturnTypeChanged(const TQString&) - - - functionSpecifier - activated(const TQString&) - EditFunctionsBase - currentSpecifierChanged(const TQString&) - - - functionAccess - activated(const TQString&) - EditFunctionsBase - currentAccessChanged(const TQString&) - - - functionType - activated(const TQString&) - EditFunctionsBase - currentTypeChanged(const TQString&) - - - showOnlySlots - toggled(bool) - EditFunctionsBase - displaySlots(bool) - - - - functionName - editType - functionSpecifier - functionAccess - functionType - helpButton - okButton - cancelButton - functionListView - showOnlySlots - addFunction - deleteFunction - - - currentItemChanged( TQListViewItem * ) - currentSpecifierChanged( const TQString & ) - currentTextChanged( const TQString & ) - currentReturnTypeChanged( const TQString & ) - destroy() - init() - currentAccessChanged( const TQString & ) - currentTypeChanged( const TQString & ) - okClicked() - functionAdd() - functionRemove() - displaySlots( bool ) - - - diff --git a/tdevdesigner/designer/editfunctionsimpl.cpp b/tdevdesigner/designer/editfunctionsimpl.cpp deleted file mode 100644 index 78730c99..00000000 --- a/tdevdesigner/designer/editfunctionsimpl.cpp +++ /dev/null @@ -1,534 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "editfunctionsimpl.h" -#include "formwindow.h" -#include "metadatabase.h" -#include "asciivalidator.h" -#include "mainwindow.h" -#include "hierarchyview.h" -#include "project.h" - -#include -#include -#include "tdevdesigner_part.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) - : EditFunctionsBase( parent, 0, TRUE ), formWindow( fw ) -{ - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - - id = 0; - functList.clear(); - - TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); - for ( TQValueList::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { - TQListViewItem *i = new TQListViewItem( functionListView ); - - i->setPixmap( 0, SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()) ); - i->setText( 0, (*it).function ); - i->setText( 1, (*it).returnType ); - i->setText( 2, (*it).specifier ); - i->setText( 3, (*it).access ); - i->setText( 4, (*it).type ); - - FunctItem fui; - fui.id = id; - fui.oldName = (*it).function; - fui.newName = fui.oldName; - fui.oldRetTyp = (*it).returnType; - fui.retTyp = fui.oldRetTyp; - fui.oldSpec = (*it).specifier; - fui.spec = fui.oldSpec; - fui.oldAccess = (*it).access; - fui.access = fui.oldAccess; - fui.oldType = (*it).type; - fui.type = fui.oldType; - functList.append( fui ); - - functionIds.insert( i, id ); - id++; - - if ( (*it).type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).function ).latin1() ) ) - i->setText( 5, i18n( "Yes" ) ); - else - i->setText( 5, i18n( "No" ) ); - } else { - i->setText( 5, "---" ); - } - } - - boxProperties->setEnabled( FALSE ); - functionName->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(functionName) ) ); - - if ( functionListView->firstChild() ) - functionListView->setCurrentItem( functionListView->firstChild() ); - - showOnlySlots->setChecked( justSlots ); - lastType = "function"; - - // Enable rename for all TQListViewItems - TQListViewItemIterator lvit = functionListView->firstChild(); - for ( ; *lvit; lvit++ ) - (*lvit)->setRenameEnabled( 0, TRUE ); - - // Connect listview signal to signal-relay - TQObject::connect( functionListView, - TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ), - this, - TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); - - // Connect signal-relay to TQLineEdit "functionName" - TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "functionName" ); - TQObject *obj; - TQObjectListIt itemsLineEditIt( *l ); - while ( (obj = itemsLineEditIt.current()) != 0 ) { - ++itemsLineEditIt; - TQObject::connect( this, - TQT_SIGNAL( itemRenamed( const TQString & ) ), - obj, - TQT_SLOT( setText( const TQString & ) ) ); - } - delete l; -} - -void EditFunctions::okClicked() -{ - TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); - TQString n = i18n( "Add/Remove functions of '%1'" ).arg( formWindow->name() ); - TQPtrList commands; - TQValueList::Iterator fit; - if ( !functionList.isEmpty() ) { - for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) { - bool functionFound = FALSE; - TQValueList::Iterator it = functList.begin(); - for ( ; it != functList.end(); ++it ) { - if ( MetaDataBase::normalizeFunction( (*it).oldName ) == - MetaDataBase::normalizeFunction( (*fit).function ) ) { - functionFound = TRUE; - break; - } - } - if ( !functionFound ) - commands.append( new RemoveFunctionCommand( i18n( "Remove Function" ), - formWindow, (*fit).function, (*fit).specifier, - (*fit).access, - (*fit).type, - formWindow->project()->language(), - (*fit).returnType ) ); - } - } - - bool invalidFunctions = FALSE; - TQValueList invalidItems; - - if ( !functList.isEmpty() ) { - TQStrList lst; - TQValueList::Iterator it = functList.begin(); - for ( ; it != functList.end(); ++it ) { - MetaDataBase::Function function; - function.function = (*it).newName; - function.returnType = (*it).retTyp; - function.specifier = (*it).spec; - function.access = (*it).access; - function.type = (*it).type; - function.language = formWindow->project()->language(); - if ( function.returnType.isEmpty() ) - function.returnType = "void"; - TQString s = function.function; - s = s.simplifyWhiteSpace(); - bool startNum = s[ 0 ] >= '0' && s[ 0 ] <= '9'; - bool noParens = s.contains( '(' ) != 1 || s.contains( ')' ) != 1; - bool illegalSpace = s.find( ' ' ) != -1 && s.find( ' ' ) < s.find( '(' ); - - if ( startNum || noParens || illegalSpace || lst.find( function.function ) != -1 ) { - invalidFunctions = TRUE; - invalidItems.append( (*it) ); - continue; - } - bool functionFound = FALSE; - for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) { - if ( MetaDataBase::normalizeFunction( (*fit).function ) == - MetaDataBase::normalizeFunction( (*it).oldName ) ) { - functionFound = TRUE; - break; - } - } - if ( !functionFound ) - commands.append( new AddFunctionCommand( i18n( "Add Function" ), - formWindow, function.function, function.specifier, - function.access, - function.type, formWindow->project()->language(), - function.returnType ) ); - if ( MetaDataBase::normalizeFunction( (*it).newName ) != MetaDataBase::normalizeFunction( (*it).oldName ) || - (*it).spec != (*it).oldSpec || (*it).access != (*it).oldAccess || (*it).type != (*it).oldType || - (*it).retTyp != (*it).oldRetTyp ) { - TQString normalizedOldName = MetaDataBase::normalizeFunction( (*it).oldName ); - if ((*it).oldName.endsWith("const")) // make sure we get the 'const' when we remove the old name - normalizedOldName += " const"; - commands.append( new ChangeFunctionAttribCommand( i18n( "Change Function Attributes" ), - formWindow, function, normalizedOldName, - (*it).oldSpec, (*it).oldAccess, (*it).oldType, - formWindow->project()->language(), (*it).oldRetTyp ) ); - } - lst.append( function.function ); - } - } - - if ( invalidFunctions ) { - if ( TQMessageBox::information( this, i18n( "Edit Functions" ), - i18n( "Some syntactically incorrect functions have been defined.\n" - "Remove these functions?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { - TQValueList::Iterator it = functList.begin(); - while ( it != functList.end() ) { - bool found = FALSE; - TQValueList::Iterator vit = invalidItems.begin(); - for ( ; vit != invalidItems.end(); ++vit ) { - if ( (*vit).newName == (*it).newName ) { - invalidItems.remove( vit ); - found = TRUE; - break; - } - } - if ( found ) { - int delId = (*it).id; - it = functList.remove( it ); - TQMap::Iterator fit = functionIds.begin(); - while ( fit != functionIds.end() ) { - if ( *fit == delId ) { - TQListViewItem *litem = fit.key(); - functionIds.remove( fit ); - delete litem; - if ( functionListView->currentItem() ) - functionListView->setSelected( functionListView->currentItem(), TRUE ); - currentItemChanged( functionListView->currentItem() ); - break; - } - ++fit; - } - } - else - ++it; - } - if ( functionListView->firstChild() ) { - functionListView->setCurrentItem( functionListView->firstChild() ); - functionListView->setSelected( functionListView->firstChild(), TRUE ); - } - } - formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - return; - } - - if ( !commands.isEmpty() ) { - MacroCommand *cmd = new MacroCommand( n, formWindow, commands ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - - formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - accept(); -} - -void EditFunctions::functionAdd( const TQString &access, const TQString &type ) -{ - TQListViewItem *i = new TQListViewItem( functionListView ); - i->setPixmap( 0, SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()) ); - i->setRenameEnabled( 0, TRUE ); - i->setText( 1, "void" ); - i->setText( 2, "virtual" ); - - if ( access.isEmpty() ) - i->setText( 3, "public" ); - else - i->setText( 3, access ); - - if( type.isEmpty() ) { - if ( showOnlySlots->isChecked() ) - i->setText( 4, "slot" ); - else { - i->setText( 4, lastType ); - } - } else { - i->setText( 4, type ); - } - - if ( i->text( 4 ) == "slot" ) { - i->setText( 0, "newSlot()" ); - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), "newSlot()" ) ) - i->setText( 5, i18n( "Yes" ) ); - else - i->setText( 5, i18n( "No" ) ); - } else { - i->setText( 0, "newFunction()" ); - i->setText( 5, "---" ); - } - - functionListView->setCurrentItem( i ); - functionListView->setSelected( i, TRUE ); - functionListView->ensureItemVisible( i ); - functionName->setFocus(); - functionName->selectAll(); - - FunctItem fui; - fui.id = id; - fui.oldName = i->text( 0 ); - fui.newName = fui.oldName; - fui.oldRetTyp = i->text( 1 ); - fui.retTyp = fui.oldRetTyp; - fui.oldSpec = i->text ( 2 ); - fui.spec = fui.oldSpec; - fui.oldAccess = i->text( 3 ); - fui.access = fui.oldAccess; - fui.oldType = i->text( 4 ); - fui.type = fui.oldType; - lastType = fui.oldType; - functList.append( fui ); - functionIds.insert( i, id ); - id++; -} - -void EditFunctions::functionRemove() -{ - if ( !functionListView->currentItem() ) - return; - - functionListView->blockSignals( TRUE ); - removedFunctions << MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ) ); - int delId = functionIds[ functionListView->currentItem() ]; - TQValueList::Iterator it = functList.begin(); - while ( it != functList.end() ) { - if ( (*it).id == delId ) { - functList.remove( it ); - break; - } - ++it; - } - functionIds.remove( functionListView->currentItem() ); - delete functionListView->currentItem(); - if ( functionListView->currentItem() ) - functionListView->setSelected( functionListView->currentItem(), TRUE ); - functionListView->blockSignals( FALSE ); - currentItemChanged( functionListView->currentItem() ); -} - -void EditFunctions::currentItemChanged( TQListViewItem *i ) -{ - functionName->blockSignals( TRUE ); - functionName->setText( "" ); - functionAccess->setCurrentItem( 0 ); - functionName->blockSignals( FALSE ); - - if ( !i ) { - boxProperties->setEnabled( FALSE ); - return; - } - - functionName->blockSignals( TRUE ); - functionName->setText( i->text( 0 ) ); - editType->setText( i->text( 1 ) ); - TQString specifier = i->text( 2 ); - TQString access = i->text( 3 ); - TQString type = i->text( 4 ); - if ( specifier == "pure virtual" ) - functionSpecifier->setCurrentItem( 2 ); - else if ( specifier == "non virtual" ) - functionSpecifier->setCurrentItem( 0 ); - else if ( specifier == "virtual" ) - functionSpecifier->setCurrentItem( 1 ); - else - functionSpecifier->setCurrentItem( 3 ); - if ( access == "private" ) - functionAccess->setCurrentItem( 2 ); - else if ( access == "protected" ) - functionAccess->setCurrentItem( 1 ); - else - functionAccess->setCurrentItem( 0 ); - if ( type == "slot" ) - functionType->setCurrentItem( 0 ); - else - functionType->setCurrentItem( 1 ); - - functionName->blockSignals( FALSE ); - boxProperties->setEnabled( TRUE ); -} - -void EditFunctions::currentTextChanged( const TQString &txt ) -{ - if ( !functionListView->currentItem() ) - return; - - changeItem( functionListView->currentItem(), Name, txt ); - functionListView->currentItem()->setText( 0, txt ); - - if ( functionListView->currentItem()->text( 4 ) == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) ) - functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); - else - functionListView->currentItem()->setText( 5, i18n( "No" ) ); - } else { - functionListView->currentItem()->setText( 5, "---" ); - } -} - -void EditFunctions::currentSpecifierChanged( const TQString& s ) -{ - if ( !functionListView->currentItem() ) - return; - - changeItem( functionListView->currentItem(), Specifier, s ); - functionListView->currentItem()->setText( 2, s ); -} - -void EditFunctions::currentAccessChanged( const TQString& a ) -{ - if ( !functionListView->currentItem() ) - return; - changeItem( functionListView->currentItem(), Access, a ); - functionListView->currentItem()->setText( 3, a ); -} - - -void EditFunctions::currentReturnTypeChanged( const TQString &type ) -{ - if ( !functionListView->currentItem() ) - return; - changeItem( functionListView->currentItem(), ReturnType, type ); - functionListView->currentItem()->setText( 1, type ); -} - -void EditFunctions::currentTypeChanged( const TQString &type ) -{ - if ( !functionListView->currentItem() ) - return; - changeItem( functionListView->currentItem(), Type, type ); - lastType = type; - functionListView->currentItem()->setText( 4, type ); - if ( type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), - MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ).latin1() ).latin1() ) ) - functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); - else - functionListView->currentItem()->setText( 5, i18n( "No" ) ); - } else { - functionListView->currentItem()->setText( 5, "---" ); - } -} - -void EditFunctions::changeItem( TQListViewItem *item, Attribute a, const TQString &nV ) -{ - int itemId; - TQMap::Iterator fit = functionIds.find( item ); - if ( fit != functionIds.end() ) - itemId = *fit; - else - return; - - TQValueList::Iterator it = functList.begin(); - for ( ; it != functList.end(); ++it ) { - if ( (*it).id == itemId ) { - switch( a ) { - case Name: - (*it).newName = nV; - break; - case Specifier: - (*it).spec = nV; - break; - case Access: - (*it).access = nV; - break; - case ReturnType: - (*it).retTyp = nV; - break; - case Type: - (*it).type = nV; - break; - } - } - } -} - -void EditFunctions::setCurrentFunction( const TQString &function ) -{ - TQListViewItemIterator it( functionListView ); - while ( it.current() ) { - if ( MetaDataBase::normalizeFunction( it.current()->text( 0 ) ) == function ) { - functionListView->setCurrentItem( it.current() ); - functionListView->setSelected( it.current(), TRUE ); - currentItemChanged( it.current() ); - return; - } - ++it; - } -} - -void EditFunctions::displaySlots( bool justSlots ) -{ - functionIds.clear(); - functionListView->clear(); - for ( TQValueList::Iterator it = functList.begin(); it != functList.end(); ++it ) { - if ( (*it).type == "function" && justSlots ) - continue; - TQListViewItem *i = new TQListViewItem( functionListView ); - functionIds.insert( i, (*it).id ); - i->setPixmap( 0, SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()) ); - i->setText( 0, (*it).newName ); - i->setText( 1, (*it).retTyp ); - i->setText( 2, (*it).spec ); - i->setText( 3, (*it).access ); - i->setText( 4, (*it).type ); - - if ( (*it).type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) ) - i->setText( 5, i18n( "Yes" ) ); - else - i->setText( 5, i18n( "No" ) ); - } else { - i->setText( 5, "---" ); - } - } - - if ( functionListView->firstChild() ) - functionListView->setSelected( functionListView->firstChild(), TRUE ); -} - -void EditFunctions::emitItemRenamed( TQListViewItem *, int, const TQString & text ) -{ - emit itemRenamed( text ); // Relay signal ( to TQLineEdit ) -} diff --git a/tdevdesigner/designer/editfunctionsimpl.h b/tdevdesigner/designer/editfunctionsimpl.h deleted file mode 100644 index 0d4259dc..00000000 --- a/tdevdesigner/designer/editfunctionsimpl.h +++ /dev/null @@ -1,95 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef EDITFUNCTIONSIMPL_H -#define EDITFUNCTIONSIMPL_H - -#include "editfunctions.h" -#include "hierarchyview.h" -#include "metadatabase.h" -#include - -class FormWindow; -class TQListViewItem; - -class EditFunctions : public EditFunctionsBase -{ - Q_OBJECT - - -public: - EditFunctions( TQWidget *parent, FormWindow *fw, bool showOnlySlots = FALSE ); - - void setCurrentFunction( const TQString &function ); - void functionAdd( const TQString &access = TQString(), - const TQString &type = TQString() ); - void functionAdd() { functionAdd( "public" ); } - -signals: - void itemRenamed(const TQString &); - -protected slots: - void okClicked(); - void functionRemove(); - void currentItemChanged( TQListViewItem * ); - void currentTextChanged( const TQString &txt ); - void currentSpecifierChanged( const TQString &s ); - void currentAccessChanged( const TQString &a ); - void currentReturnTypeChanged( const TQString &type ); - void currentTypeChanged( const TQString &type ); - void displaySlots( bool justSlots ); - void emitItemRenamed( TQListViewItem *, int, const TQString & ); - -private: - enum Attribute { Name, Specifier, Access, ReturnType, Type }; - struct FunctItem { - int id; - TQString oldName; - TQString newName; - TQString oldRetTyp; - TQString retTyp; - TQString spec; - TQString oldSpec; - TQString access; - TQString oldAccess; - TQString type; - TQString oldType; - - TQ_DUMMY_COMPARISON_OPERATOR( FunctItem ) - }; - - void changeItem( TQListViewItem *item, Attribute a, const TQString &nV ); - - FormWindow *formWindow; - TQMap functionIds; - TQStringList removedFunctions; - TQValueList itemList; - TQValueList functList; - int id; - TQString lastType; -}; - -#endif diff --git a/tdevdesigner/designer/filechooser.cpp b/tdevdesigner/designer/filechooser.cpp deleted file mode 100644 index 0f4c426e..00000000 --- a/tdevdesigner/designer/filechooser.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "filechooser.h" -#include -#include -#include -#include - -#include - -FileChooser::FileChooser( TQWidget *parent, const char *name ) - : TQWidget( parent, name ), md( File ) -{ - TQHBoxLayout *layout = new TQHBoxLayout( this ); - layout->setMargin( 0 ); - - lineEdit = new TQLineEdit( this, "filechooser_lineedit" ); - layout->addWidget( lineEdit ); - - connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( fileNameChanged( const TQString & ) ) ); - - button = new TQPushButton( "...", this, "filechooser_button" ); - button->setFixedWidth( button->fontMetrics().width( " ... " ) ); - layout->addWidget( button ); - - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( chooseFile() ) ); - - setFocusProxy( lineEdit ); -} - -void FileChooser::setMode( Mode m ) -{ - md = m; -} - -FileChooser::Mode FileChooser::mode() const -{ - return md; -} - -void FileChooser::setFileName( const TQString &fn ) -{ - lineEdit->setText( fn ); -} - -TQString FileChooser::fileName() const -{ - return lineEdit->text(); -} - -void FileChooser::chooseFile() -{ - TQString fn; - if ( mode() == File ) - fn = KFileDialog::getOpenFileName( lineEdit->text(), TQString(), this ); - else - fn = KFileDialog::getExistingDirectory( lineEdit->text(),this ); - - if ( !fn.isEmpty() ) { - lineEdit->setText( fn ); - emit fileNameChanged( fn ); - } -} - diff --git a/tdevdesigner/designer/filechooser.h b/tdevdesigner/designer/filechooser.h deleted file mode 100644 index 42430334..00000000 --- a/tdevdesigner/designer/filechooser.h +++ /dev/null @@ -1,69 +0,0 @@ -/********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef FILECHOOSER_H -#define FILECHOOSER_H - -#include - -class TQLineEdit; -class TQPushButton; - -class FileChooser : public TQWidget -{ - Q_OBJECT - - - TQ_ENUMS( Mode ) - TQ_PROPERTY( Mode mode READ mode WRITE setMode ) - TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName ) - -public: - FileChooser( TQWidget *parent = 0, const char *name = 0); - - enum Mode { File, Directory }; - - TQString fileName() const; - Mode mode() const; - -public slots: - void setFileName( const TQString &fn ); - void setMode( Mode m ); - -signals: - void fileNameChanged( const TQString & ); - -private slots: - void chooseFile(); - -private: - TQLineEdit *lineEdit; - TQPushButton *button; - Mode md; - -}; - -#endif diff --git a/tdevdesigner/designer/finddialog.ui b/tdevdesigner/designer/finddialog.ui deleted file mode 100644 index 9b16cd8c..00000000 --- a/tdevdesigner/designer/finddialog.ui +++ /dev/null @@ -1,274 +0,0 @@ - -FindDialog -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - FindDialog - - - - 0 - 0 - 285 - 189 - - - - Find Text - - - - unnamed - - - 11 - - - 6 - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - TextLabel1 - - - F&ind: - - - comboFind - - - - - comboFind - - - - 7 - 0 - 0 - 0 - - - - true - - - - - - - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - PushButton1 - - - &Find - - - true - - - - - PushButton2 - - - &Close - - - - - - - ButtonGroup2 - - - Direction - - - - unnamed - - - 11 - - - 6 - - - - radioForward - - - Forwar&d - - - true - - - - - radioBackward - - - Bac&kward - - - - - - - ButtonGroup1 - - - Options - - - - unnamed - - - 11 - - - 6 - - - - checkWords - - - &Whole words only - - - - - checkCase - - - Case &sensitive - - - - - checkBegin - - - Start at &beginning - - - - - - - - - PushButton1 - clicked() - FindDialog - doFind() - - - PushButton2 - clicked() - FindDialog - reject() - - - - comboFind - checkWords - checkCase - checkBegin - radioForward - radioBackward - PushButton1 - PushButton2 - - - tqlineedit.h - ../interfaces/editorinterface.h - finddialog.ui.h - - - struct EditorInterface; - - - EditorInterface *editor; - TQObject *formWindow; - - - init() - destroy() - doFind() - setEditor( EditorInterface * e, TQObject * fw ) - - - diff --git a/tdevdesigner/designer/finddialog.ui.h b/tdevdesigner/designer/finddialog.ui.h deleted file mode 100644 index 126c0a5f..00000000 --- a/tdevdesigner/designer/finddialog.ui.h +++ /dev/null @@ -1,61 +0,0 @@ -/********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -void FindDialog::init() -{ - editor = 0; - formWindow = 0; -} - -void FindDialog::destroy() -{ - if ( editor ) - editor->release(); -} - -void FindDialog::doFind() -{ - if ( !editor ) - return; - - if ( !editor->find( comboFind->currentText(), checkCase->isChecked(), - checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked() ) ) - checkBegin->setChecked( TRUE ); - else - checkBegin->setChecked( FALSE ); - -} - -void FindDialog::setEditor( EditorInterface * e, TQObject * fw ) -{ - if ( fw != formWindow ) - checkBegin->setChecked( TRUE ); - formWindow = fw; - if ( editor ) - editor->release(); - editor = e; - editor->addRef(); -} diff --git a/tdevdesigner/designer/formfile.cpp b/tdevdesigner/designer/formfile.cpp deleted file mode 100644 index ce04010e..00000000 --- a/tdevdesigner/designer/formfile.cpp +++ /dev/null @@ -1,905 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "formfile.h" -#include "timestamp.h" -#include "project.h" -#include "formwindow.h" -#include "command.h" -#include "sourceeditor.h" -#include "mainwindow.h" -#include "../interfaces/languageinterface.h" -#include "resource.h" -#include "workspace.h" -#include -#include -#include -#include "propertyeditor.h" -#include -#include -#include "designerappiface.h" -#include - -#include -#include -#include "tdevdesigner_part.h" - -static TQString make_func_pretty( const TQString &s ) -{ - TQString res = s; - if ( res.find( ")" ) - res.find( "(" ) == 1 ) - return res; - res.replace( "(", "( " ); - res.replace( ")", " )" ); - res.replace( "&", " &" ); - res.replace( "*", " *" ); - res.replace( ",", ", " ); - res.replace( ":", " : " ); - res = res.simplifyWhiteSpace(); - res.replace( " : : ", "::" ); - res.replace( ">>", "> >" ); - return res; -} - -FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name ) - : filename( fn ), fileNameTemp( temp ), pro( p ), fw( 0 ), ed( 0 ), - timeStamp( 0, fn + codeExtension() ), codeEdited( FALSE ), pkg( FALSE ), - cm( FALSE ), codeFileStat( None ) -{ - MetaDataBase::addEntry( this ); - fake = qstrcmp( name, "qt_fakewindow" ) == 0; - //codeFileStat = FormFile::None; - pro->addFormFile( this ); - loadCode(); - if ( !temp ) - checkFileName( FALSE ); - - connect(this, TQT_SIGNAL(somethingChanged(FormFile* )), this, TQT_SLOT(emitNewStatus(FormFile* ))); -} - -FormFile::~FormFile() -{ - pro->removeFormFile( this ); - if ( TQT_TQOBJECT(formWindow()) ) - formWindow()->setFormFile( 0 ); -} - -void FormFile::setFormWindow( FormWindow *f ) -{ - if ( f == fw ) - return; - if ( fw ) - fw->setFormFile( 0 ); - fw = f; - if ( fw ) - fw->setFormFile( this ); - parseCode( cod, FALSE ); - TQTimer::singleShot( 0, this, TQT_SLOT( notifyFormWindowChange() ) ); -} - -void FormFile::setEditor( SourceEditor *e ) -{ - ed = e; -} - -void FormFile::setFileName( const TQString &fn ) -{ - if ( fn == filename ) - return; - if ( fn.isEmpty() ) { - fileNameTemp = TRUE; - if ( filename.find( "unnamed" ) != 0 ) - filename = createUnnamedFileName(); - return; - } else { - fileNameTemp = FALSE; - } - filename = fn; - timeStamp.setFileName( filename + codeExtension() ); - cod = ""; - loadCode(); -} - -void FormFile::setCode( const TQString &c ) -{ - cod = c; -} - -FormWindow *FormFile::formWindow() const -{ - return fw; -} - -SourceEditor *FormFile::editor() const -{ - return ed; -} - -TQString FormFile::fileName() const -{ - return filename; -} - -TQString FormFile::absFileName() const -{ - return pro->makeAbsolute( filename ); -} - -TQString FormFile::codeFile() const -{ - TQString codeExt = codeExtension(); - if ( codeExt.isEmpty() ) - return ""; - return filename + codeExt; -} - -TQString FormFile::code() -{ - return cod; -} - -bool FormFile::save( bool withMsgBox, bool ignoreModified ) -{ - if ( fileNameTemp ) - return saveAs(); - if ( !ignoreModified && !isModified() ) - return TRUE; - if ( ed ) - ed->save(); - - if ( TQT_TQOBJECT(formWindow()) && isModified( WFormWindow ) ) { - if ( withMsgBox ) { - if ( !formWindow()->checkCustomWidgets() ) - return FALSE; - } - - if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) { - TQString fn( pro->makeAbsolute( filename ) ); -#if defined(Q_OS_WIN32) - fn += ".bak"; -#else - fn += "~"; -#endif - TQFile f( pro->makeAbsolute( filename ) ); - if ( f.open( IO_ReadOnly ) ) { - TQFile f2( fn ); - if ( f2.open( IO_WriteOnly | IO_Translate ) ) { - TQCString data( f.size() ); - f.readBlock( data.data(), f.size() ); - f2.writeBlock( data ); - } else { - TQMessageBox::warning( MainWindow::self, i18n( "Save" ), - i18n( "The file %1 could not be saved" ).arg( codeFile() ) ); - } - } - } - } - - if ( isModified( WFormCode ) ) { - if ( TQFile::exists( pro->makeAbsolute( codeFile() ) ) ) { - TQString fn( pro->makeAbsolute( codeFile() ) ); -#if defined(Q_OS_WIN32) - fn += ".bak"; -#else - fn += "~"; -#endif - TQFile f( pro->makeAbsolute( codeFile() ) ); - if ( f.open( IO_ReadOnly ) ) { - TQFile f2( fn ); - if ( f2.open( IO_WriteOnly | IO_Translate) ) { - TQCString data( f.size() ); - f.readBlock( data.data(), f.size() ); - f2.writeBlock( data ); - } else if ( tqApp->type() != TQApplication::Tty ) { - TQMessageBox::warning( MainWindow::self, i18n( "Save" ), - i18n( "The file %1 could not be saved" ).arg( codeFile() ) ); - } - } - } - } - - if ( TQT_TQOBJECT(formWindow()) ) { - Resource resource( MainWindow::self ); - resource.setWidget( formWindow() ); - bool formCodeOnly = isModified( WFormCode ) && !isModified( WFormWindow ); - if ( !resource.save( pro->makeAbsolute( filename ), formCodeOnly ) ) { - if ( MainWindow::self ) - MainWindow::self->statusMessage( i18n( "Failed to save file '%1'.").arg( formCodeOnly ? codeFile(): filename ) ); - if ( formCodeOnly ) - return FALSE; - return saveAs(); - } - if ( MainWindow::self ) - MainWindow::self->statusMessage( i18n( "'%1' saved."). - arg( formCodeOnly ? codeFile() : filename )); - } else { - if ( !Resource::saveFormCode(this, MetaDataBase::languageInterface(pro->language())) ) - return FALSE; - } - timeStamp.update(); - setModified( FALSE ); - return TRUE; -} - -bool FormFile::saveAs( bool ignoreModified ) -{ - TQString f = pro->makeAbsolute( fileName() ); - if ( fileNameTemp && TQT_TQOBJECT(formWindow()) ) { - f = TQString( formWindow()->name() ).lower(); - f.replace( "::", "_" ); - f = pro->makeAbsolute( f + ".ui" ); - } - bool saved = FALSE; - if ( ignoreModified ) { - TQString dir = TQStringList::split( ':', pro->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first(); - f = TQFileInfo( f ).fileName(); - f.prepend( dir + "/" ); - } - TQString fn; - while ( !saved ) { - fn = KFileDialog::getSaveFileName( f, - i18n( "*.ui|TQt User-Interface Files" ) + "\n" + - i18n( "*|All Files" ), MainWindow::self, /*0,*/ - i18n( "Save Form '%1' As").arg( formName() )/*, - MainWindow::self ? &MainWindow::self->lastSaveFilter : 0*/ ); - if ( fn.isEmpty() ) - return FALSE; - TQFileInfo fi( fn ); - if ( fi.extension() != "ui" ) - fn += ".ui"; - fileNameTemp = FALSE; - filename = pro->makeRelative( fn ); - TQFileInfo relfi( filename ); - if ( relfi.exists() ) { - if ( TQMessageBox::warning( MainWindow::self, i18n( "File Already Exists" ), - i18n( "The file already exists. Do you wish to overwrite it?" ), - TQMessageBox::Yes, - TQMessageBox::No ) == TQMessageBox::Yes ) { - saved = TRUE; - } else { - filename = f; - } - - } else { - saved = TRUE; - } - } - if ( !checkFileName( TRUE ) ) { - filename = f; - return FALSE; - } - pro->setModified( TRUE ); - timeStamp.setFileName( pro->makeAbsolute( codeFile() ) ); - if ( ed && TQT_TQOBJECT(formWindow()) ) - ed->setCaption( i18n( "Edit %1" ).arg( formWindow()->name() ) ); - setModified( TRUE ); - if ( pro->isDummy() ) - fw->mainWindow()->addRecentlyOpenedFile( fn ); - return save( TRUE, ignoreModified ); -} - -bool FormFile::close() -{ - if ( editor() ) { - editor()->save(); - editor()->close(); - } - if ( TQT_TQOBJECT(formWindow()) ) - return formWindow()->close(); - return TRUE; -} - -bool FormFile::closeEvent() -{ - if ( !isModified() && fileNameTemp ) { - pro->removeFormFile( this ); - return TRUE; - } - - if ( !isModified() ) - return TRUE; - - if ( editor() ) - editor()->save(); - - switch ( TQMessageBox::warning( MainWindow::self, i18n( "Save Form" ), - i18n( "Save changes to form '%1'?" ).arg( filename ), - i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { - case 0: // save - if ( !save() ) - return FALSE; - case 1: // don't save - loadCode(); - if ( ed ) - ed->editorInterface()->setText( cod ); - if ( fileNameTemp ) - pro->removeFormFile( this ); - if ( MainWindow::self ) - MainWindow::self->workspace()->update(); - break; - case 2: // cancel - return FALSE; - default: - break; - } - - setModified( FALSE ); - if ( MainWindow::self ) - MainWindow::self->updateFunctionList(); - setCodeEdited( FALSE ); - return TRUE; -} - -void FormFile::setModified( bool m, int who ) -{ - if ( ( who & WFormWindow ) == WFormWindow ) - setFormWindowModified( m ); - if ( ( who & WFormCode ) == WFormCode ) - setCodeModified( m ); -} - -bool FormFile::isModified( int who ) -{ - if ( who == WFormWindow ) - return isFormWindowModified(); - if ( who == WFormCode ) - return isCodeModified(); - return isCodeModified() || isFormWindowModified(); -} - -bool FormFile::isFormWindowModified() const -{ - if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) - return FALSE; - return formWindow()->commandHistory()->isModified(); -} - -bool FormFile::isCodeModified() const -{ - if ( !editor() ) - return cm; - return editor()->isModified(); -} - -void FormFile::setFormWindowModified( bool m ) -{ - bool b = isFormWindowModified(); - if ( m == b ) - return; - if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) - return; - formWindow()->commandHistory()->setModified( m ); - emit somethingChanged( this ); -} - -void FormFile::setCodeModified( bool m ) -{ - bool b = isCodeModified(); - if ( m == b ) - return; - emit somethingChanged( this ); - cm = m; - if ( !editor() ) - return; - editor()->setModified( m ); -} - -void FormFile::showFormWindow() -{ - if ( !MainWindow::self ) - return; - if ( TQT_TQOBJECT(formWindow()) ) { - if ( ( formWindow()->hasFocus() || - TQT_BASE_OBJECT(MainWindow::self->qWorkspace()->activeWindow()) == TQT_BASE_OBJECT(formWindow()) ) && - TQT_BASE_OBJECT(MainWindow::self->propertyeditor()->formWindow()) != TQT_BASE_OBJECT(formWindow()) ) { - MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(formWindow()->currentWidget()), formWindow() ); - MainWindow::self->objectHierarchy()->setFormWindow( formWindow(), - TQT_TQOBJECT(formWindow()->currentWidget()) ); - } - formWindow()->setFocus(); - return; - } - MainWindow::self->openFormWindow( pro->makeAbsolute( filename ), TRUE, this ); -} - -bool FormFile::setupUihFile( bool askForUih ) -{ - if ( !pro->isCpp() || !askForUih ) { - if ( !hasFormCode() ) { - createFormCode(); - setModified( TRUE ); - } - codeFileStat = FormFile::Ok; - return TRUE; - } - if ( codeFileStat != FormFile::Ok && !ed ) { - if ( hasFormCode() ) { - int i = TQMessageBox::information( MainWindow::self, i18n( "Using ui.h File" ), - i18n( "An \"ui.h\" file for this form already exists.\n" - "Do you want to use it or create a new one?" ), - i18n( "Use Existing" ), i18n( "Create New" ), - i18n( "Cancel" ), 2, 2 ); - if ( i == 2 ) - return FALSE; - if ( i == 1 ) - createFormCode(); - } else { - if ( TQMessageBox::Yes != TQMessageBox::information( MainWindow::self, i18n( "Creating ui.h file" ), - i18n( "Do you want to create an new \"ui.h\" file?" ), - TQMessageBox::Yes, TQMessageBox::No ) ) - return FALSE; - createFormCode(); - } - setModified( TRUE ); - } - codeFileStat = FormFile::Ok; - return TRUE; -} - -SourceEditor *FormFile::showEditor( bool askForUih ) -{ - if ( !MainWindow::self ) - return 0; - showFormWindow(); - //emit signal to the embedding IDE if there is one and return 0 because - //no source editing is possible - emit fw->mainWindow()->part()->emitEditSource(fw->fileName()); - return 0; -/* if ( !setupUihFile( askForUih ) ) - return 0; - return MainWindow::self->openSourceEditor();*/ -} - -static int ui_counter = 0; -TQString FormFile::createUnnamedFileName() -{ - return TQString( "unnamed" ) + TQString::number( ++ui_counter ) + TQString( ".ui" ); -} - -TQString FormFile::codeExtension() const -{ - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( iface ) - return iface->formCodeExtension(); - return ""; -} - -TQString FormFile::codeComment() const -{ - return TQString( "/****************************************************************************\n" - "** ui.h extension file, included from the uic-generated form implementation.\n" - "**\n" - "** If you want to add, delete, or rename functions or slots, use\n" - "** TQt Designer to update this file, preserving your code.\n" - "**\n" - "** You should not define a constructor or destructor in this file.\n" - "** Instead, write your code in functions called init() and destroy().\n" - "** These will automatically be called by the form's constructor and\n" - "** destructor.\n" - "*****************************************************************************/\n" ); -} - -bool FormFile::hasFormCode() const -{ - return !cod.isEmpty() && cod != TQString( codeComment() ); -} - -int FormFile::codeFileState() const -{ - return hasFormCode() ? codeFileStat : None; -} - -void FormFile::setCodeFileState( UihState s ) -{ - codeFileStat = s; -} - -void FormFile::createFormCode() -{ - if ( !TQT_TQOBJECT(formWindow()) ) - return; - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( !iface ) - return; - if ( pro->isCpp() ) - cod = codeComment(); - TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); - for ( TQValueList::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { - cod += (!cod.isEmpty() ? "\n\n" : "") + - iface->createFunctionStart( formWindow()->name(), make_func_pretty((*it).function), - (*it).returnType.isEmpty() ? - TQString( "void" ) : - (*it).returnType, (*it).access ) + - "\n" + iface->createEmptyFunction(); - } - parseCode( cod, FALSE ); -} - -void FormFile::load() -{ - showFormWindow(); - code(); -} - -bool FormFile::loadCode() -{ - TQFile f( pro->makeAbsolute( codeFile() ) ); - if ( !f.open( IO_ReadOnly ) ) { - cod = ""; - setCodeFileState( FormFile::None ); - return FALSE; - } - TQTextStream ts( &f ); - cod = ts.read(); - parseCode( cod, FALSE ); - if ( hasFormCode() && codeFileStat != FormFile::Ok ) - setCodeFileState( FormFile::Deleted ); - timeStamp.update(); - return TRUE; -} - -bool FormFile::isCodeEdited() const -{ - return codeEdited; -} - -void FormFile::setCodeEdited( bool b ) -{ - codeEdited = b; -} - -void FormFile::parseCode( const TQString &txt, bool allowModify ) -{ - if ( !TQT_TQOBJECT(formWindow()) ) - return; - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( !iface ) - return; - TQValueList functions; - TQValueList newFunctions, oldFunctions; - oldFunctions = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); - iface->functions( txt, &functions ); - TQMap funcs; - for ( TQValueList::Iterator it = functions.begin(); - it != functions.end(); ++it ) { - bool found = FALSE; - for ( TQValueList::Iterator fit = oldFunctions.begin(); - fit != oldFunctions.end(); ++fit ) { - TQString f( (*fit).function ); - if ( MetaDataBase::normalizeFunction( f ) == - MetaDataBase::normalizeFunction( (*it).name ) ) { - found = TRUE; - MetaDataBase::Function function; - function.function = make_func_pretty( (*it).name ); - function.specifier = (*fit).specifier; - function.type = (*fit).type; - if ( !pro->isCpp() ) - function.access = (*it).access; - else - function.access = (*fit).access; - function.language = (*fit).language; - function.returnType = (*it).returnType; - newFunctions << function; - funcs.insert( (*it).name, (*it).body ); - oldFunctions.remove( fit ); - break; - } - } - if ( !found ) { - MetaDataBase::Function function; - function.function = make_func_pretty( (*it).name ); - function.specifier = "virtual"; - function.access = "public"; - function.language = pro->language(); - function.returnType = (*it).returnType; - if ( function.returnType == "void" ) - function.type = "slot"; - else - function.type = "function"; - if ( function.function == "init()" || function.function == "destroy()" ) { - function.type = "function"; - function.access = "private"; - function.specifier = "non virtual"; - } - newFunctions << function; - funcs.insert( (*it).name, (*it).body ); - if ( allowModify ) - setFormWindowModified( TRUE ); - } - } - - if ( allowModify && oldFunctions.count() > 0 ) - setFormWindowModified( TRUE ); - - MetaDataBase::setFunctionList( TQT_TQOBJECT(formWindow()), newFunctions ); -} - -void FormFile::syncCode() -{ - if ( !editor() ) - return; - parseCode( editor()->editorInterface()->text(), TRUE ); - cod = editor()->editorInterface()->text(); -} - -void FormFile::checkTimeStamp() -{ - if ( timeStamp.isUpToDate() ) - return; - timeStamp.update(); - if ( codeEdited ) { - if ( TQMessageBox::information( MainWindow::self, i18n( "TQt Designer" ), - i18n( "File '%1' has been changed outside TQt Designer.\n" - "Do you want to reload it?" ).arg( timeStamp.fileName() ), - i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { - TQFile f( timeStamp.fileName() ); - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - editor()->editorInterface()->setText( ts.read() ); - editor()->save(); - if ( MainWindow::self ) - MainWindow::self->functionsChanged(); - } - } - } else { - loadCode(); - } -} - -bool FormFile::isUihFileUpToDate() -{ - if ( timeStamp.isUpToDate() ) - return TRUE; - if ( !editor() ) { - MainWindow::self->editSource(); - tqDebug( "parse Code" ); - parseCode( editor()->editorInterface()->text(), TRUE ); - } - checkTimeStamp(); - return FALSE; -} - -void FormFile::addFunctionCode( MetaDataBase::Function function ) -{ - if ( pro->isCpp() && !hasFormCode() && !codeEdited ) - return; - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( !iface ) - return; - - TQValueList funcs; - iface->functions( cod, &funcs ); - bool hasFunc = FALSE; - for ( TQValueList::Iterator it = funcs.begin(); - it != funcs.end(); ++it ) { - if ( MetaDataBase::normalizeFunction( (*it).name ) == MetaDataBase::normalizeFunction( function.function ) ) { - hasFunc = TRUE; - break; - } - } - - if ( !hasFunc ) { - if ( !codeEdited && !timeStamp.isUpToDate() ) - loadCode(); - MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( TQT_TQOBJECT(formWindow()) ); - TQString cn; - if ( mi.classNameChanged ) - cn = mi.className; - if ( cn.isEmpty() ) - cn = formWindow()->name(); - TQString body = "\n\n" + iface->createFunctionStart( cn, - make_func_pretty( function.function ), - function.returnType.isEmpty() ? - TQString( "void" ) : - function.returnType, function.access ) + - "\n" + iface->createEmptyFunction(); - cod += body; - if ( codeEdited ) { - setModified( TRUE ); - emit somethingChanged( this ); - } - } -} - -void FormFile::removeFunctionCode( MetaDataBase::Function function ) -{ - if ( pro->isCpp() && !hasFormCode() && !codeEdited ) - return; - - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( !iface ) - return; - - checkTimeStamp(); - TQString sourceCode = code(); - if ( sourceCode.isEmpty() ) - return; - TQValueList functions; - iface->functions( sourceCode, &functions ); - TQString fu = MetaDataBase::normalizeFunction( function.function ); - for ( TQValueList::Iterator fit = functions.begin(); fit != functions.end(); ++fit ) { - if ( MetaDataBase::normalizeFunction( (*fit).name ) == fu ) { - int line = 0; - int start = 0; - while ( line < (*fit).start - 1 ) { - start = sourceCode.find( '\n', start ); - if ( start == -1 ) - return; - start++; - line++; - } - if ( start == -1 ) - return; - int end = start; - while ( line < (*fit).end + 1 ) { - end = sourceCode.find( '\n', end ); - if ( end == -1 ) { - if ( line <= (*fit).end ) - end = sourceCode.length() - 1; - else - return; - } - end++; - line++; - } - if ( end < start ) - return; - sourceCode.remove( start, end - start ); - setCode( sourceCode ); - } - } -} - -void FormFile::functionNameChanged( const TQString &oldName, const TQString &newName ) -{ - if ( !cod.isEmpty() ) { - TQString funcStart = TQString( formWindow()->name() ) + TQString( "::" ); - int i = cod.find( funcStart + oldName ); - if ( i != -1 ) { - cod.remove( i + funcStart.length(), oldName.length() ); - cod.insert( i + funcStart.length(), newName ); - } - } -} - -void FormFile::functionRetTypeChanged( const TQString &fuName, const TQString &oldType, const TQString &newType ) -{ - if ( !cod.isEmpty() ) { - TQString oldFunct = oldType + " " + TQString( formWindow()->name() ) + "::" + fuName; - TQString newFunct = newType + " " + TQString( formWindow()->name() ) + "::" + fuName; - - int i = cod.find( oldFunct ); - if ( i != -1 ) { - cod.remove( i, oldFunct.length() ); - cod.insert( i, newFunct ); - } - } -} - -TQString FormFile::formName() const -{ - FormFile* that = (FormFile*) this; - if ( TQT_TQOBJECT(formWindow()) ) { - that->cachedFormName = formWindow()->name(); - return cachedFormName; - } - if ( !cachedFormName.isNull() ) - return cachedFormName; - TQFile f( pro->makeAbsolute( filename ) ); - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - TQString line; - TQString className; - while ( !ts.eof() ) { - line = ts.readLine(); - if ( !className.isEmpty() ) { - int end = line.find( "" ); - if ( end == -1 ) { - className += line; - } else { - className += line.left( end ); - break; - } - continue; - } - int start; - if ( ( start = line.find( "" ) ) != -1 ) { - int end = line.find( "" ); - if ( end == -1 ) { - className = line.mid( start + 7 ); - } else { - className = line.mid( start + 7, end - ( start + 7 ) ); - break; - } - } - } - that->cachedFormName = className; - } - if ( cachedFormName.isEmpty() ) - that->cachedFormName = filename; - return cachedFormName; -} - -void FormFile::formWindowChangedSomehow() -{ - emit somethingChanged( this ); -} - -bool FormFile::checkFileName( bool allowBreak ) -{ - FormFile *ff = pro->findFormFile( filename, this ); - if ( ff ) - TQMessageBox::warning( MainWindow::self, i18n( "Invalid Filename" ), - i18n( "The project already contains a form with a\n" - "filename of '%1'. Please choose a new filename." ).arg( filename ) ); - while ( ff ) { - TQString fn; - while ( fn.isEmpty() ) { - fn = KFileDialog::getSaveFileName( pro->makeAbsolute( fileName() ), - i18n( "*.ui|TQt User-Interface Files" ) + "\n" + - i18n( "*|All Files" ), MainWindow::self,/* 0,*/ - i18n( "Save Form '%1' As"). - arg( formWindow()->name() )/*, - MainWindow::self ? &MainWindow::self->lastSaveFilter : 0 */); - if ( allowBreak && fn.isEmpty() ) - return FALSE; - } - filename = pro->makeRelative( fn ); - ff = pro->findFormFile( filename, this ); - } - return TRUE; -} - -void FormFile::addConnection( const TQString &sender, const TQString &signal, - const TQString &receiver, const TQString &slot ) -{ - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( iface ) - iface->addConnection( sender, signal, receiver, slot, &cod ); - if ( ed ) - ed->editorInterface()->setText( cod ); -} - -void FormFile::removeConnection( const TQString &sender, const TQString &signal, - const TQString &receiver, const TQString &slot ) -{ - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( iface ) - iface->removeConnection( sender, signal, receiver, slot, &cod ); - if ( ed ) - ed->editorInterface()->setText( cod ); -} - -void FormFile::notifyFormWindowChange() -{ - if ( fw ) - pro->formOpened( fw ); -} - -void FormFile::emitNewStatus(FormFile *file) -{ - fw->mainWindow()->part()->emitNewStatus(fileName(), isModified()); -} diff --git a/tdevdesigner/designer/formfile.h b/tdevdesigner/designer/formfile.h deleted file mode 100644 index 79f92d16..00000000 --- a/tdevdesigner/designer/formfile.h +++ /dev/null @@ -1,146 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef FORMFILE_H -#define FORMFILE_H - -#include -#include "timestamp.h" -#include "metadatabase.h" - -class Project; -class FormWindow; -class SourceEditor; - -class FormFile : public TQObject -{ - Q_OBJECT - - friend class SourceEditor; - -public: - enum Who { - WFormWindow = 1, - WFormCode = 2, - WAnyOrAll = WFormWindow | WFormCode - }; - - enum UihState { None, Ok, Deleted }; - - FormFile( const TQString &fn, bool temp, Project *p, const char *name = 0 ); - ~FormFile(); - - void setFormWindow( FormWindow *f ); - void setEditor( SourceEditor *e ); - void setFileName( const TQString &fn ); - void setCode( const TQString &c ); - void setModified( bool m, int who = WAnyOrAll ); - void setCodeEdited( bool b ); - - FormWindow *formWindow() const; - SourceEditor *editor() const; - TQString fileName() const; - TQString absFileName() const; - - bool supportsCodeFile() const { return !codeExtension().isEmpty(); } - TQString codeComment() const; - TQString codeFile() const; - TQString code(); - bool isCodeEdited() const; - - bool loadCode(); - void load(); - bool save( bool withMsgBox = TRUE, bool ignoreModified = FALSE ); - bool saveAs( bool ignoreModified = FALSE ); - bool close(); - bool closeEvent(); - bool isModified( int who = WAnyOrAll ); - bool hasFormCode() const; - void createFormCode(); - void syncCode(); - void checkTimeStamp(); - bool isUihFileUpToDate(); - void addFunctionCode( MetaDataBase::Function function ); - void removeFunctionCode( MetaDataBase::Function function ); - void functionNameChanged( const TQString &oldName, const TQString &newName ); - void functionRetTypeChanged( const TQString &fuName, const TQString &oldType, const TQString &newType ); - - void showFormWindow(); - SourceEditor *showEditor( bool askForUih = TRUE ); - - static TQString createUnnamedFileName(); - TQString formName() const; - - bool isFake() const { return fake; } - - void parseCode( const TQString &txt, bool allowModify ); - - void addConnection( const TQString &sender, const TQString &signal, - const TQString &receiver, const TQString &slot ); - void removeConnection( const TQString &sender, const TQString &signal, - const TQString &receiver, const TQString &slot ); - - bool hasTempFileName() const { return fileNameTemp; } - void setCodeFileState( UihState ); - int codeFileState() const; - bool setupUihFile( bool askForUih = TRUE ); - - Project *project() const { return pro; } - -signals: - void somethingChanged( FormFile* ); - -private slots: - void formWindowChangedSomehow(); - void notifyFormWindowChange(); - void emitNewStatus(FormFile* file); - -private: - bool isFormWindowModified() const; - bool isCodeModified() const; - void setFormWindowModified( bool m ); - void setCodeModified( bool m ); - TQString codeExtension() const; - bool checkFileName( bool allowBreak ); - -private: - TQString filename; - bool fileNameTemp; - Project *pro; - FormWindow *fw; - SourceEditor *ed; - TQString cod; - TimeStamp timeStamp; - bool codeEdited; - TQString cachedFormName; - bool fake; - bool pkg; - bool cm; - UihState codeFileStat; - -}; - -#endif diff --git a/tdevdesigner/designer/formsettings.ui b/tdevdesigner/designer/formsettings.ui deleted file mode 100644 index 6337e8cf..00000000 --- a/tdevdesigner/designer/formsettings.ui +++ /dev/null @@ -1,549 +0,0 @@ - -FormSettingsBase -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - FormSettingsBase - - - - 0 - 0 - 597 - 458 - - - - Form Settings - - - true - - - <b>Form Settings</b><p>Change settings for the form. Settings like <b>Comment</b> and <b>Author</b> are for your own use and are not required.</p> - - - - unnamed - - - 11 - - - 6 - - - - ButtonGroup1 - - - Pixmaps - - - - unnamed - - - 11 - - - 6 - - - - radioPixmapInline - - - Save in&line - - - true - - - Save pixmaps in the .ui files - - - <b>Save Inline</b><p>Saves the pixmaps as binary data in the .ui files. Pixmaps saved like this are not shared between forms. We recommend using Project image files instead. - - - - - radioProjectImageFile - - - Project &image file - - - Use the Project's Image file for pixmaps - - - <b>Use the Project's Image file for pixmaps</b> -<p>Each project may have a collection of pixmaps. If you use a project, we recommend that you use this option since it shares the images and is the fastest and most efficient way to use pixmaps in your forms.</p> - - - - - editPixmapFunction - - - false - - - Specify Pixmap-Loader function (only the function's name, no parentheses.) - - - <b>Specify Pixmap-Loader function</b><p>Specify the function which should be used for loading a pixmap in the generated code. <em>Only enter the function's name, without parentheses.</em> - - - - - radioPixmapFunction - - - Use &function: - - - Use the given function for pixmaps - - - <b>Use a given function for pixmaps</b><p>If you choose this option you must define a function in the line edit at the right which will be used in the generated code for loading pixmaps. When choosing a pixmap in <i>Qt Designer</i> you will be asked to specify the arguments which will be passed to the function in the generated code.<p> This approach makes it possible to use your own icon-loader function for loading pixmaps. <i>Qt Designer</i> cannot preview the correct image if you use your own function. - - - - - - - GroupBox1 - - - Box - - - Sunken - - - Settings - - - - unnamed - - - 11 - - - 6 - - - - editClassName - - - Change class name - - - <b>Enter the name of the class that will be created.</b><p><em>classname.h</em> and <em>classname.cpp</em> will be generated as C++ output when it is compiled by uic.</p> - - - - - TextLabel1_2 - - - A&uthor: - - - editAuthor - - - - - editAuthor - - - Enter your name - - - Enter your name. - - - - - TextLabel1 - - - Class &name: - - - editClassName - - - - - TextLabel2 - - - Co&mment: - - - editComment - - - - - editComment - - - Enter a comment about the form. - - - - - Spacer1 - - - Vertical - - - Expanding - - - - - - - GroupBox2 - - - La&youts - - - - unnamed - - - 11 - - - 6 - - - - spinMargin - - - 11 - - - - - Spacer3 - - - Horizontal - - - Expanding - - - - - TextLabel2_2 - - - D&efault spacing: - - - spinSpacing - - - - - checkLayoutFunctions - - - Use func&tions: - - - Use functions to get the margin and spacing - - - <b>Use a given function for margin and/or spacing</b><p>If you choose this option you must define functions in the line edit below which will be used in the generated code for getting the margin and spacing value. <i>Qt Designer</i> cannot preview the correct margin or spacing if you use your own function. Instead, the default values will be used for preview. - - - - - spinSpacing - - - 6 - - - - - Spacer4 - - - Horizontal - - - Expanding - - - - - TextLabel1_3 - - - Default mar&gin: - - - spinMargin - - - - - spaFuLabel - - - false - - - S&pacing: - - - editSpacingFunction - - - - - marFuLabel - - - false - - - - 5 - 5 - 0 - 0 - - - - Ma&rgin: - - - editMarginFunction - - - - - Spacer5 - - - Horizontal - - - Expanding - - - - - editSpacingFunction - - - false - - - Specify spacing function (only the function's name, no parentheses.) - - - <b>Specify spacing function</b><p>Specify the function which should be used for getting the spacing in the generated code. <em>Only enter the function's name, without parentheses.</em> - - - - - editMarginFunction - - - false - - - - 5 - 0 - 0 - 0 - - - - Specify margin function (only the function's name, no parentheses.) - - - <b>Specify margin function</b><p>Specify the function which should be used for getting the margin in the generated code. <em>Only enter the function's name, without parentheses.</em> - - - - - - - Layout4 - - - - unnamed - - - 0 - - - 6 - - - - buttonHelp - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - - buttonOk - - - &OK - - - true - - - true - - - Close the dialog and apply all the changes. - - - - - buttonCancel - - - &Cancel - - - true - - - Close the dialog and discard any changes. - - - - - - - - - buttonCancel - clicked() - FormSettingsBase - reject() - - - buttonOk - clicked() - FormSettingsBase - okClicked() - - - radioPixmapFunction - toggled(bool) - editPixmapFunction - setEnabled(bool) - - - checkLayoutFunctions - toggled(bool) - editSpacingFunction - setEnabled(bool) - - - checkLayoutFunctions - toggled(bool) - editMarginFunction - setEnabled(bool) - - - checkLayoutFunctions - toggled(bool) - marFuLabel - setEnabled(bool) - - - checkLayoutFunctions - toggled(bool) - spaFuLabel - setEnabled(bool) - - - - editClassName - editComment - editAuthor - radioPixmapInline - radioPixmapFunction - editPixmapFunction - radioProjectImageFile - spinMargin - spinSpacing - checkLayoutFunctions - editMarginFunction - editSpacingFunction - buttonOk - buttonCancel - buttonHelp - - - okClicked() - - - diff --git a/tdevdesigner/designer/formsettingsimpl.cpp b/tdevdesigner/designer/formsettingsimpl.cpp deleted file mode 100644 index e29ea157..00000000 --- a/tdevdesigner/designer/formsettingsimpl.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "formsettingsimpl.h" -#include "formwindow.h" -#include "metadatabase.h" -#include "command.h" -#include "asciivalidator.h" -#include "mainwindow.h" -#include "project.h" - -#include -#include -#include -#include -#include -#include -#include - -FormSettings::FormSettings( TQWidget *parent, FormWindow *fw ) - : FormSettingsBase( parent, 0, TRUE ), formwindow( fw ) -{ - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(fw) ); - if ( info.classNameChanged && !info.className.isEmpty() ) - editClassName->setText( info.className ); - else - editClassName->setText( fw->name() ); - editComment->setText( info.comment ); - editAuthor->setText( info.author ); - - editClassName->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editClassName) ) ); - editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editPixmapFunction) ) ); - - if ( formwindow->savePixmapInline() ) - radioPixmapInline->setChecked( TRUE ); - else if ( formwindow->savePixmapInProject() ) - radioProjectImageFile->setChecked( TRUE ); - else - radioPixmapFunction->setChecked( TRUE ); - editPixmapFunction->setText( formwindow->pixmapLoaderFunction() ); - radioProjectImageFile->setEnabled( !fw->project()->isDummy() ); - spinSpacing->setValue( formwindow->layoutDefaultSpacing() ); - spinMargin->setValue( formwindow->layoutDefaultMargin() ); - editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editSpacingFunction) ) ); - editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editMarginFunction) ) ); - checkLayoutFunctions->setChecked( formwindow->hasLayoutFunctions() ); - editSpacingFunction->setText( formwindow->spacingFunction() ); - editMarginFunction->setText( formwindow->marginFunction() ); -} - -void FormSettings::okClicked() -{ - MetaDataBase::MetaInfo info; - info.className = editClassName->text(); - info.classNameChanged = info.className != TQString( formwindow->name() ); - info.comment = editComment->text(); - info.author = editAuthor->text(); - MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), info ); - - formwindow->commandHistory()->setModified( TRUE ); - - if ( formwindow->savePixmapInline() ) { - MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) ); - MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) ); - } else if ( formwindow->savePixmapInProject() ) { - MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) ); - } else { - MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) ); - } - - if ( radioPixmapInline->isChecked() ) { - formwindow->setSavePixmapInline( TRUE ); - formwindow->setSavePixmapInProject( FALSE ); - } else if ( radioProjectImageFile->isChecked() ){ - formwindow->setSavePixmapInline( FALSE ); - formwindow->setSavePixmapInProject( TRUE ); - } else { - formwindow->setSavePixmapInline( FALSE ); - formwindow->setSavePixmapInProject( FALSE ); - } - - if ( checkLayoutFunctions->isChecked() ) - formwindow->hasLayoutFunctions( TRUE ); - else - formwindow->hasLayoutFunctions( FALSE ); - - formwindow->setPixmapLoaderFunction( editPixmapFunction->text() ); - formwindow->setLayoutDefaultSpacing( spinSpacing->value() ); - formwindow->setSpacingFunction( editSpacingFunction->text() ); - formwindow->setLayoutDefaultMargin( spinMargin->value() ); - formwindow->setMarginFunction( editMarginFunction->text() ); - - accept(); -} diff --git a/tdevdesigner/designer/formsettingsimpl.h b/tdevdesigner/designer/formsettingsimpl.h deleted file mode 100644 index 3dcb6dd7..00000000 --- a/tdevdesigner/designer/formsettingsimpl.h +++ /dev/null @@ -1,50 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef FORMSETTINGSIMPL_H -#define FORMSETTINGSIMPL_H - -#include "formsettings.h" - -class FormWindow; - -class FormSettings : public FormSettingsBase -{ - Q_OBJECT - - -public: - FormSettings( TQWidget *parent, FormWindow *fw ); - -protected slots: - void okClicked(); - -private: - FormWindow *formwindow; - -}; - -#endif diff --git a/tdevdesigner/designer/formwindow.cpp b/tdevdesigner/designer/formwindow.cpp deleted file mode 100644 index 8852eaa2..00000000 --- a/tdevdesigner/designer/formwindow.cpp +++ /dev/null @@ -1,2773 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "formwindow.h" -#include "defs.h" -#include "mainwindow.h" -#include "widgetfactory.h" -#include "sizehandle.h" -#include "metadatabase.h" -#include "resource.h" -#include "tqlayout.h" -#include "connectiondialog.h" -#include -#include "pixmapchooser.h" -#include "orderindicator.h" -#include "hierarchyview.h" -#include "designerappiface.h" -#include "menubareditor.h" -#define NO_STATIC_COLORS -#include "globaldefs.h" - -#include - -#include -#include -#include "tdevdesigner_part.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// FormWindow should be able to work to some limited degree -// (existance, loading) without a MainWindow. Functions which require -// a MainWindow in theory should never be called if no MainWindow -// exists. These macros are used to let us know if that happens anyway -// and to ensure that we don't crash -#define CHECK_MAINWINDOW Q_ASSERT( mainWindow() ); if ( !mainWindow() ) return -#define CHECK_MAINWINDOW_VALUE( v ) Q_ASSERT( mainWindow() ); if ( !mainWindow() ) return v - -static void setCursorToAll( const TQCursor &c, TQWidget *start ) -{ - start->setCursor( c ); - TQObjectList l = start->childrenListObject(); - if ( !l.isEmpty() ) { - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && !::tqqt_cast(o) ) - setCursorToAll( c, ( (TQWidget*)o ) ); - } - } -} - -static void restoreCursors( TQWidget *start, FormWindow *fw ) -{ - if ( fw->widgets()->find( start ) ) - start->setCursor( MetaDataBase::cursor( start ) ); - else - start->setCursor( TQt::ArrowCursor ); - TQObjectList l = start->childrenListObject(); - if ( !l.isEmpty() ) { - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && !::tqqt_cast(o) ) - restoreCursors( ( (TQWidget*)o ), fw ); - } - } -} - -#if defined(TQ_WS_WIN32) // #### needed for the workaround for repaint problem on windows -#include -static void flickerfree_update( TQWidget *w ) -{ - InvalidateRect( w->winId(), 0, FALSE ); -} -#endif - -/*! - \class FormWindow formwindow.h - \brief Editor window for a form - - The FormWindow is the widget which is used as editor for forms. It - handles inserting, deleting, moving, resizing, etc. of widgets. - - Normally multiple formwindows are used at the same time in the - Designer. So each formwindow has its own undo/redo buffer, etc. - - Also the formwindow has some signals to inform e.g. about selection - changes which is interesting for the PropertyEditor. - - For handling the events of the child widgets (moving, etc.) the - handleMousePress(), etc. functions are called from the application - event filter which is implemented in MainWindow::eventFilter(). -*/ - -FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name ) - : TQWidget( parent, name, WDestructiveClose ), mainwindow( mw ), - commands( 100 ), pixInline( TRUE ), pixProject( FALSE ) -{ - ff = f; - init(); - initSlots(); -} - -FormWindow::FormWindow( FormFile *f, TQWidget *parent, const char *name ) - : TQWidget( parent, name, WDestructiveClose ), mainwindow( 0 ), - commands( 100 ), pixInline( TRUE ) -{ - ff = f; - init(); -} - -void FormWindow::init() -{ - setWFlags(getWFlags() & TQt::WStyle_Maximize); - - fake = qstrcmp( name(), "qt_fakewindow" ) == 0; - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); - ff->setFormWindow( this ); - iface = 0; - proj = 0; - propertyWidget = 0; - toolFixed = FALSE; - checkedSelectionsForMove = FALSE; - mContainer = 0; - startWidget = endWidget = 0; - currTool = POINTER_TOOL; - unclippedPainter = 0; - widgetPressed = FALSE; - drawRubber = FALSE; - setFocusPolicy( TQ_ClickFocus ); - sizePreviewLabel = 0; - checkSelectionsTimer = new TQTimer( this, "checkSelectionsTimer" ); - connect( checkSelectionsTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( invalidCheckedSelections() ) ); - updatePropertiesTimer = new TQTimer( this ); - connect( updatePropertiesTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( updatePropertiesTimerDone() ) ); - showPropertiesTimer = new TQTimer( this ); - //!!!! - connect( showPropertiesTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( showPropertiesTimerDone() ) ); - selectionChangedTimer = new TQTimer( this ); - connect( selectionChangedTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( selectionChangedTimerDone() ) ); - windowsRepaintWorkaroundTimer = new TQTimer( this ); - connect( windowsRepaintWorkaroundTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( windowsRepaintWorkaroundTimerTimeout() ) ); - insertParent = 0; - connect( &commands, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), - this, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) ); - propShowBlocked = FALSE; - - setIcon( SmallIcon( "designer_form.png" , TDevDesignerPartFactory::instance()) ); - - connect( &commands, TQT_SIGNAL( modificationChanged( bool ) ), - this, TQT_SLOT( modificationChanged( bool ) ) ); - buffer = 0; - - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this ); - setMainContainer( w ); - propertyWidget = TQT_TQOBJECT(w); - targetContainer = 0; - hadOwnPalette = FALSE; - - defSpacing = BOXLAYOUT_DEFAULT_SPACING; - defMargin = BOXLAYOUT_DEFAULT_MARGIN; - hasLayoutFunc = FALSE; -} - -void FormWindow::setMainWindow( MainWindow *w ) -{ - mainwindow = w; - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); - initSlots(); -} - -void FormWindow::initSlots() -{ - if ( isFake() ) - return; - Q_ASSERT( project() || MainWindow::self ); - if ( !project() && !MainWindow::self ) - return; - Project *p = project() ? project() : MainWindow::self->currProject(); - if ( p && p->isCpp() ) { - TQString code = formFile()->code(); - if ( code.isEmpty() ) - formFile()->setCode( formFile()->codeComment() ); - } -} - -FormWindow::~FormWindow() -{ - if ( MainWindow::self && MainWindow::self->objectHierarchy()->formWindow() == this ) - MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 ); - - MetaDataBase::clear( TQT_TQOBJECT(this) ); - if ( ff ) - ff->setFormWindow( 0 ); - delete iface; -} - -void FormWindow::closeEvent( TQCloseEvent *e ) -{ - TQGuardedPtr that = this; - if ( ff->closeEvent() && ( !that || ( mainwindow && mainwindow->unregisterClient( this ) ) ) ) - e->accept(); - else - e->ignore(); -} - -void FormWindow::paintGrid( TQWidget *w, TQPaintEvent *e ) -{ - if ( !mainWindow() || !mainWindow()->showGrid() ) - return; - TQPixmap grid; - TQString grid_name; - grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y()); - if( !TQPixmapCache::find( grid_name, grid ) ) { - grid = TQPixmap( 350 + ( 350 % mainWindow()->grid().x() ), 350 + ( 350 % mainWindow()->grid().y() ) ); - grid.fill( colorGroup().color( TQColorGroup::Foreground ) ); - TQBitmap mask( grid.width(), grid.height() ); - mask.fill( color0 ); - TQPainter p( &mask ); - p.setPen( color1 ); - for ( int y = 0; y < grid.width(); y += mainWindow()->grid().y()) { - for ( int x = 0; x < grid.height(); x += mainWindow()->grid().x() ) { - p.drawPoint( x, y ); - } - } - grid.setMask( mask ); - TQPixmapCache::insert( grid_name, grid ); - } - TQPainter p( w ); - p.setClipRegion( e->rect() ); - p.drawTiledPixmap( TQRect( 0, 0, width(), height() ), grid ); -} - -/*! For operations like drawing a rubber band or drawing the rect - when inserting a new widget, a unclipped painter (which draws also - on child widgets) is needed. This method does all the initialization. -*/ - -void FormWindow::beginUnclippedPainter( bool doNot ) -{ - endUnclippedPainter(); - bool unclipped = testWFlags( WPaintUnclipped ); - setWFlags( WPaintUnclipped ); - unclippedPainter = new TQPainter; - unclippedPainter->begin( this ); - if ( !unclipped ) - clearWFlags( WPaintUnclipped ); - if ( doNot ) { - unclippedPainter->setPen( TQPen( color0, 2 ) ); - unclippedPainter->setRasterOp( NotROP ); - } -} - -/*! - Gets rid of an open unclipped painter. - - \sa beginUnclippedPainter() -*/ - -void FormWindow::endUnclippedPainter() -{ - if ( unclippedPainter ) - unclippedPainter->end(); - delete unclippedPainter; - unclippedPainter = 0; -} - -TQPoint FormWindow::gridPoint( const TQPoint &p ) -{ - return TQPoint( ( p.x() / grid().x() ) * grid().x(), - ( p.y() / grid().y() ) * grid().y() ); -} - -void FormWindow::drawSizePreview( const TQPoint &pos, const TQString& text ) -{ - unclippedPainter->save(); - unclippedPainter->setPen( TQPen( colorGroup().foreground(), 1 )); - unclippedPainter->setRasterOp( CopyROP ); - if ( !sizePreviewPixmap.isNull() ) - unclippedPainter->drawPixmap( sizePreviewPos, sizePreviewPixmap ); - if ( text.isNull() ) { - sizePreviewPixmap = TQPixmap(); // set null again - unclippedPainter->restore(); - return; - } - TQRect r = fontMetrics().boundingRect( 0, 0, 0, 0, AlignCenter, text ); - r = TQRect( pos + TQPoint( 10, 10 ), r.size() + TQSize( 5, 5 ) ); - - checkPreviewGeometry( r ); - - sizePreviewPos = r.topLeft(); - sizePreviewPixmap = TQPixmap::grabWindow( winId(), r.x(), r.y(), r.width(), r.height() ); - unclippedPainter->setBrush( TQColor( 255, 255, 128 ) ); - unclippedPainter->drawRect( r ); - unclippedPainter->drawText( r, AlignCenter, text ); - unclippedPainter->restore(); -} - -void FormWindow::insertWidget() -{ - CHECK_MAINWINDOW; - if ( !insertParent ) - return; - - if ( currTool == POINTER_TOOL ) - return; - - bool useSizeHint = !oldRectValid || ( currRect.width() < 2 && currRect.height() < 2 ); - Qt::Orientation orient =Qt::Horizontal; - TQString n = WidgetDatabase::className( currTool ); - if ( useSizeHint && ( n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING ) ) { - TQPopupMenu m( mainWindow() ); - m.insertItem( i18n( "&Horizontal" ) ); - int ver = m.insertItem( i18n( "&Vertical" ) ); - int r = m.exec( TQCursor::pos() ); - if ( r == ver ) - orient =Qt::Vertical; - } - - - TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, TRUE, &currRect, orient ); - if ( !w ) - return; - - if ( !savePixmapInline() && currTool == WidgetDatabase::idFromClassName( "PixmapLabel" ) ) { // ### what to do for pixmaps in project - TQPixmap pix; - // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that - pix.convertFromImage( SmallIcon( "designer_image.png" , TDevDesignerPartFactory::instance()).convertToImage() ); - ( (TQLabel*)w )->setPixmap( pix ); - } - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); - if ( WidgetDatabase::isCustomWidget( id ) ) { - TQWhatsThis::add( w, i18n("A %1 (custom widget) " - "

    Click Edit Custom Widgets... in the Tools|Custom " - "menu to add and change custom widgets. You can add " - "properties as well as signals and slots to integrate custom widgets into " - "TQt Designer, and provide a pixmap which will be used to represent " - "the widget on the form.

    ") - .arg(WidgetDatabase::toolTip( id )) ); - TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) ); - } else { - TQString tt = WidgetDatabase::toolTip( id ); - TQString wt = WidgetDatabase::whatsThis( id ); - if ( !wt.isEmpty() && !tt.isEmpty() ) - TQWhatsThis::add( w, TQString("A %1

    %2

    ").arg( tt ).arg( wt ) ); - } - - TQString s = w->name(); - unify( TQT_TQOBJECT(w), s, TRUE ); - w->setName( s ); - insertWidget( w ); - TQRect r( currRect ); - if ( !oldRectValid || - ( currRect.width() < 2 && currRect.height() < 2 ) ) - r = TQRect( rectAnchor, TQSize( 0, 0 ) ); - - TQPoint p = r.topLeft(); - p = mapToGlobal( p ); - p = insertParent->mapFromGlobal( p ); - r = TQRect( p, r.size() ); - - if ( useSizeHint ) { - if ( n == "Spacer" ) { - if ( orient ==Qt::Vertical ) { - r.setWidth( 20 ); - r.setHeight( 40 ); - } else { - r.setWidth( 40 ); - r.setHeight( 20 ); - } - } else { - r.setWidth( w->sizeHint().width() ); - r.setHeight( w->sizeHint().height() ); - } - } - - if ( r.width() < 2 * grid().x() ) - r.setWidth( 2 * grid().x() ); - if ( r.height() < 2 * grid().y() ) - r.setHeight( 2 * grid().y() ); - - const TQObjectList l = insertParent->childrenListObject(); - TQObjectListIt it( l ); - TQWidgetList lst; - if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { - for ( ; it.current(); ) { - TQObject *o = it.current(); - ++it; - if ( o->isWidgetType() && - ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( TQT_TQWIDGET(o) ) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w) ) { - TQRect r2( ( (TQWidget*)o )->pos(), - ( (TQWidget*)o )->size() ); - if ( r.contains( r2 ) ) - lst.append( (TQWidget*)o ); - } - } - } - - if ( !lst.isEmpty() ) { - TQWidget *pw = WidgetFactory::containerOfWidget( w ); - if (pw) { - TQValueList op, np; - for ( TQWidget *i = lst.first(); i; i = lst.next() ) { - op.append( i->pos() ); - TQPoint pos = pw->mapFromGlobal( i->mapToGlobal( TQPoint( 0, 0 ) ) ); - pos -= r.topLeft(); - np.append( pos ); - } - - MoveCommand *mv = new MoveCommand( i18n( "Reparent Widgets" ), this, - lst, op, np, insertParent, pw ); - - if ( !toolFixed ) - mainwindow->resetTool(); - else - setCursorToAll( CrossCursor, w ); - - InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).arg( w->name() ), this, w, r ); - - TQPtrList commands; - commands.append( mv ); - commands.append( cmd ); - - MacroCommand *mc = new MacroCommand( i18n( "Insert %1" ).arg( w->name() ), this, commands ); - commandHistory()->addCommand( mc ); - mc->execute(); - } - } else { - if ( !toolFixed ) - mainwindow->resetTool(); - else - setCursorToAll( CrossCursor, w ); - - InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).arg( w->name() ), this, w, r ); - commandHistory()->addCommand( cmd ); - cmd->execute(); - } - - TemplateWizardInterface *iface = mainWindow()->templateWizardInterface( w->className() ); - if ( iface ) { - iface->setup( w->className(), w, iFace(), mainWindow()->designerInterface() ); - iface->release(); - } -} - -void FormWindow::insertWidget( TQWidget *w, bool checkName ) -{ - if ( !w ) - return; - if ( checkName ) { - TQString s = w->name(); - unify( TQT_TQOBJECT(w), s, TRUE ); - w->setName( s ); - } - - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); - if ( WidgetDatabase::isCustomWidget( id ) ) { - TQWhatsThis::add( w, i18n("A %1 (custom widget) " - "

    Click Edit Custom Widgets... in the Tools|Custom " - "menu to add and change custom widgets. You can add " - "properties as well as signals and slots to integrate custom widgets into " - "TQt Designer, and provide a pixmap which will be used to represent " - "the widget on the form.

    ") - .arg(WidgetDatabase::toolTip( id )) ); - TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) ); - } else { - TQString tt = WidgetDatabase::toolTip( id ); - TQString wt = WidgetDatabase::whatsThis( id ); - if ( !wt.isEmpty() && !tt.isEmpty() ) - TQWhatsThis::add( w, TQString("A %1

    %2

    ").arg( tt ).arg( wt ) ); - } - - restoreCursors( w, this ); - widgets()->insert( w, w ); - w->show(); -} - -void FormWindow::removeWidget( TQWidget *w ) -{ - MetaDataBase::removeEntry( TQT_TQOBJECT(w) ); - widgets()->take( w ); -} - -void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w ) -{ - CHECK_MAINWINDOW; - switch ( currTool ) { - case POINTER_TOOL: { - if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget - raiseChildSelections( w ); // raise selections and select widget - selectWidget( TQT_TQOBJECT(w) ); - // if widget is laid out, find the first non-laid out super-widget - TQWidget *realWidget = w; // but store the original one - while ( w->parentWidget() && - ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || - !insertedWidgets.find(w) ) ) - w = w->parentWidget(); - if ( ::tqqt_cast(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { - e->accept(); - mainwindow->popupFormWindowMenu( e->globalPos(), this ); - } else { - e->accept(); - mainwindow->popupWidgetMenu( e->globalPos(), this, realWidget); - } - } else { - e->accept(); - clearSelection(); - mainwindow->popupFormWindowMenu( e->globalPos(), this ); - } - break; } - default: - break; - } -} - -void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) -{ - CHECK_MAINWINDOW; - checkedSelectionsForMove = FALSE; - checkSelectionsTimer->stop(); - if ( !sizePreviewLabel ) { - sizePreviewLabel = new TQLabel( this ); - sizePreviewLabel->hide(); - sizePreviewLabel->setBackgroundColor( TQColor( 255, 255, 128 ) ); - sizePreviewLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box ); - } - - switch ( currTool ) { - case POINTER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget - // if the clicked widget is not in a layout, raise it - if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) - w->raise(); - if ( ( e->state() & ControlButton ) ) { // with control pressed, always start rubber band selection - drawRubber = TRUE; - currRect = TQRect( 0, 0, -1, -1 ); - startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); - break; - } - - bool sel = isWidgetSelected( TQT_TQOBJECT(w) ); - if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed... - if ( !sel ) { // ...and widget no selectted: unselect all - clearSelection( FALSE ); - } else { // ...widget selected - // only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) { - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - setPropertyShowingBlocked( TRUE ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( !o->isWidgetType() ) - continue; - if ( insertedWidgets.find( (TQWidget*)o ) ) - selectWidget( TQT_TQOBJECT(o), FALSE ); - } - setPropertyShowingBlocked( FALSE ); - delete l; - } - } - tqApp->processEvents(); - } - if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) && - sel && e->button() == Qt::LeftButton ) { // control pressed and selected, unselect widget - selectWidget( TQT_TQOBJECT(w), FALSE ); - break; - } - - raiseChildSelections( w ); // raise selections and select widget - selectWidget( TQT_TQOBJECT(w) ); - - // if widget is laid out, find the first non-laid out super-widget - while ( w->parentWidget() && - ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.find(w) ) ) - w = w->parentWidget(); - - if ( e->button() == Qt::LeftButton ) { // left button: store original geometry and more as the widget might start moving - widgetPressed = TRUE; - widgetGeom = TQRect( w->pos(), w->size() ); - oldPressPos = w->mapFromGlobal( e->globalPos() ); - origPressPos = oldPressPos; - checkedSelectionsForMove = FALSE; - moving.clear(); - if ( w->parentWidget() && !isMainContainer( TQT_TQOBJECT(w->parentWidget()) ) && !isCentralWidget( TQT_TQOBJECT(w->parentWidget()) ) ) { - targetContainer = w->parentWidget(); - hadOwnPalette = w->parentWidget()->ownPalette(); - restorePalette = w->parentWidget()->palette(); - } - } - } else { // press was on the formwindow - if ( e->button() == Qt::LeftButton ) { // left button: start rubber selection and show formwindow properties - drawRubber = TRUE; - if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { - clearSelection( FALSE ); - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - } - currRect = TQRect( 0, 0, -1, -1 ); - startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); - } - } - break; - case CONNECT_TOOL: - case BUDDY_TOOL: - if ( e->button() != Qt::LeftButton ) - break; - validForBuddy = FALSE; - if ( currTool == BUDDY_TOOL ) { - if ( !::tqqt_cast(w) ) - break; - clearSelection( FALSE ); - validForBuddy = TRUE; - mainWindow()->statusMessage( i18n( "Set buddy for '%1' to..." ).arg( w->name() ) ); - } else { - mainWindow()->statusMessage( i18n( "Connect '%1' with..." ).arg( w->name() ) ); - } - saveBackground(); - startPos = mapFromGlobal( e->globalPos() ); - currentPos = startPos; - startWidget = designerWidget( TQT_TQOBJECT(w) ); - endWidget = startWidget; - beginUnclippedPainter( FALSE ); - drawConnectionLine(); - break; - case ORDER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget - orderedWidgets.removeRef( w ); - orderedWidgets.append( w ); - for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { - int i = stackedWidgets.findRef( wid ); - if ( i != -1 ) { - stackedWidgets.removeRef( wid ); - stackedWidgets.insert( 0, wid ); - } - } - TQWidgetList oldl = MetaDataBase::tabOrder( this ); - TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets ); - cmd->execute(); - commandHistory()->addCommand( cmd, TRUE ); - updateOrderIndicators(); - } - break; - default: // any insert widget tool - if ( e->button() == Qt::LeftButton ) { - insertParent = WidgetFactory::containerOfWidget( mainContainer() ); // default parent for new widget is the formwindow - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press was not on formwindow, check if we can find another parent - TQWidget *wid = w; - for (;;) { - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(wid) ) ); - if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) && - !::tqqt_cast(wid) && !::tqqt_cast(wid) ) { - insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it - break; - } else { - wid = wid->parentWidget(); - if ( !wid ) - break; - } - } - } - startRectDraw( w->mapFromGlobal( e->globalPos() ), e->globalPos(), w, Insert ); - } - break; - } -} - -void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) -{ - CHECK_MAINWINDOW; - switch ( currTool ) { - case ORDER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget - orderedWidgets.clear(); - orderedWidgets.append( w ); - for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { - int i = stackedWidgets.findRef( wid ); - if ( i != -1 ) { - stackedWidgets.removeRef( wid ); - stackedWidgets.insert( 0, wid ); - } - } - TQWidgetList oldl = MetaDataBase::tabOrder( this ); - TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets ); - cmd->execute(); - commandHistory()->addCommand( cmd, TRUE ); - updateOrderIndicators(); - } - default: - if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) && - ( isMainContainer( TQT_TQOBJECT(w) ) || TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(this) ) ) - mainWindow()->editSource(); - break; - } -} - -void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) -{ - CHECK_MAINWINDOW; - if ( ( e->state() & Qt::LeftButton ) != Qt::LeftButton ) - return; - - TQWidget *newendWidget = endWidget, *oldendWidget = endWidget, *wid; - bool drawRecRect; - switch ( currTool ) { - case POINTER_TOOL: - if ( widgetPressed && allowMove( w ) ) { // we are prepated for a move - - // if widget is laid out, find the first non-laid out super-widget - while ( w->parentWidget() && - ( WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout || !insertedWidgets.find(w ) ) ) - w = w->parentWidget(); - - // calc correct position - TQPoint pos = w->mapFromGlobal( e->globalPos() ); - -#if 0 - TQPoint mpos = w->mapToParent( pos ); - // check if we are not outside the visible area, else correct coords - if ( mpos.x() < 0 ) - pos.setX( w->mapFromParent( TQPoint( 0, mpos.y() ) ).x() ); - if ( mpos.y() < 0 ) - pos.setY( w->mapFromParent( TQPoint( mpos.x(), 0 ) ).y() ); - if ( mpos.x() > w->parentWidget()->width() ) - pos.setX( w->mapFromParent( TQPoint( w->parentWidget()->width(), mpos.y() ) ).x() ); - if ( mpos.y() > w->parentWidget()->height() ) - pos.setY( w->mapFromParent( TQPoint( mpos.x(), w->parentWidget()->height() ) ).y() ); -#endif - - // calc move distance and store it - TQPoint d = oldPressPos - pos; - if ( TQABS( d.x() ) < grid().x() ) - d.setX( 0 ); - if ( TQABS( d.y() ) < grid().y() ) - d.setY( 0 ); - if ( d.x() == 0 ) - pos.setX( oldPressPos.x() ); - if ( d.y() == 0 ) - pos.setY( oldPressPos.y() ); - oldPressPos = pos; - - // snap to grid - int x = widgetGeom.x() - d.x(); - widgetGeom.setX( x ); - x = ( x / grid().x() ) * grid().x(); - int y = widgetGeom.y() - d.y(); - widgetGeom.setY( y ); - y = ( y / grid().y() ) * grid().y(); - TQPoint p = w->pos(); - - if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move - if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected... - if ( !isWidgetSelected( TQT_TQOBJECT(w) ) ) { // and unselect others. Only siblings can be moved at the same time - setPropertyShowingBlocked( TRUE ); - selectWidget( TQT_TQOBJECT(w) ); - setPropertyShowingBlocked( FALSE ); - } - checkSelectionsForMove( w ); - } - - // check whether we would have to reparent the selection and highlight the possible new parent container - TQMapConstIterator it = moving.begin(); - TQWidget* wa = containerAt( e->globalPos(), it.key() ); - if ( wa && !isMainContainer( TQT_TQOBJECT(wa) ) && !isCentralWidget( TQT_TQOBJECT(wa) ) ) { - wa = WidgetFactory::containerOfWidget( wa ); - // ok, looks like we moved onto a container - - if ( wa != targetContainer ) { - if ( targetContainer ) { - if ( hadOwnPalette ) - targetContainer->setPalette( restorePalette ); - else - targetContainer->unsetPalette(); - } - targetContainer = wa; - hadOwnPalette = wa->ownPalette(); - restorePalette = wa->palette(); - wa->setPaletteBackgroundColor( wa->colorGroup().midlight() ); - } - } - else if ( targetContainer ) { - if( hadOwnPalette ) - targetContainer->setPalette( restorePalette ); - else - targetContainer->unsetPalette(); - targetContainer = 0; - } - - // finally move the selected widgets and show/update preview label - moveSelectedWidgets( x - p.x(), y - p.y() ); - sizePreviewLabel->setText( i18n( "%1/%2" ).arg( w->pos().x() ).arg( w->pos().y() ) ); - sizePreviewLabel->adjustSize(); - TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() ); - checkPreviewGeometry( lg ); - sizePreviewLabel->setGeometry( lg ); - sizePreviewLabel->raise(); - sizePreviewLabel->show(); -#if defined(TQ_WS_WIN32) - windowsRepaintWorkaroundTimer->start( 100, TRUE ); -#endif - } else { // if we don't need to move, do some indication - TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() ); - checkPreviewGeometry( lg ); - sizePreviewLabel->move( lg.x(), lg.y() ); - } - - oldPressPos += ( p - w->pos() ); - } else if ( drawRubber ) { // draw rubber if we are in rubber-selection mode - continueRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); - } - break; - case CONNECT_TOOL: - restoreConnectionLine(); - wid = tqApp->widgetAt( e->globalPos(), TRUE ); - if ( wid ) - wid = designerWidget( TQT_TQOBJECT(wid) ); - if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) - newendWidget = wid; - if ( ::tqqt_cast(newendWidget) || ::tqqt_cast(newendWidget) ) - newendWidget = (TQWidget*)endWidget; - drawRecRect = newendWidget != endWidget; - if ( newendWidget && - ( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) - endWidget = newendWidget; - mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).arg( startWidget->name() ). - arg( endWidget->name() ) ); - currentPos = mapFromGlobal( e->globalPos() ); - tqApp->processEvents(); - if ( drawRecRect ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), - ( (TQWidget*)oldendWidget )->size() ) ); - drawConnectionLine(); - break; - case BUDDY_TOOL: - if ( !validForBuddy ) - break; - restoreConnectionLine(); - wid = tqApp->widgetAt( e->globalPos(), TRUE ); - if ( wid ) - wid = designerWidget( TQT_TQOBJECT(wid) ); - if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) ) - newendWidget = wid; - else - newendWidget = 0; - if ( ::tqqt_cast(newendWidget) || ::tqqt_cast(newendWidget) ) - newendWidget = (TQWidget*)endWidget; - drawRecRect = newendWidget != endWidget; - if ( !newendWidget ) - endWidget = newendWidget; - else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) - endWidget = newendWidget; - if ( endWidget ) - mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).arg( startWidget->name() ). - arg( endWidget->name() ) ); - else - mainWindow()->statusMessage( i18n( "Set buddy '%1' to ..." ).arg( startWidget->name() ) ); - currentPos = mapFromGlobal( e->globalPos() ); - tqApp->processEvents(); - if ( drawRecRect && oldendWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), - ( (TQWidget*)oldendWidget )->size() ) ); - drawConnectionLine(); - break; - case ORDER_TOOL: - break; - default: // we are in an insert-widget tool - if ( insertParent ) // draw insert rect - continueRectDraw( w->mapFromGlobal( e->globalPos() ), e->globalPos(), w, Insert ); - break; - } -} - -void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) -{ - CHECK_MAINWINDOW; - if ( e->button() != Qt::LeftButton ) - return; - - switch ( currTool ) { - case POINTER_TOOL: - if ( widgetPressed && allowMove( w ) ) { // we moved the widget - sizePreviewLabel->hide(); - - if ( moving.isEmpty() || w->pos() == *moving.find(w) ) - break; - - // restore targetContainer - if ( targetContainer ) { - if( hadOwnPalette ) - targetContainer->setPalette( restorePalette ); - else - targetContainer->unsetPalette(); - } - - // tell property editor to update - if ( propertyWidget && propertyWidget->isWidgetType() && !isMainContainer( propertyWidget ) ) - emitUpdateProperties( propertyWidget ); - - TQMapConstIterator it = moving.begin(); - TQWidget *oldParent = it.key()->parentWidget(); - TQWidget *newParent = oldParent; - // check whether we have to reparent the selection - TQWidget* wa = containerAt( e->globalPos(), it.key() ); - if ( wa ) { - wa = WidgetFactory::containerOfWidget( wa ); - // ok, looks like we moved onto a container - - // check whether we really have different parents. - if ( wa == it.key()->parentWidget() ) - goto make_move_command; - - // break layout if necessary - if ( WidgetFactory::layoutType( wa ) != WidgetFactory::NoLayout ) { - if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ), - i18n( "You tried to insert a widget into the " - "layout Container Widget '%1'.\n" - "This is not possible. " - "In order to insert the widget, the layout of '%1'\n" - "must first be broken.\n" - "Break the layout or cancel the operation?" ). - arg( wa->name() ). - arg( wa->name() ), i18n( "&Break Layout" ), i18n( "&Cancel" ) ) ) - goto make_move_command; // cancel - breakLayout( wa ); - } - - // doesn't need to be a command, the MoveCommand does reparenting too - bool emitSelChanged = FALSE; - for ( TQMap::Iterator it = moving.begin(); it != moving.end(); ++it ) { - TQWidget *i = it.key(); - if ( !emitSelChanged && ::tqqt_cast(i) ) { - if ( ::tqqt_cast(i->parentWidget()) || ::tqqt_cast(wa) ) - emitSelChanged = TRUE; - if ( !::tqqt_cast(wa) ) { - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(i), "buttonGroupId", FALSE ); - if ( ::tqqt_cast(i->parentWidget()) ) - ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); - } - } - TQPoint pos = wa->mapFromGlobal( i->mapToGlobal( TQPoint(0,0) ) ); - i->reparent( wa, pos, TRUE ); - raiseSelection( i ); - raiseChildSelections( i ); - widgetChanged( TQT_TQOBJECT(i) ); - mainWindow()->objectHierarchy()->widgetRemoved( i ); - mainWindow()->objectHierarchy()->widgetInserted( i ); - } - if ( emitSelChanged ) { - emit showProperties( TQT_TQOBJECT(wa) ); - emit showProperties( propertyWidget ); - } - newParent = wa; - } - - make_move_command: - TQWidgetList widgets; // collect the widgets and its old and new positions which have been moved - TQValueList oldPos, newPos; - for ( it = moving.begin(); it != moving.end(); ++it ) { - widgets.append( it.key() ); - oldPos.append( *it ); - newPos.append( it.key()->pos() ); - } - // add move command, don't execute it, this is just a summary of the operations we did during the move-event handling - commandHistory()->addCommand( new MoveCommand( i18n( "Move" ), - this, widgets, - oldPos, newPos, oldParent, newParent ) ); - } else if ( drawRubber ) { // we were drawing a rubber selection - endRectDraw(); // get rid of the rectangle - blockSignals( TRUE ); - selectWidgets(); // select widgets which intersect the rect - blockSignals( FALSE ); - emitSelectionChanged(); // inform about selection changes - if ( propertyWidget ) - emitShowProperties( propertyWidget ); - } - break; - case CONNECT_TOOL: - case BUDDY_TOOL: - restoreConnectionLine(); - if ( startWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(), - ( (TQWidget*)startWidget )->pos() ), - ((TQWidget*)startWidget )->size() ) ); - if ( endWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(), - ( (TQWidget*)endWidget )->pos() ), - ( (TQWidget*)endWidget )->size() ) ); - endUnclippedPainter(); - tqApp->processEvents(); - - if ( startWidget && endWidget ) { - if ( currTool == CONNECT_TOOL ) - editConnections(); - else if ( currTool == BUDDY_TOOL && validForBuddy && startWidget != endWidget ) { - TQString oldBuddy = startWidget->property( "buddy" ).toString(); - if ( oldBuddy.isNull() ) - oldBuddy = ""; - SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ), - this, TQT_TQOBJECT(startWidget), mainWindow()->propertyeditor(), - "buddy", startWidget->property( "buddy" ), - endWidget->name(), endWidget->name(), - oldBuddy ); - commandHistory()->addCommand( cmd, TRUE ); - cmd->execute(); - emitUpdateProperties( TQT_TQOBJECT(startWidget) ); - } - } - if ( !toolFixed ) - mainwindow->resetTool(); - startWidget = endWidget = 0; - mainWindow()->statusBar()->clear(); - break; - case ORDER_TOOL: - break; - default: // any insert widget tool is active - if ( insertParent ) { // we should insert the new widget now - endRectDraw(); - if ( WidgetFactory::layoutType( insertParent ) != WidgetFactory::NoLayout ) { - if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ), - i18n( "You tried to insert a widget into the " - "layout Container Widget '%1'.\n" - "This is not possible. " - "In order to insert the widget, the layout of '%1'\n" - "must first be broken.\n" - "Break the layout or cancel the operation?" ). - arg( insertParent->name() ). - arg( insertParent->name() ), i18n( "&Break Layout" ), i18n( "&Cancel" ) ) == 0 ) { - breakLayout( insertParent ); - } else { - if ( !toolFixed ) - mainWindow()->resetTool(); - break; - } - } - insertWidget(); // so do it - } - break; - } - widgetPressed = FALSE; - drawRubber = FALSE; - insertParent = 0; - delete buffer; - buffer = 0; -} - -void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w ) -{ - CHECK_MAINWINDOW; - e->ignore(); - checkSelectionsTimer->stop(); - if ( !checkedSelectionsForMove && - ( e->key() == Key_Left || - e->key() == Key_Right || - e->key() == Key_Up || - e->key() == Key_Down ) && - propertyWidget->isWidgetType() ) - checkSelectionsForMove( (TQWidget*)propertyWidget ); - checkSelectionsTimer->start( 1000, TRUE ); - if ( e->key() == Key_Left || e->key() == Key_Right || - e->key() == Key_Up || e->key() == Key_Down ) { - TQWidgetList widgets; - TQValueList oldPos, newPos; - for ( WidgetSelection *s = selections.first(); s; s = selections.next() ) { - if ( s->isUsed() ) { - int dx = 0, dy = 0; - bool control = e->state() & ControlButton; - - switch ( e->key() ) { - case Key_Left: { - e->accept(); - if ( control ) - dx = -1; - else - dx = -grid().x(); - } break; - case Key_Right: { - e->accept(); - if ( control ) - dx = 1; - else - dx = grid().x(); - } break; - case Key_Up: { - e->accept(); - if ( control ) - dy = -1; - else - dy = -grid().y(); - } break; - case Key_Down: { - e->accept(); - if ( control ) - dy = 1; - else - dy = grid().y(); - } break; - default: - break; - } - - widgets.append( s->widget() ); - oldPos.append( s->widget()->pos() ); - newPos.append( s->widget()->pos() + TQPoint( dx, dy ) ); - } - } - if ( !widgets.isEmpty() ) { - MoveCommand *cmd = new MoveCommand( i18n( "Move" ), this, - widgets, oldPos, newPos, 0, 0 ); - commandHistory()->addCommand( cmd, TRUE ); - cmd->execute(); - } - } - if ( !e->isAccepted() ) { - TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( !l ) - return; - if ( l->find( TQT_TQOBJECT(w) ) != -1 ) - e->accept(); - delete l; - } - -} - -void FormWindow::handleKeyRelease( TQKeyEvent *e, TQWidget * ) -{ - e->ignore(); -} - -void FormWindow::selectWidget( TQObject *o, bool select ) -{ - CHECK_MAINWINDOW; - if ( !o->isWidgetType() ) { - // ########### do TQObject stuff - return; - } - - TQWidget *w = (TQWidget*)o; - - if ( isMainContainer( TQT_TQOBJECT(w) ) ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - emitShowProperties( propertyWidget ); - return; - } - - if ( ::tqqt_cast(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - emitShowProperties( propertyWidget ); - return; - } - - if ( ::tqqt_cast(o) ) - return; - - if ( select ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(w); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - if ( !isPropertyShowingBlocked() ) - emitShowProperties( propertyWidget ); - WidgetSelection *s = usedSelections.find( w ); - if ( s ) { - s->show(); - return; - } - - for ( WidgetSelection *s2 = selections.first(); s2; s2 = selections.next() ) { - if ( !s2->isUsed() ) { - s = s2; - } - } - - if ( !s ) { - s = new WidgetSelection( this, &usedSelections ); - selections.append( s ); - } - - s->setWidget( w ); - emitSelectionChanged(); - } else { - WidgetSelection *s = usedSelections.find( w ); - if ( s ) - s->setWidget( 0 ); - TQObject *opw = propertyWidget; - if ( !usedSelections.isEmpty() ) - propertyWidget = TQT_TQOBJECT(TQPtrDictIterator( usedSelections ).current()->widget()); - else - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - if ( !isPropertyShowingBlocked() ) - emitShowProperties( propertyWidget ); - emitSelectionChanged(); - } -} - -TQPoint FormWindow::grid() const -{ - if ( !mainWindow() || !mainWindow()->snapGrid() ) - return TQPoint( 1, 1 ); - return mainWindow()->grid(); -} - -void FormWindow::updateSelection( TQWidget *w ) -{ - WidgetSelection *s = usedSelections.find( w ); - if ( !w->isVisibleTo( this ) ) - selectWidget( TQT_TQOBJECT(w), FALSE ); - else if ( s ) - s->updateGeometry(); -} - -void FormWindow::raiseSelection( TQWidget *w ) -{ - WidgetSelection *s = usedSelections.find( w ); - if ( s ) - s->show(); -} - -void FormWindow::repaintSelection( TQWidget *w ) -{ - WidgetSelection *s = usedSelections.find( w ); - if ( s ) - s->update(); -} - -void FormWindow::clearSelection( bool changePropertyDisplay ) -{ - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) - it.current()->setWidget( 0, FALSE ); - - usedSelections.clear(); - if ( changePropertyDisplay ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - emitShowProperties( propertyWidget ); - } - emitSelectionChanged(); -} - -void FormWindow::startRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *, RectType t ) -{ - TQPoint pos( p ); - pos = mapFromGlobal( global ); - oldRectValid = FALSE; - beginUnclippedPainter( TRUE ); - if ( t == Rubber ) - unclippedPainter->setPen( TQPen( color0, 1 ) ); - if ( t == Insert ) - rectAnchor = gridPoint( pos ); - else if ( t == Rubber ) - rectAnchor = pos; - currRect = TQRect( rectAnchor, TQPoint( 0, 0 ) ); - if ( t == Insert ) - drawSizePreview( pos, i18n("Use Size Hint") ); -} - -void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *, RectType t ) -{ - TQPoint pos =p; - pos = mapFromGlobal( global ); - TQPoint p2; - if ( t == Insert ) - p2 = gridPoint( pos ); - else if ( t == Rubber ) - p2 = pos; - TQRect r( rectAnchor, p2 ); - r = r.normalize(); - - if ( currRect == r ) { - TQString t = i18n( "%1/%2" ); - t = t.arg( r.width() - 1 ).arg( r.height() - 1 ); - drawSizePreview( pos, t ); - return; - } - - if ( oldRectValid ) - unclippedPainter->drawRect( currRect ); - if ( r.width() > 1 || r.height() > 1 ) { - oldRectValid = TRUE; - currRect = r; - if ( t == Insert ) { - TQString t = i18n( "%1/%2" ); - t = t.arg( r.width() - 1 ).arg( r.height() - 1 ); - drawSizePreview( pos, t ); - } - unclippedPainter->setClipRegion( TQRegion( rect() ).subtract( TQRect( sizePreviewPos, sizePreviewPixmap.size() ) ) ); - unclippedPainter->drawRect( currRect ); - unclippedPainter->setClipping( FALSE ); - } else { - oldRectValid = FALSE; - if ( t == Insert ) - drawSizePreview( pos, i18n("Use Size Hint") ); - } -} - -void FormWindow::endRectDraw() -{ - if ( !unclippedPainter ) - return; - - if ( oldRectValid ) - unclippedPainter->drawRect( currRect ); - drawSizePreview( TQPoint(-1,-1), TQString() ); - endUnclippedPainter(); -} - -void FormWindow::selectWidgets() -{ - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( l ) { - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets[ (void*)o ] ) { - TQPoint p = ( (TQWidget*)o )->mapToGlobal( TQPoint(0,0) ); - p = mapFromGlobal( p ); - TQRect r( p, ( (TQWidget*)o )->size() ); - if ( r.intersects( currRect ) && !r.contains( currRect ) ) - selectWidget( TQT_TQOBJECT(o) ); - } - } - delete l; - } - emitSelectionChanged(); -} - -bool FormWindow::isWidgetSelected( TQObject *w ) -{ - if ( w->isWidgetType() ) - return usedSelections.find( (TQWidget*)w ) != 0; - return FALSE; // #### do stuff for TQObjects -} - -void FormWindow::moveSelectedWidgets( int dx, int dy ) -{ - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) { - WidgetSelection *s = it.current(); - TQWidget *w = s->widget(); - if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) - continue; - w->move( w->x() + dx, w->y() + dy ); - s->updateGeometry(); - updateChildSelections( w ); - } -} - -CommandHistory *FormWindow::commandHistory() -{ - return &commands; -} - -void FormWindow::undo() -{ - commandHistory()->undo(); -} - -void FormWindow::redo() -{ - commandHistory()->redo(); -} - -void FormWindow::raiseChildSelections( TQWidget *w ) -{ - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( !l || !l->first() ) { - delete l; - return; - } - - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) { - if ( l->findRef( TQT_TQOBJECT(it.current()->widget()) ) != -1 ) - it.current()->show(); - } - delete l; -} - -void FormWindow::updateChildSelections( TQWidget *w ) -{ - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( l ) { - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( o->isWidgetType() && - insertedWidgets.find( (TQWidget*)o ) ) - updateSelection( (TQWidget*)o ); - } - delete l; - } -} - -void FormWindow::checkSelectionsForMove( TQWidget *w ) -{ - checkedSelectionsForMove = TRUE; - - TQObjectList *l = w->parentWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, FALSE, FALSE ); - moving.clear(); - if ( l ) { - TQPtrDictIterator it( usedSelections ); - WidgetSelection *sel; - while ( ( sel = it.current() ) != 0 ) { - if ( it.current()->widget() == mainContainer() ) - continue; - ++it; - if ( l->find( TQT_TQOBJECT(sel->widget()) ) == -1 ) { - if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) - sel->setWidget( 0 ); - } else { - if ( WidgetFactory::layoutType( sel->widget()->parentWidget() ) == WidgetFactory::NoLayout ) { - moving.insert( sel->widget(), sel->widget()->pos() ); - sel->widget()->raise(); - raiseChildSelections( sel->widget() ); - raiseSelection( sel->widget() ); - } - } - } - delete l; - } -} - -void FormWindow::deleteWidgets() -{ - CHECK_MAINWINDOW; - TQWidgetList widgets; - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) { - TQWidget *tb = 0; - if ( !( tb = mainWindow()->isAToolBarChild( TQT_TQOBJECT(it.current()->widget()) ) ) ) - widgets.append( it.current()->widget() ); - else - ( (QDesignerToolBar*)tb )->removeWidget( it.current()->widget() ); - } - - if ( widgets.isEmpty() ) - return; - - DeleteCommand *cmd = new DeleteCommand( i18n( "Delete" ), this, widgets ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::editAdjustSize() -{ - TQPtrList commands; - TQWidgetList widgets = selectedWidgets(); - if ( widgets.isEmpty() ) { - TQRect oldr = geometry(); - mainContainer()->adjustSize(); - resize( mainContainer()->size() ); - // check whether our own size constraint hit us - if ( size() != mainContainer()->size() ) - mainContainer()->resize( size() ); - TQRect nr = geometry(); - if ( oldr != nr ) { - ResizeCommand *cmd = new ResizeCommand( i18n( "Adjust Size" ), this, this, oldr, nr ); - commandHistory()->addCommand( cmd ); - } - return; - } - for ( TQWidget* w = widgets.first(); w; w = widgets.next() ) { - if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) - continue; - TQRect oldr = w->geometry(); - w->adjustSize(); - TQRect nr = w->geometry(); - if ( oldr != nr ) - commands.append( new ResizeCommand( i18n("Adjust Size"), this, w, oldr, nr ) ); - } - - if ( commands.isEmpty() ) - return; - for ( WidgetSelection *s = selections.first(); s; s = selections.next() ) - s->updateGeometry(); - - MacroCommand *cmd = new MacroCommand( i18n( "Adjust Size" ), this, commands ); - commandHistory()->addCommand( cmd ); -} - - -TQWidgetList FormWindow::selectedWidgets() const -{ - TQWidgetList widgets; - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) - widgets.append( it.current()->widget() ); - return widgets; -} - -void FormWindow::widgetChanged( TQObject *w ) -{ - if ( w->isWidgetType() ) - updateSelection( (TQWidget*)w ); - // ########## do TQObject stuff -} - -TQLabel *FormWindow::sizePreview() const -{ - if ( !sizePreviewLabel ) { - ( (FormWindow*)this )->sizePreviewLabel = new TQLabel( (FormWindow*)this ); - ( (FormWindow*)this )->sizePreviewLabel->hide(); - ( (FormWindow*)this )->sizePreviewLabel->setBackgroundColor( TQColor( 255, 255, 128 ) ); - ( (FormWindow*)this )->sizePreviewLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box ); - } - return sizePreviewLabel; -} - -void FormWindow::invalidCheckedSelections() -{ - checkedSelectionsForMove = FALSE; -} - -void FormWindow::checkPreviewGeometry( TQRect &r ) -{ - if ( !TQT_TQRECT_OBJECT(rect()).contains( r ) ) { - if ( r.left() < rect().left() ) - r.moveTopLeft( TQPoint( 0, r.top() ) ); - if ( r.right() > rect().right() ) - r.moveBottomRight( TQPoint( rect().right(), r.bottom() ) ); - if ( r.top() < rect().top() ) - r.moveTopLeft( TQPoint( r.left(), rect().top() ) ); - if ( r.bottom() > rect().bottom() ) - r.moveBottomRight( TQPoint( r.right(), rect().bottom() ) ); - } -} - -void FormWindow::focusInEvent( TQFocusEvent * ){ - - if (ff) - ff->checkTimeStamp(); -} - -void FormWindow::focusOutEvent( TQFocusEvent * ) -{ - if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - } -} - -void FormWindow::resizeEvent( TQResizeEvent *e ) -{ - TQWidget::resizeEvent( e ); - if ( currTool == ORDER_TOOL ) - repositionOrderIndicators(); - if ( isVisible() ) - formFile()->setModified( TRUE, FormFile::WFormWindow ); - -#if defined(TQ_WS_WIN32) - windowsRepaintWorkaroundTimer->start( 100, TRUE ); -#endif -} - -void FormWindow::windowsRepaintWorkaroundTimerTimeout() -{ -#if defined(TQ_WS_WIN32) - TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - flickerfree_update( (TQWidget*)o ); - } - flickerfree_update( this ); - delete l; -#endif -} - -TQPtrDict *FormWindow::widgets() -{ - return &insertedWidgets; -} - -TQWidget *FormWindow::designerWidget( TQObject *o ) const -{ - if ( !o || !o->isWidgetType() ) - return 0; - TQWidget *w = (TQWidget*)o; - while ( w && !isMainContainer( TQT_TQOBJECT(w) ) && !insertedWidgets[ (void*)w ] || isCentralWidget( TQT_TQOBJECT(w) ) ) - w = (TQWidget*)w->parent(); - return w; -} - -void FormWindow::emitShowProperties( TQObject *w ) -{ - if ( w ) { - TQObject *opw = propertyWidget; - propertyWidget = w; - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - } - showPropertiesTimer->stop(); -// showPropertiesTimer->start( 0, TRUE ); - showPropertiesTimerDone(); -} - -void FormWindow::emitUpdateProperties( TQObject *w ) -{ - if ( w == propertyWidget ) { - updatePropertiesTimer->stop(); - updatePropertiesTimer->start( 0, TRUE ); - } -} - -void FormWindow::emitSelectionChanged() -{ - selectionChangedTimer->stop(); - selectionChangedTimer->start( 0, TRUE ); -} - -void FormWindow::updatePropertiesTimerDone() -{ - CHECK_MAINWINDOW; - if ( propertyWidget && mainWindow()->formWindow() == this ) - emit updateProperties( propertyWidget ); -} - -void FormWindow::showPropertiesTimerDone() -{ - CHECK_MAINWINDOW; - if ( propertyWidget && mainWindow()->formWindow() == this ) - emit showProperties( propertyWidget ); -} - -void FormWindow::selectionChangedTimerDone() -{ - emit selectionChanged(); -} - -void FormWindow::currentToolChanged() -{ - CHECK_MAINWINDOW; - toolFixed = FALSE; - int t = mainwindow->currentTool(); - if ( currTool == t && t != ORDER_TOOL ) - return; - - // tool cleanup - switch ( currTool ) { - case ORDER_TOOL: - hideOrderIndicators(); - break; - case CONNECT_TOOL: - case BUDDY_TOOL: - restoreConnectionLine(); - if ( startWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(), - ( (TQWidget*)startWidget )->pos() ), - ( (TQWidget*)startWidget )->size() ) ); - if ( endWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(), - ( (TQWidget*)endWidget )->pos() ), - ( (TQWidget*)endWidget )->size() ) ); - endUnclippedPainter(); - break; - case POINTER_TOOL: - break; - default: - if ( insertParent ) - endRectDraw(); - break; - } - - startWidget = endWidget = 0; - widgetPressed = FALSE; - drawRubber = FALSE; - insertParent = 0; - delete buffer; - buffer = 0; - - currTool = t; - - if ( hasFocus() ) - clearSelection( FALSE ); - - mainWindow()->statusBar()->clear(); - - // tool setup - switch ( currTool ) { - case POINTER_TOOL: - if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); - restoreCursors( this, this ); - break; - case ORDER_TOOL: - if ( mainWindow()->formWindow() == this ) { - mainWindow()->statusMessage( i18n( "Click widgets to change the tab order...") ); - orderedWidgets.clear(); - showOrderIndicators(); - if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); - setCursorToAll( ArrowCursor, this ); - } - break; - case CONNECT_TOOL: - case BUDDY_TOOL: - if ( currTool == CONNECT_TOOL ) - mainWindow()->statusMessage( i18n( "Drag a line to create a connection...") ); - else - mainWindow()->statusMessage( i18n( "Drag a line to set a buddy...") ); - setCursorToAll( CrossCursor, this ); - if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); - break; - default: - mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).arg( WidgetDatabase::toolTip( currTool ).lower() ) ); - setCursorToAll( CrossCursor, this ); - if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); - break; - } -} - -void FormWindow::showOrderIndicators() -{ - hideOrderIndicators(); - orderIndicators.setAutoDelete( TRUE ); - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); - stackedWidgets = MetaDataBase::tabOrder( this ); - if ( l ) { - int order = 1; - for ( TQObject *o = l->first(); o; o = l->next() ) { - TQWidget* w = (TQWidget*) o; - if ( w->isShown() && - insertedWidgets[ (void*)w ] && - w->focusPolicy() != TQ_NoFocus ) { - OrderIndicator* ind = new OrderIndicator( order++, w, this ); - orderIndicators.append( ind ); - if ( stackedWidgets.findRef( w ) == -1 ) - stackedWidgets.append( w ); - } - } - delete l; - } - updateOrderIndicators(); -} - -void FormWindow::hideOrderIndicators() -{ - orderIndicators.clear(); -} - -void FormWindow::updateOrderIndicators() -{ - int order = 1; - for ( TQWidget *w = stackedWidgets.first(); w; w = stackedWidgets.next() ) { - for ( OrderIndicator* i = orderIndicators.first(); i; i = orderIndicators.next() ) - i->setOrder( order, w ); - order++; - } -} - -void FormWindow::repositionOrderIndicators() -{ - for ( OrderIndicator* i = orderIndicators.first(); i; i = orderIndicators.next() ) - i->reposition(); -} - - -void FormWindow::updateUndoInfo() -{ - commandHistory()->emitUndoRedo(); -} - -bool FormWindow::checkCustomWidgets() -{ - TQStringList missingCustomWidgets; - TQPtrDictIterator it( insertedWidgets ); - for ( ; it.current(); ++it ) { - if ( it.current()->isA( "CustomWidget" ) ) { - TQString className = WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ); - if ( !MetaDataBase::hasCustomWidget( className ) ) - missingCustomWidgets << className; - } - } - - if ( !missingCustomWidgets.isEmpty() ) { - TQString txt = i18n( "The following custom widgets are used in '%1',\n" - "but are not known to TQt Designer:\n" ).arg( name() ); - for ( TQStringList::Iterator sit = missingCustomWidgets.begin(); sit != missingCustomWidgets.end(); ++sit ) - txt += " " + *sit + "\n"; - txt += i18n( "If you save this form and generate code for it using uic, \n" - "the generated code will not compile.\n" - "Do you want to save this form now?" ); - if ( TQMessageBox::information( mainWindow(), i18n( "Save Form" ), txt ) == 1 ) - return FALSE; - } - return TRUE; -} - -void FormWindow::setPropertyShowingBlocked( bool b ) -{ - propShowBlocked = b; -} - -bool FormWindow::isPropertyShowingBlocked() const -{ - return propShowBlocked; -} - -int FormWindow::numSelectedWidgets() const -{ - return usedSelections.count(); -} - -TQString FormWindow::copy() -{ - CHECK_MAINWINDOW_VALUE( TQString() ); - Resource resource( mainWindow() ); - resource.setWidget( this ); - return resource.copy(); -} - -void FormWindow::lowerWidgets() -{ - TQWidgetList widgets; - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) - widgets.append( it.current()->widget() ); - - LowerCommand *cmd = new LowerCommand( i18n( "Lower" ), this, widgets ); - cmd->execute(); - commandHistory()->addCommand( cmd ); -} - -void find_accel( const TQString &txt, TQMap &accels, TQWidget *w ) -{ - int i = txt.find( "&" ); - if ( i == -1 ) - return; - TQChar c = txt[ i + 1 ]; - if ( c.isNull() || c == '&' ) - return; - c = c.lower(); - TQMap::Iterator it = accels.find( c ); - if ( it == accels.end() ) { - TQWidgetList wl; - wl.append( w ); - accels.insert( c, wl ); - } else { - TQWidgetList *wl = &*it; - wl->append( w ); - } -} - -void FormWindow::checkAccels() -{ - CHECK_MAINWINDOW; - TQMap accels; - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( l ) { - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets[ (void*)o ] ) { - TQWidget *w = (TQWidget*)o; - const TQMetaProperty* text = - w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - const TQMetaProperty* title = - w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); - const TQMetaProperty* pageTitle = - w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); - if ( text ) - find_accel( w->property( "text" ).toString(), accels, w ); - if ( title ) - find_accel( w->property( "title" ).toString(), accels, w ); - if ( pageTitle ) - find_accel( w->property( "pageTitle" ).toString(), accels, w ); - } else if ( ::tqqt_cast(o) ) { - ((MenuBarEditor *)o)->checkAccels( accels ); - } - } - delete l; - } - - bool ok = TRUE; - TQWidget *wid; - for ( TQMap::Iterator it = accels.begin(); it != accels.end(); ++it ) { - if ( (*it).count() > 1 ) { - ok = FALSE; - switch ( TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ), - i18n( "Accelerator '%1' is used once.", "Accelerator '%1' is used %n times.", (*it).count() - ).arg( it.key().upper() ), - i18n( "&Select" ), - i18n( "&Cancel" ), TQString(), 2 ) ) { - case 0: // select - clearSelection( FALSE ); - for ( wid = (*it).first(); wid; wid = (*it).next() ) - selectWidget( TQT_TQOBJECT(wid), TRUE ); - return; - case 1: // cancel - return; - } - } - } - - if ( ok ) - TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ), - i18n( "No accelerator is used more than once." ) ); -} - -void FormWindow::raiseWidgets() -{ - TQWidgetList widgets; - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) - widgets.append( it.current()->widget() ); - - RaiseCommand *cmd = new RaiseCommand( i18n( "Raise" ), this, widgets ); - cmd->execute(); - commandHistory()->addCommand( cmd ); -} - -void FormWindow::paste( const TQString &cb, TQWidget *parent ) -{ - CHECK_MAINWINDOW; - Resource resource( mainWindow() ); - resource.setWidget( this ); - resource.paste( cb, parent ); -} - -void FormWindow::selectAll() -{ - checkedSelectionsForMove = FALSE; - blockSignals( TRUE ); - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( l ) { - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets[ (void*)o ] ) { - selectWidget( TQT_TQOBJECT(o) ); - } - } - delete l; - } - - blockSignals( FALSE ); - emitSelectionChanged(); - if ( propertyWidget ) - emitShowProperties( propertyWidget ); - emitSelectionChanged(); -} - -void FormWindow::layoutHorizontal() -{ - TQWidgetList widgets( selectedWidgets() ); - LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay OutQt::Horizontally" ), - this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutVertical() -{ - TQWidgetList widgets( selectedWidgets() ); - LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay OutQt::Vertically" ), - this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutHorizontalSplit() -{ - TQWidgetList widgets( selectedWidgets() ); - LayoutHorizontalSplitCommand *cmd = new LayoutHorizontalSplitCommand( i18n( "Lay OutQt::Horizontally (in splitter)" ), - this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutVerticalSplit() -{ - TQWidgetList widgets( selectedWidgets() ); - LayoutVerticalSplitCommand *cmd = new LayoutVerticalSplitCommand( i18n( "Lay OutQt::Vertically (in splitter)" ), - this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutGrid() -{ - int xres = grid().x(); - int yres = grid().y(); - - TQWidgetList widgets( selectedWidgets() ); - LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out in a Grid" ), - this, mainContainer(), 0, widgets, xres, yres ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutHorizontalContainer( TQWidget *w ) -{ - if ( w == this ) - w = mainContainer(); - TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); - if ( l.isEmpty() ) - return; - TQWidgetList widgets; - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && - ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( (TQWidget*)o ) ) - widgets.append( (TQWidget*)o ); - } - LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay Out ChildrenQt::Horizontally" ), - this, mainContainer(), w, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutVerticalContainer( TQWidget *w ) -{ - if ( w == this ) - w = mainContainer(); - TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); - if ( l.isEmpty() ) - return; - TQWidgetList widgets; - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && - ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( (TQWidget*)o ) ) - widgets.append( (TQWidget*)o ); - } - LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay Out ChildrenQt::Vertically" ), - this, mainContainer(), w, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutGridContainer( TQWidget *w ) -{ - if ( w == this ) - w = mainContainer(); - int xres = grid().x(); - int yres = grid().y(); - - TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); - if ( l.isEmpty() ) - return; - TQWidgetList widgets; - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && - ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( (TQWidget*)o ) ) - widgets.append( (TQWidget*)o ); - } - LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out Children in a Grid" ), - this, mainContainer(), w, widgets, xres, yres ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::breakLayout( TQWidget *w ) -{ - if ( w == this ) - w = mainContainer(); - w = WidgetFactory::containerOfWidget( w ); - TQPtrList commands; - - for (;;) { - if ( !w || w == this ) - break; - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout && - WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { - Command *cmd = breakLayoutCommand( w ); - if ( cmd ) - commands.insert( 0, cmd ); - if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) - break; - } - w = w->parentWidget(); - } - - if ( commands.isEmpty() ) - return; - - clearSelection( FALSE ); - MacroCommand *cmd = new MacroCommand( i18n( "Break Layout" ), this, commands ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w ) -{ - CHECK_MAINWINDOW_VALUE( 0 ); - TQObjectList l = w->childrenListObject(); - if ( l.isEmpty() ) - return 0; - - TQWidgetList widgets; - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && - !mainWindow()->isAToolBarChild( TQT_TQOBJECT(o) ) && - ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( (TQWidget*)o ) ) - widgets.append( (TQWidget*)o ); - } - return new BreakLayoutCommand( i18n( "Break Layout" ), this, WidgetFactory::widgetOfContainer( w ), widgets ); -} - -int FormWindow::numVisibleWidgets() const -{ - TQPtrDictIterator it( insertedWidgets ); - int visible = 0; - for ( ; it.current(); ++it ) { - if ( it.current()->isVisibleTo( (FormWindow*)this ) ) - visible++; - } - return visible; -} - -bool FormWindow::hasInsertedChildren( TQWidget *w ) const -{ - if ( !w ) - return FALSE; - w = WidgetFactory::containerOfWidget( w ); - if ( !w ) - return FALSE; - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( !l || !l->first() ) { - delete l; - return FALSE; - } - - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( o->isWidgetType() && - ( (TQWidget*)o )->isVisibleTo( (FormWindow*)this ) && - insertedWidgets.find( (TQWidget*)o ) ) { - delete l; - return TRUE; - } - } - - delete l; - return FALSE; -} - -bool FormWindow::allowMove( TQWidget *w ) -{ - w = w->parentWidget(); - while ( w ) { - if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) - return TRUE; - w = w->parentWidget(); - } - return FALSE; -} - - -void FormWindow::editConnections() -{ - CHECK_MAINWINDOW; - buffer = 0; - if ( !startWidget || !endWidget ) - return; - - ConnectionDialog dlg( mainwindow ); - mainWindow()->statusMessage( i18n( "Edit connections...") ); - dlg.addConnection( TQT_TQOBJECT(startWidget), TQT_TQOBJECT(endWidget), TQString(), TQString() ); - TQTimer::singleShot( 0, &dlg, TQT_SLOT(ensureConnectionVisible()) ); - dlg.exec(); -} - -void FormWindow::saveBackground() -{ - if ( buffer ) - delete buffer; - buffer = new TQPixmap( width(), height() ); - *buffer = TQPixmap::grabWindow( winId() ); -} - -void FormWindow::restoreConnectionLine() -{ - if (!unclippedPainter || !buffer) // designer will occasionally crash if buffer is not tested to be non-zero - return; - - int a =TQABS( startPos.x() - currentPos.x() ); - int b = TQABS( startPos.y() - currentPos.y() ); - TQRect r( startPos, currentPos ); - - if ( a < 32 || b < 32 ) { // special case: vertical or horizontal line - r = r.normalize(); - unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, - r.x() - 2, r.y() - 2, r.width() + 4, r.height() + 4 ); - return; - } - - if ( a <= 0 ) - a = 1; - if ( b <= 0 ) - b = 1; - int w, h; - if ( b > a ) { - h = 64; - w = ( a * h ) / b; - } else { - w = 64; - h = ( b * w ) / a; - } - - int dx = 2 * w / 3; - int dy = 2 * h / 3; - TQPoint p( startPos ); - - if ( r.x() > r.right() ) { - dx = dx * -1; - p.setX( p.x() - 64 ); - r.moveBy( -64, 0 ); - } - if ( r.y() > r.bottom() ) { - dy = dy * -1; - p.setY( p.y() - 64 ); - r.moveBy( 0, -64 ); - } - - w = h = 64; - r = r.normalize(); - while ( r.contains( p ) ) { - unclippedPainter->drawPixmap( p, *buffer, TQRect( p, TQSize( w, h ) ) ); - unclippedPainter->setPen( red ); - p.setX( p.x() + dx ); - p.setY( p.y() + dy ); - } - - unclippedPainter->drawPixmap( startPos.x() - 10, startPos.y() - 10, *buffer, - startPos.x() - 10, startPos.y() - 10, 20, 20 ); -} - -void FormWindow::restoreRect( const TQRect &rect ) -{ - if (!unclippedPainter || !buffer) - return; - - TQRect r( rect ); - r = r.normalize(); - - r = TQRect( r.x() + 2, r.y() + 2, r.width() - 4, r.height() - 4 ); - - unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, r.width() + 4, 4 ); - unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, 4, r.height() + 4 ); - unclippedPainter->drawPixmap( r.x() - 2, r.y() + r.height() - 3, *buffer, r.x() - 2, r.y() + r.height() - 3, r.width() + 4, 5 ); - unclippedPainter->drawPixmap( r.x() + r.width() - 2, r.y(), *buffer, r.x() + r.width() - 2, r.y(), 4, r.height() + 4 ); -} - -void FormWindow::drawConnectionLine() -{ - if ( !unclippedPainter ) - return; - - unclippedPainter->setPen( TQPen( white, 2 ) ); - unclippedPainter->drawLine( startPos, currentPos ); - if ( validForBuddy ) - unclippedPainter->setPen( TQPen( darkRed, 1 ) ); - else - unclippedPainter->setPen( TQPen( darkCyan, 1 ) ); - unclippedPainter->drawLine( startPos, currentPos ); - - if ( validForBuddy ) - unclippedPainter->setPen( TQPen( darkGreen, 1 ) ); - else - unclippedPainter->setPen( TQPen( magenta, 1 ) ); - if ( startWidget ) { - TQWidget *s = (TQWidget*)startWidget; - TQPoint p = mapToForm( s, TQPoint(0,0) ); - unclippedPainter->drawRect( TQRect( p + TQPoint( 2, 2 ), s->size() - TQSize( 4, 4 ) ) ); - } - if ( endWidget ) { - TQWidget *e = (TQWidget*)endWidget; - TQPoint p = mapToForm( e, TQPoint(0,0) ); - unclippedPainter->drawRect( TQRect( p + TQPoint( 2, 2 ), e->size() - TQSize( 4, 4 ) ) ); - } -} - -TQString FormWindow::fileName() const -{ - return ff->absFileName(); -} - -void FormWindow::setFileName( const TQString &fn ) -{ - ff->setFileName( fn ); - emit fileNameChanged( ff->fileName(), this ); -} - -void FormWindow::modificationChanged( bool m ) -{ - emit modificationChanged( m, this ); - emit modificationChanged( m, ff->fileName() ); -} - -bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) -{ - bool found = !isMainContainer( w ) && qstrcmp( name(), s.latin1() ) == 0; - if ( !found ) { - TQString orig = s; - int num = 1; - TQPtrDictIterator it( insertedWidgets ); - for ( ; it.current();) { - if ( TQT_BASE_OBJECT(it.current()) != TQT_BASE_OBJECT(w) && - qstrcmp( it.current()->name(), s.latin1() ) == 0 ) { - found = TRUE; - if ( !changeIt ) - break; - s = orig + "_" + TQString::number( ++num ); - it.toFirst(); - } else { - ++it; - } - } - if ( !found ) { - TQPtrList al; - TQAction *a = 0; - for ( a = actions.first(); a; a = actions.next() ) { - TQObjectList *l = a->queryList( TQACTION_OBJECT_NAME_STRING ); - al.append( a ); - for ( TQObject *ao = l->first(); ao; ao = l->next() ) - al.append( (TQAction*)ao ); - delete l; - } - for ( a = al.first(); a; a = al.next() ) { - if ( a != w && - qstrcmp( a->name(), s.latin1() ) == 0 ) { - found = TRUE; - if ( !changeIt ) - break; - s = orig + "_" + TQString::number( ++num ); - a = actions.first(); - } - } - } - if ( ::tqqt_cast(mainContainer()) && !found ) { - TQObjectList *l = mainContainer()->queryList( "PopupMenuEditor" ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( o != w && - qstrcmp ( o->name(), s.latin1() ) == 0 ) { - found = TRUE; - if ( !changeIt ) - break; - s = orig + "_" + TQString::number( ++num ); - o = l->first(); - } - } - delete l; - } - if ( ::tqqt_cast(mainContainer()) ) { - if ( !found ) { - TQObjectList *l = mainContainer()->queryList( TQDOCKWINDOW_OBJECT_NAME_STRING, 0, TRUE ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( o != w && - qstrcmp( o->name(), s.latin1() ) == 0 ) { - found = TRUE; - if ( !changeIt ) - break; - s = orig + "_" + TQString::number( ++num ); - o = l->first(); - } - } - delete l; - } - } - } - - if ( !found ) - return TRUE; - return FALSE; -} - -bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w ) -{ - TQPtrDictIterator it( insertedWidgets ); - for ( ; it.current(); ++it ) { - if ( it.current()->isA( "CustomWidget" ) ) { - if ( qstrcmp( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ), w->className.utf8() ) == 0 ) - return TRUE; - } - } - - return FALSE; -} - -bool FormWindow::isDatabaseWidgetUsed() const -{ -#ifndef TQT_NO_SQL - TQStringList dbClasses; - dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here - TQPtrDictIterator it( insertedWidgets ); - for ( ; it.current(); ++it ) { - TQString c( it.current()->className() ); - if ( dbClasses.contains( c ) > 0 ) { - return TRUE; - } - } -#endif - return FALSE; -} - -bool FormWindow::isDatabaseAware() const -{ -#ifndef TQT_NO_SQL - if ( TQString(mContainer->className()) == "QDesignerDataBrowser" || TQString(mContainer->className()) == "QDesignerDataView" ) - return TRUE; - return isDatabaseWidgetUsed(); -#else - return FALSE; -#endif -} - -void FormWindow::visibilityChanged() -{ - if ( currTool != ORDER_TOOL ) { - emitUpdateProperties( TQT_TQOBJECT(currentWidget()) ); - } else { - updateOrderIndicators(); - repositionOrderIndicators(); - } -} - - -/*! - Maps \a pos in \a w's coordinates to the form's coordinate system. - - This is the equivalent to mapFromGlobal(w->mapToGlobal(pos) ) but - avoids the two roundtrips to the X-Server on Unix/X11. - */ -TQPoint FormWindow::mapToForm( const TQWidget* w, const TQPoint& pos ) const -{ - TQPoint p = pos; - const TQWidget* i = w; - while ( i && !i->isTopLevel() && !isMainContainer( TQT_TQOBJECT(const_cast(i)) ) ) { - p = i->mapToParent( p ); - i = i->parentWidget(); - } - return mapFromGlobal( w->mapToGlobal( pos ) ); -} - -static int widgetDepth( TQWidget *w ) -{ - int d = -1; - while ( w && !w->isTopLevel() ) { - d++; - w = w->parentWidget(); - } - - return d; -} - -static bool isChildOf( TQWidget *c, TQWidget *p ) -{ - while ( c && !c->isTopLevel() ) { - if ( c == p ) - return TRUE; - c = c->parentWidget(); - } - return FALSE; -} - -TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) -{ - TQPtrDictIterator it( insertedWidgets ); - TQWidget *container = 0; - int depth = -1; - TQWidgetList selected = selectedWidgets(); - if ( TQT_TQRECT_OBJECT(rect()).contains( mapFromGlobal( pos ) ) ) { - container = mainContainer(); - depth = widgetDepth( container ); - } - - for ( ; it.current(); ++it ) { - if ( ::tqqt_cast(it.current()) - || ::tqqt_cast(it.current()) ) - continue; - if ( !it.current()->isVisibleTo( this ) ) - continue; - if ( selected.find( it.current() ) != -1 ) - continue; - if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ) ) ) && - it.current() != mainContainer() ) - continue; - - // the rectangles of all ancestors of the container must contain the insert position - TQWidget *w = it.current(); - while ( w && !w->isTopLevel() ) { - if ( !TQT_TQRECT_OBJECT(w->rect()).contains( ( w->mapFromGlobal( pos ) ) ) ) - break; - w = w->parentWidget(); - } - if ( !( w == 0 || w->isTopLevel() ) ) continue; // we did not get through the full while loop - - int wd = widgetDepth( it.current() ); - if ( wd == depth && container ) { - if ( ( it.current()->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(it.current()) ) > - ( container->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(container) ) ) - wd++; - } - if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) { - depth = wd; - container = it.current(); - } - } - - return container; -} - -bool FormWindow::isMainContainer( TQObject *w ) const -{ - return w && w->isWidgetType() && ( TQT_BASE_OBJECT(w) == this || TQT_BASE_OBJECT(w) == mainContainer() ); -} - -void FormWindow::setMainContainer( TQWidget *w ) -{ - bool resetPropertyWidget = isMainContainer( propertyWidget ); - if ( mContainer ) - insertedWidgets.remove( mContainer ); - if ( TQT_BASE_OBJECT(propertyWidget) == TQT_BASE_OBJECT(mContainer) ) - propertyWidget = 0; - delete mContainer; - mContainer = w; - insertedWidgets.insert( mContainer, mContainer ); - delete layout(); - TQHBoxLayout *l = new TQHBoxLayout( this ); - l->addWidget( w ); - if ( resetPropertyWidget ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mContainer); - if ( opw && opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - } - if ( project() ) { - LanguageInterface *iface = MetaDataBase::languageInterface( project()->language() ); - if ( iface && !project()->isCpp() && !isFake() ) { - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "init()" ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(this), "init()", "", "private", "function", - project()->language(), "void" ); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "destroy()" ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(this), "destroy()", "", "private", "function", - project()->language(), "void" ); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ) ) - MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", TQT_TQOBJECT(mainContainer()), "destroy" ) ) - MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", - TQT_TQOBJECT(mainContainer()), "destroy" ); - } - } -} - -bool FormWindow::savePixmapInline() const -{ - return pixInline; -} - -bool FormWindow::savePixmapInProject() const -{ - return pixProject; -} - -TQString FormWindow::pixmapLoaderFunction() const -{ - return pixLoader; -} - -void FormWindow::setSavePixmapInline( bool b ) -{ - pixInline = b; - if ( b ) - pixProject = FALSE; -} - -void FormWindow::setSavePixmapInProject( bool b ) -{ - pixProject = b; - if ( b ) - pixInline = FALSE; -} - -void FormWindow::setPixmapLoaderFunction( const TQString &func ) -{ - pixLoader = func; -} - -void FormWindow::setActiveObject( TQObject *o ) -{ - emitShowProperties( o ); - propertyWidget = o; -} - -void FormWindow::setProject( Project *pro ) -{ - proj = pro; -} - -Project *FormWindow::project() const -{ - return proj; -} - -TQAction *FormWindow::findAction( const TQString &name ) -{ - for ( TQAction *a = actionList().first(); a; a = actionList().next() ) { - if ( TQString( a->name() ) == name ) - return a; - TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING ); - if ( ac ) - return ac; - } - return 0; -} - -void FormWindow::killAccels( TQObject *top ) -{ - TQObjectList *l = top->queryList( TQACCEL_OBJECT_NAME_STRING ); - if ( !l ) - return; - for ( TQObject *o = l->first(); o; o = l->next() ) - ( (TQAccel*)o )->setEnabled( FALSE ); - delete l; -} - -DesignerFormWindow *FormWindow::iFace() -{ - if ( !iface ) - iface = new DesignerFormWindowImpl( this ); - return iface; -} - -bool FormWindow::isCentralWidget( TQObject *w ) const -{ - if ( !::tqqt_cast(mainContainer()) ) - return FALSE; - return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(( (TQMainWindow*)mainContainer() )->centralWidget()); -} - -int FormWindow::layoutDefaultSpacing() const -{ - return defSpacing; -} - -int FormWindow::layoutDefaultMargin() const -{ - return defMargin; -} - -void FormWindow::setLayoutDefaultSpacing( int s ) -{ - defSpacing = s; -} - -void FormWindow::setLayoutDefaultMargin( int s ) -{ - defMargin = s; -} - -void FormWindow::setSpacingFunction( const TQString &funct ) -{ - spacFunction = funct; -} - -TQString FormWindow::spacingFunction() const -{ - return spacFunction; -} - -void FormWindow::hasLayoutFunctions( bool b ) -{ - hasLayoutFunc = b; -} - -bool FormWindow::hasLayoutFunctions() const -{ - return hasLayoutFunc; -} - -void FormWindow::setMarginFunction( const TQString &funct ) -{ - margFunction = funct; -} - -TQString FormWindow::marginFunction() const -{ - return margFunction; -} - -FormFile *FormWindow::formFile() const -{ - return ff; -} - -void FormWindow::setFormFile( FormFile *f ) -{ - ff = f; - if ( ff ) - connect( this, TQT_SIGNAL( modificationChanged(bool, const TQString&) ), ff, TQT_SLOT( formWindowChangedSomehow() ) ); -} - -bool FormWindow::canBeBuddy( const TQWidget *w ) const -{ - return w->focusPolicy() != TQ_NoFocus; -} - -bool FormWindow::event( TQEvent *e ) -{ - if (e->type() == TQEvent::ShowMaximized) - { - if ( isMaximized() ) - setWindowState( windowState() & ~WindowMaximized | WindowActive); - return true; - } - return TQWidget::event(e); -} diff --git a/tdevdesigner/designer/formwindow.h b/tdevdesigner/designer/formwindow.h deleted file mode 100644 index d4295e7e..00000000 --- a/tdevdesigner/designer/formwindow.h +++ /dev/null @@ -1,323 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef FORMWINDOW_H -#define FORMWINDOW_H - -#include "command.h" -#include "metadatabase.h" -#include "sizehandle.h" -#include "actiondnd.h" - -#include -#include -#include -#include -#include - -class TQPaintEvent; -class TQMouseEvent; -class TQKeyEvent; -class TQPainter; -class TQLabel; -class MainWindow; -class TQTimer; -class TQFocusEvent; -class TQCloseEvent; -class Resource; -class TQResizeEvent; -class BreakLayoutCommand; -class TQPixmap; -class TQSizeGrip; -class Project; -struct DesignerFormWindow; -class FormFile; - -#if defined(TQ_CC_MSVC) || defined(TQ_FULL_TEMPLATE_INSTANTIATION) -#include "orderindicator.h" -#else -class OrderIndicator; -#endif - -class FormWindow : public TQWidget -{ - Q_OBJECT - - TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName ) - -public: - FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name = 0 ); - FormWindow( FormFile *f, TQWidget *parent, const char *name = 0 ); - ~FormWindow(); - - void init(); - virtual void setMainWindow( MainWindow *w ); - - virtual TQString fileName() const; - virtual void setFileName( const TQString &fn ); - - virtual TQPoint grid() const; - virtual TQPoint gridPoint( const TQPoint &p ); - - virtual CommandHistory *commandHistory(); - - virtual void undo(); - virtual void redo(); - virtual TQString copy(); - virtual void paste( const TQString &cb, TQWidget *parent ); - virtual void lowerWidgets(); - virtual void raiseWidgets(); - virtual void checkAccels(); - - virtual void layoutHorizontal(); - virtual void layoutVertical(); - virtual void layoutHorizontalSplit(); - virtual void layoutVerticalSplit(); - virtual void layoutGrid(); - - virtual void layoutHorizontalContainer( TQWidget *w ); - virtual void layoutVerticalContainer( TQWidget *w ); - virtual void layoutGridContainer( TQWidget *w ); - - virtual void breakLayout( TQWidget *w ); - - virtual void selectWidget( TQObject *w, bool select = TRUE ); - virtual void selectAll(); - virtual void updateSelection( TQWidget *w ); - virtual void raiseSelection( TQWidget *w ); - virtual void repaintSelection( TQWidget *w ); - virtual void clearSelection( bool changePropertyDisplay = TRUE ); - virtual void selectWidgets(); - bool isWidgetSelected( TQObject *w ); - virtual void updateChildSelections( TQWidget *w ); - virtual void raiseChildSelections( TQWidget *w ); - - virtual void emitUpdateProperties( TQObject *w ); - virtual void emitShowProperties( TQObject *w = 0 ); - virtual void emitSelectionChanged(); - - virtual void setPropertyShowingBlocked( bool b ); - bool isPropertyShowingBlocked() const; - - virtual TQLabel *sizePreview() const; - virtual void checkPreviewGeometry( TQRect &r ); - - virtual TQPtrDict *widgets(); - virtual TQWidgetList selectedWidgets() const; - - virtual TQWidget *designerWidget( TQObject *o ) const; - - virtual void handleContextMenu( TQContextMenuEvent *e, TQWidget *w ); - virtual void handleMousePress( TQMouseEvent *e, TQWidget *w ); - virtual void handleMouseRelease( TQMouseEvent *e, TQWidget *w ); - virtual void handleMouseDblClick( TQMouseEvent *e, TQWidget *w ); - virtual void handleMouseMove( TQMouseEvent *e, TQWidget *w ); - virtual void handleKeyPress( TQKeyEvent *e, TQWidget *w ); - virtual void handleKeyRelease( TQKeyEvent *e, TQWidget *w ); - - virtual void updateUndoInfo(); - - virtual MainWindow *mainWindow() const { return mainwindow; } - - bool checkCustomWidgets(); - virtual void insertWidget( TQWidget *w, bool checkName = FALSE ); - virtual void removeWidget( TQWidget *w ); - virtual void deleteWidgets(); - virtual void editAdjustSize(); - virtual void editConnections(); - - virtual int numSelectedWidgets() const; - virtual int numVisibleWidgets() const; - - virtual bool hasInsertedChildren( TQWidget *w ) const; - - virtual TQWidget *currentWidget() const { return propertyWidget && propertyWidget->isWidgetType() ? (TQWidget*)propertyWidget : 0; } // ##### - virtual bool unify( TQObject *w, TQString &s, bool changeIt ); - - virtual bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w ); - virtual bool isDatabaseWidgetUsed() const; - virtual bool isDatabaseAware() const; - - virtual TQPoint mapToForm( const TQWidget* w, const TQPoint& ) const; - - bool isMainContainer( TQObject *w ) const; - bool isCentralWidget( TQObject *w ) const; - TQWidget *mainContainer() const { return mContainer; } - void setMainContainer( TQWidget *w ); - - void paintGrid( TQWidget *w, TQPaintEvent *e ); - - bool savePixmapInline() const; - TQString pixmapLoaderFunction() const; - void setSavePixmapInline( bool b ); - void setPixmapLoaderFunction( const TQString &func ); - - bool savePixmapInProject() const; - void setSavePixmapInProject( bool b ); - - void setToolFixed() { toolFixed = TRUE; } - - void setActiveObject( TQObject *o ); - - TQPtrList &actionList() { return actions; } - TQAction *findAction( const TQString &name ); - - void setProject( Project *pro ); - Project *project() const; - - void killAccels( TQObject *top ); - - DesignerFormWindow *iFace(); - - int layoutDefaultSpacing() const; - int layoutDefaultMargin() const; - void setLayoutDefaultSpacing( int s ); - void setLayoutDefaultMargin( int s ); - TQString spacingFunction() const; - TQString marginFunction() const; - void setSpacingFunction( const TQString &func ); - void setMarginFunction( const TQString &func ); - bool hasLayoutFunctions() const; - void hasLayoutFunctions( bool b ); - - void initSlots(); - FormFile *formFile() const; - void setFormFile( FormFile *f ); - - bool isFake() const { return fake; } - bool canBeBuddy( const TQWidget* ) const; - -public slots: - virtual void widgetChanged( TQObject *w ); - virtual void currentToolChanged(); - virtual void visibilityChanged(); - virtual void modificationChanged( bool m ); - -signals: - void showProperties( TQObject *w ); - void updateProperties( TQObject *w ); - void undoRedoChanged( bool undoAvailable, bool redoAvailable, - const TQString &undoCmd, const TQString &redoCmd ); - void selectionChanged(); - void modificationChanged( bool m, FormWindow *fw ); - void modificationChanged( bool m, const TQString &s ); - void fileNameChanged( const TQString &s, FormWindow *fw ); - -protected: - virtual void closeEvent( TQCloseEvent *e ); - virtual void focusInEvent( TQFocusEvent *e ); - virtual void focusOutEvent( TQFocusEvent *e ); - virtual void resizeEvent( TQResizeEvent *e ); - void mouseDoubleClickEvent( TQMouseEvent *e ) { handleMouseDblClick( e, mainContainer() ); } - virtual bool event( TQEvent *e ); - -private: - enum RectType { Insert, Rubber }; - - void beginUnclippedPainter( bool doNot ); - void endUnclippedPainter(); - void drawConnectionLine(); - void drawSizePreview( const TQPoint &pos, const TQString& text ); - - void insertWidget(); - void moveSelectedWidgets( int dx, int dy ); - - void startRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *w, RectType t ); - void continueRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *w, RectType t ); - void endRectDraw(); - - void checkSelectionsForMove( TQWidget *w ); - BreakLayoutCommand *breakLayoutCommand( TQWidget *w ); - - bool allowMove( TQWidget *w ); - - void saveBackground(); - void restoreConnectionLine(); - void restoreRect( const TQRect &rect ) ; - - void showOrderIndicators(); - void updateOrderIndicators(); - void repositionOrderIndicators(); - void hideOrderIndicators(); - - TQWidget *containerAt( const TQPoint &pos, TQWidget *notParentOf ); - -private slots: - void invalidCheckedSelections(); - void updatePropertiesTimerDone(); - void showPropertiesTimerDone(); - void selectionChangedTimerDone(); - void windowsRepaintWorkaroundTimerTimeout(); - -private: - int currTool; - bool oldRectValid, widgetPressed, drawRubber, checkedSelectionsForMove; - bool validForBuddy; - TQRect currRect; - TQPoint rectAnchor; - TQPainter *unclippedPainter; - TQPoint sizePreviewPos; - TQPixmap sizePreviewPixmap; - MainWindow *mainwindow; - TQPtrList selections; - TQPtrDict usedSelections; - TQRect widgetGeom, rubber; - TQPoint oldPressPos, origPressPos; - CommandHistory commands; - TQMap moving; - TQWidget *insertParent; - TQObject *propertyWidget; - TQLabel *sizePreviewLabel; - TQTimer *checkSelectionsTimer; - TQPtrDict insertedWidgets; - bool propShowBlocked; - TQTimer* updatePropertiesTimer, *showPropertiesTimer, *selectionChangedTimer, - *windowsRepaintWorkaroundTimer; - TQPoint startPos, currentPos; - TQWidget *startWidget, *endWidget; - TQPixmap *buffer; - TQPtrList orderIndicators; - TQWidgetList orderedWidgets; - TQWidgetList stackedWidgets; - TQWidget *mContainer; - bool pixInline, pixProject; - TQString pixLoader; - bool toolFixed; - TQPtrList actions; - Project *proj; - DesignerFormWindow *iface; - TQWidget* targetContainer; - TQPalette restorePalette; - bool hadOwnPalette; - int defSpacing, defMargin; - TQString spacFunction, margFunction; - bool hasLayoutFunc; - FormFile *ff; - bool fake; - -}; - -#endif diff --git a/tdevdesigner/designer/gotolinedialog.ui b/tdevdesigner/designer/gotolinedialog.ui deleted file mode 100644 index 99df35d2..00000000 --- a/tdevdesigner/designer/gotolinedialog.ui +++ /dev/null @@ -1,169 +0,0 @@ - -GotoLineDialog -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* -../interfaces/editorinterface.h -gotolinedialog.ui.h -struct EditorInterface; -EditorInterface *editor; - - - - GotoLineDialog - - - - 0 - 0 - 243 - 85 - - - - Goto Line - - - - unnamed - - - 11 - - - 6 - - - - TextLabel1 - - - &Line: - - - spinLine - - - - - spinLine - - - - 7 - 0 - - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - Spacer2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - PushButton2 - - - &Goto - - - true - - - - - PushButton1 - - - &Close - - - - - - - Spacer3 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - - - PushButton1 - clicked() - GotoLineDialog - reject() - - - PushButton2 - clicked() - GotoLineDialog - gotoLine() - - init() - destroy() - gotoLine() - setEditor( EditorInterface * e ) - - diff --git a/tdevdesigner/designer/gotolinedialog.ui.h b/tdevdesigner/designer/gotolinedialog.ui.h deleted file mode 100644 index 4ddf4114..00000000 --- a/tdevdesigner/designer/gotolinedialog.ui.h +++ /dev/null @@ -1,50 +0,0 @@ -/********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -void GotoLineDialog::init() -{ - editor = 0; -} - -void GotoLineDialog::destroy() -{ - if ( editor ) - editor->release(); -} - -void GotoLineDialog::gotoLine() -{ - if ( editor ) - editor->gotoLine( spinLine->value() - 1 ); - accept(); -} - -void GotoLineDialog::setEditor( EditorInterface *e ) -{ - editor = e; - editor->addRef(); -} - diff --git a/tdevdesigner/designer/hierarchyview.cpp b/tdevdesigner/designer/hierarchyview.cpp deleted file mode 100644 index 860897ff..00000000 --- a/tdevdesigner/designer/hierarchyview.cpp +++ /dev/null @@ -1,1508 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "hierarchyview.h" -#include "formwindow.h" -#include "globaldefs.h" -#include "mainwindow.h" -#include "command.h" -#include "widgetfactory.h" -#include "widgetdatabase.h" -#include "project.h" -#include "sourceeditor.h" -#include "propertyeditor.h" -#include "editfunctionsimpl.h" -#include "listeditor.h" -#include "actiondnd.h" -#include "actioneditorimpl.h" -#include "variabledialogimpl.h" -#include "popupmenueditor.h" -#include "menubareditor.h" - -#include -#include "tdevdesigner_part.h" -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../interfaces/languageinterface.h" -#include -#include -#include - -#include - -TQListViewItem *newItem = 0; - -static TQPluginManager *classBrowserInterfaceManager = 0; - -HierarchyItem::HierarchyItem( Type type, TQListViewItem *parent, TQListViewItem *after, - const TQString &txt1, const TQString &txt2, const TQString &txt3 ) - : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type ) -{ -} - -HierarchyItem::HierarchyItem( Type type, TQListView *parent, TQListViewItem *after, - const TQString &txt1, const TQString &txt2, const TQString &txt3 ) - : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type ) -{ -} - -void HierarchyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) -{ - TQColorGroup g( cg ); - g.setColor( TQColorGroup::Base, backgroundColor() ); - g.setColor( TQColorGroup::Foreground, TQt::black ); - g.setColor( TQColorGroup::Text, TQt::black ); - TQString txt = text( 0 ); - if ( rtti() == Function && - MainWindow::self->currProject()->isCpp() && - ( txt == "init()" || txt == "destroy()" ) ) { - listView()->setUpdatesEnabled( FALSE ); - if ( txt == "init()" ) - setText( 0, txt + " " + "(Constructor)" ); - else - setText( 0, txt + " " + "(Destructor)" ); - TQListViewItem::paintCell( p, g, column, width, align ); - setText( 0, txt ); - listView()->setUpdatesEnabled( TRUE ); - } else { - TQListViewItem::paintCell( p, g, column, width, align ); - } - p->save(); - p->setPen( TQPen( cg.dark(), 1 ) ); - if ( column == 0 ) - p->drawLine( 0, 0, 0, height() - 1 ); - if ( listView()->firstChild() != this ) { - if ( nextSibling() != itemBelow() && itemBelow()->depth() < depth() ) { - int d = depth() - itemBelow()->depth(); - p->drawLine( -listView()->treeStepSize() * d, height() - 1, 0, height() - 1 ); - } - } - p->drawLine( 0, height() - 1, width, height() - 1 ); - p->drawLine( width - 1, 0, width - 1, height() ); - p->restore(); -} - -TQColor HierarchyItem::backgroundColor() -{ - updateBackColor(); - return backColor; -} - -void HierarchyItem::updateBackColor() -{ - if ( listView()->firstChild() == this ) { - backColor = *backColor1; - return; - } - - TQListViewItemIterator it( this ); - --it; - if ( it.current() ) { - if ( ( ( HierarchyItem*)it.current() )->backColor == *backColor1 ) - backColor = *backColor2; - else - backColor = *backColor1; - } else { - backColor = *backColor1; - } -} - -void HierarchyItem::setObject( TQObject *o ) -{ - obj = o; -} - -TQObject *HierarchyItem::object() const -{ - return obj; -} - -void HierarchyItem::okRename( int col ) -{ - if ( newItem == this ) - newItem = 0; - TQListViewItem::okRename( col ); -} - -void HierarchyItem::cancelRename( int col ) -{ - if ( newItem == this ) { - newItem = 0; - TQListViewItem::cancelRename( col ); - delete this; - return; - } - TQListViewItem::cancelRename( col ); -} - - - - -HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects ) - : TQListView( parent ), formWindow( fw ) -{ - DesignerFormPix = SmallIcon( "designer_form.png" , TDevDesignerPartFactory::instance()); - DesignerLayoutPix = SmallIcon( "designer_layout.png" , TDevDesignerPartFactory::instance()); - DesignerFolderPix = SmallIcon( "designer_folder.png" , TDevDesignerPartFactory::instance()); - DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()); - - init_colors(); - - setDefaultRenameAction( Accept ); - header()->setMovingEnabled( FALSE ); - header()->setStretchEnabled( TRUE ); - normalMenu = 0; - tabWidgetMenu = 0; - addColumn( i18n( "Name" ) ); - addColumn( i18n( "Class" ) ); - TQPalette p( palette() ); - p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) ); - (void)*selectedBack; // hack - setPalette( p ); - disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), - this, TQT_SLOT( changeSortColumn( int ) ) ); - setSorting( -1 ); - setHScrollBarMode( AlwaysOff ); - setVScrollBarMode( AlwaysOn ); - if ( doConnects ) { - connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ), - this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - this, TQT_SLOT( objectDoubleClicked( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), - this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ), - this, TQT_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) ); - } - deselect = TRUE; - setColumnWidthMode( 1, Manual ); -} - -void HierarchyList::keyPressEvent( TQKeyEvent *e ) -{ - if ( e->key() == Key_Shift || e->key() == Key_Control ) - deselect = FALSE; - else - deselect = TRUE; - TQListView::keyPressEvent( e ); -} - -void HierarchyList::keyReleaseEvent( TQKeyEvent *e ) -{ - deselect = TRUE; - TQListView::keyReleaseEvent( e ); -} - -void HierarchyList::viewportMousePressEvent( TQMouseEvent *e ) -{ - if ( e->state() & ShiftButton || e->state() & ControlButton ) - deselect = FALSE; - else - deselect = TRUE; - TQListView::viewportMousePressEvent( e ); -} - -void HierarchyList::viewportMouseReleaseEvent( TQMouseEvent *e ) -{ - TQListView::viewportMouseReleaseEvent( e ); -} - -TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) -{ - if ( !i ) - return 0; - - TQObject *o = findObject( i ); - if ( !o ) - return 0; - if ( TQT_BASE_OBJECT(formWindow) == TQT_BASE_OBJECT(o) ) { - if ( deselect ) - formWindow->clearSelection( FALSE ); - formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) ); - return 0; - } - if ( o->isWidgetType() ) { - TQWidget *w = (TQWidget*)o; - if ( !formWindow->widgets()->find( w ) ) { - if ( ::tqqt_cast(w->parent()) ) { - if (::tqqt_cast(w->parent()->parent()) ) { - ((TQTabWidget*)w->parent()->parent())->showPage( w ); - o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); - formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); - } else if ( ::tqqt_cast(w->parent()->parent()) ) { - ((QDesignerWizard*)w->parent()->parent())-> - setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); - o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); - formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); - } else { - ( (TQWidgetStack*)w->parent() )->raiseWidget( w ); - if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) ) - ( (QDesignerWidgetStack*)w->parent() )->updateButtons(); - } - } else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) { - formWindow->setActiveObject( TQT_TQOBJECT(w) ); - } else if ( ::tqqt_cast(w) ) { - return 0; // ### we could try to find our menu bar and change the currentMenu to our index - } else { - return 0; - } - } - } else if ( ::tqqt_cast(o) ) { - MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o ); - deselect = TRUE; - } - - if ( deselect ) - formWindow->clearSelection( FALSE ); - - return o; -} - - -void HierarchyList::objectDoubleClicked( TQListViewItem *i ) -{ - TQObject *o = handleObjectClick( i ); - if ( !o ) - return; - if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { - TQWidget *w = (TQWidget*)o; - if ( !w->parentWidget() || - WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) - w->raise(); - formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); - } -} - -void HierarchyList::objectClicked( TQListViewItem *i ) -{ - TQObject *o = handleObjectClick( i ); - if ( !o ) - return; - if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { - TQWidget *w = (TQWidget*)o; - formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); - } -} - -TQObject *HierarchyList::findObject( TQListViewItem *i ) -{ - return ( (HierarchyItem*)i )->object(); -} - -TQListViewItem *HierarchyList::findItem( TQObject *o ) -{ - TQListViewItemIterator it( this ); - while ( it.current() ) { - if ( ( (HierarchyItem*)it.current() )->object() == o ) - return it.current(); - ++it; - } - return 0; -} - -TQObject *HierarchyList::current() const -{ - if ( currentItem() ) - return ( (HierarchyItem*)currentItem() )->object(); - return 0; -} - -void HierarchyList::changeNameOf( TQObject *o, const TQString &name ) -{ - TQListViewItem *item = findItem( o ); - if ( !item ) - return; - item->setText( 0, name ); -} - - -void HierarchyList::changeDatabaseOf( TQObject *o, const TQString &info ) -{ -#ifndef TQT_NO_SQL - if ( !formWindow->isDatabaseAware() ) - return; - TQListViewItem *item = findItem( o ); - if ( !item ) - return; - item->setText( 2, info ); -#endif -} - -static TQPtrList *widgetStacks = 0; - -void HierarchyList::setup() -{ - if ( !formWindow || formWindow->isFake() ) - return; - clear(); - TQWidget *w = formWindow->mainContainer(); -#ifndef TQT_NO_SQL - if ( formWindow->isDatabaseAware() ) { - if ( columns() == 2 ) { - addColumn( i18n( "Database" ) ); - header()->resizeSection( 0, 1 ); - header()->resizeSection( 1, 1 ); - header()->resizeSection( 2, 1 ); - header()->adjustHeaderSize(); - } - } else { - if ( columns() == 3 ) { - removeColumn( 2 ); - } - } -#endif - if ( !widgetStacks ) - widgetStacks = new TQPtrList; - if ( w ) - insertObject( TQT_TQOBJECT(w), 0 ); - widgetStacks->clear(); -} - -void HierarchyList::setOpen( TQListViewItem *i, bool b ) -{ - TQListView::setOpen( i, b ); -} - -void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) -{ - if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) - return; - bool fakeMainWindow = FALSE; - if ( ::tqqt_cast(o) ) { - TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - if ( cw ) { - o = cw; - fakeMainWindow = TRUE; - } - } - TQListViewItem *item = 0; - TQString className = WidgetFactory::classNameOf( o ); - if ( ::tqqt_cast(o) ) { - switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) { - case WidgetFactory::HBox: - className = "HBox"; - break; - case WidgetFactory::VBox: - className = "VBox"; - break; - case WidgetFactory::Grid: - className = "Grid"; - break; - default: - break; - } - } - - TQString dbInfo; -#ifndef TQT_NO_SQL - dbInfo = MetaDataBase::fakeProperty( o, "database" ).toStringList().join("."); -#endif - - TQString name = o->name(); - if ( ::tqqt_cast(o->parent()) ) { - if ( ::tqqt_cast(o->parent()->parent()) ) - name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o ); - else if ( ::tqqt_cast(o->parent()->parent()) ) - name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o ); - } - - TQToolBox *tb; - if ( o->parent() && o->parent()->parent() && - (tb = ::tqqt_cast(o->parent()->parent()->parent())) ) - name = tb->itemLabel( tb->indexOf((TQWidget*)o) ); - - if ( fakeMainWindow ) { - name = o->parent()->name(); - className = TQMAINWINDOW_OBJECT_NAME_STRING; - } - - if ( !parent ) - item = new HierarchyItem( HierarchyItem::Widget, this, 0, name, className, dbInfo ); - else - item = new HierarchyItem( HierarchyItem::Widget, parent, 0, name, className, dbInfo ); - item->setOpen( TRUE ); - if ( !parent ) - item->setPixmap( 0, DesignerFormPix ); - else if ( ::tqqt_cast(o) ) - item->setPixmap( 0, DesignerLayoutPix ); - else - item->setPixmap( 0, WidgetDatabase::iconSet( - WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ). - pixmap( TQIconSet::Small, TQIconSet::Normal ) ); - if ( ::tqqt_cast(o) ) - item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() ); - - ( (HierarchyItem*)item )->setObject( o ); - TQObjectList l = o->childrenListObject(); - if ( ::tqqt_cast(o) ) - l.clear(); - if ( !l.isEmpty() ) { - TQObjectListIt it( l ); - it.toLast(); - for ( ; it.current(); --it ) { - if ( !it.current()->isWidgetType() || - ( (TQWidget*)it.current() )->isHidden() ) - continue; - if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { - if ( ::tqqt_cast(it.current()->parent()) || - ::tqqt_cast(it.current()) ) { - TQObject *obj = it.current(); - QDesignerTabWidget *tw = ::tqqt_cast(it.current()->parent()); - QDesignerWizard *dw = ::tqqt_cast(it.current()->parent()); - TQWidgetStack *stack = 0; - if ( dw || tw || ::tqqt_cast(obj) ) - stack = (TQWidgetStack*)obj; - else - stack = (TQWidgetStack*)obj->parent(); - if ( widgetStacks->findRef( stack ) != -1 ) - continue; - widgetStacks->append( stack ); - TQObjectList *l2 = stack->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, TRUE, FALSE ); - for ( obj = l2->last(); obj; obj = l2->prev() ) { - if ( qstrcmp( obj->className(), - "TQWidgetStackPrivate::Invisible" ) == 0 || - ( tw && !tw->tabBar()->tab( stack->id( (TQWidget*)obj ) ) ) || - ( dw && dw->isPageRemoved( (TQWidget*)obj ) ) ) - continue; - if ( qstrcmp( obj->name(), "designer_wizardstack_button" ) == 0 ) - continue; - if ( stack->id( (TQWidget*)obj ) == -1 ) - continue; - insertObject( obj, item ); - } - delete l2; - } else if ( ::tqqt_cast(it.current()->parent()) ) { - if ( !::tqqt_cast(it.current()) ) - continue; - TQToolBox *tb = (TQToolBox*)it.current()->parent(); - for ( int i = tb->count() - 1; i >= 0; --i ) - insertObject( TQT_TQOBJECT(tb->item( i )), item ); - } - continue; - } - insertObject( it.current(), item ); - } - } - - if ( fakeMainWindow ) { - TQObjectList *l = o->parent()->queryList( "QDesignerToolBar" ); - TQObject *obj; - for ( obj = l->first(); obj; obj = l->next() ) - insertObject( obj, item ); - delete l; - l = o->parent()->queryList( "MenuBarEditor" ); - for ( obj = l->first(); obj; obj = l->next() ) - insertObject( obj, item ); - delete l; - } else if ( ::tqqt_cast(o) || ::tqqt_cast(o) ) { - TQPtrList actions; - if ( ::tqqt_cast(o) ) - actions = ( (QDesignerToolBar*)o )->insertedActions(); - else - ( (PopupMenuEditor*)o )->insertedActions( actions ); - - TQPtrListIterator it( actions ); - it.toLast(); - while ( it.current() ) { - TQAction *a = it.current(); - if ( ::tqqt_cast(a) ) { - QDesignerAction *da = (QDesignerAction*)a; - if ( da->supportsMenu() ) - insertObject( da, item ); - else - insertObject( TQT_TQOBJECT(da->widget()), item ); - } else if ( ::tqqt_cast(a) ) { - insertObject( a, item ); - } - --it; - } - } else if ( ::tqqt_cast(o) && !o->childrenListObject().isEmpty() ) { - TQObjectList l = o->childrenListObject(); - for ( TQObject *obj = l.last(); obj; obj = l.prev() ) { - if ( ::tqqt_cast(obj) ) { - QDesignerAction *da = (QDesignerAction*)obj; - if ( da->supportsMenu() ) - insertObject( da, item ); - else - insertObject( TQT_TQOBJECT(da->widget()), item ); - } else if ( ::tqqt_cast(obj) ) { - insertObject( obj, item ); - } - } - } else if ( ::tqqt_cast(o) ) { - MenuBarEditor *mb = (MenuBarEditor*)o; - for ( int i = mb->count() -1; i >= 0; --i ) { - MenuBarEditorItem *md = mb->item( i ); - if ( !md || !md->menu() ) - continue; - insertObject( TQT_TQOBJECT(md->menu()), item ); - } - } -} - -void HierarchyList::setCurrent( TQObject *o ) -{ - TQListViewItemIterator it( this ); - while ( it.current() ) { - if ( ( (HierarchyItem*)it.current() )->object() == o ) { - blockSignals( TRUE ); - setCurrentItem( it.current() ); - ensureItemVisible( it.current() ); - blockSignals( FALSE ); - return; - } - ++it; - } -} - -void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) -{ - if ( !i ) - return; - - TQObject *o = findObject( i ); - if ( !o ) - return; - - if ( !o->isWidgetType() || - ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(formWindow) && !formWindow->widgets()->find( (TQWidget*)o ) ) ) - return; - - TQWidget *w = (TQWidget*)o; - if ( w->isVisibleTo( formWindow ) ) { - if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) { - if ( !normalMenu ) - normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this ); - normalMenu->popup( p ); - } else { - if ( !tabWidgetMenu ) - tabWidgetMenu = - formWindow->mainWindow()->setupTabWidgetHierarchyMenu( - this, TQT_SLOT( addTabPage() ), - TQT_SLOT( removeTabPage() ) ); - tabWidgetMenu->popup( p ); - } - } -} - -void HierarchyList::addTabPage() -{ - TQObject *o = current(); - if ( !o || !o->isWidgetType() ) - return; - TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast(w) ) { - TQTabWidget *tw = (TQTabWidget*)w; - AddTabPageCommand *cmd = new AddTabPageCommand( i18n( "Add Page to %1" ). - arg( tw->name() ), formWindow, - tw, "Tab" ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( ::tqqt_cast(w) ) { - TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); - AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ). - arg( wiz->name() ), formWindow, - wiz, "Page" ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } -} - -void HierarchyList::removeTabPage() -{ - TQObject *o = current(); - if ( !o || !o->isWidgetType() ) - return; - TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast(w) ) { - TQTabWidget *tw = (TQTabWidget*)w; - if ( tw->currentPage() ) { - QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; - DeleteTabPageCommand *cmd = - new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ). - arg( dtw->pageTitle() ).arg( tw->name() ), - formWindow, tw, tw->currentPage() ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } else if ( ::tqqt_cast(w) ) { - TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); - if ( wiz->currentPage() ) { - QDesignerWizard *dw = (QDesignerWizard*)wiz; - DeleteWizardPageCommand *cmd = - new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). - arg( dw->pageTitle() ).arg( wiz->name() ), - formWindow, wiz, - wiz->indexOf( wiz->currentPage() ), TRUE ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } -} - -// ------------------------------------------------------------ - -FormDefinitionView::FormDefinitionView( TQWidget *parent, FormWindow *fw ) - : HierarchyList( parent, fw, TRUE ) -{ - header()->hide(); - removeColumn( 1 ); - connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), - this, TQT_SLOT( renamed( TQListViewItem * ) ) ); - popupOpen = FALSE; -} - -void FormDefinitionView::setup() -{ - if ( popupOpen || !formWindow ) - return; - if ( !formWindow->project()->isCpp() ) - return; - TQListViewItem *i = firstChild(); - while ( i ) { - if ( i->rtti() == HierarchyItem::DefinitionParent ) { - TQListViewItem *a = i; - i = i->nextSibling(); - delete a; - continue; - } - i = i->nextSibling(); - } - - LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); - if ( lIface ) { - TQStringList defs = lIface->definitions(); - for ( TQStringList::Iterator dit = defs.begin(); dit != defs.end(); ++dit ) { - HierarchyItem *itemDef = new HierarchyItem( HierarchyItem::DefinitionParent, this, 0, - i18n( *dit ), TQString(), TQString() ); - itemDef->setPixmap( 0, DesignerFolderPix ); - itemDef->setOpen( TRUE ); - TQStringList entries = - lIface->definitionEntries( *dit, formWindow->mainWindow()->designerInterface() ); - HierarchyItem *item = 0; - for ( TQStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit ) { - item = new HierarchyItem( HierarchyItem::Definition, - itemDef, item, *eit, TQString(), TQString() ); - item->setRenameEnabled( 0, TRUE ); - } - } - lIface->release(); - } - setupVariables(); - refresh(); -} - -void FormDefinitionView::setupVariables() -{ - bool pubOpen, protOpen, privOpen; - pubOpen = protOpen = privOpen = TRUE; - TQListViewItem *i = firstChild(); - while ( i ) { - if ( i->rtti() == HierarchyItem::VarParent ) { - TQListViewItem *a = i; - i = i->firstChild(); - while ( i ) { - if ( i->rtti() == HierarchyItem::VarPublic ) - pubOpen = i->isOpen(); - else if ( i->rtti() == HierarchyItem::VarProtected ) - protOpen = i->isOpen(); - else if ( i->rtti() == HierarchyItem::VarPrivate ) - privOpen = i->isOpen(); - i = i->nextSibling(); - } - delete a; - break; - } - i = i->nextSibling(); - } - - HierarchyItem *itemVar = new HierarchyItem( HierarchyItem::VarParent, this, 0, i18n( "Class Variables" ), - TQString(), TQString() ); - itemVar->setPixmap( 0, DesignerFolderPix ); - itemVar->setOpen( TRUE ); - - itemVarPriv = new HierarchyItem( HierarchyItem::VarPrivate, itemVar, 0, i18n( "private" ), - TQString(), TQString() ); - itemVarProt = new HierarchyItem( HierarchyItem::VarProtected, itemVar, 0, i18n( "protected" ), - TQString(), TQString() ); - itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, i18n( "public" ), - TQString(), TQString() ); - - TQValueList varList = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); - TQValueList::Iterator it = --( varList.end() ); - if ( !varList.isEmpty() && itemVar ) { - for (;;) { - TQListViewItem *item = 0; - if ( (*it).varAccess == "public" ) - item = new HierarchyItem( HierarchyItem::Variable, itemVarPubl, 0, (*it).varName, - TQString(), TQString() ); - else if ( (*it).varAccess == "private" ) - item = new HierarchyItem( HierarchyItem::Variable, itemVarPriv, 0, (*it).varName, - TQString(), TQString() ); - else // default is protected - item = new HierarchyItem( HierarchyItem::Variable, itemVarProt, 0, (*it).varName, - TQString(), TQString() ); - item->setPixmap( 0, DesignerEditSlotsPix ); - if ( it == varList.begin() ) - break; - --it; - } - } - itemVar->setOpen( TRUE ); - itemVarPriv->setOpen( privOpen ); - itemVarProt->setOpen( protOpen ); - itemVarPubl->setOpen( pubOpen ); -} - -void FormDefinitionView::refresh() -{ - if ( popupOpen || !formWindow || !formWindow->project()->isCpp() ) - return; - - bool fuPub, fuProt, fuPriv, slPub, slProt, slPriv; - fuPub = fuProt = fuPriv = slPub = slProt = slPriv = TRUE; - TQListViewItem *i = firstChild(); - while ( i ) { - if ( i->rtti() == HierarchyItem::SlotParent || - i->rtti() == HierarchyItem::FunctParent ) { - TQListViewItem *a = i; - i = i->firstChild(); - while ( i ) { - switch( i->rtti() ) { - case HierarchyItem::FunctPublic: - fuPub = i->isOpen(); - case HierarchyItem::FunctProtected: - fuProt = i->isOpen(); - break; - case HierarchyItem::FunctPrivate: - fuPriv = i->isOpen(); - break; - case HierarchyItem::SlotPublic: - slPub = i->isOpen(); - if ( slPub ) - break; - case HierarchyItem::SlotProtected: - slProt = i->isOpen(); - break; - case HierarchyItem::SlotPrivate: - slPriv = i->isOpen(); - } - i = i->nextSibling(); - } - i = a->nextSibling(); - delete a; - continue; - } - i = i->nextSibling(); - } - - - itemFunct = new HierarchyItem( HierarchyItem::FunctParent, - this, 0, i18n( "Functions" ), TQString(), TQString() ); - itemFunct->moveItem( i ); - itemFunct->setPixmap( 0, DesignerFolderPix ); - itemFunctPriv = new HierarchyItem( HierarchyItem::FunctPrivate, itemFunct, 0, - i18n( "private" ), TQString(), TQString() ); - itemFunctProt = new HierarchyItem( HierarchyItem::FunctProtected, itemFunct, 0, - i18n( "protected" ), TQString(), TQString() ); - itemFunctPubl = new HierarchyItem( HierarchyItem::FunctPublic, itemFunct, 0, - i18n( "public" ), TQString(), TQString() ); - - itemSlots = new HierarchyItem( HierarchyItem::SlotParent, - this, 0, i18n( "Slots" ), TQString(), TQString() ); - itemSlots->setPixmap( 0, DesignerFolderPix ); - itemPrivate = new HierarchyItem( HierarchyItem::SlotPrivate, itemSlots, 0, i18n( "private" ), - TQString(), TQString() ); - itemProtected = new HierarchyItem( HierarchyItem::SlotProtected, itemSlots, 0, i18n( "protected" ), - TQString(), TQString() ); - itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, i18n( "public" ), - TQString(), TQString() ); - - TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); - TQValueList::Iterator it = --( functionList.end() ); - if ( !functionList.isEmpty() && itemFunct ) { - for (;;) { - TQListViewItem *item = 0; - if ( (*it).type == "slot" ) { - if ( (*it).access == "protected" ) - item = new HierarchyItem( HierarchyItem::Slot, itemProtected, 0, (*it).function, - TQString(), TQString() ); - else if ( (*it).access == "private" ) - item = new HierarchyItem( HierarchyItem::Slot, itemPrivate, 0, (*it).function, - TQString(), TQString() ); - else // default is public - item = new HierarchyItem( HierarchyItem::Slot, itemPublic, 0, (*it).function, - TQString(), TQString() ); - } else { - if ( (*it).access == "protected" ) - item = new HierarchyItem( HierarchyItem::Function, itemFunctProt, 0, (*it).function, - TQString(), TQString() ); - else if ( (*it).access == "private" ) - item = new HierarchyItem( HierarchyItem::Function, itemFunctPriv, 0, (*it).function, - TQString(), TQString() ); - else // default is public - item = new HierarchyItem( HierarchyItem::Function, itemFunctPubl, 0, (*it).function, - TQString(), TQString() ); - } - item->setPixmap( 0, DesignerEditSlotsPix ); - if ( it == functionList.begin() ) - break; - --it; - } - } - - itemFunct->setOpen( TRUE ); - itemFunctPubl->setOpen( fuPub ); - itemFunctProt->setOpen( fuProt ); - itemFunctPriv->setOpen( fuPriv ); - - itemSlots->setOpen( TRUE ); - itemPublic->setOpen( slPub ); - itemProtected->setOpen( slProt ); - itemPrivate->setOpen( slPriv ); -} - - -void FormDefinitionView::setCurrent( TQWidget * ) -{ -} - -void FormDefinitionView::objectClicked( TQListViewItem *i ) -{ - if ( !i ) - return; - if ( (i->rtti() == HierarchyItem::Slot) || (i->rtti() == HierarchyItem::Function) ) - { - formWindow->clearSelection(false); - formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); - } -// formWindow->mainWindow()->editFunction( i->text( 0 ) ); -} - -static HierarchyItem::Type getChildType( int type ) -{ - switch ( (HierarchyItem::Type)type ) { - case HierarchyItem::Widget: - tqWarning( "getChildType: Inserting childs dynamically to Widget or SlotParent is not allowed!" ); - break; - case HierarchyItem::SlotParent: - case HierarchyItem::SlotPublic: - case HierarchyItem::SlotProtected: - case HierarchyItem::SlotPrivate: - case HierarchyItem::Slot: - return HierarchyItem::Slot; - case HierarchyItem::DefinitionParent: - case HierarchyItem::Definition: - return HierarchyItem::Definition; - case HierarchyItem::Event: - case HierarchyItem::EventFunction: - return HierarchyItem::Event; - case HierarchyItem::FunctParent: - case HierarchyItem::FunctPublic: - case HierarchyItem::FunctProtected: - case HierarchyItem::FunctPrivate: - case HierarchyItem::Function: - return HierarchyItem::Function; - case HierarchyItem::VarParent: - case HierarchyItem::VarPublic: - case HierarchyItem::VarProtected: - case HierarchyItem::VarPrivate: - case HierarchyItem::Variable: - return HierarchyItem::Variable; - } - return (HierarchyItem::Type)type; -} - -void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const TQString &s ) -{ - TQListViewItem *after = i->firstChild(); - while ( after && after->nextSibling() ) - after = after->nextSibling(); - HierarchyItem *item = new HierarchyItem( getChildType( i->rtti() ), i, after, s, - TQString(), TQString() ); - if ( !pix.isNull() ) - item->setPixmap( 0, pix ); - item->setRenameEnabled( 0, TRUE ); - setCurrentItem( item ); - ensureItemVisible( item ); - tqApp->processEvents(); - newItem = item; - item->startRename( 0 ); -} - -void FormDefinitionView::contentsMouseDoubleClickEvent( TQMouseEvent *e ) -{ - TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) ); - if ( !i ) - return; - - if ( i->rtti() == HierarchyItem::SlotParent || i->rtti() == HierarchyItem::FunctParent || - i->rtti() == HierarchyItem::VarParent ) - return; - - HierarchyItem::Type t = getChildType( i->rtti() ); - if ( (int)t == i->rtti() ) - i = i->parent(); - - if ( formWindow->project()->isCpp() ) - switch( i->rtti() ) { - case HierarchyItem::FunctPublic: - execFunctionDialog( "public", "function", TRUE ); - break; - case HierarchyItem::FunctProtected: - execFunctionDialog( "protected", "function", TRUE ); - break; - case HierarchyItem::FunctPrivate: - execFunctionDialog( "private", "function", TRUE ); - break; - case HierarchyItem::SlotPublic: - execFunctionDialog( "public", "slot", TRUE ); - break; - case HierarchyItem::SlotProtected: - execFunctionDialog( "protected", "slot", TRUE ); - break; - case HierarchyItem::SlotPrivate: - execFunctionDialog( "private", "slot", TRUE ); - break; - case HierarchyItem::VarPublic: - case HierarchyItem::VarProtected: - case HierarchyItem::VarPrivate: { - VariableDialog varDia( formWindow, this ); - TQListViewItem *i = selectedItem(); - if ( i ) - varDia.setCurrentItem( i->text( 0 ) ); - varDia.exec(); - break; - } - default: - insertEntry( i ); - } else - insertEntry( i ); -} - -void FormDefinitionView::execFunctionDialog( const TQString &access, const TQString &type, bool addFunc ) -{ - FormFile *formFile = formWindow->formFile(); - if ( !formFile || !formFile->isUihFileUpToDate() ) - return; - - // refresh the functions list in the metadatabase - SourceEditor *editor = formFile->editor(); - if ( editor ) - editor->refresh( TRUE ); - - EditFunctions dlg( this, formWindow ); - if ( addFunc ) - dlg.functionAdd( access, type ); - dlg.exec(); -} - -void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) -{ - if ( !i ) - return; - - const int EDIT = 1; - const int NEW = 2; - const int DEL = 3; - const int PROPS = 4; - const int GOIMPL = 5; - - TQPopupMenu menu; - bool insertDelete = FALSE; - - if ( i->rtti() == HierarchyItem::FunctParent || i->rtti() == HierarchyItem::SlotParent || - i->rtti() == HierarchyItem::VarParent ) { - menu.insertItem( SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()), i18n( "Edit..." ), EDIT ); - } else - menu.insertItem( SmallIcon( "designer_filenew.png" , TDevDesignerPartFactory::instance()), i18n( "New..." ), NEW ); - if ( i->rtti() == HierarchyItem::DefinitionParent || i->rtti() == HierarchyItem::Variable || - i->rtti() == HierarchyItem::Definition ) { - menu.insertItem( SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()), i18n( "Edit..." ), EDIT ); - } - if ( i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot ) { - if ( formWindow->project()->isCpp() ) - menu.insertItem( SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()), i18n( "Properties" ), PROPS ); - if ( MetaDataBase::hasEditor( formWindow->project()->language() ) ) - menu.insertItem( i18n( "Goto Implementation" ), GOIMPL ); - insertDelete = TRUE; - } - if ( insertDelete || i->rtti() == HierarchyItem::Variable || - i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot || - i->rtti() == HierarchyItem::Definition ) { - menu.insertSeparator(); - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), i18n( "Delete" ), DEL ); - } - popupOpen = TRUE; - int res = menu.exec( pos ); - popupOpen = FALSE; - if ( res == -1 ) - return; - - if ( res == EDIT ) { - switch( i->rtti() ) { - case HierarchyItem::FunctParent: - execFunctionDialog( "public", "function", FALSE ); - break; - case HierarchyItem::SlotParent: - execFunctionDialog( "public", "slot", FALSE ); - break; - case HierarchyItem::VarParent: - case HierarchyItem::VarPublic: - case HierarchyItem::VarProtected: - case HierarchyItem::VarPrivate: - case HierarchyItem::Variable: { - VariableDialog varDia( formWindow, this ); - TQListViewItem *i = selectedItem(); - if ( i ) - varDia.setCurrentItem( i->text( 0 ) ); - if ( varDia.exec() == TQDialog::Accepted ) - formWindow->commandHistory()->setModified( TRUE ); - break; - } - case HierarchyItem::Definition: - case HierarchyItem::DefinitionParent: - LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); - if ( !lIface ) - return; - if ( i->rtti() == HierarchyItem::Definition ) - i = i->parent(); - ListEditor dia( this, 0, TRUE ); - dia.setCaption( i18n( "Edit %1" ).arg( i->text( 0 ) ) ); - TQStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() ); - dia.setList( entries ); - dia.exec(); - Command *cmd = new EditDefinitionsCommand( i18n( "Edit %1" ).arg( i->text( 0 )), formWindow, - lIface, i->text( 0 ), dia.items() ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } else if ( res == NEW ) { - HierarchyItem::Type t = getChildType( i->rtti() ); - if ( (int)t == i->rtti() ) - i = i->parent(); - switch( i->rtti() ) { - case HierarchyItem::SlotPublic: - execFunctionDialog( "public", "slot", TRUE ); - break; - case HierarchyItem::SlotProtected: - execFunctionDialog( "protected", "slot", TRUE ); - break; - case HierarchyItem::SlotPrivate: - execFunctionDialog( "private" , "slot", TRUE ); - break; - case HierarchyItem::FunctPublic: - execFunctionDialog( "public", "function", TRUE ); - break; - case HierarchyItem::FunctProtected: - execFunctionDialog( "protected", "function", TRUE ); - break; - case HierarchyItem::FunctPrivate: - execFunctionDialog( "private" , "function", TRUE ); - break; - default: - insertEntry( i ); - } - } else if ( res == DEL ) { - if ( i->rtti() == HierarchyItem::Slot || i->rtti() == HierarchyItem::Function ) { - - TQCString funct( MetaDataBase::normalizeFunction( i->text( 0 ) ).latin1() ); - Command *cmd = new RemoveFunctionCommand( i18n( "Remove Function" ), formWindow, funct, - TQString(), TQString(), TQString(), - TQString(), formWindow->project()->language() ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - } else if ( i->rtti() == HierarchyItem::Variable ) { - Command *cmd = new RemoveVariableCommand( i18n( "Remove Variable" ), formWindow, - i->text( 0 ) ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else { - TQListViewItem *p = i->parent(); - delete i; - save( p, 0 ); - } - } else if ( res == PROPS ) { - if ( i->rtti() == HierarchyItem::Slot || - i->rtti() == HierarchyItem::Function ) { - EditFunctions dlg( this, formWindow ); - dlg.setCurrentFunction( MetaDataBase::normalizeFunction( i->text( 0 ) ) ); - dlg.exec(); - } - } else if ( res == GOIMPL ) { - if ( i->rtti() == HierarchyItem::Slot || - i->rtti() == HierarchyItem::Function ) { - formWindow->clearSelection(false); - formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); -// formWindow->mainWindow()->editFunction( i->text( 0 ) ); - } - } -} - -void FormDefinitionView::renamed( TQListViewItem *i ) -{ - if ( newItem == i ) - newItem = 0; - if ( !i->parent() ) - return; - save( i->parent(), i ); -} - - -void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i ) -{ - if ( i && i->text( 0 ).isEmpty() ) { - delete i; - return; - } - - if ( i && i->rtti() == HierarchyItem::Variable ) { - i->setRenameEnabled( 0, FALSE ); - TQString varName = i->text( 0 ); - varName = varName.simplifyWhiteSpace(); - if ( varName[(int)varName.length() - 1] != ';' ) - varName += ";"; - if ( MetaDataBase::hasVariable( TQT_TQOBJECT(formWindow), varName ) ) { - TQMessageBox::information( this, i18n( "Edit Variables" ), - i18n( "This variable has already been declared." ) ); - } else { - if ( p->rtti() == HierarchyItem::VarPublic ) - addVariable( varName, "public" ); - else if ( p->rtti() == HierarchyItem::VarProtected ) - addVariable( varName, "protected" ); - else if ( p->rtti() == HierarchyItem::VarPrivate ) - addVariable( varName, "private" ); - } - } else { - LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); - if ( !lIface ) - return; - TQStringList lst; - i = p->firstChild(); - while ( i ) { - lst << i->text( 0 ); - i = i->nextSibling(); - } - Command *cmd = new EditDefinitionsCommand( i18n( "Edit %1" ).arg( p->text( 0 ) ), formWindow, - lIface, p->text( 0 ), lst ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } -} - -void FormDefinitionView::addVariable( const TQString &varName, const TQString &access ) -{ - Command *cmd = new AddVariableCommand( i18n( "Add Variable" ), formWindow, - varName, access ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -// ------------------------------------------------------------ - -HierarchyView::HierarchyView( TQWidget *parent ) - : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | - WStyle_Tool |WStyle_MinMax | WStyle_SysMenu ) -{ - formwindow = 0; - editor = 0; - listview = new HierarchyList( this, formWindow() ); - fView = new FormDefinitionView( this, formWindow() ); - if ( !MainWindow::self->singleProjectMode() ) { - addTab( listview, i18n( "Objects" ) ); - setTabToolTip( listview, i18n( "List of all widgets and objects of the current form in hierarchical order" ) ); - addTab( fView, i18n( "Members" ) ); - setTabToolTip( fView, i18n( "List of all members of the current form" ) ); - } else { - listview->hide(); - fView->hide(); - } - - if ( !classBrowserInterfaceManager ) { - classBrowserInterfaceManager = - new TQPluginManager( IID_ClassBrowser, TQApplication::libraryPaths(), - MainWindow::self->pluginDirectory() ); - } - - classBrowsers = new TQMap(); - TQStringList langs = MetaDataBase::languages(); - for ( TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it ) { - TQInterfacePtr ciface = 0; - classBrowserInterfaceManager->queryInterface( *it, &ciface ); - if ( ciface ) { - ClassBrowser cb( ciface->createClassBrowser( this ), ciface ); - addTab( cb.lv, i18n( "Class Declarations" ) ); - setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) ); - ciface->onClick( TQT_TQOBJECT(this), TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) ); - classBrowsers->insert( *it, cb ); - setTabEnabled( cb.lv, FALSE ); - } - } -} - -HierarchyView::~HierarchyView() -{ -} - -void HierarchyView::clear() -{ - listview->clear(); - fView->clear(); - for ( TQMap::Iterator it = classBrowsers->begin(); - it != classBrowsers->end(); ++it ) { - (*it).iface->clear(); - } -} - -void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o ) -{ - bool fake = fw && qstrcmp( fw->name(), "qt_fakewindow" ) == 0; - if ( fw == 0 || o == 0 ) { - listview->clear(); - fView->clear(); - listview->setFormWindow( fw ); - fView->setFormWindow( fw ); - formwindow = 0; - editor = 0; - } - - setTabEnabled( listview, TRUE ); - setTabEnabled( fView, fw && fw->project()->isCpp() ); - - if ( fw == formwindow ) { - if ( fw ) { - if ( !fake ) - listview->setCurrent( TQT_TQOBJECT(o) ); - else - listview->clear(); - if ( MainWindow::self->qWorkspace()->activeWindow() == fw ) - showPage( listview ); - else if ( fw->project()->isCpp() ) - showPage( fView ); - else - showClasses( fw->formFile()->editor() ); - } - } - - formwindow = fw; - if ( !fake ) { - listview->setFormWindow( fw ); - } else { - listview->setFormWindow( 0 ); - listview->clear(); - } - - fView->setFormWindow( fw ); - if ( !fake ) { - listview->setup(); - listview->setCurrent( TQT_TQOBJECT(o) ); - } - fView->setup(); - - for ( TQMap::Iterator it = classBrowsers->begin(); - it != classBrowsers->end(); ++it ) { - (*it).iface->clear(); - setTabEnabled( (*it).lv, fw && !fw->project()->isCpp() ); - } - - if ( MainWindow::self->qWorkspace()->activeWindow() == fw ) - showPage( listview ); - else if ( fw && fw->project()->isCpp() ) - showPage( fView ); - else if ( fw ) - showClasses( fw->formFile()->editor() ); - - editor = 0; -} - -void HierarchyView::showClasses( SourceEditor *se ) -{ - if ( !se->object() ) - return; - - lastSourceEditor = se; - TQTimer::singleShot( 100, this, TQT_SLOT( showClassesTimeout() ) ); -} - -void HierarchyView::showClassesTimeout() -{ - if ( !lastSourceEditor ) - return; - SourceEditor *se = (SourceEditor*)lastSourceEditor; - if ( !se->object() ) - return; - if ( se->formWindow() && se->formWindow()->project()->isCpp() ) { - setFormWindow( se->formWindow(), TQT_TQOBJECT(se->formWindow()->currentWidget()) ); - MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(se->formWindow()->currentWidget()), - se->formWindow() ); - return; - } - - setTabEnabled( listview, !!se->formWindow() && !se->formWindow()->isFake() ); - setTabEnabled( fView, FALSE ); - - formwindow = 0; - listview->setFormWindow( 0 ); - fView->setFormWindow( 0 ); - listview->clear(); - fView->clear(); - if ( !se->formWindow() ) - MainWindow::self->propertyeditor()->setWidget( 0, 0 ); - editor = se; - - for ( TQMap::Iterator it = classBrowsers->begin(); - it != classBrowsers->end(); ++it ) { - if ( it.key() == se->project()->language() ) { - (*it).iface->update( se->text() ); - setTabEnabled( (*it).lv, TRUE ); - showPage( (*it).lv ); - } else { - setTabEnabled( (*it).lv, FALSE ); - (*it).iface->clear(); - } - } -} - -void HierarchyView::updateClassBrowsers() -{ - if ( !editor ) - return; - for ( TQMap::Iterator it = classBrowsers->begin(); - it != classBrowsers->end(); ++it ) { - if ( it.key() == editor->project()->language() ) - (*it).iface->update( editor->text() ); - else - (*it).iface->clear(); - } -} - -FormWindow *HierarchyView::formWindow() const -{ - return formwindow; -} - -void HierarchyView::closeEvent( TQCloseEvent *e ) -{ - emit hidden(); - e->accept(); -} - -void HierarchyView::widgetInserted( TQWidget * ) -{ - listview->setup(); -} - -void HierarchyView::widgetRemoved( TQWidget * ) -{ - listview->setup(); -} - -void HierarchyView::widgetsInserted( const TQWidgetList & ) -{ - listview->setup(); -} - -void HierarchyView::widgetsRemoved( const TQWidgetList & ) -{ - listview->setup(); -} - -void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & ) -{ - TQWidget *w2 = w; - if ( ::tqqt_cast(w) ) - w2 = ( (TQMainWindow*)w )->centralWidget(); - listview->changeNameOf( TQT_TQOBJECT(w2), w->name() ); -} - - -void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& info ) -{ -#ifndef TQT_NO_SQL - TQString i = info.join( "." ); - listview->changeDatabaseOf( TQT_TQOBJECT(w), i ); -#endif -} - - -void HierarchyView::tabsChanged( TQTabWidget * ) -{ - listview->setup(); -} - -void HierarchyView::pagesChanged( TQWizard * ) -{ - listview->setup(); -} - -void HierarchyView::rebuild() -{ - listview->setup(); -} - -void HierarchyView::closed( FormWindow *fw ) -{ - if ( fw == formwindow ) { - listview->clear(); - fView->clear(); - } -} - -void HierarchyView::updateFormDefinitionView() -{ - fView->setup(); -} - -void HierarchyView::jumpTo( const TQString &func, const TQString &clss, int type ) -{ - if ( !editor ) - return; - if ( type == ClassBrowserInterface::Class ) - editor->setClass( func ); - else - editor->setFunction( func, clss ); -} - -HierarchyView::ClassBrowser::ClassBrowser( TQListView *l, ClassBrowserInterface *i ) - : lv( l ), iface( i ) -{ -} - -HierarchyView::ClassBrowser::~ClassBrowser() -{ -} diff --git a/tdevdesigner/designer/hierarchyview.h b/tdevdesigner/designer/hierarchyview.h deleted file mode 100644 index cb21ed50..00000000 --- a/tdevdesigner/designer/hierarchyview.h +++ /dev/null @@ -1,252 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef HIRARCHYVIEW_H -#define HIRARCHYVIEW_H - -#include -#include -#include -#include -#include -#include "../interfaces/classbrowserinterface.h" - -class FormWindow; -class TQCloseEvent; -class TQPopupMenu; -class TQKeyEvent; -class TQMouseEvent; -class TQWizard; -class SourceEditor; - -class HierarchyItem : public TQListViewItem -{ -public: - enum Type { - Widget, - SlotParent, - SlotPublic, - SlotProtected, - SlotPrivate, - Slot, - DefinitionParent, - Definition, - Event, - EventFunction, - FunctParent, - FunctPublic, - FunctProtected, - FunctPrivate, - Function, - VarParent, - VarPublic, - VarProtected, - VarPrivate, - Variable - }; - - HierarchyItem( Type type, TQListViewItem *parent, TQListViewItem *after, - const TQString &txt1, const TQString &txt2, const TQString &txt3 ); - HierarchyItem( Type type, TQListView *parent, TQListViewItem *after, - const TQString &txt1, const TQString &txt2, const TQString &txt3 ); - - void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); - void updateBackColor(); - - void setObject( TQObject *o ); - TQObject *object() const; - - void setText( int col, const TQString &txt ) { if ( !txt.isEmpty() ) TQListViewItem::setText( col, txt ); } - - int rtti() const { return (int)typ; } - -private: - void okRename( int col ); - void cancelRename( int col ); - -private: - TQColor backgroundColor(); - TQColor backColor; - TQObject *obj; - Type typ; - -}; - -class HierarchyList : public TQListView -{ - Q_OBJECT - - -public: - HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects = TRUE ); - - virtual void setup(); - virtual void setCurrent( TQObject *o ); - void setOpen( TQListViewItem *i, bool b ); - void changeNameOf( TQObject *o, const TQString &name ); - void changeDatabaseOf( TQObject *o, const TQString &info ); - void setFormWindow( FormWindow *fw ) { formWindow = fw; } - void drawContentsOffset( TQPainter *p, int ox, int oy, - int cx, int cy, int cw, int ch ) { - setUpdatesEnabled( FALSE ); - triggerUpdate(); - setUpdatesEnabled( TRUE ); - TQListView::drawContentsOffset( p, ox, oy, cx, cy, cw, ch ); - } - - void insertEntry( TQListViewItem *i, const TQPixmap &pix = TQPixmap(), const TQString &s = TQString() ); - -protected: - void keyPressEvent( TQKeyEvent *e ); - void keyReleaseEvent( TQKeyEvent *e ); - void viewportMousePressEvent( TQMouseEvent *e ); - void viewportMouseReleaseEvent( TQMouseEvent *e ); - -public slots: - void addTabPage(); - void removeTabPage(); - -private: - void insertObject( TQObject *o, TQListViewItem *parent ); - TQObject *findObject( TQListViewItem *i ); - TQListViewItem *findItem( TQObject *o ); - TQObject *current() const; - TQObject *handleObjectClick( TQListViewItem *i ); - -private slots: - virtual void objectClicked( TQListViewItem *i ); - virtual void objectDoubleClicked( TQListViewItem *i ); - virtual void showRMBMenu( TQListViewItem *, const TQPoint & ); - -protected: - FormWindow *formWindow; - TQPopupMenu *normalMenu, *tabWidgetMenu; - bool deselect; - - TQPixmap DesignerFormPix; - TQPixmap DesignerLayoutPix; - TQPixmap DesignerFolderPix; - TQPixmap DesignerEditSlotsPix; - -}; - -class FormDefinitionView : public HierarchyList -{ - Q_OBJECT - - -public: - FormDefinitionView( TQWidget *parent, FormWindow *fw ); - - void setup(); - void setupVariables(); - void refresh(); - void setCurrent( TQWidget *w ); - -protected: - void contentsMouseDoubleClickEvent( TQMouseEvent *e ); - -private: - void save( TQListViewItem *p, TQListViewItem *i ); - void execFunctionDialog( const TQString &access, const TQString &type, bool addFunc ); - void addVariable( const TQString &varName, const TQString &access ); - -private slots: - void objectClicked( TQListViewItem *i ); - void showRMBMenu( TQListViewItem *, const TQPoint & ); - void renamed( TQListViewItem *i ); - -private: - bool popupOpen; - HierarchyItem *itemSlots, *itemPrivate, *itemProtected, *itemPublic; - HierarchyItem *itemFunct, *itemFunctPriv, *itemFunctProt, *itemFunctPubl; - HierarchyItem *itemVar, *itemVarPriv, *itemVarProt, *itemVarPubl; -}; - - -class HierarchyView : public TQTabWidget -{ - Q_OBJECT - - -public: - HierarchyView( TQWidget *parent ); - ~HierarchyView(); - - void setFormWindow( FormWindow *fw, TQObject *o ); - FormWindow *formWindow() const; - SourceEditor *sourceEditor() const { return editor; } - void clear(); - - void showClasses( SourceEditor *se ); - void updateClassBrowsers(); - - void widgetInserted( TQWidget *w ); - void widgetRemoved( TQWidget *w ); - void widgetsInserted( const TQWidgetList &l ); - void widgetsRemoved( const TQWidgetList &l ); - void namePropertyChanged( TQWidget *w, const TQVariant &old ); - void databasePropertyChanged( TQWidget *w, const TQStringList& info ); - void tabsChanged( TQTabWidget *w ); - void pagesChanged( TQWizard *w ); - void rebuild(); - void closed( FormWindow *fw ); - void updateFormDefinitionView(); - - FormDefinitionView *formDefinitionView() const { return fView; } - HierarchyList *hierarchyList() const { return listview; } - -protected slots: - void jumpTo( const TQString &func, const TQString &clss,int type ); - void showClassesTimeout(); - -protected: - void closeEvent( TQCloseEvent *e ); - -signals: - void hidden(); - -private: - struct ClassBrowser - { - ClassBrowser( TQListView * = 0, ClassBrowserInterface * = 0 ); - ~ClassBrowser(); - TQListView *lv; - TQInterfacePtr iface; - - TQ_DUMMY_COMPARISON_OPERATOR( ClassBrowser ) - }; - FormWindow *formwindow; - HierarchyList *listview; - FormDefinitionView *fView; - SourceEditor *editor; - TQMap *classBrowsers; - TQGuardedPtr lastSourceEditor; - -}; - - -#endif diff --git a/tdevdesigner/designer/iconvieweditor.ui b/tdevdesigner/designer/iconvieweditor.ui deleted file mode 100644 index 8711bd6b..00000000 --- a/tdevdesigner/designer/iconvieweditor.ui +++ /dev/null @@ -1,461 +0,0 @@ - -IconViewEditorBase -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - IconViewEditorBase - - - - 0 - 0 - 567 - 321 - - - - Edit Iconview - - - true - - - <b>Edit Iconview</b><p>Add, edit or delete items in the icon view.</p><p>Click the <b>New Item</b>-button to create a new item, then enter text and choose a pixmap.</p><p>Select an item from the view and click the <b>Delete Item</b>-button to remove the item from the iconview.</p> - - - - unnamed - - - 11 - - - 6 - - - - Layout6 - - - - unnamed - - - 0 - - - 6 - - - - preview - - - All items in the iconview. - - - - - Layout5 - - - - unnamed - - - 0 - - - 6 - - - - itemNew - - - &New Item - - - Add an item - - - Create a new item for the iconview. - - - - - itemDelete - - - &Delete Item - - - Delete item - - - Delete the selected item. - - - - - Vertical Spacing1 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - - - GroupBox1 - - - - 0 - 5 - 0 - 0 - - - - &Item Properties - - - - unnamed - - - 11 - - - 6 - - - - Label1 - - - &Text: - - - itemText - - - - - itemText - - - - 0 - 0 - - - - Change text - - - Change the text for the selected item. - - - - - Label2 - - - &Pixmap: - - - itemChoosePixmap - - - - - Layout4 - - - - unnamed - - - 0 - - - 6 - - - - itemPixmap - - - Label4 - - - - - itemDeletePixmap - - - - 30 - 22 - - - - - - - "designer_s_editcut.png" - - - Delete Pixmap - - - Delete the selected item's pixmap. - - - - - itemChoosePixmap - - - - 30 - 22 - - - - ... - - - Select a Pixmap - - - Select a pixmap file for the current item. - - - - - - - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - buttonHelp - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - Close the dialog and apply all the changes. - - - - - buttonApply - - - &Apply - - - true - - - Apply all changes. - - - - - buttonCancel - - - &Cancel - - - true - - - Close the dialog and discard any changes. - - - - - - - - - itemNew - clicked() - IconViewEditorBase - insertNewItem() - - - itemDelete - clicked() - IconViewEditorBase - deleteCurrentItem() - - - itemText - textChanged( const TQString & ) - IconViewEditorBase - currentTextChanged(const TQString&) - - - buttonOk - clicked() - IconViewEditorBase - okClicked() - - - buttonApply - clicked() - IconViewEditorBase - applyClicked() - - - buttonCancel - clicked() - IconViewEditorBase - cancelClicked() - - - itemChoosePixmap - clicked() - IconViewEditorBase - choosePixmap() - - - preview - selectionChanged(TQIconViewItem*) - IconViewEditorBase - currentItemChanged(TQIconViewItem*) - - - preview - currentChanged(TQIconViewItem*) - IconViewEditorBase - currentItemChanged(TQIconViewItem*) - - - itemDeletePixmap - clicked() - IconViewEditorBase - deletePixmap() - - - - buttonOk - buttonCancel - preview - itemNew - itemDelete - itemText - itemDeletePixmap - itemChoosePixmap - buttonHelp - buttonApply - - - init() - destroy() - applyClicked() - cancelClicked() - choosePixmap() - currentItemChanged( TQIconViewItem * ) - currentTextChanged( const TQString & ) - deleteCurrentItem() - insertNewItem() - deletePixmap() - okClicked() - - - myiconloader.h - -BarIcon2 - - - diff --git a/tdevdesigner/designer/iconvieweditorimpl.cpp b/tdevdesigner/designer/iconvieweditorimpl.cpp deleted file mode 100644 index 32a81412..00000000 --- a/tdevdesigner/designer/iconvieweditorimpl.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "iconvieweditorimpl.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "pixmapchooser.h" - -#include -#include -#include -#include -#include - -#include - -IconViewEditor::IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) - : IconViewEditorBase( parent, 0, TRUE ), formwindow( fw ) -{ - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - iconview = (TQIconView*)editWidget; - - itemText->setText( "" ); - itemText->setEnabled( FALSE ); - itemPixmap->setText( "" ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); - - TQIconViewItem *i = 0; - for ( i = iconview->firstItem(); i; i = i->nextItem() ) { - (void)new TQIconViewItem( preview, i->text(), *i->pixmap() ); - } - - if ( preview->firstItem() ) - preview->setCurrentItem( preview->firstItem() ); -} - -void IconViewEditor::insertNewItem() -{ - TQIconViewItem *i = new TQIconViewItem( preview, i18n( "New Item" ) ); - preview->setCurrentItem( i ); - preview->setSelected( i, TRUE ); - itemText->setFocus(); - itemText->selectAll(); -} - -void IconViewEditor::deleteCurrentItem() -{ - delete preview->currentItem(); - if ( preview->currentItem() ) - preview->setSelected( preview->currentItem(), TRUE ); -} - -void IconViewEditor::currentItemChanged( TQIconViewItem *i ) -{ - itemText->blockSignals( TRUE ); - itemText->setText( "" ); - itemPixmap->setText( "" ); - itemText->blockSignals( FALSE ); - - if ( !i ) { - itemText->setEnabled( FALSE ); - itemChoosePixmap->setEnabled( FALSE ); - return; - } - - itemText->blockSignals( TRUE ); - itemText->setEnabled( TRUE ); - itemChoosePixmap->setEnabled( TRUE ); - itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() ); - - itemText->setText( i->text() ); - if ( i->pixmap() ) - itemPixmap->setPixmap( *i->pixmap() ); - itemText->blockSignals( FALSE ); -} - -void IconViewEditor::currentTextChanged( const TQString &txt ) -{ - if ( !preview->currentItem() ) - return; - - preview->currentItem()->setText( txt ); -} - -void IconViewEditor::okClicked() -{ - applyClicked(); - accept(); -} - -void IconViewEditor::cancelClicked() -{ - reject(); -} - -void IconViewEditor::applyClicked() -{ - TQIconViewItem *i = 0; - TQValueList items; - for ( i = preview->firstItem(); i; i = i->nextItem() ) { - PopulateIconViewCommand::Item item; - if ( i->pixmap() ) - item.pix = *i->pixmap(); - item.text = i->text(); - items.append( item ); - } - - PopulateIconViewCommand *cmd = new PopulateIconViewCommand( i18n( "Edit the Items of '%1'" ).arg( iconview->name() ), - formwindow, iconview, items ); - cmd->execute(); - formwindow->commandHistory()->addCommand( cmd ); -} - -void IconViewEditor::choosePixmap() -{ - if ( !preview->currentItem() ) - return; - - TQPixmap pix; - if ( preview->currentItem()->pixmap() ) - pix = qChoosePixmap( this, formwindow, *preview->currentItem()->pixmap() ); - else - pix = qChoosePixmap( this, formwindow, TQPixmap() ); - - if ( pix.isNull() ) - return; - - preview->currentItem()->setPixmap( pix ); - itemPixmap->setPixmap( pix ); - itemDeletePixmap->setEnabled( TRUE ); -} - -void IconViewEditor::deletePixmap() -{ - if ( !preview->currentItem() ) - return; - - preview->currentItem()->setPixmap( TQPixmap() ); - itemPixmap->setText( "" ); - itemDeletePixmap->setEnabled( FALSE ); -} diff --git a/tdevdesigner/designer/iconvieweditorimpl.h b/tdevdesigner/designer/iconvieweditorimpl.h deleted file mode 100644 index 969c9cf4..00000000 --- a/tdevdesigner/designer/iconvieweditorimpl.h +++ /dev/null @@ -1,59 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef ICONVIEWEDITORIMPL_H -#define ICONVIEWEDITORIMPL_H - -#include "iconvieweditor.h" - -class FormWindow; - -class IconViewEditor : public IconViewEditorBase -{ - Q_OBJECT - - -public: - IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ); - -protected slots: - void insertNewItem(); - void deleteCurrentItem(); - void currentItemChanged( TQIconViewItem * ); - void currentTextChanged( const TQString & ); - void okClicked(); - void cancelClicked(); - void applyClicked(); - void choosePixmap(); - void deletePixmap(); - -private: - TQIconView *iconview; - FormWindow *formwindow; - -}; - -#endif diff --git a/tdevdesigner/designer/layout.cpp b/tdevdesigner/designer/layout.cpp deleted file mode 100644 index b8fb737c..00000000 --- a/tdevdesigner/designer/layout.cpp +++ /dev/null @@ -1,1017 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "formwindow.h" -#include "tqlayout.h" -#include -#include "widgetfactory.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -bool operator<( const TQGuardedPtr &p1, const TQGuardedPtr &p2 ) -{ - return p1.operator->() < p2.operator->(); -} - -/*! - \class Layout tqlayout.h - \brief Baseclass for layouting widgets in the Designer - - Classes derived from this abstract base class are used for layouting - operations in the Designer. - -*/ - -/*! \a p specifies the parent of the layoutBase \a lb. The parent - might be changed in setup(). If the layoutBase is a - container, the parent and the layoutBase are the same. Also they - always have to be a widget known to the designer (e.g. in the case - of the tabwidget parent and layoutBase are the tabwidget and not the - page which actually gets laid out. For actual usage the correct - widget is found later by Layout.) - */ - -Layout::Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter ) - : widgets( wl ), parent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter ) -{ - widgets.setAutoDelete( FALSE ); - layoutBase = lb; - if ( !doSetup && layoutBase ) - oldGeometry = layoutBase->geometry(); -} - -/*! The widget list we got in the constructor might contain too much - widgets (like widgets with different parents, already laid out - widgets, etc.). Here we set up the list and so the only the "best" - widgets get laid out. -*/ - -void Layout::setup() -{ - startPoint = TQPoint( 32767, 32767 ); - TQValueList lists; - TQWidget *lastParent = 0; - TQWidgetList *lastList = 0; - TQWidget *w = 0; - - // Go through all widgets of the list we got. As we can only - // layout widgets which have the same parent, we first do some - // sorting which means create a list for each parent containing - // its child here. After that we keep working on the list of - // childs which has the most entries. - // Widgets which are already laid out are thrown away here too - for ( w = widgets.first(); w; w = widgets.next() ) { - if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) - continue; - if ( lastParent != w->parentWidget() ) { - lastList = 0; - lastParent = w->parentWidget(); - TQValueList::Iterator it = lists.begin(); - for ( ; it != lists.end(); ++it ) { - if ( ( *it ).first()->parentWidget() == w->parentWidget() ) - lastList = &( *it ); - } - if ( !lastList ) { - TQWidgetList l; - l.setAutoDelete( FALSE ); - lists.append( l ); - lastList = &lists.last(); - } - } - lastList->append( w ); - } - - // So, now find the list with the most entries - lastList = 0; - TQValueList::Iterator it = lists.begin(); - for ( ; it != lists.end(); ++it ) { - if ( !lastList || ( *it ).count() > lastList->count() ) - lastList = &( *it ); - } - - // If we found no list (because no widget did fit at all) or the - // best list has only one entry and we do not layout a container, - // we leave here. - if ( !lastList || ( lastList->count() < 2 && - ( !layoutBase || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && - layoutBase != formWindow->mainContainer() ) ) - ) ) { - widgets.clear(); - startPoint = TQPoint( 0, 0 ); - return; - } - - // Now we have a new and clean widget list, which makes sense - // to layout - widgets = *lastList; - // Also use the only correct parent later, so store it - parent = WidgetFactory::widgetOfContainer( widgets.first()->parentWidget() ); - // Now calculate the position where the layout-meta-widget should - // be placed and connect to widgetDestroyed() signals of the - // widgets to get informed if one gets deleted to be able to - // handle that and do not crash in this case - for ( w = widgets.first(); w; w = widgets.next() ) { - connect( w, TQT_SIGNAL( destroyed() ), - this, TQT_SLOT( widgetDestroyed() ) ); - startPoint = TQPoint( TQMIN( startPoint.x(), w->x() ), - TQMIN( startPoint.y(), w->y() ) ); - geometries.insert( w, TQRect( w->pos(), w->size() ) ); - // Change the Z-order, as saving/loading uses the Z-order for - // writing/creating widgets and this has to be the same as in - // the layout. Else saving + loading will give different results - w->raise(); - } -} - -void Layout::widgetDestroyed() -{ - if ( sender() && sender()->isWidgetType() ) - widgets.removeRef( (TQWidget*)sender() ); -} - -bool Layout::prepareLayout( bool &needMove, bool &needReparent ) -{ - if ( !widgets.count() ) - return FALSE; - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) - w->raise(); - needMove = !layoutBase; - needReparent = needMove || ::tqqt_cast(layoutBase) || ::tqqt_cast(layoutBase); - if ( !layoutBase ) { - if ( !useSplitter ) - layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ), - WidgetFactory::containerOfWidget( parent ) ); - else - layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ), - WidgetFactory::containerOfWidget( parent ) ); - } else { - WidgetFactory::deleteLayout( layoutBase ); - } - - return TRUE; -} - -void Layout::finishLayout( bool needMove, TQLayout *layout ) -{ - if ( needMove ) - layoutBase->move( startPoint ); - TQRect g( TQRect( layoutBase->pos(), layoutBase->size() ) ); - if ( WidgetFactory::layoutType( layoutBase->parentWidget() ) == WidgetFactory::NoLayout && !isBreak ) - layoutBase->adjustSize(); - else if ( isBreak ) - layoutBase->setGeometry( oldGeometry ); - oldGeometry = g; - layoutBase->show(); - layout->activate(); - formWindow->insertWidget( layoutBase ); - formWindow->selectWidget( TQT_TQOBJECT(layoutBase) ); - TQString n = layoutBase->name(); - if ( n.find( "qt_dead_widget_" ) != -1 ) { - n.remove( 0, TQString( "qt_dead_widget_" ).length() ); - layoutBase->setName( n ); - } -} - -void Layout::undoLayout() -{ - if ( !widgets.count() ) - return; - TQMap, TQRect>::Iterator it = geometries.begin(); - for ( ; it != geometries.end(); ++it ) { - if ( !it.key() ) - continue; - it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) ); - it.key()->resize( ( *it ).size() ); - } - formWindow->selectWidget( TQT_TQOBJECT(layoutBase), FALSE ); - WidgetFactory::deleteLayout( layoutBase ); - if ( parent != layoutBase && !::tqqt_cast(layoutBase) ) { - layoutBase->hide(); - TQString n = layoutBase->name(); - n.prepend( "qt_dead_widget_" ); - layoutBase->setName( n ); - } else { - layoutBase->setGeometry( oldGeometry ); - } - if ( widgets.first() ) - formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); - else - formWindow->selectWidget( TQT_TQOBJECT(formWindow) ); -} - -void Layout::breakLayout() -{ - TQMap rects; - if ( !widgets.isEmpty() ) { - TQWidget *w; - for ( w = widgets.first(); w; w = widgets.next() ) - rects.insert( w, w->geometry() ); - } - WidgetFactory::deleteLayout( layoutBase ); - bool needReparent = qstrcmp( layoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 || - qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && - layoutBase != formWindow->mainContainer() ); - bool needResize = qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0; - bool add = geometries.isEmpty(); - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( needReparent ) - w->reparent( layoutBase->parentWidget(), 0, - layoutBase->pos() + w->pos(), TRUE ); - if ( needResize ) { - TQMap::Iterator it = rects.find( w ); - if ( it != rects.end() ) - w->setGeometry( TQRect( layoutBase->pos() + (*it).topLeft(), (*it).size() ) ); - } - if ( add ) - geometries.insert( w, TQRect( w->pos(), w->size() ) ); - } - if ( needReparent ) { - layoutBase->hide(); - parent = layoutBase->parentWidget(); - TQString n = layoutBase->name(); - n.prepend( "qt_dead_widget_" ); - layoutBase->setName( n ); - } else { - parent = layoutBase; - } - if ( widgets.first() && widgets.first()->isVisibleTo( formWindow ) ) - formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); - else - formWindow->selectWidget( TQT_TQOBJECT(formWindow) ); -} - -class HorizontalLayoutList : public TQWidgetList -{ -public: - HorizontalLayoutList( const TQWidgetList &l ) - : TQWidgetList( l ) {} - - int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) { - TQWidget *w1 = (TQWidget*)item1; - TQWidget *w2 = (TQWidget*)item2; - if ( w1->x() == w2->x() ) - return 0; - if ( w1->x() > w2->x() ) - return 1; - return -1; - } - -}; - -HorizontalLayout::HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter ) - : Layout( wl, p, fw, lb, doSetup, splitter ) -{ - if ( doSetup ) - setup(); -} - -void HorizontalLayout::setup() -{ - HorizontalLayoutList l( widgets ); - l.sort(); - widgets = l; - Layout::setup(); -} - -void HorizontalLayout::doLayout() -{ - bool needMove, needReparent; - if ( !prepareLayout( needMove, needReparent ) ) - return; - - TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox ); - - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) - w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); - if ( !useSplitter ) { - if ( qstrcmp( w->className(), "Spacer" ) == 0 ) - layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); - else - layout->addWidget( w ); - if ( ::tqqt_cast(w) ) - ( (TQLayoutWidget*)w )->updateSizePolicy(); - } - w->show(); - } - - if ( ::tqqt_cast(layoutBase) ) - ( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal ); - - finishLayout( needMove, layout ); -} - - - - -class VerticalLayoutList : public TQWidgetList -{ -public: - VerticalLayoutList( const TQWidgetList &l ) - : TQWidgetList( l ) {} - - int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) { - TQWidget *w1 = (TQWidget*)item1; - TQWidget *w2 = (TQWidget*)item2; - if ( w1->y() == w2->y() ) - return 0; - if ( w1->y() > w2->y() ) - return 1; - return -1; - } - -}; - -VerticalLayout::VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter ) - : Layout( wl, p, fw, lb, doSetup, splitter ) -{ - if ( doSetup ) - setup(); -} - -void VerticalLayout::setup() -{ - VerticalLayoutList l( widgets ); - l.sort(); - widgets = l; - Layout::setup(); -} - -void VerticalLayout::doLayout() -{ - bool needMove, needReparent; - if ( !prepareLayout( needMove, needReparent ) ) - return; - - TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox ); - - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) - w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); - if ( !useSplitter ) { - if ( qstrcmp( w->className(), "Spacer" ) == 0 ) - layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); - else - layout->addWidget( w ); - if ( ::tqqt_cast(w) ) - ( (TQLayoutWidget*)w )->updateSizePolicy(); - } - w->show(); - } - - if ( ::tqqt_cast(layoutBase) ) - ( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical ); - - finishLayout( needMove, layout ); -} - - - - - -class Grid -{ -public: - Grid( int rows, int cols ); - ~Grid(); - - TQWidget* cell( int row, int col ) const { return cells[ row * ncols + col]; } - void setCell( int row, int col, TQWidget* w ) { cells[ row*ncols + col] = w; } - void setCells( TQRect c, TQWidget* w ) { - for ( int rows = c.bottom()-c.top(); rows >= 0; rows--) - for ( int cols = c.right()-c.left(); cols >= 0; cols--) { - setCell(c.top()+rows, c.left()+cols, w); - } - } - int numRows() const { return nrows; } - int numCols() const { return ncols; } - - void simplify(); - bool locateWidget( TQWidget* w, int& row, int& col, int& rowspan, int& colspan ); - -private: - void merge(); - int countRow( int r, int c ) const; - int countCol( int r, int c ) const; - void setRow( int r, int c, TQWidget* w, int count ); - void setCol( int r, int c, TQWidget* w, int count ); - bool isWidgetStartCol( int c ) const; - bool isWidgetEndCol( int c ) const; - bool isWidgetStartRow( int r ) const; - bool isWidgetEndRow( int r ) const; - bool isWidgetTopLeft( int r, int c ) const; - void extendLeft(); - void extendRight(); - void extendUp(); - void extendDown(); - TQWidget** cells; - bool* cols; - bool* rows; - int nrows, ncols; - -}; - -Grid::Grid( int r, int c ) - : nrows( r ), ncols( c ) -{ - cells = new TQWidget*[ r * c ]; - memset( cells, 0, sizeof( cells ) * r * c ); - rows = new bool[ r ]; - cols = new bool[ c ]; - -} - -Grid::~Grid() -{ - delete [] cells; - delete [] cols; - delete [] rows; -} - -int Grid::countRow( int r, int c ) const -{ - TQWidget* w = cell( r, c ); - int i = c + 1; - while ( i < ncols && cell( r, i ) == w ) - i++; - return i - c; -} - -int Grid::countCol( int r, int c ) const -{ - TQWidget* w = cell( r, c ); - int i = r + 1; - while ( i < nrows && cell( i, c ) == w ) - i++; - return i - r; -} - -void Grid::setCol( int r, int c, TQWidget* w, int count ) -{ - for (int i = 0; i < count; i++ ) - setCell( r + i, c, w ); -} - -void Grid::setRow( int r, int c, TQWidget* w, int count ) -{ - for (int i = 0; i < count; i++ ) - setCell( r, c + i, w ); -} - -bool Grid::isWidgetStartCol( int c ) const -{ - int r; - for ( r = 0; r < nrows; r++ ) { - if ( cell( r, c ) && ( (c==0) || (cell( r, c) != cell( r, c-1) )) ) { - return TRUE; - } - } - return FALSE; -} - -bool Grid::isWidgetEndCol( int c ) const -{ - int r; - for ( r = 0; r < nrows; r++ ) { - if ( cell( r, c ) && ((c == ncols-1) || (cell( r, c) != cell( r, c+1) )) ) - return TRUE; - } - return FALSE; -} - -bool Grid::isWidgetStartRow( int r ) const -{ - int c; - for ( c = 0; c < ncols; c++ ) { - if ( cell( r, c ) && ( (r==0) || (cell( r, c) != cell( r-1, c) )) ) - return TRUE; - } - return FALSE; -} - -bool Grid::isWidgetEndRow( int r ) const -{ - int c; - for ( c = 0; c < ncols; c++ ) { - if ( cell( r, c ) && ((r == nrows-1) || (cell( r, c) != cell( r+1, c) )) ) - return TRUE; - } - return FALSE; -} - - -bool Grid::isWidgetTopLeft( int r, int c ) const -{ - TQWidget* w = cell( r, c ); - if ( !w ) - return FALSE; - return ( !r || cell( r-1, c) != w ) && (!c || cell( r, c-1) != w); -} - -void Grid::extendLeft() -{ - int r,c,i; - for ( c = 1; c < ncols; c++ ) { - for ( r = 0; r < nrows; r++ ) { - TQWidget* w = cell( r, c ); - if ( !w ) - continue; - int cc = countCol( r, c); - int stretch = 0; - for ( i = c-1; i >= 0; i-- ) { - if ( cell( r, i ) ) - break; - if ( countCol( r, i ) < cc ) - break; - if ( isWidgetEndCol( i ) ) - break; - if ( isWidgetStartCol( i ) ) { - stretch = c - i; - break; - } - } - if ( stretch ) { - for ( i = 0; i < stretch; i++ ) - setCol( r, c-i-1, w, cc ); - } - } - } -} - - -void Grid::extendRight() -{ - int r,c,i; - for ( c = ncols - 2; c >= 0; c-- ) { - for ( r = 0; r < nrows; r++ ) { - TQWidget* w = cell( r, c ); - if ( !w ) - continue; - int cc = countCol( r, c); - int stretch = 0; - for ( i = c+1; i < ncols; i++ ) { - if ( cell( r, i ) ) - break; - if ( countCol( r, i ) < cc ) - break; - if ( isWidgetStartCol( i ) ) - break; - if ( isWidgetEndCol( i ) ) { - stretch = i - c; - break; - } - } - if ( stretch ) { - for ( i = 0; i < stretch; i++ ) - setCol( r, c+i+1, w, cc ); - } - } - } - -} - -void Grid::extendUp() -{ - int r,c,i; - for ( r = 1; r < nrows; r++ ) { - for ( c = 0; c < ncols; c++ ) { - TQWidget* w = cell( r, c ); - if ( !w ) - continue; - int cr = countRow( r, c); - int stretch = 0; - for ( i = r-1; i >= 0; i-- ) { - if ( cell( i, c ) ) - break; - if ( countRow( i, c ) < cr ) - break; - if ( isWidgetEndRow( i ) ) - break; - if ( isWidgetStartRow( i ) ) { - stretch = r - i; - break; - } - } - if ( stretch ) { - for ( i = 0; i < stretch; i++ ) - setRow( r-i-1, c, w, cr ); - } - } - } -} - -void Grid::extendDown() -{ - int r,c,i; - for ( r = nrows - 2; r >= 0; r-- ) { - for ( c = 0; c < ncols; c++ ) { - TQWidget* w = cell( r, c ); - if ( !w ) - continue; - int cr = countRow( r, c); - int stretch = 0; - for ( i = r+1; i < nrows; i++ ) { - if ( cell( i, c ) ) - break; - if ( countRow( i, c ) < cr ) - break; - if ( isWidgetStartRow( i ) ) - break; - if ( isWidgetEndRow( i ) ) { - stretch = i - r; - break; - } - } - if ( stretch ) { - for ( i = 0; i < stretch; i++ ) - setRow( r+i+1, c, w, cr ); - } - } - } - -} - -void Grid::simplify() -{ - extendLeft(); - extendRight(); - extendUp(); - extendDown(); - merge(); -} - - -void Grid::merge() -{ - int r,c; - for ( c = 0; c < ncols; c++ ) - cols[c] = FALSE; - - for ( r = 0; r < nrows; r++ ) - rows[r] = FALSE; - - for ( c = 0; c < ncols; c++ ) { - for ( r = 0; r < nrows; r++ ) { - if ( isWidgetTopLeft( r, c ) ) { - rows[r] = TRUE; - cols[c] = TRUE; - } - } - } -} - -bool Grid::locateWidget( TQWidget* w, int& row, int& col, int& rowspan, int & colspan ) -{ - int r,c, r2, c2; - for ( c = 0; c < ncols; c++ ) { - for ( r = 0; r < nrows; r++ ) { - if ( cell( r, c ) == w ) { - row = 0; - for ( r2 = 1; r2 <= r; r2++ ) { - if ( rows[ r2-1 ] ) - row++; - } - col = 0; - for ( c2 = 1; c2 <= c; c2++ ) { - if ( cols[ c2-1 ] ) - col++; - } - rowspan = 0; - for ( r2 = r ; r2 < nrows && cell( r2, c) == w; r2++ ) { - if ( rows[ r2 ] ) - rowspan++; - } - colspan = 0; - for ( c2 = c; c2 < ncols && cell( r, c2) == w; c2++ ) { - if ( cols[ c2] ) - colspan++; - } - return TRUE; - } - } - } - return FALSE; -} - - - - -GridLayout::GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup ) - : Layout( wl, p, fw, lb, doSetup ), resolution( res ) -{ - grid = 0; - if ( doSetup ) - setup(); -} - -GridLayout::~GridLayout() -{ - delete grid; -} - -void GridLayout::doLayout() -{ - bool needMove, needReparent; - if ( !prepareLayout( needMove, needReparent ) ) - return; - - QDesignerGridLayout *layout = (QDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid ); - - if ( !grid ) - buildGrid(); - - TQWidget* w; - int r, c, rs, cs; - for ( w = widgets.first(); w; w = widgets.next() ) { - if ( grid->locateWidget( w, r, c, rs, cs) ) { - if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) - w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); - if ( rs * cs == 1 ) { - layout->addWidget( w, r, c, ::tqqt_cast(w) ? ( (Spacer*)w )->alignment() : 0 ); - } else { - layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::tqqt_cast(w) ? ( (Spacer*)w )->alignment() : 0 ); - } - if ( ::tqqt_cast(w) ) - ( (TQLayoutWidget*)w )->updateSizePolicy(); - w->show(); - } else { - tqWarning("ooops, widget '%s' does not fit in layout", w->name() ); - } - } - finishLayout( needMove, layout ); -} - -void GridLayout::setup() -{ - Layout::setup(); - buildGrid(); -} - -void GridLayout::buildGrid() -{ - if ( !widgets.count() ) - return; - - // Pixel to cell conversion: - // By keeping a list of start'n'stop values (x & y) for each widget, - // it is possible to create a very small grid of cells to represent - // the widget layout. - // ----------------------------------------------------------------- - - // We need a list of both start and stop values for x- & y-axis - TQValueVector x( widgets.count()*2 ); - TQValueVector y( widgets.count()*2 ); - - // Using push_back would look nicer, but operator[] is much faster - int index = 0; - TQWidget* w = 0; - for ( w = widgets.first(); w; w = widgets.next() ) { - TQRect widgetPos = w->geometry(); - x[index] = widgetPos.left(); - x[index+1] = widgetPos.right(); - y[index] = widgetPos.top(); - y[index+1] = widgetPos.bottom(); - index += 2; - } - - qHeapSort(x); - qHeapSort(y); - - // Remove duplicate x enteries (Remove next, if equal to current) - if ( !x.empty() ) { - for (TQValueVector::iterator current = x.begin() ; - (current != x.end()) && ((current+1) != x.end()) ; ) - if ( (*current == *(current+1)) ) - x.erase(current+1); - else - current++; - } - - // Remove duplicate y enteries (Remove next, if equal to current) - if ( !y.empty() ) { - for (TQValueVector::iterator current = y.begin() ; - (current != y.end()) && ((current+1) != y.end()) ; ) - if ( (*current == *(current+1)) ) - y.erase(current+1); - else - current++; - } - - // Create the smallest grid possible to represent the current layout - // Since no widget will be placed in the last row and column, we'll - // skip them to increase speed even further - delete grid; - grid = new Grid( y.size()-1, x.size()-1 ); - - // Mark the cells in the grid that contains a widget - for ( w = widgets.first(); w; w = widgets.next() ) { - TQRect c(0,0,0,0), widgetPos = w->geometry(); - // From left til right (not including) - for (uint cw=0; cwsetCells(c, w); // Mark cellblock - } - grid->simplify(); -} - - - - - - - -Spacer::Spacer( TQWidget *parent, const char *name ) - : TQWidget( parent, name, WMouseNoMask ), - orient(Qt::Vertical ), interactive(TRUE), sh( TQSize(20,20) ) -{ - setSizeType( Expanding ); - setAutoMask( TRUE ); -} - -void Spacer::paintEvent( TQPaintEvent * ) -{ - TQPainter p( this ); - p.setPen( TQt::blue ); - - if ( orient ==Qt::Horizontal ) { - const int dist = 3; - const int amplitude = TQMIN( 3, height() / 3 ); - const int base = height() / 2; - int i = 0; - p.setPen( white ); - for ( i = 0; i < width() / 3 +2; ++i ) - p.drawLine( i * dist, base - amplitude, i * dist + dist / 2, base + amplitude ); - p.setPen( blue ); - for ( i = 0; i < width() / 3 +2; ++i ) - p.drawLine( i * dist + dist / 2, base + amplitude, i * dist + dist, base - amplitude ); - p.drawLine( 0, 0, 0, height() ); - p.drawLine( width() - 1, 0, width() - 1, height()); - } else { - const int dist = 3; - const int amplitude = TQMIN( 3, width() / 3 ); - const int base = width() / 2; - int i = 0; - p.setPen( white ); - for ( i = 0; i < height() / 3 +2; ++i ) - p.drawLine( base - amplitude, i * dist, base + amplitude,i * dist + dist / 2 ); - p.setPen( blue ); - for ( i = 0; i < height() / 3 +2; ++i ) - p.drawLine( base + amplitude, i * dist + dist / 2, base - amplitude, i * dist + dist ); - p.drawLine( 0, 0, width(), 0 ); - p.drawLine( 0, height() - 1, width(), height() - 1 ); - } -} - -void Spacer::resizeEvent( TQResizeEvent* e) -{ - TQWidget::resizeEvent( e ); - if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) - sh = size(); -} - -void Spacer::updateMask() -{ - TQRegion r( rect() ); - if ( orient ==Qt::Horizontal ) { - const int amplitude = TQMIN( 3, height() / 3 ); - const int base = height() / 2; - r = r.subtract( TQRect(1, 0, width() - 2, base - amplitude ) ); - r = r.subtract( TQRect(1, base + amplitude, width() - 2, height() - base - amplitude ) ); - } else { - const int amplitude = TQMIN( 3, width() / 3 ); - const int base = width() / 2; - r = r.subtract( TQRect(0, 1, base - amplitude, height() - 2 ) ); - r = r.subtract( TQRect( base + amplitude, 1, width() - base - amplitude, height() - 2 ) ); - } - setMask( r ); -} - -void Spacer::setSizeType( SizeType t ) -{ - TQSizePolicy sizeP; - if ( orient ==Qt::Vertical ) - sizeP = TQSizePolicy( TQSizePolicy::Minimum, (TQSizePolicy::SizeType)t ); - else - sizeP = TQSizePolicy( (TQSizePolicy::SizeType)t, TQSizePolicy::Minimum ); - setSizePolicy( sizeP ); -} - - -Spacer::SizeType Spacer::sizeType() const -{ - if ( orient ==Qt::Vertical ) - return (SizeType)sizePolicy().verData(); - return (SizeType)sizePolicy().horData(); -} - -int Spacer::alignment() const -{ - if ( orient ==Qt::Vertical ) - return AlignHCenter; - return AlignVCenter; -} - -TQSize Spacer::minimumSize() const -{ - TQSize s = TQSize( 20,20 ); - if ( sizeType() == Expanding ) - if ( orient ==Qt::Vertical ) - s.rheight() = 0; - else - s.rwidth() = 0; - return s; -} - -TQSize Spacer::sizeHint() const -{ - return sh; -} - - -void Spacer::setSizeHint( const TQSize &s ) -{ - sh = s; - if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) - resize( sizeHint() ); - updateGeometry(); -} - -Qt::Orientation Spacer::orientation() const -{ - return orient; -} - -void Spacer::setOrientation( Qt::Orientation o ) -{ - if ( orient == o ) - return; - - SizeType st = sizeType(); - orient = o; - setSizeType( st ); - if ( interactive ) { - sh = TQSize( sh.height(), sh.width() ); - if (!parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) - resize( height(), width() ); - } - updateMask(); - update(); - updateGeometry(); -} - - -void QDesignerGridLayout::addWidget( TQWidget *w, int row, int col, int align_ ) -{ - items.insert( w, Item(row, col, 1, 1) ); - TQGridLayout::addWidget( w, row, col, align_ ); -} - -void QDesignerGridLayout::addMultiCellWidget( TQWidget *w, int fromRow, int toRow, - int fromCol, int toCol, int align_ ) -{ - items.insert( w, Item(fromRow, fromCol, toRow - fromRow + 1, toCol - fromCol +1) ); - TQGridLayout::addMultiCellWidget( w, fromRow, toRow, fromCol, toCol, align_ ); -} diff --git a/tdevdesigner/designer/layout.h b/tdevdesigner/designer/layout.h deleted file mode 100644 index d1ea776e..00000000 --- a/tdevdesigner/designer/layout.h +++ /dev/null @@ -1,191 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef LAYOUT_H -#define LAYOUT_H - -#include -#include -#include -#include -#include -#include -#include - -class FormWindow; -class TQPaintEvent; - -class Layout : public TQObject -{ - Q_OBJECT - - -public: - Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); - virtual ~Layout() {} - - virtual void doLayout() = 0; - virtual void undoLayout(); - virtual void breakLayout(); - virtual bool prepareLayout( bool &needMove, bool &needReparent ); - virtual void finishLayout( bool needMove, TQLayout *layout ); - -protected: - TQWidgetList widgets; - TQWidget *parent; - TQPoint startPoint; - TQMap, TQRect> geometries; - TQWidget *layoutBase; - FormWindow *formWindow; - TQRect oldGeometry; - bool isBreak; - bool useSplitter; - -protected: - virtual void setup(); - -protected slots: - void widgetDestroyed(); - -}; - -class HorizontalLayout : public Layout -{ -public: - HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); - - void doLayout(); - -protected: - void setup(); - -}; - -class VerticalLayout : public Layout -{ -public: - VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); - - void doLayout(); - -protected: - void setup(); - -}; - -class Grid; - -class GridLayout : public Layout -{ -public: - GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup = TRUE ); - ~GridLayout(); - - void doLayout(); - -protected: - void setup(); - -protected: - void buildGrid(); - TQSize resolution; - Grid* grid; - -}; - -class Spacer : public TQWidget -{ - Q_OBJECT - - - TQ_OVERRIDE( TQCString name ) - TQ_PROPERTY( Orientation orientation READ orientation WRITE setOrientation ) - TQ_ENUMS( SizeType ) - TQ_PROPERTY( SizeType sizeType READ sizeType WRITE setSizeType ) - TQ_PROPERTY( TQSize sizeHint READ sizeHint WRITE setSizeHint DESIGNABLE true STORED true ) - TQ_OVERRIDE( TQRect geometry DESIGNABLE false ) - -private: - enum { HSize = 6, HMask = 0x3f, VMask = HMask << HSize, - MayGrow = 1, ExpMask = 2, MayShrink = 4 }; - -public: - enum SizeType { Fixed = 0, - Minimum = MayGrow, - Maximum = MayShrink, - Preferred = MayGrow|MayShrink , - MinimumExpanding = Minimum|ExpMask, - Expanding = MinimumExpanding|MayShrink }; - - Spacer( TQWidget *parent, const char *name ); - - TQSize minimumSize() const; - TQSize sizeHint() const; - void setSizeType( SizeType t ); - SizeType sizeType() const; - int alignment() const; - Orientation orientation() const; - void setOrientation( Orientation o ); - void setInteraciveMode( bool b ) { interactive = b; }; - void setSizeHint( const TQSize &s ); - -protected: - void paintEvent( TQPaintEvent *e ); - void resizeEvent( TQResizeEvent* e ); - void updateMask(); - Orientation orient; - bool interactive; - TQSize sh; -}; - -class QDesignerGridLayout : public TQGridLayout -{ - Q_OBJECT - -public: - QDesignerGridLayout( TQWidget *parent ) : TQGridLayout( parent ){}; - QDesignerGridLayout( TQLayout *parentLayout ) : TQGridLayout( parentLayout ){}; - - void addWidget( TQWidget *, int row, int col, int align = 0 ); - void addMultiCellWidget( TQWidget *, int fromRow, int toRow, - int fromCol, int toCol, int align = 0 ); - - struct Item - { - Item(): row(0), column(0),rowspan(1),colspan(1){} - Item( int r, int c, int rs, int cs): row(r), column(c), rowspan(rs), colspan(cs){} - int row; - int column; - int rowspan; - int colspan; - TQ_DUMMY_COMPARISON_OPERATOR( Item ) - }; - - TQMap items; -}; - - -#endif diff --git a/tdevdesigner/designer/listboxdnd.cpp b/tdevdesigner/designer/listboxdnd.cpp deleted file mode 100644 index 54498478..00000000 --- a/tdevdesigner/designer/listboxdnd.cpp +++ /dev/null @@ -1,305 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "listboxdnd.h" -#include -#include -#include -#include -#include - -// The Dragobject Declaration --------------------------------------- -class ListBoxItemDrag : public TQStoredDrag -{ -public: - ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = FALSE, TQListBox * parent = 0, const char * name = 0 ); - ~ListBoxItemDrag() {}; - static bool canDecode( TQDragMoveEvent * event ); - static bool decode( TQDropEvent * event, TQListBox * parent, TQListBoxItem * insertPoint ); - enum ItemType { ListBoxText = 1, ListBoxPixmap = 2 }; -}; -// ------------------------------------------------------------------ - -ListBoxDnd::ListBoxDnd( TQListBox * eventSource, const char * name ) - : ListDnd( eventSource, name ) { } - -void ListBoxDnd::confirmDrop( TQListBoxItem * ) -{ - dropConfirmed = TRUE; -} - -bool ListBoxDnd::dropEvent( TQDropEvent * event ) -{ - if ( dragInside ) { - - if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item - event->accept(); - emit dropped( 0 ); // a NullDrop - return TRUE; - } - - TQPoint pos = event->pos(); - TQListBoxItem * after = itemAt( pos ); - - if ( ListBoxItemDrag::decode( event, (TQListBox *) src, after ) ) { - event->accept(); - TQListBox * src = (TQListBox *) this->src; - TQListBoxItem * item = ( after ? after->next() : src->firstItem() ); - src->setCurrentItem( item ); - emit dropped( item ); // ###FIX: Supports only one item! - } - } - - line->hide(); - dragInside = FALSE; - - return TRUE; -} - -bool ListBoxDnd::mouseMoveEvent( TQMouseEvent * event ) -{ - if ( event->state() & Qt::LeftButton ) { - if ( ( event->pos() - mousePressPos ).manhattanLength() > 3 ) { - - ListBoxItemList list; - buildList( list ); - ListBoxItemDrag * dragobject = new ListBoxItemDrag( list, (dMode & Internal), (TQListBox *) src ); - - // Emit signal for all dragged items - TQListBoxItem * i = list.first(); - while ( i ) { - emit dragged( i ); - i = list.next(); - } - - if ( dMode & Move ) { - removeList( list ); // "hide" items - } - - dragobject->dragCopy(); - - if ( dMode & Move ) { - if ( dropConfirmed ) { - // ###FIX: memleak ? in internal mode, only pointers are transfered... - //list.setAutoDelete( TRUE ); - list.clear(); - dropConfirmed = FALSE; - } - insertList( list ); // "show" items - } - } - } - return FALSE; -} - -int ListBoxDnd::buildList( ListBoxItemList & list ) -{ - TQListBoxItem * i = ((TQListBox *)src)->firstItem(); - while ( i ) { - if ( i->isSelected() ) { - ((TQListBox *)src)->setSelected( i, FALSE ); - list.append( i ); - } - i = i->next(); - } - return list.count(); -} - -void ListBoxDnd::insertList( ListBoxItemList & list ) -{ - TQListBoxItem * i = list.first(); - while ( i ) { - ((TQListBox *)src)->insertItem( i, i->prev() ); - i = list.next(); - } -} - -void ListBoxDnd::removeList( ListBoxItemList & list ) -{ - TQListBoxItem * i = list.first(); - while ( i ) { - ((TQListBox *)src)->takeItem( i ); // remove item from TQListBox - i = list.next(); - } -} - -void ListBoxDnd::updateLine( const TQPoint & dragPos ) -{ - TQListBox * src = (TQListBox *) this->src; - TQListBoxItem *item = itemAt( dragPos ); - - int ypos = item ? - ( src->itemRect( item ).bottom() - ( line->height() / 2 ) ) : - ( src->itemRect( ((TQListBox *)src)->firstItem() ).top() ); - - line->resize( src->viewport()->width(), line->height() ); - line->move( 0, ypos ); -} - -TQListBoxItem * ListBoxDnd::itemAt( TQPoint pos ) -{ - TQListBox * src = (TQListBox *) this->src; - TQListBoxItem * result = src->itemAt( pos ); - TQListBoxItem * last = src->item( src->count() - 1 ); - int i = src->index( result ); - - if ( result && ( pos.y() < (src->itemRect(result).top() + src->itemHeight(i)/2) ) ) - result = result->prev(); - else if ( !result && pos.y() > src->itemRect( last ).bottom() ) - result = last; - - return result; -} - -bool ListBoxDnd::canDecode( TQDragEnterEvent * event ) -{ - return ListBoxItemDrag::canDecode( event ); -} - - -// ------------------------------------------------------------------ -// The Dragobject Implementation ------------------------------------ -// ------------------------------------------------------------------ - -ListBoxItemDrag::ListBoxItemDrag( ListBoxItemList & items, bool sendPtr, TQListBox * parent, const char * name ) - : TQStoredDrag( "qt/listboxitem", parent, name ) -{ - // ### FIX! - TQByteArray data( sizeof( TQ_INT32 ) + sizeof( TQListBoxItem ) * items.count() ); - TQDataStream stream( data, IO_WriteOnly ); - - stream << items.count(); - stream << (TQ_UINT8) sendPtr; // just transfer item pointer; omit data - - TQListBoxItem * i = items.first(); - - if ( sendPtr ) { - - while ( i ) { - - stream << (TQ_ULONG) i; //###FIX: demands sizeof(ulong) >= sizeof(void*) - i = items.next(); - - } - - } else { - - while ( i ) { - - TQ_UINT8 b = 0; - - b = (TQ_UINT8) ( i->text() != TQString() ); // does item have text ? - stream << b; - if ( b ) { - stream << i->text(); - } - - b = (TQ_UINT8) ( !!i->pixmap() ); // does item have a pixmap ? - stream << b; - if ( b ) { - stream << ( *i->pixmap() ); - } - - stream << (TQ_UINT8) i->isSelectable(); - - i = items.next(); - } - - } - - setEncodedData( data ); -} - -bool ListBoxItemDrag::canDecode( TQDragMoveEvent * event ) -{ - return event->provides( "qt/listboxitem" ); -} - -bool ListBoxItemDrag::decode( TQDropEvent * event, TQListBox * parent, TQListBoxItem * after ) -{ - TQByteArray data = event->encodedData( "qt/listboxitem" ); - - if ( data.size() ) { - event->accept(); - TQDataStream stream( data, IO_ReadOnly ); - - int count = 0; - stream >> count; - - TQ_UINT8 recievePtr = 0; // data contains just item pointers; no data - stream >> recievePtr; - - TQListBoxItem * item = 0; - - if ( recievePtr ) { - - for( int i = 0; i < count; i++ ) { - - TQ_ULONG p = 0; //###FIX: demands sizeof(ulong) >= sizeof(void*) - stream >> p; - item = (TQListBoxItem *) p; - - parent->insertItem( item, after ); - - } - - } else { - - for ( int i = 0; i < count; i++ ) { - - TQ_UINT8 hasText = 0; - TQString text; - stream >> hasText; - if ( hasText ) { - stream >> text; - } - - TQ_UINT8 hasPixmap = 0; - TQPixmap pixmap; - stream >> hasPixmap; - if ( hasPixmap ) { - stream >> pixmap; - } - - TQ_UINT8 isSelectable = 0; - stream >> isSelectable; - - if ( hasPixmap ) { - item = new TQListBoxPixmap( parent, pixmap, text, after ); - } else { - item = new TQListBoxText( parent, text, after ); - } - - item->setSelectable( isSelectable ); - - } - - } - - return TRUE; - } - return FALSE; -} diff --git a/tdevdesigner/designer/listboxdnd.h b/tdevdesigner/designer/listboxdnd.h deleted file mode 100644 index 5abf792f..00000000 --- a/tdevdesigner/designer/listboxdnd.h +++ /dev/null @@ -1,64 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef LISTBOXDND_H -#define LISTBOXDND_H - -#include -#include -#include "listdnd.h" - -typedef TQPtrList ListBoxItemList; - -class ListBoxDnd : public ListDnd -{ - Q_OBJECT - -public: - // dragModes are enumerated in ListDnd - ListBoxDnd( TQListBox * eventSource, const char * name = 0 ); - -signals: - void dropped( TQListBoxItem * ); - void dragged( TQListBoxItem * ); - -public slots: - void confirmDrop( TQListBoxItem * ); - -protected: - virtual bool dropEvent( TQDropEvent * event ); - virtual bool mouseMoveEvent( TQMouseEvent * event ); - virtual void updateLine( const TQPoint & pos ); - virtual bool canDecode( TQDragEnterEvent * event ); - -private: - TQListBoxItem * itemAt( TQPoint pos ); - int buildList( ListBoxItemList & list ); - void insertList( ListBoxItemList & list ); - void removeList( ListBoxItemList & list ); -}; - -#endif //LISTBOXDND_H diff --git a/tdevdesigner/designer/listboxeditor.ui b/tdevdesigner/designer/listboxeditor.ui deleted file mode 100644 index df584ddf..00000000 --- a/tdevdesigner/designer/listboxeditor.ui +++ /dev/null @@ -1,457 +0,0 @@ - -ListBoxEditorBase -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - ListBoxEditorBase - - - - 0 - 0 - 482 - 229 - - - - Edit Listbox - - - true - - - <b>Edit Listbox</b><p>Add, edit or delete items in the listbox.</p><p>Click the <b>New Item</b>-button to create a new listbox entry, then enter text and choose a pixmap.</p><p>Select an item from the list and click the <b>Delete Item</b>-button to remove the item from the list.</p> - - - - unnamed - - - 11 - - - 6 - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - helpButton - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - Close the dialog and apply all the changes. - - - - - buttonApply - - - &Apply - - - true - - - Apply all changes. - - - - - buttonCancel - - - &Cancel - - - true - - - Close the dialog and discard any changes. - - - - - - - preview - - - Delete Item - - - The list of items. - - - - - GroupBox1 - - - &Item Properties - - - - unnamed - - - 11 - - - 6 - - - - Label2 - - - &Pixmap: - - - itemChoosePixmap - - - - - itemPixmap - - - Label4 - - - - - itemDeletePixmap - - - - 30 - 22 - - - - - - - "designer_s_editcut.png" - - - Delete Pixmap - - - Delete the selected item's pixmap. - - - - - itemChoosePixmap - - - - 30 - 22 - - - - ... - - - Select a Pixmap - - - Choose a pixmap file for the selected item. - - - - - Label1 - - - &Text: - - - itemText - - - - - itemText - - - - 0 - 0 - - - - Change text - - - Change the selected item's text. - - - - - - - itemNew - - - &New Item - - - Add an item - - - <b>Add a new item.</b><p>New items are appended to the list.</p> - - - - - itemDelete - - - &Delete Item - - - Delete Item - - - Delete the selected item - - - - - Vertical Spacing1 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - itemUp - - - - - - "designer_s_up.png" - - - Move up - - - Moves the selected item up. - - - - - itemDown - - - - - - "designer_s_down.png" - - - Move down - - - Move the selected item down. - - - - - - - itemNew - clicked() - ListBoxEditorBase - insertNewItem() - - - itemDelete - clicked() - ListBoxEditorBase - deleteCurrentItem() - - - itemText - textChanged( const TQString & ) - ListBoxEditorBase - currentTextChanged(const TQString&) - - - buttonOk - clicked() - ListBoxEditorBase - okClicked() - - - buttonApply - clicked() - ListBoxEditorBase - applyClicked() - - - buttonCancel - clicked() - ListBoxEditorBase - cancelClicked() - - - itemChoosePixmap - clicked() - ListBoxEditorBase - choosePixmap() - - - itemDeletePixmap - clicked() - ListBoxEditorBase - deletePixmap() - - - itemUp - clicked() - ListBoxEditorBase - moveItemUp() - - - itemDown - clicked() - ListBoxEditorBase - moveItemDown() - - - preview - selectionChanged(TQListBoxItem*) - ListBoxEditorBase - currentItemChanged(TQListBoxItem*) - - - preview - currentChanged( TQListBoxItem * ) - ListBoxEditorBase - currentItemChanged(TQListBoxItem*) - - - - buttonOk - buttonCancel - preview - itemNew - itemDelete - itemUp - itemDown - itemText - itemDeletePixmap - itemChoosePixmap - helpButton - buttonApply - - - init() - destroy() - insertNewItem() - deleteCurrentItem() - currentItemChanged( TQListBoxItem * ) - currentTextChanged( const TQString & ) - okClicked() - cancelClicked() - applyClicked() - choosePixmap() - deletePixmap() - moveItemUp() - moveItemDown() - - - myiconloader.h - -BarIcon2 - - diff --git a/tdevdesigner/designer/listboxeditorimpl.cpp b/tdevdesigner/designer/listboxeditorimpl.cpp deleted file mode 100644 index 01dfa64e..00000000 --- a/tdevdesigner/designer/listboxeditorimpl.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "listboxeditorimpl.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "pixmapchooser.h" -#include "command.h" -#include "listboxdnd.h" -#include "listboxrename.h" - -#include -#include -#include -#include -#include - -#include - -ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) - : ListBoxEditorBase( parent, 0, TRUE ), formwindow( fw ) -{ - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - listbox = (TQListBox*)editWidget; - - itemText->setText( "" ); - itemText->setEnabled( FALSE ); - itemPixmap->setText( "" ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); - - TQListBoxItem *i = 0; - for ( i = listbox->firstItem(); i; i = i->next() ) { - if ( i->pixmap() ) - (void)new TQListBoxPixmap( preview, *i->pixmap(), i->text() ); - else - (void)new TQListBoxText( preview, i->text() ); - } - - if ( preview->firstItem() ) - preview->setCurrentItem( preview->firstItem() ); - - ListBoxDnd *editorDnd = new ListBoxDnd( preview ); - editorDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move ); - TQObject::connect( editorDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), - editorDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) ); - - ListBoxRename *editorRename = new ListBoxRename( preview ); - - TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" ); - TQObjectListIt it( *l ); - TQObject *obj; - while ( (obj = it.current()) != 0 ) { - ++it; - TQObject::connect( editorRename, - TQT_SIGNAL( itemTextChanged( const TQString & ) ), - obj, - TQT_SLOT( setText( const TQString & ) ) ); - } - delete l; - -} - -void ListBoxEditor::insertNewItem() -{ - TQListBoxItem *i = new TQListBoxText( preview, i18n("New Item") ); - preview->setCurrentItem( i ); - preview->setSelected( i, TRUE ); - itemText->setFocus(); - itemText->selectAll(); -} - -void ListBoxEditor::deleteCurrentItem() -{ - delete preview->item( preview->currentItem() ); - if ( preview->currentItem() != -1 ) - preview->setSelected( preview->currentItem(), TRUE ); -} - -void ListBoxEditor::currentItemChanged( TQListBoxItem *i ) -{ - itemText->blockSignals( TRUE ); - itemText->setText( "" ); - itemPixmap->setText( "" ); - itemText->blockSignals( FALSE ); - - if ( !i ) { - itemText->setEnabled( FALSE ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); - return; - } - - itemText->blockSignals( TRUE ); - itemText->setEnabled( TRUE ); - itemChoosePixmap->setEnabled( TRUE ); - itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() ); - - itemText->setText( i->text() ); - if ( i->pixmap() ) - itemPixmap->setPixmap( *i->pixmap() ); - itemText->blockSignals( FALSE ); -} - -void ListBoxEditor::currentTextChanged( const TQString &txt ) -{ - if ( preview->currentItem() == -1 ) - return; - - preview->blockSignals( TRUE ); - if ( preview->item( preview->currentItem() )->pixmap() ) - preview->changeItem( *preview->item( preview->currentItem() )->pixmap(), txt, preview->currentItem() ); - else - preview->changeItem( txt, preview->currentItem() ); - preview->blockSignals( FALSE ); -} - -void ListBoxEditor::okClicked() -{ - applyClicked(); - accept(); -} - -void ListBoxEditor::cancelClicked() -{ - reject(); -} - -void ListBoxEditor::applyClicked() -{ - TQListBoxItem *i = 0; - TQValueList items; - for ( i = preview->firstItem(); i; i = i->next() ) { - PopulateListBoxCommand::Item item; - if ( i->pixmap() ) - item.pix = *i->pixmap(); - item.text = i->text(); - items.append( item ); - } - - PopulateListBoxCommand *cmd = new PopulateListBoxCommand( i18n( "Edit the Items of '%1'" ).arg( listbox->name() ), - formwindow, listbox, items ); - cmd->execute(); - formwindow->commandHistory()->addCommand( cmd ); -} - -void ListBoxEditor::choosePixmap() -{ - if ( preview->currentItem() == -1 ) - return; - - TQPixmap pix; - if ( preview->item( preview->currentItem() )->pixmap() ) - pix = qChoosePixmap( this, formwindow, *preview->item( preview->currentItem() )->pixmap() ); - else - pix = qChoosePixmap( this, formwindow, TQPixmap() ); - - if ( pix.isNull() ) - return; - - TQString txt = preview->item( preview->currentItem() )->text(); - preview->changeItem( pix, txt, preview->currentItem() ); - itemDeletePixmap->setEnabled( TRUE ); -} - -void ListBoxEditor::moveItemUp() -{ - if ( preview->currentItem() < 1 ) - return; - - TQListBoxItem *i = preview->item( preview->currentItem() ); - bool hasPix = (i->pixmap() != 0); - TQPixmap pix; - if ( hasPix ) - pix = *i->pixmap(); - TQString txt = i->text(); - - TQListBoxItem *p = i->prev(); - if ( p->pixmap() ) - preview->changeItem( *p->pixmap(), p->text(), preview->currentItem() ); - else - preview->changeItem( p->text(), preview->currentItem() ); - - if ( hasPix ) - preview->changeItem( pix, txt, preview->currentItem() - 1 ); - else - preview->changeItem( txt, preview->currentItem() - 1 ); -} - -void ListBoxEditor::moveItemDown() -{ - if ( preview->currentItem() == -1 || preview->currentItem() > (int)preview->count() - 2 ) - return; - - TQListBoxItem *i = preview->item( preview->currentItem() ); - bool hasPix = (i->pixmap() != 0); - TQPixmap pix; - if ( hasPix ) - pix = *i->pixmap(); - TQString txt = i->text(); - - TQListBoxItem *n = i->next(); - if ( n->pixmap() ) - preview->changeItem( *n->pixmap(), n->text(), preview->currentItem() ); - else - preview->changeItem( n->text(), preview->currentItem() ); - - if ( hasPix ) - preview->changeItem( pix, txt, preview->currentItem() + 1 ); - else - preview->changeItem( txt, preview->currentItem() + 1 ); -} - -void ListBoxEditor::deletePixmap() -{ - if ( preview->currentItem() == -1 ) - return; - - TQListBoxItem *i = preview->item( preview->currentItem() ); - preview->changeItem( i->text(), preview->currentItem() ); - itemDeletePixmap->setEnabled( FALSE ); -} diff --git a/tdevdesigner/designer/listboxeditorimpl.h b/tdevdesigner/designer/listboxeditorimpl.h deleted file mode 100644 index 28ca0254..00000000 --- a/tdevdesigner/designer/listboxeditorimpl.h +++ /dev/null @@ -1,62 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef LISTBOXEDITORIMPL_H -#define LISTBOXEDITORIMPL_H - -class TQListBox; -class FormWindow; - -#include "listboxeditor.h" - -class ListBoxEditor : public ListBoxEditorBase -{ - Q_OBJECT - - -public: - ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ); - -protected slots: - void insertNewItem(); - void deleteCurrentItem(); - void currentItemChanged( TQListBoxItem * ); - void currentTextChanged( const TQString & ); - void okClicked(); - void cancelClicked(); - void applyClicked(); - void choosePixmap(); - void moveItemUp(); - void moveItemDown(); - void deletePixmap(); - -private: - TQListBox *listbox; - FormWindow *formwindow; - -}; - -#endif diff --git a/tdevdesigner/designer/listboxrename.cpp b/tdevdesigner/designer/listboxrename.cpp deleted file mode 100644 index 0a32d292..00000000 --- a/tdevdesigner/designer/listboxrename.cpp +++ /dev/null @@ -1,157 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include -#include -#include -#include "listboxrename.h" - -class EditableListBoxItem : public TQListBoxItem -{ -public: - void setText( const TQString & text ) - { - TQListBoxItem::setText( text ); - } -}; - -ListBoxRename::ListBoxRename( TQListBox * eventSource, const char * name ) - : TQObject( eventSource, name ), - clickedItem( 0 ), activity( FALSE ) -{ - src = eventSource; - src->installEventFilter( this ); - ed = new TQLineEdit( src->viewport() ); - ed->hide(); - ed->setFrame( FALSE ); - - TQObject::connect( ed, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( renameClickedItem() ) ); -} - -bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) -{ - switch ( event->type() ) { - - case TQEvent::MouseButtonPress: - { - TQPoint pos = ((TQMouseEvent *) event)->pos(); - - if ( clickedItem && - clickedItem->isSelected() && - (clickedItem == src->itemAt( pos )) ) { - TQTimer::singleShot( 500, this, TQT_SLOT( showLineEdit() ) ); - activity = FALSE; // no drags or clicks for 500 ms before we start the renaming - } else { // new item clicked - activity = TRUE; - clickedItem = src->itemAt( pos ); - ed->hide(); - } - } - break; - - case TQEvent::MouseMove: - - if ( ((TQMouseEvent *) event)->state() & Qt::LeftButton ) { - activity = TRUE; // drag - } - break; - - case TQEvent::KeyPress: - - switch ( ((TQKeyEvent *) event)->key() ) { - - case TQt::Key_F2: - - activity = FALSE; - clickedItem = src->item( src->currentItem() ); - showLineEdit(); - break; - - case TQt::Key_Escape: - if ( !ed->isHidden() ) { - hideLineEdit(); // abort rename - return TRUE; - } - break; - - case TQt::Key_Up: - case TQt::Key_Down: - case TQt::Key_PageUp: - case TQt::Key_PageDown: - - if ( !ed->isHidden() ) - return TRUE; // Filter out the keystrokes - break; - - } - break; - - case TQEvent::Resize: - - if ( clickedItem && ed && !ed->isHidden() ) { - TQRect rect = src->itemRect( clickedItem ); - ed->resize( rect.right() - rect.left() - 1, - rect.bottom() - rect.top() - 1 ); - } - break; - - default: - break; - } - - return FALSE; -} - -void ListBoxRename::showLineEdit() -{ - if ( !clickedItem || activity ) - return; - TQRect rect = src->itemRect( clickedItem ); - ed->resize( rect.right() - rect.left() - 1, - rect.bottom() - rect.top() - 1 ); - ed->move( rect.left() + 1, rect.top() + 1 ); - ed->setText( clickedItem->text() ); - ed->selectAll(); - ed->show(); - ed->setFocus(); -} - -void ListBoxRename::hideLineEdit() -{ - ed->hide(); - clickedItem = 0; - src->setFocus(); -} - -void ListBoxRename::renameClickedItem() -{ - if ( clickedItem && ed ) { - ( (EditableListBoxItem *) clickedItem )->setText( ed->text() ); - emit itemTextChanged( ed->text() ); - } - hideLineEdit(); -} diff --git a/tdevdesigner/designer/listboxrename.h b/tdevdesigner/designer/listboxrename.h deleted file mode 100644 index ec666f70..00000000 --- a/tdevdesigner/designer/listboxrename.h +++ /dev/null @@ -1,58 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef LISTBOXRENAME_H -#define LISTBOXRENAME_H - -#include -#include - -class TQLineEdit; - -class ListBoxRename : public TQObject -{ - Q_OBJECT - -public: - ListBoxRename( TQListBox * eventSource, const char * name = 0 ); - bool eventFilter( TQObject *, TQEvent * event ); - -signals: - void itemTextChanged( const TQString & ); - -public slots: - void showLineEdit(); - void hideLineEdit(); - void renameClickedItem(); - -private: - TQListBoxItem * clickedItem; - TQListBox * src; - TQLineEdit * ed; - bool activity; -}; - -#endif //LISTBOXRENAME_H diff --git a/tdevdesigner/designer/listdnd.cpp b/tdevdesigner/designer/listdnd.cpp deleted file mode 100644 index 8431fd18..00000000 --- a/tdevdesigner/designer/listdnd.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "listdnd.h" -#include -#include - -ListDnd::ListDnd( TQScrollView * eventSource, const char * name ) - : TQObject( eventSource, name ), - dragInside( FALSE ), dragDelete( TRUE ), dropConfirmed( FALSE ), dMode( Both ) -{ - src = eventSource; - src->setAcceptDrops( TRUE ); - src->installEventFilter( this ); - src->viewport()->installEventFilter( this ); - - line = new TQWidget( src->viewport(), 0, TQt::WStyle_NoBorder | WStyle_StaysOnTop ); - line->setBackgroundColor( TQt::black ); - line->resize( src->viewport()->width(), 2 ); - line->hide(); -} - -void ListDnd::setDragMode( int mode ) -{ - dMode = mode; -} - -int ListDnd::dragMode() const -{ - return dMode; -} - -bool ListDnd::eventFilter( TQObject *, TQEvent * event ) -{ - switch ( event->type() ) { - case TQEvent::DragEnter: - return dragEnterEvent( (TQDragEnterEvent *) event ); - case TQEvent::DragLeave: - return dragLeaveEvent( (TQDragLeaveEvent *) event ); - case TQEvent::DragMove: - return dragMoveEvent( (TQDragMoveEvent *) event ); - case TQEvent::Drop: - return dropEvent( (TQDropEvent *) event ); - case TQEvent::MouseButtonPress: - return mousePressEvent( (TQMouseEvent *) event ); - case TQEvent::MouseMove: - return mouseMoveEvent( (TQMouseEvent *) event ); - default: - break; - } - return FALSE; -} - - -bool ListDnd::dragEnterEvent( TQDragEnterEvent * event ) -{ - if ( dMode == None ) { - return TRUE; - } - - bool ok = ( ( ( dMode & Both ) == Both ) || - ( ( dMode & Internal ) && ( event->source() == src ) ) || - ( ( dMode & External ) && ( event->source() != src ) ) ); - - if ( ok && canDecode( event ) ) { - event->accept(); - dragInside = TRUE; - if ( !( dMode & NullDrop ) ) { - updateLine( event->pos() ); - line->show(); - } - } - return TRUE; -} - -bool ListDnd::dragLeaveEvent( TQDragLeaveEvent * ) -{ - dragInside = FALSE; - line->hide(); - return TRUE; -} - -bool ListDnd::dragMoveEvent( TQDragMoveEvent * event ) -{ - if ( dragInside && dMode && !( dMode & NullDrop ) ) { - updateLine( event->pos() ); - } - return TRUE; -} - -bool ListDnd::dropEvent( TQDropEvent * ) -{ - // do nothing - return FALSE; -} - -bool ListDnd::mousePressEvent( TQMouseEvent * event ) -{ - if ( event->button() == Qt::LeftButton ) - mousePressPos = event->pos(); - return FALSE; -} - -bool ListDnd::mouseMoveEvent( TQMouseEvent * ) -{ - // do nothing - return FALSE; -} - -void ListDnd::updateLine( const TQPoint & ) -{ - // do nothing -} - -bool ListDnd::canDecode( TQDragEnterEvent * ) -{ - // do nothing - return FALSE; -} diff --git a/tdevdesigner/designer/listdnd.h b/tdevdesigner/designer/listdnd.h deleted file mode 100644 index 39e1af11..00000000 --- a/tdevdesigner/designer/listdnd.h +++ /dev/null @@ -1,64 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef LISTDND_H -#define LISTDND_H - -#include -#include - -class ListDnd : public TQObject -{ - Q_OBJECT - -public: - enum DragMode { None = 0, External = 1, Internal = 2, Both = 3, Move = 4, NullDrop = 8 }; - ListDnd( TQScrollView * eventSource, const char * name = 0 ); - void setDragMode( int mode ); - int dragMode() const; - bool eventFilter( TQObject *, TQEvent * event ); - -protected: - virtual bool dragEnterEvent( TQDragEnterEvent * event ); - virtual bool dragLeaveEvent( TQDragLeaveEvent * ); - virtual bool dragMoveEvent( TQDragMoveEvent * event ); - virtual bool dropEvent( TQDropEvent * event ); - virtual bool mousePressEvent( TQMouseEvent * event ); - virtual bool mouseMoveEvent( TQMouseEvent * event ); - virtual void updateLine( const TQPoint & dragPos ); - virtual bool canDecode( TQDragEnterEvent * event ); - - TQScrollView * src; - TQWidget * line; - TQPoint mousePressPos; - TQPoint dragPos; - bool dragInside; - bool dragDelete; - bool dropConfirmed; - int dMode; -}; - -#endif // LISTDND_H diff --git a/tdevdesigner/designer/listeditor.ui b/tdevdesigner/designer/listeditor.ui deleted file mode 100644 index c477ff1a..00000000 --- a/tdevdesigner/designer/listeditor.ui +++ /dev/null @@ -1,179 +0,0 @@ - -ListEditor -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - ListEditor - - - - 0 - 0 - 331 - 301 - - - - Edit - - - - unnamed - - - 11 - - - 6 - - - - - Column 1 - - - true - - - true - - - - listview - - - Extended - - - AllColumns - - - - - PushButton1 - - - &Add - - - - - PushButton2 - - - &Remove - - - - - PushButton3 - - - Re&name - - - - - PushButton4 - - - &Close - - - - - Spacer1 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - - - PushButton1 - clicked() - ListEditor - addItem() - - - PushButton2 - clicked() - ListEditor - removeItems() - - - PushButton4 - clicked() - ListEditor - accept() - - - listview - itemRenamed(TQListViewItem*,int) - ListEditor - renamed(TQListViewItem*) - - - PushButton3 - clicked() - ListEditor - renameItem() - - - - listeditor.ui.h - - - class TQStringList; - - - init() - setList( const TQStringList & l ) - addItem() - renamed( TQListViewItem * i ) - removeItems() - items() - renameItem() - - - myiconloader.h - -BarIcon2 - - - diff --git a/tdevdesigner/designer/listeditor.ui.h b/tdevdesigner/designer/listeditor.ui.h deleted file mode 100644 index 7f179cef..00000000 --- a/tdevdesigner/designer/listeditor.ui.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you wish to add, delete or rename slots use TQt Designer which will -** update this file, preserving your code. Create an init() slot in place of -** a constructor, and a destroy() slot in place of a destructor. -*****************************************************************************/ - -#include -#include - -void ListEditor::init() -{ - listview->header()->hide(); - listview->setSorting( -1 ); - listview->setDefaultRenameAction( TQListView::Accept ); -} - -void ListEditor::setList( const TQStringList &l ) -{ - TQListViewItem *i = 0; - for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { - i = new TQListViewItem( listview, i ); - i->setText( 0, *it ); - i->setRenameEnabled( 0, TRUE ); - } -} - -void ListEditor::addItem() -{ - TQListViewItem *i = new TQListViewItem( listview, listview->lastItem() ); - i->setRenameEnabled( 0, TRUE ); - tqApp->processEvents(); - i->startRename( 0 ); -} - -void ListEditor::renamed( TQListViewItem *i ) -{ - if ( i && i->text( 0 ).isEmpty() ) - i->startRename( 0 ); -} - -void ListEditor::removeItems() -{ - TQListViewItemIterator it( listview ); - TQListViewItem *i = 0; - while ( ( i = it.current() ) ) { - ++it; - if ( i->isSelected() ) - delete i; - } -} - -TQStringList ListEditor::items() -{ - TQStringList l; - TQListViewItemIterator it( listview ); - TQListViewItem *i = 0; - while ( ( i = it.current() ) ) { - ++it; - if ( !i->text( 0 ).isEmpty() ) - l << i->text( 0 ); - } - return l; -} - -void ListEditor::renameItem() -{ - TQListViewItem *i = listview->currentItem(); - if ( i ) - i->startRename( 0 ); -} diff --git a/tdevdesigner/designer/listviewdnd.cpp b/tdevdesigner/designer/listviewdnd.cpp deleted file mode 100644 index 32dcc6d5..00000000 --- a/tdevdesigner/designer/listviewdnd.cpp +++ /dev/null @@ -1,432 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "listviewdnd.h" -#include -#include -#include -#include -#include - -// The Dragobject Declaration --------------------------------------- -class ListViewItemDrag : public TQStoredDrag -{ -public: - enum DropRelation { Sibling, Child }; - ListViewItemDrag( ListViewItemList & items, TQWidget * parent = 0, const char * name = 0 ); - ~ListViewItemDrag() {}; - static bool canDecode( TQDragMoveEvent * event ); - static bool decode( TQDropEvent * event, TQListView * parent, TQListViewItem * insertPoint, DropRelation dr ); -}; -// ------------------------------------------------------------------ - -ListViewDnd::ListViewDnd( TQListView * eventSource, const char * name ) - : ListDnd( eventSource, name ) { } - -void ListViewDnd::confirmDrop( TQListViewItem * ) -{ - dropConfirmed = TRUE; -} - -bool ListViewDnd::dropEvent( TQDropEvent * event ) -{ - if ( dragInside ) { - - if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item - event->accept(); - emit dropped( 0 ); // a NullDrop - return TRUE; - } - - TQPoint pos = event->pos(); - - ListViewItemDrag::DropRelation dr = ListViewItemDrag::Sibling; - TQListViewItem *item = itemAt( pos ); - int dpos = dropDepth( item, pos ); - - if ( item ) { - if ( dpos > item->depth() && !(dMode & Flat) ) { - // Child node - dr = ListViewItemDrag::Child; - } else if ( dpos < item->depth() ) { - // Parent(s) Sibling - while ( item && (item->depth() > dpos) ) - item = item->parent(); - } - } - - if ( ListViewItemDrag::decode( event, (TQListView *) src, item, dr ) ) { - event->accept(); - emit dropped( 0 ); // Use ID instead of item? - } - } - - line->hide(); - dragInside = FALSE; - - return TRUE; -} - -bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event ) -{ - if ( event->state() & Qt::LeftButton ) { - if ( ( event->pos() - mousePressPos ).manhattanLength() > 3 ) { - ListViewItemList list; - - if ( dMode & Flat ) - buildFlatList( list ); - else - buildTreeList( list ); - - ListViewItemDrag * dragobject = new ListViewItemDrag( list, (TQListView *) src ); - - if ( dMode & Move ) { - disabledItems = list; - setVisibleItems( FALSE ); - } - - dragobject->dragCopy(); - - if ( dMode & Move ) { - // Did the target accept the drop? - if ( dropConfirmed ) { - // Shouldn't autoDelete handle this? - for( list.first(); list.current(); list.next() ) - delete list.current(); - dropConfirmed = FALSE; - } else { - // Reenable disabled items since - // drag'n'drop was aborted - setVisibleItems( TRUE ); - } - disabledItems.clear(); - } - } - } - return FALSE; -} - -int ListViewDnd::buildFlatList( ListViewItemList & list ) -{ - bool addKids = FALSE; - TQListViewItem *nextSibling = 0; - TQListViewItem *nextParent = 0; - TQListViewItemIterator it = ((TQListView *)src)->firstChild(); - for ( ; *it; it++ ) { - // Hit the nextSibling, turn of child processing - if ( (*it) == nextSibling ) - addKids = FALSE; - - if ( (*it)->isSelected() ) { - if ( (*it)->childCount() == 0 ) { - // Selected, no children - list.append( *it ); - } else if ( !addKids ) { - // Children processing not set, so set it - // Also find the item were we shall quit - // processing children...if any such item - addKids = TRUE; - nextSibling = (*it)->nextSibling(); - nextParent = (*it)->parent(); - while ( nextParent && !nextSibling ) { - nextSibling = nextParent->nextSibling(); - nextParent = nextParent->parent(); - } - } - } else if ( ((*it)->childCount() == 0) && addKids ) { - // Leaf node, and we _do_ process children - list.append( *it ); - } - } - return list.count(); -} - -int ListViewDnd::buildTreeList( ListViewItemList & list ) -{ - TQListViewItemIterator it = ((TQListView *)src)->firstChild(); - for ( ; *it; it++ ) { - if ( (*it)->isSelected() ) - list.append( *it ); - } - return list.count(); -} - -void ListViewDnd::setVisibleItems( bool b ) -{ - if ( disabledItems.isEmpty() ) - return; - - disabledItems.first(); - do { - disabledItems.current()->setVisible( b ); - } while ( disabledItems.next() ); -} - -void ListViewDnd::updateLine( const TQPoint & dragPos ) -{ - TQListViewItem * item = itemAt(dragPos); - TQListView * src = (TQListView *) this->src; - - int ypos = item ? - ( src->itemRect( item ).bottom() - ( line->height() / 2 ) ) : - ( src->itemRect( src->firstChild() ).top() ); - - int xpos = dropDepth( item, dragPos ) * src->treeStepSize(); - line->resize( src->viewport()->width() - xpos, line->height() ); - line->move( xpos, ypos ); -} - -TQListViewItem * ListViewDnd::itemAt( TQPoint pos ) -{ - TQListView * src = (TQListView *) this->src; - int headerHeight = (int)(src->header()->height()); - pos.ry() -= headerHeight; - TQListViewItem * result = src->itemAt( pos ); - - if ( result && ( pos.ry() < (src->itemPos(result) + result->height()/2) ) ) - result = result->itemAbove(); - - // Wind back if has parent, and we're in flat mode - while ( result && result->parent() && (dMode & Flat) ) - result = result->parent(); - - // Wind back if has parent, and we're in flat mode - while ( result && !result->isVisible() && result->parent() ) - result = result->parent(); - - if ( !result && src->firstChild() && (pos.y() > src->itemRect(src->firstChild()).bottom()) ) { - result = src->lastItem(); - if ( !result->isVisible() ) - // Handle special case where last item is actually hidden - result = result->itemAbove(); - } - - return result; -} - -int ListViewDnd::dropDepth( TQListViewItem * item, TQPoint pos ) -{ - if ( !item || (dMode & Flat) ) - return 0; - - int result = 0; - int itemDepth = item->depth(); - int indentSize = ((TQListView *)src)->treeStepSize(); - int itemLeft = indentSize * itemDepth; - int childMargin = indentSize*2; - if ( pos.x() > itemLeft + childMargin ) { - result = itemDepth + 1; - } else if ( pos.x() < itemLeft ) { - result = pos.x() / indentSize; - } else { - result = itemDepth; - } - return result; -} - -bool ListViewDnd::canDecode( TQDragEnterEvent * event ) -{ - return ListViewItemDrag::canDecode( event ); -} - -// ------------------------------------------------------------------ -// The Dragobject Implementation ------------------------------------ -// ------------------------------------------------------------------ - -TQDataStream & operator<< ( TQDataStream & stream, const TQListViewItem & item ); -TQDataStream & operator>> ( TQDataStream & stream, TQListViewItem & item ); - -ListViewItemDrag::ListViewItemDrag( ListViewItemList & items, TQWidget * parent, const char * name ) - : TQStoredDrag( "qt/listviewitem", parent, name ) -{ - // ### FIX! - TQByteArray data( sizeof( TQ_INT32 ) + sizeof( TQListViewItem ) * items.count() ); - TQDataStream stream( data, IO_WriteOnly ); - - stream << items.count(); - - TQListViewItem *i = items.first(); - while ( i ) { - stream << *i; - i = items.next(); - } - - setEncodedData( data ); -} - -bool ListViewItemDrag::canDecode( TQDragMoveEvent * event ) -{ - return event->provides( "qt/listviewitem" ); -} - -bool ListViewItemDrag::decode( TQDropEvent * event, TQListView * parent, TQListViewItem * insertPoint, DropRelation dr ) -{ - TQByteArray data = event->encodedData( "qt/listviewitem" ); - TQListViewItem* itemParent = insertPoint ? insertPoint->parent() : 0; - - // Change from sibling (default) to child creation - if ( insertPoint && dr == Child ) { - itemParent = insertPoint; - insertPoint = 0; - } - - if ( data.size() ) { - event->accept(); - TQDataStream stream( data, IO_ReadOnly ); - - int count = 0; - stream >> count; - - for( int i = 0; i < count; i++ ) { - if ( itemParent ) { - insertPoint = new TQListViewItem( itemParent, insertPoint ); - itemParent->setOpen( TRUE ); - } else { // No parent for insertPoint, use TQListView - insertPoint = new TQListViewItem( parent, insertPoint ); - } - stream >> *insertPoint; - } - return TRUE; - } - return FALSE; -} - - -TQDataStream & operator<< ( TQDataStream & stream, const TQListViewItem & item ) -{ - int columns = item.listView()->columns(); - stream << columns; - - TQ_UINT8 b = 0; - - int i; - for ( i = 0; i < columns; i++ ) { - b = (TQ_UINT8) ( item.text( i ) != TQString() ); // does column i have a string ? - stream << b; - if ( b ) { - stream << item.text( i ); - } - } - - for ( i = 0; i < columns; i++ ) { - b = (TQ_UINT8) ( !!item.pixmap( i ) ); // does column i have a pixmap ? - stream << b; - if ( b ) { - stream << ( *item.pixmap( i ) ); - } - } - - stream << (TQ_UINT8) item.isOpen(); - stream << (TQ_UINT8) item.isSelectable(); - stream << (TQ_UINT8) item.isExpandable(); - stream << (TQ_UINT8) item.dragEnabled(); - stream << (TQ_UINT8) item.dropEnabled(); - stream << (TQ_UINT8) item.isVisible(); - - for ( i = 0; i < columns; i++ ) { - stream << (TQ_UINT8) item.renameEnabled( i ); - } - - stream << (TQ_UINT8) item.multiLinesEnabled(); - stream << item.childCount(); - - if ( item.childCount() > 0 ) { - TQListViewItem * child = item.firstChild(); - while ( child ) { - stream << ( *child ); // recursive call - child = child->nextSibling(); - } - } - - return stream; -} - -TQDataStream & operator>> ( TQDataStream & stream, TQListViewItem & item ) -{ - TQ_INT32 columns; - stream >> columns; - - TQ_UINT8 b = 0; - - TQString text; - int i; - for ( i = 0; i < columns; i++ ) { - stream >> b; - if ( b ) { // column i has string ? - stream >> text; - item.setText( i, text ); - } - } - - TQPixmap pixmap; - for ( i = 0; i < columns; i++ ) { - stream >> b; // column i has pixmap ? - if ( b ) { - stream >> pixmap; - item.setPixmap( i, pixmap ); - } - } - - stream >> b; - item.setOpen( b ); - - stream >> b; - item.setSelectable( b ); - - stream >> b; - item.setExpandable( b ); - - stream >> b; - item.setDragEnabled( b ); - - stream >> b; - item.setDropEnabled( b ); - - stream >> b; - item.setVisible( b ); - - for ( i = 0; i < columns; i++ ) { - stream >> b; - item.setRenameEnabled( i, b ); - } - - stream >> b; - item.setMultiLinesEnabled( b ); - - int childCount; - stream >> childCount; - - TQListViewItem *child = 0; - TQListViewItem *prevchild = 0; - for ( i = 0; i < childCount; i++ ) { - child = new TQListViewItem( &item, prevchild ); - stream >> ( *child ); - item.insertItem( child ); - prevchild = child; - } - - return stream; -} diff --git a/tdevdesigner/designer/listviewdnd.h b/tdevdesigner/designer/listviewdnd.h deleted file mode 100644 index 5a59f4ad..00000000 --- a/tdevdesigner/designer/listviewdnd.h +++ /dev/null @@ -1,67 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef LISTVIEWDND_H -#define LISTVIEWDND_H - -#include -#include -#include "listdnd.h" - -class TQWidget; -class TQListView; -typedef TQPtrList ListViewItemList; - -class ListViewDnd : public ListDnd -{ - Q_OBJECT - -public: - enum DragMode { Flat = 16 }; // see ListDnd::DragMode - - ListViewDnd( TQListView * eventSource, const char * name = 0 ); - -signals: - void dropped( TQListViewItem * ); - -public slots: - void confirmDrop( TQListViewItem * ); - -protected: - virtual bool dropEvent( TQDropEvent * event ); - virtual bool mouseMoveEvent( TQMouseEvent * event ); - virtual void updateLine( const TQPoint & pos ); - virtual bool canDecode( TQDragEnterEvent * event ); -private: - TQListViewItem * itemAt( TQPoint pos ); - int dropDepth( TQListViewItem * item, TQPoint pos ); - int buildFlatList( ListViewItemList & list ); - int buildTreeList( ListViewItemList & list ); - void setVisibleItems( bool b ); - ListViewItemList disabledItems; -}; - -#endif //LISTVIEWDND_H diff --git a/tdevdesigner/designer/listvieweditor.ui b/tdevdesigner/designer/listvieweditor.ui deleted file mode 100644 index 8a0abe14..00000000 --- a/tdevdesigner/designer/listvieweditor.ui +++ /dev/null @@ -1,935 +0,0 @@ - -ListViewEditorBase -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - ListViewEditorBase - - - - 0 - 0 - 567 - 398 - - - - Edit Listview - - - true - - - <b>Edit Listview</b><p>Use the controls on the <b>Items</b>-tab to add, edit or delete items in the listview. Change the column configuration of the listview using the controls on the <b>Columns</b>-tab.</p>Click the <b>New Item</b>-button to create a new item, then enter text and add a pixmap.</p><p>Select an item from the list and click the <b>Delete Item</b>-button to remove the item from the list.</p> - - - - unnamed - - - 11 - - - 6 - - - - tabWidget - - - - Widget10 - - - &Items - - - - unnamed - - - 11 - - - 6 - - - - itemDelete - - - &Delete Item - - - Delete item - - - <b>Deletes the selected item.</b><p>Any sub-items are also deleted.</p> - - - - - GroupBox1 - - - - 0 - 5 - 0 - 0 - - - - Item Properties - - - - unnamed - - - 11 - - - 6 - - - - Label2 - - - Pi&xmap: - - - itemChoosePixmap - - - - - Label1 - - - &Text: - - - itemText - - - - - itemText - - - - 0 - 0 - - - - Change text - - - <b>Change the text of the item.</b><p>The text will be changed in the current column of the selected item.</p> - - - - - itemColumn - - - Change column - - - <b>Select the current column.</b><p>The item's text and pixmap will be changed for the current column</p> - - - - - Label4 - - - Colu&mn: - - - itemColumn - - - - - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - itemPixmap - - - Label4 - - - - - itemDeletePixmap - - - - 30 - 22 - - - - - - - "designer_s_editcut.png" - - - Delete Pixmap - - - <b>Delete the selected item's pixmap.</b><p>The pixmap in the current column of the selected item will be deleted.</p> - - - - - itemChoosePixmap - - - - 30 - 22 - - - - ... - - - Select a Pixmap - - - <b>Select a pixmap file for the item.</b><p>The pixmap will be changed in the current column of the selected item.</p> - - - - - - - - - itemNew - - - &New Item - - - Add an item - - - <b>Adds a new item to the list.</b><p>The item will be inserted at the top of the list and can be moved using the up- and down-buttons.</p> - - - - - itemsPreview - - - The list of items. - - - - - itemNewSub - - - New &Subitem - - - Add a subitem - - - <b>Create a new sub-item for the selected item.</b><p>New sub-items are inserted at the top of the list of sub-items, and new levels are created automatically.</p> - - - - - Vertical Spacing1 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - itemUp - - - - - - "designer_s_up.png" - - - Move up - - - <b>Move the selected item up.</b><p>The item will be moved within its level in the hierarchy.</p> - - - - - itemDown - - - - - - "designer_s_down.png" - - - Move down - - - <b>Move the selected item down.</b><p>The item will be moved within its level in the hierarchy.</p> - - - - - itemLeft - - - - - - "designer_s_left.png" - - - Move left - - - <b>Move the selected item one level up.</b><p>This will also change the level of the item's sub-items.</p> - - - - - itemRight - - - - - - "designer_s_right.png" - - - Move right - - - <b>Move the selected item one level down.</b><p>This will also change the level of the item's sub-items.</p> - - - - - - - Widget11 - - - Co&lumns - - - - unnamed - - - 11 - - - 6 - - - - GroupBox1 - - - Column Properties - - - - unnamed - - - 11 - - - 6 - - - - Label2 - - - &Pixmap: - - - colChoosePixmap - - - - - colPixmap - - - Label4 - - - - - colDeletePixmap - - - - 30 - 22 - - - - - - - "designer_s_editcut.png" - - - Delete Pixmap - - - Delete the pixmap of the selected column. - - - - - colChoosePixmap - - - - 30 - 22 - - - - ... - - - Select a Pixmap - - - <b>Select a pixmap file for the selected column.</b><p>The pixmap will be displayed in the header of the listview.</p> - - - - - Label1 - - - &Text: - - - colText - - - - - colText - - - - 0 - 0 - - - - Enter column text - - - <b>Enter the text for the selected column.</b><p>The text will be displayed in the header of the listview.</p> - - - - - colClickable - - - Clicka&ble - - - If this option is checked, the selected column will react to mouse clicks on the header. - - - - - colResizable - - - Re&sizable - - - The column's width will be resizable if this option is checked. - - - - - - - colDelete - - - &Delete Column - - - Delete column - - - Deletes the selected Column. - - - - - colDown - - - - - - "designer_s_down.png" - - - Move down - - - <b>Move the selected item down.</b><p>The top-most column will be the first column in the list.</p> - - - - - colNew - - - &New Column - - - Add a Column - - - <b>Create a new column.</b><p>New columns are appended at the end of (right of) the list and may be moved using the up- and down-buttons.</p> - - - - - colUp - - - - - - "designer_s_up.png" - - - Move up - - - <b>Move the selected item up.</b><p>The top-most column will be the first column in the list.</p> - - - - - colPreview - - - The list of columns. - - - - - Vertical Spacing2 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - helpButton - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - okButton - - - &OK - - - true - - - true - - - Close the dialog and apply all the changes. - - - - - applyButton - - - &Apply - - - true - - - Apply all changes. - - - - - cancelButton - - - &Cancel - - - true - - - Close the dialog and discard any changes. - - - - - - - - - cancelButton - clicked() - ListViewEditorBase - reject() - - - itemNew - clicked() - ListViewEditorBase - itemNewClicked() - - - itemDelete - clicked() - ListViewEditorBase - itemDeleteClicked() - - - itemUp - clicked() - ListViewEditorBase - itemUpClicked() - - - itemDown - clicked() - ListViewEditorBase - itemDownClicked() - - - itemColumn - valueChanged(int) - ListViewEditorBase - itemColChanged(int) - - - itemText - textChanged(const TQString&) - ListViewEditorBase - itemTextChanged(const TQString&) - - - itemDeletePixmap - clicked() - ListViewEditorBase - itemPixmapDeleted() - - - itemChoosePixmap - clicked() - ListViewEditorBase - itemPixmapChoosen() - - - colNew - clicked() - ListViewEditorBase - newColumnClicked() - - - colDelete - clicked() - ListViewEditorBase - deleteColumnClicked() - - - colUp - clicked() - ListViewEditorBase - columnUpClicked() - - - colDown - clicked() - ListViewEditorBase - columnDownClicked() - - - colText - textChanged(const TQString&) - ListViewEditorBase - columnTextChanged(const TQString&) - - - colDeletePixmap - clicked() - ListViewEditorBase - columnPixmapDeleted() - - - colChoosePixmap - clicked() - ListViewEditorBase - columnPixmapChosen() - - - colResizable - toggled(bool) - ListViewEditorBase - columnResizable(bool) - - - colClickable - toggled(bool) - ListViewEditorBase - columnClickable(bool) - - - tabWidget - selected(const TQString&) - ListViewEditorBase - initTabPage(const TQString&) - - - okButton - clicked() - ListViewEditorBase - okClicked() - - - applyButton - clicked() - ListViewEditorBase - applyClicked() - - - colPreview - currentChanged(TQListBoxItem*) - ListViewEditorBase - currentColumnChanged(TQListBoxItem*) - - - colPreview - selectionChanged(TQListBoxItem*) - ListViewEditorBase - currentColumnChanged(TQListBoxItem*) - - - itemsPreview - currentChanged(TQListViewItem*) - ListViewEditorBase - currentItemChanged(TQListViewItem*) - - - itemsPreview - selectionChanged(TQListViewItem*) - ListViewEditorBase - currentItemChanged(TQListViewItem*) - - - itemNewSub - clicked() - ListViewEditorBase - itemNewSubClicked() - - - itemLeft - clicked() - ListViewEditorBase - itemLeftClicked() - - - itemRight - clicked() - ListViewEditorBase - itemRightClicked() - - - - okButton - cancelButton - tabWidget - itemsPreview - itemNew - itemNewSub - itemDelete - itemUp - itemDown - itemLeft - itemRight - itemColumn - itemText - itemDeletePixmap - itemChoosePixmap - helpButton - applyButton - colPreview - colNew - colDelete - colUp - colDown - colText - colDeletePixmap - colChoosePixmap - colClickable - colResizable - - - init() - destroy() - applyClicked() - columnClickable(bool) - columnDownClicked() - columnPixmapChosen() - columnPixmapDeleted() - columnResizable(bool) - columnTextChanged(const TQString &) - columnUpClicked() - currentColumnChanged(TQListBoxItem*) - currentItemChanged(TQListViewItem*) - deleteColumnClicked() - initTabPage(const TQString &) - itemColChanged(int) - itemDeleteClicked() - itemDownClicked() - itemLeftClicked() - itemNewClicked() - itemNewSubClicked() - itemPixmapChoosen() - itemPixmapDeleted() - itemTextChanged(const TQString &) - itemUpClicked() - newColumnClicked() - itemRightClicked() - okClicked() - - - myiconloader.h - -BarIcon2 - - - diff --git a/tdevdesigner/designer/listvieweditorimpl.cpp b/tdevdesigner/designer/listvieweditorimpl.cpp deleted file mode 100644 index c5ec7498..00000000 --- a/tdevdesigner/designer/listvieweditorimpl.cpp +++ /dev/null @@ -1,650 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "formwindow.h" -#include "mainwindow.h" -#include "listvieweditorimpl.h" -#include "pixmapchooser.h" -#include "command.h" -#include "listviewdnd.h" -#include "listboxdnd.h" -#include "listboxrename.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw ) - : ListViewEditorBase( parent, 0, TRUE ), listview( lv ), formwindow( fw ) -{ - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - itemText->setEnabled( FALSE ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); - itemColumn->setEnabled( FALSE ); - - setupColumns(); - PopulateListViewCommand::transferItems( listview, itemsPreview ); - setupItems(); - - itemsPreview->setShowSortIndicator( listview->showSortIndicator() ); - itemsPreview->setAllColumnsShowFocus( listview->allColumnsShowFocus() ); - itemsPreview->setRootIsDecorated( listview->rootIsDecorated() ); - - if ( itemsPreview->firstChild() ) { - itemsPreview->setCurrentItem( itemsPreview->firstChild() ); - itemsPreview->setSelected( itemsPreview->firstChild(), TRUE ); - } - - // Clamp on drag and drop to TQListView - ListViewDnd *itemsDnd = new ListViewDnd( itemsPreview ); - itemsDnd->setDragMode( ListViewDnd::Internal | ListViewDnd::Move ); - TQObject::connect( itemsDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ), - itemsDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) ); - - // Enable rename for all TQListViewItems - TQListViewItemIterator it = ((TQListView *)itemsPreview)->firstChild(); - for ( ; *it; it++ ) - (*it)->setRenameEnabled( 0, TRUE ); - - // Connect listview signal to signal-relay - TQObject::connect( itemsPreview, - TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ), - this, - TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); - - // Connect signal-relay to TQLineEdit "itemText" - TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" ); - TQObject *obj; - TQObjectListIt itemsLineEditIt( *l ); - while ( (obj = itemsLineEditIt.current()) != 0 ) { - ++itemsLineEditIt; - TQObject::connect( this, - TQT_SIGNAL( itemRenamed( const TQString & ) ), - obj, - TQT_SLOT( setText( const TQString & ) ) ); - } - delete l; - - // Clamp on drag and drop to TQListBox - ListBoxDnd *columnsDnd = new ListBoxDnd( colPreview ); - columnsDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move ); - TQObject::connect( columnsDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), - columnsDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) ); - - // Clamp on rename to TQListBox - ListBoxRename *columnsRename = new ListBoxRename( colPreview ); - TQObject::connect( columnsRename, - TQT_SIGNAL( itemTextChanged( const TQString & ) ), - this, - TQT_SLOT( columnTextChanged( const TQString & ) ) ); - - // Find TQLineEdit "colText" and connect - l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "colText" ); - TQObjectListIt columnsLineEditIt( *l ); - while ( (obj = columnsLineEditIt.current()) != 0 ) { - ++columnsLineEditIt; - TQObject::connect( columnsRename, - TQT_SIGNAL( itemTextChanged( const TQString & ) ), - obj, - TQT_SLOT( setText( const TQString & ) ) ); - } - delete l; -} - -void ListViewEditor::applyClicked() -{ - setupItems(); - PopulateListViewCommand *cmd = new PopulateListViewCommand( i18n( "Edit the Items and Columns of '%1'" ).arg( listview->name() ), - formwindow, listview, itemsPreview ); - cmd->execute(); - formwindow->commandHistory()->addCommand( cmd ); -} - -void ListViewEditor::okClicked() -{ - applyClicked(); - accept(); -} - -void ListViewEditor::columnClickable( bool b ) -{ - Column *c = findColumn( colPreview->item( colPreview->currentItem() ) ); - if ( !c ) - return; - c->clickable = b; -} - -void ListViewEditor::columnDownClicked() -{ - if ( colPreview->currentItem() == -1 || - colPreview->currentItem() > (int)colPreview->count() - 2 ) - return; - - colPreview->clearSelection(); - TQListBoxItem *i = colPreview->item( colPreview->currentItem() ); - TQListBoxItem *below = i->next(); - - colPreview->takeItem( i ); - colPreview->insertItem( i, below ); - - colPreview->setCurrentItem( i ); - colPreview->setSelected( i, TRUE ); -} - -void ListViewEditor::columnPixmapChosen() -{ - Column *c = findColumn( colPreview->item( colPreview->currentItem() ) ); - if ( !c ) - return; - - TQPixmap pix; - if ( colPixmap->pixmap() ) - pix = qChoosePixmap( this, formwindow, *colPixmap->pixmap() ); - else - pix = qChoosePixmap( this, formwindow, TQPixmap() ); - - if ( pix.isNull() ) - return; - - c->pixmap = pix; - colPreview->blockSignals( TRUE ); - if ( !c->pixmap.isNull() ) - colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) ); - else - colPreview->changeItem( c->text, colPreview->index( c->item ) ); - c->item = colPreview->item( colPreview->currentItem() ); - colPixmap->setPixmap( c->pixmap ); - colPreview->blockSignals( FALSE ); - colDeletePixmap->setEnabled( TRUE ); -} - -void ListViewEditor::columnPixmapDeleted() -{ - Column *c = findColumn( colPreview->item( colPreview->currentItem() ) ); - if ( !c ) - return; - - c->pixmap = TQPixmap(); - colPreview->blockSignals( TRUE ); - if ( !c->pixmap.isNull() ) - colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) ); - else - colPreview->changeItem( c->text, colPreview->index( c->item ) ); - c->item = colPreview->item( colPreview->currentItem() ); - colPixmap->setText( "" ); - colPreview->blockSignals( FALSE ); - colDeletePixmap->setEnabled( FALSE ); -} - -void ListViewEditor::columnResizable( bool b ) -{ - Column *c = findColumn( colPreview->item( colPreview->currentItem() ) ); - if ( !c ) - return; - c->resizable = b; -} - -void ListViewEditor::columnTextChanged( const TQString &txt ) -{ - Column *c = findColumn( colPreview->item( colPreview->currentItem() ) ); - if ( !c ) - return; - - c->text = txt; - colPreview->blockSignals( TRUE ); - if ( !c->pixmap.isNull() ) - colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) ); - else - colPreview->changeItem( c->text, colPreview->index( c->item ) ); - c->item = colPreview->item( colPreview->currentItem() ); - colPreview->blockSignals( FALSE ); -} - -void ListViewEditor::columnUpClicked() -{ - if ( colPreview->currentItem() <= 0 ) - return; - - colPreview->clearSelection(); - TQListBoxItem *i = colPreview->item( colPreview->currentItem() ); - TQListBoxItem *above = i->prev(); - - colPreview->takeItem( above ); - colPreview->insertItem( above, i ); - - colPreview->setCurrentItem( i ); - colPreview->setSelected( i, TRUE ); -} - -void ListViewEditor::currentColumnChanged( TQListBoxItem *i ) -{ - Column *c = findColumn( i ); - if ( !i || !c ) { - colText->setEnabled( FALSE ); - colPixmap->setEnabled( FALSE ); - colDeletePixmap->setEnabled( FALSE ); - colText->blockSignals( TRUE ); - colText->setText( "" ); - colText->blockSignals( FALSE ); - colClickable->setEnabled( FALSE ); - colResizable->setEnabled( FALSE ); - return; - } - - colText->setEnabled( TRUE ); - colPixmap->setEnabled( TRUE ); - colDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() ); - colClickable->setEnabled( TRUE ); - colResizable->setEnabled( TRUE ); - - colText->blockSignals( TRUE ); - colText->setText( c->text ); - colText->blockSignals( FALSE ); - if ( !c->pixmap.isNull() ) - colPixmap->setPixmap( c->pixmap ); - else - colPixmap->setText( "" ); - colClickable->setChecked( c->clickable ); - colResizable->setChecked( c->resizable ); -} - -void ListViewEditor::newColumnClicked() -{ - Column col; - col.text = i18n( "New Column" ); - col.pixmap = TQPixmap(); - col.clickable = TRUE; - col.resizable = TRUE; - if ( !col.pixmap.isNull() ) - col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text ); - else - col.item = new TQListBoxText( colPreview, col.text ); - columns.append( col ); - colPreview->setCurrentItem( col.item ); - colPreview->setSelected( col.item, TRUE ); -} - -void ListViewEditor::deleteColumnClicked() -{ - TQListBoxItem *i = colPreview->item( colPreview->currentItem() ); - if ( !i ) - return; - - for ( TQValueList::Iterator it = columns.begin(); it != columns.end(); ++it ) { - if ( ( *it ).item == i ) { - delete (*it).item; - columns.remove( it ); - break; - } - } - - if ( colPreview->currentItem() != -1 ) - colPreview->setSelected( colPreview->currentItem(), TRUE ); -} - -void ListViewEditor::currentItemChanged( TQListViewItem *i ) -{ - if ( !i ) { - itemText->setEnabled( FALSE ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); - itemColumn->setEnabled( FALSE ); - return; - } - - itemText->setEnabled( TRUE ); - itemChoosePixmap->setEnabled( TRUE ); - itemDeletePixmap->setEnabled( i->pixmap( itemColumn->value() ) && - !i->pixmap( itemColumn->value() )->isNull() ); - itemColumn->setEnabled( TRUE ); - - displayItem( i, itemColumn->value() ); -} - -void ListViewEditor::displayItem( TQListViewItem *i, int col ) -{ - itemText->blockSignals( TRUE ); - itemText->setText( i->text( col ) ); - itemText->blockSignals( FALSE ); - - itemPixmap->blockSignals( TRUE ); - if ( i->pixmap( col ) ) - itemPixmap->setPixmap( *i->pixmap( col ) ); - else - itemPixmap->setText( "" ); - itemPixmap->blockSignals( FALSE ); -} - -void ListViewEditor::itemColChanged( int col ) -{ - TQListViewItem *i = itemsPreview->currentItem(); - if ( !i ) - return; - - displayItem( i, col ); - itemDeletePixmap->setEnabled( i->pixmap( col ) && !i->pixmap( col )->isNull() ); -} - -void ListViewEditor::itemDeleteClicked() -{ - TQListViewItem *i = itemsPreview->currentItem(); - if ( !i ) - return; - - delete i; - if ( itemsPreview->firstChild() ) { - itemsPreview->setCurrentItem( itemsPreview->firstChild() ); - itemsPreview->setSelected( itemsPreview->firstChild(), TRUE ); - } -} - -void ListViewEditor::itemDownClicked() -{ - TQListViewItem *i = itemsPreview->currentItem(); - if ( !i ) - return; - - TQListViewItemIterator it( i ); - TQListViewItem *parent = i->parent(); - it++; - while ( it.current() ) { - if ( it.current()->parent() == parent ) - break; - it++; - } - - if ( !it.current() ) - return; - TQListViewItem *other = it.current(); - - i->moveItem( other ); -} - -void ListViewEditor::itemNewClicked() -{ - TQListViewItem *item = new TQListViewItem( itemsPreview ); - item->setText( 0, i18n( "Item" ) ); - item->setRenameEnabled( 0, TRUE ); - itemsPreview->setCurrentItem( item ); - itemsPreview->setSelected( item, TRUE ); - itemText->setFocus(); - itemText->selectAll(); -} - -void ListViewEditor::itemNewSubClicked() -{ - TQListViewItem *parent = itemsPreview->currentItem(); - TQListViewItem *item = 0; - if ( parent ) { - item = new TQListViewItem( parent ); - parent->setOpen( TRUE ); - } else { - item = new TQListViewItem( itemsPreview ); - } - item->setText( 0, i18n( "Subitem" ) ); - item->setRenameEnabled( 0, TRUE ); - itemsPreview->setCurrentItem( item ); - itemsPreview->setSelected( item, TRUE ); -} - -void ListViewEditor::itemPixmapChoosen() -{ - TQListViewItem *i = itemsPreview->currentItem(); - if ( !i ) - return; - - TQPixmap pix; - if ( itemPixmap->pixmap() ) - pix = qChoosePixmap( this, formwindow, *itemPixmap->pixmap() ); - else - pix = qChoosePixmap( this, formwindow, TQPixmap() ); - - if ( pix.isNull() ) - return; - - i->setPixmap( itemColumn->value(), TQPixmap( pix ) ); - itemPixmap->setPixmap( pix ); - itemDeletePixmap->setEnabled( TRUE ); -} - -void ListViewEditor::itemPixmapDeleted() -{ - TQListViewItem *i = itemsPreview->currentItem(); - if ( !i ) - return; - - i->setPixmap( itemColumn->value(), TQPixmap() ); - itemPixmap->setText( "" ); - itemDeletePixmap->setEnabled( FALSE ); -} - -void ListViewEditor::itemTextChanged( const TQString &txt ) -{ - TQListViewItem *i = itemsPreview->currentItem(); - if ( !i ) - return; - i->setText( itemColumn->value(), txt ); -} - -void ListViewEditor::itemUpClicked() -{ - TQListViewItem *i = itemsPreview->currentItem(); - if ( !i ) - return; - - TQListViewItemIterator it( i ); - TQListViewItem *parent = i->parent(); - --it; - while ( it.current() ) { - if ( it.current()->parent() == parent ) - break; - --it; - } - - if ( !it.current() ) - return; - TQListViewItem *other = it.current(); - - other->moveItem( i ); -} - -void ListViewEditor::itemRightClicked() -{ - TQListViewItem *i = itemsPreview->currentItem(); - if ( !i ) - return; - - TQListViewItemIterator it( i ); - TQListViewItem *parent = i->parent(); - parent = parent ? parent->firstChild() : itemsPreview->firstChild(); - if ( !parent ) - return; - it++; - while ( it.current() ) { - if ( it.current()->parent() == parent ) - break; - it++; - } - - if ( !it.current() ) - return; - TQListViewItem *other = it.current(); - - for ( int c = 0; c < itemsPreview->columns(); ++c ) { - TQString s = i->text( c ); - i->setText( c, other->text( c ) ); - other->setText( c, s ); - TQPixmap pix; - if ( i->pixmap( c ) ) - pix = *i->pixmap( c ); - if ( other->pixmap( c ) ) - i->setPixmap( c, *other->pixmap( c ) ); - else - i->setPixmap( c, TQPixmap() ); - other->setPixmap( c, pix ); - } - - itemsPreview->setCurrentItem( other ); - itemsPreview->setSelected( other, TRUE ); -} - -void ListViewEditor::itemLeftClicked() -{ - TQListViewItem *i = itemsPreview->currentItem(); - if ( !i ) - return; - - TQListViewItemIterator it( i ); - TQListViewItem *parent = i->parent(); - if ( !parent ) - return; - parent = parent->parent(); - --it; - while ( it.current() ) { - if ( it.current()->parent() == parent ) - break; - --it; - } - - if ( !it.current() ) - return; - TQListViewItem *other = it.current(); - - for ( int c = 0; c < itemsPreview->columns(); ++c ) { - TQString s = i->text( c ); - i->setText( c, other->text( c ) ); - other->setText( c, s ); - TQPixmap pix; - if ( i->pixmap( c ) ) - pix = *i->pixmap( c ); - if ( other->pixmap( c ) ) - i->setPixmap( c, *other->pixmap( c ) ); - else - i->setPixmap( c, TQPixmap() ); - other->setPixmap( c, pix ); - } - - itemsPreview->setCurrentItem( other ); - itemsPreview->setSelected( other, TRUE ); -} - -void ListViewEditor::setupColumns() -{ - TQHeader *h = listview->header(); - for ( int i = 0; i < (int)h->count(); ++i ) { - Column col; - col.text = h->label( i ); - col.pixmap = TQPixmap(); - if ( h->iconSet( i ) ) - col.pixmap = h->iconSet( i )->pixmap(); - col.clickable = h->isClickEnabled( i ); - col.resizable = h->isResizeEnabled( i ); - if ( !col.pixmap.isNull() ) - col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text ); - else - col.item = new TQListBoxText( colPreview, col.text ); - columns.append( col ); - } - - colText->setEnabled( FALSE ); - colPixmap->setEnabled( FALSE ); - colClickable->setEnabled( FALSE ); - colResizable->setEnabled( FALSE ); - - if ( colPreview->firstItem() ) - colPreview->setCurrentItem( colPreview->firstItem() ); - numColumns = colPreview->count(); -} - -void ListViewEditor::setupItems() -{ - itemColumn->setMinValue( 0 ); - itemColumn->setMaxValue( TQMAX( numColumns - 1, 0 ) ); - int i = 0; - TQHeader *header = itemsPreview->header(); - for ( TQListBoxItem *item = colPreview->firstItem(); item; item = item->next() ) { - Column *col = findColumn( item ); - if ( !col ) - continue; - if ( i >= itemsPreview->columns() ) - itemsPreview->addColumn( col->text ); - header->setLabel( i, col->pixmap, col->text ); - header->setResizeEnabled( col->resizable, i ); - header->setClickEnabled( col->clickable, i ); - ++i; - } - while ( itemsPreview->columns() > i ) - itemsPreview->removeColumn( i ); - - itemColumn->setValue( TQMIN( numColumns - 1, itemColumn->value() ) ); -} - -ListViewEditor::Column *ListViewEditor::findColumn( TQListBoxItem *i ) -{ - if ( !i ) - return 0; - - for ( TQValueList::Iterator it = columns.begin(); it != columns.end(); ++it ) { - if ( ( *it ).item == i ) - return &( *it ); - } - - return 0; -} - -void ListViewEditor::initTabPage( const TQString &page ) -{ - numColumns = colPreview->count(); - if ( page == i18n( "&Items" ) ) { - setupItems(); - if ( numColumns == 0 ) { - itemNew->setEnabled( FALSE ); - itemNewSub->setEnabled( FALSE ); - itemText->setEnabled( FALSE ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); - itemColumn->setEnabled( FALSE ); - } else { - itemNew->setEnabled( TRUE ); - itemNewSub->setEnabled( TRUE ); - } - } -} - -void ListViewEditor::emitItemRenamed( TQListViewItem *, int, const TQString & text ) -{ - emit itemRenamed( text ); // Relay signal ( to TQLineEdit ) -} diff --git a/tdevdesigner/designer/listvieweditorimpl.h b/tdevdesigner/designer/listvieweditorimpl.h deleted file mode 100644 index 64048c9d..00000000 --- a/tdevdesigner/designer/listvieweditorimpl.h +++ /dev/null @@ -1,103 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef LISTVIEWEDITORIMPL_H -#define LISTVIEWEDITORIMPL_H - -#include "listvieweditor.h" - -#include -#include -#include - -class FormWindow; - -class ListViewEditor : public ListViewEditorBase -{ - Q_OBJECT - - -public: - ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw ); - -signals: - void itemRenamed(const TQString &); - -protected slots: - void applyClicked(); - void columnClickable(bool); - void columnDownClicked(); - void columnPixmapChosen(); - void columnPixmapDeleted(); - void columnResizable(bool); - void columnTextChanged(const TQString &); - void columnUpClicked(); - void currentColumnChanged(TQListBoxItem*); - void currentItemChanged(TQListViewItem*); - void deleteColumnClicked(); - void itemColChanged(int); - void itemDeleteClicked(); - void itemDownClicked(); - void itemNewClicked(); - void itemNewSubClicked(); - void itemPixmapChoosen(); - void itemPixmapDeleted(); - void itemTextChanged(const TQString &); - void itemUpClicked(); - void itemLeftClicked(); - void itemRightClicked(); - void newColumnClicked(); - void okClicked(); - void initTabPage(const TQString &page); - void emitItemRenamed(TQListViewItem*, int, const TQString&); // signal relay - -private: - struct Column - { - TQListBoxItem *item; - TQString text; - TQPixmap pixmap; - bool clickable, resizable; - TQ_DUMMY_COMPARISON_OPERATOR( Column ) - }; - -private: - void setupColumns(); - void setupItems(); - Column *findColumn( TQListBoxItem *i ); - void transferItems( TQListView *from, TQListView *to ); - void displayItem( TQListViewItem *i, int col ); - -private: - TQListView *listview; - TQValueList columns; - int numColumns; - FormWindow *formwindow; - -}; - - -#endif diff --git a/tdevdesigner/designer/mainwindow.cpp b/tdevdesigner/designer/mainwindow.cpp deleted file mode 100644 index 3f53e004..00000000 --- a/tdevdesigner/designer/mainwindow.cpp +++ /dev/null @@ -1,3784 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "designerappiface.h" -#include "designerapp.h" - -#include "mainwindow.h" -#include "defs.h" -#include "globaldefs.h" -#include "formwindow.h" -#include "widgetdatabase.h" -#include "widgetfactory.h" -#include "propertyeditor.h" -#include "metadatabase.h" -#include "resource.h" -#include "hierarchyview.h" -#include "newformimpl.h" -#include "workspace.h" -#include "about.h" -#include "multilineeditorimpl.h" -#include "wizardeditorimpl.h" -#include "outputwindow.h" -#include "actioneditorimpl.h" -#include "actiondnd.h" -#include "project.h" -#include "projectsettingsimpl.h" -#include "tqwidgetfactory.h" -#include "pixmapcollection.h" -#include "qcompletionedit.h" -#include "sourcefile.h" -#include "orderindicator.h" -#include -#include "widgetaction.h" -#include "propertyobject.h" -#include "popupmenueditor.h" -#include "menubareditor.h" - -#include "startdialog.h" -#include "createtemplate.h" -#include "editfunctions.h" -//#include "connectionviewer.h" -#include "formsettings.h" -#include "preferences.h" -#include "pixmapcollectioneditor.h" -#ifndef TQT_NO_SQL -#include "dbconnectionimpl.h" -#endif -//#include "connectioneditor.h" -#include "customwidgeteditorimpl.h" -#include "paletteeditorimpl.h" -#include "listboxeditorimpl.h" -#include "listvieweditorimpl.h" -#include "iconvieweditorimpl.h" -#include "tableeditorimpl.h" -#include "multilineeditor.h" -#include "finddialog.h" -#include "replacedialog.h" -#include "gotolinedialog.h" -#include "designeraction.h" - -#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 "tdevdesigner_part.h" - -static bool mblockNewForms = FALSE; -extern TQMap *qwf_forms; -extern TQString *qwf_language; -extern bool qwf_execute_code; -extern bool qwf_stays_on_top; -extern void set_splash_status( const TQString &txt ); -extern TQObject* qwf_form_object; -extern TQString *qwf_plugin_dir; - -MainWindow *MainWindow::self = 0; - -TQString assistantPath() -{ - TQString path = TQDir::cleanDirPath( TQString( tqInstallPathBins() ) + - TQDir::separator() ); - return path; -} - - -static TQString textNoAccel( const TQString& text) -{ - TQString t = text; - int i; - while ( (i = t.find('&') )>= 0 ) { - t.remove(i,1); - } - return t; -} - - -MainWindow::MainWindow( TDevDesignerPart *part, bool asClient, bool single, const TQString &plgDir ) - : TQMainWindow( 0, "designer_mainwindow"/*, WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader*/ ), - grd( 10, 10 ), sGrid( TRUE ), snGrid( TRUE ), restoreConfig( TRUE ), splashScreen( TRUE ), - fileFilter( i18n( "TQt User-Interface Files (*.ui)" ) ), client( asClient ), - previewing( FALSE ), databaseAutoEdit( FALSE ), autoSaveEnabled( FALSE ), autoSaveInterval( 1800 ), m_part(part) -{ -// extern void qInitImages_designercore(); -// qInitImages_designercore(); - - self = this; - setPluginDirectory( plgDir ); - customWidgetToolBar = customWidgetToolBar2 = 0; - guiStuffVisible = TRUE; - editorsReadOnly = FALSE; - sSignalHandlers = TRUE; - init_colors(); - shStartDialog = FALSE; - - desInterface = new DesignerInterfaceImpl( this ); - desInterface->addRef(); - inDebugMode = FALSE; - savePluginPaths = FALSE; - - updateFunctionsTimer = new TQTimer( this ); - connect( updateFunctionsTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( doFunctionsChanged() ) ); - - autoSaveTimer = new TQTimer( this ); - connect( autoSaveTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( fileSaveAll() ) ); - - set_splash_status( "Loading Plugins..." ); - setupPluginManagers(); - -/* if ( !single ) - tqApp->setMainWidget( this );*/ - TQWidgetFactory::addWidgetFactory( new CustomWidgetFactory ); -#ifndef TQ_WS_MACX - setIcon( BarIcon( "designer_appicon.png", TDevDesignerPartFactory::instance() ) ); -#endif - - actionGroupTools = 0; - prefDia = 0; - windowMenu = 0; - hierarchyView = 0; - actionEditor = 0; - currentProject = 0; - wspace = 0; - oWindow = 0; - singleProject = single; - - statusBar()->clear(); -#if defined(TQT_NON_COMMERCIAL) - statusBar()->addWidget( new TQLabel(i18n("Ready - This is the non-commercial version of TQt - " - "For commercial evaluations, use the help menu to register with Trolltech."), statusBar()), 1 ); -#else - statusBar()->addWidget( new TQLabel("Ready", statusBar()), 1 ); -#endif - - - set_splash_status( "Setting up GUI..." ); - setupMDI(); - setupMenuBar(); - - setupToolbox(); - - setupFileActions(); - setupEditActions(); - setupProjectActions(); - setupSearchActions(); - layoutToolBar = new TQToolBar( this, "Layout" ); - layoutToolBar->setCloseMode( TQDockWindow::Undocked ); - addToolBar( layoutToolBar, i18n( "Layout" ) ); - interpreterPluginManager = 0; - setupToolActions(); - setupLayoutActions(); - setupPreviewActions(); - setupOutputWindow(); - setupActionManager(); - setupWindowActions(); - - setupWorkspace(); - setupHierarchyView(); - setupPropertyEditor(); - setupActionEditor(); - - setupHelpActions(); - - setupRMBMenus(); - - connect( this, TQT_SIGNAL( projectChanged() ), this, TQT_SLOT( emitProjectSignals() ) ); - connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), this, TQT_SLOT( emitProjectSignals() ) ); - - emit hasActiveForm( FALSE ); - emit hasActiveWindow( FALSE ); - - lastPressWidget = 0; - tqApp->installEventFilter( this ); - - TQSize as( tqApp->desktop()->size() ); - as -= TQSize( 30, 30 ); - resize( TQSize( 1200, 1000 ).boundedTo( as ) ); - - connect( tqApp->clipboard(), TQT_SIGNAL( dataChanged() ), - this, TQT_SLOT( clipboardChanged() ) ); - clipboardChanged(); - layoutChilds = FALSE; - layoutSelected = FALSE; - breakLayout = FALSE; - backPix = TRUE; - - set_splash_status( "Loading User Settings..." ); - readConfig(); - // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties) - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); - delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), this, 0, FALSE ); - delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLABEL_OBJECT_NAME_STRING ), this, 0, FALSE ); - delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQTABWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); - delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE ); - delete w; - setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); - actionEditor->parentWidget()->hide(); - - assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) ); - - statusBar()->setSizeGripEnabled( TRUE ); - set_splash_status( "Initialization Done." ); -/* if ( shStartDialog ) - TQTimer::singleShot( 0, this, TQT_SLOT( showStartDialog() ));*/ - - if ( autoSaveEnabled ) - autoSaveTimer->start( autoSaveInterval * 1000 ); - - setFocusPolicy( TQ_StrongFocus ); -} - -MainWindow::~MainWindow() -{ - TQValueList::Iterator tit; - for ( tit = preferenceTabs.begin(); tit != preferenceTabs.end(); ++tit ) { - Tab t = *tit; - delete t.w; - } - for ( tit = projectTabs.begin(); tit != projectTabs.end(); ++tit ) { - Tab t = *tit; - delete t.w; - } - - TQMap< TQAction*, Project* >::Iterator it = projects.begin(); - while ( it != projects.end() ) { - Project *p = *it; - ++it; - delete p; - } - projects.clear(); - - delete oWindow; - oWindow = 0; - - desInterface->release(); - desInterface = 0; - - delete actionPluginManager; - delete preferencePluginManager; - delete projectSettingsPluginManager; - delete interpreterPluginManager; - delete templateWizardPluginManager; - delete editorPluginManager; - delete sourceTemplatePluginManager; - - MetaDataBase::clearDataBase(); - if(self == this) - self = 0; -} - -void MainWindow::setupMDI() -{ - TQVBox *vbox = new TQVBox( this ); - setCentralWidget( vbox ); - vbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - vbox->setMargin( 1 ); - vbox->setLineWidth( 1 ); - qworkspace = new TQWorkspace( vbox ); - qworkspace->setPaletteBackgroundPixmap( UserIcon( "designer_background.png", TDevDesignerPartFactory::instance() ) ); - qworkspace->setScrollBarsEnabled( TRUE ); - connect( qworkspace, TQT_SIGNAL( windowActivated( TQWidget * ) ), - this, TQT_SLOT( activeWindowChanged( TQWidget * ) ) ); - lastActiveFormWindow = 0; - qworkspace->setAcceptDrops( TRUE ); -} - -void MainWindow::setupMenuBar() -{ - menubar = menuBar(); -} - -void MainWindow::setupPropertyEditor() -{ - TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - propertyEditor = new PropertyEditor( dw ); - addToolBar( dw, TQt::DockRight ); - dw->setWidget( propertyEditor ); - dw->setFixedExtentWidth( 250 ); - dw->setCaption( i18n( "Property Editor/Signal Handlers" ) ); - TQWhatsThis::add( propertyEditor, - i18n("The Property Editor" - "

    You can change the appearance and behavior of the selected widget in the " - "property editor.

    " - "

    You can set properties for components and forms at design time and see the " - "immediately see the effects of the changes. " - "Each property has its own editor which (depending on the property) can be used " - "to enter " - "new values, open a special dialog, or to select values from a predefined list. " - "Click F1 to get detailed help for the selected property.

    " - "

    You can resize the columns of the editor by dragging the separators in the " - "list's header.

    " - "

    Signal Handlers

    " - "

    In the Signal Handlers tab you can define connections between " - "the signals emitted by widgets and the slots in the form. " - "(These connections can also be made using the connection tool.)" ) ); - dw->show(); -} - -void MainWindow::setupOutputWindow() -{ - TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - addToolBar( dw, TQt::DockBottom ); - oWindow = new OutputWindow( dw ); - dw->setWidget( oWindow ); - dw->setFixedExtentHeight( 150 ); - dw->setCaption( i18n( "Output Window" ) ); -} - -void MainWindow::setupHierarchyView() -{ - if ( hierarchyView ) - return; - TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - hierarchyView = new HierarchyView( dw ); - addToolBar( dw, TQt::DockRight ); - dw->setWidget( hierarchyView ); - - dw->setCaption( i18n( "Object Explorer" ) ); - dw->setFixedExtentWidth( 250 ); - TQWhatsThis::add( hierarchyView, - i18n("The Object Explorer" - "

    The Object Explorer provides an overview of the relationships " - "between the widgets in a form. You can use the clipboard functions using " - "a context menu for each item in the view. It is also useful for selecting widgets " - "in forms that have complex layouts.

    " - "

    The columns can be resized by dragging the separator in the list's header.

    " - "

    The second tab shows all the form's slots, class variables, includes, etc.

    ") ); - dw->show(); -} - -void MainWindow::setupWorkspace() -{ - TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - TQVBox *vbox = new TQVBox( dw ); - QCompletionEdit *edit = new QCompletionEdit( vbox ); - TQToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) ); - TQAccel *a = new TQAccel( this ); - a->connectItem( a->insertItem( ALT + Key_B ), edit, TQT_SLOT( setFocus() ) ); - wspace = new Workspace( vbox, this ); - wspace->setBufferEdit( edit ); - wspace->setCurrentProject( currentProject ); - addToolBar( dw, TQt::DockRight ); - dw->setWidget( vbox ); - - dw->setCaption( i18n( "Project Overview" ) ); - TQWhatsThis::add( wspace, i18n("The Project Overview Window" - "

    The Project Overview Window displays all the current " - "project, including forms and source files.

    " - "

    Use the search field to rapidly switch between files.

    ")); - dw->setFixedExtentHeight( 100 ); - dw->show(); -} - -void MainWindow::setupActionEditor() -{ - TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, 0 ); - addDockWindow( dw, TQt::DockTornOff ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - actionEditor = new ActionEditor( dw ); - dw->setWidget( actionEditor ); - actionEditor->show(); - dw->setCaption( i18n( "Action Editor" ) ); - TQWhatsThis::add( actionEditor, i18n("The Action Editor" - "

    The Action Editor is used to add actions and action groups to " - "a form, and to connect actions to slots. Actions and action " - "groups can be dragged into menus and into toolbars, and may " - "feature keyboard shortcuts and tooltips. If actions have pixmaps " - "these are displayed on toolbar buttons and besides their names in " - "menus.

    " ) ); - dw->hide(); - setAppropriate( dw, FALSE ); -} - -void MainWindow::setupToolbox() -{ - TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - addToolBar( dw, TQt::DockLeft ); - toolBox = new TQToolBox( dw ); - dw->setWidget( toolBox ); - dw->setFixedExtentWidth( 160 ); - dw->setCaption( i18n( "Toolbox" ) ); - dw->show(); - setDockEnabled( dw, TQt::DockTop, FALSE ); - setDockEnabled( dw, TQt::DockBottom, FALSE ); - commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" ); - commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame ); - commonWidgetsToolBar->setOrientation( Qt::Vertical ); - commonWidgetsToolBar->setBackgroundMode(PaletteBase); - toolBox->addItem( commonWidgetsToolBar, "Common Widgets" ); -} - -void MainWindow::setupRMBMenus() -{ - rmbWidgets = new TQPopupMenu( this ); - actionEditCut->addTo( rmbWidgets ); - actionEditCopy->addTo( rmbWidgets ); - actionEditPaste->addTo( rmbWidgets ); - actionEditDelete->addTo( rmbWidgets ); -#if 0 - rmbWidgets->insertSeparator(); - actionEditLower->addTo( rmbWidgets ); - actionEditRaise->addTo( rmbWidgets ); -#endif - rmbWidgets->insertSeparator(); - actionEditAdjustSize->addTo( rmbWidgets ); - actionEditHLayout->addTo( rmbWidgets ); - actionEditVLayout->addTo( rmbWidgets ); - actionEditGridLayout->addTo( rmbWidgets ); - actionEditSplitHorizontal->addTo( rmbWidgets ); - actionEditSplitVertical->addTo( rmbWidgets ); - actionEditBreakLayout->addTo( rmbWidgets ); - rmbWidgets->insertSeparator(); - if ( !singleProjectMode() ) - actionEditConnections->addTo( rmbWidgets ); - actionEditSource->addTo( rmbWidgets ); - - rmbFormWindow = new TQPopupMenu( this ); - actionEditPaste->addTo( rmbFormWindow ); - actionEditSelectAll->addTo( rmbFormWindow ); - actionEditAccels->addTo( rmbFormWindow ); - rmbFormWindow->insertSeparator(); - actionEditAdjustSize->addTo( rmbFormWindow ); - actionEditHLayout->addTo( rmbFormWindow ); - actionEditVLayout->addTo( rmbFormWindow ); - actionEditGridLayout->addTo( rmbFormWindow ); - actionEditBreakLayout->addTo( rmbFormWindow ); - rmbFormWindow->insertSeparator(); - if ( !singleProjectMode() ) { - actionEditFunctions->addTo( rmbFormWindow ); - actionEditConnections->addTo( rmbFormWindow ); - } - actionEditSource->addTo( rmbFormWindow ); - rmbFormWindow->insertSeparator(); - actionEditFormSettings->addTo( rmbFormWindow ); -} - -void MainWindow::toolSelected( TQAction* action ) -{ - actionCurrentTool = action; - emit currentToolChanged(); - if ( formWindow() ) - formWindow()->commandHistory()->emitUndoRedo(); -} - -int MainWindow::currentTool() const -{ - if ( !actionCurrentTool ) - return POINTER_TOOL; - return TQString::fromLatin1(actionCurrentTool->name()).toInt(); -} - -void MainWindow::runProjectPrecondition() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - e->save(); - e->saveBreakPoints(); - } - fileSaveProject(); - - if ( currentTool() == ORDER_TOOL ) - resetTool(); - oWindow->clearErrorMessages(); - oWindow->clearDebug(); - oWindow->showDebugTab(); - previewing = TRUE; -} - -void MainWindow::runProjectPostcondition( TQObjectList *l ) -{ - inDebugMode = TRUE; - debuggingForms = *l; - enableAll( FALSE ); - for ( SourceEditor *e2 = sourceEditors.first(); e2; e2 = sourceEditors.next() ) { - if ( e2->project() == currentProject ) - e2->editorInterface()->setMode( EditorInterface::Debugging ); - } -} - -TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) -{ - qwf_execute_code = FALSE; - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->save(); - if ( currentTool() == ORDER_TOOL ) - resetTool(); - - FormWindow *fw = formWindow(); - if ( !fw ) - return 0; - - TQStringList databases; - TQPtrDictIterator wit( *fw->widgets() ); - while ( wit.current() ) { - TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(wit.current()), "database" ).toStringList(); - if ( !lst.isEmpty() ) - databases << lst [ 0 ]; - ++wit; - } - - if ( fw->project() ) { - TQStringList::ConstIterator it; - for ( it = databases.begin(); it != databases.end(); ++it ) - fw->project()->openDatabase( *it, FALSE ); - } - TQApplication::setOverrideCursor( WaitCursor ); - - TQCString s; - TQBuffer buffer( s ); - buffer.open( IO_WriteOnly ); - Resource resource( this ); - resource.setWidget( fw ); - TQValueList images; - resource.save( TQT_TQIODEVICE(&buffer) ); - - buffer.close(); - buffer.open( IO_ReadOnly ); - - TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&buffer) ); - if ( w ) { - previewedForm = w; - if ( palet ) { - if ( style ) - style->polish( *palet ); - w->setPalette( *palet ); - } - - if ( style ) - w->setStyle( style ); - - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( style ) - ( (TQWidget*)o )->setStyle( style ); - } - delete l; - - w->move( fw->mapToGlobal( TQPoint(0,0) ) ); - ((MainWindow*)w )->setWFlags( WDestructiveClose ); - previewing = TRUE; - w->show(); - previewing = FALSE; - TQApplication::restoreOverrideCursor(); - return w; - } - TQApplication::restoreOverrideCursor(); - return 0; -} - -void MainWindow::previewForm() -{ - TQWidget* w = previewFormInternal(); - if ( w ) - w->show(); -} - -void MainWindow::previewForm( const TQString & style ) -{ - TQStyle* st = TQStyleFactory::create( style ); - TQWidget* w = 0; - if ( style == "Motif" ) { - TQPalette p( TQColor( 192, 192, 192 ) ); - w = previewFormInternal( st, &p ); - } else if ( style == "Windows" ) { - TQPalette p( TQColor( 212, 208, 200 ) ); - w = previewFormInternal( st, &p ); - } else if ( style == "Platinum" ) { - TQPalette p( TQColor( 220, 220, 220 ) ); - w = previewFormInternal( st, &p ); - } else if ( style == "CDE" ) { - TQPalette p( TQColor( 75, 123, 130 ) ); - p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Inactive, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Disabled, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Active, TQColorGroup::Highlight, TQt::white ); - p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Inactive, TQColorGroup::Highlight, TQt::white ); - p.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Disabled, TQColorGroup::Highlight, TQt::white ); - p.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Active, TQColorGroup::Foreground, TQt::white ); - p.setColor( TQPalette::Active, TQColorGroup::Text, TQt::white ); - p.setColor( TQPalette::Active, TQColorGroup::ButtonText, TQt::white ); - p.setColor( TQPalette::Inactive, TQColorGroup::Foreground, TQt::white ); - p.setColor( TQPalette::Inactive, TQColorGroup::Text, TQt::white ); - p.setColor( TQPalette::Inactive, TQColorGroup::ButtonText, TQt::white ); - p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray ); - p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray ); - p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray ); - - w = previewFormInternal( st, &p ); - } else if ( style == "SGI" ) { - TQPalette p( TQColor( 220, 220, 220 ) ); - w = previewFormInternal( st, &p ); - } else if ( style == "MotifPlus" ) { - TQColor gtkfg(0x00, 0x00, 0x00); - TQColor gtkdf(0x75, 0x75, 0x75); - TQColor gtksf(0xff, 0xff, 0xff); - TQColor gtkbs(0xff, 0xff, 0xff); - TQColor gtkbg(0xd6, 0xd6, 0xd6); - TQColor gtksl(0x00, 0x00, 0x9c); - TQColorGroup active(gtkfg, // foreground - gtkbg, // button - gtkbg.light(), // light - gtkbg.dark(142), // dark - gtkbg.dark(110), // mid - gtkfg, // text - gtkfg, // bright text - gtkbs, // base - gtkbg), // background - disabled(gtkdf, // foreground - gtkbg, // button - gtkbg.light(), // light - gtkbg.dark(156), // dark - gtkbg.dark(110), // mid - gtkdf, // text - gtkdf, // bright text - gtkbs, // base - gtkbg); // background - - TQPalette pal(active, disabled, active); - - pal.setColor(TQPalette::Active, TQColorGroup::Highlight, - gtksl); - pal.setColor(TQPalette::Active, TQColorGroup::HighlightedText, - gtksf); - pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight, - gtksl); - pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, - gtksf); - pal.setColor(TQPalette::Disabled, TQColorGroup::Highlight, - gtksl); - pal.setColor(TQPalette::Disabled, TQColorGroup::HighlightedText, - gtkdf); - w = previewFormInternal( st, &pal ); - } else { - w = previewFormInternal( st ); - } - - if ( !w ) - return; - w->insertChild( TQT_TQOBJECT(st) ); - w->show(); -} - -void MainWindow::helpContents() -{ - TQWidget *focusWidget = tqApp->focusWidget(); - bool showClassDocu = TRUE; - while ( focusWidget ) { - if ( focusWidget->isA( "PropertyList" ) ) { - showClassDocu = FALSE; - break; - } - focusWidget = focusWidget->parentWidget(); - } - - TQString source = "designer-manual.html"; - if ( propertyDocumentation.isEmpty() ) { - TQString indexFile = documentationPath() + "/propertyindex"; - TQFile f( indexFile ); - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - while ( !ts.eof() ) { - TQString s = ts.readLine(); - int from = s.find( "\"" ); - if ( from == -1 ) - continue; - int to = s.findRev( "\"" ); - if ( to == -1 ) - continue; - propertyDocumentation[ s.mid( from + 1, to - from - 1 ) ] = s.mid( to + 2 ) + "-prop"; - } - f.close(); - } - } - - if ( propertyEditor->widget() && !showClassDocu ) { - if ( !propertyEditor->currentProperty().isEmpty() ) { - TQMetaObject* mo = propertyEditor->metaObjectOfCurrentProperty(); - TQString s; - TQString cp = propertyEditor->currentProperty(); - if ( cp == "layoutMargin" ) { - source = propertyDocumentation[ "TQLayout/margin" ]; - } else if ( cp == "layoutSpacing" ) { - source = propertyDocumentation[ "TQLayout/spacing" ]; - } else if ( cp == "toolTip" ) { - source = "tqtooltip.html#details"; - } else if ( mo && qstrcmp( mo->className(), "Spacer" ) == 0 ) { - if ( cp != "name" ) - source = "tqsizepolicy.html#SizeType"; - else - source = propertyDocumentation[ "TQObject/name" ]; - } else { - while ( mo && !propertyDocumentation.contains( ( s = TQString( mo->className() ) + "/" + cp ) ) ) - mo = mo->superClass(); - if ( mo ) - source = "p:" + propertyDocumentation[s]; - } - } - - TQString classname = WidgetFactory::classNameOf( propertyEditor->widget() ); - if ( source.isEmpty() || source == "designer-manual.html" ) { - if ( classname.lower() == "spacer" ) - source = "qspaceritem.html#details"; - else if ( classname == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) - source = "layout.html"; - else - source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details"; - } - } else if ( propertyEditor->widget() ) { - source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details"; - } - - if ( !source.isEmpty() ) - assistant->showPage( documentationPath() + source ); -} - -void MainWindow::helpManual() -{ - assistant->showPage( documentationPath() + "/designer-manual.html" ); -} - -void MainWindow::helpAbout() -{ - AboutDialog dlg( this, 0, TRUE ); - if ( singleProjectMode() ) { - dlg.aboutPixmap->setText( "" ); - dlg.aboutVersion->setText( "" ); - dlg.aboutCopyright->setText( "" ); - LanguageInterface *iface = MetaDataBase::languageInterface( eProject->language() ); - dlg.aboutLicense->setText( iface->aboutText() ); - } - dlg.aboutVersion->setText(TQString("Version ") + TQString(TQT_VERSION_STR)); - dlg.resize( dlg.width(), dlg.layout()->heightForWidth(dlg.width()) ); - dlg.exec(); -} - -void MainWindow::helpAboutQt() -{ - TQMessageBox::aboutTQt( this, "TQt Designer" ); -} - -#if defined(_WS_WIN_) -#include -#include -#endif - -void MainWindow::helpRegister() -{ -#if defined(_WS_WIN_) - HKEY key; - HKEY subkey; - long res; - DWORD type; - DWORD size = 255; - TQString command; - TQString sub( "htmlfile\\shell" ); -#if defined(UNICODE) - if ( TQApplication::winVersion() & TQt::WV_NT_based ) { - unsigned char data[256]; - res = RegOpenKeyExW( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key ); - res = RegOpenKeyExW( key, (TCHAR*)sub.ucs2(), 0, KEY_READ, &subkey ); - res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size ); - command = qt_winTQString( data ) + "\\command"; - size = 255; - res = RegOpenKeyExW( subkey, (TCHAR*)command.ucs2(), 0, KEY_READ, &subkey ); - res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size ); - command = qt_winTQString( data ); - } else -#endif - { - unsigned char data[256]; - res = RegOpenKeyExA( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key ); - res = RegOpenKeyExA( key, sub.local8Bit(), 0, KEY_READ, &subkey ); - res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size ); - command = TQString::fromLocal8Bit( (const char*) data ) + "\\command"; - size = 255; - res = RegOpenKeyExA( subkey, command.local8Bit(), 0, KEY_READ, &subkey ); - res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size ); - command = TQString::fromLocal8Bit( (const char*) data ); - } - - res = RegCloseKey( subkey ); - res = RegCloseKey( key ); - - TQProcess process( command + " www.trolltech.com/products/download/eval/evaluation.html" ); - if ( !process.start() ) - TQMessageBox::information( this, "Register TQt", "Launching your web browser failed.\n" - "To register TQt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" ); -#endif -} - -void MainWindow::showProperties( TQObject *o ) -{ - if ( !o->isWidgetType() ) { - propertyEditor->setWidget( o, lastActiveFormWindow ); - if ( lastActiveFormWindow ) - hierarchyView->setFormWindow( lastActiveFormWindow, TQT_TQOBJECT(lastActiveFormWindow->mainContainer()) ); - else - hierarchyView->setFormWindow( 0, 0 ); - return; - } - TQWidget *w = (TQWidget*)o; - setupHierarchyView(); - FormWindow *fw = (FormWindow*)isAFormWindowChild( TQT_TQOBJECT(w) ); - if ( fw ) { - if ( fw->numSelectedWidgets() > 1 ) { - TQWidgetList wl = fw->selectedWidgets(); - if ( wl.first() != w ) { - wl.removeRef( w ); - wl.insert( 0, w ); - } - propertyEditor->setWidget( new PropertyObject( wl ), fw ); - } else { - propertyEditor->setWidget( TQT_TQOBJECT(w), fw ); - } - hierarchyView->setFormWindow( fw, TQT_TQOBJECT(w) ); - } else { - propertyEditor->setWidget( 0, 0 ); - hierarchyView->setFormWindow( 0, 0 ); - } - - if ( currentTool() == POINTER_TOOL && fw && - ( !qworkspace->activeWindow() || !::tqqt_cast(qworkspace->activeWindow()) ) ) - fw->setFocus(); -} - -void MainWindow::resetTool() -{ - actionPointerTool->setOn( TRUE ); -} - -void MainWindow::updateProperties( TQObject * ) -{ - if ( propertyEditor ) - propertyEditor->refetchData(); -} - -bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) -{ - if ( ::tqqt_cast(o) || ::tqqt_cast(o) || - ( o && - ( ::tqqt_cast(o->parent()) || - ::tqqt_cast(o->parent()) ) ) ) { - - if ( e->type() == TQEvent::Accel && ::tqqt_cast(o) ) { - return TRUE; // consume accel events - } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast(o) ) { - TQPoint pos = ((TQMouseEvent*)e)->pos(); - MenuBarEditor *m = ::tqqt_cast(o); - showProperties( o ); - if ( m->findItem( pos ) >= m->count() ) - m->setFocus(); - } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast(o) ) { - PopupMenuEditor *m = ::tqqt_cast(o); - PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() ); - if ( m->find( i->action() ) != -1 && !i->isSeparator() ) - showProperties( i->action() ); - } - return TQMainWindow::eventFilter( o, e ); - } - - if ( !o || !e || !o->isWidgetType() ) - return TQMainWindow::eventFilter( o, e ); - - TQWidget *w = 0; - bool passiveInteractor; - switch ( e->type() ) { - case TQEvent::AccelOverride: - if ( ( (TQKeyEvent*)e )->key() == Key_F1 && - ( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) { - w = (TQWidget*)o; - while ( w ) { - if ( ::tqqt_cast(w) ) - break; - w = w->parentWidget( TRUE ); - } - if ( w ) { - propertyEditor->propertyList()->showCurrentWhatsThis(); - ( (TQKeyEvent*)e )->accept(); - return TRUE; - } - } - break; - case TQEvent::Accel: - if ( ( ( (TQKeyEvent*)e )->key() == Key_A || - ( (TQKeyEvent*)e )->key() == Key_E ) && - ( (TQKeyEvent*)e )->state() & ControlButton ) { - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (TQKeyEvent*)e )->ignore(); - return TRUE; - } - } - break; - case TQEvent::ContextMenu: - case TQEvent::MouseButtonPress: - if ( o && currentTool() == POINTER_TOOL && - ( ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) || - ( ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) && - o->parent() - && ( ::tqqt_cast(o->parent()) - || ::tqqt_cast(o->parent())) ) ) { - TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast(w) || - ::tqqt_cast(w) || - ::tqqt_cast(w) || - ::tqqt_cast(w) ) - w = w->parentWidget(); - TQWidget *pw = w->parentWidget(); - while ( pw ) { - if ( ::tqqt_cast(pw) ) { - ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) ); - if ( !::tqqt_cast(o) ) - return ( !::tqqt_cast(o) && - !::tqqt_cast(o) && - !::tqqt_cast(o) && - !::tqqt_cast(o) ); - } - pw = pw->parentWidget(); - } - } - if ( o && ( ::tqqt_cast(o) || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) - && e->type() == TQEvent::ContextMenu ) - break; - if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) - break; - if ( ::tqqt_cast(o) ) - break; - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - if ( !w->hasFocus() ) - w->setFocus(); - passiveInteractor = WidgetFactory::isPassiveInteractor( o ); - if ( !passiveInteractor || currentTool() != ORDER_TOOL ) { - if( e->type() == TQEvent::ContextMenu ) { - ( (FormWindow*)w )->handleContextMenu( (TQContextMenuEvent*)e, - ( (FormWindow*)w )->designerWidget( o ) ); - return TRUE; - } else { - ( (FormWindow*)w )->handleMousePress( (TQMouseEvent*)e, - ( (FormWindow*)w )->designerWidget( o ) ); - } - } - lastPressWidget = (TQWidget*)o; - if ( passiveInteractor ) - TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); - if ( currentTool() == CONNECT_TOOL || currentTool() == BUDDY_TOOL ) - return TRUE; - return !passiveInteractor; - case TQEvent::MouseButtonRelease: - lastPressWidget = 0; - if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) - break; - if ( ::tqqt_cast(o) ) - break; - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - passiveInteractor = WidgetFactory::isPassiveInteractor( o ); - if ( !passiveInteractor ) - ( (FormWindow*)w )->handleMouseRelease( (TQMouseEvent*)e, - ( (FormWindow*)w )->designerWidget( o ) ); - if ( passiveInteractor ) { - TQTimer::singleShot( 0, this, TQT_SLOT( selectionChanged() ) ); - TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); - } - return !passiveInteractor; - case TQEvent::MouseMove: - if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) - break; - w = isAFormWindowChild( o ); - if ( lastPressWidget != (TQWidget*)o && w && - !::tqqt_cast(o) && !::tqqt_cast(o) && - !::tqqt_cast(o) && !::tqqt_cast(o) && - !::tqqt_cast(o) ) - return TRUE; - if ( o && ::tqqt_cast(o) ) - break; - if ( lastPressWidget != (TQWidget*)o || - ( !w || ::tqqt_cast(o) ) || - ::tqqt_cast(o) ) - break; - passiveInteractor = WidgetFactory::isPassiveInteractor( o ); - if ( !passiveInteractor ) - ( (FormWindow*)w )->handleMouseMove( (TQMouseEvent*)e, - ( (FormWindow*)w )->designerWidget( o ) ); - return !passiveInteractor; - case TQEvent::KeyPress: - if ( ( (TQKeyEvent*)e )->key() == Key_Escape && currentTool() != POINTER_TOOL ) { - resetTool(); - return FALSE; - } - if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) { - if ( ::tqqt_cast(qWorkspace()->activeWindow()) ) { - qWorkspace()->activeWindow()->setFocus(); - return TRUE; - } - } - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - ( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); - if ( ((TQKeyEvent*)e)->isAccepted() ) - return TRUE; - break; - case TQEvent::MouseButtonDblClick: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) { - if ( ::tqqt_cast(o) && ((TQToolButton*)o)->isOn() && - o->parent() && ::tqqt_cast(o->parent()) && formWindow() ) - formWindow()->setToolFixed(); - break; - } - if ( currentTool() == ORDER_TOOL ) { - ( (FormWindow*)w )->handleMouseDblClick( (TQMouseEvent*)e, - ( (FormWindow*)w )->designerWidget( o ) ); - return TRUE; - } - if ( !WidgetFactory::isPassiveInteractor( o ) && ( (FormWindow*)w )->formFile() ) - return openEditor( ( (FormWindow*)w )->designerWidget( o ), (FormWindow*)w ); - return TRUE; - case TQEvent::KeyRelease: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - ( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); - if ( ((TQKeyEvent*)e)->isAccepted() ) - return TRUE; - break; - case TQEvent::Hide: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - if ( ( (FormWindow*)w )->isWidgetSelected( TQT_TQOBJECT(o) ) ) - ( (FormWindow*)w )->selectWidget( TQT_TQOBJECT(o), FALSE ); - break; - case TQEvent::Enter: - case TQEvent::Leave: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - return TRUE; - case TQEvent::Resize: - case TQEvent::Move: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) { - ( (FormWindow*)w )->updateSelection( (TQWidget*)o ); - if ( e->type() != TQEvent::Resize ) - ( (FormWindow*)w )->updateChildSelections( (TQWidget*)o ); - } - break; - case TQEvent::Close: - if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) { - if ( lastActiveFormWindow && lastActiveFormWindow->project() ) { - TQStringList lst = - MetaDataBase::fakeProperty( TQT_TQOBJECT(lastActiveFormWindow), "database" ).toStringList(); - lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] ); - } - } - break; - case TQEvent::DragEnter: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { - workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e ); - return TRUE; - } - break; - case TQEvent::DragMove: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { - workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e ); - return TRUE; - } - break; - case TQEvent::Drop: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { - workspace()->contentsDropEvent( (TQDropEvent*)e ); - return TRUE; - } - break; - case TQEvent::Show: - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) ) - break; - if ( ((TQShowEvent*)e)->spontaneous() ) - break; - TQApplication::sendPostedEvents( qworkspace, TQEvent::ChildInserted ); - showEvent( (TQShowEvent*)e ); - checkTempFiles(); - return TRUE; - case TQEvent::Wheel: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - return TRUE; - case TQEvent::FocusIn: - if ( !::tqqt_cast(o) && isAFormWindowChild( o ) ) - return TRUE; //FIXME - if ( hierarchyView->formDefinitionView()->isRenaming() - && ( o->inherits( "Editor" ) || ::tqqt_cast(o) ) ) - TQApplication::sendPostedEvents(); - if ( o->inherits( "Editor" ) ) { - TQWidget *w = (TQWidget*)o; - while ( w ) { - if ( ::tqqt_cast(w) ) - break; - w = w->parentWidget( TRUE ); - } - if ( ::tqqt_cast(w) ) - ( (SourceEditor*)w )->checkTimeStamp(); - } else if ( ::tqqt_cast(o) ) { - FormWindow *fw = (FormWindow*)o; - if ( fw->formFile() && fw->formFile()->editor() ) - fw->formFile()->editor()->checkTimeStamp(); - } - break; - case TQEvent::FocusOut: - if ( !::tqqt_cast(o) && isAFormWindowChild( o ) ) - return TRUE; - break; - default: - return TQMainWindow::eventFilter( o, e ); - } - - return TQMainWindow::eventFilter( o, e ); -} - -TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const -{ - if ( ::tqqt_cast(o->parent()) && !::tqqt_cast(o) ) - return 0; - while ( o ) { - if ( ::tqqt_cast(o) ) - return (TQWidget*)o; - o = o->parent(); - } - return 0; -} - -TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const -{ - while ( o ) { - if ( ::tqqt_cast(o) ) - return (TQWidget*)o; - if ( ::tqqt_cast(o) ) - return 0; - o = o->parent(); - } - return 0; -} - -FormWindow *MainWindow::formWindow() -{ - if ( qworkspace->activeWindow() ) { - FormWindow *fw = 0; - if ( ::tqqt_cast(qworkspace->activeWindow()) ) - fw = (FormWindow*)qworkspace->activeWindow(); - else if ( lastActiveFormWindow && - qworkspace->windowList().find( lastActiveFormWindow ) != -1) - fw = lastActiveFormWindow; - return fw; - } - return 0; -} - -void MainWindow::emitProjectSignals() -{ - emit hasNonDummyProject( !currentProject->isDummy() ); - emit hasActiveWindowOrProject( !!qworkspace->activeWindow() || !currentProject->isDummy() ); -} - -void MainWindow::insertFormWindow( FormWindow *fw ) -{ - if ( fw ) - TQWhatsThis::add( fw, i18n( "The Form Window" - "

    Use the various tools to add widgets or to change the layout " - "and behavior of the components in the form. Select one or multiple " - "widgets to move them or lay them out. If a single widget is chosen it can " - "be resized using the resize handles.

    " - "

    Changes in the Property Editor are visible at design time, " - "and you can preview the form in different styles.

    " - "

    You can change the grid resolution, or turn the grid off in the " - "Preferences dialog in the Edit menu." - "

    You can have several forms open, and all open forms are listed " - "in the Form List.") ); - - connect( fw, TQT_SIGNAL( showProperties( TQObject * ) ), - this, TQT_SLOT( showProperties( TQObject * ) ) ); - connect( fw, TQT_SIGNAL( updateProperties( TQObject * ) ), - this, TQT_SLOT( updateProperties( TQObject * ) ) ); - connect( this, TQT_SIGNAL( currentToolChanged() ), - fw, TQT_SLOT( currentToolChanged() ) ); - connect( fw, TQT_SIGNAL( selectionChanged() ), - this, TQT_SLOT( selectionChanged() ) ); - connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), - this, TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); - - if ( !mblockNewForms ) { - } else { - fw->setProject( currentProject ); - } - fw->show(); - fw->currentToolChanged(); - if ( fw->caption().isEmpty() && tqstrlen( fw->name() ) ) - fw->setCaption( fw->name() ); - fw->mainContainer()->setCaption( fw->caption() ); - WidgetFactory::saveDefaultProperties( TQT_TQOBJECT(fw->mainContainer()), - WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(fw->mainContainer()) ) ) ); - activeWindowChanged( fw ); - emit formWindowsChanged(); - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->project() == fw->project() ) - e->resetContext(); - } -} - -void MainWindow::createNewProject( const TQString &lang ) -{ - Project *pro = new Project( "", "", projectSettingsPluginManager ); - pro->setLanguage( lang ); - - - if ( !openProjectSettings( pro ) ) { - delete pro; - return; - } - - if ( !pro->isValid() ) { - TQMessageBox::information( this, i18n("New Project"), i18n( "Cannot create an invalid project." ) ); - delete pro; - return; - } - - TQAction *a = new TQAction( pro->makeRelative( pro->fileName() ), - pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, TRUE ); - projects.insert( a, pro ); - addRecentlyOpened( pro->makeAbsolute( pro->fileName() ), recentlyProjects ); - projectSelected( a ); -} - - -bool MainWindow::unregisterClient( FormWindow *w ) -{ - propertyEditor->closed( w ); - objectHierarchy()->closed( w ); - if ( w == lastActiveFormWindow ) - lastActiveFormWindow = 0; - - TQPtrList waitingForDelete; - waitingForDelete.setAutoDelete( TRUE ); - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(w) ) - waitingForDelete.append( e ); - } - - if ( actionEditor->form() == w ) { - actionEditor->setFormWindow( 0 ); - actionEditor->parentWidget()->hide(); - } - - return TRUE; -} - -void MainWindow::activeWindowChanged( TQWidget *w ) -{ - TQWidget *old = formWindow(); - if ( ::tqqt_cast(w) ) { - FormWindow *fw = (FormWindow*)w; - FormWindow *ofw = lastActiveFormWindow; - lastActiveFormWindow = fw; - lastActiveFormWindow->updateUndoInfo(); - emit hasActiveForm( TRUE ); - if ( formWindow() ) { - formWindow()->emitShowProperties(); - emit formModified( formWindow()->commandHistory()->isModified() ); - if ( currentTool() != POINTER_TOOL ) - formWindow()->clearSelection(); - } - workspace()->activeFormChanged( fw ); - setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), - ::tqqt_cast(lastActiveFormWindow->mainContainer()) ); - if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) { - if ( actionEditor->wantToBeShown() ) - actionEditor->parentWidget()->show(); - } else { - TQWidget *mc = 0; - if ( ofw && (mc = ofw->mainContainer()) && ::tqqt_cast(mc) ) - actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() ); - actionEditor->parentWidget()->hide(); - } - - actionEditor->setFormWindow( lastActiveFormWindow ); - if ( wspace && fw->project() && fw->project() != currentProject ) { - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( *it == fw->project() ) { - projectSelected( it.key() ); - break; - } - } - } - emit formWindowChanged(); - - } else if ( w == propertyEditor ) { - propertyEditor->resetFocus(); - } else if ( !lastActiveFormWindow ) { - emit formWindowChanged(); - emit hasActiveForm( FALSE ); - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); - } - - if ( !w ) { - emit formWindowChanged(); - emit hasActiveForm( FALSE ); - propertyEditor->clear(); - hierarchyView->clear(); - updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); - } - - selectionChanged(); - - if ( ::tqqt_cast(w) ) { - SourceEditor *se = (SourceEditor*)w; - TQGuardedPtr fw = se->formWindow(); - if ( se->formWindow() && - lastActiveFormWindow != fw ) { - activeWindowChanged( se->formWindow() ); - } - actionSearchFind->setEnabled( TRUE ); - actionSearchIncremetal->setEnabled( TRUE ); - actionSearchReplace->setEnabled( TRUE ); - actionSearchGotoLine->setEnabled( TRUE ); - incrementalSearch->setEnabled( TRUE ); - - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); - actionEditCut->setEnabled( TRUE ); - actionEditCopy->setEnabled( TRUE ); - actionEditPaste->setEnabled( TRUE ); - actionEditSelectAll->setEnabled( TRUE ); - actionEditUndo->setMenuText( i18n( "&Undo" ) ); - actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) ); - actionEditRedo->setMenuText( i18n( "&Redo" ) ); - actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) ); - if ( hierarchyView->sourceEditor() != w ) - hierarchyView->showClasses( se ); - actionEditor->setFormWindow( 0 ); - if ( wspace && se->project() && se->project() != currentProject ) { - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( *it == se->project() ) { - projectSelected( it.key() ); - break; - } - } - } - workspace()->activeEditorChanged( se ); - } else { - actionSearchFind->setEnabled( FALSE ); - actionSearchIncremetal->setEnabled( FALSE ); - actionSearchReplace->setEnabled( FALSE ); - actionSearchGotoLine->setEnabled( FALSE ); - incrementalSearch->setEnabled( FALSE ); - } - - if ( currentTool() == ORDER_TOOL && w != old ) - emit currentToolChanged(); - - emit hasActiveWindow( !!qworkspace->activeWindow() ); -} - -void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, - const TQString &undoCmd, const TQString &redoCmd ) -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) - return; // do not set a formWindow related command - actionEditUndo->setEnabled( undoAvailable ); - actionEditRedo->setEnabled( redoAvailable ); - if ( !undoCmd.isEmpty() ) - actionEditUndo->setMenuText( i18n( "&Undo: %1" ).arg( undoCmd ) ); - else - actionEditUndo->setMenuText( i18n( "&Undo: Not Available" ) ); - if ( !redoCmd.isEmpty() ) - actionEditRedo->setMenuText( i18n( "&Redo: %1" ).arg( redoCmd ) ); - else - actionEditRedo->setMenuText( i18n( "&Redo: Not Available" ) ); - - actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) ); - actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) ); - - if ( currentTool() == ORDER_TOOL ) { - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); - } -} - -void MainWindow::updateEditorUndoRedo() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow(); - actionEditUndo->setEnabled( editor->editIsUndoAvailable() ); - actionEditRedo->setEnabled( editor->editIsRedoAvailable() ); -} - -TQWorkspace *MainWindow::qWorkspace() const -{ - return qworkspace; -} - -void MainWindow::popupFormWindowMenu( const TQPoint & gp, FormWindow *fw ) -{ - TQValueList ids; - TQMap commands; - - setupRMBSpecialCommands( ids, commands, fw ); - setupRMBProperties( ids, commands, fw ); - - tqApp->processEvents(); - int r = rmbFormWindow->exec( gp ); - - handleRMBProperties( r, commands, fw ); - handleRMBSpecialCommands( r, commands, fw ); - - for ( TQValueList::ConstIterator i = ids.begin(); i != ids.end(); ++i ) - rmbFormWindow->removeItem( *i ); -} - -void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidget * w) -{ - TQValueList ids; - TQMap commands; - - setupRMBSpecialCommands( ids, commands, w ); - setupRMBProperties( ids, commands, w ); - - tqApp->processEvents(); - int r = rmbWidgets->exec( gp ); - - handleRMBProperties( r, commands, w ); - handleRMBSpecialCommands( r, commands, w ); - - for ( TQValueList::ConstIterator i = ids.begin(); i != ids.end(); ++i ) - rmbWidgets->removeItem( *i ); -} - -void MainWindow::setupRMBProperties( TQValueList &ids, TQMap &props, TQWidget *w ) -{ - const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - if ( text && qstrcmp( text->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) - text = 0; - const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); - if ( title && qstrcmp( title->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) - title = 0; - const TQMetaProperty* pagetitle = - w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); - if ( pagetitle && qstrcmp( pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) - pagetitle = 0; - const TQMetaProperty* pixmap = - w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE ); - if ( pixmap && qstrcmp( pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0 ) - pixmap = 0; - - if ( text && text->designable(w) || - title && title->designable(w) || - pagetitle && pagetitle->designable(w) || - pixmap && pixmap->designable(w) ) { - int id = 0; - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator(0); - if ( pixmap && pixmap->designable(w) ) { - ids << ( id = rmbWidgets->insertItem( i18n("Choose Pixmap..."), -1, 0) ); - props.insert( "pixmap", id ); - } - if ( text && text->designable(w) && !::tqqt_cast(w) ) { - ids << ( id = rmbWidgets->insertItem( i18n("Edit Text..."), -1, 0) ); - props.insert( "text", id ); - } - if ( title && title->designable(w) ) { - ids << ( id = rmbWidgets->insertItem( i18n("Edit Title..."), -1, 0) ); - props.insert( "title", id ); - } - if ( pagetitle && pagetitle->designable(w) ) { - ids << ( id = rmbWidgets->insertItem( i18n("Edit Page Title..."), -1, 0) ); - props.insert( "pagetitle", id ); - } - } -} - -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS -static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w ) -{ - WidgetInterface *iface = 0; - widgetManager()->queryInterface( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), &iface ); - if ( !iface ) - return 0; - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( !iface2 ) - return 0; - iface->release(); - return iface2; -} -#endif - -void MainWindow::setupRMBSpecialCommands( TQValueList &ids, - TQMap &commands, TQWidget *w ) -{ - int id; - - if ( ::tqqt_cast(w) ) { - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator( 0 ); - if ( ( (QDesignerTabWidget*)w )->count() > 1) { - ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); - commands.insert( "remove", id ); - } - ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); - commands.insert( "add", id ); - } else if ( ::tqqt_cast(w) ) { - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator( 0 ); - if ( ( (QDesignerWidgetStack*)w )->count() > 1) { - ids << ( id = rmbWidgets->insertItem( i18n("Previous Page"), -1, 0 ) ); - commands.insert( "prevpage", id ); - ids << ( id = rmbWidgets->insertItem( i18n("Next Page"), -1, 0 ) ); - ids << rmbWidgets->insertSeparator( 0 ); - commands.insert( "nextpage", id ); - ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); - commands.insert( "remove", id ); - } - ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); - commands.insert( "add", id ); - } else if ( ::tqqt_cast(w) ) { - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator( 0 ); - if ( ( (TQToolBox*)w )->count() > 1 ) { - ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); - commands.insert( "remove", id ); - } - ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); - commands.insert( "add", id ); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - } else if ( WidgetDatabase:: - isCustomPluginWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { - TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); - if ( iface && iface->supportsPages( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) { - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator( 0 ); - - if ( iface->count( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) > 1 ) { - ids << ( id = rmbWidgets->insertItem( i18n( "Delete Page" ), -1, 0 ) ); - commands.insert( "remove", id ); - } - ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); - commands.insert( "add", id ); - if ( iface->currentIndex( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) != -1 ) { - ids << ( id = rmbWidgets->insertItem( i18n("Rename Current Page..."), -1, 0 ) ); - commands.insert( "rename", id ); - } - } - if ( iface ) - iface->release(); -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - } - - if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator( 0 ); - ids << ( id = rmbWidgets->insertItem( i18n("Edit..."), -1, 0 ) ); - commands.insert( "edit", id ); - } -} - -void MainWindow::setupRMBSpecialCommands( TQValueList &ids, - TQMap &commands, FormWindow *fw ) -{ - int id; - - if ( ::tqqt_cast(fw->mainContainer()) ) { - if ( ids.isEmpty() ) - ids << rmbFormWindow->insertSeparator( 0 ); - - if ( ( (TQWizard*)fw->mainContainer() )->pageCount() > 1) { - ids << ( id = rmbFormWindow->insertItem( i18n("Delete Page"), -1, 0 ) ); - commands.insert( "remove", id ); - } - - ids << ( id = rmbFormWindow->insertItem( i18n("Add Page"), -1, 0 ) ); - commands.insert( "add", id ); - - ids << ( id = rmbFormWindow->insertItem( i18n("Edit Page Title..."), -1, 0 ) ); - commands.insert( "rename", id ); - - ids << ( id = rmbFormWindow->insertItem( i18n("Edit Pages..."), -1, 0 ) ); - commands.insert( "edit", id ); - - } else if ( ::tqqt_cast(fw->mainContainer()) ) { - if ( ids.isEmpty() ) - ids << rmbFormWindow->insertSeparator( 0 ); - ids << ( id = rmbFormWindow->insertItem( i18n( "Add Menu Item" ), -1, 0 ) ); - commands.insert( "add_menu_item", id ); - ids << ( id = rmbFormWindow->insertItem( i18n( "Add Toolbar" ), -1, 0 ) ); - commands.insert( "add_toolbar", id ); - } -} - -void MainWindow::handleRMBProperties( int id, TQMap &props, TQWidget *w ) -{ - if ( id == props[ "text" ] ) { - bool ok = FALSE; - bool oldDoWrap = FALSE; - if ( ::tqqt_cast(w) ) { - int align = w->property( "alignment" ).toInt(); - if ( align & WordBreak ) - oldDoWrap = TRUE; - } - bool doWrap = oldDoWrap; - - TQString text; - if ( ::tqqt_cast(w) || ::tqqt_cast(w) || ::tqqt_cast(w) ) { - text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqqt_cast(w), &doWrap ); - ok = !text.isNull(); - } else { - text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), - TQLineEdit::Normal, w->property("text").toString(), &ok, this ); - } - if ( ok ) { - if ( oldDoWrap != doWrap ) { - TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "wordwrap", TQVariant( oldDoWrap, 0 ), - TQVariant( doWrap, 0 ), TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); - } - - TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "text", w->property( "text" ), - text, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); - } - } else if ( id == props[ "title" ] ) { - bool ok = FALSE; - TQString title = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), - TQLineEdit::Normal, w->property("title").toString(), &ok, this ); - if ( ok ) { - TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "title", w->property( "title" ), - title, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); - } - } else if ( id == props[ "pagetitle" ] ) { - bool ok = FALSE; - TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), - TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this ); - if ( ok ) { - TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "pageTitle", - w->property( "pageTitle" ), - text, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pageTitle", TRUE ); - } - } else if ( id == props[ "pixmap" ] ) { - TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap(); - TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix ); - if ( !pix.isNull() ) { - TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "pixmap", w->property( "pixmap" ), - pix, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pixmap", TRUE ); - } - } -} - -void MainWindow::handleRMBSpecialCommands( int id, TQMap &commands, TQWidget *w ) -{ - if ( ::tqqt_cast(w) ) { - TQTabWidget *tw = (TQTabWidget*)w; - if ( id == commands[ "add" ] ) { - AddTabPageCommand *cmd = - new AddTabPageCommand( i18n( "Add Page to %1" ).arg( tw->name() ), formWindow(), - tw, "Tab" ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "remove" ] ) { - if ( tw->currentPage() ) { - QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; - DeleteTabPageCommand *cmd = - new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ). - arg( dtw->pageTitle() ).arg( tw->name() ), - formWindow(), tw, tw->currentPage() ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } - } else if ( ::tqqt_cast(w) ) { - TQToolBox *tb = (TQToolBox*)w; - if ( id == commands[ "add" ] ) { - AddToolBoxPageCommand *cmd = - new AddToolBoxPageCommand( i18n( "Add Page to %1" ).arg( tb->name() ), - formWindow(), - tb, "Page" ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "remove" ] ) { - if ( tb->currentItem() ) { - DeleteToolBoxPageCommand *cmd = - new DeleteToolBoxPageCommand( i18n( "Delete Page %1 of %2" ). - arg( tb->itemLabel( tb->currentIndex() ) ). - arg( tb->name() ), - formWindow(), tb, tb->currentItem() ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } - } else if ( ::tqqt_cast(w) ) { - QDesignerWidgetStack *ws = (QDesignerWidgetStack*)w; - if ( id == commands[ "add" ] ) { - AddWidgetStackPageCommand *cmd = - new AddWidgetStackPageCommand( i18n( "Add Page to %1" ).arg( ws->name() ), - formWindow(), ws ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "remove" ] ) { - if ( ws->visibleWidget() ) { - DeleteWidgetStackPageCommand *cmd = - new DeleteWidgetStackPageCommand( i18n( "Delete Page %1 of %2" ). - arg( ws->currentPage() ).arg( ws->name() ), - formWindow(), ws, ws->visibleWidget() ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } else if ( id == commands[ "nextpage" ] ) { - int currentPage = w->property( "currentPage" ).toInt(); - TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = - new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "currentPage", currentPage, - currentPage + 1, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); - } else if ( id == commands[ "prevpage" ] ) { - int currentPage = w->property( "currentPage" ).toInt(); - TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = - new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "currentPage", currentPage, - currentPage -1, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); - } -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - } else if ( WidgetDatabase:: - isCustomPluginWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { - if ( id == commands[ "add" ] ) { - AddContainerPageCommand *cmd = - new AddContainerPageCommand( i18n( "Add Page to %1" ).arg( w->name() ), - formWindow(), w, "Page" ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "remove" ] ) { - TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); - if ( iface ) { - TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); - int index = iface->currentIndex( wClassName, w ); - DeleteContainerPageCommand *cmd = - new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ). - arg( iface->pageLabel( wClassName, - w, index ) ). - arg( w->name() ), - formWindow(), w, index ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - iface->release(); - } - } else if ( id == commands[ "rename" ] ) { - TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); - if ( iface ) { - bool ok = FALSE; - TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); - int index = iface->currentIndex( wClassName, w ); - TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), - TQLineEdit::Normal, - iface->pageLabel( wClassName, w, - index ), - &ok, this ); - if ( ok ) { - RenameContainerPageCommand *cmd = - new RenameContainerPageCommand( i18n( "Rename Page %1 to %2" ). - arg( iface-> - pageLabel( wClassName, w, - index ) ). - arg( text ), formWindow(), - w, index, text ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - iface->release(); - } - } -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - } - - if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { - if ( id == commands[ "edit" ] ) - WidgetFactory::editWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), this, w, formWindow() ); - } -} - -void MainWindow::handleRMBSpecialCommands( int id, TQMap &commands, FormWindow *fw ) -{ - if ( ::tqqt_cast(fw->mainContainer()) ) { - TQWizard *wiz = (TQWizard*)fw->mainContainer(); - if ( id == commands[ "add" ] ) { - AddWizardPageCommand *cmd = - new AddWizardPageCommand( i18n( "Add Page to %1" ).arg( wiz->name() ), - formWindow(), wiz, "WizardPage" ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "remove" ] ) { - if ( wiz->currentPage() ) { - QDesignerWizard *dw = (QDesignerWizard*)wiz; - DeleteWizardPageCommand *cmd = - new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). - arg( dw->pageTitle() ).arg( wiz->name() ), - formWindow(), wiz, - wiz->indexOf( wiz->currentPage() ) ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } else if ( id == commands[ "edit" ] ) { - WizardEditor *e = new WizardEditor( this, wiz, fw ); - e->exec(); - delete e; - } else if ( id == commands[ "rename" ] ) { - - bool ok = FALSE; - QDesignerWizard *dw = (QDesignerWizard*)wiz; - TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), - TQLineEdit::Normal, dw->pageTitle(), &ok, this ); - if ( ok ) { - TQString pn( i18n( "Rename page %1 of %2" ).arg( dw->pageTitle() ).arg( wiz->name() ) ); - RenameWizardPageCommand *cmd = - new RenameWizardPageCommand( pn, formWindow() - , wiz, wiz->indexOf( wiz->currentPage() ), text ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } - } else if ( ::tqqt_cast(fw->mainContainer()) ) { - TQMainWindow *mw = (TQMainWindow*)fw->mainContainer(); - if ( id == commands[ "add_toolbar" ] ) { - AddToolBarCommand *cmd = - new AddToolBarCommand( i18n( "Add Toolbar to '%1'" ).arg( formWindow()->name() ), - formWindow(), mw ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "add_menu_item" ] ) { - AddMenuCommand *cmd = - new AddMenuCommand( i18n( "Add Menu to '%1'" ).arg( formWindow()->name() ), - formWindow(), mw ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } -} - -void MainWindow::clipboardChanged() -{ - TQString text( tqApp->clipboard()->text() ); - TQString start( "" ); - actionEditPaste->setEnabled( text.left( start.length() ) == start ); -} - -void MainWindow::selectionChanged() -{ - layoutChilds = FALSE; - layoutSelected = FALSE; - breakLayout = FALSE; - if ( !formWindow() ) { - actionEditCut->setEnabled( FALSE ); - actionEditCopy->setEnabled( FALSE ); - actionEditDelete->setEnabled( FALSE ); - actionEditAdjustSize->setEnabled( FALSE ); - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditSplitHorizontal->setEnabled( FALSE ); - actionEditSplitVertical->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); - actionEditLower->setEnabled( FALSE ); - actionEditRaise->setEnabled( FALSE ); - actionEditAdjustSize->setEnabled( FALSE ); - return; - } - - int selectedWidgets = formWindow()->numSelectedWidgets(); - bool enable = selectedWidgets > 0; - actionEditCut->setEnabled( enable ); - actionEditCopy->setEnabled( enable ); - actionEditDelete->setEnabled( enable ); - actionEditLower->setEnabled( enable ); - actionEditRaise->setEnabled( enable ); - - actionEditAdjustSize->setEnabled( FALSE ); - actionEditSplitHorizontal->setEnabled( FALSE ); - actionEditSplitVertical->setEnabled( FALSE ); - - enable = FALSE; - TQWidgetList widgets = formWindow()->selectedWidgets(); - if ( selectedWidgets > 1 ) { - int unlaidout = 0; - int laidout = 0; - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) - unlaidout++; - else - laidout++; - } - actionEditHLayout->setEnabled( unlaidout > 1 ); - actionEditVLayout->setEnabled( unlaidout > 1 ); - actionEditSplitHorizontal->setEnabled( unlaidout > 1 ); - actionEditSplitVertical->setEnabled( unlaidout > 1 ); - actionEditGridLayout->setEnabled( unlaidout > 1 ); - actionEditBreakLayout->setEnabled( laidout > 0 ); - actionEditAdjustSize->setEnabled( laidout > 0 ); - layoutSelected = unlaidout > 1; - breakLayout = laidout > 0; - } else if ( selectedWidgets == 1 ) { - TQWidget *w = widgets.first(); - bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) || - w == formWindow()->mainContainer(); - actionEditAdjustSize->setEnabled( !w->parentWidget() || - WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ); - - if ( !isContainer ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); - breakLayout = TRUE; - } else { - actionEditBreakLayout->setEnabled( FALSE ); - } - } else { - if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { - if ( !formWindow()->hasInsertedChildren( w ) ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); - } else { - actionEditHLayout->setEnabled( TRUE ); - actionEditVLayout->setEnabled( TRUE ); - actionEditGridLayout->setEnabled( TRUE ); - actionEditBreakLayout->setEnabled( FALSE ); - layoutChilds = TRUE; - } - if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); - breakLayout = TRUE; - } - } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); - breakLayout = TRUE; - } - } - } else if ( selectedWidgets == 0 ) { - actionEditAdjustSize->setEnabled( TRUE ); - TQWidget *w = formWindow()->mainContainer(); - if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { - if ( !formWindow()->hasInsertedChildren( w ) ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); - } else { - actionEditHLayout->setEnabled( TRUE ); - actionEditVLayout->setEnabled( TRUE ); - actionEditGridLayout->setEnabled( TRUE ); - actionEditBreakLayout->setEnabled( FALSE ); - layoutChilds = TRUE; - } - } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( TRUE ); - breakLayout = TRUE; - } - } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); - } -} - -static TQString fixArgs( const TQString &s2 ) -{ - TQString s = s2; - return s.replace( ',', ';' ); -} - -void MainWindow::writeConfig() -{ - TQSettings config; - - // No search path for unix, only needs application name - config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); - - TQString keybase = DesignerApplication::settingsKey(); - - if (savePluginPaths) { - TQStringList pluginPaths = TQApplication::libraryPaths(); - config.writeEntry( keybase + "PluginPaths", pluginPaths ); - } - config.writeEntry( keybase + "RestoreWorkspace", restoreConfig ); - config.writeEntry( keybase + "SplashScreen", splashScreen ); - config.writeEntry( keybase + "ShowStartDialog", shStartDialog ); - config.writeEntry( keybase + "FileFilter", fileFilter ); - config.writeEntry( keybase + "TemplatePath", templPath ); - config.writeEntry( keybase + "RecentlyOpenedFiles", recentlyFiles ); - config.writeEntry( keybase + "RecentlyOpenedProjects", recentlyProjects ); - config.writeEntry( keybase + "DatabaseAutoEdit", databaseAutoEdit ); - - config.writeEntry( keybase + "AutoSave/Enabled", autoSaveEnabled ); - config.writeEntry( keybase + "AutoSave/Interval", autoSaveInterval ); - - config.writeEntry( keybase + "Grid/Snap", snGrid ); - config.writeEntry( keybase + "Grid/Show", sGrid ); - config.writeEntry( keybase + "Grid/x", grid().x() ); - config.writeEntry( keybase + "Grid/y", grid().y() ); - config.writeEntry( keybase + "LastToolPage", - toolBox->itemLabel( toolBox->currentIndex() ) ); - - config.writeEntry( keybase + "Background/UsePixmap", backPix ); - config.writeEntry( keybase + "Background/Color", (int)qworkspace->backgroundColor().rgb() ); - if ( qworkspace->backgroundPixmap() ) - qworkspace->backgroundPixmap()->save( TQDir::home().absPath() + "/.designer/" + "background.xpm", "PNG" ); - - config.writeEntry( keybase + "Geometries/MainwindowX", x() ); - config.writeEntry( keybase + "Geometries/MainwindowY", y() ); - config.writeEntry( keybase + "Geometries/MainwindowWidth", width() ); - config.writeEntry( keybase + "Geometries/MainwindowHeight", height() ); - config.writeEntry( keybase + "Geometries/MainwindowMaximized", isMaximized() ); - config.writeEntry( keybase + "Geometries/PropertyEditorX", propertyEditor->parentWidget()->x() ); - config.writeEntry( keybase + "Geometries/PropertyEditorY", propertyEditor->parentWidget()->y() ); - config.writeEntry( keybase + "Geometries/PropertyEditorWidth", propertyEditor->parentWidget()->width() ); - config.writeEntry( keybase + "Geometries/PropertyEditorHeight", propertyEditor->parentWidget()->height() ); - config.writeEntry( keybase + "Geometries/HierarchyViewX", hierarchyView->parentWidget()->x() ); - config.writeEntry( keybase + "Geometries/HierarchyViewY", hierarchyView->parentWidget()->y() ); - config.writeEntry( keybase + "Geometries/HierarchyViewWidth", hierarchyView->parentWidget()->width() ); - config.writeEntry( keybase + "Geometries/HierarchyViewHeight", hierarchyView->parentWidget()->height() ); - config.writeEntry( keybase + "Geometries/WorkspaceX", wspace->parentWidget()->x() ); - config.writeEntry( keybase + "Geometries/WorkspaceY", wspace->parentWidget()->y() ); - config.writeEntry( keybase + "Geometries/WorkspaceWidth", wspace->parentWidget()->width() ); - config.writeEntry( keybase + "Geometries/WorkspaceHeight", wspace->parentWidget()->height() ); - - config.writeEntry( keybase + "View/TextLabels", usesTextLabel() ); - config.writeEntry( keybase + "View/BigIcons", usesBigPixmaps() ); - - TQString mwlKey = "MainwindowLayout"; - if ( singleProjectMode() ) - mwlKey += "S"; - TQString mainWindowLayout; - TQTextStream ts( &mainWindowLayout, IO_WriteOnly ); - ts << *this; - config.writeEntry( keybase + mwlKey, mainWindowLayout ); - - - TQPtrList *lst = MetaDataBase::customWidgets(); - config.writeEntry( keybase + "CustomWidgets/num", (int)lst->count() ); - int j = 0; - TQDir::home().mkdir( ".designer" ); - for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - TQStringList l; - l << w->className; - l << w->includeFile; - l << TQString::number( (int)w->includePolicy ); - l << TQString::number( w->sizeHint.width() ); - l << TQString::number( w->sizeHint.height() ); - l << TQString::number( w->lstSignals.count() ); - for ( TQValueList::ConstIterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) - l << TQString( fixArgs( *it ) ); - l << TQString::number( w->lstSlots.count() ); - for ( TQValueList::ConstIterator it2 = w->lstSlots.begin(); it2 != w->lstSlots.end(); ++it2 ) { - l << fixArgs( (*it2).function ); - l << (*it2).access; - } - l << TQString::number( w->lstProperties.count() ); - for ( TQValueList::ConstIterator it3 = w->lstProperties.begin(); it3 != w->lstProperties.end(); ++it3 ) { - l << (*it3).property; - l << (*it3).type; - } - l << TQString::number( size_type_to_int( w->sizePolicy.horData() ) ); - l << TQString::number( size_type_to_int( w->sizePolicy.verData() ) ); - l << TQString::number( (int)w->isContainer ); - config.writeEntry( keybase + "CustomWidgets/Widget" + TQString::number( j++ ), l, ',' ); - w->pixmap->save( TQDir::home().absPath() + "/.designer/" + w->className, "XPM" ); - } - - TQStringList l; - for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() ) - l << a->text(); - config.writeEntry( keybase + "ToolBox/CommonWidgets", l ); -} - -static TQString fixArgs2( const TQString &s2 ) -{ - TQString s = s2; - return s.replace( ';', ',' ); -} - -void MainWindow::readConfig() -{ - TQString keybase = DesignerApplication::settingsKey(); - TQSettings config; - config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); - - bool ok; - bool readPreviousConfig = FALSE; - TQString backPixName( TQDir::home().absPath() + "/.designer/" + "background.xpm" ); - restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); - if ( !ok ) { - keybase = DesignerApplication::oldSettingsKey(); - restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); - if ( !ok ) { - if ( oWindow ) { - oWindow->shuttingDown(); - ( (TQDockWindow*)oWindow->parent() )->hide(); - } - TQPixmap pix; - pix.load( backPixName ); - if ( !pix.isNull() ) - qworkspace->setBackgroundPixmap( pix ); - return; - } - readPreviousConfig = TRUE; - } - if ( !readPreviousConfig ) { - fileFilter = config.readEntry( keybase + "FileFilter", fileFilter ); - templPath = config.readEntry( keybase + "TemplatePath", TQString() ); - databaseAutoEdit = config.readBoolEntry( keybase + "DatabaseAutoEdit", databaseAutoEdit ); - shStartDialog = config.readBoolEntry( keybase + "ShowStartDialog", shStartDialog ); - autoSaveEnabled = config.readBoolEntry( keybase + "AutoSave/Enabled", autoSaveEnabled ); - autoSaveInterval = config.readNumEntry( keybase + "AutoSave/Interval", autoSaveInterval ); - } - - if ( restoreConfig || readPreviousConfig ) { - TQString s = config.readEntry( keybase + "LastToolPage" ); - for ( int i = 0; i < toolBox->count(); ++i ) { - if ( toolBox->itemLabel(i) == s ) { - toolBox->setCurrentIndex( i ); - break; - } - } - // We know that the oldSettingsKey() will return 3.1 - if ( keybase == DesignerApplication::oldSettingsKey() ) { - if (keybase.contains("3.1")) - recentlyFiles = config.readListEntry( keybase + "RecentlyOpenedFiles", ',' ); - else - recentlyFiles = config.readListEntry(keybase + "RecentlyOpenedFiles"); - - if ( recentlyFiles.count() == 1 && recentlyFiles[0].isNull() ) - recentlyFiles.clear(); - if (keybase.contains("3.1")) - recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects", ',' ); - else - recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects"); - if ( recentlyProjects.count() == 1 && recentlyProjects[0].isNull() ) - recentlyProjects.clear(); - } else { - recentlyFiles = config.readListEntry( keybase + "RecentlyOpenedFiles" ); - recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects" ); - } - - backPix = config.readBoolEntry( keybase + "Background/UsePixmap", TRUE ) | readPreviousConfig; - if ( backPix ) { - TQPixmap pix; - pix.load( backPixName ); - if ( !pix.isNull() ) - qworkspace->setBackgroundPixmap( pix ); - } else { - qworkspace->setBackgroundColor( TQColor( (TQRgb)config.readNumEntry( keybase + "Background/Color" ) ) ); - } - - if ( !readPreviousConfig ) { - splashScreen = config.readBoolEntry( keybase + "SplashScreen", TRUE ); - - sGrid = config.readBoolEntry( keybase + "Grid/Show", TRUE ); - snGrid = config.readBoolEntry( keybase + "Grid/Snap", TRUE ); - grd.setX( config.readNumEntry( keybase + "Grid/x", 10 ) ); - grd.setY( config.readNumEntry( keybase + "Grid/y", 10 ) ); - - if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", FALSE ) ) { - TQRect r( pos(), size() ); - r.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", r.x() ) ); - r.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", r.y() ) ); - r.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", r.width() ) ); - r.setHeight( config.readNumEntry( keybase + "Geometries/MainwindowHeight", r.height() ) ); - - TQRect desk = TQApplication::desktop()->geometry(); - TQRect inter = desk.intersect( r ); - resize( r.size() ); - if ( inter.width() * inter.height() > ( r.width() * r.height() / 20 ) ) { - move( r.topLeft() ); - } - } - setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", FALSE ) ); - setUsesBigPixmaps( FALSE /*config.readBoolEntry( "BigIcons", FALSE )*/ ); // ### disabled for now - } - } - int num = config.readNumEntry( keybase + "CustomWidgets/num" ); - for ( int j = 0; j < num; ++j ) { - MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget; - TQStringList l = config.readListEntry( keybase + "CustomWidgets/Widget" + TQString::number( j ), ',' ); - w->className = l[ 0 ]; - w->includeFile = l[ 1 ]; - w->includePolicy = (MetaDataBase::CustomWidget::IncludePolicy)l[ 2 ].toInt(); - w->sizeHint.setWidth( l[ 3 ].toInt() ); - w->sizeHint.setHeight( l[ 4 ].toInt() ); - uint c = 5; - if ( l.count() > c ) { - int numSignals = l[ c ].toInt(); - c++; - for ( int i = 0; i < numSignals; ++i, c++ ) - w->lstSignals.append( fixArgs2( l[ c ] ).latin1() ); - } - if ( l.count() > c ) { - int numSlots = l[ c ].toInt(); - c++; - for ( int i = 0; i < numSlots; ++i ) { - MetaDataBase::Function slot; - slot.function = fixArgs2( l[ c ] ); - c++; - slot.access = l[ c ]; - c++; - w->lstSlots.append( slot ); - } - } - if ( l.count() > c ) { - int numProperties = l[ c ].toInt(); - c++; - for ( int i = 0; i < numProperties; ++i ) { - MetaDataBase::Property prop; - prop.property = l[ c ]; - c++; - prop.type = l[ c ]; - c++; - w->lstProperties.append( prop ); - } - } if ( l.count() > c ) { - TQSizePolicy::SizeType h, v; - h = int_to_size_type( l[ c++ ].toInt() ); - v = int_to_size_type( l[ c++ ].toInt() ); - w->sizePolicy = TQSizePolicy( h, v ); - } - if ( l.count() > c ) { - w->isContainer = (bool)l[ c++ ].toInt(); - } - w->pixmap = new TQPixmap( BarIcon( TQDir::home().absPath() + "/.designer/" + w->className , TDevDesignerPartFactory::instance()) ); - MetaDataBase::addCustomWidget( w ); - } - if ( num > 0 ) - rebuildCustomWidgetGUI(); - - if ( !restoreConfig ) - return; - -#ifndef TQ_WS_MAC - /* I'm sorry to make this not happen on the Mac, but it seems to hang somewhere deep - in TQLayout, it gets into a very large loop - and seems it has to do with clever - things the designer does ###Sam */ - TQApplication::sendPostedEvents(); -#endif - - if ( !readPreviousConfig ) { - TQString mwlKey = "MainwindowLayout"; - if ( singleProjectMode() ) - mwlKey += "S"; - TQString mainWindowLayout = config.readEntry( keybase + mwlKey ); - TQTextStream ts( &mainWindowLayout, IO_ReadOnly ); - ts >> *this; - } - if ( readPreviousConfig && oWindow ) { - oWindow->shuttingDown(); - ( (TQDockWindow*)oWindow->parent() )->hide(); - } - - rebuildCustomWidgetGUI(); - - TQStringList l = config.readListEntry( keybase + "ToolBox/CommonWidgets" ); - if ( !l.isEmpty() ) { - TQPtrList lst; - commonWidgetsPage.clear(); - for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { - for ( TQAction *a = toolActions.first(); a; a = toolActions.next() ) { - if ( *it == a->text() ) { - lst.append( a ); - break; - } - } - } - if ( lst != commonWidgetsPage ) { - commonWidgetsPage = lst; - rebuildCommonWidgetsToolBoxPage(); - } - } -} - -HierarchyView *MainWindow::objectHierarchy() const -{ - if ( !hierarchyView ) - ( (MainWindow*)this )->setupHierarchyView(); - return hierarchyView; -} - -TQPopupMenu *MainWindow::setupNormalHierarchyMenu( TQWidget *parent ) -{ - TQPopupMenu *menu = new TQPopupMenu( parent ); - - actionEditCut->addTo( menu ); - actionEditCopy->addTo( menu ); - actionEditPaste->addTo( menu ); - actionEditDelete->addTo( menu ); - - return menu; -} - -TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot ) -{ - TQPopupMenu *menu = new TQPopupMenu( parent ); - - menu->insertItem( i18n( "Add Page" ), parent, addSlot ); - menu->insertItem( i18n( "Delete Page" ), parent, removeSlot ); - menu->insertSeparator(); - actionEditCut->addTo( menu ); - actionEditCopy->addTo( menu ); - actionEditPaste->addTo( menu ); - actionEditDelete->addTo( menu ); - - return menu; -} - -void MainWindow::closeEvent( TQCloseEvent *e ) -{ - if ( singleProject ) { - hide(); - e->ignore(); - return; - } - - TQWidgetList windows = qWorkspace()->windowList(); - TQWidgetListIt wit( windows ); - while ( wit.current() ) { - TQWidget *w = wit.current(); - ++wit; - if ( ::tqqt_cast(w) ) { - if ( ( (FormWindow*)w )->formFile()->editor() ) - windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); - if ( ( (FormWindow*)w )->formFile()->formWindow() ) - windows.removeRef( ( (FormWindow*)w )->formFile()->formWindow() ); - if ( !( (FormWindow*)w )->formFile()->close() ) { - e->ignore(); - return; - } - } else if ( ::tqqt_cast(w) ) { - if ( !( (SourceEditor*)w )->close() ) { - e->ignore(); - return; - } - } - w->close(); - } - - TQMapConstIterator it = projects.begin(); - while( it != projects.end() ) { - Project *pro = it.data(); - ++it; - if ( pro->isModified() ) { - switch ( TQMessageBox::warning( this, i18n( "Save Project Settings" ), - i18n( "Save changes to '%1'?" ).arg( pro->fileName() ), - i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { - case 0: // save - pro->save(); - break; - case 1: // don't save - break; - case 2: // cancel - e->ignore(); - return; - default: - break; - } - } - } - - writeConfig(); - hide(); - e->accept(); - - if ( client ) { - TQDir home( TQDir::homeDirPath() ); - home.remove( ".designerpid" ); - } -} - -Workspace *MainWindow::workspace() const -{ - if ( !wspace ) - ( (MainWindow*)this )->setupWorkspace(); - return wspace; -} - -PropertyEditor *MainWindow::propertyeditor() const -{ - if ( !propertyEditor ) - ( (MainWindow*)this )->setupPropertyEditor(); - return propertyEditor; -} - -ActionEditor *MainWindow::actioneditor() const -{ - if ( !actionEditor ) - ( (MainWindow*)this )->setupActionEditor(); - return actionEditor; -} - -bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) -{ - if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) { - TQString defSignal = WidgetFactory::defaultSignal( TQT_TQOBJECT(w) ); - if ( defSignal.isEmpty() ) { - editSource(); - } else { - TQString s = TQString( w->name() ) + "_" + defSignal; - LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() ); - if ( iface ) { - TQStrList sigs = iface->signalNames( TQT_TQOBJECT(w) ); - TQString fullSignal; - for ( int i = 0; i < (int)sigs.count(); ++i ) { - TQString sig = sigs.at( i ); - if ( sig.left( sig.find( '(' ) ) == defSignal ) { - fullSignal = sig; - break; - } - } - - if ( !fullSignal.isEmpty() ) { - TQString signl = fullSignal; - fullSignal = fullSignal.mid( fullSignal.find( '(' ) + 1 ); - fullSignal.remove( (int)fullSignal.length() - 1, 1 ); - fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() ); - s += "(" + fullSignal + ")"; - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(f), s.latin1() ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(f), s.latin1(), "", "public", "slot", - f->project()->language(), "void" ); - s = s.left( s.find( '(' ) ).latin1(); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(f), TQT_TQOBJECT(w), defSignal.latin1(), TQT_TQOBJECT(f->mainContainer()), s.latin1() ) ) { - MetaDataBase::Connection conn; - conn.sender = TQT_TQOBJECT(w); - conn.receiver = TQT_TQOBJECT(f->mainContainer()); - conn.signal = signl; - conn.slot = s; - AddConnectionCommand *cmd = - new AddConnectionCommand( i18n( "Add Connection" ), f, conn ); - f->commandHistory()->addCommand( cmd ); - cmd->execute(); - f->formFile()->setModified( TRUE ); - } - } - } - editFunction( s, TRUE ); - } - return TRUE; - } - if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { - statusMessage( i18n( "Edit %1..." ).arg( w->className() ) ); - WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), - this, w, formWindow() ); - statusBar()->clear(); - return TRUE; - } - - const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); - if ( text && text->designable(w) ) { - bool ok = FALSE; - bool oldDoWrap = FALSE; - if ( ::tqqt_cast(w) ) { - int align = w->property( "alignment" ).toInt(); - if ( align & WordBreak ) - oldDoWrap = TRUE; - } - bool doWrap = oldDoWrap; - - TQString text; - if ( ::tqqt_cast(w) || ::tqqt_cast(w) || ::tqqt_cast(w) ) { - text = MultiLineEditor::getText( this, w->property( "text" ).toString(), - !::tqqt_cast(w), &doWrap ); - ok = !text.isNull(); - } else { - text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), - TQLineEdit::Normal, w->property("text").toString(), &ok, this ); - } - if ( ok ) { - if ( oldDoWrap != doWrap ) { - TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "wordwrap", TQVariant( oldDoWrap, 0 ), - TQVariant( doWrap, 0 ), TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); - } - - TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "text", w->property( "text" ), - text, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); - } - return TRUE; - } - if ( title && title->designable(w) ) { - bool ok = FALSE; - TQString text; - text = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); - if ( ok ) { - TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "title", w->property( "title" ), - text, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); - } - return TRUE; - } - - if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) - editSource(); - - return TRUE; -} - -void MainWindow::rebuildCustomWidgetGUI() -{ - customWidgetToolBar->clear(); - customWidgetMenu->clear(); - customWidgetToolBar2->clear(); - int count = 0; - - TQPtrListIterator it( toolActions ); - TQAction *action; - while ( ( action = it.current() ) ) { - ++it; - if ( ( (WidgetAction*)action )->group() == "Custom Widgets" ) - delete action; - } - - TQPtrList *lst = MetaDataBase::customWidgets(); - - actionToolsCustomWidget->addTo( customWidgetMenu ); - customWidgetMenu->insertSeparator(); - - for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - WidgetAction* a = new WidgetAction( "Custom Widgets", actionGroupTools, TQString::number( w->id ).latin1() ); - a->setToggleAction( TRUE ); - a->setText( w->className ); - a->setIconSet( *w->pixmap ); - a->setStatusTip( i18n( "Insert a %1 (custom widget)" ).arg( w->className ) ); - a->setWhatsThis( i18n("%1 (custom widget)" - "

    Click Edit Custom Widgets... in the Tools|Custom menu to " - "add and change custom widgets. You can add properties as well as " - "signals and slots to integrate them into TQt Designer, " - "and provide a pixmap which will be used to represent the widget on the form.

    ").arg( w->className ) ); - - a->addTo( customWidgetToolBar ); - a->addTo( customWidgetToolBar2 ); - a->addTo( customWidgetMenu ); - count++; - } - TQWidget *wid; - customWidgetToolBar2->setStretchableWidget( ( wid = new TQWidget( customWidgetToolBar2 ) ) ); - wid->setBackgroundMode( customWidgetToolBar2->backgroundMode() ); - - if ( count == 0 ) - customWidgetToolBar->hide(); - else if ( customWidgetToolBar->isVisible() ) - customWidgetToolBar->show(); -} - -void MainWindow::rebuildCommonWidgetsToolBoxPage() -{ - toolBox->setUpdatesEnabled( FALSE ); - commonWidgetsToolBar->setUpdatesEnabled( FALSE ); - commonWidgetsToolBar->clear(); - for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() ) - a->addTo( commonWidgetsToolBar ); - TQWidget *w; - commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); - w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); - toolBox->setUpdatesEnabled( TRUE ); - commonWidgetsToolBar->setUpdatesEnabled( TRUE ); -} - -bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) -{ - TQWidgetList windows = qWorkspace()->windowList(); - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::tqqt_cast(w) ) { - if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) ) - return TRUE; - } - } - return FALSE; -} - -void MainWindow::setGrid( const TQPoint &p ) -{ - if ( p == grd ) - return; - grd = p; - TQWidgetList windows = qWorkspace()->windowList(); - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast(w) ) - continue; - ( (FormWindow*)w )->mainContainer()->update(); - } -} - -void MainWindow::setShowGrid( bool b ) -{ - if ( b == sGrid ) - return; - sGrid = b; - TQWidgetList windows = qWorkspace()->windowList(); - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast(w) ) - continue; - ( (FormWindow*)w )->mainContainer()->update(); - } -} - -void MainWindow::setSnapGrid( bool b ) -{ - if ( b == snGrid ) - return; - snGrid = b; -} - -TQString MainWindow::documentationPath() const -{ - return TQString( tqInstallPathDocs() ) + "/html/"; -} - -void MainWindow::windowsMenuActivated( int id ) -{ - TQWidget* w = qworkspace->windowList().at( id ); - if ( w ) - w->setFocus(); -} - -void MainWindow::projectSelected( TQAction *a ) -{ - a->setOn( TRUE ); - if ( currentProject ) - currentProject->setActive( FALSE ); - Project *p = *projects.find( a ); - p->setActive( TRUE ); - if ( currentProject == p ) - return; - currentProject = p; - if ( wspace ) - wspace->setCurrentProject( currentProject ); -} - -void MainWindow::openProject( const TQString &fn ) -{ - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( (*it)->fileName() == fn ) { - projectSelected( it.key() ); - return; - } - } - TQApplication::setOverrideCursor( waitCursor ); - Project *pro = new Project( fn, "", projectSettingsPluginManager ); - pro->setModified( FALSE ); - TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, TRUE ); - projects.insert( a, pro ); - projectSelected( a ); - TQApplication::restoreOverrideCursor(); -} - -void MainWindow::checkTempFiles() -{ - TQString s = TQDir::homeDirPath() + "/.designer"; - TQString baseName = s+ "/saved-form-"; - if ( !TQFile::exists( baseName + "1.ui" ) ) - return; - DesignerApplication::closeSplash(); - TQDir d( s ); - d.setNameFilter( "*.ui" ); - TQStringList lst = d.entryList(); - TQApplication::restoreOverrideCursor(); - bool load = TQMessageBox::information( this, i18n( "Restoring Last Session" ), - i18n( "TQt Designer found some temporary saved files, which were\n" - "written when TQt Designer crashed last time. Do you want to\n" - "load these files?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0; - TQApplication::setOverrideCursor( waitCursor ); - for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { - if ( load ) - openFormWindow( s + "/" + *it, FALSE ); - d.remove( *it ); - } -} - -void MainWindow::showDialogHelp() -{ - TQWidget *w = (TQWidget*)sender(); - w = w->topLevelWidget(); - - TQString link = documentationPath() + "/designer-manual-13.html#"; - - if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) // own doc for startdialog? - link += "dialog-file-new"; - else if ( ::tqqt_cast(w) ) - link += "dialog-file-create-template"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-functions"; -// else if ( ::tqqt_cast(w) ) - else if ( w->inherits("ConnectionViewerBase") ) - link += "dialog-view-connections"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-form-settings"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-preferences"; - else if ( ::tqqt_cast(w) ) - link += "dialog-image-collection"; -// else if ( ::tqqt_cast(w) ) - else if ( w->inherits( "DatabaseConnectionBase" ) ) - link += "dialog-edit-database-connections"; - else if ( ::tqqt_cast(w) ) - link += "dialog-project-settings"; - else if ( ::tqqt_cast(w) ) - link += "dialog-find-text"; - else if ( ::tqqt_cast(w) ) - link += "dialog-replace-text"; - else if ( ::tqqt_cast(w) ) - link += "dialog-go-to-line"; -// else if ( ::tqqt_cast(w) ) - else if ( w->inherits("ConnectionEditorBase") ) - link += "dialog-edit-connections"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-custom-widgets"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-palette"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-listbox"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-listview"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-iconview"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-table"; - else if ( ::tqqt_cast(w) ) - link += "dialog-text"; - - else { - TQMessageBox::information( this, i18n( "Help" ), - i18n( "There is no help available for this dialog at the moment." ) ); - return; - } - - assistant->showPage( link ); -} - -void MainWindow::setupActionManager() -{ - actionPluginManager = new TQPluginManager( IID_Action, TQApplication::libraryPaths(), pluginDirectory() ); - - TQStringList lst = actionPluginManager->featureList(); - for ( TQStringList::ConstIterator ait = lst.begin(); ait != lst.end(); ++ait ) { - ActionInterface *iface = 0; - actionPluginManager->queryInterface( *ait, &iface ); - if ( !iface ) - continue; - - iface->connectTo( desInterface ); - TQAction *a = iface->create( *ait, TQT_TQOBJECT(this) ); - if ( !a ) - continue; - - TQString grp = iface->group( *ait ); - if ( grp.isEmpty() ) - grp = "3rd party actions"; - TQPopupMenu *menu = 0; - TQToolBar *tb = 0; - - if ( !( menu = (TQPopupMenu*)child( grp.latin1(), TQPOPUPMENU_OBJECT_NAME_STRING ) ) ) { - menu = new TQPopupMenu( this, grp.latin1() ); - menuBar()->insertItem( i18n( grp ), menu ); - } - if ( !( tb = (TQToolBar*)child( grp.latin1(), TQTOOLBAR_OBJECT_NAME_STRING ) ) ) { - tb = new TQToolBar( this, grp.latin1() ); - tb->setCloseMode( TQDockWindow::Undocked ); - addToolBar( tb, grp ); - } - - if ( iface->location( *ait, ActionInterface::Menu ) ) - a->addTo( menu ); - if ( iface->location( *ait, ActionInterface::Toolbar ) ) - a->addTo( tb ); - - iface->release(); - } -} - -void MainWindow::editFunction( const TQString &func, bool rereadSource ) -{ - if ( !formWindow() ) - return; - - if ( formWindow()->formFile()->codeFileState() != FormFile::Ok ) - if ( !formWindow()->formFile()->setupUihFile(FALSE) ) - return; - - TQString lang = currentProject->language(); - if ( !MetaDataBase::hasEditor( lang ) ) { - TQMessageBox::information( this, i18n( "Edit Source" ), - i18n( "There is no plugin for editing %1 code installed.\n" - "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); - return; - } - - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->language() == lang && e->formWindow() == formWindow() ) { - e->show(); - e->setFunction( func ); - return; - } - } - - createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang, func, rereadSource ); -} - -void MainWindow::setupRecentlyFilesMenu() -{ - recentlyFilesMenu->clear(); - int id = 0; - for ( TQStringList::ConstIterator it = recentlyFiles.begin(); it != recentlyFiles.end(); ++it ) { - recentlyFilesMenu->insertItem( *it, id ); - id++; - } -} - -void MainWindow::setupRecentlyProjectsMenu() -{ - recentlyProjectsMenu->clear(); - int id = 0; - for ( TQStringList::ConstIterator it = recentlyProjects.begin(); it != recentlyProjects.end(); ++it ) { - recentlyProjectsMenu->insertItem( *it, id ); - id++; - } -} - -TQPtrList MainWindow::projectList() const -{ - TQPtrList list; - TQMapConstIterator it = projects.begin(); - - while( it != projects.end() ) { - Project *p = it.data(); - ++it; - list.append( p->iFace() ); - } - - return list; -} - -TQStringList MainWindow::projectNames() const -{ - TQStringList res; - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) - res << (*it)->projectName(); - return res; -} - -TQStringList MainWindow::projectFileNames() const -{ - TQStringList res; - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) - res << (*it)->makeRelative( (*it)->fileName() ); - return res; -} - -Project *MainWindow::findProject( const TQString &projectName ) const -{ - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( (*it)->projectName() == projectName ) - return *it; - } - return 0; -} - -void MainWindow::setCurrentProject( Project *pro ) -{ - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( *it == pro ) { - projectSelected( it.key() ); - return; - } - } -} - -void MainWindow::setCurrentProjectByFilename( const TQString& proFilename ) -{ - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( (*it)->makeRelative( (*it)->fileName() ) == proFilename ) { - projectSelected( it.key() ); - return; - } - } -} - - -void MainWindow::recentlyFilesMenuActivated( int id ) -{ - if ( id != -1 ) { - if ( !TQFile::exists( *recentlyFiles.at( id ) ) ) { - TQMessageBox::warning( this, i18n( "Open File" ), - i18n( "Could not open '%1'. File does not exist." ). - arg( *recentlyFiles.at( id ) ) ); - recentlyFiles.remove( recentlyFiles.at( id ) ); - return; - } - fileOpen( "", "", *recentlyFiles.at( id ) ); - TQString fn( *recentlyFiles.at( id ) ); - addRecentlyOpened( fn, recentlyFiles ); - } -} - -void MainWindow::recentlyProjectsMenuActivated( int id ) -{ - if ( id != -1 ) { - if ( !TQFile::exists( *recentlyProjects.at( id ) ) ) { - TQMessageBox::warning( this, i18n( "Open Project" ), - i18n( "Could not open '%1'. File does not exist." ). - arg( *recentlyProjects.at( id ) ) ); - recentlyProjects.remove( recentlyProjects.at( id ) ); - return; - } - openProject( *recentlyProjects.at( id ) ); - TQString fn( *recentlyProjects.at( id ) ); - addRecentlyOpened( fn, recentlyProjects ); - } -} - -void MainWindow::addRecentlyOpened( const TQString &fn, TQStringList &lst ) -{ - TQFileInfo fi( fn ); - fi.convertToAbs(); - TQString f = fi.filePath(); - if ( lst.find( f ) != lst.end() ) - lst.remove( f ); - if ( lst.count() >= 10 ) - lst.pop_back(); - lst.prepend( f ); -} - -TemplateWizardInterface * MainWindow::templateWizardInterface( const TQString& className ) -{ - TemplateWizardInterface* iface = 0; - templateWizardPluginManager->queryInterface( className, & iface ); - return iface; -} - -void MainWindow::setupPluginManagers() -{ - editorPluginManager = new TQPluginManager( IID_Editor, TQApplication::libraryPaths(), "/tdevdesigner" ); - MetaDataBase::setEditor( editorPluginManager->featureList() ); - - templateWizardPluginManager = - new TQPluginManager( IID_TemplateWizard, TQApplication::libraryPaths(), pluginDirectory() ); - - MetaDataBase::setupInterfaceManagers( "/designer" ); - preferencePluginManager = - new TQPluginManager( IID_Preference, TQApplication::libraryPaths(), pluginDirectory() ); - projectSettingsPluginManager = - new TQPluginManager( IID_ProjectSettings, TQApplication::libraryPaths(), pluginDirectory() ); - sourceTemplatePluginManager = - new TQPluginManager( IID_SourceTemplate, TQApplication::libraryPaths(), pluginDirectory() ); - - if ( preferencePluginManager ) { - TQStringList lst = preferencePluginManager->featureList(); - for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { - PreferenceInterface *i = 0; - preferencePluginManager->queryInterface( *it, &i ); - if ( !i ) - continue; - i->connectTo( designerInterface() ); - PreferenceInterface::Preference *pf = i->preference(); - if ( pf ) - addPreferencesTab( pf->tab, pf->title, pf->receiver, pf->init_slot, pf->accept_slot ); - i->deletePreferenceObject( pf ); - - i->release(); - } - } - if ( projectSettingsPluginManager ) { - TQStringList lst = projectSettingsPluginManager->featureList(); - for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { - ProjectSettingsInterface *i = 0; - projectSettingsPluginManager->queryInterface( *it, &i ); - if ( !i ) - continue; - i->connectTo( designerInterface() ); - - ProjectSettingsInterface::ProjectSettings *pf = i->projectSetting(); - if ( pf ) - addProjectTab( pf->tab, pf->title, pf->receiver, pf->init_slot, pf->accept_slot ); - i->deleteProjectSettingsObject( pf ); - i->release(); - } - } -} - -void MainWindow::addPreferencesTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ) -{ - Tab t; - t.w = tab; - t.title = title; - t.receiver = receiver; - t.init_slot = init_slot; - t.accept_slot = accept_slot; - preferenceTabs << t; -} - -void MainWindow::addProjectTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ) -{ - Tab t; - t.w = tab; - t.title = title; - t.receiver = receiver; - t.init_slot = init_slot; - t.accept_slot = accept_slot; - projectTabs << t; -} - -void MainWindow::setModified( bool b, TQWidget *window ) -{ - TQWidget *w = window; - while ( w ) { - if ( ::tqqt_cast(w) ) { - ( (FormWindow*)w )->modificationChanged( b ); - return; - } else if ( ::tqqt_cast(w) ) { - FormWindow *fw = ( (SourceEditor*)w )->formWindow(); - if ( fw && !fw->isFake() ) { - //fw->commandHistory()->setModified( b ); - //fw->modificationChanged( b ); - fw->formFile()->setModified( b, FormFile::WFormCode ); - wspace->update( fw->formFile() ); - } else { - wspace->update(); - } - return; - } - w = w->parentWidget( TRUE ); - } -} - -void MainWindow::editorClosed( SourceEditor *e ) -{ - sourceEditors.take( sourceEditors.findRef( e ) ); -} - -void MainWindow::functionsChanged() -{ - updateFunctionsTimer->start( 0, TRUE ); -} - -void MainWindow::doFunctionsChanged() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->refresh( FALSE ); - hierarchyView->formDefinitionView()->refresh(); -} - -void MainWindow::updateFunctionList() -{ - if ( !qWorkspace()->activeWindow() || !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow(); - se->save(); - hierarchyView->formDefinitionView()->refresh(); - if ( !currentProject->isCpp() && se->formWindow() ) { - LanguageInterface *iface = MetaDataBase::languageInterface( currentProject->language() ); - if ( !iface ) - return; - TQValueList conns; - iface->connections( se->text(), &conns ); - MetaDataBase::setupConnections( TQT_TQOBJECT(se->formWindow()), conns ); - propertyEditor->eventList()->setup(); - } -} - -void MainWindow::updateWorkspace() -{ - wspace->setCurrentProject( currentProject ); -} - -void MainWindow::showDebugStep( TQObject *o, int line ) -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->clearStep(); - if ( !o || line == -1 ) - return; - showSourceLine( o, line, Step ); -} - -void MainWindow::showStackFrame( TQObject *o, int line ) -{ - if ( !o || line == -1 ) - return; - showSourceLine( o, line, StackFrame ); -} - -void MainWindow::showErrorMessage( TQObject *o, int errorLine, const TQString &errorMessage ) -{ - if ( o ) { - errorLine--; // ###### - TQValueList l; - l << ( errorLine + 1 ); - TQStringList l2; - l2 << errorMessage; - TQObjectList ol; - ol.append( o ); - TQStringList ll; - ll << currentProject->locationOfObject( o ); - oWindow->setErrorMessages( l2, l, TRUE, ll, ol ); - showSourceLine( o, errorLine, Error ); - } -} - -void MainWindow::finishedRun() -{ - inDebugMode = FALSE; - previewing = FALSE; - debuggingForms.clear(); - enableAll( TRUE ); - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->project() == currentProject ) - e->editorInterface()->setMode( EditorInterface::Editing ); - e->clearStackFrame(); - } - outputWindow()->clearErrorMessages(); -} - -void MainWindow::enableAll( bool enable ) -{ - menuBar()->setEnabled( enable ); - TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( TQT_BASE_OBJECT(o) == wspace->parentWidget() || - TQT_BASE_OBJECT(o) == oWindow->parentWidget() || - TQT_BASE_OBJECT(o) == hierarchyView->parentWidget() ) - continue; - ( (TQWidget*)o )->setEnabled( enable ); - } - delete l; -} - -void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) -{ - TQWidgetList windows = qworkspace->windowList(); - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - FormWindow *fw = 0; - SourceEditor *se = 0; - SourceFile *sf = 0; - if ( ::tqqt_cast(w) ) { - fw = (FormWindow*)w; - } else if ( ::tqqt_cast(w) ) { - se = (SourceEditor*)w; - if ( !se->object() ) - continue; - if ( se->formWindow() ) - fw = se->formWindow(); - else - sf = se->sourceFile(); - } - - if ( fw ) { - if ( fw->project() != currentProject ) - continue; - if ( qstrcmp( fw->name(), o->name() ) == 0 || - fw->isFake() && currentProject->objectForFakeForm( fw ) == o ) { - if ( se ) { - switch ( lm ) { - case Error: - se->editorInterface()->setError( line ); - break; - case Step: - se->editorInterface()->setStep( line ); - break; - case StackFrame: - se->editorInterface()->setStackFrame( line ); - break; - } - return; - } else { - fw->showNormal(); - fw->setFocus(); - lastActiveFormWindow = fw; - tqApp->processEvents(); - se = editSource(); - if ( se ) { - switch ( lm ) { - case Error: - se->editorInterface()->setError( line ); - break; - case Step: - se->editorInterface()->setStep( line ); - break; - case StackFrame: - se->editorInterface()->setStackFrame( line ); - break; - } - return; - } - } - } - } else if ( se ) { - if ( o != sf ) - continue; - switch ( lm ) { - case Error: - se->editorInterface()->setError( line ); - break; - case Step: - se->editorInterface()->setStep( line ); - break; - case StackFrame: - se->editorInterface()->setStackFrame( line ); - break; - } - return; - } - } - - if ( ::tqqt_cast(o) ) { - for ( TQPtrListIterator sources = currentProject->sourceFiles(); - sources.current(); ++sources ) { - SourceFile* f = sources.current(); - if ( f == o ) { - SourceEditor *se = editSource( f ); - if ( se ) { - switch ( lm ) { - case Error: - se->editorInterface()->setError( line ); - break; - case Step: - se->editorInterface()->setStep( line ); - break; - case StackFrame: - se->editorInterface()->setStackFrame( line ); - break; - } - } - return; - } - } - } - - FormFile *ff = currentProject->fakeFormFileFor( o ); - FormWindow *fw = 0; - if ( ff ) - fw = ff->formWindow(); - - if ( !fw && !qwf_forms ) { - tqWarning( "MainWindow::showSourceLine: qwf_forms is NULL!" ); - return; - } - - mblockNewForms = TRUE; - if ( !fw ) - openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) ); - else - fw->formFile()->showEditor( FALSE ); - tqApp->processEvents(); // give all views the chance to get the formwindow - SourceEditor *se = editSource(); - if ( se ) { - switch ( lm ) { - case Error: - se->editorInterface()->setError( line ); - break; - case Step: - se->editorInterface()->setStep( line ); - break; - case StackFrame: - se->editorInterface()->setStackFrame( line ); - break; - } - } - mblockNewForms = FALSE; -} - - -TQObject *MainWindow::findRealObject( TQObject *o ) -{ - TQWidgetList windows = qWorkspace()->windowList(); - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::tqqt_cast(w) && TQString( w->name() ) == TQString( o->name() ) ) - return TQT_TQOBJECT(w); - else if ( ::tqqt_cast(w) && ( (SourceEditor*)w )->formWindow() && - TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) ) - return TQT_TQOBJECT(w); - else if ( ::tqqt_cast(w) && ( (SourceEditor*)w )->sourceFile() && - ( (SourceEditor*)w )->sourceFile() == o ) - return o; - } - return 0; -} - -void MainWindow::formNameChanged( FormWindow *fw ) -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(fw) ) - e->refresh( TRUE ); - if ( e->project() == fw->project() ) - e->resetContext(); - } -} - -void MainWindow::breakPointsChanged() -{ - if ( !inDebugMode ) - return; - if ( !qWorkspace()->activeWindow() || !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow(); - if ( !e->object() || !e->project() ) - return; - if ( e->project() != currentProject ) - return; - - if ( !interpreterPluginManager ) { - interpreterPluginManager = - new TQPluginManager( IID_Interpreter, - TQApplication::libraryPaths(), - "/qsa" ); - } - - InterpreterInterface *iiface = 0; - if ( interpreterPluginManager ) { - TQString lang = currentProject->language(); - iiface = 0; - interpreterPluginManager->queryInterface( lang, &iiface ); - if ( !iiface ) - return; - } - - e->saveBreakPoints(); - - for ( TQObject *o = debuggingForms.first(); o; o = debuggingForms.next() ) { - if ( qstrcmp( o->name(), e->object()->name() ) == 0 ) { - iiface->setBreakPoints( o, MetaDataBase::breakPoints( e->object() ) ); - break; - } - } - - for ( e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->project() == currentProject && e->sourceFile() ) { - TQValueList bps = MetaDataBase::breakPoints( e->sourceFile() ); - iiface->setBreakPoints( e->object(), bps ); - } - } - - iiface->release(); -} - -int MainWindow::currentLayoutDefaultSpacing() const -{ - if ( ( (MainWindow*)this )->formWindow() ) - return ( (MainWindow*)this )->formWindow()->layoutDefaultSpacing(); - return BOXLAYOUT_DEFAULT_SPACING; -} - -int MainWindow::currentLayoutDefaultMargin() const -{ - if ( ( (MainWindow*)this )->formWindow() ) - return ( (MainWindow*)this )->formWindow()->layoutDefaultMargin(); - return BOXLAYOUT_DEFAULT_MARGIN; -} - -void MainWindow::saveAllBreakPoints() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - e->save(); - e->saveBreakPoints(); - } -} - -void MainWindow::resetBreakPoints() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->resetBreakPoints(); -} - -SourceFile *MainWindow::sourceFile() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( qworkspace->activeWindow() == e ) { - if ( e->sourceFile() ) - return e->sourceFile(); - } - } - return 0; -} - -bool MainWindow::openProjectSettings( Project *pro ) -{ - ProjectSettings dia( pro, this, 0, TRUE ); - SenderObject *senderObject = new SenderObject( designerInterface() ); - TQValueList::ConstIterator it; - for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { - Tab t = *it; - if ( t.title != pro->language() ) - continue; - dia.tabWidget->addTab( t.w, t.title ); - if ( t.receiver ) { - connect( dia.buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); - connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); - connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); - senderObject->emitInitSignal(); - disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); - } - } - - if ( singleProject ) - dia.tabWidget->setTabEnabled( dia.tabSettings, FALSE ); - - int res = dia.exec(); - - delete senderObject; - - for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { - Tab t = *it; - dia.tabWidget->removePage( t.w ); - t.w->reparent( 0, TQPoint(0,0), FALSE ); - } - - return res == TQDialog::Accepted; -} - -void MainWindow::popupProjectMenu( const TQPoint &pos ) -{ - projectMenu->exec( pos ); -} - -TQStringList MainWindow::sourceTemplates() const -{ - return sourceTemplatePluginManager->featureList(); -} - -SourceTemplateInterface* MainWindow::sourceTemplateInterface( const TQString& templ ) -{ - SourceTemplateInterface *iface = 0; - sourceTemplatePluginManager->queryInterface( templ, &iface); - return iface; -} - -TQString MainWindow::whatsThisFrom( const TQString &key ) -{ - if ( menuHelpFile.isEmpty() ) { - TQString fn( documentationPath() ); - fn += "/designer-manual-11.html"; - TQFile f( fn ); - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - menuHelpFile = ts.read(); - } - } - - int i = menuHelpFile.find( key ); - if ( i == -1 ) - return TQString(); - int start = i; - int end = i; - start = menuHelpFile.findRev( "
  • ", i ) + 4; - end = menuHelpFile.find( '\n', i ) - 1; - return menuHelpFile.mid( start, end - start + 1 ); -} - -void MainWindow::setSingleProject( Project *pro ) -{ - if ( eProject ) { - Project *pro = eProject; - pro->save(); - TQWidgetList windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( TRUE ); - TQWidgetListIt wit( windows ); - while ( wit.current() ) { - TQWidget *w = wit.current(); - ++wit; - if ( ::tqqt_cast(w) ) { - if ( ( (FormWindow*)w )->project() == pro ) { - if ( ( (FormWindow*)w )->formFile()->editor() ) - windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); - ( (FormWindow*)w )->formFile()->close(); - } - } else if ( ::tqqt_cast(w) ) { - ( (SourceEditor*)w )->close(); - } - } - hierarchyView->clear(); - windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( FALSE ); - currentProject = 0; - updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); - } - - singleProject = TRUE; - projects.clear(); - TQAction *a = new TQAction( i18n( pro->name() ), i18n( pro->name() ), 0, - actionGroupProjects, 0, TRUE ); - eProject = pro; - projects.insert( a, eProject ); - a->setOn( TRUE ); - actionGroupProjects->removeFrom( projectMenu ); - actionGroupProjects->removeFrom( projectToolBar ); - currentProject = eProject; - currentProject->designerCreated(); -} - -void MainWindow::shuttingDown() -{ - outputWindow()->shuttingDown(); -} - -void MainWindow::showGUIStuff( bool b ) -{ - if ( (bool)guiStuffVisible == b ) - return; - guiStuffVisible = b; - if ( !b ) { - setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE ); - toolBox->parentWidget()->hide(); - for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { - tb->hide(); - setAppropriate( tb, FALSE ); - } - propertyEditor->setPropertyEditorEnabled( FALSE ); - setAppropriate( layoutToolBar, FALSE ); - layoutToolBar->hide(); - setAppropriate( toolsToolBar, FALSE ); - toolsToolBar->hide(); - menubar->removeItem( toolsMenuId ); - menubar->removeItem( toolsMenuId + 1 ); - menubar->removeItem( toolsMenuId + 2 ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); - actionEditFormSettings->setEnabled( FALSE ); - actionEditSource->setEnabled( FALSE ); - actionEditConnections->setEnabled( FALSE ); - actionEditFunctions->setEnabled( FALSE ); - actionEditAccels->setEnabled( FALSE ); - ( (TQDockWindow*)propertyEditor->parentWidget() )-> - setCaption( i18n( "Signal Handlers" ) ); - actionGroupNew->removeFrom( fileMenu ); - actionGroupNew->removeFrom( projectToolBar ); - actionFileSave->removeFrom( fileMenu ); - actionFileSave->removeFrom( projectToolBar ); - actionFileExit->removeFrom( fileMenu ); - actionNewFile->addTo( fileMenu ); - actionNewFile->addTo( projectToolBar ); - actionFileSave->addTo( fileMenu ); - actionFileSave->addTo( projectToolBar ); - actionFileExit->addTo( fileMenu ); - } else { - setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE ); - toolBox->parentWidget()->show(); - for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { - setAppropriate( tb, TRUE ); - tb->hide(); - } - propertyEditor->setPropertyEditorEnabled( TRUE ); - setAppropriate( layoutToolBar, TRUE ); - layoutToolBar->show(); - setAppropriate( toolsToolBar, TRUE ); - toolsToolBar->show(); - menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex ); - menubar->insertItem( i18n( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); - menubar->insertItem( i18n( "&Preview" ), previewMenu, toolsMenuId + 2, toolsMenuIndex + 2 ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); - actionEditFormSettings->setEnabled( TRUE ); - actionEditSource->setEnabled( TRUE ); - actionEditConnections->setEnabled( TRUE ); - actionEditFunctions->setEnabled( TRUE ); - actionEditAccels->setEnabled( TRUE ); - ( (TQDockWindow*)propertyEditor->parentWidget() )-> - setCaption( i18n( "Property Editor/Signal Handlers" ) ); - actionFileSave->removeFrom( fileMenu ); - actionFileSave->removeFrom( projectToolBar ); - actionFileExit->removeFrom( fileMenu ); - actionGroupNew->addTo( fileMenu ); - actionGroupNew->addTo( projectToolBar ); - actionFileSave->addTo( fileMenu ); - actionFileSave->addTo( projectToolBar ); - actionFileExit->addTo( fileMenu ); - } -} - -void MainWindow::setEditorsReadOnly( bool b ) -{ - editorsReadOnly = b; -} - -void MainWindow::setPluginDirectory( const TQString &pd ) -{ - pluginDir = pd; - if ( !qwf_plugin_dir ) - qwf_plugin_dir = new TQString( pd ); - else - *qwf_plugin_dir = pd; -} - -void MainWindow::toggleSignalHandlers( bool show ) -{ - if ( sSignalHandlers == show ) - return; - sSignalHandlers = show; - propertyEditor->setSignalHandlersEnabled( show ); -} - -void MainWindow::statusMessage( const TQString &msg ) -{ - m_part->statusMessage(msg); -} diff --git a/tdevdesigner/designer/mainwindow.h b/tdevdesigner/designer/mainwindow.h deleted file mode 100644 index f22d371f..00000000 --- a/tdevdesigner/designer/mainwindow.h +++ /dev/null @@ -1,513 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include "metadatabase.h" -#include "../interfaces/actioninterface.h" // for GCC 2.7.* compatibility -#include "../interfaces/editorinterface.h" -#include "../interfaces/templatewizardiface.h" -#include "../interfaces/languageinterface.h" -#include "../interfaces/filterinterface.h" -#include "../interfaces/interpreterinterface.h" -#include "../interfaces/preferenceinterface.h" -#include "../interfaces/projectsettingsiface.h" -#include "../interfaces/sourcetemplateiface.h" -#include "sourceeditor.h" - -#include -#include -#include -#include -#include -#include - -class TQToolBox; -class PropertyEditor; -class TQWorkspace; -class TQMenuBar; -class FormWindow; -class TQPopupMenu; -class HierarchyView; -class TQCloseEvent; -class Workspace; -class ActionEditor; -class Project; -class OutputWindow; -class TQTimer; -class FindDialog; -struct DesignerProject; -class ReplaceDialog; -class GotoLineDialog; -class SourceFile; -class FormFile; -class TQAssistantClient; -class DesignerAction; - -#if defined(TQ_FULL_TEMPLATE_INSTANTIATION) -#include -#else -class TQToolBar; -#endif -class Preferences; - -class TDevDesignerPart; - -class MainWindow : public TQMainWindow -{ - Q_OBJECT - - -public: - enum LineMode { Error, Step, StackFrame }; - - MainWindow( TDevDesignerPart *part, bool asClient, bool single = FALSE, const TQString &plgDir = "/designer" ); - ~MainWindow(); - - HierarchyView *objectHierarchy() const; - Workspace *workspace() const; - PropertyEditor *propertyeditor() const; - ActionEditor *actioneditor() const; - - void resetTool(); - int currentTool() const; - - FormWindow *formWindow(); - - bool unregisterClient( FormWindow *w ); - void editorClosed( SourceEditor *e ); - TQWidget *isAFormWindowChild( TQObject *o ) const; - TQWidget *isAToolBarChild( TQObject *o ) const; - - void insertFormWindow( FormWindow *fw ); - TQWorkspace *qWorkspace() const; - - void popupFormWindowMenu( const TQPoint &gp, FormWindow *fw ); - void popupWidgetMenu( const TQPoint &gp, FormWindow *fw, TQWidget *w ); - - TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent ); - TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot ); - - FormWindow *openFormWindow( const TQString &fn, bool validFileName = TRUE, FormFile *ff = 0 ); - bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w ); - - void setGrid( const TQPoint &p ); - void setShowGrid( bool b ); - void setSnapGrid( bool b ); - TQPoint grid() const { return grd; } - bool showGrid() const { return sGrid; } - bool snapGrid() const { return snGrid && sGrid; } - - TQString documentationPath() const; - - static MainWindow *self; - - TQString templatePath() const { return templPath; } - - void editFunction( const TQString &func, bool rereadSource = FALSE ); - - bool isPreviewing() const { return previewing; } - - Project *currProject() const { return currentProject; } - - FormWindow *activeForm() const { return lastActiveFormWindow; } - - TemplateWizardInterface* templateWizardInterface( const TQString& className ); - TQStringList sourceTemplates() const; - SourceTemplateInterface* sourceTemplateInterface( const TQString& templ ); - TQUnknownInterface* designerInterface() const { return desInterface; } - TQPtrList projectList() const; - TQStringList projectNames() const; - TQStringList projectFileNames() const; - Project *findProject( const TQString &projectName ) const; - void setCurrentProject( Project *pro ); - void setCurrentProjectByFilename( const TQString& proFilename ); - OutputWindow *outputWindow() const { return oWindow; } - void addPreferencesTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ); - void addProjectTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ); - void setModified( bool b, TQWidget *window ); - void functionsChanged(); - void updateFunctionList(); - void updateWorkspace(); - void runProjectPrecondition(); - void runProjectPostcondition( TQObjectList *l ); - - void formNameChanged( FormWindow *fw ); - - int currentLayoutDefaultSpacing() const; - int currentLayoutDefaultMargin() const; - - void saveAllBreakPoints(); - void resetBreakPoints(); - - SourceFile *sourceFile(); - void createNewProject( const TQString &lang ); - - void popupProjectMenu( const TQPoint &pos ); - TQObject *findRealObject( TQObject *o ); - - void setSingleProject( Project *pro ); - bool singleProjectMode() const { return singleProject; } - - void showSourceLine( TQObject *o, int line, LineMode lm ); - - void shuttingDown(); - void showGUIStuff( bool b ); - void setEditorsReadOnly( bool b ); - bool areEditorsReadOnly() const { return editorsReadOnly; } - void toggleSignalHandlers( bool show ); - bool showSignalHandlers() const { return sSignalHandlers; } - void writeConfig(); - - void openProject( const TQString &fn ); - void setPluginDirectory( const TQString &pd ); - TQString pluginDirectory() const { return pluginDir; } - - TQAssistantClient* assistantClient() const { return assistant; } - - void addRecentlyOpenedFile( const TQString &fn ) { addRecentlyOpened( fn, recentlyFiles ); } - - void statusMessage(const TQString &msg); - - //integration - TDevDesignerPart *part() const { return m_part; } - -public slots: - void showProperties( TQObject *w ); - void updateProperties( TQObject *w ); - void showDialogHelp(); - void showDebugStep( TQObject *o, int line ); - void showStackFrame( TQObject *o, int line ); - void showErrorMessage( TQObject *o, int line, const TQString &errorMessage ); - void finishedRun(); - void breakPointsChanged(); - -signals: - void currentToolChanged(); - void hasActiveForm( bool ); - void hasActiveWindow( bool ); - void hasActiveWindowOrProject( bool ); - void hasNonDummyProject( bool ); - void formModified( bool ); - void formWindowsChanged(); - void formWindowChanged(); - void projectChanged(); - void editorChanged(); - -protected: - bool eventFilter( TQObject *o, TQEvent *e ); - void closeEvent( TQCloseEvent *e ); - -public slots: - void fileNew(); - void fileNewDialog(); - void fileNewFile(); - void fileClose(); - void fileQuit(); - void fileCloseProject(); // not visible in menu, called from fileClose - void fileOpen(); - void fileOpen( const TQString &filter, const TQString &extension, const TQString &filename = "" , bool inProject = TRUE ); - bool fileSave(); - bool fileSaveForm(); // not visible in menu, called from fileSave - bool fileSaveProject(); // not visible in menu, called from fileSaveProject - bool fileSaveAs(); - void fileSaveAll(); - void fileCreateTemplate(); - -public slots: - void editUndo(); - void editRedo(); - void editCut(); - void editCopy(); - void editPaste(); - void editDelete(); - void editSelectAll(); - void editLower(); - void editRaise(); - void editAdjustSize(); - void editLayoutHorizontal(); - void editLayoutVertical(); - void editLayoutHorizontalSplit(); - void editLayoutVerticalSplit(); - void editLayoutGrid(); - void editLayoutContainerHorizontal(); - void editLayoutContainerVertical(); - void editLayoutContainerGrid(); - void editBreakLayout(); - void editAccels(); - void editFunctions(); - void editConnections(); - SourceEditor *editSource(); - SourceEditor *editSource( SourceFile *f ); - SourceEditor *openSourceEditor(); - SourceEditor *createSourceEditor( TQObject *object, Project *project, - const TQString &lang = TQString(), - const TQString &func = TQString(), - bool rereadSource = FALSE ); - void editFormSettings(); - void editProjectSettings(); - void editPixmapCollection(); - void editDatabaseConnections(); - void editPreferences(); - - void projectInsertFile(); - - void searchFind(); - void searchIncremetalFindMenu(); - void searchIncremetalFind(); - void searchIncremetalFindNext(); - void searchReplace(); - void searchGotoLine(); - - void previewForm(); - void previewForm( const TQString& ); - - void toolsCustomWidget(); - void toolsConfigure(); - - void helpContents(); - void helpManual(); - void helpAbout(); - void helpAboutQt(); - void helpRegister(); - -private slots: - void activeWindowChanged( TQWidget *w ); - void updateUndoRedo( bool, bool, const TQString &, const TQString & ); - void updateEditorUndoRedo(); - - void toolSelected( TQAction* ); - - void clipboardChanged(); - void selectionChanged(); - - void windowsMenuActivated( int id ); - void setupWindowActions(); - - void createNewTemplate(); - void projectSelected( TQAction *a ); - - void setupRecentlyFilesMenu(); - void setupRecentlyProjectsMenu(); - void recentlyFilesMenuActivated( int id ); - void recentlyProjectsMenuActivated( int id ); - - void emitProjectSignals(); - - void showStartDialog(); - -private: - void setupMDI(); - void setupMenuBar(); - void setupEditActions(); - void setupProjectActions(); - void setupSearchActions(); - void setupToolActions(); - void setupLayoutActions(); - void setupFileActions(); - void setupPreviewActions(); - void setupHelpActions(); - void setupRMBMenus(); - - void setupPropertyEditor(); - void setupHierarchyView(); - void setupWorkspace(); - void setupActionEditor(); - void setupOutputWindow(); - void setupToolbox(); - - void setupActionManager(); - void setupPluginManagers(); - - void enableAll( bool enable ); - - TQWidget* previewFormInternal( TQStyle* style = 0, TQPalette* pal = 0 ); - - void readConfig(); - - void setupRMBProperties( TQValueList &ids, TQMap &props, TQWidget *w ); - void handleRMBProperties( int id, TQMap &props, TQWidget *w ); - void setupRMBSpecialCommands( TQValueList &ids, TQMap &commands, TQWidget *w ); - void handleRMBSpecialCommands( int id, TQMap &commands, TQWidget *w ); - void setupRMBSpecialCommands( TQValueList &ids, TQMap &commands, FormWindow *w ); - void handleRMBSpecialCommands( int id, TQMap &commands, FormWindow *w ); - bool openEditor( TQWidget *w, FormWindow *fw ); - void rebuildCustomWidgetGUI(); - void rebuildCommonWidgetsToolBoxPage(); - void checkTempFiles(); - - void addRecentlyOpened( const TQString &fn, TQStringList &lst ); - - TQString whatsThisFrom( const TQString &key ); - -private slots: - void doFunctionsChanged(); - bool openProjectSettings( Project *pro ); - -private: - struct Tab - { - TQWidget *w; - TQString title; - TQObject *receiver; - const char *init_slot, *accept_slot; - TQ_DUMMY_COMPARISON_OPERATOR( Tab ) - }; - -private: - PropertyEditor *propertyEditor; - HierarchyView *hierarchyView; - Workspace *wspace; - TQWidget *lastPressWidget; - TQWorkspace *qworkspace; - TQMenuBar *menubar; - TQGuardedPtr lastActiveFormWindow; - bool breakLayout, layoutChilds, layoutSelected; - TQPoint grd; - bool sGrid, snGrid; - bool restoreConfig; - bool backPix; - bool splashScreen; - TQString fileFilter; - - TQMap projects; - DesignerAction *actionEditUndo, *actionEditRedo, *actionEditCut, *actionEditCopy, - *actionEditPaste, *actionEditDelete, - *actionEditAdjustSize, - *actionEditHLayout, *actionEditVLayout, *actionEditGridLayout, - *actionEditSplitHorizontal, *actionEditSplitVertical, - *actionEditSelectAll, *actionEditBreakLayout, *actionEditFunctions, *actionEditConnections, - *actionEditLower, *actionEditRaise; - TQAction *actionInsertSpacer; - TQActionGroup *actionGroupTools, *actionGroupProjects; - TQAction* actionPointerTool, *actionConnectTool, *actionOrderTool, *actionBuddyTool; - TQAction* actionCurrentTool; - DesignerAction *actionHelpContents, *actionHelpAbout, *actionHelpAboutTQt, *actionHelpWhatsThis; - DesignerAction *actionHelpManual; -#if defined(TQT_NON_COMMERCIAL) - DesignerAction *actionHelpRegister; -#endif - DesignerAction *actionToolsCustomWidget, *actionEditPreferences; - DesignerAction *actionWindowTile, *actionWindowCascade, *actionWindowClose, *actionWindowCloseAll; - DesignerAction *actionWindowNext, *actionWindowPrevious; - DesignerAction *actionEditFormSettings, *actionEditAccels; - DesignerAction *actionEditSource, *actionNewFile, *actionFileSave, *actionFileExit; - DesignerAction *actionFileClose, *actionFileSaveAs, *actionFileSaveAll; - DesignerAction *actionSearchFind, *actionSearchIncremetal, *actionSearchReplace, *actionSearchGotoLine; - DesignerAction *actionProjectAddFile, *actionEditPixmapCollection, *actionEditDatabaseConnections, - *actionEditProjectSettings, *actionPreview; - TQActionGroup *actionGroupNew; - - TQPopupMenu *rmbWidgets; - TQPopupMenu *rmbFormWindow; - TQPopupMenu *customWidgetMenu, *windowMenu, *fileMenu, *recentlyFilesMenu, *recentlyProjectsMenu; - TQPopupMenu *toolsMenu, *layoutMenu, *previewMenu; - TQToolBar *customWidgetToolBar, *layoutToolBar, *projectToolBar, *customWidgetToolBar2, *toolsToolBar; - TQToolBar *commonWidgetsToolBar; - TQPtrList widgetToolBars; - - Preferences *prefDia; - TQMap propertyDocumentation; - bool client; - TQString templPath; - ActionEditor *actionEditor; - Project *currentProject; - TQPluginManager *actionPluginManager; - TQPluginManager *editorPluginManager; - TQPluginManager *templateWizardPluginManager; - TQPluginManager *interpreterPluginManager; - TQPluginManager *preferencePluginManager; - TQPluginManager *projectSettingsPluginManager; - TQPluginManager *sourceTemplatePluginManager; - TQPtrList sourceEditors; - bool previewing; - TQUnknownInterface *desInterface; - TQStringList recentlyFiles; - TQStringList recentlyProjects; - OutputWindow *oWindow; - TQValueList preferenceTabs; - TQValueList projectTabs; - bool databaseAutoEdit; - TQTimer *updateFunctionsTimer; - TQTimer *autoSaveTimer; - bool autoSaveEnabled; - int autoSaveInterval; - TQLineEdit *incrementalSearch; - TQGuardedPtr findDialog; - TQGuardedPtr replaceDialog; - TQGuardedPtr gotoLineDialog; - Project *eProject; - bool inDebugMode; - TQObjectList debuggingForms; - TQString lastOpenFilter; - TQGuardedPtr previewedForm; - TQPopupMenu *projectMenu; - TQString menuHelpFile; - bool singleProject; - TQToolBox *toolBox; - int toolsMenuId, toolsMenuIndex; - uint guiStuffVisible : 1; - uint editorsReadOnly : 1; - uint savePluginPaths : 1; - TQAssistantClient *assistant; - bool shStartDialog; - TQString pluginDir; - bool sSignalHandlers; - - TDevDesignerPart *m_part; - -public: - TQString lastSaveFilter; - TQPtrList toolActions; - TQPtrList commonWidgetsPage; - -friend class TDevDesignerPart; -}; - -class SenderObject : public TQObject -{ - Q_OBJECT - - -public: - SenderObject( TQUnknownInterface *i ) : iface( i ) { iface->addRef(); } - ~SenderObject() { iface->release(); } - -public slots: - void emitInitSignal() { emit initSignal( iface ); } - void emitAcceptSignal() { emit acceptSignal( iface ); } - -signals: - void initSignal( TQUnknownInterface * ); - void acceptSignal( TQUnknownInterface * ); - -private: - TQUnknownInterface *iface; - -}; - -#endif diff --git a/tdevdesigner/designer/mainwindowactions.cpp b/tdevdesigner/designer/mainwindowactions.cpp deleted file mode 100644 index b9d0b1b6..00000000 --- a/tdevdesigner/designer/mainwindowactions.cpp +++ /dev/null @@ -1,2067 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "mainwindow.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "defs.h" -#include "project.h" -#include "widgetdatabase.h" -#include "widgetfactory.h" -#include "preferences.h" -#include "formwindow.h" -#include "newformimpl.h" -#include "resource.h" -#include "projectsettingsimpl.h" -#include "workspace.h" -#include "createtemplate.h" -#include "hierarchyview.h" -#include "editfunctionsimpl.h" -#include "finddialog.h" -#include "replacedialog.h" -#include "gotolinedialog.h" -#include "formsettingsimpl.h" -#include "pixmapcollectioneditor.h" -#include "styledbutton.h" -#include "customwidgeteditorimpl.h" -#ifndef TQT_NO_SQL -#include "dbconnectionsimpl.h" -#include "dbconnectionimpl.h" -#endif -#include "widgetaction.h" -#include -#include "startdialogimpl.h" -#include "designerappiface.h" -#include "connectiondialog.h" -#include "configtoolboxdialog.h" -#include "designeraction.h" - -#include "tdevdesigner_part.h" - -static const char * whatsthis_image[] = { - "16 16 3 1", - " c None", - "o c #000000", - "a c #000080", - "o aaaaa ", - "oo aaa aaa ", - "ooo aaa aaa", - "oooo aa aa", - "ooooo aa aa", - "oooooo a aaa", - "ooooooo aaa ", - "oooooooo aaa ", - "ooooooooo aaa ", - "ooooo aaa ", - "oo ooo ", - "o ooo aaa ", - " ooo aaa ", - " ooo ", - " ooo ", - " ooo "}; - -const TQString toolbarHelp = "

    Toolbars contain a number of buttons to " -"provide quick access to often used functions.%1" -"
    Click on the toolbar handle to hide the toolbar, " -"or drag and place the toolbar to a different location.

    "; - -static TQIconSet createIconSet( const TQString &name ) -{ - TQIconSet ic( BarIcon( "" + name, TDevDesignerPartFactory::instance() ) ); - TQString prefix = "designer_"; - int right = name.length() - prefix.length(); - ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), TDevDesignerPartFactory::instance() ), - TQIconSet::Small, TQIconSet::Disabled ); - return ic; -} - -void MainWindow::setupEditActions() -{ - actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, TQT_TQOBJECT(this), 0 ); - actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) ); - actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) ); - connect( actionEditUndo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editUndo() ) ); - actionEditUndo->setEnabled( FALSE ); - - actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, TQT_TQOBJECT(this), 0 ); - actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") ); - actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) ); - connect( actionEditRedo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRedo() ) ); - actionEditRedo->setEnabled( FALSE ); - - actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, TQT_TQOBJECT(this), 0 ); - actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) ); - actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) ); - connect( actionEditCut, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCut() ) ); - actionEditCut->setEnabled( FALSE ); - - actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, TQT_TQOBJECT(this), 0 ); - actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) ); - actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) ); - connect( actionEditCopy, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCopy() ) ); - actionEditCopy->setEnabled( FALSE ); - - actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, TQT_TQOBJECT(this), 0 ); - actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) ); - actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) ); - connect( actionEditPaste, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPaste() ) ); - actionEditPaste->setEnabled( FALSE ); - - actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, TQT_TQOBJECT(this), 0 ); - actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) ); - actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) ); - connect( actionEditDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); - actionEditDelete->setEnabled( FALSE ); -#ifdef TQ_WS_MAC - TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, TQT_TQOBJECT(this), 0 ); - connect( macDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); -#endif - - actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, TQT_TQOBJECT(this), 0 ); - actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) ); - actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) ); - connect( actionEditSelectAll, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ) ); - actionEditSelectAll->setEnabled( TRUE ); - - actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, TQT_TQOBJECT(this), 0 ); - actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) ); - actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) ); - connect( actionEditRaise, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRaise() ) ); - actionEditRaise->setEnabled( FALSE ); - - actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, TQT_TQOBJECT(this), 0 ); - actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) ); - actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) ); - connect( actionEditLower, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLower() ) ); - actionEditLower->setEnabled( FALSE ); - - actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(), - i18n( "Chec&k Accelerators" ), ALT + Key_R, TQT_TQOBJECT(this), 0 ); - actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") ); - actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) ); - connect( actionEditAccels, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAccels() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); - - actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"), - i18n( "S&lots..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") ); - actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) ); - connect( actionEditFunctions, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFunctions() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); - - actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"), - i18n( "Co&nnections..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") ); - actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) ); - connect( actionEditConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editConnections() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); - - actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(), - i18n( "&Source..." ), CTRL + Key_E, TQT_TQOBJECT(this), 0 ); - actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") ); - actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) ); - connect( actionEditSource, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSource() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); - - actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(), - i18n( "&Form Settings..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") ); - actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) ); - connect( actionEditFormSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFormSettings() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); - - actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(), - i18n( "Preferences..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") ); - actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) ); - connect( actionEditPreferences, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPreferences() ) ); - -/* TQToolBar *tb = new TQToolBar( this, "Edit" ); - tb->setCloseMode( TQDockWindow::Undocked ); - TQWhatsThis::add( tb, i18n( "The Edit toolbar%1").arg(i18n(toolbarHelp).arg("")) ); - addToolBar( tb, i18n( "Edit" ) ); - actionEditUndo->addTo( tb ); - actionEditRedo->addTo( tb ); - tb->addSeparator(); - actionEditCut->addTo( tb ); - actionEditCopy->addTo( tb ); - actionEditPaste->addTo( tb );*/ -#if 0 - tb->addSeparator(); - actionEditLower->addTo( tb ); - actionEditRaise->addTo( tb ); -#endif - - TQPopupMenu *menu = new TQPopupMenu( this, "Edit" ); - connect( menu, TQT_SIGNAL( aboutToShow() ), TQT_TQOBJECT(this), TQT_SLOT( updateEditorUndoRedo() ) ); - menubar->insertItem( i18n( "&Edit" ), menu ); - actionEditUndo->addTo( menu ); - actionEditRedo->addTo( menu ); - menu->insertSeparator(); - actionEditCut->addTo( menu ); - actionEditCopy->addTo( menu ); - actionEditPaste->addTo( menu ); - actionEditDelete->addTo( menu ); - actionEditSelectAll->addTo( menu ); - actionEditAccels->addTo( menu ); -#if 0 - menu->insertSeparator(); - actionEditLower->addTo( menu ); - actionEditRaise->addTo( menu ); -#endif - menu->insertSeparator(); - if ( !singleProjectMode() ) { - actionEditFunctions->addTo( menu ); - actionEditConnections->addTo( menu ); - } - actionEditFormSettings->addTo( menu ); - menu->insertSeparator(); - actionEditPreferences->addTo( menu ); -} - -void MainWindow::setupSearchActions() -{ - actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ), - i18n( "&Find..." ), CTRL + Key_F, TQT_TQOBJECT(this), 0 ); - connect( actionSearchFind, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchFind() ) ); - actionSearchFind->setEnabled( FALSE ); - actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) ); - - actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(), - i18n( "Find &Incremental" ), ALT + Key_I, TQT_TQOBJECT(this), 0 ); - connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchIncremetalFindMenu() ) ); - actionSearchIncremetal->setEnabled( FALSE ); - actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) ); - - actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(), - i18n( "&Replace..." ), CTRL + Key_R, TQT_TQOBJECT(this), 0 ); - connect( actionSearchReplace, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchReplace() ) ); - actionSearchReplace->setEnabled( FALSE ); - actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) ); - - actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(), - i18n( "&Goto Line..." ), ALT + Key_G, TQT_TQOBJECT(this), 0 ); - connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchGotoLine() ) ); - actionSearchGotoLine->setEnabled( FALSE ); - actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) ); - -/* TQToolBar *tb = new TQToolBar( this, "Search" ); - tb->setCloseMode( TQDockWindow::Undocked ); - addToolBar( tb, i18n( "Search" ) ); - - actionSearchFind->addTo( tb );*/ - incrementalSearch = new TQLineEdit( 0 ); - incrementalSearch->hide(); - TQToolTip::add( incrementalSearch, i18n( "Incremental search (Alt+I)" ) ); - connect( incrementalSearch, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( searchIncremetalFind() ) ); - connect( incrementalSearch, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( searchIncremetalFindNext() ) ); - incrementalSearch->setEnabled( FALSE ); - - TQPopupMenu *menu = new TQPopupMenu( this, "Search" ); - menubar->insertItem( i18n( "&Search" ), menu ); - actionSearchFind->addTo( menu ); - actionSearchIncremetal->addTo( menu ); - actionSearchReplace->addTo( menu ); - menu->insertSeparator(); - actionSearchGotoLine->addTo( menu ); -} - -void MainWindow::setupLayoutActions() -{ - if ( !actionGroupTools ) { - actionGroupTools = new TQActionGroup( this ); - actionGroupTools->setExclusive( TRUE ); - connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), TQT_TQOBJECT(this), TQT_SLOT( toolSelected(TQAction*) ) ); - } - - actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"), - i18n( "Adjust &Size" ), CTRL + Key_J, TQT_TQOBJECT(this), 0 ); - actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") ); - actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) ); - connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAdjustSize() ) ); - actionEditAdjustSize->setEnabled( FALSE ); - - actionEditHLayout = new DesignerAction( i18n( "Lay OutQt::Horizontally" ), createIconSet("designer_edithlayout.png"), - i18n( "Lay Out &Horizontally" ), CTRL + Key_H, TQT_TQOBJECT(this), 0 ); - actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") ); - actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Horizontally" ) ); - connect( actionEditHLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontal() ) ); - actionEditHLayout->setEnabled( FALSE ); - - actionEditVLayout = new DesignerAction( i18n( "Lay OutQt::Vertically" ), createIconSet("designer_editvlayout.png"), - i18n( "Lay Out &Vertically" ), CTRL + Key_L, TQT_TQOBJECT(this), 0 ); - actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") ); - actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Vertically" ) ); - connect( actionEditVLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVertical() ) ); - actionEditVLayout->setEnabled( FALSE ); - - actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"), - i18n( "Lay Out in a &Grid" ), CTRL + Key_G, TQT_TQOBJECT(this), 0 ); - actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") ); - actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) ); - connect( actionEditGridLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutGrid() ) ); - actionEditGridLayout->setEnabled( FALSE ); - - actionEditSplitHorizontal = new DesignerAction( i18n( "Lay OutQt::Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"), - i18n( "Lay OutQt::Horizontally (in S&plitter)" ), 0, TQT_TQOBJECT(this), 0 ); - actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") ); - actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Horizontally (in Splitter)" ) ); - connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontalSplit() ) ); - actionEditSplitHorizontal->setEnabled( FALSE ); - - actionEditSplitVertical = new DesignerAction( i18n( "Lay OutQt::Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"), - i18n( "Lay OutQt::Vertically (in Sp&litter)" ), 0, TQT_TQOBJECT(this), 0 ); - actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") ); - actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Vertically (in Splitter)" ) ); - connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVerticalSplit() ) ); - actionEditSplitVertical->setEnabled( FALSE ); - - actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"), - i18n( "&Break Layout" ), CTRL + Key_B, TQT_TQOBJECT(this), 0 ); - actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") ); - actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) ); - connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editBreakLayout() ) ); - actionEditBreakLayout->setEnabled( FALSE ); - - int id = WidgetDatabase::idFromClassName( "Spacer" ); - actionInsertSpacer = new WidgetAction( i18n( "Layout" ), actionGroupTools, TQString::number( id ).latin1() ); - actionInsertSpacer->setToggleAction( TRUE ); - actionInsertSpacer->setText( WidgetDatabase::className( id ) ); - actionInsertSpacer->setMenuText( i18n( "Add %1").arg( WidgetDatabase::className( id ) ) ); - actionInsertSpacer->setIconSet( WidgetDatabase::iconSet( id ) ); - actionInsertSpacer->setToolTip( WidgetDatabase::toolTip( id ) ); - actionInsertSpacer->setStatusTip( i18n( "Insert a %1").arg(WidgetDatabase::toolTip( id )) ); - actionInsertSpacer->setWhatsThis( i18n("A %1

    %2

    " - "

    Click to insert a single %3," - "or double click to keep the tool selected.") - .arg(WidgetDatabase::toolTip( id )) - .arg(WidgetDatabase::whatsThis( id )) - .arg(WidgetDatabase::toolTip( id ) )); - - actionInsertSpacer->addTo( commonWidgetsToolBar ); - commonWidgetsPage.append( actionInsertSpacer ); - TQWidget *w; - commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); - w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); - TQWhatsThis::add( layoutToolBar, i18n( "The Layout toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); - actionEditAdjustSize->addTo( layoutToolBar ); - layoutToolBar->addSeparator(); - actionEditHLayout->addTo( layoutToolBar ); - actionEditVLayout->addTo( layoutToolBar ); - actionEditGridLayout->addTo( layoutToolBar ); - actionEditSplitHorizontal->addTo( layoutToolBar ); - actionEditSplitVertical->addTo( layoutToolBar ); - actionEditBreakLayout->addTo( layoutToolBar ); - layoutToolBar->addSeparator(); - actionInsertSpacer->addTo( layoutToolBar ); - - TQPopupMenu *menu = new TQPopupMenu( this, "Layout" ); - layoutMenu = menu; - menubar->insertItem( i18n( "&Layout" ), menu, toolsMenuId + 1 ); - actionEditAdjustSize->addTo( menu ); - menu->insertSeparator(); - actionEditHLayout->addTo( menu ); - actionEditVLayout->addTo( menu ); - actionEditGridLayout->addTo( menu ); - actionEditSplitHorizontal->addTo( menu ); - actionEditSplitVertical->addTo( menu ); - actionEditBreakLayout->addTo( menu ); - menu->insertSeparator(); - actionInsertSpacer->addTo( menu ); -} - -void MainWindow::setupToolActions() -{ - if ( !actionGroupTools ) { - actionGroupTools = new TQActionGroup( this ); - actionGroupTools->setExclusive( TRUE ); - connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), - this, TQT_SLOT( toolSelected(TQAction*) ) ); - } - - actionPointerTool = new DesignerAction( i18n("Pointer"), createIconSet("designer_pointer.png"), - i18n("&Pointer"), Key_F2, - actionGroupTools, - TQString::number(POINTER_TOOL).latin1(), TRUE ); - actionPointerTool->setStatusTip( i18n("Selects the pointer tool") ); - actionPointerTool->setWhatsThis( whatsThisFrom( "Tools|Pointer" ) ); - - actionConnectTool = new DesignerAction( i18n("Connect Signal/Slots"), - createIconSet("designer_connecttool.png"), - i18n("&Connect Signal/Slots"), - singleProjectMode() ? 0 : Key_F3, - actionGroupTools, - TQString::number(CONNECT_TOOL).latin1(), TRUE ); - actionConnectTool->setStatusTip( i18n("Selects the connection tool") ); - actionConnectTool->setWhatsThis( whatsThisFrom( "Tools|Connect Signals and Slots" ) ); - - actionOrderTool = new DesignerAction( i18n("Tab Order"), createIconSet("designer_ordertool.png"), - i18n("Tab &Order"), Key_F4, - actionGroupTools, - TQString::number(ORDER_TOOL).latin1(), TRUE ); - actionOrderTool->setStatusTip( i18n("Selects the tab order tool") ); - actionOrderTool->setWhatsThis( whatsThisFrom( "Tools|Tab Order" ) ); - - actionBuddyTool = new DesignerAction( i18n( "Set Buddy" ), createIconSet( "designer_setbuddy.png" ), - i18n( "Set &Buddy" ), Key_F12, - actionGroupTools, TQString::number( BUDDY_TOOL ).latin1(), - TRUE ); - actionBuddyTool->setStatusTip( i18n( "Sets a buddy to a label" ) ); - actionBuddyTool->setWhatsThis( whatsThisFrom( "Tools|Set Buddy" ) ); - - TQToolBar *tb = new TQToolBar( this, "Tools" ); - tb->setCloseMode( TQDockWindow::Undocked ); - toolsToolBar = tb; - TQWhatsThis::add( tb, i18n( "The Tools toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); - - addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, FALSE ); - actionPointerTool->addTo( tb ); - if ( !singleProjectMode() ) - actionConnectTool->addTo( tb ); - actionOrderTool->addTo( tb ); - actionBuddyTool->addTo( tb ); - - TQPopupMenu *mmenu = new TQPopupMenu( this, "Tools" ); - toolsMenu = mmenu; - toolsMenuId = 100; - menubar->insertItem( i18n( "&Tools" ), mmenu, toolsMenuId ); - toolsMenuIndex = menubar->indexOf( toolsMenuId ); - actionPointerTool->addTo( mmenu ); - if ( !singleProjectMode() ) - actionConnectTool->addTo( mmenu ); - actionOrderTool->addTo( mmenu ); - actionBuddyTool->addTo( mmenu ); - mmenu->insertSeparator(); - - customWidgetToolBar = 0; - customWidgetMenu = 0; - - actionToolsCustomWidget = new DesignerAction( i18n("Custom Widgets"), - createIconSet( "designer_customwidget.png" ), - i18n("Edit &Custom Widgets..."), 0, TQT_TQOBJECT(this), 0 ); - actionToolsCustomWidget->setStatusTip( i18n("Opens a dialog to add and change " - "custom widgets") ); - actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom" - "Widgets" ) ); - connect( actionToolsCustomWidget, TQT_SIGNAL( activated() ), - this, TQT_SLOT( toolsCustomWidget() ) ); - - for ( int j = 0; j < WidgetDatabase::numWidgetGroups(); ++j ) { - TQString grp = WidgetDatabase::widgetGroup( j ); - if ( !WidgetDatabase::isGroupVisible( grp ) || - WidgetDatabase::isGroupEmpty( grp ) ) - continue; - TQToolBar *tb = new TQToolBar( this, grp.latin1() ); - tb->setCloseMode( TQDockWindow::Undocked ); - widgetToolBars.append( tb ); - bool plural = grp[(int)grp.length()-1] == 's'; - if ( plural ) { - TQWhatsThis::add( tb, i18n( "The %1%2" ).arg(grp).arg(i18n(toolbarHelp). - arg( i18n(" Click on a button to insert a single widget, " - "or double click to insert multiple %1.") ).arg(grp)) ); - } else { - TQWhatsThis::add( tb, i18n( "The %1 Widgets%2" ).arg(grp).arg(i18n(toolbarHelp). - arg( i18n(" Click on a button to insert a single %1 widget, " - "or double click to insert multiple widgets.") ).arg(grp)) ); - } - addToolBar( tb, grp ); - tb->hide(); - TQPopupMenu *menu = new TQPopupMenu( this, grp.latin1() ); - mmenu->insertItem( grp, menu ); - - TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, FALSE, grp.latin1() ); - tb2->setFrameStyle( TQFrame::NoFrame ); - tb2->setOrientation( Qt::Vertical ); - tb2->setBackgroundMode( PaletteBase ); - toolBox->addItem( tb2, grp ); - - if ( grp == "Custom" ) { - if ( !customWidgetMenu ) - actionToolsCustomWidget->addTo( menu ); - else - menu->insertSeparator(); - customWidgetMenu = menu; - customWidgetToolBar = tb; - } - - for ( int i = 0; i < WidgetDatabase::count(); ++i ) { - if ( WidgetDatabase::group( i ) != grp ) - continue; // only widgets, i.e. not forms and temp stuff - WidgetAction* a = - new WidgetAction( grp, actionGroupTools, TQString::number( i ).latin1() ); - a->setToggleAction( TRUE ); - TQString atext = WidgetDatabase::className( i ); - if ( atext[0] == 'Q' ) - atext = atext.mid(1); - while ( atext.length() && atext[0] >= 'a' && atext[0] <= 'z' ) - atext = atext.mid(1); - if ( atext.isEmpty() ) - atext = WidgetDatabase::className( i ); - a->setText( atext ); - TQString ttip = WidgetDatabase::toolTip( i ); - a->setIconSet( WidgetDatabase::iconSet( i ) ); - a->setToolTip( ttip ); - if ( !WidgetDatabase::isWhatsThisLoaded() ) - WidgetDatabase::loadWhatsThis( documentationPath() ); - a->setStatusTip( i18n( "Insert a %1").arg(WidgetDatabase::className( i )) ); - - TQString whats = i18n("A %1").arg( WidgetDatabase::className( i ) ); - if ( !WidgetDatabase::whatsThis( i ).isEmpty() ) - whats += TQString("

    %1

    ").arg(WidgetDatabase::whatsThis( i )); - a->setWhatsThis( whats+ i18n("

    Double click on this tool to keep it selected.

    ") ); - - if ( grp != "KDE" ) - a->addTo( tb ); - a->addTo( menu ); - a->addTo( tb2 ); - if ( WidgetDatabase::isCommon( i ) ) { - a->addTo( commonWidgetsToolBar ); - commonWidgetsPage.append( a ); - } - } - TQWidget *w; - tb2->setStretchableWidget( ( w = new TQWidget( tb2 ) ) ); - w->setBackgroundMode( tb2->backgroundMode() ); - } - - if ( !customWidgetToolBar ) { - TQToolBar *tb = new TQToolBar( this, "Custom Widgets" ); - tb->setCloseMode( TQDockWindow::Undocked ); - TQWhatsThis::add( tb, i18n( "The Custom Widgets toolbar%1" - "

    Click Edit Custom Widgets..." - "in the Tools|Custom menu to " - "add and change custom widgets

    " ). - arg(i18n(toolbarHelp). - arg( i18n(" Click on the buttons to insert a single widget, " - "or double click to insert multiple widgets.") )) ); - addToolBar( tb, i18n( "Custom" ) ); - tb->hide(); - widgetToolBars.append( tb ); - customWidgetToolBar = tb; - TQPopupMenu *menu = new TQPopupMenu( this, "Custom Widgets" ); - mmenu->insertItem( "Custom", menu ); - customWidgetMenu = menu; - customWidgetToolBar->hide(); - actionToolsCustomWidget->addTo( customWidgetMenu ); - customWidgetMenu->insertSeparator(); - TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0, - toolBox, FALSE, "Custom Widgets" ); - tb2->setBackgroundMode(PaletteBase); - tb2->setOrientation( Qt::Vertical ); - tb2->setFrameStyle( TQFrame::NoFrame ); - toolBox->addItem( tb2, "Custom Widgets" ); - customWidgetToolBar2 = tb2; - } - - TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, TQT_TQOBJECT(this) ); - a->setStatusTip( i18n( "Opens a dialog to configure the common " - "widgets page of the toolbox") ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( toolsConfigure() ) ); - mmenu->insertSeparator(); - a->addTo( mmenu ); - resetTool(); -} - -void MainWindow::setupFileActions() -{ - TQToolBar* tb = new TQToolBar( this, "File" ); - tb->setCloseMode( TQDockWindow::Undocked ); - projectToolBar = tb; - - TQWhatsThis::add( tb, i18n( "The File toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); - addToolBar( tb, i18n( "File" ) ); - fileMenu = new TQPopupMenu( this, "File" ); - menubar->insertItem( i18n( "&File" ), fileMenu ); - - DesignerAction *a = 0; - - if ( !singleProject ) { - DesignerAction *a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - a->setText( i18n( "New" ) ); - a->setToolTip( i18n( "New dialog or file" ) ); - a->setMenuText( i18n( "&New..." ) ); - a->setIconSet( createIconSet("designer_filenew.png") ); - a->setAccel( CTRL + Key_N ); - a->setStatusTip( i18n( "Creates a new project, form or source file." ) ); - a->setWhatsThis( whatsThisFrom( "File|New" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNew() ) ); - a->addTo( tb ); - a->addTo( fileMenu ); - actionNewFile = a; - } else { - actionGroupNew = new TQActionGroup( this, 0, FALSE ); - TQActionGroup* a = actionGroupNew; - ( (TQActionGroup*)a )->setUsesDropDown( TRUE ); - a->setText( i18n( "New" ) ); - a->setMenuText( i18n( "&New..." ) ); - a->setIconSet( createIconSet("designer_form.png") ); - a->setStatusTip( i18n( "Creates a new dialog or file" ) ); - a->setWhatsThis( whatsThisFrom( "File|New" ) ); - - TQAction *newForm = new DesignerAction( a, 0 ); - newForm->setText( i18n( "New Dialog" ) ); - newForm->setMenuText( i18n( "&Dialog..." ) ); - newForm->setIconSet( createIconSet("designer_form.png") ); - newForm->setAccel( CTRL + Key_N ); - newForm->setStatusTip( i18n( "Creates a new dialog." ) ); - connect( newForm, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewDialog() ) ); - - DesignerAction *newFile = new DesignerAction( TQT_TQOBJECT(a), 0 ); - newFile->setText( i18n( "New File" ) ); - newFile->setMenuText( i18n( "&File..." ) ); - newFile->setIconSet( createIconSet("designer_filenew.png") ); - newFile->setAccel( ALT + Key_N ); - newFile->setStatusTip( i18n( "Creates a new file." ) ); - connect( newFile, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewFile() ) ); - actionNewFile = newFile; - - a->addTo( tb ); - a->addTo( fileMenu ); - - fileMenu->insertSeparator(); - } - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - a->setText( i18n( "Open" ) ); - a->setMenuText( i18n( "&Open..." ) ); - a->setIconSet( createIconSet("designer_fileopen.png") ); - a->setAccel( CTRL + Key_O ); - a->setStatusTip( i18n( "Opens an existing project, form or source file ") ); - a->setWhatsThis( whatsThisFrom( "File|Open" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileOpen() ) ); - if ( !singleProject ) { - a->addTo( tb ); - a->addTo( fileMenu ); - fileMenu->insertSeparator(); - } - - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - actionFileClose = a; - a->setText( i18n( "Close" ) ); - a->setMenuText( i18n( "&Close" ) ); - a->setStatusTip( i18n( "Closes the current project or document" ) ); - a->setWhatsThis(whatsThisFrom( "File|Close" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileClose() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - if ( !singleProject ) { - a->addTo( fileMenu ); - fileMenu->insertSeparator(); - } - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - actionFileSave = a; - a->setText( i18n( "Save" ) ); - a->setMenuText( i18n( "&Save" ) ); - a->setIconSet( createIconSet("designer_filesave.png") ); - a->setAccel( CTRL + Key_S ); - a->setStatusTip( i18n( "Saves the current project or document" ) ); - a->setWhatsThis(whatsThisFrom( "File|Save" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSave() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - a->addTo( tb ); - a->addTo( fileMenu ); - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - actionFileSaveAs = a; - a->setText( i18n( "Save As" ) ); - a->setMenuText( i18n( "Save &As..." ) ); - a->setStatusTip( i18n( "Saves the current form with a new filename" ) ); - a->setWhatsThis( whatsThisFrom( "File|Save As" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAs() ) ); - connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - if ( !singleProject ) - a->addTo( fileMenu ); - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - actionFileSaveAll = a; - a->setText( i18n( "Save All" ) ); - a->setMenuText( i18n( "Sa&ve All" ) ); - a->setStatusTip( i18n( "Saves all open documents" ) ); - a->setWhatsThis( whatsThisFrom( "File|Save All" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAll() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - if ( !singleProject ) { - a->addTo( fileMenu ); - fileMenu->insertSeparator(); - } - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - a->setText( i18n( "Create Template" ) ); - a->setMenuText( i18n( "Create &Template..." ) ); - a->setStatusTip( i18n( "Creates a new template" ) ); - a->setWhatsThis( whatsThisFrom( "File|Create Template" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileCreateTemplate() ) ); - if ( !singleProject ) - a->addTo( fileMenu ); - - if ( !singleProject ) - fileMenu->insertSeparator(); - - recentlyFilesMenu = new TQPopupMenu( this ); - recentlyProjectsMenu = new TQPopupMenu( this ); - - if ( !singleProject ) { - fileMenu->insertItem( i18n( "Recently Opened Files " ), recentlyFilesMenu ); - fileMenu->insertItem( i18n( "Recently Opened Projects" ), recentlyProjectsMenu ); - } - - connect( recentlyFilesMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupRecentlyFilesMenu() ) ); - connect( recentlyProjectsMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupRecentlyProjectsMenu() ) ); - connect( recentlyFilesMenu, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( recentlyFilesMenuActivated( int ) ) ); - connect( recentlyProjectsMenu, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( recentlyProjectsMenuActivated( int ) ) ); - - if ( !singleProject ) - fileMenu->insertSeparator(); - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - actionFileExit = a; - if ( !singleProjectMode() ) { - a->setText( i18n( "Exit" ) ); - a->setMenuText( i18n( "E&xit" ) ); - a->setStatusTip( i18n( "Quits the application and prompts to save any changed forms, source files or project settings" ) ); - a->setWhatsThis( whatsThisFrom( "File|Exit" ) ); - } else { - a->setText( i18n( "Close" ) ); - a->setMenuText( i18n( "&Close" ) ); - } - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileQuit() ) ); - a->addTo( fileMenu ); -} - -void MainWindow::setupProjectActions() -{ - projectMenu = new TQPopupMenu( this, "Project" ); - menubar->insertItem( i18n( "Pr&oject" ), projectMenu ); - - TQActionGroup *ag = new TQActionGroup( this, 0 ); - ag->setText( i18n( "Active Project" ) ); - ag->setMenuText( i18n( "Active Project" ) ); - ag->setExclusive( TRUE ); - ag->setUsesDropDown( TRUE ); - connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SLOT( projectSelected( TQAction * ) ) ); - connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SIGNAL( projectChanged() ) ); - DesignerAction *a = new DesignerAction( i18n( "" ), i18n( "" ), 0, ag, 0, TRUE ); - eProject = new Project( "", i18n( "" ), projectSettingsPluginManager, TRUE ); - projects.insert( a, eProject ); - a->setOn( TRUE ); - ag->addTo( projectMenu ); - ag->addTo( projectToolBar ); - actionGroupProjects = ag; - - if ( !singleProject ) - projectMenu->insertSeparator(); - - a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, TQT_TQOBJECT(this), 0 ); - actionProjectAddFile = a; - a->setStatusTip( i18n("Adds a file to the current project") ); - a->setWhatsThis( whatsThisFrom( "Project|Add File" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( projectInsertFile() ) ); - a->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - if ( !singleProject ) - a->addTo( projectMenu ); - - actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(), - i18n( "&Image Collection..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") ); - actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) ); - connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPixmapCollection() ) ); - actionEditPixmapCollection->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) ); - actionEditPixmapCollection->addTo( projectMenu ); - -#ifndef TQT_NO_SQL - actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(), - i18n( "&Database Connections..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") ); - actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) ); - connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDatabaseConnections() ) ); - //actionEditDatabaseConnections->setEnabled( FALSE ); - //connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) ); - if ( !singleProject ) - actionEditDatabaseConnections->addTo( projectMenu ); -#endif - - actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(), - i18n( "&Project Settings..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") ); - actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) ); - connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editProjectSettings() ) ); - actionEditProjectSettings->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) ); - actionEditProjectSettings->addTo( projectMenu ); - -} - -void MainWindow::setupPreviewActions() -{ - DesignerAction* a = 0; - TQPopupMenu *menu = new TQPopupMenu( this, "Preview" ); - layoutMenu = menu; - menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 ); - - a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, TQT_TQOBJECT(this), 0 ); - actionPreview = a; - a->setAccel( CTRL + Key_T ); - a->setStatusTip( i18n("Opens a preview") ); - a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( previewForm() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - a->addTo( menu ); - - menu->insertSeparator(); - - TQSignalMapper *mapper = new TQSignalMapper( TQT_TQOBJECT(this) ); - connect( mapper, TQT_SIGNAL(mapped(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(previewForm(const TQString&)) ); - TQStringList styles = TQStyleFactory::keys(); - for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { - TQString info; - if ( *it == "Motif" ) - info = i18n( "The preview will use the Motif look and feel which is used as the default style on most UNIX systems." ); - else if ( *it == "Windows" ) - info = i18n( "The preview will use the Windows look and feel." ); - else if ( *it == "Platinum" ) - info = i18n( "The preview will use the Platinum look and feel which is similar to the Macintosh GUI style." ); - else if ( *it == "CDE" ) - info = i18n( "The preview will use the CDE look and feel which is similar to some versions of the Common Desktop Environment." ); - else if ( *it == "SGI" ) - info = i18n( "The preview will use the Motif look and feel which is used as the default style on SGI systems." ); - else if ( *it == "MotifPlus" ) - info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." ); - - a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(), - i18n( "... in %1 Style" ).arg( *it ), 0, TQT_TQOBJECT(this), 0 ); - a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) ); - a->setWhatsThis( i18n("Open a preview in %1 style." - "

    Use the preview to test the design and " - "signal-slot connections of the current form. %2

    ").arg( *it ).arg( info ) ); - mapper->setMapping( a, *it ); - connect( a, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map()) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - a->addTo( menu ); - } -} - -void MainWindow::setupWindowActions() -{ -/* static bool windowActionsSetup = FALSE; - if ( !windowActionsSetup ) { - windowActionsSetup = TRUE; -*/ - actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, TQT_TQOBJECT(this) ); - actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") ); - actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) ); - connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) ); - actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, TQT_TQOBJECT(this) ); - actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") ); - actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) ); - connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) ); - - actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, TQT_TQOBJECT(this) ); - actionWindowClose->setStatusTip( i18n( "Closes the active window") ); - actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) ); - connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) ); - - actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, TQT_TQOBJECT(this) ); - actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") ); - actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) ); - connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) ); - - actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, TQT_TQOBJECT(this) ); - actionWindowNext->setStatusTip( i18n( "Activates the next window" ) ); - actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) ); - connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) ); - - actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(this) ); - actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) ); - actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) ); - connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) ); - // } - - if ( !windowMenu ) { - windowMenu = new TQPopupMenu( this, "Window" ); - menubar->insertItem( i18n( "&Window" ), windowMenu ); - connect( windowMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupWindowActions() ) ); - } else { - windowMenu->clear(); - } - - actionWindowClose->addTo( windowMenu ); - actionWindowCloseAll->addTo( windowMenu ); - windowMenu->insertSeparator(); - actionWindowNext->addTo( windowMenu ); - actionWindowPrevious->addTo( windowMenu ); - windowMenu->insertSeparator(); - actionWindowTile->addTo( windowMenu ); - actionWindowCascade->addTo( windowMenu ); - windowMenu->insertSeparator(); - windowMenu->insertItem( i18n( "Vie&ws" ), createDockWindowMenu( NoToolBars ) ); - windowMenu->insertItem( i18n( "Tool&bars" ), createDockWindowMenu( OnlyToolBars ) ); - TQWidgetList windows = qworkspace->windowList(); - if ( windows.count() && formWindow() ) - windowMenu->insertSeparator(); - int j = 0; - for ( int i = 0; i < int( windows.count() ); ++i ) { - TQWidget *w = windows.at( i ); - if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) - continue; - if ( ::tqqt_cast(w) && ( ( (FormWindow*)w )->isFake() ) ) - continue; - j++; - TQString itemText; - if ( j < 10 ) - itemText = TQString("&%1 ").arg( j ); - if ( ::tqqt_cast(w) ) - itemText += w->name(); - else - itemText += w->caption(); - - int id = windowMenu->insertItem( itemText, TQT_TQOBJECT(this), TQT_SLOT( windowsMenuActivated( int ) ) ); - windowMenu->setItemParameter( id, i ); - windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) ); - } -} - -void MainWindow::setupHelpActions() -{ - actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, TQT_TQOBJECT(this), 0 ); - actionHelpContents->setStatusTip( i18n("Opens the online help") ); - actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) ); - connect( actionHelpContents, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpContents() ) ); - - actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, TQT_TQOBJECT(this), 0 ); - actionHelpManual->setStatusTip( i18n("Opens the TQt Designer manual") ); - actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) ); - connect( actionHelpManual, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpManual() ) ); - - actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, TQT_TQOBJECT(this), 0 ); - actionHelpAbout->setStatusTip( i18n("Displays information about TQt Designer") ); - actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) ); - connect( actionHelpAbout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAbout() ) ); - - actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, TQT_TQOBJECT(this), 0 ); - actionHelpAboutTQt->setStatusTip( i18n("Displays information about the TQt Toolkit") ); - actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) ); - connect( actionHelpAboutTQt, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAboutTQt() ) ); - -#if 0 //defined(TQT_NON_COMMERCIAL) - // ### not used anymore -- should be deleted? - actionHelpRegister = new DesignerAction( i18n("Register TQt"), TQPixmap(), i18n("&Register TQt..."), 0, TQT_TQOBJECT(this), 0 ); - actionHelpRegister->setStatusTip( i18n("Opens a web browser at the evaluation form on www.trolltech.com") ); - actionHelpRegister->setWhatsThis( i18n("Register with Trolltech") ); - connect( actionHelpRegister, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpRegister() ) ); -#endif - - actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ), - i18n("What's This?"), SHIFT + Key_F1, TQT_TQOBJECT(this), 0 ); - actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") ); - actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) ); - connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( whatsThis() ) ); - -/* TQToolBar *tb = new TQToolBar( this, "Help" ); - tb->setCloseMode( TQDockWindow::Undocked ); - TQWhatsThis::add( tb, i18n( "The Help toolbar%1" ).arg(i18n(toolbarHelp).arg("") )); - addToolBar( tb, i18n( "Help" ) ); - actionHelpWhatsThis->addTo( tb );*/ - - TQPopupMenu *menu = new TQPopupMenu( this, "Help" ); - menubar->insertSeparator(); - menubar->insertItem( i18n( "&Help" ), menu ); - actionHelpContents->addTo( menu ); - actionHelpManual->addTo( menu ); - menu->insertSeparator(); - actionHelpAbout->addTo( menu ); - actionHelpAboutTQt->addTo( menu ); -#if 0 //defined(TQT_NON_COMMERCIAL) - // ### not used anymore -- should be deleted? - actionHelpRegister->addTo( menu ); -#endif - - menu->insertSeparator(); - actionHelpWhatsThis->addTo( menu ); -} - -void MainWindow::fileNew() -{ - statusMessage( i18n( "Create a new project, form or source file...") ); - NewForm dlg( this, projectNames(), currentProject->projectName(), templatePath() ); - dlg.exec(); - statusBar()->clear(); -} - -void MainWindow::fileNewDialog() -{ - static int forms = 0; - TQString n = "Dialog" + TQString::number( ++forms ); - while ( currentProject->findFormFile( n + ".ui" ) ) - n = "Dialog" + TQString::number( ++forms ); - FormWindow *fw = 0; - FormFile *ff = new FormFile( n + ".ui", FALSE, currentProject ); - fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); - ff->setModified( TRUE ); - currentProject->setModified( TRUE ); - workspace()->update(); - fw->setProject( currentProject ); - MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); - fw->setMainContainer( w ); - fw->setCaption( n ); - fw->resize( 600, 480 ); - insertFormWindow( fw ); - fw->killAccels( TQT_TQOBJECT(fw) ); - fw->project()->setModified( TRUE ); - fw->setFocus(); - fw->setSavePixmapInProject( TRUE ); - fw->setSavePixmapInline( FALSE ); -} - -void MainWindow::fileNewFile() -{ - TQString name = TQInputDialog::getText( i18n( "Name of File" ), i18n( "Enter the name of the new source file:" ) ); - if ( name.isEmpty() ) - return; - if ( name.right( 3 ) != ".qs" ) - name += ".qs"; - SourceFile *f = new SourceFile( name, FALSE, currentProject ); - MainWindow::self->editSource( f ); - f->setModified( TRUE ); - currentProject->setModified( TRUE ); - workspace()->update(); -} - -void MainWindow::fileQuit() -{ - close(); - if ( !singleProjectMode() ) - tqApp->closeAllWindows(); -} - -void MainWindow::fileClose() -{ - if ( !currentProject->isDummy() ) { - fileCloseProject(); - } else { - TQWidget *w = qworkspace->activeWindow(); - if ( w ) { - if ( ::tqqt_cast(w) ) - ( (FormWindow*)w )->formFile()->close(); - else if ( ::tqqt_cast(w) ) - ( (SourceEditor*)w )->close(); - } - } -} - - -void MainWindow::fileCloseProject() -{ - if ( currentProject->isDummy() ) - return; - Project *pro = currentProject; - TQAction* a = 0; - TQAction* lastValid = 0; - for ( TQMap::Iterator it = projects.begin(); it != projects.end(); ++it ) { - if ( it.data() == pro ) { - a = it.key(); - if ( lastValid ) - break; - } - lastValid = it.key(); - } - if ( a ) { - if ( pro->isModified() ) { - switch ( TQMessageBox::warning( this, i18n( "Save Project Settings" ), - i18n( "Save changes to '%1'?" ).arg( pro->fileName() ), - i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { - case 0: // save - pro->save(); - break; - case 1: // don't save - break; - case 2: // cancel - return; - default: - break; - } - } - - TQWidgetList windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( TRUE ); - TQWidgetListIt wit( windows ); - while ( wit.current() ) { - TQWidget *w = wit.current(); - ++wit; - if ( ::tqqt_cast(w) ) { - if ( ( (FormWindow*)w )->project() == pro ) { - if ( ( (FormWindow*)w )->formFile()->editor() ) - windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); - if ( !( (FormWindow*)w )->formFile()->close() ) - return; - } - } else if ( ::tqqt_cast(w) ) { - if ( !( (SourceEditor*)w )->close() ) - return; - } - } - hierarchyView->clear(); - windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( FALSE ); - actionGroupProjects->removeChild( a ); - projects.remove( a ); - delete a; - currentProject = 0; - if ( lastValid ) { - projectSelected( lastValid ); - statusMessage( i18n( "Selected project '%1'" ).arg( currentProject->projectName() ) ); - } - if ( !windows.isEmpty() ) { - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast(w) ) - continue; - w->setFocus(); - activeWindowChanged( w ); - break; - } - } else { - emit hasActiveWindow( FALSE ); - emit hasActiveForm( FALSE ); - updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); - } - } -} - -void MainWindow::fileOpen() // as called by the menu -{ - fileOpen( "", "", "", FALSE ); -} - -void MainWindow::projectInsertFile() -{ - fileOpen( "", "" ); -} - -void MainWindow::fileOpen( const TQString &filter, const TQString &extension, const TQString &fn, bool inProject ) -{ - statusMessage( i18n( "Open a file...") ); - - TQPluginManager manager( IID_ImportFilter, TQApplication::libraryPaths(), pluginDirectory() ); - - Project* project = inProject ? currentProject : eProject; - - TQStringList additionalSources; - - { - TQStringList filterlist; - if ( filter.isEmpty() ) { - if ( !inProject ) - filterlist << i18n( "*.ui *.pro|Designer Files" ); - filterlist << i18n( "*.ui|TQt User-Interface Files" ); - if ( !inProject ) - filterlist << i18n( "*.pro|TQMAKE Project Files" ); - TQStringList list = manager.featureList(); - for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) - filterlist << *it; - LanguageInterface *iface = MetaDataBase::languageInterface( project->language() ); - if ( iface ) { - filterlist += iface->fileFilterList(); - additionalSources += iface->fileExtensionList(); - } - filterlist << i18n( "*|All Files" ); - } else { - filterlist << filter; - } - - TQString filters = filterlist.join( "\n" ); - - TQStringList filenames; - if ( fn.isEmpty() ) { - if ( !inProject ) { - TQString f = KFileDialog::getOpenFileName( TQString(), filters, this, /*0,*/ - i18n("Open" )/*, &lastOpenFilter */); - filenames << f; - } else { - filenames = KFileDialog::getOpenFileNames( TQString(), filters, this, /*0,*/ - i18n("Add")/*, &lastOpenFilter */); - } - } else { - filenames << fn; - } - - for ( TQStringList::Iterator fit = filenames.begin(); fit != filenames.end(); ++fit ) { - TQString filename = *fit; - if ( !filename.isEmpty() ) { - TQFileInfo fi( filename ); - - if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) { - addRecentlyOpened( filename, recentlyProjects ); - openProject( filename ); - } else if ( fi.extension( FALSE ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) { - if ( !inProject ) - setCurrentProject( eProject ); - openFormWindow( filename ); - addRecentlyOpened( filename, recentlyFiles ); - } else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( FALSE ) ) != -1 || - additionalSources.find( fi.extension( FALSE ) ) != additionalSources.end() ) { - SourceFile *sf = project->findSourceFile( project->makeRelative( filename ) ); - if ( !sf ) - sf = new SourceFile( project->makeRelative( filename ), FALSE, project ); - editSource( sf ); - } else if ( extension.isEmpty() ) { - TQString filter; - for ( TQStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) { - if ( (*it2).contains( "." + fi.extension( FALSE ), FALSE ) ) { - filter = *it2; - break; - } - } - - ImportFilterInterface* iface = 0; - manager.queryInterface( filter, &iface ); - if ( !iface ) { - statusMessage( i18n( "No import filter is available to import '%1'"). - arg( filename )/*, 3000*/ ); - return; - } - statusMessage( i18n( "Importing '%1' using import filter ...").arg( filename ) ); - TQStringList list = iface->import( filter, filename ); - iface->release(); - if ( list.isEmpty() ) { - statusMessage( i18n( "Nothing to load in '%1'").arg( filename )/*, 3000*/ ); - return; - } - if ( !inProject ) - setCurrentProject( eProject ); - addRecentlyOpened( filename, recentlyFiles ); - for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - openFormWindow( *it, FALSE ); - TQFile::remove( *it ); - } - statusBar()->clear(); - } - } - } - } -} - -FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFileName, FormFile *ff ) -{ - if ( filename.isEmpty() ) - return 0; - - bool makeNew = FALSE; - - if ( !TQFile::exists( filename ) ) { - makeNew = TRUE; - } else { - TQFile f( filename ); - f.open( IO_ReadOnly ); - TQTextStream ts( &f ); - makeNew = ts.read().length() < 2; - } - if ( makeNew ) { - fileNew(); - if ( formWindow() ) - formWindow()->setFileName( filename ); - return formWindow(); - } - - statusMessage( i18n( "Reading file '%1'...").arg( filename ) ); - FormFile *ff2 = currentProject->findFormFile( currentProject->makeRelative(filename) ); - if ( ff2 && ff2->formWindow() ) { - ff2->formWindow()->setFocus(); - return ff2->formWindow(); - } - - if ( ff2 ) - ff = ff2; - TQApplication::setOverrideCursor( WaitCursor ); - Resource resource( this ); - if ( !ff ) - ff = new FormFile( currentProject->makeRelative( filename ), FALSE, currentProject ); - bool b = resource.load( ff ) && (FormWindow*)resource.widget(); - if ( !validFileName && resource.widget() ) - ( (FormWindow*)resource.widget() )->setFileName( TQString() ); - TQApplication::restoreOverrideCursor(); - if ( b ) { - rebuildCustomWidgetGUI(); - statusMessage( i18n( "Loaded file '%1'").arg( filename )/*, 3000 */); - } else { - statusMessage( i18n( "Failed to load file '%1'").arg( filename )/*, 5000 */); - TQMessageBox::information( this, i18n("Load File"), i18n("Could not load file '%1'.").arg( filename ) ); - delete ff; - } - return (FormWindow*)resource.widget(); -} - -bool MainWindow::fileSave() -{ - - if ( !currentProject->isDummy() ) - return fileSaveProject(); - return fileSaveForm(); -} - -bool MainWindow::fileSaveForm() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == formWindow() || e == qWorkspace()->activeWindow() ) { - e->save(); - } - } - - FormWindow *fw = 0; - - TQWidget *w = qWorkspace()->activeWindow(); - if ( w ) { - if ( ::tqqt_cast(w) ) { - SourceEditor *se = (SourceEditor*)w; - if ( se->formWindow() ) - fw = se->formWindow(); - else if ( se->sourceFile() ) { - se->sourceFile()->save(); - return TRUE; - } - } - } - - if ( !fw ) - fw = formWindow(); - if ( !fw || !fw->formFile()->save() ) - return FALSE; - TQApplication::restoreOverrideCursor(); - return TRUE; -} - -bool MainWindow::fileSaveProject() -{ - currentProject->save(); - statusMessage( i18n( "Project '%1' saved.").arg( currentProject->projectName() )/*, 3000 */); - return TRUE; -} - -bool MainWindow::fileSaveAs() -{ - statusMessage( i18n( "Enter a filename..." ) ); - - TQWidget *w = qworkspace->activeWindow(); - if ( !w ) - return TRUE; - if ( ::tqqt_cast(w) ) - return ( (FormWindow*)w )->formFile()->saveAs(); - else if ( ::tqqt_cast(w) ) - return ( (SourceEditor*)w )->saveAs(); - return FALSE; -} - -void MainWindow::fileSaveAll() -{ - for ( TQMap::Iterator it = projects.begin(); it != projects.end(); ++it ) - (*it)->save(); -} - -void MainWindow::fileCreateTemplate() -{ - CreateTemplate dia( this, 0, TRUE ); - - int i = 0; - for ( i = 0; i < WidgetDatabase::count(); ++i ) { - if ( WidgetDatabase::isForm( i ) && WidgetDatabase::group( i ) != "Temp") { - dia.listClass->insertItem( WidgetDatabase::className( i ) ); - } - } - for ( i = 0; i < WidgetDatabase::count(); ++i ) { - if ( WidgetDatabase::isContainer( i ) && !WidgetDatabase::isForm(i) && - WidgetDatabase::className( i ) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::group( i ) != "Temp" ) { - dia.listClass->insertItem( WidgetDatabase::className( i ) ); - } - } - - TQPtrList *lst = MetaDataBase::customWidgets(); - for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - if ( w->isContainer ) - dia.listClass->insertItem( w->className ); - } - - dia.editName->setText( i18n( "NewTemplate" ) ); - connect( dia.buttonCreate, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( createNewTemplate() ) ); - dia.exec(); -} - -void MainWindow::createNewTemplate() -{ - CreateTemplate *dia = (CreateTemplate*)TQT_TQOBJECT(const_cast(sender()))->parent(); - TQString fn = dia->editName->text(); - TQString cn = dia->listClass->currentText(); - if ( fn.isEmpty() || cn.isEmpty() ) { - TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); - return; - } - - TQStringList templRoots; - const char *qtdir = getenv( "QTDIR" ); - if(qtdir) - templRoots << qtdir; - templRoots << tqInstallPathData(); - if(qtdir) //try the tools/designer directory last! - templRoots << (TQString(qtdir) + "/tools/designer"); - TQFile f; - for ( TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) { - if ( TQFile::exists( (*it) + "/templates/" )) { - TQString tmpfn = (*it) + "/templates/" + fn + ".ui"; - f.setName(tmpfn); - if(f.open(IO_WriteOnly)) - break; - } - } - if ( !f.isOpen() ) { - TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); - return; - } - TQTextStream ts( &f ); - - ts << "" << endl; - ts << "" << endl; - ts << "" << cn << "" << endl; - ts << "" << endl; - ts << " name" << endl; - ts << " " << cn << "Form" << endl; - ts << "" << endl; - ts << "" << endl; - ts << " geometry" << endl; - ts << " " << endl; - ts << " 300" << endl; - ts << " 400" << endl; - ts << " " << endl; - ts << "" << endl; - ts << "" << endl; - ts << "" << endl; - - dia->editName->setText( i18n( "NewTemplate" ) ); - - f.close(); -} - -void MainWindow::editUndo() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editUndo(); - return; - } - if ( formWindow() ) - formWindow()->undo(); -} - -void MainWindow::editRedo() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editRedo(); - return; - } - if ( formWindow() ) - formWindow()->redo(); -} - -void MainWindow::editCut() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editCut(); - return; - } - editCopy(); - editDelete(); -} - -void MainWindow::editCopy() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editCopy(); - return; - } - if ( formWindow() ) - tqApp->clipboard()->setText( formWindow()->copy() ); -} - -void MainWindow::editPaste() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editPaste(); - return; - } - if ( !formWindow() ) - return; - - TQWidget *w = formWindow()->mainContainer(); - TQWidgetList l( formWindow()->selectedWidgets() ); - if ( l.count() == 1 ) { - w = l.first(); - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) && - w != formWindow()->mainContainer() ) ) - w = formWindow()->mainContainer(); - } - - if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { - formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) ); - hierarchyView->widgetInserted( 0 ); - formWindow()->commandHistory()->setModified( TRUE ); - } else { - TQMessageBox::information( this, i18n( "Paste Error" ), - i18n( "Cannot paste widgets. Designer could not find a container\n" - "to paste into which does not contain a layout. Break the layout\n" - "of the container you want to paste into and select this container\n" - "and then paste again." ) ); - } -} - -void MainWindow::editDelete() -{ - if ( formWindow() ) - formWindow()->deleteWidgets(); -} - -void MainWindow::editSelectAll() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editSelectAll(); - return; - } - if ( formWindow() ) - formWindow()->selectAll(); -} - - -void MainWindow::editLower() -{ - if ( formWindow() ) - formWindow()->lowerWidgets(); -} - -void MainWindow::editRaise() -{ - if ( formWindow() ) - formWindow()->raiseWidgets(); -} - -void MainWindow::editAdjustSize() -{ - if ( formWindow() ) - formWindow()->editAdjustSize(); -} - -void MainWindow::editLayoutHorizontal() -{ - if ( layoutChilds ) - editLayoutContainerHorizontal(); - else if ( layoutSelected && formWindow() ) - formWindow()->layoutHorizontal(); -} - -void MainWindow::editLayoutVertical() -{ - if ( layoutChilds ) - editLayoutContainerVertical(); - else if ( layoutSelected && formWindow() ) - formWindow()->layoutVertical(); -} - -void MainWindow::editLayoutHorizontalSplit() -{ - if ( layoutChilds ) - ; // no way to do that - else if ( layoutSelected && formWindow() ) - formWindow()->layoutHorizontalSplit(); -} - -void MainWindow::editLayoutVerticalSplit() -{ - if ( layoutChilds ) - ; // no way to do that - else if ( layoutSelected && formWindow() ) - formWindow()->layoutVerticalSplit(); -} - -void MainWindow::editLayoutGrid() -{ - if ( layoutChilds ) - editLayoutContainerGrid(); - else if ( layoutSelected && formWindow() ) - formWindow()->layoutGrid(); -} - -void MainWindow::editLayoutContainerVertical() -{ - if ( !formWindow() ) - return; - TQWidget *w = formWindow()->mainContainer(); - TQWidgetList l( formWindow()->selectedWidgets() ); - if ( l.count() == 1 ) - w = l.first(); - if ( w ) - formWindow()->layoutVerticalContainer( w ); -} - -void MainWindow::editLayoutContainerHorizontal() -{ - if ( !formWindow() ) - return; - TQWidget *w = formWindow()->mainContainer(); - TQWidgetList l( formWindow()->selectedWidgets() ); - if ( l.count() == 1 ) - w = l.first(); - if ( w ) - formWindow()->layoutHorizontalContainer( w ); -} - -void MainWindow::editLayoutContainerGrid() -{ - if ( !formWindow() ) - return; - TQWidget *w = formWindow()->mainContainer(); - TQWidgetList l( formWindow()->selectedWidgets() ); - if ( l.count() == 1 ) - w = l.first(); - if ( w ) - formWindow()->layoutGridContainer( w ); -} - -void MainWindow::editBreakLayout() -{ - if ( !formWindow() || !breakLayout ) - return; - TQWidget *w = formWindow()->mainContainer(); - if ( formWindow()->currentWidget() ) - w = formWindow()->currentWidget(); - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || - w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - formWindow()->breakLayout( w ); - return; - } else { - TQWidgetList widgets = formWindow()->selectedWidgets(); - for ( w = widgets.first(); w; w = widgets.next() ) { - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || - w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) - break; - } - if ( w ) { - formWindow()->breakLayout( w ); - return; - } - } - - w = formWindow()->mainContainer(); - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || - w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) - formWindow()->breakLayout( w ); -} - -void MainWindow::editAccels() -{ - if ( !formWindow() ) - return; - formWindow()->checkAccels(); -} - -void MainWindow::editFunctions() -{ - if ( !formWindow() ) - return; - - statusMessage( i18n( "Edit the current form's slots..." ) ); - EditFunctions dlg( this, formWindow(), TRUE ); - dlg.exec(); - statusBar()->clear(); -} - -void MainWindow::editConnections() -{ - if ( !formWindow() ) - return; - - statusMessage( i18n( "Edit the current form's connections..." ) ); - ConnectionDialog dlg( this ); - dlg.exec(); - - statusBar()->clear(); -} - -SourceEditor *MainWindow::editSource() -{ - if ( !formWindow() ) - return 0; - return formWindow()->formFile()->showEditor(); -} - -SourceEditor *MainWindow::openSourceEditor() -{ - if ( !formWindow() ) - return 0; - - TQString lang = currentProject->language(); - if ( !MetaDataBase::hasEditor( lang ) ) { - TQMessageBox::information( this, i18n( "Edit Source" ), - i18n( "There is no plugin for editing %1 code installed.\n" - "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); - return 0; - } - - SourceEditor *editor = 0; - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->language() == lang && e->formWindow() == formWindow() ) { - editor = e; - break; - } - } - - if ( !editor ) -editor = createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang ); - return editor; -} - -SourceEditor *MainWindow::editSource( SourceFile *f ) -{ - TQString lang = currentProject->language(); - if ( !MetaDataBase::hasEditor( lang ) ) { - TQMessageBox::information( this, i18n( "Edit Source" ), - i18n( "There is no plugin for editing %1 code installed.\n" - "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); - return 0; - } - - SourceEditor *editor = 0; - if ( f ) - editor = f->editor(); - if ( !editor ) - editor = createSourceEditor( f, currentProject, lang ); - editor->setActiveWindow(); - editor->setFocus(); - return editor; -} - -SourceEditor *MainWindow::createSourceEditor( TQObject *object, Project *project, - const TQString &lang, const TQString &func, - bool rereadSource ) -{ - SourceEditor *editor = 0; - EditorInterface *eIface = 0; - editorPluginManager->queryInterface( lang, &eIface ); - if ( !eIface ) - return 0; - LanguageInterface *lIface = MetaDataBase::languageInterface( lang ); - if ( !lIface ) - return 0; - TQApplication::setOverrideCursor( WaitCursor ); - editor = new SourceEditor( qWorkspace(), eIface, lIface ); - eIface->release(); - lIface->release(); - - editor->setLanguage( lang ); - sourceEditors.append( editor ); - TQApplication::restoreOverrideCursor(); - - if ( editor->object() != object ) - editor->setObject( object, project ); - else if ( rereadSource ) - editor->refresh( FALSE ); - - editor->show(); - editor->setFocus(); - if ( !func.isEmpty() ) - editor->setFunction( func ); - emit editorChanged(); - - return editor; -} - -void MainWindow::editFormSettings() -{ - if ( !formWindow() ) - return; - - statusMessage( i18n( "Edit the current form's settings..." ) ); - FormSettings dlg( this, formWindow() ); - dlg.exec(); - statusBar()->clear(); -} - -void MainWindow::editProjectSettings() -{ - openProjectSettings( currentProject ); - wspace->setCurrentProject( currentProject ); -} - -void MainWindow::editPixmapCollection() -{ - PixmapCollectionEditor dia( this, 0, TRUE ); - dia.setProject( currentProject ); - dia.exec(); -} - -void MainWindow::editDatabaseConnections() -{ -#ifndef TQT_NO_SQL - DatabaseConnectionsEditor dia( currentProject, this, 0, TRUE ); - dia.exec(); -#endif -} - -void MainWindow::editPreferences() -{ - statusMessage( i18n( "Edit preferences..." ) ); - Preferences *dia = new Preferences( this, 0, TRUE ); - prefDia = dia; - connect( dia->helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - dia->buttonColor->setEditor( StyledButton::ColorEditor ); - dia->buttonPixmap->setEditor( StyledButton::PixmapEditor ); - dia->groupBoxGrid->setChecked( sGrid ); - dia->checkBoxSnapGrid->setChecked( snGrid ); - dia->spinGridX->setValue( grid().x() ); - dia->spinGridY->setValue( grid().y() ); - dia->checkBoxWorkspace->setChecked( restoreConfig ); - dia->checkBoxTextLabels->setChecked( usesTextLabel() ); - dia->buttonColor->setColor( qworkspace->backgroundColor() ); - TQString pluginPaths = TQApplication::libraryPaths().join("\n"); - dia->textEditPluginPaths->setText(pluginPaths); - if ( qworkspace->backgroundPixmap() ) - dia->buttonPixmap->setPixmap( *qworkspace->backgroundPixmap() ); - if ( backPix ) - dia->radioPixmap->setChecked( TRUE ); - else - dia->radioColor->setChecked( TRUE ); - dia->checkBoxSplash->setChecked( splashScreen ); - dia->checkAutoEdit->setChecked( !databaseAutoEdit ); - dia->checkBoxStartDialog->setChecked( shStartDialog ); - dia->checkBoxAutoSave->setChecked( autoSaveEnabled ); - int h = autoSaveInterval / 3600; - int m = ( autoSaveInterval - h * 3600 ) / 60; - int s = autoSaveInterval - ( h * 3600 + m * 60 ); - TQTime t( h, m, s ); - dia->timeEditAutoSave->setTime( t ); - - SenderObject *senderObject = new SenderObject( designerInterface() ); - TQValueList::Iterator it; - for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) { - Tab t = *it; - dia->tabWidget->addTab( t.w, t.title ); - if ( t.receiver ) { - connect( dia->buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); - connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); - connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); - senderObject->emitInitSignal(); - disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); - } - } - - if ( dia->exec() == TQDialog::Accepted ) { - setSnapGrid( dia->checkBoxSnapGrid->isChecked() ); - setShowGrid( dia->groupBoxGrid->isChecked() ); - setGrid( TQPoint( dia->spinGridX->value(), - dia->spinGridY->value() ) ); - restoreConfig = dia->checkBoxWorkspace->isChecked(); - setUsesTextLabel( dia->checkBoxTextLabels->isChecked() ); - if (dia->textEditPluginPaths->isModified()) { - pluginPaths = dia->textEditPluginPaths->text(); - TQApplication::setLibraryPaths(TQStringList::split("\n", pluginPaths)); - savePluginPaths = TRUE; - } - - if ( dia->radioPixmap->isChecked() && dia->buttonPixmap->pixmap() ) { - qworkspace->setBackgroundPixmap( *dia->buttonPixmap->pixmap() ); - backPix = TRUE; - } else { - qworkspace->setBackgroundColor( dia->buttonColor->color() ); - backPix = FALSE; - } - splashScreen = dia->checkBoxSplash->isChecked(); - databaseAutoEdit = !dia->checkAutoEdit->isChecked(); - shStartDialog = dia->checkBoxStartDialog->isChecked(); - autoSaveEnabled = dia->checkBoxAutoSave->isChecked(); - TQTime time = dia->timeEditAutoSave->time(); - autoSaveInterval = time.hour() * 3600 + time.minute() * 60 + time.second(); - if ( autoSaveEnabled ) - autoSaveTimer->start( autoSaveInterval * 1000 ); - else - autoSaveTimer->stop(); - } - delete senderObject; - for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) { - Tab t = *it; - dia->tabWidget->removePage( t.w ); - t.w->reparent( 0, TQPoint(0,0), FALSE ); - } - - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->configChanged(); - - delete dia; - prefDia = 0; - statusBar()->clear(); -} - -void MainWindow::searchFind() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - - if ( !findDialog ) - findDialog = new FindDialog( this, 0, FALSE ); - findDialog->show(); - findDialog->raise(); - findDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), - ( (SourceEditor*)qWorkspace()->activeWindow() )->object() ); - findDialog->comboFind->setFocus(); - findDialog->comboFind->lineEdit()->selectAll(); -} - -void MainWindow::searchIncremetalFindMenu() -{ - incrementalSearch->selectAll(); - incrementalSearch->setFocus(); -} - -void MainWindow::searchIncremetalFind() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - - ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), - FALSE, FALSE, TRUE, FALSE ); -} - -void MainWindow::searchIncremetalFindNext() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - - ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), - FALSE, FALSE, TRUE, TRUE ); -} - -void MainWindow::searchReplace() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - - if ( !replaceDialog ) - replaceDialog = new ReplaceDialog( this, 0, FALSE ); - replaceDialog->show(); - replaceDialog->raise(); - replaceDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), - ( (SourceEditor*)qWorkspace()->activeWindow() )->object() ); - replaceDialog->comboFind->setFocus(); - replaceDialog->comboFind->lineEdit()->selectAll(); -} - -void MainWindow::searchGotoLine() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - - if ( !gotoLineDialog ) - gotoLineDialog = new GotoLineDialog( this, 0, FALSE ); - gotoLineDialog->show(); - gotoLineDialog->raise(); - gotoLineDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface() ); - gotoLineDialog->spinLine->setFocus(); - gotoLineDialog->spinLine->setMinValue( 1 ); - gotoLineDialog->spinLine->setMaxValue( ( (SourceEditor*)qWorkspace()->activeWindow() )->numLines() ); - gotoLineDialog->spinLine->selectAll(); -} - -void MainWindow::toolsCustomWidget() -{ - statusMessage( i18n( "Edit custom widgets..." ) ); - CustomWidgetEditor edit( this, this ); - edit.exec(); - rebuildCustomWidgetGUI(); - statusBar()->clear(); -} - -void MainWindow::toolsConfigure() -{ - ConfigToolboxDialog dlg( this ); - if ( dlg.exec() != TQDialog::Accepted ) - return; - rebuildCommonWidgetsToolBoxPage(); -} - -void MainWindow::showStartDialog() -{ - if ( singleProjectMode() ) - return; - for ( int i = 1; i < tqApp->argc(); ++i ) { - TQString arg = tqApp->argv()[i]; - if ( arg[0] != '-' ) - return; - } - StartDialog *sd = new StartDialog( this, templatePath() ); - sd->setRecentlyFiles( recentlyFiles ); - sd->setRecentlyProjects( recentlyProjects ); - sd->exec(); - shStartDialog = sd->showDialogInFuture(); -} diff --git a/tdevdesigner/designer/menubareditor.cpp b/tdevdesigner/designer/menubareditor.cpp deleted file mode 100644 index f62e15e0..00000000 --- a/tdevdesigner/designer/menubareditor.cpp +++ /dev/null @@ -1,1129 +0,0 @@ -/********************************************************************** -** Copyright (C) 2003 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "command.h" -#include "formwindow.h" -#include "menubareditor.h" -#include "popupmenueditor.h" - -#include - -extern void find_accel( const TQString &txt, TQMap &accels, TQWidget *w ); - -// Drag Object Declaration ------------------------------------------- - -class MenuBarEditorItemPtrDrag : public TQStoredDrag -{ -public: - MenuBarEditorItemPtrDrag( MenuBarEditorItem * item, - TQWidget * parent = 0, - const char * name = 0 ); - ~MenuBarEditorItemPtrDrag() {}; - static bool canDecode( TQDragMoveEvent * e ); - static bool decode( TQDropEvent * e, MenuBarEditorItem ** i ); -}; - -// Drag Object Implementation --------------------------------------- - -MenuBarEditorItemPtrDrag::MenuBarEditorItemPtrDrag( MenuBarEditorItem * item, - TQWidget * parent, - const char * name ) - : TQStoredDrag( "qt/menubareditoritemptr", parent, name ) -{ - TQByteArray data( sizeof( TQ_LONG ) ); - TQDataStream stream( data, IO_WriteOnly ); - stream << ( TQ_LONG ) item; - setEncodedData( data ); -} - -bool MenuBarEditorItemPtrDrag::canDecode( TQDragMoveEvent * e ) -{ - return e->provides( "qt/menubareditoritemptr" ); -} - -bool MenuBarEditorItemPtrDrag::decode( TQDropEvent * e, MenuBarEditorItem ** i ) -{ - TQByteArray data = e->encodedData( "qt/menubareditoritemptr" ); - TQDataStream stream( data, IO_ReadOnly ); - - if ( !data.size() ) - return FALSE; - - TQ_LONG p = 0; - stream >> p; - *i = ( MenuBarEditorItem *) p; - - return TRUE; -} - -// MenuBarEditorItem --------------------------------------------------- - -MenuBarEditorItem::MenuBarEditorItem( MenuBarEditor * bar, TQObject * parent, const char * name ) - : TQObject( parent, name ), - menuBar( bar ), - popupMenu( 0 ), - visible( TRUE ), - separator( FALSE ), - removable( FALSE ) -{ } - -MenuBarEditorItem::MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * bar, - TQObject * parent, const char * name ) - : TQObject( parent, name ), - menuBar( bar ), - popupMenu( menu ), - visible( TRUE ), - separator( FALSE ), - removable( TRUE ) -{ - text = menu->name(); -} - -MenuBarEditorItem::MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor * bar, - TQObject * parent, const char * name ) - : TQObject( parent, name ), - menuBar( bar ), - popupMenu( 0 ), - visible( TRUE ), - separator( FALSE ), - removable( TRUE ) -{ - text = actionGroup->menuText(); - popupMenu = new PopupMenuEditor( menuBar->formWindow(), menuBar ); - popupMenu->insert( actionGroup ); -} - -MenuBarEditorItem::MenuBarEditorItem( MenuBarEditorItem * item, TQObject * parent, const char * name ) - : TQObject( parent, name ), - menuBar( item->menuBar ), - popupMenu( 0 ), - text( item->text ), - visible( item->visible ), - separator( item->separator ), - removable( item->removable ) -{ - popupMenu = new PopupMenuEditor( menuBar->formWindow(), item->popupMenu, menuBar ); -} - -// MenuBarEditor -------------------------------------------------------- - -int MenuBarEditor::clipboardOperation = 0; -MenuBarEditorItem * MenuBarEditor::clipboardItem = 0; - -MenuBarEditor::MenuBarEditor( FormWindow * fw, TQWidget * parent, const char * name ) - : TQMenuBar( parent, name ), - formWnd( fw ), - draggedItem( 0 ), - currentIndex( 0 ), - itemHeight( 0 ), - separatorWidth( 32 ), - hideWhenEmpty( TRUE ), - hasSeparator( FALSE ) -{ - setAcceptDrops( TRUE ); - setFocusPolicy( TQ_StrongFocus ); - - addItem.setMenuText( i18n("new menu") ); - addSeparator.setMenuText( i18n("new separator") ); - - lineEdit = new TQLineEdit( this, "menubar lineedit" ); - lineEdit->hide(); - lineEdit->setFrameStyle(TQFrame::Plain | TQFrame::NoFrame); - lineEdit->polish(); - lineEdit->setBackgroundMode(PaletteButton); - lineEdit->setBackgroundOrigin(ParentOrigin); - lineEdit->installEventFilter( this ); - - dropLine = new TQWidget( this, "menubar dropline", TQt::WStyle_NoBorder | WStyle_StaysOnTop ); - dropLine->setBackgroundColor( TQt::red ); - dropLine->hide(); - - setMinimumHeight( fontMetrics().height() + 2 * borderSize() ); -} - -MenuBarEditor::~MenuBarEditor() -{ - itemList.setAutoDelete( TRUE ); -} - -FormWindow * MenuBarEditor::formWindow() -{ - return formWnd; -} - -MenuBarEditorItem * MenuBarEditor::createItem( int index, bool addToCmdStack ) -{ - MenuBarEditorItem * i = - new MenuBarEditorItem( new PopupMenuEditor( formWnd, ( TQWidget * ) parent() ), this ); - if ( addToCmdStack ) { - AddMenuCommand * cmd = new AddMenuCommand( i18n( "Add Menu" ), formWnd, this, i, index ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else { - AddMenuCommand cmd( i18n( "Add Menu" ), formWnd, this, i, index ); - cmd.execute(); - } - return i; -} - -void MenuBarEditor::insertItem( MenuBarEditorItem * item, int index ) -{ - item->menu()->parentMenu = this; - - if ( index != -1 ) - itemList.insert( index, item ); - else - itemList.append( item ); - - if ( hideWhenEmpty && itemList.count() == 1 ) - show(); // calls resizeInternals(); - else - resizeInternals(); - - if ( isVisible() ) - update(); -} - -void MenuBarEditor::insertItem( TQString text, PopupMenuEditor * menu, int index ) -{ - MenuBarEditorItem * item = new MenuBarEditorItem( menu, this ); - if ( !text.isNull() ) - item->setMenuText( text ); - insertItem( item, index ); -} - -void MenuBarEditor::insertItem( TQString text, TQActionGroup * group, int index ) -{ - MenuBarEditorItem * item = new MenuBarEditorItem( group, this ); - if ( !text.isNull() ) - item->setMenuText( text ); - insertItem( item, index ); -} - - -void MenuBarEditor::insertSeparator( int index ) -{ - if ( hasSeparator ) - return; - - MenuBarEditorItem * i = createItem( index ); - i->setSeparator( TRUE ); - i->setMenuText( i18n( "separator" ) ); - hasSeparator = TRUE; -} - -void MenuBarEditor::removeItemAt( int index ) -{ - removeItem( item( index ) ); -} - -void MenuBarEditor::removeItem( MenuBarEditorItem * item ) -{ - if ( item && - item->isRemovable() && - itemList.removeRef( item ) ) { - - if ( item->isSeparator() ) - hasSeparator = FALSE; - - if ( hideWhenEmpty && itemList.count() == 0 ) - hide(); - else - resizeInternals(); - - int n = count() + 1; - if ( currentIndex >= n ) - currentIndex = n; - - if ( isVisible() ) - update(); - } -} - -int MenuBarEditor::findItem( MenuBarEditorItem * item ) -{ - return itemList.findRef( item ); -} - -int MenuBarEditor::findItem( PopupMenuEditor * menu ) -{ - MenuBarEditorItem * i = itemList.first(); - - while ( i ) { - if ( i->menu() == menu ) - return itemList.at(); - i = itemList.next(); - } - - return -1; -} - -int MenuBarEditor::findItem( TQPoint & pos ) -{ - int x = borderSize(); - int dx = 0; - int y = 0; - int w = width(); - TQSize s; - TQRect r; - - MenuBarEditorItem * i = itemList.first(); - - while ( i ) { - - if ( i->isVisible() ) { - - s = itemSize( i ); - dx = s.width(); - - if ( x + dx > w && x > borderSize() ) { - y += itemHeight; - x = borderSize(); - } - - r = TQRect( x, y, s.width(), s.height() ); - - if ( r.contains( pos ) ) - return itemList.at(); - - addItemSizeToCoords( i, x, y, w ); - } - - i = itemList.next(); - } - - // check add item - s = itemSize( &addItem ); - dx = s.width(); - - if ( x + dx > w && x > borderSize() ) { - y += itemHeight; - x = borderSize(); - } - - r = TQRect( x, y, s.width(), s.height() ); - - if ( r.contains( pos ) ) - return itemList.count(); - - return itemList.count() + 1; -} - -MenuBarEditorItem * MenuBarEditor::item( int index ) -{ - if ( index == -1 ) - return itemList.at( currentIndex ); - - int c = itemList.count(); - if ( index == c ) - return &addItem; - else if ( index > c ) - return &addSeparator; - - return itemList.at( index ); -} - -int MenuBarEditor::count() -{ - return itemList.count(); -} - -int MenuBarEditor::current() -{ - return currentIndex; -} - -void MenuBarEditor::cut( int index ) -{ - if ( clipboardItem && clipboardOperation == Cut ) - delete clipboardItem; - - clipboardOperation = Cut; - clipboardItem = itemList.at( index ); - - if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) { - clipboardOperation = None; - clipboardItem = 0; - return; // do nothing - } - - RemoveMenuCommand * cmd = new RemoveMenuCommand( i18n( "Cut Menu" ), formWnd, this, index ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void MenuBarEditor::copy( int index ) -{ - if ( clipboardItem && clipboardOperation == Cut ) - delete clipboardItem; - - clipboardOperation = Copy; - clipboardItem = itemList.at( index ); - - if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) { - clipboardOperation = None; - clipboardItem = 0; - } -} - -void MenuBarEditor::paste( int index ) -{ - if ( clipboardItem && clipboardOperation ) { - MenuBarEditorItem * i = new MenuBarEditorItem( clipboardItem ); - AddMenuCommand * cmd = new AddMenuCommand( i18n( "Paste Menu" ), formWnd, this, i, index ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - } -} - -void MenuBarEditor::exchange( int a, int b ) -{ - MenuBarEditorItem * ia = itemList.at( a ); - MenuBarEditorItem * ib = itemList.at( b ); - if ( !ia || !ib || - ia == &addItem || ia == &addSeparator || - ib == &addItem || ib == &addSeparator ) - return; // do nothing - itemList.replace( b, ia ); - itemList.replace( a, ib ); -} - -void MenuBarEditor::showLineEdit( int index ) -{ - if ( index == -1 ) - index = currentIndex; - - MenuBarEditorItem * i = 0; - - if ( (uint) index >= itemList.count() ) - i = &addItem; - else - i = itemList.at( index ); - - if ( i && i->isSeparator() ) - return; - - // open edit field for item name - lineEdit->setText( i->menuText() ); - lineEdit->selectAll(); - TQPoint pos = itemPos( index ); - lineEdit->move( pos.x() + borderSize(), pos.y() - ( borderSize() / 2 ) ); - lineEdit->resize( itemSize( i ) ); - lineEdit->show(); - lineEdit->setFocus(); -} - -void MenuBarEditor::showItem( int index ) -{ - if ( index == -1 ) - index = currentIndex; - - if ( (uint)index < itemList.count() ) { - MenuBarEditorItem * i = itemList.at( index ); - if ( i->isSeparator() || draggedItem ) - return; - PopupMenuEditor * m = i->menu(); - TQPoint pos = itemPos( index ); - m->move( pos.x(), pos.y() + itemHeight - 1 ); - m->raise(); - m->show(); - setFocus(); - } -} - -void MenuBarEditor::hideItem( int index ) -{ - if ( index == -1 ) - index = currentIndex; - - if ( (uint)index < itemList.count() ) { - PopupMenuEditor * m = itemList.at( index )->menu(); - m->hideSubMenu(); - m->hide(); - } -} - -void MenuBarEditor::focusItem( int index ) -{ - if ( index == -1 ) - index = currentIndex; - - if ( (uint)index < itemList.count() ) { - PopupMenuEditor * m = itemList.at( index )->menu(); - m->setFocus(); - m->update(); - update(); - } -} - -void MenuBarEditor::deleteItem( int index ) -{ - if ( index == -1 ) - index = currentIndex; - - if ( (uint)index < itemList.count() ) { - RemoveMenuCommand * cmd = new RemoveMenuCommand( i18n( "Delete Menu" ), - formWnd, - this, - currentIndex ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - } -} - -TQSize MenuBarEditor::sizeHint() const -{ - return TQSize( parentWidget()->width(), heightForWidth( parentWidget()->width() ) ); -} - -int MenuBarEditor::heightForWidth( int max_width ) const -{ - MenuBarEditor * that = ( MenuBarEditor * ) this; - int x = borderSize(); - int y = 0; - - TQPainter p( this ); - that->itemHeight = that->itemSize( &(that->addItem) ).height(); - - MenuBarEditorItem * i = that->itemList.first(); - while ( i ) { - if ( i->isVisible() ) - that->addItemSizeToCoords( i, x, y, max_width ); - i = that->itemList.next(); - } - - that->addItemSizeToCoords( &(that->addItem), x, y, max_width ); - that->addItemSizeToCoords( &(that->addSeparator), x, y, max_width ); - - return y + itemHeight; -} - -void MenuBarEditor::show() -{ - TQWidget::show(); - resizeInternals(); - - TQResizeEvent e( parentWidget()->size(), parentWidget()->size() ); - TQApplication::sendEvent( parentWidget(), &e ); -} - -void MenuBarEditor::checkAccels( TQMap &accels ) -{ - TQString t; - MenuBarEditorItem * i = itemList.first(); - while ( i ) { - t = i->menuText(); - find_accel( t, accels, this ); - // do not check the accelerators in the popup menus - i = itemList.next(); - } -} - -// public slots - -void MenuBarEditor::cut() -{ - cut( currentIndex ); -} - -void MenuBarEditor::copy() -{ - copy( currentIndex ); -} - -void MenuBarEditor::paste() -{ - paste( currentIndex ); -} - -// protected - -bool MenuBarEditor::eventFilter( TQObject * o, TQEvent * e ) -{ - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit) && e->type() == TQEvent::FocusOut ) { - leaveEditMode(); - lineEdit->hide(); - update(); - } else if ( e->type() == TQEvent::LayoutHint ) { - resize( sizeHint() ); - } - return TQMenuBar::eventFilter( o, e ); -} - -void MenuBarEditor::paintEvent( TQPaintEvent * ) -{ - TQPainter p( this ); - TQRect r = rect(); - style().tqdrawPrimitive( TQStyle::PE_PanelMenuBar, &p, - r, colorGroup() ); - drawItems( p ); -} - -void MenuBarEditor::mousePressEvent( TQMouseEvent * e ) -{ - mousePressPos = e->pos(); - hideItem(); - lineEdit->hide(); - currentIndex = findItem( mousePressPos ); - showItem(); - update(); - e->accept(); -} - -void MenuBarEditor::mouseDoubleClickEvent( TQMouseEvent * e ) -{ - mousePressPos = e->pos(); - currentIndex = findItem( mousePressPos ); - lineEdit->hide(); - if ( currentIndex > (int)itemList.count() ) { - insertSeparator(); - update(); - } else { - showLineEdit(); - } -} - -void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e ) -{ - if ( e->state() & Qt::LeftButton ) { - if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) { - bool itemCreated = FALSE; - bool isSeparator = FALSE; - draggedItem = item( findItem( mousePressPos ) ); - if ( draggedItem == &addItem ) { - draggedItem = createItem(); - itemCreated = TRUE; - } else if ( draggedItem == &addSeparator ) { - if (hasSeparator) // we can only have one separator - return; - draggedItem = createItem(); - draggedItem->setSeparator( TRUE ); - draggedItem->setMenuText( "separator" ); - isSeparator = TRUE; - itemCreated = TRUE; - } else { - isSeparator = draggedItem->isSeparator(); - } - - MenuBarEditorItemPtrDrag * d = - new MenuBarEditorItemPtrDrag( draggedItem, this ); - d->setPixmap( createTextPixmap( draggedItem->menuText() ) ); - hideItem(); - draggedItem->setVisible( FALSE ); - update(); - - // If the item is dropped in the same list, - // we will have two instances of the same pointer - // in the list. - itemList.find( draggedItem ); - TQLNode * node = itemList.currentNode(); - dropConfirmed = FALSE; - d->dragCopy(); // dragevents and stuff happens - if ( draggedItem ) { // item was not dropped - if ( itemCreated ) { - removeItem( draggedItem ); - } else { - hideItem(); - draggedItem->setVisible( TRUE ); - draggedItem = 0; - showItem(); - } - } else if ( dropConfirmed ) { // item was dropped - dropConfirmed = FALSE; - hideItem(); - itemList.takeNode( node )->setVisible( TRUE ); - hasSeparator = isSeparator || hasSeparator; - showItem(); - } else { - hasSeparator = isSeparator || hasSeparator; - } - update(); - } - } -} - -void MenuBarEditor::dragEnterEvent( TQDragEnterEvent * e ) -{ - if ( MenuBarEditorItemPtrDrag::canDecode( e ) ) { - e->accept(); - dropLine->show(); - } -} - -void MenuBarEditor::dragLeaveEvent( TQDragLeaveEvent * ) -{ - dropLine->hide(); -} - -void MenuBarEditor::dragMoveEvent( TQDragMoveEvent * e ) -{ - - TQPoint pos = e->pos(); - dropLine->move( snapToItem( pos ) ); - - int idx = findItem( pos ); - if ( currentIndex != idx ) { - hideItem(); - currentIndex = idx; - showItem(); - } -} - -void MenuBarEditor::dropEvent( TQDropEvent * e ) -{ - MenuBarEditorItem * i = 0; - - if ( MenuBarEditorItemPtrDrag::decode( e, &i ) ) { - draggedItem = 0; - hideItem(); - dropInPlace( i, e->pos() ); - e->accept(); - } - - dropLine->hide(); -} - -void MenuBarEditor::keyPressEvent( TQKeyEvent * e ) -{ - if ( lineEdit->isHidden() ) { // In navigation mode - switch ( e->key() ) { - - case TQt::Key_Delete: - hideItem(); - deleteItem(); - showItem(); - break; - - case TQt::Key_Left: - e->accept(); - navigateLeft( e->state() & TQt::ControlButton ); - return; - - case TQt::Key_Right: - e->accept(); - navigateRight( e->state() & TQt::ControlButton ); - return; // no update - - case TQt::Key_Down: - e->accept(); - focusItem(); - return; // no update - - case TQt::Key_PageUp: - currentIndex = 0; - break; - - case TQt::Key_PageDown: - currentIndex = itemList.count(); - break; - - case TQt::Key_Enter: - case TQt::Key_Return: - case TQt::Key_F2: - e->accept(); - enterEditMode(); - return; // no update - - case TQt::Key_Up: - case TQt::Key_Alt: - case TQt::Key_Shift: - case TQt::Key_Control: - case TQt::Key_Escape: - e->ignore(); - setFocus(); // FIXME: this is because some other widget get the focus when CTRL is pressed - return; // no update - - case TQt::Key_C: - if ( e->state() & TQt::ControlButton && currentIndex < (int)itemList.count() ) { - copy( currentIndex ); - break; - } - - case TQt::Key_X: - if ( e->state() & TQt::ControlButton && currentIndex < (int)itemList.count() ) { - hideItem(); - cut( currentIndex ); - showItem(); - break; - } - - case TQt::Key_V: - if ( e->state() & TQt::ControlButton ) { - hideItem(); - paste( currentIndex < (int)itemList.count() ? currentIndex + 1: itemList.count() ); - showItem(); - break; - } - - default: - if ( e->ascii() >= 32 || e->ascii() == 0 ) { - showLineEdit(); - TQApplication::sendEvent( lineEdit, e ); - e->accept(); - } else { - e->ignore(); - } - return; - } - } else { // In edit mode - - switch ( e->key() ) { - case TQt::Key_Control: - e->ignore(); - return; - case TQt::Key_Enter: - case TQt::Key_Return: - leaveEditMode(); - case TQt::Key_Escape: - lineEdit->hide(); - setFocus(); - break; - } - } - e->accept(); - update(); -} - -void MenuBarEditor::focusOutEvent( TQFocusEvent * e ) -{ - TQWidget * fw = tqApp->focusWidget(); - if ( e->lostFocus() && !::tqqt_cast(fw) ) - hideItem(); - update(); -} - -void MenuBarEditor::resizeInternals() -{ - dropLine->resize( 2, itemHeight ); - updateGeometry(); -} - -void MenuBarEditor::drawItems( TQPainter & p ) -{ - TQPoint pos( borderSize(), 0 ); - uint c = 0; - - p.setPen( colorGroup().buttonText() ); - - MenuBarEditorItem * i = itemList.first(); - while ( i ) { - if ( i->isVisible() ) - drawItem( p, i, c++, pos ); // updates x y - i = itemList.next(); - } - - p.setPen( darkBlue ); - drawItem( p, &addItem, c++, pos ); - if ( !hasSeparator ) - drawItem( p, &addSeparator, c, pos ); -} - -void MenuBarEditor::drawItem( TQPainter & p, - MenuBarEditorItem * i, - int idx, - TQPoint & pos ) -{ - int w = itemSize( i ).width(); - - // If the item passes the right border, and it is not the first item on the line - if ( pos.x() + w > width() && pos.x() > borderSize() ) { // wrap - pos.ry() += itemHeight; - pos.setX( borderSize() ); - } - - if ( i->isSeparator() ) { - drawSeparator( p, pos ); - } else { - int flags = TQPainter::AlignLeft | TQPainter::AlignVCenter | - TQt::ShowPrefix | TQt::SingleLine; - p.drawText( pos.x() + borderSize(), pos.y(), w - borderSize(), itemHeight, - flags, i->menuText() ); - } - - if ( hasFocus() && idx == currentIndex && !draggedItem ) - p.drawWinFocusRect( pos.x(), pos.y() + 1, w, itemHeight - 2 ); - - pos.rx() += w; -} - -void MenuBarEditor::drawSeparator( TQPainter & p, TQPoint & pos ) -{ - p.save(); - p.setPen( darkBlue ); - - int left = pos.x(); - int top = pos.y() + 2; - int right = left + separatorWidth - 1; - int bottom = pos.y() + itemHeight - 4; - - p.drawLine( left, top, left, bottom ); - p.drawLine( right, top, right, bottom ); - - p.fillRect( left, pos.y() + borderSize() * 2, - separatorWidth - 1, itemHeight - borderSize() * 4, - TQBrush( darkBlue, TQt::Dense5Pattern ) ); - - p.restore(); -} - -TQSize MenuBarEditor::itemSize( MenuBarEditorItem * i ) -{ - if ( i->isSeparator() ) - return TQSize( separatorWidth, itemHeight ); - TQRect r = fontMetrics().boundingRect( i->menuText().remove( "&") ); - return TQSize( r.width() + borderSize() * 2, r.height() + borderSize() * 4 ); -} - -void MenuBarEditor::addItemSizeToCoords( MenuBarEditorItem * i, int & x, int & y, int w ) -{ - int dx = itemSize( i ).width(); - if ( x + dx > w && x > borderSize() ) { - y += itemHeight; - x = borderSize(); - } - x += dx; -} - -TQPoint MenuBarEditor::itemPos( int index ) -{ - int x = borderSize(); - int y = 0; - int w = width(); - int dx = 0; - int c = 0; - - MenuBarEditorItem * i = itemList.first(); - - while ( i ) { - if ( i->isVisible() ) { - dx = itemSize( i ).width(); - if ( x + dx > w && x > borderSize() ) { - y += itemHeight; - x = borderSize(); - } - if ( c == index ) - return TQPoint( x, y ); - x += dx; - c++; - } - i = itemList.next(); - } - dx = itemSize( &addItem ).width(); - if ( x + dx > width() && x > borderSize() ) { - y += itemHeight; - x = borderSize(); - } - - return TQPoint( x, y ); -} - -TQPoint MenuBarEditor::snapToItem( const TQPoint & pos ) -{ - int x = borderSize(); - int y = 0; - int dx = 0; - - MenuBarEditorItem * n = itemList.first(); - - while ( n ) { - if ( n->isVisible() ) { - dx = itemSize( n ).width(); - if ( x + dx > width() && x > borderSize() ) { - y += itemHeight; - x = borderSize(); - } - if ( pos.y() > y && - pos.y() < y + itemHeight && - pos.x() < x + dx / 2 ) { - return TQPoint( x, y ); - } - x += dx; - } - n = itemList.next(); - } - - return TQPoint( x, y ); -} - -void MenuBarEditor::dropInPlace( MenuBarEditorItem * i, const TQPoint & pos ) -{ - int x = borderSize(); - int y = 0; - int dx = 0; - int idx = 0; - - MenuBarEditorItem * n = itemList.first(); - - while ( n ) { - if ( n->isVisible() ) { - dx = itemSize( n ).width(); - if ( x + dx > width() && x > borderSize() ) { - y += itemHeight; - x = borderSize(); - } - if ( pos.y() > y && - pos.y() < y + itemHeight && - pos.x() < x + dx / 2 ) - break; - x += dx; - } - n = itemList.next(); - idx++; - } - - hideItem(); - Command * cmd = 0; - int iidx = itemList.findRef( i ); - if ( iidx != -1 ) { // internal dnd - cmd = new MoveMenuCommand( i18n( "Item Dragged" ), formWnd, this, iidx, idx ); - item( iidx )->setVisible( TRUE ); - } else { - cmd = new AddMenuCommand( i18n( "Add Menu" ), formWnd, this, i, idx ); - dropConfirmed = TRUE; // let mouseMoveEvent set the item visible - } - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - currentIndex = ( iidx >= 0 && iidx < idx ) ? idx - 1 : idx; - showItem(); -} - - -void MenuBarEditor::safeDec() -{ - do { - currentIndex--; - } while ( currentIndex > 0 && !( item( currentIndex )->isVisible() ) ); -} - -void MenuBarEditor::safeInc() -{ - int max = (int)itemList.count(); - if ( !hasSeparator ) - max += 1; - if ( currentIndex < max ) { - do { - currentIndex++; - // skip invisible items - } while ( currentIndex < max && !( item( currentIndex )->isVisible() ) ); - } -} - -void MenuBarEditor::navigateLeft( bool ctrl ) -{ - // FIXME: handle invisible items - if ( currentIndex > 0 ) { - hideItem(); - if ( ctrl ) { - ExchangeMenuCommand * cmd = new ExchangeMenuCommand( i18n( "Move Menu Left" ), - formWnd, - this, - currentIndex, - currentIndex - 1 ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - safeDec(); - } else { - safeDec(); - } - showItem(); - } - update(); -} - -void MenuBarEditor::navigateRight( bool ctrl ) -{ -// FIXME: handle invisible items - hideItem(); - if ( ctrl ) { - if ( currentIndex < ( (int)itemList.count() - 1 ) ) { - ExchangeMenuCommand * cmd = new ExchangeMenuCommand( i18n( "Move Menu Right" ), - formWnd, - this, - currentIndex, - currentIndex + 1 ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - safeInc(); - } - } else { - safeInc(); - } - showItem(); - update(); -} - -void MenuBarEditor::enterEditMode() -{ - if ( currentIndex > (int)itemList.count() ) { - insertSeparator(); - } else { - showLineEdit(); - } -} - -void MenuBarEditor::leaveEditMode() -{ - MenuBarEditorItem * i = 0; - if ( currentIndex >= (int)itemList.count() ) { - i = createItem(); - // do not put rename on cmd stack - RenameMenuCommand rename( i18n( "Rename Menu" ), formWnd, this, lineEdit->text(), i ); - rename.execute(); - } else { - i = itemList.at( currentIndex ); - RenameMenuCommand * cmd = - new RenameMenuCommand( i18n( "Rename Menu" ), formWnd, this, lineEdit->text(), i ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - showItem(); -} - -TQPixmap MenuBarEditor::createTextPixmap( const TQString &text ) -{ - TQSize sz( fontMetrics().boundingRect( text ).size() ); - TQPixmap pix( sz.width() + 20, sz.height() * 2 ); - pix.fill( white ); - TQPainter p( &pix, this ); - p.drawText( 2, 0, pix.width(), pix.height(), 0, text ); - p.end(); - TQBitmap bm( pix.size() ); - bm.fill( color0 ); - p.begin( &bm ); - p.setPen( color1 ); - p.drawText( 2, 0, pix.width(), pix.height(), 0, text ); - p.end(); - pix.setMask( bm ); - return pix; -} diff --git a/tdevdesigner/designer/menubareditor.h b/tdevdesigner/designer/menubareditor.h deleted file mode 100644 index f6279f2b..00000000 --- a/tdevdesigner/designer/menubareditor.h +++ /dev/null @@ -1,200 +0,0 @@ -/********************************************************************** -** Copyright (C) 2003 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef MENUBAREDITOR_H -#define MENUBAREDITOR_H - -#include -#include - -class PopupMenuEditor; -class MenuBarEditor; -class TQActionGroup; - -class MenuBarEditorItem : public TQObject -{ - Q_OBJECT - - - friend class MenuBarEditor; - - MenuBarEditorItem( MenuBarEditor * bar = 0, TQObject * parent = 0, const char * name = 0 ); - -public: - MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * bar, - TQObject * parent = 0, const char * name = 0); - MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor * bar, - TQObject * parent = 0, const char * name = 0); - MenuBarEditorItem( MenuBarEditorItem * item, - TQObject * parent = 0, const char * name = 0); - ~MenuBarEditorItem() { }; - - PopupMenuEditor * menu() { return popupMenu; } - - void setMenuText( const TQString t ) { text = t; }; - TQString menuText() { return text; } - - void setVisible( bool enable ) { visible = enable; } - bool isVisible() { return visible; } - - void setRemovable( bool enable ) { removable = enable; } - bool isRemovable() { return removable; } - - bool isSeparator() { return separator; } -protected: - void setSeparator( bool enable ) { separator = enable; } - -private: - MenuBarEditor * menuBar; - PopupMenuEditor * popupMenu; - TQString text; - uint visible : 1; - uint separator : 1; - uint removable : 1; -}; - -class TQLineEdit; -class FormWindow; - -class MenuBarEditor : public TQMenuBar -{ - Q_OBJECT - - -public: - MenuBarEditor( FormWindow * fw, TQWidget * parent = 0, const char * name = 0 ); - ~MenuBarEditor(); - - FormWindow * formWindow(); - - MenuBarEditorItem * createItem( int index = -1, bool addToCmdStack = TRUE ); - void insertItem( MenuBarEditorItem * item, int index = -1 ); - void insertItem( TQString text, PopupMenuEditor * menu, int index = -1 ); - void insertItem( TQString text, TQActionGroup * group, int index = -1 ); - - void insertSeparator( int index = -1 ); - - void removeItemAt( int index ); - void removeItem( MenuBarEditorItem * item ); - - int findItem( MenuBarEditorItem * item ); - int findItem( PopupMenuEditor * menu ); - int findItem( TQPoint & pos ); - - MenuBarEditorItem * item( int index = -1 ); - - int count(); - int current(); - - void cut( int index ); - void copy( int index ); - void paste( int index ); - void exchange( int a, int b ); - - void showLineEdit( int index = -1); - void showItem( int index = -1 ); - void hideItem( int index = -1 ); - void focusItem( int index = -1 ); - void deleteItem( int index = -1 ); - - TQSize sizeHint() const; - TQSize minimumSize() const { return sizeHint(); } - TQSize minimumSizeHint() const { return sizeHint(); } - int heightForWidth( int max_width ) const; - - void show(); - - void checkAccels( TQMap &accels ); - -public slots: - void cut(); - void copy(); - void paste(); - -protected: - bool eventFilter( TQObject * o, TQEvent * e ); - void paintEvent( TQPaintEvent * e ); - void mousePressEvent( TQMouseEvent * e ); - void mouseDoubleClickEvent( TQMouseEvent * e ); - void mouseMoveEvent( TQMouseEvent * e ); - void dragEnterEvent( TQDragEnterEvent * e ); - void dragLeaveEvent( TQDragLeaveEvent * e ); - void dragMoveEvent( TQDragMoveEvent * e ); - void dropEvent( TQDropEvent * e ); - void keyPressEvent( TQKeyEvent * e ); - void focusOutEvent( TQFocusEvent * e ); - void resizeEvent( TQResizeEvent * e ) { TQFrame::resizeEvent( e ); } - - void resizeInternals(); - - void drawItems( TQPainter & p ); - void drawItem( TQPainter & p, MenuBarEditorItem * i, int idx, TQPoint & pos ); - void drawSeparator( TQPainter & p, TQPoint & pos ); - - TQSize itemSize( MenuBarEditorItem * i ); - void addItemSizeToCoords( MenuBarEditorItem * i, int & x, int & y, int w ); - - TQPoint itemPos( int index ); - TQPoint snapToItem( const TQPoint & pos ); - void dropInPlace( MenuBarEditorItem * i, const TQPoint & pos ); - - void safeDec(); - void safeInc(); - - void navigateLeft( bool ctrl ); - void navigateRight( bool ctrl ); - void enterEditMode(); - void leaveEditMode(); - - TQPixmap createTextPixmap( const TQString &text ); - int borderSize() const { return margin() + 4; } // add 4 pixels to the margin - -private: - FormWindow * formWnd; - TQLineEdit * lineEdit; - TQWidget * dropLine; - TQPtrList itemList; - MenuBarEditorItem addItem; - MenuBarEditorItem addSeparator; - MenuBarEditorItem * draggedItem; - TQPoint mousePressPos; - int currentIndex; - int itemHeight; - int separatorWidth; - bool hideWhenEmpty; - bool hasSeparator; - bool dropConfirmed; - - enum ClipboardOperation { - None = 0, - Cut = 1, - Copy = 2 - }; - static int clipboardOperation; - static MenuBarEditorItem * clipboardItem; -}; - -#endif //MENUBAREDITOR_H diff --git a/tdevdesigner/designer/metadatabase.cpp b/tdevdesigner/designer/metadatabase.cpp deleted file mode 100644 index aa85fc80..00000000 --- a/tdevdesigner/designer/metadatabase.cpp +++ /dev/null @@ -1,1692 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "metadatabase.h" -#include "widgetfactory.h" -#include "formwindow.h" -#include "parser.h" -#include "widgetdatabase.h" -#include "formfile.h" -#include "propertyobject.h" -#include "project.h" -#include "mainwindow.h" - -#include "tdevdesigner_part.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -class MetaDataBaseRecord -{ -public: - TQObject *object; - TQStringList changedProperties; - TQMap fakeProperties; - TQMap propertyComments; - int spacing, margin; - TQString resizeMode; - TQValueList connections; - TQValueList functionList; - TQValueList includes; - TQValueList variables; - TQStringList forwards, sigs; - TQWidgetList tabOrder; - MetaDataBase::MetaInfo metaInfo; - TQCursor cursor; - TQMap pixmapArguments; - TQMap pixmapKeys; - TQMap columnFields; - TQValueList breakPoints; - TQMap breakPointConditions; - TQString exportMacro; -}; - -static TQPtrDict *db = 0; -static TQPtrList *cWidgets = 0; -static bool doUpdate = TRUE; -static TQStringList langList; -static TQStringList editorLangList; -static TQPluginManager *languageInterfaceManager = 0; - -/*! - \class MetaDataBase metadatabase.h - \brief Database which stores meta data of widgets - - The MetaDataBase stores meta information of widgets, which are not - stored directly in widgets (properties). This is e.g. the - information which properties have been modified. -*/ - -MetaDataBase::MetaDataBase() -{ -} - -inline void setupDataBase() -{ - if ( !db || !cWidgets ) { - db = new TQPtrDict( 1481 ); - db->setAutoDelete( TRUE ); - cWidgets = new TQPtrList; - cWidgets->setAutoDelete( TRUE ); - } -} - -void MetaDataBase::clearDataBase() -{ - delete db; - db = 0; - delete cWidgets; - cWidgets = 0; -} - -void MetaDataBase::addEntry( TQObject *o ) -{ - if ( !o ) - return; - setupDataBase(); - if ( db->find( o ) ) - return; - MetaDataBaseRecord *r = new MetaDataBaseRecord; - r->object = o; - r->spacing = r->margin = -1; - db->insert( (void*)o, r ); - - WidgetFactory::initChangedProperties( o ); -} - -void MetaDataBase::removeEntry( TQObject *o ) -{ - setupDataBase(); - db->remove( o ); -} - -void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bool changed ) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) { - ( (PropertyObject*)o )->mdPropertyChanged( property, changed ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - if ( changed ) { - if ( r->changedProperties.findIndex( property ) == -1 ) - r->changedProperties.append( property ); - } else { - if ( r->changedProperties.findIndex( property ) != -1 ) - r->changedProperties.remove( property ); - } - - if ( doUpdate && - ( property == "hAlign" || property == "vAlign" || property == "wordwrap" ) ) { - doUpdate = FALSE; - setPropertyChanged( o, "alignment", changed || - isPropertyChanged( o, "hAlign" ) || - isPropertyChanged( o, "vAlign" ) || - isPropertyChanged( o, "wordwrap" ) ); - doUpdate = TRUE; - } - - if ( doUpdate && property == "alignment" ) { - doUpdate = FALSE; - setPropertyChanged( o, "hAlign", changed ); - setPropertyChanged( o, "vAlign", changed ); - setPropertyChanged( o, "wordwrap", changed ); - doUpdate = TRUE; - } -} - -bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property ) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) - return ( (PropertyObject*)o )->mdIsPropertyChanged( property ); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - return r->changedProperties.findIndex( property ) != -1; -} - -TQStringList MetaDataBase::changedProperties( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQStringList(); - } - - TQStringList lst( r->changedProperties ); - return lst; -} - -void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, const TQString &comment ) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) { - ( (PropertyObject*)o )->mdSetPropertyComment( property, comment ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->propertyComments.insert( property, comment ); -} - -TQString MetaDataBase::propertyComment( TQObject *o, const TQString &property ) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) - return ( (PropertyObject*)o )->mdPropertyComment( property ); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - - return *r->propertyComments.find( property ); -} - -void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) { - ( (PropertyObject*)o )->mdSetFakeProperty( property, value ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - r->fakeProperties[property] = value; -} - -TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) - return ( (PropertyObject*)o )->mdFakeProperty( property ); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQVariant(); - } - TQMap::Iterator it = r->fakeProperties.find( property ); - if ( it != r->fakeProperties.end() ) - return r->fakeProperties[property]; - return WidgetFactory::defaultValue( o, property ); - -} - -TQMap* MetaDataBase::fakeProperties( TQObject* o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return 0; - } - return &r->fakeProperties; -} - -void MetaDataBase::setSpacing( TQObject *o, int spacing ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->spacing = spacing; - TQLayout * layout = 0; - WidgetFactory::layoutType( (TQWidget*)o, layout ); - if ( layout ) { - int spadef = 6; - if ( MainWindow::self->formWindow() ) - spadef = MainWindow::self->formWindow()->layoutDefaultSpacing(); - if ( spacing == -1 ) - layout->setSpacing( spadef ); - else - layout->setSpacing( spacing ); - } -} - -int MetaDataBase::spacing( TQObject *o ) -{ - if ( !o ) - return -1; - setupDataBase(); - if ( ::tqqt_cast(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return -1; - } - - return r->spacing; -} - -void MetaDataBase::setMargin( TQObject *o, int margin ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->margin = margin; - TQLayout * layout = 0; - WidgetFactory::layoutType( (TQWidget*)o, layout ); - - bool isInnerLayout = TRUE; - - TQWidget *widget = (TQWidget*)o; - if ( widget && !::tqqt_cast(widget) && - ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) ) ) - isInnerLayout = FALSE; - - - if ( layout ) { - int mardef = 11; - if ( MainWindow::self->formWindow() ) - mardef = MainWindow::self->formWindow()->layoutDefaultMargin(); - if ( margin == -1 ) { - if ( isInnerLayout ) - layout->setMargin( 1 ); - else - layout->setMargin( TQMAX( 1, mardef ) ); - } - else - layout->setMargin( TQMAX( 1, margin ) ); - } -} - -int MetaDataBase::margin( TQObject *o ) -{ - if ( !o ) - return -1; - setupDataBase(); - if ( ::tqqt_cast(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return -1; - } - return r->margin; -} - -void MetaDataBase::setResizeMode( TQObject *o, const TQString &mode ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->resizeMode = mode; -} - -TQString MetaDataBase::resizeMode( TQObject *o ) -{ - if ( !o ) - return TQString(); - setupDataBase(); - if ( ::tqqt_cast(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - return r->resizeMode; -} - -void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString &signal, - TQObject *receiver, const TQCString &slot, bool addCode ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - if ( !(sender && receiver) ) - return; - Connection conn; - conn.sender = sender; - conn.signal = signal; - conn.receiver = receiver; - conn.slot = slot; - r->connections.append( conn ); - if ( addCode ) { - TQString rec = receiver->name(); - if ( ::tqqt_cast(o) && TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) - rec = "this"; - TQString sen = sender->name(); - if ( ::tqqt_cast(o) && TQT_BASE_OBJECT(sender) ==( (FormWindow*)o )->mainContainer() ) - sen = "this"; - FormFile *ff = 0; - if ( ::tqqt_cast(o) ) - ff = (FormFile*)o; - else if ( ::tqqt_cast(o) ) - ff = ( (FormWindow*)o )->formFile(); - ff->addConnection( sen, signal, rec, slot ); - } -} - -void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCString &signal, - TQObject *receiver, const TQCString &slot ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - if ( !(sender && receiver) ) - return; - for ( TQValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { - Connection conn = *it; - if ( TQT_BASE_OBJECT(conn.sender) ==sender && - conn.signal == signal && - TQT_BASE_OBJECT(conn.receiver) ==receiver && - conn.slot == slot ) { - r->connections.remove( it ); - break; - } - } - if ( ::tqqt_cast(o) ) { - TQString rec = receiver->name(); - if ( TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) - rec = "this"; - ( (FormWindow*)o )->formFile()->removeConnection( sender->name(), signal, rec, slot ); - } -} - -void MetaDataBase::setupConnections( TQObject *o, const TQValueList &conns ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - if ( !::tqqt_cast(o) ) - return; - - FormFile *formfile = (FormFile*)o; - - r->connections.clear(); - - for ( TQValueList::ConstIterator cit = conns.begin(); - cit != conns.end(); ++cit ) { - // #### get the correct sender object out of Bla.Blub.sender - TQString senderName = (*cit).sender; - if ( senderName.find( '.' ) != -1 ) - senderName = senderName.mid( senderName.findRev( '.' ) + 1 ); - TQObject *sender = 0; - if ( formfile->formWindow() ) - sender = formfile->formWindow()->child( senderName ); - if ( !sender && formfile->isFake() ) - sender = formfile->project()->objectForFakeFormFile( formfile ); - if ( !sender && senderName == "this" ) - sender = formfile->formWindow() ? - TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : - TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )); - if ( !sender ) - continue; - MetaDataBase::addConnection( formfile->formWindow() ? - (TQObject*)formfile->formWindow() : - (TQObject*)formfile, - sender, - (*cit).signal.latin1(), - formfile->formWindow() ? - TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : - TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )), - (*cit).slot.latin1(), - FALSE ); - } -} - -bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString &signal, - TQObject *receiver, const TQCString &slot ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - for ( TQValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { - Connection conn = *it; - if ( TQT_BASE_OBJECT(conn.sender) ==sender && - conn.signal == signal && - TQT_BASE_OBJECT(conn.receiver) ==receiver && - conn.slot == slot ) - return TRUE; - } - return FALSE; -} - - -TQValueList MetaDataBase::connections( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - return r->connections; -} - -TQValueList MetaDataBase::connections( TQObject *o, TQObject *sender, - TQObject *receiver ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - TQValueList::Iterator it = r->connections.begin(); - TQValueList ret; - TQValueList::Iterator conn; - while ( ( conn = it ) != r->connections.end() ) { - ++it; - if ( TQT_BASE_OBJECT((*conn).sender) ==sender && - TQT_BASE_OBJECT((*conn).receiver) ==receiver ) - ret << *conn; - } - - return ret; -} - -TQValueList MetaDataBase::connections( TQObject *o, TQObject *object ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - TQValueList::Iterator it = r->connections.begin(); - TQValueList ret; - TQValueList::Iterator conn; - while ( ( conn = it ) != r->connections.end() ) { - ++it; - if ( TQT_BASE_OBJECT((*conn).sender) ==object || - TQT_BASE_OBJECT((*conn).receiver) ==object ) - ret << *conn; - } - return ret; -} - -void MetaDataBase::doConnections( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - TQObject *sender = 0, *receiver = 0; - TQObjectList *l = 0; - TQValueList::Iterator it = r->connections.begin(); - for ( ; it != r->connections.end(); ++it ) { - Connection conn = *it; - if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) { - sender = o; - } else { - l = o->queryList( 0, conn.sender->name(), FALSE ); - if ( !l || !l->first() ) { - delete l; - continue; - } - sender = l->first(); - delete l; - } - if ( qstrcmp( conn.receiver->name(), o->name() ) == 0 ) { - receiver = o; - } else { - l = o->queryList( 0, conn.receiver->name(), FALSE ); - if ( !l || !l->first() ) { - delete l; - continue; - } - receiver = l->first(); - delete l; - } - TQString s = "2""%1"; - s = s.arg( conn.signal.data() ); - TQString s2 = "1""%1"; - s2 = s2.arg( conn.slot.data() ); - - TQStrList signalList = sender->metaObject()->signalNames( TRUE ); - TQStrList slotList = receiver->metaObject()->slotNames( TRUE ); - - // avoid warnings - if ( signalList.find( conn.signal ) == -1 || - slotList.find( conn.slot ) == -1 ) - continue; - - TQObject::connect( sender, s, receiver, s2 ); - } -} - -bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - if ( !onlyCustom ) { - TQStrList slotList = o->metaObject()->slotNames( TRUE ); - if ( slotList.find( slot ) != -1 ) - return TRUE; - - if ( ::tqqt_cast(o) ) { - o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); - slotList = o->metaObject()->slotNames( TRUE ); - if ( slotList.find( slot ) != -1 ) - return TRUE; - } - - //if ( ::tqqt_cast(o) ) { - if ( o->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); - for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { - TQCString s = (*it).function; - if ( !s.data() ) - continue; - if ( s == slot ) - return TRUE; - } - } - } - - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - Function f = *it; - if ( normalizeFunction( f.function ) == normalizeFunction( slot ) && f.type == "slot" ) - return TRUE; - } - - return FALSE; -} - -bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - TQValueList conns = connections( o ); - for ( TQValueList::Iterator it = conns.begin(); it != conns.end(); ++it ) { - if ( (*it).slot == slot ) - return TRUE; - } - return FALSE; -} - - -void MetaDataBase::addFunction( TQObject *o, const TQCString &function, const TQString &specifier, - const TQString &access, const TQString &type, const TQString &language, - const TQString &returnType ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - Function f; - f.function = function; - f.specifier = specifier; - f.access = access; - f.type = type; - f.language = language; - f.returnType = returnType; - TQValueList::Iterator it = r->functionList.find( f ); - if ( it != r->functionList.end() ) - r->functionList.remove( it ); - r->functionList.append( f ); - ( (FormWindow*)o )->formFile()->addFunctionCode( f ); -} - -void MetaDataBase::setFunctionList( TQObject *o, const TQValueList &functionList ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - r->functionList = functionList; -} - -void MetaDataBase::removeFunction( TQObject *o, const TQCString &function, const TQString &specifier, - const TQString &access, const TQString &type, const TQString &language, - const TQString &returnType ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - if ( MetaDataBase::normalizeFunction( (*it).function ) == - MetaDataBase::normalizeFunction( function ) && - (*it).specifier == specifier && - (*it).access == access && - (*it).type == type && - ( language.isEmpty() || (*it).language == language ) && - ( returnType.isEmpty() || (*it).returnType == returnType ) ) { - ( (FormWindow*)o )->formFile()->removeFunctionCode( *it ); - r->functionList.remove( it ); - break; - } - } -} - -void MetaDataBase::removeFunction( TQObject *o, const TQString &function ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - if ( normalizeFunction( (*it).function ) == normalizeFunction( function ) ) { - ( (FormWindow*)o )->formFile()->removeFunctionCode( *it ); - r->functionList.remove( it ); - break; - } - } -} - -TQValueList MetaDataBase::functionList( TQObject *o, bool onlyFunctions ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - if ( !onlyFunctions ) - return r->functionList; - TQValueList fList; - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - if ( (*it).type == "function" ) - fList.append( *it ); - } - return fList; -} - -TQValueList MetaDataBase::slotList( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - TQValueList slotList; - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - if ( (*it).type == "slot" ) - slotList.append( *it ); - } - return slotList; -} - -void MetaDataBase::changeFunction( TQObject *o, const TQString &function, const TQString &newName, - const TQString &returnType ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - Function f = *it; - if ( normalizeFunction( f.function ) == normalizeFunction( function ) ) { - (*it).function = newName; - if ( !returnType.isNull() ) - (*it).returnType = returnType; - return; - } - } -} - -void MetaDataBase::changeFunctionAttributes( TQObject *o, const TQString &oldName, const TQString &newName, - const TQString &specifier, const TQString &access, - const TQString &type, const TQString &language, - const TQString &returnType ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - Function f = *it; - if ( normalizeFunction( f.function ) == normalizeFunction( oldName ) ) { - (*it).function = newName; - (*it).specifier = specifier; - (*it).access = access; - (*it).type = type; - (*it).language = language; - (*it).returnType = returnType; - return; - } - } -} - -bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onlyCustom ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - if ( !onlyCustom ) { - TQStrList functionList = o->metaObject()->slotNames( TRUE ); - if ( functionList.find( function ) != -1 ) - return TRUE; - - if ( ::tqqt_cast(o) ) { - o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); - functionList = o->metaObject()->slotNames( TRUE ); - if ( functionList.find( function ) != -1 ) - return TRUE; - } - - //if ( ::tqqt_cast(o) ) { - if ( o->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); - for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { - TQCString s = (*it).function; - if ( !s.data() ) - continue; - if ( s == function ) - return TRUE; - } - } - } - - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - Function f = *it; - if ( normalizeFunction( f.function ) == normalizeFunction( function ) ) - return TRUE; - } - - return FALSE; -} - -TQString MetaDataBase::languageOfFunction( TQObject *o, const TQCString &function ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - - TQString fu = normalizeFunction( function ); - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - if ( fu == normalizeFunction( (*it).function ) ) - return (*it).language; - } - return TQString(); -} - -bool MetaDataBase::addCustomWidget( CustomWidget *wid ) -{ - setupDataBase(); - - for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { - if ( *wid == *w ) { - for ( TQValueList::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) { - if ( !w->hasSignal( *it ) ) - w->lstSignals.append( *it ); - } - for ( TQValueList::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) { - if ( !w->hasSlot( MetaDataBase::normalizeFunction( (*it2).function ).latin1() ) ) - w->lstSlots.append( *it2 ); - } - for ( TQValueList::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) { - if ( !w->hasProperty( (*it3).property ) ) - w->lstProperties.append( *it3 ); - } - delete wid; - return FALSE; - } - } - - - WidgetDatabaseRecord *r = new WidgetDatabaseRecord; - r->name = wid->className; - r->group = WidgetDatabase::widgetGroup( "Custom" ); - r->toolTip = wid->className; - r->icon = new TQIconSet( *wid->pixmap, *wid->pixmap ); - r->isContainer = wid->isContainer; - wid->id = WidgetDatabase::addCustomWidget( r ); - cWidgets->append( wid ); - return TRUE; -} - -void MetaDataBase::removeCustomWidget( CustomWidget *w ) -{ - cWidgets->removeRef( w ); -} - -TQPtrList *MetaDataBase::customWidgets() -{ - setupDataBase(); - return cWidgets; -} - -MetaDataBase::CustomWidget *MetaDataBase::customWidget( int id ) -{ - for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { - if ( id == w->id ) - return w; - } - return 0; -} - -bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid ) -{ - for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { - if ( w == wid ) - continue; - if ( wid->className == w->className ) - return TRUE; - } - return FALSE; -} - -bool MetaDataBase::hasCustomWidget( const TQString &className ) -{ - for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { - if ( w->className == className ) - return TRUE; - } - return FALSE; -} - -void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*) w ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - w, w->name(), w->className() ); - return; - } - - r->tabOrder = order; -} - -TQWidgetList MetaDataBase::tabOrder( TQWidget *w ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*) w ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - w, w->name(), w->className() ); - return TQWidgetList(); - } - - return r->tabOrder; -} - -void MetaDataBase::setIncludes( TQObject *o, const TQValueList &incs ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->includes = incs; -} - -TQValueList MetaDataBase::includes( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - - return r->includes; -} - -void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->forwards = fwds; -} - -TQStringList MetaDataBase::forwards( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQStringList(); - } - - return r->forwards; -} - -void MetaDataBase::setVariables( TQObject *o, const TQValueList &vars ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->variables = vars; -} - -void MetaDataBase::addVariable( TQObject *o, const TQString &name, const TQString &access ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - Variable v; - v.varName = name; - v.varAccess = access; - r->variables << v; -} - -void MetaDataBase::removeVariable( TQObject *o, const TQString &name ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - TQValueList::Iterator it = r->variables.begin(); - for ( ; it != r->variables.end(); ++it ) { - if ( (*it).varName == name ) { - r->variables.remove( it ); - break; - } - } -} - -TQValueList MetaDataBase::variables( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - - return r->variables; -} - -bool MetaDataBase::hasVariable( TQObject *o, const TQString &name ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - TQValueList::Iterator it = r->variables.begin(); - for ( ; it != r->variables.end(); ++it ) { - if ( extractVariableName( name ) == extractVariableName( (*it).varName ) ) - return TRUE; - } - return FALSE; -} - -TQString MetaDataBase::extractVariableName( const TQString &name ) -{ - TQString n = name.right( name.length() - name.findRev( ' ' ) - 1 ); - if ( n[ 0 ] == '*' || n[ 0 ] == '&' ) - n[ 0 ] = ' '; - if ( n[ (int)n.length() - 1 ] == ';' ) - n[ (int)n.length() - 1 ] = ' '; - return n.simplifyWhiteSpace(); -} - -void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->sigs.clear(); - - for ( TQStringList::ConstIterator it = sigs.begin(); it != sigs.end(); ++it ) { - TQString s = (*it).simplifyWhiteSpace(); - bool hasSemicolon = s.endsWith( ";" ); - if ( hasSemicolon ) - s = s.left( s.length() - 1 ); - int p = s.find( '(' ); - if ( p < 0 ) - p = s.length(); - int sp = s.find( ' ' ); - if ( sp >= 0 && sp < p ) { - s = s.mid( sp+1 ); - p -= sp + 1; - } - if ( p == (int) s.length() ) - s += "()"; - if ( hasSemicolon ) - s += ";"; - r->sigs << s; - } -} - -TQStringList MetaDataBase::signalList( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQStringList(); - } - - return r->sigs; -} - -void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->metaInfo = mi; -} - -MetaDataBase::MetaInfo MetaDataBase::metaInfo( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return MetaInfo(); - } - - return r->metaInfo; -} - - - - -MetaDataBase::CustomWidget::CustomWidget() -{ - className = "MyCustomWidget"; - includeFile = "mywidget.h"; - includePolicy = Local; - sizeHint = TQSize( -1, -1 ); - pixmap = new TQPixmap( BarIcon( "designer_customwidget.png", TDevDesignerPartFactory::instance() ) ); - id = -1; - sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ); - isContainer = FALSE; -} - -MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w ) -{ - className = w.className; - includeFile = w.includeFile; - includePolicy = w.includePolicy; - sizeHint = w.sizeHint; - if ( w.pixmap ) - pixmap = new TQPixmap( *w.pixmap ); - else - pixmap = 0; - id = w.id; - isContainer = w.isContainer; -} - -void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c ) -{ - setupDataBase(); - if ( w->isA( "PropertyObject" ) ) { - ( (PropertyObject*)w )->mdSetCursor( c ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)w ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - w, w->name(), w->className() ); - return; - } - - r->cursor = c; -} - -TQCursor MetaDataBase::cursor( TQWidget *w ) -{ - setupDataBase(); - if ( w->isA( "PropertyObject" ) ) - return ( (PropertyObject*)w )->mdCursor(); - MetaDataBaseRecord *r = db->find( (void*)w ); - if ( !r ) { - w->unsetCursor(); - return w->cursor(); - } - - return r->cursor; -} - -bool MetaDataBase::CustomWidget::operator==( const CustomWidget &w ) const -{ - return className == w.className; -} - -MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomWidget &w ) -{ - delete pixmap; - className = w.className; - includeFile = w.includeFile; - includePolicy = w.includePolicy; - sizeHint = w.sizeHint; - if ( w.pixmap ) - pixmap = new TQPixmap( *w.pixmap ); - else - pixmap = 0; - lstSignals = w.lstSignals; - lstSlots = w.lstSlots; - lstProperties = w.lstProperties; - id = w.id; - isContainer = w.isContainer; - return *this; -} - -bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const -{ - TQStrList sigList = TQWidget::staticMetaObject()->signalNames( TRUE ); - if ( sigList.find( signal ) != -1 ) - return TRUE; - for ( TQValueList::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) { - if ( normalizeFunction( *it ) == normalizeFunction( signal ) ) - return TRUE; - } - return FALSE; -} - -bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const -{ - TQStrList slotList = TQWidget::staticMetaObject()->slotNames( TRUE ); - if ( slotList.find( normalizeFunction( slot ) ) != -1 ) - return TRUE; - - for ( TQValueList::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) { - if ( normalizeFunction( (*it).function ) == normalizeFunction( slot ) ) - return TRUE; - } - return FALSE; -} - -bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const -{ - TQStrList propList = TQWidget::staticMetaObject()->propertyNames( TRUE ); - if ( propList.find( prop ) != -1 ) - return TRUE; - - for ( TQValueList::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) { - if ( (*it).property == prop ) - return TRUE; - } - return FALSE; -} - -void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &arg ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->pixmapArguments.remove( pixmap ); - r->pixmapArguments.insert( pixmap, arg ); -} - -TQString MetaDataBase::pixmapArgument( TQObject *o, int pixmap ) -{ - if ( !o ) - return TQString(); - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - - return *r->pixmapArguments.find( pixmap ); -} - -void MetaDataBase::clearPixmapArguments( TQObject *o ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->pixmapArguments.clear(); -} - - -void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg ) -{ - if ( !o ) - return; - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) { - ( (PropertyObject*)o )->mdSetPixmapKey( pixmap, arg ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->pixmapKeys.remove( pixmap ); - r->pixmapKeys.insert( pixmap, arg ); -} - -TQString MetaDataBase::pixmapKey( TQObject *o, int pixmap ) -{ - if ( !o ) - return TQString(); - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) - return ( (PropertyObject*)o )->mdPixmapKey( pixmap ); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - - TQString s = *r->pixmapKeys.find( pixmap ); - if ( !s.isNull() ) - return s; - if ( !o->isWidgetType() ) - return s; - TQWidget *w = (TQWidget*)o; - if ( w->icon() ) - return *r->pixmapKeys.find( w->icon()->serialNumber() ); - return s; -} - -void MetaDataBase::clearPixmapKeys( TQObject *o ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->pixmapKeys.clear(); -} - - - -void MetaDataBase::setColumnFields( TQObject *o, const TQMap &columnFields ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->columnFields = columnFields; -} - -TQMap MetaDataBase::columnFields( TQObject *o ) -{ - if ( !o ) - return TQMap(); - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQMap(); - } - - return r->columnFields; -} - -void MetaDataBase::setEditor( const TQStringList &langs ) -{ - editorLangList = langs; -} - -bool MetaDataBase::hasEditor( const TQString &lang ) -{ - return editorLangList.find( lang ) != editorLangList.end(); -} - -void MetaDataBase::setupInterfaceManagers( const TQString &plugDir ) -{ - if ( !languageInterfaceManager ) { - languageInterfaceManager = - new TQPluginManager( IID_Language, - TQApplication::libraryPaths(), -// kapp->dirs()->resourceDirs("qtplugins"), - plugDir ); - - langList = languageInterfaceManager->featureList(); - langList.remove( "C++" ); - langList << "C++"; - } -} - -TQStringList MetaDataBase::languages() -{ - return langList; -} - -TQString MetaDataBase::normalizeFunction( const TQString &f ) -{ - return Parser::cleanArgs( f ); -} - -LanguageInterface *MetaDataBase::languageInterface( const TQString &lang ) -{ - LanguageInterface* iface = 0; - languageInterfaceManager->queryInterface( lang, &iface ); - return iface; -} - -void MetaDataBase::clear( TQObject *o ) -{ - if ( !o ) - return; - setupDataBase(); - db->remove( (void*)o ); - for ( TQPtrDictIterator it( *( (FormWindow*)o )->widgets() ); it.current(); ++it ) - db->remove( (void*)it.current() ); -} - -void MetaDataBase::setBreakPoints( TQObject *o, const TQValueList &l ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->breakPoints = l; - - TQMap::Iterator it = r->breakPointConditions.begin(); - while ( it != r->breakPointConditions.end() ) { - int line = it.key(); - ++it; - if ( r->breakPoints.find( line ) == r->breakPoints.end() ) - r->breakPointConditions.remove( r->breakPointConditions.find( line ) ); - } -} - -TQValueList MetaDataBase::breakPoints( TQObject *o ) -{ - if ( !o ) - return TQValueList(); - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - - return r->breakPoints; -} - -void MetaDataBase::setBreakPointCondition( TQObject *o, int line, const TQString &condition ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - r->breakPointConditions.replace( line, condition ); -} - -TQString MetaDataBase::breakPointCondition( TQObject *o, int line ) -{ - if ( !o ) - return TQString(); - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - TQMap::Iterator it = r->breakPointConditions.find( line ); - if ( it == r->breakPointConditions.end() ) - return TQString(); - return *it; -} - -void MetaDataBase::setExportMacro( TQObject *o, const TQString ¯o ) -{ - if ( !o ) - return; - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) { - ( (PropertyObject*)o )->mdSetExportMacro( macro ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->exportMacro = macro; -} - -TQString MetaDataBase::exportMacro( TQObject *o ) -{ - if ( !o ) - return ""; - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) - return ( (PropertyObject*)o )->mdExportMacro(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return ""; - } - - return r->exportMacro; -} - -bool MetaDataBase::hasObject( TQObject *o ) -{ - return !!db->find( o ); -} diff --git a/tdevdesigner/designer/metadatabase.h b/tdevdesigner/designer/metadatabase.h deleted file mode 100644 index 352e10d7..00000000 --- a/tdevdesigner/designer/metadatabase.h +++ /dev/null @@ -1,269 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef METADATABASE_H -#define METADATABASE_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "pixmapchooser.h" -#include "../interfaces/languageinterface.h" - -class TQObject; -class TQPixmap; -struct LanguageInterface; - -class MetaDataBase -{ -public: - struct Connection - { - TQObject *sender, *receiver; - TQCString signal, slot; - bool operator==( const Connection &c ) const { - return sender == c.sender && receiver == c.receiver && - signal == c.signal && slot == c.slot ; - } - }; - - struct Function - { - TQString returnType; - TQCString function; - TQString specifier; - TQString access; - TQString type; - TQString language; - bool operator==( const Function &f ) const { - return ( returnType == f.returnType && - function == f.function && - specifier == f.specifier && - access == f.access && - type == f.type && - language == f.language - ); - } - }; - - struct Property - { - TQCString property; - TQString type; - bool operator==( const Property &p ) const { - return property == p.property && - type == p.type; - } - }; - - struct CustomWidget - { - CustomWidget(); - CustomWidget( const CustomWidget &w ); - ~CustomWidget() { delete pixmap; } // inlined to work around 2.7.2.3 bug - bool operator==( const CustomWidget &w ) const; - CustomWidget &operator=( const CustomWidget &w ); - - bool hasSignal( const TQCString &signal ) const; - bool hasSlot( const TQCString &slot ) const; - bool hasProperty( const TQCString &prop ) const; - - enum IncludePolicy { Global, Local }; - TQString className; - TQString includeFile; - IncludePolicy includePolicy; - TQSize sizeHint; - TQSizePolicy sizePolicy; - TQPixmap *pixmap; - TQValueList lstSignals; - TQValueList lstSlots; - TQValueList lstProperties; - int id; - bool isContainer; - }; - - struct Include - { - Include() : header(), location(), implDecl( "in implementation" ) {} - TQString header; - TQString location; - bool operator==( const Include &i ) const { - return header == i.header && location == i.location; - } - TQString implDecl; - }; - - struct Variable - { - TQString varName; - TQString varAccess; - bool operator==( const Variable &v ) const { - return varName == v.varName && - varAccess == v.varAccess; - } - }; - - struct MetaInfo - { - MetaInfo() : classNameChanged( FALSE ) { } - TQString className; - bool classNameChanged; - TQString comment; - TQString author; - }; - - MetaDataBase(); - static void clearDataBase(); - - static void addEntry( TQObject *o ); - static void removeEntry( TQObject *o ); - static void setPropertyChanged( TQObject *o, const TQString &property, bool changed ); - static bool isPropertyChanged( TQObject *o, const TQString &property ); - static void setPropertyComment( TQObject *o, const TQString &property, const TQString &comment ); - static TQString propertyComment( TQObject *o, const TQString &property ); - static TQStringList changedProperties( TQObject *o ); - - static void setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ); - static TQVariant fakeProperty( TQObject * o, const TQString &property ); - static TQMap* fakeProperties( TQObject* o ); - - static void setSpacing( TQObject *o, int spacing ); - static int spacing( TQObject *o ); - static void setMargin( TQObject *o, int margin ); - static int margin( TQObject *o ); - - static void setResizeMode( TQObject *o, const TQString &mode ); - static TQString resizeMode( TQObject *o ); - - static void addConnection( TQObject *o, TQObject *sender, const TQCString &signal, - TQObject *receiver, const TQCString &slot, bool addCode = TRUE ); - static void removeConnection( TQObject *o, TQObject *sender, const TQCString &signal, - TQObject *receiver, const TQCString &slot ); - static bool hasConnection( TQObject *o, TQObject *sender, const TQCString &signal, - TQObject *receiver, const TQCString &slot ); - static void setupConnections( TQObject *o, const TQValueList &conns ); - static TQValueList connections( TQObject *o ); - static TQValueList connections( TQObject *o, TQObject *sender, TQObject *receiver ); - static TQValueList connections( TQObject *o, TQObject *object ); - static void doConnections( TQObject *o ); - - static void addFunction( TQObject *o, const TQCString &function, const TQString &specifier, - const TQString &access, const TQString &type, const TQString &language, - const TQString &returnType ); - static void removeFunction( TQObject *o, const TQCString &function, const TQString &specifier, - const TQString &access, const TQString &type, const TQString &language, - const TQString &returnType ); - static void removeFunction( TQObject *o, const TQString &function ); - static TQValueList functionList( TQObject *o, bool onlyFunctions = FALSE ); - static TQValueList slotList( TQObject *o ); - static bool isSlotUsed( TQObject *o, const TQCString &slot ); - static bool hasFunction( TQObject *o, const TQCString &function, bool onlyCustom = FALSE ); - static bool hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom = FALSE ); - static void changeFunction( TQObject *o, const TQString &function, const TQString &newName, - const TQString &returnType ); - static void changeFunctionAttributes( TQObject *o, const TQString &oldName, const TQString &newName, - const TQString &specifier, const TQString &access, - const TQString &type, const TQString &language, - const TQString &returnType ); - static TQString languageOfFunction( TQObject *o, const TQCString &function ); - static void setFunctionList( TQObject *o, const TQValueList &functionList ); - - - static bool addCustomWidget( CustomWidget *w ); - static void removeCustomWidget( CustomWidget *w ); - static TQPtrList *customWidgets(); - static CustomWidget *customWidget( int id ); - static bool isWidgetNameUsed( CustomWidget *w ); - static bool hasCustomWidget( const TQString &className ); - - static void setTabOrder( TQWidget *w, const TQWidgetList &order ); - static TQWidgetList tabOrder( TQWidget *w ); - - static void setIncludes( TQObject *o, const TQValueList &incs ); - static TQValueList includes( TQObject *o ); - - static void setForwards( TQObject *o, const TQStringList &fwds ); - static TQStringList forwards( TQObject *o ); - - static void setVariables( TQObject *o, const TQValueList &vars ); - static void addVariable( TQObject *o, const TQString &name, const TQString &access ); - static void removeVariable( TQObject *o, const TQString &name ); - static TQValueList variables( TQObject *o ); - static bool hasVariable( TQObject *o, const TQString &name ); - static TQString extractVariableName( const TQString &name ); - - static void setSignalList( TQObject *o, const TQStringList &sigs ); - static TQStringList signalList( TQObject *o ); - - static void setMetaInfo( TQObject *o, MetaInfo mi ); - static MetaInfo metaInfo( TQObject *o ); - - static void setCursor( TQWidget *w, const TQCursor &c ); - static TQCursor cursor( TQWidget *w ); - - static void setPixmapArgument( TQObject *o, int pixmap, const TQString &arg ); - static TQString pixmapArgument( TQObject *o, int pixmap ); - static void clearPixmapArguments( TQObject *o ); - - static void setPixmapKey( TQObject *o, int pixmap, const TQString &arg ); - static TQString pixmapKey( TQObject *o, int pixmap ); - static void clearPixmapKeys( TQObject *o ); - - static void setColumnFields( TQObject *o, const TQMap &columnFields ); - static TQMap columnFields( TQObject *o ); - - static void setEditor( const TQStringList &langs ); - static bool hasEditor( const TQString &lang ); - - static void setupInterfaceManagers( const TQString &plugDir ); - static TQStringList languages(); - - static LanguageInterface *languageInterface( const TQString &lang ); - - static TQString normalizeFunction( const TQString &f ); - - static void clear( TQObject *o ); - - static void setBreakPoints( TQObject *o, const TQValueList &l ); - static void setBreakPointCondition( TQObject *o, int line, const TQString &condition ); - static TQValueList breakPoints( TQObject *o ); - static TQString breakPointCondition( TQObject *o, int line ); - - static void setExportMacro( TQObject *o, const TQString ¯o ); - static TQString exportMacro( TQObject *o ); - - static bool hasObject( TQObject *o ); - -}; - -#endif diff --git a/tdevdesigner/designer/multilineeditor.ui b/tdevdesigner/designer/multilineeditor.ui deleted file mode 100644 index f0ff2129..00000000 --- a/tdevdesigner/designer/multilineeditor.ui +++ /dev/null @@ -1,181 +0,0 @@ - -MultiLineEditorBase -********************************************************************* -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - MultiLineEditorBase - - - - 0 - 0 - 598 - 307 - - - - Edit Text - - - <b>Multiline Edit</b><p>This is a simple richtext editor. To improve its usability it provides toolbar items for the most common html tags: by clicking on a toolbar item, the corresponding tag will be written to the editor, where you can insert your text. If you have already written some text and want to format it, hilight it and click on the desired button. To improve visualization this editor also supports a simple html-syntax-highlighting scheme. - - - - unnamed - - - 11 - - - 6 - - - - Layout4 - - - - unnamed - - - 0 - - - 6 - - - - Layout3 - - - - unnamed - - - 0 - - - 6 - - - - OkButton - - - &OK - - - false - - - true - - - true - - - - - applyButton - - - &Apply - - - - - cancelButton - - - &Cancel - - - - - Spacer3 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - helpButton - - - &Help - - - - - - - - - - - menuBar - - - - - - - OkButton - clicked() - MultiLineEditorBase - okClicked() - - - applyButton - clicked() - MultiLineEditorBase - applyClicked() - - - cancelButton - clicked() - MultiLineEditorBase - cancelClicked() - - - - applyClicked() - okClicked() - cancelClicked() - - - diff --git a/tdevdesigner/designer/multilineeditorimpl.cpp b/tdevdesigner/designer/multilineeditorimpl.cpp deleted file mode 100644 index a3f6093e..00000000 --- a/tdevdesigner/designer/multilineeditorimpl.cpp +++ /dev/null @@ -1,415 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "multilineeditorimpl.h" -#include "formwindow.h" -#include "command.h" -#include "mainwindow.h" -#include "richtextfontdialog.h" -#include "syntaxhighlighter_html.h" -#include "widgetfactory.h" - -#include -#include "tdevdesigner_part.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -ToolBarItem::ToolBarItem( TQWidget *parent, TQWidget *toolBar, - const TQString &label, const TQString &tagstr, - const TQIconSet &icon, const TQKeySequence &key ) - : TQAction( parent ) -{ - setIconSet( icon ); - setText( label ); - setAccel( key ); - addTo( toolBar ); - tag = tagstr; - connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( wasActivated() ) ); -} - -ToolBarItem::~ToolBarItem() -{ - -} - -void ToolBarItem::wasActivated() -{ - emit clicked( tag ); -} - -TextEdit::TextEdit( TQWidget *parent, const char *name ) - : TQTextEdit( parent, name ) -{ - setTextFormat( TQt::PlainText ); -} - -TQTextParagraph* TextEdit::paragraph() -{ - TQTextCursor *tc = new TQTextCursor( TQTextEdit::document() ); - return tc->paragraph(); -} - - -MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget, - FormWindow *fw, const TQString &text ) - : MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( FALSE ) -{ - callStatic = call_static; - - if ( callStatic ) - applyButton->hide(); - - textEdit = new TextEdit( centralWidget(), "textedit" ); - Layout4->insertWidget( 0, textEdit ); - - if ( richtextMode ) { - TQPopupMenu *stylesMenu = new TQPopupMenu( this ); - menuBar->insertItem( i18n( "&Styles" ), stylesMenu ); - - basicToolBar = new TQToolBar( i18n( "Basics" ), this, DockTop ); - - ToolBarItem *it = new ToolBarItem( this, basicToolBar, i18n( "Italic" ), - "i", BarIcon( "designer_textitalic.png", TDevDesignerPartFactory::instance() ), CTRL+Key_I ); - it->addTo( stylesMenu ); - connect( it, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *b = new ToolBarItem( this, basicToolBar, i18n( "Bold" ), - "b", BarIcon( "designer_textbold.png", TDevDesignerPartFactory::instance() ), CTRL+Key_B ); - b->addTo( stylesMenu ); - connect( b, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *ul = new ToolBarItem( this, basicToolBar, i18n( "Underline" ), - "u", BarIcon( "designer_textunderline.png" , TDevDesignerPartFactory::instance()), CTRL+Key_U ); - ul->addTo( stylesMenu ); - connect( ul, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *tt = new ToolBarItem( this, basicToolBar, i18n( "Typewriter" ), - "tt", BarIcon( "designer_textteletext.png", TDevDesignerPartFactory::instance() ) ); - tt->addTo( stylesMenu ); - connect( tt, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - basicToolBar->addSeparator(); - - TQPopupMenu *layoutMenu = new TQPopupMenu( this ); - menuBar->insertItem( i18n( "&Layout" ), layoutMenu ); - - TQAction *brAction = new TQAction( this ); - brAction->setIconSet( BarIcon( "designer_textlinebreak.png", TDevDesignerPartFactory::instance() ) ); - brAction->setText( i18n("Break" ) ); - brAction->addTo( basicToolBar ); - brAction->addTo( layoutMenu ); - connect( brAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( insertBR() ) ); - - ToolBarItem *p = new ToolBarItem( this, basicToolBar, i18n( "Paragraph" ), - "p", BarIcon( "designer_textparagraph.png", TDevDesignerPartFactory::instance() ) ); - p->addTo( layoutMenu ); - connect( p, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - layoutMenu->insertSeparator(); - basicToolBar->addSeparator(); - - ToolBarItem *al = new ToolBarItem( this, basicToolBar, i18n( "Align left" ), - "p align=\"left\"", BarIcon( "designer_textleft.png", TDevDesignerPartFactory::instance() ) ); - al->addTo( layoutMenu ); - connect( al, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *ac = new ToolBarItem( this, basicToolBar, i18n( "Align center" ), - "p align=\"center\"", BarIcon( "designer_textcenter.png", TDevDesignerPartFactory::instance() ) ); - ac->addTo( layoutMenu ); - connect( ac, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *ar = new ToolBarItem( this, basicToolBar, i18n( "Align right" ), - "p align=\"right\"", BarIcon( "designer_textright.png", TDevDesignerPartFactory::instance() ) ); - ar->addTo( layoutMenu ); - connect( ar, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *block = new ToolBarItem( this, basicToolBar, i18n( "Blockquote" ), - "blockquote", BarIcon( "designer_textjustify.png", TDevDesignerPartFactory::instance() ) ); - block->addTo( layoutMenu ); - connect( block, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - - TQPopupMenu *fontMenu = new TQPopupMenu( this ); - menuBar->insertItem( i18n( "&Font" ), fontMenu ); - - fontToolBar = new TQToolBar( "Fonts", this, DockTop ); - - TQAction *fontAction = new TQAction( this ); - fontAction->setIconSet( BarIcon( "designer_textfont.png", TDevDesignerPartFactory::instance() ) ); - fontAction->setText( i18n("Font" ) ); - fontAction->addTo( fontToolBar ); - fontAction->addTo( fontMenu ); - connect( fontAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( showFontDialog() ) ); - - - ToolBarItem *fp1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize +1" ), - "font size=\"+1\"", BarIcon( "designer_textlarger.png", TDevDesignerPartFactory::instance() ) ); - connect( fp1, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *fm1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize -1" ), - "font size=\"-1\"", BarIcon( "designer_textsmaller.png", TDevDesignerPartFactory::instance() ) ); - connect( fm1, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *h1 = new ToolBarItem( this, fontToolBar, i18n( "Headline 1" ), - "h1", BarIcon( "designer_texth1.png", TDevDesignerPartFactory::instance() ) ); - connect( h1, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *h2 = new ToolBarItem( this, fontToolBar, i18n( "Headline 2" ), - "h2", BarIcon( "designer_texth2.png", TDevDesignerPartFactory::instance() ) ); - connect( h2, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *h3 = new ToolBarItem( this, fontToolBar, i18n( "Headline 3" ), - "h3", BarIcon( "designer_texth3.png", TDevDesignerPartFactory::instance() ) ); - connect( h3, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - TQPopupMenu *optionsMenu = new TQPopupMenu( this ); - menuBar->insertItem( i18n( "O&ptions" ), optionsMenu ); - - optionsToolBar = new TQToolBar( "Options", this, DockTop ); - wrapAction = new TQAction( this ); - wrapAction->setToggleAction( TRUE ); - wrapAction->setIconSet( BarIcon( "designer_wordwrap.png", TDevDesignerPartFactory::instance() ) ); - wrapAction->setText( i18n( "Word Wrapping" ) ); - wrapAction->addTo( optionsToolBar ); - wrapAction->addTo( optionsMenu ); - connect( wrapAction, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( changeWrapMode( bool ) ) ); - - oldDoWrap = doWrap; - wrapAction->setOn( doWrap ); - - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - textEdit->document()->setFormatter( new TQTextFormatterBreakInWords ); - textEdit->document()->setUseFormatCollection( FALSE ); - textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML ); - - if ( !callStatic && ::tqqt_cast(editWidget) ) { - mlined = (TQTextEdit*)editWidget; - mlined->setReadOnly( TRUE ); - - const TQMetaProperty *wordWrap = mlined->metaObject()->property( - mlined->metaObject()->findProperty( "wordWrap", TRUE ), TRUE ); - oldWrapMode = 0; - oldWrapString = "NoWrap"; - if ( wordWrap ) { - oldWrapMode = mlined->property( "wordWrap" ); - oldWrapString = TQString( wordWrap->valueToKey( oldWrapMode.toInt() ) ); - if ( oldWrapString != "NoWrap" ) - doWrap = TRUE; - } - textEdit->setAlignment( mlined->alignment() ); - textEdit->setWordWrap( mlined->wordWrap() ); - textEdit->setWrapColumnOrWidth( mlined->wrapColumnOrWidth() ); - textEdit->setWrapPolicy( mlined->wrapPolicy() ); - textEdit->setText( mlined->text() ); - if ( !mlined->text().isEmpty() ) - textEdit->selectAll(); - } else { - textEdit->setText( text ); - textEdit->selectAll(); - } - } else { - textEdit->setText( text ); - textEdit->selectAll(); - } - textEdit->setFocus(); -} - -int MultiLineEditor::exec() -{ - res = 1; - show(); - tqApp->enter_loop(); - return res; -} - -void MultiLineEditor::okClicked() -{ - applyClicked(); - close(); -} - -void MultiLineEditor::applyClicked() -{ - if ( !callStatic ) { - PopulateMultiLineEditCommand *cmd = new PopulateMultiLineEditCommand( i18n( "Set the Text of '%1'" ).arg( mlined->name() ), - formwindow, mlined, textEdit->text() ); - cmd->execute(); - formwindow->commandHistory()->addCommand( cmd ); - - if ( oldDoWrap != doWrap ) { - TQString pn( i18n( "Set 'wordWrap' of '%2'" ).arg( mlined->name() ) ); - SetPropertyCommand *propcmd; - if ( doWrap ) - propcmd = new SetPropertyCommand( pn, formwindow, - TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), - "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), - TQVariant( 1 ), "WidgetWidth", oldWrapString ); - else - propcmd = new SetPropertyCommand( pn, formwindow, - TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), - "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), - TQVariant( 0 ), "NoWrap", oldWrapString ); - - propcmd->execute(); - formwindow->commandHistory()->addCommand( propcmd, TRUE ); - } - textEdit->setFocus(); - } - else { - staticText = textEdit->text(); - } -} - -void MultiLineEditor::cancelClicked() -{ - res = 0; - close(); -} - -void MultiLineEditor::closeEvent( TQCloseEvent *e ) -{ - tqApp->exit_loop(); - MultiLineEditorBase::closeEvent( e ); -} - -void MultiLineEditor::insertTags( const TQString &tag ) -{ - int pfrom, pto, ifrom, ito; - TQString tagend( tag.simplifyWhiteSpace() ); - tagend.remove( tagend.find( ' ', 0 ), tagend.length() ); - if ( textEdit->hasSelectedText() ) { - textEdit->getSelection( &pfrom, &ifrom, &pto, &ito ); - TQString buf = textEdit->selectedText(); - buf = TQString( "<%1>%3" ).arg( tag ).arg( tagend ).arg( buf ); - textEdit->removeSelectedText(); - textEdit->insertAt( buf, pfrom, ifrom ); - textEdit->setCursorPosition( pto, ito + 2 + tag.length() ); - } - else { - int para, index; - textEdit->getCursorPosition( ¶, &index ); - textEdit->insert( TQString( "<%1>" ).arg( tag ).arg( tagend ) ); - index += 2 + tag.length(); - textEdit->setCursorPosition( para, index ); - } -} - -void MultiLineEditor::insertBR() -{ - textEdit->insert( "
    " ); -} - -void MultiLineEditor::showFontDialog() -{ - bool selText = FALSE; - int pfrom, pto, ifrom, ito; - if ( textEdit->hasSelectedText() ) { - textEdit->getSelection( &pfrom, &ifrom, &pto, &ito ); - selText = TRUE; - } - RichTextFontDialog *fd = new RichTextFontDialog( this ); - if ( fd->exec() == TQDialog::Accepted ) { - TQString size, font; - if ( fd->getSize() != "0" ) - size = "size=\"" + fd->getSize() + "\""; - TQString color; - if ( !fd->getColor().isEmpty() && fd->getColor() != "#000000" ) - color = "color=\"" + fd->getColor() + "\""; - if ( fd->getFont() != "default" ) - font = "face=\"" + fd->getFont() + "\""; - TQString tag( TQString( "font %1 %2 %3" ) - .arg( color ).arg( size ).arg( font ) ); - - if ( selText ) - textEdit->setSelection( pfrom, ifrom, pto, ito ); - insertTags( tag.simplifyWhiteSpace() ); - } - else if ( selText ) - textEdit->setSelection( pfrom, ifrom, pto, ito ); -} - -TQString MultiLineEditor::getStaticText() -{ - return staticText.stripWhiteSpace(); -} - -TQString MultiLineEditor::getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap ) -{ - MultiLineEditor medit( TRUE, richtextMode, parent, 0, 0, text ); - if ( richtextMode ) - medit.setUseWrapping( *useWrap ); - if ( medit.exec() == TQDialog::Accepted ) { - *useWrap = medit.useWrapping(); - return medit.getStaticText(); - } - return TQString(); -} - -void MultiLineEditor::changeWrapMode( bool b ) -{ - doWrap = b; - if ( doWrap && !callStatic ) { - if ( oldDoWrap ) - textEdit->setProperty( "wordWrap", oldWrapMode ); - else - textEdit->setWordWrap( TQTextEdit::WidgetWidth ); - } else { - textEdit->setWordWrap( TQTextEdit::NoWrap ); - } -} - -bool MultiLineEditor::useWrapping() const -{ - return doWrap; -} - -void MultiLineEditor::setUseWrapping( bool b ) -{ - doWrap = b; - wrapAction->setOn( doWrap ); -} diff --git a/tdevdesigner/designer/multilineeditorimpl.h b/tdevdesigner/designer/multilineeditorimpl.h deleted file mode 100644 index 34d47b3e..00000000 --- a/tdevdesigner/designer/multilineeditorimpl.h +++ /dev/null @@ -1,112 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef MULTILINEEDITORIMPL_H -#define MULTILINEEDITORIMPL_H - -#include -#include -#include -#include "multilineeditor.h" - -class FormWindow; -class TQToolBar; -class TQTextDocument; - -class TextEdit : public TQTextEdit -{ - Q_OBJECT - - -public: - TextEdit( TQWidget *parent = 0, const char *name = 0 ); - TQTextDocument *document() const { return TQTextEdit::document(); } - TQTextParagraph *paragraph(); - -}; - -class ToolBarItem : public TQAction -{ - Q_OBJECT - - -public: - ToolBarItem( TQWidget *parent, TQWidget *toolBar, - const TQString &label, const TQString &tagstr, - const TQIconSet &icon, const TQKeySequence &key = 0 ); - ~ToolBarItem(); -signals: - void clicked( const TQString &t ); - -protected slots: - void wasActivated(); -private: - TQString tag; -}; - - -class MultiLineEditor : public MultiLineEditorBase -{ - Q_OBJECT - - -public: - MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget, - FormWindow *fw, const TQString &text = TQString() ); - bool useWrapping() const; - void setUseWrapping( bool ); - static TQString getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap ); - int exec(); - -protected slots: - void okClicked(); - void applyClicked(); - void cancelClicked(); - void insertTags( const TQString& ); - void insertBR(); - void showFontDialog(); - void changeWrapMode( bool ); - - void closeEvent( TQCloseEvent *e ); - -private: - TQString getStaticText(); - TextEdit *textEdit; - TQTextEdit *mlined; - FormWindow *formwindow; - TQToolBar *basicToolBar; - TQToolBar *fontToolBar; - TQToolBar *optionsToolBar; - TQAction *wrapAction; - int res; - TQString staticText; - bool callStatic; - bool oldDoWrap, doWrap; - TQVariant oldWrapMode; - TQString oldWrapString; -}; - -#endif diff --git a/tdevdesigner/designer/myiconloader.cpp b/tdevdesigner/designer/myiconloader.cpp deleted file mode 100644 index 72a1bdfb..00000000 --- a/tdevdesigner/designer/myiconloader.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program 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 program 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 "myiconloader.h" -#include "tdevdesigner_part.h" -#include - -TQPixmap BarIcon2( const TQString & name ) -{ - return BarIcon(name, TDevDesignerPartFactory::instance()); -} - -TQPixmap SmallIcon2( const TQString & name) -{ - return SmallIcon(name, TDevDesignerPartFactory::instance()); -} diff --git a/tdevdesigner/designer/myiconloader.h b/tdevdesigner/designer/myiconloader.h deleted file mode 100644 index 63a47eee..00000000 --- a/tdevdesigner/designer/myiconloader.h +++ /dev/null @@ -1,32 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program 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 program 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 MY_ICON_LOADER -#define MY_ICON_LOADER - -#include -#include - -class TDEInstance; - -TQPixmap BarIcon2 (const TQString &name); -TQPixmap SmallIcon2 (const TQString &name); - - -#endif diff --git a/tdevdesigner/designer/newform.ui b/tdevdesigner/designer/newform.ui deleted file mode 100644 index 81cb4fa5..00000000 --- a/tdevdesigner/designer/newform.ui +++ /dev/null @@ -1,238 +0,0 @@ - -NewFormBase -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - NewFormBase - - - - 0 - 0 - 557 - 436 - - - - New File - - - true - - - <b>New Form</b><p>Select a template for the new form and click the <b>OK</b>-button to create it.</p> - - - - unnamed - - - 11 - - - 6 - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - helpButton - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - Create a new form using the selected template. - - - - - buttonCancel - - - &Cancel - - - true - - - Close the dialog without creating a new form. - - - - - - - templateView - - - 120 - - - Adjust - - - false - - - true - - - Displays a list of the available templates. - - - - - labelProject - - - &Insert into: - - - projectCombo - - - - - projectCombo - - - - - Spacer2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - - - buttonOk - clicked() - NewFormBase - accept() - - - buttonCancel - clicked() - NewFormBase - reject() - - - projectCombo - activated(const TQString&) - NewFormBase - projectChanged(const TQString&) - - - templateView - currentChanged(TQIconViewItem*) - NewFormBase - itemChanged(TQIconViewItem*) - - - templateView - doubleClicked(TQIconViewItem*) - NewFormBase - accept() - - - templateView - returnPressed(TQIconViewItem*) - NewFormBase - accept() - - - - templateView - helpButton - buttonOk - buttonCancel - - - itemChanged( TQIconViewItem * ) - projectChanged( const TQString & ) - - - diff --git a/tdevdesigner/designer/newformimpl.cpp b/tdevdesigner/designer/newformimpl.cpp deleted file mode 100644 index b5cc7c58..00000000 --- a/tdevdesigner/designer/newformimpl.cpp +++ /dev/null @@ -1,414 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "newformimpl.h" -#include "mainwindow.h" -#include "metadatabase.h" -#include "project.h" -#include "formwindow.h" -#include "widgetfactory.h" -#include "widgetdatabase.h" -#include "actioneditorimpl.h" -#include "hierarchyview.h" -#include "resource.h" -#include "projectsettingsimpl.h" -#include "sourcefile.h" - -#include -#include "tdevdesigner_part.h" -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static int forms = 0; - -ProjectItem::ProjectItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ) -{ -} - -void ProjectItem::insert( Project * ) -{ - MainWindow::self->createNewProject( lang ); -} - - - -FormItem::FormItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ) -{ -} - -void FormItem::insert( Project *pro ) -{ - TQString n = "Form" + TQString::number( ++forms ); - FormWindow *fw = 0; - FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro ); - fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); - fw->setProject( pro ); - MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); - if ( fType == Widget ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), - fw, n.latin1() ); - fw->setMainContainer( w ); - } else if ( fType == Dialog ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); - fw->setMainContainer( w ); - } else if ( fType == Wizard ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIZARD_OBJECT_NAME_STRING ), - fw, n.latin1() ); - fw->setMainContainer( w ); - } else if ( fType == MainWindow ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQMAINWINDOW_OBJECT_NAME_STRING ), - fw, n.latin1() ); - fw->setMainContainer( w ); - } - - fw->setCaption( n ); - fw->resize( 600, 480 ); - MainWindow::self->insertFormWindow( fw ); - - TemplateWizardInterface *iface = - MainWindow::self->templateWizardInterface( fw->mainContainer()->className() ); - if ( iface ) { - iface->setup( fw->mainContainer()->className(), fw->mainContainer(), - fw->iFace(), MainWindow::self->designerInterface() ); - iface->release(); - } - - // the wizard might have changed a lot, lets update everything - MainWindow::self->actioneditor()->setFormWindow( fw ); - MainWindow::self->objectHierarchy()->setFormWindow( fw, TQT_TQOBJECT(fw) ); - MainWindow::self->objectHierarchy()->formDefinitionView()->refresh(); - MainWindow::self->objectHierarchy()->rebuild(); - fw->killAccels( TQT_TQOBJECT(fw) ); - fw->project()->setModified( TRUE ); - fw->setFocus(); - if ( !pro->isDummy() ) { - fw->setSavePixmapInProject( TRUE ); - fw->setSavePixmapInline( FALSE ); - } -} - - - -CustomFormItem::CustomFormItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ) -{ -} - -static void unifyFormName( FormWindow *fw, TQWorkspace *qworkspace ) -{ - TQStringList lst; - TQWidgetList windows = qworkspace->windowList(); - for ( TQWidget *w =windows.first(); w; w = windows.next() ) { - if ( w == fw ) - continue; - lst << w->name(); - } - - if ( lst.findIndex( fw->name() ) == -1 ) - return; - TQString origName = fw->name(); - TQString n = origName; - int i = 1; - while ( lst.findIndex( n ) != -1 ) { - n = origName + TQString::number( i++ ); - } - fw->setName( n ); - fw->setCaption( n ); -} - -void CustomFormItem::insert( Project *pro ) -{ - TQString filename = templateFileName(); - if ( !filename.isEmpty() && TQFile::exists( filename ) ) { - Resource resource( MainWindow::self ); - FormFile *ff = new FormFile( filename, TRUE, pro ); - if ( !resource.load( ff ) ) { - TQMessageBox::information( MainWindow::self, i18n("Load Template"), - i18n("Could not load form description from template '%1'" ).arg( filename ) ); - delete ff; - return; - } - ff->setFileName( TQString() ); - if ( MainWindow::self->formWindow() ) { - MainWindow::self->formWindow()->setFileName( TQString() ); - unifyFormName( MainWindow::self->formWindow(), MainWindow::self->qWorkspace() ); - if ( !pro->isDummy() ) { - MainWindow::self->formWindow()->setSavePixmapInProject( TRUE ); - MainWindow::self->formWindow()->setSavePixmapInline( FALSE ); - } - } - } -} - - - -SourceFileItem::SourceFileItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ), visible( TRUE ) -{ -} - -void SourceFileItem::insert( Project *pro ) -{ - SourceFile *f = new SourceFile( SourceFile::createUnnamedFileName( ext ), TRUE, pro ); - MainWindow::self->editSource( f ); -} - -void SourceFileItem::setProject( Project *pro ) -{ - TQIconView *iv = iconView(); - bool v = lang == pro->language(); - if ( !iv || v == visible ) - return; - visible = v; - if ( !visible ) - iv->takeItem( this ); - else - iv->insertItem( this ); -} - - - -SourceTemplateItem::SourceTemplateItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ), visible( TRUE ) -{ -} - -void SourceTemplateItem::insert( Project *pro ) -{ - SourceTemplateInterface *siface = MainWindow::self->sourceTemplateInterface( text() ); - if ( !siface ) - return; - SourceTemplateInterface::Source src = siface->create( text(), MainWindow::self->designerInterface() ); - SourceFile *f = 0; - if ( src.type == SourceTemplateInterface::Source::Invalid ) - return; - if ( src.type == SourceTemplateInterface::Source::FileName ) - f = new SourceFile( src.filename, FALSE, pro ); - else - f = new SourceFile( SourceFile::createUnnamedFileName( src.extension ), TRUE, pro ); - if ( f->isAccepted()) { - f->setText( src.code ); - MainWindow::self->editSource( f ); - f->setModified( TRUE ); - } else { - delete f; - } -} - -void SourceTemplateItem::setProject( Project *pro ) -{ - TQIconView *iv = iconView(); - bool v = !pro->isDummy() && lang == pro->language(); - if ( !iv || v == visible ) - return; - visible = v; - if ( !visible ) - iv->takeItem( this ); - else - iv->insertItem( this ); -} - -void NewForm::insertTemplates( TQIconView *tView, - const TQString &templatePath ) -{ - TQStringList::Iterator it; - TQStringList languages = MetaDataBase::languages(); - if ( !MainWindow::self->singleProjectMode() ) { - for ( it = languages.begin(); it != languages.end(); ++it ) { - ProjectItem *pi = new ProjectItem( tView, i18n("%1 Project" ).arg( *it ) ); - allItems.append( pi ); - pi->setLanguage( *it ); - pi->setPixmap( BarIcon( "designer_project.png" , TDevDesignerPartFactory::instance()) ); - pi->setDragEnabled( FALSE ); - } - } - TQIconViewItem *cur = 0; - FormItem *fi = new FormItem( tView,i18n( "Dialog" ) ); - allItems.append( fi ); - fi->setFormType( FormItem::Dialog ); - fi->setPixmap( BarIcon( "designer_newform.png" , TDevDesignerPartFactory::instance()) ); - fi->setDragEnabled( FALSE ); - cur = fi; - if ( !MainWindow::self->singleProjectMode() ) { - fi = new FormItem( tView,i18n( "Wizard" ) ); - allItems.append( fi ); - fi->setFormType( FormItem::Wizard ); - fi->setPixmap( BarIcon( "designer_newform.png" , TDevDesignerPartFactory::instance()) ); - fi->setDragEnabled( FALSE ); - fi = new FormItem( tView, i18n( "Widget" ) ); - allItems.append( fi ); - fi->setFormType( FormItem::Widget ); - fi->setPixmap( BarIcon( "designer_newform.png" , TDevDesignerPartFactory::instance()) ); - fi->setDragEnabled( FALSE ); - fi = new FormItem( tView, i18n( "Main Window" ) ); - allItems.append( fi ); - fi->setFormType( FormItem::MainWindow ); - fi->setPixmap( BarIcon( "designer_newform.png" , TDevDesignerPartFactory::instance()) ); - fi->setDragEnabled( FALSE ); - - TQString templPath = templatePath; - TQStringList templRoots; - const char *qtdir = getenv( "QTDIR" ); - if(qtdir) - templRoots << qtdir; - templRoots << tqInstallPathData(); - if(qtdir) //try the tools/designer directory last! - templRoots << (TQString(qtdir) + "/tools/designer"); - for ( TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) { - TQString path = (*it) + "/templates"; - if ( TQFile::exists( path )) { - templPath = path; - break; - } - } - if ( !templPath.isEmpty() ) { - TQDir dir( templPath ); - const TQFileInfoList *filist = dir.entryInfoList( TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name ); - if ( filist ) { - TQFileInfoListIterator it( *filist ); - TQFileInfo *fi; - while ( ( fi = it.current() ) != 0 ) { - ++it; - if ( !fi->isFile() || fi->extension() != "ui" ) - continue; - TQString name = fi->baseName(); - name = name.replace( '_', ' ' ); - CustomFormItem *ci = new CustomFormItem( tView, name ); - allItems.append( ci ); - ci->setDragEnabled( FALSE ); - ci->setPixmap( BarIcon( "designer_newform.png" , TDevDesignerPartFactory::instance()) ); - ci->setTemplateFile( fi->absFilePath() ); - } - } - } - } - - for ( it = languages.begin(); it != languages.end(); ++it ) { - LanguageInterface *iface = MetaDataBase::languageInterface( *it ); - if ( iface ) { - TQMap extensionMap; - iface->preferedExtensions( extensionMap ); - for ( TQMap::Iterator eit = extensionMap.begin(); - eit != extensionMap.end(); ++eit ) { - SourceFileItem * si = new SourceFileItem( tView, *eit ); - allItems.append( si ); - si->setExtension( eit.key() ); - si->setLanguage( *it ); - si->setPixmap( BarIcon( "designer_filenew.png", TDevDesignerPartFactory::instance() ) ); - si->setDragEnabled( FALSE ); - } - iface->release(); - } - } - - if ( !MainWindow::self->singleProjectMode() ) { - TQStringList sourceTemplates = MainWindow::self->sourceTemplates(); - for ( TQStringList::Iterator sit = sourceTemplates.begin(); sit != sourceTemplates.end(); ++sit ) { - SourceTemplateInterface *siface = MainWindow::self->sourceTemplateInterface( *sit ); - if ( !siface ) - continue; - SourceTemplateItem * si = new SourceTemplateItem( tView, *sit ); - allItems.append( si ); - si->setTemplate( *sit ); - si->setLanguage( siface->language( *sit ) ); - si->setPixmap( BarIcon( "designer_filenew.png", TDevDesignerPartFactory::instance() ) ); - si->setDragEnabled( FALSE ); - siface->release(); - } - } - - tView->viewport()->setFocus(); - tView->setCurrentItem( cur ); - - if ( MainWindow::self->singleProjectMode() ) - adjustSize(); -} - -NewForm::NewForm( TQIconView *templateView, const TQString &templatePath ) -{ - insertTemplates( templateView, templatePath ); - projectChanged( i18n( "" ) ); -} - -NewForm::NewForm( TQWidget *parent, const TQStringList& projects, - const TQString& currentProject, const TQString &templatePath ) - : NewFormBase( parent, 0, TRUE ) -{ - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - - projectCombo->insertStringList( projects ); - projectCombo->setCurrentText( currentProject ); - - insertTemplates( templateView, templatePath ); - - projectChanged( projectCombo->currentText() ); -} - -void NewForm::accept() -{ - if ( !templateView->currentItem() ) - return; - Project *pro = MainWindow::self->findProject( projectCombo->currentText() ); - if ( !pro ) - return; - MainWindow::self->setCurrentProject( pro ); - NewFormBase::accept(); - ( (NewItem*)templateView->currentItem() )->insert( pro ); -} - -void NewForm::projectChanged( const TQString &project ) -{ - Project *pro = MainWindow::self->findProject( project ); - if ( !pro ) - return; - TQIconViewItem *i; - for ( i = allItems.first(); i; i = allItems.next() ) - ( (NewItem*)i )->setProject( pro ); - templateView->setCurrentItem( templateView->firstItem() ); - templateView->arrangeItemsInGrid( TRUE ); -} - -void NewForm::itemChanged( TQIconViewItem *item ) -{ - labelProject->setEnabled( item->rtti() != NewItem::ProjectType ); - projectCombo->setEnabled( item->rtti() != NewItem::ProjectType ); -} - -TQPtrList NewForm::allViewItems() -{ - return allItems; -} diff --git a/tdevdesigner/designer/newformimpl.h b/tdevdesigner/designer/newformimpl.h deleted file mode 100644 index 863f5b9d..00000000 --- a/tdevdesigner/designer/newformimpl.h +++ /dev/null @@ -1,165 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef NEWFORMIMPL_H -#define NEWFORMIMPL_H - -#include "newform.h" -#include - -class Project; - -class NewItem : public TQIconViewItem -{ -public: - enum Type { - ProjectType, - Form, - CustomForm, - SourceFileType, - SourceTemplateType - }; - - NewItem( TQIconView *view, const TQString &text ) - : TQIconViewItem( view, text ) {} - virtual void insert( Project *pro ) = 0; - virtual void setProject( Project * ) {} - -}; - -class ProjectItem : public NewItem -{ -public: - ProjectItem( TQIconView *view, const TQString &text ); - void insert( Project *pro ); - int rtti() const { return (int)ProjectType; } - - void setLanguage( const TQString &l ) { lang = l; } - TQString language() const { return lang; } - -private: - TQString lang; - -}; - -class FormItem : public NewItem -{ -public: - enum FormType { - Widget, - Dialog, - Wizard, - MainWindow - }; - - FormItem( TQIconView *view, const TQString &text ); - void insert( Project *pro ); - int rtti() const { return (int)Form; } - - void setFormType( FormType ft ) { fType = ft; } - FormType formType() const { return fType; } - -private: - FormType fType; - -}; - -class CustomFormItem : public NewItem -{ -public: - CustomFormItem( TQIconView *view, const TQString &text ); - void insert( Project *pro ); - int rtti() const { return (int)CustomForm; } - - void setTemplateFile( const TQString &tf ) { templFile = tf; } - TQString templateFileName() const { return templFile; } - -private: - TQString templFile; - -}; - -class SourceFileItem : public NewItem -{ -public: - SourceFileItem( TQIconView *view, const TQString &text ); - void insert( Project *pro ); - int rtti() const { return (int)SourceFileType; } - - void setExtension( const TQString &e ) { ext = e; } - TQString extension() const { return ext; } - void setLanguage( const TQString &l ) { lang = l; } - void setProject( Project *pro ); - -private: - TQString ext; - TQString lang; - bool visible; - -}; - -class SourceTemplateItem : public NewItem -{ -public: - SourceTemplateItem( TQIconView *view, const TQString &text ); - void insert( Project *pro ); - int rtti() const { return (int)SourceTemplateType; } - - void setTemplate( const TQString &t ) { templ = t; } - TQString tenplate() const { return templ; } - void setLanguage( const TQString &l ) { lang = l; } - void setProject( Project *pro ); - -private: - TQString templ; - TQString lang; - bool visible; - -}; - -class NewForm : public NewFormBase -{ - Q_OBJECT - - -public: - NewForm( TQIconView *templateView, const TQString &templatePath ); - NewForm( TQWidget *parent, const TQStringList& projects, - const TQString& currentProject, const TQString &templatePath ); - void insertTemplates( TQIconView*, const TQString& ); - void accept(); - TQPtrList allViewItems(); - -protected slots: - void projectChanged( const TQString &project ); - void itemChanged( TQIconViewItem *item ); - -private: - TQPtrList allItems; - -}; - -#endif diff --git a/tdevdesigner/designer/orderindicator.cpp b/tdevdesigner/designer/orderindicator.cpp deleted file mode 100644 index 2904cfbf..00000000 --- a/tdevdesigner/designer/orderindicator.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include // HP-UX compiler need this here - -#include "orderindicator.h" -#include "formwindow.h" - -#include -#include -#include - -OrderIndicator::OrderIndicator( int i, TQWidget* w, FormWindow *fw ) - : TQWidget( fw, "order_indicator", WMouseNoMask ), formWindow( fw ) -{ - order = -1; - widget = w; - setBackgroundMode( NoBackground ); - setAutoMask( TRUE ); - setOrder( i, w ); -} - - -OrderIndicator::~OrderIndicator() -{ -} - - -void OrderIndicator::setOrder( int i, TQWidget* wid ) -{ - if ( widget != wid ) - return; - if ( !wid->isVisibleTo( formWindow ) ) { - hide(); - return; - } - - if ( order == i ) { - show(); - raise(); - return; - } - order = i; - int w = fontMetrics().width( TQString::number( i ) ) + 10; - int h = fontMetrics().lineSpacing() * 3 / 2; - TQFont f( font() ); - f.setBold( TRUE ); - setFont( f ); - resize( TQMAX( w, h ), h ); - update(); // in case the size didn't change - reposition(); - show(); - raise(); -} - -void OrderIndicator::reposition() -{ - TQPoint p =parentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) ); - move( p - TQPoint( width()/3, height()/3 ) ); -} - - -void OrderIndicator::paintEvent( TQPaintEvent * ) -{ - TQPainter p( this ); - p.setPen( white ); - p.setBrush( blue ); - p.drawEllipse( rect() ); - p.drawText( rect(), AlignCenter, TQString::number( order ) ); -} - - -void OrderIndicator::updateMask() -{ - TQBitmap bm( size() ); - bm.fill( color0 ); - { - TQPainter p( &bm, this ); - p.setPen( color1 ); - p.setBrush( color1 ); - p.drawEllipse( rect() ); - } - setMask( bm ); -} - -void OrderIndicator::mousePressEvent( TQMouseEvent *e ) -{ - TQApplication::sendEvent( widget, e ); -} diff --git a/tdevdesigner/designer/orderindicator.h b/tdevdesigner/designer/orderindicator.h deleted file mode 100644 index 33e486d4..00000000 --- a/tdevdesigner/designer/orderindicator.h +++ /dev/null @@ -1,58 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef ORDERINDICATOR_H -#define ORDERINDICATOR_H - -#include - -class FormWindow; - -class OrderIndicator : public TQWidget -{ - Q_OBJECT - - -public: - OrderIndicator( int i, TQWidget* w, FormWindow* fw ); - ~OrderIndicator(); - - void setOrder( int i, TQWidget* w ); - void reposition(); - -protected: - void paintEvent( TQPaintEvent * ); - void mousePressEvent( TQMouseEvent *e ); - void updateMask(); - -private: - int order; - TQWidget* widget; - FormWindow *formWindow; - -}; - -#endif diff --git a/tdevdesigner/designer/outputwindow.cpp b/tdevdesigner/designer/outputwindow.cpp deleted file mode 100644 index a23c14a7..00000000 --- a/tdevdesigner/designer/outputwindow.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/********************************************************************** -** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "outputwindow.h" -#include "designerappiface.h" -#include "metadatabase.h" -#include "mainwindow.h" - -#include -#include -#include -#include -#include -#include -#include - -#include - -static TQTextEdit *debugoutput = 0; -bool debugToStderr = FALSE; - -TQtMsgHandler OutputWindow::oldMsgHandler = 0; - -OutputWindow::OutputWindow( TQWidget *parent ) - : TQTabWidget( parent, "output_window" ), debugView( 0 ), errorView( 0 ) -{ - setupDebug(); - setupError(); - iface = new DesignerOutputDockImpl( this ); -} - -OutputWindow::~OutputWindow() -{ - debugoutput = debugView = 0; - errorView = 0; - if ( !debugToStderr ) - tqInstallMsgHandler( oldMsgHandler ); - delete iface; -} - -void OutputWindow::shuttingDown() -{ - if ( !debugToStderr ) - tqInstallMsgHandler( oldMsgHandler ); -} - -void OutputWindow::setupError() -{ - errorView = new TQListView( this, "OutputWindow::errorView" ); - errorView->setSorting( -1 ); - connect( errorView, TQT_SIGNAL( currentChanged( TQListViewItem* ) ), - this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) ); - connect( errorView, TQT_SIGNAL( clicked( TQListViewItem* ) ), - this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) ); - - if ( MetaDataBase::languages().count() > 1 ) - addTab( errorView, i18n( "Warnings/Errors" ) ); - else - errorView->hide(); - errorView->addColumn( i18n( "Type" ) ); - errorView->addColumn( i18n( "Message" ) ); - errorView->addColumn( i18n( "Line" ) ); - errorView->addColumn( i18n( "Location" ) ); - errorView->setResizeMode( TQListView::LastColumn ); - errorView->setColumnWidth( 0, errorView->fontMetrics().width( "WARNING1234" ) ); - errorView->setColumnWidth( 1, errorView->fontMetrics().width( "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP" ) ); - errorView->setColumnWidth( 2, errorView->fontMetrics().width( "9999999" ) ); - errorView->setColumnAlignment( 2, TQt::AlignRight ); - errorView->setAllColumnsShowFocus( TRUE ); -} - -static void debugMessageOutput( TQtMsgType type, const char *msg ) -{ - TQString s( msg ); - s += "\n"; - - if ( type != TQtFatalMsg ) { - if ( debugoutput && debugoutput->isVisible() ) - debugoutput->append( s ); - else if ( OutputWindow::oldMsgHandler && OutputWindow::oldMsgHandler != debugMessageOutput ) - (*OutputWindow::oldMsgHandler)( type, msg ); - else - fputs( s.latin1(), stderr ); - } else { - fputs( s.latin1(), stderr ); - abort(); - } - - tqApp->flush(); -} - -void OutputWindow::setupDebug() -{ - debugoutput = debugView = new TQTextEdit( this, "OutputWindow::debugView" ); - //debugView->setReadOnly( TRUE ); - addTab( debugView, "Debug Output" ); - - if ( !debugToStderr ) - oldMsgHandler = tqInstallMsgHandler( debugMessageOutput ); -} - -void OutputWindow::setErrorMessages( const TQStringList &errors, const TQValueList &lines, - bool clear, const TQStringList &locations, - const TQObjectList &locationObjects ) -{ - if ( clear ) - errorView->clear(); - TQStringList::ConstIterator mit = errors.begin(); - TQValueList::ConstIterator lit = lines.begin(); - TQStringList::ConstIterator it = locations.begin(); - TQObjectList objects = (TQObjectList)locationObjects; - TQObject *o = objects.first(); - TQListViewItem *after = 0; - for ( ; lit != lines.end() && mit != errors.end(); ++lit, ++mit, ++it, o = objects.next() ) - after = new ErrorItem( errorView, after, *mit, *lit, *it, o ); - setCurrentPage( 1 ); -} - -DesignerOutputDock *OutputWindow::iFace() -{ - return iface; -} - -void OutputWindow::appendDebug( const TQString &text ) -{ - debugView->append( text + "\n" ); -} - -void OutputWindow::clearErrorMessages() -{ - errorView->clear(); -} - -void OutputWindow::clearDebug() -{ - debugView->clear(); -} - -void OutputWindow::showDebugTab() -{ - showPage( debugView ); -} - -void OutputWindow::currentErrorChanged( TQListViewItem *i ) -{ - if ( !i ) - return; - ErrorItem *ei = (ErrorItem*)i; - ei->setRead( TRUE ); - MainWindow::self->showSourceLine( ei->location(), ei->line() - 1, MainWindow::Error ); -} - - - -ErrorItem::ErrorItem( TQListView *parent, TQListViewItem *after, const TQString &message, int line, - const TQString &locationString, TQObject *locationObject ) - : TQListViewItem( parent, after ) -{ - setMultiLinesEnabled( TRUE ); - TQString m( message ); - type = m.startsWith( "Warning: " ) ? Warning : Error; - m = m.mid( m.find( ':' ) + 1 ); - setText( 0, type == Error ? "Error" : "Warning" ); - setText( 1, m ); - setText( 2, TQString::number( line ) ); - setText( 3, locationString ); - object = locationObject; - read = !after; - if ( !after ) { - parent->setSelected( this, TRUE ); - parent->setCurrentItem( this ); - } -} - -void ErrorItem::paintCell( TQPainter *p, const TQColorGroup & cg, - int column, int width, int alignment ) -{ - TQColorGroup g( cg ); - g.setColor( TQColorGroup::Text, type == Error ? TQt::red : TQt::darkYellow ); - if ( !read ) { - TQFont f( p->font() ); - f.setBold( TRUE ); - p->setFont( f ); - } - TQListViewItem::paintCell( p, g, column, width, alignment ); -} diff --git a/tdevdesigner/designer/outputwindow.h b/tdevdesigner/designer/outputwindow.h deleted file mode 100644 index 79b3e79a..00000000 --- a/tdevdesigner/designer/outputwindow.h +++ /dev/null @@ -1,99 +0,0 @@ -/********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef OUTPUTWINDOW_H -#define OUTPUTWINDOW_H - -#include -#include -#include -#include - -struct DesignerOutputDock; -class TQTextEdit; -class TQListView; - -class ErrorItem : public TQListViewItem -{ -public: - enum Type { Error, Warning }; - - ErrorItem( TQListView *parent, TQListViewItem *after, const TQString &message, int line, - const TQString &locationString, TQObject *locationObject ); - - void paintCell( TQPainter *, const TQColorGroup & cg, - int column, int width, int alignment ); - - void setRead( bool b ) { read = b; repaint(); } - - TQObject *location() const { return object; } - int line() const { return text( 2 ).toInt(); } - -private: - TQObject *object; - Type type; - bool read; - -}; - -class OutputWindow : public TQTabWidget -{ - Q_OBJECT - - -public: - OutputWindow( TQWidget *parent ); - ~OutputWindow(); - - void setErrorMessages( const TQStringList &errors, const TQValueList &lines, - bool clear, const TQStringList &locations, - const TQObjectList &locationObjects ); - void appendDebug( const TQString& ); - void clearErrorMessages(); - void clearDebug(); - void showDebugTab(); - - DesignerOutputDock *iFace(); - - void shuttingDown(); - - static TQtMsgHandler oldMsgHandler; - -private slots: - void currentErrorChanged( TQListViewItem *i ); - -private: - void setupError(); - void setupDebug(); - - TQTextEdit *debugView; - TQListView *errorView; - - DesignerOutputDock *iface; - -}; - -#endif diff --git a/tdevdesigner/designer/paletteeditor.ui b/tdevdesigner/designer/paletteeditor.ui deleted file mode 100644 index 32b14b54..00000000 --- a/tdevdesigner/designer/paletteeditor.ui +++ /dev/null @@ -1,496 +0,0 @@ - -PaletteEditorBase -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - PaletteEditorBase - - - - 0 - 0 - 449 - 443 - - - - - 7 - 7 - - - - Edit Palette - - - - unnamed - - - 11 - - - 6 - - - - groupAutoPalette - - - - 5 - 4 - - - - Build Palette - - - AlignAuto - - - - unnamed - - - 11 - - - 6 - - - - labelMainColor - - - - 1 - 1 - - - - - 50 - 0 - - - - 1 - - - 0 - - - 0 - - - &3-D effects: - - - AlignAuto|AlignVCenter - - - buttonMainColor - - - - - buttonMainColor - - - - 0 - 0 - - - - StrongFocus - - - false - - - Choose a color - - - Choose the effect-color for the generated palette. - - - - - labelMainColor2 - - - - 1 - 1 - - - - - 50 - 0 - - - - 1 - - - 0 - - - 0 - - - Back&ground: - - - AlignAuto|AlignVCenter - - - buttonMainColor2 - - - - - buttonMainColor2 - - - - 0 - 0 - - - - StrongFocus - - - false - - - Choose a color - - - Choose the background color for the generated palette. - - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - btnAdvanced - - - &Tune Palette... - - - - - - - GroupBox126 - - - - 5 - 7 - - - - Preview - - - - unnamed - - - 11 - - - 6 - - - - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - TextLabel1 - - - Select &palette: - - - paletteCombo - - - - - - Active Palette - - - - - Inactive Palette - - - - - Disabled Palette - - - - paletteCombo - - - - - - - previewFrame - - - - 7 - 7 - - - - - - - - Layout3 - - - - unnamed - - - 0 - - - 6 - - - - buttonHelp - - - &Help - - - true - - - - - Horizontal Spacing11 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - Close the dialog and apply all the changes. - - - - - buttonCancel - - - &Cancel - - - true - - - Close the dialog and discard any changes. - - - - - - - - - StyledButton -
    styledbutton.h
    - - 40 - 25 - - 0 - - 5 - 5 - - "image0" - clicked() - changed() - color - pixmap - scale -
    - - PreviewFrame -
    previewframe.h
    - - 200 - 200 - - 0 - - 5 - 5 - - "image1" -
    -
    - - - 789c9dd2cb8e9b301406e07d9e0225bba89a09601350d505302c5b7559a9eac23e6672b363620c0ca9faeef53949da2e2a55eab123f9e38f2f217e5e475f3e7f8cd6cf8bde0b7f8008f6c2456b3518337ffdf6e1fb62992451e8691ac5cb778be55304d1277b6e71fc12c6ab0d157222e61bd8e4c812196f6216535a13f318624a6764b2495842e99558249014c81e99c6294b69d3376291424ae9806431638cd28628183081f4489e70ce13e4852878c129ad905992f18cd291283295517a466ed32ddfa64847945bb595c80e99a739cf29d54499ab9c528b2c58c10b86344428540148400a26b8a0541241b482d215523299494a0551c9562ae409091c32e0c82351410b942aa4e22a53941e882d36e41ed966d8903b2215f215f99a6143b6442afaafff5aff485658622584a091941256948443d1cabbdd6ebf3f28753c09a9e9cdc1fe703c9e4ea19f689a0430fa4c8908082be093d08d016bbb0bbd5e7ceafade5b30de19d083b3fa9e008cd39b9fafd69495b473af7fcfb15325c1d61eea0afaf005ddf97b5295c658a866338f97591babef7340fa396c6c5ca9e7fe650807d0bf566b4262299986ba335a3b4a2cc84b69ac85b1b673037d8fabf95b023a9c09cc7530e104dd5419ed6e27083fb09a7c752db5a9bd31cde4ec634ed8a39aebbe337618c3f6fdc5dee6d8b0bb0d6b5b8b1fad43d78fe4e14e3f6aace8e29d9d736777fea3c686eee0138c9726d4d00c548df7a315ff750f7ebc5ffc04a0e5308d - - - 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 - - - - - buttonMainColor2 - clicked() - PaletteEditorBase - onChoose2ndMainColor() - - - paletteCombo - activated(int) - PaletteEditorBase - paletteSelected(int) - - - btnAdvanced - clicked() - PaletteEditorBase - onTune() - - - buttonOk - clicked() - PaletteEditorBase - accept() - - - buttonCancel - clicked() - PaletteEditorBase - reject() - - - buttonMainColor - changed() - PaletteEditorBase - onChooseMainColor() - - - buttonMainColor - clicked() - PaletteEditorBase - onChooseMainColor() - - - buttonMainColor2 - changed() - PaletteEditorBase - onChoose2ndMainColor() - - init() - destroy() - onTune() - onChoose2ndMainColor() - onChooseMainColor() - paletteSelected(int) - - - buttonOk - buttonCancel - buttonMainColor - buttonMainColor2 - btnAdvanced - paletteCombo - buttonHelp - -
    diff --git a/tdevdesigner/designer/paletteeditoradvanced.ui b/tdevdesigner/designer/paletteeditoradvanced.ui deleted file mode 100644 index 579f0e68..00000000 --- a/tdevdesigner/designer/paletteeditoradvanced.ui +++ /dev/null @@ -1,748 +0,0 @@ - -PaletteEditorAdvancedBase -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - PaletteEditorAdvancedBase - - - true - - - - 0 - 0 - 327 - 341 - - - - Tune Palette - - - true - - - <b>Edit Palette</b><p>Change the current widget or form's palette.</p><p>Use a generated palette or select colors for each color group and each color role.</p><p>The palette can be tested with different widget layouts in the preview section.</p> - - - - unnamed - - - 11 - - - 6 - - - - Layout14 - - - - unnamed - - - 0 - - - 6 - - - - TextLabel1 - - - MShape - - - MShadow - - - Select &palette: - - - paletteCombo - - - - - - Active Palette - - - - - Inactive Palette - - - - - Disabled Palette - - - - paletteCombo - - - - - - - ButtonGroup1 - - - - 5 - 4 - - - - Auto - - - - unnamed - - - 11 - - - 6 - - - - checkBuildInactive - - - Build the &inactive palette from the active palette - - - true - - - - - checkBuildDisabled - - - Build the &disabled palette from the active palette - - - true - - - - - - - groupCentral - - - Central Color Roles - - - - unnamed - - - 11 - - - 6 - - - - - Background - - - - - Foreground - - - - - Button - - - - - Base - - - - - Text - - - - - BrightText - - - - - ButtonText - - - - - Highlight - - - - - HighlightText - - - - - Link - - - - - LinkVisited - - - - comboCentral - - - Choose the central color role - - - <b>Select a color role.</b><p>Available central color roles are: <ul> <li>Background - general background color.</li> <li>Foreground - general foreground color. </li> <li>Base - used as the background color for example, for text entry widgets; it is usually white or another light color. </li> <li>Text - the forground color used with Base. Usually this is the same as the Foreground, in which case it must provide good contrast both with the Background and with the Base. </li> <li>Button - general button background color; useful where buttons need a background different from Background, as in the Macintosh style. </li> <li>ButtonText - a foreground color used with the Button color. </li> <li>Highlight - a color used to indicate a selected or highlighted item. </li> <li>HighlightedText - a text color that contrasts to Highlight. </li> <li>BrightText - a text color that is very different from Foreground and contrasts well with, for example, black. </li> </ul> </p> - - - - - Layout32_2 - - - - unnamed - - - 0 - - - 6 - - - - Horizontal_Spacing1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - labelPixmap - - - - 1 - 1 - - - - Choose pi&xmap: - - - buttonPixmap - - - - - buttonPixmap - - - - 0 - 0 - - - - TabFocus - - - true - - - Select a pixmap - - - Choose a pixmap file for the selected central color role. - - - - - labelCentral - - - - 1 - 1 - - - - - 0 - 0 - - - - &Select color: - - - buttonCentral - - - - - buttonCentral - - - - 0 - 0 - - - - TabFocus - - - false - - - Choose a color - - - Choose a color for the selected central color role. - - - - - - - - - groupEffect - - - 3-D Shadow Effects - - - - unnamed - - - 11 - - - 6 - - - - Layout32_3 - - - - unnamed - - - 0 - - - 6 - - - - checkBuildEffect - - - Build &from button color: - - - true - - - Generate shadings - - - Check to let 3D-effect colors be calculated from the button-color. - - - - - - Light - - - - - Midlight - - - - - Mid - - - - - Dark - - - - - Shadow - - - - comboEffect - - - Choose 3D-effect color role - - - <b>Select a color effect role.</b><p>Available effect roles are: <ul> <li>Light - lighter than Button color. </li> <li>Midlight - between Button and Light. </li> <li>Mid - between Button and Dark. </li> <li>Dark - darker than Button. </li> <li>Shadow - a very dark color. </li> </ul> - - - - - - - Layout31_2 - - - - unnamed - - - 0 - - - 6 - - - - Horizontal_Spacing3 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - labelEffect - - - - 1 - 1 - - - - - 0 - 0 - - - - Select co&lor: - - - buttonEffect - - - - - buttonEffect - - - - 0 - 0 - - - - TabFocus - - - false - - - Choose a color - - - Choose a color for the selected effect color role. - - - - - - - - - Layout3 - - - - unnamed - - - 0 - - - 6 - - - - buttonHelp - - - &Help - - - true - - - - - Horizontal_Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - Close the dialog and apply all the changes. - - - - - buttonCancel - - - &Cancel - - - true - - - Close the dialog and discard any changes. - - - - - - - - - StyledButton -
    styledbutton.h
    - - 40 - 25 - - 0 - - 5 - 5 - - "image0" - clicked() - changed() - color - pixmap - scale -
    -
    - - - 789c9dd2cb8e9b301406e07d9e0225bba89a09601350d505302c5b7559a9eac23e6672b363620c0ca9faeef53949da2e2a55eab123f9e38f2f217e5e475f3e7f8cd6cf8bde0b7f8008f6c2456b3518337ffdf6e1fb62992451e8691ac5cb778be55304d1277b6e71fc12c6ab0d157222e61bd8e4c812196f6216535a13f318624a6764b2495842e99558249014c81e99c6294b69d3376291424ae9806431638cd28628183081f4489e70ce13e4852878c129ad905992f18cd291283295517a466ed32ddfa64847945bb595c80e99a739cf29d54499ab9c528b2c58c10b86344428540148400a26b8a0541241b482d215523299494a0551c9562ae409091c32e0c82351410b942aa4e22a53941e882d36e41ed966d8903b2215f215f99a6143b6442afaafff5aff485658622584a091941256948443d1cabbdd6ebf3f28753c09a9e9cdc1fe703c9e4ea19f689a0430fa4c8908082be093d08d016bbb0bbd5e7ceafade5b30de19d083b3fa9e008cd39b9fafd69495b473af7fcfb15325c1d61eea0afaf005ddf97b5295c658a866338f97591babef7340fa396c6c5ca9e7fe650807d0bf566b4262299986ba335a3b4a2cc84b69ac85b1b673037d8fabf95b023a9c09cc7530e104dd5419ed6e27083fb09a7c752db5a9bd31cde4ec634ed8a39aebbe337618c3f6fdc5dee6d8b0bb0d6b5b8b1fad43d78fe4e14e3f6aace8e29d9d736777fea3c686eee0138c9726d4d00c548df7a315ff750f7ebc5ffc04a0e5308d - - - - - buttonOk - clicked() - PaletteEditorAdvancedBase - accept() - - - buttonCancel - clicked() - PaletteEditorAdvancedBase - reject() - - - paletteCombo - activated(int) - PaletteEditorAdvancedBase - paletteSelected(int) - - - comboCentral - activated(int) - PaletteEditorAdvancedBase - onCentral(int) - - - buttonPixmap - clicked() - PaletteEditorAdvancedBase - onChoosePixmap() - - - buttonCentral - clicked() - PaletteEditorAdvancedBase - onChooseCentralColor() - - - buttonEffect - clicked() - PaletteEditorAdvancedBase - onChooseEffectColor() - - - comboEffect - activated(int) - PaletteEditorAdvancedBase - onEffect(int) - - - checkBuildEffect - toggled(bool) - PaletteEditorAdvancedBase - onToggleBuildEffects(bool) - - - buttonHelp - clicked() - PaletteEditorAdvancedBase - showHelp() - - - checkBuildEffect - toggled(bool) - comboEffect - setDisabled(bool) - - - checkBuildEffect - toggled(bool) - buttonEffect - setDisabled(bool) - - - checkBuildInactive - toggled(bool) - PaletteEditorAdvancedBase - onToggleBuildInactive(bool) - - - checkBuildDisabled - toggled(bool) - PaletteEditorAdvancedBase - onToggleBuildDisabled(bool) - - init() - destroy() - onToggleBuildDisabled(bool) - onCentral(int) - onChooseCentralColor() - onChooseEffectColor() - onChoosePixmap() - onEffect(int) - onToggleBuildEffects(bool) - onToggleBuildInactive(bool) - paletteSelected(int) - showHelp() - - - buttonOk - buttonCancel - paletteCombo - checkBuildInactive - checkBuildDisabled - comboCentral - buttonPixmap - buttonCentral - checkBuildEffect - comboEffect - buttonEffect - buttonHelp - -
    diff --git a/tdevdesigner/designer/paletteeditoradvancedimpl.cpp b/tdevdesigner/designer/paletteeditoradvancedimpl.cpp deleted file mode 100644 index 903c1a4f..00000000 --- a/tdevdesigner/designer/paletteeditoradvancedimpl.cpp +++ /dev/null @@ -1,643 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "paletteeditoradvancedimpl.h" -#include "styledbutton.h" -#include "mainwindow.h" -#include "formwindow.h" - -#include -#include -#include -#include -#include -#include -#include - -/*! - Class used by PaletteEditor for bold combobox items -*/ - -class BoldListBoxText : public TQListBoxText -{ -public: - BoldListBoxText( TQString text, TQListBox* lb = 0 ); - -protected: - virtual void paint( TQPainter* ); -}; - -BoldListBoxText::BoldListBoxText( TQString text, TQListBox* lb ) - : TQListBoxText( lb ) -{ - setText( text ); -} - -void BoldListBoxText::paint( TQPainter* painter ) -{ - TQFont f = painter->font(); - f.setBold( TRUE ); - painter->setFont( f ); - - TQListBoxText::paint( painter ); -} - -PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent, - const char * name, bool modal, WFlags f ) - : PaletteEditorAdvancedBase( parent, name, modal, f ), formWindow( fw ), selectedPalette(0) -{ - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - - buttonPixmap->setEditor( StyledButton::PixmapEditor ); - - editPalette = TQApplication::palette(); - setPreviewPalette( editPalette ); - - buttonPixmap->setFormWindow( formWindow ); - - // force toggle event - checkBuildEffect->setChecked(FALSE); - checkBuildEffect->setChecked(TRUE); -} - -PaletteEditorAdvanced::~PaletteEditorAdvanced() -{ -} - -void PaletteEditorAdvanced::onToggleBuildInactive( bool v ) -{ - if (selectedPalette == 1) { - groupCentral->setDisabled(v); - groupEffect->setDisabled(v); - } - - if (v) { - buildInactive(); - updateStyledButtons(); - } -} - -void PaletteEditorAdvanced::onToggleBuildDisabled( bool v ) -{ - if (selectedPalette == 2) { - groupCentral->setDisabled(v); - groupEffect->setDisabled(v); - } - - if (v) { - buildDisabled(); - updateStyledButtons(); - } -} - -void PaletteEditorAdvanced::paletteSelected(int p) -{ - selectedPalette = p; - - if(p == 1) { // inactive - groupCentral->setDisabled(checkBuildInactive->isChecked()); - groupEffect->setDisabled(checkBuildInactive->isChecked()); - } - else if (p == 2) { // disabled - groupCentral->setDisabled(checkBuildDisabled->isChecked()); - groupEffect->setDisabled(checkBuildDisabled->isChecked()); - } - else { - groupCentral->setEnabled(TRUE); - groupEffect->setEnabled(TRUE); - } - updateStyledButtons(); -} - -void PaletteEditorAdvanced::onChooseCentralColor() -{ - switch(selectedPalette) { - case 0: - default: - mapToActiveCentralRole( buttonCentral->color() ); - break; - case 1: - mapToInactiveCentralRole( buttonCentral->color() ); - break; - case 2: - mapToDisabledCentralRole( buttonCentral->color() ); - break; - } - updateStyledButtons(); -} - -void PaletteEditorAdvanced::onChooseEffectColor() -{ - switch(selectedPalette) { - case 0: - default: - mapToActiveEffectRole( buttonEffect->color() ); - break; - case 1: - mapToInactiveEffectRole( buttonEffect->color() ); - break; - case 2: - mapToDisabledEffectRole( buttonEffect->color() ); - break; - } - updateStyledButtons(); -} - -void PaletteEditorAdvanced::onChoosePixmap() -{ - if (buttonPixmap->pixmap()) { - switch(selectedPalette) { - case 0: - default: - mapToActivePixmapRole( *buttonPixmap->pixmap() ); - break; - case 1: - mapToInactivePixmapRole( *buttonPixmap->pixmap() ); - break; - case 2: - mapToDisabledPixmapRole( *buttonPixmap->pixmap() ); - break; - } - } - updateStyledButtons(); -} - -void PaletteEditorAdvanced::onToggleBuildEffects( bool on ) -{ - if (!on) return; - buildActiveEffect(); - buildInactiveEffect(); - buildDisabledEffect(); -} - -TQColorGroup::ColorRole PaletteEditorAdvanced::centralFromItem( int item ) -{ - switch( item ) { - case 0: - return TQColorGroup::Background; - case 1: - return TQColorGroup::Foreground; - case 2: - return TQColorGroup::Button; - case 3: - return TQColorGroup::Base; - case 4: - return TQColorGroup::Text; - case 5: - return TQColorGroup::BrightText; - case 6: - return TQColorGroup::ButtonText; - case 7: - return TQColorGroup::Highlight; - case 8: - return TQColorGroup::HighlightedText; - case 9: - return TQColorGroup::Link; - case 10: - return TQColorGroup::LinkVisited; - default: - return TQColorGroup::NColorRoles; - } -} - -TQColorGroup::ColorRole PaletteEditorAdvanced::effectFromItem( int item ) -{ - switch( item ) { - case 0: - return TQColorGroup::Light; - case 1: - return TQColorGroup::Midlight; - case 2: - return TQColorGroup::Mid; - case 3: - return TQColorGroup::Dark; - case 4: - return TQColorGroup::Shadow; - default: - return TQColorGroup::NColorRoles; - } -} - -void PaletteEditorAdvanced::onCentral( int item ) -{ - TQPixmap* p = 0; - TQColor c; - - switch(selectedPalette) { - case 0: - default: - c = editPalette.active().color( centralFromItem(item) ); - p = editPalette.active().brush( centralFromItem(item) ).pixmap(); - break; - case 1: - c = editPalette.inactive().color( centralFromItem(item) ); - p = editPalette.inactive().brush( centralFromItem(item) ).pixmap(); - break; - case 2: - c = editPalette.disabled().color( centralFromItem(item) ); - p = editPalette.disabled().brush( centralFromItem(item) ).pixmap(); - break; - } - - buttonCentral->setColor(c); - - if (p) - buttonPixmap->setPixmap( *p ); - else - buttonPixmap->setPixmap( TQPixmap() ); -} - -void PaletteEditorAdvanced::onEffect( int item ) -{ - TQColor c; - switch(selectedPalette) { - case 0: - default: - c = editPalette.active().color( effectFromItem(item) ); - break; - case 1: - editPalette.inactive().color( effectFromItem(item) ); - break; - case 2: - editPalette.disabled().color( effectFromItem(item) ); - break; - } - buttonEffect->setColor(c); -} - -void PaletteEditorAdvanced::mapToActiveCentralRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.active(); - cg.setColor( centralFromItem(comboCentral->currentItem()), c ); - editPalette.setActive( cg ); - - buildActiveEffect(); - if(checkBuildInactive->isChecked()) - buildInactive(); - if(checkBuildDisabled->isChecked()) - buildDisabled(); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToActiveEffectRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.active(); - cg.setColor( effectFromItem(comboEffect->currentItem()), c ); - editPalette.setActive( cg ); - - if(checkBuildInactive->isChecked()) - buildInactive(); - if(checkBuildDisabled->isChecked()) - buildDisabled(); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToActivePixmapRole( const TQPixmap& pm ) -{ - TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); - TQColorGroup cg = editPalette.active(); - if ( !pm.isNull() ) - cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); - else - cg.setBrush( role, TQBrush( cg.color( role ) ) ); - editPalette.setActive( cg ); - - - buildActiveEffect(); - if(checkBuildInactive->isChecked()) - buildInactive(); - if(checkBuildDisabled->isChecked()) - buildDisabled(); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToInactiveCentralRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.inactive(); - cg.setColor( centralFromItem(comboCentral->currentItem()), c ); - editPalette.setInactive( cg ); - - buildInactiveEffect(); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToInactiveEffectRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.inactive(); - cg.setColor( effectFromItem(comboEffect->currentItem()), c ); - editPalette.setInactive( cg ); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToInactivePixmapRole( const TQPixmap& pm ) -{ - TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); - TQColorGroup cg = editPalette.inactive(); - if ( !pm.isNull() ) - cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); - else - cg.setBrush( role, TQBrush( cg.color( role ) ) ); - editPalette.setInactive( cg ); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToDisabledCentralRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.disabled(); - cg.setColor( centralFromItem(comboCentral->currentItem()), c ); - editPalette.setDisabled( cg ); - - buildDisabledEffect(); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToDisabledEffectRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.disabled(); - cg.setColor( effectFromItem(comboEffect->currentItem()), c ); - editPalette.setDisabled( cg ); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToDisabledPixmapRole( const TQPixmap& pm ) -{ - TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); - TQColorGroup cg = editPalette.disabled(); - if ( !pm.isNull() ) - cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); - else - cg.setBrush( role, TQBrush( cg.color( role ) ) ); - - editPalette.setDisabled( cg ); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::buildActiveEffect() -{ - TQColorGroup cg = editPalette.active(); - TQColor btn = cg.color( TQColorGroup::Button ); - - TQPalette temp( btn, btn ); - - for (int i = 0; i<5; i++) - cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) ); - - editPalette.setActive( cg ); - setPreviewPalette( editPalette ); - - updateStyledButtons(); -} - -void PaletteEditorAdvanced::buildInactive() -{ - editPalette.setInactive( editPalette.active() ); - buildInactiveEffect(); -} - -void PaletteEditorAdvanced::buildInactiveEffect() -{ - TQColorGroup cg = editPalette.inactive(); - - TQColor light, midlight, mid, dark, shadow; - TQColor btn = cg.color( TQColorGroup::Button ); - - light = btn.light(150); - midlight = btn.light(115); - mid = btn.dark(150); - dark = btn.dark(); - shadow = black; - - cg.setColor( TQColorGroup::Light, light ); - cg.setColor( TQColorGroup::Midlight, midlight ); - cg.setColor( TQColorGroup::Mid, mid ); - cg.setColor( TQColorGroup::Dark, dark ); - cg.setColor( TQColorGroup::Shadow, shadow ); - - editPalette.setInactive( cg ); - setPreviewPalette( editPalette ); - updateStyledButtons(); -} - -void PaletteEditorAdvanced::buildDisabled() -{ - TQColorGroup cg = editPalette.active(); - cg.setColor( TQColorGroup::ButtonText, darkGray ); - cg.setColor( TQColorGroup::Foreground, darkGray ); - editPalette.setDisabled( cg ); - - buildDisabledEffect(); -} - -void PaletteEditorAdvanced::buildDisabledEffect() -{ - TQColorGroup cg = editPalette.disabled(); - - TQColor light, midlight, mid, dark, shadow; - TQColor btn = cg.color( TQColorGroup::Button ); - - light = btn.light(150); - midlight = btn.light(115); - mid = btn.dark(150); - dark = btn.dark(); - shadow = black; - - cg.setColor( TQColorGroup::Light, light ); - cg.setColor( TQColorGroup::Midlight, midlight ); - cg.setColor( TQColorGroup::Mid, mid ); - cg.setColor( TQColorGroup::Dark, dark ); - cg.setColor( TQColorGroup::Shadow, shadow ); - - editPalette.setDisabled( cg ); - setPreviewPalette( editPalette ); - updateStyledButtons(); -} - -void PaletteEditorAdvanced::setPreviewPalette( const TQPalette& pal ) -{ - TQColorGroup cg; - - switch (selectedPalette) { - case 0: - default: - cg = pal.active(); - break; - case 1: - cg = pal.inactive(); - break; - case 2: - cg = pal.disabled(); - break; - } - previewPalette.setActive( cg ); - previewPalette.setInactive( cg ); - previewPalette.setDisabled( cg ); -} - -void PaletteEditorAdvanced::updateStyledButtons() -{ - TQColor central, effect; - TQPixmap *pm = 0; - switch (selectedPalette) { - case 0: - default: - central = editPalette.active().color( centralFromItem( comboCentral->currentItem() ) ); - effect = editPalette.active().color( effectFromItem( comboEffect->currentItem() ) ); - pm = editPalette.active().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); - break; - case 1: - central = editPalette.inactive().color( centralFromItem( comboCentral->currentItem() ) ); - effect = editPalette.inactive().color( effectFromItem( comboEffect->currentItem() ) ); - pm = editPalette.inactive().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); - break; - case 2: - central = editPalette.disabled().color( centralFromItem( comboCentral->currentItem() ) ); - effect = editPalette.disabled().color( effectFromItem( comboEffect->currentItem() ) ); - pm = editPalette.disabled().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); - break; - } - - buttonCentral->setColor(central); - buttonEffect->setColor(effect); - if ( pm && !pm->isNull() ) - buttonPixmap->setPixmap( *pm ); - else - buttonPixmap->setPixmap(TQPixmap()); -} - -void PaletteEditorAdvanced::setPal( const TQPalette& pal ) -{ - editPalette = pal; - setPreviewPalette( pal ); - updateStyledButtons(); -} - -TQPalette PaletteEditorAdvanced::pal() const -{ - return editPalette; -} - -void PaletteEditorAdvanced::setupBackgroundMode( BackgroundMode mode ) -{ - int initRole = 0; - - switch( mode ) { - case PaletteBackground: - initRole = 0; - break; - case PaletteForeground: - initRole = 1; - break; - case PaletteButton: - initRole = 2; - break; - case PaletteBase: - initRole = 3; - break; - case PaletteText: - initRole = 4; - break; - case PaletteBrightText: - initRole = 5; - break; - case PaletteButtonText: - initRole = 6; - break; - case PaletteHighlight: - initRole = 7; - break; - case PaletteHighlightedText: - initRole = 8; - break; - case PaletteLight: - initRole = 9; - break; - case PaletteMidlight: - initRole = 10; - break; - case PaletteDark: - initRole = 11; - break; - case PaletteMid: - initRole = 12; - break; - case PaletteShadow: - initRole = 13; - break; - default: - initRole = -1; - break; - } - - if ( initRole <= -1 ) return; - - if (initRole > 8 ) { - comboEffect->setCurrentItem( initRole - 9 ); - if ( comboEffect->listBox() ) { - TQString text = comboEffect->currentText(); - comboEffect->listBox()->changeItem( new BoldListBoxText( text ), initRole - 9 ); - } - } - else { - comboCentral->setCurrentItem( initRole ); - if ( comboCentral->listBox() ) { - TQString text = comboCentral->currentText(); - comboCentral->listBox()->changeItem( new BoldListBoxText( text ), initRole ); - } - } -} - -TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init, - BackgroundMode mode, TQWidget* parent, - const char* name, FormWindow *fw ) -{ - PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, TRUE ); - dlg->setupBackgroundMode( mode ); - - if ( init != TQPalette() ) - dlg->setPal( init ); - int resultCode = dlg->exec(); - - TQPalette result = init; - if ( resultCode == TQDialog::Accepted ) { - if ( ok ) - *ok = TRUE; - result = dlg->pal(); - } else { - if ( ok ) - *ok = FALSE; - } - delete dlg; - return result; -} diff --git a/tdevdesigner/designer/paletteeditoradvancedimpl.h b/tdevdesigner/designer/paletteeditoradvancedimpl.h deleted file mode 100644 index 1fb59912..00000000 --- a/tdevdesigner/designer/paletteeditoradvancedimpl.h +++ /dev/null @@ -1,97 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PALETTEEDITORADVANCEDIMPL_H -#define PALETTEEDITORADVANCEDIMPL_H - -#include "paletteeditoradvanced.h" - -class FormWindow; - -class PaletteEditorAdvanced : public PaletteEditorAdvancedBase -{ - Q_OBJECT - -public: - PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent=0, const char * name=0, - bool modal=FALSE, WFlags f=0 ); - ~PaletteEditorAdvanced(); - - static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground, - TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 ); - -protected slots: - void paletteSelected(int); - - void onCentral( int ); - void onEffect( int ); - - void onChooseCentralColor(); - void onChooseEffectColor(); - void onChoosePixmap(); - - void onToggleBuildEffects( bool ); - void onToggleBuildInactive( bool ); - void onToggleBuildDisabled( bool ); - -protected: - void mapToActiveCentralRole( const TQColor& ); - void mapToActiveEffectRole( const TQColor& ); - void mapToActivePixmapRole( const TQPixmap& ); - void mapToInactiveCentralRole( const TQColor& ); - void mapToInactiveEffectRole( const TQColor& ); - void mapToInactivePixmapRole( const TQPixmap& ); - void mapToDisabledCentralRole( const TQColor& ); - void mapToDisabledEffectRole( const TQColor& ); - void mapToDisabledPixmapRole( const TQPixmap& ); - - - void buildPalette(); - void buildActiveEffect(); - void buildInactive(); - void buildInactiveEffect(); - void buildDisabled(); - void buildDisabledEffect(); - -private: - void setPreviewPalette( const TQPalette& ); - void updateStyledButtons(); - void setupBackgroundMode( BackgroundMode ); - - TQPalette pal() const; - void setPal( const TQPalette& ); - - TQColorGroup::ColorRole centralFromItem( int ); - TQColorGroup::ColorRole effectFromItem( int ); - TQPalette editPalette; - TQPalette previewPalette; - - FormWindow *formWindow; - - int selectedPalette; -}; - -#endif diff --git a/tdevdesigner/designer/paletteeditorimpl.cpp b/tdevdesigner/designer/paletteeditorimpl.cpp deleted file mode 100644 index ae0cf7fd..00000000 --- a/tdevdesigner/designer/paletteeditorimpl.cpp +++ /dev/null @@ -1,304 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "paletteeditorimpl.h" -#include "paletteeditoradvancedimpl.h" -#include "previewframe.h" -#include "styledbutton.h" -#include "mainwindow.h" -#include "formwindow.h" - -#include -#include -#include -#include - -PaletteEditor::PaletteEditor( FormWindow *fw, TQWidget * parent, const char * name, bool modal, WFlags f ) - : PaletteEditorBase( parent, name, modal, f ), formWindow( fw ) -{ - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - - editPalette = TQApplication::palette(); - setPreviewPalette( editPalette ); - - buttonMainColor->setColor( editPalette.active().color( TQColorGroup::Button ) ); - buttonMainColor2->setColor( editPalette.active().color( TQColorGroup::Background ) ); -} - -PaletteEditor::~PaletteEditor() -{ -} - -void PaletteEditor::onTune() -{ - bool ok; - TQPalette pal = PaletteEditorAdvanced::getPalette( &ok, editPalette, backgroundMode, this, "tune_palette", formWindow); - if (!ok) return; - - editPalette = pal; - setPreviewPalette( editPalette ); -} - -void PaletteEditor::onChooseMainColor() -{ - buildPalette(); -} - -void PaletteEditor::onChoose2ndMainColor() -{ - buildPalette(); -} - -void PaletteEditor::paletteSelected(int) -{ - setPreviewPalette(editPalette); -} - -TQColorGroup::ColorRole PaletteEditor::centralFromItem( int item ) -{ - switch( item ) - { - case 0: - return TQColorGroup::Background; - case 1: - return TQColorGroup::Foreground; - case 2: - return TQColorGroup::Button; - case 3: - return TQColorGroup::Base; - case 4: - return TQColorGroup::Text; - case 5: - return TQColorGroup::BrightText; - case 6: - return TQColorGroup::ButtonText; - case 7: - return TQColorGroup::Highlight; - case 8: - return TQColorGroup::HighlightedText; - default: - return TQColorGroup::NColorRoles; - } -} - -TQColorGroup::ColorRole PaletteEditor::effectFromItem( int item ) -{ - switch( item ) - { - case 0: - return TQColorGroup::Light; - case 1: - return TQColorGroup::Midlight; - case 2: - return TQColorGroup::Mid; - case 3: - return TQColorGroup::Dark; - case 4: - return TQColorGroup::Shadow; - default: - return TQColorGroup::NColorRoles; - } -} - -void PaletteEditor::buildPalette() -{ - int i; - TQColorGroup cg; - TQColor btn = buttonMainColor->color(); - TQColor back = buttonMainColor2->color(); - TQPalette automake( btn, back ); - - for (i = 0; i<9; i++) - cg.setColor( centralFromItem(i), automake.active().color( centralFromItem(i) ) ); - - editPalette.setActive( cg ); - buildActiveEffect(); - - cg = editPalette.inactive(); - - TQPalette temp( editPalette.active().color( TQColorGroup::Button ), - editPalette.active().color( TQColorGroup::Background ) ); - - for (i = 0; i<9; i++) - cg.setColor( centralFromItem(i), temp.inactive().color( centralFromItem(i) ) ); - - editPalette.setInactive( cg ); - buildInactiveEffect(); - - cg = editPalette.disabled(); - - for (i = 0; i<9; i++) - cg.setColor( centralFromItem(i), temp.disabled().color( centralFromItem(i) ) ); - - editPalette.setDisabled( cg ); - buildDisabledEffect(); - - updateStyledButtons(); -} - -void PaletteEditor::buildActiveEffect() -{ - TQColorGroup cg = editPalette.active(); - TQColor btn = cg.color( TQColorGroup::Button ); - - TQPalette temp( btn, btn ); - - for (int i = 0; i<5; i++) - cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) ); - - editPalette.setActive( cg ); - setPreviewPalette( editPalette ); - - updateStyledButtons(); -} - -void PaletteEditor::buildInactive() -{ - editPalette.setInactive( editPalette.active() ); - buildInactiveEffect(); -} - -void PaletteEditor::buildInactiveEffect() -{ - TQColorGroup cg = editPalette.inactive(); - - TQColor light, midlight, mid, dark, shadow; - TQColor btn = cg.color( TQColorGroup::Button ); - - light = btn.light(150); - midlight = btn.light(115); - mid = btn.dark(150); - dark = btn.dark(); - shadow = black; - - cg.setColor( TQColorGroup::Light, light ); - cg.setColor( TQColorGroup::Midlight, midlight ); - cg.setColor( TQColorGroup::Mid, mid ); - cg.setColor( TQColorGroup::Dark, dark ); - cg.setColor( TQColorGroup::Shadow, shadow ); - - editPalette.setInactive( cg ); - setPreviewPalette( editPalette ); - updateStyledButtons(); -} - -void PaletteEditor::buildDisabled() -{ - TQColorGroup cg = editPalette.active(); - cg.setColor( TQColorGroup::ButtonText, darkGray ); - cg.setColor( TQColorGroup::Foreground, darkGray ); - editPalette.setDisabled( cg ); - - buildDisabledEffect(); -} - -void PaletteEditor::buildDisabledEffect() -{ - TQColorGroup cg = editPalette.disabled(); - - TQColor light, midlight, mid, dark, shadow; - TQColor btn = cg.color( TQColorGroup::Button ); - - light = btn.light(150); - midlight = btn.light(115); - mid = btn.dark(150); - dark = btn.dark(); - shadow = black; - - cg.setColor( TQColorGroup::Light, light ); - cg.setColor( TQColorGroup::Midlight, midlight ); - cg.setColor( TQColorGroup::Mid, mid ); - cg.setColor( TQColorGroup::Dark, dark ); - cg.setColor( TQColorGroup::Shadow, shadow ); - - editPalette.setDisabled( cg ); - setPreviewPalette( editPalette ); - updateStyledButtons(); -} - -void PaletteEditor::setPreviewPalette( const TQPalette& pal ) -{ - TQColorGroup cg; - - switch (paletteCombo->currentItem()) { - case 0: - default: - cg = pal.active(); - break; - case 1: - cg = pal.inactive(); - break; - case 2: - cg = pal.disabled(); - break; - } - previewPalette.setActive( cg ); - previewPalette.setInactive( cg ); - previewPalette.setDisabled( cg ); - - previewFrame->setPreviewPalette(previewPalette); -} - -void PaletteEditor::updateStyledButtons() -{ - buttonMainColor->setColor( editPalette.active().color( TQColorGroup::Button )); - buttonMainColor2->setColor( editPalette.active().color( TQColorGroup::Background )); -} - -void PaletteEditor::setPal( const TQPalette& pal ) -{ - editPalette = pal; - setPreviewPalette( pal ); - updateStyledButtons(); -} - -TQPalette PaletteEditor::pal() const -{ - return editPalette; -} - -TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode, - TQWidget* parent, const char* name, FormWindow *fw ) -{ - PaletteEditor* dlg = new PaletteEditor( fw, parent, name, TRUE ); - dlg->setupBackgroundMode( mode ); - - if ( init != TQPalette() ) - dlg->setPal( init ); - int resultCode = dlg->exec(); - - TQPalette result = init; - if ( resultCode == TQDialog::Accepted ) { - if ( ok ) - *ok = TRUE; - result = dlg->pal(); - } else { - if ( ok ) - *ok = FALSE; - } - delete dlg; - return result; -} diff --git a/tdevdesigner/designer/paletteeditorimpl.h b/tdevdesigner/designer/paletteeditorimpl.h deleted file mode 100644 index c1943a61..00000000 --- a/tdevdesigner/designer/paletteeditorimpl.h +++ /dev/null @@ -1,77 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PALETTEEDITORIMPL_H -#define PALETTEEDITORIMPL_H - -#include "paletteeditor.h" - -class FormWindow; - -class PaletteEditor : public PaletteEditorBase -{ - Q_OBJECT - - -public: - PaletteEditor( FormWindow *fw, TQWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 ); - ~PaletteEditor(); - - static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground, - TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 ); - -protected slots: - void onChooseMainColor(); - void onChoose2ndMainColor(); - void onTune(); - void paletteSelected(int); - -protected: - void buildPalette(); - void buildActiveEffect(); - void buildInactive(); - void buildInactiveEffect(); - void buildDisabled(); - void buildDisabledEffect(); - -private: - void setPreviewPalette( const TQPalette& ); - void updateStyledButtons(); - void setupBackgroundMode( BackgroundMode mode ) { backgroundMode = mode; } - - TQPalette pal() const; - void setPal( const TQPalette& ); - - TQColorGroup::ColorRole centralFromItem( int ); - TQColorGroup::ColorRole effectFromItem( int ); - TQPalette editPalette; - TQPalette previewPalette; - - FormWindow *formWindow; - BackgroundMode backgroundMode; -}; - -#endif diff --git a/tdevdesigner/designer/pics/CMakeLists.txt b/tdevdesigner/designer/pics/CMakeLists.txt deleted file mode 100644 index 940ecd0d..00000000 --- a/tdevdesigner/designer/pics/CMakeLists.txt +++ /dev/null @@ -1,85 +0,0 @@ -################################################# -# -# (C) 2012 Slavek Banko -# slavek (DOT) banko (AT) axis.cz -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( - FILES - designer_adjustsize.png designer_appicon.png designer_arrow.png - designer_background.png designer_book.png designer_buttongroup.png - designer_checkbox.png designer_combobox.png designer_connecttool.png - designer_cross.png designer_customwidget.png designer_d_adjustsize.png - designer_d_book.png designer_d_buttongroup.png designer_d_checkbox.png - designer_d_combobox.png designer_d_connecttool.png designer_d_customwidget.png - designer_d_databrowser.png designer_d_datatable.png designer_d_dataview.png - designer_d_dateedit.png designer_d_datetimeedit.png designer_d_dial.png - designer_d_down.png designer_d_editbreaklayout.png designer_d_editcopy.png - designer_d_editcut.png designer_d_editdelete.png designer_d_editgrid.png - designer_d_edithlayout.png designer_d_edithlayoutsplit.png - designer_d_editlower.png designer_d_editpaste.png designer_d_editraise.png - designer_d_editslots.png designer_d_editvlayout.png - designer_d_editvlayoutsplit.png designer_d_filenew.png designer_d_fileopen.png - designer_d_filesave.png designer_d_folder.png designer_d_form.png - designer_d_frame.png designer_d_groupbox.png designer_d_help.png - designer_d_home.png designer_d_iconview.png designer_d_image.png - designer_d_label.png designer_d_layout.png designer_d_lcdnumber.png - designer_d_left.png designer_d_line.png designer_d_lineedit.png - designer_d_listbox.png designer_d_listview.png designer_d_multilineedit.png - designer_d_newform.png designer_d_ordertool.png designer_d_pixlabel.png - designer_d_pointer.png designer_d_print.png designer_d_progress.png - designer_d_project.png designer_d_pushbutton.png designer_d_radiobutton.png - designer_d_redo.png designer_d_richtextedit.png designer_d_right.png - designer_d_scrollbar.png designer_d_searchfind.png designer_d_setbuddy.png - designer_d_slider.png designer_d_spacer.png designer_d_spinbox.png - designer_d_table.png designer_d_tabwidget.png designer_d_textbold.png - designer_d_textbrowser.png designer_d_textcenter.png designer_d_textedit.png - designer_d_textfont.png designer_d_texth1.png designer_d_texth2.png - designer_d_texth3.png designer_d_textitalic.png designer_d_textjustify.png - designer_d_textlarger.png designer_d_textleft.png designer_d_textlinebreak.png - designer_d_textparagraph.png designer_d_textright.png designer_d_textsmaller.png - designer_d_textteletext.png designer_d_textunderline.png designer_d_textview.png - designer_d_timeedit.png designer_d_toolbox.png designer_d_toolbutton.png - designer_d_undo.png designer_d_up.png designer_d_widgetstack.png - designer_d_wizarddata.png designer_d_wizarddialog.png designer_d_wordwrap.png - designer_databrowser.png designer_datatable.png designer_dataview.png - designer_dateedit.png designer_datetimeedit.png designer_dial.png - designer_down.png designer_editbreaklayout.png designer_editcopy.png - designer_editcut.png designer_editdelete.png designer_editgrid.png - designer_edithlayout.png designer_edithlayoutsplit.png designer_editlower.png - designer_editpaste.png designer_editraise.png designer_editslots.png - designer_editvlayout.png designer_editvlayoutsplit.png designer_filenew.png - designer_fileopen.png designer_filesave.png designer_folder.png - designer_form.png designer_frame.png designer_groupbox.png designer_hand.png - designer_help.png designer_home.png designer_hsplit.png designer_ibeam.png - designer_iconview.png designer_image.png designer_label.png designer_layout.png - designer_lcdnumber.png designer_left.png designer_line.png designer_lineedit.png - designer_listbox.png designer_listview.png designer_multilineedit.png - designer_newform.png designer_no.png designer_object.png designer_ordertool.png - designer_pixlabel.png designer_pointer.png designer_print.png - designer_progress.png designer_project.png designer_pushbutton.png - designer_qtlogo.png designer_radiobutton.png designer_redo.png - designer_resetproperty.png designer_richtextedit.png designer_right.png - designer_s_down.png designer_s_editcut.png designer_s_left.png - designer_s_right.png designer_s_up.png designer_scrollbar.png - designer_searchfind.png designer_setbuddy.png designer_sizeall.png - designer_sizeb.png designer_sizef.png designer_sizeh.png designer_sizev.png - designer_slider.png designer_spacer.png designer_spinbox.png designer_splash.png - designer_table.png designer_tabwidget.png designer_textbold.png - designer_textbrowser.png designer_textcenter.png designer_textedit.png - designer_textfont.png designer_texth1.png designer_texth2.png - designer_texth3.png designer_textitalic.png designer_textjustify.png - designer_textlarger.png designer_textleft.png designer_textlinebreak.png - designer_textparagraph.png designer_textright.png designer_textsmaller.png - designer_textteletext.png designer_textunderline.png designer_textview.png - designer_timeedit.png designer_toolbox.png designer_toolbutton.png - designer_undo.png designer_up.png designer_uparrow.png designer_vsplit.png - designer_wait.png designer_widgetstack.png designer_wizarddata.png - designer_wizarddialog.png designer_wordwrap.png - DESTINATION ${DATA_INSTALL_DIR}/tdevdesignerpart/pics -) diff --git a/tdevdesigner/designer/pics/Makefile.am b/tdevdesigner/designer/pics/Makefile.am deleted file mode 100644 index be65c4d5..00000000 --- a/tdevdesigner/designer/pics/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -picsdirdir = $(kde_datadir)/tdevdesignerpart/pics -picsdir_DATA = designer_adjustsize.png designer_appicon.png designer_arrow.png designer_background.png designer_book.png designer_buttongroup.png designer_checkbox.png designer_combobox.png designer_connecttool.png designer_cross.png designer_customwidget.png designer_d_adjustsize.png designer_d_book.png designer_d_buttongroup.png designer_d_checkbox.png designer_d_combobox.png designer_d_connecttool.png designer_d_customwidget.png designer_d_databrowser.png designer_d_datatable.png designer_d_dataview.png designer_d_dateedit.png designer_d_datetimeedit.png designer_d_dial.png designer_d_down.png designer_d_editbreaklayout.png designer_d_editcopy.png designer_d_editcut.png designer_d_editdelete.png designer_d_editgrid.png designer_d_edithlayout.png designer_d_edithlayoutsplit.png designer_d_editlower.png designer_d_editpaste.png designer_d_editraise.png designer_d_editslots.png designer_d_editvlayout.png designer_d_editvlayoutsplit.png designer_d_filenew.png designer_d_fileopen.png designer_d_filesave.png designer_d_folder.png designer_d_form.png designer_d_frame.png designer_d_groupbox.png designer_d_help.png designer_d_home.png designer_d_iconview.png designer_d_image.png designer_d_label.png designer_d_layout.png designer_d_lcdnumber.png designer_d_left.png designer_d_line.png designer_d_lineedit.png designer_d_listbox.png designer_d_listview.png designer_d_multilineedit.png designer_d_newform.png designer_d_ordertool.png designer_d_pixlabel.png designer_d_pointer.png designer_d_print.png designer_d_progress.png designer_d_project.png designer_d_pushbutton.png designer_d_radiobutton.png designer_d_redo.png designer_d_richtextedit.png designer_d_right.png designer_d_scrollbar.png designer_d_searchfind.png designer_d_setbuddy.png designer_d_slider.png designer_d_spacer.png designer_d_spinbox.png designer_d_table.png designer_d_tabwidget.png designer_d_textbold.png designer_d_textbrowser.png designer_d_textcenter.png designer_d_textedit.png designer_d_textfont.png designer_d_texth1.png designer_d_texth2.png designer_d_texth3.png designer_d_textitalic.png designer_d_textjustify.png designer_d_textlarger.png designer_d_textleft.png designer_d_textlinebreak.png designer_d_textparagraph.png designer_d_textright.png designer_d_textsmaller.png designer_d_textteletext.png designer_d_textunderline.png designer_d_textview.png designer_d_timeedit.png designer_d_toolbox.png designer_d_toolbutton.png designer_d_undo.png designer_d_up.png designer_d_widgetstack.png designer_d_wizarddata.png designer_d_wizarddialog.png designer_d_wordwrap.png designer_databrowser.png designer_datatable.png designer_dataview.png designer_dateedit.png designer_datetimeedit.png designer_dial.png designer_down.png designer_editbreaklayout.png designer_editcopy.png designer_editcut.png designer_editdelete.png designer_editgrid.png designer_edithlayout.png designer_edithlayoutsplit.png designer_editlower.png designer_editpaste.png designer_editraise.png designer_editslots.png designer_editvlayout.png designer_editvlayoutsplit.png designer_filenew.png designer_fileopen.png designer_filesave.png designer_folder.png designer_form.png designer_frame.png designer_groupbox.png designer_hand.png designer_help.png designer_home.png designer_hsplit.png designer_ibeam.png designer_iconview.png designer_image.png designer_label.png designer_layout.png designer_lcdnumber.png designer_left.png designer_line.png designer_lineedit.png designer_listbox.png designer_listview.png designer_multilineedit.png designer_newform.png designer_no.png designer_object.png designer_ordertool.png designer_pixlabel.png designer_pointer.png designer_print.png designer_progress.png designer_project.png designer_pushbutton.png designer_qtlogo.png designer_radiobutton.png designer_redo.png designer_resetproperty.png designer_richtextedit.png designer_right.png designer_s_down.png designer_s_editcut.png designer_s_left.png designer_s_right.png designer_s_up.png designer_scrollbar.png designer_searchfind.png designer_setbuddy.png designer_sizeall.png designer_sizeb.png designer_sizef.png designer_sizeh.png designer_sizev.png designer_slider.png designer_spacer.png designer_spinbox.png designer_splash.png designer_table.png designer_tabwidget.png designer_textbold.png designer_textbrowser.png designer_textcenter.png designer_textedit.png designer_textfont.png designer_texth1.png designer_texth2.png designer_texth3.png designer_textitalic.png designer_textjustify.png designer_textlarger.png designer_textleft.png designer_textlinebreak.png designer_textparagraph.png designer_textright.png designer_textsmaller.png designer_textteletext.png designer_textunderline.png designer_textview.png designer_timeedit.png designer_toolbox.png designer_toolbutton.png designer_undo.png designer_up.png designer_uparrow.png designer_vsplit.png designer_wait.png designer_widgetstack.png designer_wizarddata.png designer_wizarddialog.png designer_wordwrap.png diff --git a/tdevdesigner/designer/pics/designer_adjustsize.png b/tdevdesigner/designer/pics/designer_adjustsize.png deleted file mode 100644 index 6ade1e22..00000000 Binary files a/tdevdesigner/designer/pics/designer_adjustsize.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_appicon.png b/tdevdesigner/designer/pics/designer_appicon.png deleted file mode 100644 index 7aadcbad..00000000 Binary files a/tdevdesigner/designer/pics/designer_appicon.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_arrow.png b/tdevdesigner/designer/pics/designer_arrow.png deleted file mode 100644 index 53921d83..00000000 Binary files a/tdevdesigner/designer/pics/designer_arrow.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_background.png b/tdevdesigner/designer/pics/designer_background.png deleted file mode 100644 index 27d2e997..00000000 Binary files a/tdevdesigner/designer/pics/designer_background.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_book.png b/tdevdesigner/designer/pics/designer_book.png deleted file mode 100644 index dd850abb..00000000 Binary files a/tdevdesigner/designer/pics/designer_book.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_buttongroup.png b/tdevdesigner/designer/pics/designer_buttongroup.png deleted file mode 100644 index d89e28fd..00000000 Binary files a/tdevdesigner/designer/pics/designer_buttongroup.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_checkbox.png b/tdevdesigner/designer/pics/designer_checkbox.png deleted file mode 100644 index ab6f53e0..00000000 Binary files a/tdevdesigner/designer/pics/designer_checkbox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_combobox.png b/tdevdesigner/designer/pics/designer_combobox.png deleted file mode 100644 index 7d4890a7..00000000 Binary files a/tdevdesigner/designer/pics/designer_combobox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_connecttool.png b/tdevdesigner/designer/pics/designer_connecttool.png deleted file mode 100644 index fca6748f..00000000 Binary files a/tdevdesigner/designer/pics/designer_connecttool.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_cross.png b/tdevdesigner/designer/pics/designer_cross.png deleted file mode 100644 index d5e9f0c7..00000000 Binary files a/tdevdesigner/designer/pics/designer_cross.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_customwidget.png b/tdevdesigner/designer/pics/designer_customwidget.png deleted file mode 100644 index ab790e1f..00000000 Binary files a/tdevdesigner/designer/pics/designer_customwidget.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_adjustsize.png b/tdevdesigner/designer/pics/designer_d_adjustsize.png deleted file mode 100644 index d61ca7af..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_adjustsize.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_book.png b/tdevdesigner/designer/pics/designer_d_book.png deleted file mode 100644 index 5517f0c4..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_book.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_buttongroup.png b/tdevdesigner/designer/pics/designer_d_buttongroup.png deleted file mode 100644 index 1e451a88..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_buttongroup.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_checkbox.png b/tdevdesigner/designer/pics/designer_d_checkbox.png deleted file mode 100644 index 1415eabb..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_checkbox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_combobox.png b/tdevdesigner/designer/pics/designer_d_combobox.png deleted file mode 100644 index 5fb44eff..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_combobox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_connecttool.png b/tdevdesigner/designer/pics/designer_d_connecttool.png deleted file mode 100644 index 76a3b5f5..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_connecttool.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_customwidget.png b/tdevdesigner/designer/pics/designer_d_customwidget.png deleted file mode 100644 index 5ea648fb..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_customwidget.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_databrowser.png b/tdevdesigner/designer/pics/designer_d_databrowser.png deleted file mode 100644 index c1155c8c..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_databrowser.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_datatable.png b/tdevdesigner/designer/pics/designer_d_datatable.png deleted file mode 100644 index 7060dc3a..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_datatable.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_dataview.png b/tdevdesigner/designer/pics/designer_d_dataview.png deleted file mode 100644 index c507d416..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_dataview.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_dateedit.png b/tdevdesigner/designer/pics/designer_d_dateedit.png deleted file mode 100644 index 162e63a8..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_dateedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_datetimeedit.png b/tdevdesigner/designer/pics/designer_d_datetimeedit.png deleted file mode 100644 index 83dc2fc3..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_datetimeedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_dial.png b/tdevdesigner/designer/pics/designer_d_dial.png deleted file mode 100644 index a84869e4..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_dial.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_down.png b/tdevdesigner/designer/pics/designer_d_down.png deleted file mode 100644 index 57b407e4..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_down.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_editbreaklayout.png b/tdevdesigner/designer/pics/designer_d_editbreaklayout.png deleted file mode 100644 index 2a36d67d..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_editbreaklayout.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_editcopy.png b/tdevdesigner/designer/pics/designer_d_editcopy.png deleted file mode 100644 index 500758d4..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_editcopy.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_editcut.png b/tdevdesigner/designer/pics/designer_d_editcut.png deleted file mode 100644 index 8d50ae0a..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_editcut.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_editdelete.png b/tdevdesigner/designer/pics/designer_d_editdelete.png deleted file mode 100644 index f4d0f7a1..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_editdelete.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_editgrid.png b/tdevdesigner/designer/pics/designer_d_editgrid.png deleted file mode 100644 index ad2b87b9..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_editgrid.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_edithlayout.png b/tdevdesigner/designer/pics/designer_d_edithlayout.png deleted file mode 100644 index dacaf82e..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_edithlayout.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_edithlayoutsplit.png b/tdevdesigner/designer/pics/designer_d_edithlayoutsplit.png deleted file mode 100644 index 00a96055..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_edithlayoutsplit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_editlower.png b/tdevdesigner/designer/pics/designer_d_editlower.png deleted file mode 100644 index a0a16b40..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_editlower.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_editpaste.png b/tdevdesigner/designer/pics/designer_d_editpaste.png deleted file mode 100644 index d31071e9..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_editpaste.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_editraise.png b/tdevdesigner/designer/pics/designer_d_editraise.png deleted file mode 100644 index 5f7f04b9..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_editraise.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_editslots.png b/tdevdesigner/designer/pics/designer_d_editslots.png deleted file mode 100644 index cd791b43..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_editslots.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_editvlayout.png b/tdevdesigner/designer/pics/designer_d_editvlayout.png deleted file mode 100644 index ed202af7..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_editvlayout.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_editvlayoutsplit.png b/tdevdesigner/designer/pics/designer_d_editvlayoutsplit.png deleted file mode 100644 index 54ee44c0..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_editvlayoutsplit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_filenew.png b/tdevdesigner/designer/pics/designer_d_filenew.png deleted file mode 100644 index d5e7061b..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_filenew.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_fileopen.png b/tdevdesigner/designer/pics/designer_d_fileopen.png deleted file mode 100644 index 343f0039..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_fileopen.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_filesave.png b/tdevdesigner/designer/pics/designer_d_filesave.png deleted file mode 100644 index 5d1476d2..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_filesave.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_folder.png b/tdevdesigner/designer/pics/designer_d_folder.png deleted file mode 100644 index 4bed3caf..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_folder.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_form.png b/tdevdesigner/designer/pics/designer_d_form.png deleted file mode 100644 index 9f89d654..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_form.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_frame.png b/tdevdesigner/designer/pics/designer_d_frame.png deleted file mode 100644 index 09b21b21..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_frame.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_groupbox.png b/tdevdesigner/designer/pics/designer_d_groupbox.png deleted file mode 100644 index e7e01083..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_groupbox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_help.png b/tdevdesigner/designer/pics/designer_d_help.png deleted file mode 100644 index 8f9d1826..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_help.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_home.png b/tdevdesigner/designer/pics/designer_d_home.png deleted file mode 100644 index b3906a4f..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_home.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_iconview.png b/tdevdesigner/designer/pics/designer_d_iconview.png deleted file mode 100644 index a07b2b75..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_iconview.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_image.png b/tdevdesigner/designer/pics/designer_d_image.png deleted file mode 100644 index f7cb29c3..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_image.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_label.png b/tdevdesigner/designer/pics/designer_d_label.png deleted file mode 100644 index bfbd5b88..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_label.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_layout.png b/tdevdesigner/designer/pics/designer_d_layout.png deleted file mode 100644 index 090b4bb2..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_layout.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_lcdnumber.png b/tdevdesigner/designer/pics/designer_d_lcdnumber.png deleted file mode 100644 index 786747e6..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_lcdnumber.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_left.png b/tdevdesigner/designer/pics/designer_d_left.png deleted file mode 100644 index 50d03bbe..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_left.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_line.png b/tdevdesigner/designer/pics/designer_d_line.png deleted file mode 100644 index 25b0daeb..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_line.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_lineedit.png b/tdevdesigner/designer/pics/designer_d_lineedit.png deleted file mode 100644 index 9d34ce97..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_lineedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_listbox.png b/tdevdesigner/designer/pics/designer_d_listbox.png deleted file mode 100644 index d80c7900..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_listbox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_listview.png b/tdevdesigner/designer/pics/designer_d_listview.png deleted file mode 100644 index c5d9be3e..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_listview.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_multilineedit.png b/tdevdesigner/designer/pics/designer_d_multilineedit.png deleted file mode 100644 index a62e6622..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_multilineedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_newform.png b/tdevdesigner/designer/pics/designer_d_newform.png deleted file mode 100644 index ace61302..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_newform.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_ordertool.png b/tdevdesigner/designer/pics/designer_d_ordertool.png deleted file mode 100644 index 61bdc7ef..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_ordertool.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_pixlabel.png b/tdevdesigner/designer/pics/designer_d_pixlabel.png deleted file mode 100644 index 21e1f492..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_pixlabel.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_pointer.png b/tdevdesigner/designer/pics/designer_d_pointer.png deleted file mode 100644 index e6903eb6..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_pointer.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_print.png b/tdevdesigner/designer/pics/designer_d_print.png deleted file mode 100644 index 6a72a764..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_print.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_progress.png b/tdevdesigner/designer/pics/designer_d_progress.png deleted file mode 100644 index 25d857a6..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_progress.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_project.png b/tdevdesigner/designer/pics/designer_d_project.png deleted file mode 100644 index b265eae0..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_project.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_pushbutton.png b/tdevdesigner/designer/pics/designer_d_pushbutton.png deleted file mode 100644 index 635f35cb..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_pushbutton.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_radiobutton.png b/tdevdesigner/designer/pics/designer_d_radiobutton.png deleted file mode 100644 index e86eb8c1..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_radiobutton.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_redo.png b/tdevdesigner/designer/pics/designer_d_redo.png deleted file mode 100644 index 6e993cc6..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_redo.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_richtextedit.png b/tdevdesigner/designer/pics/designer_d_richtextedit.png deleted file mode 100644 index ba7ada19..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_richtextedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_right.png b/tdevdesigner/designer/pics/designer_d_right.png deleted file mode 100644 index 9dbf2dd6..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_right.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_scrollbar.png b/tdevdesigner/designer/pics/designer_d_scrollbar.png deleted file mode 100644 index 9a818970..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_scrollbar.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_searchfind.png b/tdevdesigner/designer/pics/designer_d_searchfind.png deleted file mode 100644 index e85e33fe..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_searchfind.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_setbuddy.png b/tdevdesigner/designer/pics/designer_d_setbuddy.png deleted file mode 100644 index fe816aa2..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_setbuddy.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_slider.png b/tdevdesigner/designer/pics/designer_d_slider.png deleted file mode 100644 index a1ad5d5b..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_slider.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_spacer.png b/tdevdesigner/designer/pics/designer_d_spacer.png deleted file mode 100644 index 15319d99..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_spacer.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_spinbox.png b/tdevdesigner/designer/pics/designer_d_spinbox.png deleted file mode 100644 index cafbe012..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_spinbox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_table.png b/tdevdesigner/designer/pics/designer_d_table.png deleted file mode 100644 index a95bde12..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_table.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_tabwidget.png b/tdevdesigner/designer/pics/designer_d_tabwidget.png deleted file mode 100644 index 0f0bad0d..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_tabwidget.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textbold.png b/tdevdesigner/designer/pics/designer_d_textbold.png deleted file mode 100644 index 6e8a5cf5..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textbold.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textbrowser.png b/tdevdesigner/designer/pics/designer_d_textbrowser.png deleted file mode 100644 index b4315f90..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textbrowser.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textcenter.png b/tdevdesigner/designer/pics/designer_d_textcenter.png deleted file mode 100644 index 7a66036d..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textcenter.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textedit.png b/tdevdesigner/designer/pics/designer_d_textedit.png deleted file mode 100644 index 69314141..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textfont.png b/tdevdesigner/designer/pics/designer_d_textfont.png deleted file mode 100644 index beb2112b..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textfont.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_texth1.png b/tdevdesigner/designer/pics/designer_d_texth1.png deleted file mode 100644 index 87d7e157..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_texth1.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_texth2.png b/tdevdesigner/designer/pics/designer_d_texth2.png deleted file mode 100644 index e90437b2..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_texth2.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_texth3.png b/tdevdesigner/designer/pics/designer_d_texth3.png deleted file mode 100644 index 1c7eefe5..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_texth3.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textitalic.png b/tdevdesigner/designer/pics/designer_d_textitalic.png deleted file mode 100644 index d2c07fad..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textitalic.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textjustify.png b/tdevdesigner/designer/pics/designer_d_textjustify.png deleted file mode 100644 index 3fb3cc34..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textjustify.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textlarger.png b/tdevdesigner/designer/pics/designer_d_textlarger.png deleted file mode 100644 index ecc35f54..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textlarger.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textleft.png b/tdevdesigner/designer/pics/designer_d_textleft.png deleted file mode 100644 index 90dc0248..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textleft.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textlinebreak.png b/tdevdesigner/designer/pics/designer_d_textlinebreak.png deleted file mode 100644 index 4566f59e..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textlinebreak.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textparagraph.png b/tdevdesigner/designer/pics/designer_d_textparagraph.png deleted file mode 100644 index a7ef75c7..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textparagraph.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textright.png b/tdevdesigner/designer/pics/designer_d_textright.png deleted file mode 100644 index ee89b93b..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textright.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textsmaller.png b/tdevdesigner/designer/pics/designer_d_textsmaller.png deleted file mode 100644 index d4251de0..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textsmaller.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textteletext.png b/tdevdesigner/designer/pics/designer_d_textteletext.png deleted file mode 100644 index d80af143..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textteletext.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textunderline.png b/tdevdesigner/designer/pics/designer_d_textunderline.png deleted file mode 100644 index cab0b788..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textunderline.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_textview.png b/tdevdesigner/designer/pics/designer_d_textview.png deleted file mode 100644 index 05ce9c69..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_textview.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_timeedit.png b/tdevdesigner/designer/pics/designer_d_timeedit.png deleted file mode 100644 index 955144ec..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_timeedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_toolbox.png b/tdevdesigner/designer/pics/designer_d_toolbox.png deleted file mode 100644 index e1f84471..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_toolbox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_toolbutton.png b/tdevdesigner/designer/pics/designer_d_toolbutton.png deleted file mode 100644 index 08e309a7..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_toolbutton.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_undo.png b/tdevdesigner/designer/pics/designer_d_undo.png deleted file mode 100644 index 22ac97f2..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_undo.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_up.png b/tdevdesigner/designer/pics/designer_d_up.png deleted file mode 100644 index 4c3ab7c9..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_up.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_widgetstack.png b/tdevdesigner/designer/pics/designer_d_widgetstack.png deleted file mode 100644 index c62f8e15..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_widgetstack.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_wizarddata.png b/tdevdesigner/designer/pics/designer_d_wizarddata.png deleted file mode 100644 index fb540b87..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_wizarddata.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_wizarddialog.png b/tdevdesigner/designer/pics/designer_d_wizarddialog.png deleted file mode 100644 index b83ca7e6..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_wizarddialog.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_d_wordwrap.png b/tdevdesigner/designer/pics/designer_d_wordwrap.png deleted file mode 100644 index 8a299033..00000000 Binary files a/tdevdesigner/designer/pics/designer_d_wordwrap.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_databrowser.png b/tdevdesigner/designer/pics/designer_databrowser.png deleted file mode 100644 index 1dd95782..00000000 Binary files a/tdevdesigner/designer/pics/designer_databrowser.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_datatable.png b/tdevdesigner/designer/pics/designer_datatable.png deleted file mode 100644 index 5b3bfc76..00000000 Binary files a/tdevdesigner/designer/pics/designer_datatable.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_dataview.png b/tdevdesigner/designer/pics/designer_dataview.png deleted file mode 100644 index 5f6aad33..00000000 Binary files a/tdevdesigner/designer/pics/designer_dataview.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_dateedit.png b/tdevdesigner/designer/pics/designer_dateedit.png deleted file mode 100644 index 48286bec..00000000 Binary files a/tdevdesigner/designer/pics/designer_dateedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_datetimeedit.png b/tdevdesigner/designer/pics/designer_datetimeedit.png deleted file mode 100644 index 68a56737..00000000 Binary files a/tdevdesigner/designer/pics/designer_datetimeedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_dial.png b/tdevdesigner/designer/pics/designer_dial.png deleted file mode 100644 index 260033c2..00000000 Binary files a/tdevdesigner/designer/pics/designer_dial.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_down.png b/tdevdesigner/designer/pics/designer_down.png deleted file mode 100644 index 3269deca..00000000 Binary files a/tdevdesigner/designer/pics/designer_down.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_editbreaklayout.png b/tdevdesigner/designer/pics/designer_editbreaklayout.png deleted file mode 100644 index badbb8e7..00000000 Binary files a/tdevdesigner/designer/pics/designer_editbreaklayout.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_editcopy.png b/tdevdesigner/designer/pics/designer_editcopy.png deleted file mode 100644 index 2f931cb2..00000000 Binary files a/tdevdesigner/designer/pics/designer_editcopy.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_editcut.png b/tdevdesigner/designer/pics/designer_editcut.png deleted file mode 100644 index a911482d..00000000 Binary files a/tdevdesigner/designer/pics/designer_editcut.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_editdelete.png b/tdevdesigner/designer/pics/designer_editdelete.png deleted file mode 100644 index 9f0491dd..00000000 Binary files a/tdevdesigner/designer/pics/designer_editdelete.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_editgrid.png b/tdevdesigner/designer/pics/designer_editgrid.png deleted file mode 100644 index f2b18e8a..00000000 Binary files a/tdevdesigner/designer/pics/designer_editgrid.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_edithlayout.png b/tdevdesigner/designer/pics/designer_edithlayout.png deleted file mode 100644 index 1a2b1504..00000000 Binary files a/tdevdesigner/designer/pics/designer_edithlayout.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_edithlayoutsplit.png b/tdevdesigner/designer/pics/designer_edithlayoutsplit.png deleted file mode 100644 index cba102bc..00000000 Binary files a/tdevdesigner/designer/pics/designer_edithlayoutsplit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_editlower.png b/tdevdesigner/designer/pics/designer_editlower.png deleted file mode 100644 index 50605f27..00000000 Binary files a/tdevdesigner/designer/pics/designer_editlower.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_editpaste.png b/tdevdesigner/designer/pics/designer_editpaste.png deleted file mode 100644 index b1b7f853..00000000 Binary files a/tdevdesigner/designer/pics/designer_editpaste.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_editraise.png b/tdevdesigner/designer/pics/designer_editraise.png deleted file mode 100644 index f1572517..00000000 Binary files a/tdevdesigner/designer/pics/designer_editraise.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_editslots.png b/tdevdesigner/designer/pics/designer_editslots.png deleted file mode 100644 index b86bddb6..00000000 Binary files a/tdevdesigner/designer/pics/designer_editslots.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_editvlayout.png b/tdevdesigner/designer/pics/designer_editvlayout.png deleted file mode 100644 index f4cd3f9c..00000000 Binary files a/tdevdesigner/designer/pics/designer_editvlayout.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_editvlayoutsplit.png b/tdevdesigner/designer/pics/designer_editvlayoutsplit.png deleted file mode 100644 index 0180cf5a..00000000 Binary files a/tdevdesigner/designer/pics/designer_editvlayoutsplit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_filenew.png b/tdevdesigner/designer/pics/designer_filenew.png deleted file mode 100644 index 9520080e..00000000 Binary files a/tdevdesigner/designer/pics/designer_filenew.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_fileopen.png b/tdevdesigner/designer/pics/designer_fileopen.png deleted file mode 100644 index 30052901..00000000 Binary files a/tdevdesigner/designer/pics/designer_fileopen.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_filesave.png b/tdevdesigner/designer/pics/designer_filesave.png deleted file mode 100644 index c137165b..00000000 Binary files a/tdevdesigner/designer/pics/designer_filesave.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_folder.png b/tdevdesigner/designer/pics/designer_folder.png deleted file mode 100644 index bab6df0f..00000000 Binary files a/tdevdesigner/designer/pics/designer_folder.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_form.png b/tdevdesigner/designer/pics/designer_form.png deleted file mode 100644 index 08268bf7..00000000 Binary files a/tdevdesigner/designer/pics/designer_form.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_frame.png b/tdevdesigner/designer/pics/designer_frame.png deleted file mode 100644 index c070b9c4..00000000 Binary files a/tdevdesigner/designer/pics/designer_frame.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_groupbox.png b/tdevdesigner/designer/pics/designer_groupbox.png deleted file mode 100644 index 4025b4dc..00000000 Binary files a/tdevdesigner/designer/pics/designer_groupbox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_hand.png b/tdevdesigner/designer/pics/designer_hand.png deleted file mode 100644 index ac01ee60..00000000 Binary files a/tdevdesigner/designer/pics/designer_hand.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_help.png b/tdevdesigner/designer/pics/designer_help.png deleted file mode 100644 index 2ab2c25d..00000000 Binary files a/tdevdesigner/designer/pics/designer_help.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_home.png b/tdevdesigner/designer/pics/designer_home.png deleted file mode 100644 index 806d11d2..00000000 Binary files a/tdevdesigner/designer/pics/designer_home.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_hsplit.png b/tdevdesigner/designer/pics/designer_hsplit.png deleted file mode 100644 index 232faf14..00000000 Binary files a/tdevdesigner/designer/pics/designer_hsplit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_ibeam.png b/tdevdesigner/designer/pics/designer_ibeam.png deleted file mode 100644 index 6074c89f..00000000 Binary files a/tdevdesigner/designer/pics/designer_ibeam.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_iconview.png b/tdevdesigner/designer/pics/designer_iconview.png deleted file mode 100644 index 13b8f153..00000000 Binary files a/tdevdesigner/designer/pics/designer_iconview.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_image.png b/tdevdesigner/designer/pics/designer_image.png deleted file mode 100644 index 29854df6..00000000 Binary files a/tdevdesigner/designer/pics/designer_image.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_label.png b/tdevdesigner/designer/pics/designer_label.png deleted file mode 100644 index 5d7d7b4c..00000000 Binary files a/tdevdesigner/designer/pics/designer_label.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_layout.png b/tdevdesigner/designer/pics/designer_layout.png deleted file mode 100644 index 168eb1f8..00000000 Binary files a/tdevdesigner/designer/pics/designer_layout.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_lcdnumber.png b/tdevdesigner/designer/pics/designer_lcdnumber.png deleted file mode 100644 index 64eda5e4..00000000 Binary files a/tdevdesigner/designer/pics/designer_lcdnumber.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_left.png b/tdevdesigner/designer/pics/designer_left.png deleted file mode 100644 index e58177f4..00000000 Binary files a/tdevdesigner/designer/pics/designer_left.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_line.png b/tdevdesigner/designer/pics/designer_line.png deleted file mode 100644 index 5c64dfb5..00000000 Binary files a/tdevdesigner/designer/pics/designer_line.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_lineedit.png b/tdevdesigner/designer/pics/designer_lineedit.png deleted file mode 100644 index 75fc890f..00000000 Binary files a/tdevdesigner/designer/pics/designer_lineedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_listbox.png b/tdevdesigner/designer/pics/designer_listbox.png deleted file mode 100644 index d467fc9f..00000000 Binary files a/tdevdesigner/designer/pics/designer_listbox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_listview.png b/tdevdesigner/designer/pics/designer_listview.png deleted file mode 100644 index d71cc1c9..00000000 Binary files a/tdevdesigner/designer/pics/designer_listview.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_multilineedit.png b/tdevdesigner/designer/pics/designer_multilineedit.png deleted file mode 100644 index e2f08995..00000000 Binary files a/tdevdesigner/designer/pics/designer_multilineedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_newform.png b/tdevdesigner/designer/pics/designer_newform.png deleted file mode 100644 index 37779c13..00000000 Binary files a/tdevdesigner/designer/pics/designer_newform.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_no.png b/tdevdesigner/designer/pics/designer_no.png deleted file mode 100644 index 8bacc044..00000000 Binary files a/tdevdesigner/designer/pics/designer_no.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_object.png b/tdevdesigner/designer/pics/designer_object.png deleted file mode 100644 index cc4192ed..00000000 Binary files a/tdevdesigner/designer/pics/designer_object.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_ordertool.png b/tdevdesigner/designer/pics/designer_ordertool.png deleted file mode 100644 index ad122839..00000000 Binary files a/tdevdesigner/designer/pics/designer_ordertool.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_pixlabel.png b/tdevdesigner/designer/pics/designer_pixlabel.png deleted file mode 100644 index 32b90d82..00000000 Binary files a/tdevdesigner/designer/pics/designer_pixlabel.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_pointer.png b/tdevdesigner/designer/pics/designer_pointer.png deleted file mode 100644 index 67e38a36..00000000 Binary files a/tdevdesigner/designer/pics/designer_pointer.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_print.png b/tdevdesigner/designer/pics/designer_print.png deleted file mode 100644 index 57e3e532..00000000 Binary files a/tdevdesigner/designer/pics/designer_print.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_progress.png b/tdevdesigner/designer/pics/designer_progress.png deleted file mode 100644 index 44ae094e..00000000 Binary files a/tdevdesigner/designer/pics/designer_progress.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_project.png b/tdevdesigner/designer/pics/designer_project.png deleted file mode 100644 index 6a0fb96f..00000000 Binary files a/tdevdesigner/designer/pics/designer_project.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_pushbutton.png b/tdevdesigner/designer/pics/designer_pushbutton.png deleted file mode 100644 index 61f779ce..00000000 Binary files a/tdevdesigner/designer/pics/designer_pushbutton.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_qtlogo.png b/tdevdesigner/designer/pics/designer_qtlogo.png deleted file mode 100644 index 4e1a1472..00000000 Binary files a/tdevdesigner/designer/pics/designer_qtlogo.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_radiobutton.png b/tdevdesigner/designer/pics/designer_radiobutton.png deleted file mode 100644 index 10c1d8c3..00000000 Binary files a/tdevdesigner/designer/pics/designer_radiobutton.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_redo.png b/tdevdesigner/designer/pics/designer_redo.png deleted file mode 100644 index abdad26c..00000000 Binary files a/tdevdesigner/designer/pics/designer_redo.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_resetproperty.png b/tdevdesigner/designer/pics/designer_resetproperty.png deleted file mode 100644 index cc0d6a26..00000000 Binary files a/tdevdesigner/designer/pics/designer_resetproperty.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_richtextedit.png b/tdevdesigner/designer/pics/designer_richtextedit.png deleted file mode 100644 index 73573a8a..00000000 Binary files a/tdevdesigner/designer/pics/designer_richtextedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_right.png b/tdevdesigner/designer/pics/designer_right.png deleted file mode 100644 index 5f2f7036..00000000 Binary files a/tdevdesigner/designer/pics/designer_right.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_s_down.png b/tdevdesigner/designer/pics/designer_s_down.png deleted file mode 100644 index 908e55e1..00000000 Binary files a/tdevdesigner/designer/pics/designer_s_down.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_s_editcut.png b/tdevdesigner/designer/pics/designer_s_editcut.png deleted file mode 100644 index 7cf5a9eb..00000000 Binary files a/tdevdesigner/designer/pics/designer_s_editcut.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_s_left.png b/tdevdesigner/designer/pics/designer_s_left.png deleted file mode 100644 index e6e19f8f..00000000 Binary files a/tdevdesigner/designer/pics/designer_s_left.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_s_right.png b/tdevdesigner/designer/pics/designer_s_right.png deleted file mode 100644 index bfccda6b..00000000 Binary files a/tdevdesigner/designer/pics/designer_s_right.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_s_up.png b/tdevdesigner/designer/pics/designer_s_up.png deleted file mode 100644 index 97705d47..00000000 Binary files a/tdevdesigner/designer/pics/designer_s_up.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_scrollbar.png b/tdevdesigner/designer/pics/designer_scrollbar.png deleted file mode 100644 index 466c58de..00000000 Binary files a/tdevdesigner/designer/pics/designer_scrollbar.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_searchfind.png b/tdevdesigner/designer/pics/designer_searchfind.png deleted file mode 100644 index 3f369fdb..00000000 Binary files a/tdevdesigner/designer/pics/designer_searchfind.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_setbuddy.png b/tdevdesigner/designer/pics/designer_setbuddy.png deleted file mode 100644 index c1edb89b..00000000 Binary files a/tdevdesigner/designer/pics/designer_setbuddy.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_sizeall.png b/tdevdesigner/designer/pics/designer_sizeall.png deleted file mode 100644 index fa2a266a..00000000 Binary files a/tdevdesigner/designer/pics/designer_sizeall.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_sizeb.png b/tdevdesigner/designer/pics/designer_sizeb.png deleted file mode 100644 index ac5235b0..00000000 Binary files a/tdevdesigner/designer/pics/designer_sizeb.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_sizef.png b/tdevdesigner/designer/pics/designer_sizef.png deleted file mode 100644 index 28a30c29..00000000 Binary files a/tdevdesigner/designer/pics/designer_sizef.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_sizeh.png b/tdevdesigner/designer/pics/designer_sizeh.png deleted file mode 100644 index 7b8abd3a..00000000 Binary files a/tdevdesigner/designer/pics/designer_sizeh.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_sizev.png b/tdevdesigner/designer/pics/designer_sizev.png deleted file mode 100644 index 80b3d8b2..00000000 Binary files a/tdevdesigner/designer/pics/designer_sizev.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_slider.png b/tdevdesigner/designer/pics/designer_slider.png deleted file mode 100644 index 525bd1ca..00000000 Binary files a/tdevdesigner/designer/pics/designer_slider.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_spacer.png b/tdevdesigner/designer/pics/designer_spacer.png deleted file mode 100644 index 926e8afc..00000000 Binary files a/tdevdesigner/designer/pics/designer_spacer.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_spinbox.png b/tdevdesigner/designer/pics/designer_spinbox.png deleted file mode 100644 index 7ae20630..00000000 Binary files a/tdevdesigner/designer/pics/designer_spinbox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_splash.png b/tdevdesigner/designer/pics/designer_splash.png deleted file mode 100644 index d3b62a17..00000000 Binary files a/tdevdesigner/designer/pics/designer_splash.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_table.png b/tdevdesigner/designer/pics/designer_table.png deleted file mode 100644 index 4bbd9c2d..00000000 Binary files a/tdevdesigner/designer/pics/designer_table.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_tabwidget.png b/tdevdesigner/designer/pics/designer_tabwidget.png deleted file mode 100644 index 1254bb63..00000000 Binary files a/tdevdesigner/designer/pics/designer_tabwidget.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textbold.png b/tdevdesigner/designer/pics/designer_textbold.png deleted file mode 100644 index 7f4f7344..00000000 Binary files a/tdevdesigner/designer/pics/designer_textbold.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textbrowser.png b/tdevdesigner/designer/pics/designer_textbrowser.png deleted file mode 100644 index 090e2f84..00000000 Binary files a/tdevdesigner/designer/pics/designer_textbrowser.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textcenter.png b/tdevdesigner/designer/pics/designer_textcenter.png deleted file mode 100644 index 5c68b09c..00000000 Binary files a/tdevdesigner/designer/pics/designer_textcenter.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textedit.png b/tdevdesigner/designer/pics/designer_textedit.png deleted file mode 100644 index 823d0818..00000000 Binary files a/tdevdesigner/designer/pics/designer_textedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textfont.png b/tdevdesigner/designer/pics/designer_textfont.png deleted file mode 100644 index a4de87a4..00000000 Binary files a/tdevdesigner/designer/pics/designer_textfont.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_texth1.png b/tdevdesigner/designer/pics/designer_texth1.png deleted file mode 100644 index 1c3aa2fd..00000000 Binary files a/tdevdesigner/designer/pics/designer_texth1.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_texth2.png b/tdevdesigner/designer/pics/designer_texth2.png deleted file mode 100644 index ba73121d..00000000 Binary files a/tdevdesigner/designer/pics/designer_texth2.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_texth3.png b/tdevdesigner/designer/pics/designer_texth3.png deleted file mode 100644 index 1d9f8732..00000000 Binary files a/tdevdesigner/designer/pics/designer_texth3.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textitalic.png b/tdevdesigner/designer/pics/designer_textitalic.png deleted file mode 100644 index 68e2b44c..00000000 Binary files a/tdevdesigner/designer/pics/designer_textitalic.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textjustify.png b/tdevdesigner/designer/pics/designer_textjustify.png deleted file mode 100644 index 6e746c80..00000000 Binary files a/tdevdesigner/designer/pics/designer_textjustify.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textlarger.png b/tdevdesigner/designer/pics/designer_textlarger.png deleted file mode 100644 index 89960939..00000000 Binary files a/tdevdesigner/designer/pics/designer_textlarger.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textleft.png b/tdevdesigner/designer/pics/designer_textleft.png deleted file mode 100644 index 72b27652..00000000 Binary files a/tdevdesigner/designer/pics/designer_textleft.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textlinebreak.png b/tdevdesigner/designer/pics/designer_textlinebreak.png deleted file mode 100644 index 081a49e0..00000000 Binary files a/tdevdesigner/designer/pics/designer_textlinebreak.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textparagraph.png b/tdevdesigner/designer/pics/designer_textparagraph.png deleted file mode 100644 index dcd0b3ea..00000000 Binary files a/tdevdesigner/designer/pics/designer_textparagraph.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textright.png b/tdevdesigner/designer/pics/designer_textright.png deleted file mode 100644 index d7186722..00000000 Binary files a/tdevdesigner/designer/pics/designer_textright.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textsmaller.png b/tdevdesigner/designer/pics/designer_textsmaller.png deleted file mode 100644 index 10953d9a..00000000 Binary files a/tdevdesigner/designer/pics/designer_textsmaller.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textteletext.png b/tdevdesigner/designer/pics/designer_textteletext.png deleted file mode 100644 index c0204636..00000000 Binary files a/tdevdesigner/designer/pics/designer_textteletext.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textunderline.png b/tdevdesigner/designer/pics/designer_textunderline.png deleted file mode 100644 index 3477ccb3..00000000 Binary files a/tdevdesigner/designer/pics/designer_textunderline.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_textview.png b/tdevdesigner/designer/pics/designer_textview.png deleted file mode 100644 index ec2270c3..00000000 Binary files a/tdevdesigner/designer/pics/designer_textview.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_timeedit.png b/tdevdesigner/designer/pics/designer_timeedit.png deleted file mode 100644 index 01b37888..00000000 Binary files a/tdevdesigner/designer/pics/designer_timeedit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_toolbox.png b/tdevdesigner/designer/pics/designer_toolbox.png deleted file mode 100644 index 2ab71dc7..00000000 Binary files a/tdevdesigner/designer/pics/designer_toolbox.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_toolbutton.png b/tdevdesigner/designer/pics/designer_toolbutton.png deleted file mode 100644 index 25d240a1..00000000 Binary files a/tdevdesigner/designer/pics/designer_toolbutton.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_undo.png b/tdevdesigner/designer/pics/designer_undo.png deleted file mode 100644 index 839a823f..00000000 Binary files a/tdevdesigner/designer/pics/designer_undo.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_up.png b/tdevdesigner/designer/pics/designer_up.png deleted file mode 100644 index e4373122..00000000 Binary files a/tdevdesigner/designer/pics/designer_up.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_uparrow.png b/tdevdesigner/designer/pics/designer_uparrow.png deleted file mode 100644 index eefe4a00..00000000 Binary files a/tdevdesigner/designer/pics/designer_uparrow.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_vsplit.png b/tdevdesigner/designer/pics/designer_vsplit.png deleted file mode 100644 index b820c19f..00000000 Binary files a/tdevdesigner/designer/pics/designer_vsplit.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_wait.png b/tdevdesigner/designer/pics/designer_wait.png deleted file mode 100644 index 5d8cfed2..00000000 Binary files a/tdevdesigner/designer/pics/designer_wait.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_widgetstack.png b/tdevdesigner/designer/pics/designer_widgetstack.png deleted file mode 100644 index c326de81..00000000 Binary files a/tdevdesigner/designer/pics/designer_widgetstack.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_wizarddata.png b/tdevdesigner/designer/pics/designer_wizarddata.png deleted file mode 100644 index 9493e3b1..00000000 Binary files a/tdevdesigner/designer/pics/designer_wizarddata.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_wizarddialog.png b/tdevdesigner/designer/pics/designer_wizarddialog.png deleted file mode 100644 index a22dc88a..00000000 Binary files a/tdevdesigner/designer/pics/designer_wizarddialog.png and /dev/null differ diff --git a/tdevdesigner/designer/pics/designer_wordwrap.png b/tdevdesigner/designer/pics/designer_wordwrap.png deleted file mode 100644 index 29513c32..00000000 Binary files a/tdevdesigner/designer/pics/designer_wordwrap.png and /dev/null differ diff --git a/tdevdesigner/designer/pixmapchooser.cpp b/tdevdesigner/designer/pixmapchooser.cpp deleted file mode 100644 index 279997ba..00000000 --- a/tdevdesigner/designer/pixmapchooser.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include // HP-UX compiler needs this here - -#include -#include -#include -#include -#include - -#include "tdevdesigner_part.h" - -#include "pixmapchooser.h" -#include "formwindow.h" -#if defined(DESIGNER) && !defined(RESOURCE) -#include "pixmapfunction.h" -#endif -#include "metadatabase.h" -#include "mainwindow.h" -#include "pixmapcollectioneditor.h" -#include "pixmapcollection.h" -#include "project.h" - -#include -#include -#include -#include -#include -#include - -#if defined(DESIGNER) -static ImageIconProvider *imageIconProvider = 0; -#endif - -PixmapView::PixmapView( TQWidget *parent ) - : TQScrollView( parent ) -{ - viewport()->setBackgroundMode( PaletteBase ); -} - -void PixmapView::setPixmap( const TQPixmap &pix ) -{ - pixmap = pix; - resizeContents( pixmap.size().width(), pixmap.size().height() ); - viewport()->repaint( FALSE ); -} - -void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch ) -{ - p->fillRect( cx, cy, cw, ch, colorGroup().brush( TQColorGroup::Base ) ); - p->drawPixmap( 0, 0, pixmap ); -} - -void PixmapView::previewUrl( const TQUrl &u ) -{ - if ( u.isLocalFile() ) { - TQString path = u.path(); - TQPixmap pix( path ); - if ( !pix.isNull() ) - setPixmap( pix ); - } else { - tqWarning( "Previewing remote files not supported." ); - } -} - -static void buildImageFormatList( TQString &filter, TQString &all ) -{ - all = tqApp->translate( "qChoosePixmap", "All Pixmaps (" ); - for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) { - TQString outputFormat = TQImageIO::outputFormats().at( i ); - TQString outputExtension; - if ( outputFormat != "JPEG" ) - outputExtension = outputFormat.lower(); - else - outputExtension = "jpg;*.jpeg"; - filter += TQString(tqApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" )). - arg( outputFormat ).arg( "*." + outputExtension); - all += "*." + outputExtension + ";"; - } - filter.prepend( all + tqApp->translate( "qChoosePixmap", ")\n" ) ); - filter += tqApp->translate( "qChoosePixmap", "All Files (*)" ); - -} -TQStringList qChoosePixmaps( TQWidget *parent ) -{ -/* if ( !imageIconProvider && !TQFileDialog::iconProvider() ) - TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); - - TQString filter; - TQString all; - buildImageFormatList( filter, all ); - - TQFileDialog fd( TQString(), filter, parent, 0, TRUE ); - fd.setMode( TQFileDialog::ExistingFiles ); - fd.setContentsPreviewEnabled( TRUE ); - PixmapView *pw = new PixmapView( &fd ); - fd.setContentsPreview( pw, pw ); - fd.setViewMode( TQFileDialog::List ); - fd.setPreviewMode( TQFileDialog::Contents ); - fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images..." ) ); - if ( fd.exec() == TQDialog::Accepted ) - return fd.selectedFiles(); - return TQStringList();*/ - TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading ); - KFileDialog dlg(TQString(), mimetypes.join(" "), parent, "filedialog", true); - dlg.setOperationMode( KFileDialog::Opening ); - dlg.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images..." ) ); - dlg.setMode( KFile::Files ); - KImageFilePreview *ip = new KImageFilePreview( &dlg ); - dlg.setPreviewWidget( ip ); - if (dlg.exec()) - return dlg.selectedFiles(); - return TQStringList(); -} - -TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, TQString *fn ) -{ -#if defined(DESIGNER) - if ( !fw || fw->savePixmapInline() ) { -/* if ( !imageIconProvider && !TQFileDialog::iconProvider() ) - TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); - - TQString filter; - TQString all; - buildImageFormatList( filter, all ); - - TQFileDialog fd( TQString(), filter, parent, 0, TRUE ); - fd.setContentsPreviewEnabled( TRUE ); - PixmapView *pw = new PixmapView( &fd ); - fd.setContentsPreview( pw, pw ); - fd.setViewMode( TQFileDialog::List ); - fd.setPreviewMode( TQFileDialog::Contents ); - fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Pixmap" ) ); - if ( fd.exec() == TQDialog::Accepted ) { - TQPixmap pix( fd.selectedFile() ); - if ( fn ) - *fn = fd.selectedFile(); - MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), fd.selectedFile() ); - return pix; - }*/ - TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading ); - KFileDialog dlg(TQString(), mimetypes.join(" "), parent, "filedialog", true); - dlg.setOperationMode( KFileDialog::Opening ); - dlg.setCaption( tqApp->translate( "qChoosePixmap", "Choose Pixmap" ) ); - dlg.setMode( KFile::File ); - KImageFilePreview *ip = new KImageFilePreview( &dlg ); - dlg.setPreviewWidget( ip ); - if (dlg.exec()) - { - TQPixmap pix( dlg.selectedURL().path() ); - if ( fn ) - *fn = dlg.selectedURL().path(); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dlg.selectedURL().path() ); - return pix; - } - } else if ( fw && fw->savePixmapInProject() ) { - PixmapCollectionEditor dia( parent, 0, TRUE ); - dia.setProject( fw->project() ); - dia.setChooserMode( TRUE ); - dia.setCurrentItem( MetaDataBase::pixmapKey( TQT_TQOBJECT(fw), old.serialNumber() ) ); - if ( dia.exec() == TQDialog::Accepted ) { - TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) ); - MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), pix.serialNumber(), dia.viewPixmaps->currentItem()->text() ); - return pix; - } - } else { - PixmapFunction dia( parent, 0, TRUE ); - TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" ); - dia.editArguments->setText( MetaDataBase::pixmapArgument( TQT_TQOBJECT(fw), old.serialNumber() ) ); - dia.editArguments->setFocus(); - if ( dia.exec() == TQDialog::Accepted ) { - TQPixmap pix; - // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that - pix.convertFromImage( BarIcon( "designer_image.png", TDevDesignerPartFactory::instance() ).convertToImage() ); - - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() ); - return pix; - } - } -#else - Q_UNUSED( parent ); - Q_UNUSED( fw ); - Q_UNUSED( old ); -#endif - return TQPixmap(); -} - -ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name ) - : TQFileIconProvider( TQT_TQOBJECT(parent), name ), imagepm( BarIcon( "designer_image.png", TDevDesignerPartFactory::instance() ) ) -{ - fmts = TQImage::inputFormats(); -} - -ImageIconProvider::~ImageIconProvider() -{ -} - -const TQPixmap * ImageIconProvider::pixmap( const TQFileInfo &fi ) -{ - TQString ext = fi.extension().upper(); - if ( fmts.contains( ext ) ) { - return &imagepm; - } else { - return TQFileIconProvider::pixmap( fi ); - } -} diff --git a/tdevdesigner/designer/pixmapchooser.h b/tdevdesigner/designer/pixmapchooser.h deleted file mode 100644 index c6523488..00000000 --- a/tdevdesigner/designer/pixmapchooser.h +++ /dev/null @@ -1,74 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PIXMAPCHOOSER_H -#define PIXMAPCHOOSER_H - -#include -#include -#include -#include - -class FormWindow; - -class PixmapView : public TQScrollView, - public TQFilePreview -{ - Q_OBJECT - - -public: - PixmapView( TQWidget *parent ); - void setPixmap( const TQPixmap &pix ); - void drawContents( TQPainter *p, int, int, int, int ); - void previewUrl( const TQUrl &u ); - -private: - TQPixmap pixmap; - -}; - -class ImageIconProvider : public TQFileIconProvider -{ - Q_OBJECT - - -public: - ImageIconProvider( TQWidget *parent = 0, const char *name = 0 ); - ~ImageIconProvider(); - - const TQPixmap *pixmap( const TQFileInfo &fi ); - -private: - TQStrList fmts; - TQPixmap imagepm; - -}; - -TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw = 0, const TQPixmap &old = TQPixmap(), TQString *fn = 0 ); -TQStringList qChoosePixmaps( TQWidget *parent ); - -#endif diff --git a/tdevdesigner/designer/pixmapcollection.cpp b/tdevdesigner/designer/pixmapcollection.cpp deleted file mode 100644 index 880423a3..00000000 --- a/tdevdesigner/designer/pixmapcollection.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "pixmapcollection.h" -#include "project.h" -#include "mainwindow.h" -#include -#include -#include -#include -#include - -PixmapCollection::PixmapCollection( Project *pro ) - : project( pro ) -{ - iface = new DesignerPixmapCollectionImpl( this ); - mimeSourceFactory = new TQMimeSourceFactory(); -} - -PixmapCollection::~PixmapCollection() -{ - delete mimeSourceFactory; - delete iface; -} - -bool PixmapCollection::addPixmap( const Pixmap &pix, bool force ) -{ - Pixmap pixmap = pix; - savePixmap( pixmap ); - - if ( !force ) { - for ( TQValueList::Iterator it = pixList.begin(); it != pixList.end(); ++it ) { - if ( (*it).name == pixmap.name ) - return FALSE; - } - } - - pixList.append( pixmap ); - mimeSourceFactory->setPixmap( pixmap.name, pixmap.pix ); - project->setModified( TRUE ); - return TRUE; -} - -void PixmapCollection::removePixmap( const TQString &name ) -{ - for ( TQValueList::Iterator it = pixList.begin(); it != pixList.end(); ++it ) { - if ( (*it).name == name ) { - pixList.remove( it ); - break; - } - } - project->setModified( TRUE ); -} - -TQValueList PixmapCollection::pixmaps() const -{ - return pixList; -} - -TQString PixmapCollection::unifyName( const TQString &n ) -{ - TQString name = n; - bool restart = FALSE; - int added = 1; - - for ( TQValueList::Iterator it = pixList.begin(); it != pixList.end(); ++it ) { - if ( restart ) - it = pixList.begin(); - restart = FALSE; - if ( name == (*it).name ) { - name = n; - name += "_" + TQString::number( added ); - ++added; - restart = TRUE; - } - } - - return name; -} - -void PixmapCollection::setActive( bool b ) -{ - if ( b ) - TQMimeSourceFactory::defaultFactory()->addFactory( mimeSourceFactory ); - else - TQMimeSourceFactory::defaultFactory()->removeFactory( mimeSourceFactory ); -} - -TQPixmap PixmapCollection::pixmap( const TQString &name ) -{ - for ( TQValueList::Iterator it = pixList.begin(); it != pixList.end(); ++it ) { - if ( (*it).name == name ) - return (*it).pix; - } - return TQPixmap(); -} - -void PixmapCollection::savePixmap( Pixmap &pix ) -{ - if ( pix.absname == imageDir() + "/" + pix.name ) - return; // no need to save, it is already there - TQString rel = project->makeRelative( pix.absname ); - if ( rel[0] == '/' || ( rel[1] == ':' && rel[2] == '/' ) ) { // only save if file is outside the project - mkdir(); - pix.name = unifyName( TQFileInfo( pix.absname ).baseName() ) + ".png"; - pix.absname = imageDir() + "/" + pix.name; - pix.pix.save( pix.absname, "PNG" ); - } else if ( rel.isEmpty() ) { - mkdir(); - pix.name = unifyName( pix.name ); - pix.absname = imageDir() + "/" + pix.name; - pix.pix.save( pix.absname, "PNG" ); - } -} - -TQString PixmapCollection::imageDir() const -{ - return TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/images"; -} - -void PixmapCollection::mkdir() -{ - TQString f = project->fileName(); - TQDir d( TQFileInfo( f ).dirPath( TRUE ) ); - d.mkdir( "images" ); -} - -void PixmapCollection::load( const TQString& filename ) -{ - if ( filename.isEmpty() ) - return; - TQString absfile; - if ( filename[0] == '/' ) - absfile = filename; - else - absfile = TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/" + filename; - - TQPixmap pm( absfile ); - if ( pm.isNull() ) - return; - - Pixmap pix; - pix.name = TQFileInfo( absfile ).fileName(); - pix.absname = absfile; - pix.pix = pm; - addPixmap( pix, TRUE ); -} - -DesignerPixmapCollection *PixmapCollection::iFace() -{ - return iface; -} - -bool PixmapCollection::isEmpty() const -{ - return pixList.isEmpty(); -} diff --git a/tdevdesigner/designer/pixmapcollection.h b/tdevdesigner/designer/pixmapcollection.h deleted file mode 100644 index 10d630fc..00000000 --- a/tdevdesigner/designer/pixmapcollection.h +++ /dev/null @@ -1,80 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PIXMAPCOLLECTION_H -#define PIXMAPCOLLECTION_H - -#include -#include -#include -#include "designerappiface.h" - -class TQMimeSourceFactory; -class Project; - -class PixmapCollection -{ -public: - struct Pixmap - { - TQPixmap pix; - TQString name; - TQString absname; - TQ_DUMMY_COMPARISON_OPERATOR( Pixmap ) - }; - - PixmapCollection( Project *pro ); - ~PixmapCollection(); - - bool addPixmap( const Pixmap &pix, bool force = TRUE ); - void removePixmap( const TQString &name ); - TQPixmap pixmap( const TQString &name ); - - TQValueList pixmaps() const; - bool isEmpty() const; - - void setActive( bool b ); - - void load( const TQString& filename ); - - DesignerPixmapCollection *iFace(); - -private: - TQString unifyName( const TQString &n ); - void savePixmap( Pixmap &pix ); - - TQString imageDir() const; - void mkdir(); - -private: - TQValueList pixList; - TQMimeSourceFactory *mimeSourceFactory; - Project *project; - DesignerPixmapCollectionImpl *iface; - -}; - -#endif diff --git a/tdevdesigner/designer/pixmapcollectioneditor.ui b/tdevdesigner/designer/pixmapcollectioneditor.ui deleted file mode 100644 index 30f74183..00000000 --- a/tdevdesigner/designer/pixmapcollectioneditor.ui +++ /dev/null @@ -1,218 +0,0 @@ - -PixmapCollectionEditor -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - PixmapCollectionEditor - - - - 0 - 0 - 455 - 260 - - - - Manage Image Collection - - - - unnamed - - - 11 - - - 6 - - - - viewPixmaps - - - Adjust - - - false - - - - - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - PushButton2 - - - &Add... - - - - - PushButton3 - - - &Delete - - - - - Spacer2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - - - buttonCancel - - - &Cancel - - - - - buttonClose - - - C&lose - - - true - - - - - - - - - PushButton2 - clicked() - PixmapCollectionEditor - addPixmap() - - - PushButton3 - clicked() - PixmapCollectionEditor - removePixmap() - - - viewPixmaps - currentChanged(TQIconViewItem*) - PixmapCollectionEditor - currentChanged(TQIconViewItem*) - - - buttonOk - clicked() - PixmapCollectionEditor - accept() - - - buttonCancel - clicked() - PixmapCollectionEditor - reject() - - - buttonClose - clicked() - PixmapCollectionEditor - accept() - - - - PushButton2 - PushButton3 - viewPixmaps - buttonClose - - - pixmapcollection.h - pixmapchooser.h - project.h - tqfileinfo.h - tqimage.h - tqpixmap.h - pixmapcollectioneditor.ui.h - - - class Project; - - - Project *project; - bool chooser; - - - init() - destroy() - addPixmap() - removePixmap() - updateView() - currentChanged(TQIconViewItem * i) - setChooserMode(bool c) - setCurrentItem(const TQString & name) - setProject(Project * pro) - scaledPixmap(const TQPixmap & p) - - - diff --git a/tdevdesigner/designer/pixmapcollectioneditor.ui.h b/tdevdesigner/designer/pixmapcollectioneditor.ui.h deleted file mode 100644 index 82bd7929..00000000 --- a/tdevdesigner/designer/pixmapcollectioneditor.ui.h +++ /dev/null @@ -1,150 +0,0 @@ -#include -/********************************************************************** -** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -void PixmapCollectionEditor::init() -{ - project = 0; - setChooserMode( FALSE ); -} - -void PixmapCollectionEditor::destroy() -{ -} - -void PixmapCollectionEditor::addPixmap() -{ - if ( !project ) - return; - - TQString f; - TQStringList pixmaps = qChoosePixmaps( this ); - if ( pixmaps.isEmpty() ) - return; - - TQString lastName; - for ( TQStringList::ConstIterator it = pixmaps.begin(); it != pixmaps.end(); ++it ) { - TQPixmap pm( *it ); - if ( pm.isNull() ) - continue; - PixmapCollection::Pixmap pixmap; - pixmap.pix = pm; - TQFileInfo fi ( *it ); - pixmap.name = fi.fileName(); - pixmap.absname = fi.filePath(); - if ( !project->pixmapCollection()->addPixmap( pixmap, FALSE ) ) - continue; - lastName = pixmap.name; - } - - updateView(); - TQIconViewItem *item = viewPixmaps->findItem( lastName ); - if ( item ) { - viewPixmaps->setCurrentItem( item ); - viewPixmaps->ensureItemVisible( item ); - } - -} - -void PixmapCollectionEditor::removePixmap() -{ - if ( !project || !viewPixmaps->currentItem() ) - return; - project->pixmapCollection()->removePixmap( viewPixmaps->currentItem()->text() ); - updateView(); -} - -void PixmapCollectionEditor::updateView() -{ - if ( !project ) - return; - - viewPixmaps->clear(); - - TQValueList pixmaps = project->pixmapCollection()->pixmaps(); - for ( TQValueList::Iterator it = pixmaps.begin(); it != pixmaps.end(); ++it ) { - // #### might need to scale down the pixmap - TQIconViewItem *item = new TQIconViewItem( viewPixmaps, (*it).name, scaledPixmap( (*it).pix ) ); - //item->setRenameEnabled( TRUE ); // this will be a bit harder to implement - item->setDragEnabled( FALSE ); - item->setDropEnabled( FALSE ); - } - viewPixmaps->setCurrentItem( viewPixmaps->firstItem() ); - currentChanged( viewPixmaps->firstItem() ); -} - -void PixmapCollectionEditor::currentChanged( TQIconViewItem * i ) -{ - buttonOk->setEnabled( !!i ); -} - -void PixmapCollectionEditor::setChooserMode( bool c ) -{ - chooser = c; - if ( chooser ) { - buttonClose->hide(); - buttonOk->show(); - buttonCancel->show(); - buttonOk->setEnabled( FALSE ); - buttonOk->setDefault( TRUE ); - connect( viewPixmaps, TQT_SIGNAL( doubleClicked( TQIconViewItem * ) ), buttonOk, TQT_SIGNAL( clicked() ) ); - connect( viewPixmaps, TQT_SIGNAL( returnPressed( TQIconViewItem * ) ), buttonOk, TQT_SIGNAL( clicked() ) ); - setCaption( i18n( "Choose Image" ) ); - } else { - buttonClose->show(); - buttonOk->hide(); - buttonCancel->hide(); - buttonClose->setDefault( TRUE ); - } - updateView(); -} - -void PixmapCollectionEditor::setCurrentItem( const TQString & name ) -{ - TQIconViewItem *i = viewPixmaps->findItem( name ); - if ( i ) { - viewPixmaps->setCurrentItem( i ); - currentChanged( i ); - } -} - -void PixmapCollectionEditor::setProject( Project * pro ) -{ - project = pro; - updateView(); -} - -TQPixmap PixmapCollectionEditor::scaledPixmap( const TQPixmap & p ) -{ - TQPixmap pix( p ); - if ( pix.width() < 50 && pix.height() < 50 ) - return pix; - TQImage img; - img = pix; - img = img.smoothScale( 50, 50 ); - pix.convertFromImage( img ); - return pix; -} diff --git a/tdevdesigner/designer/pixmapfunction.ui b/tdevdesigner/designer/pixmapfunction.ui deleted file mode 100644 index 760abe56..00000000 --- a/tdevdesigner/designer/pixmapfunction.ui +++ /dev/null @@ -1,976 +0,0 @@ - -PixmapFunction -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - PixmapFunction - - - - 0 - 0 - 305 - 120 - - - - Choose Pixmap - - - true - - - - unnamed - - - 11 - - - 6 - - - - TextLabel3 - - - &Enter arguments for loading the pixmap: - - - editArguments - - - - - Frame9 - - - StyledPanel - - - Sunken - - - 2 - - - - - - - - unnamed - - - 2 - - - 0 - - - - labelFunction - - - - - - 0 - 0 - 0 - - - 211 - 211 - 211 - - - 255 - 255 - 255 - - - 233 - 233 - 233 - - - 105 - 105 - 105 - - - 140 - 140 - 140 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - 128 - 128 - 128 - - - 211 - 211 - 211 - - - 255 - 255 - 255 - - - 242 - 242 - 242 - - - 105 - 105 - 105 - - - 140 - 140 - 140 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - 211 - 211 - 211 - - - 255 - 255 - 255 - - - 242 - 242 - 242 - - - 105 - 105 - 105 - - - 140 - 140 - 140 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - - QPixmap( - - - - - editArguments - - - - - - 0 - 0 - 0 - - - 211 - 211 - 211 - - - 255 - 255 - 255 - - - 233 - 233 - 233 - - - 105 - 105 - 105 - - - 140 - 140 - 140 - - - 0 - 170 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 211 - 211 - 211 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - 128 - 128 - 128 - - - 211 - 211 - 211 - - - 255 - 255 - 255 - - - 242 - 242 - 242 - - - 105 - 105 - 105 - - - 140 - 140 - 140 - - - 0 - 170 - 0 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 211 - 211 - 211 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - 211 - 211 - 211 - - - 255 - 255 - 255 - - - 242 - 242 - 242 - - - 105 - 105 - 105 - - - 140 - 140 - 140 - - - 0 - 170 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 211 - 211 - 211 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - - false - - - - - TextLabel5 - - - - - - 0 - 0 - 0 - - - 211 - 211 - 211 - - - 255 - 255 - 255 - - - 233 - 233 - 233 - - - 105 - 105 - 105 - - - 140 - 140 - 140 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - 128 - 128 - 128 - - - 211 - 211 - 211 - - - 255 - 255 - 255 - - - 242 - 242 - 242 - - - 105 - 105 - 105 - - - 140 - 140 - 140 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - 211 - 211 - 211 - - - 255 - 255 - 255 - - - 242 - 242 - 242 - - - 105 - 105 - 105 - - - 140 - 140 - 140 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - - ) - - - - - - - Spacer1 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - Layout3 - - - - unnamed - - - 0 - - - 6 - - - - helpButton - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - - - buttonCancel - - - &Cancel - - - true - - - - - - - - - buttonOk - clicked() - PixmapFunction - accept() - - - buttonCancel - clicked() - PixmapFunction - reject() - - - - - klineedit.h - - diff --git a/tdevdesigner/designer/popupmenueditor.cpp b/tdevdesigner/designer/popupmenueditor.cpp deleted file mode 100644 index da6289dd..00000000 --- a/tdevdesigner/designer/popupmenueditor.cpp +++ /dev/null @@ -1,1469 +0,0 @@ -/********************************************************************** -** Copyright (C) 2003 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "actiondnd.h" -#include "actioneditorimpl.h" -#include "command.h" -#include "formfile.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "metadatabase.h" -#include "pixmapchooser.h" -#include "popupmenueditor.h" -#include "menubareditor.h" - -#include - -// Drag Object Declaration ------------------------------------------- - -class PopupMenuEditorItemPtrDrag : public TQStoredDrag -{ -public: - PopupMenuEditorItemPtrDrag( PopupMenuEditorItem * item, TQWidget * parent = 0, - const char * name = 0 ); - ~PopupMenuEditorItemPtrDrag() {}; - static bool canDecode( TQDragMoveEvent * e ); - static bool decode( TQDropEvent * e, PopupMenuEditorItem ** i ); -}; - -// Drag Object Implementation --------------------------------------- - -PopupMenuEditorItemPtrDrag::PopupMenuEditorItemPtrDrag( PopupMenuEditorItem * item, - TQWidget * parent, const char * name ) - : TQStoredDrag( "qt/popupmenueditoritemptr", parent, name ) -{ - TQByteArray data( sizeof( TQ_LONG ) ); - TQDataStream stream( data, IO_WriteOnly ); - stream << ( TQ_LONG ) item; - setEncodedData( data ); -} - -bool PopupMenuEditorItemPtrDrag::canDecode( TQDragMoveEvent * e ) -{ - return e->provides( "qt/popupmenueditoritemptr" ); -} - -bool PopupMenuEditorItemPtrDrag::decode( TQDropEvent * e, PopupMenuEditorItem ** i ) -{ - TQByteArray data = e->encodedData( "qt/popupmenueditoritemptr" ); - TQDataStream stream( data, IO_ReadOnly ); - - if ( !data.size() ) - return FALSE; - - TQ_LONG p = 0; - stream >> p; - *i = ( PopupMenuEditorItem *) p; - - return TRUE; -} - -// PopupMenuEditorItem Implementation ----------------------------------- - -PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, TQObject * parent, const char * name ) - : TQObject( parent, name ), - a( 0 ), - s( 0 ), - m( menu ), - separator( FALSE ), - removable( FALSE ) -{ - init(); - a = new TQAction( this ); - TQObject::connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( selfDestruct() ) ); -} - - -PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * menu, - TQObject * parent, const char * name ) - : TQObject( parent, name ), - a( action ), - s( 0 ), - m( menu ), - separator( FALSE ), - removable( TRUE ) -{ - init(); - if ( /*a->name() == "qt_separator_action" ||*/ ::tqqt_cast(a) ) - separator = TRUE; - if ( a && !a->childrenListObject().isEmpty() ) - a->installEventFilter( this ); -} - -PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuEditor * menu, - TQObject * parent, const char * name ) - : TQObject( parent, name ), - a( item->a ), - s( 0 ), - m( menu ), - separator( item->separator ), - removable( item->removable ) -{ - init(); - if ( ::tqqt_cast(a) ) - a->installEventFilter( this ); -} - -PopupMenuEditorItem::~PopupMenuEditorItem() -{ - -} - -void PopupMenuEditorItem::init() -{ - if ( a ) { - TQObject::connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( selfDestruct() ) ); - if ( m && !isSeparator() ) { - s = new PopupMenuEditor( m->formWindow(), m ); - TQString n = "PopupMenuEditor"; - m->formWindow()->unify( TQT_TQOBJECT(s), n, TRUE ); - s->setName( n ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - } - } -} - -PopupMenuEditorItem::ItemType PopupMenuEditorItem::type() const -{ - if ( separator ) - return Separator; - else if ( a ) - return Action; - return Unknown; -} - -void PopupMenuEditorItem::setVisible( bool enable ) -{ - if ( a ) - a->setVisible( enable ); -} - -bool PopupMenuEditorItem::isVisible() const -{ - TQActionGroup *g = ::tqqt_cast(a); - if ( g ) - return ( g->isVisible() && g->usesDropDown() ); - else if ( a ) - return a->isVisible(); - return FALSE; -} - -void PopupMenuEditorItem::showMenu( int x, int y ) -{ - if ( ( !separator ) && s ) { - s->move( x, y ); - s->show(); - s->raise(); - } -} - -void PopupMenuEditorItem::hideMenu() -{ - if ( s ) { - s->hideSubMenu(); - s->hide(); - } -} - -void PopupMenuEditorItem::focusOnMenu() -{ - if ( s ) { - s->showSubMenu(); - s->setFocus(); - } -} - -int PopupMenuEditorItem::count() const -{ - if ( s ) { - return s->count(); - } else if ( ::tqqt_cast(a) ) { - const TQObjectList l = a->childrenListObject(); - if ( !l.isEmpty() ) - return l.count(); - } - return 0; -} - -bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event ) -{ - if ( ! ::tqqt_cast( o ) ) - return FALSE; - if ( event->type() == TQEvent::ChildInserted ) { - TQChildEvent * ce = ( TQChildEvent * ) event; - TQObject * c = TQT_TQOBJECT(ce->child()); - TQAction * action = ::tqqt_cast( c ); - if ( s->find( action ) != -1 ) // avoid duplicates - return FALSE; - TQActionGroup * actionGroup = ::tqqt_cast( c ); - if ( actionGroup ) - s->insert( actionGroup ); - else if ( action ) - s->insert( action ); - } - return FALSE; -} - -void PopupMenuEditorItem::selfDestruct() -{ - hideMenu(); - int i = m->find( s ); - if ( i != -1 && i < m->count() ) - m->remove( i ); // remove this item - a = 0; // the selfDestruct call was caused by the deletion of the action - delete this; -} - -// PopupMenuEditor Implementation ----------------------------------- - -PopupMenuEditorItem * PopupMenuEditor::draggedItem = 0; -int PopupMenuEditor::clipboardOperation = 0; -PopupMenuEditorItem * PopupMenuEditor::clipboardItem = 0; - -PopupMenuEditor::PopupMenuEditor( FormWindow * fw, TQWidget * parent, const char * name ) - : TQWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase | WResizeNoErase ), - formWnd( fw ), - parentMenu( parent ), - iconWidth( 0 ), - textWidth( 0 ), - accelWidth( 0 ), - arrowWidth( 30 ), - borderSize( 2 ), - currentField( 1 ), - currentIndex( 0 ) -{ - init(); -} - -PopupMenuEditor::PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu, - TQWidget * parent, const char * name ) - : TQWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase ), - formWnd( fw ), - parentMenu( parent ), - iconWidth( menu->iconWidth ), - textWidth( menu->textWidth ), - accelWidth( menu->accelWidth ), - arrowWidth( menu->arrowWidth ), - borderSize( menu->borderSize ), - currentField( menu->currentField ), - currentIndex( menu->currentIndex ) -{ - init(); - PopupMenuEditorItem * i; - for ( i = menu->itemList.first(); i; i = menu->itemList.next() ) { - PopupMenuEditorItem * n = new PopupMenuEditorItem( i, this ); - itemList.append( n ); - } -} - -PopupMenuEditor::~PopupMenuEditor() -{ - itemList.setAutoDelete( TRUE ); -} - -void PopupMenuEditor::init() -{ - reparent( ( TQMainWindow * ) formWnd->mainContainer(), pos() ); - - addItem.action()->setMenuText( i18n("new item") ); - addSeparator.action()->setMenuText( i18n("new separator") ); - - setAcceptDrops( TRUE ); - setFocusPolicy( TQ_StrongFocus ); - - lineEdit = new TQLineEdit( this ); - lineEdit->hide(); - lineEdit->setFrameStyle(TQFrame::Plain | TQFrame::NoFrame); - lineEdit->polish(); - lineEdit->setBackgroundOrigin(ParentOrigin); - lineEdit->setBackgroundMode(PaletteButton); - lineEdit->installEventFilter( this ); - - dropLine = new TQWidget( this, 0, TQt::WStyle_NoBorder | WStyle_StaysOnTop ); - dropLine->setBackgroundColor( TQt::red ); - dropLine->hide(); - - hide(); -} - -void PopupMenuEditor::insert( PopupMenuEditorItem * item, int index ) -{ - if ( !item ) - return; - if ( index == -1 ) { - itemList.append( item ); - if ( isVisible() ) - currentIndex = itemList.count() - 1; - } else { - itemList.insert( index, item ); - if ( isVisible() ) - currentIndex = index; - } - item->m = this; - item->s->parentMenu = this; - resizeToContents(); - if ( isVisible() && parentMenu ) - parentMenu->update(); // draw arrow in parent menu - emit inserted( item->action() ); -} - -void PopupMenuEditor::insert( TQAction * action, int index ) -{ - if ( !action ) - return; - insert( new PopupMenuEditorItem( action, this, 0, action->name() ), index ); -} - -void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index ) -{ - if ( !actionGroup ) - return; - bool dropdown = actionGroup->usesDropDown(); - PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, 0, - TQString( actionGroup->name() ) + "Menu" ); - TQActionGroup *g = 0; - TQObjectList *l = actionGroup->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE ); - TQObjectListIterator it( *l ); - insert( i, index ); - for ( ; it.current(); ++it ) { - g = ::tqqt_cast(it.current()); - if ( g ) { - if ( dropdown ) - i->s->insert( g ); - else - insert( g ); - } else { - i->s->insert( (TQAction*)it.current() ); - } - } - delete l; -} - -int PopupMenuEditor::find( const TQAction * action ) -{ - PopupMenuEditorItem * i = itemList.first(); - while ( i ) { - if ( i->action() == action ) - return itemList.at(); - i = itemList.next(); - } - return -1; -} - -int PopupMenuEditor::find( PopupMenuEditor * menu ) -{ - PopupMenuEditorItem * i = itemList.first(); - while ( i ) { - if ( i->subMenu() == menu ) - return itemList.at(); - i = itemList.next(); - } - return -1; -} - -int PopupMenuEditor::count() -{ - return itemList.count(); -} - -PopupMenuEditorItem * PopupMenuEditor::at( int index ) -{ - return itemList.at( index ); -} - -void PopupMenuEditor::exchange( int a, int b ) -{ - PopupMenuEditorItem * ia = itemList.at( a ); - PopupMenuEditorItem * ib = itemList.at( b ); - if ( !ia || !ib || - ia == &addItem || ia == &addSeparator || - ib == &addItem || ib == &addSeparator ) - return; // do nothing - itemList.replace( b, ia ); - itemList.replace( a, ib ); -} - -void PopupMenuEditor::cut( int index ) -{ - int idx = ( index == -1 ? currentIndex : index ); - - if ( clipboardItem && clipboardOperation == Cut ) - delete clipboardItem; - - clipboardOperation = Cut; - clipboardItem = itemList.at( idx ); - - if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) { - clipboardOperation = None; - clipboardItem = 0; - return; // do nothing - } - - RemoveActionFromPopupCommand * cmd = - new RemoveActionFromPopupCommand( i18n( "Cut Item" ), formWnd, this, idx ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void PopupMenuEditor::copy( int index ) -{ - int idx = ( index == -1 ? currentIndex : index ); - - if ( clipboardItem && clipboardOperation == Cut ) - delete clipboardItem; - - clipboardOperation = Copy; - clipboardItem = itemList.at( idx ); - - if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) { - clipboardOperation = None; - clipboardItem = 0; - } -} - -void PopupMenuEditor::paste( int index ) -{ - int idx = ( index == -1 ? currentIndex : index ); - - if ( clipboardItem && clipboardOperation ) { - PopupMenuEditorItem * n = new PopupMenuEditorItem( clipboardItem, this ); - AddActionToPopupCommand * cmd = - new AddActionToPopupCommand( i18n( "Paste Item" ), formWnd, this, n, idx ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - } -} - -void PopupMenuEditor::insertedActions( TQPtrList & list ) -{ - TQAction * a = 0; - PopupMenuEditorItem * i = itemList.first(); - - while ( i ) { - a = i->action(); - if ( a ) - list.append( a ); - i = itemList.next(); - } -} - -void PopupMenuEditor::show() -{ - resizeToContents(); - TQWidget::show(); -} - -void PopupMenuEditor::choosePixmap( int index ) -{ - int idx = ( index == -1 ? currentIndex : index ); - - PopupMenuEditorItem * i = 0; - TQAction * a = 0; - - if ( idx < (int)itemList.count() ) { - i = itemList.at( idx ); - a = i->action(); - } else { - createItem(); - } - - hide(); // qChoosePixmap hides the menu - TQIconSet icons( qChoosePixmap( 0, formWnd, 0, 0 ) ); - SetActionIconsCommand * cmd = - new SetActionIconsCommand( i18n( "Set Icon" ), formWnd, a, this, icons ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - show(); - setFocus(); -} - -void PopupMenuEditor::showLineEdit( int index ) -{ - int idx = ( index == -1 ? currentIndex : index ); - - PopupMenuEditorItem * i = 0; - - if ( idx >= (int)itemList.count() ) - i = &addItem; - else - i = itemList.at( idx ); - - // open edit currentField for item name - lineEdit->setText( i->action()->menuText() ); - lineEdit->selectAll(); - lineEdit->setGeometry( borderSize + iconWidth, borderSize + itemPos( i ), - textWidth, itemHeight( i ) ); - lineEdit->show(); - lineEdit->setFocus(); -} - -void PopupMenuEditor::setAccelerator( int key, TQt::ButtonState state, int index ) -{ - // FIXME: make this a command - - int idx = ( index == -1 ? currentIndex : index ); - - if ( key == TQt::Key_Shift || - key == TQt::Key_Control || - key == TQt::Key_Alt || - key == TQt::Key_Meta || - key == TQt::Key_unknown ) - return; // ignore these keys when they are pressed - - PopupMenuEditorItem * i = 0; - - if ( idx >= (int)itemList.count() ) - i = createItem(); - else - i = itemList.at( idx ); - - int shift = ( state & TQt::ShiftButton ? TQt::SHIFT : 0 ); - int ctrl = ( state & TQt::ControlButton ? TQt::CTRL : 0 ); - int alt = ( state & TQt::AltButton ? TQt::ALT : 0 ); - int meta = ( state & TQt::MetaButton ? TQt::META : 0 ); - - TQAction * a = i->action(); - TQKeySequence ks = a->accel(); - int keys[4] = { ks[0], ks[1], ks[2], ks[3] }; - int n = 0; - while ( n < 4 && ks[n++] ); - n--; - if ( n < 4 ) - keys[n] = key | shift | ctrl | alt | meta; - a->setAccel( TQKeySequence( keys[0], keys[1], keys[2], keys[3] ) ); - MetaDataBase::setPropertyChanged( a, "accel", TRUE ); - resizeToContents(); -} - -void PopupMenuEditor::resizeToContents() -{ - TQSize s = contentsSize(); - dropLine->resize( s.width(), 2 ); - s.rwidth() += borderSize * 2; - s.rheight() += borderSize * 2; - resize( s ); -} - -void PopupMenuEditor::showSubMenu() -{ - if ( currentIndex < (int)itemList.count() ) { - itemList.at( currentIndex )->showMenu( pos().x() + width() - borderSize * 3, - pos().y() + itemPos( at( currentIndex ) ) + - borderSize * 2 ); - setFocus(); // Keep focus in this widget - } -} - -void PopupMenuEditor::hideSubMenu() -{ - if ( currentIndex < (int)itemList.count() ) - itemList.at( currentIndex )->hideMenu(); -} - -void PopupMenuEditor::focusOnSubMenu() -{ - if ( currentIndex < (int)itemList.count() ) - itemList.at( currentIndex )->focusOnMenu(); -} - -// This function has no undo. It is only here to remove an item when its action was -// removed from the action editor. -// Use removeItem to put the command on the command stack. -void PopupMenuEditor::remove( int index ) -{ - int idx = ( index == -1 ? currentIndex : index ); - PopupMenuEditorItem * i = itemList.at( idx ); - if ( i && i->isRemovable() ) { - itemList.remove( idx ); - int n = itemList.count() + 1; - if ( currentIndex >= n ) - currentIndex = itemList.count() + 1; - emit removed( i->action() ); - resizeToContents(); - } -} - -PopupMenuEditorItem * PopupMenuEditor::createItem( TQAction * a ) -{ - ActionEditor * ae = (ActionEditor *) formWindow()->mainWindow()->child( 0, "ActionEditor" ); - if ( !a ) - a = ae->newActionEx(); - PopupMenuEditorItem * i = new PopupMenuEditorItem( a, this ); - TQString n = TQString( a->name() ) + "Item"; - formWindow()->unify( i, n, FALSE ); - i->setName( n ); - AddActionToPopupCommand * cmd = - new AddActionToPopupCommand( i18n( "Add Item" ), formWnd, this, i ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - return i; -} - -void PopupMenuEditor::removeItem( int index ) -{ - int idx = ( index == -1 ? currentIndex : index ); - if ( idx < (int)itemList.count() ) { - RemoveActionFromPopupCommand * cmd = new RemoveActionFromPopupCommand( i18n( "Remove Item" ), - formWnd, - this, - idx ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - if ( itemList.count() == 0 && parentMenu ) - parentMenu->update(); - resizeToContents(); - } -} - -PopupMenuEditorItem * PopupMenuEditor::currentItem() -{ - int count = itemList.count(); - if ( currentIndex < count ) - return itemList.at( currentIndex ); - else if ( currentIndex == count ) - return &addItem; - return &addSeparator; -} - -PopupMenuEditorItem * PopupMenuEditor::itemAt( int y ) -{ - PopupMenuEditorItem * i = itemList.first(); - int iy = 0; - - while ( i ) { - iy += itemHeight( i ); - if ( iy > y ) - return i; - i = itemList.next(); - } - iy += itemHeight( &addItem ); - if ( iy > y ) - return &addItem; - return &addSeparator; -} - -void PopupMenuEditor::setFocusAt( const TQPoint & pos ) -{ - hideSubMenu(); - lineEdit->hide(); - - currentIndex = 0; - int iy = 0; - PopupMenuEditorItem * i = itemList.first(); - - while ( i ) { - iy += itemHeight( i ); - if ( iy > pos.y() ) - break; - i = itemList.next(); - currentIndex++; - } - - iy += itemHeight( &addItem ); - if ( iy <= pos.y() ) - currentIndex++; - - if ( currentIndex < (int)itemList.count() ) { - if ( pos.x() < iconWidth ) - currentField = 0; - else if ( pos.x() < iconWidth + textWidth ) - currentField = 1; - else - currentField = 2; - } else { - currentField = 1; - } - - showSubMenu(); -} - -bool PopupMenuEditor::eventFilter( TQObject * o, TQEvent * e ) -{ - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit) && e->type() == TQEvent::FocusOut ) { - leaveEditMode( 0 ); - update(); - } - return TQWidget::eventFilter( o, e ); -} - -void PopupMenuEditor::paintEvent( TQPaintEvent * ) -{ - TQPainter p( this ); - p.save(); - TQRegion reg( rect() ); - TQRegion mid( borderSize, borderSize, - rect().width() - borderSize * 2, rect().height() - borderSize * 2 ); - reg -= mid; - p.setClipRegion( reg ); - style().tqdrawPrimitive( TQStyle::PE_PanelPopup, &p, rect(), colorGroup() ); - p.restore(); - drawItems( &p ); -} - -void PopupMenuEditor::mousePressEvent( TQMouseEvent * e ) -{ - mousePressPos = e->pos(); - setFocusAt( mousePressPos ); - e->accept(); - update(); -} - -void PopupMenuEditor::mouseDoubleClickEvent( TQMouseEvent * ) -{ - setFocusAt( mousePressPos ); - if ( currentItem() == &addSeparator ) { - PopupMenuEditorItem * i = createItem( new QSeparatorAction( 0 ) ); - i->setSeparator( TRUE ); - return; - } - if ( currentField == 0 ) { - choosePixmap(); - resizeToContents(); - } else if ( currentField == 1 ) { - showLineEdit(); - } -} - -void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) -{ - if ( e->state() & Qt::LeftButton ) { - if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) { - draggedItem = itemAt( mousePressPos.y() ); - if ( draggedItem == &addItem ) { - draggedItem = createItem(); - RenameActionCommand cmd( i18n( "Rename Item" ), formWnd, draggedItem->action(), - this, "Unnamed" ); - cmd.execute(); - // FIXME: start rename after drop - } else if ( draggedItem == &addSeparator ) { - draggedItem = createItem( new QSeparatorAction( 0 ) ); - draggedItem->setSeparator( TRUE ); - } - - PopupMenuEditorItemPtrDrag * d = - new PopupMenuEditorItemPtrDrag( draggedItem, this ); - - hideSubMenu(); - - draggedItem->setVisible( FALSE ); - resizeToContents(); - - // If the item is dropped in the same list, - // we will have two instances of the same pointer - // in the list. We use node instead. - int idx = itemList.find( draggedItem ); - TQLNode * node = itemList.currentNode(); - - d->dragCopy(); // dragevents and stuff happens - - if ( draggedItem ) { // item was not dropped - draggedItem->setVisible( TRUE ); - draggedItem = 0; - if ( hasFocus() ) { - hideSubMenu(); - resizeToContents(); - showSubMenu(); - } - } else { // item was dropped - itemList.takeNode( node )->setVisible( TRUE ); - if ( currentIndex > 0 && currentIndex > idx ) - --currentIndex; - // the drop might happen in another menu, so we'll resize - // and show the submenu there - } - } - } -} - -void PopupMenuEditor::dragEnterEvent( TQDragEnterEvent * e ) -{ - if ( e->provides( "qt/popupmenueditoritemptr" ) || - e->provides( "application/x-designer-actions" ) || - e->provides( "application/x-designer-actiongroup" ) ) { - e->accept(); - dropLine->show(); - } -} - -void PopupMenuEditor::dragLeaveEvent( TQDragLeaveEvent * ) -{ - dropLine->hide(); -} - -void PopupMenuEditor::dragMoveEvent( TQDragMoveEvent * e ) -{ - TQPoint pos = e->pos(); - dropLine->move( borderSize, snapToItem( pos.y() ) ); - - if ( currentItem() != itemAt( pos.y() ) ) { - hideSubMenu(); - setFocusAt( pos ); - showSubMenu(); - } -} - -void PopupMenuEditor::dropEvent( TQDropEvent * e ) -{ - if ( !( e->provides( "qt/popupmenueditoritemptr" ) || - e->provides( "application/x-designer-actions" ) || - e->provides( "application/x-designer-actiongroup" ) ) ) - return; - - // Hide the sub menu of the current item, but do it later - if ( currentIndex < (int)itemList.count() ) { - PopupMenuEditor *s = itemList.at( currentIndex )->s; - TQTimer::singleShot( 0, s, TQT_SLOT( hide() ) ); - } - - draggedItem = 0; - PopupMenuEditorItem * i = 0; - - if ( e->provides( "qt/popupmenueditoritemptr" ) ) { - PopupMenuEditorItemPtrDrag::decode( e, &i ); - } else { - if ( e->provides( "application/x-designer-actiongroup" ) ) { - TQActionGroup * g = ::tqqt_cast(ActionDrag::action()); - if ( g->usesDropDown() ) { - i = new PopupMenuEditorItem( g, this ); - TQString n = TQString( g->name() ) + "Item"; - formWindow()->unify( i, n, FALSE ); - i->setName( n ); - TQObjectList *l = g->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE ); - TQObjectListIterator it( *l ); - for ( ; it.current(); ++it ) { - g = ::tqqt_cast(it.current()); - if ( g ) - i->s->insert( g ); - else - i->s->insert( (TQAction*)it.current() ); - } - delete l; - } else { - dropInPlace( g, e->pos().y() ); - } - } else if ( e->provides( "application/x-designer-actions" ) ) { - TQAction *a = ::tqqt_cast(ActionDrag::action()); - i = new PopupMenuEditorItem( a, this ); - } - } - - if ( i ) { - dropInPlace( i, e->pos().y() ); - TQTimer::singleShot( 0, this, TQT_SLOT( resizeToContents() ) ); - } - - TQTimer::singleShot( 0, this, TQT_SLOT( showSubMenu() ) ); - TQTimer::singleShot( 0, this, TQT_SLOT( setFocus() ) ); - dropLine->hide(); - e->accept(); -} - -void PopupMenuEditor::keyPressEvent( TQKeyEvent * e ) -{ - if ( lineEdit->isHidden() ) { // In navigation mode - - switch ( e->key() ) { - - case TQt::Key_Delete: - hideSubMenu(); - removeItem(); - showSubMenu(); - break; - - case TQt::Key_Backspace: - clearCurrentField(); - break; - - case TQt::Key_Up: - navigateUp( e->state() & TQt::ControlButton ); - break; - - case TQt::Key_Down: - navigateDown( e->state() & TQt::ControlButton ); - break; - - case TQt::Key_Left: - navigateLeft(); - break; - - case TQt::Key_Right: - navigateRight(); - break; - - case TQt::Key_PageUp: - currentIndex = 0; - break; - - case TQt::Key_PageDown: - currentIndex = itemList.count(); - break; - - case TQt::Key_Enter: - case TQt::Key_Return: - case TQt::Key_F2: - enterEditMode( e ); - // move on - case TQt::Key_Alt: - case TQt::Key_Shift: - case TQt::Key_Control: - // do nothing - return; - - case TQt::Key_Escape: - currentField = 0; - navigateLeft(); - break; - - case TQt::Key_C: - if ( e->state() & TQt::ControlButton && - currentIndex < (int)itemList.count() ) { - copy( currentIndex ); - break; - } - - case TQt::Key_X: - if ( e->state() & TQt::ControlButton && - currentIndex < (int)itemList.count() ) { - hideSubMenu(); - cut( currentIndex ); - showSubMenu(); - break; - } - - case TQt::Key_V: - if ( e->state() & TQt::ControlButton ) { - hideSubMenu(); - paste( currentIndex < (int)itemList.count() ? currentIndex + 1: itemList.count() ); - showSubMenu(); - break; - } - - default: - if ( currentItem()->isSeparator() ) - return; - if ( currentField == 1 ) { - showLineEdit(); - TQApplication::sendEvent( lineEdit, e ); - e->accept(); - return; - } else if ( currentField == 2 ) { - setAccelerator( e->key(), e->state() ); - showSubMenu(); - } - break; - - } - - } else { // In edit mode - switch ( e->key() ) { - case TQt::Key_Enter: - case TQt::Key_Return: - case TQt::Key_Escape: - leaveEditMode( e ); - e->accept(); - return; - } - } - update(); -} - -void PopupMenuEditor::focusInEvent( TQFocusEvent * ) -{ - showSubMenu(); - update(); - parentMenu->update(); -} - -void PopupMenuEditor::focusOutEvent( TQFocusEvent * ) -{ - TQWidget * fw = tqApp->focusWidget(); - if ( !fw || ( !::tqqt_cast(fw) && fw != lineEdit ) ) { - hideSubMenu(); - if ( fw && ::tqqt_cast(fw) ) - return; - TQWidget * w = this; - while ( w && w != fw && ::tqqt_cast(w) ) { // hide all popups - w->hide(); - w = ((PopupMenuEditor *)w)->parentEditor(); - } - } -} - -void PopupMenuEditor::drawItem( TQPainter * p, PopupMenuEditorItem * i, - const TQRect & r, int f ) const -{ - int x = r.x(); - int y = r.y(); - int h = r.height(); - - p->fillRect( r, colorGroup().brush( TQColorGroup::Background ) ); - - if ( i->isSeparator() ) { - style().tqdrawPrimitive( TQStyle::PE_Separator, p, - TQRect( r.x(), r.y() + 2, r.width(), 1 ), - colorGroup(), TQStyle::Style_Sunken | f ); - return; - } - - const TQAction * a = i->action(); - if ( a->isToggleAction() && a->isOn() ) { - style().tqdrawPrimitive( TQStyle::PE_CheckMark, p, - TQRect( x , y, iconWidth, h ), - colorGroup(), f ); - } else { - TQPixmap icon = a->iconSet().pixmap( TQIconSet::Automatic, TQIconSet::Normal ); - p->drawPixmap( x + ( iconWidth - icon.width() ) / 2, - y + ( h - icon.height() ) / 2, - icon ); - } - x += iconWidth; - p->drawText( x, y, textWidth, h, - TQPainter::AlignLeft | - TQPainter::AlignVCenter | - TQt::ShowPrefix | - TQt::SingleLine, - a->menuText() ); - - x += textWidth + borderSize * 3; - p->drawText( x, y, accelWidth, h, - TQPainter::AlignLeft | TQPainter::AlignVCenter, - a->accel() ); - if ( i->count() ) // Item has submenu - style().tqdrawPrimitive( TQStyle::PE_ArrowRight, p, - TQRect( r.width() - arrowWidth, r.y(), arrowWidth, r.height() ), - colorGroup(), f ); -} - -void PopupMenuEditor::drawWinFocusRect( TQPainter * p, const TQRect & r ) const -{ - if ( currentIndex < (int)itemList.count() && - ((PopupMenuEditor*)this)->itemList.at( currentIndex )->isSeparator() ) { - p->drawWinFocusRect( borderSize, r.y(), width() - borderSize * 2, r.height() ); - return; - } - int y = r.y(); - int h = r.height(); - if ( currentField == 0 ) - p->drawWinFocusRect( borderSize + 1, y, iconWidth - 2, h ); - else if ( currentField == 1 ) - p->drawWinFocusRect( borderSize + iconWidth, y, textWidth, h ); - else if ( currentField == 2 ) - p->drawWinFocusRect( borderSize + iconWidth + textWidth + - borderSize * 3, y, accelWidth, h ); -} - -void PopupMenuEditor::drawItems( TQPainter * p ) -{ - int flags = 0; - int idx = 0; - - TQColorGroup enabled = colorGroup(); - TQColorGroup disabled = palette().disabled(); - TQRect focus; - TQRect rect( borderSize, borderSize, width() - borderSize * 2, 0 ); - - PopupMenuEditorItem * i = itemList.first(); - while ( i ) { - if ( i->isVisible() ) { - rect.setHeight( itemHeight( i ) ); - if ( idx == currentIndex ) - focus = rect; - if ( i->action()->isEnabled() ) { - flags = TQStyle::Style_Enabled; - p->setPen( enabled.buttonText() ); - } else { - flags = TQStyle::Style_Default; - p->setPen( disabled.buttonText() ); - } - drawItem( p, i, rect, flags ); - rect.moveBy( 0, rect.height() ); - } - i = itemList.next(); - idx++; - } - - // Draw the "add item" and "add separator" items - p->setPen( darkBlue ); - rect.setHeight( itemHeight( &addItem ) ); - if ( idx == currentIndex ) - focus = rect; - drawItem( p, &addItem, rect, TQStyle::Style_Default ); - rect.moveBy( 0, rect.height() ); - idx++; - rect.setHeight( itemHeight( &addSeparator ) ); - if ( idx == currentIndex ) - focus = rect; - drawItem( p, &addSeparator, rect, TQStyle::Style_Default ); - idx++; - - if ( hasFocus() && !draggedItem ) - drawWinFocusRect( p, focus ); -} - -TQSize PopupMenuEditor::contentsSize() -{ - TQRect textRect = fontMetrics().boundingRect( addSeparator.action()->menuText() ); - textWidth = textRect.width(); - accelWidth = textRect.height(); // default size - iconWidth = textRect.height(); - - int w = 0; - int h = itemHeight( &addItem ) + itemHeight( &addSeparator ); - PopupMenuEditorItem * i = itemList.first(); - TQAction * a = 0; - while ( i ) { - if ( i->isVisible() ) { - if ( !i->isSeparator() ) { - a = i->action(); - w = a->iconSet().pixmap( TQIconSet::Automatic, TQIconSet::Normal ).rect().width() + - borderSize; // padding - iconWidth = TQMAX( iconWidth, w ); - w = fontMetrics().boundingRect( a->menuText() ).width(); - textWidth = TQMAX( textWidth, w ); - w = fontMetrics().boundingRect( a->accel() ).width() + 2; // added padding? - accelWidth = TQMAX( accelWidth, w ); - } - h += itemHeight( i ); - } - i = itemList.next(); - } - - int width = iconWidth + textWidth + borderSize * 3 + accelWidth + arrowWidth; - return TQSize( width, h ); -} - -int PopupMenuEditor::itemHeight( const PopupMenuEditorItem * item ) const -{ - if ( !item || ( item && !item->isVisible() ) ) - return 0; - if ( item->isSeparator() ) - return 4; // FIXME: hardcoded ( get from styles )r - int padding = + borderSize * 6; - TQAction * a = item->action(); - int h = a->iconSet().pixmap( TQIconSet::Automatic, TQIconSet::Normal ).rect().height(); - h = TQMAX( h, fontMetrics().boundingRect( a->menuText() ).height() + padding ); - h = TQMAX( h, fontMetrics().boundingRect( a->accel() ).height() + padding ); - return h; -} - -int PopupMenuEditor::itemPos( const PopupMenuEditorItem * item ) const -{ - PopupMenuEditor * that = ( PopupMenuEditor * ) this; - int y = 0; - PopupMenuEditorItem * i = that->itemList.first(); - while ( i ) { - if ( i == item ) - return y; - y += itemHeight( i ); - i = that->itemList.next(); - } - return y; -} - -int PopupMenuEditor::snapToItem( int y ) -{ - int iy = 0; - int dy = 0; - - PopupMenuEditorItem * i = itemList.first(); - - while ( i ) { - dy = itemHeight( i ); - if ( iy + dy / 2 > y ) - return iy; - iy += dy; - i = itemList.next(); - } - - return iy; -} - -void PopupMenuEditor::dropInPlace( PopupMenuEditorItem * i, int y ) -{ - int iy = 0; - int dy = 0; - int idx = 0; - - PopupMenuEditorItem * n = itemList.first(); - - while ( n ) { - dy = itemHeight( n ); - if ( iy + dy / 2 > y ) - break; - iy += dy; - idx++; - n = itemList.next(); - } - int same = itemList.findRef( i ); - AddActionToPopupCommand * cmd = new AddActionToPopupCommand( i18n( "Drop Item" ), formWnd, this, i, idx ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - currentIndex = ( same >= 0 && same < idx ) ? idx - 1 : idx; - currentField = 1; -} - -void PopupMenuEditor::dropInPlace( TQActionGroup * g, int y ) -{ - TQObjectList l = g->childrenListObject(); - if (l.isEmpty()) - return; - for ( int i = 0; i < (int)l.count(); ++i ) { - TQAction *a = ::tqqt_cast(l.at(i)); - TQActionGroup *g = ::tqqt_cast(l.at(i)); - if ( g ) - dropInPlace( g, y ); - else if ( a ) - dropInPlace( new PopupMenuEditorItem( a, this ), y ); - } -} - -void PopupMenuEditor::safeDec() -{ - do { - currentIndex--; - } while ( currentIndex > 0 && !currentItem()->isVisible() ); - if ( currentIndex == 0 && - !currentItem()->isVisible() && - parentMenu ) { - parentMenu->setFocus(); - } -} - -void PopupMenuEditor::safeInc() -{ - int max = itemList.count() + 1; - if ( currentIndex < max ) { - do { - currentIndex++; - } while ( currentIndex < max && !currentItem()->isVisible() ); // skip invisible items - } -} - -void PopupMenuEditor::clearCurrentField() -{ - if ( currentIndex >= (int)itemList.count() ) - return; // currentIndex is addItem or addSeparator - PopupMenuEditorItem * i = currentItem(); - hideSubMenu(); - if ( i->isSeparator() ) - return; - if ( currentField == 0 ) { - TQIconSet icons( 0 ); - SetActionIconsCommand * cmd = new SetActionIconsCommand( i18n( "Remove Icon" ), - formWnd, - i->action(), - this, - icons ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( currentField == 2 ) { - i->action()->setAccel( 0 ); - } - resizeToContents(); - showSubMenu(); - return; -} - -void PopupMenuEditor::navigateUp( bool ctrl ) -{ - if ( currentIndex > 0 ) { - hideSubMenu(); - if ( ctrl ) { - ExchangeActionInPopupCommand * cmd = - new ExchangeActionInPopupCommand( i18n( "Move Item Up" ), - formWnd, - this, - currentIndex, - currentIndex - 1 ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - safeDec(); - } else { - safeDec(); - } - showSubMenu(); - } else if ( parentMenu ) { - parentMenu->setFocus(); - parentMenu->update(); - } -} - -void PopupMenuEditor::navigateDown( bool ctrl ) -{ - hideSubMenu(); - if ( ctrl ) { - if ( currentIndex < ( (int)itemList.count() - 1 ) ) { // safe index - ExchangeActionInPopupCommand * cmd = - new ExchangeActionInPopupCommand( i18n( "Move Item Down" ), - formWnd, - this, - currentIndex, - currentIndex + 1 ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - safeInc(); - } - } else { // ! Ctrl - safeInc(); - } - if ( currentIndex >= (int)itemList.count() ) - currentField = 1; - showSubMenu(); -} - -void PopupMenuEditor::navigateLeft() -{ - if ( currentItem()->isSeparator() || - currentIndex >= (int)itemList.count() || - currentField == 0 ) { - if ( parentMenu ) { - hideSubMenu(); - parentMenu->setFocus(); - } else if ( !currentItem()->isSeparator() ) { - currentField = 2; - } - } else { - currentField--; - } -} - -void PopupMenuEditor::navigateRight() -{ - if ( !currentItem()->isSeparator() && - currentIndex < (int)itemList.count() ) { - if ( currentField == 2 ) { - focusOnSubMenu(); - } else { - currentField++; - currentField %= 3; - } - } -} - -void PopupMenuEditor::enterEditMode( TQKeyEvent * e ) -{ - PopupMenuEditorItem * i = currentItem(); - - if ( i == &addSeparator ) { - i = createItem( new QSeparatorAction( 0 ) ); - } else if ( i->isSeparator() ) { - return; - } else if ( currentField == 0 ) { - choosePixmap(); - } else if ( currentField == 1 ) { - showLineEdit(); - return; - } else {// currentField == 2 - setAccelerator( e->key(), e->state() ); - } - showSubMenu(); - return; -} - -void PopupMenuEditor::leaveEditMode( TQKeyEvent * e ) -{ - setFocus(); - lineEdit->hide(); - - PopupMenuEditorItem * i = 0; - if ( e && e->key() == TQt::Key_Escape ) { - update(); - return; - } - - if ( currentIndex >= (int)itemList.count() ) { - // new item was created - TQAction * a = formWnd->mainWindow()->actioneditor()->newActionEx(); - TQString actionText = lineEdit->text(); - actionText.replace("&&", "&"); - TQString menuText = lineEdit->text(); - a->setText( actionText ); - a->setMenuText( menuText ); - i = createItem( a ); - TQString n = constructName( i ); - formWindow()->unify( a, n, TRUE ); - a->setName( n ); - MetaDataBase::addEntry( a ); - MetaDataBase::setPropertyChanged( a, "menuText", TRUE ); - ActionEditor *ae = (ActionEditor*)formWindow()->mainWindow()->child( 0, "ActionEditor" ); - if ( ae ) - ae->updateActionName( a ); - } else { - i = itemList.at( currentIndex ); - RenameActionCommand * cmd = new RenameActionCommand( i18n( "Rename Item" ), - formWnd, - i->action(), - this, - lineEdit->text() ); - formWnd->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - resizeToContents(); - - if ( !i ) - return; - - if ( i->isSeparator() ) - hideSubMenu(); - else - showSubMenu(); -} - -TQString PopupMenuEditor::constructName( PopupMenuEditorItem *item ) -{ - TQString s; - TQString name = item->action()->menuText(); - TQWidget *e = parentEditor(); - PopupMenuEditor *p = ::tqqt_cast(e); - if ( p ) { - int idx = p->find( item->m ); - PopupMenuEditorItem * i = ( idx > -1 ? p->at( idx ) : 0 ); - s = ( i ? TQString( i->action()->name() ).remove( "Action" ) : TQString( "" ) ); - } else { - MenuBarEditor *b = ::tqqt_cast(e); - if ( b ) { - int idx = b->findItem( item->m ); - MenuBarEditorItem * i = ( idx > -1 ? b->item( idx ) : 0 ); - s = ( i ? i->menuText().lower() : TQString( "" ) ); - } - } - // replace illegal characters - - return ( RenameMenuCommand::makeLegal( s ) + - RenameMenuCommand::makeLegal( name ) + "Action" ); -} diff --git a/tdevdesigner/designer/popupmenueditor.h b/tdevdesigner/designer/popupmenueditor.h deleted file mode 100644 index 714ecf42..00000000 --- a/tdevdesigner/designer/popupmenueditor.h +++ /dev/null @@ -1,237 +0,0 @@ -/********************************************************************** -** Copyright (C) 2003 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef POPUPMENUEDITOR_H -#define POPUPMENUEDITOR_H - -#include -#include -#include - -class PopupMenuEditor; -class TQMenuItem; - -class PopupMenuEditorItem : public TQObject -{ - Q_OBJECT - - - friend class PopupMenuEditor; - - PopupMenuEditorItem( PopupMenuEditor * menu = 0, TQObject * parent = 0, const char * name = 0 ); - -public: - enum ItemType { - Unknown = -1, - Separator = 0, - Action = 1 - }; - - PopupMenuEditorItem( TQAction * action, PopupMenuEditor * menu, - TQObject * parent = 0, const char * name = 0 ); - PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuEditor * menu, - TQObject * parent = 0, const char * name = 0 ); - ~PopupMenuEditorItem(); - - void init(); - - ItemType type() const; - TQAction * action() const { return a; } - - void setVisible( bool enable ); - bool isVisible() const; - - void setSeparator( bool enable ) { separator = enable; } - bool isSeparator() const { return separator; } - - void setRemovable( bool enable ) { removable = enable; } - bool isRemovable() const { return removable; } - - void showMenu( int x, int y ); - void hideMenu(); - void focusOnMenu(); - PopupMenuEditor * subMenu() const { return s; } - - int count() const; - - bool eventFilter( TQObject *, TQEvent * event ); - -public slots: - void selfDestruct(); - -protected: - -private: - TQAction * a; - PopupMenuEditor * s; - PopupMenuEditor * m; - uint separator : 1; - uint removable : 1; -}; - -class FormWindow; -class MainWindow; -class TQLineEdit; - -#include - -class PopupMenuEditor : public TQWidget -{ - Q_OBJECT - - - friend class PopupMenuEditorItem; - friend class MenuBarEditor; - friend class Resource; - -public: - PopupMenuEditor( FormWindow * fw, TQWidget * parent = 0, const char * name = 0 ); - PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu, TQWidget * parent, const char * name = 0 ); - ~PopupMenuEditor(); - - void init(); - - void insert( PopupMenuEditorItem * item, int index = -1 ); - void insert( TQAction * action, int index = -1 ); - void insert( TQActionGroup * actionGroup, int index = -1 ); - int find( const TQAction * action ); - int find( PopupMenuEditor * menu ); - int count(); - PopupMenuEditorItem * at( int index ); - PopupMenuEditorItem * at( TQPoint pos ) { return itemAt( pos.y() ); } - void exchange( int a, int b ); - - void cut( int index ); - void copy( int index ); - void paste( int index ); - - void insertedActions( TQPtrList & list ); - - void show(); - void choosePixmap( int index = -1 ); - void showLineEdit( int index = -1); - void setAccelerator( int key, TQt::ButtonState state, int index = -1 ); - - FormWindow * formWindow() { return formWnd; } - bool isCreatingAccelerator() { return ( currentField == 2 ); } - - TQPtrList * items() { return &itemList; } - - TQWidget * parentEditor() { return parentMenu; } - -signals: - void inserted( TQAction * ); - void removed( TQAction * ); - -public slots: - - void cut() { cut( currentIndex ); } - void copy() { copy( currentIndex ); } - void paste() { paste( currentIndex ); } - - void remove( int index ); - void remove( TQAction * a ) { remove( find( a ) ); } - - void resizeToContents(); - void showSubMenu(); - void hideSubMenu(); - void focusOnSubMenu(); - -protected: - PopupMenuEditorItem * createItem( TQAction * a = 0 ); - void removeItem( int index = -1 ); - PopupMenuEditorItem * currentItem(); - PopupMenuEditorItem * itemAt( int y ); - void setFocusAt( const TQPoint & pos ); - - bool eventFilter( TQObject * o, TQEvent * e ); - void paintEvent( TQPaintEvent * e ); - void mousePressEvent( TQMouseEvent * e ); - void mouseDoubleClickEvent( TQMouseEvent * e ); - void mouseMoveEvent( TQMouseEvent * e ); - void dragEnterEvent( TQDragEnterEvent * e ); - void dragLeaveEvent( TQDragLeaveEvent * e ); - void dragMoveEvent( TQDragMoveEvent * e ); - void dropEvent( TQDropEvent * e ); - void keyPressEvent( TQKeyEvent * e ); - void focusInEvent( TQFocusEvent * e ); - void focusOutEvent( TQFocusEvent * e ); - - void drawItems( TQPainter * p ); - void drawItem( TQPainter * p, PopupMenuEditorItem * i, const TQRect & r, int f ) const; - void drawWinFocusRect( TQPainter * p, const TQRect & r ) const; - - TQSize contentsSize(); - int itemHeight( const PopupMenuEditorItem * item ) const; - int itemPos( const PopupMenuEditorItem * item ) const; - - int snapToItem( int y ); - void dropInPlace( PopupMenuEditorItem * i, int y ); - void dropInPlace( TQActionGroup * g, int y ); - - void safeDec(); - void safeInc(); - - void clearCurrentField(); - void navigateUp( bool ctrl ); - void navigateDown( bool ctrl ); - void navigateLeft(); - void navigateRight(); - void enterEditMode( TQKeyEvent * e ); - void leaveEditMode( TQKeyEvent * e ); - - TQString constructName( PopupMenuEditorItem *item ); - -private: - FormWindow * formWnd; - TQLineEdit * lineEdit; - TQWidget * dropLine; - TQPtrList itemList; - PopupMenuEditorItem addItem; - PopupMenuEditorItem addSeparator; - TQWidget * parentMenu; - - int iconWidth; - int textWidth; - int accelWidth; - int arrowWidth; - int borderSize; - - int currentField; - int currentIndex; - TQPoint mousePressPos; - static PopupMenuEditorItem * draggedItem; - - enum ClipboardOperation { - None = 0, - Cut = 1, - Copy = 2 - }; - static int clipboardOperation; - static PopupMenuEditorItem * clipboardItem; -}; - -#endif //POPUPMENUEDITOR_H diff --git a/tdevdesigner/designer/preferences.ui b/tdevdesigner/designer/preferences.ui deleted file mode 100644 index 363164ed..00000000 --- a/tdevdesigner/designer/preferences.ui +++ /dev/null @@ -1,648 +0,0 @@ - -Preferences -********************************************************************* -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - Preferences - - - - 0 - 0 - 482 - 480 - - - - Preferences - - - true - - - <b>Preferences</b><p>Change the preferences of Qt Designer. There is always one tab with general preferences. There may be additional tabs, depending on which plugins are installed.</p> - - - - unnamed - - - 11 - - - 6 - - - - tabWidget - - - - pageGeneral - - - General - - - - unnamed - - - - groupBox4 - - - File Saving - - - - unnamed - - - - checkBoxAutoSave - - - Enable auto sa&ve - - - true - - - - - layout3 - - - - unnamed - - - - textLabelAutoSave - - - Auto save &interval: - - - timeEditAutoSave - - - - - timeEditAutoSave - - - - - - - - - - - - buttonGroup2 - - - Plu&gin Paths - - - - unnamed - - - - textEditPluginPaths - - - - - - - Spacer3 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - A splash screen is displayed when starting Qt Designer if this option is checked. - - - - - GroupBox5 - - - Ge&neral - - - - unnamed - - - 11 - - - 6 - - - - checkBoxWorkspace - - - Restore last &workspace on startup - - - true - - - Restore last workspace - - - The current workspace settings will be restored the next time you start Qt Designer if this option is checked. - - - - - checkBoxSplash - - - Show &splash screen on startup - - - true - - - Show Splashscreen - - - A splash screen is displayed when starting Qt Designer if this option is checked. - - - - - checkBoxStartDialog - - - Show start &dialog - - - true - - - - - checkAutoEdit - - - Disable data&base auto-edit in preview - - - true - - - - - checkBoxTextLabels - - - Show toolbutton lab&els - - - Text Labels - - - Text labels will be used in the toolbars if this is checked. - - - - - - - groupBoxGrid - - - G&rid - - - true - - - - - - - unnamed - - - 11 - - - 6 - - - - checkBoxSnapGrid - - - Sn&ap to grid - - - true - - - Snap to the grid - - - <b>Customize the grid-settings for all forms.</b><p>When <b>Snap to Grid</b> is checked, the widgets snap to the grid using the the X/Y resolution.</p> - - - - - Layout4 - - - - unnamed - - - 0 - - - 6 - - - - spinGridX - - - 50 - - - 5 - - - 10 - - - Grid resolution - - - <b>Customize the grid-settings for all forms.</b><p>When <b>Show Grid</b> is checked, a grid is shown on all forms using the X/Y resolution.</p> - - - - - spinGridY - - - 50 - - - 5 - - - 10 - - - Grid resolution - - - <b>Customize the grid-settings for all forms.</b><p>When <b>Show Grid</b> is checked, a grid is shown on all forms using the X/Y resolution.</p> - - - - - Label1 - - - Grid-&X: - - - spinGridX - - - - - Label1_2 - - - Grid-&Y: - - - spinGridY - - - - - - - - - ButtonGroup1 - - - Backgro&und - - - - unnamed - - - 11 - - - 6 - - - - buttonColor - - - false - - - - 0 - 0 - 0 - 0 - - - - TabFocus - - - false - - - Choose a color - - - Select a color in the color dialog. - - - - - radioColor - - - NoFocus - - - Co&lor - - - Use a background color - - - Use a background color. - - - - - radioPixmap - - - &Pixmap - - - true - - - Use a background pixmap - - - Use a background pixmap. - - - - - buttonPixmap - - - - 0 - 0 - 0 - 0 - - - - TabFocus - - - false - - - Select a pixmap - - - Choose a pixmap file. - - - - - - - - - - Layout6 - - - - unnamed - - - 0 - - - 6 - - - - helpButton - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - Close the dialog and apply all the changes. - - - - - buttonCancel - - - &Cancel - - - true - - - false - - - Close the dialog and discard any changes. - - - - - - - - - StyledButton -
    styledbutton.h
    - - 40 - 25 - - 0 - - 5 - 5 - 0 - 0 - - "image0" - clicked() - changed() - color - pixmap - scale -
    -
    - - - 789c9dd2cb8e9b301406e07d9e0225bba89a09601350d505302c5b7559a9eac23e6672b363620c0ca9faeef53949da2e2a55eab123f9e38f2f217e5e475f3e7f8cd6cf8bde0b7f8008f6c2456b3518337ffdf6e1fb62992451e8691ac5cb778be55304d1277b6e71fc12c6ab0d157222e61bd8e4c812196f6216535a13f318624a6764b2495842e99558249014c81e99c6294b69d3376291424ae9806431638cd28628183081f4489e70ce13e4852878c129ad905992f18cd291283295517a466ed32ddfa64847945bb595c80e99a739cf29d54499ab9c528b2c58c10b86344428540148400a26b8a0541241b482d215523299494a0551c9562ae409091c32e0c82351410b942aa4e22a53941e882d36e41ed966d8903b2215f215f99a6143b6442afaafff5aff485658622584a091941256948443d1cabbdd6ebf3f28753c09a9e9cdc1fe703c9e4ea19f689a0430fa4c8908082be093d08d016bbb0bbd5e7ceafade5b30de19d083b3fa9e008cd39b9fafd69495b473af7fcfb15325c1d61eea0afaf005ddf97b5295c658a866338f97591babef7340fa396c6c5ca9e7fe650807d0bf566b4262299986ba335a3b4a2cc84b69ac85b1b673037d8fabf95b023a9c09cc7530e104dd5419ed6e27083fb09a7c752db5a9bd31cde4ec634ed8a39aebbe337618c3f6fdc5dee6d8b0bb0d6b5b8b1fad43d78fe4e14e3f6aace8e29d9d736777fea3c686eee0138c9726d4d00c548df7a315ff750f7ebc5ffc04a0e5308d - - - - - buttonOk - clicked() - Preferences - accept() - - - buttonCancel - clicked() - Preferences - reject() - - - radioColor - toggled(bool) - buttonColor - setEnabled(bool) - - - radioPixmap - toggled(bool) - buttonPixmap - setEnabled(bool) - - - - buttonOk - buttonCancel - tabWidget - radioColor - radioPixmap - buttonColor - buttonPixmap - checkBoxSnapGrid - spinGridX - spinGridY - checkBoxWorkspace - checkBoxSplash - checkBoxStartDialog - checkAutoEdit - checkBoxTextLabels - helpButton - - - init() - destroy() - - - - styledbutton.h - styledbutton.h - -
    diff --git a/tdevdesigner/designer/previewframe.cpp b/tdevdesigner/designer/previewframe.cpp deleted file mode 100644 index c26d51fc..00000000 --- a/tdevdesigner/designer/previewframe.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include -#include - -#include "previewframe.h" - -PreviewFrame::PreviewFrame( TQWidget *parent, const char *name ) - : TQVBox( parent, name ) -{ - setMinimumSize(200, 200); - setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); - setLineWidth(1); - - PreviewWorkspace * w = new PreviewWorkspace( this ); - w->setEraseColor(colorGroup().dark()); - previewWidget = new PreviewWidget( w ); - previewWidget->move( 10, 10 ); -} - -void PreviewFrame::setPreviewPalette(TQPalette pal) -{ - previewWidget->setPalette(pal); -} - -void PreviewWorkspace::paintEvent( TQPaintEvent* ) -{ - TQPainter p ( this ); - p.setPen( TQPen( white ) ); - p.drawText ( 0, height() / 2, width(), height(), AlignHCenter, - "The moose in the noose\nate the goose who was loose." ); -} - diff --git a/tdevdesigner/designer/previewframe.h b/tdevdesigner/designer/previewframe.h deleted file mode 100644 index 1883a062..00000000 --- a/tdevdesigner/designer/previewframe.h +++ /dev/null @@ -1,61 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PREVIEWFRAME_H -#define PREVIEWFRAME_H - -#include -#include - -#include "previewwidgetimpl.h" - -class PreviewWorkspace : public TQWorkspace -{ - Q_OBJECT - -public: - PreviewWorkspace( TQWidget* parent = 0, const char* name = 0 ) - : TQWorkspace( parent, name ) {} - ~PreviewWorkspace() {} - -protected: - void paintEvent( TQPaintEvent* ); -}; - -class PreviewFrame : public TQVBox -{ - Q_OBJECT - - -public: - PreviewFrame( TQWidget *parent = 0, const char *name = 0 ); - void setPreviewPalette(TQPalette); - -private: - PreviewWidget *previewWidget; -}; - -#endif diff --git a/tdevdesigner/designer/previewwidget.ui b/tdevdesigner/designer/previewwidget.ui deleted file mode 100644 index 3b792253..00000000 --- a/tdevdesigner/designer/previewwidget.ui +++ /dev/null @@ -1,304 +0,0 @@ - -PreviewWidgetBase -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - PreviewWidgetBase - - - - 0 - 0 - 378 - 236 - - - - - 1 - 1 - - - - Preview Window - - - - unnamed - - - 11 - - - 6 - - - - Layout6 - - - - unnamed - - - 0 - - - 6 - - - - Layout17 - - - - unnamed - - - 0 - - - 6 - - - - ButtonGroup1 - - - ButtonGroup - - - - unnamed - - - 11 - - - 6 - - - - RadioButton1 - - - RadioButton1 - - - true - - - - - RadioButton2 - - - RadioButton2 - - - - - RadioButton3 - - - RadioButton3 - - - - - - - ButtonGroup2 - - - ButtonGroup2 - - - - unnamed - - - 11 - - - 6 - - - - CheckBox1 - - - CheckBox1 - - - true - - - - - CheckBox2 - - - CheckBox2 - - - - - - - ProgressBar1 - - - 50 - - - - - - - Layout5 - - - - unnamed - - - 0 - - - 6 - - - - LineEdit1 - - - LineEdit - - - - - - ComboBox - - - - ComboBox1 - - - - - Layout13 - - - - unnamed - - - 0 - - - 6 - - - - SpinBox1 - - - - - PushButton1 - - - PushButton - - - - - - - ScrollBar1 - - - Horizontal - - - - - Slider1 - - - Horizontal - - - - - textView - - - - 32767 - 50 - - - - <p> -<a href="http://www.trolltech.com/">http://www.trolltech.com</a> -</p> -<p> -<a href="http://www.kde.org/">http://www.kde.org</a> -</p> - - - - - - - - - Spacer2 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - - init() - destroy() - - diff --git a/tdevdesigner/designer/previewwidgetimpl.cpp b/tdevdesigner/designer/previewwidgetimpl.cpp deleted file mode 100644 index d574f9ae..00000000 --- a/tdevdesigner/designer/previewwidgetimpl.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "tqobjectlist.h" -#include "previewwidgetimpl.h" - -PreviewWidget::PreviewWidget( TQWidget *parent, const char *name ) - : PreviewWidgetBase( parent, name ) -{ - // install event filter on child widgets - TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING); - TQObjectListIt it(*l); - TQObject * obj; - while ((obj = it.current()) != 0) { - ++it; - obj->installEventFilter(this); - ((TQWidget*)obj)->setFocusPolicy(TQ_NoFocus); - } -} - -void PreviewWidget::closeEvent(TQCloseEvent *e) -{ - e->ignore(); -} - -bool PreviewWidget::eventFilter(TQObject *, TQEvent *e) -{ - switch ( e->type() ) { - case TQEvent::MouseButtonPress: - case TQEvent::MouseButtonRelease: - case TQEvent::MouseButtonDblClick: - case TQEvent::MouseMove: - case TQEvent::KeyPress: - case TQEvent::KeyRelease: - case TQEvent::Enter: - case TQEvent::Leave: - return TRUE; // ignore; - default: - break; - } - return FALSE; -} diff --git a/tdevdesigner/designer/previewwidgetimpl.h b/tdevdesigner/designer/previewwidgetimpl.h deleted file mode 100644 index d8887bee..00000000 --- a/tdevdesigner/designer/previewwidgetimpl.h +++ /dev/null @@ -1,44 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PREVIEWWIDGETIMPL_H -#define PREVIEWWIDGETIMPL_H - -#include "previewwidget.h" - -class PreviewWidget : public PreviewWidgetBase -{ - Q_OBJECT - - -public: - PreviewWidget( TQWidget *parent = 0, const char *name = 0 ); - - void closeEvent(TQCloseEvent *); - bool eventFilter(TQObject *, TQEvent *); -}; - -#endif diff --git a/tdevdesigner/designer/project.cpp b/tdevdesigner/designer/project.cpp deleted file mode 100644 index 0ab26894..00000000 --- a/tdevdesigner/designer/project.cpp +++ /dev/null @@ -1,1558 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -**1 This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "project.h" -#include "formwindow.h" -#include "designerappiface.h" -#include "../interfaces/languageinterface.h" -#include "pixmapcollection.h" -#ifndef TQT_NO_SQL -#include "dbconnectionimpl.h" -#endif -#include "resource.h" -#include -#include "outputwindow.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "mainwindow.h" -#include - -#ifndef TQT_NO_SQL -#include -#include -#include -#endif - -#include -#ifdef Q_OS_UNIX -# include -#endif - -#include - -#ifndef TQT_NO_SQL -DatabaseConnection::~DatabaseConnection() -{ - delete iface; -} - -bool DatabaseConnection::refreshCatalog() -{ -#ifndef TQT_NO_SQL - if ( loaded ) - return TRUE; - if ( !open() ) - return FALSE; - tbls = conn->tables( TQSql::TableType( TQSql::Tables | TQSql::Views ) ); - flds.clear(); - for ( TQStringList::Iterator it = tbls.begin(); it != tbls.end(); ++it ) { - TQSqlRecord fil = conn->record( *it ); - TQStringList lst; - for ( uint j = 0; j < fil.count(); ++j ) - lst << fil.field( j )->name(); - flds.insert( *it, lst ); - } - loaded = TRUE; - conn->close(); - return loaded; -#else - return FALSE; -#endif -} - -#ifndef TQT_NO_SQL -void DatabaseConnection::remove() -{ - if ( nm == "(default)" ) - TQSqlDatabase::removeDatabase( TQSqlDatabase::defaultConnection ); - else - TQSqlDatabase::removeDatabase( nm ); - // the above will effectively delete the current connection - conn = 0; -} -#endif - -bool DatabaseConnection::open( bool suppressDialog ) -{ -#ifndef TQT_NO_SQL - // register our name, if nec - if ( nm == "(default)" ) { - if ( !TQSqlDatabase::contains() ) // default doesn't exists? - conn = TQSqlDatabase::addDatabase( drv ); - else - conn = TQSqlDatabase::database(); - } else { - if ( !TQSqlDatabase::contains( nm ) ) - conn = TQSqlDatabase::addDatabase( drv, nm ); - else - conn = TQSqlDatabase::database( nm ); - } - conn->setDatabaseName( dbName ); - conn->setUserName( uname ); - conn->setPassword( pword ); - conn->setHostName( hname ); - conn->setPort( prt ); - bool success = conn->open(); - for( ; suppressDialog == FALSE ; ) { - bool done = FALSE; - if ( !success ) { - DatabaseConnectionEditor dia( this, 0 , 0 , TRUE ); - switch( dia.exec() ) { - case TQDialog::Accepted: - done = FALSE; - break; - case TQDialog::Rejected: - done = TRUE; - break; - } - } - if ( done ) - break; - conn->setUserName( uname ); - conn->setPassword( pword ); - conn->setHostName( hname ); - conn->setPort( prt ); - success = conn->open(); - if ( !success ) { - switch( TQMessageBox::warning( project->messageBoxParent(), i18n( "Connection" ), - i18n( "Could not connect to the database.\n" - "Press 'OK' to continue or 'Cancel' to " - "specify different\nconnection information.\n" ) - + TQString( "[" + conn->lastError().driverText() + "\n" + - conn->lastError().databaseText() + "]\n" ), - i18n( "&OK" ), - i18n( "&Cancel" ), TQString(), 0, 1 ) ) { - case 0: // OK or Enter - continue; - case 1: // Cancel or Escape - done = TRUE; - break; - } - } else - break; - if ( done ) - break; - } - if ( !success ) { - dbErr = conn->lastError().driverText() + "\n" + conn->lastError().databaseText(); - remove(); - } - return success; -#else - return FALSE; -#endif -} - -void DatabaseConnection::close() -{ - if ( !loaded ) - return; -#ifndef TQT_NO_SQL - if ( conn ) { - conn->close(); - } -#endif -} - -DesignerDatabase *DatabaseConnection::iFace() -{ - if ( !iface ) - iface = new DesignerDatabaseImpl( this ); - return iface; -} - -#endif - -//////// - -bool Project::isDummy() const -{ - return isDummyProject; -} - -Project::Project( const TQString &fn, const TQString &pName, - TQPluginManager *pm, bool isDummy, - const TQString &l ) - : proName( pName ), projectSettingsPluginManager( pm ), isDummyProject( isDummy ) -{ - modified = TRUE; - pixCollection = new PixmapCollection( this ); - iface = 0; - lang = l; - is_cpp = lang == "C++"; - cfg.insert( "(all)", "qt warn_on release" ); - templ = "app"; - setFileName( fn ); - if ( !pName.isEmpty() ) - proName = pName; - sourcefiles.setAutoDelete( TRUE ); - modified = FALSE; - objs.setAutoDelete( FALSE ); - fakeFormFiles.setAutoDelete( FALSE ); -} - -Project::~Project() -{ - if ( singleProjectMode() ) - removeTempProject(); - delete iface; - delete pixCollection; -} - -void Project::setModified( bool b ) -{ - modified = b; - emit projectModified(); -} - -#ifndef TQT_NO_SQL -DatabaseConnection *Project::databaseConnection( const TQString &name ) -{ - for ( DatabaseConnection *conn = dbConnections.first(); - conn; - conn = dbConnections.next() ) { - if ( conn->name() == name ) - return conn; - } - return 0; -} -#endif - -void Project::setFileName( const TQString &fn, bool doClear ) -{ - if ( fn == filename ) - return; - - if ( singleProjectMode() ) { - TQString qsa = TQString( getenv( "HOME" ) ) + TQString( "/.qsa" ); - if ( !TQFile::exists( qsa ) ) { - TQDir d; - d.mkdir( qsa ); - } - if ( fn == singleProFileName ) - return; - singleProFileName = fn; - static int counter = 0; - TQString str_counter = TQString::number( counter++ ); - str_counter = "/.qsa/" + str_counter; - LanguageInterface *iface = MetaDataBase::languageInterface( language() ); - filename = TQString( getenv( "HOME" ) + str_counter + TQString( "tmp_" ) + - TQFileInfo( fn ).baseName() + "/" + TQFileInfo( fn ).baseName() + ".pro" ); - removeTempProject(); - if ( iface && iface->supports( LanguageInterface::CompressProject ) ) { - filename = iface->uncompressProject( makeAbsolute( singleProFileName ), - TQString( getenv( "HOME" ) + - str_counter + TQString( "tmp_" ) + - TQFileInfo( fn ).baseName() ) ); - proName = makeAbsolute( singleProFileName ); - } - } else { - filename = fn; - if ( !filename.endsWith( ".pro" ) ) - filename += ".pro"; - proName = filename; - } - - - if ( proName.contains( '.' ) ) - proName = proName.left( proName.find( '.' ) ); - - if ( !doClear ) - return; - clear(); - if ( TQFile::exists( filename ) ) - parse(); -} - -TQString Project::fileName( bool singlePro ) const -{ - if ( singlePro ) - return singleProFileName; - return filename; -} - -TQString Project::databaseDescription() const -{ - return dbFile; -} - -TQString Project::projectName() const -{ - return proName; -} - -static TQString parse_part( const TQString &part ) -{ - TQString res; - bool inName = FALSE; - TQString currName; - for ( int i = 0; i < (int)part.length(); ++i ) { - TQChar c = part[ i ]; - if ( !inName ) { - if ( c != ' ' && c != '\t' && c != '\n' && c != '=' && c != '\\' && c != '+' ) - inName = TRUE; - else - continue; - } - if ( inName ) { - if ( c == '\n' ) - break; - res += c; - } - } - return res; -} - -TQStringList parse_multiline_part( const TQString &contents, const TQString &key, int *start = 0 ) -{ - if ( start ) - *start = -1; - TQString lastWord; - // Account for things like win32: SOURCES - int extraWhiteSpaceCount = 0; - int braceCount = 0; - for ( int i = 0; i < (int)contents.length(); ++i ) { - TQChar c( contents[ i ] ); - switch ( c ) { - case '{': - braceCount++; - lastWord = ""; - break; - case '}': - braceCount--; - lastWord = ""; - break; - case ' ': case '\t': - if (!key.startsWith(lastWord)) { - lastWord = ""; - extraWhiteSpaceCount = 0; - } else { - extraWhiteSpaceCount++; - } - break; - case '\\': case '\n': - lastWord = ""; - break; - default: - lastWord += c; - } - - // ### we should read the 'bla { SOURCES= ... }' stuff as well (braceCount > 0) - if ( lastWord == key && braceCount == 0 ) { - if ( start ) - *start = i - lastWord.length() - extraWhiteSpaceCount + 1; - TQStringList lst; - bool inName = FALSE; - TQString currName; - bool hadEqual = FALSE; - for ( ; i < (int)contents.length(); ++i ) { - c = contents[ i ]; - if ( !hadEqual && c != '=' ) - continue; - if ( !hadEqual ) { - hadEqual = TRUE; - continue; - } - if ( ( c.isLetter() || c.isDigit() || c == '.' || c == '/' || c == '_' || c == '\\' || - c == '\"' || c == '\'' || c == '=' || - c == '$' || c == '-' || c == '(' || c == ')' || c == ':' || c == '+' || c == ',' || c == '~' ) && - c != ' ' && c != '\t' && c != '\n' ) { - if ( !inName ) - currName = TQString(); - if ( c != '\\' || contents[i+1] != '\n' ) { - currName += c; - inName = TRUE; - } - } else { - if ( inName ) { - inName = FALSE; - if ( currName.simplifyWhiteSpace() != "\\" ) - lst.append( currName ); - } - if ( c == '\n' && i > 0 && contents[ (int)i - 1 ] != '\\' ) - break; - } - } - return lst; - } - } - - return TQStringList(); -} - -void Project::parse() -{ - TQFile f( filename ); - if ( !f.exists() || !f.open( IO_ReadOnly ) ) - return; - TQTextStream ts( &f ); - TQString contents = ts.read(); - f.close(); - - proName = TQFileInfo( filename ).baseName(); - - TQStringList::ConstIterator it; - - int i = contents.find( "LANGUAGE" ); - if ( i != -1 ) { - lang = ""; - is_cpp = FALSE; - TQString part = contents.mid( i + TQString( "LANGUAGE" ).length() ); - lang = parse_part( part ); - is_cpp = lang == "C++"; - } - - i = contents.find( "DBFILE" ); - if ( i != -1 ) { - dbFile = ""; - TQString part = contents.mid( i + TQString( "DBFILE" ).length() ); - dbFile = parse_part( part ); - } - - TQStringList uifiles = parse_multiline_part( contents, "FORMS" ); - uifiles += parse_multiline_part( contents, "INTERFACES" ); // compatibility - for ( it = uifiles.begin(); it != uifiles.end(); ++it ) { - if ( (*it).startsWith( "__APPOBJ" ) ) - continue; - (void) new FormFile( *it, FALSE, this ); - } - - - i = contents.find( "TEMPLATE" ); - if ( i != -1 ) { - templ = ""; - TQString part = contents.mid( i + TQString( "TEMPLATE" ).length() ); - templ = parse_part( part ); - } - - readPlatformSettings( contents, "CONFIG", cfg ); - readPlatformSettings( contents, "LIBS", lbs ); - readPlatformSettings( contents, "INCLUDEPATH", inclPath ); - readPlatformSettings( contents, "DEFINES", defs ); - readPlatformSettings( contents, "SOURCES", sources ); - readPlatformSettings( contents, "HEADERS", headers ); - - LanguageInterface *iface = MetaDataBase::languageInterface( lang ); - if ( iface ) { - TQStringList sourceKeys; - iface->sourceProjectKeys( sourceKeys ); - for ( TQStringList::Iterator it = sourceKeys.begin(); it != sourceKeys.end(); ++it ) { - TQStringList lst = parse_multiline_part( contents, *it ); - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - (void) new SourceFile( *it, FALSE, this ); - } - } - - updateCustomSettings(); - - for ( it = csList.begin(); it != csList.end(); ++it ) { - i = contents.find( *it ); - if ( i != -1 ) { - TQString val = ""; - TQString part = contents.mid( i + TQString( *it ).length() ); - val = parse_part( part ); - customSettings.replace( *it, val ); - } - } - - loadConnections(); - - TQStringList images = parse_multiline_part( contents, "IMAGES" ); - - // ### remove that for the final - this is beta-compatibility - if ( images.isEmpty() && TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).exists() ) { - images = TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).entryList(); - for ( int i = 0; i < (int)images.count(); ++i ) - images[ i ].prepend( "images/" ); - modified = TRUE; - } - - for ( TQStringList::ConstIterator pit = images.begin(); pit != images.end(); ++pit ) - pixCollection->load( *pit ); -} - -void Project::clear() -{ - dbFile = ""; - proName = "unnamed"; - desc = ""; -} - -bool Project::removeSourceFile( SourceFile *sf ) -{ - if ( !sourcefiles.containsRef( sf ) ) - return FALSE; - if ( !sf->close() ) - return FALSE; - sourcefiles.removeRef( sf ); - modified = TRUE; - emit sourceFileRemoved( sf ); - return TRUE; -} - -void Project::setDatabaseDescription( const TQString &db ) -{ - dbFile = db; -} - -void Project::setDescription( const TQString &s ) -{ - desc = s; -} - -TQString Project::description() const -{ - return desc; -} - - -bool Project::isValid() const -{ - // #### do more checking here? - if ( filename.isEmpty() || proName.isEmpty() ) - return FALSE; - - return TRUE; -} - -TQString Project::makeAbsolute( const TQString &f ) -{ - if ( isDummy() ) - return f; - TQString encodedUrl = TQFileInfo( filename ).dirPath( TRUE ); - TQUrl::encode( encodedUrl ); - TQUrl u( encodedUrl, f ); - return u.path(); -} - -TQString Project::makeRelative( const TQString &f ) -{ - if ( isDummy() ) - return f; - TQString p = TQFileInfo( filename ).dirPath( TRUE ); - TQString f2 = f; - if ( f2.left( p.length() ) == p ) - f2.remove( 0, p.length() + 1 ); - return f2; -} - -static void remove_contents( TQString &contents, const TQString &s ) -{ - int i = contents.find( s ); - if ( i != -1 ) { - int start = i; - int end = contents.find( '\n', i ); - if ( end == -1 ) - end = contents.length() - 1; - contents.remove( start, end - start + 1 ); - } -} - -static void remove_multiline_contents( TQString &contents, const TQString &s, int *strt = 0 ) -{ - int i = contents.find( s ); - if ( strt ) - *strt = i; - int start = i; - bool lastWasBackspash = FALSE; - if ( i != -1 && ( i == 0 || contents[ i - 1 ] != '{' || contents[ i - 1 ] != ':' ) ) { - for ( ; i < (int)contents.length(); ++i ) { - if ( contents[ i ] == '\n' && !lastWasBackspash ) - break; - lastWasBackspash = ( contents[ i ] == '\\' || - lastWasBackspash && ( contents[ i ] == ' ' || contents[ i ] == '\t' ) ); - } - contents.remove( start, i - start + 1 ); - } -} - -void Project::save( bool onlyProjectFile ) -{ - bool anythingModified = FALSE; - - // save sources and forms - if ( !onlyProjectFile ) { - - saveConnections(); - - for ( SourceFile *sf = sourcefiles.first(); sf; sf = sourcefiles.next() ) { - anythingModified = anythingModified || sf->isModified(); - if ( !sf->save() ) - return; - } - - for ( FormFile *ff = formfiles.first(); ff; ff = formfiles.next() ) { - anythingModified = anythingModified || ff->isModified(); - if ( !ff->save() ) - return; - } - } - - if ( isDummy() || filename.isEmpty() ) - return; - - if ( !modified ) { - if ( singleProjectMode() ) { - LanguageInterface *iface = MetaDataBase::languageInterface( language() ); - if ( iface && iface->supports( LanguageInterface::CompressProject ) ) - iface->compressProject( makeAbsolute( filename ), singleProFileName, anythingModified ); - } - return; - } - - TQFile f( filename ); - TQString original = ""; - - // read the existing file - bool hasPreviousContents = FALSE; - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - original = ts.read(); - f.close(); - hasPreviousContents = TRUE; - remove_contents( original, "{SOURCES+=" ); // ### compatibility with early 3.0 betas - remove_contents( original, "DBFILE" ); - remove_contents( original, "LANGUAGE" ); - remove_contents( original, "TEMPLATE" ); - removePlatformSettings( original, "CONFIG" ); - removePlatformSettings( original, "DEFINES" ); - removePlatformSettings( original, "LIBS" ); - removePlatformSettings( original, "INCLUDEPATH" ); - removePlatformSettings( original, "SOURCES" ); - removePlatformSettings( original, "HEADERS" ); - remove_multiline_contents( original, "FORMS" ); - remove_multiline_contents( original, "INTERFACES" ); // compatibility - remove_multiline_contents( original, "IMAGES" ); - for ( TQStringList::Iterator it = csList.begin(); it != csList.end(); ++it ) - remove_contents( original, *it ); - } - - // the contents of the saved file - TQString contents; - - // template - contents += "TEMPLATE\t= " + templ + "\n"; - - // language - contents += "LANGUAGE\t= " + lang + "\n"; - contents += "\n"; - - // config - writePlatformSettings( contents, "CONFIG", cfg ); - LanguageInterface *iface = MetaDataBase::languageInterface( lang ); - if ( iface ) { - TQStringList sourceKeys; - iface->sourceProjectKeys( sourceKeys ); - for ( TQStringList::Iterator spit = sourceKeys.begin(); spit != sourceKeys.end(); ++spit ) - remove_multiline_contents( contents, *spit ); - } - contents += "\n"; - - // libs, defines, includes - writePlatformSettings( contents, "LIBS", lbs ); - writePlatformSettings( contents, "DEFINES", defs ); - writePlatformSettings( contents, "INCLUDEPATH", inclPath ); - writePlatformSettings( contents, "SOURCES", sources ); - writePlatformSettings( contents, "HEADERS", headers ); - - // unix - if ( !hasPreviousContents ) { - contents += - "unix {\n" - " UI_DIR = .ui\n" - " MOC_DIR = .moc\n" - " OBJECTS_DIR = .obj\n" - "}\n"; - } - contents += "\n"; - - // sources - if ( !sourcefiles.isEmpty() && iface ) { - TQMap sourceToKey; - for ( SourceFile *f = sourcefiles.first(); f; f = sourcefiles.next() ) { - TQString key = iface->projectKeyForExtension( TQFileInfo( f->fileName() ).extension() ); - TQStringList lst = sourceToKey[ key ]; - lst << makeRelative( f->fileName() ); - sourceToKey.replace( key, lst ); - } - - for ( TQMap::Iterator skit = sourceToKey.begin(); - skit != sourceToKey.end(); ++skit ) { - TQString part = skit.key() + "\t+= "; - TQStringList lst = *skit; - for ( TQStringList::Iterator sit = lst.begin(); sit != lst.end(); ++sit ) { - part += *sit; - part += ++sit != lst.end() ? " \\\n\t" : ""; - --sit; - } - part += "\n"; - contents += part; - } - } - - // forms and interfaces - if ( !formfiles.isEmpty() ) { - contents += "FORMS\t= "; - for ( TQPtrListIterator fit = formfiles; fit.current(); ++fit ) { - contents += fit.current()->fileName() + - (fit != formfiles.last() ? " \\\n\t" : ""); - } - contents += "\n"; - } - - // images - if ( !pixCollection->isEmpty() ) { - contents += "IMAGES\t= "; - TQValueList pixmaps = pixCollection->pixmaps(); - for ( TQValueList::Iterator it = pixmaps.begin(); - it != pixmaps.end(); ++it ) { - contents += makeRelative( (*it).absname ); - contents += ++it != pixmaps.end() ? " \\\n\t" : ""; - --it; - } - contents += "\n"; - } - - // database - if ( !dbFile.isEmpty() ) - contents += "DBFILE\t= " + dbFile + "\n"; - contents += "\n"; - - // custom settings - for ( TQStringList::Iterator it = csList.begin(); it != csList.end(); ++it ) { - TQString val = *customSettings.find( *it ); - if ( !val.isEmpty() ) - contents += *it + "\t= " + val + "\n"; - } - - if ( !f.open( IO_WriteOnly | IO_Translate ) ) { - TQMessageBox::warning( messageBoxParent(), - "Save Project Failed", "Couldn't write project file " + filename ); - return; - } - - TQTextStream os( &f ); - os << contents; - if (hasPreviousContents) - os << original; - - f.close(); - - setModified( FALSE ); - - if ( singleProjectMode() ) { - LanguageInterface *iface = MetaDataBase::languageInterface( language() ); - if ( iface && iface->supports( LanguageInterface::CompressProject ) ) - iface->compressProject( makeAbsolute( filename ), singleProFileName, TRUE ); - } -} - -#ifndef TQT_NO_SQL -TQPtrList Project::databaseConnections() const -{ - return dbConnections; -} -#endif - -#ifndef TQT_NO_SQL -void Project::setDatabaseConnections( const TQPtrList &lst ) -{ - dbConnections = lst; -} -#endif - -#ifndef TQT_NO_SQL -void Project::addDatabaseConnection( DatabaseConnection *conn ) -{ - dbConnections.append( conn ); - modified = TRUE; -} -#endif - -#ifndef TQT_NO_SQL -void Project::removeDatabaseConnection( const TQString &c ) -{ - for ( DatabaseConnection *conn = dbConnections.first(); conn; conn = dbConnections.next() ) { - if ( conn->name() == c ) { - conn->remove(); - dbConnections.removeRef( conn ); - delete conn; - return; - } - } -} -#endif - -#ifndef TQT_NO_SQL -TQStringList Project::databaseConnectionList() -{ - TQStringList lst; - for ( DatabaseConnection *conn = dbConnections.first(); conn; conn = dbConnections.next() ) - lst << conn->name(); - return lst; -} -#endif - -#ifndef TQT_NO_SQL -TQStringList Project::databaseTableList( const TQString &connection ) -{ - DatabaseConnection *conn = databaseConnection( connection ); - if ( !conn ) { - return TQStringList(); - } - return conn->tables(); -} -#endif - -#ifndef TQT_NO_SQL -TQStringList Project::databaseFieldList( const TQString &connection, const TQString &table ) -{ - DatabaseConnection *conn = databaseConnection( connection ); - if ( !conn ) - return TQStringList(); - return conn->fields( table ); -} -#endif - -#ifndef TQT_NO_SQL -static TQString makeIndent( int indent ) -{ - TQString s; - s.fill( ' ', indent * 4 ); - return s; -} -#endif - -#ifndef TQT_NO_SQL -static void saveSingleProperty( TQTextStream &ts, const TQString& name, const TQString& value, int indent ) -{ - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << value << "" << endl; - --indent; - ts << makeIndent( indent ) << "" << endl; -} -#endif - -void Project::saveConnections() -{ -#ifndef TQT_NO_SQL - if ( dbFile.isEmpty() ) { - TQFileInfo fi( fileName() ); - setDatabaseDescription( fi.baseName() + ".db" ); - } - - TQFile f( makeAbsolute( dbFile ) ); - - if ( dbConnections.isEmpty() ) { - if ( f.exists() ) - f.remove(); - setDatabaseDescription( "" ); - modified = TRUE; - return; - } - - /* .db xml */ - if ( f.open( IO_WriteOnly | IO_Translate ) ) { - TQTextStream ts( &f ); - ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) ); - ts << "" << endl; - - /* db connections */ - int indent = 0; - for ( DatabaseConnection *conn = dbConnections.first(); conn; conn = dbConnections.next() ) { - ts << makeIndent( indent ) << "" << endl; - ++indent; - saveSingleProperty( ts, "name", conn->name(), indent ); - saveSingleProperty( ts, "driver", conn->driver(), indent ); - saveSingleProperty( ts, "database", conn->database(), indent ); - saveSingleProperty( ts, "username", conn->username(), indent ); - saveSingleProperty( ts, "hostname", conn->hostname(), indent ); - saveSingleProperty( ts, "port", TQString::number( conn->port() ), indent ); - - /* connection tables */ - TQStringList tables = conn->tables(); - for ( TQStringList::Iterator it = tables.begin(); - it != tables.end(); ++it ) { - ts << makeIndent( indent ) << "" << endl; - ++indent; - saveSingleProperty( ts, "name", (*it), indent ); - - /* tables fields */ - TQStringList fields = conn->fields( *it ); - for ( TQStringList::Iterator it2 = fields.begin(); - it2 != fields.end(); ++it2 ) { - ts << makeIndent( indent ) << "" << endl; - ++indent; - saveSingleProperty( ts, "name", (*it2), indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - - --indent; - ts << makeIndent( indent ) << "
    " << endl; - } - - --indent; - ts << makeIndent( indent ) << "
    " << endl; - } - - ts << "
    " << endl; - f.close(); - } -#endif -} - -#ifndef TQT_NO_SQL -static TQDomElement loadSingleProperty( TQDomElement e, const TQString& name ) -{ - TQDomElement n; - for ( n = e.firstChild().toElement(); - !n.isNull(); - n = n.nextSibling().toElement() ) { - if ( n.tagName() == "property" && n.toElement().attribute("name") == name ) - return n; - } - return n; -} -#endif - -void Project::loadConnections() -{ -#ifndef TQT_NO_SQL - if ( dbFile.isEmpty() || !TQFile::exists( makeAbsolute( dbFile ) ) ) - return; - - TQFile f( makeAbsolute( dbFile ) ); - if ( f.open( IO_ReadOnly ) ) { - TQDomDocument doc; - TQString errMsg; - int errLine; - if ( doc.setContent( &f, &errMsg, &errLine ) ) { - TQDomElement e; - e = doc.firstChild().toElement(); - - /* connections */ - TQDomNodeList connections = e.toElement().elementsByTagName( "connection" ); - for ( uint i = 0; i < connections.length(); i++ ) { - TQDomElement connection = connections.item(i).toElement(); - TQDomElement connectionName = loadSingleProperty( connection, "name" ); - TQDomElement connectionDriver = loadSingleProperty( connection, "driver" ); - TQDomElement connectionDatabase = loadSingleProperty( connection, - "database" ); - TQDomElement connectionUsername = loadSingleProperty( connection, - "username" ); - TQDomElement connectionHostname = loadSingleProperty( connection, - "hostname" ); - TQDomElement connectionPort = loadSingleProperty( connection, - "port" ); - - DatabaseConnection *conn = new DatabaseConnection( this ); - conn->setName( connectionName.firstChild().firstChild().toText().data() ); - conn->setDriver( connectionDriver.firstChild().firstChild().toText().data() ); - conn->setDatabase( connectionDatabase.firstChild().firstChild().toText().data() ); - conn->setUsername( connectionUsername.firstChild().firstChild().toText().data() ); - conn->setHostname( connectionHostname.firstChild().firstChild().toText().data() ); - conn->setPort( TQString( connectionPort.firstChild().firstChild().toText().data() ).toInt() ); - - /* connection tables */ - TQDomNodeList tables = connection.toElement().elementsByTagName( "table" ); - for ( uint j = 0; j < tables.length(); j++ ) { - TQDomElement table = tables.item(j).toElement(); - TQDomElement tableName = loadSingleProperty( table, "name" ); - conn->addTable( tableName.firstChild().firstChild().toText().data() ); - - /* table fields */ - TQStringList fieldList; - TQDomNodeList fields = table.toElement().elementsByTagName( "field" ); - for ( uint k = 0; k < fields.length(); k++ ) { - TQDomElement field = fields.item(k).toElement(); - TQDomElement fieldName = loadSingleProperty( field, "name" ); - fieldList.append( fieldName.firstChild().firstChild().toText().data() ); - } - conn->setFields( tableName.firstChild().firstChild().toText().data(), - fieldList ); - } - - dbConnections.append( conn ); - } - } else { - tqDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); - } - f.close(); - } -#endif -} - -/*! Opens the database \a connection. The connection remains open and -can be closed again with closeDatabase(). -*/ - -bool Project::openDatabase( const TQString &connection, bool suppressDialog ) -{ -#ifndef TQT_NO_SQL - DatabaseConnection *conn = databaseConnection( connection ); - if ( connection.isEmpty() && !conn ) - conn = databaseConnection( "(default)" ); - if ( !conn ) - return FALSE; - bool b = conn->open( suppressDialog ); - return b; -#else - Q_UNUSED( connection ); - Q_UNUSED( suppressDialog ); - return FALSE; -#endif -} - -/*! Closes the database \a connection. -*/ -void Project::closeDatabase( const TQString &connection ) -{ -#ifndef TQT_NO_SQL - DatabaseConnection *conn = databaseConnection( connection ); - if ( connection.isEmpty() && !conn ) - conn = databaseConnection( "(default)" ); - if ( !conn ) - return; - conn->close(); -#else - Q_UNUSED( connection ); -#endif -} - -// void Project::formClosed( FormWindow *fw ) -// { -// formWindows.remove( fw ); -// } - -TQObjectList *Project::formList( bool resolveFakeObjects ) const -{ - TQObjectList *l = new TQObjectList; - for ( TQPtrListIterator forms(formfiles); forms.current(); ++forms ) { - FormFile* f = forms.current(); - if ( f->formWindow() ) { - if ( resolveFakeObjects && f->formWindow()->isFake() ) - l->append( objectForFakeForm( f->formWindow() ) ); - else - l->append( f->formWindow()->child( 0, TQWIDGET_OBJECT_NAME_STRING ) ); - } else if ( f->isFake() ) { - l->append( objectForFakeFormFile( f ) ); - } - } - return l; -} - -DesignerProject *Project::iFace() -{ - if ( !iface ) - iface = new DesignerProjectImpl( this ); - return iface; -} - -void Project::setLanguage( const TQString &l ) -{ - if ( l == lang ) - return; - lang = l; - is_cpp = lang == "C++"; - updateCustomSettings(); - modified = TRUE; -} - -TQString Project::language() const -{ - return lang; -} - -void Project::setCustomSetting( const TQString &key, const TQString &value ) -{ - customSettings.remove( key ); - customSettings.insert( key, value ); - modified = TRUE; -} - -TQString Project::customSetting( const TQString &key ) const -{ - return *customSettings.find( key ); -} - -void Project::updateCustomSettings() -{ - if ( !projectSettingsPluginManager ) - return; - -/* - ProjectSettingsInterface *iface = 0; - projectSettingsPluginManager->queryInterface( lang, (TQUnknownInterface**)&iface ); - if ( !iface ) - return; - csList = iface->projectSettings(); - iface->release(); -*/ - - TQInterfacePtr iface; - projectSettingsPluginManager->queryInterface( lang, &iface ); - if ( !iface ) - return; - csList = iface->projectSettings(); - customSettings.clear(); - -} - -void Project::setActive( bool b ) -{ - pixCollection->setActive( b ); -} - -void Project::addSourceFile( SourceFile *sf ) -{ - sourcefiles.append( sf ); - modified = TRUE; - emit sourceFileAdded( sf ); -} - - -SourceFile* Project::findSourceFile( const TQString& filename, SourceFile *ignore ) const -{ - TQPtrListIterator it(sourcefiles); - while ( it.current() ) { - if ( it.current() != ignore && it.current()->fileName() == filename ) - return it.current(); - ++it; - } - return 0; -} - -FormFile* Project::findFormFile( const TQString& filename, FormFile *ignore ) const -{ - TQPtrListIterator it(formfiles); - while ( it.current() ) { - if ( it.current() != ignore && it.current()->fileName() == filename ) - return it.current(); - ++it; - } - return 0; -} - -void Project::setIncludePath( const TQString &platform, const TQString &path ) -{ - if ( inclPath[platform] == path ) - return; - inclPath.replace( platform, path ); - modified = TRUE; -} - -void Project::setLibs( const TQString &platform, const TQString &path ) -{ - lbs.replace( platform, path ); -} - -void Project::setDefines( const TQString &platform, const TQString &path ) -{ - defs.replace( platform, path ); -} - -void Project::setConfig( const TQString &platform, const TQString &config ) -{ - cfg.replace( platform, config ); -} - -TQString Project::config( const TQString &platform ) const -{ - return cfg[ platform ]; -} - -TQString Project::libs( const TQString &platform ) const -{ - return lbs[ platform ]; -} - -TQString Project::defines( const TQString &platform ) const -{ - return defs[ platform ]; -} - -TQString Project::includePath( const TQString &platform ) const -{ - return inclPath[ platform ]; -} - -TQString Project::templte() const -{ - return templ; -} - -void Project::setTemplate( const TQString &t ) -{ - templ = t; -} - -void Project::readPlatformSettings( const TQString &contents, - const TQString &setting, - TQMap &res ) -{ - const TQString platforms[] = { "", "win32", "unix", "mac", TQString() }; - for ( int i = 0; platforms[ i ] != TQString(); ++i ) { - TQString p = platforms[ i ]; - if ( !p.isEmpty() ) - p += ":"; - TQStringList lst = parse_multiline_part( contents, p + setting ); - TQString s = lst.join( " " ); - TQString key = platforms[ i ]; - if ( key.isEmpty() ) - key = "(all)"; - res.replace( key, s ); - } -} - -void Project::removePlatformSettings( TQString &contents, const TQString &setting ) -{ - const TQString platforms[] = { "win32", "unix", "mac", "", TQString() }; - for ( int i = 0; platforms[ i ] != TQString(); ++i ) { - TQString p = platforms[ i ]; - if ( !p.isEmpty() ) - p += ":"; - remove_multiline_contents( contents, p + setting ); - } -} - -void Project::writePlatformSettings( TQString &contents, const TQString &setting, - const TQMap &input ) -{ - const TQString platforms[] = { "", "win32", "unix", "mac", TQString() }; - int i; - LanguageInterface *iface = MetaDataBase::languageInterface( lang ); - if (iface && (setting == "SOURCES" || setting == "HEADERS")) // The (all) part will be saved later on - i = 1; - else - i = 0; - for (; platforms[ i ] != TQString(); ++i ) { - TQString p = platforms[ i ]; - if ( !p.isEmpty() ) - p += ":"; - TQString key = platforms[ i ]; - if ( key.isEmpty() ) - key = "(all)"; - TQMap::ConstIterator it = input.find( key ); - if ( it == input.end() || (*it).isEmpty() ) - continue; - contents += p + setting + "\t+= " + *it + "\n"; - } -} - -void Project::addFormFile( FormFile *ff ) -{ - formfiles.append( ff ); - modified = TRUE; - emit formFileAdded( ff ); -} - -bool Project::removeFormFile( FormFile *ff ) -{ - if ( !formfiles.containsRef( ff ) ) - return FALSE; - if ( !ff->close() ) - return FALSE; - formfiles.removeRef( ff ); - modified = TRUE; - emit formFileRemoved( ff ); - return TRUE; -} - -void Project::addObject( TQObject *o ) -{ - bool wasModified = modified; - objs.append( o ); - FormFile *ff = new FormFile( "", FALSE, this, "qt_fakewindow" ); - ff->setFileName( "__APPOBJ" + TQString( o->name() ) + ".ui" ); - fakeFormFiles.insert( (void*)o, ff ); - MetaDataBase::addEntry( o ); - if ( hasGUI() ) { - TQWidget *parent = MainWindow::self ? MainWindow::self->qWorkspace() : 0; - FormWindow *fw = new FormWindow( ff, MainWindow::self, parent, "qt_fakewindow" ); - fw->setProject( this ); - if ( TQFile::exists( ff->absFileName() ) ) - Resource::loadExtraSource( ff, ff->absFileName(), - MetaDataBase::languageInterface( language() ), FALSE ); - if ( MainWindow::self ) - fw->setMainWindow( MainWindow::self ); - if ( MainWindow::self ) { - TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(), TQEvent::ChildInserted ); - connect( fw, - TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), - MainWindow::self, - TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) - ); - } - if ( fw->parentWidget() ) { - fw->parentWidget()->setFixedSize( 1, 1 ); - fw->show(); - } - } else { - if ( TQFile::exists( ff->absFileName() ) ) - Resource::loadExtraSource( ff, ff->absFileName(), - MetaDataBase::languageInterface( language() ), FALSE ); - } - emit objectAdded( o ); - modified = wasModified; -} - -void Project::setObjects( const TQObjectList &ol ) -{ - for ( TQObjectListIt it( ol ); it.current(); ++it ) - addObject( it.current() ); -} - -void Project::removeObject( TQObject *o ) -{ - bool wasModified = modified; - objs.removeRef( o ); - MetaDataBase::removeEntry( o ); - fakeFormFiles.remove( (void*)o ); - emit objectRemoved( o ); - modified = wasModified; -} - -TQObjectList Project::objects() const -{ - return objs; -} - -FormFile *Project::fakeFormFileFor( TQObject *o ) const -{ - return fakeFormFiles.find( (void*)o ); -} - -TQObject *Project::objectForFakeForm( FormWindow *fw ) const -{ - for ( TQPtrDictIterator it( fakeFormFiles ); it.current(); ++it ) { - if ( it.current()->formWindow() == fw || - it.current() == fw->formFile() ) - return (TQObject*)it.currentKey(); - } - return 0; -} - -TQObject *Project::objectForFakeFormFile( FormFile *ff ) const -{ - for ( TQPtrDictIterator it( fakeFormFiles ); it.current(); ++it ) { - if ( it.current() == ff ) - return (TQObject*)it.currentKey(); - } - return 0; -} - -void Project::removeTempProject() -{ - if ( !singleProjectMode() ) - return; - TQDir d( TQFileInfo( filename ).dirPath() ); - if ( !d.exists( TQFileInfo( filename ).dirPath() ) ) - return; - TQStringList files = d.entryList( TQDir::Files ); - TQStringList::Iterator it; - for ( it = files.begin(); it != files.end(); ++it ) { - d.remove( *it ); - } - if ( d.exists( TQFileInfo( filename ).dirPath() + "/images" ) ) { - d = TQDir( TQFileInfo( filename ).dirPath() + "/images" ); - files = d.entryList( TQDir::Files ); - for ( it = files.begin(); it != files.end(); ++it ) - d.remove( *it ); - d = TQDir( TQFileInfo( filename ).dirPath() ); - d.remove( "images" ); - } - d.remove( TQFileInfo( filename ).dirPath() ); -#if defined(Q_OS_UNIX) - // ##### implement for all platforms, ideally should be in TQt - ::rmdir( TQFile::encodeName( d.absPath() ) ); -#endif -} - -void Project::addAndEditFunction( const TQString &function, const TQString &functionBody, bool openDeveloper ) -{ - for ( SourceFile *f = sourcefiles.first(); f; f = sourcefiles.next() ) { - if ( TQFileInfo( f->fileName() ).baseName() == "main" ) { - TQValueList funcs; - LanguageInterface *iface = MetaDataBase::languageInterface( language() ); - if ( !iface ) - return; - iface->functions( f->text(), &funcs ); - TQString func = function; - int i = func.find( '(' ); - if ( i != -1 ) - func = func.left( i ); - - bool found = FALSE; - for ( TQValueList::Iterator it = funcs.begin(); - it != funcs.end(); ++it ) { - if ( (*it).name.left( (*it).name.find( '(' ) ) == func ) { - found = TRUE; - break; - } - } - - if ( !found ) { - TQString code = f->text(); - if ( functionBody.isEmpty() ) - code += "\n\n" + iface->createFunctionStart( "", func, "", "" ) + "()\n{\n\n}\n"; - else - code += "\n\n" + iface->createFunctionStart( "", func, "", "" ) + - "()\n" + functionBody + "\n"; - f->setText( code ); - if ( f->editor() ) - f->editor()->refresh( FALSE ); - } - - if ( openDeveloper ) { - if ( MainWindow::self ) - MainWindow::self->editSource( f ); - f->editor()->setFunction( func, "" ); - } - - break; - } - } -} - -bool Project::hasParentObject( TQObject *o ) -{ - for ( TQObject *p = objs.first(); p; p = objs.next() ) { - TQObject *c = p->child( o->name(), o->className() ); - if ( c ) - return TRUE; - } - return FALSE; -} - -TQString Project::qualifiedName( TQObject *o ) -{ - TQString name = o->name(); - TQObject *p = o->parent(); - while ( p ) { - name.prepend( TQString( p->name() ) + "." ); - if ( objs.findRef( p ) != -1 ) - break; - p = p->parent(); - } - return name; -} - -bool Project::singleProjectMode() const -{ - return !MainWindow::self || MainWindow::self->singleProjectMode(); -} - -TQWidget *Project::messageBoxParent() const -{ - return MainWindow::self; -} - -void Project::designerCreated() -{ - for ( FormFile *ff = formfiles.first(); ff; ff = formfiles.next() ) { - FormWindow *fw = ff->formWindow(); - if ( !fw || fw->mainWindow() ) - continue; - fw->setMainWindow( MainWindow::self ); - connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, - const TQString & ) ), - MainWindow::self, TQT_SLOT( updateUndoRedo( bool, bool, - const TQString &, const TQString & ) ) ); - fw->reparent( MainWindow::self->qWorkspace(), TQPoint( 0, 0 ), FALSE ); - TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(), - TQEvent::ChildInserted ); - fw->parentWidget()->setFixedSize( 1, 1 ); - fw->show(); - } -} - -void Project::formOpened( FormWindow *fw ) -{ - if ( fw->isFake() ) - return; - emit newFormOpened( fw ); -} - -TQString Project::locationOfObject( TQObject *o ) -{ - if ( !o ) - return TQString(); - - if ( MainWindow::self ) { - TQWidgetList windows = MainWindow::self->qWorkspace()->windowList(); - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - FormWindow *fw = ::tqqt_cast(w); - SourceEditor *se = ::tqqt_cast(w); - if ( fw ) { - if ( fw->isFake() ) - return objectForFakeForm( fw )->name() + TQString( " [Source]" ); - else - return fw->name() + TQString( " [Source]" ); - } else if ( se ) { - if ( !se->object() ) - continue; - if ( se->formWindow() ) - return se->formWindow()->name() + TQString( " [Source]" ); - else - return makeRelative( se->sourceFile()->fileName() ); - } - } - } - - if ( ::tqqt_cast(o) ) { - for ( TQPtrListIterator sources = sourceFiles(); - sources.current(); ++sources ) { - SourceFile* f = sources.current(); - if ( f == o ) - return makeRelative( f->fileName() ); - } - } - - extern TQMap *qwf_forms; - if ( !qwf_forms ) { - tqWarning( "Project::locationOfObject: qwf_forms is NULL!" ); - return TQString(); - } - - TQString s = makeRelative( *qwf_forms->find( (TQWidget*)o ) ); - s += " [Source]"; - return s; -} - -bool Project::hasGUI() const -{ - return tqApp->type() != TQApplication::Tty; -} diff --git a/tdevdesigner/designer/project.h b/tdevdesigner/designer/project.h deleted file mode 100644 index 3e80428f..00000000 --- a/tdevdesigner/designer/project.h +++ /dev/null @@ -1,274 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PROJECT_H -#define PROJECT_H - -#include - -#include -#include -#include -#include -#include -#include "../interfaces/projectsettingsiface.h" -#include "sourcefile.h" -#include "formfile.h" -#include -#include -#include "formfile.h" - -class TQObjectList; -struct DesignerProject; -struct DesignerDatabase; -class PixmapCollection; -class Project; - -#ifndef TQT_NO_SQL -class TQSqlDatabase; - -class DatabaseConnection -{ -public: - DatabaseConnection( Project *p ) : -#ifndef TQT_NO_SQL - conn( 0 ), -#endif - project( p ), loaded( FALSE ), iface( 0 ) {} - ~DatabaseConnection(); - - bool refreshCatalog(); - bool open( bool suppressDialog = TRUE ); - void close(); - DesignerDatabase *iFace(); - - bool isLoaded() const { return loaded; } - void setName( const TQString& n ) { nm = n; } - TQString name() const { return nm; } - void setDriver( const TQString& d ) { drv = d; } - TQString driver() const { return drv; } - void setDatabase( const TQString& db ) { dbName = db; } - TQString database() const { return dbName; } - void setUsername( const TQString& u ) { uname = u; } - TQString username() const { return uname; } - void setPassword( const TQString& p ) { pword = p; } - TQString password() const { return pword; } - void setHostname( const TQString& h ) { hname = h; } - TQString hostname() const { return hname; } - void setPort( int p ) { prt = p; } - int port() const { return prt; } - TQString lastError() const { return dbErr; } - void addTable( const TQString& t ) { tbls.append(t); } - void setFields( const TQString& t, const TQStringList& f ) { flds[t] = f; } - TQStringList tables() const { return tbls; } - TQStringList fields( const TQString& t ) { return flds[t]; } - TQMap fields() { return flds; } -#ifndef TQT_NO_SQL - TQSqlDatabase* connection() const { return conn; } - void remove(); -#endif - -private: - TQString nm; - TQString drv, dbName, uname, pword, hname; - TQString dbErr; - int prt; - TQStringList tbls; - TQMap flds; -#ifndef TQT_NO_SQL - TQSqlDatabase *conn; -#endif - Project *project; - bool loaded; - DesignerDatabase *iface; -}; - -#endif - -class Project : public TQObject -{ - Q_OBJECT - - friend class DatabaseConnection; - -public: - Project( const TQString &fn, const TQString &pName = TQString(), - TQPluginManager *pm = 0, bool isDummy = FALSE, - const TQString &l = "C++" ); - ~Project(); - - void setFileName( const TQString &fn, bool doClear = TRUE ); - TQString fileName( bool singlePro = FALSE ) const; - TQString projectName() const; - - void setDatabaseDescription( const TQString &db ); - TQString databaseDescription() const; - - void setDescription( const TQString &s ); - TQString description() const; - - void setLanguage( const TQString &l ); - TQString language() const; - - - bool isValid() const; - - // returns TRUE if this project is the project - bool isDummy() const; - - TQString makeAbsolute( const TQString &f ); - TQString makeRelative( const TQString &f ); - - void save( bool onlyProjectFile = FALSE ); - -#ifndef TQT_NO_SQL - TQPtrList databaseConnections() const; - void setDatabaseConnections( const TQPtrList &lst ); - void addDatabaseConnection( DatabaseConnection *conn ); - void removeDatabaseConnection( const TQString &conn ); - DatabaseConnection *databaseConnection( const TQString &name ); - TQStringList databaseConnectionList(); - TQStringList databaseTableList( const TQString &connection ); - TQStringList databaseFieldList( const TQString &connection, const TQString &table ); -#endif - void saveConnections(); - void loadConnections(); - - bool openDatabase( const TQString &connection, bool suppressDialog = TRUE ); - void closeDatabase( const TQString &connection ); - - TQObjectList *formList( bool resolveFakeObjects = FALSE ) const; - - DesignerProject *iFace(); - - void setCustomSetting( const TQString &key, const TQString &value ); - TQString customSetting( const TQString &key ) const; - - PixmapCollection *pixmapCollection() const { return pixCollection; } - - void setActive( bool b ); - - TQPtrListIterator sourceFiles() const { return TQPtrListIterator(sourcefiles); } - void addSourceFile( SourceFile *sf ); - bool removeSourceFile( SourceFile *sf ); - SourceFile* findSourceFile( const TQString& filename, SourceFile *ignore = 0 ) const; - - TQPtrListIterator formFiles() const { return TQPtrListIterator(formfiles); } - void addFormFile( FormFile *ff ); - bool removeFormFile( FormFile *ff ); - FormFile* findFormFile( const TQString& filename, FormFile *ignore = 0 ) const; - - void setIncludePath( const TQString &platform, const TQString &path ); - void setLibs( const TQString &platform, const TQString &path ); - void setDefines( const TQString &platform, const TQString &path ); - void setConfig( const TQString &platform, const TQString &config ); - void setTemplate( const TQString &t ); - - TQString config( const TQString &platform ) const; - TQString libs( const TQString &platform ) const; - TQString defines( const TQString &platform ) const; - TQString includePath( const TQString &platform ) const; - TQString templte() const; - - bool isModified() const { return !isDummy() && modified; } - void setModified( bool b ); - - void addObject( TQObject *o ); - void setObjects( const TQObjectList &ol ); - void removeObject( TQObject *o ); - TQObjectList objects() const; - FormFile *fakeFormFileFor( TQObject *o ) const; - TQObject *objectForFakeForm( FormWindow *fw ) const; - TQObject *objectForFakeFormFile( FormFile *ff ) const; - - void addAndEditFunction( const TQString &functionName, const TQString &functionBody, - bool openDeveloper ); - - void removeTempProject(); - bool hasParentObject( TQObject *o ); - TQString qualifiedName( TQObject *o ); - - bool isCpp() const { return is_cpp; } - - void designerCreated(); - - void formOpened( FormWindow *fw ); - - TQString locationOfObject( TQObject *o ); - - bool hasGUI() const; - -signals: - void projectModified(); - void sourceFileAdded( SourceFile* ); - void sourceFileRemoved( SourceFile* ); - void formFileAdded( FormFile* ); - void formFileRemoved( FormFile* ); - void objectAdded( TQObject * ); - void objectRemoved( TQObject * ); - void newFormOpened( FormWindow *fw ); - -private: - void parse(); - void clear(); - void updateCustomSettings(); - void readPlatformSettings( const TQString &contents, - const TQString &setting, - TQMap &res ); - void removePlatformSettings( TQString &contents, const TQString &setting ); - void writePlatformSettings( TQString &contents, const TQString &setting, - const TQMap &input ); - bool singleProjectMode() const; - TQWidget *messageBoxParent() const; - -private: - TQString filename; - TQString proName; - TQString desc; - TQString dbFile; -#ifndef TQT_NO_SQL - TQPtrList dbConnections; -#endif - TQString lang; - DesignerProject *iface; - TQMap customSettings; - TQStringList csList; - TQPluginManager *projectSettingsPluginManager; - PixmapCollection *pixCollection; - TQPtrList sourcefiles; - TQPtrList formfiles; - TQMap inclPath, defs, lbs, cfg, sources, headers; - TQString templ; - bool isDummyProject; - bool modified; - TQObjectList objs; - TQPtrDict fakeFormFiles; - TQString singleProFileName; - bool is_cpp; - -}; - -#endif diff --git a/tdevdesigner/designer/projectsettings.ui b/tdevdesigner/designer/projectsettings.ui deleted file mode 100644 index d606a521..00000000 --- a/tdevdesigner/designer/projectsettings.ui +++ /dev/null @@ -1,301 +0,0 @@ - -ProjectSettingsBase -********************************************************************* -** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - ProjectSettingsBase - - - - 0 - 0 - 375 - 224 - - - - Project Settings - - - true - - - - unnamed - - - 11 - - - 6 - - - - tabWidget - - - - tabSettings - - - &Settings - - - - unnamed - - - - TextLabel1_2 - - - &Project file: - - - editProjectFile - - - - - TextLabel1_3 - - - &Language: - - - comboLanguage - - - - - buttonDatabaseFile_2 - - - ... - - - - - editDatabaseFile - - - - - TextLabel1_2_2_2 - - - &Database file: - - - editDatabaseFile - - - - - comboLanguage - - - false - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - editProjectFile - - - - - buttonProject - - - ... - - - - - - - Spacer3 - - - Vertical - - - Expanding - - - - 21 - 71 - - - - - - - - - Layout4 - - - - unnamed - - - 0 - - - 6 - - - - buttonHelp - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - Close the dialog and apply all the changes. - - - - - buttonCancel - - - &Cancel - - - true - - - Close the dialog and discard any changes. - - - - - - - - - buttonProject - clicked() - ProjectSettingsBase - chooseProjectFile() - - - buttonOk - clicked() - ProjectSettingsBase - okClicked() - - - buttonCancel - clicked() - ProjectSettingsBase - reject() - - - buttonHelp - clicked() - ProjectSettingsBase - helpClicked() - - - comboLanguage - activated(const TQString&) - ProjectSettingsBase - languageChanged(const TQString&) - - - - tabWidget - editProjectFile - comboLanguage - buttonHelp - buttonOk - buttonCancel - - - chooseDatabaseFile() - chooseProjectFile() - destroy() - helpClicked() - init() - languageChanged( const TQString & ) - okClicked() - - - diff --git a/tdevdesigner/designer/projectsettingsimpl.cpp b/tdevdesigner/designer/projectsettingsimpl.cpp deleted file mode 100644 index 99bb800d..00000000 --- a/tdevdesigner/designer/projectsettingsimpl.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "projectsettingsimpl.h" -#include "project.h" -#include "formwindow.h" -#include "metadatabase.h" -#include "mainwindow.h" -#include "asciivalidator.h" -#include "mainwindow.h" -#include "sourcefile.h" -#include "workspace.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Constructs a ProjectSettings which is a child of 'parent', with the - * name 'name' and widget flags set to 'f' - * - * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. - */ -ProjectSettings::ProjectSettings( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl ) - : ProjectSettingsBase( parent, name, modal, fl ), project( pro ) -{ - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - - editProjectFile->setFocus(); - - if ( project->isDummy() ) { - editProjectFile->setEnabled( FALSE ); - editProjectFile->setText( project->projectName() ); - } else { - if ( project->fileName().isEmpty() || project->fileName() == ".pro" ) { - editProjectFile->setText( tr( "unnamed.pro" ) ); - editProjectFile->selectAll(); - } else { - editProjectFile->setText( project->fileName() ); - } - } - - editDatabaseFile->setText( project->databaseDescription() ); - - comboLanguage->insertStringList( MetaDataBase::languages() ); - for ( int j = 0; j < (int)comboLanguage->count(); ++j ) { - if ( project->language() == comboLanguage->text( j ) ) { - comboLanguage->setCurrentItem( j ); - break; - } - } -} - -/* - * Destroys the object and frees any allocated resources - */ -ProjectSettings::~ProjectSettings() -{ -} - -void ProjectSettings::chooseDatabaseFile() -{ - TQString fn = KFileDialog::getSaveFileName( editDatabaseFile->text(), i18n( "*.db|Database Files\n*|All Files" ), this ); - if ( fn.isEmpty() ) - return; - editDatabaseFile->setText( fn ); -} - -void ProjectSettings::chooseProjectFile() -{ - TQString fn = KFileDialog::getSaveFileName( editDatabaseFile->text(), i18n( "*.pro|Project Files\n*|All Files" ), this ); - if ( fn.isEmpty() ) - return; - editProjectFile->setText( fn ); -} - -void ProjectSettings::helpClicked() -{ -} - -void ProjectSettings::okClicked() -{ - // ### check for validity - project->setFileName( editProjectFile->text(), FALSE ); - project->setDatabaseDescription( editDatabaseFile->text() ); - project->setLanguage( comboLanguage->text( comboLanguage->currentItem() ) ); - project->setModified( TRUE ); - accept(); -} - -void ProjectSettings::languageChanged( const TQString & ) -{ -} diff --git a/tdevdesigner/designer/projectsettingsimpl.h b/tdevdesigner/designer/projectsettingsimpl.h deleted file mode 100644 index c1b7fb0c..00000000 --- a/tdevdesigner/designer/projectsettingsimpl.h +++ /dev/null @@ -1,57 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PROJECTSETTINGSIMPL_H -#define PROJECTSETTINGSIMPL_H - -#include "projectsettings.h" - -class Project; -class TQListViewItem; -class FormWindow; -class SourceFile; - -class ProjectSettings : public ProjectSettingsBase -{ - Q_OBJECT - - -public: - ProjectSettings( Project *pro, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); - ~ProjectSettings(); - -protected slots: - void chooseDatabaseFile(); - void chooseProjectFile(); - void helpClicked(); - void okClicked(); - void languageChanged( const TQString &lang ); - -private: - Project *project; -}; - -#endif diff --git a/tdevdesigner/designer/propertyeditor.cpp b/tdevdesigner/designer/propertyeditor.cpp deleted file mode 100644 index c22e9b22..00000000 --- a/tdevdesigner/designer/propertyeditor.cpp +++ /dev/null @@ -1,4332 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include // HP-UX compiler needs this here - -#include "propertyeditor.h" -#include "formwindow.h" -#include "command.h" -#include "metadatabase.h" -#include "propertyobject.h" -#include -#include "widgetfactory.h" -#include "globaldefs.h" -#include "defs.h" -#include "asciivalidator.h" -#include "paletteeditorimpl.h" -#include "multilineeditorimpl.h" -#include "mainwindow.h" -#include "project.h" -#include "hierarchyview.h" -#include "database.h" -#include "menubareditor.h" - -#include -#include -#include -#include "tdevdesigner_part.h" - -#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 // FIXME: obsolete -#include -#include -#include - -#include - - -static TQFontDatabase *fontDataBase = 0; -TQString assistantPath(); - -#ifdef TQ_WS_MAC -#include -static void setupStyle(TQWidget *w) -{ - static TQStyle *windowsStyle = 0; - if(!windowsStyle) - windowsStyle = new TQWindowsStyle; - w->setStyle(windowsStyle); -} -#else -#define setupStyle(x) -#endif - -static void cleanupFontDatabase() -{ - delete fontDataBase; - fontDataBase = 0; -} - -static TQStringList getFontList() -{ - if ( !fontDataBase ) { - fontDataBase = new TQFontDatabase; - tqAddPostRoutine( cleanupFontDatabase ); - } - return fontDataBase->families(); -} - - -class PropertyWhatsThis : public TQWhatsThis -{ -public: - PropertyWhatsThis( PropertyList *l ); - TQString text( const TQPoint &pos ); - bool clicked( const TQString& href ); - -private: - PropertyList *propertyList; - -}; - -PropertyWhatsThis::PropertyWhatsThis( PropertyList *l ) - : TQWhatsThis( l->viewport() ), propertyList( l ) -{ -} - -TQString PropertyWhatsThis::text( const TQPoint &pos ) -{ - return propertyList->whatsThisAt( pos ); -} - -bool PropertyWhatsThis::clicked( const TQString& href ) -{ - if ( !href.isEmpty() ) { - TQAssistantClient *ac = MainWindow::self->assistantClient(); - ac->showPage( TQString( tqInstallPathDocs() ) + "/html/" + href ); - } - return FALSE; // do not hide window -} - - -/*! - \class PropertyItem propertyeditor.h - \brief Base class for all property items - - This is the base class for each property item for the - PropertyList. A simple property item has just a name and a value to - provide an editor for a datatype. But more complex datatypes might - provide an expandable item for editing single parts of the - datatype. See hasSubItems(), initChildren() for that. -*/ - -/*! If this item should be a child of another property item, specify - \a prop as the parent item. -*/ - -PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : TQListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName ) -{ - setSelectable( FALSE ); - open = FALSE; - setText( 0, propertyName ); - changed = FALSE; - setText( 1, "" ); - resetButton = 0; -} - -PropertyItem::~PropertyItem() -{ - if ( resetButton ) - delete resetButton->parentWidget(); - resetButton = 0; -} - -void PropertyItem::toggle() -{ -} - -void PropertyItem::updateBackColor() -{ - if ( itemAbove() && this != listview->firstChild() ) { - if ( ( ( PropertyItem*)itemAbove() )->backColor == *backColor1 ) - backColor = *backColor2; - else - backColor = *backColor1; - } else { - backColor = *backColor1; - } - if ( listview->firstChild() == this ) - backColor = *backColor1; -} - -TQColor PropertyItem::backgroundColor() -{ - updateBackColor(); - if ( (TQListViewItem*)this == listview->currentItem() ) - return *selectedBack; - return backColor; -} - -/*! If a subclass is a expandable item, this is called when the child -items should be created. -*/ - -void PropertyItem::createChildren() -{ -} - -/*! If a subclass is a expandable item, this is called when the child -items should be initialized. -*/ - -void PropertyItem::initChildren() -{ -} - -void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) -{ - TQColorGroup g( cg ); - g.setColor( TQColorGroup::Base, backgroundColor() ); - g.setColor( TQColorGroup::Foreground, TQt::black ); - g.setColor( TQColorGroup::Text, TQt::black ); - int indent = 0; - if ( column == 0 ) { - indent = 20 + ( property ? 20 : 0 ); - p->fillRect( 0, 0, width, height(), backgroundColor() ); - p->save(); - p->translate( indent, 0 ); - } - - if ( isChanged() && column == 0 ) { - p->save(); - TQFont f = p->font(); - f.setBold( TRUE ); - p->setFont( f ); - } - - if ( !hasCustomContents() || column != 1 ) { - TQListViewItem::paintCell( p, g, column, width - indent, align ); - } else { - p->fillRect( 0, 0, width, height(), backgroundColor() ); - drawCustomContents( p, TQRect( 0, 0, width, height() ) ); - } - - if ( isChanged() && column == 0 ) - p->restore(); - if ( column == 0 ) - p->restore(); - if ( hasSubItems() && column == 0 ) { - p->save(); - p->setPen( cg.foreground() ); - p->setBrush( cg.base() ); - p->drawRect( 5, height() / 2 - 4, 9, 9 ); - p->drawLine( 7, height() / 2, 11, height() / 2 ); - if ( !isOpen() ) - p->drawLine( 9, height() / 2 - 2, 9, height() / 2 + 2 ); - p->restore(); - } - p->save(); - p->setPen( TQPen( cg.dark(), 1 ) ); - p->drawLine( 0, height() - 1, width, height() - 1 ); - p->drawLine( width - 1, 0, width - 1, height() ); - p->restore(); - - if ( listview->currentItem() == this && column == 0 && - !listview->hasFocus() && !listview->viewport()->hasFocus() ) - paintFocus( p, cg, TQRect( 0, 0, width, height() ) ); -} - -void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg, - int w, int y, int h ) -{ - TQColorGroup g( cg ); - g.setColor( TQColorGroup::Base, backgroundColor() ); - TQListViewItem::paintBranches( p, g, w, y, h ); -} - -void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r ) -{ - p->save(); - TQApplication::style().tqdrawPrimitive(TQStyle::PE_Panel, p, r, cg, - TQStyle::Style_Sunken, TQStyleOption(1,1) ); - p->restore(); -} - -/*! Subclasses which are expandable items have to return TRUE - here. Default is FALSE. -*/ - -bool PropertyItem::hasSubItems() const -{ - return FALSE; -} - -/*! Returns the parent property item here if this is a child or 0 - otherwise. - */ - -PropertyItem *PropertyItem::propertyParent() const -{ - return property; -} - -bool PropertyItem::isOpen() const -{ - return open; -} - -void PropertyItem::setOpen( bool b ) -{ - if ( b == open ) - return; - open = b; - - if ( !open ) { - children.setAutoDelete( TRUE ); - children.clear(); - children.setAutoDelete( FALSE ); - tqApp->processEvents(); - listview->updateEditorSize(); - return; - } - - createChildren(); - initChildren(); - tqApp->processEvents(); - listview->updateEditorSize(); -} - -/*! Subclasses have to show the editor of the item here -*/ - -void PropertyItem::showEditor() -{ - createResetButton(); - resetButton->parentWidget()->show(); -} - -/*! Subclasses have to hide the editor of the item here -*/ - -void PropertyItem::hideEditor() -{ - createResetButton(); - resetButton->parentWidget()->hide(); -} - -/*! This is called to init the value of the item. Reimplement in - subclasses to init the editor -*/ - -void PropertyItem::setValue( const TQVariant &v ) -{ - val = v; -} - -TQVariant PropertyItem::value() const -{ - return val; -} - -bool PropertyItem::isChanged() const -{ - return changed; -} - -void PropertyItem::setChanged( bool b, bool updateDb ) -{ - if ( propertyParent() ) - return; - if ( changed == b ) - return; - changed = b; - repaint(); - if ( updateDb ) { - MetaDataBase::setPropertyChanged( listview->propertyEditor()->widget(), name(), changed ); - } - updateResetButtonState(); -} - -TQString PropertyItem::name() const -{ - return propertyName; -} - -void PropertyItem::createResetButton() -{ - if ( resetButton ) { - resetButton->parentWidget()->lower(); - return; - } - const TQPixmap DesignerResetPix = SmallIcon( "designer_resetproperty.png" , TDevDesignerPartFactory::instance()); - - TQHBox *hbox = new TQHBox( listview->viewport() ); - hbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - hbox->setLineWidth( 1 ); - resetButton = new TQPushButton( hbox ); - setupStyle( resetButton ); - resetButton->setPixmap( DesignerResetPix ); - resetButton->setFixedWidth( resetButton->sizeHint().width() ); - hbox->layout()->setAlignment( TQt::AlignRight ); - listview->addChild( hbox ); - hbox->hide(); - TQObject::connect( resetButton, TQT_SIGNAL( clicked() ), - listview, TQT_SLOT( resetProperty() ) ); - TQToolTip::add( resetButton, i18n( "Reset the property to its default value" ) ); - TQWhatsThis::add( resetButton, i18n( "Click this button to reset the property to its default value" ) ); - updateResetButtonState(); -} - -void PropertyItem::updateResetButtonState() -{ - if ( !resetButton ) - return; - if ( propertyParent() || !WidgetFactory::canResetProperty( listview->propertyEditor()->widget(), name() ) ) - resetButton->setEnabled( FALSE ); - else - resetButton->setEnabled( isChanged() ); -} - -/*! Call this to place/resize the item editor correctly (normally - call it from showEditor()) -*/ - -void PropertyItem::placeEditor( TQWidget *w ) -{ - createResetButton(); - TQRect r = listview->itemRect( this ); - if ( !r.size().isValid() ) { - listview->ensureItemVisible( this ); -#if defined(TQ_WS_WIN) - listview->repaintContents( FALSE ); -#endif - r = listview->itemRect( this ); - } - r.setX( listview->header()->sectionPos( 1 ) ); - r.setWidth( listview->header()->sectionSize( 1 ) - 1 ); - r.setWidth( r.width() - resetButton->width() - 2 ); - r = TQRect( listview->viewportToContents( r.topLeft() ), r.size() ); - w->resize( r.size() ); - listview->moveChild( w, r.x(), r.y() ); - resetButton->parentWidget()->resize( resetButton->sizeHint().width() + 10, r.height() ); - listview->moveChild( resetButton->parentWidget(), r.x() + r.width() - 8, r.y() ); - resetButton->setFixedHeight( TQMAX( 0, r.height() - 3 ) ); -} - -/*! This should be called by subclasses if the user changed the value - of the property and this value should be applied to the widget property -*/ - -void PropertyItem::notifyValueChange() -{ - if ( !propertyParent() ) { - listview->valueChanged( this ); - setChanged( TRUE ); - if ( hasSubItems() ) - initChildren(); - } else { - propertyParent()->childValueChanged( this ); - setChanged( TRUE ); - } -} - -/*! If a subclass is a expandable item reimplement this as this is - always called if a child item changed its value. So update the - display of the item here then. -*/ - -void PropertyItem::childValueChanged( PropertyItem * ) -{ -} - -/*! When adding a child item, call this (normally from addChildren() -*/ - -void PropertyItem::addChild( PropertyItem *i ) -{ - children.append( i ); -} - -int PropertyItem::childCount() const -{ - return children.count(); -} - -PropertyItem *PropertyItem::child( int i ) const -{ - // ARRRRRRRRG - return ( (PropertyItem*)this )->children.at( i ); -} - -/*! If the contents of the item is not displayable with a text, but - you want to draw it yourself (using drawCustomContents()), return - TRUE here. -*/ - -bool PropertyItem::hasCustomContents() const -{ - return FALSE; -} - -/*! - \sa hasCustomContents() -*/ - -void PropertyItem::drawCustomContents( TQPainter *, const TQRect & ) -{ -} - -TQString PropertyItem::currentItem() const -{ - return TQString(); -} - -int PropertyItem::currentIntItem() const -{ - return -1; -} - -void PropertyItem::setCurrentItem( const TQString & ) -{ -} - -void PropertyItem::setCurrentItem( int ) -{ -} - -int PropertyItem::currentIntItemFromObject() const -{ - return -1; -} - -TQString PropertyItem::currentItemFromObject() const -{ - return TQString(); -} - -void PropertyItem::setFocus( TQWidget *w ) -{ - if ( !tqApp->focusWidget() || - listview->propertyEditor()->formWindow() && - ( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->focusWidget()) ) && - !tqApp->focusWidget()->inherits( "Editor" ) ) ) - w->setFocus(); -} - -void PropertyItem::setText( int col, const TQString &t ) -{ - TQString txt( t ); - if ( col == 1 ) - txt = txt.replace( "\n", " " ); - TQListViewItem::setText( col, txt ); -} - -// -------------------------------------------------------------- - -PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool comment, bool multiLine, bool ascii, bool a ) - : PropertyItem( l, after, prop, propName ), withComment( comment ), - hasMultiLines( multiLine ), asciiOnly( ascii ), accel( a ) -{ - lin = 0; - box = 0; -} - -TQLineEdit *PropertyTextItem::lined() -{ - if ( lin ) - return lin; - if ( hasMultiLines ) { - box = new TQHBox( listview->viewport() ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - box->hide(); - } - - lin = 0; - if ( hasMultiLines ) - lin = new TQLineEdit( box ); - else - lin = new TQLineEdit( listview->viewport() ); - - if ( asciiOnly ) { - if ( PropertyItem::name() == "name" ) { - lin->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(lin), "ascii_validator" ) ); - if ( listview->propertyEditor()->formWindow()->isFake() ) - lin->setEnabled( FALSE ); - } else { - lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" - "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9" - "\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3" - "\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc" - "\xbd\xbe\xbf"), TQT_TQOBJECT(lin), "ascii_validator" ) ); - } - } if ( !hasMultiLines ) { - lin->hide(); - } else { - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getText() ) ); - lin->setFrame( FALSE ); - } - connect( lin, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( setValue() ) ); - connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( setValue() ) ); - if ( PropertyItem::name() == "name" || PropertyItem::name() == "itemName" ) - connect( lin, TQT_SIGNAL( returnPressed() ), - listview->propertyEditor()->formWindow()->commandHistory(), - TQT_SLOT( checkCompressedCommand() ) ); - lin->installEventFilter( listview ); - return lin; -} - -PropertyTextItem::~PropertyTextItem() -{ - delete (TQLineEdit*)lin; - lin = 0; - delete (TQHBox*)box; - box = 0; -} - -void PropertyTextItem::setChanged( bool b, bool updateDb ) -{ - PropertyItem::setChanged( b, updateDb ); - if ( withComment && childCount() > 0 ) - ( (PropertyTextItem*)PropertyItem::child( 0 ) )->lined()->setEnabled( b ); -} - -bool PropertyTextItem::hasSubItems() const -{ - return withComment; -} - -void PropertyTextItem::childValueChanged( PropertyItem *child ) -{ - if ( PropertyItem::name() != "name" ) - MetaDataBase::setPropertyComment( listview->propertyEditor()->widget(), - PropertyItem::name(), child->value().toString() ); - else - MetaDataBase::setExportMacro( listview->propertyEditor()->widget(), child->value().toString() ); - listview->propertyEditor()->formWindow()->commandHistory()->setModified( TRUE ); -} - -void PropertyTextItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin || lin->text().length() == 0 ) { - lined()->blockSignals( TRUE ); - lined()->setText( value().toString() ); - lined()->blockSignals( FALSE ); - } - - TQWidget* w; - if ( hasMultiLines ) - w = box; - else - w= lined(); - - placeEditor( w ); - if ( !w->isVisible() || !lined()->hasFocus() ) { - w->show(); - setFocus( lined() ); - } -} - -void PropertyTextItem::createChildren() -{ - PropertyTextItem *i = new PropertyTextItem( listview, this, this, - PropertyItem::name() == "name" ? - "export macro" : "comment", FALSE, FALSE, - PropertyItem::name() == "name" ); - i->lined()->setEnabled( isChanged() ); - addChild( i ); -} - -void PropertyTextItem::initChildren() -{ - if ( !childCount() ) - return; - PropertyItem *item = PropertyItem::child( 0 ); - if ( item ) { - if ( PropertyItem::name() != "name" ) - item->setValue( MetaDataBase::propertyComment( listview->propertyEditor()->widget(), - PropertyItem::name() ) ); - else - item->setValue( MetaDataBase::exportMacro( listview->propertyEditor()->widget() ) ); - } -} - -void PropertyTextItem::hideEditor() -{ - PropertyItem::hideEditor(); - TQWidget* w; - if ( hasMultiLines ) - w = box; - else - w = lined(); - - w->hide(); -} - -void PropertyTextItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - if ( lin ) { - lined()->blockSignals( TRUE ); - int oldCursorPos; - oldCursorPos = lin->cursorPosition(); - lined()->setText( v.toString() ); - if ( oldCursorPos < (int)lin->text().length() ) - lin->setCursorPosition( oldCursorPos ); - lined()->blockSignals( FALSE ); - } - setText( 1, v.toString() ); - PropertyItem::setValue( v ); -} - -void PropertyTextItem::setValue() -{ - setText( 1, lined()->text() ); - TQVariant v; - if ( accel ) { - v = TQVariant( TQKeySequence( lined()->text() ) ); - if ( v.toString().isNull() ) - return; // not yet valid input - } else { - v = lined()->text(); - } - PropertyItem::setValue( v ); - notifyValueChange(); -} - -void PropertyTextItem::getText() -{ - bool richText = !::tqqt_cast(listview->propertyEditor()->widget()) || - ( text( 0 ) == "whatsThis" ); - bool doWrap = FALSE; - TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap ); - if ( !txt.isEmpty() ) { - setText( 1, txt ); - PropertyItem::setValue( txt ); - notifyValueChange(); - lined()->blockSignals( TRUE ); - lined()->setText( txt ); - lined()->blockSignals( FALSE ); - } -} - -// -------------------------------------------------------------- - -PropertyDoubleItem::PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - lin = 0; -} - -TQLineEdit *PropertyDoubleItem::lined() -{ - if ( lin ) - return lin; - lin = new TQLineEdit( listview->viewport() ); - lin->setValidator( new TQDoubleValidator( TQT_TQOBJECT(lin), "double_validator" ) ); - - connect( lin, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( setValue() ) ); - connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( setValue() ) ); - lin->installEventFilter( listview ); - return lin; -} - -PropertyDoubleItem::~PropertyDoubleItem() -{ - delete (TQLineEdit*)lin; - lin = 0; -} - -void PropertyDoubleItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin ) { - lined()->blockSignals( TRUE ); - lined()->setText( TQString::number( value().toDouble() ) ); - lined()->blockSignals( FALSE ); - } - TQWidget* w = lined(); - - placeEditor( w ); - if ( !w->isVisible() || !lined()->hasFocus() ) { - w->show(); - setFocus( lined() ); - } -} - - -void PropertyDoubleItem::hideEditor() -{ - PropertyItem::hideEditor(); - TQWidget* w = lined(); - w->hide(); -} - -void PropertyDoubleItem::setValue( const TQVariant &v ) -{ - if ( value() == v ) - return; - if ( lin ) { - lined()->blockSignals( TRUE ); - int oldCursorPos; - oldCursorPos = lin->cursorPosition(); - lined()->setText( TQString::number( v.toDouble() ) ); - if ( oldCursorPos < (int)lin->text().length() ) - lin->setCursorPosition( oldCursorPos ); - lined()->blockSignals( FALSE ); - } - setText( 1, TQString::number( v.toDouble() ) ); - PropertyItem::setValue( v ); -} - -void PropertyDoubleItem::setValue() -{ - setText( 1, lined()->text() ); - TQVariant v = lined()->text().toDouble(); - PropertyItem::setValue( v ); - notifyValueChange(); -} - - -// -------------------------------------------------------------- - -PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - lin = 0; -} - -TQDateEdit *PropertyDateItem::lined() -{ - if ( lin ) - return lin; - lin = new TQDateEdit( listview->viewport() ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) - o->installEventFilter( listview ); - delete l; - connect( lin, TQT_SIGNAL( valueChanged( const TQDate & ) ), - this, TQT_SLOT( setValue() ) ); - return lin; -} - -PropertyDateItem::~PropertyDateItem() -{ - delete (TQDateEdit*)lin; - lin = 0; -} - -void PropertyDateItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin ) { - lined()->blockSignals( TRUE ); - lined()->setDate( value().toDate() ); - lined()->blockSignals( FALSE ); - } - placeEditor( lin ); - if ( !lin->isVisible() ) { - lin->show(); - setFocus( lin ); - } -} - -void PropertyDateItem::hideEditor() -{ - PropertyItem::hideEditor(); - if ( lin ) - lin->hide(); -} - -void PropertyDateItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - if ( lin ) { - lined()->blockSignals( TRUE ); - if ( lined()->date() != v.toDate() ) - lined()->setDate( v.toDate() ); - lined()->blockSignals( FALSE ); - } - setText( 1, v.toDate().toString( ::Qt::ISODate ) ); - PropertyItem::setValue( v ); -} - -void PropertyDateItem::setValue() -{ - setText( 1, lined()->date().toString( ::Qt::ISODate ) ); - TQVariant v; - v = lined()->date(); - PropertyItem::setValue( v ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - lin = 0; -} - -TQTimeEdit *PropertyTimeItem::lined() -{ - if ( lin ) - return lin; - lin = new TQTimeEdit( listview->viewport() ); - connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ), - this, TQT_SLOT( setValue() ) ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) - o->installEventFilter( listview ); - delete l; - return lin; -} - -PropertyTimeItem::~PropertyTimeItem() -{ - delete (TQTimeEdit*)lin; - lin = 0; -} - -void PropertyTimeItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin ) { - lined()->blockSignals( TRUE ); - lined()->setTime( value().toTime() ); - lined()->blockSignals( FALSE ); - } - placeEditor( lin ); - if ( !lin->isVisible() ) { - lin->show(); - setFocus( lin ); - } -} - -void PropertyTimeItem::hideEditor() -{ - PropertyItem::hideEditor(); - if ( lin ) - lin->hide(); -} - -void PropertyTimeItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - if ( lin ) { - lined()->blockSignals( TRUE ); - if ( lined()->time() != v.toTime() ) - lined()->setTime( v.toTime() ); - lined()->blockSignals( FALSE ); - } - setText( 1, v.toTime().toString( ::Qt::ISODate ) ); - PropertyItem::setValue( v ); -} - -void PropertyTimeItem::setValue() -{ - setText( 1, lined()->time().toString( ::Qt::ISODate ) ); - TQVariant v; - v = lined()->time(); - PropertyItem::setValue( v ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - lin = 0; -} - -TQDateTimeEdit *PropertyDateTimeItem::lined() -{ - if ( lin ) - return lin; - lin = new TQDateTimeEdit( listview->viewport() ); - connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ), - this, TQT_SLOT( setValue() ) ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) - o->installEventFilter( listview ); - delete l; - return lin; -} - -PropertyDateTimeItem::~PropertyDateTimeItem() -{ - delete (TQDateTimeEdit*)lin; - lin = 0; -} - -void PropertyDateTimeItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin ) { - lined()->blockSignals( TRUE ); - lined()->setDateTime( value().toDateTime() ); - lined()->blockSignals( FALSE ); - } - placeEditor( lin ); - if ( !lin->isVisible() ) { - lin->show(); - setFocus( lin ); - } -} - -void PropertyDateTimeItem::hideEditor() -{ - PropertyItem::hideEditor(); - if ( lin ) - lin->hide(); -} - -void PropertyDateTimeItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - if ( lin ) { - lined()->blockSignals( TRUE ); - if ( lined()->dateTime() != v.toDateTime() ) - lined()->setDateTime( v.toDateTime() ); - lined()->blockSignals( FALSE ); - } - setText( 1, v.toDateTime().toString( ::Qt::ISODate ) ); - PropertyItem::setValue( v ); -} - -void PropertyDateTimeItem::setValue() -{ - setText( 1, lined()->dateTime().toString( ::Qt::ISODate ) ); - TQVariant v; - v = lined()->dateTime(); - PropertyItem::setValue( v ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - comb = 0; -} - -TQComboBox *PropertyBoolItem::combo() -{ - if ( comb ) - return comb; - comb = new TQComboBox( FALSE, listview->viewport() ); - comb->hide(); - comb->insertItem( i18n( "False" ) ); - comb->insertItem( i18n( "True" ) ); - connect( comb, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( setValue() ) ); - comb->installEventFilter( listview ); - return comb; -} - -PropertyBoolItem::~PropertyBoolItem() -{ - delete (TQComboBox*)comb; - comb = 0; -} - -void PropertyBoolItem::toggle() -{ - bool b = value().toBool(); - setValue( TQVariant( !b, 0 ) ); - setValue(); -} - -void PropertyBoolItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !comb ) { - combo()->blockSignals( TRUE ); - if ( value().toBool() ) - combo()->setCurrentItem( 1 ); - else - combo()->setCurrentItem( 0 ); - combo()->blockSignals( FALSE ); - } - placeEditor( combo() ); - if ( !combo()->isVisible() || !combo()->hasFocus() ) { - combo()->show(); - setFocus( combo() ); - } -} - -void PropertyBoolItem::hideEditor() -{ - PropertyItem::hideEditor(); - combo()->hide(); -} - -void PropertyBoolItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - if ( comb ) { - combo()->blockSignals( TRUE ); - if ( v.toBool() ) - combo()->setCurrentItem( 1 ); - else - combo()->setCurrentItem( 0 ); - combo()->blockSignals( FALSE ); - } - TQString tmp = i18n( "True" ); - if ( !v.toBool() ) - tmp = i18n( "False" ); - setText( 1, tmp ); - PropertyItem::setValue( v ); -} - -void PropertyBoolItem::setValue() -{ - if ( !comb ) - return; - setText( 1, combo()->currentText() ); - bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE; - PropertyItem::setValue( TQVariant( b, 0 ) ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyIntItem::PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool s ) - : PropertyItem( l, after, prop, propName ), signedValue( s ) -{ - spinBx = 0; -} - -TQSpinBox *PropertyIntItem::spinBox() -{ - if ( spinBx ) - return spinBx; - if ( signedValue ) - spinBx = new TQSpinBox( -INT_MAX, INT_MAX, 1, listview->viewport() ); - else - spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() ); - spinBx->hide(); - spinBx->installEventFilter( listview ); - TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - if ( ol && ol->first() ) - ol->first()->installEventFilter( listview ); - delete ol; - connect( spinBx, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( setValue() ) ); - return spinBx; -} - -PropertyIntItem::~PropertyIntItem() -{ - delete (TQSpinBox*)spinBx; - spinBx = 0; -} - -void PropertyIntItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !spinBx ) { - spinBox()->blockSignals( TRUE ); - if ( signedValue ) - spinBox()->setValue( value().toInt() ); - else - spinBox()->setValue( value().toUInt() ); - spinBox()->blockSignals( FALSE ); - } - placeEditor( spinBox() ); - if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) { - spinBox()->show(); - setFocus( spinBox() ); - } -} - -void PropertyIntItem::hideEditor() -{ - PropertyItem::hideEditor(); - spinBox()->hide(); -} - -void PropertyIntItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - if ( spinBx ) { - spinBox()->blockSignals( TRUE ); - if ( signedValue ) - spinBox()->setValue( v.toInt() ); - else - spinBox()->setValue( v.toUInt() ); - spinBox()->blockSignals( FALSE ); - } - - if ( signedValue ) - setText( 1, TQString::number( v.toInt() ) ); - else - setText( 1, TQString::number( v.toUInt() ) ); - PropertyItem::setValue( v ); -} - -void PropertyIntItem::setValue() -{ - if ( !spinBx ) - return; - setText( 1, TQString::number( spinBox()->value() ) ); - if ( signedValue ) - PropertyItem::setValue( spinBox()->value() ); - else - PropertyItem::setValue( (uint)spinBox()->value() ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyLayoutItem::PropertyLayoutItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - spinBx = 0; -} - -PropertyLayoutItem::~PropertyLayoutItem() -{ - delete (TQSpinBox*)spinBx; - spinBx = 0; -} - -TQSpinBox* PropertyLayoutItem::spinBox() -{ - if ( spinBx ) - return spinBx; - spinBx = new TQSpinBox( -1, INT_MAX, 1, listview->viewport() ); - spinBx->setSpecialValueText( i18n( "default" ) ); - spinBx->hide(); - spinBx->installEventFilter( listview ); - TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - if ( ol && ol->first() ) - ol->first()->installEventFilter( listview ); - delete ol; - connect( spinBx, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( setValue() ) ); - return spinBx; -} - -void PropertyLayoutItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !spinBx ) { - spinBox()->blockSignals( TRUE ); - spinBox()->setValue( value().toInt() ); - spinBox()->blockSignals( TRUE ); - } - placeEditor( spinBox() ); - if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) { - spinBox()->show(); - setFocus( spinBox() ); - } -} - -void PropertyLayoutItem::hideEditor() -{ - PropertyItem::hideEditor(); - spinBox()->hide(); -} - -void PropertyLayoutItem::setValue( const TQVariant &v ) -{ - if ( spinBx ) { - spinBox()->blockSignals( TRUE ); - spinBox()->setValue( v.toInt() ); - spinBox()->blockSignals( FALSE ); - } - TQString s = v.toString(); - if ( v.toInt() == -1 ) - s = spinBox()->specialValueText(); - setText( 1, s ); - PropertyItem::setValue( v ); -} - -void PropertyLayoutItem::setValue() -{ - if ( !spinBx ) - return; - PropertyItem::setValue( spinBox()->value() ); - notifyValueChange(); -} - - -// -------------------------------------------------------------- - -PropertyListItem::PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool e ) - : PropertyItem( l, after, prop, propName ), editable( e ) -{ - comb = 0; - oldInt = -1; -} - -TQComboBox *PropertyListItem::combo() -{ - if ( comb ) - return comb; - comb = new TQComboBox( editable, listview->viewport() ); - comb->hide(); - connect( comb, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( setValue() ) ); - comb->installEventFilter( listview ); - if ( editable ) { - TQObjectList *ol = comb->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - if ( ol && ol->first() ) - ol->first()->installEventFilter( listview ); - delete ol; - } - return comb; -} - -PropertyListItem::~PropertyListItem() -{ - delete (TQComboBox*)comb; - comb = 0; -} - -void PropertyListItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !comb ) { - combo()->blockSignals( TRUE ); - combo()->clear(); - combo()->insertStringList( value().toStringList() ); - combo()->blockSignals( FALSE ); - } - placeEditor( combo() ); - if ( !combo()->isVisible() || !combo()->hasFocus() ) { - combo()->show(); - setFocus( combo() ); - } -} - -void PropertyListItem::hideEditor() -{ - PropertyItem::hideEditor(); - combo()->hide(); -} - -void PropertyListItem::setValue( const TQVariant &v ) -{ - if ( comb ) { - combo()->blockSignals( TRUE ); - combo()->clear(); - combo()->insertStringList( v.toStringList() ); - combo()->blockSignals( FALSE ); - } - setText( 1, v.toStringList().first() ); - PropertyItem::setValue( v ); -} - -void PropertyListItem::setValue() -{ - if ( !comb ) - return; - setText( 1, combo()->currentText() ); - TQStringList lst; - for ( uint i = 0; i < combo()->listBox()->count(); ++i ) - lst << combo()->listBox()->item( i )->text(); - PropertyItem::setValue( lst ); - notifyValueChange(); - oldInt = currentIntItem(); - oldString = currentItem(); -} - -TQString PropertyListItem::currentItem() const -{ - return ( (PropertyListItem*)this )->combo()->currentText(); -} - -void PropertyListItem::setCurrentItem( const TQString &s ) -{ - if ( comb && currentItem().lower() == s.lower() ) - return; - - if ( !comb ) { - combo()->blockSignals( TRUE ); - combo()->clear(); - combo()->insertStringList( value().toStringList() ); - combo()->blockSignals( FALSE ); - } - for ( uint i = 0; i < combo()->listBox()->count(); ++i ) { - if ( combo()->listBox()->item( i )->text().lower() == s.lower() ) { - combo()->setCurrentItem( i ); - setText( 1, combo()->currentText() ); - break; - } - } - oldInt = currentIntItem(); - oldString = currentItem(); -} - -void PropertyListItem::addItem( const TQString &s ) -{ - combo()->insertItem( s ); -} - -void PropertyListItem::setCurrentItem( int i ) -{ - if ( comb && i == combo()->currentItem() ) - return; - - if ( !comb ) { - combo()->blockSignals( TRUE ); - combo()->clear(); - combo()->insertStringList( value().toStringList() ); - combo()->blockSignals( FALSE ); - } - combo()->setCurrentItem( i ); - setText( 1, combo()->currentText() ); - oldInt = currentIntItem(); - oldString = currentItem(); -} - -int PropertyListItem::currentIntItem() const -{ - return ( (PropertyListItem*)this )->combo()->currentItem(); -} - -int PropertyListItem::currentIntItemFromObject() const -{ - return oldInt; -} - -TQString PropertyListItem::currentItemFromObject() const -{ - return oldString; -} - -// -------------------------------------------------------------- - -PropertyCoordItem::PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, Type t ) - : PropertyItem( l, after, prop, propName ), typ( t ) -{ - lin = 0; - -} - -TQLineEdit *PropertyCoordItem::lined() -{ - if ( lin ) - return lin; - lin = new TQLineEdit( listview->viewport() ); - lin->setReadOnly( TRUE ); - lin->installEventFilter( listview ); - lin->hide(); - return lin; -} - -void PropertyCoordItem::createChildren() -{ - PropertyItem *i = this; - if ( typ == Rect || typ == Point ) { - i = new PropertyIntItem( listview, i, this, i18n( "x" ), TRUE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "y" ), TRUE ); - addChild( i ); - } - if ( typ == Rect || typ == Size ) { - i = new PropertyIntItem( listview, i, this, i18n( "width" ), TRUE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "height" ), TRUE ); - addChild( i ); - } -} - -void PropertyCoordItem::initChildren() -{ - PropertyItem *item = 0; - for ( int i = 0; i < childCount(); ++i ) { - item = PropertyItem::child( i ); - if ( item->name() == i18n( "x" ) ) { - if ( typ == Rect ) - item->setValue( val.toRect().x() ); - else if ( typ == Point ) - item->setValue( val.toPoint().x() ); - } else if ( item->name() == i18n( "y" ) ) { - if ( typ == Rect ) - item->setValue( val.toRect().y() ); - else if ( typ == Point ) - item->setValue( val.toPoint().y() ); - } else if ( item->name() == i18n( "width" ) ) { - if ( typ == Rect ) - item->setValue( val.toRect().width() ); - else if ( typ == Size ) - item->setValue( val.toSize().width() ); - } else if ( item->name() == i18n( "height" ) ) { - if ( typ == Rect ) - item->setValue( val.toRect().height() ); - else if ( typ == Size ) - item->setValue( val.toSize().height() ); - } - } -} - -PropertyCoordItem::~PropertyCoordItem() -{ - delete (TQLineEdit*)lin; - lin = 0; -} - -void PropertyCoordItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin ) - lined()->setText( text( 1 ) ); - placeEditor( lined() ); - if ( !lined()->isVisible() || !lined()->hasFocus() ) { - lined()->show(); - setFocus( lined() ); - } -} - -void PropertyCoordItem::hideEditor() -{ - PropertyItem::hideEditor(); - lined()->hide(); -} - -void PropertyCoordItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - TQString s; - if ( typ == Rect ) - s = "[ " + TQString::number( v.toRect().x() ) + ", " + TQString::number( v.toRect().y() ) + ", " + - TQString::number( v.toRect().width() ) + ", " + TQString::number( v.toRect().height() ) + " ]"; - else if ( typ == Point ) - s = "[ " + TQString::number( v.toPoint().x() ) + ", " + - TQString::number( v.toPoint().y() ) + " ]"; - else if ( typ == Size ) - s = "[ " + TQString::number( v.toSize().width() ) + ", " + - TQString::number( v.toSize().height() ) + " ]"; - setText( 1, s ); - if ( lin ) - lined()->setText( s ); - PropertyItem::setValue( v ); -} - -bool PropertyCoordItem::hasSubItems() const -{ - return TRUE; -} - -void PropertyCoordItem::childValueChanged( PropertyItem *child ) -{ - if ( typ == Rect ) { - TQRect r = value().toRect(); - if ( child->name() == i18n( "x" ) ) - r.moveBy( -r.x() + child->value().toInt(), 0 ); - else if ( child->name() == i18n( "y" ) ) - r.moveBy( 0, -r.y() + child->value().toInt() ); - else if ( child->name() == i18n( "width" ) ) - r.setWidth( child->value().toInt() ); - else if ( child->name() == i18n( "height" ) ) - r.setHeight( child->value().toInt() ); - setValue( r ); - } else if ( typ == Point ) { - TQPoint r = value().toPoint(); - if ( child->name() == i18n( "x" ) ) - r.setX( child->value().toInt() ); - else if ( child->name() == i18n( "y" ) ) - r.setY( child->value().toInt() ); - setValue( r ); - } else if ( typ == Size ) { - TQSize r = value().toSize(); - if ( child->name() == i18n( "width" ) ) - r.setWidth( child->value().toInt() ); - else if ( child->name() == i18n( "height" ) ) - r.setHeight( child->value().toInt() ); - setValue( r ); - } - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, Type t ) - : PropertyItem( l, after, prop, propName ), type( t ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - pixPrev = new TQLabel( box ); - pixPrev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Minimum ) ); - pixPrev->setBackgroundColor( pixPrev->colorGroup().color( TQColorGroup::Base ) ); - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - pixPrev->setFrameStyle( TQFrame::NoFrame ); - box->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getPixmap() ) ); -} - -PropertyPixmapItem::~PropertyPixmapItem() -{ - delete (TQHBox*)box; -} - -void PropertyPixmapItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() ) { - box->show(); - listView()->viewport()->setFocus(); - } -} - -void PropertyPixmapItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyPixmapItem::setValue( const TQVariant &v ) -{ - TQString s; - if ( type == Pixmap ) - pixPrev->setPixmap( v.toPixmap() ); - else if ( type == IconSet ) - pixPrev->setPixmap( v.toIconSet().pixmap() ); - else - pixPrev->setPixmap( v.toImage() ); - PropertyItem::setValue( v ); - repaint(); -} - -void PropertyPixmapItem::getPixmap() -{ - TQPixmap pix = qChoosePixmap( listview, listview->propertyEditor()->formWindow(), value().toPixmap() ); - if ( !pix.isNull() ) { - if ( type == Pixmap ) - setValue( pix ); - else if ( type == IconSet ) - setValue( TQIconSet( pix ) ); - else - setValue( pix.convertToImage() ); - - notifyValueChange(); - } -} - -bool PropertyPixmapItem::hasCustomContents() const -{ - return TRUE; -} - -void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r ) -{ - TQPixmap pix; - if ( type == Pixmap ) - pix = value().toPixmap(); - else if ( type == IconSet ) - pix = value().toIconSet().pixmap(); - else - pix = value().toImage(); - - if ( !pix.isNull() ) { - p->save(); - p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()), - (int)(p->worldMatrix().dy() + r.y()) ), - r.size() ) ); - p->drawPixmap( r.x(), r.y() + ( r.height() - pix.height() ) / 2, pix ); - p->restore(); - } -} - - -// -------------------------------------------------------------- - -PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool children ) - : PropertyItem( l, after, prop, propName ), withChildren( children ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - colorPrev = new TQFrame( box ); - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - colorPrev->setFrameStyle( TQFrame::Plain | TQFrame::Box ); - colorPrev->setLineWidth( 2 ); - TQPalette pal = colorPrev->palette(); - TQColorGroup cg = pal.active(); - cg.setColor( TQColorGroup::Foreground, cg.color( TQColorGroup::Base ) ); - pal.setActive( cg ); - pal.setInactive( cg ); - pal.setDisabled( cg ); - colorPrev->setPalette( pal ); - box->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getColor() ) ); -} - -void PropertyColorItem::createChildren() -{ - PropertyItem *i = this; - i = new PropertyIntItem( listview, i, this, i18n( "Red" ), TRUE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "Green" ), TRUE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "Blue" ), TRUE ); - addChild( i ); -} - -void PropertyColorItem::initChildren() -{ - PropertyItem *item = 0; - for ( int i = 0; i < childCount(); ++i ) { - item = PropertyItem::child( i ); - if ( item->name() == i18n( "Red" ) ) - item->setValue( val.toColor().red() ); - else if ( item->name() == i18n( "Green" ) ) - item->setValue( val.toColor().green() ); - else if ( item->name() == i18n( "Blue" ) ) - item->setValue( val.toColor().blue() ); - } -} - -PropertyColorItem::~PropertyColorItem() -{ - delete (TQHBox*)box; -} - -void PropertyColorItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() ) { - box->show(); - listView()->viewport()->setFocus(); - } -} - -void PropertyColorItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyColorItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - TQString s; - setText( 1, v.toColor().name() ); - colorPrev->setBackgroundColor( v.toColor() ); - PropertyItem::setValue( v ); -} - -bool PropertyColorItem::hasSubItems() const -{ - return withChildren; -} - -void PropertyColorItem::childValueChanged( PropertyItem *child ) -{ - TQColor c( val.toColor() ); - if ( child->name() == i18n( "Red" ) ) - c.setRgb( child->value().toInt(), c.green(), c.blue() ); - else if ( child->name() == i18n( "Green" ) ) - c.setRgb( c.red(), child->value().toInt(), c.blue() ); - else if ( child->name() == i18n( "Blue" ) ) - c.setRgb( c.red(), c.green(), child->value().toInt() ); - setValue( c ); - notifyValueChange(); -} - -void PropertyColorItem::getColor() -{ - TQColor c = TQColorDialog::getColor( val.asColor(), listview ); - if ( c.isValid() ) { - setValue( c ); - notifyValueChange(); - } -} - -bool PropertyColorItem::hasCustomContents() const -{ - return TRUE; -} - -void PropertyColorItem::drawCustomContents( TQPainter *p, const TQRect &r ) -{ - p->save(); - p->setPen( TQPen( black, 1 ) ); - p->setBrush( val.toColor() ); - p->drawRect( r.x() + 2, r.y() + 2, r.width() - 5, r.height() - 5 ); - p->restore(); -} - -// -------------------------------------------------------------- - -PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - lined = new TQLineEdit( box ); - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - lined->setFrame( FALSE ); - lined->setReadOnly( TRUE ); - box->setFocusProxy( lined ); - box->installEventFilter( listview ); - lined->installEventFilter( listview ); - button->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getFont() ) ); -} - -void PropertyFontItem::createChildren() -{ - PropertyItem *i = this; - i = new PropertyListItem( listview, i, this, i18n( "Family" ), FALSE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "Point Size" ), TRUE ); - addChild( i ); - i = new PropertyBoolItem( listview, i, this, i18n( "Bold" ) ); - addChild( i ); - i = new PropertyBoolItem( listview, i, this, i18n( "Italic" ) ); - addChild( i ); - i = new PropertyBoolItem( listview, i, this, i18n( "Underline" ) ); - addChild( i ); - i = new PropertyBoolItem( listview, i, this, i18n( "Strikeout" ) ); - addChild( i ); -} - -void PropertyFontItem::initChildren() -{ - PropertyItem *item = 0; - for ( int i = 0; i < childCount(); ++i ) { - item = PropertyItem::child( i ); - if ( item->name() == i18n( "Family" ) ) { - ( (PropertyListItem*)item )->setValue( getFontList() ); - ( (PropertyListItem*)item )->setCurrentItem( val.toFont().family() ); - } else if ( item->name() == i18n( "Point Size" ) ) - item->setValue( val.toFont().pointSize() ); - else if ( item->name() == i18n( "Bold" ) ) - item->setValue( TQVariant( val.toFont().bold(), 0 ) ); - else if ( item->name() == i18n( "Italic" ) ) - item->setValue( TQVariant( val.toFont().italic(), 0 ) ); - else if ( item->name() == i18n( "Underline" ) ) - item->setValue( TQVariant( val.toFont().underline(), 0 ) ); - else if ( item->name() == i18n( "Strikeout" ) ) - item->setValue( TQVariant( val.toFont().strikeOut(), 0 ) ); - } -} - -PropertyFontItem::~PropertyFontItem() -{ - delete (TQHBox*)box; -} - -void PropertyFontItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() || !lined->hasFocus() ) { - box->show(); - setFocus( lined ); - } -} - -void PropertyFontItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyFontItem::setValue( const TQVariant &v ) -{ - if ( value() == v ) - return; - - setText( 1, v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) ); - lined->setText( v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) ); - PropertyItem::setValue( v ); -} - -void PropertyFontItem::getFont() -{ - bool ok = FALSE; - TQFont f = TQFontDialog::getFont( &ok, val.toFont(), listview ); - if ( ok && f != val.toFont() ) { - setValue( f ); - notifyValueChange(); - } -} - -bool PropertyFontItem::hasSubItems() const -{ - return TRUE; -} - -void PropertyFontItem::childValueChanged( PropertyItem *child ) -{ - TQFont f = val.toFont(); - if ( child->name() == i18n( "Family" ) ) - f.setFamily( ( (PropertyListItem*)child )->currentItem() ); - else if ( child->name() == i18n( "Point Size" ) ) - f.setPointSize( child->value().toInt() ); - else if ( child->name() == i18n( "Bold" ) ) - f.setBold( child->value().toBool() ); - else if ( child->name() == i18n( "Italic" ) ) - f.setItalic( child->value().toBool() ); - else if ( child->name() == i18n( "Underline" ) ) - f.setUnderline( child->value().toBool() ); - else if ( child->name() == i18n( "Strikeout" ) ) - f.setStrikeOut( child->value().toBool() ); - setValue( f ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool wField ) - : PropertyItem( l, after, prop, propName ), withField( wField ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - lined = new TQLineEdit( box ); - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - lined->setFrame( FALSE ); - lined->setReadOnly( TRUE ); - box->setFocusProxy( lined ); - box->installEventFilter( listview ); - lined->installEventFilter( listview ); - button->installEventFilter( listview ); -} - -void PropertyDatabaseItem::createChildren() -{ - PropertyItem *i = this; - i = new PropertyListItem( listview, i, this, i18n( "Connection" ), TRUE ); - addChild( i ); - i = new PropertyListItem( listview, i, this, i18n( "Table" ), TRUE ); - addChild( i ); - if ( withField ) { - i = new PropertyListItem( listview, i, this, i18n( "Field" ), TRUE ); - addChild( i ); - } -} - -void PropertyDatabaseItem::initChildren() -{ -#ifndef TQT_NO_SQL - PropertyItem *item = 0; - TQStringList lst = value().toStringList(); - TQString conn, table; - for ( int i = 0; i < childCount(); ++i ) { - item = PropertyItem::child( i ); - if ( item->name() == i18n( "Connection" ) ) { - TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseConnectionList(); - if ( !cl.isEmpty() ) - item->setValue( cl ); - else if ( lst.count() > 0 ) - item->setValue( TQStringList( lst[ 0 ] ) ); - else if ( withField ) - item->setValue( TQStringList( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), - "database" ).toStringList()[ 0 ] ) ); - - if ( lst.count() > 0 && !lst[ 0 ].isEmpty() ) - item->setCurrentItem( lst[ 0 ] ); - else if ( !isChanged() && withField ) - item->setCurrentItem( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), - "database" ).toStringList()[ 0 ] ); - else - item->setCurrentItem( 0 ); - conn = item->currentItem(); - } else if ( item->name() == i18n( "Table" ) ) { - TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseTableList( conn ); - if ( !cl.isEmpty() ) - item->setValue( cl ); - else if ( lst.count() > 1 ) - item->setValue( TQStringList( lst[ 1 ] ) ); - else if ( withField ) { - TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); - if ( fakeLst.count() > 1 ) - item->setValue( fakeLst[ 1 ] ); - } - - if ( lst.count() > 1 && !lst[ 1 ].isEmpty() ) - item->setCurrentItem( lst[ 1 ] ); - else if ( !isChanged() && withField ) { - TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); - if ( fakeLst.count() > 1 ) - item->setCurrentItem( fakeLst[ 1 ] ); - else - item->setCurrentItem( 0 ); - } else - item->setCurrentItem( 0 ); - table = item->currentItem(); - } else if ( item->name() == i18n( "Field" ) ) { - TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseFieldList( conn, table ); - if ( !cl.isEmpty() ) - item->setValue( cl ); - else if ( lst.count() > 2 ) - item->setValue( TQStringList( lst[ 2 ] ) ); - if ( lst.count() > 2 && !lst[ 2 ].isEmpty() ) - item->setCurrentItem( lst[ 2 ] ); - else - item->setCurrentItem( 0 ); - } - } -#endif -} - -PropertyDatabaseItem::~PropertyDatabaseItem() -{ - delete (TQHBox*)box; -} - -void PropertyDatabaseItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() || !lined->hasFocus() ) { - box->show(); - setFocus( lined ); - } -} - -void PropertyDatabaseItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyDatabaseItem::setValue( const TQVariant &v ) -{ - if ( value() == v ) - return; - - TQStringList lst = v.toStringList(); - TQString s = lst.join( "." ); - setText( 1, s ); - lined->setText( s ); - PropertyItem::setValue( v ); -} - -bool PropertyDatabaseItem::hasSubItems() const -{ - return TRUE; -} - -void PropertyDatabaseItem::childValueChanged( PropertyItem *c ) -{ -#ifndef TQT_NO_SQL - TQStringList lst; - lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem() - << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem(); - if ( withField ) - lst << ( (PropertyListItem*)PropertyItem::child( 2 ) )->currentItem(); - if ( c == PropertyItem::child( 0 ) ) { // if the connection changed - lst[ 0 ] = ( (PropertyListItem*)c )->currentItem(); - PropertyItem::child( 1 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseTableList( lst[ 0 ] ) ); - if ( withField ) - PropertyItem::child( 2 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ) ); - } else if ( withField && c == PropertyItem::child( 1 ) ) { // if the table changed - lst[ 1 ] = ( (PropertyListItem*)c )->currentItem(); - if ( withField ) - PropertyItem::child( 2 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ) ); - } - lst.clear(); - lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem() - << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem(); - if ( withField ) - lst << ( (PropertyListItem*)PropertyItem::child( 2 ) )->currentItem(); - setValue( lst ); - notifyValueChange(); -#else - Q_UNUSED( c ); -#endif -} - -// -------------------------------------------------------------- - -PropertySizePolicyItem::PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - lin = 0; -} - -TQLineEdit *PropertySizePolicyItem::lined() -{ - if ( lin ) - return lin; - lin = new TQLineEdit( listview->viewport() ); - lin->hide(); - lin->setReadOnly( TRUE ); - return lin; -} - -void PropertySizePolicyItem::createChildren() -{ - TQStringList lst; - lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored"; - - PropertyItem *i = this; - i = new PropertyListItem( listview, i, this, i18n( "hSizeType" ), FALSE ); - i->setValue( lst ); - addChild( i ); - i = new PropertyListItem( listview, i, this, i18n( "vSizeType" ), FALSE ); - i->setValue( lst ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "horizontalStretch" ), TRUE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "verticalStretch" ), TRUE ); - addChild( i ); -} - -void PropertySizePolicyItem::initChildren() -{ - PropertyItem *item = 0; - TQSizePolicy sp = val.toSizePolicy(); - for ( int i = 0; i < childCount(); ++i ) { - item = PropertyItem::child( i ); - if ( item->name() == i18n( "hSizeType" ) ) - ( (PropertyListItem*)item )->setCurrentItem( size_type_to_int( sp.horData() ) ); - else if ( item->name() == i18n( "vSizeType" ) ) - ( (PropertyListItem*)item )->setCurrentItem( size_type_to_int( sp.verData() ) ); - else if ( item->name() == i18n( "horizontalStretch" ) ) - ( (PropertyIntItem*)item )->setValue( sp.horStretch() ); - else if ( item->name() == i18n( "verticalStretch" ) ) - ( (PropertyIntItem*)item )->setValue( sp.verStretch() ); - } -} - -PropertySizePolicyItem::~PropertySizePolicyItem() -{ - delete (TQLineEdit*)lin; -} - -void PropertySizePolicyItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( lined() ); - if ( !lined()->isVisible() || !lined()->hasFocus() ) { - lined()->show(); - listView()->viewport()->setFocus(); - } -} - -void PropertySizePolicyItem::hideEditor() -{ - PropertyItem::hideEditor(); - lined()->hide(); -} - -void PropertySizePolicyItem::setValue( const TQVariant &v ) -{ - if ( value() == v ) - return; - - TQString s = i18n( "%1/%2/%3/%4" ); - s = s.arg( size_type_to_string( v.toSizePolicy().horData() ) ). - arg( size_type_to_string( v.toSizePolicy().verData() ) ). - arg( v.toSizePolicy().horStretch() ). - arg( v.toSizePolicy().verStretch() ); - setText( 1, s ); - lined()->setText( s ); - PropertyItem::setValue( v ); -} - -void PropertySizePolicyItem::childValueChanged( PropertyItem *child ) -{ - TQSizePolicy sp = val.toSizePolicy(); - if ( child->name() == i18n( "hSizeType" ) ) - sp.setHorData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) ); - else if ( child->name() == i18n( "vSizeType" ) ) - sp.setVerData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) ); - else if ( child->name() == i18n( "horizontalStretch" ) ) - sp.setHorStretch( ( ( PropertyIntItem*)child )->value().toInt() ); - else if ( child->name() == i18n( "verticalStretch" ) ) - sp.setVerStretch( ( ( PropertyIntItem*)child )->value().toInt() ); - setValue( sp ); - notifyValueChange(); -} - -bool PropertySizePolicyItem::hasSubItems() const -{ - return TRUE; -} - -// -------------------------------------------------------------- - -PropertyPaletteItem::PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - palettePrev = new TQLabel( box ); - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - palettePrev->setFrameStyle( TQFrame::NoFrame ); - box->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getPalette() ) ); -} -PropertyPaletteItem::~PropertyPaletteItem() -{ - delete (TQHBox*)box; -} - -void PropertyPaletteItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() ) { - box->show(); - listView()->viewport()->setFocus(); - } -} - -void PropertyPaletteItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyPaletteItem::setValue( const TQVariant &v ) -{ - TQString s; - palettePrev->setPalette( v.toPalette() ); - PropertyItem::setValue( v ); - repaint(); -} - -void PropertyPaletteItem::getPalette() -{ - if ( !listview->propertyEditor()->widget()->isWidgetType() ) - return; - bool ok = FALSE; - TQWidget *w = (TQWidget*)listview->propertyEditor()->widget(); - if ( ::tqqt_cast(w) ) - w = ( (TQScrollView*)w )->viewport(); - TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(), -#if defined(TQT_NON_COMMERCIAL) - w->backgroundMode(), listview->topLevelWidget(), -#else - w->backgroundMode(), listview, -#endif - "choose_palette", listview->propertyEditor()->formWindow() ); - if ( !ok ) - return; - setValue( pal ); - notifyValueChange(); -} - -bool PropertyPaletteItem::hasCustomContents() const -{ - return TRUE; -} - -void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r ) -{ - TQPalette pal( value().toPalette() ); - p->save(); - p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()), - (int)(p->worldMatrix().dy() + r.y()) ), - r.size() ) ); - TQRect r2( r ); - r2.setX( r2.x() + 2 ); - r2.setY( r2.y() + 2 ); - r2.setWidth( r2.width() - 3 ); - r2.setHeight( r2.height() - 3 ); - p->setPen( TQPen( black, 1 ) ); - p->setBrush( pal.active().background() ); - p->drawRect( r2 ); - p->restore(); -} - -// -------------------------------------------------------------- - -PropertyCursorItem::PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - comb = 0; -} - -TQComboBox *PropertyCursorItem::combo() -{ - if ( comb ) - return comb; - comb = new TQComboBox( FALSE, listview->viewport() ); - comb->hide(); - TQBitmap cur; - - const TQPixmap ArrowPix = SmallIcon( "designer_arrow.png" , TDevDesignerPartFactory::instance()); - const TQPixmap UpArrowPix = SmallIcon( "designer_uparrow.png" , TDevDesignerPartFactory::instance()); - const TQPixmap CrossPix = SmallIcon( "designer_cross.png" , TDevDesignerPartFactory::instance()); - const TQPixmap WaitPix = SmallIcon( "designer_wait.png" , TDevDesignerPartFactory::instance()); - const TQPixmap IBeamPix = SmallIcon( "designer_ibeam.png" , TDevDesignerPartFactory::instance()); - const TQPixmap SizeVPix = SmallIcon( "designer_sizev.png" , TDevDesignerPartFactory::instance()); - const TQPixmap SizeHPix = SmallIcon( "designer_sizeh.png" , TDevDesignerPartFactory::instance()); - const TQPixmap SizeFPix = SmallIcon( "designer_sizef.png" , TDevDesignerPartFactory::instance()); - const TQPixmap SizeBPix = SmallIcon( "designer_sizeb.png" , TDevDesignerPartFactory::instance()); - const TQPixmap SizeAllPix = SmallIcon( "designer_sizeall.png" , TDevDesignerPartFactory::instance()); - const TQPixmap VSplitPix = SmallIcon( "designer_vsplit.png" , TDevDesignerPartFactory::instance()); - const TQPixmap HSplitPix = SmallIcon( "designer_hsplit.png" , TDevDesignerPartFactory::instance()); - const TQPixmap HandPix = SmallIcon( "designer_hand.png" , TDevDesignerPartFactory::instance()); - const TQPixmap NoPix = SmallIcon( "designer_no.png" , TDevDesignerPartFactory::instance()); - - comb->insertItem( ArrowPix, i18n("Arrow"), TQObject::ArrowCursor); - comb->insertItem( UpArrowPix, i18n("Up-Arrow"), TQObject::UpArrowCursor ); - comb->insertItem( CrossPix, i18n("Cross"), TQObject::CrossCursor ); - comb->insertItem( WaitPix, i18n("Waiting"), TQObject::WaitCursor ); - comb->insertItem( IBeamPix, i18n("iBeam"), TQObject::IbeamCursor ); - comb->insertItem( SizeVPix, i18n("SizeQt::Vertical"), TQObject::SizeVerCursor ); - comb->insertItem( SizeHPix, i18n("SizeQt::Horizontal"), TQObject::SizeHorCursor ); - comb->insertItem( SizeFPix, i18n("Size Slash"), TQObject::SizeBDiagCursor ); - comb->insertItem( SizeBPix, i18n("Size Backslash"), TQObject::SizeFDiagCursor ); - comb->insertItem( SizeAllPix, i18n("Size All"), TQObject::SizeAllCursor ); - cur = TQBitmap( 25, 25, 1 ); - cur.setMask( cur ); - comb->insertItem( cur, i18n("Blank"), TQObject::BlankCursor ); - comb->insertItem( VSplitPix, i18n("SplitQt::Vertical"), TQObject::SplitVCursor ); - comb->insertItem( HSplitPix, i18n("SplitQt::Horizontal"), TQObject::SplitHCursor ); - comb->insertItem( HandPix, i18n("Pointing Hand"), TQObject::PointingHandCursor ); - comb->insertItem( NoPix, i18n("Forbidden"), TQObject::ForbiddenCursor ); - - connect( comb, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( setValue() ) ); - comb->installEventFilter( listview ); - return comb; -} - -PropertyCursorItem::~PropertyCursorItem() -{ - delete (TQComboBox*)comb; -} - -void PropertyCursorItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !comb ) { - combo()->blockSignals( TRUE ); - combo()->setCurrentItem( (int)value().toCursor().shape() ); - combo()->blockSignals( FALSE ); - } - placeEditor( combo() ); - if ( !combo()->isVisible() || !combo()->hasFocus() ) { - combo()->show(); - setFocus( combo() ); - } -} - -void PropertyCursorItem::hideEditor() -{ - PropertyItem::hideEditor(); - combo()->hide(); -} - -void PropertyCursorItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - combo()->blockSignals( TRUE ); - combo()->setCurrentItem( (int)v.toCursor().shape() ); - combo()->blockSignals( FALSE ); - setText( 1, combo()->currentText() ); - PropertyItem::setValue( v ); -} - -void PropertyCursorItem::setValue() -{ - if ( !comb ) - return; - if ( TQVariant( TQCursor( combo()->currentItem() ) ) == val ) - return; - setText( 1, combo()->currentText() ); - PropertyItem::setValue( TQCursor( combo()->currentItem() ) ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyKeysequenceItem::PropertyKeysequenceItem( PropertyList *l, - PropertyItem *after, - PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ), - k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( FALSE ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - sequence = new TQLineEdit( box ); - connect( sequence, TQT_SIGNAL(textChanged( const TQString & )), - this, TQT_SLOT(setValue()) ); - sequence->installEventFilter( this ); -} - -PropertyKeysequenceItem::~PropertyKeysequenceItem() -{ - delete (TQHBox*)box; -} - -void PropertyKeysequenceItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() ) { - box->show(); - sequence->setFocus(); - } -} - -void PropertyKeysequenceItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -bool PropertyKeysequenceItem::eventFilter( TQObject *o, TQEvent *e ) -{ - Q_UNUSED( o ); - if ( e->type() == TQEvent::KeyPress ) { - TQKeyEvent *k = (TQKeyEvent *)e; - if ( !mouseEnter && - (k->key() == TQObject::Key_Up || - k->key() == TQObject::Key_Down) ) - return FALSE; - handleKeyEvent( k ); - return TRUE; - } else if ( (e->type() == TQEvent::FocusIn) || - (e->type() == TQEvent::MouseButtonPress) ) { - mouseEnter = ( listview->lastEvent() == PropertyList::MouseEvent ) || - (e->type() == TQEvent::MouseButtonPress); - return TRUE; - } - - // Lets eat accelerators now.. - if ( e->type() == TQEvent::Accel || - e->type() == TQEvent::AccelOverride || - e->type() == TQEvent::KeyRelease ) - return TRUE; - return FALSE; -} - -void PropertyKeysequenceItem::handleKeyEvent( TQKeyEvent *e ) -{ - int nextKey = e->key(); - - if ( num > 3 || - nextKey == TQObject::Key_Control || - nextKey == TQObject::Key_Shift || - nextKey == TQObject::Key_Meta || - nextKey == TQObject::Key_Alt ) - return; - - nextKey |= translateModifiers( e->state() ); - switch( num ) { - case 0: - k1 = nextKey; - break; - case 1: - k2 = nextKey; - break; - case 2: - k3 = nextKey; - break; - case 3: - k4 = nextKey; - break; - default: - break; - } - num++; - TQKeySequence ks( k1, k2, k3, k4 ); - sequence->setText( ks ); -} - -int PropertyKeysequenceItem::translateModifiers( int state ) -{ - int result = 0; - if ( state & TQObject::ShiftButton ) - result |= TQObject::SHIFT; - if ( state & TQObject::ControlButton ) - result |= TQObject::CTRL; - if ( state & TQObject::MetaButton ) - result |= TQObject::META; - if ( state & TQObject::AltButton ) - result |= TQObject::ALT; - return result; -} - -void PropertyKeysequenceItem::setValue() -{ - TQVariant v; - v = TQVariant( TQKeySequence(sequence->text()) ); - if ( v.toString().isNull() ) - return; - setText( 1, sequence->text() ); - PropertyItem::setValue( v ); - if ( sequence->hasFocus() ) - notifyValueChange(); - setChanged( TRUE ); -} - -void PropertyKeysequenceItem::setValue( const TQVariant &v ) -{ - TQKeySequence ks = v.toKeySequence(); - if ( sequence ) { - sequence->setText( ks ); - } - num = ks.count(); - k1 = ks[0]; - k2 = ks[1]; - k3 = ks[2]; - k4 = ks[3]; - setText( 1, ks ); - PropertyItem::setValue( v ); -} - -// -------------------------------------------------------------- - -EnumPopup::EnumPopup( TQWidget *parent, const char *name, WFlags f ) - : TQFrame( parent, name, f ) -{ - setLineWidth( 1 ); - setFrameStyle( Panel | Plain ); - setPaletteBackgroundColor( TQt::white ); - popLayout = new TQVBoxLayout( this, 3 ); - checkBoxList.setAutoDelete( TRUE ); -} - -EnumPopup::~EnumPopup() -{ -} - -void EnumPopup::insertEnums( TQValueList lst ) -{ - while ( checkBoxList.count() ) - checkBoxList.removeFirst(); - - itemList = lst; - TQCheckBox *cb; - TQValueListConstIterator it = itemList.begin(); - for ( ; it != itemList.end(); ++it ) { - cb = new TQCheckBox( this ); - cb->setText( (*it).key ); - cb->setChecked( (*it).selected ); - if ( it == itemList.begin() ) - cb->setFocus(); - checkBoxList.append( cb ); - cb->resize( width(), cb->height() ); - popLayout->addWidget( cb ); - } -} - -void EnumPopup::keyPressEvent( TQKeyEvent *e ) -{ - if ( e->key() == Key_Escape ) { - hide(); - emit hidden(); - } else if ( e->key() == Key_Enter || e->key() == Key_Return ) { - closeWidget(); - } -} - -void EnumPopup::closeWidget() -{ - TQPtrListIterator it( checkBoxList ); - int i = 0; - while ( it.current() != 0 ) { - itemList[i].selected = (*it)->isChecked(); - ++it; - ++i; - } - close(); - emit closed(); -} - -TQValueList EnumPopup::enumList() const -{ - return itemList; -} - -EnumBox::EnumBox( TQWidget *parent, const char *name ) - : TQComboBox( parent, name ) -{ - pop = new EnumPopup( this, "popup", TQObject::WType_Popup ); - connect( pop, TQT_SIGNAL( hidden() ), this, TQT_SLOT( popupHidden() ) ); - connect( pop, TQT_SIGNAL( closed() ), this, TQT_SLOT( popupClosed() ) ); - popupShown = FALSE; - arrowDown = FALSE; -} - -void EnumBox::popupHidden() -{ - popupShown = FALSE; -} - -void EnumBox::popupClosed() -{ - popupShown = FALSE; - emit valueChanged(); -} - -void EnumBox::paintEvent( TQPaintEvent * ) -{ - TQPainter p( this ); - const TQColorGroup & g = colorGroup(); - p.setPen(g.text()); - - TQStyle::SFlags flags = TQStyle::Style_Default; - if (isEnabled()) - flags |= TQStyle::Style_Enabled; - if (hasFocus()) - flags |= TQStyle::Style_HasFocus; - - if ( width() < 5 || height() < 5 ) { - qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, FALSE, 2, - &g.brush( TQColorGroup::Button ) ); - return; - } - style().drawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g, - flags, TQStyle::SC_All, - (arrowDown ? - TQStyle::SC_ComboBoxArrow : - TQStyle::SC_None )); - - TQRect re = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, - TQStyle::SC_ComboBoxEditField ); - re = TQStyle::visualRect(re, this); - p.setClipRect( re ); - - if ( !str.isNull() ) { - p.save(); - p.setFont(font()); - TQFontMetrics fm(font()); - int x = re.x(), y = re.y() + fm.ascent(); - p.drawText( x, y, str ); - p.restore(); - } -} - -void EnumBox::insertEnums( TQValueList lst ) -{ - pop->insertEnums( lst ); -} - -TQValueList EnumBox::enumList() const -{ - return pop->enumList(); -} - -void EnumBox::popup() -{ - if ( popupShown ) { - pop->closeWidget(); - popupShown = FALSE; - return; - } - pop->move( ((TQWidget*)parent())->mapToGlobal( geometry().bottomLeft() ) ); - pop->setMinimumWidth( width() ); - emit aboutToShowPopup(); - pop->show(); - popupShown = TRUE; -} - -void EnumBox::mousePressEvent( TQMouseEvent *e ) -{ - if ( e->button() != Qt::LeftButton ) - return; - - TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, - TQStyle::SC_ComboBoxArrow); - arrowRect = TQStyle::visualRect(arrowRect, this); - - arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); - - if ( arrowRect.contains( e->pos() ) ) { - arrowDown = TRUE; - repaint( FALSE ); - } - - popup(); - TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) ); -} - -void EnumBox::keyPressEvent( TQKeyEvent *e ) -{ - if ( e->key() == Key_Space ) { - popup(); - TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) ); - } else if ( e->key() == Key_Enter || e->key() == Key_Return ) { - popup(); - } -} - -void EnumBox::restoreArrow() -{ - arrowDown = FALSE; - repaint( FALSE ); -} - -void EnumBox::setText( const TQString &text ) -{ - str = text; - repaint( FALSE ); -} - - - -PropertyEnumItem::PropertyEnumItem( PropertyList *l, - PropertyItem *after, - PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - box = new EnumBox( listview->viewport() ); - box->hide(); - box->installEventFilter( listview ); - connect( box, TQT_SIGNAL( aboutToShowPopup() ), this, TQT_SLOT( insertEnums() ) ); - connect( box, TQT_SIGNAL( valueChanged() ), this, TQT_SLOT( setValue() ) ); -} - -PropertyEnumItem::~PropertyEnumItem() -{ - delete (EnumBox*)box; -} - -void PropertyEnumItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() ) { - box->show(); - box->setText( enumString ); - listView()->viewport()->setFocus(); - } - box->setFocus(); -} - -void PropertyEnumItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyEnumItem::setValue( const TQVariant &v ) -{ - enumString = ""; - enumList.clear(); - TQStringList lst = v.toStringList(); - TQValueListConstIterator it = lst.begin(); - for ( ; it != lst.end(); ++it ) - enumList.append( EnumItem( *it, FALSE ) ); - enumList.first().selected = TRUE; - enumString = enumList.first().key; - box->setText( enumString ); - setText( 1, enumString ); - PropertyItem::setValue( v ); -} - -void PropertyEnumItem::insertEnums() -{ - box->insertEnums( enumList ); -} - -void PropertyEnumItem::setValue() -{ - enumList = box->enumList(); - enumString = ""; - TQValueListConstIterator it = enumList.begin(); - for ( ; it != enumList.end(); ++it ) { - if ( (*it).selected ) - enumString += "|" + (*it).key; - } - if ( !enumString.isEmpty() ) - enumString.replace( 0, 1, "" ); - - box->setText( enumString ); - setText( 1, enumString ); - notifyValueChange(); -} - -void PropertyEnumItem::setCurrentValues( TQStrList lst ) -{ - enumString =""; - TQStrList::ConstIterator it = lst.begin(); - TQValueList::Iterator eit = enumList.begin(); - for ( ; eit != enumList.end(); ++eit ) { - (*eit).selected = FALSE; - for ( it = lst.begin(); it != lst.end(); ++it ) { - if ( TQString( *it ) == (*eit).key ) { - (*eit).selected = TRUE; - enumString += "|" + (*eit).key; - break; - } - } - } - if ( !enumString.isEmpty() ) - enumString.replace( 0, 1, "" ); - box->setText( enumString ); - setText( 1, enumString ); -} - -TQString PropertyEnumItem::currentItem() const -{ - return enumString; -} - -TQString PropertyEnumItem::currentItemFromObject() const -{ - return enumString; -} - -// -------------------------------------------------------------- - -/*! - \class PropertyList propertyeditor.h - \brief PropertyList is a TQListView derived class which is used for editing widget properties - - This class is used for widget properties. It has to be child of a - PropertyEditor. - - To initialize it for editing a widget call setupProperties() which - iterates through the properties of the current widget (see - PropertyEditor::widget()) and builds the list. - - To update the item values, refetchData() can be called. - - If the value of an item has been changed by the user, and this - change should be applied to the widget's property, valueChanged() - has to be called. - - To set the value of an item, setPropertyValue() has to be called. -*/ - -PropertyList::PropertyList( PropertyEditor *e ) - : TQListView( e ), editor( e ) -{ - init_colors(); - - whatsThis = new PropertyWhatsThis( this ); - showSorted = FALSE; - header()->setMovingEnabled( FALSE ); - header()->setStretchEnabled( TRUE ); - setResizePolicy( TQScrollView::Manual ); - viewport()->setAcceptDrops( TRUE ); - viewport()->installEventFilter( this ); - addColumn( i18n( "Property" ) ); - addColumn( i18n( "Value" ) ); - connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ), - this, TQT_SLOT( updateEditorSize() ) ); - disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), - this, TQT_SLOT( changeSortColumn( int ) ) ); - connect( header(), TQT_SIGNAL( sectionClicked( int ) ), - this, TQT_SLOT( toggleSort() ) ); - connect( this, TQT_SIGNAL( pressed( TQListViewItem *, const TQPoint &, int ) ), - this, TQT_SLOT( itemPressed( TQListViewItem *, const TQPoint &, int ) ) ); - connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - this, TQT_SLOT( toggleOpen( TQListViewItem * ) ) ); - setSorting( -1 ); - setHScrollBarMode( AlwaysOff ); - setVScrollBarMode( AlwaysOn ); - setColumnWidthMode( 1, Manual ); - mousePressed = FALSE; - pressItem = 0; - theLastEvent = MouseEvent; - header()->installEventFilter( this ); -} - -void PropertyList::toggleSort() -{ - showSorted = !showSorted; - editor->clear(); - editor->setup(); -} - -void PropertyList::resizeEvent( TQResizeEvent *e ) -{ - TQListView::resizeEvent( e ); - if ( currentItem() ) - ( ( PropertyItem* )currentItem() )->showEditor(); -} - -static TQVariant::Type type_to_variant( const TQString &s ) -{ - if ( s == "Invalid " ) - return TQVariant::Invalid; - if ( s == "Map" ) - return TQVariant::Map; - if ( s == "List" ) - return TQVariant::List; - if ( s == "String" ) - return TQVariant::String; - if ( s == "StringList" ) - return TQVariant::StringList; - if ( s == "Font" ) - return TQVariant::Font; - if ( s == "Pixmap" ) - return TQVariant::Pixmap; - if ( s == "Brush" ) - return TQVariant::Brush; - if ( s == "Rect" ) - return TQVariant::Rect; - if ( s == "Size" ) - return TQVariant::Size; - if ( s == "Color" ) - return TQVariant::Color; - if ( s == "Palette" ) - return TQVariant::Palette; - if ( s == "ColorGroup" ) - return TQVariant::ColorGroup; - if ( s == "IconSet" ) - return TQVariant::IconSet; - if ( s == "Point" ) - return TQVariant::Point; - if ( s == "Image" ) - return TQVariant::Image; - if ( s == "Int" ) - return TQVariant::Int; - if ( s == "UInt" ) - return TQVariant::UInt; - if ( s == "Bool" ) - return TQVariant::Bool; - if ( s == "Double" ) - return TQVariant::Double; - if ( s == "CString" ) - return TQVariant::CString; - if ( s == "PointArray" ) - return TQVariant::PointArray; - if ( s == "Region" ) - return TQVariant::Region; - if ( s == "Bitmap" ) - return TQVariant::Bitmap; - if ( s == "Cursor" ) - return TQVariant::Cursor; - if ( s == "SizePolicy" ) - return TQVariant::SizePolicy; - if ( s == "Date" ) - return TQVariant::Date; - if ( s == "Time" ) - return TQVariant::Time; - if ( s == "DateTime" ) - return TQVariant::DateTime; - return TQVariant::Invalid; -} - -#ifndef TQT_NO_SQL -static bool parent_is_data_aware( TQWidget *w ) -{ - TQWidget *p = w ? w->parentWidget() : 0; - while ( p && !p->isTopLevel() ) { - if ( ::tqqt_cast(p) || ::tqqt_cast(p) ) - return TRUE; - p = p->parentWidget(); - } - return FALSE; -} -#endif - -/*! Sets up the property list by adding an item for each designable -property of the widget which is just edited. -*/ - -void PropertyList::setupProperties() -{ - if ( !editor->widget() ) - return; - bool allProperties = !::tqqt_cast(editor->widget()); - TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties ); - PropertyItem *item = 0; - TQMap unique; - TQObject *w = editor->widget(); - TQStringList valueSet; - bool parentHasLayout = - w->isWidgetType() && - !editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->parentWidget() && - WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; - for ( TQPtrListIterator it( lst ); it.current(); ++it ) { - const TQMetaProperty* p = - editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( it.current(), allProperties), allProperties ); - if ( !p ) - continue; - if ( unique.contains( TQString::fromLatin1( it.current() ) ) ) - continue; - if ( ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) ) { - if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "geometry" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumSize" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) - continue; - } - unique.insert( TQString::fromLatin1( it.current() ), TRUE ); - if ( editor->widget()->isWidgetType() && - editor->formWindow()->isMainContainer( TQT_TQOBJECT(editor->widget()) ) ) { - if ( qstrcmp( p->name(), "geometry" ) == 0 ) - continue; - } else { // hide some toplevel-only stuff - if ( qstrcmp( p->name(), "icon" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "iconText" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "caption" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "sizeIncrement" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "baseSize" ) == 0 ) - continue; - if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) - continue; - if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) { - if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "geometry" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumSize" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "enabled" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "paletteForegroundColor" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "paletteBackgroundColor" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "paletteBackgroundPixmap" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "palette" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "font" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "cursor" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "mouseTracking" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "focusPolicy" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "acceptDrops" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "autoMask" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "backgroundOrigin" ) == 0 ) - continue; - } - } - if ( ::tqqt_cast(w) ) { - if ( qstrcmp( p->name(), "usesDropDown" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "toggleAction" ) == 0 ) - continue; - } - if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in TQ_PROPERTY can take a function (isInButtonGroup() in this case) - if ( !editor->widget()->isWidgetType() || - !editor->widget()->parent() || - !::tqqt_cast(editor->widget()->parent()) ) - continue; - } - - bool isPropertyObject = w->isA( "PropertyObject" ); - - if ( ( p->designable(w) || - isPropertyObject && p->designable( ( (PropertyObject*)w )->widgetList().first() ) ) && - ( !isPropertyObject || qstrcmp( p->name(), "name" ) != 0 ) ) { - if ( p->isSetType() ) { - if ( TQString( p->name() ) == "alignment" ) { - TQStringList lst; - lst << p->valueToKey( AlignAuto ) - << p->valueToKey( AlignLeft ) - << p->valueToKey( AlignHCenter ) - << p->valueToKey( AlignRight ) - << p->valueToKey( AlignJustify ); - item = new PropertyListItem( this, item, 0, "hAlign", FALSE ); - item->setValue( lst ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) ) - item->setChanged( TRUE, FALSE ); - if ( !::tqqt_cast(editor->widget()) ) { - lst.clear(); - lst << p->valueToKey( AlignTop ) - << p->valueToKey( AlignVCenter ) - << p->valueToKey( AlignBottom ); - item = new PropertyListItem( this, item, 0, "vAlign", FALSE ); - item->setValue( lst ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) ) - item->setChanged( TRUE, FALSE ); - item = new PropertyBoolItem( this, item, 0, "wordwrap" ); - if ( ::tqqt_cast(w) ) - item->setVisible( FALSE ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) ) - item->setChanged( TRUE, FALSE ); - } - } else { - TQStrList lst( p->enumKeys() ); - TQStringList l; - TQPtrListIterator it( lst ); - while ( it.current() != 0 ) { - l << TQString(*it); - ++it; - } - item = new PropertyEnumItem( this, item, 0, p->name() ); - item->setValue( l ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) ) - item->setChanged( TRUE, FALSE ); - } - } else if ( p->isEnumType() ) { - TQStrList l = p->enumKeys(); - TQStringList lst; - for ( uint i = 0; i < l.count(); ++i ) { - TQString k = l.at( i ); - // filter out enum-masks - if ( k[0] == 'M' && k[1].category() == TQChar::Letter_Uppercase ) - continue; - lst << k; - } - item = new PropertyListItem( this, item, 0, p->name(), FALSE ); - item->setValue( lst ); - } else { - TQVariant::Type t = TQVariant::nameToType( p->type() ); - if ( !addPropertyItem( item, p->name(), t ) ) - continue; - } - } - if ( item && !p->isSetType() ) { - if ( valueSet.findIndex( item->name() ) == -1 ) { - setPropertyValue( item ); - valueSet << item->name(); - } - if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) ) - item->setChanged( TRUE, FALSE ); - } - } - - if ( !::tqqt_cast(w) && !::tqqt_cast(w) && !::tqqt_cast(w) && - w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { - item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" ) - || MetaDataBase::spacing( editor->widget() ) != -1 ) - layoutInitValue( item, TRUE ); - else - layoutInitValue( item ); - item = new PropertyLayoutItem( this, item, 0, "layoutMargin" ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutMargin" ) - || MetaDataBase::margin( editor->widget() ) != -1 ) - layoutInitValue( item, TRUE ); - else - layoutInitValue( item ); - TQWidget *widget = (TQWidget*)w; - if ( ( !::tqqt_cast(widget) && - widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) ) ) { - item = new PropertyListItem( this, item, 0, "resizeMode", FALSE ); - TQStringList lst; - lst << "Auto" << "FreeResize" << "Minimum" << "Fixed"; - item->setValue( lst ); - setPropertyValue( item ); - TQString resizeMod = MetaDataBase::resizeMode( editor->widget() ); - if ( !resizeMod.isEmpty() && - resizeMod != WidgetFactory::defaultCurrentItem( editor->widget(), "resizeMode" ) ) { - item->setChanged( TRUE, FALSE ); - MetaDataBase::setPropertyChanged( editor->widget(), "resizeMode", TRUE ); - } - } - } - - if ( !::tqqt_cast(w) && !::tqqt_cast(w) && - !::tqqt_cast(w) && !::tqqt_cast(w) ) { - item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) - item->setChanged( TRUE, FALSE ); - item = new PropertyTextItem( this, item, 0, "whatsThis", TRUE, TRUE ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "whatsThis" ) ) - item->setChanged( TRUE, FALSE ); - } - -#ifndef TQT_NO_SQL - if ( !::tqqt_cast(editor->widget()) && !::tqqt_cast(editor->widget()) && - !::tqqt_cast(editor->widget()) && parent_is_data_aware( ::tqqt_cast(editor->widget()) ) ) { - item = new PropertyDatabaseItem( this, item, 0, "database", TQT_BASE_OBJECT(editor->formWindow()->mainContainer()) != TQT_BASE_OBJECT(w) ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) - item->setChanged( TRUE, FALSE ); - } - - if ( ::tqqt_cast(editor->widget()) || ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) ) { - item = new PropertyDatabaseItem( this, item, 0, "database", FALSE ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) - item->setChanged( TRUE, FALSE ); - item = new PropertyBoolItem( this, item, 0, "frameworkCode" ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "frameworkCode" ) ) - item->setChanged( TRUE, FALSE ); - } -#endif - - if ( w->isA("PropertyObject") ) { - const TQWidgetList wl = ( (PropertyObject*)w )->widgetList(); - TQPtrListIterator wIt( wl ); - while ( *wIt ) { - if ( (*wIt)->inherits("CustomWidget") ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)*wIt )->customWidget(); - setupCusWidgetProperties( cw, unique, item ); - } - ++wIt; - } - } else if ( w->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); - setupCusWidgetProperties( cw, unique, item ); - } - - setCurrentItem( firstChild() ); - - if ( showSorted ) { - setSorting( 0 ); - sort(); - setSorting( -1 ); - setCurrentItem( firstChild() ); - tqApp->processEvents(); - } - - updateEditorSize(); -} - -void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw, - TQMap &unique, - PropertyItem *&item ) -{ - if ( !cw ) - return; - - for ( TQValueList::Iterator it = - cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { - if ( unique.contains( TQString( (*it).property ) ) ) - continue; - unique.insert( TQString( (*it).property ), TRUE ); - addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), (*it).property ) ) - item->setChanged( TRUE, FALSE ); - } -} - -bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t ) -{ - if ( name == "buddy" ) { - PropertyListItem *itm = new PropertyListItem( this, item, 0, name, TRUE ); - TQPtrDict *widgets = editor->formWindow()->widgets(); - TQPtrDictIterator it( *widgets ); - TQStringList l; - l << ""; - while ( it.current() ) { - if ( editor->formWindow()->canBeBuddy( it.current() ) ) { - if ( l.find( it.current()->name() ) == l.end() ) - l << it.current()->name(); - } - ++it; - } - l.sort(); - itm->setValue( l ); - item = itm; - return TRUE; - } - - switch ( t ) { - case TQVariant::String: - item = new PropertyTextItem( this, item, 0, name, TRUE, - ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) ); - break; - case TQVariant::CString: - item = new PropertyTextItem( this, item, 0, - name, name == "name" && - TQT_BASE_OBJECT(editor->widget()) == TQT_BASE_OBJECT(editor->formWindow()->mainContainer()), - FALSE, TRUE ); - break; - case TQVariant::Bool: - item = new PropertyBoolItem( this, item, 0, name ); - break; - case TQVariant::Font: - item = new PropertyFontItem( this, item, 0, name ); - break; - case TQVariant::Int: - if ( name == "accel" ) - item = new PropertyTextItem( this, item, 0, name, FALSE, FALSE, FALSE, TRUE ); - else if ( name == "layoutSpacing" || name == "layoutMargin" ) - item = new PropertyLayoutItem( this, item, 0, name ); - else if ( name == "resizeMode" ) - item = new PropertyListItem( this, item, 0, name, TRUE ); - else - item = new PropertyIntItem( this, item, 0, name, TRUE ); - break; - case TQVariant::Double: - item = new PropertyDoubleItem( this, item, 0, name ); - break; - case TQVariant::KeySequence: - item = new PropertyKeysequenceItem( this, item, 0, name ); - break; - case TQVariant::UInt: - item = new PropertyIntItem( this, item, 0, name, FALSE ); - break; - case TQVariant::StringList: - item = new PropertyListItem( this, item, 0, name, TRUE ); - break; - case TQVariant::Rect: - item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect ); - break; - case TQVariant::Point: - item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Point ); - break; - case TQVariant::Size: - item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size ); - break; - case TQVariant::Color: - item = new PropertyColorItem( this, item, 0, name, TRUE ); - break; - case TQVariant::Pixmap: - item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Pixmap ); - break; - case TQVariant::IconSet: - item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::IconSet ); - break; - case TQVariant::Image: - item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Image ); - break; - case TQVariant::SizePolicy: - item = new PropertySizePolicyItem( this, item, 0, name ); - break; - case TQVariant::Palette: - item = new PropertyPaletteItem( this, item, 0, name ); - break; - case TQVariant::Cursor: - item = new PropertyCursorItem( this, item, 0, name ); - break; - case TQVariant::Date: - item = new PropertyDateItem( this, item, 0, name ); - break; - case TQVariant::Time: - item = new PropertyTimeItem( this, item, 0, name ); - break; - case TQVariant::DateTime: - item = new PropertyDateTimeItem( this, item, 0, name ); - break; - default: - return FALSE; - } - return TRUE; -} - -void PropertyList::paintEmptyArea( TQPainter *p, const TQRect &r ) -{ - p->fillRect( r, *backColor2 ); -} - -void PropertyList::setCurrentItem( TQListViewItem *i ) -{ - if ( !i ) - return; - - if ( currentItem() ) - ( (PropertyItem*)currentItem() )->hideEditor(); - TQListView::setCurrentItem( i ); - ( (PropertyItem*)currentItem() )->showEditor(); -} - -void PropertyList::updateEditorSize() -{ - if ( currentItem() ) - ( ( PropertyItem* )currentItem() )->showEditor(); -} - -/*! This has to be called if the value if \a i should be set as - property to the currently edited widget. -*/ - -void PropertyList::valueChanged( PropertyItem *i ) -{ - if ( !editor->widget() ) - return; - TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), - editor->widget(), editor, - i->name(), WidgetFactory::property( editor->widget(), i->name() ), - i->value(), i->currentItem(), i->currentItemFromObject() ); - - cmd->execute(); - editor->formWindow()->commandHistory()->addCommand( cmd, TRUE ); -} - -void PropertyList::layoutInitValue( PropertyItem *i, bool changed ) -{ - if ( !editor->widget() ) - return; - TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), - editor->widget(), editor, - i->name(), WidgetFactory::property( editor->widget(), i->name() ), - i->value(), i->currentItem(), i->currentItemFromObject() ); - cmd->execute(); - if ( i->value().toString() != "-1" ) - changed = TRUE; - i->setChanged( changed ); -} - -void PropertyList::itemPressed( TQListViewItem *i, const TQPoint &p, int c ) -{ - if ( !i ) - return; - PropertyItem *pi = (PropertyItem*)i; - if ( !pi->hasSubItems() ) - return; - - if ( c == 0 && viewport()->mapFromGlobal( p ).x() < 20 ) - toggleOpen( i ); -} - -void PropertyList::toggleOpen( TQListViewItem *i ) -{ - if ( !i ) - return; - PropertyItem *pi = (PropertyItem*)i; - if ( pi->hasSubItems() ) { - pi->setOpen( !pi->isOpen() ); - } else { - pi->toggle(); - } -} - -bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) -{ - if ( !o || !e ) - return TRUE; - - PropertyItem *i = (PropertyItem*)currentItem(); - if ( e->type() == TQEvent::KeyPress ) - theLastEvent = KeyEvent; - else if ( e->type() == TQEvent::MouseButtonPress ) - theLastEvent = MouseEvent; - - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) &&e->type() == TQEvent::KeyPress ) { - TQKeyEvent *ke = (TQKeyEvent*)e; - if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) && - ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(viewport()) ) && - !( ke->state() & ControlButton ) ) { - TQApplication::sendEvent( this, (TQKeyEvent*)e ); - return TRUE; - } else if ( ( !::tqqt_cast(o) || - ( ::tqqt_cast(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) && - i && i->hasSubItems() ) { - if ( !i->isOpen() && - ( ke->key() == Key_Plus || - ke->key() == Key_Right )) - i->setOpen( TRUE ); - else if ( i->isOpen() && - ( ke->key() == Key_Minus || - ke->key() == Key_Left ) ) - i->setOpen( FALSE ); - } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqqt_cast(o) ) { - TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 ); - TQApplication::sendEvent( o, &ke2 ); - return TRUE; - } - } else if ( e->type() == TQEvent::FocusOut && ::tqqt_cast(o) && editor->formWindow() ) { - TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) ); - } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) { - TQMouseEvent *me; - PropertyListItem* i; - switch ( e->type() ) { - case TQEvent::MouseButtonPress: - me = (TQMouseEvent*)e; - i = (PropertyListItem*) itemAt( me->pos() ); - if ( i && ( ::tqqt_cast(i) || ::tqqt_cast(i) ) ) { - pressItem = i; - pressPos = me->pos(); - mousePressed = TRUE; - } - break; - case TQEvent::MouseMove: - me = (TQMouseEvent*)e; - if ( me && me->state() & Qt::LeftButton && mousePressed) { - - i = (PropertyListItem*) itemAt( me->pos() ); - if ( i && i == pressItem ) { - - if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){ - if ( ::tqqt_cast(i) ) { - TQColor col = i->value().asColor(); - TQColorDrag *drg = new TQColorDrag( col, this ); - TQPixmap pix( 25, 25 ); - pix.fill( col ); - TQPainter p( &pix ); - p.drawRect( 0, 0, pix.width(), pix.height() ); - p.end(); - drg->setPixmap( pix ); - mousePressed = FALSE; - drg->dragCopy(); - } - else if ( ::tqqt_cast(i) ) { - TQPixmap pix = i->value().asPixmap(); - if( !pix.isNull() ) { - TQImage img = pix.convertToImage(); - TQImageDrag *drg = new TQImageDrag( img, this ); - drg->setPixmap( pix ); - mousePressed = FALSE; - drg->dragCopy(); - } - } - } - } - } - break; - default: - break; - } - } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) ) { - if ( e->type() == TQEvent::ContextMenu ) { - ((TQContextMenuEvent *)e)->accept(); - TQPopupMenu menu( 0 ); - menu.setCheckable( TRUE ); - const int cat_id = 1; - const int alpha_id = 2; - menu.insertItem( i18n( "Sort &Categorized" ), cat_id ); - int alpha = menu.insertItem( i18n( "Sort &Alphabetically" ), alpha_id ); - if ( showSorted ) - menu.setItemChecked( alpha_id, TRUE ); - else - menu.setItemChecked( cat_id, TRUE ); - int res = menu.exec( ( (TQContextMenuEvent*)e )->globalPos() ); - if ( res != -1 ) { - bool newShowSorted = ( res == alpha ); - if ( showSorted != newShowSorted ) { - showSorted = newShowSorted; - editor->clear(); - editor->setup(); - } - } - return TRUE; - } - } - - return TQListView::eventFilter( o, e ); -} - -/*! This method re-initializes each item of the property list. -*/ - -void PropertyList::refetchData() -{ - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - PropertyItem *i = (PropertyItem*)it.current(); - if ( !i->propertyParent() ) - setPropertyValue( i ); - if ( i->hasSubItems() ) - i->initChildren(); - bool changed = MetaDataBase::isPropertyChanged( editor->widget(), i->name() ); - if ( ( i->name() == "layoutSpacing" || i->name() == "layoutMargin" ) ) { - if ( i->value().toString() != "-1" ) - i->setChanged( TRUE, FALSE ); - else - i->setChanged( FALSE, FALSE ); - } - else if ( changed != i->isChanged() ) - i->setChanged( changed, FALSE ); - } - updateEditorSize(); -} - -static void clearAlignList( TQStrList &l ) -{ - if ( l.count() == 1 ) - return; - if ( l.find( "AlignAuto" ) != -1 ) - l.remove( "AlignAuto" ); - if ( l.find( "WordBreak" ) != -1 ) - l.remove( "WordBreak" ); -} - -/*! This method initializes the value of the item \a i to the value - of the corresponding property. -*/ - -void PropertyList::setPropertyValue( PropertyItem *i ) -{ - const TQMetaProperty *p = - editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( i->name(), TRUE), TRUE ); - if ( !p ) { - if ( i->name() == "hAlign" ) { - int align = editor->widget()->property( "alignment" ).toInt(); - p = editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE ); - align &= ~AlignVertical_Mask; - TQStrList l = p->valueToKeys( align ); - clearAlignList( l ); - ( (PropertyListItem*)i )->setCurrentItem( l.last() ); - } else if ( i->name() == "vAlign" ) { - int align = editor->widget()->property( "alignment" ).toInt(); - p = editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE ); - align &= ~AlignHorizontal_Mask; - ( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() ); - } else if ( i->name() == "wordwrap" ) { - int align = editor->widget()->property( "alignment" ).toInt(); - if ( align & WordBreak ) - i->setValue( TQVariant( TRUE, 0 ) ); - else - i->setValue( TQVariant( FALSE, 0 ) ); - } else if ( i->name() == "layoutSpacing" ) { - ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); - } else if ( i->name() == "layoutMargin" ) { - ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); - } else if ( i->name() == "resizeMode" ) { - ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) )) ); - } else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) { - i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); - } else if ( editor->widget()->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)editor->widget() )->customWidget(); - if ( !cw ) - return; - i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); - } - return; - } - if ( p->isSetType() ) - ( (PropertyEnumItem*)i )->setCurrentValues( p->valueToKeys( editor->widget()->property( i->name() ).toInt() ) ); - else if ( p->isEnumType() ) - ( (PropertyListItem*)i )->setCurrentItem( p->valueToKey( editor->widget()->property( i->name() ).toInt() ) ); - else if ( qstrcmp( p->name(), "buddy" ) == 0 ) - ( (PropertyListItem*)i )->setCurrentItem( editor->widget()->property( i->name() ).toString() ); - else - i->setValue( editor->widget()->property( i->name() ) ); -} - -void PropertyList::setCurrentProperty( const TQString &n ) -{ - if ( currentItem() && currentItem()->text( 0 ) == n || - currentItem() && ( (PropertyItem*)currentItem() )->propertyParent() && - ( (PropertyItem*)currentItem() )->propertyParent()->text( 0 ) == n ) - return; - - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - if ( it.current()->text( 0 ) == n ) { - setCurrentItem( it.current() ); - break; - } - } -} - -PropertyEditor *PropertyList::propertyEditor() const -{ - return editor; -} - -void PropertyList::resetProperty() -{ - if ( !currentItem() ) - return; - PropertyItem *i = (PropertyItem*)currentItem(); - if ( !MetaDataBase::isPropertyChanged( editor->widget(), i->PropertyItem::name() ) ) - return; - TQString pn( i18n( "Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), - editor->widget(), editor, - i->name(), i->value(), - WidgetFactory::defaultValue( editor->widget(), i->name() ), - WidgetFactory::defaultCurrentItem( editor->widget(), i->name() ), - i->currentItem(), TRUE ); - cmd->execute(); - editor->formWindow()->commandHistory()->addCommand( cmd, FALSE ); - if ( i->hasSubItems() ) - i->initChildren(); -} - -void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e ) -{ - PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); - if( !i ) { - e->ignore(); - return; - } - - if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) - e->accept(); - else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) - e->accept(); - else - e->ignore(); -} - -void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e ) -{ - PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); - if( !i ) { - e->ignore(); - return; - } - - if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) - e->accept(); - else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) - e->accept(); - else - e->ignore(); -} - -void PropertyList::viewportDropEvent ( TQDropEvent *e ) -{ - PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); - if( !i ) { - e->ignore(); - return; - } - - if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) { - TQColor color; - TQColorDrag::decode( e, color ); - i->setValue( TQVariant( color ) ); - valueChanged( i ); - e->accept(); - } - else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) { - TQImage img; - TQImageDrag::decode( e, img ); - TQPixmap pm; - pm.convertFromImage( img ); - i->setValue( TQVariant( pm ) ); - valueChanged( i ); - e->accept(); - } - else - e->ignore(); -} - -TQString PropertyList::whatsThisAt( const TQPoint &p ) -{ - return whatsThisText( itemAt( p ) ); -} - -void PropertyList::showCurrentWhatsThis() -{ - if ( !currentItem() ) - return; - TQPoint p( 0, currentItem()->itemPos() ); - p = viewport()->mapToGlobal( contentsToViewport( p ) ); - TQWhatsThis::display( whatsThisText( currentItem() ), p, viewport() ); -} - -TQString PropertyList::whatsThisText( TQListViewItem *i ) -{ - if ( !i || !editor->widget() ) - return TQString(); - readPropertyDocs(); - if ( ( (PropertyItem*)i )->propertyParent() ) - i = ( (PropertyItem*)i )->propertyParent(); - - const TQMetaObject *mo = editor->widget()->metaObject(); - TQString prop = ( (PropertyItem*)i )->name(); - while ( mo ) { - TQString s; - s = TQString( mo->className() ) + "::" + prop; - TQMap::Iterator it; - if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) { - return *it; - } - mo = mo->superClass(); - } - - return i18n( "

    TQWidget::%1

    There is no documentation available for this property.

    " ).arg( prop ); -} - -void PropertyList::readPropertyDocs() -{ - if ( !propertyDocs.isEmpty() ) - return; - - TQString docFile = MainWindow::self->documentationPath() + "/propertydocs"; - TQFile f( docFile ); - if ( !f.open( IO_ReadOnly ) ) - return; - TQDomDocument doc; - TQString errMsg; - int errLine; - if ( !doc.setContent( &f, &errMsg, &errLine ) ) - return; - TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); - - for ( ; !e.isNull(); e = e.nextSibling().toElement() ) { - TQDomElement n = e.firstChild().toElement(); - TQString name; - TQString doc; - for ( ; !n.isNull(); n = n.nextSibling().toElement() ) { - if ( n.tagName() == "name" ) - name = n.firstChild().toText().data(); - else if ( n.tagName() == "doc" ) - doc = n.firstChild().toText().data(); - } - doc.insert( 0, "

    " + name + "

    " ); - propertyDocs.insert( name, doc ); - } -} - -PropertyList::LastEventType PropertyList::lastEvent() -{ - return theLastEvent; -} -// ------------------------------------------------------------ - -EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e ) - : HierarchyList( parent, fw, TRUE ), editor( e ) -{ - header()->hide(); - removeColumn( 1 ); - setRootIsDecorated( TRUE ); - connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), - this, TQT_SLOT( renamed( TQListViewItem * ) ) ); -} - -TQString clean_arguments( const TQString &s ) -{ - TQString slot = s; - TQString arg = slot.mid( slot.find( '(' ) + 1 ); - arg = arg.left( arg.findRev( ')' ) ); - TQStringList args = TQStringList::split( ',', arg ); - slot = slot.left( slot.find( '(' ) + 1 ); - int num = 0; - for ( TQStringList::Iterator it = args.begin(); it != args.end(); ++it, ++num ) { - TQString a = *it; - int i; - if ( ( i =a.find( ':' ) ) == -1 ) - slot += a.simplifyWhiteSpace(); - else - slot += a.mid( i + 1 ).simplifyWhiteSpace(); - if ( num < (int)args.count() - 1 ) - slot += ","; - } - - slot += ")"; - - return slot; -} - - -void EventList::setup() -{ - clear(); - - if ( !formWindow ) - return; - LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() ); - const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()); - TQStrList sigs; - if ( iface ) - { - sigs = iface->signalNames( editor->widget() ); - } - TQStrListIterator it( sigs ); - while ( it.current() ) { - HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (HierarchyItem*)0, - it.current(), TQString(), TQString() ); - eventItem->setOpen( TRUE ); - TQValueList conns = - MetaDataBase::connections( TQT_TQOBJECT(formWindow), TQT_TQOBJECT(editor->widget()), TQT_TQOBJECT(formWindow->mainContainer()) ); - HierarchyItem *item = 0; - for ( TQValueList::Iterator cit = conns.begin(); - cit != conns.end(); ++cit ) { - TQString s = it.current(); - if ( MetaDataBase::normalizeFunction( clean_arguments( TQString( (*cit).signal ) ) ) != - MetaDataBase::normalizeFunction( clean_arguments( s ) ) ) - continue; - item = new HierarchyItem( HierarchyItem::EventFunction, eventItem, item, - (*cit).slot, TQString(), TQString() ); - item->setPixmap( 0, DesignerEditSlotsPix ); - } - ++it; - } -} - -extern TQListViewItem *newItem; - -void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) -{ - TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) ); - if ( !i || i->parent() ) - return; - TQString s; - if ( !formWindow->project()->isCpp() ) { - TQString s1 = i->text( 0 ); - int pt = s1.find( "(" ); - if ( pt != -1 ) - s1 = s1.left( pt ); - s = TQString( editor->widget()->name() ) + "_" + s1; - } else { - s = TQString( editor->widget()->name() ) + "_" + i->text( 0 ); - } - - const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()); - insertEntry( i, DesignerEditSlotsPix , s ); -} - -void EventList::setCurrent( TQWidget * ) -{ -} - -void EventList::objectClicked( TQListViewItem *i ) -{ - if ( !i || !i->parent() ) - return; -// formWindow->clearSelection(false); - formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); -// formWindow->mainWindow()->editFunction( i->text( 0 ) ); -} - -void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) -{ - if ( !i ) - return; - TQPopupMenu menu; - const int NEW_ITEM = 1; - const int DEL_ITEM = 2; - menu.insertItem( SmallIcon( "designer_filenew.png" , TDevDesignerPartFactory::instance()), i18n( "New Signal Handler" ), NEW_ITEM ); - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), i18n( "Delete Signal Handler" ), DEL_ITEM ); - int res = menu.exec( pos ); - if ( res == NEW_ITEM ) { - TQString s; - if ( !formWindow->project()->isCpp() ) { - TQString s1 = ( i->parent() ? i->parent() : i )->text( 0 ); - int pt = s1.find( "(" ); - if ( pt != -1 ) - s1 = s1.left( pt ); - s = TQString( editor->widget()->name() ) + "_" + s1; - } else { - s = TQString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 ); - } - insertEntry( i->parent() ? i->parent() : i, SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()), s ); - } else if ( res == DEL_ITEM && i->parent() ) { - MetaDataBase::Connection conn; - conn.sender = editor->widget(); - conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); - conn.signal = i->parent()->text( 0 ); - conn.slot = i->text( 0 ); - delete i; - RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Connection" ), - formWindow, - conn ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - } -} - -void EventList::renamed( TQListViewItem *i ) -{ - if ( newItem == i ) - newItem = 0; - if ( !i->parent() ) - return; - TQListViewItem *itm = i->parent()->firstChild(); - bool del = FALSE; - while ( itm ) { - if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) { - del = TRUE; - break; - } - itm = itm->nextSibling(); - } - i->setRenameEnabled( 0, FALSE ); - if ( del ) { - delete i; - } else { - MetaDataBase::Connection conn; - conn.sender = editor->widget(); - conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); - conn.signal = i->parent()->text( 0 ); - conn.slot = i->text( 0 ); - AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Connection" ), - formWindow, - conn ); - formWindow->commandHistory()->addCommand( cmd ); - // #### we should look if the specified slot already - // exists and if we can connect to this one - TQString funcname = i->text( 0 ).latin1(); - if ( funcname.find( '(' ) == -1 ) { // try to create a signature - TQString sig = i->parent()->text( 0 ); - sig = sig.mid( sig.find( '(' ) + 1 ); - sig.remove( (int)sig.length() - 1, 1 ); - LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() ); - if ( iface ) - sig = iface->createArguments( sig.simplifyWhiteSpace() ); - funcname += "(" + sig + ")"; - } - - //normally add a function in tdevdesigner - AddFunctionCommand *cmd2 = new AddFunctionCommand( i18n( "Add Function" ), - formWindow, funcname.latin1(), "virtual", - "public", - "slot", formWindow->project()->language(), - "void" ); - -/* MetaDataBase::addFunction( formWindow, funcname.latin1(), "virtual", "public", - "slot", formWindow->project()->language(), "void" ); - editor->formWindow()->mainWindow()-> - editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), TRUE );*/ - cmd->execute(); - cmd2->execute(); - editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - editor->formWindow()->formFile()->setModified( TRUE ); - } -} - -void EventList::save( TQListViewItem *p ) -{ - TQStringList lst; - TQListViewItem *i = p->firstChild(); - while ( i ) { - lst << i->text( 0 ); - i = i->nextSibling(); - } -} - -// -------------------------------------------------------------- - -/*! - \class PropertyEditor propertyeditor.h - \brief PropertyEdior toplevel window - - This is the toplevel window of the property editor which contains a - listview for editing properties. -*/ - -PropertyEditor::PropertyEditor( TQWidget *parent ) - : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | - WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu ) -{ - setCaption( i18n( "Property Editor" ) ); - wid = 0; - formwindow = 0; - listview = new PropertyList( this ); - addTab( listview, i18n( "P&roperties" ) ); - eList = new EventList( this, formWindow(), this ); - addTab( eList, i18n( "Signa&l Handlers" ) ); -} - -TQObject *PropertyEditor::widget() const -{ - return wid; -} - -void PropertyEditor::setWidget( TQObject *w, FormWindow *fw ) -{ - if ( fw && fw->isFake() ) - w = fw->project()->objectForFakeForm( fw ); - eList->setFormWindow( fw ); - if ( w && w == wid ) { - // if there is no properties displayed then we really should show them. - // to do this check the number of properties in the list. - bool ret = (listview->childCount() > 0) ? TRUE : FALSE; - if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) { - TQListViewItemIterator it( listview ); - ret = FALSE; - while ( it.current() ) { - if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) { - ret = TRUE; - break; - } - ++it; - } - } - if ( ret ) - return; - } - - if ( !w || !fw ) { - setCaption( i18n( "Property Editor" ) ); - clear(); - wid = 0; - formwindow = 0; - return; - } - - wid = w; - formwindow = fw; - setCaption( i18n( "Property Editor (%1)" ).arg( formwindow->name() ) ); - listview->viewport()->setUpdatesEnabled( FALSE ); - listview->setUpdatesEnabled( FALSE ); - clear(); - listview->viewport()->setUpdatesEnabled( TRUE ); - listview->setUpdatesEnabled( TRUE ); - setup(); -} - -void PropertyEditor::clear() -{ - listview->setContentsPos( 0, 0 ); - listview->clear(); - eList->setContentsPos( 0, 0 ); - eList->clear(); -} - -void PropertyEditor::setup() -{ - if ( !formwindow || !wid ) - return; - listview->viewport()->setUpdatesEnabled( FALSE ); - listview->setupProperties(); - listview->viewport()->setUpdatesEnabled( TRUE ); - listview->updateEditorSize(); - - if ( !wid->isA( "PropertyObject" ) ) { - eList->viewport()->setUpdatesEnabled( FALSE ); - eList->setup(); - eList->viewport()->setUpdatesEnabled( TRUE ); - } -} - -void PropertyEditor::refetchData() -{ - listview->refetchData(); -} - -void PropertyEditor::emitWidgetChanged() -{ - if ( formwindow && wid ) - formwindow->widgetChanged( wid ); -} - -void PropertyEditor::closed( FormWindow *w ) -{ - if ( w == formwindow ) { - formwindow = 0; - wid = 0; - clear(); - } -} - -void PropertyEditor::closeEvent( TQCloseEvent *e ) -{ - emit hidden(); - e->accept(); -} - -PropertyList *PropertyEditor::propertyList() const -{ - return listview; -} - -FormWindow *PropertyEditor::formWindow() const -{ - return formwindow; -} - -TQString PropertyEditor::currentProperty() const -{ - if ( !wid ) - return TQString(); - if ( ( (PropertyItem*)listview->currentItem() )->propertyParent() ) - return ( (PropertyItem*)listview->currentItem() )->propertyParent()->name(); - return ( (PropertyItem*)listview->currentItem() )->name(); -} - -TQString PropertyEditor::classOfCurrentProperty() const -{ - if ( !wid ) - return TQString(); - TQObject *o = wid; - TQString curr = currentProperty(); - TQMetaObject *mo = o->metaObject(); - while ( mo ) { - TQStrList props = mo->propertyNames( FALSE ); - if ( props.find( curr.latin1() ) != -1 ) - return mo->className(); - mo = mo->superClass(); - } - return TQString(); -} - -TQMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const -{ - if ( !wid ) - return 0; - return wid->metaObject(); -} - -void PropertyEditor::resetFocus() -{ - if ( listview->currentItem() ) - ( (PropertyItem*)listview->currentItem() )->showEditor(); -} - -EventList *PropertyEditor::eventList() const -{ - return eList; -} - -void PropertyEditor::setPropertyEditorEnabled( bool b ) -{ - if ( !b ) - removePage( listview ); - else - insertTab( listview, i18n( "Property Editor" ), 0 ); - updateWindow(); -} - -void PropertyEditor::setSignalHandlersEnabled( bool b ) -{ - if ( !b ) - removePage( eList ); - else - insertTab( eList, i18n( "Signal Handlers" ), 0 ); - updateWindow(); -} - -void PropertyEditor::updateWindow() -{ - if ( isHidden() && count() ) { - parentWidget()->show(); - MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), TRUE ); - } else if ( isShown() && !count() ) { - parentWidget()->hide(); - MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), FALSE ); - } -} diff --git a/tdevdesigner/designer/propertyeditor.h b/tdevdesigner/designer/propertyeditor.h deleted file mode 100644 index 7b7eccd8..00000000 --- a/tdevdesigner/designer/propertyeditor.h +++ /dev/null @@ -1,891 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PROPERTYEDITOR_H -#define PROPERTYEDITOR_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "hierarchyview.h" -#include "metadatabase.h" - -class PropertyList; -class PropertyEditor; -class TQPainter; -class TQColorGroup; -class TQLineEdit; -class TQPushButton; -class TQHBox; -class TQSpinBox; -class TQLabel; -class TQFrame; -class FormWindow; -class TQCloseEvent; -class TQResizeEvent; -class PropertyWhatsThis; -class TQDateEdit; -class TQTimeEdit; -class TQDateTimeEdit; - -class PropertyItem : public TQListViewItem -{ -public: - PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); - ~PropertyItem(); - - void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); - void paintBranches( TQPainter * p, const TQColorGroup & cg, - int w, int y, int h ); - void paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); - - virtual bool hasSubItems() const; - virtual void createChildren(); - virtual void initChildren(); - - bool isOpen() const; - void setOpen( bool b ); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - TQVariant value() const; - TQString name() const; - virtual void notifyValueChange(); - - virtual void setChanged( bool b, bool updateDb = TRUE ); - bool isChanged() const; - - virtual void placeEditor( TQWidget *w ); - - virtual PropertyItem *propertyParent() const; - virtual void childValueChanged( PropertyItem *child ); - - void addChild( PropertyItem *i ); - int childCount() const; - PropertyItem *child( int i ) const; - - virtual bool hasCustomContents() const; - virtual void drawCustomContents( TQPainter *p, const TQRect &r ); - - void updateBackColor(); - - void setup() { TQListViewItem::setup(); setHeight( TQListViewItem::height() + 2 ); } - - virtual TQString currentItem() const; - virtual int currentIntItem() const; - virtual void setCurrentItem( const TQString &s ); - virtual void setCurrentItem( int i ); - virtual int currentIntItemFromObject() const; - virtual TQString currentItemFromObject() const; - - void setFocus( TQWidget *w ); - - virtual void toggle(); - void setText( int col, const TQString &txt ); - -protected: - PropertyList *listview; - TQVariant val; - -private: - TQColor backgroundColor(); - void createResetButton(); - void updateResetButtonState(); - -private: - bool open, changed; - PropertyItem *property; - TQString propertyName; - TQPtrList children; - TQColor backColor; - TQPushButton *resetButton; - -}; - -class PropertyTextItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool comment, bool multiLine, bool ascii = FALSE, bool a = FALSE ); - ~PropertyTextItem(); - - virtual void createChildren(); - virtual void initChildren(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - virtual bool hasSubItems() const; - virtual void childValueChanged( PropertyItem *child ); - - virtual void setChanged( bool b, bool updateDb = TRUE ); - -private slots: - void setValue(); - void getText(); - -private: - TQLineEdit *lined(); - TQGuardedPtr lin; - TQGuardedPtr box; - TQPushButton *button; - bool withComment, hasMultiLines, asciiOnly, accel; - -}; - - -class PropertyBoolItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); - ~PropertyBoolItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - virtual void toggle(); - -private slots: - void setValue(); - -private: - TQComboBox *combo(); - TQGuardedPtr comb; - -}; - -class PropertyIntItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool s ); - ~PropertyIntItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - -private slots: - void setValue(); - -private: - TQSpinBox *spinBox(); - TQGuardedPtr spinBx; - bool signedValue; - -}; - -class PropertyLayoutItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyLayoutItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ); - ~PropertyLayoutItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - -private slots: - void setValue(); - -private: - TQSpinBox *spinBox(); - TQGuardedPtr spinBx; - -}; - -class PropertyDoubleItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ); - ~PropertyDoubleItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - -private slots: - void setValue(); - -private: - TQLineEdit *lined(); - TQGuardedPtr lin; -}; - -class PropertyListItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool editable ); - ~PropertyListItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - - TQString currentItem() const; - int currentIntItem() const; - void setCurrentItem( const TQString &s ); - void setCurrentItem( int i ); - int currentIntItemFromObject() const; - TQString currentItemFromObject() const; - void addItem( const TQString &s ); - -private slots: - void setValue(); - -private: - TQComboBox *combo(); - TQGuardedPtr comb; - int oldInt; - bool editable; - TQString oldString; - -}; - -class PropertyFontItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); - ~PropertyFontItem(); - - virtual void createChildren(); - virtual void initChildren(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - virtual bool hasSubItems() const; - virtual void childValueChanged( PropertyItem *child ); - -private slots: - void getFont(); - -private: - TQGuardedPtr lined; - TQGuardedPtr button; - TQGuardedPtr box; - -}; - -class PropertyCoordItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - enum Type { Rect, Size, Point }; - - PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, Type t ); - ~PropertyCoordItem(); - - virtual void createChildren(); - virtual void initChildren(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - virtual bool hasSubItems() const; - virtual void childValueChanged( PropertyItem *child ); - -private: - TQLineEdit *lined(); - TQGuardedPtr lin; - Type typ; - -}; - -class PropertyColorItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool children ); - ~PropertyColorItem(); - - virtual void createChildren(); - virtual void initChildren(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - virtual bool hasSubItems() const; - virtual void childValueChanged( PropertyItem *child ); - - virtual bool hasCustomContents() const; - virtual void drawCustomContents( TQPainter *p, const TQRect &r ); - -private slots: - void getColor(); - -private: - TQGuardedPtr box; - TQGuardedPtr colorPrev; - TQGuardedPtr button; - bool withChildren; - -}; - -class PropertyPixmapItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - enum Type { Pixmap, IconSet, Image }; - - PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, Type t ); - ~PropertyPixmapItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - - virtual bool hasCustomContents() const; - virtual void drawCustomContents( TQPainter *p, const TQRect &r ); - -private slots: - void getPixmap(); - -private: - TQGuardedPtr box; - TQGuardedPtr pixPrev; - TQPushButton *button; - Type type; - -}; - - -class PropertySizePolicyItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ); - ~PropertySizePolicyItem(); - - virtual void createChildren(); - virtual void initChildren(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - virtual bool hasSubItems() const; - virtual void childValueChanged( PropertyItem *child ); - -private: - TQLineEdit *lined(); - TQGuardedPtr lin; - -}; - -class PropertyPaletteItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ); - ~PropertyPaletteItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - - virtual bool hasCustomContents() const; - virtual void drawCustomContents( TQPainter *p, const TQRect &r ); - -private slots: - void getPalette(); - -private: - TQGuardedPtr box; - TQGuardedPtr palettePrev; - TQGuardedPtr button; - -}; - -class PropertyCursorItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ); - ~PropertyCursorItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - -private slots: - void setValue(); - -private: - TQComboBox *combo(); - TQGuardedPtr comb; - -}; - -class PropertyKeysequenceItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyKeysequenceItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ); - ~PropertyKeysequenceItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - -private slots: - void setValue(); - -private: - bool eventFilter( TQObject *o, TQEvent *e ); - void handleKeyEvent( TQKeyEvent *e ); - int translateModifiers( int state ); - - TQGuardedPtr sequence; - TQGuardedPtr box; - int k1,k2,k3,k4; - int num; - bool mouseEnter; -}; - -class PropertyDatabaseItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName, bool wField ); - ~PropertyDatabaseItem(); - - virtual void createChildren(); - virtual void initChildren(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - virtual bool hasSubItems() const; - virtual void childValueChanged( PropertyItem *child ); - -private: - TQGuardedPtr lined; - TQGuardedPtr button; - TQGuardedPtr box; - bool withField; - -}; - -struct EnumItem { - EnumItem( const TQString &k, bool s ) - : key( k ), selected( s ) {} - EnumItem() : key( TQString() ), selected( FALSE ) {} - bool operator==( const EnumItem &item ) const { - return key == item.key; - } - TQString key; - bool selected; -}; - -class EnumPopup : public TQFrame -{ - Q_OBJECT - - -public: - EnumPopup( TQWidget *parent, const char *name, WFlags f=0 ); - ~EnumPopup(); - void insertEnums( TQValueList lst ); - TQValueList enumList() const; - void closeWidget(); - -signals: - void closed(); - void hidden(); - -protected: - void keyPressEvent( TQKeyEvent *e ); - -private: - TQValueList itemList; - TQPtrList checkBoxList; - TQVBoxLayout *popLayout; -}; - -class EnumBox : public TQComboBox -{ - Q_OBJECT - - -public: - EnumBox( TQWidget *parent, const char *name = 0 ); - ~EnumBox() {} - void setText( const TQString &text ); - void insertEnums( TQValueList lst ); - TQValueList enumList() const; - -signals: - void aboutToShowPopup(); - void valueChanged(); - -protected: - void paintEvent( TQPaintEvent * ); - void mousePressEvent( TQMouseEvent *e ); - void keyPressEvent( TQKeyEvent *e ); - -protected slots: - void restoreArrow(); - void popupHidden(); - void popupClosed(); - -private: - void popup(); - bool arrowDown; - TQString str; - bool popupShown; - EnumPopup *pop; - -}; -class PropertyEnumItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyEnumItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ); - ~PropertyEnumItem(); - - void showEditor(); - void hideEditor(); - void setValue( const TQVariant &v ); - TQString currentItem() const; - TQString currentItemFromObject() const; - void setCurrentValues( TQStrList lst ); - -private slots: - void setValue(); - void insertEnums(); - -private: - TQGuardedPtr box; - TQValueList enumList; - TQString enumString; -}; - -class PropertyList : public TQListView -{ - Q_OBJECT - - -public: - PropertyList( PropertyEditor *e ); - - virtual void setupProperties(); - - virtual void setCurrentItem( TQListViewItem *i ); - virtual void valueChanged( PropertyItem *i ); - virtual void refetchData(); - virtual void setPropertyValue( PropertyItem *i ); - virtual void setCurrentProperty( const TQString &n ); - - void layoutInitValue( PropertyItem *i, bool changed = FALSE ); - PropertyEditor *propertyEditor() const; - TQString whatsThisAt( const TQPoint &p ); - void showCurrentWhatsThis(); - - enum LastEventType { KeyEvent, MouseEvent }; - LastEventType lastEvent(); - -public slots: - void updateEditorSize(); - void resetProperty(); - void toggleSort(); - -private slots: - void itemPressed( TQListViewItem *i, const TQPoint &p, int c ); - void toggleOpen( TQListViewItem *i ); - bool eventFilter( TQObject *o, TQEvent *e ); - -protected: - void resizeEvent( TQResizeEvent *e ); - void paintEmptyArea( TQPainter *p, const TQRect &r ); - bool addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t ); - - void viewportDragEnterEvent( TQDragEnterEvent * ); - void viewportDragMoveEvent ( TQDragMoveEvent * ); - void viewportDropEvent ( TQDropEvent * ); - -protected: - PropertyEditor *editor; - -private: - void readPropertyDocs(); - void setupCusWidgetProperties( MetaDataBase::CustomWidget *cw, - TQMap &unique, - PropertyItem *&item ); - TQString whatsThisText( TQListViewItem *i ); - -private: - PropertyListItem* pressItem; - TQPoint pressPos; - bool mousePressed; - bool showSorted; - TQMap propertyDocs; - PropertyWhatsThis *whatsThis; - LastEventType theLastEvent; -}; - -class EventList : public HierarchyList -{ - Q_OBJECT - - -public: - EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e ); - - void setup(); - void setCurrent( TQWidget *w ); - -protected: - void contentsMouseDoubleClickEvent( TQMouseEvent *e ); - -private: - void save( TQListViewItem *p ); - -private slots: - void objectClicked( TQListViewItem *i ); - void showRMBMenu( TQListViewItem *, const TQPoint & ); - void renamed( TQListViewItem *i ); - -private: - PropertyEditor *editor; - -}; - - -class PropertyEditor : public TQTabWidget -{ - Q_OBJECT - - -public: - PropertyEditor( TQWidget *parent ); - - TQObject *widget() const; - - void clear(); - void setup(); - - void emitWidgetChanged(); - void refetchData(); - - void closed( FormWindow *w ); - - PropertyList *propertyList() const; - FormWindow *formWindow() const; - EventList *eventList() const; - - TQString currentProperty() const; - TQString classOfCurrentProperty() const; - TQMetaObject* metaObjectOfCurrentProperty() const; - - void resetFocus(); - - void setPropertyEditorEnabled( bool b ); - void setSignalHandlersEnabled( bool b ); - -signals: - void hidden(); - -public slots: - void setWidget( TQObject *w, FormWindow *fw ); - -protected: - void closeEvent( TQCloseEvent *e ); - -private: - void updateWindow(); - -private: - TQObject *wid; - PropertyList *listview; - EventList *eList; - FormWindow *formwindow; - -}; - -class PropertyDateItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); - ~PropertyDateItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - -private slots: - void setValue(); - -private: - TQDateEdit *lined(); - TQGuardedPtr lin; - -}; - -class PropertyTimeItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); - ~PropertyTimeItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - -private slots: - void setValue(); - -private: - TQTimeEdit *lined(); - TQGuardedPtr lin; - -}; - -class PropertyDateTimeItem : public TQObject, - public PropertyItem -{ - Q_OBJECT - - -public: - PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); - ~PropertyDateTimeItem(); - - virtual void showEditor(); - virtual void hideEditor(); - - virtual void setValue( const TQVariant &v ); - -private slots: - void setValue(); - -private: - TQDateTimeEdit *lined(); - TQGuardedPtr lin; - -}; - -#endif diff --git a/tdevdesigner/designer/propertyobject.cpp b/tdevdesigner/designer/propertyobject.cpp deleted file mode 100644 index 1bd1883f..00000000 --- a/tdevdesigner/designer/propertyobject.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "propertyobject.h" -#include "metadatabase.h" -#include -#include -#include -#include - -PropertyObject::PropertyObject( const TQWidgetList &objs ) - : TQObject(), objects( objs ), mobj( 0 ) -{ - TQPtrVector > v; - v.resize( objects.count() ); - v.setAutoDelete( TRUE ); - - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { - const TQMetaObject *m = o->metaObject(); - TQPtrList *mol = new TQPtrList; - while ( m ) { - mol->insert( 0, m ); - m = m->superClass(); - } - v.insert( v.count(), mol ); - } - - int numObjects = objects.count(); - int minDepth = v[0]->count(); - int depth = minDepth; - - for ( int i = 0; i < numObjects; ++i ) { - depth = (int)v[i]->count(); - if ( depth < minDepth ) - minDepth = depth; - } - - const TQMetaObject *m = v[0]->at( --minDepth ); - - for ( int j = 0; j < numObjects; ++j ) { - if ( v[j]->at( minDepth ) != m ) { - m = v[0]->at( --minDepth ); - j = 0; - } - } - - mobj = m; - - Q_ASSERT( mobj ); -} - -bool PropertyObject::setProperty( const char *name, const TQVariant& value ) -{ - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) - o->setProperty( name, value ); - - return TRUE; -} - -TQVariant PropertyObject::property( const char *name ) const -{ - return ( (PropertyObject*)this )->objects.first()->property( name ); -} - -void PropertyObject::mdPropertyChanged( const TQString &property, bool changed ) -{ - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) - MetaDataBase::setPropertyChanged( o, property, changed ); -} - -bool PropertyObject::mdIsPropertyChanged( const TQString &property ) -{ - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { - if ( MetaDataBase::isPropertyChanged( o, property ) ) - return TRUE; - } - return FALSE; -} - -void PropertyObject::mdSetPropertyComment( const TQString &property, const TQString &comment ) -{ - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) - MetaDataBase::setPropertyComment( o, property, comment ); -} - -TQString PropertyObject::mdPropertyComment( const TQString &property ) -{ - return MetaDataBase::propertyComment( TQT_TQOBJECT(objects.first()), property ); -} - -void PropertyObject::mdSetFakeProperty( const TQString &property, const TQVariant &value ) -{ - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) - MetaDataBase::setFakeProperty( o, property, value ); -} - -TQVariant PropertyObject::mdFakeProperty( const TQString &property ) -{ - return MetaDataBase::fakeProperty( TQT_TQOBJECT(objects.first()), property ); -} - -void PropertyObject::mdSetCursor( const TQCursor &c ) -{ - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { - if ( o->isWidgetType() ) - MetaDataBase::setCursor( (TQWidget*)o, c ); - } -} - -TQCursor PropertyObject::mdCursor() -{ - return MetaDataBase::cursor( objects.first() ); -} - -void PropertyObject::mdSetPixmapKey( int pixmap, const TQString &arg ) -{ - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) - MetaDataBase::setPixmapKey( o, pixmap, arg ); -} - -TQString PropertyObject::mdPixmapKey( int pixmap ) -{ - return MetaDataBase::pixmapKey( TQT_TQOBJECT(objects.first()), pixmap ); -} - -void PropertyObject::mdSetExportMacro( const TQString ¯o ) -{ - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) - MetaDataBase::setExportMacro( o, macro ); -} - -TQString PropertyObject::mdExportMacro() -{ - return MetaDataBase::exportMacro( TQT_TQOBJECT(objects.first()) ); -} diff --git a/tdevdesigner/designer/propertyobject.h b/tdevdesigner/designer/propertyobject.h deleted file mode 100644 index 2590399a..00000000 --- a/tdevdesigner/designer/propertyobject.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef PROPERTYOBJECT_H -#define PROPERTYOBJECT_H - -#include -#include -#include - -class PropertyObject : public TQObject -{ -public: - TQMetaObject *metaObject() const { return (TQMetaObject*)mobj; } - const char *className() const { return "PropertyObject"; } - TQObject* qObject() { return (TQObject*)this; } -private: - static TQMetaObject *metaObj; - -public: - PropertyObject( const TQWidgetList &objs ); - - bool setProperty( const char *name, const TQVariant& value ); - TQVariant property( const char *name ) const; - - void mdPropertyChanged( const TQString &property, bool changed ); - bool mdIsPropertyChanged( const TQString &property ); - void mdSetPropertyComment( const TQString &property, const TQString &comment ); - TQString mdPropertyComment( const TQString &property ); - void mdSetFakeProperty( const TQString &property, const TQVariant &value ); - TQVariant mdFakeProperty( const TQString &property ); - void mdSetCursor( const TQCursor &c ); - TQCursor mdCursor(); - void mdSetPixmapKey( int pixmap, const TQString &arg ); - TQString mdPixmapKey( int pixmap ); - void mdSetExportMacro( const TQString ¯o ); - TQString mdExportMacro(); - TQWidgetList widgetList() const { return objects; } - -private: - TQWidgetList objects; - const TQMetaObject *mobj; - -}; - -#endif diff --git a/tdevdesigner/designer/qcompletionedit.cpp b/tdevdesigner/designer/qcompletionedit.cpp deleted file mode 100644 index ed0c986e..00000000 --- a/tdevdesigner/designer/qcompletionedit.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "qcompletionedit.h" -#include -#include -#include -#include - -QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name ) - : TQLineEdit( parent, name ), aAdd( FALSE ), caseSensitive( FALSE ) -{ - popup = new TQVBox( 0, 0, WType_Popup ); - popup->setFrameStyle( TQFrame::Box | TQFrame::Plain ); - popup->setLineWidth( 1 ); - popup->hide(); - - listbox = new TQListBox( popup ); - listbox->setFrameStyle( TQFrame::NoFrame ); - listbox->setLineWidth( 1 ); - listbox->installEventFilter( this ); - listbox->setHScrollBarMode( TQScrollView::AlwaysOn ); - listbox->setVScrollBarMode( TQScrollView::AlwaysOn ); - listbox->setCornerWidget( new TQSizeGrip( listbox, "completion sizegrip" ) ); - connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( textDidChange( const TQString & ) ) ); - popup->setFocusProxy( listbox ); - installEventFilter( this ); -} - -bool QCompletionEdit::autoAdd() const -{ - return aAdd; -} - -TQStringList QCompletionEdit::completionList() const -{ - return compList; -} - -void QCompletionEdit::setCompletionList( const TQStringList &l ) -{ - compList = l; -} - -void QCompletionEdit::setAutoAdd( bool add ) -{ - aAdd = add; -} - -void QCompletionEdit::textDidChange( const TQString &text ) -{ - if ( text.isEmpty() ) { - popup->close(); - return; - } - updateListBox(); - placeListBox(); -} - -void QCompletionEdit::placeListBox() -{ - if ( listbox->count() == 0 ) { - popup->close(); - return; - } - - popup->resize( TQMAX( listbox->sizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ), - listbox->sizeHint().height() + listbox->horizontalScrollBar()->height() + 4 ); - - TQPoint p( mapToGlobal( TQPoint( 0, 0 ) ) ); - if ( p.y() + height() + popup->height() <= TQApplication::desktop()->height() ) - popup->move( p.x(), p.y() + height() ); - else - popup->move( p.x(), p.y() - listbox->height() ); - popup->show(); - listbox->setCurrentItem( 0 ); - listbox->setSelected( 0, TRUE ); - setFocus(); -} - -void QCompletionEdit::updateListBox() -{ - listbox->clear(); - if ( compList.isEmpty() ) - return; - for ( TQStringList::Iterator it = compList.begin(); it != compList.end(); ++it ) { - if ( caseSensitive && (*it).left( text().length() ) == text() || - !caseSensitive && (*it).left( text().length() ).lower() == text().lower() ) - listbox->insertItem( *it ); - } -} - -bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) -{ - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(popup) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox->viewport()) ) { - if ( e->type() == TQEvent::KeyPress ) { - TQKeyEvent *ke = (TQKeyEvent*)e; - if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) { - if ( ke->key() == Key_Tab && listbox->count() > 1 && - listbox->currentItem() < (int)listbox->count() - 1 ) { - listbox->setCurrentItem( listbox->currentItem() + 1 ); - return TRUE; - } - popup->close(); - setFocus(); - blockSignals( TRUE ); - setText( listbox->currentText() ); - blockSignals( FALSE ); - emit chosen( text() ); - return TRUE; - } else if ( ke->key() == Key_Left || ke->key() == Key_Right || - ke->key() == Key_Up || ke->key() == Key_Down || - ke->key() == Key_Home || ke->key() == Key_End || - ke->key() == Key_Prior || ke->key() == Key_Next ) { - return FALSE; - } else if ( ke->key() == Key_Escape ) { - popup->close(); - setFocus(); - } else if ( ke->key() != Key_Shift && ke->key() != Key_Control && - ke->key() != Key_Alt ) { - updateListBox(); - if ( listbox->count() == 0 || text().length() == 0 ) { - popup->close(); - setFocus(); - } - TQApplication::sendEvent( this, e ); - return TRUE; - } - } else if ( e->type() == TQEvent::MouseButtonDblClick ) { - popup->close(); - setFocus(); - blockSignals( TRUE ); - setText( listbox->currentText() ); - blockSignals( FALSE ); - emit chosen( text() ); - return TRUE; - } - } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) { - if ( e->type() == TQEvent::KeyPress ) { - TQKeyEvent *ke = (TQKeyEvent*)e; - if ( ke->key() == Key_Up || - ke->key() == Key_Down || - ke->key() == Key_Prior || - ke->key() == Key_Next || - ke->key() == Key_Return || - ke->key() == Key_Enter || - ke->key() == Key_Tab || - ke->key() == Key_Escape ) { - TQApplication::sendEvent( listbox, e ); - return TRUE; - } - } - } - return TQLineEdit::eventFilter( o, e ); -} - -void QCompletionEdit::addCompletionEntry( const TQString &entry ) -{ - if ( compList.find( entry ) == compList.end() ) { - compList << entry; - compList.sort(); - } -} - -void QCompletionEdit::removeCompletionEntry( const TQString &entry ) -{ - TQStringList::Iterator it = compList.find( entry ); - if ( it != compList.end() ) - compList.remove( it ); -} - -void QCompletionEdit::setCaseSensitive( bool b ) -{ - caseSensitive = b; -} - -bool QCompletionEdit::isCaseSensitive() const -{ - return caseSensitive; -} - -void QCompletionEdit::clear() -{ - TQLineEdit::clear(); - compList.clear(); -} diff --git a/tdevdesigner/designer/qcompletionedit.h b/tdevdesigner/designer/qcompletionedit.h deleted file mode 100644 index 5c3f7fe1..00000000 --- a/tdevdesigner/designer/qcompletionedit.h +++ /dev/null @@ -1,80 +0,0 @@ -/********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef TQCOMPLETIONEDIT_H -#define TQCOMPLETIONEDIT_H - -#include -#include - -class TQListBox; -class TQVBox; - -class QCompletionEdit : public TQLineEdit -{ - Q_OBJECT - - TQ_PROPERTY( bool autoAdd READ autoAdd WRITE setAutoAdd ) - TQ_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive ) - -public: - QCompletionEdit( TQWidget *parent = 0, const char *name = 0 ); - - bool autoAdd() const; - TQStringList completionList() const; - bool eventFilter( TQObject *o, TQEvent *e ); - bool isCaseSensitive() const; - -public slots: - void setCompletionList( const TQStringList &l ); - void setAutoAdd( bool add ); - void clear(); - void addCompletionEntry( const TQString &entry ); - void removeCompletionEntry( const TQString &entry ); - void setCaseSensitive( bool b ); - -signals: - void chosen( const TQString &text ); - -private slots: - void textDidChange( const TQString &text ); - -private: - void placeListBox(); - void updateListBox(); - -private: - bool aAdd; - TQStringList compList; - TQListBox *listbox; - TQVBox *popup; - bool caseSensitive; - -}; - - - -#endif diff --git a/tdevdesigner/designer/replacedialog.ui b/tdevdesigner/designer/replacedialog.ui deleted file mode 100644 index 27d01a58..00000000 --- a/tdevdesigner/designer/replacedialog.ui +++ /dev/null @@ -1,318 +0,0 @@ - -ReplaceDialog -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - ReplaceDialog - - - - 0 - 0 - 286 - 217 - - - - Replace Text - - - - unnamed - - - 11 - - - 6 - - - - Layout3 - - - - unnamed - - - 0 - - - 6 - - - - TextLabel2 - - - R&eplace: - - - comboReplace - - - - - TextLabel1 - - - &Find: - - - comboFind - - - - - comboFind - - - - 7 - 0 - 0 - 0 - - - - true - - - - - comboReplace - - - - 7 - 0 - 0 - 0 - - - - true - - - - - - - Layout5 - - - - unnamed - - - 0 - - - 6 - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonReplace - - - &Replace - - - true - - - - - buttonReplaceAll - - - Replace &All - - - - - PushButton2 - - - &Close - - - - - - - ButtonGroup1 - - - Options - - - - unnamed - - - 11 - - - 6 - - - - checkWords - - - &Whole words only - - - - - checkCase - - - Case &sensitive - - - - - checkBegin - - - Start at &beginning - - - - - - - ButtonGroup2 - - - Direction - - - - unnamed - - - 11 - - - 6 - - - - radioForward - - - Forwar&d - - - true - - - - - radioBackward - - - Bac&kward - - - - - - - - - buttonReplace - clicked() - ReplaceDialog - doReplace() - - - buttonReplaceAll - clicked() - ReplaceDialog - doReplaceAll() - - - PushButton2 - clicked() - ReplaceDialog - reject() - - - - comboFind - comboReplace - checkWords - checkCase - checkBegin - radioForward - radioBackward - buttonReplace - buttonReplaceAll - PushButton2 - - - ../interfaces/editorinterface.h - tqlineedit.h - replacedialog.ui.h - - - struct EditorInterface; - - - EditorInterface *editor; - TQObject *formWindow; - - - init() - destroy() - doReplace() - doReplaceAll() - setEditor( EditorInterface * e, TQObject * fw ) - - - diff --git a/tdevdesigner/designer/replacedialog.ui.h b/tdevdesigner/designer/replacedialog.ui.h deleted file mode 100644 index 63946525..00000000 --- a/tdevdesigner/designer/replacedialog.ui.h +++ /dev/null @@ -1,75 +0,0 @@ -/********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - - -void ReplaceDialog::init() -{ - editor = 0; - formWindow = 0; -} - -void ReplaceDialog::destroy() -{ - if ( editor ) - editor->release(); - editor = 0; - formWindow = 0; -} - -void ReplaceDialog::doReplace() -{ - if ( !editor ) - return; - - if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(), - checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), FALSE ) ) - checkBegin->setChecked( TRUE ); - else - checkBegin->setChecked( FALSE ); -} - -void ReplaceDialog::doReplaceAll() -{ - if ( !editor ) - return; - - if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(), - checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), TRUE ) ) - checkBegin->setChecked( TRUE ); - else - checkBegin->setChecked( FALSE ); -} - -void ReplaceDialog::setEditor( EditorInterface * e, TQObject * fw ) -{ - if ( fw != formWindow ) - checkBegin->setChecked( TRUE ); - formWindow = fw; - if ( editor ) - editor->release(); - editor = e; - editor->addRef(); -} diff --git a/tdevdesigner/designer/resource.cpp b/tdevdesigner/designer/resource.cpp deleted file mode 100644 index 26b46a68..00000000 --- a/tdevdesigner/designer/resource.cpp +++ /dev/null @@ -1,3328 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "actiondnd.h" -#include "command.h" -#ifndef TQT_NO_SQL -#include "database.h" -#endif -#include "formfile.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "menubareditor.h" -#include "metadatabase.h" -#include "pixmapcollection.h" -#include "popupmenueditor.h" -#include "project.h" -#include "resource.h" -#include "widgetfactory.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef TQT_NO_TABLE -#include -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "tdevdesigner_part.h" - -static TQString makeIndent( int indent ) -{ - TQString s; - s.fill( ' ', indent * 4 ); - return s; -} - -static TQString entitize( const TQString &s, bool attribute = FALSE ) -{ - TQString s2 = s; - s2 = s2.replace( "&", "&" ); - s2 = s2.replace( ">", ">" ); - s2 = s2.replace( "<", "<" ); - if ( attribute ) { - s2 = s2.replace( "\"", """ ); - s2 = s2.replace( "'", "'" ); - } - return s2; -} - -#ifdef TQ_WS_MACX -static struct { - int key; - const char* name; -} keyname[] = { - { TQt::Key_Space, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Space" ) }, - { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Esc" ) }, - { TQt::Key_Tab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Tab" ) }, - { TQt::Key_Backtab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backtab" ) }, - { TQt::Key_Backspace, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backspace" ) }, - { TQt::Key_Return, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Return" ) }, - { TQt::Key_Enter, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Enter" ) }, - { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Ins" ) }, - { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Del" ) }, - { TQt::Key_Pause, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Pause" ) }, - { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print" ) }, - { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "SysReq" ) }, - { TQt::Key_Home, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, - { TQt::Key_End, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "End" ) }, - { TQt::Key_Left, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Left" ) }, - { TQt::Key_Up, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Up" ) }, - { TQt::Key_Right, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Right" ) }, - { TQt::Key_Down, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Down" ) }, - { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgUp" ) }, - { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgDown" ) }, - { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "CapsLock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "NumLock" ) }, - { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "ScrollLock" ) }, - { TQt::Key_Menu, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Menu" ) }, - { TQt::Key_Help, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Help" ) }, - - // Multimedia keys - { TQt::Key_Back, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Back" ) }, - { TQt::Key_Forward, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Forward" ) }, - { TQt::Key_Stop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Stop" ) }, - { TQt::Key_Refresh, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Refresh" ) }, - { TQt::Key_VolumeDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Down" ) }, - { TQt::Key_VolumeMute, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Mute" ) }, - { TQt::Key_VolumeUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Up" ) }, - { TQt::Key_BassBoost, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Boost" ) }, - { TQt::Key_BassUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Up" ) }, - { TQt::Key_BassDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Down" ) }, - { TQt::Key_TrebleUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Up" ) }, - { TQt::Key_TrebleDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Down" ) }, - { TQt::Key_MediaPlay, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Play" ) }, - { TQt::Key_MediaStop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Stop" ) }, - { TQt::Key_MediaPrev, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Previous" ) }, - { TQt::Key_MediaNext, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Next" ) }, - { TQt::Key_MediaRecord, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Record" ) }, - { TQt::Key_HomePage, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, - { TQt::Key_Favorites, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Favorites" ) }, - { TQt::Key_Search, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Search" ) }, - { TQt::Key_Standby, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Standby" ) }, - { TQt::Key_OpenUrl, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Open URL" ) }, - { TQt::Key_LaunchMail, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Mail" ) }, - { TQt::Key_LaunchMedia, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Media" ) }, - { TQt::Key_Launch0, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (0)" ) }, - { TQt::Key_Launch1, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (1)" ) }, - { TQt::Key_Launch2, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (2)" ) }, - { TQt::Key_Launch3, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (3)" ) }, - { TQt::Key_Launch4, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (4)" ) }, - { TQt::Key_Launch5, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (5)" ) }, - { TQt::Key_Launch6, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (6)" ) }, - { TQt::Key_Launch7, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (7)" ) }, - { TQt::Key_Launch8, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (8)" ) }, - { TQt::Key_Launch9, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (9)" ) }, - { TQt::Key_LaunchA, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (A)" ) }, - { TQt::Key_LaunchB, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (B)" ) }, - { TQt::Key_LaunchC, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (C)" ) }, - { TQt::Key_LaunchD, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (D)" ) }, - { TQt::Key_LaunchE, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (E)" ) }, - { TQt::Key_LaunchF, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (F)" ) }, - - // -------------------------------------------------------------- - // More consistent namings - { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print Screen" ) }, - { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Up" ) }, - { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Down" ) }, - { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Caps Lock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Num Lock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Number Lock" ) }, - { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Scroll Lock" ) }, - { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Insert" ) }, - { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Delete" ) }, - { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Escape" ) }, - { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "System Request" ) }, - - { 0, 0 } -}; -#endif -static TQString platformNeutralKeySequence(const TQKeySequence &ks) -{ -#ifndef TQ_WS_MACX - return TQString(ks); -#else - uint k; - TQString str; - TQString p; - for (k = 0; k < ks.count(); ++k) { - int keycombo = ks[k]; - int basekey = keycombo & ~(TQt::SHIFT | TQt::CTRL | TQt::ALT | TQt::META); - if (keycombo & TQt::CTRL) - str += "Ctrl+"; - if (keycombo & TQt::ALT) - str += "Alt+"; - if (keycombo & TQt::META) - str += "Meta+"; - if (keycombo & TQt::SHIFT) - str += "Shift+"; - - // begin copy and paste from TQKeySequence :( - if (basekey & TQt::UNICODE_ACCEL) { - // Note: This character should NOT be upper()'ed, since - // the encoded string should indicate EXACTLY what the - // key represents! Hence a 'Ctrl+Shift+c' is posible to - // represent, but is clearly impossible to trigger... - p = TQChar(basekey & 0xffff); - } else if ( basekey >= TQt::Key_F1 && basekey <= TQt::Key_F35 ) { - p = TQAccel::tr( "F%1" ).arg(basekey - TQt::Key_F1 + 1); - } else if ( basekey > TQt::Key_Space && basekey <= TQt::Key_AsciiTilde ) { - p.sprintf( "%c", basekey ); - } else { - int i = 0; - while (keyname[i].name) { - if (basekey == keyname[i].key) { - p = TQAccel::tr(keyname[i].name); - break; - } - ++i; - } - // If we can't find the actual translatable keyname, - // fall back on the unicode representation of it... - // Or else characters like Key_aring may not get displayed - // ( Really depends on you locale ) - if ( !keyname[i].name ) - // Note: This character should NOT be upper()'ed, see above! - p = TQChar(basekey & 0xffff); - } - // end copy... - str += p + ", "; - } - str.truncate(str.length() - 2); - return str; -#endif -} - -static TQString mkBool( bool b ) -{ - return b? "true" : "false"; -} - -/*! - \class Resource resource.h - \brief Class for saving/loading, etc. forms - - This class is used for saving and loading forms, code generation, - transferring data of widgets over the clipboard, etc.. - -*/ - - -Resource::Resource() -{ - mainwindow = 0; - formwindow = 0; - toplevel = 0; - copying = FALSE; - pasting = FALSE; - hadGeometry = FALSE; - langIface = 0; - hasFunctions = FALSE; -} - -Resource::Resource( MainWindow* mw ) - : mainwindow( mw ) -{ - formwindow = 0; - toplevel = 0; - copying = FALSE; - pasting = FALSE; - hadGeometry = FALSE; - langIface = 0; - hasFunctions = FALSE; -} - -Resource::~Resource() -{ - if ( langIface ) - langIface->release(); -} - -void Resource::setWidget( FormWindow *w ) -{ - formwindow = w; - toplevel = w; -} - -TQWidget *Resource::widget() const -{ - return toplevel; -} - -bool Resource::load( FormFile *ff, Project *defProject ) -{ - if ( !ff || ff->absFileName().isEmpty() ) - return FALSE; - currFileName = ff->absFileName(); - mainContainerSet = FALSE; - - TQFile f( ff->absFileName() ); - f.open( IO_ReadOnly | IO_Translate ); - - bool b = load( ff, TQT_TQIODEVICE(&f), defProject ); - f.close(); - - return b; -} - -#undef signals -#undef slots - -bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) -{ - TQDomDocument doc; - TQString errMsg; - int errLine; - if ( !doc.setContent( dev, &errMsg, &errLine ) ) { - return FALSE; - } - - DomTool::fixDocument( doc ); - - TQWidget *p = mainwindow ? mainwindow->qWorkspace() : 0; - toplevel = formwindow = new FormWindow( ff, p, 0 ); - if ( defProject ) - formwindow->setProject( defProject ); - else if ( MainWindow::self ) - formwindow->setProject( MainWindow::self->currProject() ); - if ( mainwindow ) - formwindow->setMainWindow( mainwindow ); - MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) ); - - if ( !langIface ) { - TQString lang = "TQt Script"; - if ( mainwindow ) - lang = mainwindow->currProject()->language(); - langIface = MetaDataBase::languageInterface( lang ); - if ( langIface ) - langIface->addRef(); - } - - uiFileVersion = doc.firstChild().toElement().attribute("version"); - TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); - - TQDomElement forwards = e; - while ( forwards.tagName() != "forwards" && !forwards.isNull() ) - forwards = forwards.nextSibling().toElement(); - - TQDomElement includes = e; - while ( includes.tagName() != "includes" && !includes.isNull() ) - includes = includes.nextSibling().toElement(); - - TQDomElement variables = e; - while ( variables.tagName() != "variables" && !variables.isNull() ) - variables = variables.nextSibling().toElement(); - - TQDomElement signals = e; - while ( signals.tagName() != "signals" && !signals.isNull() ) - signals = signals.nextSibling().toElement(); - - TQDomElement slots = e; - while ( slots.tagName() != "slots" && !slots.isNull() ) - slots = slots.nextSibling().toElement(); - - TQDomElement functions = e; - while ( functions.tagName() != "functions" && !functions.isNull() ) - functions = functions.nextSibling().toElement(); - - TQDomElement connections = e; - while ( connections.tagName() != "connections" && !connections.isNull() ) - connections = connections.nextSibling().toElement(); - - TQDomElement imageCollection = e; - images.clear(); - while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) - imageCollection = imageCollection.nextSibling().toElement(); - - TQDomElement customWidgets = e; - while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() ) - customWidgets = customWidgets.nextSibling().toElement(); - - TQDomElement tabOrder = e; - while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() ) - tabOrder = tabOrder.nextSibling().toElement(); - - TQDomElement actions = e; - while ( actions.tagName() != "actions" && !actions.isNull() ) - actions = actions.nextSibling().toElement(); - - TQDomElement toolbars = e; - while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() ) - toolbars = toolbars.nextSibling().toElement(); - - TQDomElement menubar = e; - while ( menubar.tagName() != "menubar" && !menubar.isNull() ) - menubar = menubar.nextSibling().toElement(); - - TQDomElement widget; - while ( !e.isNull() ) { - if ( e.tagName() == "widget" ) { - widgets.clear(); - widget = e; - } else if ( e.tagName() == "include" ) { // compatibility with 2.x - MetaDataBase::Include inc; - inc.location = "global"; - if ( e.attribute( "location" ) == "local" ) - inc.location = "local"; - inc.implDecl = "in declaration"; - if ( e.attribute( "impldecl" ) == "in implementation" ) - inc.implDecl = "in implementation"; - inc.header = e.firstChild().toText().data(); - if ( inc.header.right( 5 ) != ".ui.h" ) { - metaIncludes.append( inc ); - } else { - if ( formwindow->formFile() ) - formwindow->formFile()->setCodeFileState( FormFile::Ok ); - } - } else if ( e.tagName() == "comment" ) { - metaInfo.comment = e.firstChild().toText().data(); - } else if ( e.tagName() == "forward" ) { // compatibility with old betas - metaForwards << e.firstChild().toText().data(); - } else if ( e.tagName() == "variable" ) { // compatibility with old betas - MetaDataBase::Variable v; - v.varName = e.firstChild().toText().data(); - v.varAccess = "protected"; - metaVariables << v; - } else if ( e.tagName() == "author" ) { - metaInfo.author = e.firstChild().toText().data(); - } else if ( e.tagName() == "class" ) { - metaInfo.className = e.firstChild().toText().data(); - } else if ( e.tagName() == "pixmapfunction" ) { - if ( formwindow ) { - formwindow->setSavePixmapInline( FALSE ); - formwindow->setSavePixmapInProject( FALSE ); - formwindow->setPixmapLoaderFunction( e.firstChild().toText().data() ); - } - } else if ( e.tagName() == "pixmapinproject" ) { - if ( formwindow ) { - formwindow->setSavePixmapInline( FALSE ); - formwindow->setSavePixmapInProject( TRUE ); - } - } else if ( e.tagName() == "exportmacro" ) { - exportMacro = e.firstChild().toText().data(); - } else if ( e.tagName() == "layoutdefaults" ) { - formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() ); - formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() ); - } else if ( e.tagName() == "layoutfunctions" ) { - formwindow->setSpacingFunction( e.attribute( "spacing" ) ); - formwindow->setMarginFunction( e.attribute( "margin" ) ); - if ( !formwindow->marginFunction().isEmpty() || !formwindow->spacingFunction().isEmpty() ) - formwindow->hasLayoutFunctions( TRUE ); - } - - e = e.nextSibling().toElement(); - } - - if ( !imageCollection.isNull() ) - loadImageCollection( imageCollection ); - if ( !customWidgets.isNull() ) - loadCustomWidgets( customWidgets, this ); - -#if defined (TQT_NON_COMMERCIAL) - bool previewMode = MainWindow::self ? MainWindow::self->isPreviewing() : FALSE; - TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self ); - if ( !w ) - return FALSE; - if ( previewMode ) - w->reparent( MainWindow::self, TQt::WType_TopLevel, w->pos(), TRUE ); -#else - if ( !createObject( widget, formwindow) ) - return FALSE; -#endif - - if ( !forwards.isNull() ) { - for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) - if ( n.tagName() == "forward" ) - metaForwards << n.firstChild().toText().data(); - } - - if ( !includes.isNull() ) { - for ( TQDomElement n = includes.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) - if ( n.tagName() == "include" ) { - if ( n.tagName() == "include" ) { - MetaDataBase::Include inc; - inc.location = "global"; - if ( n.attribute( "location" ) == "local" ) - inc.location = "local"; - inc.implDecl = "in declaration"; - if ( n.attribute( "impldecl" ) == "in implementation" ) - inc.implDecl = "in implementation"; - inc.header = n.firstChild().toText().data(); - if ( inc.header.right( 5 ) != ".ui.h" ) { - metaIncludes.append( inc ); - } else { - if ( formwindow->formFile() ) - formwindow->formFile()->setCodeFileState( FormFile::Ok ); - } - } - } - } - - if ( !variables.isNull() ) { - for ( TQDomElement n = variables.firstChild().toElement(); !n.isNull(); - n = n.nextSibling().toElement() ) { - if ( n.tagName() == "variable" ) { - MetaDataBase::Variable v; - v.varName = n.firstChild().toText().data(); - v.varAccess = n.attribute( "access", "protected" ); - if ( v.varAccess.isEmpty() ) - v.varAccess = "protected"; - metaVariables << v; - } - } - } - if ( !signals.isNull() ) { - for ( TQDomElement n = signals.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) - if ( n.tagName() == "signal" ) - metaSignals << n.firstChild().toText().data(); - } - if ( !slots.isNull() ) { - for ( TQDomElement n = slots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) - if ( n.tagName() == "slot" ) { - MetaDataBase::Function function; - function.specifier = n.attribute( "specifier", "virtual" ); - if ( function.specifier.isEmpty() ) - function.specifier = "virtual"; - function.access = n.attribute( "access", "public" ); - if ( function.access.isEmpty() ) - function.access = "public"; - function.language = n.attribute( "language", "C++" ); - function.returnType = n.attribute( "returnType", "void" ); - if ( function.returnType.isEmpty() ) - function.returnType = "void"; - function.type = "slot"; - function.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, - function.access, "slot", function.language, function.returnType ); - else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, - function.specifier, function.access, - "slot", function.language, - function.returnType ); - } - } - - if ( !functions.isNull() ) { - for ( TQDomElement n = functions.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { - if ( n.tagName() == "function" ) { - MetaDataBase::Function function; - function.specifier = n.attribute( "specifier", "virtual" ); - if ( function.specifier.isEmpty() ) - function.specifier = "virtual"; - function.access = n.attribute( "access", "public" ); - if ( function.access.isEmpty() ) - function.access = "public"; - function.type = n.attribute( "type", "function" ); - function.type = "function"; - function.language = n.attribute( "language", "C++" ); - function.returnType = n.attribute( "returnType", "void" ); - if ( function.returnType.isEmpty() ) - function.returnType = "void"; - function.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, - function.access, function.type, function.language, - function.returnType ); - else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, - function.specifier, function.access, - function.type, function.language, function.returnType ); - } - } - } - - if ( !actions.isNull() ) - loadActions( actions ); - if ( !toolbars.isNull() ) - loadToolBars( toolbars ); - if ( !menubar.isNull() ) - loadMenuBar( menubar ); - - if ( !connections.isNull() ) - loadConnections( connections ); - - if ( !tabOrder.isNull() ) - loadTabOrder( tabOrder ); - - if ( formwindow ) { - MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes ); - MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards ); - MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), metaVariables ); - MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals ); - metaInfo.classNameChanged = metaInfo.className != TQString( formwindow->name() ); - MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo ); - MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro ); - } - - loadExtraSource( formwindow->formFile(), currFileName, langIface, hasFunctions ); - - if ( mainwindow && formwindow ) - mainwindow->insertFormWindow( formwindow ); - - if ( formwindow ) { - formwindow->killAccels( TQT_TQOBJECT(formwindow) ); - if ( formwindow->layout() ) - formwindow->layout()->activate(); - if ( hadGeometry ) - formwindow->resize( formwindow->size().expandedTo( formwindow->minimumSize(). - expandedTo( formwindow->minimumSizeHint() ) ) ); - else - formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) ); - } - - return TRUE; -} - -static bool saveCode( const TQString &filename, const TQString &code ) -{ - TQFile f( filename ); - if ( f.open(IO_WriteOnly | IO_Translate) ) { - TQTextStream ts( &f ); - ts << code; - return TRUE; - } - return FALSE; -} - -bool Resource::save( const TQString& filename, bool formCodeOnly ) -{ - if ( !formwindow || filename.isEmpty() ) - return FALSE; - if (!langIface) { - TQString lang = "TQt Script"; - if ( mainwindow ) - lang = mainwindow->currProject()->language(); - langIface = MetaDataBase::languageInterface( lang ); - if ( langIface ) - langIface->addRef(); - } - if ( formCodeOnly && langIface ) { - if ( saveFormCode(formwindow->formFile(), langIface) ) - return TRUE; - bool breakout = FALSE; - FormFile *ff = formwindow->formFile(); - TQString codeFile = ff->project()->makeAbsolute( ff->codeFile() ); - TQString filter = langIface->fileFilterList().join("\n"); - while ( !breakout ) { - TQString fn = KFileDialog::getSaveFileName( codeFile, filter ); - breakout = fn.isEmpty(); - if ( !breakout ) { - if ( saveCode(fn, ff->code()) ) - return TRUE; - } - } - } - currFileName = filename; - - TQFile f( filename ); - if ( !f.open( IO_WriteOnly | IO_Translate ) ) - return FALSE; - bool b = save( TQT_TQIODEVICE(&f) ); - f.close(); - return b; -} - -bool Resource::save( TQIODevice* dev ) -{ - if ( !formwindow ) - return FALSE; - - if ( !langIface ) { - TQString lang = "C++"; - if ( mainwindow ) - lang = mainwindow->currProject()->language(); - langIface = MetaDataBase::languageInterface( lang ); - if ( langIface ) - langIface->addRef(); - } - - TQTextStream ts( dev ); - ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) ); - - ts << "" << endl; - saveMetaInfoBefore( ts, 0 ); - saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 ); - if ( ::tqqt_cast(formwindow->mainContainer()) ) { - saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); - saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); - } - if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) - saveCustomWidgets( ts, 0 ); - if ( ::tqqt_cast(formwindow->mainContainer()) ) - saveActions( formwindow->actionList(), ts, 0 ); - if ( !images.isEmpty() ) - saveImageCollection( ts, 0 ); - if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() || - !MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() ) - saveConnections( ts, 0 ); - saveTabOrder( ts, 0 ); - saveMetaInfoAfter( ts, 0 ); - saveIncludeHints( ts, 0 ); - ts << "" << endl; - bool ok = saveFormCode( formwindow->formFile(), langIface ); - images.clear(); - - return ok; -} - -TQString Resource::copy() -{ - if ( !formwindow ) - return TQString(); - - copying = TRUE; - TQString s; - TQTextOStream ts( &s ); - - ts << "" << endl; - TQWidgetList widgets = formwindow->selectedWidgets(); - TQWidgetList tmp( widgets ); - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - TQWidget *p = w->parentWidget(); - bool save = TRUE; - while ( p ) { - if ( tmp.findRef( p ) != -1 ) { - save = FALSE; - break; - } - p = p->parentWidget(); - } - if ( save ) - saveObject( TQT_TQOBJECT(w), 0, ts, 0 ); - } - if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) - saveCustomWidgets( ts, 0 ); - if ( !images.isEmpty() ) - saveImageCollection( ts, 0 ); - ts << "" << endl; - - return s; -} - - -void Resource::paste( const TQString &cb, TQWidget *parent ) -{ - if ( !formwindow ) - return; - mainContainerSet = TRUE; - - pasting = TRUE; - TQDomDocument doc; - TQString errMsg; - int errLine; - doc.setContent( cb, &errMsg, &errLine ); - - TQDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement(); - - TQDomElement imageCollection = firstWidget; - images.clear(); - while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) - imageCollection = imageCollection.nextSibling().toElement(); - - TQDomElement customWidgets = firstWidget; - while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() ) - customWidgets = customWidgets.nextSibling().toElement(); - - if ( !imageCollection.isNull() ) - loadImageCollection( imageCollection ); - if ( !customWidgets.isNull() ) - loadCustomWidgets( customWidgets, this ); - - TQWidgetList widgets; - formwindow->clearSelection( FALSE ); - formwindow->setPropertyShowingBlocked( TRUE ); - formwindow->clearSelection( FALSE ); - while ( !firstWidget.isNull() ) { - if ( firstWidget.tagName() == "widget" ) { - TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 ); - if ( !w ) - continue; - widgets.append( w ); - int x = w->x() + formwindow->grid().x(); - int y = w->y() + formwindow->grid().y(); - if ( w->x() + w->width() > parent->width() ) - x = TQMAX( 0, parent->width() - w->width() ); - if ( w->y() + w->height() > parent->height() ) - y = TQMAX( 0, parent->height() - w->height() ); - if ( x != w->x() || y != w->y() ) - w->move( x, y ); - formwindow->selectWidget( TQT_TQOBJECT(w) ); - } else if ( firstWidget.tagName() == "spacer" ) { - TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal ); - if ( !w ) - continue; - widgets.append( w ); - int x = w->x() + formwindow->grid().x(); - int y = w->y() + formwindow->grid().y(); - if ( w->x() + w->width() > parent->width() ) - x = TQMAX( 0, parent->width() - w->width() ); - if ( w->y() + w->height() > parent->height() ) - y = TQMAX( 0, parent->height() - w->height() ); - if ( x != w->x() || y != w->y() ) - w->move( x, y ); - formwindow->selectWidget( TQT_TQOBJECT(w) ); - } - firstWidget = firstWidget.nextSibling().toElement(); - } - formwindow->setPropertyShowingBlocked( FALSE ); - formwindow->emitShowProperties(); - - PasteCommand *cmd = new PasteCommand( i18n( "Paste" ), formwindow, widgets ); - formwindow->commandHistory()->addCommand( cmd ); -} - -void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ) -{ - if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() ) - return; - TQString closeTag; - const char* className = WidgetFactory::classNameOf( obj ); - int classID = WidgetDatabase::idFromClassName( className ); - bool isPlugin = WidgetDatabase::isCustomPluginWidget( classID ); - if ( obj->isWidgetType() ) { - if ( obj->isA("CustomWidget") || isPlugin ) { - usedCustomWidgets << TQString( className ); - includeHints << WidgetDatabase::includeFile( classID ); - } - - if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) ) - return; // we don't know anything about this thing - - TQString attributes; - if ( grid ) { - QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ]; - attributes += TQString(" row=\"") + TQString::number(item.row) + "\""; - attributes += TQString(" column=\"") + TQString::number(item.column) + "\""; - if ( item.rowspan * item.colspan != 1 ) { - attributes += TQString(" rowspan=\"") + TQString::number(item.rowspan) + "\""; - attributes += TQString(" colspan=\"") + TQString::number(item.colspan) + "\""; - } - } - - if ( qstrcmp( className, "Spacer" ) == 0 ) { - closeTag = makeIndent( indent ) + "\n"; - ts << makeIndent( indent ) << "" << endl; - ++indent; - } else { - closeTag = makeIndent( indent ) + "\n"; - ts << makeIndent( indent ) << "" << endl; - ++indent; - } - if ( WidgetFactory::hasItems(classID, obj) ) - saveItems( obj, ts, indent ); - saveObjectProperties( obj, ts, indent ); - } else { - // test for other objects we created. Nothing so far. - return; - } - - QDesignerWidgetStack* ws = 0; - - if ( ::tqqt_cast(obj) ) { - TQTabWidget* tw = (TQTabWidget*) obj; - TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING ); - TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); - TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar(); - for ( int i = 0; i < tb->count(); ++i ) { - TQTab *t = tb->tabAt( i ); - if ( !t ) - continue; - TQWidget *w = ws->widget( t->identifier() ); - if ( !w ) - continue; - if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ) == -1 ) - continue; // we don't know this widget - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( t->text() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - delete tmpl; - } else if ( (ws = ::tqqt_cast(obj)) != 0 ) { - for ( int i = 0; i < ws->count(); ++i ) { - TQWidget *w = ws->page( i ); - if ( !w ) - continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) - continue; // we don't know this widget - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << TQString::number(i) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - } else if ( ::tqqt_cast(obj) ) { - TQToolBox* tb = (TQToolBox*)obj; - for ( int i = 0; i < tb->count(); ++i ) { - TQWidget *w = tb->item( i ); - if ( !w ) - continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) - continue; // we don't know this widget - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - } else if ( ::tqqt_cast(obj) ) { - TQWizard* wiz = (TQWizard*)obj; - for ( int i = 0; i < wiz->pageCount(); ++i ) { - TQWidget *w = wiz->page( i ); - if ( !w ) - continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) - continue; // we don't know this widget - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( wiz->title( w ) ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - } else if ( ::tqqt_cast(obj) ) { - saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent ); - } else { - bool saved = FALSE; -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - if ( isPlugin ) { - WidgetInterface *iface = 0; - widgetManager()->queryInterface( className, &iface ); - if ( iface ) { - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( iface2 ) { - if ( iface2->supportsPages( className ) ) { - TQWidgetList containers = iface2->pages( className, (TQWidget*)obj ); - if ( !containers.isEmpty() ) { - saved = TRUE; - int i = 0; - for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) { - if ( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 ) - continue; // we don't know this widget - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) - << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" - << entitize( iface2->pageLabel( className, (TQWidget*)obj, i ) ) - << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( w, ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - } - } else { - saved = TRUE; - TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj ); - if ( obj != w ) { - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) - << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( w, ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - // Create a custom widget and then store it in the database - // so we can save the custom widgets. - MetaDataBase::CustomWidget *cw = new MetaDataBase::CustomWidget; - cw->className = className; - cw->includeFile = WidgetDatabase::includeFile( classID ); - TQStrList lst = w->metaObject()->signalNames( TRUE ); - for ( TQPtrListIterator it(lst); it.current(); ++it ) - cw->lstSignals.append(it.current()); - - int i; - int total = w->metaObject()->numProperties( TRUE ); - for ( i = 0; i < total; i++ ) { - const TQMetaProperty *p = w->metaObject()->property( i, TRUE ); - if ( p->designable(w) ) { - MetaDataBase::Property prop; - prop.property = p->name(); - TQString pType = p->type(); - // *sigh* designer types are not normal types - // Handle most cases, the ones it misses are - // probably too difficult to deal with anyway... - if ( pType.startsWith("Q") ) { - pType = pType.right( pType.length() - 1 ); - } else { - pType[0] = pType[0].upper(); - } - prop.type = pType; - cw->lstProperties.append( prop ); - } - } - - total = w->metaObject()->numSlots( TRUE ); - for ( i = 0; i < total; i++ ) { - const TQMetaData *md = w->metaObject()->slot( i, TRUE ); - MetaDataBase::Function funky; - // Find out if we have a return type. - if ( md->method->count > 0 ) { - const TQUParameter p = md->method->parameters[0]; - if ( p.inOut == TQUParameter::InOut ) - funky.returnType = p.type->desc(); - } - - funky.function = md->name; - funky.language = "C++"; - switch ( md->access ) { - case TQMetaData::Public: - funky.access = "public"; - break; - case TQMetaData::Protected: - funky.access = "protected"; - break; - case TQMetaData::Private: - funky.access = "private"; - break; - } - cw->lstSlots.append( funky ); - } - MetaDataBase::addCustomWidget( cw ); - } - iface2->release(); - } - iface->release(); - } - } -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - if ( !saved ) - saveChildrenOf( obj, ts, indent ); - } - - indent--; - ts << closeTag; -} - -void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) -{ - if ( ::tqqt_cast(obj) || ::tqqt_cast(obj) ) { - TQListBox *lb = 0; - if ( ::tqqt_cast(obj) ) - lb = (TQListBox*)obj; - else - lb = ( (TQComboBox*)obj )->listBox(); - - TQListBoxItem *i = lb->firstItem(); - for ( ; i; i = i->next() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQStringList text; - text << i->text(); - TQPtrList pixmaps; - if ( i->pixmap() ) - pixmaps.append( i->pixmap() ); - saveItem( text, pixmaps, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } else if ( ::tqqt_cast(obj) ) { - TQIconView *iv = (TQIconView*)obj; - - TQIconViewItem *i = iv->firstItem(); - for ( ; i; i = i->nextItem() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQStringList text; - text << i->text(); - TQPtrList pixmaps; - if ( i->pixmap() ) - pixmaps.append( i->pixmap() ); - saveItem( text, pixmaps, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } else if ( ::tqqt_cast(obj) ) { - TQListView *lv = (TQListView*)obj; - int i; - for ( i = 0; i < lv->header()->count(); ++i ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQStringList l; - l << lv->header()->label( i ); - TQPtrList pix; - pix.setAutoDelete( TRUE ); - if ( lv->header()->iconSet( i ) ) - pix.append( new TQPixmap( lv->header()->iconSet( i )->pixmap() ) ); - saveItem( l, pix, ts, indent ); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << mkBool( lv->header()->isClickEnabled( i ) )<< "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << mkBool( lv->header()->isResizeEnabled( i ) ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - saveItem( lv->firstChild(), ts, indent - 1 ); - } -#if !defined (TQT_NO_TABLE) - else if ( ::tqqt_cast(obj) ) { - TQTable *table = (TQTable*)obj; - int i; - TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); -# ifndef TQT_NO_SQL - bool isDataTable = ::tqqt_cast(table); -# else - bool isDataTable = false; -# endif - for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { - if ( !table->horizontalHeader()->label( i ).isNull() && - table->horizontalHeader()->label( i ).toInt() != i + 1 || - table->horizontalHeader()->iconSet( i ) || - isDataTable ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQStringList l; - l << table->horizontalHeader()->label( i ); - TQPtrList pix; - pix.setAutoDelete( TRUE ); - if ( table->horizontalHeader()->iconSet( i ) ) - pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) ); - saveItem( l, pix, ts, indent ); - if ( isDataTable && !columnFields.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( *columnFields.find( l[ 0 ] ) ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - for ( i = 0; i < table->verticalHeader()->count(); ++i ) { - if ( !table->verticalHeader()->label( i ).isNull() && - table->verticalHeader()->label( i ).toInt() != i + 1 || - table->verticalHeader()->iconSet( i ) ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQStringList l; - l << table->verticalHeader()->label( i ); - TQPtrList pix; - pix.setAutoDelete( TRUE ); - if ( table->verticalHeader()->iconSet( i ) ) - pix.append( new TQPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) ); - saveItem( l, pix, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - } -#endif -} - -void Resource::saveItem( TQListViewItem *i, TQTextStream &ts, int indent ) -{ - TQListView *lv = i->listView(); - while ( i ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - - TQPtrList pixmaps; - TQStringList textes; - for ( int c = 0; c < lv->columns(); ++c ) { - pixmaps.append( i->pixmap( c ) ); - textes << i->text( c ); - } - saveItem( textes, pixmaps, ts, indent ); - - if ( i->firstChild() ) - saveItem( i->firstChild(), ts, indent ); - - indent--; - ts << makeIndent( indent ) << "" << endl; - i = i->nextSibling(); - } -} - -void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname ) -{ - if ( p.isNull() ) { - ts << makeIndent( indent ) << "<" << tagname << ">" << endl; - return; - } - - if ( formwindow && formwindow->savePixmapInline() ) - ts << makeIndent( indent ) << "<" << tagname << ">" << saveInCollection( p ) << "" << endl; - else if ( formwindow && formwindow->savePixmapInProject() ) - ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() ) - << "" << endl; - else - ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() ) - << "" << endl; -} - -TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*/ ) -{ - TQString arg = e.firstChild().toText().data(); - - if ( formwindow && formwindow->savePixmapInline() ) { - TQImage img = loadFromCollection( arg ); - TQPixmap pix; - pix.convertFromImage( img ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); - return pix; - } else if ( formwindow && formwindow->savePixmapInProject() ) { - TQPixmap pix; - if ( mainwindow && mainwindow->currProject() ) { - pix = mainwindow->currProject()->pixmapCollection()->pixmap( arg ); - } else { - pix = BarIcon( "designer_image.png", TDevDesignerPartFactory::instance() ); - // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that - pix.convertFromImage( pix.convertToImage() ); - } - - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); - return pix; - } - TQPixmap pix = BarIcon( "designer_image.png", TDevDesignerPartFactory::instance() ); - // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that - pix.convertFromImage( pix.convertToImage() ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); - return pix; -} - -void Resource::saveItem( const TQStringList &text, - const TQPtrList &pixmaps, TQTextStream &ts, - int indent ) -{ - TQStringList::ConstIterator it = text.begin(); - for ( ; it != text.end(); ++it ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( *it ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - for ( int i = 0; i < (int)pixmaps.count(); ++i ) { - TQPixmap *p = ( (TQPtrList)pixmaps ).at( i ); - ts << makeIndent( indent ) << "" << endl; - indent++; - if ( p ) - savePixmap( *p, ts, indent ); - else - savePixmap( TQPixmap(), ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } -} - -void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) -{ - const TQObjectList l = obj->childrenListObject(); - if ( l.isEmpty() ) - return; // no children to save - - TQString closeTag; - // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer - TQLayout *layout = 0; - QDesignerGridLayout* grid = 0; - if ( !::tqqt_cast(obj) && - WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && - obj->isWidgetType() && - WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) { - WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout ); - switch ( lay ) { - case WidgetFactory::HBox: - closeTag = makeIndent( indent ) + ""; - ts << makeIndent( indent ) << "" << endl; - ++indent; - break; - case WidgetFactory::VBox: - closeTag = makeIndent( indent ) + ""; - ts << makeIndent( indent ) << "" << endl; - ++indent; - break; - case WidgetFactory::Grid: - closeTag = makeIndent( indent ) + ""; - ts << makeIndent( indent ) << "" << endl; - ++indent; - grid = (QDesignerGridLayout*) layout; - break; - default: - break; - } - - // save properties of layout - if ( lay != WidgetFactory::NoLayout ) - saveObjectProperties( TQT_TQOBJECT(layout), ts, indent ); - - } - - TQObject *o = 0; - for ( TQPtrListIterator it ( l ); ( o = it.current() ); ++it ) - if ( !TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) - saveObject( o, grid, ts, indent ); - if ( !closeTag.isEmpty() ) { - indent--; - ts << closeTag << endl; - } -} - -void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) -{ - TQStringList saved; - TQStringList changed; - changed = MetaDataBase::changedProperties( w ); - if ( w->isWidgetType() ) { - if ( ::tqqt_cast(w) ) { - if ( !changed.contains( "sizeHint" ) ) - changed << "sizeHint"; - if ( !changed.contains( "geometry" ) ) - changed << "geometry"; - } else { - TQToolButton *tb = ::tqqt_cast(w); - if ( tb && !tb->iconSet().isNull() ) { - changed << "iconSet"; - } - } - } else if ( ::tqqt_cast(w) ) { - if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) - changed << "spacing"; - if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) - changed << "margin"; - if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) != "Auto" - && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() ) - changed << "resizeMode"; - } - - if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { - if ( changed.findIndex( "geometry" ) == -1 ) - changed << "geometry"; - if ( changed.findIndex( "caption" ) == -1 ) - changed << "caption"; - } - - if ( changed.isEmpty() ) - return; - - bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && - WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; - - TQStrList lst = w->metaObject()->propertyNames( !::tqqt_cast(w) ); - for ( TQPtrListIterator it( lst ); it.current(); ++it ) { - if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() ) - continue; - if ( saved.find( TQString::fromLatin1( it.current() ) ) != saved.end() ) - continue; - saved << TQString::fromLatin1( it.current() ); - const TQMetaProperty* p = w->metaObject()-> - property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE ); - if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) ) - continue; - if ( ::tqqt_cast(w) && qstrcmp( p->name(), "pixmap" ) == 0 && - ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) ) - continue; - if ( ::tqqt_cast(w) && - ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 || - qstrcmp( p->name(), "itemText" ) == 0 ) ) - continue; - if ( qstrcmp( p->name(), "name" ) == 0 ) - knownNames << w->property( "name" ).toString(); - if ( !p->isSetType() && !p->isEnumType() && !w->property( p->name() ).isValid() ) - continue; - ts << makeIndent( indent ) << "stdSet() ) - ts << " stdset=\"0\""; - ts << ">" << endl; - indent++; - if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqqt_cast(w) ) { - saveProperty( w, it.current(), "", TQVariant::String, ts, indent ); - } else if ( p->isSetType() ) { - saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); - } else if ( p->isEnumType() ) { - saveEnumProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); - } else { - saveProperty( w, it.current(), w->property( p->name() ), TQVariant::nameToType( p->type() ), ts, indent ); - } - indent--; - ts << makeIndent( indent ) << "
    " << endl; - } - - if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) { - TQMap* fakeProperties = MetaDataBase::fakeProperties( w ); - for ( TQMap::Iterator fake = fakeProperties->begin(); - fake != fakeProperties->end(); ++fake ) { - if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) { - if ( w->inherits("CustomWidget") ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); - if ( cw && !cw->hasProperty( fake.key().latin1() ) && fake.key() != "toolTip" && fake.key() != "whatsThis" ) - continue; - } - - ts << makeIndent( indent ) << "" << endl; - indent++; - saveProperty( w, fake.key(), *fake, (*fake).type(), ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - } -} - -void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) -{ - const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE ); - TQStrList l( p->valueToKeys( w->property( name ).toInt() ) ); - TQString v; - for ( uint i = 0; i < l.count(); ++i ) { - v += l.at( i ); - if ( i < l.count() - 1 ) - v += "|"; - } - ts << makeIndent( indent ) << "" << v << "" << endl; -} - -void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) -{ - const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE ); - ts << makeIndent( indent ) << "" << p->valueToKey( w->property( name ).toInt() ) << "" << endl; -} - -void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent ) -{ - if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" || - name == "layoutMargin" || name =="layoutSpacing" ) - return; - int num; - uint unum; - double dob; - TQString comment; - if ( w && formwindow->widgets()->find( (TQWidget*)w ) || formwindow->actionList().find( (TQAction*)w ) ) - comment = MetaDataBase::propertyComment( w, name ); - switch ( t ) { - case TQVariant::String: - if ( name == "resizeMode" ) { - TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); - if ( !resmod.isNull() && resmod != "Auto" ) { - ts << makeIndent( indent ) << ""; - ts << resmod; - ts << "" << endl; - } - - } else { - ts << makeIndent( indent ) << "" << entitize( value.toString() ) << "" << endl; - if ( !comment.isEmpty() ) - ts << makeIndent( indent ) << "" << entitize( comment ) << "" << endl; - } - break; - case TQVariant::CString: - ts << makeIndent( indent ) << "" << entitize( value.toCString() ).latin1() << "" << endl; - break; - case TQVariant::Bool: - ts << makeIndent( indent ) << "" << mkBool( value.toBool() ) << "" << endl; - break; - case TQVariant::Int: - if ( ::tqqt_cast(w) ) { - num = -1; - if ( name == "spacing" ) - num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); - else if ( name == "margin" ) - num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); - if ( num != -1 ) - ts << makeIndent( indent ) << "" << TQString::number( num ) << "" << endl; - } else { - num = value.toInt(); - ts << makeIndent( indent ) << "" << TQString::number( num ) << "" << endl; - } - break; - case TQVariant::Double: - dob = value.toDouble(); - ts << makeIndent( indent ) << "" << TQString::number( dob ) << "" << endl; - break; - case TQVariant::KeySequence: - ts << makeIndent( indent ) << "" - << entitize(platformNeutralKeySequence(value.toKeySequence())) << "" << endl; - break; - case TQVariant::UInt: - unum = value.toUInt(); - ts << makeIndent( indent ) << "" << TQString::number( unum ) << "" << endl; - break; - case TQVariant::Rect: { - TQVariant v( value ); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << TQString::number( v.toRect().x() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( v.toRect().y() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( v.toRect().width() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( v.toRect().height() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Point: { - TQVariant v( value ); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << TQString::number( v.toPoint().x() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( v.toPoint().y() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Size: { - TQVariant v( value ); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << TQString::number( v.toSize().width() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( v.toSize().height() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Color: { - TQVariant v( value ); - ts << makeIndent( indent ) << "" << endl; - indent++; - saveColor( ts, indent, v.toColor() ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Font: { - TQVariant v( value ); - ts << makeIndent( indent ) << "" << endl; - TQFont f( tqApp->font() ); - if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() ) - f = ((TQWidget*)w)->parentWidget()->font(); - TQFont f2( v.toFont() ); - indent++; - if ( f.family() != f2.family() ) - ts << makeIndent( indent ) << "" << f2.family() << "" << endl; - if ( f.pointSize() != f2.pointSize() ) - ts << makeIndent( indent ) << "" << TQString::number( f2.pointSize() ) << "" << endl; - if ( f.bold() != f2.bold() ) - ts << makeIndent( indent ) << "" << TQString::number( (int)f2.bold() ) << "" << endl; - if ( f.italic() != f2.italic() ) - ts << makeIndent( indent ) << "" << TQString::number( (int)f2.italic() ) << "" << endl; - if ( f.underline() != f2.underline() ) - ts << makeIndent( indent ) << "" << TQString::number( (int)f2.underline() ) << "" << endl; - if ( f.strikeOut() != f2.strikeOut() ) - ts << makeIndent( indent ) << "" << TQString::number( (int)f2.strikeOut() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::SizePolicy: { - TQSizePolicy sp( value.toSizePolicy() ); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << (int)sp.horData() << "" << endl; - ts << makeIndent( indent ) << "" << (int)sp.verData() << "" << endl; - ts << makeIndent( indent ) << "" << (int)sp.horStretch() << "" << endl; - ts << makeIndent( indent ) << "" << (int)sp.verStretch() << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - break; - } - case TQVariant::Pixmap: - savePixmap( value.toPixmap(), ts, indent ); - break; - case TQVariant::IconSet: - savePixmap( value.toIconSet().pixmap(), ts, indent, "iconset" ); - break; - case TQVariant::Image: - ts << makeIndent( indent ) << "" << saveInCollection( value.toImage() ) << "" << endl; - break; - case TQVariant::Palette: { - TQPalette p( value.toPalette() ); - ts << makeIndent( indent ) << "" << endl; - indent++; - - ts << makeIndent( indent ) << "" << endl; - indent++; - saveColorGroup( ts, indent, p.active() ); - indent--; - ts << makeIndent( indent ) << "" << endl; - - ts << makeIndent( indent ) << "" << endl; - indent++; - saveColorGroup( ts, indent, p.disabled() ); - indent--; - ts << makeIndent( indent ) << "" << endl; - - ts << makeIndent( indent ) << "" << endl; - indent++; - saveColorGroup( ts, indent, p.inactive() ); - indent--; - ts << makeIndent( indent ) << "" << endl; - - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Cursor: - ts << makeIndent( indent ) << "" << value.toCursor().shape() << "" << endl; - break; - case TQVariant::StringList: { - TQStringList lst = value.toStringList(); - uint i = 0; - ts << makeIndent( indent ) << "" << endl; - indent++; - if ( !lst.isEmpty() ) { - for ( i = 0; i < lst.count(); ++i ) - ts << makeIndent( indent ) << "" << entitize( lst[ i ] ) << "" << endl; - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Date: { - TQDate d = value.toDate(); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << d.year() << "" << endl; - ts << makeIndent( indent ) << "" << d.month() << "" << endl; - ts << makeIndent( indent ) << "" << d.day() << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - break; - } - case TQVariant::Time: { - TQTime t = value.toTime(); - ts << makeIndent( indent ) << "" << endl; - break; - } - case TQVariant::DateTime: { - TQDateTime dt = value.toDateTime(); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << dt.date().year() << "" << endl; - ts << makeIndent( indent ) << "" << dt.date().month() << "" << endl; - ts << makeIndent( indent ) << "" << dt.date().day() << "" << endl; - ts << makeIndent( indent ) << "" << dt.time().hour() << "" << endl; - ts << makeIndent( indent ) << "" << dt.time().minute() << "" << endl; - ts << makeIndent( indent ) << "" << dt.time().second() << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - break; - } - default: - tqWarning( "saving the property %s of type %d not supported yet", name.latin1(), (int)t ); - } -} - -void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup &cg ) -{ - for( int r = 0 ; r < TQColorGroup::NColorRoles ; r++ ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) ); - indent--; - ts << makeIndent( indent ) << "" << endl; - TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap(); - if ( pm && !pm->isNull() ) - savePixmap( *pm, ts, indent ); - } -} - -void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c ) -{ - ts << makeIndent( indent ) << "" << TQString::number( c.red() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( c.green() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( c.blue() ) << "" << endl; -} - -TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout ) -{ - lastItem = 0; - TQDomElement n = e.firstChild().toElement(); - TQWidget *w = 0; // the widget that got created - TQObject *obj = 0; // gets the properties - - int row = e.attribute( "row" ).toInt(); - int col = e.attribute( "column" ).toInt(); - int rowspan = e.attribute( "rowspan" ).toInt(); - int colspan = e.attribute( "colspan" ).toInt(); - if ( rowspan < 1 ) - rowspan = 1; - if ( colspan < 1 ) - colspan = 1; - - TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - TQString parentClassName = WidgetFactory::classNameOf( parent ); - bool isPlugin = - WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( parentClassName ) ); - if ( isPlugin ) - tqWarning( "####### loading custom container widgets without page support not implemented!" ); - // ### TODO loading for custom container widgets without pages -#endif - if ( !className.isNull() ) { - obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE )); - if ( !obj ) { - TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ), - i18n( "Error loading %1.\n" - "The widget %2 could not be created." ). - arg( currFileName ).arg( className ) ); - return 0; - } - if ( !mainContainerSet ) { - if ( formwindow ) - formwindow->setMainContainer( (TQWidget*)obj ); - mainContainerSet = TRUE; - } - w = (TQWidget*)obj; - if ( ::tqqt_cast(w) ) - w = ( (TQMainWindow*)w )->centralWidget(); - if ( layout ) { - switch ( WidgetFactory::layoutType( layout ) ) { - case WidgetFactory::HBox: - ( (TQHBoxLayout*)layout )->addWidget( w ); - break; - case WidgetFactory::VBox: - ( (TQVBoxLayout*)layout )->addWidget( w ); - break; - case WidgetFactory::Grid: - ( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, - col, col + colspan - 1 ); - break; - default: - break; - } - } - - if ( !toplevel ) - toplevel = w; - layout = 0; - - if ( w && formwindow ) { - if ( !parent || - ( !::tqqt_cast(parent) && - !::tqqt_cast(parent) && - !::tqqt_cast(parent) && - !::tqqt_cast(parent) -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - && !isPlugin -#endif - ) ) - formwindow->insertWidget( w, pasting ); - else if ( parent && - ( ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - || isPlugin -#endif - ) ) - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - } - } - - TQDomElement sizePolicyElement; - TQObject *sizePolicyObject = 0; - - while ( !n.isNull() ) { - if ( n.tagName() == "spacer" ) { - createSpacer( n, w, layout, Qt::Horizontal ); - } else if ( n.tagName() == "widget" ) { - createObject( n, w, layout ); - } else if ( n.tagName() == "hbox" ) { - layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox ); - obj = TQT_TQOBJECT(layout); - n = n.firstChild().toElement(); - continue; - } else if ( n.tagName() == "grid" ) { - layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid ); - obj = TQT_TQOBJECT(layout); - n = n.firstChild().toElement(); - continue; - } else if ( n.tagName() == "vbox" ) { - layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox ); - obj = TQT_TQOBJECT(layout); - n = n.firstChild().toElement(); - continue; - } else if ( n.tagName() == "property" && obj ) { - if ( n.attribute( "name" ) == "sizePolicy" ) { - // ### Evil hack ### Delay setting sizePolicy so it won't be overridden by other properties. - sizePolicyElement = n; - sizePolicyObject = obj; - } else { - setObjectProperty( obj, n.attribute( "name" ), n.firstChild().toElement() ); - } - } else if ( n.tagName() == "attribute" && w ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( ::tqqt_cast(parent) ) { - if ( attrib == "title" ) - ( (TQTabWidget*)parent )->insertTab( w, v.toString() ); - } else if ( ::tqqt_cast(parent) ) { - if ( attrib == "id" ) - ( (QDesignerWidgetStack*)parent )->insertPage( w, v.toInt() ); - } else if ( ::tqqt_cast(parent) ) { - if ( attrib == "label" ) - ( (TQToolBox*)parent )->addItem( w, v.toString() ); - } else if ( ::tqqt_cast(parent) ) { - if ( attrib == "title" ) - ( (TQWizard*)parent )->addPage( w, v.toString() ); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - } else if ( isPlugin ) { - if ( attrib == "label" ) { - WidgetInterface *iface = 0; - widgetManager()->queryInterface( parentClassName, &iface ); - if ( iface ) { - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( iface2 ) { - iface2->insertPage( parentClassName, - (TQWidget*)parent, v.toString(), -1, w ); - iface2->release(); - } - iface->release(); - } - } -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - } - } else if ( n.tagName() == "item" ) { - createItem( n, w ); - } else if ( n.tagName() == "column" || n.tagName() =="row" ) { - createColumn( n, w ); - } - - n = n.nextSibling().toElement(); - } - - // ### Evil hack ### See description above. - if ( !sizePolicyElement.isNull() ) { - setObjectProperty( sizePolicyObject, - sizePolicyElement.attribute( "name" ), - sizePolicyElement.firstChild().toElement() ); - } - - if ( w->isWidgetType() ) - widgets.insert( w->name(), w ); - - return TQT_TQOBJECT(w); -} - -void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) -{ - if ( !widget ) - return; - - if ( ::tqqt_cast(widget) && e.tagName() == "column" ) { - TQListView *lv = (TQListView*)widget; - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - bool hasPixmap = FALSE; - TQString txt; - bool clickable = TRUE, resizable = TRUE; - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - txt = v.toString(); - else if ( attrib == "pixmap" ) { - pix = loadPixmap( n.firstChild().toElement().toElement() ); - hasPixmap = !pix.isNull(); - } else if ( attrib == "clickable" ) - clickable = v.toBool(); - else if ( attrib == "resizable" ) - resizable = v.toBool(); - } - n = n.nextSibling().toElement(); - } - lv->addColumn( txt ); - int i = lv->header()->count() - 1; - if ( hasPixmap ) { - lv->header()->setLabel( i, pix, txt ); - } - if ( !clickable ) - lv->header()->setClickEnabled( clickable, i ); - if ( !resizable ) - lv->header()->setResizeEnabled( resizable, i ); - } -#ifndef TQT_NO_TABLE - else if ( ::tqqt_cast(widget) ) { - TQTable *table = (TQTable*)widget; - bool isRow; - if ( ( isRow = e.tagName() == "row" ) ) - table->setNumRows( table->numRows() + 1 ); - else - table->setNumCols( table->numCols() + 1 ); - - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - bool hasPixmap = FALSE; - TQString txt; - TQString field; - TQMap fieldMap = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - txt = v.toString(); - else if ( attrib == "pixmap" ) { - hasPixmap = !n.firstChild().firstChild().toText().data().isEmpty(); - if ( hasPixmap ) - pix = loadPixmap( n.firstChild().toElement() ); - } else if ( attrib == "field" ) - field = v.toString(); - } - n = n.nextSibling().toElement(); - } - - int i = isRow ? table->numRows() - 1 : table->numCols() - 1; - TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); - if ( hasPixmap ) - h->setLabel( i, pix, txt ); - else - h->setLabel( i, txt ); - if ( !isRow && !field.isEmpty() ) - fieldMap.insert( txt, field ); - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), fieldMap ); - } -#endif -} - -void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ) -{ - TQDomElement n = e; - hasPixmap = FALSE; - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - txt = v.toString(); - else if ( attrib == "pixmap" ) { - pix = loadPixmap( n.firstChild().toElement() ); - hasPixmap = !pix.isNull(); - } - } - n = n.nextSibling().toElement(); - } -} - -void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) -{ - if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ), TQT_TQOBJECT(widget) ) ) - return; - - if ( ::tqqt_cast(widget) || ::tqqt_cast(widget) ) { - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - bool hasPixmap = FALSE; - TQString txt; - loadItem( n, pix, txt, hasPixmap ); - TQListBox *lb = 0; - if ( ::tqqt_cast(widget) ) - lb = (TQListBox*)widget; - else - lb = ( (TQComboBox*)widget)->listBox(); - if ( hasPixmap ) { - new TQListBoxPixmap( lb, pix, txt ); - } else { - new TQListBoxText( lb, txt ); - } - } else if ( ::tqqt_cast(widget) ) { - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - bool hasPixmap = FALSE; - TQString txt; - loadItem( n, pix, txt, hasPixmap ); - TQIconView *iv = (TQIconView*)widget; - if ( hasPixmap ) - new TQIconViewItem( iv, txt, pix ); - else - new TQIconViewItem( iv, txt ); - } else if ( ::tqqt_cast(widget) ) { - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - TQValueList pixmaps; - TQStringList textes; - TQListViewItem *item = 0; - TQListView *lv = (TQListView*)widget; - if ( i ) - item = new TQListViewItem( i, lastItem ); - else - item = new TQListViewItem( lv, lastItem ); - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - textes << v.toString(); - else if ( attrib == "pixmap" ) { - TQString s = v.toString(); - if ( s.isEmpty() ) { - pixmaps << TQPixmap(); - } else { - pix = loadPixmap( n.firstChild().toElement() ); - pixmaps << pix; - } - } - } else if ( n.tagName() == "item" ) { - item->setOpen( TRUE ); - createItem( n, widget, item ); - } - - n = n.nextSibling().toElement(); - } - - for ( int i = 0; i < lv->columns(); ++i ) { - item->setText( i, textes[ i ] ); - item->setPixmap( i, pixmaps[ i ] ); - } - lastItem = item; - } -} - -TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ) -{ - TQDomElement n = e.firstChild().toElement(); - int row = e.attribute( "row" ).toInt(); - int col = e.attribute( "column" ).toInt(); - int rowspan = e.attribute( "rowspan" ).toInt(); - int colspan = e.attribute( "colspan" ).toInt(); - if ( rowspan < 1 ) - rowspan = 1; - if ( colspan < 1 ) - colspan = 1; - - Spacer *spacer = (Spacer*) WidgetFactory::create( WidgetDatabase::idFromClassName("Spacer"), - parent, "spacer", FALSE); - spacer->setOrientation( o ); - spacer->setInteraciveMode( FALSE ); - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) - setObjectProperty( TQT_TQOBJECT(spacer), n.attribute( "name" ), n.firstChild().toElement() ); - n = n.nextSibling().toElement(); - } - spacer->setInteraciveMode( TRUE ); - if ( formwindow ) - formwindow->insertWidget( spacer, pasting ); - if ( layout ) { - if ( ::tqqt_cast(layout) ) - ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); - else - ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, - spacer->alignment() ); - } - return spacer; -} - -/*! - Attention: this function has to be in sync with Uic::setObjectProperty(). If you change one, change both. -*/ -void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e ) -{ - const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE ); - - if ( !::tqqt_cast(obj) ) {// no layouts in metadatabase... (RS) - if ( obj->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget(); - if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" ) - return; - } - MetaDataBase::setPropertyChanged( obj, prop, TRUE ); - } - - TQVariant defVarient; - if ( e.tagName() == "font" ) { - TQFont f( tqApp->font() ); - if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() ) - f = ( (TQWidget*)obj )->parentWidget()->font(); - defVarient = TQVariant( f ); - } - - TQString comment; - TQVariant v( DomTool::elementToVariant( e, defVarient, comment ) ); - - if ( !comment.isEmpty() ) { - MetaDataBase::addEntry( obj ); - MetaDataBase::setPropertyComment( obj, prop, comment ); - } - - if ( e.tagName() == "pixmap" ) { - TQPixmap pix = loadPixmap( e ); - if ( pix.isNull() ) - return; - v = TQVariant( pix ); - } else if ( e.tagName() == "iconset" ) { - TQPixmap pix = loadPixmap( e, "iconset" ); - if ( pix.isNull() ) - return; - v = TQVariant( TQIconSet( pix ) ); - } else if ( e.tagName() == "image" ) { - v = TQVariant( loadFromCollection( v.toString() ) ); - } - - if ( !p ) { - MetaDataBase::setFakeProperty( obj, prop, v ); - if ( obj->isWidgetType() ) { - if ( prop == "database" && TQT_TQOBJECT(obj) != TQT_TQOBJECT(toplevel) ) { - TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList(); - if ( lst.count() > 2 ) - dbControls.insert( obj->name(), lst[ 2 ] ); - else if ( lst.count() == 2 ) - dbTables.insert( obj->name(), lst ); - } - return; - } - } - - if ( e.tagName() == "palette" ) { - TQDomElement n = e.firstChild().toElement(); - TQPalette p; - while ( !n.isNull() ) { - TQColorGroup cg; - if ( n.tagName() == "active" ) { - cg = loadColorGroup( n ); - p.setActive( cg ); - } else if ( n.tagName() == "inactive" ) { - cg = loadColorGroup( n ); - p.setInactive( cg ); - } else if ( n.tagName() == "disabled" ) { - cg = loadColorGroup( n ); - p.setDisabled( cg ); - } - n = n.nextSibling().toElement(); - } - v = TQPalette( p ); - } else if ( e.tagName() == "enum" && p && p->isEnumType() && prop != "resizeMode" ) { - TQString key( v.toString() ); - int vi = p->keyToValue( key ); - if ( p->valueToKey( vi ) != key ) - return; // ignore invalid properties - v = TQVariant( vi ); - } else if ( e.tagName() == "set" && p && p->isSetType() ) { - TQString keys( v.toString() ); - TQStringList lst = TQStringList::split( '|', keys ); - TQStrList l; - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - l.append( *it ); - v = TQVariant( p->keysToValue( l ) ); - } - - if ( prop == "caption" ) { - TQCString s1 = v.toCString(); - TQString s2 = v.toString(); - if ( !s2.isEmpty() ) - formwindow->setCaption( s2 ); - else if ( !s1.isEmpty() ) - formwindow->setCaption( s1 ); - } - if ( prop == "icon" ) { - formwindow->setIcon( v.toPixmap() ); - TQString pmk = MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), v.toPixmap().serialNumber() ); - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), - formwindow->icon()->serialNumber(), pmk ); - } - - if ( prop == "geometry" ) { - if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) { - hadGeometry = TRUE; - toplevel->resize( v.toRect().size() ); - return; - } else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { - hadGeometry = TRUE; - formwindow->resize( v.toRect().size() ); - return; - } - } - - if ( ::tqqt_cast(obj) ) { - if ( prop == "spacing" ) { - MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); - return; - } else if ( prop == "margin" ) { - MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); - return; - } else if ( e.tagName() == "enum" && prop == "resizeMode" ) { - MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toString() ); - return; - } - } - - if ( prop == "name" ) { - if ( pasting ) { - TQString s = v.toString(); - formwindow->unify( TQT_TQOBJECT(obj), s, TRUE ); - obj->setName( s ); - return; - } else if ( formwindow && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { - formwindow->setName( v.toCString() ); - } - } - - if ( prop == "sizePolicy" ) { - TQSizePolicy sp = v.toSizePolicy(); - sp.setHeightForWidth( ( (TQWidget*)obj )->sizePolicy().hasHeightForWidth() ); - } - - if ( prop == "cursor" ) - MetaDataBase::setCursor( (TQWidget*)obj, v.toCursor() ); - - obj->setProperty( prop, v ); -} - - -TQString Resource::saveInCollection( const TQImage &img ) -{ - TQString imgName = "none"; - TQValueList::Iterator it = images.begin(); - for ( ; it != images.end(); ++it ) { - if ( img == ( *it ).img ) { - imgName = ( *it ).name; - break; - } - } - - if ( imgName == "none" ) { - Image i; - imgName = "image" + TQString::number( images.count() ); - i.name = imgName; - i.img = img; - images.append( i ); - } - return imgName; -} - -void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent ) -{ - TQByteArray ba; - TQBuffer buf( ba ); - buf.open( IO_WriteOnly | IO_Translate ); - TQString format; - bool compress = FALSE; - if (img.hasAlphaBuffer()) { - format = "PNG"; - } else { - format = img.depth() > 1 ? "XPM" : "XBM"; - compress = TRUE; - } - TQImageIO iio( &buf, format ); - iio.setImage( img ); - iio.write(); - buf.close(); - TQByteArray bazip = ba; - int i = 0; - if (compress) { - bazip = tqCompress( ba ); - format += ".GZ"; - // The first 4 bytes in tqCompress() are the length of the unzipped - // format. The XPM.GZ format does not use these. - i = 4; - } - ulong len = bazip.size(); - ts << makeIndent( indent ) << ""; - static const char hexchars[] = "0123456789abcdef"; - for (; i < (int)len; ++i ) { - uchar s = (uchar) bazip[i]; - ts << hexchars[s >> 4]; - ts << hexchars[s & 0x0f]; - } - ts << "" << endl; -} - -void Resource::saveImageCollection( TQTextStream &ts, int indent ) -{ - ts << makeIndent( indent ) << "" << endl; - indent++; - - TQValueList::Iterator it = images.begin(); - for ( ; it != images.end(); ++it ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - saveImageData( (*it).img, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -static TQImage loadImageData( TQDomElement &n2 ) -{ - TQImage img; - TQString data = n2.firstChild().toText().data(); - const int lengthOffset = 4; - int baSize = data.length() / 2 + lengthOffset; - uchar *ba = new uchar[ baSize ]; - for ( int i = lengthOffset; i < baSize; ++i ) { - char h = data[ 2 * (i-lengthOffset) ].latin1(); - char l = data[ 2 * (i-lengthOffset) + 1 ].latin1(); - uchar r = 0; - if ( h <= '9' ) - r += h - '0'; - else - r += h - 'a' + 10; - r = r << 4; - if ( l <= '9' ) - r += l - '0'; - else - r += l - 'a' + 10; - ba[ i ] = r; - } - TQString format = n2.attribute( "format", "PNG" ); - if ( format == "XPM.GZ" || format == "XBM.GZ" ) { - ulong len = n2.attribute( "length" ).toULong(); - if ( len < data.length() * 5 ) - len = data.length() * 5; - // tqUncompress() expects the first 4 bytes to be the expected length of - // the uncompressed data - ba[0] = ( len & 0xff000000 ) >> 24; - ba[1] = ( len & 0x00ff0000 ) >> 16; - ba[2] = ( len & 0x0000ff00 ) >> 8; - ba[3] = ( len & 0x000000ff ); - TQByteArray baunzip = tqUncompress( ba, baSize ); - img.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.find('.')) ); - } else { - img.loadFromData( (const uchar*)ba+lengthOffset, baSize-lengthOffset, format ); - } - delete [] ba; - return img; -} - -void Resource::loadImageCollection( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "image" ) { - Image img; - img.name = n.attribute( "name" ); - TQDomElement n2 = n.firstChild().toElement(); - while ( !n2.isNull() ) { - if ( n2.tagName() == "data" ) - img.img = loadImageData( n2 ); - n2 = n2.nextSibling().toElement(); - } - images.append( img ); - n = n.nextSibling().toElement(); - } - } -} - -TQImage Resource::loadFromCollection( const TQString &name ) -{ - TQValueList::Iterator it = images.begin(); - for ( ; it != images.end(); ++it ) { - if ( ( *it ).name == name ) - return ( *it ).img; - } - return TQImage(); -} - -void Resource::saveConnections( TQTextStream &ts, int indent ) -{ - TQValueList connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) ); - if ( connections.isEmpty() ) - return; - ts << makeIndent( indent ) << "" << endl; - indent++; - TQValueList::Iterator it = connections.begin(); - for ( ; it != connections.end(); ++it ) { - MetaDataBase::Connection conn = *it; - if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 && - qstrcmp( conn.sender->name(), "this" ) != 0 ) || - ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 && - qstrcmp( conn.receiver->name(), "this" ) != 0 ) ) - continue; - if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) && - !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) ) - continue; - - if ( conn.sender->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)conn.sender )->customWidget(); - if ( cw && !cw->hasSignal( conn.signal ) ) - continue; - } - - if ( conn.receiver->inherits( "CustomWidget" ) && !formwindow->isMainContainer( conn.receiver ) ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)conn.receiver )->customWidget(); - if ( cw && !cw->hasSlot( MetaDataBase::normalizeFunction( conn.slot ).latin1() ) ) - continue; - } - - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( conn.sender->name() ) << "" << endl; - ts << makeIndent( indent ) << "" << entitize( conn.signal ) << "" << endl; - ts << makeIndent( indent ) << "" << entitize( conn.receiver->name() ) << "" << endl; - ts << makeIndent( indent ) << "" << entitize( MetaDataBase::normalizeFunction( conn.slot ) ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - TQString lang = formwindow->project()->language(); - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -void Resource::loadConnections( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "connection" ) { - TQString lang = n.attribute( "language", "C++" ); - TQDomElement n2 = n.firstChild().toElement(); - MetaDataBase::Connection conn; - while ( !n2.isNull() ) { - if ( n2.tagName() == "sender" ) { - conn.sender = 0; - TQString name = n2.firstChild().toText().data(); - if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { - conn.sender = TQT_TQOBJECT(toplevel); - } else { - if ( name == "this" ) - name = toplevel->name(); - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); - if ( l ) { - if ( l->first() ) - conn.sender = l->first(); - delete l; - l = 0; - } - if ( !conn.sender ) - conn.sender = formwindow->findAction( name ); - } - } else if ( n2.tagName() == "signal" ) { - conn.signal = n2.firstChild().toText().data(); - } else if ( n2.tagName() == "receiver" ) { - conn.receiver = 0; - TQString name = n2.firstChild().toText().data(); - if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { - conn.receiver = TQT_TQOBJECT(toplevel); - } else { - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); - if ( l ) { - if ( l->first() ) - conn.receiver = l->first(); - delete l; - l = 0; - } - if ( !conn.receiver ) - conn.receiver = formwindow->findAction( name ); - } - } else if ( n2.tagName() == "slot" ) { - conn.slot = n2.firstChild().toText().data(); - } - n2 = n2.nextSibling().toElement(); - } - if ( formwindow ) { - if ( TQT_BASE_OBJECT(conn.sender) == TQT_BASE_OBJECT(formwindow) ) - conn.sender = TQT_TQOBJECT(formwindow->mainContainer()); - if ( TQT_BASE_OBJECT(conn.receiver) == TQT_BASE_OBJECT(formwindow) ) - conn.receiver = TQT_TQOBJECT(formwindow->mainContainer()); - } - if ( conn.sender && conn.receiver ) { - if ( lang == "C++" ) { - MetaDataBase::addConnection( TQT_TQOBJECT(formwindow ? formwindow : toplevel), - conn.sender, conn.signal, conn.receiver, conn.slot ); - } - } - } else if ( n.tagName() == "slot" ) { // compatibility with 2.x - MetaDataBase::Function slot; - slot.specifier = n.attribute( "specifier", "virtual" ); - if ( slot.specifier.isEmpty() ) - slot.specifier = "virtual"; - slot.access = n.attribute( "access", "public" ); - if ( slot.access.isEmpty() ) - slot.access = "public"; - slot.language = n.attribute( "language", "C++" ); - slot.returnType = n.attribute( "returnType", "void" ); - if ( slot.returnType.isEmpty() ) - slot.returnType = "void"; - slot.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), slot.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), slot.function, slot.specifier, - slot.access, "slot", slot.language, slot.returnType ); - else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), slot.function, slot.function, - slot.specifier, slot.access, - "slot", slot.language, slot.returnType ); - } - n = n.nextSibling().toElement(); - } -} - -void Resource::saveCustomWidgets( TQTextStream &ts, int indent ) -{ - ts << makeIndent( indent ) << "" << endl; - indent++; - - TQPtrList *lst = MetaDataBase::customWidgets(); - for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - if ( usedCustomWidgets.findIndex( w->className ) == -1 ) - continue; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << w->className << "" << endl; - ts << makeIndent( indent ) << "
    includePolicy == MetaDataBase::CustomWidget::Local ? "local" : "global" ) - << "\">" << w->includeFile << "
    " << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << w->sizeHint.width() << "" << endl; - ts << makeIndent( indent ) << "" << w->sizeHint.height() << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << (int)w->isContainer << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << (int)w->sizePolicy.horData() << "" << endl; - ts << makeIndent( indent ) << "" << (int)w->sizePolicy.verData() << "" << endl; - ts << makeIndent( indent ) << "" << (int)w->sizePolicy.horStretch() << "" << endl; - ts << makeIndent( indent ) << "" << (int)w->sizePolicy.verStretch() << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << saveInCollection( w->pixmap->convertToImage() ) << "" << endl; - if ( !w->lstSignals.isEmpty() ) { - for ( TQValueList::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) - ts << makeIndent( indent ) << "" << entitize( *it ) << "" << endl; - } - if ( !w->lstSlots.isEmpty() ) { - for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) - ts << makeIndent( indent ) << "" << entitize( (*it).function ) << "" << endl; - } - if ( !w->lstProperties.isEmpty() ) { - for ( TQValueList::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it ) - ts << makeIndent( indent ) << "" << entitize( (*it).property ) << "" << endl; - } - indent--; - ts << makeIndent( indent ) << "
    " << endl; - } - - - indent--; - ts << makeIndent( indent ) << "
    " << endl; -} - -void Resource::loadCustomWidgets( const TQDomElement &e, Resource *r ) -{ - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "customwidget" ) { - TQDomElement n2 = n.firstChild().toElement(); - MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget; - while ( !n2.isNull() ) { - if ( n2.tagName() == "class" ) { - w->className = n2.firstChild().toText().data(); - } else if ( n2.tagName() == "header" ) { - w->includeFile = n2.firstChild().toText().data(); - TQString s = n2.attribute( "location" ); - if ( s != "local" ) - w->includePolicy = MetaDataBase::CustomWidget::Global; - else - w->includePolicy = MetaDataBase::CustomWidget::Local; - } else if ( n2.tagName() == "sizehint" ) { - TQDomElement n3 = n2.firstChild().toElement(); - while ( !n3.isNull() ) { - if ( n3.tagName() == "width" ) - w->sizeHint.setWidth( n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "height" ) - w->sizeHint.setHeight( n3.firstChild().toText().data().toInt() ); - n3 = n3.nextSibling().toElement(); - } - } else if ( n2.tagName() == "sizepolicy" ) { - TQDomElement n3 = n2.firstChild().toElement(); - while ( !n3.isNull() ) { - if ( n3.tagName() == "hordata" ) - w->sizePolicy.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "verdata" ) - w->sizePolicy.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "horstretch" ) - w->sizePolicy.setHorStretch( n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "verstretch" ) - w->sizePolicy.setVerStretch( n3.firstChild().toText().data().toInt() ); - n3 = n3.nextSibling().toElement(); - } - } else if ( n2.tagName() == "pixmap" ) { - TQPixmap pix; - if ( r ) { - pix = r->loadPixmap( n2 ); - } else { - TQDomElement n3 = n2.firstChild().toElement(); - TQImage img; - while ( !n3.isNull() ) { - if ( n3.tagName() == "data" ) { - img = loadImageData( n3 ); - } - n3 = n3.nextSibling().toElement(); - } - pix.convertFromImage( img ); - } - w->pixmap = new TQPixmap( pix ); - } else if ( n2.tagName() == "signal" ) { - w->lstSignals.append( n2.firstChild().toText().data().latin1() ); - } else if ( n2.tagName() == "container" ) { - w->isContainer = (bool)n2.firstChild().toText().data().toInt(); - } else if ( n2.tagName() == "slot" ) { - MetaDataBase::Function function; - function.function = n2.firstChild().toText().data().latin1(); - function.access = n2.attribute( "access" ); - function.type = "slot"; - w->lstSlots.append( function ); - } else if ( n2.tagName() == "property" ) { - MetaDataBase::Property property; - property.property = n2.firstChild().toText().data().latin1(); - property.type = n2.attribute( "type" ); - w->lstProperties.append( property ); - } - n2 = n2.nextSibling().toElement(); - } - MetaDataBase::addCustomWidget( w ); - } - n = n.nextSibling().toElement(); - } -} - -void Resource::saveTabOrder( TQTextStream &ts, int indent ) -{ - TQWidgetList l = MetaDataBase::tabOrder( toplevel ); - if ( l.isEmpty() ) - return; - - ts << makeIndent( indent ) << "" << endl; - indent++; - - for ( TQWidget *w = l.first(); w; w = l.next() ) { - if ( w->testWState( TQt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 ) - continue; - ts << makeIndent( indent ) << "" << w->name() << "" << endl; - } - - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -void Resource::loadTabOrder( const TQDomElement &e ) -{ - TQWidget *last = 0; - TQDomElement n = e.firstChild().toElement(); - TQWidgetList widgets; - while ( !n.isNull() ) { - if ( n.tagName() == "tabstop" ) { - TQString name = n.firstChild().toText().data(); - if ( name.isEmpty() ) - continue; - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); - if ( l ) { - if ( l->first() ) { - TQWidget *w = (TQWidget*)l->first(); - widgets.append( w ); - if ( last ) - toplevel->setTabOrder( last, w ); - last = w; - } - delete l; - } - } - n = n.nextSibling().toElement(); - } - - if ( !widgets.isEmpty() ) - MetaDataBase::setTabOrder( toplevel, widgets ); -} - -void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) -{ - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); - TQString cn; - if ( info.classNameChanged && !info.className.isEmpty() ) - cn = info.className; - else - cn = formwindow->name(); - ts << makeIndent( indent ) << "" << entitize( cn ) << "" << endl; - if ( !info.comment.isEmpty() ) - ts << makeIndent( indent ) << "" << entitize( info.comment ) << "" << endl; - if ( !info.author.isEmpty() ) - ts << makeIndent( indent ) << "" << entitize( info.author ) << "" << endl; -} - -void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) -{ - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); - if ( !langIface || formwindow->project()->isCpp() ) { - TQValueList includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) ); - TQString extensionInclude; - bool needExtensionInclude = FALSE; - if ( langIface && - formwindow->formFile()->hasFormCode() && - formwindow->formFile()->codeFileState() != FormFile::Deleted ) { - extensionInclude = TQFileInfo( currFileName ).fileName() + langIface->formCodeExtension(); - needExtensionInclude = TRUE; - } - if ( !includes.isEmpty() || needExtensionInclude ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - - for ( TQValueList::Iterator it = includes.begin(); it != includes.end(); ++it ) { - ts << makeIndent( indent ) << "" << (*it).header << "" << endl; - if ( needExtensionInclude ) - needExtensionInclude = (*it).header != extensionInclude; - } - - if ( needExtensionInclude ) - ts << makeIndent( indent ) << "" - << extensionInclude << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - TQStringList forwards = MetaDataBase::forwards( TQT_TQOBJECT(formwindow) ); - if ( !forwards.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - for ( TQStringList::Iterator it2 = forwards.begin(); it2 != forwards.end(); ++it2 ) - ts << makeIndent( indent ) << "" << entitize( *it2 ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - TQValueList varLst = MetaDataBase::variables( TQT_TQOBJECT(formwindow) ); - if ( !varLst.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - - TQValueList::Iterator it = varLst.begin(); - for ( ; it != varLst.end(); ++it ) { - ts << makeIndent( indent ) << "" << entitize( (*it).varName ) << "
    " << endl; - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } - TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) ); - if ( !sigs.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - for ( TQStringList::Iterator it3 = sigs.begin(); it3 != sigs.end(); ++it3 ) - ts << makeIndent( indent ) << "" << entitize( *it3 ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - TQValueList slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ); - if ( !slotList.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQString lang = formwindow->project()->language(); - TQValueList::Iterator it = slotList.begin(); - for ( ; it != slotList.end(); ++it ) { - MetaDataBase::Function function = *it; - ts << makeIndent( indent ) << "" << entitize( function.function ) << "" << endl; - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formwindow), TRUE ); - if ( !functionList.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQString lang = formwindow->project()->language(); - TQValueList::Iterator it = functionList.begin(); - for ( ; it != functionList.end(); ++it ) { - MetaDataBase::Function function = *it; - ts << makeIndent( indent ) << "" << entitize( function.function ) << "
    " << endl; - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - - if ( formwindow && formwindow->savePixmapInline() ) - ; - else if ( formwindow && formwindow->savePixmapInProject() ) - ts << makeIndent( indent ) << "" << endl; - else - ts << makeIndent( indent ) << "" << formwindow->pixmapLoaderFunction() << "" << endl; - if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() ) - ts << makeIndent( indent ) << "" << exportMacro << "" << endl; - if ( formwindow ) { - ts << makeIndent( indent ) << "layoutDefaultSpacing() - << "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << endl; - if ( formwindow->hasLayoutFunctions() ) { - TQString s = ""; - TQString m = ""; - if ( !formwindow->spacingFunction().isEmpty() ) - s = TQString( " spacing=\"%1\"" ).arg( formwindow->spacingFunction() ); - if ( !formwindow->marginFunction().isEmpty() ) - m = TQString( " margin=\"%1\"" ).arg( formwindow->marginFunction() ); - ts << makeIndent( indent ) << "" << endl; - } - } -} - -void Resource::saveIncludeHints( TQTextStream &ts, int indent ) -{ - if ( includeHints.isEmpty() ) - return; - ts << makeIndent( indent ) << "" << endl; - indent++; - for ( TQStringList::Iterator it = includeHints.begin(); it != includeHints.end(); ++it ) - ts << makeIndent( indent ) << "" << *it << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -TQColorGroup Resource::loadColorGroup( const TQDomElement &e ) -{ - TQColorGroup cg; - int r = -1; - TQDomElement n = e.firstChild().toElement(); - TQColor col; - while ( !n.isNull() ) { - if ( n.tagName() == "color" ) { - r++; - cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) ); - } else if ( n.tagName() == "pixmap" ) { - TQPixmap pix = loadPixmap( n ); - cg.setBrush( (TQColorGroup::ColorRole)r, TQBrush( col, pix ) ); - } - n = n.nextSibling().toElement(); - } - return cg; -} - -void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent ) -{ - TQObjectList clo = a->childrenListObject(); - if ( clo.isEmpty() ) - return; - TQObjectListIt it( clo ); - while ( it.current() ) { - TQObject *o = it.current(); - ++it; - if ( !::tqqt_cast(o) ) - continue; - TQAction *ac = (TQAction*)o; - bool isGroup = ::tqqt_cast(ac); - if ( isGroup ) - ts << makeIndent( indent ) << "" << endl; - else - ts << makeIndent( indent ) << "" << endl; - indent++; - saveObjectProperties( ac, ts, indent ); - indent--; - if ( isGroup ) { - indent++; - saveChildActions( ac, ts, indent ); - indent--; - } - if ( isGroup ) - ts << makeIndent( indent ) << "" << endl; - else - ts << makeIndent( indent ) << "" << endl; - } -} - -void Resource::saveActions( const TQPtrList &actions, TQTextStream &ts, int indent ) -{ - if ( actions.isEmpty() ) - return; - ts << makeIndent( indent ) << "" << endl; - indent++; - TQPtrListIterator it( actions ); - while ( it.current() ) { - TQAction *a = it.current(); - bool isGroup = ::tqqt_cast(a); - if ( isGroup ) - ts << makeIndent( indent ) << "" << endl; - else - ts << makeIndent( indent ) << "" << endl; - indent++; - saveObjectProperties( a, ts, indent ); - indent--; - if ( isGroup ) { - indent++; - saveChildActions( a, ts, indent ); - indent--; - } - if ( isGroup ) - ts << makeIndent( indent ) << "" << endl; - else - ts << makeIndent( indent ) << "" << endl; - ++it; - } - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) -{ - TQDomElement n = e; - TQAction *a = 0; - if ( n.tagName() == "action" ) { - a = new QDesignerAction( parent ); - MetaDataBase::addEntry( a ); - TQDomElement n2 = n.firstChild().toElement(); - bool hasMenuText = FALSE; - while ( !n2.isNull() ) { - if ( n2.tagName() == "property" ) { - TQDomElement n3(n2); // don't modify n2 - TQString prop = n3.attribute( "name" ); - if (prop == "menuText") - hasMenuText = TRUE; - TQDomElement value(n3.firstChild().toElement()); - setObjectProperty( a, prop, value ); - if (!hasMenuText && uiFileVersion < "3.3" && prop == "text") - setObjectProperty( a, "menuText", value ); - } - n2 = n2.nextSibling().toElement(); - } - if ( !::tqqt_cast(parent) ) - formwindow->actionList().append( a ); - } else if ( n.tagName() == "actiongroup" ) { - a = new QDesignerActionGroup( parent ); - MetaDataBase::addEntry( a ); - TQDomElement n2 = n.firstChild().toElement(); - bool hasMenuText = FALSE; - while ( !n2.isNull() ) { - if ( n2.tagName() == "property" ) { - TQDomElement n3(n2); // don't modify n2 - TQString prop = n3.attribute( "name" ); - if (prop == "menuText") - hasMenuText = TRUE; - TQDomElement value = n3.firstChild().toElement(); - setObjectProperty( a, prop, value ); - if (!hasMenuText && uiFileVersion < "3.3" && prop == "text") - setObjectProperty( a, "menuText", value ); - } else if ( n2.tagName() == "action" || - n2.tagName() == "actiongroup" ) { - loadChildAction( a, n2 ); - } - n2 = n2.nextSibling().toElement(); - } - if ( !::tqqt_cast(parent) ) - formwindow->actionList().append( a ); - } -} - -void Resource::loadActions( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "action" ) { - loadChildAction( TQT_TQOBJECT(formwindow), n ); - } else if ( n.tagName() == "actiongroup" ) { - loadChildAction( TQT_TQOBJECT(formwindow), n ); - } - n = n.nextSibling().toElement(); - } -} - -void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) -{ - ts << makeIndent( indent ) << "" << endl; - indent++; - - TQPtrList tbList; - for ( int i = 0; i <= (int)TQt::DockMinimized; ++i ) { - tbList = mw->toolBars( (TQt::Dock)i ); - if ( tbList.isEmpty() ) - continue; - for ( TQToolBar *tb = tbList.first(); tb; tb = tbList.next() ) { - if ( tb->isHidden() ) - continue; - ts << makeIndent( indent ) << "" << endl; - indent++; - saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); - TQPtrList actionList = ( (QDesignerToolBar*)tb )->insertedActions(); - for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( ::tqqt_cast(a) ) { - ts << makeIndent( indent ) << "" << endl; - } else { - if ( ::tqqt_cast(a) && !( (QDesignerAction*)a )->supportsMenu() ) { - TQWidget *w = ( (QDesignerAction*)a )->widget(); - ts << makeIndent( indent ) << "" << endl; - indent++; - const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); - if ( w->isA( "CustomWidget" ) ) - usedCustomWidgets << TQString( className ); - if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) - saveItems( TQT_TQOBJECT(w), ts, indent ); - saveObjectProperties( TQT_TQOBJECT(w), ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } else { - ts << makeIndent( indent ) << "name() << "\"/>" << endl; - } - } - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) -{ - MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); - if ( !mb ) - return; - ts << makeIndent( indent ) << "" << endl; - indent++; - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mb), "name", TRUE ); // FIXME: remove - saveObjectProperties( TQT_TQOBJECT(mb), ts, indent ); - - for ( int i = 0; i < (int)mb->count(); ++i ) { - MenuBarEditorItem *m = mb->item( i ); - if ( !m ) - continue; - if ( m->isSeparator() ) { - ts << makeIndent( indent ) << "" << endl; - } else { - ts << makeIndent( indent ) << "menuText() ) - << "\" name=\"" << entitize( m->menu()->name() ) << "\">" << endl; - indent++; - savePopupMenu( m->menu(), mw, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStream &ts, int indent ) -{ - for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) { - TQAction *a = i->action(); - if ( ::tqqt_cast(a) ) - ts << makeIndent( indent ) << "" << endl; - else if ( ::tqqt_cast(a) ) - ts << makeIndent( indent ) << "name() << "\"/>" << endl; - else if ( ::tqqt_cast(a) ) - ts << makeIndent( indent ) << "name() << "\"/>" << endl; - PopupMenuEditor *s = i->subMenu(); - if ( s && s->count() ) { - TQString n = s->name(); - ts << makeIndent( indent ) << "menuText() ) - << "\" name=\"" << entitize( n ) - << "\" accel=\"" << entitize( a->accel() ) - << "\">" << endl; - indent++; - savePopupMenu( s, mw, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } -} - -void Resource::loadToolBars( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() ); - QDesignerToolBar *tb = 0; - while ( !n.isNull() ) { - if ( n.tagName() == "toolbar" ) { - TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt(); - tb = new QDesignerToolBar( mw, dock ); - TQDomElement n2 = n.firstChild().toElement(); - while ( !n2.isNull() ) { - if ( n2.tagName() == "action" ) { - TQAction *a = formwindow->findAction( n2.attribute( "name" ) ); - if ( a ) { - a->addTo( tb ); - tb->addAction( a ); - } - } else if ( n2.tagName() == "separator" ) { - TQAction *a = new QSeparatorAction( 0 ); - a->addTo( tb ); - tb->addAction( a ); - } else if ( n2.tagName() == "widget" ) { - TQWidget *w = (TQWidget*)createObject( n2, tb ); - QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) ); - a->addTo( tb ); - tb->addAction( a ); - tb->installEventFilters( w ); - } else if ( n2.tagName() == "property" ) { - setObjectProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); - } - n2 = n2.nextSibling().toElement(); - } - } - n = n.nextSibling().toElement(); - } -} - -void Resource::loadMenuBar( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - TQMainWindow *mw = (TQMainWindow*)formwindow->mainContainer(); - MenuBarEditor *mb = new MenuBarEditor( formwindow, mw ); - MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); - while ( !n.isNull() ) { - if ( n.tagName() == "item" ) { - PopupMenuEditor * popup = new PopupMenuEditor( formwindow, mw ); - loadPopupMenu( popup, n ); - popup->setName( n.attribute( "name" ) ); - mb->insertItem( n.attribute( "text" ), popup ); - MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); - } else if ( n.tagName() == "property" ) { - setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); - } else if ( n.tagName() == "separator" ) { - mb->insertSeparator(); - } - n = n.nextSibling().toElement(); - } -} - -void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e ) -{ - MetaDataBase::addEntry( TQT_TQOBJECT(p) ); - TQDomElement n = e.firstChild().toElement(); - TQAction *a = 0; - while ( !n.isNull() ) { - if ( n.tagName() == "action" || n.tagName() == "actiongroup") { - a = formwindow->findAction( n.attribute( "name" ) ); - if ( a ) - p->insert( a ); - } - if ( n.tagName() == "item" ) { - PopupMenuEditorItem *i = p->at( p->find( a ) ); - if ( i ) { - TQString name = n.attribute( "name" ); - formwindow->unify( i, name, TRUE ); - i->setName( name ); - MetaDataBase::addEntry( i ); - loadPopupMenu( i->subMenu(), n ); - } - } else if ( n.tagName() == "separator" ) { - a = new QSeparatorAction( 0 ); - p->insert( a ); - } - n = n.nextSibling().toElement(); - } -} - -bool Resource::saveFormCode( FormFile *formfile, LanguageInterface * /*langIface*/ ) -{ - TQString lang = formfile->project()->language(); - if ( formfile->hasTempFileName() || - formfile->code().isEmpty() || - !formfile->hasFormCode() || - !formfile->isModified(FormFile::WFormCode) ) - return TRUE; // There is no code to be saved. - return saveCode( formfile->project()->makeAbsolute(formfile->codeFile()), - formfile->code() ); -} - -void Resource::loadExtraSource( FormFile *formfile, const TQString &currFileName, - LanguageInterface *langIface, bool hasFunctions ) -{ - TQString lang = "TQt Script"; - if ( MainWindow::self ) - lang = MainWindow::self->currProject()->language(); - LanguageInterface *iface = langIface; - if ( hasFunctions || !iface ) - return; - TQValueList functions; - TQStringList forwards; - TQStringList includesImpl; - TQStringList includesDecl; - TQStringList vars; - TQValueList connections; - - iface->loadFormCode( formfile->formName(), - currFileName + iface->formCodeExtension(), - functions, - vars, - connections ); - - TQFile f( formfile->project()->makeAbsolute( formfile->codeFile() ) ); - TQString code; - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - code = ts.read(); - } - formfile->setCode( code ); - - if ( !MainWindow::self || !MainWindow::self->currProject()->isCpp() ) - MetaDataBase::setupConnections( formfile, connections ); - - for ( TQValueList::Iterator fit = functions.begin(); - fit != functions.end(); ++fit ) { - - if ( MetaDataBase::hasFunction( formfile->formWindow() ? - (TQObject*)formfile->formWindow() : - (TQObject*)formfile, - (*fit).name.latin1() ) ) { - TQString access = (*fit).access; - if ( !MainWindow::self || !MainWindow::self->currProject()->isCpp() ) - MetaDataBase::changeFunction( formfile->formWindow() ? - (TQObject*)formfile->formWindow() : - (TQObject*)formfile, - (*fit).name, - (*fit).name, - TQString() ); - } else { - TQString access = (*fit).access; - if ( access.isEmpty() ) - access = "protected"; - TQString type = "function"; - if ( (*fit).returnType == "void" ) - type = "slot"; - MetaDataBase::addFunction( formfile->formWindow() ? - (TQObject*)formfile->formWindow() : - (TQObject*)formfile, - (*fit).name.latin1(), "virtual", (*fit).access, - type, lang, (*fit).returnType ); - } - } -} diff --git a/tdevdesigner/designer/resource.h b/tdevdesigner/designer/resource.h deleted file mode 100644 index 06598254..00000000 --- a/tdevdesigner/designer/resource.h +++ /dev/null @@ -1,165 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef RESOURCE_H -#define RESOURCE_H - -#include -#include -#include -#include -#include -#include "actiondnd.h" - -#include "metadatabase.h" - -class TQWidget; -class TQObject; -class TQLayout; -class TQStyle; -class TQPalette; -class FormWindow; -class MainWindow; -class TQDomElement; -class QDesignerGridLayout; -class TQListViewItem; -class TQMainWindow; -struct LanguageInterface; -class FormFile; -class Project; -class PopupMenuEditor; - -class Resource -{ -public: - struct Image { - TQImage img; - TQString name; - bool operator==( const Image &i ) const { - return ( i.name == name && - i.img == img ); - } - }; - - Resource(); - Resource( MainWindow* mw ); - ~Resource(); - - void setWidget( FormWindow *w ); - TQWidget *widget() const; - - bool load( FormFile *ff, Project *defProject = 0 ); - bool load( FormFile *ff, TQIODevice*, Project *defProject = 0 ); - TQString copy(); - - bool save( const TQString& filename, bool formCodeOnly = FALSE); - bool save( TQIODevice* ); - void paste( const TQString &cb, TQWidget *parent ); - - static void saveImageData( const TQImage &img, TQTextStream &ts, int indent ); - static void loadCustomWidgets( const TQDomElement &e, Resource *r ); - static void loadExtraSource( FormFile *formfile, const TQString &currFileName, - LanguageInterface *langIface, bool hasFunctions ); - static bool saveFormCode( FormFile *formfile, LanguageInterface *langIface ); - -private: - void saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ); - void saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ); - void saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ); - void saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent ); - void saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent ); - void saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent ); - void saveProperty( const TQVariant &value, TQTextStream &ts, int indent ); - void saveItems( TQObject *obj, TQTextStream &ts, int indent ); - void saveItem( const TQStringList &text, const TQPtrList &pixmaps, TQTextStream &ts, int indent ); - void saveItem( TQListViewItem *i, TQTextStream &ts, int indent ); - void saveConnections( TQTextStream &ts, int indent ); - void saveCustomWidgets( TQTextStream &ts, int indent ); - void saveTabOrder( TQTextStream &ts, int indent ); - void saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup &cg ); - void saveColor( TQTextStream &ts, int indent, const TQColor &c ); - void saveMetaInfoBefore( TQTextStream &ts, int indent ); - void saveMetaInfoAfter( TQTextStream &ts, int indent ); - void saveIncludeHints( TQTextStream &ts, int indent ); - void savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname = "pixmap" ); - void saveActions( const TQPtrList &actions, TQTextStream &ts, int indent ); - void saveChildActions( TQAction *a, TQTextStream &ts, int indent ); - void saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ); - void saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ); - void savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStream &ts, int indent ); - - TQObject *createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout = 0 ); - TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ); - void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 ); - void createColumn( const TQDomElement &e, TQWidget *widget ); - void setObjectProperty( TQObject* widget, const TQString &prop, const TQDomElement &e); - TQString saveInCollection( const TQImage &img ); - TQString saveInCollection( const TQPixmap &pix ) { return saveInCollection( pix.convertToImage() ); } - TQImage loadFromCollection( const TQString &name ); - void saveImageCollection( TQTextStream &ts, int indent ); - void loadImageCollection( const TQDomElement &e ); - void loadConnections( const TQDomElement &e ); - void loadTabOrder( const TQDomElement &e ); - void loadItem( const TQDomElement &n, TQPixmap &pix, TQString &txt, bool &hasPixmap ); - void loadActions( const TQDomElement &n ); - void loadChildAction( TQObject *parent, const TQDomElement &e ); - void loadToolBars( const TQDomElement &n ); - void loadMenuBar( const TQDomElement &n ); - void loadPopupMenu( PopupMenuEditor *pm, const TQDomElement &e ); - TQColorGroup loadColorGroup( const TQDomElement &e ); - TQPixmap loadPixmap( const TQDomElement &e, const TQString &tagname = "pixmap" ); - -private: - MainWindow *mainwindow; - FormWindow *formwindow; - TQWidget* toplevel; - TQValueList images; - bool copying, pasting; - bool mainContainerSet; - TQStringList knownNames; - TQStringList usedCustomWidgets; - TQListViewItem *lastItem; - - TQValueList metaIncludes; - TQValueList metaVariables; - TQStringList metaForwards; - TQStringList metaSignals; - MetaDataBase::MetaInfo metaInfo; - TQMap dbControls; - TQMap dbTables; - TQMap widgets; - TQString exportMacro; - bool hadGeometry; - TQMap > langConnections; - TQString currFileName; - LanguageInterface *langIface; - bool hasFunctions; - TQStringList includeHints; - - TQString uiFileVersion; -}; - -#endif diff --git a/tdevdesigner/designer/richtextfontdialog.ui b/tdevdesigner/designer/richtextfontdialog.ui deleted file mode 100644 index d7d6c5a7..00000000 --- a/tdevdesigner/designer/richtextfontdialog.ui +++ /dev/null @@ -1,347 +0,0 @@ - -RichTextFontDialog -********************************************************************* -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - RichTextFontDialog - - - - 0 - 0 - 255 - 158 - - - - Font Properties - - - true - - - - unnamed - - - 11 - - - 6 - - - - Layout6 - - - - unnamed - - - 0 - - - 6 - - - - - default - - - - fontCombo - - - - - TextLabel1_2 - - - &Font: - - - fontCombo - - - - - TextLabel2 - - - Rel. &size: - - - fontSizeCombo - - - - - Spacer13 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - TextLabel1 - - - C&olor: - - - colorButton - - - - - - 0 - - - - - -4 - - - - - -3 - - - - - -2 - - - - - -1 - - - - - +1 - - - - - +2 - - - - - +3 - - - - - +4 - - - - fontSizeCombo - - - true - - - AtTop - - - - - colorButton - - - - 0 - 0 - 0 - 0 - - - - - 40 - 20 - - - - - 0 - 0 - 0 - - - - TabFocus - - - - - - - - - - Spacer14 - - - Vertical - - - Expanding - - - - 20 - 16 - - - - - - Line1 - - - HLine - - - Sunken - - - Horizontal - - - - - Layout15 - - - - unnamed - - - 0 - - - 6 - - - - Spacer12 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - okButton - - - &OK - - - - - cancelButton - - - &Cancel - - - - - - - - - colorButton - clicked() - RichTextFontDialog - selectColor() - - - okButton - clicked() - RichTextFontDialog - accept() - - - cancelButton - clicked() - RichTextFontDialog - reject() - - - - fontCombo - fontSizeCombo - colorButton - okButton - cancelButton - - - richtextfontdialog.ui.h - - - QString font - QColor color - QString size - - - init() - selectColor() - accept() - reject() - getSize() - getColor() - getFont() - - - diff --git a/tdevdesigner/designer/richtextfontdialog.ui.h b/tdevdesigner/designer/richtextfontdialog.ui.h deleted file mode 100644 index 27a11a21..00000000 --- a/tdevdesigner/designer/richtextfontdialog.ui.h +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you wish to add, delete or rename slots use TQt Designer which will -** update this file, preserving your code. Create an init() slot in place of -** a constructor, and a destroy() slot in place of a destructor. -*****************************************************************************/ -#include -#include - -void RichTextFontDialog::init() -{ - TQFontDatabase *db = new TQFontDatabase(); - fontCombo->insertStringList( db->families() ); -} - -void RichTextFontDialog::selectColor() -{ - color = TQColorDialog::getColor( "", this ); - if( color.isValid() ) - colorButton->setPaletteBackgroundColor( color ); -} - -void RichTextFontDialog::accept() -{ - size = fontSizeCombo->currentText(); - font = fontCombo->currentText(); - done( Accepted ); -} - -void RichTextFontDialog::reject() -{ - done( Rejected ); -} - -TQString RichTextFontDialog::getSize() -{ - return size; -} - -TQString RichTextFontDialog::getColor() -{ - return color.name(); -} - -TQString RichTextFontDialog::getFont() -{ - return font; -} diff --git a/tdevdesigner/designer/sizehandle.cpp b/tdevdesigner/designer/sizehandle.cpp deleted file mode 100644 index d60f223b..00000000 --- a/tdevdesigner/designer/sizehandle.cpp +++ /dev/null @@ -1,388 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include // HP-UX compiler needs this here - -#include "sizehandle.h" -#include "formwindow.h" -#include "widgetfactory.h" - -#include -#include -#include -#include - -SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s ) - : TQWidget( parent ) -{ - active = TRUE; - setBackgroundMode( active ? PaletteText : PaletteDark ); - setFixedSize( 6, 6 ); - widget = 0; - dir =d ; - setMouseTracking( FALSE ); - formWindow = parent; - sel = s; - updateCursor(); -} - -void SizeHandle::updateCursor() -{ - if ( !active ) { - setCursor( arrowCursor ); - return; - } - - switch ( dir ) { - case LeftTop: - setCursor( sizeFDiagCursor ); - break; - case Top: - setCursor( sizeVerCursor ); - break; - case RightTop: - setCursor( sizeBDiagCursor ); - break; - case Right: - setCursor( sizeHorCursor ); - break; - case RightBottom: - setCursor( sizeFDiagCursor ); - break; - case Bottom: - setCursor( sizeVerCursor ); - break; - case LeftBottom: - setCursor( sizeBDiagCursor ); - break; - case Left: - setCursor( sizeHorCursor ); - break; - } -} - -void SizeHandle::setActive( bool a ) -{ - active = a; - setBackgroundMode( active ? PaletteText : PaletteDark ); - updateCursor(); -} - -void SizeHandle::setWidget( TQWidget *w ) -{ - widget = w; -} - -void SizeHandle::paintEvent( TQPaintEvent * ) -{ - if ( ( (FormWindow*)parentWidget() )->currentWidget() != widget ) - return; - TQPainter p( this ); - p.setPen( blue ); - p.drawRect( 0, 0, width(), height() ); -} - -void SizeHandle::mousePressEvent( TQMouseEvent *e ) -{ - if ( !widget || e->button() != Qt::LeftButton || !active ) - return; - oldPressPos = e->pos(); - geom = origGeom = TQRect( widget->pos(), widget->size() ); -} - -void SizeHandle::mouseMoveEvent( TQMouseEvent *e ) -{ - if ( !widget || ( e->state() & Qt::LeftButton ) != Qt::LeftButton || !active ) - return; - TQPoint rp = mapFromGlobal( e->globalPos() ); - TQPoint d = oldPressPos - rp; - oldPressPos = rp; - TQPoint checkPos = widget->parentWidget()->mapFromGlobal( e->globalPos() ); - TQRect pr = widget->parentWidget()->rect(); - - // ##### move code around a bit to reduce duplicated code here - switch ( dir ) { - case LeftTop: { - if ( checkPos.x() > pr.width() - 2 * width() || checkPos.y() > pr.height() - 2 * height() ) - return; - int w = geom.width() + d.x(); - geom.setWidth( w ); - w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); - int h = geom.height() + d.y(); - geom.setHeight( h ); - h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); - int dx = widget->width() - w; - int dy = widget->height() - h; - trySetGeometry( widget, widget->x() + dx, widget->y() + dy, w, h ); - } break; - case Top: { - if ( checkPos.y() > pr.height() - 2 * height() ) - return; - int h = geom.height() + d.y(); - geom.setHeight( h ); - h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); - int dy = widget->height() - h; - trySetGeometry( widget, widget->x(), widget->y() + dy, widget->width(), h ); - } break; - case RightTop: { - if ( checkPos.x() < 2 * width() || checkPos.y() > pr.height() - 2 * height() ) - return; - int h = geom.height() + d.y(); - geom.setHeight( h ); - h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); - int dy = widget->height() - h; - int w = geom.width() - d.x(); - geom.setWidth( w ); - w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); - trySetGeometry( widget, widget->x(), widget->y() + dy, w, h ); - } break; - case Right: { - if ( checkPos.x() < 2 * width() ) - return; - int w = geom.width() - d.x(); - geom.setWidth( w ); - w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); - tryResize( widget, w, widget->height() ); - } break; - case RightBottom: { - if ( checkPos.x() < 2 * width() || checkPos.y() < 2 * height() ) - return; - int w = geom.width() - d.x(); - geom.setWidth( w ); - w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); - int h = geom.height() - d.y(); - geom.setHeight( h ); - h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); - tryResize( widget, w, h ); - } break; - case Bottom: { - if ( checkPos.y() < 2 * height() ) - return; - int h = geom.height() - d.y(); - geom.setHeight( h ); - h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); - tryResize( widget, widget->width(), h ); - } break; - case LeftBottom: { - if ( checkPos.x() > pr.width() - 2 * width() || checkPos.y() < 2 * height() ) - return; - int w = geom.width() + d.x(); - geom.setWidth( w ); - w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); - int dx = widget->width() - w; - int h = geom.height() - d.y(); - geom.setHeight( h ); - h = ( h / formWindow->grid().y() ) * formWindow->grid().y(); - trySetGeometry( widget, widget->x() + dx, widget->y(), w, h ); - } break; - case Left: { - if ( checkPos.x() > pr.width() - 2 * width() ) - return; - int w = geom.width() + d.x(); - geom.setWidth( w ); - w = ( w / formWindow->grid().x() ) * formWindow->grid().x(); - int dx = widget->width() - w; - trySetGeometry( widget, widget->x() + dx, widget->y(), w, widget->height() ); - } break; - } - - TQPoint p = pos(); - sel->updateGeometry(); - oldPressPos += ( p - pos() ); - - formWindow->sizePreview()->setText( i18n( "%1/%2" ).arg( widget->width() ).arg( widget->height() ) ); - formWindow->sizePreview()->adjustSize(); - TQRect lg( formWindow->mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), - formWindow->sizePreview()->size() ); - formWindow->checkPreviewGeometry( lg ); - formWindow->sizePreview()->setGeometry( lg ); - formWindow->sizePreview()->show(); - formWindow->sizePreview()->raise(); - if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) - formWindow->updateChildSelections( widget ); -} - -void SizeHandle::mouseReleaseEvent( TQMouseEvent *e ) -{ - if ( e->button() != Qt::LeftButton || !active ) - return; - - formWindow->sizePreview()->hide(); - if ( geom != widget->geometry() ) - formWindow->commandHistory()->addCommand( new ResizeCommand( i18n( "Resize" ), - formWindow, - widget, origGeom, - widget->geometry() ) ); - formWindow->emitUpdateProperties( TQT_TQOBJECT(widget) ); -} - -void SizeHandle::trySetGeometry( TQWidget *w, int x, int y, int width, int height ) -{ - int minw = TQMAX( w->minimumSizeHint().width(), w->minimumSize().width() ); - minw = TQMAX( minw, 2 * formWindow->grid().x() ); - int minh = TQMAX( w->minimumSizeHint().height(), w->minimumSize().height() ); - minh = TQMAX( minh, 2 * formWindow->grid().y() ); - if ( TQMAX( minw, width ) > w->maximumWidth() || - TQMAX( minh, height ) > w->maximumHeight() ) - return; - if ( width < minw && x != w->x() ) - x -= minw - width; - if ( height < minh && y != w->y() ) - y -= minh - height; - w->setGeometry( x, y, TQMAX( minw, width ), TQMAX( minh, height ) ); -} - -void SizeHandle::tryResize( TQWidget *w, int width, int height ) -{ - int minw = TQMAX( w->minimumSizeHint().width(), w->minimumSize().width() ); - minw = TQMAX( minw, 16 ); - int minh = TQMAX( w->minimumSizeHint().height(), w->minimumSize().height() ); - minh = TQMAX( minh, 16 ); - w->resize( TQMAX( minw, width ), TQMAX( minh, height ) ); -} - -// ------------------------------------------------------------------------ - -WidgetSelection::WidgetSelection( FormWindow *parent, TQPtrDict *selDict ) - : selectionDict( selDict ) -{ - formWindow = parent; - for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { - handles.insert( i, new SizeHandle( formWindow, (SizeHandle::Direction)i, this ) ); - } - hide(); -} - -void WidgetSelection::setWidget( TQWidget *w, bool updateDict ) -{ - if ( !w ) { - hide(); - if ( updateDict ) - selectionDict->remove( wid ); - wid = 0; - return; - } - - wid = w; - bool active = !wid->parentWidget() || WidgetFactory::layoutType( wid->parentWidget() ) == WidgetFactory::NoLayout; - for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { - SizeHandle *h = handles[ i ]; - if ( h ) { - h->setWidget( wid ); - h->setActive( active ); - } - } - updateGeometry(); - show(); - if ( updateDict ) - selectionDict->insert( w, this ); -} - -bool WidgetSelection::isUsed() const -{ - return wid != 0; -} - -void WidgetSelection::updateGeometry() -{ - if ( !wid || !wid->parentWidget() ) - return; - - TQPoint p = wid->parentWidget()->mapToGlobal( wid->pos() ); - p = formWindow->mapFromGlobal( p ); - TQRect r( p, wid->size() ); - - int w = 6; - int h = 6; - - for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { - SizeHandle *hndl = handles[ i ]; - if ( !hndl ) - continue; - switch ( i ) { - case SizeHandle::LeftTop: - hndl->move( r.x() - w / 2, r.y() - h / 2 ); - break; - case SizeHandle::Top: - hndl->move( r.x() + r.width() / 2 - w / 2, r.y() - h / 2 ); - break; - case SizeHandle::RightTop: - hndl->move( r.x() + r.width() - w / 2, r.y() - h / 2 ); - break; - case SizeHandle::Right: - hndl->move( r.x() + r.width() - w / 2, r.y() + r.height() / 2 - h / 2 ); - break; - case SizeHandle::RightBottom: - hndl->move( r.x() + r.width() - w / 2, r.y() + r.height() - h / 2 ); - break; - case SizeHandle::Bottom: - hndl->move( r.x() + r.width() / 2 - w / 2, r.y() + r.height() - h / 2 ); - break; - case SizeHandle::LeftBottom: - hndl->move( r.x() - w / 2, r.y() + r.height() - h / 2 ); - break; - case SizeHandle::Left: - hndl->move( r.x() - w / 2, r.y() + r.height() / 2 - h / 2 ); - break; - default: - break; - } - } -} - -void WidgetSelection::hide() -{ - for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { - SizeHandle *h = handles[ i ]; - if ( h ) - h->hide(); - } -} - -void WidgetSelection::show() -{ - for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { - SizeHandle *h = handles[ i ]; - if ( h ) { - h->show(); - h->raise(); - } - } -} - -void WidgetSelection::update() -{ - for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { - SizeHandle *h = handles[ i ]; - if ( h ) - h->update(); - } -} - -TQWidget *WidgetSelection::widget() const -{ - return wid; -} diff --git a/tdevdesigner/designer/sizehandle.h b/tdevdesigner/designer/sizehandle.h deleted file mode 100644 index 44917884..00000000 --- a/tdevdesigner/designer/sizehandle.h +++ /dev/null @@ -1,98 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef SIZEHANDLE_H -#define SIZEHANDLE_H - -#include -#include -#include - -class TQMouseEvent; -class FormWindow; -class WidgetSelection; -class TQPaintEvent; - -class SizeHandle : public TQWidget -{ - Q_OBJECT - - -public: - enum Direction { LeftTop, Top, RightTop, Right, RightBottom, Bottom, LeftBottom, Left }; - - SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s ); - void setWidget( TQWidget *w ); - void setActive( bool a ); - void updateCursor(); - - void setEnabled( bool ) {} - -protected: - void paintEvent( TQPaintEvent *e ); - void mousePressEvent( TQMouseEvent *e ); - void mouseMoveEvent( TQMouseEvent *e ); - void mouseReleaseEvent( TQMouseEvent *e ); - -private: - void trySetGeometry( TQWidget *w, int x, int y, int width, int height ); - void tryResize( TQWidget *w, int width, int height ); - -private: - TQWidget *widget; - Direction dir; - TQPoint oldPressPos; - FormWindow *formWindow; - WidgetSelection *sel; - TQRect geom, origGeom; - bool active; - -}; - -class WidgetSelection -{ -public: - WidgetSelection( FormWindow *parent, TQPtrDict *selDict ); - - void setWidget( TQWidget *w, bool updateDict = TRUE ); - bool isUsed() const; - - void updateGeometry(); - void hide(); - void show(); - void update(); - - TQWidget *widget() const; - -protected: - TQIntDict handles; - TQWidget *wid; - FormWindow *formWindow; - TQPtrDict *selectionDict; - -}; - -#endif diff --git a/tdevdesigner/designer/sourceeditor.cpp b/tdevdesigner/designer/sourceeditor.cpp deleted file mode 100644 index 43d18cba..00000000 --- a/tdevdesigner/designer/sourceeditor.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ -#include - -#include "sourceeditor.h" - -#include "formwindow.h" -#include "metadatabase.h" -#include "project.h" -#include "mainwindow.h" -#include "../interfaces/languageinterface.h" -#include -#include "project.h" -#include "sourcefile.h" -#include "hierarchyview.h" -#include -#include -#include "tdevdesigner_part.h" - -SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageInterface *liface ) - : TQVBox( parent, 0, WDestructiveClose ), iFace( iface ), lIface( liface ), obj( 0 ), pro( 0 ) -{ - iFace->addRef(); - lIface->addRef(); - editor = iFace->editor( MainWindow::self->areEditorsReadOnly(), - this, MainWindow::self->designerInterface() ); - iFace->onBreakPointChange( TQT_TQOBJECT(MainWindow::self), TQT_SLOT( breakPointsChanged() ) ); - resize( 600, 400 ); - setIcon( SmallIcon( "designer_filenew.png" , TDevDesignerPartFactory::instance()) ); -} - -SourceEditor::~SourceEditor() -{ - saveBreakPoints(); - editor = 0; - if ( formWindow() ) { - formWindow()->formFile()->setCodeEdited( FALSE ); - formWindow()->formFile()->setEditor( 0 ); - } else if ( sourceFile() ) { - sourceFile()->setEditor( 0 ); - if ( MainWindow::self->objectHierarchy()->sourceEditor() == this ) - MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 ); - } - iFace->release(); - lIface->release(); - MainWindow::self->editorClosed( this ); -} - -void SourceEditor::setObject( TQObject *o, Project *p ) -{ - if ( sourceFile() ) - sourceFile()->setEditor( 0 ); - if ( formWindow() ) { - formWindow()->formFile()->setCodeEdited( FALSE ); - formWindow()->formFile()->setEditor( 0 ); - } - if ( ::tqqt_cast(o) ) - ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE ); - save(); - bool changed = FALSE; - if ( &(*obj) != o ) { - saveBreakPoints(); - changed = TRUE; - } - obj = o; - pro = p; - if ( formWindow() ) { - if ( formWindow()->isFake() ) - setCaption( formWindow()->project()->objectForFakeForm( formWindow() )->name() ); - else - setCaption( obj->name() ); - } else { - setCaption( sourceFile()->fileName() ); - } - if ( sourceFile() ) - sourceFile()->setEditor( this ); - else if ( formWindow() ) - formWindow()->formFile()->setEditor( this ); - iFace->setText( sourceOfObject( obj, lang, iFace, lIface ) ); - if ( pro && formWindow() ) { - if ( formWindow()->isFake() ) - iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); - else - iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); - } else { - iFace->setContext( 0 ); - } - if ( changed || sourceFile() ) - iFace->setBreakPoints( MetaDataBase::breakPoints( o ) ); - MainWindow::self->objectHierarchy()->showClasses( this ); -} - -TQString SourceEditor::sourceOfObject( TQObject *o, const TQString &, - EditorInterface *, LanguageInterface * ) -{ - TQString txt; - if ( !o ) - return txt; - if ( ::tqqt_cast(o) ) - txt = ( (FormWindow*)o )->formFile()->code(); - else if ( ::tqqt_cast(o) ) - txt = ( (SourceFile*)o )->text(); - return txt; -} - -void SourceEditor::setFunction( const TQString &func, const TQString &clss ) -{ - iFace->scrollTo( lIface->createFunctionStart( obj->name(), func, "", "" ), clss ); -} - -void SourceEditor::setClass( const TQString &clss ) -{ - iFace->scrollTo( clss, TQString() ); -} - -void SourceEditor::closeEvent( TQCloseEvent *e ) -{ - e->accept(); - if ( !obj ) - return; - if ( formWindow() ) { - save(); - formWindow()->formFile()->cm = formWindow()->formFile()->isModified(); - } else { - if ( !sourceFile()->closeEvent() ) - e->ignore(); - } -} - -void SourceEditor::save() -{ - if ( !obj ) - return; - if ( formWindow() ) - formWindow()->formFile()->syncCode(); - else if ( sourceFile() && sourceFile()->editor() ) - sourceFile()->setText( iFace->text() ); -} - -TQString SourceEditor::language() const -{ - return lang; -} - -void SourceEditor::setLanguage( const TQString &l ) -{ - lang = l; -} - -void SourceEditor::editCut() -{ - iFace->cut(); -} - -void SourceEditor::editCopy() -{ - iFace->copy(); -} - -void SourceEditor::editPaste() -{ - iFace->paste(); -} - -bool SourceEditor::editIsUndoAvailable() -{ - return iFace->isUndoAvailable(); -} - -bool SourceEditor::editIsRedoAvailable() -{ - return iFace->isRedoAvailable(); -} - -void SourceEditor::editUndo() -{ - iFace->undo(); -} - -void SourceEditor::editRedo() -{ - iFace->redo(); -} - -void SourceEditor::editSelectAll() -{ - iFace->selectAll(); -} - -void SourceEditor::configChanged() -{ - iFace->readSettings(); -} - -void SourceEditor::setModified( bool b ) -{ - iFace->setModified( b ); -} - -void SourceEditor::refresh( bool allowSave ) -{ - if ( allowSave ) - save(); - bool oldMod = iFace->isModified(); - iFace->setText( sourceOfObject( obj, lang, iFace, lIface ) ); - iFace->setModified( oldMod ); -} - -void SourceEditor::resetContext() -{ - if ( pro && formWindow() ) { - if ( formWindow()->isFake() ) - iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); - else - iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); - } else { - iFace->setContext( 0 ); - } -} - -void SourceEditor::setFocus() -{ - if ( formWindow() ) - formWindow()->formFile()->setCodeEdited( TRUE ); - if ( editor ) - editor->setFocus(); -} - -int SourceEditor::numLines() const -{ - return iFace->numLines(); -} - -void SourceEditor::saveBreakPoints() -{ - if ( !obj ) - return; - TQValueList l; - iFace->breakPoints( l ); - MetaDataBase::setBreakPoints( obj, l ); -} - -void SourceEditor::clearStep() -{ - iFace->clearStep(); -} - -void SourceEditor::clearStackFrame() -{ - iFace->clearStackFrame(); -} - -void SourceEditor::resetBreakPoints() -{ - iFace->setBreakPoints( MetaDataBase::breakPoints( obj ) ); -} - -TQString SourceEditor::text() const -{ - return iFace->text(); -} - -bool SourceEditor::isModified() const -{ - return iFace->isModified(); -} - -void SourceEditor::checkTimeStamp() -{ - if ( formWindow() ) - formWindow()->formFile()->checkTimeStamp(); - else if ( sourceFile() ) - sourceFile()->checkTimeStamp(); -} - -bool SourceEditor::saveAs() -{ - if ( formWindow() ) - return formWindow()->formFile()->saveAs(); - else if ( sourceFile() ) - return sourceFile()->saveAs(); - return FALSE; -} - -SourceFile *SourceEditor::sourceFile() const -{ - if ( !::tqqt_cast((TQObject *)obj) ) - return 0; - return (SourceFile*)(TQObject*)obj; -} - -FormWindow *SourceEditor::formWindow() const -{ - if ( !::tqqt_cast((TQObject *)obj) ) - return 0; - return (FormWindow*)(TQObject*)obj; -} diff --git a/tdevdesigner/designer/sourceeditor.h b/tdevdesigner/designer/sourceeditor.h deleted file mode 100644 index 3dde636e..00000000 --- a/tdevdesigner/designer/sourceeditor.h +++ /dev/null @@ -1,107 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef SOURCEEDITOR_H -#define SOURCEEDITOR_H - -#include "../interfaces/editorinterface.h" -#include -#include - -class FormWindow; -class TQCloseEvent; -struct LanguageInterface; -class Project; -class SourceFile; - -class SourceEditor : public TQVBox -{ - Q_OBJECT - - -public: - SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageInterface *liface ); - ~SourceEditor(); - - void setObject( TQObject *fw, Project *p ); - TQObject *object() const { return obj; } - Project *project() const { return pro; } - void setFunction( const TQString &func, const TQString &clss = TQString() ); - void setClass( const TQString &clss ); - void save(); - bool saveAs(); - void setModified( bool b ); - bool isModified() const; - - static TQString sourceOfObject( TQObject *fw, const TQString &lang, EditorInterface *iface, LanguageInterface *lIface ); - - TQString language() const; - void setLanguage( const TQString &l ); - - void editCut(); - void editCopy(); - void editPaste(); - bool editIsUndoAvailable(); - bool editIsRedoAvailable(); - void editUndo(); - void editRedo(); - void editSelectAll(); - - void configChanged(); - void refresh( bool allowSave ); - void resetContext(); - - EditorInterface *editorInterface() const { return iFace; } - - void setFocus(); - int numLines() const; - void saveBreakPoints(); - void clearStep(); - void clearStackFrame(); - void resetBreakPoints(); - - TQString text() const; - - void checkTimeStamp(); - - SourceFile *sourceFile() const; - FormWindow *formWindow() const; - -protected: - void closeEvent( TQCloseEvent *e ); - - -private: - EditorInterface *iFace; - LanguageInterface *lIface; - TQGuardedPtr obj; - Project *pro; - TQString lang; - TQGuardedPtr editor; - -}; - -#endif diff --git a/tdevdesigner/designer/sourcefile.cpp b/tdevdesigner/designer/sourcefile.cpp deleted file mode 100644 index 3d848bbf..00000000 --- a/tdevdesigner/designer/sourcefile.cpp +++ /dev/null @@ -1,298 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "sourcefile.h" -#include -#include -#include "designerappiface.h" -#include "sourceeditor.h" -#include "metadatabase.h" -#include "../interfaces/languageinterface.h" -#include -#include -#include "mainwindow.h" -#include "workspace.h" -#include - -#include -#include - -SourceFile::SourceFile( const TQString &fn, bool temp, Project *p ) - : filename( fn ), ed( 0 ), fileNameTemp( temp ), - timeStamp( 0, p->makeAbsolute( fn ) ), pro( p ), pkg( FALSE ) - , accepted( TRUE ) -{ - iface = 0; - - if ( !temp ) - accepted = checkFileName( TRUE ); - - if (accepted) { - load(); - pro->addSourceFile( this ); - MetaDataBase::addEntry( this ); - } - -} - -SourceFile::~SourceFile() -{ - if (iface) - delete iface; -} - -TQString SourceFile::text() const -{ - return txt; -} - -void SourceFile::setText( const TQString &s ) -{ - txt = s; -} - -bool SourceFile::save( bool ignoreModified ) -{ - if ( fileNameTemp ) - return saveAs(); - if ( !ignoreModified && !isModified() ) - return TRUE; - if ( ed ) - ed->save(); - - if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) { - TQString fn( pro->makeAbsolute( filename ) ); -#if defined(Q_OS_WIN32) - fn += ".bak"; -#else - fn += "~"; -#endif - TQFile f( pro->makeAbsolute( filename ) ); - if ( f.open( IO_ReadOnly ) ) { - TQFile f2( fn ); - if ( f2.open( IO_WriteOnly | IO_Translate ) ) { - TQCString data( f.size() ); - f.readBlock( data.data(), f.size() ); - f2.writeBlock( data ); - } - } - } - - TQFile f( pro->makeAbsolute( filename ) ); - if ( !f.open( IO_WriteOnly | IO_Translate ) ) - return saveAs(); - - TQTextStream ts( &f ); - ts << txt; - timeStamp.update(); - setModified( FALSE ); - return TRUE; -} - -bool SourceFile::saveAs( bool ignoreModified ) -{ - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - TQString filter; - if ( iface ) - filter = iface->fileFilterList().join("\n"); - - TQString old = filename; - TQString initFn = pro->makeAbsolute( filename ); - if ( ignoreModified ) { - TQString dir = TQStringList::split( ':', project()->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first(); - initFn = TQFileInfo( initFn ).fileName(); - initFn.prepend( dir + "/" ); - } - TQString fn = KFileDialog::getSaveFileName( initFn, filter ); - if ( fn.isEmpty() ) - return FALSE; - fileNameTemp = FALSE; - filename = pro->makeRelative( fn ); - if ( !checkFileName( TRUE ) ) { - filename = old; - return FALSE; - } - pro->setModified( TRUE ); - timeStamp.setFileName( pro->makeAbsolute( filename ) ); - if ( ed ) - ed->setCaption( i18n( "Edit %1" ).arg( filename ) ); - setModified( TRUE ); - if ( pro->isDummy() ) { - TQObject *o = ed->parent(); - while ( o && !o->isA( "MainWindow" ) ) - o = o->parent(); - if ( o ) - ((MainWindow *)o)->addRecentlyOpenedFile( fn ); - } - return save( ignoreModified ); -} - -bool SourceFile::load() -{ - TQFile f( pro->makeAbsolute( filename ) ); - if ( !f.open( IO_ReadOnly ) ) - return FALSE; - TQTextStream ts( &f ); - txt = ts.read(); - timeStamp.update(); - return TRUE; -} - -DesignerSourceFile *SourceFile::iFace() -{ - if ( !iface ) - iface = new DesignerSourceFileImpl( this ); - return iface; -} - -void SourceFile::setEditor( SourceEditor *e ) -{ - ed = e; -} - -bool SourceFile::isModified() const -{ - if ( !ed ) - return FALSE; - return ed->isModified(); -} - -static TQMap *extensionCounter; -TQString SourceFile::createUnnamedFileName( const TQString &extension ) -{ - if ( !extensionCounter ) - extensionCounter = new TQMap; - int count = -1; - TQMap::Iterator it; - if ( ( it = extensionCounter->find( extension ) ) != extensionCounter->end() ) { - count = *it; - ++count; - extensionCounter->replace( extension, count ); - } else { - count = 1; - extensionCounter->insert( extension, count ); - } - - return "unnamed" + TQString::number( count ) + "." + extension; -} - -void SourceFile::setModified( bool m ) -{ - if ( !ed ) - return; - ed->setModified( m ); -} - -bool SourceFile::closeEvent() -{ - if ( !isModified() && fileNameTemp ) { - pro->removeSourceFile( this ); - return TRUE; - } - - if ( !isModified() ) - return TRUE; - - if ( ed ) - ed->save(); - - switch ( TQMessageBox::warning( MainWindow::self, i18n( "Save Code" ), - i18n( "Save changes to '%1'?" ).arg( filename ), - i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { - case 0: // save - if ( !save() ) - return FALSE; - break; - case 1: // don't save - load(); - if ( ed ) - ed->editorInterface()->setText( txt ); - if ( fileNameTemp ) { - pro->removeSourceFile( this ); - return TRUE; - } - if ( MainWindow::self ) - MainWindow::self->workspace()->update(); - break; - case 2: // cancel - return FALSE; - default: - break; - } - setModified( FALSE ); - return TRUE; -} - -bool SourceFile::close() -{ - if ( !ed ) - return TRUE; - return ed->close(); -} - -Project *SourceFile::project() const -{ - return pro; -} - -void SourceFile::checkTimeStamp() -{ - if ( timeStamp.isUpToDate() ) - return; - timeStamp.update(); - if ( TQMessageBox::information( MainWindow::self, i18n( "TQt Designer" ), - i18n( "File '%1' has been changed outside TQt Designer.\n" - "Do you want to reload it?" ).arg( filename ), - i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { - load(); - if ( ed ) - ed->editorInterface()->setText( txt ); - } -} - -bool SourceFile::checkFileName( bool allowBreak ) -{ - SourceFile *sf = pro->findSourceFile( filename, this ); - if ( sf ) - TQMessageBox::warning( MainWindow::self, i18n( "Invalid Filename" ), - i18n( "The project already contains a source file with \n" - "filename '%1'. Please choose a new filename." ).arg( filename ) ); - while ( sf ) { - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - TQString filter; - if ( iface ) - filter = iface->fileFilterList().join("\n"); - TQString fn; - while ( fn.isEmpty() ) { - fn = KFileDialog::getSaveFileName( pro->makeAbsolute( filename ), filter ); - if ( allowBreak && fn.isEmpty() ) - return FALSE; - } - filename = pro->makeRelative( fn ); - sf = pro->findSourceFile( filename, this ); - } - return TRUE; -} diff --git a/tdevdesigner/designer/sourcefile.h b/tdevdesigner/designer/sourcefile.h deleted file mode 100644 index ef4d31db..00000000 --- a/tdevdesigner/designer/sourcefile.h +++ /dev/null @@ -1,87 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef SOURCEFILE_H -#define SOURCEFILE_H - -#include -#include "timestamp.h" - -struct DesignerSourceFile; -class SourceEditor; -class Project; - -class SourceFile : public TQObject -{ - Q_OBJECT - - -public: - SourceFile( const TQString &fn, bool temp, Project *p ); - ~SourceFile(); - - void setText( const TQString &s ); - void setModified( bool m ); - - bool save( bool ignoreModified = FALSE ); - bool saveAs( bool ignoreModified = FALSE ); - bool load(); - bool close(); - bool closeEvent(); - Project *project() const; - - TQString text() const; - TQString fileName() const { return filename; } - bool isModified() const; - - void checkTimeStamp(); - - DesignerSourceFile *iFace(); - - void setEditor( SourceEditor *e ); - SourceEditor *editor() const { return ed; } - - static TQString createUnnamedFileName( const TQString &extension ); - - bool isAccepted() const { return accepted; } - -private: - bool checkFileName( bool allowBreak ); - -private: - TQString filename; - TQString txt; - DesignerSourceFile *iface; - SourceEditor *ed; - bool fileNameTemp; - TimeStamp timeStamp; - Project *pro; - bool pkg; - bool accepted; - -}; - -#endif diff --git a/tdevdesigner/designer/startdialog.ui b/tdevdesigner/designer/startdialog.ui deleted file mode 100644 index 383fdfda..00000000 --- a/tdevdesigner/designer/startdialog.ui +++ /dev/null @@ -1,324 +0,0 @@ - -StartDialogBase -********************************************************************* -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - StartDialogBase - - - - 0 - 0 - 576 - 420 - - - - - 5 - 5 - 0 - 0 - - - - Qt Designer - New/Open - - - true - - - - unnamed - - - 11 - - - 6 - - - - tabWidget - - - - Widget8 - - - &New File/Project - - - - unnamed - - - 11 - - - 6 - - - - templateView - - - 120 - - - Adjust - - - false - - - - - - - tab - - - &Open File/Project - - - - unnamed - - - 11 - - - 6 - - - - - - Widget9 - - - &Recently Opened - - - - unnamed - - - 11 - - - 6 - - - - recentView - - - WheelFocus - - - 120 - - - Adjust - - - false - - - - - fileInfoLabel - - - - 2 - 5 - 0 - 0 - - - - - - - - - - - - checkShowInFuture - - - &Do not show this dialog in the future - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - buttonHelp - - - &Help - - - 4144 - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 0 - 20 - - - - - - buttonOk - - - &OK - - - 0 - - - true - - - true - - - - - buttonCancel - - - &Cancel - - - 0 - - - true - - - - - - - - - buttonOk - clicked() - StartDialogBase - accept() - - - buttonCancel - clicked() - StartDialogBase - reject() - - - templateView - doubleClicked(TQIconViewItem*) - StartDialogBase - accept() - - - templateView - returnPressed(TQIconViewItem*) - StartDialogBase - accept() - - - recentView - doubleClicked(TQIconViewItem*) - StartDialogBase - accept() - - - recentView - onItem(TQIconViewItem*) - StartDialogBase - recentItemChanged(TQIconViewItem*) - - - recentView - onViewport() - StartDialogBase - clearFileInfo() - - - recentView - returnPressed(TQIconViewItem*) - StartDialogBase - accept() - - - recentView - selectionChanged(TQIconViewItem*) - StartDialogBase - recentItemChanged(TQIconViewItem*) - - - - recentItemChanged( TQIconViewItem * ) - clearFileInfo() - accept() - reject() - - - diff --git a/tdevdesigner/designer/startdialogimpl.cpp b/tdevdesigner/designer/startdialogimpl.cpp deleted file mode 100644 index e7099068..00000000 --- a/tdevdesigner/designer/startdialogimpl.cpp +++ /dev/null @@ -1,182 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tdevdesigner_part.h" - -#include "mainwindow.h" -#include "startdialogimpl.h" -#include "designerapp.h" - -#include - -FileDialog::FileDialog( const TQString &dir, TQWidget *parent ) - : TQFileDialog( dir, TQString(), parent ) -{ -} - -void FileDialog::accept() -{ - emit fileSelected(); -} - - -StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath ) - : StartDialogBase( parent, 0 ) -{ - newForm = new NewForm( templateView, templatePath ); - recentFiles.clear(); - initFileOpen(); - showInFuture = TRUE; - - connect( buttonHelp, TQT_SIGNAL( clicked() ), - MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - connect( recentView, TQT_SIGNAL( doubleClicked(TQIconViewItem*) ), - this, TQT_SLOT( accept() ) ); - connect( recentView, TQT_SIGNAL( returnPressed(TQIconViewItem*) ), - this, TQT_SLOT( accept() ) ); - connect( fd, TQT_SIGNAL( fileSelected() ), this, TQT_SLOT( accept() ) ); -} - -void StartDialog::accept() -{ - hide(); - showInFuture = !checkShowInFuture->isChecked(); // means don't show it anymore - - int tabindex = tabWidget->currentPageIndex(); - TQString filename; - if( !tabindex ) { - if ( !templateView->currentItem() ) - return; - Project *pro = MainWindow::self->findProject( i18n( "" ) ); - if ( !pro ) - return; - MainWindow::self->setCurrentProject( pro ); - ( (NewItem*)templateView->currentItem() )->insert( pro ); - } else if ( tabindex == 1 ) { - filename = fd->selectedFile(); - } else if ( tabindex == 2 ) { - filename = recentFiles[recentView->currentItem()->index()]; - } - if ( tabindex ) { - if ( !filename.isEmpty() ) { - TQFileInfo fi( filename ); - if ( fi.extension() == "pro" ) - MainWindow::self->openProject( filename ); - else - MainWindow::self->fileOpen( "", "", filename ); - } - } - - done( Accepted ); -} - -void StartDialog::reject() -{ - done( Rejected ); -} - -void StartDialog::recentItemChanged( TQIconViewItem *item ) -{ - TQString msg( recentFiles[item->index()] ); - TQFileInfo f( recentFiles[item->index()] ); - uint s = f.size(); - TQString unit( "B" ); - if( s > 1024 ) { - s /= 1024; - unit = "KB"; - } - if ( s > 1024 ) { - s /= 1024; - unit = "MB"; - } - TQDateTime dt( f.lastModified() ); - TQString date( dt.toString( "MMMM dd hh:mm" )); - msg = TQString( "%1 (%2 %3) %4" ).arg(msg).arg(s).arg(unit).arg(date); - fileInfoLabel->setText( msg ); -} - -void StartDialog::clearFileInfo() -{ - fileInfoLabel->clear(); -} - -void StartDialog::setRecentlyFiles( TQStringList &files ) -{ - insertRecentItems( files, FALSE ); -} - -void StartDialog::setRecentlyProjects( TQStringList &projects ) -{ - insertRecentItems( projects, TRUE ); -} - -void StartDialog::insertRecentItems( TQStringList &files, bool isProject ) -{ - TQString iconName = "designer_newform.png"; - if ( isProject ) - iconName = "designer_project.png"; - TQIconViewItem *item; - TQStringList::iterator it = files.begin(); - for( ; it != files.end(); ++it ) { - TQFileInfo fi( *it ); - item = new TQIconViewItem( recentView, fi.fileName() ); - recentFiles[recentView->index( item )] = *it; - item->setPixmap( BarIcon( iconName, TDevDesignerPartFactory::instance() ) ); - item->setDragEnabled( FALSE ); - } -} - -void StartDialog::initFileOpen() -{ - TQString encode = TQDir::currentDirPath(); - TQUrl::encode( encode ); - fd = new FileDialog( encode, this ); - TQPoint point( 0, 0 ); - fd->reparent( tab, point ); - - TQObjectList *l = fd->queryList( TQPUSHBUTTON_OBJECT_NAME_STRING ); - TQObjectListIt it( *l ); - TQObject *obj; - while ( (obj = it.current()) != 0 ) { - ++it; - ((TQPushButton*)obj)->hide(); - } - delete l; - - fd->setSizeGripEnabled ( FALSE ); - tabLayout->addWidget( fd ); - - TQPluginManager manager( IID_ImportFilter, TQApplication::libraryPaths(), - MainWindow::self->pluginDirectory() ); - TQStringList filterlist; - filterlist << i18n( "Designer Files (*.ui *.pro)" ); - filterlist << i18n( "TQt User-Interface Files (*.ui)" ); - filterlist << i18n( "QMAKE Project Files (*.pro)" ); - - TQStringList list = manager.featureList(); - for ( TQStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 ) - filterlist << *it2; - - filterlist << i18n( "All Files (*)" ); - TQString filters = filterlist.join( ";;" ); - fd->setFilters( filters ); - - fd->show(); -} diff --git a/tdevdesigner/designer/startdialogimpl.h b/tdevdesigner/designer/startdialogimpl.h deleted file mode 100644 index 8fb574d0..00000000 --- a/tdevdesigner/designer/startdialogimpl.h +++ /dev/null @@ -1,82 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef STARTDIALOGIMPL_H -#define STARTDIALOGIMPL_H - -#include -#include -#include -#include -#include -#include - -#include "newformimpl.h" -#include "startdialog.h" - -class FileDialog : public TQFileDialog -{ - Q_OBJECT - - -public: - FileDialog( const TQString &dir, TQWidget *parent ); - -protected slots: - void accept(); - -signals: - void fileSelected(); -}; - - -class StartDialog : public StartDialogBase -{ - Q_OBJECT - - -public: - StartDialog( TQWidget *parent, const TQString &templatePath ); - void setRecentlyFiles( TQStringList& ); - void setRecentlyProjects( TQStringList& ); - bool showDialogInFuture() const { return showInFuture; } - -protected slots: - void recentItemChanged( TQIconViewItem *item ); - void clearFileInfo(); - void accept(); - void reject(); - -private: - void initFileOpen(); - void insertRecentItems( TQStringList &files, bool isProject ); - NewForm *newForm; - FileDialog *fd; - TQMap recentFiles; - bool showInFuture; -}; - -#endif diff --git a/tdevdesigner/designer/styledbutton.cpp b/tdevdesigner/designer/styledbutton.cpp deleted file mode 100644 index 82c9ddb8..00000000 --- a/tdevdesigner/designer/styledbutton.cpp +++ /dev/null @@ -1,295 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include // HP-UX compiler needs this here -#include "styledbutton.h" -#include "formwindow.h" -#include "pixmapchooser.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -StyledButton::StyledButton(TQWidget* parent, const char* name) - : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( FALSE ) -{ - setMinimumSize( minimumSizeHint() ); - setAcceptDrops( TRUE ); - - connect( this, TQT_SIGNAL(clicked()), TQT_SLOT(onEditor())); - - setEditor( ColorEditor ); -} - -StyledButton::StyledButton( const TQBrush& b, TQWidget* parent, const char* name, WFlags f ) - : TQButton( parent, name, f ), spix( 0 ), s( 0 ), formWindow( 0 ) -{ - col = b.color(); - pix = b.pixmap(); - setMinimumSize( minimumSizeHint() ); -} - -StyledButton::~StyledButton() -{ -} - -void StyledButton::setEditor( EditorType e ) -{ - if ( edit == e ) - return; - - edit = e; - update(); -} - -StyledButton::EditorType StyledButton::editor() const -{ - return edit; -} - -void StyledButton::setColor( const TQColor& c ) -{ - col = c; - update(); -} - -void StyledButton::setPixmap( const TQPixmap & pm ) -{ - if ( !pm.isNull() ) { - delete pix; - pix = new TQPixmap( pm ); - } else { - delete pix; - pix = 0; - } - scalePixmap(); -} - -TQColor StyledButton::color() const -{ - return col; -} - -TQPixmap* StyledButton::pixmap() const -{ - return pix; -} - -bool StyledButton::scale() const -{ - return s; -} - -void StyledButton::setScale( bool on ) -{ - if ( s == on ) - return; - - s = on; - scalePixmap(); -} - -TQSize StyledButton::sizeHint() const -{ - return TQSize( 50, 25 ); -} - -TQSize StyledButton::minimumSizeHint() const -{ - return TQSize( 50, 25 ); -} - -void StyledButton::scalePixmap() -{ - delete spix; - - if ( pix ) { - spix = new TQPixmap( 6*width()/8, 6*height()/8 ); - TQImage img = pix->convertToImage(); - - spix->convertFromImage( s? img.smoothScale( 6*width()/8, 6*height()/8 ) : img ); - } else { - spix = 0; - } - - update(); -} - -void StyledButton::resizeEvent( TQResizeEvent* e ) -{ - scalePixmap(); - TQButton::resizeEvent( e ); -} - -void StyledButton::drawButton( TQPainter *paint ) -{ - style().tqdrawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(), - isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Raised); - drawButtonLabel(paint); - - if (hasFocus()) - style().tqdrawPrimitive(TQStyle::PE_FocusRect, paint, - style().subRect(TQStyle::SR_PushButtonFocusRect, this), - colorGroup(), TQStyle::Style_Default); -} - -void StyledButton::drawButtonLabel( TQPainter *paint ) -{ - TQColor pen = isEnabled() ? - hasFocus() ? palette().active().buttonText() : palette().inactive().buttonText() - : palette().disabled().buttonText(); - paint->setPen( pen ); - - if(!isEnabled()) { - paint->setBrush( TQBrush( colorGroup().button() ) ); - } - else if ( edit == PixmapEditor && spix ) { - paint->setBrush( TQBrush( col, *spix ) ); - paint->setBrushOrigin( width()/8, height()/8 ); - } else - paint->setBrush( TQBrush( col ) ); - - paint->drawRect( width()/8, height()/8, 6*width()/8, 6*height()/8 ); -} - -void StyledButton::onEditor() -{ - switch (edit) { - case ColorEditor: { - TQColor c = TQColorDialog::getColor( palette().active().background(), this ); - if ( c.isValid() ) { - setColor( c ); - emit changed(); - } - } break; - case PixmapEditor: { - TQPixmap p; - if ( pixmap() ) - p = qChoosePixmap( this, formWindow, *pixmap() ); - else - p = qChoosePixmap( this, formWindow, TQPixmap() ); - if ( !p.isNull() ) { - setPixmap( p ); - emit changed(); - } - } break; - default: - break; - } -} - -void StyledButton::mousePressEvent(TQMouseEvent* e) -{ - TQButton::mousePressEvent(e); - mousePressed = TRUE; - pressPos = e->pos(); -} - -void StyledButton::mouseMoveEvent(TQMouseEvent* e) -{ - TQButton::mouseMoveEvent( e ); -#ifndef TQT_NO_DRAGANDDROP - if ( !mousePressed ) - return; - if ( ( pressPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() ) { - if ( edit == ColorEditor ) { - TQColorDrag *drg = new TQColorDrag( col, this ); - TQPixmap pix( 25, 25 ); - pix.fill( col ); - TQPainter p( &pix ); - p.drawRect( 0, 0, pix.width(), pix.height() ); - p.end(); - drg->setPixmap( pix ); - mousePressed = FALSE; - drg->dragCopy(); - } - else if ( edit == PixmapEditor && pix && !pix->isNull() ) { - TQImage img = pix->convertToImage(); - TQImageDrag *drg = new TQImageDrag( img, this ); - if(spix) - drg->setPixmap( *spix ); - mousePressed = FALSE; - drg->dragCopy(); - } - } -#endif -} - -#ifndef TQT_NO_DRAGANDDROP -void StyledButton::dragEnterEvent( TQDragEnterEvent *e ) -{ - setFocus(); - if ( edit == ColorEditor && TQColorDrag::canDecode( e ) ) - e->accept(); - else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) ) - e->accept(); - else - e->ignore(); -} - -void StyledButton::dragLeaveEvent( TQDragLeaveEvent * ) -{ - if ( hasFocus() ) - parentWidget()->setFocus(); -} - -void StyledButton::dragMoveEvent( TQDragMoveEvent *e ) -{ - if ( edit == ColorEditor && TQColorDrag::canDecode( e ) ) - e->accept(); - else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) ) - e->accept(); - else - e->ignore(); -} - -void StyledButton::dropEvent( TQDropEvent *e ) -{ - if ( edit == ColorEditor && TQColorDrag::canDecode( e ) ) { - TQColor color; - TQColorDrag::decode( e, color ); - setColor(color); - emit changed(); - e->accept(); - } - else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) ) { - TQImage img; - TQImageDrag::decode( e, img ); - TQPixmap pm; - pm.convertFromImage(img); - setPixmap(pm); - emit changed(); - e->accept(); - } else { - e->ignore(); - } -} -#endif // TQT_NO_DRAGANDDROP diff --git a/tdevdesigner/designer/styledbutton.h b/tdevdesigner/designer/styledbutton.h deleted file mode 100644 index 8065fe84..00000000 --- a/tdevdesigner/designer/styledbutton.h +++ /dev/null @@ -1,104 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef STYLEDBUTTON_H -#define STYLEDBUTTON_H - -#include -#include - -class TQColor; -class TQBrush; -class FormWindow; - -class StyledButton : public TQButton -{ - Q_OBJECT - - - TQ_PROPERTY( TQColor color READ color WRITE setColor ) - TQ_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap ) - TQ_PROPERTY( EditorType editor READ editor WRITE setEditor ) - TQ_PROPERTY( bool scale READ scale WRITE setScale ) - - TQ_ENUMS( EditorType ) - -public: - enum EditorType { ColorEditor, PixmapEditor }; - - StyledButton( TQWidget* parent = 0, const char* name = 0 ); - StyledButton( const TQBrush& b, TQWidget* parent = 0, const char* name = 0, WFlags f = 0 ); - ~StyledButton(); - - void setEditor( EditorType ); - EditorType editor() const; - - void setColor( const TQColor& ); - void setPixmap( const TQPixmap& ); - - TQPixmap* pixmap() const; - TQColor color() const; - - void setScale( bool ); - bool scale() const; - - TQSize sizeHint() const; - TQSize minimumSizeHint() const; - - void setFormWindow( FormWindow *fw ) { formWindow = fw; } - -public slots: - virtual void onEditor(); - -signals: - void changed(); - -protected: - void mousePressEvent(TQMouseEvent*); - void mouseMoveEvent(TQMouseEvent*); -#ifndef TQT_NO_DRAGANDDROP - void dragEnterEvent ( TQDragEnterEvent * ); - void dragMoveEvent ( TQDragMoveEvent * ); - void dragLeaveEvent ( TQDragLeaveEvent * ); - void dropEvent ( TQDropEvent * ); -#endif // TQT_NO_DRAGANDDROP - void drawButton( TQPainter* ); - void drawButtonLabel( TQPainter* ); - void resizeEvent( TQResizeEvent* ); - void scalePixmap(); - -private: - TQPixmap* pix; - TQPixmap* spix; // the pixmap scaled down to fit into the button - TQColor col; - EditorType edit; - bool s; - FormWindow *formWindow; - TQPoint pressPos; - bool mousePressed; -}; - -#endif //STYLEDBUTTON_H diff --git a/tdevdesigner/designer/syntaxhighlighter_html.cpp b/tdevdesigner/designer/syntaxhighlighter_html.cpp deleted file mode 100644 index 5bb681f9..00000000 --- a/tdevdesigner/designer/syntaxhighlighter_html.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/********************************************************************** -** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "syntaxhighlighter_html.h" -#include "tqstring.h" -#include "tqmap.h" -#include "tqapplication.h" - - -SyntaxHighlighter_HTML::SyntaxHighlighter_HTML() - : TQTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 ) -{ - TQFont f( tqApp->font() ); - - addFormat(Standard, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Text))); - addFormat(Keyword, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Dark))); - addFormat(Attribute, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Link))); - addFormat(AttribValue, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::LinkVisited))); -} - -SyntaxHighlighter_HTML::~SyntaxHighlighter_HTML() -{ -} - -void SyntaxHighlighter_HTML::process( TQTextDocument *doc, TQTextParagraph *string, int, bool invalidate ) -{ - - TQTextFormat *formatStandard = format( Standard ); - TQTextFormat *formatKeyword = format( Keyword ); - TQTextFormat *formatAttribute = format( Attribute ); - TQTextFormat *formatAttribValue = format( AttribValue ); - - const int StateStandard = 0; - const int StateTag = 1; - const int StateAttribute = 2; - const int StateAttribVal = 3; - - TQString buffer = ""; - - int state = StateStandard; - - - if ( string->prev() ) { - if ( string->prev()->endState() == -1 ) - process( doc, string->prev(), 0, FALSE ); - state = string->prev()->endState(); - } - - - int i = 0; - for ( ;; ) { - TQChar c = string->at( i )->c; - - if ( c == '<' ) { - if ( state != StateStandard ) - string->setFormat( i - buffer.length(), buffer.length(), formatStandard, FALSE ); - buffer = c; - state = StateTag; - string->setFormat( i, 1, formatKeyword, FALSE ); - } - else if ( c == '>' && ( state != StateStandard ) ) { - string->setFormat( i, 1, formatKeyword, FALSE ); - buffer = ""; - state = StateStandard; - } - else if ( c == ' ' && state == StateTag ) { - buffer += c; - string->setFormat( i, 1, formatStandard, FALSE ); - state = StateAttribute; - } - else if ( c == '=' && state == StateAttribute ) { - buffer += c; - string->setFormat( i, 1, formatStandard, FALSE ); - state = StateAttribute; - } - else if ( c == '\"' && state == StateAttribute ) { - buffer += c; - string->setFormat( i, 1, formatStandard, FALSE ); - state = StateAttribVal; - } - else if ( c == '\"' && state == StateAttribVal ) { - buffer += c; - string->setFormat( i, 1, formatStandard, FALSE ); - state = StateAttribute; - } - else if ( state == StateAttribute ) { - buffer += c; - string->setFormat( i, 1, formatAttribute, FALSE ); - } - else if ( state == StateAttribVal ) { - buffer += c; - string->setFormat( i, 1, formatAttribValue, FALSE ); - } - else if ( state == StateTag ) { - string->setFormat( i, 1, formatKeyword, FALSE ); - buffer += c; - } - else if ( state == StateStandard ) { - string->setFormat( i, 1, formatStandard, FALSE ); - } - - i++; - if ( i >= string->length() ) - break; - } - - string->setEndState( state ); - string->setFirstPreProcess( FALSE ); - - if ( invalidate && string->next() && - !string->next()->firstPreProcess() && string->next()->endState() != -1 ) { - TQTextParagraph *p = string->next(); - while ( p ) { - if ( p->endState() == -1 ) - return; - p->setEndState( -1 ); - p = p->next(); - } - } -} - -TQTextFormat *SyntaxHighlighter_HTML::format( int id ) -{ - if ( lastFormatId == id && lastFormat ) - return lastFormat; - - TQTextFormat *f = formats[ id ]; - lastFormat = f ? f : formats[ 0 ]; - lastFormatId = id; - return lastFormat; -} - -void SyntaxHighlighter_HTML::addFormat( int id, TQTextFormat *f ) -{ - formats.insert( id, f ); -} diff --git a/tdevdesigner/designer/syntaxhighlighter_html.h b/tdevdesigner/designer/syntaxhighlighter_html.h deleted file mode 100644 index efd1a616..00000000 --- a/tdevdesigner/designer/syntaxhighlighter_html.h +++ /dev/null @@ -1,57 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef SYNTAXHIGHLIGHTER_HTML_H -#define SYNTAXHIGHLIGHTER_HTML_H - -#include - -class SyntaxHighlighter_HTML : public TQTextPreProcessor -{ -public: - - enum HTML { - Standard = 1, - Keyword, - Attribute, - AttribValue - }; - - SyntaxHighlighter_HTML(); - virtual ~SyntaxHighlighter_HTML(); - void process( TQTextDocument *doc, TQTextParagraph *string, int start, bool invalidate = TRUE ); - TQTextFormat *format( int id ); - -private: - void addFormat( int id, TQTextFormat *f ); - - TQTextFormat *lastFormat; - int lastFormatId; - TQIntDict formats; - -}; - -#endif diff --git a/tdevdesigner/designer/tableeditor.ui b/tdevdesigner/designer/tableeditor.ui deleted file mode 100644 index deacf5d4..00000000 --- a/tdevdesigner/designer/tableeditor.ui +++ /dev/null @@ -1,828 +0,0 @@ - -TableEditorBase -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - TableEditorBase - - - - 0 - 0 - 484 - 406 - - - - Edit Table - - - true - - - - unnamed - - - 11 - - - 6 - - - - table - - - 1 - - - 1 - - - true - - - - - Layout11 - - - - unnamed - - - 0 - - - 6 - - - - buttonHelp - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - Close the dialog and apply all the changes. - - - - - buttonApply - - - &Apply - - - true - - - Apply all changes. - - - - - buttonCancel - - - &Cancel - - - true - - - Close the dialog and discard any changes. - - - - - - - TabWidget - - - - columns_tab - - - Co&lumns - - - - unnamed - - - 11 - - - 6 - - - - Spacer3 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - listColumns - - - - - Spacer2 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - buttonColumnUp - - - - - - "designer_s_up.png" - - - Move up - - - <b>Move the selected item up.</b><p>The top-most column will be the first column of the list.</p> - - - - - buttonColumnDown - - - - - - "designer_s_down.png" - - - Move down - - - <b>Move the selected item down.</b><p>The top-most column will be the first column of the list.</p> - - - - - buttonDeleteColumn - - - &Delete Column - - - - - buttonNewColumn - - - &New Column - - - - - Layout6 - - - - unnamed - - - 0 - - - 6 - - - - labelTable - - - Table: - - - - - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - labelColumnPixmap - - - Label4 - - - - - buttonDeleteColPixmap - - - - 30 - 22 - - - - - - - "designer_s_editcut.png" - - - Delete Pixmap - - - <b>Delete the selected item's pixmap.</b><p>The pixmap in the current column of the selected item will be deleted.</p> - - - - - buttonChooseColPixmap - - - - 30 - 22 - - - - ... - - - Select a Pixmap - - - <b>Select a pixmap file for the item.</b><p>The pixmap will be changed in the current column of the selected item.</p> - - - - - - - TextLabel2 - - - &Label: - - - editColumnText - - - - - Label2 - - - Pixmap: - - - itemChoosePixmap - - - - - labelFields - - - &Field: - - - comboFields - - - - - editColumnText - - - - - comboFields - - - true - - - - - labelTableValue - - - <no table> - - - - - - - - - rows_tab - - - &Rows - - - - unnamed - - - 11 - - - 6 - - - - Spacer3_2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonRowUp - - - - - - "designer_s_up.png" - - - Move up - - - <b>Move the selected item up.</b><p>The top-most column will be the first column of the list.</p> - - - - - listRows - - - - - buttonRowDown - - - - - - "designer_s_down.png" - - - Move down - - - <b>Move the selected item down.</b><p>The top-most column will be the first column of the list.</p> - - - - - Spacer2_2 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - buttonNewRow - - - &New Row - - - - - buttonDeleteRow - - - &Delete Row - - - - - Layout7_2 - - - - unnamed - - - 0 - - - 6 - - - - TextLabel2_3 - - - &Label: - - - editRowText - - - - - Label2_2 - - - Pixmap: - - - itemChoosePixmap - - - - - Layout2_2 - - - - unnamed - - - 0 - - - 6 - - - - labelRowPixmap - - - Label4 - - - - - buttonDeleteRowPixmap - - - - 30 - 22 - - - - - - - "designer_s_editcut.png" - - - Delete Pixmap - - - <b>Delete the selected item's pixmap.</b><p>The pixmap in the current column of the selected item will be deleted.</p> - - - - - buttonChooseRowPixmap - - - - 30 - 22 - - - - ... - - - Select a Pixmap - - - <b>Select a pixmap file for the item.</b><p>The pixmap will be changed in the current column of the selected item.</p> - - - - - - - editRowText - - - - - - - - - - - - buttonApply - clicked() - TableEditorBase - applyClicked() - - - buttonOk - clicked() - TableEditorBase - okClicked() - - - listColumns - currentChanged(TQListBoxItem*) - TableEditorBase - currentColumnChanged(TQListBoxItem*) - - - listColumns - selectionChanged(TQListBoxItem*) - TableEditorBase - currentColumnChanged(TQListBoxItem*) - - - editColumnText - textChanged(const TQString&) - TableEditorBase - columnTextChanged(const TQString&) - - - buttonNewColumn - clicked() - TableEditorBase - newColumnClicked() - - - buttonDeleteColumn - clicked() - TableEditorBase - deleteColumnClicked() - - - buttonColumnUp - clicked() - TableEditorBase - columnUpClicked() - - - buttonColumnDown - clicked() - TableEditorBase - columnDownClicked() - - - comboFields - activated(const TQString&) - TableEditorBase - currentFieldChanged(const TQString&) - - - listRows - selectionChanged(TQListBoxItem*) - TableEditorBase - currentRowChanged(TQListBoxItem*) - - - listRows - currentChanged(TQListBoxItem*) - TableEditorBase - currentRowChanged(TQListBoxItem*) - - - buttonNewRow - clicked() - TableEditorBase - newRowClicked() - - - buttonDeleteRow - clicked() - TableEditorBase - deleteRowClicked() - - - buttonRowUp - clicked() - TableEditorBase - rowUpClicked() - - - buttonRowDown - clicked() - TableEditorBase - rowDownClicked() - - - buttonChooseRowPixmap - clicked() - TableEditorBase - chooseRowPixmapClicked() - - - buttonDeleteColPixmap - clicked() - TableEditorBase - deleteColPixmapClicked() - - - editRowText - textChanged(const TQString&) - TableEditorBase - rowTextChanged(const TQString&) - - - buttonCancel - clicked() - TableEditorBase - reject() - - - buttonChooseColPixmap - clicked() - TableEditorBase - chooseColPixmapClicked() - - - buttonDeleteRowPixmap - clicked() - TableEditorBase - deleteRowPixmapClicked() - - - - buttonOk - buttonCancel - table - TabWidget - listColumns - buttonNewColumn - buttonDeleteColumn - comboFields - editColumnText - buttonDeleteColPixmap - buttonChooseColPixmap - buttonColumnUp - buttonColumnDown - buttonApply - listRows - buttonNewRow - buttonDeleteRow - editRowText - buttonDeleteRowPixmap - buttonChooseRowPixmap - buttonRowUp - buttonRowDown - buttonHelp - - - tqtable.h - - - init() - destroy() - applyClicked() - chooseRowPixmapClicked() - columnTextChanged( const TQString & ) - columnUpClicked() - currentColumnChanged( TQListBoxItem * ) - currentFieldChanged( const TQString & ) - currentRowChanged( TQListBoxItem * ) - deleteColPixmapClicked() - deleteColumnClicked() - deleteRowClicked() - deleteRowPixmapClicked() - newColumnClicked() - newRowClicked() - chooseColPixmapClicked() - okClicked() - rowDownClicked() - rowTextChanged( const TQString & ) - rowUpClicked() - columnDownClicked() - - - myiconloader.h - -BarIcon2 - - - diff --git a/tdevdesigner/designer/tableeditorimpl.cpp b/tdevdesigner/designer/tableeditorimpl.cpp deleted file mode 100644 index 060611f6..00000000 --- a/tdevdesigner/designer/tableeditorimpl.cpp +++ /dev/null @@ -1,494 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "tableeditorimpl.h" -#ifndef TQT_NO_TABLE -#include -#endif -#include "formwindow.h" -#include -#include -#include -#include -#include -#include -#include "pixmapchooser.h" -#include "command.h" -#include -#include -#include -#include "project.h" -#include "metadatabase.h" -#include "mainwindow.h" - -#include - -TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl ) - : TableEditorBase( parent, name, modal, fl ), -#ifndef TQT_NO_TABLE - editTable( (TQTable*)editWidget ), -#endif - formWindow( fw ) -{ - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); -#ifndef TQT_NO_TABLE - labelColumnPixmap->setText( "" ); - labelRowPixmap->setText( "" ); - -#ifndef TQT_NO_SQL - if ( !::tqqt_cast(editTable) ) -#endif - { - labelFields->hide(); - comboFields->hide(); - labelTable->hide(); - labelTableValue->hide(); - } -#ifndef TQT_NO_SQL - if ( ::tqqt_cast(editTable) ) { - // ## why does this behave weird? - // TabWidget->removePage( rows_tab ); - // rows_tab->hide(); - // ## do this in the meantime... - TabWidget->setTabEnabled( rows_tab, FALSE ); - } - - if ( formWindow->project() && ::tqqt_cast(editTable) ) { - TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(editTable), "database" ).toStringList(); - if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) { - TQStringList fields; - fields << ""; - fields += formWindow->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ); - comboFields->insertStringList( fields ); - } - if ( !lst[ 1 ].isEmpty() ) - labelTableValue->setText( lst[ 1 ] ); - } -#endif - - readFromTable(); -#endif -} - -TableEditor::~TableEditor() -{ -} - -void TableEditor::columnDownClicked() -{ - if ( listColumns->currentItem() == -1 || - listColumns->currentItem() == (int)listColumns->count() - 1 || - listColumns->count() < 2 ) - return; - saveFieldMap(); - int index = listColumns->currentItem() + 1; - TQListBoxItem *i = listColumns->item( listColumns->currentItem() ); - listColumns->takeItem( i ); - listColumns->insertItem( i, index ); - listColumns->setCurrentItem( i ); - readColumns(); - restoreFieldMap(); - currentColumnChanged( i ); -} - -void TableEditor::columnTextChanged( const TQString &s ) -{ - if ( listColumns->currentItem() == -1 ) - return; - listColumns->blockSignals( TRUE ); - listColumns->changeItem( s, listColumns->currentItem() ); - listColumns->blockSignals( FALSE ); -#ifndef TQT_NO_TABLE - if ( table->horizontalHeader()->iconSet( listColumns->currentItem() ) ) - table->horizontalHeader()->setLabel( listColumns->currentItem(), - *table->horizontalHeader()->iconSet( listColumns->currentItem() ), s ); - else - table->horizontalHeader()->setLabel( listColumns->currentItem(), s ); -#endif -} - -void TableEditor::columnUpClicked() -{ - if ( listColumns->currentItem() <= 0 || - listColumns->count() < 2 ) - return; - saveFieldMap(); - int index = listColumns->currentItem() - 1; - TQListBoxItem *i = listColumns->item( listColumns->currentItem() ); - listColumns->takeItem( i ); - listColumns->insertItem( i, index ); - listColumns->setCurrentItem( i ); - readColumns(); - restoreFieldMap(); - currentColumnChanged( i ); -} - -void TableEditor::currentColumnChanged( TQListBoxItem *i ) -{ - if ( !i ) - return; - editColumnText->blockSignals( TRUE ); - editColumnText->setText( i->text() ); - if ( i->pixmap() ) - labelColumnPixmap->setPixmap( *i->pixmap() ); - else - labelColumnPixmap->setText( "" ); - editColumnText->blockSignals( FALSE ); - -#ifndef TQT_NO_SQL - if ( ::tqqt_cast(editTable) ) { - TQString s = *fieldMap.find( listColumns->index( i ) ); - if ( s.isEmpty() ) - comboFields->setCurrentItem( 0 ); - else if ( comboFields->listBox()->findItem( s ) ) - comboFields->setCurrentItem( comboFields->listBox()->index( comboFields->listBox()->findItem( s ) ) ); - else - comboFields->lineEdit()->setText( s ); - } -#endif -} - -void TableEditor::currentFieldChanged( const TQString &s ) -{ - if ( listColumns->currentItem() == -1 ) - return; - fieldMap.remove( listColumns->currentItem() ); - fieldMap.insert( listColumns->currentItem(), s ); - editColumnText->blockSignals( TRUE ); //## necessary - TQString newColText = s.mid(0,1).upper() + s.mid(1); - editColumnText->setText( newColText ); - columnTextChanged( newColText ); - editColumnText->blockSignals( FALSE ); -} - -void TableEditor::currentRowChanged( TQListBoxItem *i ) -{ - if ( !i ) - return; - editRowText->blockSignals( TRUE ); - editRowText->setText( i->text() ); - if ( i->pixmap() ) - labelRowPixmap->setPixmap( *i->pixmap() ); - else - labelRowPixmap->setText( "" ); - editRowText->blockSignals( FALSE ); -} - -void TableEditor::deleteColumnClicked() -{ - if ( listColumns->currentItem() == -1 ) - return; -#ifndef TQT_NO_TABLE - table->setNumCols( table->numCols() - 1 ); - delete listColumns->item( listColumns->currentItem() ); - readColumns(); - if ( listColumns->firstItem() ) { - listColumns->setCurrentItem( listColumns->firstItem() ); - listColumns->setSelected( listColumns->firstItem(), TRUE ); - } -#endif -} - -void TableEditor::deleteRowClicked() -{ - if ( listRows->currentItem() == -1 ) - return; -#ifndef TQT_NO_TABLE - table->setNumRows( table->numRows() - 1 ); - delete listRows->item( listRows->currentItem() ); - readRows(); - if ( listRows->firstItem() ) { - listRows->setCurrentItem( listRows->firstItem() ); - listRows->setSelected( listRows->firstItem(), TRUE ); - } -#endif -} - -void TableEditor::newColumnClicked() -{ -#ifndef TQT_NO_TABLE - table->setNumCols( table->numCols() + 1 ); - TQMap m; - for ( int i = 0; i < table->numCols() - 1; ++i ) - m.insert( table->horizontalHeader()->label( i ), TRUE ); - int n = table->numCols() - 1; - TQString t = TQString::number( n ); - while ( m.find( t ) != m.end() ) - t = TQString::number( ++n ); - table->horizontalHeader()->setLabel( table->numCols() - 1, t ); - listColumns->insertItem( t ); - TQListBoxItem *item = listColumns->item( listColumns->count() - 1 ); - listColumns->setCurrentItem( item ); - listColumns->setSelected( item, TRUE ); -#ifndef TQT_NO_SQL - if ( ::tqqt_cast(editTable) ) { - comboFields->setFocus(); - } else -#endif - { - editColumnText->setFocus(); - editColumnText->selectAll(); - } -#endif -} - -void TableEditor::newRowClicked() -{ -#ifndef TQT_NO_TABLE - table->setNumRows( table->numRows() + 1 ); - TQMap m; - for ( int i = 0; i < table->numRows() - 1; ++i ) - m.insert( table->verticalHeader()->label( i ), TRUE ); - int n = table->numRows() - 1; - TQString t = TQString::number( n ); - while ( m.find( t ) != m.end() ) - t = TQString::number( ++n ); - table->verticalHeader()->setLabel( table->numRows() - 1, t ); - listRows->insertItem( t ); - TQListBoxItem *item = listRows->item( listRows->count() - 1 ); - listRows->setCurrentItem( item ); - listRows->setSelected( item, TRUE ); -#endif -} - -void TableEditor::okClicked() -{ - applyClicked(); - accept(); -} - -void TableEditor::rowDownClicked() -{ - if ( listRows->currentItem() == -1 || - listRows->currentItem() == (int)listRows->count() - 1 || - listRows->count() < 2 ) - return; - int index = listRows->currentItem() + 1; - TQListBoxItem *i = listRows->item( listRows->currentItem() ); - listRows->takeItem( i ); - listRows->insertItem( i, index ); - listRows->setCurrentItem( i ); - readRows(); -} - -void TableEditor::rowTextChanged( const TQString &s ) -{ - if ( listRows->currentItem() == -1 ) - return; -#ifndef TQT_NO_TABLE - listRows->changeItem( s, listRows->currentItem() ); - if ( table->verticalHeader()->iconSet( listRows->currentItem() ) ) - table->verticalHeader()->setLabel( listRows->currentItem(), - *table->verticalHeader()->iconSet( listRows->currentItem() ), s ); - else - table->verticalHeader()->setLabel( listRows->currentItem(), s ); -#endif -} - -void TableEditor::rowUpClicked() -{ - if ( listRows->currentItem() <= 0 || - listRows->count() < 2 ) - return; - int index = listRows->currentItem() - 1; - TQListBoxItem *i = listRows->item( listRows->currentItem() ); - listRows->takeItem( i ); - listRows->insertItem( i, index ); - listRows->setCurrentItem( i ); - readRows(); -} - -void TableEditor::applyClicked() -{ - TQValueList rows; - TQValueList cols; - - int i = 0; -#ifndef TQT_NO_TABLE - for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { - PopulateTableCommand::Column col; - col.text = table->horizontalHeader()->label( i ); - if ( table->horizontalHeader()->iconSet( i ) ) - col.pix = table->horizontalHeader()->iconSet( i )->pixmap(); - col.field = *fieldMap.find( i ); - cols.append( col ); - } - for ( i = 0; i < table->verticalHeader()->count(); ++i ) { - PopulateTableCommand::Row row; - row.text = table->verticalHeader()->label( i ); - if ( table->verticalHeader()->iconSet( i ) ) - row.pix = table->verticalHeader()->iconSet( i )->pixmap(); - rows.append( row ); - } - PopulateTableCommand *cmd = new PopulateTableCommand( i18n( "Edit the Rows and Columns of '%1' " ).arg( editTable->name() ), - formWindow, editTable, rows, cols ); - cmd->execute(); - formWindow->commandHistory()->addCommand( cmd ); -#endif -} - -void TableEditor::chooseRowPixmapClicked() -{ - if ( listRows->currentItem() == -1 ) - return; - TQPixmap pix; - if ( listRows->item( listRows->currentItem() )->pixmap() ) - pix = qChoosePixmap( this, formWindow, *listRows->item( listRows->currentItem() )->pixmap() ); - else - pix = qChoosePixmap( this, formWindow, TQPixmap() ); - - if ( pix.isNull() ) - return; - -#ifndef TQT_NO_TABLE - table->verticalHeader()->setLabel( listRows->currentItem(), pix, table->verticalHeader()->label( listRows->currentItem() ) ); - listRows->changeItem( pix, listRows->currentText(), listRows->currentItem() ); -#endif -} - -void TableEditor::deleteRowPixmapClicked() -{ - if ( listRows->currentItem() == -1 ) - return; -#ifndef TQT_NO_TABLE - table->verticalHeader()->setLabel( listRows->currentItem(), TQPixmap(), table->verticalHeader()->label( listRows->currentItem() ) ); - listRows->changeItem( listRows->currentText(), listRows->currentItem() ); -#endif -} - -void TableEditor::chooseColPixmapClicked() -{ - if ( listColumns->currentItem() == -1 ) - return; - TQPixmap pix; - if ( listColumns->item( listColumns->currentItem() )->pixmap() ) - pix = qChoosePixmap( this, formWindow, *listColumns->item( listColumns->currentItem() )->pixmap() ); - else - pix = qChoosePixmap( this, formWindow, TQPixmap() ); - - if ( pix.isNull() ) - return; -#ifndef TQT_NO_TABLE - table->horizontalHeader()->setLabel( listColumns->currentItem(), pix, table->horizontalHeader()->label( listColumns->currentItem() ) ); - listColumns->changeItem( pix, listColumns->currentText(), listColumns->currentItem() ); -#endif -} - -void TableEditor::deleteColPixmapClicked() -{ - if ( listColumns->currentItem() == -1 ) - return; -#ifndef TQT_NO_TABLE - table->horizontalHeader()->setLabel( listColumns->currentItem(), TQPixmap(), table->horizontalHeader()->label( listColumns->currentItem() ) ); - listColumns->changeItem( listColumns->currentText(), listColumns->currentItem() ); -#endif -} - -void TableEditor::readFromTable() -{ -#ifndef TQT_NO_TABLE - TQHeader *cols = editTable->horizontalHeader(); - table->setNumCols( cols->count() ); - TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(editTable) ); - for ( int i = 0; i < cols->count(); ++i ) { - if ( editTable->horizontalHeader()->iconSet( i ) ) { - table->horizontalHeader()->setLabel( i, *editTable->horizontalHeader()->iconSet( i ), - editTable->horizontalHeader()->label( i ) ); - listColumns->insertItem( editTable->horizontalHeader()->iconSet( i )->pixmap(), - editTable->horizontalHeader()->label( i ) ); - } else { - table->horizontalHeader()->setLabel( i, editTable->horizontalHeader()->label( i ) ); - listColumns->insertItem( editTable->horizontalHeader()->label( i ) ); - } - TQString cf = *columnFields.find( editTable->horizontalHeader()->label( i ) ); - fieldMap.insert( i, cf ); - } - - if ( listColumns->firstItem() ) { - listColumns->setCurrentItem( listColumns->firstItem() ); - listColumns->setSelected( listColumns->firstItem(), TRUE ); - } - - TQHeader *rows = editTable->verticalHeader(); - table->setNumRows( rows->count() ); - for ( int j = 0; j < rows->count(); ++j ) { - if ( editTable->verticalHeader()->iconSet( j ) ) { - table->verticalHeader()->setLabel( j, *editTable->verticalHeader()->iconSet( j ), - editTable->verticalHeader()->label( j ) ); - listRows->insertItem( editTable->verticalHeader()->iconSet( j )->pixmap(), - editTable->verticalHeader()->label( j ) ); - } else { - table->verticalHeader()->setLabel( j, editTable->verticalHeader()->label( j ) ); - listRows->insertItem( editTable->verticalHeader()->label( j ) ); - } - } - - if ( listRows->firstItem() ) { - listRows->setCurrentItem( listRows->firstItem() ); - listRows->setSelected( listRows->firstItem(), TRUE ); - } -#endif -} - -void TableEditor::readColumns() -{ - int j = 0; -#ifndef TQT_NO_TABLE - for ( TQListBoxItem *i = listColumns->firstItem(); i; i = i->next(), ++j ) { - if ( i->pixmap() ) - table->horizontalHeader()->setLabel( j, *i->pixmap(), i->text() ); - else - table->horizontalHeader()->setLabel( j, i->text() ); - } -#endif -} - -void TableEditor::readRows() -{ - int j = 0; -#ifndef TQT_NO_TABLE - for ( TQListBoxItem *i = listRows->firstItem(); i; i = i->next(), ++j ) { - if ( i->pixmap() ) - table->verticalHeader()->setLabel( j, *i->pixmap(), i->text() ); - else - table->verticalHeader()->setLabel( j, i->text() ); - } -#endif -} - -void TableEditor::saveFieldMap() -{ - tmpFieldMap.clear(); - for ( TQMap::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it ) - tmpFieldMap.insert( listColumns->item( it.key() ), *it ); -} - -void TableEditor::restoreFieldMap() -{ - fieldMap.clear(); - for ( TQMap::Iterator it = tmpFieldMap.begin(); it != tmpFieldMap.end(); ++it ) - fieldMap.insert( listColumns->index( it.key() ), *it ); -} diff --git a/tdevdesigner/designer/tableeditorimpl.h b/tdevdesigner/designer/tableeditorimpl.h deleted file mode 100644 index 7729f33e..00000000 --- a/tdevdesigner/designer/tableeditorimpl.h +++ /dev/null @@ -1,83 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef TABLEEDITORIMPL_H -#define TABLEEDITORIMPL_H - -#include "tableeditor.h" -#include - -class TQListBoxItem; -class TQTable; -class FormWindow; - -class TableEditor : public TableEditorBase -{ - Q_OBJECT - - -public: - TableEditor( TQWidget* parent = 0, TQWidget *editWidget = 0, FormWindow *fw = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); - ~TableEditor(); - -protected slots: - void columnDownClicked(); - void columnTextChanged( const TQString & ); - void columnUpClicked(); - void currentColumnChanged( TQListBoxItem * ); - void currentFieldChanged( const TQString & ); - void currentRowChanged( TQListBoxItem * ); - void deleteColumnClicked(); - void deleteRowClicked(); - void newColumnClicked(); - void newRowClicked(); - void okClicked(); - void rowDownClicked(); - void rowTextChanged( const TQString & ); - void rowUpClicked(); - void applyClicked(); - void chooseRowPixmapClicked(); - void deleteRowPixmapClicked(); - void chooseColPixmapClicked(); - void deleteColPixmapClicked(); - -private: - void readFromTable(); - void readColumns(); - void readRows(); - void saveFieldMap(); - void restoreFieldMap(); - -private: - TQTable *editTable; - FormWindow *formWindow; - TQMap fieldMap; - TQMap tmpFieldMap; - -}; - -#endif // TABLEEDITOR_H diff --git a/tdevdesigner/designer/tdevdesigner_part.cpp b/tdevdesigner/designer/tdevdesigner_part.cpp deleted file mode 100644 index def9aa7f..00000000 --- a/tdevdesigner/designer/tdevdesigner_part.cpp +++ /dev/null @@ -1,565 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program 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 program 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 "tdevdesigner_part.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "mainwindow.h" -#include "designeraction.h" -#include "formwindow.h" - -TDevDesignerPart::TDevDesignerPart( TQWidget *parentWidget, const char *// widgetName - , - TQObject *parent, const char *name, const TQStringList &args ) - : KInterfaceDesigner::Designer(parent, name) -{ - setInstance( TDevDesignerPartFactory::instance() ); - - m_widget = new MainWindow( this, true ); - m_widget->reparent(parentWidget, TQPoint(0,0)); - setupDesignerWindow(); - - setWidget(m_widget); - - setupActions(); - if (args.contains("in shell")) - setXMLFile("tdevdesigner_part_sh.rc"); - else - setXMLFile("tdevdesigner_part.rc"); - - setReadWrite(true); - setModified(false); - - connect(m_widget, TQT_SIGNAL(formModified(bool )), this, TQT_SLOT(formModified(bool))); -} - -void TDevDesignerPart::setupDesignerWindow() -{ - m_widget->menuBar()->hide(); - m_widget->layoutToolBar->hide(); - m_widget->projectToolBar->hide(); - m_widget->toolsToolBar->hide(); - m_widget->statusBar()->hide(); -} - -static TQIconSet createPartIconSet( const TQString &name ) -{ - TQIconSet ic( BarIcon( "" + name, TDevDesignerPartFactory::instance() ) ); - TQString prefix = "designer_"; - int right = name.length() - prefix.length(); - ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), TDevDesignerPartFactory::instance() ), - TQIconSet::Small, TQIconSet::Disabled ); - return ic; -} - -void TDevDesignerPart::setupActions( ) -{ - TDEAction *action; - action = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); - action = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - action = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection()); - stateSync(action, m_widget->actionFileClose); - action = KStdAction::save(this, TQT_SLOT(save()), actionCollection()); - stateSync(action, m_widget->actionFileSave); - action = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); - stateSync(action, m_widget->actionFileSaveAs); - action = new TDEAction(i18n("Save Al&l"), 0, this, TQT_SLOT(fileSaveAs()), actionCollection(), "file_saveall"); - stateSync(action, m_widget->actionFileSaveAll); - new TDEAction(i18n("Create &Template..."), 0, this, TQT_SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate"); - - action = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection()); - stateSync(action, m_widget->actionEditUndo); - action = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection()); - stateSync(action, m_widget->actionEditRedo); - action = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection()); - stateSync(action, m_widget->actionEditCut); - action = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection()); - stateSync(action, m_widget->actionEditCopy); - action = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection()); - stateSync(action, m_widget->actionEditPaste); - action = new TDEAction(i18n("&Delete"), Key_Delete, this, TQT_SLOT(editDelete()), actionCollection(), "edit_delete"); - stateSync(action, m_widget->actionEditDelete); - action = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection()); - stateSync(action, m_widget->actionEditSelectAll); - action = new TDEAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()), actionCollection(), "edit_accels"); - stateSync(action, m_widget->actionEditAccels); - action = new TDEAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, TQT_SLOT(editFunctions()), actionCollection(), "edit_functions"); - stateSync(action, m_widget->actionEditFunctions); - action = new TDEAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, TQT_SLOT(editConnections()), actionCollection(), "edit_connections"); - stateSync(action, m_widget->actionEditConnections); - action = new TDEAction(i18n("&Form Settings..."), 0, this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_formsettings"); - stateSync(action, m_widget->actionEditFormSettings); - - action = new TDEAction(i18n("&Add File..."), 0, this, TQT_SLOT(projectAddFile()), actionCollection(), "project_addfile"); - stateSync(action, m_widget->actionProjectAddFile); - action = new TDEAction(i18n("&Image Collection..."), 0, this, TQT_SLOT(projectImageCollection()), actionCollection(), "project_imagecollection"); - stateSync(action, m_widget->actionEditPixmapCollection); - action = new TDEAction(i18n("&Database Connections..."), 0, this, TQT_SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections"); - stateSync(action, m_widget->actionEditDatabaseConnections); - action = new TDEAction(i18n("&Designer Project Settings..."), 0, this, TQT_SLOT(projectSettings()), actionCollection(), "project_settings"); - stateSync(action, m_widget->actionEditProjectSettings); - - TDERadioAction *toggle; - toggle = new TDERadioAction(i18n("&Pointer"), createPartIconSet("designer_pointer.png"), Key_F2, actionCollection(), "tools_pointer"); - setupToolsAction(toggle, m_widget->actionPointerTool); - pointerAction = toggle; - toggle = new TDERadioAction(i18n("&Connect Signal/Slots"), createPartIconSet("designer_connecttool.png"), Key_F3, actionCollection(), "tools_connect"); - setupToolsAction(toggle, m_widget->actionConnectTool); - toggle = new TDERadioAction(i18n("Tab &Order"), createPartIconSet("designer_ordertool.png"), Key_F4, actionCollection(), "tools_taborder"); - setupToolsAction(toggle, m_widget->actionOrderTool); - toggle = new TDERadioAction(i18n("Set &Buddy"), createPartIconSet("designer_setbuddy.png"), Key_F12, actionCollection(), "tools_setbuddy"); - setupToolsAction(toggle, m_widget->actionBuddyTool); - new TDEAction(i18n("Configure Toolbox..."), 0, this, TQT_SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox"); - new TDEAction(i18n("Edit &Custom Widgets..."), 0, this, TQT_SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets"); - - action = new TDEAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQT_SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize"); - stateSync(action, m_widget->actionEditAdjustSize); - action = new TDEAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, TQT_SLOT(layoutHLayout()), actionCollection(), "layout_h"); - stateSync(action, m_widget->actionEditHLayout); - action = new TDEAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, TQT_SLOT(layoutVLayout()), actionCollection(), "layout_v"); - stateSync(action, m_widget->actionEditVLayout); - action = new TDEAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQT_SLOT(layoutGridLayout()), actionCollection(), "layout_grid"); - stateSync(action, m_widget->actionEditGridLayout); - action = new TDEAction(i18n("Lay OutQt::Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith"); - stateSync(action, m_widget->actionEditSplitHorizontal); - action = new TDEAction(i18n("Lay OutQt::Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv"); - stateSync(action, m_widget->actionEditSplitVertical); - action = new TDEAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQT_SLOT(layoutBreak()), actionCollection(), "layout_break"); - stateSync(action, m_widget->actionEditBreakLayout); - toggle = new TDERadioAction(i18n("Add Spacer"), createPartIconSet("designer_spacer.png"), 0, actionCollection(), "layout_spacer"); - setupToolsAction(toggle, m_widget->actionInsertSpacer); - - action = new TDEAction(i18n("Preview &Form"), CTRL + Key_T, this, TQT_SLOT(windowPreview()), actionCollection(), "window_preview"); - stateSync(action, m_widget->actionPreview); - action = new TDEAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, TQT_SLOT(windowNext()), actionCollection(), "window_next"); - stateSync(action, m_widget->actionWindowNext); - action = new TDEAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, TQT_SLOT(windowPrev()), actionCollection(), "window_prev"); - stateSync(action, m_widget->actionWindowPrevious); - - action = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection()); - action->setText(i18n("Configure &TDevDesigner...")); - stateSync(action, m_widget->actionEditPreferences); -} - -TDevDesignerPart::~TDevDesignerPart() -{ -} - -void TDevDesignerPart::setReadWrite(bool rw) -{ - ReadWritePart::setReadWrite(rw); -} - -void TDevDesignerPart::setModified(bool modified) -{ -/* TDEAction *save = actionCollection()->action(KStdAction::stdName(KStdAction::Save)); - if (!save) - return; - if (modified) - save->setEnabled(true); - else - save->setEnabled(false);*/ - - ReadWritePart::setModified(modified); -} - -bool TDevDesignerPart::openFile() -{ - m_widget->fileOpen("", "", m_file); - return true; -} - -bool TDevDesignerPart::saveFile() -{ - if (isReadWrite() == false) - return false; - m_widget->actionFileSaveAll->activate(); - return true; -} - -void TDevDesignerPart::stateSync( TDEAction * tdeaction, TQAction * qaction ) -{ - if (!qaction) - return; - tdeaction->setEnabled(qaction->isEnabled()); - DesignerAction *ac = dynamic_cast(qaction); - if (!ac) - return; - connect(ac, TQT_SIGNAL(actionEnabled(bool )), tdeaction, TQT_SLOT(setEnabled(bool ))); -} - -void TDevDesignerPart::setupToolsAction( TDERadioAction * toggle, TQAction * action ) -{ - if (!action) - return; - - toggle->setGroup("tools"); - toggle->setExclusiveGroup("tools"); - connect(action, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); - connect(toggle, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setToggleActionOn(bool))); - toggle->setChecked(action->isOn()); - m_actionMap[action] = toggle; - m_actionMap2[toggle] = action; -} - - -// It's usually safe to leave the factory code alone.. with the -// notable exception of the TDEAboutData data -#include -#include - -TDEInstance* TDevDesignerPartFactory::s_instance = 0L; -TDEAboutData* TDevDesignerPartFactory::s_about = 0L; - -TDevDesignerPartFactory::TDevDesignerPartFactory() - : KParts::Factory() -{ -} - -TDevDesignerPartFactory::~TDevDesignerPartFactory() -{ - delete s_instance; - delete s_about; - - s_instance = 0L; -} - -KParts::Part* TDevDesignerPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, - const char *classname, const TQStringList &args ) -{ - // Create an instance of our Part - TDevDesignerPart* obj = new TDevDesignerPart( parentWidget, widgetName, parent, name, args ); - - // See if we are to be read-write or not - if (TQCString(classname) == "KParts::ReadOnlyPart") - obj->setReadWrite(false); - - return obj; -} - -TDEInstance* TDevDesignerPartFactory::instance() -{ - if( !s_instance ) - { - s_about = new TDEAboutData("tdevdesignerpart", I18N_NOOP("TDevDesignerPart"), "0.1"); - s_about->addAuthor("Alexander Dymo", 0, "cloudtemple@mksat.net"); - s_about->addAuthor("Trolltech AS", 0, "info@trolltech.com"); - s_instance = new TDEInstance(s_about); - } - return s_instance; -} - -extern "C" -{ - void* init_libtdevdesignerpart() - { - return new TDevDesignerPartFactory; - } -} - -//actions - -void TDevDesignerPart::fileNew( ) -{ - if (!m_widget->actionNewFile) - { - tqWarning("wrong m_widget->actionNewFile"); - return; - } - m_widget->actionNewFile->activate(); -} - -void TDevDesignerPart::fileOpen() -{ - m_widget->fileOpen(); -} - -void TDevDesignerPart::fileSaveAs() -{ - m_widget->actionFileSaveAs->activate(); -} - -void TDevDesignerPart::fileClose( ) -{ - m_widget->actionFileClose->activate(); -} - -void TDevDesignerPart::fileCreateTemplate( ) -{ - m_widget->fileCreateTemplate(); -} - -void TDevDesignerPart::editUndo( ) -{ - m_widget->actionEditUndo->activate(); -} - -void TDevDesignerPart::editRedo( ) -{ - m_widget->actionEditRedo->activate(); -} - -void TDevDesignerPart::editCut( ) -{ - m_widget->actionEditCut->activate(); -} - -void TDevDesignerPart::editPaste( ) -{ - m_widget->actionEditPaste->activate(); -} - -void TDevDesignerPart::editCopy( ) -{ - m_widget->actionEditCopy->activate(); -} - -void TDevDesignerPart::editDelete( ) -{ - m_widget->actionEditDelete->activate(); -} - -void TDevDesignerPart::editSelectAll( ) -{ - m_widget->actionEditSelectAll->activate(); -} - -void TDevDesignerPart::editAccels( ) -{ - m_widget->actionEditAccels->activate(); -} - -void TDevDesignerPart::editFunctions( ) -{ - m_widget->actionEditFunctions->activate(); -} - -void TDevDesignerPart::editConnections( ) -{ - m_widget->actionEditConnections->activate(); -} - -void TDevDesignerPart::editFormSettings( ) -{ - m_widget->actionEditFormSettings->activate(); -} - -void TDevDesignerPart::editPreferences( ) -{ - m_widget->actionEditPreferences->activate(); -} - -void TDevDesignerPart::projectAddFile( ) -{ - m_widget->actionProjectAddFile->activate(); -} - -void TDevDesignerPart::projectImageCollection( ) -{ - m_widget->actionEditPixmapCollection->activate(); -} - -void TDevDesignerPart::projectDatabaseCollections( ) -{ - m_widget->actionEditDatabaseConnections->activate(); -} - -void TDevDesignerPart::projectSettings( ) -{ - m_widget->actionEditProjectSettings->activate(); -} - -void TDevDesignerPart::toolsConfigureToolbox( ) -{ - m_widget->toolsConfigure(); -} - -void TDevDesignerPart::layoutAdjustSize( ) -{ - m_widget->actionEditAdjustSize->activate(); -} - -void TDevDesignerPart::layoutHLayout( ) -{ - m_widget->actionEditHLayout->activate(); -} - -void TDevDesignerPart::layoutVLayout( ) -{ - m_widget->actionEditVLayout->activate(); -} - -void TDevDesignerPart::layoutGridLayout( ) -{ - m_widget->actionEditGridLayout->activate(); -} - -void TDevDesignerPart::layoutSplitHLayout( ) -{ - m_widget->actionEditSplitHorizontal->activate(); -} - -void TDevDesignerPart::layoutSplitVLayout( ) -{ - m_widget->actionEditSplitVertical->activate(); -} - -void TDevDesignerPart::layoutBreak( ) -{ - m_widget->actionEditBreakLayout->activate(); -} - -void TDevDesignerPart::windowPreview( ) -{ - m_widget->actionPreview->activate(); -} - -void TDevDesignerPart::windowNext( ) -{ - m_widget->actionWindowNext->activate(); -} - -void TDevDesignerPart::windowPrev( ) -{ - m_widget->actionWindowPrevious->activate(); -} - -void TDevDesignerPart::statusMessage( const TQString & msg ) -{ - emit setStatusBarText(msg); -} - -void TDevDesignerPart::setToggleActionChecked( bool b) -{ - if (!sender()) - return; - const TQAction *action = dynamic_cast(sender()); - if (!action) - return; - if (b) - { - if (action == m_widget->actionPointerTool) - pointerAction->setChecked(true); - return; - } - TDERadioAction *tdeaction = m_actionMap[action]; - if (!tdeaction) - return; -// kdDebug() << "untoggle action: " << tdeaction->text() << endl; - tdeaction->blockSignals(true); - tdeaction->setChecked(b); - tdeaction->blockSignals(false); -} - -void TDevDesignerPart::setToggleActionOn( bool b ) -{ - if (!sender()) - return; - const TDERadioAction *action = dynamic_cast(sender()); - if (!action) - return; -// kdDebug() << (b?TQString("toggle"):TQString("untoggle")) << " action: " << action->text() << endl; - TQAction *qaction = m_actionMap2[action]; - if (!qaction) - return; - disconnect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); - qaction->setOn(b); - connect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); -} - -void TDevDesignerPart::openProject( const TQString & // projectFile - ) -{ - //TODO: implement - return; -} - -KInterfaceDesigner::DesignerType TDevDesignerPart::designerType( ) -{ - return KInterfaceDesigner::TQtDesigner; -} - -void TDevDesignerPart::emitAddedFunction( const TQString & form, KInterfaceDesigner::Function func ) -{ - kdDebug() << "TDevDesignerPart::emitAddedFunction: form " << form << ", function: " << func.function << endl; - emit addedFunction(designerType(), form, func); -} - -void TDevDesignerPart::emitRemovedFunction( const TQString & form, KInterfaceDesigner::Function func ) -{ - kdDebug() << "TDevDesignerPart::emitRemovedFunction: form " << form << ", function: " << func.function << endl; - emit removedFunction(designerType(), form, func); -} - -void TDevDesignerPart::emitEditedFunction( const TQString & form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func ) -{ - kdDebug() << "TDevDesignerPart::emitEditedFunction: form " << form - << ", old function: " << oldFunc.function - << ", function: " << func.function << endl; - -// m_widget->formWindow()->clearSelection(false); - emit editedFunction(designerType(), form, oldFunc, func); -} - -void TDevDesignerPart::emitEditFunction(const TQString &formName, const TQString &functionName) -{ - kdDebug() << "TDevDesignerPart::emitEditedFunction: form " << formName - << ", function: " << functionName << endl; - emit editFunction(designerType(), formName, functionName); -} - -void TDevDesignerPart::formModified(bool b) -{ - kdDebug() << "TDevDesignerPart::formModified " << b << endl; - setModified(b); -} - -void TDevDesignerPart::emitEditSource(const TQString &formName) -{ - emit editSource(designerType(), formName); -} - -void TDevDesignerPart::emitNewStatus(const TQString &formName, int status) -{ - emit newStatus(formName, status); -} - -void TDevDesignerPart::toolsEditCustomWidgets( ) -{ - m_widget->toolsCustomWidget(); -} - -#include "tdevdesigner_part.moc" diff --git a/tdevdesigner/designer/tdevdesigner_part.desktop b/tdevdesigner/designer/tdevdesigner_part.desktop deleted file mode 100644 index 998d4f74..00000000 --- a/tdevdesigner/designer/tdevdesigner_part.desktop +++ /dev/null @@ -1,16 +0,0 @@ -[Desktop Entry] -Name=TDevDesignerPart -Name[da]=TDevelop Designer-part -Name[el]=ΤμήμαTDevDesigner -Name[nds]=Kdevelop-Makerkomponent -Name[ne]=केडीई विकास डिजाइनर भाग -Name[sv]=TDevelop designerdel -Name[ta]=கேமேம்பாட்டு வடிவமைப்பாளர் பகுதி -Name[tg]=KDevҚисми дизайнгар -Name[zh_TW]=TDevelop 設計元件 -MimeType=application/x-designer -ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart -X-TDE-Library=libtdevdesignerpart -Type=Service -InitialPreference=10 - diff --git a/tdevdesigner/designer/tdevdesigner_part.h b/tdevdesigner/designer/tdevdesigner_part.h deleted file mode 100644 index 3381da5a..00000000 --- a/tdevdesigner/designer/tdevdesigner_part.h +++ /dev/null @@ -1,148 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program 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 program 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 _TDEVDESIGNERPART_H_ -#define _TDEVDESIGNERPART_H_ - -#include - -#include -#include - -#include "designer.h" - -class TQWidget; -class TQPainter; -class KURL; -class MainWindow; -class TDEAction; -class TQAction; -class TDERadioAction; - -class TDevDesignerPart : public KInterfaceDesigner::Designer -{ - Q_OBJECT - -public: - TDevDesignerPart(TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, const TQStringList &args); - virtual ~TDevDesignerPart(); - - virtual void setReadWrite(bool rw); - virtual void setModified(bool modified); - - void statusMessage(const TQString &msg); - - //KInterfaceDesigner::Designer methods - virtual void openProject(const TQString &projectFile); - virtual KInterfaceDesigner::DesignerType designerType(); - - void emitAddedFunction(const TQString &form, KInterfaceDesigner::Function func); - void emitEditedFunction(const TQString &form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func); - void emitRemovedFunction(const TQString &form, KInterfaceDesigner::Function func); - - void emitEditFunction(const TQString &formName, const TQString &functionName); - void emitEditSource(const TQString &formName); - - void emitNewStatus(const TQString &formName, int status); - -protected: - virtual bool openFile(); - virtual bool saveFile(); - - void setupDesignerWindow(); - void setupActions(); - - void stateSync(TDEAction *tdeaction, TQAction *qaction); - void setupToolsAction(TDERadioAction *toggle, TQAction *action); - -protected slots: - void setToggleActionChecked(bool b); - void setToggleActionOn(bool b); - - void fileNew(); - void fileOpen(); - void fileClose(); - void fileSaveAs(); - void fileCreateTemplate(); - - void editUndo(); - void editRedo(); - void editCut(); - void editCopy(); - void editPaste(); - void editDelete(); - void editSelectAll(); - void editAccels(); - void editFunctions(); - void editConnections(); - void editFormSettings(); - void editPreferences(); - - void projectAddFile(); - void projectImageCollection(); - void projectDatabaseCollections(); - void projectSettings(); - - void toolsConfigureToolbox(); - void toolsEditCustomWidgets(); - - void layoutAdjustSize(); - void layoutHLayout(); - void layoutVLayout(); - void layoutGridLayout(); - void layoutSplitHLayout(); - void layoutSplitVLayout(); - void layoutBreak(); - - void windowPreview(); - void windowNext(); - void windowPrev(); - - void formModified(bool b); -private: - MainWindow *m_widget; - - TQMap m_actionMap; - TQMap m_actionMap2; - TDERadioAction* pointerAction; -}; - -class TDEInstance; -class TDEAboutData; - -class TDevDesignerPartFactory : public KParts::Factory -{ - Q_OBJECT - -public: - TDevDesignerPartFactory(); - virtual ~TDevDesignerPartFactory(); - virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, - const char *classname, const TQStringList &args ); - static TDEInstance* instance(); - -private: - static TDEInstance* s_instance; - static TDEAboutData* s_about; -}; - -#endif // _TDEVDESIGNERPART_H_ diff --git a/tdevdesigner/designer/tdevdesigner_part.rc b/tdevdesigner/designer/tdevdesigner_part.rc deleted file mode 100644 index 318a0761..00000000 --- a/tdevdesigner/designer/tdevdesigner_part.rc +++ /dev/null @@ -1,121 +0,0 @@ - - - - &File - - - - - - &Edit - - - - - - - - - - - - - - - - - - - &Project - - - - - - - - &Tools - - - - - - - - - - &Layout - - - - - - - - - - - - - &Settings - - - - &Window - - - - - - - - - - -Main Toolbar - - - - - - - - - - - - -Layout Toolbar - - - - - - - - - - - - -Tools Toolbar - - - - - - - diff --git a/tdevdesigner/designer/tdevdesigner_part_sh.rc b/tdevdesigner/designer/tdevdesigner_part_sh.rc deleted file mode 100644 index c0ec9d8a..00000000 --- a/tdevdesigner/designer/tdevdesigner_part_sh.rc +++ /dev/null @@ -1,116 +0,0 @@ - - - - &File - - - - - - - - - - - - - - &Edit - - - - - - - - - - - - - - - - - - &Project - - - - - - - - &Tools - - - - - - - - - - &Layout - - - - - - - - - - - - - &Settings - - - - &Window - - - - - - - - -File Toolbar - - - - - -Edit Toolbar - - - - - - - - -Layout Toolbar - - - - - - - - - - - - -Tools Toolbar - - - - - - - diff --git a/tdevdesigner/designer/timestamp.cpp b/tdevdesigner/designer/timestamp.cpp deleted file mode 100644 index 553d9e3f..00000000 --- a/tdevdesigner/designer/timestamp.cpp +++ /dev/null @@ -1,86 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "timestamp.h" -#include -#include - -class TQTimer; - -TimeStamp::TimeStamp( TQObject *parent, const TQString &f ) - : TQObject( parent ), filename( f ), autoCheck( FALSE ) -{ - timer = new TQTimer( this ); - connect( timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( autoCheckTimeStamp() ) ); - update(); -} - -void TimeStamp::setFileName( const TQString &f ) -{ - filename = f; - update(); -} - -TQString TimeStamp::fileName() const -{ - return filename; -} - -void TimeStamp::setAutoCheckEnabled( bool a ) -{ - autoCheck = a; - if ( autoCheck ) - timer->start( 5000 ); - else - timer->stop(); -} - -void TimeStamp::update() -{ - TQFile f( filename ); - if ( !f.exists() ) - return; - lastTimeStamp = TQFileInfo( f ).lastModified(); -} - -bool TimeStamp::isUpToDate() const -{ - TQFile f( filename ); - if ( !f.exists() ) - return TRUE; - return lastTimeStamp == TQFileInfo( f ).lastModified(); -} - -bool TimeStamp::isAutoCheckEnabled() const -{ - return autoCheck; -} - -void TimeStamp::autoCheckTimeStamp() -{ - if ( !isUpToDate() ) - emit timeStampChanged(); -} diff --git a/tdevdesigner/designer/timestamp.h b/tdevdesigner/designer/timestamp.h deleted file mode 100644 index 078a925d..00000000 --- a/tdevdesigner/designer/timestamp.h +++ /dev/null @@ -1,64 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef TIMESTAMP_H -#define TIMESTAMP_H - -#include -#include -#include - -class TimeStamp : public TQObject -{ - Q_OBJECT - - -public: - TimeStamp( TQObject *parent, const TQString &f ); - - void setFileName( const TQString &f ); - TQString fileName() const; - void setAutoCheckEnabled( bool a ); - void update(); - - bool isUpToDate() const; - bool isAutoCheckEnabled() const; - -signals: - void timeStampChanged(); - -private slots: - void autoCheckTimeStamp(); - -private: - TQDateTime lastTimeStamp; - TQString filename; - bool autoCheck; - TQTimer *timer; - -}; - -#endif diff --git a/tdevdesigner/designer/variabledialog.ui b/tdevdesigner/designer/variabledialog.ui deleted file mode 100644 index b5971ce9..00000000 --- a/tdevdesigner/designer/variabledialog.ui +++ /dev/null @@ -1,294 +0,0 @@ - -VariableDialogBase -********************************************************************* -** Copyright (C) 2002 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - VariableDialogBase - - - - 0 - 0 - 276 - 320 - - - - Edit Variables - - - - unnamed - - - 11 - - - 6 - - - - - Variable - - - true - - - true - - - - - Access - - - true - - - true - - - - varView - - - StyledPanel - - - Sunken - - - true - - - LastColumn - - - - - deleteButton - - - &Delete - - - - - propBox - - - Variable Properties - - - - unnamed - - - 11 - - - 6 - - - - TextLabel2 - - - Acc&ess: - - - accessCombo - - - - - TextLabel1 - - - &Variable: - - - varName - - - - - varName - - - - - - public - - - - - protected - - - - - private - - - - accessCombo - - - - - - - addButton - - - &Add - - - - - Spacer2 - - - Horizontal - - - Expanding - - - - 0 - 21 - - - - - - cancelButton - - - &Cancel - - - - - okButton - - - &OK - - - - - Spacer3 - - - Horizontal - - - Expanding - - - - 0 - 21 - - - - - - - - cancelButton - clicked() - VariableDialogBase - reject() - - - addButton - clicked() - VariableDialogBase - addVariable() - - - okButton - clicked() - VariableDialogBase - okClicked() - - - varName - textChanged(const TQString&) - VariableDialogBase - nameChanged() - - - deleteButton - clicked() - VariableDialogBase - deleteVariable() - - - accessCombo - activated(int) - VariableDialogBase - accessChanged() - - - varView - currentChanged(TQListViewItem*) - VariableDialogBase - currentItemChanged(TQListViewItem*) - - - varView - selectionChanged(TQListViewItem*) - VariableDialogBase - currentItemChanged(TQListViewItem*) - - - - varView - addButton - deleteButton - varName - accessCombo - okButton - cancelButton - - - addVariable() - deleteVariable() - accessChanged() - nameChanged() - okClicked() - currentItemChanged( TQListViewItem * i ) - - - diff --git a/tdevdesigner/designer/variabledialogimpl.cpp b/tdevdesigner/designer/variabledialogimpl.cpp deleted file mode 100644 index d2d7ef67..00000000 --- a/tdevdesigner/designer/variabledialogimpl.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include -#include -#include -#include -#include - -#include "metadatabase.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "hierarchyview.h" -#include "command.h" -#include "variabledialogimpl.h" - -#include - - -VariableDialog::VariableDialog( FormWindow *fw, TQWidget *parent ) - : VariableDialogBase( parent ), formWindow( fw ) -{ - varView->setSorting( -1 ); - TQValueList varLst = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); - TQValueList::Iterator it = varLst.begin(); - for ( ; it != varLst.end(); ++it ) { - TQListViewItem *i = new TQListViewItem( varView ); - i->setText( 0, (*it).varName ); - i->setText( 1, (*it).varAccess ); - } - - if ( varView->firstChild() ) - varView->setCurrentItem( varView->firstChild() ); - else - propBox->setEnabled( FALSE ); -} - -VariableDialog::~VariableDialog() -{ -} - -void VariableDialog::setCurrentItem( TQString text ) -{ - TQListViewItem *i = varView->findItem( text, 0 ); - if ( i ) - varView->setCurrentItem( i ); -} - -void VariableDialog::okClicked() -{ - TQValueList lst; - - TQListViewItemIterator it( varView ); - while ( it.current() != 0 ) { - MetaDataBase::Variable v; - v.varName = it.current()->text( 0 ).simplifyWhiteSpace(); - if ( v.varName[ (int)v.varName.length() - 1 ] != ';' ) - v.varName += ";"; - v.varAccess = it.current()->text( 1 ); - lst << v; - ++it; - } - - if ( !lst.isEmpty() ) { - TQValueList invalidLst; - TQValueList::Iterator it1 = lst.begin(); - TQValueList::Iterator it2; - for ( ; it1 != lst.end(); ++it1 ) { - it2 = it1; - ++it2; - for ( ; it2 != lst.end(); ++it2 ) { - if ( MetaDataBase::extractVariableName( (*it1).varName ) == - MetaDataBase::extractVariableName( (*it2).varName ) ) { - invalidLst << (*it1); - break; - } - } - } - if ( !invalidLst.isEmpty() ) { - if ( TQMessageBox::information( this, i18n( "Edit Variables" ), - i18n( "One variable has been declared twice.\n" - "Remove this variable?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { - for ( it2 = invalidLst.begin(); it2 != invalidLst.end(); ++it2 ) { - it = varView->firstChild(); - while ( it.current() != 0 ) { - if ( MetaDataBase::extractVariableName( (*it)->text( 0 ).simplifyWhiteSpace() ) == - MetaDataBase::extractVariableName( (*it2).varName ) ) { - delete (*it); - break; - } - ++it; - } - } - } - formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - return; - } - } - Command *cmd = new SetVariablesCommand( i18n( "Edit Variables" ), formWindow, lst ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - accept(); -} - -void VariableDialog::addVariable() -{ - TQListViewItem *i = new TQListViewItem( varView, varView->lastItem() ); - i->setText( 0, "int newVariable" ); - i->setText( 1, "protected" ); - varView->setCurrentItem( i ); - varView->setSelected( i, TRUE ); - varName->setFocus(); - varName->selectAll(); -} - -void VariableDialog::deleteVariable() -{ - TQListViewItem *i = varView->selectedItem(); - if ( !i ) - return; - delete i; - i = 0; - if ( varView->firstChild() ) - varView->setSelected( varView->firstChild(), TRUE ); -} - -void VariableDialog::currentItemChanged( TQListViewItem *i ) -{ - if ( !i ) { - varName->clear(); - accessCombo->setCurrentItem( 1 ); - propBox->setEnabled( FALSE ); - return; - } - varName->setText( i->text( 0 ) ); - if ( i->text( 1 ) == "public" ) - accessCombo->setCurrentItem( 0 ); - else if ( i->text( 1 ) == "protected" ) - accessCombo->setCurrentItem( 1 ); - else - accessCombo->setCurrentItem( 2 ); - propBox->setEnabled( TRUE ); -} - -void VariableDialog::nameChanged() -{ - if ( !varView->currentItem() ) - return; - varView->currentItem()->setText( 0, varName->text() ); -} - -void VariableDialog::accessChanged() -{ - if ( !varView->currentItem() ) - return; - varView->currentItem()->setText( 1, accessCombo->currentText() ); -} diff --git a/tdevdesigner/designer/variabledialogimpl.h b/tdevdesigner/designer/variabledialogimpl.h deleted file mode 100644 index 65295073..00000000 --- a/tdevdesigner/designer/variabledialogimpl.h +++ /dev/null @@ -1,57 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef VARIABLEDIALOGIMPL_H -#define VARIABLEDIALOGIMPL_H - -#include "variabledialog.h" - -class FormWindow; -class TQListView; - -class VariableDialog : public VariableDialogBase -{ - Q_OBJECT - -public: - VariableDialog( FormWindow *fw, TQWidget* parent = 0 ); - ~VariableDialog(); - - void setCurrentItem( TQString text ); - -protected slots: - void okClicked(); - void addVariable(); - void deleteVariable(); - void nameChanged(); - void accessChanged(); - void currentItemChanged( TQListViewItem *i ); - -private: - FormWindow *formWindow; -}; - -#endif diff --git a/tdevdesigner/designer/widgetaction.cpp b/tdevdesigner/designer/widgetaction.cpp deleted file mode 100644 index c2ce0721..00000000 --- a/tdevdesigner/designer/widgetaction.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "widgetaction.h" -#include -#include -#include "mainwindow.h" -#include -#include - -static TQStyle *windowsStyle = 0; - -void WidgetAction::addedTo( TQWidget *w, TQWidget *container ) -{ - if ( ::tqqt_cast(w) && ::tqqt_cast(container->parent()->parent()) ) { - if ( !windowsStyle ) - windowsStyle = TQStyleFactory::create( "windows" ); - w->setStyle( windowsStyle ); - ( (TQToolButton*)w )->setUsesTextLabel( TRUE ); - ( (TQToolButton*)w )->setTextPosition( TQToolButton::Right ); - w->setBackgroundMode( container->backgroundMode() ); - } -} - -WidgetAction::~WidgetAction() -{ - if ( MainWindow::self ) - MainWindow::self->toolActions.removeRef( this ); -} - -void WidgetAction::init( const TQString &g ) -{ - MainWindow::self->toolActions.append( this ); - grp = g; -} diff --git a/tdevdesigner/designer/widgetaction.h b/tdevdesigner/designer/widgetaction.h deleted file mode 100644 index 161bc8a0..00000000 --- a/tdevdesigner/designer/widgetaction.h +++ /dev/null @@ -1,66 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef WIDGETACTION_H -#define WIDGETACTION_H - -#include - -class WidgetAction : public TQAction -{ - Q_OBJECT - - -public: - WidgetAction( const TQString &grp, TQObject* parent, - const char* name = 0, bool toggle = FALSE ) - : TQAction( parent, name, toggle ) { init( grp ); } - WidgetAction( const TQString &grp, const TQString& text, - const TQIconSet& icon, const TQString& menuText, TQKeySequence accel, - TQObject* parent, const char* name = 0, bool toggle = FALSE ) - : TQAction( text, icon, menuText, accel, parent, name, toggle ) { init( grp ); } - WidgetAction( const TQString &grp, const TQString& text, - const TQString& menuText, TQKeySequence accel, TQObject* parent, - const char* name = 0, bool toggle = FALSE ) - : TQAction( text, menuText, accel, parent, name, toggle ) { init( grp ); } - ~WidgetAction(); - -#if !defined(TQ_NO_USING_KEYWORD) - using TQAction::addedTo; -#endif - void addedTo( TQWidget *, TQWidget * ); - - TQString group() const { return grp; } - -private: - void init( const TQString &g ); - -private: - TQString grp; - -}; - -#endif diff --git a/tdevdesigner/designer/widgetfactory.cpp b/tdevdesigner/designer/widgetfactory.cpp deleted file mode 100644 index 1271e84e..00000000 --- a/tdevdesigner/designer/widgetfactory.cpp +++ /dev/null @@ -1,1805 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include // HP-UX compiler need this here -#include "widgetfactory.h" -#include -#include "metadatabase.h" -#include "mainwindow.h" -#include "formwindow.h" -#include "propertyeditor.h" -#include "tqlayout.h" -#include "listboxeditorimpl.h" -#include "listvieweditorimpl.h" -#include "iconvieweditorimpl.h" -#include "formwindow.h" -#include "multilineeditorimpl.h" -#include "../interfaces/widgetinterface.h" -#ifndef TQT_NO_TABLE -#include "tableeditorimpl.h" -#endif -#include "project.h" -#include "menubareditor.h" -#include "popupmenueditor.h" - -#include "tdevdesigner_part.h" - -#include - -#include - -#include -#include -#include -#ifndef TQT_NO_TABLE -#include -#endif -#ifndef TQT_NO_SQL -#include -#endif -#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 -#ifndef TQT_NO_SQL -#include "database.h" -#endif - -#define NO_STATIC_COLORS -#include -#include - -#include - -FormWindow *find_formwindow( TQWidget *w ) -{ - if ( !w ) - return 0; - for (;;) { - if ( ::tqqt_cast(w) ) - return (FormWindow*)w; - if ( !w->parentWidget() ) - return 0; - w = w->parentWidget(); - } -} - -void TQLayoutWidget::paintEvent( TQPaintEvent* ) -{ - TQPainter p ( this ); - p.setPen( red ); - p.drawRect( rect() ); -} - - -QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name ) - : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE ) -{ - tabBar()->setAcceptDrops( TRUE ); - tabBar()->installEventFilter( this ); -} - -int QDesignerTabWidget::currentPage() const -{ - return tabBar()->currentTab(); -} - -void QDesignerTabWidget::setCurrentPage( int i ) -{ - tabBar()->setCurrentTab( i ); -} - -TQString QDesignerTabWidget::pageTitle() const -{ - return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() ); -} - -void QDesignerTabWidget::setPageTitle( const TQString& title ) -{ - changeTab( TQTabWidget::currentPage(), title ); -} - -void QDesignerTabWidget::setPageName( const TQCString& name ) -{ - if ( TQTabWidget::currentPage() ) - TQTabWidget::currentPage()->setName( name ); -} - -TQCString QDesignerTabWidget::pageName() const -{ - if ( !TQTabWidget::currentPage() ) - return 0; - return TQTabWidget::currentPage()->name(); -} - -int QDesignerTabWidget::count() const -{ - return tabBar()->count(); -} - -bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) -{ - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return FALSE; - - switch ( e->type() ) { - case TQEvent::MouseButtonPress: { - mousePressed = TRUE; - TQMouseEvent *me = (TQMouseEvent*)e; - pressPoint = me->pos(); - } - break; - case TQEvent::MouseMove: { - TQMouseEvent *me = (TQMouseEvent*)e; - if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > TQApplication::startDragDistance() ) { - TQTextDrag *drg = new TQTextDrag( TQString::number( (long) this ) , this ); - mousePressed = FALSE; - dragPage = TQTabWidget::currentPage(); - dragLabel = TQTabWidget::tabLabel( dragPage ); - - int index = indexOf( dragPage ); - - removePage( dragPage ); - if ( !drg->dragMove() ) { - insertTab( dragPage, dragLabel, index ); - showPage( dragPage ); - } - if ( dropIndicator ) - dropIndicator->hide(); - } - } - break; - case TQEvent::DragLeave: { - if ( dropIndicator ) - dropIndicator->hide(); - } - break; - case TQEvent::DragMove: { - TQDragEnterEvent *de = (TQDragEnterEvent*) e; - if ( TQTextDrag::canDecode( de ) ) { - TQString text; - TQTextDrag::decode( de, text ); - if ( text == TQString::number( (long)this ) ) - de->accept(); - else - return FALSE; - } - - int index = 0; - TQRect rect; - for ( ; index < tabBar()->count(); index++ ) { - if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) { - rect = tabBar()->tabAt( index )->rect(); - break; - } - } - - if ( index == tabBar()->count() -1 ) { - TQRect rect2 = rect; - rect2.setLeft( rect2.left() + rect2.width() / 2 ); - if ( rect2.contains( de->pos() ) ) - index++; - } - - if ( ! dropIndicator ) { - dropIndicator = new TQWidget( this ); - dropIndicator->setBackgroundColor( red ); - } - - TQPoint pos; - if ( index == tabBar()->count() ) - pos = tabBar()->mapToParent( TQPoint( rect.x() + rect.width(), rect.y() ) ); - else - pos = tabBar()->mapToParent( TQPoint( rect.x(), rect.y() ) ); - - dropIndicator->setGeometry( pos.x(), pos.y() , 3, rect.height() ); - dropIndicator->show(); - } - break; - case TQEvent::Drop: { - TQDragEnterEvent *de = (TQDragEnterEvent*) e; - if ( TQTextDrag::canDecode( de ) ) { - TQString text; - TQTextDrag::decode( de, text ); - if ( text == TQString::number( (long)this ) ) { - - int newIndex = 0; - for ( ; newIndex < tabBar()->count(); newIndex++ ) { - if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) ) - break; - } - - if ( newIndex == tabBar()->count() -1 ) { - TQRect rect2 = tabBar()->tabAt( newIndex )->rect(); - rect2.setLeft( rect2.left() + rect2.width() / 2 ); - if ( rect2.contains( de->pos() ) ) - newIndex++; - } - - int oldIndex = 0; - for ( ; oldIndex < tabBar()->count(); oldIndex++ ) { - if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) ) - break; - } - - FormWindow *fw = find_formwindow( this ); - MoveTabPageCommand *cmd = - new MoveTabPageCommand( i18n( "Move Tab Page" ), fw, this, - dragPage, dragLabel, newIndex, oldIndex ); - fw->commandHistory()->addCommand( cmd ); - cmd->execute(); - de->accept(); - } - } - } - break; - default: - break; - } - return FALSE; -} - - -QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *parent, const char *name ) - : TQWidgetStack( parent, name ) -{ - prev = new TQToolButton( TQt::LeftArrow, this, "designer_wizardstack_button" ); - prev->setAutoRaise( TRUE ); - prev->setAutoRepeat( TRUE ); - prev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); - next = new TQToolButton( TQt::RightArrow, this, "designer_wizardstack_button" ); - next->setAutoRaise( TRUE ); - next->setAutoRepeat( TRUE ); - next->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); - connect( prev, TQT_SIGNAL( clicked() ), this, TQT_SLOT( prevPage() ) ); - connect( next, TQT_SIGNAL( clicked() ), this, TQT_SLOT( nextPage() ) ); - updateButtons(); -} - -void QDesignerWidgetStack::updateButtons() -{ - prev->setGeometry( width() - 31, 1, 15, 15 ); - next->setGeometry( width() - 16, 1, 15, 15 ); - prev->show(); - next->show(); - prev->raise(); - next->raise(); -} - -void QDesignerWidgetStack::prevPage() -{ - setCurrentPage( currentPage() - 1 ); -} - -void QDesignerWidgetStack::nextPage() -{ - setCurrentPage( currentPage() + 1 ); -} - -int QDesignerWidgetStack::currentPage() const -{ - QDesignerWidgetStack* that = (QDesignerWidgetStack*) this; - return that->pages.find( visibleWidget() ); -} - -void QDesignerWidgetStack::setCurrentPage( int i ) -{ - // help next/prev page commands - if ( i < 0 ) - i += count(); - if ( i >= count() ) - i -= count(); - - if ( i < 0 || i >= count() ) - return; - raiseWidget( pages.at( i ) ); - updateButtons(); -} - -TQCString QDesignerWidgetStack::pageName() const -{ - if ( !visibleWidget() ) - return 0; - return visibleWidget()->name(); -} - -void QDesignerWidgetStack::setPageName( const TQCString& name ) -{ - if ( visibleWidget() ) - visibleWidget()->setName( name ); -} - -int QDesignerWidgetStack::count() const -{ - return pages.count(); -} - -TQWidget* QDesignerWidgetStack::page( int i ) const -{ - if ( i < 0 || i >= count() ) - return 0; - QDesignerWidgetStack* that = (QDesignerWidgetStack*) this; - return that->pages.at( i ); -} - - -int QDesignerWidgetStack::insertPage( TQWidget *p, int i ) -{ - if ( i < 0 ) - pages.append( p ); - else - pages.insert( (uint) i, p ); - addWidget( p ); - p->show(); - raiseWidget( p ); - TQApplication::sendPostedEvents(); - updateButtons(); - return pages.find( p ); -} - -int QDesignerWidgetStack::removePage( TQWidget *p ) -{ - int i = pages.find( p ); - pages.remove( p ); - removeWidget( p ); - setCurrentPage( 0 ); - updateButtons(); - return i; -} - - -int QDesignerWizard::currentPageNum() const -{ - for ( int i = 0; i < pageCount(); ++i ) { - if ( page( i ) == currentPage() ) - return i; - } - return 0; -} - - - - - -void QDesignerWizard::setCurrentPage( int i ) -{ - if ( i < currentPageNum() ) { - while ( i < currentPageNum() ) { - if ( currentPageNum() == 0 ) - break; - back(); - } - - } else { - while ( i > currentPageNum() ) { - if ( currentPageNum() == pageCount() - 1 ) - break; - next(); - } - } -} - -TQString QDesignerWizard::pageTitle() const -{ - return title( currentPage() ); -} - -void QDesignerWizard::setPageTitle( const TQString& title ) -{ - setTitle( currentPage(), title ); -} - -void QDesignerWizard::setPageName( const TQCString& name ) -{ - if ( TQWizard::currentPage() ) - TQWizard::currentPage()->setName( name ); -} - -TQCString QDesignerWizard::pageName() const -{ - if ( !TQWizard::currentPage() ) - return 0; - return TQWizard::currentPage()->name(); -} - -int QDesignerWizard::pageNum( TQWidget *p ) -{ - for ( int i = 0; i < pageCount(); ++i ) { - if ( page( i ) == p ) - return i; - } - return -1; -} - -void QDesignerWizard::addPage( TQWidget *p, const TQString &t ) -{ - TQWizard::addPage( p, t ); - if ( removedPages.find( p ) ) - removedPages.remove( p ); -} - -void QDesignerWizard::removePage( TQWidget *p ) -{ - TQWizard::removePage( p ); - removedPages.insert( p, p ); -} - -void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index ) -{ - TQWizard::insertPage( p, t, index ); - if ( removedPages.find( p ) ) - removedPages.remove( p ); -} - -TQMap< int, TQMap< TQString, TQVariant> > *defaultProperties = 0; -TQMap< int, TQStringList > *changedProperties = 0; - -/*! - \class WidgetFactory widgetfactory.h - \brief Set of static functions for creating widgets, layouts and do other stuff - - The widget factory offers functions to create widgets, create and - delete layouts find out other details - all based on the - WidgetDatabase's data. So the functions that use ids use the same - ids as in the WidgetDatabase. -*/ - - -void WidgetFactory::saveDefaultProperties( TQObject *w, int id ) -{ - TQMap< TQString, TQVariant> propMap; - TQStrList lst = w->metaObject()->propertyNames( TRUE ); - for ( uint i = 0; i < lst.count(); ++i ) { - TQVariant var = w->property( lst.at( i ) ); - if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 ) - var = TQVariant( TQPixmap() ); - else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 ) - var = TQVariant( TQIconSet() ); - propMap.replace( lst.at( i ), var ); - } - defaultProperties->replace( id, propMap ); -} - -void WidgetFactory::saveChangedProperties( TQObject *w, int id ) -{ - TQStringList l = MetaDataBase::changedProperties( w ); - changedProperties->insert( id, l ); -} - -/*! Creates a widget of the type which is registered as \a id as - child of \a parent. The \a name is optional. If \a init is TRUE, the - widget is initialized with some defaults, else the plain widget is - created. -*/ - -TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) -{ - TQString n = WidgetDatabase::className( id ); - if ( n.isEmpty() ) - return 0; - - if ( !defaultProperties ) { - defaultProperties = new TQMap< int, TQMap< TQString, TQVariant> >(); - changedProperties = new TQMap< int, TQStringList >(); - } - - TQWidget *w = 0; - TQString str = WidgetDatabase::createWidgetName( id ); - const char *s = str.latin1(); - w = createWidget( n, parent, name ? name : s, init, r, orient ); - if ( ::tqqt_cast(w) ) - ( (TQScrollView*)w )->disableSizeHintCaching(); - if ( !w && WidgetDatabase::isCustomWidget( id ) ) - w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) ); - if ( !w ) - return 0; - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - - if ( !defaultProperties->contains( id ) ) - saveDefaultProperties( TQT_TQOBJECT(w), id ); - if ( !changedProperties->contains( id ) ) - saveChangedProperties( TQT_TQOBJECT(w), id ); - - return w; -} - -/*! Creates a layout on the widget \a widget of the type \a type - which can be \c HBox, \c VBox or \c Grid. -*/ - -TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, LayoutType type ) -{ - int spacing = MainWindow::self->currentLayoutDefaultSpacing(); - int margin = 0; - - int metaspacing = MetaDataBase::spacing( TQT_TQOBJECT(widget) ); - int metamargin = MetaDataBase::margin( TQT_TQOBJECT(widget) ); - - if ( ::tqqt_cast(widget) && - ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && ::tqqt_cast(widget->parentWidget()) ) ) - margin = MainWindow::self->currentLayoutDefaultMargin(); - - if ( !layout && ::tqqt_cast(widget) ) - widget = ((TQTabWidget*)widget)->currentPage(); - - if ( !layout && ::tqqt_cast(widget) ) - widget = ((TQWizard*)widget)->currentPage(); - - if ( !layout && ::tqqt_cast(widget) ) - widget = ((TQMainWindow*)widget)->centralWidget(); - - if ( !layout && ::tqqt_cast(widget) ) - widget = ((TQWidgetStack*)widget)->visibleWidget(); - - if ( !layout && ::tqqt_cast(widget) ) - widget = ((TQToolBox*)widget)->currentItem(); - - MetaDataBase::addEntry( TQT_TQOBJECT(widget) ); - - TQLayout *l = 0; - int align = 0; - if ( !layout && ::tqqt_cast(widget) ) { - TQGroupBox *gb = (TQGroupBox*)widget; - gb->setColumnLayout( 0, Qt::Vertical ); - layout = gb->layout(); - layout->setMargin( 0 ); - layout->setSpacing( 0 ); - switch ( type ) { - case HBox: - l = new TQHBoxLayout( layout ); - break; - case VBox: - l = new TQVBoxLayout( layout ); - break; - case Grid: - l = new QDesignerGridLayout( layout ); - break; - default: - return 0; - } - align = TQt::AlignTop; - MetaDataBase::setMargin( TQT_TQOBJECT(gb), metamargin ); - MetaDataBase::setSpacing( TQT_TQOBJECT(gb), metaspacing ); - } else { - if ( layout ) { - switch ( type ) { - case HBox: - l = new TQHBoxLayout( layout ); - break; - case VBox: - l = new TQVBoxLayout( layout ); - break; - case Grid: - l = new QDesignerGridLayout( layout ); - break; - default: - return 0; - } - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - l->setSpacing( spacing ); - l->setMargin( margin ); - } else { - switch ( type ) { - case HBox: - l = new TQHBoxLayout( widget ); - break; - case VBox: - l = new TQVBoxLayout( widget ); - break; - case Grid: - l = new QDesignerGridLayout( widget ); - break; - default: - return 0; - } - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - if ( widget ) { - MetaDataBase::setMargin( TQT_TQOBJECT(widget), metamargin ); - MetaDataBase::setSpacing( TQT_TQOBJECT(widget), metaspacing ); - } else { - l->setMargin( margin ); - l->setSpacing( spacing ); - } - } - } - l->setAlignment( align ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - return l; -} - -void WidgetFactory::deleteLayout( TQWidget *widget ) -{ - if ( !widget ) - return; - - if ( ::tqqt_cast(widget) ) - widget = ((TQTabWidget*)widget)->currentPage(); - if ( ::tqqt_cast(widget) ) - widget = ((TQWizard*)widget)->currentPage(); - if ( ::tqqt_cast(widget) ) - widget = ((TQMainWindow*)widget)->centralWidget(); - if ( ::tqqt_cast(widget) ) - widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( ::tqqt_cast(widget) ) - widget = ((TQToolBox*)widget)->currentItem(); - delete widget->layout(); -} - -/*! Factory functions for creating a widget of the type \a className - as child of \a parent with the name \a name. - - If \a init is TRUE, some initial default properties are set. This - has to be in sync with the initChangedProperties() function! -*/ - -TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, - const TQRect *r, Qt::Orientation orient ) -{ - if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { - TQPushButton *b = 0; - if ( init ) { - b = new QDesignerPushButton( parent, name ); - b->setText( TQString::fromLatin1( name ) ); - } else { - b = new QDesignerPushButton( parent, name ); - } - TQWidget *w = find_formwindow( b ); - b->setAutoDefault( w && ::tqqt_cast(((FormWindow*)w)->mainContainer()) ); - return b; - } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { - if ( init ) { - QDesignerToolButton *tb = new QDesignerToolButton( parent, name ); - if ( ::tqqt_cast(widgetOfContainer(parent))) { - tb->setUsesTextLabel(TRUE); - tb->setTextLabel("..."); - tb->setAutoRaise(TRUE); - tb->setTextPosition(TQToolButton::BesideIcon); - } else { - tb->setText( "..." ); - } - return tb; - } - return new QDesignerToolButton( parent, name ); - } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { - if ( init ) { - QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name ); - cb->setText( TQString::fromLatin1( name ) ); - return cb; - } - return new QDesignerCheckBox( parent, name ); - } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { - if ( init ) { - QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name ); - rb->setText( TQString::fromLatin1( name ) ); - return rb; - } - return new QDesignerRadioButton( parent, name ); - } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { - if ( init ) - return new TQGroupBox( TQString::fromLatin1( name ), parent, name ); - return new TQGroupBox( parent, name ); - } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { - if ( init ) - return new TQButtonGroup( TQString::fromLatin1( name ), parent, name ); - return new TQButtonGroup( parent, name ); - } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { -#if !defined(TQT_NO_ICONVIEW) - TQIconView* iv = new TQIconView( parent, name ); - if ( init ) - (void) new TQIconViewItem( iv, i18n( "New Item" ) ); - return iv; -#else - return 0; -#endif - } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { -#if !defined(TQT_NO_TABLE) - if ( init ) - return new TQTable( 3, 3, parent, name ); - return new TQTable( parent, name ); -#else - return 0; -#endif -#ifndef TQT_NO_SQL - } else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { - return new TQDataTable( parent, name ); -#endif //TQT_NO_SQL - } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { - return new TQDateEdit( parent, name ); - } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { - return new TQTimeEdit( parent, name ); - } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { - return new TQDateTimeEdit( parent, name ); - } - else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { - TQListBox* lb = new TQListBox( parent, name ); - if ( init ) { - lb->insertItem( i18n( "New Item" ) ); - lb->setCurrentItem( 0 ); - } - return lb; - } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { - TQListView *lv = new TQListView( parent, name ); - lv->setSorting( -1 ); - if ( init ) { - lv->addColumn( i18n( "Column 1" ) ); - lv->setCurrentItem( new TQListViewItem( lv, i18n( "New Item" ) ) ); - } - return lv; - } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) - return new TQLineEdit( parent, name ); - else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) - return new TQSpinBox( parent, name ); - else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) - return new TQSplitter( parent, name ); - else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) - return new TQMultiLineEdit( parent, name ); - else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) - return new TQTextEdit( parent, name ); - else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" ) { - QDesignerLabel *l = new QDesignerLabel( parent, name ); - if ( init ) { - l->setText( TQString::fromLatin1( name ) ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "text", TRUE ); - } - return l; - } else if ( className == "PixmapLabel" ) { - QDesignerLabel *l = new QDesignerLabel( parent, name ); - if ( init ) { - l->setPixmap( BarIcon( "designer_qtlogo.png", TDevDesignerPartFactory::instance() ) ); - l->setScaledContents( TRUE ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "pixmap", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "scaledContents", TRUE ); - } - return l; - } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) - return new TQLayoutWidget( parent, name ); - else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { - TQTabWidget *tw = new QDesignerTabWidget( parent, name ); - if ( init ) { - FormWindow *fw = find_formwindow( parent ); - TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); - tw->addTab( w, i18n("Tab 1") ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); - tw->addTab( w, i18n("Tab 2") ); - MetaDataBase::addEntry( TQT_TQOBJECT(tw) ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - } - return tw; - } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { - QDesignerWidgetStack *ws = new QDesignerWidgetStack( parent, name ); - if ( init ) { - FormWindow *fw = find_formwindow( parent ); - TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" ); - ws->insertPage( w ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - MetaDataBase::addEntry( TQT_TQOBJECT(ws) ); - } - return ws; - } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { - return new TQComboBox( FALSE, parent, name ); - } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { - if ( parent && - ( ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) ) ) { - FormWindow *fw = find_formwindow( parent ); - if ( fw ) { - QDesignerWidget *dw = new QDesignerWidget( fw, parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); - return dw; - } - } - return new TQWidget( parent, name ); - } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { - TQDialog *dia = 0; - if ( ::tqqt_cast(parent) ) - dia = new QDesignerDialog( (FormWindow*)parent, parent, name ); - else - dia = new TQDialog( parent, name ); -#if defined(TQT_NON_COMMERCIAL) - if ( ::tqqt_cast(parent) ) -#else - if ( parent ) -#endif - dia->reparent( parent, TQPoint( 0, 0 ), TRUE ); - return dia; - } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { - TQWizard *wiz = new QDesignerWizard( parent, name ); -#if defined(TQT_NON_COMMERCIAL) - if ( ::tqqt_cast(parent) ) -#else - if ( parent ) -#endif - wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); - if ( init && ::tqqt_cast(parent) ) { - QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); - wiz->addPage( dw, i18n( "Page" ) ); - TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) ); - } - return wiz; - } else if ( className == "Spacer" ) { - Spacer *s = new Spacer( parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "sizeType", TRUE ); - if ( !r ) - return s; - if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) - s->setOrientation( orient ); - else if ( r->width() < r->height() ) - s->setOrientation( Qt::Vertical ); - else - s->setOrientation( Qt::Horizontal ); - return s; - } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) - return new TQLCDNumber( parent, name ); - else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) - return new TQProgressBar( parent, name ); - else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) - return new TQTextView( parent, name ); - else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) - return new TQTextBrowser( parent, name ); - else if ( className == TQDIAL_OBJECT_NAME_STRING ) - return new TQDial( parent, name ); - else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { - TQSlider *s = new TQSlider( parent, name ); - if ( !r ) - return s; - if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) - s->setOrientation( orient ); - else if ( r->width() > r->height() ) - s->setOrientation( Qt::Horizontal ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); - return s; - } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { - TQScrollBar *s = new TQScrollBar( parent, name ); - if ( !r ) - return s; - if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) - s->setOrientation( orient ); - else if ( r->width() > r->height() ) - s->setOrientation( Qt::Horizontal ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); - return s; - } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { - if ( !init ) - return new TQFrame( parent, name ); - TQFrame *f = new TQFrame( parent, name ); - f->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised ); - return f; - } else if ( className == "Line" ) { - Line *l = new Line( parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "orientation", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShadow", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShape", TRUE ); - if ( !r ) - return l; - if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) - l->setOrientation( orient ); - else if ( r->width() < r->height() ) - l->setOrientation( Qt::Vertical ); - return l; - } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { - TQMainWindow *mw = new TQMainWindow( parent, name, 0 ); - mw->setDockEnabled( TQt::DockMinimized, FALSE ); - QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" ); - mw->setDockMenuEnabled( FALSE ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); - mw->setCentralWidget( dw ); - (void)mw->statusBar(); - dw->show(); - return mw; - } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { - if ( !init ) - return new QDesignerToolBox( parent, name ); - TQToolBox *tb = new QDesignerToolBox( parent, name ); - FormWindow *fw = find_formwindow( parent ); - TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) : - new TQWidget( tb, "page1" ); - tb->addItem( w, i18n("Page 1") ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new TQWidget( tb, "page2" ); - tb->addItem( w, i18n("Page 2") ); - MetaDataBase::addEntry( TQT_TQOBJECT(tb) ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - return tb; - } -#ifndef TQT_NO_SQL - else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { - TQWidget *w = new QDesignerDataBrowser( parent, name ); - if ( parent ) - w->reparent( parent, TQPoint( 0, 0 ), TRUE ); - return w; - } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { - TQWidget *w = new QDesignerDataView( parent, name ); - if ( parent ) - w->reparent( parent, TQPoint( 0, 0 ), TRUE ); - return w; - } -#endif - - WidgetInterface *iface = 0; - widgetManager()->queryInterface( className, &iface ); - if ( !iface ) - return 0; - - TQWidget *w = iface->create( className, parent, name ); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - if ( init && WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( className ) ) ) { - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( iface2 ) { - iface2->addPage( className, w, "Page", -1 ); - iface2->release(); - } - } -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - iface->release(); - return w; -} - - - -/*! Find out which type the layout of the widget is. Returns \c HBox, - \c VBox, \c Grid or \c NoLayout. \a layout points to this - TQWidget::layout() of \a w or to 0 after the function call. -*/ - -WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&layout ) -{ - layout = 0; - - if ( ::tqqt_cast(w) ) - w = ((TQTabWidget*)w)->currentPage(); - if ( ::tqqt_cast(w) ) - w = ((TQWizard*)w)->currentPage(); - if ( ::tqqt_cast(w) ) - w = ((TQMainWindow*)w)->centralWidget(); - if ( ::tqqt_cast(w) ) - w = ((TQWidgetStack*)w)->visibleWidget(); - if ( ::tqqt_cast(w) ) - w = ((TQToolBox*)w)->currentItem(); - - if ( ::tqqt_cast(w) ) - return ( (TQSplitter*)w )->orientation() ==Qt::Horizontal ? HBox : VBox; - - if ( !w || !w->layout() ) - return NoLayout; - TQLayout *lay = w->layout(); - - if ( ::tqqt_cast(w) ) { - TQObjectList *l = TQT_TQOBJECT(lay)->queryList( TQLAYOUT_OBJECT_NAME_STRING ); - if ( l && l->first() ) - lay = (TQLayout*)l->first(); - delete l; - } - layout = lay; - - if ( ::tqqt_cast(lay) ) - return HBox; - else if ( ::tqqt_cast(lay) ) - return VBox; - else if ( ::tqqt_cast(lay) ) - return Grid; - return NoLayout; -} - -/*! - \overload -*/ -WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout ) -{ - if ( ::tqqt_cast(layout) ) - return HBox; - else if ( ::tqqt_cast(layout) ) - return VBox; - else if ( ::tqqt_cast(layout) ) - return Grid; - return NoLayout; -} - -/*! - \overload -*/ -WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w ) -{ - TQLayout *l = 0; - return layoutType( w, l ); -} - - -TQWidget *WidgetFactory::layoutParent( TQLayout *layout ) -{ - TQObject *o = TQT_TQOBJECT(layout); - while ( o ) { - if ( o->isWidgetType() ) - return (TQWidget*)o; - o = o->parent(); - } - return 0; -} - -/*! Returns the widget into which children should be inserted when \a - w is a container known to the designer. - - Usually that is \a w itself, sometimes it is different (e.g. a - tabwidget is known to the designer as a container but the child - widgets should be inserted into the current page of the - tabwidget. So in this case this function returns the current page of - the tabwidget.) - */ -TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) -{ - if ( !w ) - return w; - if ( ::tqqt_cast(w) ) - return ((TQTabWidget*)w)->currentPage(); - if ( ::tqqt_cast(w) ) - return ((TQWizard*)w)->currentPage(); - if ( ::tqqt_cast(w) ) - return ((TQWidgetStack*)w)->visibleWidget(); - if ( ::tqqt_cast(w) ) - return ((TQToolBox*)w)->currentItem(); - if ( ::tqqt_cast(w) ) - return ((TQMainWindow*)w)->centralWidget(); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ) - return w; - WidgetInterface *iface = 0; - widgetManager()->queryInterface( classNameOf( w ), &iface ); - if ( !iface ) - return w; - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( !iface2 ) - return w; - TQWidget *c = iface2->containerOfWidget( w->className(), w ); - iface2->release(); - iface->release(); - if ( c ) - return c; -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - return w; -} - -/*! Returns the actual designer widget of the container \a w. This is - normally \a w itself, but might be a parent or grand parent of \a w - (e.g. when working with a tabwidget and \a w is the container which - contains and layouts childs, but the actual widget known to the - designer is the tabwidget which is the parent of \a w. So this - function returns the tabwidget then.) -*/ - -TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) -{ - if ( w && ::tqqt_cast(w->parentWidget()) ) - w = w->parentWidget(); - if ( w->parentWidget() && w->parentWidget()->parentWidget() && - w->parentWidget()->parentWidget()->parentWidget() && - ::tqqt_cast(w->parentWidget()->parentWidget()->parentWidget()) ) - return w->parentWidget()->parentWidget()->parentWidget(); - while ( w ) { - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ); - if ( WidgetDatabase::isContainer( id ) || - w && ::tqqt_cast(w->parentWidget()) ) - return w; - w = w->parentWidget(); - } - return w; -} - -/*! - Returns whether \a o is a passive interactor or not. - */ - -bool WidgetFactory::lastWasAPassiveInteractor = FALSE; -TQGuardedPtr *WidgetFactory::lastPassiveInteractor = new TQGuardedPtr(); - -bool WidgetFactory::isPassiveInteractor( TQObject* o ) -{ - if ( lastPassiveInteractor && *lastPassiveInteractor && (TQObject*)(*lastPassiveInteractor) == o ) - return lastWasAPassiveInteractor; - lastWasAPassiveInteractor = FALSE; - (*lastPassiveInteractor) = o; - if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things - return ( lastWasAPassiveInteractor = TRUE ); - - if ( ::tqqt_cast(o) ) - return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) ) - return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) && - ( ::tqqt_cast(o->parent()) || ::tqqt_cast(o->parent()) ) ) - return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) && ::tqqt_cast(o->parent()) ) - return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) && ::tqqt_cast(o->parent()) ) - return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::tqqt_cast(o) ) - else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) ) - return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::tqqt_cast(o) ) - else if ( o->inherits( TQHIDEDOCK_OBJECT_NAME_STRING ) ) - return ( lastWasAPassiveInteractor = TRUE ); - else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 ) - return ( lastWasAPassiveInteractor = TRUE ); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - if ( !o->isWidgetType() ) - return ( lastWasAPassiveInteractor = FALSE ); - WidgetInterface *iface = 0; - TQWidget *w = (TQWidget*)o; - while ( !iface && w && !::tqqt_cast(w) ) { - widgetManager()->queryInterface( classNameOf( w ), &iface ); - w = w->parentWidget(); - } - if ( !iface ) - return ( lastWasAPassiveInteractor = FALSE ); - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( !iface2 ) - return ( lastWasAPassiveInteractor = FALSE ); - TQWidget *fw = MainWindow::self->isAFormWindowChild( (TQWidget*)o ); - if ( !fw ) - return ( lastWasAPassiveInteractor = FALSE ); - TQWidget *dw = ( (FormWindow*)fw )->designerWidget( (TQWidget*)o ); - if ( !dw ) - return ( lastWasAPassiveInteractor = FALSE ); - lastWasAPassiveInteractor = iface2->isPassiveInteractor( dw->className(), (TQWidget*)o ); - iface2->release(); - iface->release(); -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - return lastWasAPassiveInteractor; -} - - -/*! - Returns the class name of object \a o that should be used for externally (i.e. for saving) - */ -const char* WidgetFactory::classNameOf( TQObject* o ) -{ - if ( o->isA( "PropertyObject" ) ) - return o->className(); - if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className()))) - return o->className(); - else if ( ::tqqt_cast(o) ) - return TQTABWIDGET_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQWIDGETSTACK_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return "TQWeDoNotWantToBreakTabWidget"; - else if ( ::tqqt_cast(o) ) - return TQDIALOG_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQWIDGET_OBJECT_NAME_STRING; - else if ( o->inherits( "CustomWidget" ) ) - return ( (CustomWidget*)o )->realClassName().latin1(); - else if ( ::tqqt_cast(o) ) - return TQLABEL_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQWIZARD_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQPUSHBUTTON_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQTOOLBUTTON_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQRADIOBUTTON_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQCHECKBOX_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQMENUBAR_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQTOOLBAR_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQACTION_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQACTIONGROUP_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQPOPUPMENU_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQTOOLBOX_OBJECT_NAME_STRING; -#ifndef TQT_NO_SQL - else if ( ::tqqt_cast(o) ) - return TQDATABROWSER_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQDATAVIEW_OBJECT_NAME_STRING; -#endif - return o->className(); -} - -TQString WidgetFactory::defaultSignal( TQObject *w ) -{ - if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) - return "toggled"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) - return "clicked"; - else if ( ::tqqt_cast(w) ) - return "linkClicked"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) - return "textChanged"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) || ::tqqt_cast(w) ) - return "selectionChanged"; - else if ( ::tqqt_cast(w) ) - return "selected"; - else if ( ::tqqt_cast(w) ) - return "currentChanged"; - else if ( ::tqqt_cast(w) ) - return "aboutToShow"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) ) - return "valueChanged"; - else if ( ::tqqt_cast(w) ) - return "activated"; - return TQString(); -} - -/*! As some properties are set by default when creating a widget this - functions markes this properties as changed. Has to be in sync with - createWidget()! -*/ - -void WidgetFactory::initChangedProperties( TQObject *o ) -{ - if ( MainWindow::self && MainWindow::self->currProject() && - MainWindow::self->currProject()->fakeFormFileFor( o ) ) - return; - MetaDataBase::setPropertyChanged( o, "name", TRUE ); - if ( !::tqqt_cast(o) && !::tqqt_cast(o) ) - MetaDataBase::setPropertyChanged( o, "geometry", TRUE ); - - if ( ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) { - if (::tqqt_cast(o) && ::tqqt_cast(widgetOfContainer((TQWidget*)o->parent()))) { - MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE ); - MetaDataBase::setPropertyChanged( o, "textLabel", TRUE ); - MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE ); - MetaDataBase::setPropertyChanged( o, "textPosition", TRUE ); - } else { - MetaDataBase::setPropertyChanged( o, "text", TRUE ); - } - } - else if ( ::tqqt_cast(o) ) - MetaDataBase::setPropertyChanged( o, "title", TRUE ); - else if ( o->isA( TQFRAME_OBJECT_NAME_STRING ) ) { - MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); - MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); - } else if ( ::tqqt_cast(o) || ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE ); - MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); - MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); - } else if ( ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); - MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); - } else if ( ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemIconSet", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE ); -#ifndef TQT_NO_TABLE - } else if ( ::tqqt_cast(o) ) { -# ifndef TQT_NO_SQL - if (!::tqqt_cast(o) ) -# endif - { - MetaDataBase::setPropertyChanged( o, "numRows", TRUE ); - MetaDataBase::setPropertyChanged( o, "numCols", TRUE ); - TQTable *t = (TQTable*)o; - for ( int i = 0; i < 3; ++i ) { - t->horizontalHeader()->setLabel( i, TQString::number( i + 1 ) ); - t->verticalHeader()->setLabel( i, TQString::number( i + 1 ) ); - } - } -#endif - } else if ( ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "orientation", TRUE ); - } else if ( ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "label", TRUE ); - } else if ( ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemText", TRUE ); - } -} - -bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) -{ - TQString className = WidgetDatabase::className( id ); - - if ( className.contains( "ListBox" ) ) - return TRUE; - if ( className.contains( "ComboBox" ) ) - return TRUE; - if ( className.contains( "ListView" ) ) - return TRUE; - if ( className.contains( "IconView" ) ) - return TRUE; - if ( className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) - return TRUE; - if ( ::tqqt_cast(editorWidget) != 0 ) - return TRUE; - - return FALSE; -} - -bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) -{ - TQString className = WidgetDatabase::className( id ); - - if ( className.contains( "ListBox" ) || className.contains( "ListView" ) || - className.contains( "IconView" ) || className.contains( "ComboBox" ) || - ::tqqt_cast(editorWidget) != 0 ) - return TRUE; - - return FALSE; -} - -void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) -{ - TQString className = WidgetDatabase::className( id ); - - if ( className.contains( "ListBox" ) ) { - if ( !::tqqt_cast(editWidget) ) - return; - ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw ); - e->exec(); - delete e; - return; - } - - if ( className.contains( "ComboBox" ) ) { - if ( !::tqqt_cast(editWidget) ) - return; - TQComboBox *cb = (TQComboBox*)editWidget; - ListBoxEditor *e = new ListBoxEditor( parent, cb->listBox(), fw ); - e->exec(); - delete e; - cb->update(); - return; - } - - if ( className.contains( "ListView" ) ) { - if ( !::tqqt_cast(editWidget) ) - return; - TQListView *lv = (TQListView*)editWidget; - ListViewEditor *e = new ListViewEditor( parent, lv, fw ); - e->exec(); - delete e; - return; - } - - if ( className.contains( "IconView" ) ) { - if ( !::tqqt_cast(editWidget) ) - return; - IconViewEditor *e = new IconViewEditor( parent, editWidget, fw ); - e->exec(); - delete e; - return; - } - - if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING ) { - MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw ); - e->exec(); - delete e; - return; - } -#ifndef TQT_NO_TABLE - if (::tqqt_cast(editWidget) != 0) { - TableEditor *e = new TableEditor( parent, editWidget, fw ); - e->exec(); - delete e; - return; - } -#endif -} - -bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName ) -{ - if ( propName == "name" || propName == "geometry" ) - return FALSE; - TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); - return l.findIndex( propName ) == -1; -} - -bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName ) -{ - const TQMetaProperty *p = w->metaObject()->property( w->metaObject()-> - findProperty( propName, TRUE ), TRUE ); - if (!p ) - return FALSE; - return p->reset( w ); -} - -TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) -{ - if ( propName == "wordwrap" ) { - int v = defaultValue( w, "alignment" ).toInt(); - return TQVariant( ( v & WordBreak ) == WordBreak, 0 ); - } else if ( propName == "toolTip" || propName == "whatsThis" ) { - return TQVariant( TQString::fromLatin1( "" ) ); - } else if ( w->inherits( "CustomWidget" ) ) { - return TQVariant(); - } else if ( propName == "frameworkCode" ) { - return TQVariant( TRUE, 0 ); - } else if ( propName == "layoutMargin" || propName == "layoutSpacing" ) { - return TQVariant( -1 ); - } - - return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName ); -} - -TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName ) -{ - const TQMetaProperty *p = w->metaObject()-> - property( w->metaObject()->findProperty( propName, TRUE ), TRUE ); - if ( !p ) { - int v = defaultValue( w, "alignment" ).toInt(); - if ( propName == "hAlign" ) { - if ( ( v & AlignAuto ) == AlignAuto ) - return "AlignAuto"; - if ( ( v & AlignLeft ) == AlignLeft ) - return "AlignLeft"; - if ( ( v & AlignCenter ) == AlignCenter || ( v & AlignHCenter ) == AlignHCenter ) - return "AlignHCenter"; - if ( ( v & AlignRight ) == AlignRight ) - return "AlignRight"; - if ( ( v & AlignJustify ) == AlignJustify ) - return "AlignJustify"; - } else if ( propName == "vAlign" ) { - if ( ( v & AlignTop ) == AlignTop ) - return "AlignTop"; - if ( ( v & AlignCenter ) == AlignCenter || ( v & AlignVCenter ) == AlignVCenter ) - return "AlignVCenter"; - if ( ( v & AlignBottom ) == AlignBottom ) - return "AlignBottom"; - } else if ( propName == "resizeMode" ) { - return "Auto"; - } - return TQString(); - - } - return p->valueToKey( defaultValue( w, propName ).toInt() ); -} - -TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w ) -{ - if ( !w ) - return 0; - return new CustomWidget( parent, name, w ); -} - -TQVariant WidgetFactory::property( TQObject *w, const char *name ) -{ - int id = w->metaObject()->findProperty( name, TRUE ); - const TQMetaProperty* p = w->metaObject()->property( id, TRUE ); - if ( !p || !p->isValid() ) - return MetaDataBase::fakeProperty( w, name ); - return w->property( name ); -} - -void QDesignerLabel::updateBuddy() -{ - - if ( myBuddy.isEmpty() ) - return; - - TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, FALSE, TRUE ); - if ( !l || !l->first() ) { - delete l; - return; - } - - TQLabel::setBuddy( (TQWidget*)l->first() ); - delete l; -} - - -void QDesignerWidget::resizeEvent( TQResizeEvent* e) -{ - if ( need_frame ) { - TQPainter p(this); - p.setPen( backgroundColor() ); - p.drawRect( TQRect( TQPoint(0,0), e->oldSize() ) ); - } -} - -void QDesignerWidget::paintEvent( TQPaintEvent *e ) -{ - if ( need_frame ) { - TQPainter p(this); - p.setPen( backgroundColor().dark() ); - p.drawRect( rect() ); - } - formwindow->paintGrid( this, e ); -} - -void QDesignerDialog::paintEvent( TQPaintEvent *e ) -{ - formwindow->paintGrid( this, e ); -} - -TQSizePolicy TQLayoutWidget::sizePolicy() const -{ - return sp; -} - -bool TQLayoutWidget::event( TQEvent *e ) -{ - if ( e && ( e->type() == TQEvent::ChildInserted || - e->type() == TQEvent::ChildRemoved || - e->type() == TQEvent::LayoutHint || - e->type() == TQEvent::Reparent ) ) - updateSizePolicy(); - return TQWidget::event( e ); -} - -/* - This function must be called on TQLayoutWidget creation and whenever - the TQLayoutWidget's parent layout changes (e.g., from a TQHBoxLayout - to a TQVBoxLayout), because of the (illogical) way layouting works. -*/ -void TQLayoutWidget::updateSizePolicy() -{ - if ( childrenListObject().isEmpty() || childrenListObject().count() == 0 ) { - sp = TQWidget::sizePolicy(); - return; - } - - /* - TQSizePolicy::MayShrink & friends are private. Here we assume the - following: - - Fixed = 0 - Maximum = MayShrink - Minimum = MayGrow - Preferred = MayShrink | MayGrow - */ - - int ht = (int) TQSizePolicy::Preferred; - int vt = (int) TQSizePolicy::Preferred; - - if ( layout() ) { - /* - parentLayout is set to the parent layout if there is one and if it is - top level, in which case layouting is illogical. - */ - TQLayout *parentLayout = 0; - if ( parent() && parent()->isWidgetType() ) { - parentLayout = ((TQWidget *)parent())->layout(); - if ( parentLayout && - ::tqqt_cast(parentLayout->mainWidget()) ) - parentLayout = 0; - } - - TQObjectListIt it( childrenListObject() ); - TQObject *o; - - if ( ::tqqt_cast(layout()) ) { - if ( ::tqqt_cast(parentLayout) ) - vt = TQSizePolicy::Minimum; - else - vt = TQSizePolicy::Fixed; - - while ( ( o = it.current() ) ) { - ++it; - if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) - continue; - TQWidget *w = (TQWidget*)o; - - if ( !w->sizePolicy().mayGrowHorizontally() ) - ht &= ~TQSizePolicy::Minimum; - if ( !w->sizePolicy().mayShrinkHorizontally() ) - ht &= ~TQSizePolicy::Maximum; - if ( w->sizePolicy().mayGrowVertically() ) - vt |= TQSizePolicy::Minimum; - if ( w->sizePolicy().mayShrinkVertically() ) - vt |= TQSizePolicy::Maximum; - } - } else if ( ::tqqt_cast(layout()) ) { - if ( ::tqqt_cast(parentLayout) ) - ht = TQSizePolicy::Minimum; - else - ht = TQSizePolicy::Fixed; - - while ( ( o = it.current() ) ) { - ++it; - if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) - continue; - TQWidget *w = (TQWidget*)o; - - if ( w->sizePolicy().mayGrowHorizontally() ) - ht |= TQSizePolicy::Minimum; - if ( w->sizePolicy().mayShrinkHorizontally() ) - ht |= TQSizePolicy::Maximum; - if ( !w->sizePolicy().mayGrowVertically() ) - vt &= ~TQSizePolicy::Minimum; - if ( !w->sizePolicy().mayShrinkVertically() ) - vt &= ~TQSizePolicy::Maximum; - } - } else if ( ::tqqt_cast(layout()) ) { - ht = TQSizePolicy::Fixed; - vt = TQSizePolicy::Fixed; - if ( parentLayout ) { - if ( ::tqqt_cast(parentLayout) ) - ht = TQSizePolicy::Minimum; - else if ( ::tqqt_cast(parentLayout) ) - vt = TQSizePolicy::Minimum; - } - - while ( ( o = it.current() ) ) { - ++it; - if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) - continue; - TQWidget *w = (TQWidget*)o; - - if ( w->sizePolicy().mayGrowHorizontally() ) - ht |= TQSizePolicy::Minimum; - if ( w->sizePolicy().mayShrinkHorizontally() ) - ht |= TQSizePolicy::Maximum; - if ( w->sizePolicy().mayGrowVertically() ) - vt |= TQSizePolicy::Minimum; - if ( w->sizePolicy().mayShrinkVertically() ) - vt |= TQSizePolicy::Maximum; - } - } -#ifdef USE_QT4 - if ( layout()->expanding() & TQSizePolicy::Horizontally ) -#else // USE_QT4 - if ( layout()->expanding() & TQSizePolicy::Horizontally ) -#endif // USE_QT4 - ht = TQSizePolicy::Expanding; -#ifdef USE_QT4 - if ( layout()->expanding() & TQSizePolicy::Vertically ) -#else // USE_QT4 - if ( layout()->expanding() & TQSizePolicy::Vertically ) -#endif // USE_QT4 - vt = TQSizePolicy::Expanding; - - layout()->invalidate(); - } - - sp = TQSizePolicy( (TQSizePolicy::SizeType) ht, (TQSizePolicy::SizeType) vt ); - updateGeometry(); -} - -void CustomWidget::paintEvent( TQPaintEvent *e ) -{ - if ( ::tqqt_cast(parentWidget()) ) { - ( (FormWindow*)parentWidget() )->paintGrid( this, e ); - } else { - TQPainter p( this ); - p.fillRect( rect(), colorGroup().dark() ); - p.setPen( colorGroup().light() ); - p.drawText( 2, 2, width() - 4, height() - 4, TQt::AlignAuto | TQt::AlignTop, cusw->className ); - p.drawPixmap( ( width() - cusw->pixmap->width() ) / 2, - ( height() - cusw->pixmap->height() ) / 2, - *cusw->pixmap ); - } -} - - -CustomWidgetFactory::CustomWidgetFactory() -{ -} - -TQWidget *CustomWidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name ) const -{ - MetaDataBase::CustomWidget *w = MetaDataBase::customWidget( WidgetDatabase::idFromClassName( className ) ); - if ( !w ) - return 0; - return WidgetFactory::createCustomWidget( parent, name, w ); -} - - -QDesignerToolBox::QDesignerToolBox( TQWidget *parent, const char *name ) - : TQToolBox( parent, name ) -{ -} - -TQString QDesignerToolBox::itemLabel() const -{ - return TQToolBox::itemLabel( currentIndex() ); -} - -void QDesignerToolBox::setItemLabel( const TQString &l ) -{ - TQToolBox::setItemLabel( currentIndex(), l ); -} - -TQCString QDesignerToolBox::itemName() const -{ - return currentItem() ? currentItem()->name() : 0; -} - -void QDesignerToolBox::setItemName( const TQCString &n ) -{ - if (currentItem()) - currentItem()->setName( n ); -} - - -TQt::BackgroundMode QDesignerToolBox::itemBackgroundMode() const -{ - return (item(0) ? item(0)->backgroundMode() : PaletteBackground); -} - -void QDesignerToolBox::setItemBackgroundMode( BackgroundMode bmode ) -{ - for (int i = 0; i < count(); ++i) { - TQWidget *w = item(i); - w->setBackgroundMode( bmode ); - w->update(); - } -} - -void QDesignerToolBox::itemInserted( int index ) -{ - if (count() > 1) - item(index)->setBackgroundMode(item(index>0?0:1)->backgroundMode()); -} diff --git a/tdevdesigner/designer/widgetfactory.h b/tdevdesigner/designer/widgetfactory.h deleted file mode 100644 index feebe9c7..00000000 --- a/tdevdesigner/designer/widgetfactory.h +++ /dev/null @@ -1,515 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef WIDGETFACTORY_H -#define WIDGETFACTORY_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "metadatabase.h" -#include "tqwidgetfactory.h" - -class TQWidget; -class TQLayout; -class FormWindow; - -class CustomWidgetFactory : public TQWidgetFactory -{ -public: - CustomWidgetFactory(); - TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name ) const; - -}; - -class WidgetFactory : public TQt -{ - friend class CustomWidgetFactory; - -public: - enum LayoutType { - HBox, - VBox, - Grid, - NoLayout - }; - - static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = TRUE, - const TQRect *rect = 0, Orientation orient = TQt::Horizontal ); - static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type ); - static void deleteLayout( TQWidget *widget ); - - static LayoutType layoutType( TQWidget *w ); - static LayoutType layoutType( TQWidget *w, TQLayout *&layout ); - static LayoutType layoutType( TQLayout *layout ); - static TQWidget *layoutParent( TQLayout *layout ); - - static TQWidget* containerOfWidget( TQWidget *w ); - static TQWidget* widgetOfContainer( TQWidget *w ); - - static bool isPassiveInteractor( TQObject* o ); - static const char* classNameOf( TQObject* o ); - - static void initChangedProperties( TQObject *o ); - - static bool hasSpecialEditor( int id, TQObject *editorWidget ); - static bool hasItems( int id, TQObject *editorWidget ); - static void editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw ); - - static bool canResetProperty( TQObject *w, const TQString &propName ); - static bool resetProperty( TQObject *w, const TQString &propName ); - static TQVariant defaultValue( TQObject *w, const TQString &propName ); - static TQString defaultCurrentItem( TQObject *w, const TQString &propName ); - - static TQVariant property( TQObject *w, const char *name ); - static void saveDefaultProperties( TQObject *w, int id ); - static void saveChangedProperties( TQObject *w, int id ); - - static TQString defaultSignal( TQObject *w ); - -private: - static TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, - const TQRect *r = 0, Orientation orient = TQt::Horizontal ); - static TQWidget *createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w ); - - static TQGuardedPtr *lastPassiveInteractor; - static bool lastWasAPassiveInteractor; -}; - - -class QDesignerTabWidget : public TQTabWidget -{ - Q_OBJECT - - TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true ) - TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) - TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) -public: - QDesignerTabWidget( TQWidget *parent, const char *name ); - - int currentPage() const; - void setCurrentPage( int i ); - TQString pageTitle() const; - void setPageTitle( const TQString& title ); - TQCString pageName() const; - void setPageName( const TQCString& name ); - - int count() const; - TQTabBar *tabBar() const { return TQTabWidget::tabBar(); } - - bool eventFilter( TQObject*, TQEvent* ); - -private: - TQPoint pressPoint; - TQWidget *dropIndicator; - TQWidget *dragPage; - TQString dragLabel; - bool mousePressed; -}; - -class QDesignerWidgetStack : public TQWidgetStack -{ - Q_OBJECT - - TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true ) - TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) -public: - QDesignerWidgetStack( TQWidget *parent, const char *name ); - - int currentPage() const; - void setCurrentPage( int i ); - TQCString pageName() const; - void setPageName( const TQCString& name ); - - int count() const; - TQWidget* page( int i ) const; - - int insertPage( TQWidget *p, int i = -1 ); - int removePage( TQWidget *p ); - -public slots: - void updateButtons(); - -protected: - void resizeEvent( TQResizeEvent *e ) { - TQWidgetStack::resizeEvent( e ); - updateButtons(); - } - - void showEvent( TQShowEvent *e ) { - TQWidgetStack::showEvent( e ); - updateButtons(); - } - -private slots: - void prevPage(); - void nextPage(); - -private: - TQPtrList pages; - TQToolButton *prev, *next; - -}; - -class QDesignerWizard : public TQWizard -{ - Q_OBJECT - - TQ_PROPERTY( int currentPage READ currentPageNum WRITE setCurrentPage STORED false DESIGNABLE true ) - TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) - TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) - TQ_OVERRIDE( bool modal READ isModal WRITE setModal ) - -public: - QDesignerWizard( TQWidget *parent, const char *name ) - : TQWizard( parent, name ), modal(FALSE) {} - - int currentPageNum() const; - void setCurrentPage( int i ); - TQString pageTitle() const; - void setPageTitle( const TQString& title ); - TQCString pageName() const; - void setPageName( const TQCString& name ); - int pageNum( TQWidget *page ); - void addPage( TQWidget *p, const TQString & ); - void removePage( TQWidget *p ); - void insertPage( TQWidget *p, const TQString &t, int index ); - bool isPageRemoved( TQWidget *p ) { return (removedPages.find( p ) != 0); } - - bool isModal() const { return modal; } - void setModal(bool b) { modal = b; } - - void reject() {} - -private: - struct Page - { - Page( TQWidget *a, const TQString &b ) : p( a ), t( b ) {} - Page() : p( 0 ), t( TQString() ) {} - TQWidget *p; - TQString t; - }; - TQPtrDict removedPages; - bool modal; - -}; - -class TQLayoutWidget : public TQWidget -{ - Q_OBJECT - - -public: - TQLayoutWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ), sp( sizePolicy() ) {} - - TQSizePolicy sizePolicy() const; - void updateSizePolicy(); - -protected: - void paintEvent( TQPaintEvent * ); - bool event( TQEvent * ); - TQSizePolicy sp; - -}; - - -class CustomWidget : public TQWidget -{ - Q_OBJECT - - -public: - CustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *cw ) - : TQWidget( parent, name ), cusw( cw ) { - alwaysExpand = parentWidget() && parentWidget()->inherits( "FormWindow" ); - setSizePolicy( cw->sizePolicy ); - if ( !alwaysExpand ) - setBackgroundMode( PaletteDark ); - } - - TQSize sizeHint() const { - TQSize sh = cusw->sizeHint; - if ( sh.isValid() ) - return sh; - return TQWidget::sizeHint(); - } - - TQString realClassName() { return cusw->className; } - MetaDataBase::CustomWidget *customWidget() const { return cusw; } - -protected: - void paintEvent( TQPaintEvent *e ); - - MetaDataBase::CustomWidget *cusw; - bool alwaysExpand; - -}; - - -class Line : public TQFrame -{ - Q_OBJECT - - - TQ_PROPERTY( Orientation orientation READ orientation WRITE setOrientation ) - TQ_OVERRIDE( int frameWidth DESIGNABLE false ) - TQ_OVERRIDE( Shape frameShape DESIGNABLE false ) - TQ_OVERRIDE( TQRect frameRect DESIGNABLE false ) - TQ_OVERRIDE( TQRect contentsRect DESIGNABLE false ) -public: - Line( TQWidget *parent, const char *name ) - : TQFrame( parent, name, WMouseNoMask ) { - setFrameStyle( HLine | Sunken ); - } - - void setOrientation( Orientation orient ) { - if ( orient ==TQt::Horizontal ) - setFrameShape( HLine ); - else - setFrameShape( VLine ); - } - Orientation orientation() const { - return frameShape() == HLine ?TQt::Horizontal :TQt::Vertical; - } -}; - -class QDesignerLabel : public TQLabel -{ - Q_OBJECT - - - TQ_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget ) - -public: - QDesignerLabel( TQWidget *parent = 0, const char *name = 0 ) - : TQLabel( parent, name ) { myBuddy = 0; } - - void setBuddyWidget( const TQCString &b ) { - myBuddy = b; - updateBuddy(); - } - TQCString buddyWidget() const { - return myBuddy; - }; - -protected: - void showEvent( TQShowEvent *e ) { - TQLabel::showEvent( e ); - updateBuddy(); - } - - -private: - void updateBuddy(); - - TQCString myBuddy; - -}; - -class QDesignerWidget : public TQWidget -{ - Q_OBJECT - - -public: - QDesignerWidget( FormWindow *fw, TQWidget *parent, const char *name ) - : TQWidget( parent, name, WResizeNoErase ), formwindow( fw ) { - need_frame = parent && parent->inherits("QDesignerWidgetStack" ); - } - -protected: - void resizeEvent( TQResizeEvent* e); - void paintEvent( TQPaintEvent *e ); - -private: - FormWindow *formwindow; - uint need_frame : 1; - -}; - -class QDesignerDialog : public TQDialog -{ - Q_OBJECT - - TQ_OVERRIDE( bool modal READ isModal WRITE setModal ) - -public: - QDesignerDialog( FormWindow *fw, TQWidget *parent, const char *name ) - : TQDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ), modal(FALSE) {} - - bool isModal() const { return modal; } - void setModal(bool b) { modal = b; } - -protected: - void paintEvent( TQPaintEvent *e ); - -private: - FormWindow *formwindow; - bool modal; - -}; - -class QDesignerToolButton : public TQToolButton -{ - Q_OBJECT - - TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) - -public: - QDesignerToolButton( TQWidget *parent, const char *name ) - : TQToolButton( parent, name ) {} - - bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); - } - int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; - } - void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { - ( (TQButtonGroup*)parentWidget() )->remove( this ); - ( (TQButtonGroup*)parentWidget() )->insert( this, id ); - } - } -}; - -class QDesignerRadioButton : public TQRadioButton -{ - Q_OBJECT - - TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) - -public: - QDesignerRadioButton( TQWidget *parent, const char *name ) - : TQRadioButton( parent, name ) {} - - bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); - } - int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; - } - void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { - ( (TQButtonGroup*)parentWidget() )->remove( this ); - ( (TQButtonGroup*)parentWidget() )->insert( this, id ); - } - } - -}; - -class QDesignerPushButton : public TQPushButton -{ - Q_OBJECT - - TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) - -public: - QDesignerPushButton( TQWidget *parent, const char *name ) - : TQPushButton( parent, name ) {} - - bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); - } - int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; - } - void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { - ( (TQButtonGroup*)parentWidget() )->remove( this ); - ( (TQButtonGroup*)parentWidget() )->insert( this, id ); - } - } - -}; - -class QDesignerCheckBox : public TQCheckBox -{ - Q_OBJECT - - TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) - -public: - QDesignerCheckBox( TQWidget *parent, const char *name ) - : TQCheckBox( parent, name ) {} - - bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); - } - int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; - } - void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { - ( (TQButtonGroup*)parentWidget() )->remove( this ); - ( (TQButtonGroup*)parentWidget() )->insert( this, id ); - } - } - -}; - -class QDesignerToolBox : public TQToolBox -{ - Q_OBJECT - - TQ_PROPERTY( TQString itemLabel READ itemLabel WRITE setItemLabel STORED false DESIGNABLE true ) - TQ_PROPERTY( TQCString itemName READ itemName WRITE setItemName STORED false DESIGNABLE true ) - TQ_PROPERTY( BackgroundMode itemBackgroundMode READ itemBackgroundMode WRITE setItemBackgroundMode STORED false DESIGNABLE true ) - -public: - QDesignerToolBox( TQWidget *parent, const char *name ); - - TQString itemLabel() const; - void setItemLabel( const TQString &l ); - TQCString itemName() const; - void setItemName( const TQCString &n ); - BackgroundMode itemBackgroundMode() const; - void setItemBackgroundMode( BackgroundMode ); - -protected: - void itemInserted( int index ); -}; - -#endif diff --git a/tdevdesigner/designer/wizardeditor.ui b/tdevdesigner/designer/wizardeditor.ui deleted file mode 100644 index 84302d09..00000000 --- a/tdevdesigner/designer/wizardeditor.ui +++ /dev/null @@ -1,342 +0,0 @@ - -WizardEditorBase -********************************************************************* -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -********************************************************************* - - - WizardEditorBase - - - - 0 - 0 - 396 - 233 - - - - Wizard Page Editor - - - - unnamed - - - 11 - - - 6 - - - - Layout19 - - - - unnamed - - - 0 - - - 6 - - - - Layout14 - - - - unnamed - - - 0 - - - 2 - - - - pagesLabel - - - Wizard pages: - - - - - listBox - - - - - - - Layout18 - - - - unnamed - - - 0 - - - 6 - - - - buttonAdd - - - A&dd - - - - - buttonRemove - - - &Remove - - - - - Spacer11 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - buttonUp - - - - - - "designer_s_up.png" - - - - - buttonDown - - - - - - "designer_s_down.png" - - - - - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - buttonHelp - - - &Help - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - Close the dialog and apply all the changes. - - - - - buttonApply - - - &Apply - - - true - - - Apply all changes. - - - - - buttonCancel - - - &Cancel - - - true - - - Close the dialog and discard any changes. - - - - - - - - - buttonHelp - clicked() - WizardEditorBase - helpClicked() - - - buttonApply - clicked() - WizardEditorBase - applyClicked() - - - buttonUp - clicked() - WizardEditorBase - upClicked() - - - buttonDown - clicked() - WizardEditorBase - downClicked() - - - buttonAdd - clicked() - WizardEditorBase - addClicked() - - - buttonRemove - clicked() - WizardEditorBase - removeClicked() - - - listBox - selected(int) - WizardEditorBase - itemSelected(int) - - - listBox - highlighted(int) - WizardEditorBase - itemHighlighted(int) - - - buttonOk - clicked() - WizardEditorBase - okClicked() - - - buttonCancel - clicked() - WizardEditorBase - cancelClicked() - - - - init() - destroy() - addClicked() - applyClicked() - cancelClicked() - downClicked() - helpClicked() - itemHighlighted(int) - itemSelected(int) - okClicked() - removeClicked() - upClicked() - - - myiconloader.h - -BarIcon2 - - - diff --git a/tdevdesigner/designer/wizardeditorimpl.cpp b/tdevdesigner/designer/wizardeditorimpl.cpp deleted file mode 100644 index c4c4f83d..00000000 --- a/tdevdesigner/designer/wizardeditorimpl.cpp +++ /dev/null @@ -1,253 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "wizardeditorimpl.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "command.h" -#include "listboxdnd.h" -#include "listboxrename.h" - -#include -#include -#include -#include - -#include - -WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw ) - : WizardEditorBase( parent, 0 ), formwindow( fw ), wizard( w ), draggedItem( 0 ) -{ - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - fillListBox(); - - // Add drag and drop - ListBoxDnd *listBoxDnd = new ListBoxDnd( listBox ); - listBoxDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move ); - TQObject::connect( listBoxDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), - listBoxDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) ); - - TQObject::connect( listBoxDnd, TQT_SIGNAL( dragged( TQListBoxItem * ) ), - this, TQT_SLOT( itemDragged( TQListBoxItem * ) ) ); - TQObject::connect( listBoxDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), - this, TQT_SLOT( itemDropped( TQListBoxItem * ) ) ); - - // Add in-place rename - new ListBoxRename( listBox ); -} - -WizardEditor::~WizardEditor() -{ - commands.setAutoDelete( TRUE ); -} - -void WizardEditor::okClicked() -{ - applyClicked(); - accept(); -} - -void WizardEditor::cancelClicked() -{ - reject(); -} - -void WizardEditor::applyClicked() -{ - if ( commands.isEmpty() ) return; - - // schedule macro command - MacroCommand* cmd = new MacroCommand( i18n( "Edit Wizard Pages" ), formwindow, commands ); - formwindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - - // clear command list - commands.clear(); - - // fix wizard buttons - for ( int i = 0; i < wizard->pageCount(); i++ ) { - - TQWidget * page = wizard->page( i ); - if ( i == 0 ) { // first page - - wizard->setBackEnabled( page, FALSE ); - wizard->setNextEnabled( page, TRUE ); - } - else if ( i == wizard->pageCount() - 1 ) { // last page - - wizard->setBackEnabled( page, TRUE ); - wizard->setNextEnabled( page, FALSE ); - } - else { - - wizard->setBackEnabled( page, TRUE ); - wizard->setNextEnabled( page, TRUE ); - } - wizard->setFinishEnabled( page, FALSE ); - } - - // update listbox - int index = listBox->currentItem(); - fillListBox(); - listBox->setCurrentItem( index ); - - // show current page - wizard->showPage( wizard->page( 0 ) ); -} - -void WizardEditor::helpClicked() -{ - -} - -void WizardEditor::addClicked() -{ - int index = listBox->currentItem() + 1; - // update listbox - listBox->insertItem( i18n( "Page" ), index ); - - // schedule add command - AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ).arg( wizard->name() ), - formwindow, wizard, "Page", index, FALSE); - commands.append( cmd ); - - // update buttons - updateButtons(); -} - -void WizardEditor::removeClicked() -{ - if ( listBox->count() < 2 ) return; - - int index = listBox->currentItem(); - - // update listbox - listBox->removeItem( index ); - - // schedule remove command - DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ) - .arg( listBox->text( index ) ).arg( wizard->name() ), - formwindow, wizard, index, FALSE ); - commands.append( cmd ); - - // update buttons - updateButtons(); -} - -void WizardEditor::upClicked() -{ - int index1 = listBox->currentItem(); - int index2 = index1 - 1; - - // swap listbox items - TQString item1 = listBox->text( index1 ); - listBox->removeItem( index1 ); - listBox->insertItem( item1, index2 ); - listBox->setCurrentItem( index2 ); - - // schedule swap command - SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n( "Swap Pages %1 and %2 of %3" ).arg( index1 ).arg( index2 ) - .arg( wizard->name() ), formwindow, wizard, index1, index2); - commands.append( cmd ); - - // update buttons - updateButtons(); -} - -void WizardEditor::downClicked() -{ - int index1 = listBox->currentItem(); - int index2 = index1 + 1; - - // swap listbox items - TQString item1 = listBox->text( index1 ); - listBox->removeItem( index1 ); - listBox->insertItem( item1, index2 ); - listBox->setCurrentItem( index2 ); - - // schedule swap command - SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n( "Swap Pages %1 and %2 of %3" ).arg( index1 ).arg( index2 ).arg( wizard->name() ), formwindow, wizard, index2, index1); - commands.append( cmd ); - - // update buttons - updateButtons(); -} - -void WizardEditor::fillListBox() -{ - listBox->clear(); - - if ( !wizard ) return; - for ( int i = 0; i < wizard->pageCount(); i++ ) - listBox->insertItem( wizard->title( wizard->page( i ) ) ); - - updateButtons(); -} - -void WizardEditor::itemHighlighted( int ) -{ - updateButtons(); -} - -void WizardEditor::itemSelected( int index ) -{ - if ( index < 0 ) return; - // Called when TQt::Key_Enter was pressed. - // ListBoxRename has renamed the list item, so we only need to rename the page to the same name. - TQString pn( i18n( "Rename page %1 of %2" ).arg( wizard->title( wizard->page( index ) ) ).arg( wizard->name() ) ); - RenameWizardPageCommand *cmd = new RenameWizardPageCommand( pn, formwindow, wizard, index, listBox->text( index ) ); - commands.append( cmd ); -} - -void WizardEditor::updateButtons() -{ - int index = listBox->currentItem(); - - buttonUp->setEnabled( index > 0 ); - buttonDown->setEnabled( index < (int)listBox->count() - 1 ); - buttonRemove->setEnabled( index >= 0 ); - - if ( listBox->count() < 2 ) - buttonRemove->setEnabled( FALSE ); -} - -void WizardEditor::itemDragged( TQListBoxItem * i ) -{ - // Store item index - draggedItem = listBox->index( i ); -} - -void WizardEditor::itemDropped( TQListBoxItem * i ) -{ - if ( draggedItem < 0 ) return; - // The reorder the pages acording to the listBox list of items - // Assumes that only one item has been moved. - int droppedItem = listBox->index( i ); - - //tqDebug( "Moving page %d -> %d", draggedItem, droppedItem ); - MoveWizardPageCommand *cmd = new MoveWizardPageCommand( i18n( "Move Page %1 to %2 in %3" ).arg( draggedItem ).arg( droppedItem ).arg( wizard->name() ), formwindow, wizard, draggedItem, droppedItem ); - commands.append( cmd ); -} diff --git a/tdevdesigner/designer/wizardeditorimpl.h b/tdevdesigner/designer/wizardeditorimpl.h deleted file mode 100644 index f49a6b6c..00000000 --- a/tdevdesigner/designer/wizardeditorimpl.h +++ /dev/null @@ -1,75 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef WIZARDEDITORIMPL_H -#define WIZARDEDITORIMPL_H - -class TQWizard; -class FormWindow; - -#include - -#include "wizardeditor.h" -#include "command.h" - -class WizardEditor : public WizardEditorBase -{ - Q_OBJECT - - -public: - WizardEditor( TQWidget *parent, TQWizard *wizard, FormWindow *fw ); - ~WizardEditor(); - -protected slots: - void okClicked(); - void applyClicked(); - void cancelClicked(); - void helpClicked(); - - void addClicked(); - void removeClicked(); - void upClicked(); - void downClicked(); - - void itemHighlighted( int ); - void itemSelected( int ); - - void itemDragged( TQListBoxItem * ); - void itemDropped( TQListBoxItem * ); - -private: - void updateButtons(); - void fillListBox(); - -private: - FormWindow *formwindow; - TQWizard *wizard; - TQPtrList commands; - int draggedItem; -}; - -#endif diff --git a/tdevdesigner/designer/workspace.cpp b/tdevdesigner/designer/workspace.cpp deleted file mode 100644 index 7eb7f86f..00000000 --- a/tdevdesigner/designer/workspace.cpp +++ /dev/null @@ -1,711 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include // HP-UX compiler needs this here -#include "workspace.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "globaldefs.h" -#include "command.h" -#include "project.h" -#include "pixmapcollection.h" -#include "sourcefile.h" -#include "sourceeditor.h" -#include "propertyeditor.h" - -#include -#include "tdevdesigner_part.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "qcompletionedit.h" - -#include - -WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p ) - : TQListViewItem( parent ) -{ - init(); - project = p; - t = ProjectType; - setPixmap( 0, SmallIcon( "designer_folder.png" , TDevDesignerPartFactory::instance()) ); - setExpandable( FALSE ); -} - -WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf ) - : TQListViewItem( parent ) -{ - init(); - sourceFile = sf; - t = SourceFileType; - setPixmap( 0, SmallIcon( "designer_filenew.png" , TDevDesignerPartFactory::instance()) ); -} - -WorkspaceItem::WorkspaceItem( TQListViewItem *parent, TQObject *o, Project *p ) - : TQListViewItem( parent ) -{ - init(); - object = o; - project = p; - t = ObjectType; - setPixmap( 0, SmallIcon( "designer_object.png" , TDevDesignerPartFactory::instance()) ); - TQObject::connect( p->fakeFormFileFor( o ), TQT_SIGNAL( somethingChanged(FormFile*) ), - listView(), TQT_SLOT( update() ) ); -} - -WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type ) - : TQListViewItem( parent ) -{ - init(); - formFile = ff; - t = type; - if ( type == FormFileType ) { - setPixmap( 0, SmallIcon( "designer_form.png" , TDevDesignerPartFactory::instance()) ); - TQObject::connect( ff, TQT_SIGNAL( somethingChanged(FormFile*) ), listView(), TQT_SLOT( update(FormFile*) ) ); - if ( formFile->supportsCodeFile() ) { - (void) new WorkspaceItem( this, formFile, FormSourceType ); - } - } else if ( type == FormSourceType ) { - setPixmap( 0, SmallIcon( "designer_filenew.png" , TDevDesignerPartFactory::instance()) ); - } -} - - -void WorkspaceItem::init() -{ - autoOpen = FALSE; - useOddColor = FALSE; - project = 0; - sourceFile = 0; - formFile = 0; -} - -void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) -{ - TQColorGroup g( cg ); - g.setColor( TQColorGroup::Base, backgroundColor() ); - g.setColor( TQColorGroup::Foreground, TQt::black ); - - if ( type() == FormSourceType && - ( !formFile->hasFormCode() || ( formFile->codeFileState() == FormFile::Deleted && formFile->formWindow() ) ) && - parent() && parent()->parent() && ( (WorkspaceItem*)parent()->parent() )->project && - ( (WorkspaceItem*)parent()->parent() )->project->isCpp() ) { - g.setColor( TQColorGroup::Text, listView()->palette().disabled().color( TQColorGroup::Text) ); - g.setColor( TQColorGroup::HighlightedText, listView()->palette().disabled().color( TQColorGroup::Text) ); - } else { - g.setColor( TQColorGroup::Text, TQt::black ); - } - p->save(); - - if ( isModified() ) { - TQFont f = p->font(); - f.setBold( TRUE ); - p->setFont( f ); - } - - TQListViewItem::paintCell( p, g, column, width, align ); - p->setPen( TQPen( cg.dark(), 1 ) ); - if ( column == 0 ) - p->drawLine( 0, 0, 0, height() - 1 ); - if ( listView()->firstChild() != this ) { - if ( nextSibling() != itemBelow() && itemBelow()->depth() < depth() ) { - int d = depth() - itemBelow()->depth(); - p->drawLine( -listView()->treeStepSize() * d, height() - 1, 0, height() - 1 ); - } - } - p->drawLine( 0, height() - 1, width, height() - 1 ); - p->drawLine( width - 1, 0, width - 1, height() ); - p->restore(); -} - -TQString WorkspaceItem::text( int column ) const -{ - if ( column != 0 ) - return TQListViewItem::text( column ); - switch( t ) { - case ProjectType: - if ( project->isDummy() ) { - return i18n("" ); - } else if ( MainWindow::self->singleProjectMode() ) { - return TQFileInfo( project->fileName() ).baseName(); - } - return project->makeRelative( project->fileName() ); - case FormFileType: - if ( !MainWindow::self->singleProjectMode() ) - return formFile->formName() + ": " + formFile->fileName(); - return formFile->formName(); - case FormSourceType: - if ( !MainWindow::self->singleProjectMode() ) - return formFile->codeFile(); - return formFile->formName() + " [Source]"; - case SourceFileType: - return sourceFile->fileName(); - case ObjectType: - if ( !project->hasParentObject( object ) ) - return object->name(); - return project->qualifiedName( object ); - } - - return TQString(); // shut up compiler -} - -void WorkspaceItem::fillCompletionList( TQStringList& completion ) -{ - switch( t ) { - case ProjectType: - break; - case FormFileType: - completion += formFile->formName(); - completion += formFile->fileName(); - break; - case FormSourceType: - completion += formFile->codeFile(); - break; - case SourceFileType: - completion += sourceFile->fileName(); - break; - case ObjectType: - completion += object->name(); - } -} - -bool WorkspaceItem::checkCompletion( const TQString& completion ) -{ - switch( t ) { - case ProjectType: - break; - case FormFileType: - return completion == formFile->formName() - || completion == formFile->fileName(); - case FormSourceType: - return completion == formFile->codeFile(); - case SourceFileType: - return completion == sourceFile->fileName(); - case ObjectType: - return completion == object->name(); - } - return FALSE; -} - - -bool WorkspaceItem::isModified() const -{ - switch( t ) { - case ProjectType: - return project->isModified(); - case FormFileType: - return formFile->isModified( FormFile::WFormWindow ); - case FormSourceType: - return formFile->isModified( FormFile::WFormCode ); - case SourceFileType: - return sourceFile->isModified(); - case ObjectType: - return project->fakeFormFileFor( object )->isModified(); - break; - } - return FALSE; // shut up compiler -} - -TQString WorkspaceItem::key( int column, bool ) const -{ - TQString key = text( column ); - if ( t == FormFileType ) - key.prepend( "0" ); - else if ( t == ObjectType ) - key.prepend( "a" ); - else - key.prepend( "A" ); - return key; -} - -TQColor WorkspaceItem::backgroundColor() -{ - bool b = useOddColor; - if ( t == FormSourceType && parent() ) - b = ( ( WorkspaceItem*)parent() )->useOddColor; - return b ? *backColor2 : *backColor1; -} - - -void WorkspaceItem::setOpen( bool b ) -{ - TQListViewItem::setOpen( b ); - autoOpen = FALSE; -} - -void WorkspaceItem::setAutoOpen( bool b ) -{ - TQListViewItem::setOpen( b ); - autoOpen = b; -} - -Workspace::Workspace( TQWidget *parent, MainWindow *mw ) - : TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | - WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ), - project( 0 ), completionDirty( FALSE ) -{ - init_colors(); - - setDefaultRenameAction( Accept ); - blockNewForms = FALSE; - bufferEdit = 0; - header()->setStretchEnabled( TRUE ); - header()->hide(); - setSorting( 0 ); - setResizePolicy( TQScrollView::Manual ); -#ifndef TQ_WS_MAC - TQPalette p( palette() ); - p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) ); - (void)*selectedBack; // hack - setPalette( p ); -#endif - addColumn( i18n( "Files" ) ); - setAllColumnsShowFocus( TRUE ); - connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ), - this, TQT_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ), - connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - this, TQT_SLOT( itemDoubleClicked( TQListViewItem * ) ) ), - connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), - this, TQT_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ), - setHScrollBarMode( AlwaysOff ); - setVScrollBarMode( AlwaysOn ); - viewport()->setAcceptDrops( TRUE ); - setAcceptDrops( TRUE ); - setColumnWidthMode( 1, Manual ); -} - - -void Workspace::projectDestroyed( TQObject* o ) -{ - if ( o == project ) { - project = 0; - clear(); - } -} - -void Workspace::setCurrentProject( Project *pro ) -{ - if ( project == pro ) - return; - if ( project ) { - disconnect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); - disconnect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); - disconnect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); - disconnect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); - disconnect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) ); - disconnect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) ); - disconnect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) ); - } - project = pro; - connect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); - connect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); - connect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); - connect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); - connect( project, TQT_SIGNAL( destroyed(TQObject*) ), this, TQT_SLOT( projectDestroyed(TQObject*) ) ); - connect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) ); - connect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) ); - connect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) ); - clear(); - - if ( bufferEdit ) - bufferEdit->clear(); - - projectItem = new WorkspaceItem( this, project ); - - projectItem->setOpen( TRUE ); - - for ( TQPtrListIterator sources = project->sourceFiles(); - sources.current(); ++sources ) { - SourceFile* f = sources.current(); - (void) new WorkspaceItem( projectItem, f ); - } - - for ( TQPtrListIterator forms = project->formFiles(); - forms.current(); ++forms ) { - FormFile* f = forms.current(); - if ( f->isFake() ) - continue; - - (void) new WorkspaceItem( projectItem, f ); - } - - TQObjectList l = project->objects(); - TQObjectListIt objs( l ); - for ( ;objs.current(); ++objs ) { - TQObject* o = objs.current(); - (void) new WorkspaceItem( projectItem, o, project ); - } - - updateColors(); - completionDirty = TRUE; -} - -void Workspace::sourceFileAdded( SourceFile* sf ) -{ - (void) new WorkspaceItem( projectItem, sf ); - updateColors(); -} - -void Workspace::sourceFileRemoved( SourceFile* sf ) -{ - delete findItem( sf ); - updateColors(); -} - -void Workspace::formFileAdded( FormFile* ff ) -{ - if ( ff->isFake() ) - return; - (void) new WorkspaceItem( projectItem, ff ); - updateColors(); -} - -void Workspace::formFileRemoved( FormFile* ff ) -{ - delete findItem( ff ); - updateColors(); -} - -void Workspace::objectAdded( TQObject *o ) -{ - (void) new WorkspaceItem( projectItem, o, project ); - updateColors(); -} - -void Workspace::objectRemoved( TQObject *o ) -{ - delete findItem( o ); - updateColors(); -} - -void Workspace::update() -{ - completionDirty = TRUE; - triggerUpdate(); -} - -void Workspace::update( FormFile* ff ) -{ - TQListViewItem* i = findItem( ff ); - if ( i ) { - i->repaint(); - if ( (i = i->firstChild()) ) - i->repaint(); - } -} - - -void Workspace::activeFormChanged( FormWindow *fw ) -{ - WorkspaceItem *i = findItem( fw->formFile() ); - if ( i ) { - setCurrentItem( i ); - setSelected( i, TRUE ); - if ( !i->isOpen() ) - i->setAutoOpen( TRUE ); - } - - closeAutoOpenItems(); - -} - -void Workspace::activeEditorChanged( SourceEditor *se ) -{ - if ( !se->object() ) - return; - - if ( se->formWindow() ) { - WorkspaceItem *i = findItem( se->formWindow()->formFile() ); - if ( i && i->firstChild() ) { - if ( !i->isOpen() ) - i->setAutoOpen( TRUE ); - setCurrentItem( i->firstChild() ); - setSelected( i->firstChild(), TRUE ); - } - } else { - WorkspaceItem *i = findItem( se->sourceFile() ); - if ( i ) { - setCurrentItem( i ); - setSelected( i, TRUE ); - } - } - - closeAutoOpenItems(); -} - -WorkspaceItem *Workspace::findItem( FormFile* ff) -{ - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - if ( ( (WorkspaceItem*)it.current() )->formFile == ff ) - return (WorkspaceItem*)it.current(); - } - return 0; -} - -WorkspaceItem *Workspace::findItem( SourceFile *sf ) -{ - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - if ( ( (WorkspaceItem*)it.current() )->sourceFile == sf ) - return (WorkspaceItem*)it.current(); - } - return 0; -} - -WorkspaceItem *Workspace::findItem( TQObject *o ) -{ - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - if ( ( (WorkspaceItem*)it.current() )->object == o ) - return (WorkspaceItem*)it.current(); - } - return 0; -} - -void Workspace::closeAutoOpenItems() -{ - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - WorkspaceItem* i = (WorkspaceItem*) it.current(); - WorkspaceItem* ip = (WorkspaceItem*) i->parent(); - if ( i->type() == WorkspaceItem::FormSourceType ) { - if ( !i->isSelected() && !ip->isSelected() - && ip->isAutoOpen() ) { - ip->setAutoOpen( FALSE ); - } - } - } -} - - -void Workspace::closeEvent( TQCloseEvent *e ) -{ - e->accept(); -} - -void Workspace::itemDoubleClicked( TQListViewItem *i ) -{ - if ( ( (WorkspaceItem*)i)->type()== WorkspaceItem::ProjectType ) - i->setOpen( TRUE ); -} - -void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& ) -{ - if ( !i || button != Qt::LeftButton ) - return; - - closeAutoOpenItems(); - - WorkspaceItem* wi = (WorkspaceItem*)i; - switch( wi->type() ) { - case WorkspaceItem::ProjectType: - break; // ### TODO - case WorkspaceItem::FormFileType: - wi->formFile->showFormWindow(); - break; - case WorkspaceItem::FormSourceType: - wi->formFile->showEditor( FALSE ); - break; - case WorkspaceItem::SourceFileType: - mainWindow->editSource( wi->sourceFile ); - break; - case WorkspaceItem::ObjectType: - project->fakeFormFileFor( wi->object )->formWindow()->setFocus(); - mainWindow->propertyeditor()->setWidget( wi->object, - project->fakeFormFileFor( wi->object )->formWindow() ); - mainWindow->objectHierarchy()-> - setFormWindow( project->fakeFormFileFor( wi->object )->formWindow(), wi->object ); - project->fakeFormFileFor( wi->object )->showEditor(); - break; - } -} - -void Workspace::contentsDropEvent( TQDropEvent *e ) -{ - if ( !TQUriDrag::canDecode( e ) ) { - e->ignore(); - } else { - TQStringList files; - TQUriDrag::decodeLocalFiles( e, files ); - if ( !files.isEmpty() ) { - for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) { - TQString fn = *it; - mainWindow->fileOpen( "", "", fn ); - } - } - } -} - -void Workspace::contentsDragEnterEvent( TQDragEnterEvent *e ) -{ - if ( !TQUriDrag::canDecode( e ) ) - e->ignore(); - else - e->accept(); -} - -void Workspace::contentsDragMoveEvent( TQDragMoveEvent *e ) -{ - if ( !TQUriDrag::canDecode( e ) ) - e->ignore(); - else - e->accept(); -} - -void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) -{ - if ( !i ) - return; - WorkspaceItem* wi = (WorkspaceItem*)i; - enum { OPEN_SOURCE, REMOVE_SOURCE, OPEN_FORM, REMOVE_FORM, - OPEN_FORM_SOURCE, REMOVE_FORM_SOURCE, OPEN_OBJECT_SOURCE }; - TQPopupMenu menu( this ); - menu.setCheckable( TRUE ); - switch ( wi->type() ) { - case WorkspaceItem::SourceFileType: - menu.insertItem( i18n( "&Open Source File" ), OPEN_SOURCE ); - menu.insertSeparator(); - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), - i18n( "&Remove Source File From Project" ), REMOVE_SOURCE ); - break; - case WorkspaceItem::FormFileType: - menu.insertItem( i18n( "&Open Form" ), OPEN_FORM ); - menu.insertSeparator(); - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), - i18n( "&Remove Form From Project" ), REMOVE_FORM ); - break; - case WorkspaceItem::FormSourceType: - menu.insertItem( i18n( "&Open Form Source" ), OPEN_FORM_SOURCE ); - menu.insertSeparator(); - if ( project->isCpp() ) - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), - i18n( "&Remove Source File From Form" ), REMOVE_FORM_SOURCE ); - else - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), - i18n( "&Remove Form From Project" ), REMOVE_FORM ); - break; - case WorkspaceItem::ProjectType: - MainWindow::self->popupProjectMenu( pos ); - return; - case WorkspaceItem::ObjectType: - menu.insertItem( i18n( "&Open Source" ), OPEN_OBJECT_SOURCE ); - break; - } - - switch ( menu.exec( pos ) ) { - case REMOVE_SOURCE: - project->removeSourceFile( wi->sourceFile ); - break; - case REMOVE_FORM: - project->removeFormFile( wi->formFile ); - break; - case REMOVE_FORM_SOURCE: - ( (WorkspaceItem*)i )->formFile->setModified( TRUE ); - ( (WorkspaceItem*)i )->formFile->setCodeFileState( FormFile::Deleted ); - delete ( (WorkspaceItem*)i )->formFile->editor(); - break; - case OPEN_OBJECT_SOURCE: - case OPEN_SOURCE: - case OPEN_FORM: - case OPEN_FORM_SOURCE: - itemClicked( Qt::LeftButton, i, pos ); - break; - } -} - -bool Workspace::eventFilter( TQObject *o, TQEvent * e ) -{ - // Reggie, on what type of events do we have to execute updateBufferEdit() - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(bufferEdit) && e->type() != TQEvent::ChildRemoved ) - updateBufferEdit(); - return TQListView::eventFilter( o, e ); -} - -void Workspace::setBufferEdit( QCompletionEdit *edit ) -{ - bufferEdit = edit; - connect( bufferEdit, TQT_SIGNAL( chosen( const TQString & ) ), - this, TQT_SLOT( bufferChosen( const TQString & ) ) ); - bufferEdit->installEventFilter( this ); -} - -void Workspace::updateBufferEdit() -{ - if ( !bufferEdit || !completionDirty || !MainWindow::self) - return; - completionDirty = FALSE; - TQStringList completion = MainWindow::self->projectFileNames(); - TQListViewItemIterator it( this ); - while ( it.current() ) { - ( (WorkspaceItem*)it.current())->fillCompletionList( completion ); - ++it; - } - completion.sort(); - bufferEdit->setCompletionList( completion ); -} - -void Workspace::bufferChosen( const TQString &buffer ) -{ - if ( bufferEdit ) - bufferEdit->setText( "" ); - - if ( MainWindow::self->projectFileNames().contains( buffer ) ) { - MainWindow::self->setCurrentProjectByFilename( buffer ); - return; - } - - TQListViewItemIterator it( this ); - while ( it.current() ) { - if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) { - itemClicked( Qt::LeftButton, it.current(), TQPoint() ); - break; - } - ++it; - } -} - -void Workspace::updateColors() -{ - TQListViewItem* i = firstChild(); - if ( i ) - i = i->firstChild(); - bool b = TRUE; - while ( i ) { - WorkspaceItem* wi = ( WorkspaceItem*) i; - i = i->nextSibling(); - wi->useOddColor = b; - b = !b; - } -} diff --git a/tdevdesigner/designer/workspace.h b/tdevdesigner/designer/workspace.h deleted file mode 100644 index 052a1b87..00000000 --- a/tdevdesigner/designer/workspace.h +++ /dev/null @@ -1,152 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef WORKSPACE_H -#define WORKSPACE_H - -#include - -class FormWindow; -class TQResizeEvent; -class TQCloseEvent; -class TQDropEvent; -class TQDragMoveEvent; -class TQDragEnterEvent; -class MainWindow; -class Project; -class SourceFile; -class FormFile; -class QCompletionEdit; -class SourceEditor; - -class WorkspaceItem : public TQListViewItem -{ -public: - enum Type { ProjectType, FormFileType, FormSourceType, SourceFileType, ObjectType }; - - WorkspaceItem( TQListView *parent, Project* p ); - WorkspaceItem( TQListViewItem *parent, SourceFile* sf ); - WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type t = FormFileType ); - WorkspaceItem( TQListViewItem *parent, TQObject *o, Project *p ); - - void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); - - Type type() const { return t; } - - bool isModified() const; - - TQString text( int ) const; - - void fillCompletionList( TQStringList& completion ); - bool checkCompletion( const TQString& completion ); - - TQString key( int, bool ) const; // column sorting key - - Project* project; - SourceFile* sourceFile; - FormFile* formFile; - TQObject *object; - - void setOpen( bool ); - - void setAutoOpen( bool ); - bool isAutoOpen() const { return isOpen() && autoOpen; } - - bool useOddColor; - -private: - void init(); - bool autoOpen; - TQColor backgroundColor(); - Type t; -}; - -class Workspace : public TQListView -{ - Q_OBJECT - - -public: - Workspace( TQWidget *parent , MainWindow *mw ); - - void setCurrentProject( Project *pro ); - - void contentsDropEvent( TQDropEvent *e ); - void contentsDragEnterEvent( TQDragEnterEvent *e ); - void contentsDragMoveEvent( TQDragMoveEvent *e ); - - void setBufferEdit( QCompletionEdit *edit ); - -public slots: - - void update(); - void update( FormFile* ); - - void activeFormChanged( FormWindow *fw ); - void activeEditorChanged( SourceEditor *se ); - -protected: - void closeEvent( TQCloseEvent *e ); - bool eventFilter( TQObject *, TQEvent * ); - - -private slots: - void itemClicked( int, TQListViewItem *i, const TQPoint& pos ); - void itemDoubleClicked( TQListViewItem *i ); - void rmbClicked( TQListViewItem *i, const TQPoint& pos ); - void bufferChosen( const TQString &buffer ); - - void projectDestroyed( TQObject* ); - - void sourceFileAdded( SourceFile* ); - void sourceFileRemoved( SourceFile* ); - - void formFileAdded( FormFile* ); - void formFileRemoved( FormFile* ); - - void objectAdded( TQObject* ); - void objectRemoved( TQObject * ); - -private: - WorkspaceItem *findItem( FormFile *ff ); - WorkspaceItem *findItem( SourceFile *sf ); - WorkspaceItem *findItem( TQObject *o ); - - void closeAutoOpenItems(); - -private: - MainWindow *mainWindow; - Project *project; - WorkspaceItem *projectItem; - QCompletionEdit *bufferEdit; - bool blockNewForms; - void updateBufferEdit(); - bool completionDirty; - void updateColors(); - -}; - -#endif diff --git a/tdevdesigner/interfaces/actioninterface.h b/tdevdesigner/interfaces/actioninterface.h deleted file mode 100644 index cf217ee7..00000000 --- a/tdevdesigner/interfaces/actioninterface.h +++ /dev/null @@ -1,78 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef ACTIONINTERFACE_H -#define ACTIONINTERFACE_H - -#include - -class TQAction; -class TQObject; - -// {bb206e09-84e5-4777-9fce-706babfab931} -#ifndef IID_Action -#define IID_Action TQUuid( 0xbb206e09, 0x84e5, 0x4777, 0x9f, 0xce, 0x70, 0x6b, 0xab, 0xfa, 0xb9, 0x31 ) -#endif - -/*! To add actions to the TQt Designer menubars and toolbars, implement - this interface. You have to implement the create(), group() and - connectTo() functions. - - You also have to implement the function featureList() (\sa - TQFeatureListInterface) to return the names of all actions - which this interface provides. -*/ - -class ActionInterface : public TQFeatureListInterface -{ -public: - enum Location { - Toolbar, - Menu - }; - - /*! This functions is called to create the action with the name \a - name. \a parent should be used as parent of the action. - - In the implementation return the TQAction object for the action - \a name. - */ - virtual TQAction* create( const TQString &name, TQObject* parent = 0 ) = 0; - - /*! In the implementation of the interface return the name of the - group of the action \a name. - */ - virtual TQString group( const TQString &name ) const = 0; - - /*! In the implementation of the interface return whether the - action \a name should appear in the location \a l */ - virtual bool location( const TQString &name, Location l ) const = 0; - - /*! \internal */ - virtual void connectTo( TQUnknownInterface *appInterface ) = 0; -}; - -#endif diff --git a/tdevdesigner/interfaces/classbrowserinterface.h b/tdevdesigner/interfaces/classbrowserinterface.h deleted file mode 100644 index 99dc4911..00000000 --- a/tdevdesigner/interfaces/classbrowserinterface.h +++ /dev/null @@ -1,63 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef CLASSBROWSERINTERFACE_H -#define CLASSBROWSERINTERFACE_H - -// -// W A R N I N G -- PRIVATE INTERFACES -// -------------------------------------- -// -// This file and the interfaces declared in the file are not -// public. It exists for internal purpose. This header file and -// interfaces may change from version to version (even binary -// incompatible) without notice, or even be removed. -// -// We mean it. -// -// - -#include -#include -class TQListView; - -// {4ede3c32-ae96-4b7a-9e38-9f1d93592391} -#ifndef IID_ClassBrowser -#define IID_ClassBrowser TQUuid( 0x4ede3c32, 0xae96, 0x4b7a, 0x9e, 0x38, 0x9f, 0x1d, 0x93, 0x59, 0x23, 0x91 ) -#endif - -struct ClassBrowserInterface : public TQUnknownInterface -{ - enum Type { Class, Function }; - - virtual TQListView *createClassBrowser( TQWidget *parent ) const = 0; - virtual void update( const TQString &code ) const = 0; - virtual void clear() const = 0; - - virtual void onClick( TQObject *receiver, const char *slot ) = 0; -}; - -#endif diff --git a/tdevdesigner/interfaces/designerinterface.h b/tdevdesigner/interfaces/designerinterface.h deleted file mode 100644 index d5aeebf6..00000000 --- a/tdevdesigner/interfaces/designerinterface.h +++ /dev/null @@ -1,261 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef DESIGNERINTERFACE_H -#define DESIGNERINTERFACE_H - -// -// W A R N I N G -- PRIVATE INTERFACES -// -------------------------------------- -// -// This file and the interfaces declared in the file are not -// public. It exists for internal purpose. This header file and -// interfaces may change from version to version (even binary -// incompatible) without notice, or even be removed. -// -// We mean it. -// -// - -#include -#include -#include -#include -#include -#include -#include - -struct DesignerProject; -struct DesignerDatabase; -struct DesignerFormWindow; -struct DesignerDock; -struct DesignerOutputDock; -struct DesignerOutput; -struct DesignerOutputError; -struct DesignerPixmapCollection; -struct DesignerSourceFile; - -class TQDockWindow; -class TQWidget; -class TQObject; -class TQAction; -class TQIconSet; -class TQSqlDatabase; - -// {0e661da-f45c-4830-af47-03ec53eb1633} -#ifndef IID_Designer -#define IID_Designer TQUuid( 0xa0e661da, 0xf45c, 0x4830, 0xaf, 0x47, 0x3, 0xec, 0x53, 0xeb, 0x16, 0x33 ) -#endif - -/*! These are the interfaces implemented by the TQt Designer which should - be used by plugins to access and use functionality of the TQt Designer. -*/ - -struct DesignerInterface : public TQUnknownInterface -{ - virtual DesignerProject *currentProject() const = 0; - virtual DesignerFormWindow *currentForm() const = 0; - virtual DesignerSourceFile *currentSourceFile() const = 0; - virtual TQPtrList projectList() const = 0; - virtual void showStatusMessage( const TQString &, int ms = 0 ) const = 0; - virtual DesignerDock *createDock() const = 0; - virtual DesignerOutputDock *outputDock() const = 0; - virtual void setModified( bool b, TQWidget *window ) = 0; - virtual void updateFunctionList() = 0; - - virtual void onProjectChange( TQObject *receiver, const char *slot ) = 0; - virtual void onFormChange( TQObject *receiver, const char *slot ) = 0; - - virtual bool singleProjectMode() const = 0; - virtual void showError( TQWidget *widget, int line, const TQString &message ) = 0; - virtual void runFinished() = 0; - virtual void showStackFrame( TQWidget *w, int line ) = 0; - virtual void showDebugStep( TQWidget *w, int line ) = 0; - virtual void runProjectPrecondition() = 0; - virtual void runProjectPostcondition( TQObjectList *l ) = 0; - - }; - -struct DesignerProject -{ - virtual TQPtrList formList() const = 0; - virtual TQStringList formNames() const = 0; - virtual TQString formFileName( const TQString &form ) const = 0; - virtual void addForm( DesignerFormWindow * ) = 0; - virtual void removeForm( DesignerFormWindow * ) = 0; - virtual TQString fileName() const = 0; - virtual void setFileName( const TQString & ) = 0; - virtual TQString projectName() const = 0; - virtual void setProjectName( const TQString & ) = 0; - virtual TQString databaseFile() const = 0; - virtual void setDatabaseFile( const TQString & ) = 0; - virtual void setupDatabases() const = 0; - virtual TQPtrList databaseConnections() const = 0; - virtual void addDatabase( DesignerDatabase * ) = 0; - virtual void removeDatabase( DesignerDatabase * ) = 0; - virtual void save() const = 0; - virtual void setLanguage( const TQString & ) = 0; - virtual TQString language() const = 0; - virtual void setCustomSetting( const TQString &key, const TQString &value ) = 0; - virtual TQString customSetting( const TQString &key ) const = 0; - virtual DesignerPixmapCollection *pixmapCollection() const = 0; - virtual void breakPoints( TQMap > &bps ) const = 0; - virtual TQString breakPointCondition( TQObject *o, int line ) const = 0; - virtual void setBreakPointCondition( TQObject *o, int line, const TQString &condition ) = 0; - virtual void clearAllBreakpoints() const = 0; - virtual void setIncludePath( const TQString &platform, const TQString &path ) = 0; - virtual void setLibs( const TQString &platform, const TQString &path ) = 0; - virtual void setDefines( const TQString &platform, const TQString &path ) = 0; - virtual void setConfig( const TQString &platform, const TQString &config ) = 0; - virtual void setTemplate( const TQString &t ) = 0; - virtual TQString config( const TQString &platform ) const = 0; - virtual TQString libs( const TQString &platform ) const = 0; - virtual TQString defines( const TQString &platform ) const = 0; - virtual TQString includePath( const TQString &platform ) const = 0; - virtual TQString templte() const = 0; - virtual bool isGenericObject( TQObject *o ) const = 0; - -}; - -struct DesignerDatabase -{ - virtual TQString name() const = 0; - virtual void setName( const TQString & ) = 0; - virtual TQString driver() const = 0; - virtual void setDriver( const TQString & ) = 0; - virtual TQString database() const = 0; - virtual void setDatabase( const TQString & ) = 0; - virtual TQString userName() const = 0; - virtual void setUserName( const TQString & ) = 0; - virtual TQString password() const = 0; - virtual void setPassword( const TQString & ) = 0; - virtual TQString hostName() const = 0; - virtual void setHostName( const TQString & ) = 0; - virtual TQStringList tables() const = 0; - virtual void setTables( const TQStringList & ) = 0; - virtual TQMap fields() const = 0; - virtual void setFields( const TQMap & ) = 0; - virtual void open( bool suppressDialog = FALSE ) const = 0; - virtual void close() const = 0; - virtual TQSqlDatabase* connection() = 0; - -}; - -struct DesignerPixmapCollection -{ - virtual void addPixmap( const TQPixmap &p, const TQString &name, bool force ) = 0; - virtual TQPixmap pixmap( const TQString &name ) const = 0; -}; - -struct DesignerFormWindow -{ - virtual TQString name() const = 0; - virtual void setName( const TQString &n ) = 0; - virtual TQString fileName() const = 0; - virtual void setFileName( const TQString & ) = 0; - virtual void save() const = 0; - virtual bool isModified() const = 0; - virtual void insertWidget( TQWidget * ) = 0; - virtual void removeWidget( TQWidget * ) = 0; - virtual TQWidget *create( const char *className, TQWidget *parent, const char *name ) = 0; - virtual TQWidgetList widgets() const = 0; - virtual void undo() = 0; - virtual void redo() = 0; - virtual void cut() = 0; - virtual void copy() = 0; - virtual void paste() = 0; - virtual void adjustSize() = 0; - virtual void editConnections() = 0; - virtual void checkAccels() = 0; - virtual void layoutH() = 0; - virtual void layoutV() = 0; - virtual void layoutHSplit() = 0; - virtual void layoutVSplit() = 0; - virtual void layoutG() = 0; - virtual void layoutHContainer( TQWidget* w ) = 0; - virtual void layoutVContainer( TQWidget* w ) = 0; - virtual void layoutGContainer( TQWidget* w ) = 0; - virtual void breakLayout() = 0; - virtual void selectWidget( TQWidget * w ) = 0; - virtual void selectAll() = 0; - virtual void clearSelection() = 0; - virtual bool isWidgetSelected( TQWidget * ) const = 0; - virtual TQWidgetList selectedWidgets() const = 0; - virtual TQWidget *currentWidget() const = 0; - virtual TQWidget *form() const = 0; - virtual void setCurrentWidget( TQWidget * ) = 0; - virtual TQPtrList actionList() const = 0; - virtual TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel, - TQObject* parent, const char* name = 0, bool toggle = FALSE ) = 0; - virtual void addAction( TQAction * ) = 0; - virtual void removeAction( TQAction * ) = 0; - virtual void preview() const = 0; - virtual void addFunction( const TQCString &slot, const TQString &specifier, const TQString &access, - const TQString &type, const TQString &language, const TQString &returnType ) = 0; - virtual void addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot ) = 0; - virtual void setProperty( TQObject *o, const char *property, const TQVariant &value ) = 0; - virtual TQVariant property( TQObject *o, const char *property ) const = 0; - virtual void setPropertyChanged( TQObject *o, const char *property, bool changed ) = 0; - virtual bool isPropertyChanged( TQObject *o, const char *property ) const = 0; - virtual void setColumnFields( TQObject *o, const TQMap & ) = 0; - virtual TQStringList implementationIncludes() const = 0; - virtual TQStringList declarationIncludes() const = 0; - virtual void setImplementationIncludes( const TQStringList &lst ) = 0; - virtual void setDeclarationIncludes( const TQStringList &lst ) = 0; - virtual TQStringList forwardDeclarations() const = 0; - virtual void setForwardDeclarations( const TQStringList &lst ) = 0; - virtual TQStringList signalList() const = 0; - virtual void setSignalList( const TQStringList &lst ) = 0; - virtual void addMenu( const TQString &text, const TQString &name ) = 0; - virtual void addMenuAction( const TQString &menu, TQAction *a ) = 0; - virtual void addMenuSeparator( const TQString &menu ) = 0; - virtual void addToolBar( const TQString &text, const TQString &name ) = 0; - virtual void addToolBarAction( const TQString &tb, TQAction *a ) = 0; - virtual void addToolBarSeparator( const TQString &tb ) = 0; - - virtual void onModificationChange( TQObject *receiver, const char *slot ) = 0; -}; - -struct DesignerSourceFile -{ - virtual TQString fileName() const = 0; -}; - -struct DesignerDock -{ - virtual TQDockWindow *dockWindow() const = 0; -}; - -struct DesignerOutputDock -{ - virtual TQWidget *addView( const TQString &pageName ) = 0; - virtual void appendDebug( const TQString & ) = 0; - virtual void clearDebug() = 0; - virtual void appendError( const TQString &, int ) = 0; - virtual void clearError() = 0; -}; - -#endif diff --git a/tdevdesigner/interfaces/editorinterface.h b/tdevdesigner/interfaces/editorinterface.h deleted file mode 100644 index 29055324..00000000 --- a/tdevdesigner/interfaces/editorinterface.h +++ /dev/null @@ -1,102 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef EDITORINTERFACE_H -#define EDITORINTERFACE_H - -// -// W A R N I N G -- PRIVATE INTERFACES -// -------------------------------------- -// -// This file and the interfaces declared in the file are not -// public. It exists for internal purpose. This header file and -// interfaces may change from version to version (even binary -// incompatible) without notice, or even be removed. -// -// We mean it. -// -// - -#include -#include -#include - -class TQWidget; -class TQObjectList; -class TQObject; - -// {8668161a-6037-4220-86b6-ccaa20127df8} -#ifndef IID_Editor -#define IID_Editor TQUuid( 0x8668161a, 0x6037, 0x4220, 0x86, 0xb6, 0xcc, 0xaa, 0x20, 0x12, 0x7d, 0xf8 ) -#endif - -struct EditorInterface : public TQUnknownInterface -{ - enum Mode - { - Editing, - Debugging - }; - - virtual TQWidget *editor( bool readOnly, - TQWidget *parent, - TQUnknownInterface *designerIface ) = 0; - - virtual void setText( const TQString &txt ) = 0; - virtual TQString text() const = 0; - virtual bool isUndoAvailable() const = 0; - virtual bool isRedoAvailable() const = 0; - virtual void undo() = 0; - virtual void redo() = 0; - virtual void cut() = 0; - virtual void copy() = 0; - virtual void paste() = 0; - virtual void selectAll() = 0; - virtual bool find( const TQString &expr, bool cs, bool wo, bool forward, bool startAtCursor ) = 0; - virtual bool replace( const TQString &find, const TQString &replace, bool cs, bool wo, bool forward, bool startAtCursor, bool replaceAll ) = 0; - virtual void gotoLine( int line ) = 0; - virtual void indent() = 0; - virtual void scrollTo( const TQString &txt, const TQString &first ) = 0; - virtual void splitView() = 0; - virtual void setContext( TQObject *this_ ) = 0; - virtual void setError( int line ) = 0; - virtual void setStep( int line ) = 0; - virtual void setStackFrame( int line ) = 0; - virtual void clearStep() = 0; - virtual void clearStackFrame() = 0; - virtual void readSettings() = 0; - virtual void setModified( bool m ) = 0; - virtual bool isModified() const = 0; - virtual int numLines() const = 0; - virtual void breakPoints( TQValueList &l ) const = 0; - virtual void setBreakPoints( const TQValueList &l ) = 0; - virtual void setMode( Mode m ) = 0; - - virtual void onBreakPointChange( TQObject *receiver, const char *slot ) = 0; - -}; - -#endif diff --git a/tdevdesigner/interfaces/filterinterface.h b/tdevdesigner/interfaces/filterinterface.h deleted file mode 100644 index 6af54bcb..00000000 --- a/tdevdesigner/interfaces/filterinterface.h +++ /dev/null @@ -1,68 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef FILTERINTERFACE_H -#define FILTERINTERFACE_H - -#include - -// {ea8cb381-59b5-44a8-bae5-9bea8295762a} -#ifndef IID_ImportFilter -#define IID_ImportFilter TQUuid( 0xea8cb381, 0x59b5, 0x44a8, 0xba, 0xe5, 0x9b, 0xea, 0x82, 0x95, 0x76, 0x2a ) -#endif - -/*! If you write a filter plugin to import dialogs or other user - interfaces from a different format than .ui into the TQt Designer, - implement this interface in that plugin. - - You also have to implement the function featureList() (\sa - TQFeatureListInterface) and return there all filters (names of it) - which this interface provides. -*/ - -struct ImportFilterInterface : public TQFeatureListInterface -{ - /*! This function is called by TQt Designer to open the file \a - filename using the filter \a filter. TQt Designer expects to get - back one or more .ui files, which it can open then. In the - implementation of the interface you have to return these - filenames, which the filter created, in this function.*/ - virtual TQStringList import( const TQString &filter, const TQString &filename ) = 0; -}; - -// *************** INTERNAL ************************* - -// {c32a07e0-b006-471e-afca-d227457a1280} -#ifndef IID_ExportFilterInterface -#define IID_ExportFilterInterface TQUuid( 0xc32a07e0, 0xb006, 0x471e, 0xaf, 0xca, 0xd2, 0x27, 0x45, 0x7a, 0x12, 0x80 ) -#endif - -struct ExportFilterInterface : public TQFeatureListInterface -{ -// virtual TQStringList export( const TQString& filter, const TQString& filename ) = 0; -}; - -#endif diff --git a/tdevdesigner/interfaces/interpreterinterface.h b/tdevdesigner/interfaces/interpreterinterface.h deleted file mode 100644 index 45ba9e12..00000000 --- a/tdevdesigner/interfaces/interpreterinterface.h +++ /dev/null @@ -1,59 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef INTERPRETERINTERFACE_H -#define INTERPRETERINTERFACE_H - -// -// W A R N I N G -- PRIVATE INTERFACES -// -------------------------------------- -// -// This file and the interfaces declared in the file are not -// public. It exists for internal purpose. This header file and -// interfaces may change from version to version (even binary -// incompatible) without notice, or even be removed. -// -// We mean it. -// -// - -#include - -class TQObject; - -// {11cad9ec-4e3c-418b-8e90-e1b8c0c1f48f} -#ifndef IID_Interpreter -#define IID_Interpreter TQUuid( 0x11cad9ec, 0x4e3c, 0x418b, 0x8e, 0x90, 0xe1, 0xb8, 0xc0, 0xc1, 0xf4, 0x8f ) -#endif - -struct InterpreterInterface : public TQUnknownInterface -{ - virtual void setBreakPoints( TQObject *obj, const TQValueList &lst ) = 0; -}; - - - -#endif diff --git a/tdevdesigner/interfaces/languageinterface.h b/tdevdesigner/interfaces/languageinterface.h deleted file mode 100644 index 9d1f7e3d..00000000 --- a/tdevdesigner/interfaces/languageinterface.h +++ /dev/null @@ -1,131 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef LANGUAGEINTERFACE_H -#define LANGUAGEINTERFACE_H - -// -// W A R N I N G -- PRIVATE INTERFACES -// -------------------------------------- -// -// This file and the interfaces declared in the file are not -// public. It exists for internal purpose. This header file and -// interfaces may change from version to version (even binary -// incompatible) without notice, or even be removed. -// -// We mean it. -// -// - -#include -#include -#include -#include -#include - -// {f208499a-6f69-4883-9219-6e936e55a330} -#ifndef IID_Language -#define IID_Language TQUuid( 0xf208499a, 0x6f69, 0x4883, 0x92, 0x19, 0x6e, 0x93, 0x6e, 0x55, 0xa3, 0x30 ) -#endif - -struct LanguageInterface : public TQUnknownInterface -{ - struct Function - { - TQString name; - TQString body; - TQString returnType; - TQString comments; - int start; - int end; - TQString access; - bool operator==( const Function &f ) const { - return ( name == f.name && - body == f.body && - returnType == f.returnType && - comments == f.comments ); - } - }; - - struct Connection - { - TQString sender; - TQString signal; - TQString slot; - bool operator==( const Connection &c ) const { - return ( sender == c.sender && - signal == c.signal && - slot == c.slot ); - } - }; - - enum Support - { - ReturnType, - ConnectionsToCustomSlots, - CompressProject - }; - - virtual void functions( const TQString &code, TQValueList *funcs ) const = 0; - virtual void connections( const TQString &code, TQValueList *connections ) const = 0; - virtual TQString createFunctionStart( const TQString &className, const TQString &func, - const TQString &returnType, const TQString &access ) = 0; - virtual TQString createArguments( const TQString &cpp_signature ) = 0; - virtual TQString createEmptyFunction() = 0; - virtual TQStringList definitions() const = 0; - virtual TQStringList definitionEntries( const TQString &definition, TQUnknownInterface *designerIface ) const = 0; - virtual void setDefinitionEntries( const TQString &definition, const TQStringList &entries, TQUnknownInterface *designerIface ) = 0; - virtual bool supports( Support s ) const = 0; - virtual TQStringList fileFilterList() const = 0; - virtual TQStringList fileExtensionList() const = 0; - virtual void preferedExtensions( TQMap &extensionMap ) const = 0; - virtual TQString projectKeyForExtension( const TQString &extension ) const = 0; - virtual void sourceProjectKeys( TQStringList &keys ) const = 0; - virtual TQString cleanSignature( const TQString &sig ) = 0; - virtual void loadFormCode( const TQString &form, const TQString &filename, - TQValueList &functions, - TQStringList &vars, - TQValueList &connections ) = 0; - virtual TQString formCodeExtension() const = 0; - - virtual bool canConnect( const TQString &signal, const TQString &slot ) = 0; - - virtual void compressProject( const TQString &projectFile, const TQString &compressedFile, - bool withWarning ) = 0; - virtual TQString uncompressProject( const TQString &projectFile, const TQString &destDir ) = 0; - virtual TQString aboutText() const = 0; - - virtual void addConnection( const TQString &sender, const TQString &signal, - const TQString &receiver, const TQString &slot, - TQString *code ) = 0; - virtual void removeConnection( const TQString &sender, const TQString &signal, - const TQString &receiver, const TQString &slot, - TQString *code ) = 0; - virtual TQStrList signalNames( TQObject *obj ) const = 0; - -}; - -#endif diff --git a/tdevdesigner/interfaces/preferenceinterface.h b/tdevdesigner/interfaces/preferenceinterface.h deleted file mode 100644 index 5b356c4b..00000000 --- a/tdevdesigner/interfaces/preferenceinterface.h +++ /dev/null @@ -1,68 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PREFERENCEINTERFACE_H -#define PREFERENCEINTERFACE_H - -// -// W A R N I N G -- PRIVATE INTERFACES -// -------------------------------------- -// -// This file and the interfaces declared in the file are not -// public. It exists for internal purpose. This header file and -// interfaces may change from version to version (even binary -// incompatible) without notice, or even be removed. -// -// We mean it. -// -// - -#include -#include -#include - -// {5c168ee7-4bee-469f-9995-6afdb04ce5a2} -#ifndef IID_Preference -#define IID_Preference TQUuid( 0x5c168ee7, 0x4bee, 0x469f, 0x99, 0x95, 0x6a, 0xfd, 0xb0, 0x4c, 0xe5, 0xa2 ) -#endif - -struct PreferenceInterface : public TQUnknownInterface -{ - struct Preference - { - TQWidget *tab; - TQString title; - TQObject *receiver; - const char *init_slot; - const char *accept_slot; - }; - - virtual Preference *preference() = 0; - virtual void connectTo( TQUnknownInterface *appInterface ) = 0; - virtual void deletePreferenceObject( Preference * ) = 0; -}; - -#endif diff --git a/tdevdesigner/interfaces/projectsettingsiface.h b/tdevdesigner/interfaces/projectsettingsiface.h deleted file mode 100644 index e47f8ae7..00000000 --- a/tdevdesigner/interfaces/projectsettingsiface.h +++ /dev/null @@ -1,69 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PROJECTSETTINGSIFACE_H -#define PROJECTSETTINGSIFACE_H - -// -// W A R N I N G -- PRIVATE INTERFACES -// -------------------------------------- -// -// This file and the interfaces declared in the file are not -// public. It exists for internal purpose. This header file and -// interfaces may change from version to version (even binary -// incompatible) without notice, or even be removed. -// -// We mean it. -// -// - -#include -#include -#include - -// {d332785d-17fb-4894-84fe-50dbd0ad9512} -#ifndef IID_ProjectSettings -#define IID_ProjectSettings TQUuid( 0xd332785d, 0x17fb, 0x4894, 0x84, 0xfe, 0x50, 0xdb, 0xd0, 0xad, 0x95, 0x12 ) -#endif - -struct ProjectSettingsInterface : public TQUnknownInterface -{ - struct ProjectSettings - { - TQWidget *tab; - TQString title; - TQObject *receiver; - const char *init_slot; - const char *accept_slot; - }; - - virtual ProjectSettings *projectSetting() = 0; - virtual TQStringList projectSettings() const = 0; - virtual void connectTo( TQUnknownInterface *appInterface ) = 0; - virtual void deleteProjectSettingsObject( ProjectSettings * ) = 0; -}; - -#endif diff --git a/tdevdesigner/interfaces/sourcetemplateiface.h b/tdevdesigner/interfaces/sourcetemplateiface.h deleted file mode 100644 index 8d914625..00000000 --- a/tdevdesigner/interfaces/sourcetemplateiface.h +++ /dev/null @@ -1,65 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef SOURCETEMPLATEIFACE_H -#define SOURCETEMPLATEIFACE_H - -// -// W A R N I N G -- PRIVATE INTERFACES -// -------------------------------------- -// -// This file and the interfaces declared in the file are not -// public. It exists for internal purpose. This header file and -// interfaces may change from version to version (even binary -// incompatible) without notice, or even be removed. -// -// We mean it. -// -// - -#include -#include - -// {1b3446a4-1c71-424b-8789-1f34eb5697d8} -#ifndef IID_SourceTemplate -#define IID_SourceTemplate TQUuid( 0x1b3446a4, 0x1c71, 0x424b, 0x87, 0x89, 0x1f, 0x34, 0xeb, 0x56, 0x97, 0xd8 ) -#endif - -struct SourceTemplateInterface : public TQFeatureListInterface -{ - struct Source - { - TQString code; - enum Type { FileName, Unnamed, Invalid } type; - TQString filename; - TQString extension; - }; - virtual Source create( const TQString &templ, TQUnknownInterface *appIface ) = 0; - virtual TQString language( const TQString &templ ) const = 0; - -}; - -#endif diff --git a/tdevdesigner/interfaces/templatewizardiface.h b/tdevdesigner/interfaces/templatewizardiface.h deleted file mode 100644 index be1c57f1..00000000 --- a/tdevdesigner/interfaces/templatewizardiface.h +++ /dev/null @@ -1,60 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef TEMPLATEWIZARDIFACE_H -#define TEMPLATEWIZARDIFACE_H - -// -// W A R N I N G -- PRIVATE INTERFACES -// -------------------------------------- -// -// This file and the interfaces declared in the file are not -// public. It exists for internal purpose. This header file and -// interfaces may change from version to version (even binary -// incompatible) without notice, or even be removed. -// -// We mean it. -// -// - -#include - -class TQWidget; -struct DesignerFormWindow; - -// {983d3eab-fea3-49cc-97ad-d8cc89b7c17b} -#ifndef IID_TemplateWizard -#define IID_TemplateWizard TQUuid( 0x983d3eab, 0xfea3, 0x49cc, 0x97, 0xad, 0xd8, 0xcc, 0x89, 0xb7, 0xc1, 0x7b ) -#endif - -class TemplateWizardInterface : public TQFeatureListInterface -{ -public: - virtual void setup( const TQString &templ, TQWidget *widget, DesignerFormWindow *fw, TQUnknownInterface *appIface ) = 0; - -}; - -#endif diff --git a/tdevdesigner/interfaces/widgetinterface.h b/tdevdesigner/interfaces/widgetinterface.h deleted file mode 100644 index 5f0312f8..00000000 --- a/tdevdesigner/interfaces/widgetinterface.h +++ /dev/null @@ -1,35 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef WIDGETINTERFACE_H -#define WIDGETINTERFACE_H - -#include - -#define WidgetInterface TQWidgetFactoryInterface -#define IID_Widget IID_TQWidgetFactory - -#endif diff --git a/tdevdesigner/plugins/Makefile.am b/tdevdesigner/plugins/Makefile.am deleted file mode 100644 index 5d1b7d39..00000000 --- a/tdevdesigner/plugins/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -INCLUDES = -I$(top_srcdir)/interfaces $(all_includes) -METASOURCES = AUTO -tdevdesignerdir = $(kde_moduledir)/plugins/tdevdesigner -tdevdesigner_LTLIBRARIES = libtdevdesigner_lang.la -libtdevdesigner_lang_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -libtdevdesigner_lang_la_SOURCES = languageinterfaceimpl.cpp -libtdevdesigner_lang_la_LIBADD = $(LIB_QT) - diff --git a/tdevdesigner/plugins/languageinterfaceimpl.cpp b/tdevdesigner/plugins/languageinterfaceimpl.cpp deleted file mode 100644 index 2e4f9f20..00000000 --- a/tdevdesigner/plugins/languageinterfaceimpl.cpp +++ /dev/null @@ -1,237 +0,0 @@ -/********************************************************************** -** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "languageinterfaceimpl.h" -#include -#include "../interfaces/designerinterface.h" -#include -//#include "yyreg.h" -#include - -LanguageInterfaceImpl::LanguageInterfaceImpl( TQUnknownInterface *outer ) - : parent( outer ), ref( 0 ) -{ -} - -ulong LanguageInterfaceImpl::addRef() -{ - return parent ? parent->addRef() : ref++; -} - -ulong LanguageInterfaceImpl::release() -{ - if ( parent ) - return parent->release(); - if ( !--ref ) { - delete this; - return 0; - } - return ref; -} - -TQRESULT LanguageInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInterface** iface ) -{ - if ( parent ) - return parent->queryInterface( uuid, iface ); - - *iface = 0; - if ( uuid == IID_TQUnknown ) - *iface = (TQUnknownInterface*)this; - else if ( uuid == IID_Language ) - *iface = (LanguageInterface*)this; - else - return TQE_NOINTERFACE; - - (*iface)->addRef(); - return TQS_OK; -} - - -class NormalizeObject : public TQObject -{ -public: - NormalizeObject() : TQObject() {} - static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); } -}; - -void LanguageInterfaceImpl::functions( const TQString &code, TQValueList *functionMap ) const -{ -/* TQValueList l; - extractCppFunctions( code, &l ); - for ( TQValueList::Iterator it = l.begin(); it != l.end(); ++it ) { - Function func; - func.name = (*it).prototype(); - func.name.remove( 0, (*it).returnType().length() ); - if ( func.name.find( "::" ) == -1 ) - continue; - func.name.remove( (uint)0, func.name.find( "::" ) + 2 ); - func.body = (*it).body(); - func.returnType = (*it).returnType(); - func.start = (*it).functionStartLineNum(); - func.end = (*it).closingBraceLineNum(); - functionMap->append( func ); - }*/ -} - -TQString LanguageInterfaceImpl::createFunctionStart( const TQString &className, const TQString &func, - const TQString &returnType, - const TQString & ) -{ - return returnType + " " + className + "::" + func; -} - -TQStringList LanguageInterfaceImpl::definitions() const -{ - TQStringList lst; - lst << "Includes (in Implementation)" << "Includes (in Declaration)" << "Forward Declarations" << "Signals"; - return lst; -} - -TQStringList LanguageInterfaceImpl::definitionEntries( const TQString &definition, TQUnknownInterface *designerIface ) const -{ - DesignerInterface *iface = 0; - designerIface->queryInterface( IID_Designer, (TQUnknownInterface**) &iface ); - if ( !iface ) - return TQStringList(); - DesignerFormWindow *fw = iface->currentForm(); - if ( !fw ) - return TQStringList(); - TQStringList lst; - if ( definition == "Includes (in Implementation)" ) { - lst = fw->implementationIncludes(); - } else if ( definition == "Includes (in Declaration)" ) { - lst = fw->declarationIncludes(); - } else if ( definition == "Forward Declarations" ) { - lst = fw->forwardDeclarations(); - } else if ( definition == "Signals" ) { - lst = fw->signalList(); - } - iface->release(); - return lst; -} - -void LanguageInterfaceImpl::setDefinitionEntries( const TQString &definition, const TQStringList &entries, TQUnknownInterface *designerIface ) -{ - DesignerInterface *iface = 0; - designerIface->queryInterface( IID_Designer, (TQUnknownInterface**) &iface ); - if ( !iface ) - return; - DesignerFormWindow *fw = iface->currentForm(); - if ( !fw ) - return; - if ( definition == "Includes (in Implementation)" ) { - fw->setImplementationIncludes( entries ); - } else if ( definition == "Includes (in Declaration)" ) { - fw->setDeclarationIncludes( entries ); - } else if ( definition == "Forward Declarations" ) { - fw->setForwardDeclarations( entries ); - } else if ( definition == "Signals" ) { - fw->setSignalList( entries ); - } - iface->release(); -} - -TQString LanguageInterfaceImpl::createEmptyFunction() -{ - return "{\n\n}\n"; -} - -bool LanguageInterfaceImpl::supports( Support s ) const -{ - if ( s == ReturnType ) - return TRUE; - if ( s == ConnectionsToCustomSlots ) - return TRUE; - return FALSE; -} - -TQStringList LanguageInterfaceImpl::fileFilterList() const -{ - TQStringList f; - f << "C++ Files (*.cpp *.C *.cxx *.c++ *.ocl *.c *.h *.H *.hpp *.hxx)"; - return f; - -} -TQStringList LanguageInterfaceImpl::fileExtensionList() const -{ - TQStringList f; - f << "cpp" << "ocl" << "C" << "cxx" << "c++" << "c" <<"h" << "H" << "hpp" << "hxx"; - return f; -} - -TQString LanguageInterfaceImpl::projectKeyForExtension( const TQString &extension ) const -{ - if ( extension[ 0 ] == 'c' || extension[ 0 ] == 'C' ) - return "SOURCES"; - return "HEADERS"; -} - -void LanguageInterfaceImpl::sourceProjectKeys( TQStringList &keys ) const -{ - keys << "HEADERS" << "SOURCES"; -} - - class CheckObject : public TQObject -{ -public: - CheckObject() {} - bool checkConnectArgs( const char *signal, const char *member ) { return TQObject::checkConnectArgs( signal, 0, member ); } - -}; - -bool LanguageInterfaceImpl::canConnect( const TQString &signal, const TQString &slot ) -{ - CheckObject o; - return o.checkConnectArgs( signal.latin1(), slot.latin1() ); -} - -void LanguageInterfaceImpl::loadFormCode( const TQString &, const TQString &filename, - TQValueList &functions, - TQStringList &, - TQValueList & ) -{ - TQFile f( filename ); - if ( !f.open( IO_ReadOnly ) ) - return; - TQTextStream ts( &f ); - TQString code( ts.read() ); - this->functions( code, &functions ); -} - -void LanguageInterfaceImpl::preferedExtensions( TQMap &extensionMap ) const -{ - extensionMap.insert( "cpp", "C++ Source File" ); - extensionMap.insert( "h", "C++ Header File" ); -} - -TQStrList LanguageInterfaceImpl::signalNames( TQObject *obj ) const -{ - TQStrList sigs; - sigs = obj->metaObject()->signalNames( TRUE ); - sigs.remove( "destroyed()" ); - return sigs; -} diff --git a/tdevdesigner/plugins/languageinterfaceimpl.h b/tdevdesigner/plugins/languageinterfaceimpl.h deleted file mode 100644 index b9db9997..00000000 --- a/tdevdesigner/plugins/languageinterfaceimpl.h +++ /dev/null @@ -1,83 +0,0 @@ -/********************************************************************** -** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef LANGUAGEINTERFACEIMPL_H -#define LANGUAGEINTERFACEIMPL_H - -#include "../interfaces/languageinterface.h" - -class LanguageInterfaceImpl : public LanguageInterface -{ -public: - LanguageInterfaceImpl( TQUnknownInterface *outer = 0 ); - - ulong addRef(); - ulong release(); - - TQRESULT queryInterface( const TQUuid&, TQUnknownInterface** ); - - void functions( const TQString &code, TQValueList *funcs ) const; - void connections( const TQString &, TQValueList * ) const {}; - TQString createFunctionStart( const TQString &className, const TQString &func, - const TQString &returnType, const TQString &access ); - TQStringList definitions() const; - TQStringList definitionEntries( const TQString &definition, TQUnknownInterface *designerIface ) const; - void setDefinitionEntries( const TQString &definition, const TQStringList &entries, TQUnknownInterface *designerIface ); - TQString createArguments( const TQString & ) { return TQString(); } - TQString createEmptyFunction(); - bool supports( Support s ) const; - TQStringList fileFilterList() const; - TQStringList fileExtensionList() const; - void preferedExtensions( TQMap &extensionMap ) const; - void sourceProjectKeys( TQStringList &keys ) const; - TQString projectKeyForExtension( const TQString &extension ) const; - TQString cleanSignature( const TQString &sig ) { return sig; } // #### implement me - void loadFormCode( const TQString &, const TQString &, - TQValueList &, - TQStringList &, - TQValueList & ); - TQString formCodeExtension() const { return ".h"; } - bool canConnect( const TQString &signal, const TQString &slot ); - void compressProject( const TQString &, const TQString &, bool ) {} - TQString uncompressProject( const TQString &, const TQString & ) { return TQString(); } - TQString aboutText() const { return ""; } - - void addConnection( const TQString &, const TQString &, - const TQString &, const TQString &, - TQString * ) {} - void removeConnection( const TQString &, const TQString &, - const TQString &, const TQString &, - TQString * ) {} - TQStrList signalNames( TQObject *obj ) const; - -private: - TQUnknownInterface *parent; - ulong ref; - -}; - -#endif diff --git a/tdevdesigner/shared/CMakeLists.txt b/tdevdesigner/shared/CMakeLists.txt deleted file mode 100644 index 46c5e8f6..00000000 --- a/tdevdesigner/shared/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/lib/interfaces/external - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - - -##### shared (static) ######################## - -tde_add_library( shared STATIC_PIC - SOURCES - domtool.cpp parser.cpp ui2uib.cpp uib.cpp - widgetdatabase.cpp -) diff --git a/tdevdesigner/shared/Makefile.am b/tdevdesigner/shared/Makefile.am deleted file mode 100644 index ea86ae94..00000000 --- a/tdevdesigner/shared/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -KDE_CXXFLAGS = -UQT_NO_ASCII_CAST -INCLUDES = -I$(top_srcdir)/lib/interfaces/external $(all_includes) -METASOURCES = AUTO -libshared_la_LDFLAGS = $(all_libraries) -noinst_LTLIBRARIES = libshared.la -libshared_la_SOURCES = domtool.cpp parser.cpp ui2uib.cpp uib.cpp widgetdatabase.cpp diff --git a/tdevdesigner/shared/domtool.cpp b/tdevdesigner/shared/domtool.cpp deleted file mode 100644 index f8ed4ec5..00000000 --- a/tdevdesigner/shared/domtool.cpp +++ /dev/null @@ -1,453 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "domtool.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -/*! - \class DomTool domtool.h - \brief Tools for the dom - - A collection of static functions used by Resource (part of the - designer) and Uic. - -*/ - -/*! - Returns the contents of property \a name of object \a e as - variant or the variant passed as \a defValue if the property does - not exist. - - \sa hasProperty() -*/ -TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment ) -{ - TQDomElement n; - for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { - if ( n.tagName() == "property" ) { - if ( n.attribute( "name" ) != name ) - continue; - return elementToVariant( n.firstChild().toElement(), defValue, comment ); - } - } - return defValue; -} - - -/*! - \overload - */ -TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue ) -{ - TQString comment; - return readProperty( e, name, defValue, comment ); -} - -/*! - Returns wheter object \a e defines property \a name or not. - - \sa readProperty() - */ -bool DomTool::hasProperty( const TQDomElement& e, const TQString& name ) -{ - TQDomElement n; - for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { - if ( n.tagName() == "property" ) { - if ( n.attribute( "name" ) != name ) - continue; - return TRUE; - } - } - return FALSE; -} - -TQStringList DomTool::propertiesOfType( const TQDomElement& e, const TQString& type ) -{ - TQStringList result; - TQDomElement n; - for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { - if ( n.tagName() == "property" ) { - TQDomElement n2 = n.firstChild().toElement(); - if ( n2.tagName() == type ) - result += n.attribute( "name" ); - } - } - return result; -} - - -TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue ) -{ - TQString dummy; - return elementToVariant( e, defValue, dummy ); -} - -/*! - Interprets element \a e as variant and returns the result of the interpretation. - */ -TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment ) -{ - TQVariant v; - if ( e.tagName() == "rect" ) { - TQDomElement n3 = e.firstChild().toElement(); - int x = 0, y = 0, w = 0, h = 0; - while ( !n3.isNull() ) { - if ( n3.tagName() == "x" ) - x = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "y" ) - y = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "width" ) - w = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "height" ) - h = n3.firstChild().toText().data().toInt(); - n3 = n3.nextSibling().toElement(); - } - v = TQVariant( TQRect( x, y, w, h ) ); - } else if ( e.tagName() == "point" ) { - TQDomElement n3 = e.firstChild().toElement(); - int x = 0, y = 0; - while ( !n3.isNull() ) { - if ( n3.tagName() == "x" ) - x = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "y" ) - y = n3.firstChild().toText().data().toInt(); - n3 = n3.nextSibling().toElement(); - } - v = TQVariant( TQPoint( x, y ) ); - } else if ( e.tagName() == "size" ) { - TQDomElement n3 = e.firstChild().toElement(); - int w = 0, h = 0; - while ( !n3.isNull() ) { - if ( n3.tagName() == "width" ) - w = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "height" ) - h = n3.firstChild().toText().data().toInt(); - n3 = n3.nextSibling().toElement(); - } - v = TQVariant( TQSize( w, h ) ); - } else if ( e.tagName() == "color" ) { - v = TQVariant( readColor( e ) ); - } else if ( e.tagName() == "font" ) { - TQDomElement n3 = e.firstChild().toElement(); - TQFont f( defValue.toFont() ); - while ( !n3.isNull() ) { - if ( n3.tagName() == "family" ) - f.setFamily( n3.firstChild().toText().data() ); - else if ( n3.tagName() == "pointsize" ) - f.setPointSize( n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "bold" ) - f.setBold( n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "italic" ) - f.setItalic( n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "underline" ) - f.setUnderline( n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "strikeout" ) - f.setStrikeOut( n3.firstChild().toText().data().toInt() ); - n3 = n3.nextSibling().toElement(); - } - v = TQVariant( f ); - } else if ( e.tagName() == "string" ) { - v = TQVariant( e.firstChild().toText().data() ); - TQDomElement n = e; - n = n.nextSibling().toElement(); - if ( n.tagName() == "comment" ) - comment = n.firstChild().toText().data(); - } else if ( e.tagName() == "cstring" ) { - v = TQVariant( TQCString( e.firstChild().toText().data().ascii() ) ); - } else if ( e.tagName() == "number" ) { - bool ok = TRUE; - v = TQVariant( e.firstChild().toText().data().toInt( &ok ) ); - if ( !ok ) - v = TQVariant( e.firstChild().toText().data().toDouble() ); - } else if ( e.tagName() == "bool" ) { - TQString t = e.firstChild().toText().data(); - v = TQVariant( t == "true" || t == "1", 0 ); - } else if ( e.tagName() == "pixmap" ) { - v = TQVariant( e.firstChild().toText().data() ); - } else if ( e.tagName() == "iconset" ) { - v = TQVariant( e.firstChild().toText().data() ); - } else if ( e.tagName() == "image" ) { - v = TQVariant( e.firstChild().toText().data() ); - } else if ( e.tagName() == "enum" ) { - v = TQVariant( e.firstChild().toText().data() ); - } else if ( e.tagName() == "set" ) { - v = TQVariant( e.firstChild().toText().data() ); - } else if ( e.tagName() == "sizepolicy" ) { - TQDomElement n3 = e.firstChild().toElement(); - TQSizePolicy sp; - while ( !n3.isNull() ) { - if ( n3.tagName() == "hsizetype" ) - sp.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "vsizetype" ) - sp.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "horstretch" ) - sp.setHorStretch( n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "verstretch" ) - sp.setVerStretch( n3.firstChild().toText().data().toInt() ); - n3 = n3.nextSibling().toElement(); - } - v = TQVariant( sp ); - } else if ( e.tagName() == "cursor" ) { - v = TQVariant( TQCursor( e.firstChild().toText().data().toInt() ) ); - } else if ( e.tagName() == "stringlist" ) { - TQStringList lst; - TQDomElement n; - for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) - lst << n.firstChild().toText().data(); - v = TQVariant( lst ); - } else if ( e.tagName() == "date" ) { - TQDomElement n3 = e.firstChild().toElement(); - int y, m, d; - y = m = d = 0; - while ( !n3.isNull() ) { - if ( n3.tagName() == "year" ) - y = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "month" ) - m = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "day" ) - d = n3.firstChild().toText().data().toInt(); - n3 = n3.nextSibling().toElement(); - } - v = TQVariant( TQDate( y, m, d ) ); - } else if ( e.tagName() == "time" ) { - TQDomElement n3 = e.firstChild().toElement(); - int h, m, s; - h = m = s = 0; - while ( !n3.isNull() ) { - if ( n3.tagName() == "hour" ) - h = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "minute" ) - m = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "second" ) - s = n3.firstChild().toText().data().toInt(); - n3 = n3.nextSibling().toElement(); - } - v = TQVariant( TQTime( h, m, s ) ); - } else if ( e.tagName() == "datetime" ) { - TQDomElement n3 = e.firstChild().toElement(); - int h, mi, s, y, mo, d ; - h = mi = s = y = mo = d = 0; - while ( !n3.isNull() ) { - if ( n3.tagName() == "hour" ) - h = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "minute" ) - mi = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "second" ) - s = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "year" ) - y = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "month" ) - mo = n3.firstChild().toText().data().toInt(); - else if ( n3.tagName() == "day" ) - d = n3.firstChild().toText().data().toInt(); - n3 = n3.nextSibling().toElement(); - } - v = TQVariant( TQDateTime( TQDate( y, mo, d ), TQTime( h, mi, s ) ) ); - } - return v; -} - - -/*! Returns the color which is returned in the dom element \a e. - */ - -TQColor DomTool::readColor( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - int r= 0, g = 0, b = 0; - while ( !n.isNull() ) { - if ( n.tagName() == "red" ) - r = n.firstChild().toText().data().toInt(); - else if ( n.tagName() == "green" ) - g = n.firstChild().toText().data().toInt(); - else if ( n.tagName() == "blue" ) - b = n.firstChild().toText().data().toInt(); - n = n.nextSibling().toElement(); - } - - return TQColor( r, g, b ); -} - -/*! - Returns the contents of attribute \a name of object \a e as - variant or the variant passed as \a defValue if the attribute does - not exist. - - \sa hasAttribute() - */ -TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment ) -{ - TQDomElement n; - for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { - if ( n.tagName() == "attribute" ) { - if ( n.attribute( "name" ) != name ) - continue; - return elementToVariant( n.firstChild().toElement(), defValue, comment ); - } - } - return defValue; -} - -/*! - \overload -*/ -TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue ) -{ - TQString comment; - return readAttribute( e, name, defValue, comment ); -} - -/*! - Returns wheter object \a e defines attribute \a name or not. - - \sa readAttribute() - */ -bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name ) -{ - TQDomElement n; - for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { - if ( n.tagName() == "attribute" ) { - if ( n.attribute( "name" ) != name ) - continue; - return TRUE; - } - } - return FALSE; -} - -static bool toBool( const TQString& s ) -{ - return s == "true" || s.toInt() != 0; -} - -/*! - Convert TQt 2.x format to TQt 3.0 format if necessary -*/ -void DomTool::fixDocument( TQDomDocument& doc ) -{ - TQDomElement e; - TQDomNode n; - TQDomNodeList nl; - int i = 0; - - e = doc.firstChild().toElement(); - if ( e.tagName() != "UI" ) - return; - - // latest version, don't do anything - if ( e.hasAttribute("version") && e.attribute("version").toDouble() > 3.0 ) - return; - - nl = doc.elementsByTagName( "property" ); - - // in 3.0, we need to fix a spelling error - if ( e.hasAttribute("version") && e.attribute("version").toDouble() == 3.0 ) { - for ( i = 0; i < (int) nl.length(); i++ ) { - TQDomElement el = nl.item(i).toElement(); - TQString s = el.attribute( "name" ); - if ( s == "resizeable" ) { - el.removeAttribute( "name" ); - el.setAttribute( "name", "resizable" ); - } - } - return; - } - - - // in versions smaller than 3.0 we need to change more - e.setAttribute( "version", 3.0 ); - - e.setAttribute("stdsetdef", 1 ); - for ( i = 0; i < (int) nl.length(); i++ ) { - e = nl.item(i).toElement(); - TQString name; - TQDomElement n2 = e.firstChild().toElement(); - if ( n2.tagName() == "name" ) { - name = n2.firstChild().toText().data(); - if ( name == "resizeable" ) - e.setAttribute( "name", "resizable" ); - else - e.setAttribute( "name", name ); - e.removeChild( n2 ); - } - bool stdset = toBool( e.attribute( "stdset" ) ); - if ( stdset || name == "toolTip" || name == "whatsThis" || - name == "buddy" || - e.parentNode().toElement().tagName() == "item" || - e.parentNode().toElement().tagName() == "spacer" || - e.parentNode().toElement().tagName() == "column" - ) - e.removeAttribute( "stdset" ); - else - e.setAttribute( "stdset", 0 ); - } - - nl = doc.elementsByTagName( "attribute" ); - for ( i = 0; i < (int) nl.length(); i++ ) { - e = nl.item(i).toElement(); - TQString name; - TQDomElement n2 = e.firstChild().toElement(); - if ( n2.tagName() == "name" ) { - name = n2.firstChild().toText().data(); - e.setAttribute( "name", name ); - e.removeChild( n2 ); - } - } - - nl = doc.elementsByTagName( "image" ); - for ( i = 0; i < (int) nl.length(); i++ ) { - e = nl.item(i).toElement(); - TQString name; - TQDomElement n2 = e.firstChild().toElement(); - if ( n2.tagName() == "name" ) { - name = n2.firstChild().toText().data(); - e.setAttribute( "name", name ); - e.removeChild( n2 ); - } - } - - nl = doc.elementsByTagName( "widget" ); - for ( i = 0; i < (int) nl.length(); i++ ) { - e = nl.item(i).toElement(); - TQString name; - TQDomElement n2 = e.firstChild().toElement(); - if ( n2.tagName() == "class" ) { - name = n2.firstChild().toText().data(); - e.setAttribute( "class", name ); - e.removeChild( n2 ); - } - } - -} - diff --git a/tdevdesigner/shared/domtool.h b/tdevdesigner/shared/domtool.h deleted file mode 100644 index efa67f09..00000000 --- a/tdevdesigner/shared/domtool.h +++ /dev/null @@ -1,53 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef DOMTOOL_H -#define DOMTOOL_H - -#include -#include - -class TQDomElement; -class TQDomDocument; - -class DomTool : public TQt -{ -public: - static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue ); - static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment ); - static bool hasProperty( const TQDomElement& e, const TQString& name ); - static TQStringList propertiesOfType( const TQDomElement& e, const TQString& type ); - static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue ); - static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment ); - static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue ); - static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment ); - static bool hasAttribute( const TQDomElement& e, const TQString& name ); - static TQColor readColor( const TQDomElement &e ); - static void fixDocument( TQDomDocument& ); -}; - - -#endif // DOMTOOL_H diff --git a/tdevdesigner/shared/globaldefs.h b/tdevdesigner/shared/globaldefs.h deleted file mode 100644 index 655545c6..00000000 --- a/tdevdesigner/shared/globaldefs.h +++ /dev/null @@ -1,62 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef GLOBALDEFS_H -#define GLOBALDEFS_H - -#include -#include - -#define BOXLAYOUT_DEFAULT_MARGIN 11 -#define BOXLAYOUT_DEFAULT_SPACING 6 - -#ifndef NO_STATIC_COLORS -static TQColor *backColor1 = 0; -static TQColor *backColor2 = 0; -static TQColor *selectedBack = 0; - -static void init_colors() -{ - if ( backColor1 ) - return; - -#if 0 // a calculated alternative for backColor1 - TQColorGroup myCg = tqApp->palette().active(); - int h1, s1, v1; - int h2, s2, v2; - myCg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 ); - myCg.color( TQColorGroup::Background ).hsv( &h2, &s2, &v2 ); - TQColor c( h1, s1, ( v1 + v2 ) / 2, TQColor::Hsv ); -#endif - - backColor1 = new TQColor( 250, 248, 235 ); - backColor2 = new TQColor( 255, 255, 255 ); - selectedBack = new TQColor( 230, 230, 230 ); -} - -#endif - -#endif diff --git a/tdevdesigner/shared/parser.cpp b/tdevdesigner/shared/parser.cpp deleted file mode 100644 index 1fb2c5a7..00000000 --- a/tdevdesigner/shared/parser.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "parser.h" -#include -#include - -class NormalizeObject : public TQObject -{ -public: - NormalizeObject() : TQObject() {} - static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); } -}; - -TQString Parser::cleanArgs( const TQString &func ) -{ - TQString slot( func ); - int begin = slot.find( "(" ) + 1; - TQString args = slot.mid( begin ); - args = args.left( args.find( ")" ) ); - TQStringList lst = TQStringList::split( ',', args ); - TQString res = slot.left( begin ); - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { - if ( it != lst.begin() ) - res += ","; - TQString arg = *it; - int pos = 0; - if ( ( pos = arg.find( "&" ) ) != -1 ) { - arg = arg.left( pos + 1 ); - } else if ( ( pos = arg.find( "*" ) ) != -1 ) { - arg = arg.left( pos + 1 ); - } else { - arg = arg.simplifyWhiteSpace(); - if ( ( pos = arg.find( ':' ) ) != -1 ) - arg = arg.left( pos ).simplifyWhiteSpace() + ":" + arg.mid( pos + 1 ).simplifyWhiteSpace(); - TQStringList l = TQStringList::split( ' ', arg ); - if ( l.count() == 2 ) { - if ( l[ 0 ] != "const" && l[ 0 ] != "unsigned" && l[ 0 ] != "var" ) - arg = l[ 0 ]; - } else if ( l.count() == 3 ) { - arg = l[ 0 ] + " " + l[ 1 ]; - } - } - res += arg; - } - res += ")"; - - return TQString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) ); -} diff --git a/tdevdesigner/shared/parser.h b/tdevdesigner/shared/parser.h deleted file mode 100644 index abec9963..00000000 --- a/tdevdesigner/shared/parser.h +++ /dev/null @@ -1,39 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef PARSER_H -#define PARSER_H - -#include - -class Parser -{ -public: - static TQString cleanArgs( const TQString &func ); - -}; - -#endif diff --git a/tdevdesigner/shared/ui2uib.cpp b/tdevdesigner/shared/ui2uib.cpp deleted file mode 100644 index 5cff46e0..00000000 --- a/tdevdesigner/shared/ui2uib.cpp +++ /dev/null @@ -1,893 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "ui2uib.h" -#include "uib.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - The .uib file format is the binary counterpart of the .ui file - format. It is generated by the ui2uib converter and understood by - TQWidgetFactory; in a future version, it might also be understood - by a uib2ui converter. Experiments show that .uib files are about - 2.5 times faster to load and 6 times smaller than .ui files. - - The .uib format, unlike the .ui format, is internal to Trolltech - and is not officially documented; it is assumed that anybody who - needs to understand the file format can read the ui2uib and - TQWidgetFactory source code, with some guidance. And here's some - guidance. - - A .uib file starts with a 32-bit magic number that allows - TQWidgetFactory to determine the file type. The magic number is - followed by '\n' (0x0a) and '\r' (0x0d), which ensure that the - file wasn't corrupted during transfer between different - platforms. For example, transferring a .ui file from Windows to - Unix using FTP with type ASCII will produce a file with '\r\n\r' - in place of '\n\r'. This is followed by the TQDataStream format - version number used. - - The rest of the file is made up of blocks, each of which starts - with a block type (Block_XXX) and a block length. Block_Intro and - Block_Widget are mandatory; the others are optional. - TQWidgetFactory makes certain assumptions about the order of the - blocks; for example, it expects Block_String before any other - block that refers to a string and Block_Images before - Block_Widget. The order generated by ui2uib is one of the orders - that make sense. Just after the last block, a Block_End marker - indicates the end of the file. - - The division of .uib files into blocks corresponds grossly to the - division of .ui files in top-level XML elements. Thus, - Block_Widget corresponds to and Block_Toolbars to - . The internal organization of each block also mimics - the organization of the corresponding XML elements. - - These are the major differences, all of which contribute to - making .uib files more compact: - - 1. The strings are gathered in Block_Strings, a string-table. - When a string is needed later, it is referenced by a 32-bit - index into that table. The UicStringTable class makes the - whole process of inserting and looking up strings very - simple. The advantage of this scheme is that if a string is - used more than once, it is stored only once. Also, the - string-table is preinitialized with very common strings, so - that these need not be stored along with .uib files. - - 2. TQObjects are referred to by index in a table rather than by - name. The table itself is not stored in the .uib file; it is - rather build dynamically by ui2uib and TQWidgetFactory as new - objects are specified. In ui2uib, the table is represented by - a UibIndexMap object; in TQWidgetFactory, a plain array of - TQObject pointers suffices. - - 3. The data is packed to take as little place as possible, - without slowing down TQLayoutFactory too much. For example, an - index into the string-table is a 32-bit integer, but in - practice it is rarely above 65534, so only 16 bits are used - for them; when an index above 65534 is met, the index is - saved as 65535 followed by the 32-bit index, for a total of - 48 bits. - - 4. The name of a signal or slot and its signature are saved - separately. That way, if a signal 'foo(const TQString&)' is - connected to a slot 'bar(const TQString&)', the string-table - will only contain 'foo', 'bar', and '(const TQString&)', - instead of the longer 'foo(const TQString&)' and 'bar(const - TQString&)'. The signatures are normalized beforehand to - ensure that trivial spacing problems don't result in multiple - string-table entries. - - 5. In a signal-to-slot connection, a sender, signal, receiver, - or slot is not repeated if it's the same as for the previous - connection. Bit flags indicate what is repeated and what is - specified. - - 6. Some of the information stored in a .ui file is useful only - by uic, not to TQLayoutFactory. That information is, for now, - not taken along in the .uib file. Likewise, needless - TQLayoutWidget objects are not taken along. - - The arbitrary constants related to the .uib file formats are - defined in uib.h. Constants such as Block_Actions and - Object_SubWidget are given values such as 'A' and 'W' to make - .uib files easier to read in a hexadecimal editor. - - The file format isn't designed to be extensible. Any extension - that prevents an older version of TQLayoutWidget of reading the - file correctly must have a different magic number. The plan is to - use UibMagic + 1 for version 2, UibMagic + 2 for version 3, etc. -*/ - -static TQCString layoutForTag( const TQString& tag ) -{ - if ( tag == "grid" ) { - return TQGRIDLAYOUT_OBJECT_NAME_STRING; - } else if ( tag == "hbox" ) { - return TQHBOXLAYOUT_OBJECT_NAME_STRING; - } else if ( tag == "vbox" ) { - return TQVBOXLAYOUT_OBJECT_NAME_STRING; - } else { - return TQLAYOUT_OBJECT_NAME_STRING; - } -} - -class UibHack : public TQObject -{ -public: - static TQString normalize( const TQString& member ) { - return TQString::fromUtf8( TQObject::normalizeSignalSlot(member.utf8()) ); - } -}; - -class UibIndexMap -{ -public: - UibIndexMap() : next( 0 ) { } - - void insert( const TQString& name ) { setName( insert(), name ); } - int insert() { return next++; } - void setName( int no, const TQString& name ); - - int find( const TQString& name, int deflt = -1 ) const; - int count() const { return next; } - -private: - TQMap nameMap; - TQMap conflicts; - int next; -}; - -void UibIndexMap::setName( int no, const TQString& name ) -{ - if ( !name.isEmpty() ) { - if ( *nameMap.insert(name, no, FALSE) != no ) - conflicts.insert( name, 0 ); - } -} - -int UibIndexMap::find( const TQString& name, int deflt ) const -{ - TQMap::ConstIterator no = nameMap.find( name ); - if ( no == nameMap.end() || conflicts.contains(name) ) { - return deflt; - } else { - return *no; - } -} - -static void packUInt16( TQDataStream& out, TQ_UINT16 n ) -{ - if ( n < 255 ) { - out << (TQ_UINT8) n; - } else { - out << (TQ_UINT8) 255; - out << n; - } -} - -static void packUInt32( TQDataStream& out, TQ_UINT32 n ) -{ - if ( n < 65535 ) { - out << (TQ_UINT16) n; - } else { - out << (TQ_UINT16) 65535; - out << n; - } -} - -static void packByteArray( TQDataStream& out, const TQByteArray& array ) -{ - packUInt32( out, array.size() ); - out.writeRawBytes( array.data(), array.size() ); -} - -static void packCString( UibStrTable& strings, TQDataStream& out, - const char *cstr ) -{ - packUInt32( out, strings.insertCString(cstr) ); -} - -static void packString( UibStrTable& strings, TQDataStream& out, - const TQString& str ) -{ - packUInt32( out, strings.insertString(str) ); -} - -static void packStringSplit( UibStrTable& strings, TQDataStream& out, - const TQString& str, TQChar sep ) -{ - int pos = str.find( sep ); - if ( pos == -1 ) - pos = str.length(); - packString( strings, out, str.left(pos) ); - packString( strings, out, str.mid(pos) ); -} - -static void packVariant( UibStrTable& strings, TQDataStream& out, - TQVariant value, TQString tag = "" ) -{ - TQStringList::ConstIterator s; - - TQ_UINT8 type = value.type(); - if ( tag == "pixmap" ) { - type = TQVariant::Pixmap; - } else if ( tag == "image" ) { - type = TQVariant::Image; - } else if ( tag == "iconset" ) { - type = TQVariant::IconSet; - } - out << type; - - switch ( type ) { - case TQVariant::String: - case TQVariant::Pixmap: - case TQVariant::Image: - case TQVariant::IconSet: - packString( strings, out, value.asString() ); - break; - case TQVariant::StringList: - packUInt16( out, value.asStringList().count() ); - s = value.asStringList().begin(); - while ( s != value.asStringList().end() ) { - packString( strings, out, *s ); - ++s; - } - break; - case TQVariant::Font: - out << value.asFont(); - break; - case TQVariant::Rect: - packUInt16( out, value.asRect().x() ); - packUInt16( out, value.asRect().y() ); - packUInt16( out, value.asRect().width() ); - packUInt16( out, value.asRect().height() ); - break; - case TQVariant::Size: - packUInt16( out, value.asSize().width() ); - packUInt16( out, value.asSize().height() ); - break; - case TQVariant::Color: - out << value.asColor(); - break; - case TQVariant::Point: - packUInt16( out, value.asPoint().x() ); - packUInt16( out, value.asPoint().y() ); - break; - case TQVariant::Int: - packUInt32( out, value.asInt() ); - break; - case TQVariant::Bool: - out << (TQ_UINT8) value.asBool(); - break; - case TQVariant::Double: - out << value.asDouble(); - break; - case TQVariant::CString: - packCString( strings, out, value.asCString() ); - break; - case TQVariant::Cursor: - out << value.asCursor(); - break; - case TQVariant::Date: - out << value.asDate(); - break; - case TQVariant::Time: - out << value.asTime(); - break; - case TQVariant::DateTime: - out << value.asDateTime(); - break; - default: - out << value; - } -} - -static void outputProperty( TQMap& buddies, int objectNo, - UibStrTable& strings, TQDataStream& out, - TQDomElement elem ) -{ - TQCString name = elem.attribute( "name" ).latin1(); - TQDomElement f = elem.firstChild().toElement(); - TQString tag = f.tagName(); - TQString comment; - TQVariant value; - - if ( name == "resizeable" ) - name = "resizable"; - - if ( tag == "font" ) { - TQString family; - TQ_UINT16 pointSize = 65535; - TQ_UINT8 fontFlags = 0; - - TQDomElement g = f.firstChild().toElement(); - while ( !g.isNull() ) { - TQString text = g.firstChild().toText().data(); - if ( g.tagName() == "family" ) { - fontFlags |= Font_Family; - family = text; - } else if ( g.tagName() == "pointsize" ) { - fontFlags |= Font_PointSize; - pointSize = (TQ_UINT16) text.toUInt(); - } else { - if ( g.firstChild().toText().data().toInt() != 0 ) { - if ( g.tagName() == "bold" ) { - fontFlags |= Font_Bold; - } else if ( g.tagName() == "italic" ) { - fontFlags |= Font_Italic; - } else if ( g.tagName() == "underline" ) { - fontFlags |= Font_Underline; - } else if ( g.tagName() == "strikeout" ) { - fontFlags |= Font_StrikeOut; - } - } - } - g = g.nextSibling().toElement(); - } - - out << (TQ_UINT8) Object_FontProperty; - packCString( strings, out, name ); - out << fontFlags; - if ( fontFlags & Font_Family ) - packString( strings, out, family ); - if ( fontFlags & Font_PointSize ) - packUInt16( out, pointSize ); - } else if ( tag == "palette" ) { - out << (TQ_UINT8) Object_PaletteProperty; - packCString( strings, out, name ); - - TQDomElement g = f.firstChild().toElement(); - while ( !g.isNull() ) { - TQDomElement h = g.firstChild().toElement(); - while ( !h.isNull() ) { - value = DomTool::elementToVariant( h, TQt::gray ); - if ( h.tagName() == "color" ) { - out << (TQ_UINT8) Palette_Color; - out << value.asColor(); - } else if ( h.tagName() == "pixmap" ) { - out << (TQ_UINT8) Palette_Pixmap; - packVariant( strings, out, value, "pixmap" ); - } - h = h.nextSibling().toElement(); - } - - if ( g.tagName() == "active" ) { - out << (TQ_UINT8) Palette_Active; - } else if ( g.tagName() == "inactive" ) { - out << (TQ_UINT8) Palette_Inactive; - } else { - out << (TQ_UINT8) Palette_Disabled; - } - g = g.nextSibling().toElement(); - } - out << (TQ_UINT8) Palette_End; - } else { - value = DomTool::elementToVariant( f, value, comment ); - if ( value.isValid() ) { - if ( name == "buddy" ) { - buddies[objectNo] += value.asString(); - } else { - if ( tag == "string" ) { - out << (TQ_UINT8) Object_TextProperty; - packCString( strings, out, name ); - packCString( strings, out, value.asString().utf8() ); - packCString( strings, out, comment.utf8() ); - } else { - out << (TQ_UINT8) Object_VariantProperty; - packCString( strings, out, name ); - packVariant( strings, out, value, tag ); - } - } - } - } -} - -static void outputGridCell( TQDataStream& out, TQDomElement elem ) -{ - int column = elem.attribute( "column", "0" ).toInt(); - int row = elem.attribute( "row", "0" ).toInt(); - int colspan = elem.attribute( "colspan", "1" ).toInt(); - int rowspan = elem.attribute( "rowspan", "1" ).toInt(); - if ( colspan < 1 ) - colspan = 1; - if ( rowspan < 1 ) - rowspan = 1; - - if ( column != 0 || row != 0 || colspan != 1 || rowspan != 1 ) { - out << (TQ_UINT8) Object_GridCell; - packUInt16( out, column ); - packUInt16( out, row ); - packUInt16( out, colspan ); - packUInt16( out, rowspan ); - } -} - -static int outputObject( TQMap& buddies, - UibIndexMap& objects, UibStrTable& strings, - TQDataStream& out, TQDomElement elem, - TQCString className = "" ); - -static void outputLayoutWidgetsSubLayout( TQMap& buddies, - UibIndexMap& objects, - UibStrTable& strings, - TQDataStream& out, TQDomElement elem ) -{ - int subLayoutNo = -1; - TQCString name; - TQDomElement nameElem; - - TQDomElement f = elem.firstChild().toElement(); - while ( !f.isNull() ) { - TQString tag = f.tagName(); - if ( tag == "grid" || tag == "hbox" || tag == "vbox" ) { - out << (TQ_UINT8) Object_SubLayout; - subLayoutNo = outputObject( buddies, objects, strings, out, f, - layoutForTag(tag) ); - } else if ( tag == "property" ) { - if ( f.attribute("name") == "name" ) { - name = DomTool::elementToVariant( f, name ).asCString(); - nameElem = f; - } - } - f = f.nextSibling().toElement(); - } - - if ( subLayoutNo != -1 ) { - /* - Remove the sub-layout's Object_End marker, append the grid - cell and the correct name property, and put the Object_End - marker back. - */ - out.device()->at( out.device()->at() - 1 ); - outputGridCell( out, elem ); - outputProperty( buddies, subLayoutNo, strings, out, nameElem ); - out << (TQ_UINT8) Object_End; - - objects.setName( subLayoutNo, name ); - } -} - -static int outputObject( TQMap& buddies, - UibIndexMap& objects, UibStrTable& strings, - TQDataStream& out, TQDomElement elem, - TQCString className ) -{ - bool isTQObject = !className.isEmpty(); - - if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) - out << (TQ_UINT8) elem.attribute( "dock", "0" ).toInt(); - if ( className == TQWIDGET_OBJECT_NAME_STRING ) - className = elem.attribute( "class", className ).latin1(); - - int objectNo = -1; - if ( isTQObject ) { - packCString( strings, out, className ); - objectNo = objects.insert(); - } - - outputGridCell( out, elem ); - - // optimization: insert '&Foo' into string-table before 'Foo' - if ( className == TQACTION_OBJECT_NAME_STRING || className == TQACTIONGROUP_OBJECT_NAME_STRING ) { - TQVariant value = DomTool::readProperty( elem, "menuText", TQVariant() ); - if ( value.asString().startsWith("&") ) - strings.insertString( value.asString() ); - } - - TQDomElement f = elem.firstChild().toElement(); - while ( !f.isNull() ) { - TQString tag = f.tagName(); - if ( tag == "action" ) { - if ( elem.tagName() == "item" || elem.tagName() == "toolbar" ) { - TQString actionName = f.attribute( "name" ); - int no = objects.find( actionName ); - if ( no != -1 ) { - out << (TQ_UINT8) Object_ActionRef; - packUInt16( out, no ); - } - } else { - out << (TQ_UINT8) Object_SubAction; - outputObject( buddies, objects, strings, out, f, TQACTION_OBJECT_NAME_STRING ); - } - } else if ( tag == "actiongroup" ) { - out << (TQ_UINT8) Object_SubAction; - outputObject( buddies, objects, strings, out, f, TQACTIONGROUP_OBJECT_NAME_STRING ); - } else if ( tag == "attribute" ) { - out << (TQ_UINT8) Object_Attribute; - outputProperty( buddies, objectNo, strings, out, f ); - } else if ( tag == "column" ) { - out << (TQ_UINT8) Object_Column; - outputObject( buddies, objects, strings, out, f ); - } else if ( tag == "event" ) { - out << (TQ_UINT8) Object_Event; - packCString( strings, out, f.attribute("name").latin1() ); - packVariant( strings, out, - TQStringList::split(',', f.attribute("functions")) ); - } else if ( tag == "grid" || tag == "hbox" || tag == "vbox" ) { - out << (TQ_UINT8) Object_SubLayout; - outputObject( buddies, objects, strings, out, f, - layoutForTag(tag) ); - } else if ( tag == "item" ) { - if ( elem.tagName() == "menubar" ) { - out << (TQ_UINT8) Object_MenuItem; - packCString( strings, out, f.attribute("name").latin1() ); - packCString( strings, out, f.attribute("text").utf8() ); - outputObject( buddies, objects, strings, out, f ); - } else { - out << (TQ_UINT8) Object_Item; - outputObject( buddies, objects, strings, out, f ); - } - } else if ( tag == "property" ) { - outputProperty( buddies, objectNo, strings, out, f ); - } else if ( tag == "row" ) { - out << (TQ_UINT8) Object_Row; - outputObject( buddies, objects, strings, out, f ); - } else if ( tag == "separator" ) { - out << (TQ_UINT8) Object_Separator; - } else if ( tag == "spacer" ) { - out << (TQ_UINT8) Object_Spacer; - outputObject( buddies, objects, strings, out, f ); - } else if ( tag == "widget" ) { - if ( f.attribute("class") == TQLAYOUTWIDGET_OBJECT_NAME_STRING && - elem.tagName() != "widget" ) { - outputLayoutWidgetsSubLayout( buddies, objects, strings, out, - f ); - } else { - out << (TQ_UINT8) Object_SubWidget; - outputObject( buddies, objects, strings, out, f, TQWIDGET_OBJECT_NAME_STRING ); - } - } - f = f.nextSibling().toElement(); - } - out << (TQ_UINT8) Object_End; - if ( isTQObject ) - objects.setName( objectNo, - DomTool::readProperty(elem, "name", "").asString() ); - return objectNo; -} - -static void outputBlock( TQDataStream& out, BlockTag tag, - const TQByteArray& data ) -{ - if ( !data.isEmpty() ) { - out << (TQ_UINT8) tag; - packByteArray( out, data ); - } -} - -void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) -{ - TQByteArray introBlock; - TQByteArray actionsBlock; - TQByteArray buddiesBlock; - TQByteArray connectionsBlock; - TQByteArray functionsBlock; - TQByteArray imagesBlock; - TQByteArray menubarBlock; - TQByteArray slotsBlock; - TQByteArray tabstopsBlock; - TQByteArray toolbarsBlock; - TQByteArray variablesBlock; - TQByteArray widgetBlock; - - TQDomElement actionsElem; - TQDomElement connectionsElem; - TQDomElement imagesElem; - TQDomElement menubarElem; - TQDomElement tabstopsElem; - TQDomElement toolbarsElem; - TQDomElement widgetElem; - - TQMap buddies; - UibStrTable strings; - UibIndexMap objects; - int widgetNo = -1; - TQCString className; - TQ_INT16 defaultMargin = -32768; - TQ_INT16 defaultSpacing = -32768; - TQ_UINT8 introFlags = 0; - - TQDomElement elem = doc.firstChild().toElement().firstChild().toElement(); - while ( !elem.isNull() ) { - TQString tag = elem.tagName(); - - switch ( tag[0].latin1() ) { - case 'a': - if ( tag == "actions" ) - actionsElem = elem; - break; - case 'c': - if ( tag == "class" ) { - className = elem.firstChild().toText().data().latin1(); - } else if ( tag == "connections" ) { - connectionsElem = elem; - } - break; - case 'f': - if ( tag == "functions" ) { - TQDataStream out2( functionsBlock, IO_WriteOnly ); - TQDomElement f = elem.firstChild().toElement(); - while ( !f.isNull() ) { - if ( f.tagName() == "function" ) { - packStringSplit( strings, out2, - f.attribute("name").latin1(), '(' ); - packString( strings, out2, - f.firstChild().toText().data() ); - } - f = f.nextSibling().toElement(); - } - } - break; - case 'i': - if ( tag == "images" ) { - TQDataStream out2( imagesBlock, IO_WriteOnly ); - TQDomElement f = elem.firstChild().toElement(); - while ( !f.isNull() ) { - if ( f.tagName() == "image" ) { - TQString name = f.attribute( "name" ); - TQDomElement g = f.firstChild().toElement(); - if ( g.tagName() == "data" ) { - TQString format = g.attribute( "format", "PNG" ); - TQString hex = g.firstChild().toText().data(); - int n = hex.length() / 2; - TQByteArray data( n ); - for ( int i = 0; i < n; i++ ) - data[i] = (char) hex.mid( 2 * i, 2 ) - .toUInt( 0, 16 ); - - packString( strings, out2, name ); - packString( strings, out2, format ); - packUInt32( out2, g.attribute("length").toInt() ); - packByteArray( out2, data ); - } - } - f = f.nextSibling().toElement(); - } - } - break; - case 'l': - if ( tag == "layoutdefaults" ) { - TQString margin = elem.attribute( "margin" ); - if ( !margin.isEmpty() ) - defaultMargin = margin.toInt(); - TQString spacing = elem.attribute( "spacing" ); - if ( !spacing.isEmpty() ) - defaultSpacing = spacing.toInt(); - } - break; - case 'm': - if ( tag == "menubar" ) - menubarElem = elem; - break; - case 'p': - if ( tag == "pixmapinproject" ) - introFlags |= Intro_Pixmapinproject; - break; - case 's': - if ( tag == "slots" ) { - TQDataStream out2( slotsBlock, IO_WriteOnly ); - TQDomElement f = elem.firstChild().toElement(); - while ( !f.isNull() ) { - if ( f.tagName() == "slot" ) { - TQString language = f.attribute( "language", "C++" ); - TQString slot = UibHack::normalize( - f.firstChild().toText().data() ); - packString( strings, out2, language ); - packStringSplit( strings, out2, slot, '(' ); - } - f = f.nextSibling().toElement(); - } - } - break; - case 't': - if ( tag == "tabstops" ) { - tabstopsElem = elem; - } else if ( tag == "toolbars" ) { - toolbarsElem = elem; - } - break; - case 'v': - if ( tag == "variable" ) { - TQDataStream out2( variablesBlock, IO_WriteOnly | IO_Append ); - packString( strings, out2, elem.firstChild().toText().data() ); - } else if ( tag == "variables" ) { - TQDataStream out2( variablesBlock, IO_WriteOnly ); - TQDomElement f = elem.firstChild().toElement(); - while ( !f.isNull() ) { - if ( f.tagName() == "variable" ) - packString( strings, out2, - f.firstChild().toText().data() ); - f = f.nextSibling().toElement(); - } - } - break; - case 'w': - if ( tag == "widget" ) - widgetElem = elem; - } - elem = elem.nextSibling().toElement(); - } - - { - TQDataStream out2( widgetBlock, IO_WriteOnly ); - widgetNo = outputObject( buddies, objects, strings, out2, widgetElem, - TQWIDGET_OBJECT_NAME_STRING ); - } - - if ( !tabstopsElem.isNull() ) { - TQDataStream out2( tabstopsBlock, IO_WriteOnly ); - TQDomElement f = tabstopsElem.firstChild().toElement(); - while ( !f.isNull() ) { - if ( f.tagName() == "tabstop" ) { - TQString widgetName = f.firstChild().toText().data(); - int no = objects.find( widgetName ); - if ( no != -1 ) - packUInt16( out2, no ); - } - f = f.nextSibling().toElement(); - } - } - - if ( !actionsElem.isNull() ) { - TQDataStream out2( actionsBlock, IO_WriteOnly ); - outputObject( buddies, objects, strings, out2, actionsElem ); - } - - if ( !menubarElem.isNull() ) { - TQDataStream out2( menubarBlock, IO_WriteOnly ); - outputObject( buddies, objects, strings, out2, menubarElem, - TQMENUBAR_OBJECT_NAME_STRING ); - } - - if ( !toolbarsElem.isNull() ) { - TQDataStream out2( toolbarsBlock, IO_WriteOnly ); - TQDomElement f = toolbarsElem.firstChild().toElement(); - while ( !f.isNull() ) { - if ( f.tagName() == "toolbar" ) - outputObject( buddies, objects, strings, out2, f, TQTOOLBAR_OBJECT_NAME_STRING ); - f = f.nextSibling().toElement(); - } - } - - if ( !buddies.isEmpty() ) { - TQDataStream out2( buddiesBlock, IO_WriteOnly ); - TQMap::ConstIterator a = buddies.begin(); - while ( a != buddies.end() ) { - TQStringList::ConstIterator b = (*a).begin(); - while ( b != (*a).end() ) { - int no = objects.find( *b ); - if ( no != -1 ) { - packUInt16( out2, a.key() ); - packUInt16( out2, no ); - } - ++b; - } - ++a; - } - } - - if ( !connectionsElem.isNull() ) { - TQString prevLanguage = "C++"; - int prevSenderNo = 0; - TQString prevSignal = "clicked()"; - int prevReceiverNo = 0; - TQString prevSlot = "accept()"; - - TQDataStream out2( connectionsBlock, IO_WriteOnly ); - TQDomElement f = connectionsElem.firstChild().toElement(); - while ( !f.isNull() ) { - if ( f.tagName() == "connection" ) { - TQMap argMap; - - TQDomElement g = f.firstChild().toElement(); - while ( !g.isNull() ) { - argMap[g.tagName()] = g.firstChild().toText().data(); - g = g.nextSibling().toElement(); - } - - TQString language = f.attribute( "language", "C++" ); - int senderNo = objects.find( argMap["sender"], widgetNo ); - int receiverNo = objects.find( argMap["receiver"], widgetNo ); - TQString signal = UibHack::normalize( argMap["signal"] ); - TQString slot = UibHack::normalize( argMap["slot"] ); - - TQ_UINT8 connectionFlags = 0; - if ( language != prevLanguage ) - connectionFlags |= Connection_Language; - if ( senderNo != prevSenderNo ) - connectionFlags |= Connection_Sender; - if ( signal != prevSignal ) - connectionFlags |= Connection_Signal; - if ( receiverNo != prevReceiverNo ) - connectionFlags |= Connection_Receiver; - if ( slot != prevSlot ) - connectionFlags |= Connection_Slot; - out2 << connectionFlags; - - if ( connectionFlags & Connection_Language ) - packString( strings, out2, language ); - if ( connectionFlags & Connection_Sender ) - packUInt16( out2, senderNo ); - if ( connectionFlags & Connection_Signal ) - packStringSplit( strings, out2, signal, '(' ); - if ( connectionFlags & Connection_Receiver ) - packUInt16( out2, receiverNo ); - if ( connectionFlags & Connection_Slot ) - packStringSplit( strings, out2, slot, '(' ); - - prevLanguage = language; - prevSenderNo = senderNo; - prevSignal = signal; - prevReceiverNo = receiverNo; - prevSlot = slot; - } else if ( f.tagName() == "slot" ) { - // ### - } - f = f.nextSibling().toElement(); - } - } - - { - TQDataStream out2( introBlock, IO_WriteOnly ); - out2 << introFlags; - out2 << defaultMargin; - out2 << defaultSpacing; - packUInt16( out2, objects.count() ); - packCString( strings, out2, className ); - } - - out << UibMagic; - out << (TQ_UINT8) '\n'; - out << (TQ_UINT8) '\r'; - out << (TQ_UINT8) out.version(); - outputBlock( out, Block_Strings, strings.block() ); - outputBlock( out, Block_Intro, introBlock ); - outputBlock( out, Block_Images, imagesBlock ); - outputBlock( out, Block_Widget, widgetBlock ); - outputBlock( out, Block_Slots, slotsBlock ); - outputBlock( out, Block_Tabstops, tabstopsBlock ); - outputBlock( out, Block_Actions, actionsBlock ); - outputBlock( out, Block_Menubar, menubarBlock ); - outputBlock( out, Block_Toolbars, toolbarsBlock ); - outputBlock( out, Block_Variables, variablesBlock ); - outputBlock( out, Block_Functions, functionsBlock ); - outputBlock( out, Block_Buddies, buddiesBlock ); - outputBlock( out, Block_Connections, connectionsBlock ); - out << (TQ_UINT8) Block_End; -} diff --git a/tdevdesigner/shared/ui2uib.h b/tdevdesigner/shared/ui2uib.h deleted file mode 100644 index 81041e6e..00000000 --- a/tdevdesigner/shared/ui2uib.h +++ /dev/null @@ -1,35 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef UI2UIB_H -#define UI2UIB_H - -class TQDataStream; -class TQDomDocument; - -void convertUiToUib( TQDomDocument& doc, TQDataStream& out ); - -#endif diff --git a/tdevdesigner/shared/uib.cpp b/tdevdesigner/shared/uib.cpp deleted file mode 100644 index 7072626a..00000000 --- a/tdevdesigner/shared/uib.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "uib.h" - -static const char commonStrings[] = - "\0()\0(bool)\0(const TQString&)\0(int)\0C++\0Layout1\0PNG\0TQCheckBox\0" - "TQComboBox\0TQDialog\0TQFrame\0TQGridLayout\0TQGroupBox\0TQHBoxLayout\0TQLabel\0" - "TQLineEdit\0TQListView\0TQPushButton\0TQRadioButton\0TQVBoxLayout\0TQWidget\0" - "TextLabel1\0XPM.GZ\0accept\0autoDefault\0buddy\0caption\0clicked\0" - "default\0destroy\0frameShadow\0frameShape\0geometry\0init\0margin\0" - "maximumSize\0minimumSize\0name\0reject\0sizePolicy\0spacing\0text\0title\0" - "toolTip\0unnamed\0whatsThis"; - -UibStrTable::UibStrTable() - : out( table, IO_WriteOnly ), start( sizeof(commonStrings) ) -{ - out.writeRawBytes( commonStrings, start ); -} diff --git a/tdevdesigner/shared/uib.h b/tdevdesigner/shared/uib.h deleted file mode 100644 index e6a6b05f..00000000 --- a/tdevdesigner/shared/uib.h +++ /dev/null @@ -1,152 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef UIB_H -#define UIB_H - -#include - -const TQ_UINT32 UibMagic = 0xb77c61d8; - -enum BlockTag { Block_End = '$', Block_Actions = 'A', Block_Buddies = 'B', - Block_Connections = 'C', Block_Functions = 'F', - Block_Images = 'G', Block_Intro = 'I', Block_Menubar = 'M', - Block_Slots = 'S', Block_Strings = 'Z', Block_Tabstops = 'T', - Block_Toolbars = 'O', Block_Variables = 'V', - Block_Widget = 'W' }; - -enum ObjectTag { Object_End = '$', Object_ActionRef = 'X', - Object_Attribute = 'B', Object_Column = 'C', - Object_Event = 'E', Object_FontProperty = 'F', - Object_GridCell = 'G', Object_Item = 'I', - Object_MenuItem = 'M', Object_PaletteProperty = 'P', - Object_Row = 'R', Object_Separator = 'S', Object_Spacer = 'Y', - Object_SubAction = 'A', Object_SubLayout = 'L', - Object_SubWidget = 'W', Object_TextProperty = 'T', - Object_VariantProperty = 'V' }; - -enum PaletteTag { Palette_End = '$', Palette_Active = 'A', - Palette_Inactive = 'I', Palette_Disabled = 'D', - Palette_Color = 'C', Palette_Pixmap = 'P' }; - -enum IntroFlag { Intro_Pixmapinproject = 0x1 }; - -enum FontFlag { Font_Family = 0x1, Font_PointSize = 0x2, Font_Bold = 0x4, - Font_Italic = 0x8, Font_Underline = 0x10, - Font_StrikeOut = 0x20 }; - -enum ConnectionFlag { Connection_Language = 0x1, Connection_Sender = 0x2, - Connection_Signal = 0x4, Connection_Receiver = 0x8, - Connection_Slot = 0x10 }; - -class UibStrTable -{ -public: - UibStrTable(); - - inline int insertCString( const char *cstr ); - inline int insertString( const TQString& str ); - inline void readBlock( TQDataStream& in, int size ); - - inline const char *asCString( int offset ) const; - inline TQString asString( int offset ) const; - inline TQByteArray block() const; - -private: - TQCString table; - TQDataStream out; - int start; -}; - -/* - uic uses insertCString(), insertString(), and block(); - TQWidgetFactory uses readBlock(), asCString(), and asString(). By - implementing these functions inline, we ensure that the binaries - don't contain needless code. -*/ - -inline int UibStrTable::insertCString( const char *cstr ) -{ - if ( cstr == 0 || cstr[0] == 0 ) { - return 0; - } else { - int nextPos = table.size(); - int len = strlen( cstr ); - int i; - for ( i = 0; i < nextPos - len; i++ ) { - if ( memcmp(table.data() + i, cstr, len + 1) == 0 ) - return i; - } - for ( i = 0; i < len + 1; i++ ) - out << (TQ_UINT8) cstr[i]; - return nextPos; - } -} - -inline int UibStrTable::insertString( const TQString& str ) -{ - if ( str.contains('\0') || str[0] == TQChar(0x7f) ) { - int nextPos = table.size(); - out << (TQ_UINT8) 0x7f; - out << str; - return nextPos; - } else { - return insertCString( str.utf8() ); - } -} - -inline void UibStrTable::readBlock( TQDataStream& in, int size ) -{ - table.resize( start + size ); - in.readRawBytes( table.data() + start, size ); -} - -inline TQString UibStrTable::asString( int offset ) const -{ - if ( table[offset] == 0x7f ) { - TQDataStream in( table, IO_ReadOnly ); - in.device()->at( offset + 1 ); - TQString str; - in >> str; - return str; - } else { - return TQString::fromUtf8( asCString(offset) ); - } -} - -inline const char *UibStrTable::asCString( int offset ) const -{ - return table.data() + offset; -} - -inline TQByteArray UibStrTable::block() const -{ - TQByteArray block; - block.duplicate( table.data() + start, table.size() - start ); - return block; -} - -#endif diff --git a/tdevdesigner/shared/widgetdatabase.cpp b/tdevdesigner/shared/widgetdatabase.cpp deleted file mode 100644 index c2635a9d..00000000 --- a/tdevdesigner/shared/widgetdatabase.cpp +++ /dev/null @@ -1,960 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "widgetdatabase.h" -#include "../interfaces/widgetinterface.h" - -#include "../designer/tdevdesigner_part.h" - -#include -#include - -#include -#define NO_STATIC_COLORS -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -const int dbsize = 300; -const int dbcustom = 200; -const int dbdictsize = 211; -static WidgetDatabaseRecord* db[ dbsize ]; -static TQDict *className2Id = 0; -static int dbcount = 0; -static int dbcustomcount = 200; -static TQStrList *wGroups; -static TQStrList *invisibleGroups; -static bool whatsThisLoaded = FALSE; -static TQPluginManager *widgetPluginManager = 0; -static bool plugins_set_up = FALSE; -static bool was_in_setup = FALSE; - -TQCleanupHandler > cleanup_manager; - -WidgetDatabaseRecord::WidgetDatabaseRecord() -{ - isForm = FALSE; - isContainer = FALSE; - icon = 0; - nameCounter = 0; - isCommon = FALSE; - isPlugin = FALSE; -} - -WidgetDatabaseRecord::~WidgetDatabaseRecord() -{ - delete icon; -} - - -/*! - \class WidgetDatabase widgetdatabase.h - \brief The WidgetDatabase class holds information about widgets - - The WidgetDatabase holds information about widgets like toolTip(), - iconSet(), ... It works Id-based, so all access functions take the - widget id as parameter. To get the id for a widget (classname), use - idFromClassName(). - - All access functions are static. Having multiple widgetdatabases in - one application doesn't make sense anyway and so you don't need more - than an instance of the widgetdatabase. - - For creating widgets, layouts, etc. see WidgetFactory. -*/ - -/*! - Creates widget database. Does nothing. -*/ - -WidgetDatabase::WidgetDatabase() -{ -} - -/*! Sets up the widget database. If the static widgetdatabase already - exists, the functions returns immediately. -*/ - -void WidgetDatabase::setupDataBase( int id ) -{ - was_in_setup = TRUE; -#ifndef UIC - Q_UNUSED( id ) - if ( dbcount ) - return; -#else - if ( dbcount && id != -2 ) - return; - if ( dbcount && !plugins_set_up ) { - setupPlugins(); - return; - } - if ( dbcount && plugins_set_up) - return; -#endif - - wGroups = new TQStrList; - invisibleGroups = new TQStrList; - invisibleGroups->append( "Forms" ); - invisibleGroups->append( "Temp" ); - className2Id = new TQDict( dbdictsize ); - className2Id->setAutoDelete( TRUE ); - - WidgetDatabaseRecord *r = 0; - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_pushbutton.png"; - r->name = TQPUSHBUTTON_OBJECT_NAME_STRING; - r->group = widgetGroup( "Buttons" ); - r->toolTip = "Push Button"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_toolbutton.png"; - r->name = TQTOOLBUTTON_OBJECT_NAME_STRING; - r->group = widgetGroup( "Buttons" ); - r->toolTip = "Tool Button"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_radiobutton.png"; - r->name = TQRADIOBUTTON_OBJECT_NAME_STRING; - r->group = widgetGroup( "Buttons" ); - r->toolTip = "Radio Button"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_checkbox.png"; - r->name = TQCHECKBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Buttons" ); - r->toolTip = "Check Box"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_groupbox.png"; - r->name = TQGROUPBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Group Box"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_buttongroup.png"; - r->name = TQBUTTONGROUP_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Button Group"; - r->isContainer = TRUE; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_frame.png"; - r->name = TQFRAME_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Frame"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_tabwidget.png"; - r->name = TQTABWIDGET_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Tabwidget"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_widgetstack.png"; - r->name = TQWIDGETSTACK_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Widget Stack"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_toolbox.png"; - r->name = TQTOOLBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Tool Box"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_listbox.png"; - r->name = TQLISTBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Views" ); - r->toolTip = "List Box"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_listview.png"; - r->name = TQLISTVIEW_OBJECT_NAME_STRING; - r->group = widgetGroup( "Views" ); - r->toolTip = "List View"; - - append( r ); - -#if !defined(TQT_NO_ICONVIEW) || defined(UIC) - r = new WidgetDatabaseRecord; - r->iconSet = "designer_iconview.png"; - r->name = TQICONVIEW_OBJECT_NAME_STRING; - r->group = widgetGroup( "Views" ); - r->toolTip = "Icon View"; - - append( r ); -#endif - -#if !defined(TQT_NO_TABLE) - r = new WidgetDatabaseRecord; - r->iconSet = "designer_table.png"; - r->name = TQTABLE_OBJECT_NAME_STRING; - r->group = widgetGroup( "Views" ); - r->toolTip = "Table"; - - append( r ); -#endif - -#if !defined(TQT_NO_SQL) - r = new WidgetDatabaseRecord; - r->iconSet = "designer_datatable.png"; - r->includeFile = "tqdatatable.h"; - r->name = TQDATATABLE_OBJECT_NAME_STRING; - r->group = widgetGroup( "Database" ); - r->toolTip = "Data Table"; - - append( r ); -#endif - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_lineedit.png"; - r->name = TQLINEEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Line Edit"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_spinbox.png"; - r->name = TQSPINBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Spin Box"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_dateedit.png"; - r->name = TQDATEEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Date Edit"; - r->includeFile = "tqdatetimeedit.h"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_timeedit.png"; - r->name = TQTIMEEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Time Edit"; - r->includeFile = "tqdatetimeedit.h"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_datetimeedit.png"; - r->name = TQDATETIMEEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Date-Time Edit"; - r->includeFile = "tqdatetimeedit.h"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_multilineedit.png"; - r->name = TQMULTILINEEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Temp" ); - r->toolTip = "Multi Line Edit"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_richtextedit.png"; - r->name = TQTEXTEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Rich Text Edit"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_combobox.png"; - r->name = TQCOMBOBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Combo Box"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_slider.png"; - r->name = TQSLIDER_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Slider"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_scrollbar.png"; - r->name = TQSCROLLBAR_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Scrollbar"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_dial.png"; - r->name = TQDIAL_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Dial"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_label.png"; - r->name = TQLABEL_OBJECT_NAME_STRING; - r->group = widgetGroup( "Temp" ); - r->toolTip = "Label"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_label.png"; - r->name = "TextLabel"; - r->group = widgetGroup( "Display" ); - r->toolTip = "Text Label"; - r->whatsThis = "The Text Label provides a widget to display static text."; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_pixlabel.png"; - r->name = "PixmapLabel"; - r->group = widgetGroup( "Display" ); - r->toolTip = "Pixmap Label"; - r->whatsThis = "The Pixmap Label provides a widget to display pixmaps."; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_lcdnumber.png"; - r->name = TQLCDNUMBER_OBJECT_NAME_STRING; - r->group = widgetGroup( "Display" ); - r->toolTip = "LCD Number"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_line.png"; - r->name = "Line"; - r->group = widgetGroup( "Display" ); - r->toolTip = "Line"; - r->includeFile = "tqframe.h"; - r->whatsThis = "The Line widget provides horizontal and vertical lines."; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_progress.png"; - r->name = TQPROGRESSBAR_OBJECT_NAME_STRING; - r->group = widgetGroup( "Display" ); - r->toolTip = "Progress Bar"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_textview.png"; - r->name = TQTEXTVIEW_OBJECT_NAME_STRING; - r->group = widgetGroup( "Temp" ); - r->toolTip = "Text View"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_textbrowser.png"; - r->name = TQTEXTBROWSER_OBJECT_NAME_STRING; - r->group = widgetGroup( "Display" ); - r->toolTip = "Text Browser"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_spacer.png"; - r->name = "Spacer"; - r->group = widgetGroup( "Temp" ); - r->toolTip = "Spacer"; - r->whatsThis = "The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of layouts."; - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = TQWIDGET_OBJECT_NAME_STRING; - r->isForm = TRUE; - r->group = widgetGroup( "Forms" ); - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = TQDIALOG_OBJECT_NAME_STRING; - r->group = widgetGroup( "Forms" ); - r->isForm = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = TQWIZARD_OBJECT_NAME_STRING; - r->group = widgetGroup( "Forms" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = "TQDesignerWizard"; - r->group = widgetGroup( "Forms" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = TQLAYOUTWIDGET_OBJECT_NAME_STRING; - r->group = widgetGroup( "Temp" ); - r->includeFile = ""; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = TQSPLITTER_OBJECT_NAME_STRING; - r->group = widgetGroup( "Temp" ); - r->includeFile = "tqsplitter.h"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_tabwidget.png"; - r->name = "TQDesignerTabWidget"; - r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_tabwidget.png"; - r->name = "TQDesignerWidget"; - r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_tabwidget.png"; - r->name = "TQDesignerDialog"; - r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = TQMAINWINDOW_OBJECT_NAME_STRING; - r->includeFile = "tqmainwindow.h"; - r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = "TQDesignerAction"; - r->includeFile = "tqaction.h"; - r->group = widgetGroup( "Temp" ); - r->isContainer = FALSE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = "TQDesignerActionGroup"; - r->includeFile = "tqaction.h"; - r->group = widgetGroup( "Temp" ); - r->isContainer = FALSE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = TQSCROLLVIEW_OBJECT_NAME_STRING; - r->includeFile = "tqscrollview.h"; - r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; - - append( r ); - -#ifndef TQT_NO_SQL - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = TQDATABROWSER_OBJECT_NAME_STRING; - r->includeFile = "tqdatabrowser.h"; - r->group = widgetGroup( "Database" ); - r->toolTip = "Data Browser"; - r->iconSet = "designer_databrowser.png"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = TQDATAVIEW_OBJECT_NAME_STRING; - r->includeFile = "tqdataview.h"; - r->group = widgetGroup( "Database" ); - r->toolTip = "Data View"; - r->iconSet = "designer_dataview.png"; - r->isContainer = TRUE; - - append( r ); -#endif - -#ifndef UIC - setupPlugins(); -#endif -} - -void WidgetDatabase::setupPlugins() -{ - if ( plugins_set_up ) - return; - plugins_set_up = TRUE; - TQStringList widgets = widgetManager()->featureList(); - for ( TQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) { - if ( hasWidget( *it ) ) - continue; - WidgetDatabaseRecord *r = new WidgetDatabaseRecord; - WidgetInterface *iface = 0; - widgetManager()->queryInterface( *it, &iface ); - if ( !iface ) - continue; - -#ifndef UIC - TQIconSet icon = iface->iconSet( *it ); - if ( !icon.pixmap().isNull() ) - r->icon = new TQIconSet( icon ); -#endif - TQString grp = iface->group( *it ); - if ( grp.isEmpty() ) - grp = "3rd party widgets"; - r->group = widgetGroup( grp ); - r->toolTip = iface->toolTip( *it ); - r->whatsThis = iface->whatsThis( *it ); - r->includeFile = iface->includeFile( *it ); - r->isContainer = iface->isContainer( *it ); - r->name = *it; - r->isPlugin = TRUE; - append( r ); - iface->release(); - } -} - -/*! - Returns the number of elements in the widget database. -*/ - -int WidgetDatabase::count() -{ - setupDataBase( -1 ); - return dbcount; -} - -/*! - Returns the id at which the ids of custom widgets start. -*/ - -int WidgetDatabase::startCustom() -{ - setupDataBase( -1 ); - return dbcustom; -} - -/*! - Returns the iconset which represents the class registered as \a id. -*/ - -TQIconSet WidgetDatabase::iconSet( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQIconSet(); -#if !defined(UIC) && !defined(RESOURCE) - if ( !r->icon ) { - if ( r->iconSet.isEmpty() ) - return TQIconSet(); - TQPixmap pix = BarIcon( r->iconSet, TDevDesignerPartFactory::instance() ); - if ( pix.isNull() ) - pix = TQPixmap( r->iconSet ); - r->icon = new TQIconSet( pix ); - } - return *r->icon; -#else - return TQIconSet(); -#endif -} - -/*! - Returns the classname of the widget which is registered as \a id. -*/ - -TQString WidgetDatabase::className( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQString(); - return r->name; -} - -/*! - Returns the group the widget registered as \a id belongs to. -*/ - -TQString WidgetDatabase::group( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQString(); - return r->group; -} - -/*! - Returns the tooltip text of the widget which is registered as \a id. -*/ - -TQString WidgetDatabase::toolTip( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQString(); - return r->toolTip; -} - -/*! - Returns the what's this? text of the widget which is registered as \a id. -*/ - -TQString WidgetDatabase::whatsThis( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQString(); - return r->whatsThis; -} - -/*! - Returns the include file if the widget which is registered as \a id. -*/ - -TQString WidgetDatabase::includeFile( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQString(); - if ( r->includeFile.isNull() ) - return r->name.lower() + ".h"; - return r->includeFile; -} - -/*! Returns whether the widget registered as \a id is a form. -*/ -bool WidgetDatabase::isForm( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return FALSE; - return r->isForm; -} - -/*! Returns whether the widget registered as \a id can have children. -*/ - -bool WidgetDatabase::isContainer( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return FALSE; - return r->isContainer || r->isForm; -} - -bool WidgetDatabase::isCommon( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return FALSE; - return r->isCommon; -} - -TQString WidgetDatabase::createWidgetName( int id ) -{ - setupDataBase( id ); - TQString n = className( id ); - if ( n == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) - n = "Layout"; - if ( n[ 0 ] == 'Q' && n[ 1 ].lower() != n[ 1 ] ) - n = n.mid( 1 ); - int colonColon = n.findRev( "::" ); - if ( colonColon != -1 ) - n = n.mid( colonColon + 2 ); - - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return n; - n += TQString::number( ++r->nameCounter ); - n[0] = n[0].lower(); - return n; -} - -/*! Returns the id for \a name or -1 if \a name is unknown. - */ -int WidgetDatabase::idFromClassName( const TQString &name ) -{ - setupDataBase( -1 ); - if ( name.isEmpty() ) - return 0; - int *i = className2Id->find( name ); - if ( i ) - return *i; - if ( name == "FormWindow" ) - return idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ); -#ifdef UIC - setupDataBase( -2 ); - i = className2Id->find( name ); - if ( i ) - return *i; -#endif - return -1; -} - -bool WidgetDatabase::hasWidget( const TQString &name ) -{ - return className2Id->find( name ) != 0; -} - -WidgetDatabaseRecord *WidgetDatabase::at( int index ) -{ - if ( index < 0 ) - return 0; - if ( index >= dbcustom && index < dbcustomcount ) - return db[ index ]; - if ( index < dbcount ) - return db[ index ]; - return 0; -} - -void WidgetDatabase::insert( int index, WidgetDatabaseRecord *r ) -{ - if ( index < 0 || index >= dbsize ) - return; - db[ index ] = r; - className2Id->insert( r->name, new int( index ) ); - if ( index < dbcustom ) - dbcount = TQMAX( dbcount, index ); -} - -void WidgetDatabase::append( WidgetDatabaseRecord *r ) -{ - if ( !was_in_setup ) - setupDataBase( -1 ); - insert( dbcount++, r ); -} - -TQString WidgetDatabase::widgetGroup( const TQString &g ) -{ - if ( wGroups->find( g.ascii() ) == -1 ) - wGroups->append( g.ascii() ); - return g; -} - -bool WidgetDatabase::isGroupEmpty( const TQString &grp ) -{ - WidgetDatabaseRecord *r = 0; - for ( int i = 0; i < dbcount; ++i ) { - if ( !( r = db[ i ] ) ) - continue; - if ( r->group == grp ) - return FALSE; - } - return TRUE; -} - -TQString WidgetDatabase::widgetGroup( int i ) -{ - setupDataBase( -1 ); - if ( i >= 0 && i < (int)wGroups->count() ) - return wGroups->at( i ); - return TQString(); -} - -int WidgetDatabase::numWidgetGroups() -{ - setupDataBase( -1 ); - return wGroups->count(); -} - -bool WidgetDatabase::isGroupVisible( const TQString &g ) -{ - setupDataBase( -1 ); - return invisibleGroups->find( g.ascii() ) == -1; -} - -int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r ) -{ - insert( dbcustomcount++, r ); - return dbcustomcount - 1; -} - -void WidgetDatabase::customWidgetClassNameChanged( const TQString &oldName, - const TQString &newName ) -{ - int id = idFromClassName( oldName ); - if ( id == -1 ) - return; - WidgetDatabaseRecord *r = db[ id ]; - r->name = newName; - className2Id->remove( oldName ); - className2Id->insert( newName, new int( id ) ); -} - -bool WidgetDatabase::isCustomWidget( int id ) -{ - if ( id >= dbcustom && id < dbcustomcount ) - return TRUE; - return FALSE; -} - -bool WidgetDatabase::isCustomPluginWidget( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return FALSE; - return r->isPlugin; -} - -bool WidgetDatabase::isWhatsThisLoaded() -{ - return whatsThisLoaded; -} - -void WidgetDatabase::loadWhatsThis( const TQString &docPath ) -{ - TQString whatsthisFile = docPath + "/whatsthis"; - TQFile f( whatsthisFile ); - if ( !f.open( IO_ReadOnly ) ) - return; - TQTextStream ts( &f ); - while ( !ts.atEnd() ) { - TQString s = ts.readLine(); - TQStringList l = TQStringList::split( " | ", s ); - int id = idFromClassName( l[ 1 ] ); - WidgetDatabaseRecord *r = at( id ); - if ( r ) - r->whatsThis = l[ 0 ]; - } - whatsThisLoaded = TRUE; -} - - -// ### TQt 3.1: make these publically accessible via TQWidgetDatabase API -#if defined(UIC) -bool dbnounload = FALSE; -TQStringList *dbpaths = 0; -#else -extern TQString *qwf_plugin_dir; -#endif - - -TQPluginManager *widgetManager() -{ - if ( !widgetPluginManager ) { - TQString pluginDir = "/designer"; -#if !defined(UIC) - if ( qwf_plugin_dir ) - pluginDir = *qwf_plugin_dir; -#endif - widgetPluginManager = new TQPluginManager( IID_Widget, TQApplication::libraryPaths(), pluginDir ); - cleanup_manager.add( &widgetPluginManager ); -#if defined(UIC) - if ( dbnounload ) - widgetPluginManager->setAutoUnload( FALSE ); - if ( dbpaths ) { - TQStringList::ConstIterator it = dbpaths->begin(); - for ( ; it != dbpaths->end(); ++it ) - widgetPluginManager->addLibraryPath( *it ); - } -#endif - } - return widgetPluginManager; -} diff --git a/tdevdesigner/shared/widgetdatabase.h b/tdevdesigner/shared/widgetdatabase.h deleted file mode 100644 index 5395f2ef..00000000 --- a/tdevdesigner/shared/widgetdatabase.h +++ /dev/null @@ -1,96 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef WIDGETDATABASE_H -#define WIDGETDATABASE_H - -#include -#include -#include "../interfaces/widgetinterface.h" // up here for GCC 2.7.* compatibility -#include - - -extern TQPluginManager *widgetManager(); - -struct WidgetDatabaseRecord -{ - WidgetDatabaseRecord(); - ~WidgetDatabaseRecord(); - TQString iconSet, name, group, toolTip, whatsThis, includeFile; - uint isContainer : 1; - uint isForm : 1; - uint isCommon : 1; - uint isPlugin : 1; - TQIconSet *icon; - int nameCounter; -}; - -class WidgetDatabase : public TQt -{ -public: - WidgetDatabase(); - static void setupDataBase( int id ); - static void setupPlugins(); - - static int count(); - static int startCustom(); - - static TQIconSet iconSet( int id ); - static TQString className( int id ); - static TQString group( int id ); - static TQString toolTip( int id ); - static TQString whatsThis( int id ); - static TQString includeFile( int id ); - static bool isForm( int id ); - static bool isContainer( int id ); - static bool isCommon( int id ); - - static int idFromClassName( const TQString &name ); - static TQString createWidgetName( int id ); - - static WidgetDatabaseRecord *at( int index ); - static void insert( int index, WidgetDatabaseRecord *r ); - static void append( WidgetDatabaseRecord *r ); - - static TQString widgetGroup( const TQString &g ); - static TQString widgetGroup( int i ); - static int numWidgetGroups(); - static bool isGroupVisible( const TQString &g ); - static bool isGroupEmpty( const TQString &grp ); - - static int addCustomWidget( WidgetDatabaseRecord *r ); - static bool isCustomWidget( int id ); - static bool isCustomPluginWidget( int id ); - - static bool isWhatsThisLoaded(); - static void loadWhatsThis( const TQString &docPath ); - - static bool hasWidget( const TQString &name ); - static void customWidgetClassNameChanged( const TQString &oldName, const TQString &newName ); - -}; - -#endif diff --git a/tdevdesigner/src/CMakeLists.txt b/tdevdesigner/src/CMakeLists.txt deleted file mode 100644 index e7cf1615..00000000 --- a/tdevdesigner/src/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -################################################# -# -# (C) 2010-2011 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} - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES tdevdesigner.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( FILES tdevdesigner_shell.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdesigner ) - - -##### tdevdesigner (executable) ################# - -tde_add_executable( tdevdesigner AUTOMOC - SOURCES main.cpp tdevdesigner.cpp - LINK tdeparts-shared - DESTINATION ${BIN_INSTALL_DIR} -) diff --git a/tdevdesigner/src/Makefile.am b/tdevdesigner/src/Makefile.am deleted file mode 100644 index c88a016d..00000000 --- a/tdevdesigner/src/Makefile.am +++ /dev/null @@ -1,47 +0,0 @@ -# set the include path for X, qt and KDE -INCLUDES = $(all_includes) - -# these are the headers for your project -noinst_HEADERS = tdevdesigner.h - -# let automoc handle all of the meta source files (moc) -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/tdevdesigner.pot - - -# this Makefile creates both a KPart application and a KPart -######################################################################### -# APPLICATION SECTION -######################################################################### -# this is the program that gets installed. it's name is used for all -# of the other Makefile.am variables -bin_PROGRAMS = tdevdesigner - -# the application source, library search path, and link libraries -tdevdesigner_SOURCES = main.cpp tdevdesigner.cpp -tdevdesigner_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -tdevdesigner_LDADD = $(LIB_TDEPARTS) - -# this is where the desktop file will go -#shelldesktopdir = $(kde_appsdir)/Development -#shelldesktop_DATA = tdevdesigner.desktop -xdg_apps_DATA = tdevdesigner.desktop - -# this is where the shell's XML-GUI resource file goes -shellrcdir = $(kde_datadir)/tdevdesigner -shellrc_DATA = tdevdesigner_shell.rc - -######################################################################### -# KPART SECTION -######################################################################### - -# the Part's source, library search path, and link libraries - - -# this is where the desktop file will go -partdesktopdir = $(kde_servicesdir) - -# this is where the part's XML-GUI resource file goes -partrcdir = $(kde_datadir)/tdevdesignerpart diff --git a/tdevdesigner/src/main.cpp b/tdevdesigner/src/main.cpp deleted file mode 100644 index 0ada9f98..00000000 --- a/tdevdesigner/src/main.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program 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 program 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 "tdevdesigner.h" -#include -#include -#include -#include -#include - -static const char description[] = - I18N_NOOP("TDE GUI Designer"); - -static const char version[] = "0.2"; - -static TDECmdLineOptions options[] = -{ - { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, - TDECmdLineLastOption -}; - -int main(int argc, char **argv) -{ - TDEAboutData about("tdevdesigner", I18N_NOOP("TDevDesigner"), version, description, - TDEAboutData::License_GPL, "TDevDesigner Copyright: (C) 2004-2005 Alexander Dymo\nTQt Designer Copyright: (C) 2000-2005 Trolltech AS All Rights Reserved", 0, 0); - about.addAuthor( "Trolltech AS", "TQt Designer code (Free Edition)" ); - about.addAuthor( "Alexander Dymo", "Port to KDE, partification", "adymo@kdevelop.org" ); - TDECmdLineArgs::init(argc, argv, &about); - TDECmdLineArgs::addCmdLineOptions( options ); - TDEApplication app; - - // see if we are starting with session management - if (app.isRestored()) - { - RESTORE(TDevDesigner); - } - else - { - // no session.. just start up normally - TQSplashScreen * splash = 0; - TQString splashFile = locate("data", "tdevelop/pics/tdevdesigner-splash.png"); - if (!splashFile.isNull()) - { - TQPixmap pm; - pm.load(splashFile); - splash = new TQSplashScreen( pm ); - splash->show(); - } - - app.processEvents(); - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - if ( args->count() == 0 ) - { - TDevDesigner *widget = new TDevDesigner; - widget->show(); - } - else - { - int i = 0; - for (; i < args->count(); i++ ) - { - TDevDesigner *widget = new TDevDesigner; - widget->show(); - widget->load( args->url( i ) ); - } - } - args->clear(); - if (splash) - delete splash; - } - - return app.exec(); -} diff --git a/tdevdesigner/src/tdevdesigner.cpp b/tdevdesigner/src/tdevdesigner.cpp deleted file mode 100644 index bcc9423d..00000000 --- a/tdevdesigner/src/tdevdesigner.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program 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 program 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 "tdevdesigner.h" - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include - -TDevDesigner::TDevDesigner() - : KParts::MainWindow( 0L, "TDevDesigner" ) -{ - // set the shell's ui resource file - setXMLFile("tdevdesigner_shell.rc"); - - // then, setup our actions - setupActions(); - - // and a status bar - statusBar()->show(); - - // this routine will find and load our Part. it finds the Part by - // name which is a bad idea usually.. but it's alright in this - // case since our Part is made for this Shell - KLibFactory *factory = KLibLoader::self()->factory("libtdevdesignerpart"); - if (factory) - { - // now that the Part is loaded, we cast it to a Part to get - // our hands on it - TQStringList args; - args.append("in shell"); - m_part = static_cast(factory->create(TQT_TQOBJECT(this), - "tdevdesigner_part", "KParts::ReadWritePart", args)); - - if (m_part) - { - // tell the KParts::MainWindow that this is indeed the main widget - setCentralWidget(m_part->widget()); - - // and integrate the part's GUI with the shell's - createGUI(m_part); - } - } - else - { - // if we couldn't find our Part, we exit since the Shell by - // itself can't do anything useful - KMessageBox::error(this, i18n("Could not find the TDevDesigner part.")); - kapp->quit(); - // we return here, cause kapp->quit() only means "exit the - // next time we enter the event loop... - return; - } - - // apply the saved mainwindow settings, if any, and ask the mainwindow - // to automatically save settings if changed: window size, toolbar - // position, icon size, etc. - setAutoSaveSettings(); -} - -TDevDesigner::~TDevDesigner() -{ -} - -void TDevDesigner::load(const KURL& url) -{ - m_part->openURL( url ); -} - -void TDevDesigner::setupActions() -{ -/* KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); - KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());*/ - - KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); - - m_toolbarAction = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowToolbar()), actionCollection()); - m_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection()); - - KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); -} - -void TDevDesigner::saveProperties(TDEConfig* /*config*/) -{ - // the 'config' object points to the session managed - // config file. anything you write here will be available - // later when this app is restored -} - -void TDevDesigner::readProperties(TDEConfig* /*config*/) -{ - // the 'config' object points to the session managed - // config file. this function is automatically called whenever - // the app is being restored. read in here whatever you wrote - // in 'saveProperties' -} - -void TDevDesigner::fileNew() -{ - // this slot is called whenever the File->New menu is selected, - // the New shortcut is pressed (usually CTRL+N) or the New toolbar - // button is clicked - - // About this function, the style guide ( - // http://developer.kde.org/documentation/standards/kde/style/basics/index.html ) - // says that it should open a new window if the document is _not_ - // in its initial state. This is what we do here.. - if ( ! m_part->url().isEmpty() || m_part->isModified() ) - { - (new TDevDesigner)->show(); - }; -} - - -void TDevDesigner::optionsShowToolbar() -{ - // this is all very cut and paste code for showing/hiding the - // toolbar - if (m_toolbarAction->isChecked()) - toolBar()->show(); - else - toolBar()->hide(); -} - -void TDevDesigner::optionsShowStatusbar() -{ - // this is all very cut and paste code for showing/hiding the - // statusbar - if (m_statusbarAction->isChecked()) - statusBar()->show(); - else - statusBar()->hide(); -} - -void TDevDesigner::optionsConfigureKeys() -{ - KKeyDialog::configureKeys(m_part->actionCollection(), "tdevdesigner_part.rc"); -} - -void TDevDesigner::optionsConfigureToolbars() -{ - saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); - - // use the standard toolbar editor - KEditToolbar dlg(factory()); - connect(&dlg, TQT_SIGNAL(newToolbarConfig()), - this, TQT_SLOT(applyNewToolbarConfig())); - dlg.exec(); -} - -void TDevDesigner::applyNewToolbarConfig() -{ - applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); -} - -void TDevDesigner::fileOpen() -{ - // this slot is called whenever the File->Open menu is selected, - // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar - // button is clicked - KURL url = - KFileDialog::getOpenURL( TQString(), TQString(), this ); - - if (url.isEmpty() == false) - { - // About this function, the style guide ( - // http://developer.kde.org/documentation/standards/kde/style/basics/index.html ) - // says that it should open a new window if the document is _not_ - // in its initial state. This is what we do here.. - if ( m_part->url().isEmpty() && ! m_part->isModified() ) - { - // we open the file in this window... - load( url ); - } - else - { - // we open the file in a new window... - TDevDesigner* newWin = new TDevDesigner; - newWin->load( url ); - newWin->show(); - } - } -} - -#include "tdevdesigner.moc" diff --git a/tdevdesigner/src/tdevdesigner.desktop b/tdevdesigner/src/tdevdesigner.desktop deleted file mode 100644 index d2989142..00000000 --- a/tdevdesigner/src/tdevdesigner.desktop +++ /dev/null @@ -1,96 +0,0 @@ -[Desktop Entry] -Name=TDevelop Designer -Name[el]=Σχεδιαστής TDevelop -Name[es]=Diseñador de TDevelop -Name[et]=TDevelopi Disainer -Name[eu]=TDevelop disenatzailea -Name[fa]=طراح TDevelop -Name[fr]=Concepteur TDevelop -Name[ga]=Dearthóir TDevelop -Name[it]=Designer di TDevelop -Name[ja]=TDevelop デザイナー -Name[ms]=Pereka TDevelop -Name[nds]=TDevelop-Maker -Name[ne]=केडीई विकास डिजाइनर -Name[pl]=Projektant TDevelop -Name[pt]=Desenhador do TDevelop -Name[pt_BR]=Designer do TDevelop -Name[sk]=TDevelop Dizajnér -Name[sl]=Snovalnik TDevelop -Name[sv]=TDevelop designer -Name[ta]=கேமேம்பாட்டு வடிவமைப்பாளர் -Name[tg]=Дизайнгари TDevelop -Name[zh_CN]=TDevelop 设计师 -Name[zh_TW]=TDevelop 設計器 -GenericName=Interface Designer -GenericName[br]=Ergrafer etrefas -GenericName[ca]=Dissenyador de interfícies -GenericName[cy]=Dylunydd Rhyngwyneb -GenericName[de]=Oberflächen-Designer -GenericName[el]=Σχεδιαστής διασυνδέσεων -GenericName[es]=Diseñador de interfaces -GenericName[et]=Liidesedisainer -GenericName[eu]=Interfazeen diseinatzailea -GenericName[fa]=طراح واسط -GenericName[fr]=Concepteur d'interfaces graphiques -GenericName[ga]=Dearthóir Comhéadain -GenericName[gl]=Deseñador de interfaces -GenericName[hu]=Felülettervező -GenericName[it]=Interfaccia del Designer -GenericName[ja]=インターフェースデザイナー -GenericName[lt]=Sąsajos redaktorius -GenericName[ms]=Pereka Antaramuka -GenericName[nds]=Böversietmaker -GenericName[ne]=इन्टरफेस डिजाइनर -GenericName[pl]=Projektowanie interfejsu -GenericName[pt]=Editor de Interfaces -GenericName[pt_BR]=Desenhador de Interface -GenericName[ru]=Дизайнер пользовательского интерфейса -GenericName[rw]=Umuhanzi w'Imigaragarire -GenericName[sk]=Interface Dizajnér -GenericName[sl]=Snovalnik vmesnikov -GenericName[sr]=Дизајнер интерфејса -GenericName[sr@Latn]=Dizajner interfejsa -GenericName[sv]=Gränssnittsdesign -GenericName[tr]=Arayüz Tasarlayıcısı -GenericName[zh_CN]=界面设计师 -GenericName[zh_TW]=介面設計器 -Exec=tdevdesigner %i -caption "%c" -Icon=tdevdesigner -Type=Application -DocPath=tdevdesigner/index.html -Comment=GUI Designer for Qt/TDE -Comment[ca]=Dissenyador de IGU per Qt/TDE -Comment[da]=Grafisk brugerfladedesigner til Qt/TDE -Comment[de]=Auf Qt-Designer basierender GUI-Designer -Comment[el]=Σχεδιαστής GUI για Qt/TDE -Comment[es]=Diseñador de interfaces para Qt/TDE -Comment[et]=Qt/TDE graafilise kasutajaliidese disainer -Comment[eu]=GUI diseinatzailea Qt/TDE-rako -Comment[fa]=طراح ونک برای Qt/TDE -Comment[fr]=Concepteur d'interfaces graphiques pour Qt / TDE -Comment[ga]=Dearthóir Comhéadan Grafach le haghaidh Qt/TDE -Comment[gl]=Deseñador GUI para Qt/TDE -Comment[hu]=Qt/TDE felülettervező -Comment[it]=Designer di GUI per Qt/TDE -Comment[ja]=Qt/TDE のための GUI デザイナー -Comment[ms]=Pereka GUI untuk Qt/TDE -Comment[nds]=Böversietmaker för Qt/TDE -Comment[ne]=Qt/TDE का लागि जी यू आई डिजाइनर -Comment[nl]=GUI Designer voor Qt/TDE -Comment[pl]=Projektant graficznego interfejsu użytkownika dla Qt/TDE -Comment[pt]=Editor de Interfaces para Qt/TDE -Comment[pt_BR]=Designer de GUI para o Qt/TDE -Comment[ru]=Среда создания графических форм Qt/TDE -Comment[sk]=GUI Dizajnér pre Qt/TDE -Comment[sl]=Snovalnik grafičnega vmesnika za Qt/TDE -Comment[sr]=Дизајнер GUI-ја за Qt/TDE -Comment[sr@Latn]=Dizajner GUI-ja za Qt/TDE -Comment[sv]=Grafisk gränssnittsdesign för Qt och TDE -Comment[ta]=Qtக்கான GUI வடிவமைப்பாளர் -Comment[tg]=Муҳит барои сохтани Qt/TDE ба шакли графикӣ -Comment[tr]=Qt/TDE için Arayüz Tasarlayıcısı -Comment[zh_CN]=Qt/TDE 的 GUI 设计师 -Comment[zh_TW]=Qt/TDE 的使用者介面設計器 -Terminal=false -Categories=Qt;TDE;Development;GUIDesigner;X-TDE-TDevelopIDE; diff --git a/tdevdesigner/src/tdevdesigner.h b/tdevdesigner/src/tdevdesigner.h deleted file mode 100644 index dc5113fe..00000000 --- a/tdevdesigner/src/tdevdesigner.h +++ /dev/null @@ -1,97 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program 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 program 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 _TDEVDESIGNER_H_ -#define _TDEVDESIGNER_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -class TDEToggleAction; - -/** - * This is the application "Shell". It has a menubar, toolbar, and - * statusbar but relies on the "Part" to do all the real work. - * - * @short Application Shell - * @author Alexander Dymo - * @version 0.1 - */ -class TDevDesigner : public KParts::MainWindow -{ - Q_OBJECT - -public: - /** - * Default Constructor - */ - TDevDesigner(); - - /** - * Default Destructor - */ - virtual ~TDevDesigner(); - - /** - * Use this method to load whatever file/URL you have - */ - void load(const KURL& url); - -protected: - /** - * This method is called when it is time for the app to save its - * properties for session management purposes. - */ - void saveProperties(TDEConfig *); - - /** - * This method is called when this app is restored. The TDEConfig - * object points to the session management config file that was saved - * with @ref saveProperties - */ - void readProperties(TDEConfig *); - -private slots: - void fileNew(); - void fileOpen(); - void optionsShowToolbar(); - void optionsShowStatusbar(); - void optionsConfigureKeys(); - void optionsConfigureToolbars(); - - void applyNewToolbarConfig(); - -private: - void setupAccel(); - void setupActions(); - -private: - KParts::ReadWritePart *m_part; - - TDEToggleAction *m_toolbarAction; - TDEToggleAction *m_statusbarAction; -}; - -#endif // _TDEVDESIGNER_H_ diff --git a/tdevdesigner/src/tdevdesigner_shell.rc b/tdevdesigner/src/tdevdesigner_shell.rc deleted file mode 100644 index a6a81fd3..00000000 --- a/tdevdesigner/src/tdevdesigner_shell.rc +++ /dev/null @@ -1,37 +0,0 @@ - - - - &File - - - - - &Edit - - - &Project - - - &Tools - - - &Layout - - - &Window - - - - &Settings - - - - - - - - - - - - diff --git a/tdevdesigner/uilib/CMakeLists.txt b/tdevdesigner/uilib/CMakeLists.txt deleted file mode 100644 index 588c2366..00000000 --- a/tdevdesigner/uilib/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_SOURCE_DIR}/tdevdesigner/shared - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - - -##### tdevqui (static) ########################## - -set( SRCS database.cpp qwidgetfactory.cpp ) - -tde_moc( SRCS database2.h ) - -tde_add_library( tdevqui STATIC_PIC - SOURCES ${SRCS} -) diff --git a/tdevdesigner/uilib/Makefile.am b/tdevdesigner/uilib/Makefile.am deleted file mode 100644 index d58d4dcb..00000000 --- a/tdevdesigner/uilib/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -KDE_CXXFLAGS=-UQT_NO_ASCII_CAST - -INCLUDES = -I$(top_srcdir)/tdevdesigner/shared $(all_includes) -METASOURCES = AUTO - -noinst_LTLIBRARIES = libtdevqui.la -libtdevqui_la_SOURCES = database.cpp qwidgetfactory.cpp - -libtdevqui_la_LDFLAGS = $(all_libraries) diff --git a/tdevdesigner/uilib/database.cpp b/tdevdesigner/uilib/database.cpp deleted file mode 100644 index 2b1956a9..00000000 --- a/tdevdesigner/uilib/database.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#if defined(DESIGNER) -#include "database.h" -#else -#include "database2.h" -#endif - -#ifndef TQT_NO_SQL - -#if defined(DESIGNER) -#include "formwindow.h" -#include "mainwindow.h" -#endif - -#include -#include -#include -#include - -DatabaseSupport::DatabaseSupport() -{ - con = 0; - frm = 0; - parent = 0; -} - -void DatabaseSupport::initPreview( const TQString &connection, const TQString &table, TQObject *o, - const TQMap &databaseControls ) -{ - tbl = table; - dbControls = databaseControls; - parent = o; - - if ( connection != "(default)" ) - con = TQSqlDatabase::database( connection ); - else - con = TQSqlDatabase::database(); - frm = new TQSqlForm( o, table.ascii() ); - for ( TQMap::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) { - TQObject *chld = parent->child( it.key().ascii(), TQWIDGET_OBJECT_NAME_STRING ); - if ( !chld ) - continue; - frm->insert( (TQWidget*)chld, *it ); - } -} - -TQDesignerDataBrowser::TQDesignerDataBrowser( TQWidget *parent, const char *name ) - : TQDataBrowser( parent, name ) -{ -} - -bool TQDesignerDataBrowser::event( TQEvent* e ) -{ - bool b = TQDataBrowser::event( e ); -#if defined(DESIGNER) - if ( MainWindow::self->isPreviewing() ) { -#endif - if ( e->type() == TQEvent::Show ) { - if ( con ) { - TQSqlCursor* cursor = new TQSqlCursor( tbl, TRUE, con ); - setSqlCursor( cursor, TRUE ); - setForm( frm ); - refresh(); - first(); - } - return TRUE; - } -#if defined(DESIGNER) - } -#endif - return b; -} - -TQDesignerDataView::TQDesignerDataView( TQWidget *parent, const char *name ) - : TQDataView( parent, name ) -{ -} - -bool TQDesignerDataView::event( TQEvent* e ) -{ - bool b = TQDataView::event( e ); -#if defined(DESIGNER) - if ( MainWindow::self->isPreviewing() ) { -#endif - if ( e->type() == TQEvent::Show ) { - setForm( frm ); - readFields(); - return TRUE; - } -#if defined(DESIGNER) - } -#endif - return b; -} - - -#endif diff --git a/tdevdesigner/uilib/database2.h b/tdevdesigner/uilib/database2.h deleted file mode 100644 index 865a7f8f..00000000 --- a/tdevdesigner/uilib/database2.h +++ /dev/null @@ -1,90 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef DATABASE2_H -#define DATABASE2_H - -#include "tqfeatures.h" - -#ifndef TQT_NO_SQL -#include -#include -#include -#include - -class TQSqlDatabase; -class TQSqlForm; - -class DatabaseSupport2 -{ -public: - DatabaseSupport2(); - virtual ~DatabaseSupport2() {} - - void initPreview( const TQString &connection, const TQString &table, TQObject *o, - const TQMap &databaseControls ); - -protected: - TQSqlDatabase* con; - TQSqlForm* frm; - TQString tbl; - TQMap dbControls; - TQObject *parent; - -}; - -class QDesignerDataBrowser2 : public TQDataBrowser, public DatabaseSupport2 -{ - Q_OBJECT - - -public: - QDesignerDataBrowser2( TQWidget *parent, const char *name ); - -protected: - bool event( TQEvent* e ); -}; - -class QDesignerDataView2 : public TQDataView, public DatabaseSupport2 -{ - Q_OBJECT - - -public: - QDesignerDataView2( TQWidget *parent, const char *name ); - -protected: - bool event( TQEvent* e ); - -}; - -#define DatabaseSupport DatabaseSupport2 -#define TQDesignerDataBrowser QDesignerDataBrowser2 -#define TQDesignerDataView QDesignerDataView2 - -#endif - -#endif diff --git a/tdevdesigner/uilib/qwidgetfactory.cpp b/tdevdesigner/uilib/qwidgetfactory.cpp deleted file mode 100644 index 56649616..00000000 --- a/tdevdesigner/uilib/qwidgetfactory.cpp +++ /dev/null @@ -1,2606 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "qwidgetfactory.h" - -#include "../interfaces/languageinterface.h" -#include "../interfaces/widgetinterface.h" - -#include -#include "database2.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef TQT_NO_SQL -#include -#include -#include -#endif - -// include all TQt widgets we support -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef TQT_NO_TABLE -#include -#endif -#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 - -class TQWidgetFactoryPrivate -{ -public: - TQCString translationContext; - TQListViewItem *lastItem; - TQDict customWidgets; -}; - -static TQPtrList widgetFactories; -static TQPluginManager *languageInterfaceManager = 0; -static TQPluginManager *widgetInterfaceManager = 0; - -static TQMap *availableWidgetMap = 0; -static TQStringList *availableWidgetList = 0; - -TQMap *qwf_forms = 0; -TQString *qwf_language = 0; -bool qwf_execute_code = TRUE; -bool qwf_stays_on_top = FALSE; -TQString qwf_currFileName = ""; -TQObject *qwf_form_object = 0; -TQString *qwf_plugin_dir = 0; - -static void setupPluginDir() -{ - if ( !qwf_plugin_dir ) - qwf_plugin_dir = new TQString( "/designer" ); -} - -static void setupWidgetListAndMap() -{ - if ( availableWidgetMap ) - return; - setupPluginDir(); - availableWidgetList = new TQStringList; - (*availableWidgetList) << TQPUSHBUTTON_OBJECT_NAME_STRING << TQTOOLBUTTON_OBJECT_NAME_STRING << TQCHECKBOX_OBJECT_NAME_STRING << TQRADIOBUTTON_OBJECT_NAME_STRING - << TQGROUPBOX_OBJECT_NAME_STRING << TQBUTTONGROUP_OBJECT_NAME_STRING << TQICONVIEW_OBJECT_NAME_STRING << TQTABLE_OBJECT_NAME_STRING - << TQLISTBOX_OBJECT_NAME_STRING << TQLISTVIEW_OBJECT_NAME_STRING << TQLINEEDIT_OBJECT_NAME_STRING << TQSPINBOX_OBJECT_NAME_STRING - << TQMULTILINEEDIT_OBJECT_NAME_STRING << TQLABEL_OBJECT_NAME_STRING << "TextLabel" << "PixmapLabel" - << TQLAYOUTWIDGET_OBJECT_NAME_STRING << TQTABWIDGET_OBJECT_NAME_STRING << TQCOMBOBOX_OBJECT_NAME_STRING - << TQWIDGET_OBJECT_NAME_STRING << TQDIALOG_OBJECT_NAME_STRING << TQWIZARD_OBJECT_NAME_STRING << TQLCDNUMBER_OBJECT_NAME_STRING; - // put less stress on the compiler by limiting the template nesting depth - (*availableWidgetList) << TQPROGRESSBAR_OBJECT_NAME_STRING << TQTEXTVIEW_OBJECT_NAME_STRING << TQTEXTBROWSER_OBJECT_NAME_STRING - << TQDIAL_OBJECT_NAME_STRING << TQSLIDER_OBJECT_NAME_STRING << TQFRAME_OBJECT_NAME_STRING << "Line" << TQTEXTEDIT_OBJECT_NAME_STRING - << TQDATEEDIT_OBJECT_NAME_STRING << TQTIMEEDIT_OBJECT_NAME_STRING << TQDATETIMEEDIT_OBJECT_NAME_STRING << TQSCROLLBAR_OBJECT_NAME_STRING - << TQPOPUPMENU_OBJECT_NAME_STRING << TQWIDGETSTACK_OBJECT_NAME_STRING << TQMAINWINDOW_OBJECT_NAME_STRING - << TQDATATABLE_OBJECT_NAME_STRING << TQDATABROWSER_OBJECT_NAME_STRING << TQDATAVIEW_OBJECT_NAME_STRING - << TQVBOX_OBJECT_NAME_STRING << TQHBOX_OBJECT_NAME_STRING << TQGRID_OBJECT_NAME_STRING << TQTOOLBOX_OBJECT_NAME_STRING; - - if ( !widgetInterfaceManager ) - widgetInterfaceManager = - new TQPluginManager( IID_Widget, TQApplication::libraryPaths(), *qwf_plugin_dir ); - - TQStringList l = widgetInterfaceManager->featureList(); - TQStringList::Iterator it; - for ( it = l.begin(); it != l.end(); ++it ) - (*availableWidgetList) << *it; - - availableWidgetMap = new TQMap; - for ( it = availableWidgetList->begin(); it != availableWidgetList->end(); ++it ) - availableWidgetMap->insert( *it, TRUE ); -} - -static TQImage loadImageData( const TQString& format, ulong len, TQByteArray data ) -{ - TQImage img; - if ( format == "XPM.GZ" || format == "XBM.GZ" ) { - if ( len < data.size() * 10 ) - len = data.size() * 10; - // tqUncompress() expects the first 4 bytes to be the expected length of - // the uncompressed data - TQByteArray dataTmp( data.size() + 4 ); - memcpy( dataTmp.data()+4, data.data(), data.size() ); - dataTmp[0] = ( len & 0xff000000 ) >> 24; - dataTmp[1] = ( len & 0x00ff0000 ) >> 16; - dataTmp[2] = ( len & 0x0000ff00 ) >> 8; - dataTmp[3] = ( len & 0x000000ff ); - TQByteArray baunzip = tqUncompress( dataTmp ); - len = baunzip.size(); - img.loadFromData( (const uchar*)baunzip.data(), len, format.left(format.find('.')).ascii() ); - } else { - img.loadFromData( (const uchar*)data.data(), data.size(), format.ascii() ); - } - return img; -} - -static TQSizePolicy::SizeType stringToSizeType( const TQString& str ) -{ - if ( str == "Fixed" ) { - return TQSizePolicy::Fixed; - } else if ( str == "Minimum" ) { - return TQSizePolicy::Minimum; - } else if ( str == "Maximum" ) { - return TQSizePolicy::Maximum; - } else if ( str == "Preferred" ) { - return TQSizePolicy::Preferred; - } else if ( str == "MinimumExpanding" ) { - return TQSizePolicy::MinimumExpanding; - } else if ( str == "Expanding" ) { - return TQSizePolicy::Expanding; - } else { - return TQSizePolicy::Ignored; - } -} - - -/*! - \class TQWidgetFactory - - \brief The TQWidgetFactory class provides for the dynamic creation of widgets - from TQt Designer .ui files. - - This class basically offers two things: - - \list - - \i Dynamically creating widgets from \link designer-manual.book TQt - Designer\endlink user interface description files. - You can do this using the static function TQWidgetFactory::create(). - This function also performs signal and slot connections, tab - ordering, etc., as defined in the .ui file, and returns the - top-level widget in the .ui file. After creating the widget you can - use TQObject::child() and TQObject::queryList() to access child - widgets of this returned widget. - - \i Adding additional widget factories to be able to create custom - widgets. See createWidget() for details. - - \endlist - - This class is not included in the TQt library itself. To use it you - must link against \c libqui.so (Unix) or \c qui.lib (Windows), which is - built into \c INSTALL/lib if you built \e{TQt Designer} (\c INSTALL is - the directory where TQt is installed ). - - See the "Creating Dynamic Dialogs from .ui Files" section of the \link - designer-manual.book TQt Designer manual\endlink for an example. See - also the \l{TQWidgetPlugin} class and the \link plugins-howto.html - Plugins documentation\endlink. -*/ - -/*! Constructs a TQWidgetFactory. */ - -TQWidgetFactory::TQWidgetFactory() - : d( new TQWidgetFactoryPrivate() ), dbControls( 0 ), - usePixmapCollection( FALSE ), defMargin( 11 ), defSpacing( 6 ) -{ - widgetFactories.setAutoDelete( TRUE ); - d->customWidgets.setAutoDelete( TRUE ); -} - -/*! \fn TQWidgetFactory::~TQWidgetFactory() - Destructor. -*/ -TQWidgetFactory::~TQWidgetFactory() -{ - delete d; -} - -/*! - - Loads the \e{TQt Designer} user interface description file \a uiFile - and returns the top-level widget in that description. \a parent and - \a name are passed to the constructor of the top-level widget. - - This function also performs signal and slot connections, tab - ordering, etc., as described in the .ui file. In \e{TQt Designer} it - is possible to add custom slots to a form and connect to them. If - you want these connections to be made, you must create a class - derived from TQObject, which implements all these slots. Then pass an - instance of the object as \a connector to this function. If you do - this, the connections to the custom slots will be done using the \a - connector as slot. - - If something fails, 0 is returned. - - The ownership of the returned widget is passed to the caller. -*/ - -TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector, - TQWidget *parent, const char *name ) -{ - setupPluginDir(); - TQFile f( uiFile ); - bool failed = FALSE; - if ( !f.open( IO_ReadOnly ) ) - failed = TRUE; - if ( failed && tqApp->type() == TQApplication::Tty ) { - // for TQSA: If we have no GUI, we have no form definition - // files, but just the code. So try if only the code exists. - f.setName( uiFile + ".qs" ); - failed = !f.open( IO_ReadOnly ); - } - if ( failed ) - return 0; - - qwf_currFileName = uiFile; - TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&f), connector, parent, name ); - if ( !qwf_forms ) - qwf_forms = new TQMap; - qwf_forms->insert( w, uiFile ); - return w; -} - -#undef slots - -/*! \overload - Loads the user interface description from device \a dev. - */ - -TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *parent, const char *name ) -{ - setupPluginDir(); - TQWidget *w = 0; - TQDomDocument doc; - TQString errMsg; - int errLine; - - TQWidgetFactory *widgetFactory = new TQWidgetFactory; - widgetFactory->toplevel = 0; - - // If we have no GUI, we only want to load the code - if ( tqApp->type() != TQApplication::Tty ) { - TQIODevice::Offset start = dev->at(); - TQ_UINT32 magic; - TQDataStream in( dev ); - in >> magic; - if ( magic == UibMagic ) { - w = widgetFactory->createFromUibFile( in, connector, parent, name ); - } else { - in.unsetDevice(); - dev->at( start ); - if ( doc.setContent( dev, &errMsg, &errLine ) ) { - w = widgetFactory->createFromUiFile( doc, connector, parent, name ); - } else { - // tqDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); - } - } - if ( !w ) { - delete widgetFactory; - return 0; - } - } - - if ( !languageInterfaceManager ) - languageInterfaceManager = - new TQPluginManager( IID_Language, TQApplication::libraryPaths(), *qwf_plugin_dir ); - widgetFactory->loadExtraSource(); - - if ( widgetFactory->toplevel ) { -#ifndef TQT_NO_SQL - TQMap::Iterator cit = widgetFactory->sqlWidgetConnections.begin(); - for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) { - if ( widgetFactory->noDatabaseWidgets.find( cit.key()->name() ) != - widgetFactory->noDatabaseWidgets.end() ) - continue; - if ( cit.key()->inherits( "QDesignerDataBrowser2" ) ) - ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, - TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); - else if ( cit.key()->inherits( "QDesignerDataView2" ) ) - ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, - TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); - } - - for ( TQMap::Iterator it = widgetFactory->dbTables.begin(); - it != widgetFactory->dbTables.end(); ++it ) { - TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key().ascii(), TQDATATABLE_OBJECT_NAME_STRING ); - if ( !table ) - continue; - if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != - widgetFactory->noDatabaseWidgets.end() ) - continue; - TQValueList fieldMap = *widgetFactory->fieldMaps.find( table ); - TQString conn = (*it)[ 0 ]; - TQSqlCursor* c = 0; - TQSqlDatabase *db = 0; - if ( conn.isEmpty() || conn == "(default)" ) { - db = TQSqlDatabase::database(); - c = new TQSqlCursor( (*it)[ 1 ] ); - } else { - db = TQSqlDatabase::database( conn ); - c = new TQSqlCursor( (*it)[ 1 ], TRUE, db ); - } - if ( db ) { - table->setSqlCursor( c, fieldMap.isEmpty(), TRUE ); - table->refresh( TQDataTable::RefreshAll ); - } - } -#endif - } - - for ( TQMap::Iterator it = widgetFactory->buddies.begin(); - it != widgetFactory->buddies.end(); ++it ) { - TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key().ascii(), TQLABEL_OBJECT_NAME_STRING ); - TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( (*it).ascii(), TQWIDGET_OBJECT_NAME_STRING ); - if ( label && buddy ) - label->setBuddy( buddy ); - } - - delete widgetFactory; - - TQApplication::sendPostedEvents(); - - return w; -} - -TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connector, - TQWidget *parent, const char *name ) -{ - DomTool::fixDocument( doc ); - - uiFileVersion = doc.firstChild().toElement().attribute("version"); - TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); - - TQDomElement variables = e; - while ( variables.tagName() != "variables" && !variables.isNull() ) - variables = variables.nextSibling().toElement(); - - TQDomElement slots = e; - while ( slots.tagName() != "slots" && !slots.isNull() ) - slots = slots.nextSibling().toElement(); - - TQDomElement connections = e; - while ( connections.tagName() != "connections" && !connections.isNull() ) - connections = connections.nextSibling().toElement(); - - TQDomElement imageCollection = e; - while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) - imageCollection = imageCollection.nextSibling().toElement(); - - TQDomElement tabOrder = e; - while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() ) - tabOrder = tabOrder.nextSibling().toElement(); - - TQDomElement actions = e; - while ( actions.tagName() != "actions" && !actions.isNull() ) - actions = actions.nextSibling().toElement(); - - TQDomElement toolbars = e; - while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() ) - toolbars = toolbars.nextSibling().toElement(); - - TQDomElement menubar = e; - while ( menubar.tagName() != "menubar" && !menubar.isNull() ) - menubar = menubar.nextSibling().toElement(); - - TQDomElement functions = e; - while ( functions.tagName() != "functions" && !functions.isNull() ) - functions = functions.nextSibling().toElement(); - - TQDomElement widget; - while ( !e.isNull() ) { - if ( e.tagName() == "class" ) { - d->translationContext = e.firstChild().toText().data().ascii(); - } else if ( e.tagName() == "widget" ) { - widget = e; - } else if ( e.tagName() == "pixmapinproject" ) { - usePixmapCollection = TRUE; - } else if ( e.tagName() == "layoutdefaults" ) { - defSpacing = e.attribute( "spacing", TQString::number( defSpacing ) ).toInt(); - defMargin = e.attribute( "margin", TQString::number( defMargin ) ).toInt(); - } - e = e.nextSibling().toElement(); - } - - if ( !imageCollection.isNull() ) - loadImageCollection( imageCollection ); - - createWidgetInternal( widget, parent, 0, widget.attribute("class", TQWIDGET_OBJECT_NAME_STRING) ); - TQWidget *w = toplevel; - if ( !w ) - return 0; - - if ( !actions.isNull() ) - loadActions( actions ); - if ( !toolbars.isNull() ) - loadToolBars( toolbars ); - if ( !menubar.isNull() ) - loadMenuBar( menubar ); - - if ( !connections.isNull() ) - loadConnections( connections, connector ); - if ( w && name && tqstrlen( name ) > 0 ) - w->setName( name ); - - if ( !tabOrder.isNull() ) - loadTabOrder( tabOrder ); - -#if 0 - if ( !functions.isNull() ) // compatibiliy with early 3.0 betas - loadFunctions( functions ); -#endif - - return w; -} - -void TQWidgetFactory::unpackUInt16( TQDataStream& in, TQ_UINT16& n ) -{ - TQ_UINT8 half; - in >> half; - if ( half == 255 ) { - in >> n; - } else { - n = half; - } -} - -void TQWidgetFactory::unpackUInt32( TQDataStream& in, TQ_UINT32& n ) -{ - TQ_UINT16 half; - in >> half; - if ( half == 65535 ) { - in >> n; - } else { - n = half; - } -} - -void TQWidgetFactory::unpackByteArray( TQDataStream& in, TQByteArray& array ) -{ - TQ_UINT32 size; - unpackUInt32( in, size ); - array.resize( size ); - in.readRawBytes( array.data(), size ); -} - -void TQWidgetFactory::unpackCString( const UibStrTable& strings, TQDataStream& in, - TQCString& cstr ) -{ - TQ_UINT32 n; - unpackUInt32( in, n ); - cstr = strings.asCString( n ); -} - -void TQWidgetFactory::unpackString( const UibStrTable& strings, TQDataStream& in, - TQString& str ) -{ - TQ_UINT32 n; - unpackUInt32( in, n ); - str = strings.asString( n ); -} - -void TQWidgetFactory::unpackStringSplit( const UibStrTable& strings, - TQDataStream& in, TQString& str ) -{ - TQString remainder; - unpackString( strings, in, str ); - unpackString( strings, in, remainder ); - str += remainder; -} - -void TQWidgetFactory::unpackVariant( const UibStrTable& strings, TQDataStream& in, - TQVariant& value ) -{ - TQString imageName; - TQ_UINT32 number; - TQ_UINT16 count; - TQ_UINT16 x; - TQ_UINT16 y; - TQ_UINT16 width; - TQ_UINT16 height; - TQ_UINT8 bit; - TQ_UINT8 type; - - in >> type; - - switch ( type ) { - case TQVariant::String: - unpackString( strings, in, value.asString() ); - break; - case TQVariant::Pixmap: - unpackString( strings, in, imageName ); - if ( imageName.isEmpty() ) { - value.asPixmap() = TQPixmap(); - } else { - value.asPixmap() = loadPixmap( imageName ); - } - break; - case TQVariant::Image: - unpackString( strings, in, imageName ); - if ( imageName.isEmpty() ) { - value.asImage() = TQImage(); - } else { - value.asImage() = loadFromCollection( imageName ); - } - break; - case TQVariant::IconSet: - unpackString( strings, in, imageName ); - if ( imageName.isEmpty() ) { - value.asIconSet() = TQIconSet(); - } else { - value.asIconSet() = TQIconSet( loadPixmap(imageName) ); - } - break; - case TQVariant::StringList: - unpackUInt16( in, count ); - while ( count-- ) { - TQString str; - unpackString( strings, in, str ); - value.asStringList().append( str ); - } - break; - case TQVariant::Rect: - unpackUInt16( in, x ); - unpackUInt16( in, y ); - unpackUInt16( in, width ); - unpackUInt16( in, height ); - value = TQRect( x, y, width, height ); - break; - case TQVariant::Size: - unpackUInt16( in, width ); - unpackUInt16( in, height ); - value = TQSize( width, height ); - break; - case TQVariant::Color: - in >> value.asColor(); - break; - case TQVariant::Point: - unpackUInt16( in, x ); - unpackUInt16( in, y ); - value = TQPoint( x, y ); - break; - case TQVariant::Int: - unpackUInt32( in, number ); - value = (int) number; - break; - case TQVariant::Bool: - in >> bit; - value = TQVariant( bit != 0, 0 ); - break; - case TQVariant::Double: - in >> value.asDouble(); - break; - case TQVariant::CString: - unpackCString( strings, in, value.asCString() ); - break; - case TQVariant::Cursor: - in >> value.asCursor(); - break; - case TQVariant::Date: - in >> value.asDate(); - break; - case TQVariant::Time: - in >> value.asTime(); - break; - case TQVariant::DateTime: - in >> value.asDateTime(); - break; - default: - in >> value; - } -} - -void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in, - TQLayout *parent ) -{ - TQCString name; - TQVariant value; - TQCString comment; - TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred; - bool vertical = FALSE; - int w = 0; - int h = 0; - TQ_UINT16 column = 0; - TQ_UINT16 row = 0; - TQ_UINT16 colspan = 1; - TQ_UINT16 rowspan = 1; - TQ_UINT8 objectTag; - - in >> objectTag; - while ( !in.atEnd() && objectTag != Object_End ) { - switch ( objectTag ) { - case Object_GridCell: - unpackUInt16( in, column ); - unpackUInt16( in, row ); - unpackUInt16( in, colspan ); - unpackUInt16( in, rowspan ); - break; - case Object_VariantProperty: - unpackCString( strings, in, name ); - unpackVariant( strings, in, value ); - - if ( name == "orientation" ) { - vertical = ( value == "Vertical" ); - } else if ( name == "sizeHint" ) { - w = value.toSize().width(); - h = value.toSize().height(); - } else if ( name == "sizeType" ) { - sizeType = stringToSizeType( value.toString() ); - } - break; - default: - tqFatal( "Corrupt" ); - } - in >> objectTag; - } - - if ( parent != 0 ) { - TQSpacerItem *spacer; - if ( vertical ) { - spacer = new TQSpacerItem( w, h, TQSizePolicy::Minimum, sizeType ); - } else { - spacer = new TQSpacerItem( w, h, sizeType, TQSizePolicy::Minimum ); - } - - if ( parent->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { - ((TQGridLayout *) parent)->addMultiCell( spacer, row, - row + rowspan - 1, column, column + colspan - 1, - vertical ? TQt::AlignHCenter : TQt::AlignVCenter ); - } else { - parent->addItem( spacer ); - } - } -} - -void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings, - TQDataStream& in, TQObject *parent, - bool isRow ) -{ - TQString text; - TQPixmap pixmap; - TQString field; - bool clickable = TRUE; - bool resizable = TRUE; - - TQCString name; - TQVariant value; - TQCString comment; - TQString str; - TQ_UINT8 objectTag; - - in >> objectTag; - while ( !in.atEnd() && objectTag != Object_End ) { - switch ( objectTag ) { - case Object_TextProperty: - unpackCString( strings, in, name ); - unpackCString( strings, in, value.asCString() ); - unpackCString( strings, in, comment ); - str = translate( value.asCString().data(), comment.data() ); - - if ( name == "field" ) { - field = str; - } else if ( name == "text" ) { - text = str; - } - break; - case Object_VariantProperty: - unpackCString( strings, in, name ); - unpackVariant( strings, in, value ); - - if ( name == "clickable" ) { - clickable = value.toBool(); - } else if ( name == "pixmap" ) { - pixmap = value.asPixmap(); - } else if ( name == "resizable" ) { - resizable = value.toBool(); - } - break; - default: - tqFatal( "Corrupt" ); - } - in >> objectTag; - } - - if ( parent != 0 ) { - if ( parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) { - createListViewColumn( (TQListView *) parent, text, pixmap, clickable, - resizable ); -#ifndef TQT_NO_TABLE - } else if ( parent->inherits(TQTABLE_OBJECT_NAME_STRING) ) { - createTableColumnOrRow( (TQTable *) parent, text, pixmap, field, - isRow ); -#endif - } - } -} - -void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, - TQObject *parent, TQListViewItem *parentItem ) -{ - TQStringList texts; - TQValueList pixmaps; - TQCString name; - TQVariant value; - TQCString comment; - TQ_UINT8 objectTag; - - TQListView *listView = 0; - if ( parent != 0 && parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) - parent = TQT_TQOBJECT((TQListView *) parent); - TQListViewItem *item = 0; - if ( listView != 0 ) { - if ( parentItem == 0 ) { - item = new TQListViewItem( listView, d->lastItem ); - } else { - item = new TQListViewItem( parentItem, d->lastItem ); - } - d->lastItem = item; - } - - in >> objectTag; - while ( !in.atEnd() && objectTag != Object_End ) { - switch ( objectTag ) { - case Object_Item: - if ( listView != 0 ) - d->lastItem->setOpen( TRUE ); - inputItem( strings, in, parent, item ); - break; - case Object_TextProperty: - unpackCString( strings, in, name ); - unpackCString( strings, in, value.asCString() ); - unpackCString( strings, in, comment ); - - if ( name == "text" ) - texts << translate( value.asCString().data(), comment.data() ); - break; - case Object_VariantProperty: - unpackCString( strings, in, name ); - unpackVariant( strings, in, value ); - - if ( name == "pixmap" ) - pixmaps << value.asPixmap(); - break; - default: - tqFatal( "Corrupt" ); - } - in >> objectTag; - } - - if ( listView != 0 ) { - int i = 0; - TQStringList::ConstIterator t = texts.begin(); - while ( t != texts.end() ) { - item->setText( i, *t ); - ++i; - ++t; - } - - int j = 0; - TQValueList::ConstIterator p = pixmaps.begin(); - while ( p != pixmaps.end() ) { - item->setPixmap( j, *p ); - ++j; - ++p; - } - } else { - TQString text = texts.last(); - TQPixmap pixmap = pixmaps.last(); - - if ( parent != 0 ) { - if ( parent->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || - parent->inherits(TQLISTBOX_OBJECT_NAME_STRING) ) { - TQListBox *listBox = (TQListBox *) parent->tqt_cast( TQLISTBOX_OBJECT_NAME_STRING ); - if ( listBox == 0 ) - listBox = ((TQComboBox *) parent)->listBox(); - - if ( pixmap.isNull() ) { - (void) new TQListBoxText( listBox, text ); - } else { - (void) new TQListBoxPixmap( listBox, pixmap, text ); - } - #ifndef TQT_NO_ICONVIEW - } else if ( parent->inherits(TQICONVIEW_OBJECT_NAME_STRING) ) { - (void) new TQIconViewItem( (TQIconView *) parent, text, pixmap ); - #endif - } - } - } -} - -void TQWidgetFactory::inputMenuItem( TQObject **objects, - const UibStrTable& strings, TQDataStream& in, - TQMenuBar *menuBar ) -{ - TQCString name; - TQCString text; - TQ_UINT16 actionNo; - TQ_UINT8 objectTag; - - unpackCString( strings, in, name ); - unpackCString( strings, in, text ); - - TQPopupMenu *popupMenu = new TQPopupMenu( menuBar->parentWidget(), name ); - - in >> objectTag; - while ( !in.atEnd() && objectTag != Object_End ) { - switch ( objectTag ) { - case Object_ActionRef: - unpackUInt16( in, actionNo ); - ((TQAction *) objects[actionNo])->addTo( popupMenu ); - break; - case Object_Separator: - popupMenu->insertSeparator(); - break; - default: - tqFatal( "Corrupt" ); - } - in >> objectTag; - } - menuBar->insertItem( translate(text.data()), popupMenu ); -} - -TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, - const UibStrTable& strings, - TQDataStream& in, TQWidget *ancestorWidget, - TQObject *parent, TQCString className ) -{ - TQObject *obj = 0; - TQWidget *widget = 0; - TQLayout *layout = 0; - TQWidget *parentWidget = 0; - TQLayout *parentLayout = 0; - - bool isTQObject = !className.isEmpty(); - if ( isTQObject ) { - if ( parent != 0 ) { - if ( parent->isWidgetType() ) { - if ( parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) ) { - parentWidget = ((TQMainWindow *) parent)->centralWidget(); - } else { - parentWidget = (TQWidget *) parent; - } - } else if ( parent->inherits(TQLAYOUT_OBJECT_NAME_STRING) ) { - parentLayout = (TQLayout *) parent; - parentWidget = ancestorWidget; - } - } - - if ( className == TQACTION_OBJECT_NAME_STRING ) { - unpackCString( strings, in, className ); - if ( className == TQACTIONGROUP_OBJECT_NAME_STRING ) { - obj = new TQActionGroup( parent ); - } else { - obj = new TQAction( parent ); - } - } else if ( className == TQLAYOUT_OBJECT_NAME_STRING ) { - unpackCString( strings, in, className ); - LayoutType type = Grid; - if ( className == TQHBOXLAYOUT_OBJECT_NAME_STRING ) { - type = HBox; - } else if ( className == TQVBOXLAYOUT_OBJECT_NAME_STRING ) { - type = VBox; - } - if ( parentLayout != 0 && parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { - layout = createLayout( 0, 0, type ); - } else { - layout = createLayout( parentWidget, parentLayout, type ); - } - obj = TQT_TQOBJECT(layout); - } else if ( className == TQMENUBAR_OBJECT_NAME_STRING ) { - unpackCString( strings, in, className ); - widget = ((TQMainWindow *) parent)->menuBar(); - obj = TQT_TQOBJECT(widget); - } else if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) { - TQ_UINT8 dock; - in >> dock; - unpackCString( strings, in, className ); - widget = new TQToolBar( TQString(), (TQMainWindow *) parent, - (TQt::Dock) dock ); - obj = TQT_TQOBJECT(widget); - } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { - unpackCString( strings, in, className ); - widget = createWidget( className, parentWidget, 0 ); - obj = TQT_TQOBJECT(widget); - } - - if ( widget != 0 ) - ancestorWidget = widget; - d->lastItem = 0; - objects[numObjects++] = obj; - } - - TQCString name; - TQVariant value; - TQCString comment; - TQString str; - TQ_UINT16 actionNo; - int metAttribute = 0; - TQ_UINT16 column = 0; - TQ_UINT16 row = 0; - TQ_UINT16 colspan = 1; - TQ_UINT16 rowspan = 1; - TQ_UINT8 paletteTag; - TQ_UINT8 objectTag; - - in >> objectTag; - while ( !in.atEnd() && objectTag != Object_End ) { - switch ( objectTag ) { - case Object_ActionRef: - unpackUInt16( in, actionNo ); - ((TQAction *) objects[actionNo])->addTo( (TQToolBar *) widget ); - break; - case Object_Attribute: - metAttribute = 2; - break; - case Object_Column: - inputColumnOrRow( strings, in, obj, FALSE ); - break; - case Object_Event: - unpackCString( strings, in, name ); - unpackVariant( strings, in, value ); - // ### do something with value.asStringList() - break; - case Object_FontProperty: - { - TQFont font; - TQString family; - TQ_UINT16 pointSize; - TQ_UINT8 fontFlags; - - unpackCString( strings, in, name ); - in >> fontFlags; - - if ( fontFlags & Font_Family ) { - unpackString( strings, in, family ); - font.setFamily( family ); - } - if ( fontFlags & Font_PointSize ) { - unpackUInt16( in, pointSize ); - font.setPointSize( pointSize ); - } - if ( fontFlags & Font_Bold ) - font.setBold( TRUE ); - if ( fontFlags & Font_Italic ) - font.setItalic( TRUE ); - if ( fontFlags & Font_Underline ) - font.setUnderline( TRUE ); - if ( fontFlags & Font_StrikeOut ) - font.setStrikeOut( TRUE ); - - if ( obj != 0 ) - setProperty( obj, name, font ); - } - break; - case Object_GridCell: - unpackUInt16( in, column ); - unpackUInt16( in, row ); - unpackUInt16( in, colspan ); - unpackUInt16( in, rowspan ); - break; - case Object_Item: - inputItem( strings, in, obj ); - break; - case Object_MenuItem: - inputMenuItem( objects, strings, in, (TQMenuBar *) widget ); - break; - case Object_PaletteProperty: - { - TQPalette palette; - TQColorGroup colorGroup; - TQColor color; - int role = -1; - - unpackCString( strings, in, name ); - - in >> paletteTag; - while ( !in.atEnd() && paletteTag != Palette_End ) { - switch ( paletteTag ) { - case Palette_Active: - palette.setActive( colorGroup ); - role = -1; - break; - case Palette_Inactive: - palette.setInactive( colorGroup ); - role = -1; - break; - case Palette_Disabled: - palette.setDisabled( colorGroup ); - role = -1; - break; - case Palette_Color: - role++; - in >> color; - colorGroup.setColor( (TQColorGroup::ColorRole) role, - color ); - break; - case Palette_Pixmap: - unpackVariant( strings, in, value ); - colorGroup.setBrush( (TQColorGroup::ColorRole) role, - TQBrush(color, value.asPixmap()) ); - break; - default: - tqFatal( "Corrupt" ); - } - in >> paletteTag; - } - if ( obj != 0 ) - setProperty( obj, name, palette ); - } - break; - case Object_Row: - inputColumnOrRow( strings, in, obj, TRUE ); - break; - case Object_Spacer: - inputSpacer( strings, in, layout ); - break; - case Object_Separator: - ((TQToolBar *) widget)->addSeparator(); - break; - case Object_SubAction: - inputObject( objects, numObjects, strings, in, parentWidget, - obj != 0 ? obj : parent, TQACTION_OBJECT_NAME_STRING ); - break; - case Object_SubLayout: - inputObject( objects, numObjects, strings, in, parentWidget, obj, - TQLAYOUT_OBJECT_NAME_STRING ); - break; - case Object_SubWidget: - inputObject( objects, numObjects, strings, in, parentWidget, obj, - TQWIDGET_OBJECT_NAME_STRING ); - break; - case Object_TextProperty: - unpackCString( strings, in, name ); - unpackCString( strings, in, value.asCString() ); - unpackCString( strings, in, comment ); - str = translate( value.asCString().data(), comment.data() ); - - if ( metAttribute > 0 ) { - if ( name == "title" ) { - if ( parent != 0 ) { - if ( parent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) ) { - ((TQTabWidget *) parent)->insertTab( widget, str ); - } else if ( parent->inherits(TQWIZARD_OBJECT_NAME_STRING) ) { - ((TQWizard *) parent)->addPage( widget, str ); - } - } - } - } else { - if ( obj != 0 ) - setProperty( obj, name, str ); - } - break; - case Object_VariantProperty: - unpackCString( strings, in, name ); - unpackVariant( strings, in, value ); - - if ( metAttribute > 0 ) { - if ( name == "id" ) { - if ( parent != 0 && parent->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING) ) - ((TQWidgetStack *) parent)->addWidget( widget, value.toInt() ); - } - } else { - if ( obj != 0 ) - setProperty( obj, name, value ); - } - break; - default: - tqFatal( "Corrupt" ); - } - in >> objectTag; - metAttribute--; - } - - if ( parentLayout != 0 ) { - if ( widget != 0 ) { - if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { - ((TQGridLayout *) parentLayout)->addMultiCellWidget( - widget, row, row + rowspan - 1, column, - column + colspan - 1 ); - } else { - ((TQBoxLayout *) parentLayout)->addWidget( widget ); - } - } else if ( layout != 0 ) { - if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { - ((TQGridLayout *) parentLayout)->addMultiCellLayout( - layout, row, row + rowspan - 1, column, - column + colspan - 1 ); - } - } - } - return obj; -} - -TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, - TQObject * /* connector */ , TQWidget *parent, const char *name ) -{ -#define END_OF_BLOCK() \ - ( in.atEnd() || in.device()->at() >= nextBlock ) - - TQ_UINT8 lf; - TQ_UINT8 cr; - in >> lf; - in >> cr; - if ( lf != '\n' || cr != '\r' ) { - tqWarning( "File corrupted" ); - return 0; - } - - TQ_UINT8 qdatastreamVersion; - in >> qdatastreamVersion; - if ( (int) qdatastreamVersion > in.version() ) { - tqWarning( "Incompatible version of TQt" ); - return 0; - } - in.setVersion( qdatastreamVersion ); - - UibStrTable strings; - TQObject **objects = 0; - int numObjects = 0; - - TQ_UINT8 blockType; - TQ_UINT32 blockSize; - - in >> blockType; - while ( !in.atEnd() && blockType != Block_End ) { - unpackUInt32( in, blockSize ); - TQIODevice::Offset nextBlock = in.device()->at() + blockSize; - - switch ( blockType ) { - case Block_Actions: - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel) ); - break; - case Block_Buddies: - { - TQ_UINT16 labelNo; - TQ_UINT16 buddyNo; - - do { - unpackUInt16( in, labelNo ); - unpackUInt16( in, buddyNo ); - TQLabel *label = - (TQLabel *) objects[labelNo]->tqt_cast( TQLABEL_OBJECT_NAME_STRING ); - if ( label != 0 ) - label->setBuddy( (TQWidget *) objects[buddyNo] ); - } while ( !END_OF_BLOCK() ); - } - break; - case Block_Connections: - { - TQString language = "C++"; - TQ_UINT16 senderNo = 0; - TQString signal = "clicked()"; - TQ_UINT16 receiverNo = 0; - TQString slot = "accept()"; - TQ_UINT8 connectionFlags; - - do { - in >> connectionFlags; - if ( connectionFlags & Connection_Language ) - unpackString( strings, in, language ); - if ( connectionFlags & Connection_Sender ) - unpackUInt16( in, senderNo ); - if ( connectionFlags & Connection_Signal ) - unpackStringSplit( strings, in, signal ); - if ( connectionFlags & Connection_Receiver ) - unpackUInt16( in, receiverNo ); - if ( connectionFlags & Connection_Slot ) - unpackStringSplit( strings, in, slot ); - // ### -#if 0 - tqWarning( "connect( %p, %s, %p, %s )", objects[senderNo], - signal.latin1(), objects[receiverNo], - slot.latin1() ); -#endif - } while ( !END_OF_BLOCK() ); - } - break; - case Block_Functions: - // ### - tqWarning( "Block_Functions not supported" ); - in.device()->at( nextBlock ); - break; - case Block_Images: - { - TQString format; - TQ_UINT32 length; - TQByteArray data; - Image image; - - do { - unpackString( strings, in, image.name ); - unpackString( strings, in, format ); - unpackUInt32( in, length ); - unpackByteArray( in, data ); - image.img = loadImageData( format, length, data ); - images += image; - } while ( !END_OF_BLOCK() ); - } - break; - case Block_Intro: - { - TQ_INT16 defaultMargin; - TQ_INT16 defaultSpacing; - TQ_UINT16 maxObjects; - TQ_UINT8 introFlags; - - in >> introFlags; - in >> defaultMargin; - in >> defaultSpacing; - unpackUInt16( in, maxObjects ); - unpackCString( strings, in, d->translationContext ); - - if ( introFlags & Intro_Pixmapinproject ) - usePixmapCollection = TRUE; - if ( defaultMargin != -32768 ) - defMargin = defaultMargin; - if ( defaultSpacing != -32768 ) - defSpacing = defaultSpacing; - objects = new TQObject *[maxObjects]; - } - break; - case Block_Menubar: - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel), - TQMENUBAR_OBJECT_NAME_STRING ); - break; - case Block_Slots: - { - TQString language; - TQString slot; - - do { - unpackString( strings, in, language ); - unpackStringSplit( strings, in, slot ); - } while ( !END_OF_BLOCK() ); - } - break; - case Block_Strings: - strings.readBlock( in, blockSize ); - break; - case Block_Tabstops: - { - TQ_UINT16 beforeNo; - TQ_UINT16 afterNo; - - unpackUInt16( in, beforeNo ); - while ( !END_OF_BLOCK() ) { - unpackUInt16( in, afterNo ); - toplevel->setTabOrder( (TQWidget *) objects[beforeNo], - (TQWidget *) objects[afterNo] ); - beforeNo = afterNo; - } - } - break; - case Block_Toolbars: - do { - inputObject( objects, numObjects, strings, in, toplevel, - TQT_TQOBJECT(toplevel), TQTOOLBAR_OBJECT_NAME_STRING ); - } while ( !END_OF_BLOCK() ); - break; - case Block_Variables: - // ### - tqWarning( "Block_Variables not supported" ); - in.device()->at( nextBlock ); - break; - case Block_Widget: - toplevel = (TQWidget *) - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(parent), - TQWIDGET_OBJECT_NAME_STRING ); - if ( toplevel != 0 ) - toplevel->setName( name ); - break; - default: - tqWarning( "Version error" ); - return 0; - } - in >> blockType; - } - delete[] objects; - return toplevel; -} - -/*! Installs a widget factory \a factory, which normally contains - additional widgets that can then be created using a TQWidgetFactory. - See createWidget() for further details. -*/ - -void TQWidgetFactory::addWidgetFactory( TQWidgetFactory *factory ) -{ - widgetFactories.append( factory ); -} - -/*! - Creates a widget of the type \a className passing \a parent and \a - name to its constructor. - - If \a className is a widget in the TQt library, it is directly - created by this function. If the widget isn't in the TQt library, - each of the installed widget plugins is asked, in turn, to create - the widget. As soon as a plugin says it can create the widget it - is asked to do so. It may occur that none of the plugins can - create the widget, in which case each installed widget factory is - asked to create the widget (see addWidgetFactory()). If the widget - cannot be created by any of these means, 0 is returned. - - If you have a custom widget, and want it to be created using the - widget factory, there are two approaches you can use: - - \list 1 - - \i Write a widget plugin. This allows you to use the widget in - \e{TQt Designer} and in this TQWidgetFactory. See the widget plugin - documentation for further details. (See the "Creating Custom - Widgets with Plugins" section of the \link designer-manual.book TQt - Designer manual\endlink for an example. - - \i Subclass TQWidgetFactory. Then reimplement this function to - create and return an instance of your custom widget if \a - className equals the name of your widget, otherwise return 0. Then - at the beginning of your program where you want to use the widget - factory to create widgets do a: - \code - TQWidgetFactory::addWidgetFactory( new MyWidgetFactory ); - \endcode - where MyWidgetFactory is your TQWidgetFactory subclass. - - \endlist -*/ - -TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *parent, - const char *name ) const -{ - // create widgets we know - if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { - return new TQPushButton( parent, name ); - } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { - return new TQToolButton( parent, name ); - } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { - return new TQCheckBox( parent, name ); - } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { - return new TQRadioButton( parent, name ); - } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { - return new TQGroupBox( parent, name ); - } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { - return new TQButtonGroup( parent, name ); - } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { -#if !defined(TQT_NO_ICONVIEW) - return new TQIconView( parent, name ); -#endif - } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { -#if !defined(TQT_NO_TABLE) - return new TQTable( parent, name ); -#endif - } else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { - return new TQListBox( parent, name ); - } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { - return new TQListView( parent, name ); - } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) { - return new TQLineEdit( parent, name ); - } else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) { - return new TQSpinBox( parent, name ); - } else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) { - return new TQMultiLineEdit( parent, name ); - } else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" || className == "PixmapLabel" ) { - return new TQLabel( parent, name ); - } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { - return new TQWidget( parent, name ); - } else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { - return new TQTabWidget( parent, name ); - } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { - return new TQComboBox( FALSE, parent, name ); - } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { - if ( !qwf_stays_on_top ) - return new TQWidget( parent, name ); - return new TQWidget( parent, name, TQt::WStyle_StaysOnTop ); - } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { - if ( !qwf_stays_on_top ) - return new TQDialog( parent, name ); - return new TQDialog( parent, name, FALSE, TQt::WStyle_StaysOnTop ); - } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { - return new TQWizard( parent, name ); - } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) { - return new TQLCDNumber( parent, name ); - } else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) { - return new TQProgressBar( parent, name ); - } else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) { - return new TQTextView( parent, name ); - } else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) { - return new TQTextBrowser( parent, name ); - } else if ( className == TQDIAL_OBJECT_NAME_STRING ) { - return new TQDial( parent, name ); - } else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { - return new TQSlider( parent, name ); - } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { - return new TQFrame( parent, name ); - } else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) { - return new TQSplitter( parent, name ); - } else if ( className == "Line" ) { - TQFrame *f = new TQFrame( parent, name ); - f->setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); - return f; - } else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) { - return new TQTextEdit( parent, name ); - } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { - return new TQDateEdit( parent, name ); - } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { - return new TQTimeEdit( parent, name ); - } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { - return new TQDateTimeEdit( parent, name ); - } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { - return new TQScrollBar( parent, name ); - } else if ( className == TQPOPUPMENU_OBJECT_NAME_STRING ) { - return new TQPopupMenu( parent, name ); - } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { - return new TQWidgetStack( parent, name ); - } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { - return new TQToolBox( parent, name ); - } else if ( className == TQVBOX_OBJECT_NAME_STRING ) { - return new TQVBox( parent, name ); - } else if ( className == TQHBOX_OBJECT_NAME_STRING ) { - return new TQHBox( parent, name ); - } else if ( className == TQGRID_OBJECT_NAME_STRING ) { - return new TQGrid( 4, parent, name ); - } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { - TQMainWindow *mw = 0; - if ( !qwf_stays_on_top ) - mw = new TQMainWindow( parent, name ); - else - mw = new TQMainWindow( parent, name, TQt::WType_TopLevel | TQt::WStyle_StaysOnTop ); - mw->setCentralWidget( new TQWidget( mw, "qt_central_widget" ) ); - mw->centralWidget()->show(); - (void)mw->statusBar(); - return mw; - - } -#if !defined(TQT_NO_SQL) - else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { - return new TQDataTable( parent, name ); - } else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { - return new QDesignerDataBrowser2( parent, name ); - } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { - return new QDesignerDataView2( parent, name ); - } -#endif - - setupPluginDir(); - // try to create it using the loaded widget plugins - if ( !widgetInterfaceManager ) - widgetInterfaceManager = - new TQPluginManager( IID_Widget, TQApplication::libraryPaths(), - *qwf_plugin_dir ); - - TQInterfacePtr iface = 0; - widgetInterfaceManager->queryInterface( className, &iface ); - if ( iface ) { - TQWidget *w = iface->create( className, parent, name ); - if ( w ) { - d->customWidgets.replace( className.latin1(), new bool(TRUE) ); - return w; - } - } - - // hope we have a factory which can do it - for ( TQWidgetFactory* f = widgetFactories.first(); f; f = widgetFactories.next() ) { - TQWidget *w = f->createWidget( className, parent, name ); - if ( w ) - return w; - } - - // no success - return 0; -} - -/*! Returns the names of the widgets, which this facory can create. */ - -TQStringList TQWidgetFactory::widgets() -{ - setupWidgetListAndMap(); - return *availableWidgetList; -} - -/*! Returns whether this widget factory can create the widget \a - widget */ - -bool TQWidgetFactory::supportsWidget( const TQString &widget ) -{ - setupWidgetListAndMap(); - return ( availableWidgetMap->find( widget ) != availableWidgetMap->end() ); -} - -TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent, - TQLayout* layout, const TQString &classNameArg ) -{ - d->lastItem = 0; - TQDomElement n = e.firstChild().toElement(); - TQWidget *w = 0; // the widget that got created - TQObject *obj = 0; // gets the properties - - TQString className = classNameArg; - - int row = e.attribute( "row" ).toInt(); - int col = e.attribute( "column" ).toInt(); - int rowspan = e.attribute( "rowspan" ).toInt(); - int colspan = e.attribute( "colspan" ).toInt(); - if ( rowspan < 1 ) - rowspan = 1; - if ( colspan < 1 ) - colspan = 1; - - bool isTQLayoutWidget = FALSE; - - if ( !className.isEmpty() ) { - if ( !layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { - className = TQWIDGET_OBJECT_NAME_STRING; - isTQLayoutWidget = TRUE; - } - if ( layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { - // hide layout widgets - w = parent; - } else { - obj = TQT_TQOBJECT(TQWidgetFactory::createWidget( className, parent, 0 )); - if ( !obj ) - return 0; - w = (TQWidget*)obj; - if ( !toplevel ) - toplevel = w; - if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) - w = ( (TQMainWindow*)w )->centralWidget(); - if ( layout ) { - switch( layoutType( layout ) ) { - case HBox: - ( (TQHBoxLayout*)layout )->addWidget( w ); - break; - case VBox: - ( (TQVBoxLayout*)layout )->addWidget( w ); - break; - case Grid: - ( (TQGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, - col, col + colspan - 1 ); - break; - default: - break; - } - } - - layout = 0; - } - } -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - TQString parentClassName = parent ? parent->className() : 0; - bool isPlugin = parent ? !!d->customWidgets.find( parent->className() ) : FALSE; - if ( isPlugin ) - tqWarning( "####### loading custom container widgets without page support not implemented!" ); - // ### TODO loading for custom container widgets without pages -#endif - - int idx = 0; - while ( !n.isNull() ) { - if ( n.tagName() == "spacer" ) { - createSpacer( n, layout ); - } else if ( n.tagName() == "widget" ) { - TQMap< TQString, TQString> *oldDbControls = dbControls; - createWidgetInternal( n, w, layout, n.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) ); - dbControls = oldDbControls; - } else if ( n.tagName() == "hbox" ) { - TQLayout *parentLayout = layout; - if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - layout = createLayout( 0, 0, TQWidgetFactory::HBox, isTQLayoutWidget ); - else - layout = createLayout( w, layout, TQWidgetFactory::HBox, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); - n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, - row + rowspan - 1, col, col + colspan - 1 ); - continue; - } else if ( n.tagName() == "grid" ) { - TQLayout *parentLayout = layout; - if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - layout = createLayout( 0, 0, TQWidgetFactory::Grid, isTQLayoutWidget ); - else - layout = createLayout( w, layout, TQWidgetFactory::Grid, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); - n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, - row + rowspan - 1, col, col + colspan - 1 ); - continue; - } else if ( n.tagName() == "vbox" ) { - TQLayout *parentLayout = layout; - if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - layout = createLayout( 0, 0, TQWidgetFactory::VBox, isTQLayoutWidget ); - else - layout = createLayout( w, layout, TQWidgetFactory::VBox, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); - n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, - row + rowspan - 1, col, col + colspan - 1 ); - continue; - } else if ( n.tagName() == "property" && obj ) { - setProperty( obj, n.attribute( "name" ), n.firstChild().toElement() ); - } else if ( n.tagName() == "attribute" && w ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( parent ) { - if ( parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) { - if ( attrib == "title" ) - ( (TQTabWidget*)parent )->insertTab( w, translate( v.toString() ) ); - } else if ( parent->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) { - if ( attrib == "id" ) - ( (TQWidgetStack*)parent )->addWidget( w, v.toInt() ); - } else if ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) { - if ( attrib == "label" ) - ( (TQToolBox*)parent )->addItem( w, v.toString() ); - } else if ( parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) { - if ( attrib == "title" ) - ( (TQWizard*)parent )->addPage( w, translate( v.toString() ) ); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - } else if ( isPlugin ) { - if ( attrib == "label" ) { - WidgetInterface *iface = 0; - widgetInterfaceManager->queryInterface( parentClassName, &iface ); - if ( iface ) { - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, - (TQUnknownInterface**)&iface2 ); - if ( iface2 ) { - iface2->insertPage( parentClassName, - (TQWidget*)parent, translate( v.toString() ), -1, w ); - iface2->release(); - } - iface->release(); - } - } -#endif - } - } - } else if ( n.tagName() == "item" ) { - createItem( n, w ); - } else if ( n.tagName() == "column" || n.tagName() == "row" ) { - createColumn( n, w ); - } - - n = n.nextSibling().toElement(); - idx++; - } - - return w; -} - -TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout, - LayoutType type, bool isTQLayoutWidget ) -{ - int spacing = defSpacing; - int margin = defMargin; - - if ( layout || !widget || isTQLayoutWidget ) - margin = 0; - - if ( !layout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) - widget = ((TQTabWidget*)widget)->currentPage(); - - if ( !layout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) - widget = ((TQWizard*)widget)->currentPage(); - - if ( !layout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) - widget = ((TQWidgetStack*)widget)->visibleWidget(); - - if ( !layout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) - widget = ((TQToolBox*)widget)->currentItem(); - - TQLayout *l = 0; - int align = 0; - if ( !layout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) { - TQGroupBox *gb = (TQGroupBox*)widget; - gb->setColumnLayout( 0, Qt::Vertical ); - layout = gb->layout(); - layout->setMargin( 0 ); - layout->setSpacing( 0 ); - align = TQt::AlignTop; - } - if ( layout ) { - switch ( type ) { - case HBox: - l = new TQHBoxLayout( layout ); - break; - case VBox: - l = new TQVBoxLayout( layout ); - break; - case Grid: - l = new TQGridLayout( layout ); - break; - default: - return 0; - } - } else { - switch ( type ) { - case HBox: - l = new TQHBoxLayout( widget ); - break; - case VBox: - l = new TQVBoxLayout( widget ); - break; - case Grid: - l = new TQGridLayout( widget ); - break; - default: - return 0; - } - } - l->setAlignment( align ); - l->setMargin( margin ); - l->setSpacing( spacing ); - return l; -} - -TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *layout ) const -{ - if ( layout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) ) - return HBox; - else if ( layout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) ) - return VBox; - else if ( layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - return Grid; - return NoLayout; -} - -void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, - TQVariant value ) -{ - int offset = obj->metaObject()->findProperty( prop.ascii(), TRUE ); - - if ( offset != -1 ) { - if ( prop == "geometry" && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) { - toplevel->resize( value.toRect().size() ); - } else if ( prop == "accel" ) { - obj->setProperty( prop.ascii(), TQVariant(value.toKeySequence()) ); - } else { - if ( value.type() == TQVariant::String || - value.type() == TQVariant::CString ) { - const TQMetaProperty *metaProp = - obj->metaObject()->property( offset, TRUE ); - if ( metaProp != 0 && metaProp->isEnumType() ) { - if ( metaProp->isSetType() ) { - TQStrList flagsCStr; - TQStringList flagsStr = - TQStringList::split( '|', value.asString() ); - TQStringList::ConstIterator f = flagsStr.begin(); - while ( f != flagsStr.end() ) { - flagsCStr.append( (*f).ascii() ); - ++f; - } - value = TQVariant( metaProp->keysToValue(flagsCStr) ); - } else { - TQCString key = value.toCString(); - value = TQVariant( metaProp->keyToValue(key) ); - } - } - } - obj->setProperty( prop.ascii(), value ); - } - } else { - if ( obj->isWidgetType() ) { - if ( prop == "toolTip" ) { - if ( !value.toString().isEmpty() ) - TQToolTip::add( (TQWidget*)obj, translate( value.toString() ) ); - } else if ( prop == "whatsThis" ) { - if ( !value.toString().isEmpty() ) - TQWhatsThis::add( (TQWidget*)obj, translate( value.toString() ) ); - } else if ( prop == "buddy" ) { - buddies.insert( obj->name(), value.toCString() ); - } else if ( prop == "buttonGroupId" ) { - if ( obj->inherits( TQBUTTON_OBJECT_NAME_STRING ) && obj->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) - ( (TQButtonGroup*)obj->parent() )->insert( (TQButton*)obj, value.toInt() ); -#ifndef TQT_NO_SQL - } else if ( prop == "database" && !obj->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) - && !obj->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) ) { - const TQStringList& lst = value.asStringList(); - if ( lst.count() > 2 ) { - if ( dbControls ) - dbControls->insert( obj->name(), lst[ 2 ] ); - } else if ( lst.count() == 2 ) { - dbTables.insert( obj->name(), lst ); - } - } else if ( prop == "database" ) { - const TQStringList& lst = value.asStringList(); - if ( lst.count() == 2 && obj->inherits( TQWIDGET_OBJECT_NAME_STRING ) ) { - SqlWidgetConnection conn( lst[ 0 ], lst[ 1 ] ); - sqlWidgetConnections.insert( (TQWidget*)obj, conn ); - dbControls = conn.dbControls; - } -#endif - } else if ( prop == "frameworkCode" ) { - if ( value.isValid() && !value.toBool() ) - noDatabaseWidgets << obj->name(); - } - } - } -} - -void TQWidgetFactory::setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e ) -{ - TQString comment; - TQVariant value( DomTool::elementToVariant( e, TQVariant(), comment ) ); - - if ( e.tagName() == "string" ) { - value = translate( value.asString(), comment ); - } else if ( e.tagName() == "pixmap" ) { - TQPixmap pix = loadPixmap( value.toString() ); - if ( !pix.isNull() ) - value = pix; - } else if ( e.tagName() == "iconset" ) { - TQPixmap pix = loadPixmap( value.toString() ); - if ( !pix.isNull() ) - value = TQIconSet( pix ); - } else if ( e.tagName() == "image" ) { - value = loadFromCollection( value.toString() ); - } else if ( e.tagName() == "palette" ) { - TQDomElement n = e.firstChild().toElement(); - TQPalette p; - while ( !n.isNull() ) { - TQColorGroup cg; - if ( n.tagName() == "active" ) { - cg = loadColorGroup( n ); - p.setActive( cg ); - } else if ( n.tagName() == "inactive" ) { - cg = loadColorGroup( n ); - p.setInactive( cg ); - } else if ( n.tagName() == "disabled" ) { - cg = loadColorGroup( n ); - p.setDisabled( cg ); - } - n = n.nextSibling().toElement(); - } - value = p; - } - setProperty( widget, prop, value ); -} - -void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout ) -{ - TQDomElement n = e.firstChild().toElement(); - int row = e.attribute( "row" ).toInt(); - int col = e.attribute( "column" ).toInt(); - int rowspan = e.attribute( "rowspan" ).toInt(); - int colspan = e.attribute( "colspan" ).toInt(); - - Qt::Orientation orient = Qt::Horizontal; - int w = 0, h = 0; - TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred; - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString prop = n.attribute( "name" ); - if ( prop == "orientation" ) { - if ( n.firstChild().firstChild().toText().data() == "Horizontal" ) - orient = Qt::Horizontal; - else - orient = Qt::Vertical; - } else if ( prop == "sizeType" ) { - sizeType = stringToSizeType( n.firstChild().firstChild().toText().data() ); - } else if ( prop == "sizeHint" ) { - w = n.firstChild().firstChild().firstChild().toText().data().toInt(); - h = n.firstChild().firstChild().nextSibling().firstChild().toText().data().toInt(); - } - } - n = n.nextSibling().toElement(); - } - - if ( rowspan < 1 ) - rowspan = 1; - if ( colspan < 1 ) - colspan = 1; - TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum, - orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum ); - if ( layout ) { - if ( layout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQBoxLayout*)layout )->addItem( item ); - else - ( (TQGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1, - orient == Qt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter ); - } -} - -static TQImage loadImageData( TQDomElement &n2 ) -{ - TQString format = n2.attribute( "format", "PNG" ); - TQString hex = n2.firstChild().toText().data(); - int n = hex.length() / 2; - TQByteArray data( n ); - for ( int i = 0; i < n; i++ ) - data[i] = (char) hex.mid( 2 * i, 2 ).toUInt( 0, 16 ); - return loadImageData( format, n2.attribute("length").toULong(), data ); -} - -void TQWidgetFactory::loadImageCollection( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "image" ) { - Image img; - img.name = n.attribute( "name" ); - TQDomElement n2 = n.firstChild().toElement(); - while ( !n2.isNull() ) { - if ( n2.tagName() == "data" ) - img.img = loadImageData( n2 ); - n2 = n2.nextSibling().toElement(); - } - images.append( img ); - n = n.nextSibling().toElement(); - } - } -} - -TQImage TQWidgetFactory::loadFromCollection( const TQString &name ) -{ - TQValueList::Iterator it = images.begin(); - for ( ; it != images.end(); ++it ) { - if ( ( *it ).name == name ) - return ( *it ).img; - } - return TQImage(); -} - -TQPixmap TQWidgetFactory::loadPixmap( const TQString& name ) -{ - TQPixmap pix; - if ( usePixmapCollection ) { - const TQMimeSource *m = TQMimeSourceFactory::defaultFactory()->data( name ); - if ( m ) - TQImageDrag::decode( m, pix ); - } else { - pix.convertFromImage( loadFromCollection(name) ); - } - return pix; -} - -TQPixmap TQWidgetFactory::loadPixmap( const TQDomElement &e ) -{ - return loadPixmap( e.firstChild().toText().data() ); -} - -TQColorGroup TQWidgetFactory::loadColorGroup( const TQDomElement &e ) -{ - TQColorGroup cg; - int r = -1; - TQDomElement n = e.firstChild().toElement(); - TQColor col; - while ( !n.isNull() ) { - if ( n.tagName() == "color" ) { - r++; - cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) ); - } else if ( n.tagName() == "pixmap" ) { - TQPixmap pix = loadPixmap( n ); - cg.setBrush( (TQColorGroup::ColorRole)r, TQBrush( col, pix ) ); - } - n = n.nextSibling().toElement(); - } - return cg; -} - -struct Connection -{ - TQObject *sender, *receiver; - TQCString signal, slot; - bool operator==( const Connection &c ) const { - return sender == c.sender && receiver == c.receiver && - signal == c.signal && slot == c.slot ; - } - - Connection() : sender( 0 ), receiver( 0 ) { } -}; - -class NormalizeObject : public TQObject -{ -public: - NormalizeObject() : TQObject() {} - static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); } -}; - -void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connector ) -{ - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "connection" ) { - TQString lang = n.attribute( "language", "C++" ); - TQDomElement n2 = n.firstChild().toElement(); - Connection conn; - while ( !n2.isNull() ) { - if ( n2.tagName() == "sender" ) { - TQString name = n2.firstChild().toText().data(); - if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { - conn.sender = TQT_TQOBJECT(toplevel); - } else { - if ( name == "this" ) - name = toplevel->name(); - TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE ); - if ( l ) { - if ( l->first() ) - conn.sender = l->first(); - delete l; - } - } - if ( !conn.sender ) - conn.sender = findAction( name ); - } else if ( n2.tagName() == "signal" ) { - conn.signal = n2.firstChild().toText().data().ascii(); - } else if ( n2.tagName() == "receiver" ) { - TQString name = n2.firstChild().toText().data(); - if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { - conn.receiver = TQT_TQOBJECT(toplevel); - } else { - TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE ); - if ( l ) { - if ( l->first() ) - conn.receiver = l->first(); - delete l; - } - } - } else if ( n2.tagName() == "slot" ) { - conn.slot = n2.firstChild().toText().data().ascii(); - } - n2 = n2.nextSibling().toElement(); - } - - conn.signal = NormalizeObject::normalizeSignalSlot( conn.signal ); - conn.slot = NormalizeObject::normalizeSignalSlot( conn.slot ); - - if ( !conn.sender || !conn.receiver ) { - n = n.nextSibling().toElement(); - continue; - } - - TQObject *sender = 0, *receiver = 0; - TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE ); - if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) { - sender = TQT_TQOBJECT(toplevel); - } else { - if ( !l || !l->first() ) { - delete l; - n = n.nextSibling().toElement(); - continue; - } - sender = l->first(); - delete l; - } - if ( !sender ) - sender = findAction( conn.sender->name() ); - - if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) { - receiver = TQT_TQOBJECT(toplevel); - } else { - l = toplevel->queryList( 0, conn.receiver->name(), FALSE ); - if ( !l || !l->first() ) { - delete l; - n = n.nextSibling().toElement(); - continue; - } - receiver = l->first(); - delete l; - } - - TQString s = "2""%1"; - s = s.arg( conn.signal.data() ); - TQString s2 = "1""%1"; - s2 = s2.arg( conn.slot.data() ); - - TQStrList signalList = sender->metaObject()->signalNames( TRUE ); - TQStrList slotList = receiver->metaObject()->slotNames( TRUE ); - - // if this is a connection to a custom slot and we have a connector, try this as receiver - if ( slotList.find( conn.slot ) == -1 && (TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel)) && connector ) { - slotList = connector->metaObject()->slotNames( TRUE ); - receiver = connector; - } - - // avoid warnings - if ( signalList.find( conn.signal ) == -1 || - slotList.find( conn.slot ) == -1 ) { - n = n.nextSibling().toElement(); - continue; - } - TQObject::connect( sender, s.ascii(), receiver, s2.ascii() ); - } - n = n.nextSibling().toElement(); - } -} - -void TQWidgetFactory::loadTabOrder( const TQDomElement &e ) -{ - TQWidget *last = 0; - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "tabstop" ) { - TQString name = n.firstChild().toText().data(); - TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE ); - if ( l ) { - if ( l->first() ) { - TQWidget *w = (TQWidget*)l->first(); - if ( last ) - toplevel->setTabOrder( last, w ); - last = w; - } - delete l; - } - } - n = n.nextSibling().toElement(); - } -} - -void TQWidgetFactory::createListViewColumn( TQListView *lv, const TQString& txt, - const TQPixmap& pix, bool clickable, - bool resizable ) -{ - if ( pix.isNull() ) { - lv->addColumn( txt ); - } else { - lv->addColumn( pix, txt ); - } - - int i = lv->header()->count() - 1; - if ( !pix.isNull() ) - lv->header()->setLabel( i, pix, txt ); - if ( !clickable ) - lv->header()->setClickEnabled( clickable, i ); - if ( !resizable ) - lv->header()->setResizeEnabled( resizable, i ); -} - -#ifndef TQT_NO_TABLE -void TQWidgetFactory::createTableColumnOrRow( TQTable *table, const TQString& txt, - const TQPixmap& pix, - const TQString& field, bool isRow ) -{ -#ifndef TQT_NO_SQL - bool isSql = table->inherits( TQDATATABLE_OBJECT_NAME_STRING ); -#endif - if ( isRow ) - table->setNumRows( table->numRows() + 1 ); - else { -#ifndef TQT_NO_SQL - if ( !isSql ) -#endif - table->setNumCols( table->numCols() + 1 ); - } - - TQValueList fieldMap; - if ( fieldMaps.find( table ) != fieldMaps.end() ) { - fieldMap = *fieldMaps.find( table ); - fieldMaps.remove( table ); - } - - int i = isRow ? table->numRows() - 1 : table->numCols() - 1; - TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); - if ( !pix.isNull() ) { -#ifndef TQT_NO_SQL - if ( isSql ) - ((TQDataTable*)table)->addColumn( field, txt, -1, pix ); - else -#endif - h->setLabel( i, pix, txt ); - } else { -#ifndef TQT_NO_SQL - if ( isSql ) - ((TQDataTable*)table)->addColumn( field, txt ); - else -#endif - h->setLabel( i, txt ); - } - if ( !isRow && !field.isEmpty() ) { - fieldMap.append( Field( txt, pix, field ) ); - fieldMaps.insert( table, fieldMap ); - } - -} -#endif - -void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget ) -{ - if ( widget->inherits( TQLISTVIEW_OBJECT_NAME_STRING ) && e.tagName() == "column" ) { - TQListView *lv = (TQListView*)widget; - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - TQString txt; - bool clickable = TRUE, resizable = TRUE; - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - txt = translate( v.toString() ); - else if ( attrib == "pixmap" ) - pix = loadPixmap( n.firstChild().toElement().toElement() ); - else if ( attrib == "clickable" ) - clickable = v.toBool(); - else if ( attrib == "resizable" || attrib == "resizeable" ) - resizable = v.toBool(); - } - n = n.nextSibling().toElement(); - } - createListViewColumn( lv, txt, pix, clickable, resizable ); - } -#ifndef TQT_NO_TABLE - else if ( widget->inherits( TQTABLE_OBJECT_NAME_STRING ) ) { - TQTable *table = (TQTable*)widget; - - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - TQString txt; - TQString field; - - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - txt = translate( v.toString() ); - else if ( attrib == "pixmap" ) { - if ( !n.firstChild().firstChild().toText().data().isEmpty() ) - pix = loadPixmap( n.firstChild().toElement().toElement() ); - } else if ( attrib == "field" ) - field = translate( v.toString() ); - } - n = n.nextSibling().toElement(); - } - createTableColumnOrRow( table, txt, pix, field, e.tagName() == "row" ); - } -#endif -} - -void TQWidgetFactory::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ) -{ - TQDomElement n = e; - hasPixmap = FALSE; - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - txt = translate( v.toString() ); - else if ( attrib == "pixmap" ) { - pix = loadPixmap( n.firstChild().toElement() ); - hasPixmap = !pix.isNull(); - } - } - n = n.nextSibling().toElement(); - } -} - -void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) -{ - if ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) || widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) { - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - bool hasPixmap = FALSE; - TQString txt; - loadItem( n, pix, txt, hasPixmap ); - TQListBox *lb = 0; - if ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) ) - lb = (TQListBox*)widget; - else - lb = ( (TQComboBox*)widget)->listBox(); - if ( hasPixmap ) { - new TQListBoxPixmap( lb, pix, txt ); - } else { - new TQListBoxText( lb, txt ); - } -#ifndef TQT_NO_ICONVIEW - } else if ( widget->inherits( TQICONVIEW_OBJECT_NAME_STRING ) ) { - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - bool hasPixmap = FALSE; - TQString txt; - loadItem( n, pix, txt, hasPixmap ); - - TQIconView *iv = (TQIconView*)widget; - new TQIconViewItem( iv, txt, pix ); -#endif - } else if ( widget->inherits( TQLISTVIEW_OBJECT_NAME_STRING ) ) { - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - TQValueList pixmaps; - TQStringList textes; - TQListViewItem *item = 0; - TQListView *lv = (TQListView*)widget; - if ( i ) - item = new TQListViewItem( i, d->lastItem ); - else - item = new TQListViewItem( lv, d->lastItem ); - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - textes << translate( v.toString() ); - else if ( attrib == "pixmap" ) { - TQString s = v.toString(); - if ( s.isEmpty() ) { - pixmaps << TQPixmap(); - } else { - pix = loadPixmap( n.firstChild().toElement() ); - pixmaps << pix; - } - } - } else if ( n.tagName() == "item" ) { - item->setOpen( TRUE ); - createItem( n, widget, item ); - } - - n = n.nextSibling().toElement(); - } - - for ( int i = 0; i < lv->columns(); ++i ) { - item->setText( i, textes[ i ] ); - item->setPixmap( i, pixmaps[ i ] ); - } - d->lastItem = item; - } -} - - - -void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e ) -{ - TQDomElement n = e; - TQAction *a = 0; - bool hasMenuText = FALSE; - if ( n.tagName() == "action" ) { - a = new TQAction( parent ); - TQDomElement n2 = n.firstChild().toElement(); - - while ( !n2.isNull() ) { - if ( n2.tagName() == "property" ) { - TQString prop(n2.attribute("name")); - if (prop == "menuText") - hasMenuText = TRUE; - setProperty( a, prop, n2.firstChild().toElement() ); - } - n2 = n2.nextSibling().toElement(); - } - if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) ) - actionList.append( a ); - } else if ( n.tagName() == "actiongroup" ) { - a = new TQActionGroup( parent ); - TQDomElement n2 = n.firstChild().toElement(); - while ( !n2.isNull() ) { - if ( n2.tagName() == "property" ) { - TQString prop(n2.attribute("name")); - if (prop == "menuText") - hasMenuText = TRUE; - setProperty( a, prop, n2.firstChild().toElement() ); - } else if ( n2.tagName() == "action" || - n2.tagName() == "actiongroup" ) { - loadChildAction( a, n2 ); - - } - n2 = n2.nextSibling().toElement(); - } - if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) ) - actionList.append( a ); - } - - if (a && !hasMenuText && !a->text().isEmpty() && uiFileVersion < "3.3") - a->setMenuText(a->text()); -} - -void TQWidgetFactory::loadActions( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "action" ) { - loadChildAction( TQT_TQOBJECT(toplevel), n ); - } else if ( n.tagName() == "actiongroup" ) { - loadChildAction( TQT_TQOBJECT(toplevel), n ); - } - n = n.nextSibling().toElement(); - } -} - -void TQWidgetFactory::loadToolBars( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - TQMainWindow *mw = ( (TQMainWindow*)toplevel ); - TQToolBar *tb = 0; - while ( !n.isNull() ) { - if ( n.tagName() == "toolbar" ) { - TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt(); - tb = new TQToolBar( TQString(), mw, dock ); - tb->setLabel( n.attribute( "label" ) ); - tb->setName( n.attribute( "name" ).ascii() ); - TQDomElement n2 = n.firstChild().toElement(); - while ( !n2.isNull() ) { - if ( n2.tagName() == "action" ) { - TQAction *a = findAction( n2.attribute( "name" ) ); - if ( a ) - a->addTo( tb ); - } else if ( n2.tagName() == "separator" ) { - tb->addSeparator(); - } else if ( n2.tagName() == "widget" ) { - (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) ); - } else if ( n2.tagName() == "property" ) { - setProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); - } - n2 = n2.nextSibling().toElement(); - } - } - n = n.nextSibling().toElement(); - } -} - -void TQWidgetFactory::loadMenuBar( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - TQMainWindow *mw = ( (TQMainWindow*)toplevel ); - TQMenuBar *mb = mw->menuBar(); - while ( !n.isNull() ) { - if ( n.tagName() == "item" ) { - TQPopupMenu *popup = new TQPopupMenu( mw ); - loadPopupMenu( popup, n ); - popup->setName( n.attribute( "name" ).ascii() ); - mb->insertItem( translate( n.attribute( "text" ) ), popup ); - } else if ( n.tagName() == "property" ) { - setProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); - } else if ( n.tagName() == "separator" ) { - mb->insertSeparator(); - } - n = n.nextSibling().toElement(); - } -} - -void TQWidgetFactory::loadPopupMenu( TQPopupMenu *p, const TQDomElement &e ) -{ - TQMainWindow *mw = ( (TQMainWindow*)toplevel ); - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "action" ) { - TQAction *a = findAction( n.attribute( "name" ) ); - TQDomElement n2 = n.nextSibling().toElement(); - if ( n2.tagName() == "item") { // load submenu - TQPopupMenu *popup = new TQPopupMenu( mw ); - popup->setName( n2.attribute( "name" ).ascii() ); - if ( a ) { - p->setAccel( a->accel(), p->insertItem( a->iconSet(), - translate( n2.attribute( "text" ).utf8().data() ), - popup ) ); - } else { - p->insertItem( translate( n2.attribute( "text" ).utf8().data() ), popup ); - } - loadPopupMenu( popup, n2 ); - n = n2; - } else { - if ( a ) { - a->addTo( p ); - } - } - a = 0; - } else if ( n.tagName() == "separator" ) { - p->insertSeparator(); - } - n = n.nextSibling().toElement(); - } -} - -// compatibility with early 3.0 betas -// ### remove for 4.0 -void TQWidgetFactory::loadFunctions( const TQDomElement & ) -{ -} - -TQAction *TQWidgetFactory::findAction( const TQString &name ) -{ - for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( TQString( a->name() ) == name ) - return a; - TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING ); - if ( ac ) - return ac; - } - return 0; -} - -/*! - If you use a pixmap collection (which is the default for new - projects) rather than saving the pixmaps within the .ui XML file, - you must load the pixmap collection. TQWidgetFactory looks in the - default TQMimeSourceFactory for the pixmaps. Either add it there - manually, or call this function and specify the directory where - the images can be found, as \a dir. This is normally the - directory called \c images in the project's directory. -*/ - -void TQWidgetFactory::loadImages( const TQString &dir ) -{ - TQDir d( dir ); - TQStringList l = d.entryList( TQDir::Files ); - for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) - TQMimeSourceFactory::defaultFactory()->setPixmap( *it, TQPixmap( d.path() + "/" + *it, "PNG" ) ); - -} - -void TQWidgetFactory::loadExtraSource() -{ - if ( !qwf_language || !languageInterfaceManager ) - return; - TQString lang = *qwf_language; - LanguageInterface *iface = 0; - languageInterfaceManager->queryInterface( lang, &iface ); - if ( !iface ) - return; - TQFile f( qwf_currFileName + iface->formCodeExtension() ); - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - code = ts.read(); - } -} - -TQString TQWidgetFactory::translate( const TQString& sourceText, const TQString& comment ) -{ - return tqApp->translate( d->translationContext, sourceText.utf8(), comment.utf8(), - TQApplication::UnicodeUTF8 ); -} - -TQString TQWidgetFactory::translate( const char *sourceText, const char *comment ) -{ - return tqApp->translate( d->translationContext, sourceText, comment, - TQApplication::UnicodeUTF8 ); -} diff --git a/tdevdesigner/uilib/qwidgetfactory.h b/tdevdesigner/uilib/qwidgetfactory.h deleted file mode 100644 index 8f2b1427..00000000 --- a/tdevdesigner/uilib/qwidgetfactory.h +++ /dev/null @@ -1,178 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef TQWIDGETFACTORY_H -#define TQWIDGETFACTORY_H - -#include -#include -#include -#include -#include -#include -#include - -class TQDomDocument; -class TQDomElement; -class TQLayout; -class TQListView; -class TQListViewItem; -class TQMenuBar; -class TQTable; -class TQWidget; -class TQWidgetFactoryPrivate; -class UibStrTable; - -class TQWidgetFactory -{ -public: - TQWidgetFactory(); - virtual ~TQWidgetFactory(); - - static TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 ); - static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 ); - static void addWidgetFactory( TQWidgetFactory *factory ); - static void loadImages( const TQString &dir ); - - virtual TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name ) const; - static TQStringList widgets(); - static bool supportsWidget( const TQString &widget ); - -private: - enum LayoutType { HBox, VBox, Grid, NoLayout }; - void loadImageCollection( const TQDomElement &e ); - void loadConnections( const TQDomElement &e, TQObject *connector ); - void loadTabOrder( const TQDomElement &e ); - TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg ); - TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type, bool isTQLayoutWidget = FALSE ); - LayoutType layoutType( TQLayout *l ) const; - void setProperty( TQObject* widget, const TQString &prop, TQVariant value ); - void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e ); - void createSpacer( const TQDomElement &e, TQLayout *layout ); - TQImage loadFromCollection( const TQString &name ); - TQPixmap loadPixmap( const TQString &name ); - TQPixmap loadPixmap( const TQDomElement &e ); - TQColorGroup loadColorGroup( const TQDomElement &e ); - void createListViewColumn( TQListView *lv, const TQString& txt, - const TQPixmap& pix, bool clickable, - bool resizable ); -#ifndef TQT_NO_TABLE - void createTableColumnOrRow( TQTable *table, const TQString& txt, - const TQPixmap& pix, const TQString& field, - bool isRow ); -#endif - void createColumn( const TQDomElement &e, TQWidget *widget ); - void loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ); - void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 ); - void loadChildAction( TQObject *parent, const TQDomElement &e ); - void loadActions( const TQDomElement &e ); - void loadToolBars( const TQDomElement &e ); - void loadMenuBar( const TQDomElement &e ); - void loadPopupMenu( TQPopupMenu *p, const TQDomElement &e ); - void loadFunctions( const TQDomElement &e ); - TQAction *findAction( const TQString &name ); - void loadExtraSource(); - TQString translate( const char *sourceText, const char *comment = "" ); - TQString translate( const TQString& sourceText, const TQString& comment = TQString() ); - - void unpackUInt16( TQDataStream& in, TQ_UINT16& n ); - void unpackUInt32( TQDataStream& in, TQ_UINT32& n ); - void unpackByteArray( TQDataStream& in, TQByteArray& array ); - void unpackCString( const UibStrTable& strings, TQDataStream& in, - TQCString& cstr ); - void unpackString( const UibStrTable& strings, TQDataStream& in, - TQString& str ); - void unpackStringSplit( const UibStrTable& strings, TQDataStream& in, - TQString& str ); - void unpackVariant( const UibStrTable& strings, TQDataStream& in, - TQVariant& value ); - void inputSpacer( const UibStrTable& strings, TQDataStream& in, - TQLayout *parent ); - void inputColumnOrRow( const UibStrTable& strings, TQDataStream& in, - TQObject *parent, bool isRow ); - void inputItem( const UibStrTable& strings, TQDataStream& in, - TQObject *parent, TQListViewItem *parentItem = 0 ); - void inputMenuItem( TQObject **objects, const UibStrTable& strings, - TQDataStream& in, TQMenuBar *menuBar ); - TQObject *inputObject( TQObject **objects, int& numObjects, - const UibStrTable& strings, TQDataStream& in, - TQWidget *ancestorWidget, TQObject *parent, - TQCString className = "" ); - TQWidget *createFromUiFile( TQDomDocument doc, TQObject *connector, - TQWidget *parent, const char *name ); - TQWidget *createFromUibFile( TQDataStream& in, TQObject *connector, - TQWidget *parent, const char *name ); - -private: - struct Image { - TQImage img; - TQString name; - bool operator==( const Image &i ) const { - return ( i.name == name && - i.img == img ); - } - }; - - struct Field - { - Field() {} - Field( const TQString &s1, const TQPixmap &p, const TQString &s2 ) : name( s1 ), pix( p ), field( s2 ) {} - TQString name; - TQPixmap pix; - TQString field; - TQ_DUMMY_COMPARISON_OPERATOR( Field ) - }; - - struct SqlWidgetConnection - { - SqlWidgetConnection() {} - SqlWidgetConnection( const TQString &c, const TQString &t ) - : conn( c ), table( t ), dbControls( new TQMap() ) {} - TQString conn; - TQString table; - TQMap *dbControls; - TQ_DUMMY_COMPARISON_OPERATOR( SqlWidgetConnection ) - }; - - TQValueList images; - TQWidget *toplevel; - TQWidgetFactoryPrivate *d; - TQMap *dbControls; - TQMap dbTables; - TQMap sqlWidgetConnections; - TQMap buddies; - TQMap > fieldMaps; - TQPtrList actionList; - TQMap languageSlots; - TQStringList noDatabaseWidgets; - bool usePixmapCollection; - int defMargin; - int defSpacing; - TQString code; - TQString uiFileVersion; -}; - -#endif diff --git a/tdevelop_kde_cpp.desktop b/tdevelop_kde_cpp.desktop new file mode 100644 index 00000000..c73f2f06 --- /dev/null +++ b/tdevelop_kde_cpp.desktop @@ -0,0 +1,48 @@ +[Desktop Entry] +Type=Application +Exec=tdevelop --profile KDECppIDE %u +MimeType=application/x-tdevelop; +Icon=tdevelop +DocPath=tdevelop/index.html +Terminal=false +Name=TDevelop: TDE/C++ +Name[br]=TDevelop : TDE/C++ +Name[fr]=TDevelop : TDE / C++ +Name[nds]=TDevelop - TDE/C++ +Name[ne]=केडीई विकास: TDE/C++ +Name[zh_CN]=TDevelop:TDE/C++ +Name[zh_TW]=TDevelop:TDE/C++ +GenericName=IDE for TDE Development +GenericName[ca]=IDE per al desenvolupament de TDE +GenericName[cs]=IDE pro vývoj TDE +GenericName[da]=Integreret udviklingsmiljø for TDE +GenericName[de]=IDE für TDE-Softwareentwicklung +GenericName[el]=IDE για προγραμματισμό TDE +GenericName[es]=IDE para desarrollo en TDE +GenericName[et]=TDE arendamise IDE +GenericName[eu]=TDE-ren garapenerako IDE-a +GenericName[fa]=IDE برای توسعۀ TDE +GenericName[fr]=EDI pour le développement pour TDE +GenericName[ga]=IDE le haghaidh fhorbairt TDE +GenericName[gl]=IDE para desenvolvemento TDE +GenericName[hu]=Fejlesztőkörnyezet a TDE-hez +GenericName[it]=IDE per lo sviluppo di TDE +GenericName[ja]=TDE のための統合開発環境 +GenericName[nds]=TDE-Programmsmeed +GenericName[ne]=केडीई विकासका लागि आईडी ई +GenericName[nl]=IDE voor TDE Development +GenericName[pl]=IDE do tworzenia programów dla TDE +GenericName[pt]=IDE para Desenvolvimento TDE +GenericName[pt_BR]=IDE para Desenvolvimento no TDE +GenericName[ru]=Среда разработки TDE-приложений +GenericName[sk]=IDE pre vývoj TDE +GenericName[sl]=IDE za razvijanje TDE +GenericName[sr]=IDE за TDE развој +GenericName[sr@Latn]=IDE za TDE razvoj +GenericName[sv]=Utvecklingsmiljö för TDE +GenericName[tr]=TDE Geliştirmek için Bütünleşik Geliştirme Ortamı +GenericName[zh_CN]=TDE 开发的 IDE +GenericName[zh_TW]=TDE 整合開發環境 +X-DCOP-ServiceType=Multi +Categories=Qt;TDE;Development;IDE;X-TDE-TDevelopIDE; + diff --git a/tdevelop_tde_cpp.desktop b/tdevelop_tde_cpp.desktop deleted file mode 100644 index 301af04f..00000000 --- a/tdevelop_tde_cpp.desktop +++ /dev/null @@ -1,48 +0,0 @@ -[Desktop Entry] -Type=Application -Exec=tdevelop --profile TDECppIDE %u -MimeType=application/x-tdevelop; -Icon=tdevelop -DocPath=tdevelop/index.html -Terminal=false -Name=TDevelop: TDE/C++ -Name[br]=TDevelop : TDE/C++ -Name[fr]=TDevelop : TDE / C++ -Name[nds]=TDevelop - TDE/C++ -Name[ne]=केडीई विकास: TDE/C++ -Name[zh_CN]=TDevelop:TDE/C++ -Name[zh_TW]=TDevelop:TDE/C++ -GenericName=IDE for TDE Development -GenericName[ca]=IDE per al desenvolupament de TDE -GenericName[cs]=IDE pro vývoj TDE -GenericName[da]=Integreret udviklingsmiljø for TDE -GenericName[de]=IDE für TDE-Softwareentwicklung -GenericName[el]=IDE για προγραμματισμό TDE -GenericName[es]=IDE para desarrollo en TDE -GenericName[et]=TDE arendamise IDE -GenericName[eu]=TDE-ren garapenerako IDE-a -GenericName[fa]=IDE برای توسعۀ TDE -GenericName[fr]=EDI pour le développement pour TDE -GenericName[ga]=IDE le haghaidh fhorbairt TDE -GenericName[gl]=IDE para desenvolvemento TDE -GenericName[hu]=Fejlesztőkörnyezet a TDE-hez -GenericName[it]=IDE per lo sviluppo di TDE -GenericName[ja]=TDE のための統合開発環境 -GenericName[nds]=TDE-Programmsmeed -GenericName[ne]=केडीई विकासका लागि आईडी ई -GenericName[nl]=IDE voor TDE Development -GenericName[pl]=IDE do tworzenia programów dla TDE -GenericName[pt]=IDE para Desenvolvimento TDE -GenericName[pt_BR]=IDE para Desenvolvimento no TDE -GenericName[ru]=Среда разработки TDE-приложений -GenericName[sk]=IDE pre vývoj TDE -GenericName[sl]=IDE za razvijanje TDE -GenericName[sr]=IDE за TDE развој -GenericName[sr@Latn]=IDE za TDE razvoj -GenericName[sv]=Utvecklingsmiljö för TDE -GenericName[tr]=TDE Geliştirmek için Bütünleşik Geliştirme Ortamı -GenericName[zh_CN]=TDE 开发的 IDE -GenericName[zh_TW]=TDE 整合開發環境 -X-DCOP-ServiceType=Multi -Categories=Qt;TDE;Development;IDE;X-TDE-TDevelopIDE; - diff --git a/tdevprj2tdevelop b/tdevprj2tdevelop deleted file mode 100644 index 79966df0..00000000 --- a/tdevprj2tdevelop +++ /dev/null @@ -1,299 +0,0 @@ -#!/usr/bin/perl - -if ($#ARGV != 0) { - die "Need one argument"; -} - -$filename = $ARGV[0]; -unless ($filename =~ /\.kdevprj/) { - die "Not a .kdevprj file"; -} - - -$ingeneral = 0; -$inlfvgroups = 0; - -open(FILE, "<$filename") || die "File not found"; -while () { - if (/\[General\]/) { - $ingeneral = 1; - $inlfvgroups = 0; - $inbin = 0; - } elsif (/\[LFV Groups\]/) { - $ingeneral = 0; - $inlfvgroups = 1; - $inbin = 0; - } elsif (/\[Config for BinMakefileAm\]/) { - $ingeneral = 0; - $inlfvgroups = 0; - $inbin = 1; - } elsif (/\[(.*)\]/) { - push(@sourcefiles, $1); - $ingeneral = 0; - $inlfvgroups = 0; - $inbin = 0; - } - - if ($ingeneral) { - if (/^author=(.*)/) { - $author = $1; - } elsif (/^configure_args=(.*)/) { - $configure_args = $1; - } elsif (/^email=(.*)/) { - $email = $1; - } elsif (/^make_options=(.*)/) { - $make_options = $1; - if ($makeoptions =~ /-n/) { - $dontact = "true"; - } - if ($makeoptions =~ /-j([0-9]+)/) { - $numberofjobs = $1; - } - if ($makeoptions =~ /-f/) { - $abortonerror = "true"; - } - } elsif (/^project_name=(.*)/) { - $project_name = $1; - } elsif (/^project_type=(.*)/) { - $project_type = $1; - } elsif (/^sub_dir=([^\/]*)/) { - $subdir = $1; - } - } - - if ($inlfvgroups) { - if (/^groups=(.*)/) { - $lfvgroups = $1; - } elsif (/(.*)=(.*)/) { - $group = $1; - $pattern = $2; - $pattern =~ s/^(.*),$/$1/; - $lfvgrouppattern{$group} = $pattern; - } - } - - if ($inbin) { - if (/^bin_program=(.*)/) { - $bin_program = $1; - } elsif (/^path_to_bin_program=(.*)/) { - $path_to_bin_program = $1; - $path_to_bin_program =~ s#^\./(.*)$#$1#; - $path_to_bin_program =~ s#^(.*)/#$1#; - $path_to_bin_program = $path_to_bin_program . "/"; - } elsif (/^cflags=(.*)/) { - $cflags = $1; - } elsif (/^cxxflags=(.*)/) { - $cxxflags = $1; - } - } - -} -close FILE; - -# Choose language support -$primarylanguage = "C++"; -if ($project_type eq "normal_c" - || $project_type eq "normal_gnome") { - $primarylanguage = "C"; -} - -# Choose project management -$projectmanagement = "TDevCustomProject"; -if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ - || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/) { - $projectmanagement = "KDevTDEAutoProject"; -} -if ($project_type =~ /normal_cpp/) { - $projectmanagement = "KDevAutoProject"; -} - -# Keywords -if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ - || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/) { - $keywords = $keywords . ",KDE"; -} -if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ - || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/ - || $project_type =~ /normal_qt|normal_qt2|mdi_qt2|mdi_qextmdi/) { - $keywords = $keywords . ",Qt"; -} - - -## -## Let's go: write project file -## - -$projectfilename = $filename; -$projectfilename =~ s/^(.*)\.kdevprj$/$1.tdevelop/; -open(FILE, ">$projectfilename"); - -print FILE < - - - $author - $email - $projectmanagement - $primarylanguage - -EOF - -foreach $key (split(/,/, $keywords)) { - next if ($key eq ""); - print FILE <$key -EOF -} - -print FILE < - -EOF - -# auto project specific - -if ($projectmanagement eq "KDevAutoProject" || $projectmanagement eq "KDevTDEAutoProject") { - print FILE < - - $path_to_bin_program$bin_program - - - $configure_args - - - $abortonerror - $numberofjobs - $dontact - - - - $cflags - $cxxflags - - -EOF -} - -if ($project_management eq "TDevCustomProject") { - print FILE < - - $path_to_bin_program/$bin_program - - - $abortonerror - $numberofjobs - $dontact - - - -EOF -} - - -# file view -print FILE < - -EOF - -for $group (split /,/, $lfvgroups) { - next if ($group eq ""); - $pattern = $lfvgrouppattern{$group}; - $pattern =~ s/,/;/g; - print FILE < -EOF -} - -print FILE < - - - - gtk - gnustep - python - php - perl - - -EOF - -if ($projectmanagement eq "KDevAutoProject" - || $projectmanagement eq "KDevTDEAutoProject") { - print FILE < - - libtool - - -EOF -} - -print FILE < -EOF -close FILE; - - -## -## Write file list -## - -if ($projectmanagement eq "TDevCustomProject") { - $filelistfilename = $filename; - $filelistfilename =~ s/^(.*).kdevprj$/$1.filelist/; - open(FILE, ">$filelistfilename"); - for $file (@sourcefiles) { - print FILE "$file\n"; - } - close FILE; -} - - -## -## Convert templates -## - -$projectdir = ""; -if ($filename =~ m#(.*/)[^/]*#) { - $projectdir = $1; -} - -$oldtemplatedir = "${projectdir}$subdir/templates"; - -if (open(FILE, "$oldtemplatedir/cpp_template")) { - mkdir "${projectdir}templates"; - if (open(OFILE, ">${projectdir}templates/cpp")) { - while() { - s/\|EMAIL\|/\$EMAIL\$/; - s/\|AUTHOR\|/\$AUTHOR\$/; - s/\|VERSION\|/\$VERSION\$/; - s/\|DATE\|/\$DATE\$/; - s/\|YEAR\|/\$YEAR\$/; - s/\|FILENAME\|/\$FILENAME\$/; - print OFILE $_; - } - close OFILE; - } - close FILE; -} - -if (open(FILE, "$oldtemplatedir/header_template")) { - mkdir "${projectdir}templates"; - if (open(OFILE, ">${projectdir}templates/h")) { - while() { - s/\|EMAIL\|/\$EMAIL\$/; - s/\|AUTHOR\|/\$AUTHOR\$/; - s/\|VERSION\|/\$VERSION\$/; - s/\|DATE\|/\$DATE\$/; - s/\|YEAR\|/\$YEAR\$/; - s/\|FILENAME\|/\$FILENAME\$/; - print OFILE $_; - } - close OFILE; - } - close FILE; -} diff --git a/vcs/clearcase/CMakeLists.txt b/vcs/clearcase/CMakeLists.txt index 94ca0536..4dbed390 100644 --- a/vcs/clearcase/CMakeLists.txt +++ b/vcs/clearcase/CMakeLists.txt @@ -27,15 +27,15 @@ link_directories( ##### other data ################################ -install( FILES tdevclearcase.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevclearcase.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevclearcase (module) ################# +##### libkdevclearcase (module) ################# -tde_add_kpart( libtdevclearcase AUTOMOC +tde_add_kpart( libkdevclearcase AUTOMOC SOURCES clearcasepart.cpp commentdlg.cpp clearcasefileinfoprovider.cpp clearcasemanipulator.cpp - LINK tdevextensions-static tdevelop-shared + LINK kdevextensions-static tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/clearcase/Makefile.am b/vcs/clearcase/Makefile.am index 36a2e7b6..630a1346 100644 --- a/vcs/clearcase/Makefile.am +++ b/vcs/clearcase/Makefile.am @@ -3,16 +3,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevclearcase.la -libtdevclearcase_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevclearcase_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la +kde_module_LTLIBRARIES = libkdevclearcase.la +libkdevclearcase_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevclearcase_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la -libtdevclearcase_la_SOURCES = clearcasepart.cpp commentdlg.cpp \ +libkdevclearcase_la_SOURCES = clearcasepart.cpp commentdlg.cpp \ clearcasefileinfoprovider.cpp clearcasemanipulator.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevclearcase.desktop +service_DATA = kdevclearcase.desktop SUBDIRS = integrator diff --git a/vcs/clearcase/clearcasefileinfoprovider.cpp b/vcs/clearcase/clearcasefileinfoprovider.cpp index db7cbcc1..1e18f8e1 100644 --- a/vcs/clearcase/clearcasefileinfoprovider.cpp +++ b/vcs/clearcase/clearcasefileinfoprovider.cpp @@ -11,13 +11,13 @@ // #include "clearcasefileinfoprovider.h" #include "clearcasepart.h" -#include "tdevversioncontrol.h" +#include "kdevversioncontrol.h" #include #include ClearcaseFileinfoProvider::ClearcaseFileinfoProvider(ClearcasePart *parent) - : TDevVCSFileInfoProvider( (TDevVersionControl*) parent, "clearcasefileinfoprovider") + : KDevVCSFileInfoProvider( (KDevVersionControl*) parent, "clearcasefileinfoprovider") { vcsInfo_ = NULL; diff --git a/vcs/clearcase/clearcasefileinfoprovider.h b/vcs/clearcase/clearcasefileinfoprovider.h index 4c29da44..0f6f7d06 100644 --- a/vcs/clearcase/clearcasefileinfoprovider.h +++ b/vcs/clearcase/clearcasefileinfoprovider.h @@ -19,7 +19,7 @@ /** @author KDevelop Authors */ -class ClearcaseFileinfoProvider : public TDevVCSFileInfoProvider +class ClearcaseFileinfoProvider : public KDevVCSFileInfoProvider { Q_OBJECT diff --git a/vcs/clearcase/clearcasemanipulator.h b/vcs/clearcase/clearcasemanipulator.h index 42a5cee0..0cb795e3 100644 --- a/vcs/clearcase/clearcasemanipulator.h +++ b/vcs/clearcase/clearcasemanipulator.h @@ -12,7 +12,7 @@ #ifndef CLEARCASEMANIPULATOR_H #define CLEARCASEMANIPULATOR_H -#include "tdevversioncontrol.h" +#include "kdevversioncontrol.h" #include diff --git a/vcs/clearcase/clearcasepart.cpp b/vcs/clearcase/clearcasepart.cpp index 338675d5..aeb1eea9 100644 --- a/vcs/clearcase/clearcasepart.cpp +++ b/vcs/clearcase/clearcasepart.cpp @@ -17,33 +17,33 @@ #include #include -#include +#include #include #include #include #include -#include "tdevcore.h" -#include "tdevmakefrontend.h" -#include "tdevdifffrontend.h" -#include "tdevappfrontend.h" +#include "kdevcore.h" +#include "kdevmakefrontend.h" +#include "kdevdifffrontend.h" +#include "kdevappfrontend.h" #include "execcommand.h" #include "domutil.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" -#include "tdevplugininfo.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" +#include "kdevplugininfo.h" #include "clearcasefileinfoprovider.h" #include "clearcasemanipulator.h" -static const TDevPluginInfo data("tdevclearcase"); +static const KDevPluginInfo data("kdevclearcase"); -typedef TDevGenericFactory ClearcaseFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevclearcase, ClearcaseFactory( data ) ) +typedef KDevGenericFactory ClearcaseFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevclearcase, ClearcaseFactory( data ) ) ClearcasePart::ClearcasePart( TQObject *parent, const char *name, const TQStringList & ) - : TDevVersionControl( &data, parent, name ? name : "ClearcasePart" ), + : KDevVersionControl( &data, parent, name ? name : "ClearcasePart" ), default_checkin(""), default_checkout(""), default_uncheckout("-rm"), @@ -144,7 +144,7 @@ void ClearcasePart::slotCheckin() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); } @@ -176,7 +176,7 @@ void ClearcasePart::slotCheckout() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); emit finishedFetching(dir); @@ -199,7 +199,7 @@ void ClearcasePart::slotUncheckout() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); emit finishedFetching(dir); @@ -228,7 +228,7 @@ void ClearcasePart::slotCreate() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); emit finishedFetching(dir); @@ -255,7 +255,7 @@ void ClearcasePart::slotRemove() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); emit finishedFetching(dir); @@ -279,7 +279,7 @@ void ClearcasePart::slotListHistory() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); } @@ -333,7 +333,7 @@ void ClearcasePart::slotDiffFinished( const TQString& diff, const TQString& err return; } - if (TDevDiffFrontend *diffFrontend = extension("TDevelop/DiffFrontend")) + if (KDevDiffFrontend *diffFrontend = extension("TDevelop/DiffFrontend")) diffFrontend->showDiff( diff ); } @@ -354,7 +354,7 @@ void ClearcasePart::slotListCheckouts() command += " && cleartool lsco "; command += DomUtil::readEntry(dom, "/kdevclearcase/lscheckout_options", default_lscheckout); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); } diff --git a/vcs/clearcase/clearcasepart.h b/vcs/clearcase/clearcasepart.h index 52129141..be63e674 100644 --- a/vcs/clearcase/clearcasepart.h +++ b/vcs/clearcase/clearcasepart.h @@ -12,12 +12,12 @@ #ifndef _CLEARCASEPART_H_ #define _CLEARCASEPART_H_ -#include +#include class Context; class TQPopupMenu; -class ClearcasePart : public TDevVersionControl { +class ClearcasePart : public KDevVersionControl { Q_OBJECT @@ -36,7 +36,7 @@ public: virtual void createNewProject(const TQString& dir) {} virtual bool fetchFromRepository() { return true; } - virtual TDevVCSFileInfoProvider *fileInfoProvider() const { return fileInfoProvider_; } + virtual KDevVCSFileInfoProvider *fileInfoProvider() const { return fileInfoProvider_; } virtual bool isValidDirectory(const TQString &dirPath) const; private slots: @@ -60,7 +60,7 @@ private: TQString popupfile_; TQString viewname; - TDevVCSFileInfoProvider *fileInfoProvider_; + KDevVCSFileInfoProvider *fileInfoProvider_; }; #endif diff --git a/vcs/clearcase/integrator/CMakeLists.txt b/vcs/clearcase/integrator/CMakeLists.txt index bd527272..ccc3348f 100644 --- a/vcs/clearcase/integrator/CMakeLists.txt +++ b/vcs/clearcase/integrator/CMakeLists.txt @@ -26,7 +26,7 @@ link_directories( ##### other data ################################ -install( FILES tdevclearcaseintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevclearcaseintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) ##### libclearcaseintegrator (module) ########### @@ -35,6 +35,6 @@ tde_add_kpart( libclearcaseintegrator AUTOMOC SOURCES clearcaseintegrator.cpp ccintegratordlgbase.ui ccintegratordlg.cpp - LINK tdevextras-shared tdevelop-shared + LINK kdevextras-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/clearcase/integrator/Makefile.am b/vcs/clearcase/integrator/Makefile.am index 98e39465..a9d50a98 100644 --- a/vcs/clearcase/integrator/Makefile.am +++ b/vcs/clearcase/integrator/Makefile.am @@ -5,9 +5,9 @@ METASOURCES = AUTO kde_module_LTLIBRARIES = libclearcaseintegrator.la libclearcaseintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries) libclearcaseintegrator_la_LIBADD =\ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la\ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la\ $(top_builddir)/lib/libtdevelop.la -kde_services_DATA = tdevclearcaseintegrator.desktop +kde_services_DATA = kdevclearcaseintegrator.desktop noinst_HEADERS = clearcaseintegrator.h ccintegratordlg.h libclearcaseintegrator_la_SOURCES = clearcaseintegrator.cpp \ ccintegratordlgbase.ui ccintegratordlg.cpp diff --git a/vcs/clearcase/integrator/ccintegratordlg.h b/vcs/clearcase/integrator/ccintegratordlg.h index 2eb1e2e3..f427b2b3 100644 --- a/vcs/clearcase/integrator/ccintegratordlg.h +++ b/vcs/clearcase/integrator/ccintegratordlg.h @@ -21,7 +21,7 @@ #define CCINTEGRATORDLG_H #include "ccintegratordlgbase.h" -#include +#include class CCIntegratorDlg: public CCIntegratorDlgBase, public VCSDialog { Q_OBJECT diff --git a/vcs/clearcase/integrator/clearcaseintegrator.cpp b/vcs/clearcase/integrator/clearcaseintegrator.cpp index f00783b4..4e8c1a0b 100644 --- a/vcs/clearcase/integrator/clearcaseintegrator.cpp +++ b/vcs/clearcase/integrator/clearcaseintegrator.cpp @@ -19,19 +19,19 @@ ***************************************************************************/ #include "clearcaseintegrator.h" -#include -#include +#include +#include #include "ccintegratordlg.h" -static const TDevPluginInfo data("tdevclearcaseintegrator"); -typedef TDevGenericFactory ClearcaseIntegratorFactory; +static const KDevPluginInfo data("kdevclearcaseintegrator"); +typedef KDevGenericFactory ClearcaseIntegratorFactory; K_EXPORT_COMPONENT_FACTORY( libclearcaseintegrator, ClearcaseIntegratorFactory(data) ) ClearcaseIntegrator::ClearcaseIntegrator(TQObject* parent, const char* name, const TQStringList // args ) - :TDevVCSIntegrator(parent, name) + :KDevVCSIntegrator(parent, name) { } diff --git a/vcs/clearcase/integrator/clearcaseintegrator.h b/vcs/clearcase/integrator/clearcaseintegrator.h index 4e431da6..3859c1f9 100644 --- a/vcs/clearcase/integrator/clearcaseintegrator.h +++ b/vcs/clearcase/integrator/clearcaseintegrator.h @@ -20,11 +20,11 @@ #ifndef CLEARCASEINTEGRATOR_H #define CLEARCASEINTEGRATOR_H -#include +#include #include -class ClearcaseIntegrator : public TDevVCSIntegrator +class ClearcaseIntegrator : public KDevVCSIntegrator { Q_OBJECT diff --git a/vcs/clearcase/integrator/kdevclearcaseintegrator.desktop b/vcs/clearcase/integrator/kdevclearcaseintegrator.desktop new file mode 100644 index 00000000..4bc49cfc --- /dev/null +++ b/vcs/clearcase/integrator/kdevclearcaseintegrator.desktop @@ -0,0 +1,44 @@ +[Desktop Entry] +Type=Service +Name=KDevClearcaseIntegrator +Name[da]=TDevelop Clearcase-integration +Name[nds]=TDevelop-Clearcase-Integreren +Name[sk]=KDev ClearCase integrácia +Name[sv]=TDevelop Clearcase-integration +Name[zh_TW]=TDevelop Clearcase 整合器 +Comment=Clearcase Project Integration Facility +Comment[ca]=Faciliat per a la integració amb projectes Clearcase +Comment[da]=Clearcase projektintegration +Comment[de]=Clearcase-Integration +Comment[el]=Λειτουργία ενσωμάτωσης Clearcase στο έργο +Comment[es]=Facilidad para integración con proyectos Clearcase +Comment[et]=Clearcase projekti põimimisvahend +Comment[eu]=Clearcase proiektu-integraziorako tresna +Comment[fa]=تسهیلات مجتمع‌سازی پروژۀ Clearcase +Comment[fr]=Fonction d'intégration pour un projet utilisant Clearcase +Comment[gl]=Utilidade para a integración de proxectos ClearCase +Comment[hu]=Integrálás Clearcase-projektekkel +Comment[it]=Funzione di integrazione del progetto ClearCase +Comment[ja]=Clearcase プロジェクト統合ツール +Comment[ms]=Kemudahan Integrasi Projek Clearcase +Comment[nds]=Projektintegreren för Clearcase +Comment[ne]=क्लेयरकेस परियोजना एकिकरण सुविधा +Comment[nl]=Clearcase-projectintegratie +Comment[pl]=Integracja z Clearcase +Comment[pt]=Integração com Projectos Clearcase +Comment[pt_BR]=Facilidade de Integração ao Projeto de Clearcase +Comment[ru]=Интеграция Clearcase +Comment[sk]=Integrácia ClearCase projektu +Comment[sr]=Интеграција Clearcase-а у пројекат +Comment[sr@Latn]=Integracija Clearcase-a u projekat +Comment[sv]=Funktion för integrering av Clearcase i projekt +Comment[tr]=Clearcase Proje Bütünleştirilmesi Aracı +Comment[zh_CN]=Clearcase 工程集成功能 +Comment[zh_TW]=Clearcase 專案整合工具 +Exec=blubb +ServiceTypes=TDevelop/VCSIntegrator +X-TDE-Library=libclearcaseintegrator +X-TDevelop-Default=false +X-TDevelop-VCS=ClearCase +X-TDevelop-VCSPlugin=kdevclearcase +X-TDevelop-Version=5 diff --git a/vcs/clearcase/integrator/tdevclearcaseintegrator.desktop b/vcs/clearcase/integrator/tdevclearcaseintegrator.desktop deleted file mode 100644 index 4bc49cfc..00000000 --- a/vcs/clearcase/integrator/tdevclearcaseintegrator.desktop +++ /dev/null @@ -1,44 +0,0 @@ -[Desktop Entry] -Type=Service -Name=KDevClearcaseIntegrator -Name[da]=TDevelop Clearcase-integration -Name[nds]=TDevelop-Clearcase-Integreren -Name[sk]=KDev ClearCase integrácia -Name[sv]=TDevelop Clearcase-integration -Name[zh_TW]=TDevelop Clearcase 整合器 -Comment=Clearcase Project Integration Facility -Comment[ca]=Faciliat per a la integració amb projectes Clearcase -Comment[da]=Clearcase projektintegration -Comment[de]=Clearcase-Integration -Comment[el]=Λειτουργία ενσωμάτωσης Clearcase στο έργο -Comment[es]=Facilidad para integración con proyectos Clearcase -Comment[et]=Clearcase projekti põimimisvahend -Comment[eu]=Clearcase proiektu-integraziorako tresna -Comment[fa]=تسهیلات مجتمع‌سازی پروژۀ Clearcase -Comment[fr]=Fonction d'intégration pour un projet utilisant Clearcase -Comment[gl]=Utilidade para a integración de proxectos ClearCase -Comment[hu]=Integrálás Clearcase-projektekkel -Comment[it]=Funzione di integrazione del progetto ClearCase -Comment[ja]=Clearcase プロジェクト統合ツール -Comment[ms]=Kemudahan Integrasi Projek Clearcase -Comment[nds]=Projektintegreren för Clearcase -Comment[ne]=क्लेयरकेस परियोजना एकिकरण सुविधा -Comment[nl]=Clearcase-projectintegratie -Comment[pl]=Integracja z Clearcase -Comment[pt]=Integração com Projectos Clearcase -Comment[pt_BR]=Facilidade de Integração ao Projeto de Clearcase -Comment[ru]=Интеграция Clearcase -Comment[sk]=Integrácia ClearCase projektu -Comment[sr]=Интеграција Clearcase-а у пројекат -Comment[sr@Latn]=Integracija Clearcase-a u projekat -Comment[sv]=Funktion för integrering av Clearcase i projekt -Comment[tr]=Clearcase Proje Bütünleştirilmesi Aracı -Comment[zh_CN]=Clearcase 工程集成功能 -Comment[zh_TW]=Clearcase 專案整合工具 -Exec=blubb -ServiceTypes=TDevelop/VCSIntegrator -X-TDE-Library=libclearcaseintegrator -X-TDevelop-Default=false -X-TDevelop-VCS=ClearCase -X-TDevelop-VCSPlugin=kdevclearcase -X-TDevelop-Version=5 diff --git a/vcs/clearcase/kdevclearcase.desktop b/vcs/clearcase/kdevclearcase.desktop new file mode 100644 index 00000000..9b3df9df --- /dev/null +++ b/vcs/clearcase/kdevclearcase.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=A plugin that provides support for Rational ClearCase, a large version control and build management system. http://www.rational.com/products/clearcase/index.jsp +Comment[ca]=Un connector que proporciona suport per a ClearCase de Rational, un potent sistema de control de versions i gestió de compilacions. http://www.rational.com/products/clearcase/index.jsp +Comment[da]=Et plugin der sørger for støtte for Rational ClearCase, et stort versionskontrol og byggehåndteringssystem. http://www.rational.com/products/clearcase/index.jsp +Comment[de]=Eine Komponente, die eine Schnittstelle zu Rational ClearCase zur Verfügung stellt, einem umfangreichen Werkzeug zur Verwaltung von Versionen und Erstellungsvorgängen. http://www.rational.com/products/clearcase/index.jsp +Comment[el]=Ένα πρόσθετο που προσφέρει υποστήριξη για το Rational ClearCase, ένα μεγάλο σύστημα διαχείρισης ελέγχου εκδόσεων και κατασκευής. http://www.rational.com/products/clearcase/index.jsp +Comment[es]=Un complemento que proporciona soporte para Rational ClearCase, un potente sistema de control de versiones y administración de compilaciones (http://www.rational.com/products/clearcase/index.jsp) +Comment[et]=See plugin pakub suure versioonikontrolli ja ehitamise haldamise süsteemi Rational ClearCase toetust. http://www.rational.com/products/clearcase/index.jsp +Comment[eu]=Rational ClearCase euskarri plugin bat. ClearCase bertsio kontrol eta eraikuntza kudeaketa sistema handi bat da. http://www.rational.com/products/clearcase/index.jsp +Comment[fa]=وصله‌ای که پشتیبانی برای Rational ClearCase، یک کنترل نسخۀ بزرگ و سیستم مدیریت ساختن فراهم ‌می‌کند. http://www.rational.com/products/clearcase/index.jsp +Comment[fr]=Un module externe qui offre une prise en charge pour Rational ClearCase, un puissant système de contrôle de versions et de gestion de compilation. http://www.rational.com/products/clearcase/index.jsp +Comment[gl]=Extensión que proporciona soporte para Rational ClearCase, un gran sistema de control de versións e xestión da compilación. http://www.rational.com/products/clearcase/index.jsp +Comment[hu]=Bővítőmodul a Rational ClearCase komplex verziókövető rendszerhez. http://www.rational.com/products/clearcase/index.jsp +Comment[it]=Un plugin che offre il supporto per Rational ClearCase, un sistema molto vasto per il controllo di versione e la compilazione. http://www.rational.com/products/clearcase/index.jsp +Comment[ja]=大規模なバージョンコントロールやビルド管理システムの合理的な ClearCase の支援を提供するプラグイン。http://www.rational.com/products/clearcase/index.jsp +Comment[ms]=Plugin yang menyediakan sokongan untuk Rational ClearCase, sistem kawalan versi dan pengurus pembinaan yang besar. http://www.rational.com/products/clearcase/index.jsp +Comment[nds]=En Moduul, dat Ünnerstütten för "Rational ClearCase" praatstellt, en groot Verschoonkuntrull- un Opstellen-Pleegsysteem. http://www.rational.com/products/clearcase/index.jsp +Comment[ne]=एउटा प्लगइन जसले र्यासनल क्लेयरकेस, एउटा ठूलो संस्करण नियन्त्रण र निर्माण व्यवस्थापन प्रणालीका लागि समर्थन प्रदान गर्दछ । http://www.rational.com/products/clearcase/index.jsp +Comment[nl]=Een plugin die ondersteuning biedt voor Rational ClearCase, een omvangrijk versiebeheer en buildmanagement-systeem. Zie http://www.rational.com/products/clearcase/index.jsp +Comment[pl]=Wtyczka udostępniająca obsługę Rational ClearCase, dużego systemu kontroli wersji i zarządzania budowaniem. http://www.rational.com/products/clearcase/index.jsp +Comment[pt]=Um 'plugin' que oferece o suporte para o ClearCase da Rational, um sistema grande de controlo de versões e de gestão de compilações. http://www.rational.com/products/clearcase/index.jsp +Comment[pt_BR]=Um plug-in que fornece suporte para o Rational ClearCase, um grande sistema de controle de versão e gerenciamento de compilação. http://www.rational.com/products/clearcase/index.jsp +Comment[ru]=Модуль поддержки Rational ClearCase, мощной системы контроля версий и управления проектом. http://www.rational.com/products/clearcase/index.jsp +Comment[sk]=Modul poskytuje podporu pre Rational ClearCase, riadenie verzií a projektový manažment. +Comment[sl]=Vstavek, ki omogoča podporo za Rational ClearCase, velik sistem za upravljanje z različicami in grajenjem. http://www.rational.com/products/clearcase/index.jsp +Comment[sr]=Прикључак који обезбеђује подршку за Rational-ов ClearCase, велики систем за контролу верзија и управљање градњом. http://www.rational.com/products/clearcase/index.jsp +Comment[sr@Latn]=Priključak koji obezbeđuje podršku za Rational-ov ClearCase, veliki sistem za kontrolu verzija i upravljanje gradnjom. http://www.rational.com/products/clearcase/index.jsp +Comment[sv]=Ett insticksprogram som stöder Rational ClearCase, ett omfattande versions- och bygghanteringssystem. http://www.rational.com/products/clearcase/index.jsp +Comment[ta]=சொருகி ரெஷியனல் தெளிவான எழுத்தை ஆதரிக்கும்,கடைசி பதிப்பை இயக்க மற்றும் மேலாளர் அமைப்பை கட்ட.http://www.rational.com/products/clearcase/index.jsp +Comment[tg]=Модули тарафдори Rational ClearCase, барномаи назораткунандаи калони тафсир ва идоракунии лоиҳаҳо мебошад.http://www.rational.com/products/clearcase/index.jsp +Comment[tr]=Mantıksal ClearCase, büyük bir kontrol ve yapım yönetim sistemi, için destek sağlayan bir eklenti. http://www.rational.com/products/clearcase/index.jsp +Comment[zh_CN]=提供 Rational ClearCase 支持,一个大型的版本控制和编译管理系统。http://www.rational.com/products/clearcase/index.jsp +Comment[zh_TW]=提供支援 Rational ClearCase,大型的版本控制與建立管理系統的外掛程式。http://www.rational.com/products/clearcase/index.jsp +Name=KDevClearCase +Name[da]=TDevelop ClearCase +Name[de]=Unterstützung für ClearCase (TDevelop) +Name[hi]=के-डेव-क्लीयर-केस +Name[nds]=ClearCase-Ünnerstütten för TDevelop +Name[sk]=KDev ClearCase +Name[sv]=TDevelop ClearCase +Name[ta]=KDevதெளிவானஎழுத்து +Name[zh_TW]=TDevelop ClearCase +GenericName=ClearCase Integration +GenericName[ca]=Integració amb ClearClase +GenericName[da]=ClearCase integration +GenericName[de]=ClearCase-Integration +GenericName[el]=Ενσωμάτωση ClearCase +GenericName[es]=Integración con ClearClase +GenericName[et]=ClearCase'i integratsioon +GenericName[eu]=ClearCase integrazioa +GenericName[fa]=مجتمع‌سازی ClearCase +GenericName[fr]=Intégration de « ClearCase » +GenericName[ga]=Comhtháthú ClearCase +GenericName[gl]=Integración de ClearCase +GenericName[hi]=क्लीयर-केस इंटीग्रेशन +GenericName[hu]=ClearCase-integráció +GenericName[it]=Integrazione di ClearCase +GenericName[ja]=ClearCase 統合 +GenericName[ms]=Intergrasi ClearCase +GenericName[nds]=ClearCase-Integreren +GenericName[ne]=क्लेयरकेस एकिकरण +GenericName[nl]=ClearCase-integratie +GenericName[pl]=Integracja z ClearCase +GenericName[pt]=Integração com o ClearCase +GenericName[pt_BR]=Integração com o ClearCase +GenericName[ru]=Интеграция ClearCase +GenericName[sk]=Integrácia ClearCase +GenericName[sl]=Integracija ClearCase +GenericName[sr]=Интеграција ClearCase-а +GenericName[sr@Latn]=Integracija ClearCase-a +GenericName[sv]=Integrering av ClearCase +GenericName[ta]=தெளிவான எழுத்து ஒருங்கிணைப்பு +GenericName[tg]=Интегратсияи ClearCase +GenericName[tr]=ClearCase Bütünleştirmesi +GenericName[zh_CN]=ClearCase集成 +GenericName[zh_TW]=ClearCase 整合 +ServiceTypes=TDevelop/VersionControl +X-TDE-Library=libkdevclearcase +X-TDevelop-Version=5 +X-TDevelop-Properties=VCS,ClearcaseVCS diff --git a/vcs/clearcase/tdevclearcase.desktop b/vcs/clearcase/tdevclearcase.desktop deleted file mode 100644 index 687e5c67..00000000 --- a/vcs/clearcase/tdevclearcase.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=A plugin that provides support for Rational ClearCase, a large version control and build management system. http://www.rational.com/products/clearcase/index.jsp -Comment[ca]=Un connector que proporciona suport per a ClearCase de Rational, un potent sistema de control de versions i gestió de compilacions. http://www.rational.com/products/clearcase/index.jsp -Comment[da]=Et plugin der sørger for støtte for Rational ClearCase, et stort versionskontrol og byggehåndteringssystem. http://www.rational.com/products/clearcase/index.jsp -Comment[de]=Eine Komponente, die eine Schnittstelle zu Rational ClearCase zur Verfügung stellt, einem umfangreichen Werkzeug zur Verwaltung von Versionen und Erstellungsvorgängen. http://www.rational.com/products/clearcase/index.jsp -Comment[el]=Ένα πρόσθετο που προσφέρει υποστήριξη για το Rational ClearCase, ένα μεγάλο σύστημα διαχείρισης ελέγχου εκδόσεων και κατασκευής. http://www.rational.com/products/clearcase/index.jsp -Comment[es]=Un complemento que proporciona soporte para Rational ClearCase, un potente sistema de control de versiones y administración de compilaciones (http://www.rational.com/products/clearcase/index.jsp) -Comment[et]=See plugin pakub suure versioonikontrolli ja ehitamise haldamise süsteemi Rational ClearCase toetust. http://www.rational.com/products/clearcase/index.jsp -Comment[eu]=Rational ClearCase euskarri plugin bat. ClearCase bertsio kontrol eta eraikuntza kudeaketa sistema handi bat da. http://www.rational.com/products/clearcase/index.jsp -Comment[fa]=وصله‌ای که پشتیبانی برای Rational ClearCase، یک کنترل نسخۀ بزرگ و سیستم مدیریت ساختن فراهم ‌می‌کند. http://www.rational.com/products/clearcase/index.jsp -Comment[fr]=Un module externe qui offre une prise en charge pour Rational ClearCase, un puissant système de contrôle de versions et de gestion de compilation. http://www.rational.com/products/clearcase/index.jsp -Comment[gl]=Extensión que proporciona soporte para Rational ClearCase, un gran sistema de control de versións e xestión da compilación. http://www.rational.com/products/clearcase/index.jsp -Comment[hu]=Bővítőmodul a Rational ClearCase komplex verziókövető rendszerhez. http://www.rational.com/products/clearcase/index.jsp -Comment[it]=Un plugin che offre il supporto per Rational ClearCase, un sistema molto vasto per il controllo di versione e la compilazione. http://www.rational.com/products/clearcase/index.jsp -Comment[ja]=大規模なバージョンコントロールやビルド管理システムの合理的な ClearCase の支援を提供するプラグイン。http://www.rational.com/products/clearcase/index.jsp -Comment[ms]=Plugin yang menyediakan sokongan untuk Rational ClearCase, sistem kawalan versi dan pengurus pembinaan yang besar. http://www.rational.com/products/clearcase/index.jsp -Comment[nds]=En Moduul, dat Ünnerstütten för "Rational ClearCase" praatstellt, en groot Verschoonkuntrull- un Opstellen-Pleegsysteem. http://www.rational.com/products/clearcase/index.jsp -Comment[ne]=एउटा प्लगइन जसले र्यासनल क्लेयरकेस, एउटा ठूलो संस्करण नियन्त्रण र निर्माण व्यवस्थापन प्रणालीका लागि समर्थन प्रदान गर्दछ । http://www.rational.com/products/clearcase/index.jsp -Comment[nl]=Een plugin die ondersteuning biedt voor Rational ClearCase, een omvangrijk versiebeheer en buildmanagement-systeem. Zie http://www.rational.com/products/clearcase/index.jsp -Comment[pl]=Wtyczka udostępniająca obsługę Rational ClearCase, dużego systemu kontroli wersji i zarządzania budowaniem. http://www.rational.com/products/clearcase/index.jsp -Comment[pt]=Um 'plugin' que oferece o suporte para o ClearCase da Rational, um sistema grande de controlo de versões e de gestão de compilações. http://www.rational.com/products/clearcase/index.jsp -Comment[pt_BR]=Um plug-in que fornece suporte para o Rational ClearCase, um grande sistema de controle de versão e gerenciamento de compilação. http://www.rational.com/products/clearcase/index.jsp -Comment[ru]=Модуль поддержки Rational ClearCase, мощной системы контроля версий и управления проектом. http://www.rational.com/products/clearcase/index.jsp -Comment[sk]=Modul poskytuje podporu pre Rational ClearCase, riadenie verzií a projektový manažment. -Comment[sl]=Vstavek, ki omogoča podporo za Rational ClearCase, velik sistem za upravljanje z različicami in grajenjem. http://www.rational.com/products/clearcase/index.jsp -Comment[sr]=Прикључак који обезбеђује подршку за Rational-ов ClearCase, велики систем за контролу верзија и управљање градњом. http://www.rational.com/products/clearcase/index.jsp -Comment[sr@Latn]=Priključak koji obezbeđuje podršku za Rational-ov ClearCase, veliki sistem za kontrolu verzija i upravljanje gradnjom. http://www.rational.com/products/clearcase/index.jsp -Comment[sv]=Ett insticksprogram som stöder Rational ClearCase, ett omfattande versions- och bygghanteringssystem. http://www.rational.com/products/clearcase/index.jsp -Comment[ta]=சொருகி ரெஷியனல் தெளிவான எழுத்தை ஆதரிக்கும்,கடைசி பதிப்பை இயக்க மற்றும் மேலாளர் அமைப்பை கட்ட.http://www.rational.com/products/clearcase/index.jsp -Comment[tg]=Модули тарафдори Rational ClearCase, барномаи назораткунандаи калони тафсир ва идоракунии лоиҳаҳо мебошад.http://www.rational.com/products/clearcase/index.jsp -Comment[tr]=Mantıksal ClearCase, büyük bir kontrol ve yapım yönetim sistemi, için destek sağlayan bir eklenti. http://www.rational.com/products/clearcase/index.jsp -Comment[zh_CN]=提供 Rational ClearCase 支持,一个大型的版本控制和编译管理系统。http://www.rational.com/products/clearcase/index.jsp -Comment[zh_TW]=提供支援 Rational ClearCase,大型的版本控制與建立管理系統的外掛程式。http://www.rational.com/products/clearcase/index.jsp -Name=KDevClearCase -Name[da]=TDevelop ClearCase -Name[de]=Unterstützung für ClearCase (TDevelop) -Name[hi]=के-डेव-क्लीयर-केस -Name[nds]=ClearCase-Ünnerstütten för TDevelop -Name[sk]=KDev ClearCase -Name[sv]=TDevelop ClearCase -Name[ta]=KDevதெளிவானஎழுத்து -Name[zh_TW]=TDevelop ClearCase -GenericName=ClearCase Integration -GenericName[ca]=Integració amb ClearClase -GenericName[da]=ClearCase integration -GenericName[de]=ClearCase-Integration -GenericName[el]=Ενσωμάτωση ClearCase -GenericName[es]=Integración con ClearClase -GenericName[et]=ClearCase'i integratsioon -GenericName[eu]=ClearCase integrazioa -GenericName[fa]=مجتمع‌سازی ClearCase -GenericName[fr]=Intégration de « ClearCase » -GenericName[ga]=Comhtháthú ClearCase -GenericName[gl]=Integración de ClearCase -GenericName[hi]=क्लीयर-केस इंटीग्रेशन -GenericName[hu]=ClearCase-integráció -GenericName[it]=Integrazione di ClearCase -GenericName[ja]=ClearCase 統合 -GenericName[ms]=Intergrasi ClearCase -GenericName[nds]=ClearCase-Integreren -GenericName[ne]=क्लेयरकेस एकिकरण -GenericName[nl]=ClearCase-integratie -GenericName[pl]=Integracja z ClearCase -GenericName[pt]=Integração com o ClearCase -GenericName[pt_BR]=Integração com o ClearCase -GenericName[ru]=Интеграция ClearCase -GenericName[sk]=Integrácia ClearCase -GenericName[sl]=Integracija ClearCase -GenericName[sr]=Интеграција ClearCase-а -GenericName[sr@Latn]=Integracija ClearCase-a -GenericName[sv]=Integrering av ClearCase -GenericName[ta]=தெளிவான எழுத்து ஒருங்கிணைப்பு -GenericName[tg]=Интегратсияи ClearCase -GenericName[tr]=ClearCase Bütünleştirmesi -GenericName[zh_CN]=ClearCase集成 -GenericName[zh_TW]=ClearCase 整合 -ServiceTypes=TDevelop/VersionControl -X-TDE-Library=libtdevclearcase -X-TDevelop-Version=5 -X-TDevelop-Properties=VCS,ClearcaseVCS diff --git a/vcs/cvsservice/CMakeLists.txt b/vcs/cvsservice/CMakeLists.txt index c8cd2b35..dc50d646 100644 --- a/vcs/cvsservice/CMakeLists.txt +++ b/vcs/cvsservice/CMakeLists.txt @@ -30,14 +30,14 @@ link_directories( ##### other data ################################ tde_install_icons( ) -install( FILES tdevcvsservice.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdev_cvs.png DESTINATION ${DATA_INSTALL_DIR}/tdevcvsservice/pics ) -install( FILES buildcvs.sh DESTINATION ${DATA_INSTALL_DIR}/tdevcvsservice ) +install( FILES kdevcvsservice.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdev_cvs.png DESTINATION ${DATA_INSTALL_DIR}/kdevcvsservice/pics ) +install( FILES buildcvs.sh DESTINATION ${DATA_INSTALL_DIR}/kdevcvsservice ) -##### libtdevcvsservice (module) ################ +##### libkdevcvsservice (module) ################ -tde_add_kpart( libtdevcvsservice AUTOMOC +tde_add_kpart( libkdevcvsservice AUTOMOC SOURCES cvspart.cpp cvspartimpl.cpp cvsformbase.ui cvsform.cpp commitdialogbase.ui commitdlg.cpp cvsoptionswidgetbase.ui @@ -52,7 +52,7 @@ tde_add_kpart( libtdevcvsservice AUTOMOC editorsdialogbase.ui editorsdialog.cpp annotatedialog.cpp annotatepage.cpp annotateview.cpp LINK - tdevextensions-static tdevwidgets-shared tdevelop-shared + kdevextensions-static kdevwidgets-shared tdevelop-shared cvsservice tdehtml-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/cvsservice/Makefile.am b/vcs/cvsservice/Makefile.am index 3ce9dc40..63560056 100644 --- a/vcs/cvsservice/Makefile.am +++ b/vcs/cvsservice/Makefile.am @@ -3,12 +3,12 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets $(all_includes) -I$(kde_includes)/tde -kde_module_LTLIBRARIES = libtdevcvsservice.la -libtdevcvsservice_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevcvsservice_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) -lcvsservice $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la +kde_module_LTLIBRARIES = libkdevcvsservice.la +libkdevcvsservice_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevcvsservice_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) -lcvsservice $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la -libtdevcvsservice_la_SOURCES = cvspart.cpp cvspartimpl.cpp cvsformbase.ui \ +libkdevcvsservice_la_SOURCES = cvspart.cpp cvspartimpl.cpp cvsformbase.ui \ cvsform.cpp commitdialogbase.ui commitdlg.cpp cvsoptionswidgetbase.ui \ cvsoptionswidget.cpp cvsprocesswidget.cpp cvsentry.cpp cvsdir.cpp changelog.cpp \ cvsoptions.cpp checkoutdialogbase.ui checkoutdialog.cpp tagdialog.cpp tagdialogbase.ui \ @@ -29,12 +29,12 @@ METASOURCES = AUTO ICONS = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevcvsservice.desktop +service_DATA = kdevcvsservice.desktop -servicepicsdir = $(kde_datadir)/tdevcvsservice/pics -servicepics_DATA = tdev_cvs.png +servicepicsdir = $(kde_datadir)/kdevcvsservice/pics +servicepics_DATA = kdev_cvs.png -rcdir = $(kde_datadir)/tdevcvsservice +rcdir = $(kde_datadir)/kdevcvsservice rc_DATA = buildcvs.sh SUBDIRS = integrator diff --git a/vcs/cvsservice/README.dox b/vcs/cvsservice/README.dox index bb6dfd60..1ff0b528 100644 --- a/vcs/cvsservice/README.dox +++ b/vcs/cvsservice/README.dox @@ -37,7 +37,7 @@ Implementation of this component is done by: one wants to perform: exception to this are the cvslog* classes which do start cvs jobs independently archiving parallelism with the CvsProcesssWidget. - CVSDir and CVSEntry provide abstraction for accessing to local CVS information - - CVSFileInfoProvider is an implementation of TDevVCSFileInfoProvider interface + - CVSFileInfoProvider is an implementation of KDevVCSFileInfoProvider interface and collects data about files stats: for CVS, both synch (fetch data from local sandbox) and asynch (fetch from repository server) are working with some minor bugs in the parsing of 'cvs status' output for the latter. (Sync means that information are collected diff --git a/vcs/cvsservice/bufferedstringreader.h b/vcs/cvsservice/bufferedstringreader.h index 05ce6ad6..c7548b59 100644 --- a/vcs/cvsservice/bufferedstringreader.h +++ b/vcs/cvsservice/bufferedstringreader.h @@ -16,7 +16,7 @@ class CvsServicePart; class TDEConfig; -class TDevProject; +class KDevProject; /* This class helps when we have to collect a string list from a text * stream, just as many cvs commands do. The problem is that the these commands diff --git a/vcs/cvsservice/cvsentry.h b/vcs/cvsservice/cvsentry.h index d4e51de8..9a2e4d6d 100644 --- a/vcs/cvsservice/cvsentry.h +++ b/vcs/cvsservice/cvsentry.h @@ -15,7 +15,7 @@ #include #include -#include +#include class CVSDir; diff --git a/vcs/cvsservice/cvsfileinfoprovider.cpp b/vcs/cvsservice/cvsfileinfoprovider.cpp index 2e0c960a..cbfc726f 100644 --- a/vcs/cvsservice/cvsfileinfoprovider.cpp +++ b/vcs/cvsservice/cvsfileinfoprovider.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include @@ -32,7 +32,7 @@ /////////////////////////////////////////////////////////////////////////////// CVSFileInfoProvider::CVSFileInfoProvider( CvsServicePart *parent, CvsService_stub *cvsService ) - : TDevVCSFileInfoProvider( parent, "cvsfileinfoprovider" ), + : KDevVCSFileInfoProvider( parent, "cvsfileinfoprovider" ), m_requestStatusJob( 0 ), m_cvsService( cvsService ), m_cachedDirEntries( 0 ) { connect( this, TQT_SIGNAL(needStatusUpdate(const CVSDir&)), this, TQT_SLOT(updateStatusFor(const CVSDir&))); diff --git a/vcs/cvsservice/cvsfileinfoprovider.h b/vcs/cvsservice/cvsfileinfoprovider.h index 09b7b9b8..8bc3a6fe 100644 --- a/vcs/cvsservice/cvsfileinfoprovider.h +++ b/vcs/cvsservice/cvsfileinfoprovider.h @@ -14,7 +14,7 @@ #include -#include +#include #include "cvsservicedcopIface.h" #include "cvsdir.h" #include "bufferedstringreader.h" @@ -28,7 +28,7 @@ Provider for CVS file information @author Mario Scalas */ -class CVSFileInfoProvider : public TDevVCSFileInfoProvider, virtual public CVSServiceDCOPIface +class CVSFileInfoProvider : public KDevVCSFileInfoProvider, virtual public CVSServiceDCOPIface { Q_OBJECT diff --git a/vcs/cvsservice/cvsoptions.cpp b/vcs/cvsservice/cvsoptions.cpp index 6511a38f..2cdf5c92 100644 --- a/vcs/cvsservice/cvsoptions.cpp +++ b/vcs/cvsservice/cvsoptions.cpp @@ -17,7 +17,7 @@ #include #include "domutil.h" -#include "tdevproject.h" +#include "kdevproject.h" #include "cvsoptions.h" /////////////////////////////////////////////////////////////////////////////// @@ -80,9 +80,9 @@ CvsOptions* CvsOptions::instance() /////////////////////////////////////////////////////////////////////////////// -void CvsOptions::save( TDevProject *project ) +void CvsOptions::save( KDevProject *project ) { - kdDebug( 9006 ) << " **** CvsOptions::save( TDevProject* ) here" << endl; + kdDebug( 9006 ) << " **** CvsOptions::save( KDevProject* ) here" << endl; Q_ASSERT( project ); TQDomDocument &dom = *project->projectDom(); @@ -105,9 +105,9 @@ void CvsOptions::save( TDevProject *project ) /////////////////////////////////////////////////////////////////////////////// -void CvsOptions::load( TDevProject *project ) +void CvsOptions::load( KDevProject *project ) { - kdDebug( 9006 ) << " **** CvsOptions::load( TDevProject* ) here" << endl; + kdDebug( 9006 ) << " **** CvsOptions::load( KDevProject* ) here" << endl; Q_ASSERT( project ); TQDomDocument &dom = *project->projectDom(); diff --git a/vcs/cvsservice/cvsoptions.h b/vcs/cvsservice/cvsoptions.h index f54e6273..c4daf301 100644 --- a/vcs/cvsservice/cvsoptions.h +++ b/vcs/cvsservice/cvsoptions.h @@ -17,7 +17,7 @@ class CvsServicePart; class TDEConfig; -class TDevProject; +class KDevProject; /* This class represents the command line options for the used cvs commands. * It uses the singleton pattern. @@ -32,9 +32,9 @@ public: virtual ~CvsOptions(); - void save( TDevProject *project ); + void save( KDevProject *project ); /// \FIXME parameter should be const!! - void load( TDevProject *project ); + void load( KDevProject *project ); void setRecursiveWhenCommitRemove( bool b ); bool recursiveWhenCommitRemove() const; diff --git a/vcs/cvsservice/cvspart.cpp b/vcs/cvsservice/cvspart.cpp index 276a4d15..2bda55f1 100644 --- a/vcs/cvsservice/cvspart.cpp +++ b/vcs/cvsservice/cvspart.cpp @@ -37,17 +37,17 @@ #include #include -#include -#include - -#include "tdevcore.h" -#include "tdevmakefrontend.h" -#include "tdevdifffrontend.h" -#include "tdevappfrontend.h" -#include "tdevplugininfo.h" +#include +#include + +#include "kdevcore.h" +#include "kdevmakefrontend.h" +#include "kdevdifffrontend.h" +#include "kdevappfrontend.h" +#include "kdevplugininfo.h" #include "domutil.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" #include "urlutil.h" #include "cvsform.h" @@ -72,16 +72,16 @@ bool g_projectWasJustCreated = false; // Plugin factory /////////////////////////////////////////////////////////////////////////////// -static const TDevPluginInfo data("tdevcvsservice"); -typedef TDevGenericFactory CvsFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevcvsservice, CvsFactory( data ) ) +static const KDevPluginInfo data("kdevcvsservice"); +typedef KDevGenericFactory CvsFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevcvsservice, CvsFactory( data ) ) /////////////////////////////////////////////////////////////////////////////// // class CvsServicePart /////////////////////////////////////////////////////////////////////////////// CvsServicePart::CvsServicePart( TQObject *parent, const char *name, const TQStringList & ) - : TDevVersionControl( &data, parent, + : KDevVersionControl( &data, parent, name ? name : "CvsService" ), actionCommit( 0 ), actionDiff( 0 ), actionLog( 0 ), actionAnnotate(0), actionAdd( 0 ), actionAddBinary( 0 ), actionRemove( 0 ), actionUpdate( 0 ), @@ -126,10 +126,10 @@ void CvsServicePart::init() this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) ); - m_impl->m_widget->setIcon( UserIcon( "tdev_cvs", TDEIcon::DefaultState, CvsFactory::instance()) ); + m_impl->m_widget->setIcon( UserIcon( "kdev_cvs", TDEIcon::DefaultState, CvsFactory::instance()) ); TQWhatsThis::add( m_impl->processWidget(), i18n("CVS

    Concurrent Versions System operations window. Shows output of Cervisia CVS Service.") ); m_impl->processWidget()->setCaption(i18n("CvsService Output")); mainWindow()->embedOutputView( m_impl->processWidget(), i18n("CvsService"), i18n("cvs output") ); @@ -243,7 +243,7 @@ bool CvsServicePart::fetchFromRepository() /////////////////////////////////////////////////////////////////////////////// -TDevVCSFileInfoProvider *CvsServicePart::fileInfoProvider() const +KDevVCSFileInfoProvider *CvsServicePart::fileInfoProvider() const { return m_impl->fileInfoProvider(); } @@ -704,7 +704,7 @@ void CvsServicePart::slotRemoveFromIgnoreList() /////////////////////////////////////////////////////////////////////////////// -void CvsServicePart::slotStopButtonClicked( TDevPlugin* which ) +void CvsServicePart::slotStopButtonClicked( KDevPlugin* which ) { if ( which != 0 && which != this ) return; diff --git a/vcs/cvsservice/cvspart.h b/vcs/cvsservice/cvspart.h index 61015fda..e2df8ce0 100644 --- a/vcs/cvsservice/cvspart.h +++ b/vcs/cvsservice/cvspart.h @@ -17,7 +17,7 @@ #include #include #include -#include "tdevversioncontrol.h" +#include "kdevversioncontrol.h" class Context; class TQPopupMenu; @@ -34,7 +34,7 @@ class CvsService_stub; class Repository_stub; class CvsServicePartImpl; -class CvsServicePart : public TDevVersionControl +class CvsServicePart : public KDevVersionControl { Q_OBJECT @@ -63,7 +63,7 @@ public: /** * @return the info provider for VCS sandboxes */ - virtual TDevVCSFileInfoProvider *fileInfoProvider() const; + virtual KDevVCSFileInfoProvider *fileInfoProvider() const; /** * @param dirPath absolute path of the directory * @return true if the the directory is a valid CVS sandbox @@ -129,7 +129,7 @@ private slots: void projectConfigWidget( KDialogBase *dlg ); //! Called when the user wishes to stop an operation. - void slotStopButtonClicked( TDevPlugin* ); + void slotStopButtonClicked( KDevPlugin* ); private slots: void init(); diff --git a/vcs/cvsservice/cvspartimpl.cpp b/vcs/cvsservice/cvspartimpl.cpp index 112ea997..01c85df3 100644 --- a/vcs/cvsservice/cvspartimpl.cpp +++ b/vcs/cvsservice/cvspartimpl.cpp @@ -29,12 +29,12 @@ #include // KDevelop SDK stuff #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // Part's widgets #include "cvsprocesswidget.h" #include "checkoutdialog.h" @@ -309,7 +309,7 @@ CvsProcessWidget *CvsServicePartImpl::processWidget() const /////////////////////////////////////////////////////////////////////////////// -TDevMainWindow *CvsServicePartImpl::mainWindow() const +KDevMainWindow *CvsServicePartImpl::mainWindow() const { return m_part->mainWindow(); } @@ -323,16 +323,16 @@ TQString CvsServicePartImpl::projectDirectory() const /////////////////////////////////////////////////////////////////////////////// -TDevCore *CvsServicePartImpl::core() const +KDevCore *CvsServicePartImpl::core() const { return m_part->core(); } /////////////////////////////////////////////////////////////////////////////// -TDevDiffFrontend *CvsServicePartImpl::diffFrontend() const +KDevDiffFrontend *CvsServicePartImpl::diffFrontend() const { - return m_part->extension("TDevelop/DiffFrontend"); + return m_part->extension("TDevelop/DiffFrontend"); } /////////////////////////////////////////////////////////////////////////////// @@ -774,7 +774,7 @@ void CvsServicePartImpl::createNewProject( const TQString &dirName, kdDebug( 9006 ) << " ** Will run the following command: " << endl << cmdLine << endl; kdDebug( 9006 ) << " ** on directory: " << dirName << endl; - if (TDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand( dirName, cmdLine ); } @@ -902,7 +902,7 @@ void CvsServicePartImpl::emitFileStateModified( const KURL::List &/*urls*/, VCSF /////////////////////////////////////////////////////////////////////////////// -TDevVCSFileInfoProvider *CvsServicePartImpl::fileInfoProvider() const +KDevVCSFileInfoProvider *CvsServicePartImpl::fileInfoProvider() const { return m_fileInfoProvider; } diff --git a/vcs/cvsservice/cvspartimpl.h b/vcs/cvsservice/cvspartimpl.h index 32ee04f5..ade7ffe4 100644 --- a/vcs/cvsservice/cvspartimpl.h +++ b/vcs/cvsservice/cvspartimpl.h @@ -17,18 +17,18 @@ #include #include -#include +#include class CvsServicePart; class KDialogBase; class KURL; class CvsProcessWidget; -class TDevMainWindow; -class TDevCore; -class TDevDiffFrontend; +class KDevMainWindow; +class KDevCore; +class KDevDiffFrontend; class TQDir; class JobScheduler; -class TDevVCSFileInfoProvider; +class KDevVCSFileInfoProvider; class CVSFileInfoProvider; /** @@ -183,7 +183,7 @@ public: /** * @return a reference to the custom FileInforProvider object (FORWARDER) */ - TDevVCSFileInfoProvider *fileInfoProvider() const; + KDevVCSFileInfoProvider *fileInfoProvider() const; // Helpers @@ -309,10 +309,10 @@ private: static const TQString changeLogPrependString; // Internal short-cuts - TDevMainWindow *mainWindow() const; - TDevCore *core() const; + KDevMainWindow *mainWindow() const; + KDevCore *core() const; TQString projectDirectory() const; - TDevDiffFrontend *diffFrontend() const; + KDevDiffFrontend *diffFrontend() const; /** Locate and setup DCOP CvsService */ bool requestCvsService(); diff --git a/vcs/cvsservice/cvsprocesswidget.cpp b/vcs/cvsservice/cvsprocesswidget.cpp index e218e00e..bb8fb459 100644 --- a/vcs/cvsservice/cvsprocesswidget.cpp +++ b/vcs/cvsservice/cvsprocesswidget.cpp @@ -18,9 +18,9 @@ #include #include -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" -#include "tdevcore.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" +#include "kdevcore.h" #include "cvspart.h" #include "cvsprocesswidget.h" diff --git a/vcs/cvsservice/integrator/CMakeLists.txt b/vcs/cvsservice/integrator/CMakeLists.txt index e615784e..a17393d8 100644 --- a/vcs/cvsservice/integrator/CMakeLists.txt +++ b/vcs/cvsservice/integrator/CMakeLists.txt @@ -25,7 +25,7 @@ link_directories( ##### other data ################################ -install( FILES tdevcvsserviceintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevcvsserviceintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) ##### libcvsserviceintegrator (module) ########## @@ -35,6 +35,6 @@ tde_add_kpart( libcvsserviceintegrator AUTOMOC cvsserviceintegrator.cpp integratordlgbase.ui fetcherdlgbase.ui integratordlg.cpp initdlg.ui LINK - tdevextras-shared tdevelop-shared cvsservice + kdevextras-shared tdevelop-shared cvsservice DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/cvsservice/integrator/Makefile.am b/vcs/cvsservice/integrator/Makefile.am index 36f5dcee..f3eb47fe 100644 --- a/vcs/cvsservice/integrator/Makefile.am +++ b/vcs/cvsservice/integrator/Makefile.am @@ -5,8 +5,8 @@ METASOURCES = AUTO kde_module_LTLIBRARIES = libcvsserviceintegrator.la libcvsserviceintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries) libcvsserviceintegrator_la_LIBADD = \ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(top_builddir)/lib/libtdevelop.la -lcvsservice + $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(top_builddir)/lib/libtdevelop.la -lcvsservice noinst_HEADERS = cvsserviceintegrator.h integratordlg.h libcvsserviceintegrator_la_SOURCES = cvsserviceintegrator.cpp \ integratordlgbase.ui fetcherdlgbase.ui integratordlg.cpp initdlg.ui -kde_services_DATA = tdevcvsserviceintegrator.desktop +kde_services_DATA = kdevcvsserviceintegrator.desktop diff --git a/vcs/cvsservice/integrator/cvsserviceintegrator.cpp b/vcs/cvsservice/integrator/cvsserviceintegrator.cpp index 7f2fbbeb..1bbc3b11 100644 --- a/vcs/cvsservice/integrator/cvsserviceintegrator.cpp +++ b/vcs/cvsservice/integrator/cvsserviceintegrator.cpp @@ -19,18 +19,18 @@ ***************************************************************************/ #include "cvsserviceintegrator.h" -#include -#include +#include +#include #include "integratordlg.h" -static const TDevPluginInfo data("tdevcvsserviceintegrator"); -typedef TDevGenericFactory CVSIntegratorFactory; +static const KDevPluginInfo data("kdevcvsserviceintegrator"); +typedef KDevGenericFactory CVSIntegratorFactory; K_EXPORT_COMPONENT_FACTORY( libcvsserviceintegrator, CVSIntegratorFactory(data) ) CVSServiceIntegrator::CVSServiceIntegrator(TQObject* parent, const char* name, const TQStringList args) - :TDevVCSIntegrator(parent, name) + :KDevVCSIntegrator(parent, name) { } diff --git a/vcs/cvsservice/integrator/cvsserviceintegrator.h b/vcs/cvsservice/integrator/cvsserviceintegrator.h index b3a8af9a..ebf4224e 100644 --- a/vcs/cvsservice/integrator/cvsserviceintegrator.h +++ b/vcs/cvsservice/integrator/cvsserviceintegrator.h @@ -20,11 +20,11 @@ #ifndef CVSSERVICEINTEGRATOR_H #define CVSSERVICEINTEGRATOR_H -#include +#include #include -class CVSServiceIntegrator: public TDevVCSIntegrator { +class CVSServiceIntegrator: public KDevVCSIntegrator { Q_OBJECT public: diff --git a/vcs/cvsservice/integrator/kdevcvsserviceintegrator.desktop b/vcs/cvsservice/integrator/kdevcvsserviceintegrator.desktop new file mode 100644 index 00000000..a6f189f7 --- /dev/null +++ b/vcs/cvsservice/integrator/kdevcvsserviceintegrator.desktop @@ -0,0 +1,45 @@ +[Desktop Entry] +Type=Service +Name=KDevCVSIntegrator +Name[da]=TDevelop CVS-integration +Name[nds]=TDevelop-CVS-Integreren +Name[sk]=KDev CVS integrácia +Name[sv]=TDevelop CVS-integration +Name[zh_TW]=TDevelop CVS 整合器 +Comment=CVS Service Project Integration Facility +Comment[ca]=Facilitat d'integració amb projectes que usin CVS +Comment[da]=CVS service projektintegration +Comment[de]=CVS-Dienst-Projektintegration +Comment[el]=Λειτουργία ενσωμάτωσης υπηρεσίας CVS στο έργο +Comment[es]=Facilidad de integración con proyectos que utilicen CVS +Comment[et]=CVS-teenuse projekti põimimisvahend +Comment[eu]=CVS zerbitzuen proiektuen integrazio-tresna +Comment[fa]=تسهیلات مجتمع‌سازی پروژۀ خدمت CVS +Comment[fr]=Fonction d'intégration pour un projet utilisant le service CVS +Comment[gl]=Utilidade para a integración de proxectos do servizo CVS +Comment[hu]=Integrálás a Cvsservice-szel +Comment[it]=Funzione di integrazione del progetto CVS Service +Comment[ja]=CVS サービス プロジェクト統合ツール +Comment[ms]=Kemudahan Integrasi Projek Servis CVS +Comment[nds]=Projektintegreren för den CVS-Deenst +Comment[ne]=CVS सेवा परियोजना एकिकरण सुविधा +Comment[nl]=CVS project-integratie +Comment[pl]=Integracja z usługą CVS +Comment[pt]=Integração com Projectos de Serviço CVS +Comment[pt_BR]=Facilidade de Integração ao Projeto do Serviço CVS +Comment[ru]=Интеграция CVS +Comment[sk]=Integrácia CVS projektu +Comment[sr]=Интеграција Cervisia-је у пројекат +Comment[sr@Latn]=Integracija Cervisia-je u projekat +Comment[sv]=Funktion för integrering av CVS-tjänst i projekt +Comment[tr]=CVS Servis Projesi Bütünleştirme Aracı +Comment[zh_CN]=CVS 服务工程集成功能 +Comment[zh_TW]=CVS 服務專案整合工具 +Icon=cervisia +Exec=blubb +ServiceTypes=TDevelop/VCSIntegrator +X-TDE-Library=libcvsserviceintegrator +X-TDevelop-Default=true +X-TDevelop-VCS=CVS +X-TDevelop-VCSPlugin=kdevcvsservice +X-TDevelop-Version=5 diff --git a/vcs/cvsservice/integrator/tdevcvsserviceintegrator.desktop b/vcs/cvsservice/integrator/tdevcvsserviceintegrator.desktop deleted file mode 100644 index a6f189f7..00000000 --- a/vcs/cvsservice/integrator/tdevcvsserviceintegrator.desktop +++ /dev/null @@ -1,45 +0,0 @@ -[Desktop Entry] -Type=Service -Name=KDevCVSIntegrator -Name[da]=TDevelop CVS-integration -Name[nds]=TDevelop-CVS-Integreren -Name[sk]=KDev CVS integrácia -Name[sv]=TDevelop CVS-integration -Name[zh_TW]=TDevelop CVS 整合器 -Comment=CVS Service Project Integration Facility -Comment[ca]=Facilitat d'integració amb projectes que usin CVS -Comment[da]=CVS service projektintegration -Comment[de]=CVS-Dienst-Projektintegration -Comment[el]=Λειτουργία ενσωμάτωσης υπηρεσίας CVS στο έργο -Comment[es]=Facilidad de integración con proyectos que utilicen CVS -Comment[et]=CVS-teenuse projekti põimimisvahend -Comment[eu]=CVS zerbitzuen proiektuen integrazio-tresna -Comment[fa]=تسهیلات مجتمع‌سازی پروژۀ خدمت CVS -Comment[fr]=Fonction d'intégration pour un projet utilisant le service CVS -Comment[gl]=Utilidade para a integración de proxectos do servizo CVS -Comment[hu]=Integrálás a Cvsservice-szel -Comment[it]=Funzione di integrazione del progetto CVS Service -Comment[ja]=CVS サービス プロジェクト統合ツール -Comment[ms]=Kemudahan Integrasi Projek Servis CVS -Comment[nds]=Projektintegreren för den CVS-Deenst -Comment[ne]=CVS सेवा परियोजना एकिकरण सुविधा -Comment[nl]=CVS project-integratie -Comment[pl]=Integracja z usługą CVS -Comment[pt]=Integração com Projectos de Serviço CVS -Comment[pt_BR]=Facilidade de Integração ao Projeto do Serviço CVS -Comment[ru]=Интеграция CVS -Comment[sk]=Integrácia CVS projektu -Comment[sr]=Интеграција Cervisia-је у пројекат -Comment[sr@Latn]=Integracija Cervisia-je u projekat -Comment[sv]=Funktion för integrering av CVS-tjänst i projekt -Comment[tr]=CVS Servis Projesi Bütünleştirme Aracı -Comment[zh_CN]=CVS 服务工程集成功能 -Comment[zh_TW]=CVS 服務專案整合工具 -Icon=cervisia -Exec=blubb -ServiceTypes=TDevelop/VCSIntegrator -X-TDE-Library=libcvsserviceintegrator -X-TDevelop-Default=true -X-TDevelop-VCS=CVS -X-TDevelop-VCSPlugin=kdevcvsservice -X-TDevelop-Version=5 diff --git a/vcs/cvsservice/kdev_cvs.png b/vcs/cvsservice/kdev_cvs.png new file mode 100644 index 00000000..921b0674 Binary files /dev/null and b/vcs/cvsservice/kdev_cvs.png differ diff --git a/vcs/cvsservice/kdev_cvs.xcf b/vcs/cvsservice/kdev_cvs.xcf new file mode 100644 index 00000000..aafee609 Binary files /dev/null and b/vcs/cvsservice/kdev_cvs.xcf differ diff --git a/vcs/cvsservice/kdevcvsservice.desktop b/vcs/cvsservice/kdevcvsservice.desktop new file mode 100644 index 00000000..921e91d1 --- /dev/null +++ b/vcs/cvsservice/kdevcvsservice.desktop @@ -0,0 +1,77 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=CVS Integration using Cervisia's cvsservice. http://www.kde.org/apps/cervisia/ +Comment[ca]=Integració amb el CVS emprant el cvsservice de Cervisia. http://www.kde.org/apps/cervisia/ +Comment[da]=CVS Integration ved brug af Cervisias cvsservice. http://www.kde.org/apps/cervisia/ +Comment[de]=CVS-Integration mit Hilfe von Cervisias cvsservice. http://www.kde.org/apps/cervisia/ +Comment[el]=Ενσωμάτωση CVS χρησιμοποιώντας τη cvsservice του Cervisia. http://www.kde.org/apps/cervisia/ +Comment[es]=Integración con CVS utilizando el cvsservice. http://www.kde.org/apps/cervisia/ +Comment[et]=CVS põimimine Cervisia cvsservice'i abil. http://www.kde.org/apps/cervisia/ +Comment[eu]=CVS integrazioa Cervisia-ren cvsservice erabiliz. http://www.kde.org/apps/cervisia/ +Comment[fa]=مجتمع‌سازی CVS، با استفاده از خدمت cvs متعلق به Cervisia. http://www.kde.org/apps/cervisia/ +Comment[fr]=Intégration de CVS à l'aide du processus « cvsservice » de Cervisia. http://www.kde.org/apps/cervisia/ +Comment[ga]=Comhtháthú CVS le cvsservice Cervisia. http://www.kde.org/apps/cervisia/ +Comment[gl]=Integración CVS usando o servizo cvsservice de Cervisia. http://www.kde.org/apps/cervisia/ +Comment[hu]=CVS-integráció a Cervisia cvsservice segítségével. http://www.kde.org/apps/cervisia/ +Comment[it]=Integrazione del CVS utilizzando il cvsservice di Cervisia. http://www.kde.org/apps/cervisia/ +Comment[ja]=CVS 統合は、Cervisia の CVS サービスを利用します。http://www.kde.org/apps/cervisia/ +Comment[ms]=Integrasi CVS menggunakan cvsservice Cervisia. http://www.kde.org/apps/cervisia/ +Comment[nds]=CVS-Integreren över den CVS-Service vun Cervisia. http://www.kde.org/apps/cervisia/ +Comment[ne]= Cervisia's cvsservice प्रयोग गरेर CVS एकिकरण । http://www.kde.org/apps/cervisia/ +Comment[nl]=CVS-integratie via Cervisia's cvsservice. Zie http://www.kde.org/apps/cervisia/ +Comment[pl]=Integracja z CVS-em za pomocą usługi CVS Cervisii http://www.kde.org/apps/cervisia/ +Comment[pt]=Integração do CVS usando o cvsservice do Cervisia. http://www.kde.org/apps/cervisia/ +Comment[pt_BR]=Integração com o CVS usando o cvsservice do Cervisia. http://www.kde.org/apps/cervisia/ +Comment[ru]=Интеграция CVS с использованием Cervisia cvsservice. http://www.kde.org/apps/cervisia/ +Comment[sk]=Integrácia CVS pomocou Cervisia Cvs služby. http://www.kde.org/apps/cervisia/ +Comment[sl]=Integracija CVS z uporabo Cervisijeve cvsservice. http://www.kde.org/apps/cervisia/ +Comment[sr]=Интеграција CVS-а помоћу Cervisia-jиног cvsservice. http://www.kde.org/apps/cervisia/ +Comment[sr@Latn]=Integracija CVS-a pomoću Cervisia-jinog cvsservice. http://www.kde.org/apps/cervisia/ +Comment[sv]=Integrering av CVS med användning av Cervisias CVS-tjänst. http://www.kde.org/apps/cervisia/ +Comment[tr]=Cervisia'nın cvsservice'i kullanılarak CVS bütünleştirilmesi http://www.kde.org/apps/cervisia/ +Comment[zh_CN]=使用 Cervisia 的 cvsservice 的 CVS 集成。http://www.kde.org/apps/cervisia/ +Comment[zh_TW]=使用 Cervisia 服務做 CVS 整合。http://www.kde.org/apps/cervisia/ +Name=KDevCvsService +Name[da]=TDevelop CVS-service +Name[nds]=TDevelop-CVS-Deenst +Name[sk]=KDev Cvs služba +Name[sv]=TDevelop CVS-tjänst +Name[zh_TW]=TDevelop CVS 服務 +GenericName=CVS Integration (Cervisia) +GenericName[ca]=Integració amb CVS (Cervisia) +GenericName[de]=Unterstützung für CVS (Cervisia) +GenericName[el]=Ενσωμάτωση CVS (Cervisia) +GenericName[es]=Integración con CVS (Cervisia) +GenericName[et]=CVS põimimine (Cervisia) +GenericName[eu]=CVS integrazioa (Cervisia) +GenericName[fa]=مجتمع‌سازی CVS (Cervisia) +GenericName[fr]=Intégration de CVS (Cervisia) +GenericName[ga]=Comhtháthú CVS (Cervisia) +GenericName[gl]=Integración CVS (Cervisia) +GenericName[hu]=CVS-integráció (Cervisia) +GenericName[it]=Integrazione CVS (Cervisia) +GenericName[ja]=CVS 統合 (Cervisia) +GenericName[ms]=Integrasi CVS (Cervisia) +GenericName[nds]=Ünnerstütten för CVS (Cervisia) +GenericName[ne]=CVS एकिकरण (Cervisia) +GenericName[nl]=CVS-integratie (Cervisia) +GenericName[pl]=Integracja z CVS-em (Cervisia) +GenericName[pt]=Integração com CVS (Cervisia) +GenericName[pt_BR]=Integração com o CVS (Cervisia) +GenericName[ru]=Интеграция CVS (Cervisia) +GenericName[sk]=CVS integrácia (Cervisia) +GenericName[sl]=Integracija CVS (Cervisia) +GenericName[sr]=Интеграција CVS-а (Cervisia) +GenericName[sr@Latn]=Integracija CVS-a (Cervisia) +GenericName[sv]=Integrering av CVS (Cervisia) +GenericName[ta]=CVS ஒருங்கிணை (செர்விசியா) +GenericName[tg]=Интегратсияи CVS (Cervisia) +GenericName[tr]=CVS Bütünleştirmesi (Cervisia) +GenericName[zh_CN]=CVS 集成(Cervisia) +GenericName[zh_TW]=CVS 整合(Cervisia) +Icon=cervisia +ServiceTypes=TDevelop/VersionControl +X-TDE-Library=libkdevcvsservice +X-TDevelop-Version=5 +X-TDevelop-Properties=VCS,CVSService diff --git a/vcs/cvsservice/kdevcvsservicepart.rc b/vcs/cvsservice/kdevcvsservicepart.rc new file mode 100644 index 00000000..a1bce434 --- /dev/null +++ b/vcs/cvsservice/kdevcvsservicepart.rc @@ -0,0 +1,36 @@ + + + +

    + + &Version Control + + + &CVS Service + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcs/cvsservice/tdev_cvs.png b/vcs/cvsservice/tdev_cvs.png deleted file mode 100644 index 921b0674..00000000 Binary files a/vcs/cvsservice/tdev_cvs.png and /dev/null differ diff --git a/vcs/cvsservice/tdev_cvs.xcf b/vcs/cvsservice/tdev_cvs.xcf deleted file mode 100644 index aafee609..00000000 Binary files a/vcs/cvsservice/tdev_cvs.xcf and /dev/null differ diff --git a/vcs/cvsservice/tdevcvsservice.desktop b/vcs/cvsservice/tdevcvsservice.desktop deleted file mode 100644 index 5b8bb530..00000000 --- a/vcs/cvsservice/tdevcvsservice.desktop +++ /dev/null @@ -1,77 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=CVS Integration using Cervisia's cvsservice. http://www.kde.org/apps/cervisia/ -Comment[ca]=Integració amb el CVS emprant el cvsservice de Cervisia. http://www.kde.org/apps/cervisia/ -Comment[da]=CVS Integration ved brug af Cervisias cvsservice. http://www.kde.org/apps/cervisia/ -Comment[de]=CVS-Integration mit Hilfe von Cervisias cvsservice. http://www.kde.org/apps/cervisia/ -Comment[el]=Ενσωμάτωση CVS χρησιμοποιώντας τη cvsservice του Cervisia. http://www.kde.org/apps/cervisia/ -Comment[es]=Integración con CVS utilizando el cvsservice. http://www.kde.org/apps/cervisia/ -Comment[et]=CVS põimimine Cervisia cvsservice'i abil. http://www.kde.org/apps/cervisia/ -Comment[eu]=CVS integrazioa Cervisia-ren cvsservice erabiliz. http://www.kde.org/apps/cervisia/ -Comment[fa]=مجتمع‌سازی CVS، با استفاده از خدمت cvs متعلق به Cervisia. http://www.kde.org/apps/cervisia/ -Comment[fr]=Intégration de CVS à l'aide du processus « cvsservice » de Cervisia. http://www.kde.org/apps/cervisia/ -Comment[ga]=Comhtháthú CVS le cvsservice Cervisia. http://www.kde.org/apps/cervisia/ -Comment[gl]=Integración CVS usando o servizo cvsservice de Cervisia. http://www.kde.org/apps/cervisia/ -Comment[hu]=CVS-integráció a Cervisia cvsservice segítségével. http://www.kde.org/apps/cervisia/ -Comment[it]=Integrazione del CVS utilizzando il cvsservice di Cervisia. http://www.kde.org/apps/cervisia/ -Comment[ja]=CVS 統合は、Cervisia の CVS サービスを利用します。http://www.kde.org/apps/cervisia/ -Comment[ms]=Integrasi CVS menggunakan cvsservice Cervisia. http://www.kde.org/apps/cervisia/ -Comment[nds]=CVS-Integreren över den CVS-Service vun Cervisia. http://www.kde.org/apps/cervisia/ -Comment[ne]= Cervisia's cvsservice प्रयोग गरेर CVS एकिकरण । http://www.kde.org/apps/cervisia/ -Comment[nl]=CVS-integratie via Cervisia's cvsservice. Zie http://www.kde.org/apps/cervisia/ -Comment[pl]=Integracja z CVS-em za pomocą usługi CVS Cervisii http://www.kde.org/apps/cervisia/ -Comment[pt]=Integração do CVS usando o cvsservice do Cervisia. http://www.kde.org/apps/cervisia/ -Comment[pt_BR]=Integração com o CVS usando o cvsservice do Cervisia. http://www.kde.org/apps/cervisia/ -Comment[ru]=Интеграция CVS с использованием Cervisia cvsservice. http://www.kde.org/apps/cervisia/ -Comment[sk]=Integrácia CVS pomocou Cervisia Cvs služby. http://www.kde.org/apps/cervisia/ -Comment[sl]=Integracija CVS z uporabo Cervisijeve cvsservice. http://www.kde.org/apps/cervisia/ -Comment[sr]=Интеграција CVS-а помоћу Cervisia-jиног cvsservice. http://www.kde.org/apps/cervisia/ -Comment[sr@Latn]=Integracija CVS-a pomoću Cervisia-jinog cvsservice. http://www.kde.org/apps/cervisia/ -Comment[sv]=Integrering av CVS med användning av Cervisias CVS-tjänst. http://www.kde.org/apps/cervisia/ -Comment[tr]=Cervisia'nın cvsservice'i kullanılarak CVS bütünleştirilmesi http://www.kde.org/apps/cervisia/ -Comment[zh_CN]=使用 Cervisia 的 cvsservice 的 CVS 集成。http://www.kde.org/apps/cervisia/ -Comment[zh_TW]=使用 Cervisia 服務做 CVS 整合。http://www.kde.org/apps/cervisia/ -Name=KDevCvsService -Name[da]=TDevelop CVS-service -Name[nds]=TDevelop-CVS-Deenst -Name[sk]=KDev Cvs služba -Name[sv]=TDevelop CVS-tjänst -Name[zh_TW]=TDevelop CVS 服務 -GenericName=CVS Integration (Cervisia) -GenericName[ca]=Integració amb CVS (Cervisia) -GenericName[de]=Unterstützung für CVS (Cervisia) -GenericName[el]=Ενσωμάτωση CVS (Cervisia) -GenericName[es]=Integración con CVS (Cervisia) -GenericName[et]=CVS põimimine (Cervisia) -GenericName[eu]=CVS integrazioa (Cervisia) -GenericName[fa]=مجتمع‌سازی CVS (Cervisia) -GenericName[fr]=Intégration de CVS (Cervisia) -GenericName[ga]=Comhtháthú CVS (Cervisia) -GenericName[gl]=Integración CVS (Cervisia) -GenericName[hu]=CVS-integráció (Cervisia) -GenericName[it]=Integrazione CVS (Cervisia) -GenericName[ja]=CVS 統合 (Cervisia) -GenericName[ms]=Integrasi CVS (Cervisia) -GenericName[nds]=Ünnerstütten för CVS (Cervisia) -GenericName[ne]=CVS एकिकरण (Cervisia) -GenericName[nl]=CVS-integratie (Cervisia) -GenericName[pl]=Integracja z CVS-em (Cervisia) -GenericName[pt]=Integração com CVS (Cervisia) -GenericName[pt_BR]=Integração com o CVS (Cervisia) -GenericName[ru]=Интеграция CVS (Cervisia) -GenericName[sk]=CVS integrácia (Cervisia) -GenericName[sl]=Integracija CVS (Cervisia) -GenericName[sr]=Интеграција CVS-а (Cervisia) -GenericName[sr@Latn]=Integracija CVS-a (Cervisia) -GenericName[sv]=Integrering av CVS (Cervisia) -GenericName[ta]=CVS ஒருங்கிணை (செர்விசியா) -GenericName[tg]=Интегратсияи CVS (Cervisia) -GenericName[tr]=CVS Bütünleştirmesi (Cervisia) -GenericName[zh_CN]=CVS 集成(Cervisia) -GenericName[zh_TW]=CVS 整合(Cervisia) -Icon=cervisia -ServiceTypes=TDevelop/VersionControl -X-TDE-Library=libtdevcvsservice -X-TDevelop-Version=5 -X-TDevelop-Properties=VCS,CVSService diff --git a/vcs/cvsservice/tdevcvsservicepart.rc b/vcs/cvsservice/tdevcvsservicepart.rc deleted file mode 100644 index a1bce434..00000000 --- a/vcs/cvsservice/tdevcvsservicepart.rc +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - &Version Control - - - &CVS Service - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vcs/perforce/CMakeLists.txt b/vcs/perforce/CMakeLists.txt index f0964379..549eadb8 100644 --- a/vcs/perforce/CMakeLists.txt +++ b/vcs/perforce/CMakeLists.txt @@ -27,13 +27,13 @@ link_directories( ##### other data ################################ -install( FILES tdevperforce.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevperforce.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevperforce (module) ################## +##### libkdevperforce (module) ################## -tde_add_kpart( libtdevperforce AUTOMOC +tde_add_kpart( libkdevperforce AUTOMOC SOURCES perforcepart.cpp commitdlg.cpp - LINK tdevextensions-static tdevelop-shared + LINK kdevextensions-static tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/perforce/Makefile.am b/vcs/perforce/Makefile.am index 09fb0e9e..36e19325 100644 --- a/vcs/perforce/Makefile.am +++ b/vcs/perforce/Makefile.am @@ -3,17 +3,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevperforce.la -libtdevperforce_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevperforce_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la +kde_module_LTLIBRARIES = libkdevperforce.la +libkdevperforce_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevperforce_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la -libtdevperforce_la_SOURCES = perforcepart.cpp commitdlg.cpp +libkdevperforce_la_SOURCES = perforcepart.cpp commitdlg.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevperforce.desktop +service_DATA = kdevperforce.desktop -rcdir = $(kde_datadir)/tdevperforce +rcdir = $(kde_datadir)/kdevperforce SUBDIRS = integrator diff --git a/vcs/perforce/integrator/CMakeLists.txt b/vcs/perforce/integrator/CMakeLists.txt index 95985418..e939e3ba 100644 --- a/vcs/perforce/integrator/CMakeLists.txt +++ b/vcs/perforce/integrator/CMakeLists.txt @@ -26,7 +26,7 @@ link_directories( ##### other data ################################ -install( FILES tdevperforceintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevperforceintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) ##### libperforceintegrator (module) ############ @@ -35,6 +35,6 @@ tde_add_kpart( libperforceintegrator AUTOMOC SOURCES perforceintegrator.cpp pfintegratordlgbase.ui pfintegratordlg.cpp - LINK tdevextras-shared tdevelop-shared + LINK kdevextras-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/perforce/integrator/Makefile.am b/vcs/perforce/integrator/Makefile.am index e400e241..38e80bcd 100644 --- a/vcs/perforce/integrator/Makefile.am +++ b/vcs/perforce/integrator/Makefile.am @@ -5,9 +5,9 @@ METASOURCES = AUTO kde_module_LTLIBRARIES = libperforceintegrator.la libperforceintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries) libperforceintegrator_la_LIBADD =\ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la\ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la\ $(top_builddir)/lib/libtdevelop.la -kde_services_DATA = tdevperforceintegrator.desktop +kde_services_DATA = kdevperforceintegrator.desktop noinst_HEADERS = perforceintegrator.h pfintegratordlg.h libperforceintegrator_la_SOURCES = perforceintegrator.cpp \ pfintegratordlgbase.ui pfintegratordlg.cpp diff --git a/vcs/perforce/integrator/kdevperforceintegrator.desktop b/vcs/perforce/integrator/kdevperforceintegrator.desktop new file mode 100644 index 00000000..78ad9bf2 --- /dev/null +++ b/vcs/perforce/integrator/kdevperforceintegrator.desktop @@ -0,0 +1,44 @@ +[Desktop Entry] +Type=Service +Name=KDevPerforceIntegrator +Name[da]=TDevelop Perforce-integration +Name[nds]=TDevelop-Perforce-Integreren +Name[sk]=KDev Perforce integrácia +Name[sv]=TDevelop Perforce-integration +Name[zh_TW]=TDevelop Perforce 整合器 +Comment=Perforce Project Integration Facility +Comment[ca]=Facilitat per a la integració amb projectes Perforce +Comment[da]=Perforce projektintegration +Comment[de]=Perforce-Projektintegration +Comment[el]=Λειτουργία ενσωμάτωσης Perforce στο έργο +Comment[es]=Entorno para integración con proyectos Perforce +Comment[et]=Perforce projekti põimimisvahend +Comment[eu]=Perforce proiektuen integrazio-tresna +Comment[fa]=تسهیلات مجتمع‌سازی پروژۀ Perforce +Comment[fr]=Fonction d'intégration pour un projet utilisant Perforce +Comment[gl]=Utilidade para a integración de proxectos Perforce +Comment[hu]=Integrálás a Perforce-szal +Comment[it]=Funzione di integrazione del progetto Perforce +Comment[ja]=Perforce プロジェクト統合ツール +Comment[ms]=Kemudahan Integrasi Projek Perforce +Comment[nds]=Perforce-Projektintegreren +Comment[ne]=परफोर्स परियोजना एकिकरण सुविधा +Comment[nl]=Perforce project-integratie +Comment[pl]=Integracja z Perforce +Comment[pt]=Integração com Projectos Perforce +Comment[pt_BR]=Facilidade de Integração ao Projeto de Perforce +Comment[ru]=Интеграция Perforce +Comment[sk]=Perforce projektová integrácia +Comment[sr]=Интеграција Perforce-а у пројекат +Comment[sr@Latn]=Integracija Perforce-a u projekat +Comment[sv]=Funktion för integrering av Perforce i projekt +Comment[tr]=Perforce Proje Bütünleştirme Aracı +Comment[zh_CN]=Perforce 工程集成功能 +Comment[zh_TW]=Perforce 專案整合工具 +Exec=blubb +ServiceTypes=TDevelop/VCSIntegrator +X-TDE-Library=libperforceintegrator +X-TDevelop-Default=false +X-TDevelop-VCS=Perforce +X-TDevelop-VCSPlugin=kdevperforce +X-TDevelop-Version=5 diff --git a/vcs/perforce/integrator/perforceintegrator.cpp b/vcs/perforce/integrator/perforceintegrator.cpp index 74fdf54f..bc7c0988 100644 --- a/vcs/perforce/integrator/perforceintegrator.cpp +++ b/vcs/perforce/integrator/perforceintegrator.cpp @@ -19,19 +19,19 @@ ***************************************************************************/ #include "perforceintegrator.h" -#include -#include +#include +#include #include "pfintegratordlg.h" -static const TDevPluginInfo data("tdevperforceintegrator"); -typedef TDevGenericFactory PerforceIntegratorFactory; +static const KDevPluginInfo data("kdevperforceintegrator"); +typedef KDevGenericFactory PerforceIntegratorFactory; K_EXPORT_COMPONENT_FACTORY( libperforceintegrator, PerforceIntegratorFactory(data) ) PerforceIntegrator::PerforceIntegrator(TQObject* parent, const char* name, const TQStringList // args ) - :TDevVCSIntegrator(parent, name) + :KDevVCSIntegrator(parent, name) { } diff --git a/vcs/perforce/integrator/perforceintegrator.h b/vcs/perforce/integrator/perforceintegrator.h index c97ff82f..2b82046f 100644 --- a/vcs/perforce/integrator/perforceintegrator.h +++ b/vcs/perforce/integrator/perforceintegrator.h @@ -20,11 +20,11 @@ #ifndef PERFORCEINTEGRATOR_H #define PERFORCEINTEGRATOR_H -#include +#include #include -class PerforceIntegrator : public TDevVCSIntegrator +class PerforceIntegrator : public KDevVCSIntegrator { Q_OBJECT diff --git a/vcs/perforce/integrator/pfintegratordlg.h b/vcs/perforce/integrator/pfintegratordlg.h index 5398475b..3e7bf4de 100644 --- a/vcs/perforce/integrator/pfintegratordlg.h +++ b/vcs/perforce/integrator/pfintegratordlg.h @@ -21,7 +21,7 @@ #define PFINTEGRATORDLG_H #include "pfintegratordlgbase.h" -#include +#include class PFIntegratorDlg: public PFIntegratorDlgBase, public VCSDialog { Q_OBJECT diff --git a/vcs/perforce/integrator/tdevperforceintegrator.desktop b/vcs/perforce/integrator/tdevperforceintegrator.desktop deleted file mode 100644 index 78ad9bf2..00000000 --- a/vcs/perforce/integrator/tdevperforceintegrator.desktop +++ /dev/null @@ -1,44 +0,0 @@ -[Desktop Entry] -Type=Service -Name=KDevPerforceIntegrator -Name[da]=TDevelop Perforce-integration -Name[nds]=TDevelop-Perforce-Integreren -Name[sk]=KDev Perforce integrácia -Name[sv]=TDevelop Perforce-integration -Name[zh_TW]=TDevelop Perforce 整合器 -Comment=Perforce Project Integration Facility -Comment[ca]=Facilitat per a la integració amb projectes Perforce -Comment[da]=Perforce projektintegration -Comment[de]=Perforce-Projektintegration -Comment[el]=Λειτουργία ενσωμάτωσης Perforce στο έργο -Comment[es]=Entorno para integración con proyectos Perforce -Comment[et]=Perforce projekti põimimisvahend -Comment[eu]=Perforce proiektuen integrazio-tresna -Comment[fa]=تسهیلات مجتمع‌سازی پروژۀ Perforce -Comment[fr]=Fonction d'intégration pour un projet utilisant Perforce -Comment[gl]=Utilidade para a integración de proxectos Perforce -Comment[hu]=Integrálás a Perforce-szal -Comment[it]=Funzione di integrazione del progetto Perforce -Comment[ja]=Perforce プロジェクト統合ツール -Comment[ms]=Kemudahan Integrasi Projek Perforce -Comment[nds]=Perforce-Projektintegreren -Comment[ne]=परफोर्स परियोजना एकिकरण सुविधा -Comment[nl]=Perforce project-integratie -Comment[pl]=Integracja z Perforce -Comment[pt]=Integração com Projectos Perforce -Comment[pt_BR]=Facilidade de Integração ao Projeto de Perforce -Comment[ru]=Интеграция Perforce -Comment[sk]=Perforce projektová integrácia -Comment[sr]=Интеграција Perforce-а у пројекат -Comment[sr@Latn]=Integracija Perforce-a u projekat -Comment[sv]=Funktion för integrering av Perforce i projekt -Comment[tr]=Perforce Proje Bütünleştirme Aracı -Comment[zh_CN]=Perforce 工程集成功能 -Comment[zh_TW]=Perforce 專案整合工具 -Exec=blubb -ServiceTypes=TDevelop/VCSIntegrator -X-TDE-Library=libperforceintegrator -X-TDevelop-Default=false -X-TDevelop-VCS=Perforce -X-TDevelop-VCSPlugin=kdevperforce -X-TDevelop-Version=5 diff --git a/vcs/perforce/kdevperforce.desktop b/vcs/perforce/kdevperforce.desktop new file mode 100644 index 00000000..d837faeb --- /dev/null +++ b/vcs/perforce/kdevperforce.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Integrates Perforce, a software configuration management system. http://www.perforce.com/ +Comment[ca]=Integra Perforce, un sistema de gestió de la configuració del programari. http://www.perforce.com/ +Comment[da]=Integrerer Perforce, et software-indstilling håndteringssystem. http://www.perforce.com/ +Comment[de]=Integration von Perforce, einem System zur Verwaltung von Software-Konfigurationen. http://www.perforce.com/ +Comment[el]=Ενσωματώνει το Perforce, ένα σύστημα διαχείρισης και ρύθμισης λογισμικού.http://www.perforce.com/ +Comment[es]=Integra Perforce, un sistema de adminsitración de la configuración del software. http://www.perforce.com/ +Comment[et]=Integreerib tarkvaraseadistuste haldamise süsteemi Perforce. http://www.perforce.com/ +Comment[eu]=Perforce integratzen du, software konfiguazio kudeaketa sistema bat. http://www.perforce.com/ +Comment[fa]=Perforce را مجتمع‌سازی می‌کند. یک سیستم مدیریت پیکربندی نرم‌افزار. http://www.perforce.com/ +Comment[fr]=Intègre « PerForce », un système de gestion de configuration de logiciels. http:/www.perforce.com/ +Comment[gl]=Integra Perforce, un sistema de xestións de configuracións. http://www.perforce.com/ +Comment[hi]=परफ़ोर्स को इंटीग्रेट करता है, जो कि सॉफ्टवेयर कॉन्फ़िगरेशन प्रबंधन तंत्र है. http://www.perforce.com/ +Comment[hu]=Integrációt biztosít a Perforce szoftverkonfigurációs rendszerrel - http://www.perforce.com/ +Comment[it]=Integra Perforce, un sistema per la configurazione software. http://www.perforce.com/ +Comment[ja]=ソフトウェア設定管理システム Perforce を統合します。 +Comment[ms]=Menggabungkan Perforce, sebuah sistem pengurusan tetapan perisian. http://www.perforce.com/ +Comment[nds]=Integreren vun Perforce, en Systeem för't Plegen vun Programminstellen. http://www.perforce.com/ +Comment[ne]=परफोर्स एकिकरण गर्दछ, सफ्टवेयर कन्फिगरेसन व्यवस्थापन प्रणाली http://www.perforce.com/ +Comment[nl]=Integreert Perforce, een systeem voor softwareconfiguratie. Zie http://www.perforce.com/ +Comment[pl]=Integracja z Perforce, systemem zarządzania konfiguracją oprogramowania. http://www.perforce.com/ +Comment[pt]=Integra o Perforce, um sistema de gestão de configurações de 'software'. http://www.perforce.com/ +Comment[pt_BR]=Integra o Perforce, um software de configuração e gerenciamento do sistema. http://www.perforce.com/ +Comment[ru]=Интегрирует Perforce, систему управления конфигурациями программного обеспечения. http://www.perforce.com/ +Comment[sk]=Integrácia Perforce, konfiguračný projektový manažment. http://www.perforce.com/ +Comment[sl]=Integrira Perforce, upravljalni sistem programja. http://www.perforce.com/ +Comment[sr]=Интегрише Perforce, систем за управљање подешавањем софтвера. http://www.perforce.com/ +Comment[sr@Latn]=Integriše Perforce, sistem za upravljanje podešavanjem softvera. http://www.perforce.com/ +Comment[sv]=Integrerar Perforce, ett konfigurationshanteringsverktyg för programvara. http://www.perforce.com/ +Comment[ta]=ஒருங்கிணைக்கும் Perforce, ஒரு மென்பொருள் மேலாளர் அமைப்பு. http://www.perforce.com/ +Comment[tg]=Интеграл намудани Perforce, барномаи идоракунандаро шарҳи барномаҳои таъмин нигоҳ медорад.http://www.perforce.com/ +Comment[tr]=Bir yazılım ayar yönetimi sistemi olan Perforce'u bütünleştirir. http://www.perforce.com/ +Comment[zh_CN]=集成 Perforce,系统配置管理软件 http://www.perforce.com/ +Comment[zh_TW]=整合 Perforce,一套軟體設定管理系統。http://www.perforce.com/ +Name=KDevPerforce +Name[da]=TDevelop Perforce +Name[de]=Unterstützung für Perforce (TDevelop) +Name[hi]=के-डेव-परफ़ोर्स +Name[nds]=Perforce-Ünnerstütten för TDevelop +Name[sk]=KDev Perforce +Name[sv]=TDevelop Perforce +Name[ta]=Kdev Perforce +Name[zh_TW]=TDevelop Perforce +GenericName=Perforce Integration +GenericName[ca]=Integració amb Perforce +GenericName[da]=Perforce integration +GenericName[de]=Perforce-Integration +GenericName[el]=Ενσωμάτωση Perforce +GenericName[es]=Integración de Perforce +GenericName[et]=Perforce'i põimimine +GenericName[eu]=Perforce integrazioa +GenericName[fa]=مجتمع‌سازی Perforce +GenericName[fr]=Intégration de « Perforce » +GenericName[ga]=Comhtháthú Perforce +GenericName[gl]=Integración de Perforce +GenericName[hi]=परफ़ोर्स इंटीग्रेशन +GenericName[hu]=Perforce-integráció +GenericName[it]=Integrazione di Perforce +GenericName[ms]=Intergrasi Perforce +GenericName[nds]=Perforce-Integreren +GenericName[ne]=परफोर्स इन्टिग्रेसन +GenericName[nl]=Perforce-integratie +GenericName[pl]=Integracja z Perforce +GenericName[pt]=Integração com o Perforce +GenericName[pt_BR]=Integração com o Perforce +GenericName[ru]=Интеграция Perforce +GenericName[sk]=Perforce integrácia +GenericName[sl]=Integracija Perforce +GenericName[sr]=Интеграција perforce-а +GenericName[sr@Latn]=Integracija perforce-a +GenericName[sv]=Integrering av Perforce +GenericName[ta]=Perforce ஒருங்கிணைப்பு +GenericName[tg]=Интегратсия Perforce +GenericName[tr]=Perforce Bütünleştirmesi +GenericName[zh_CN]=Perforce 集成 +GenericName[zh_TW]=Perforce 整合 +ServiceTypes=TDevelop/VersionControl +X-TDE-Library=libkdevperforce +X-TDevelop-Version=5 +X-TDevelop-Properties=VCS,PerforceVCS diff --git a/vcs/perforce/kdevperforcepart.rc b/vcs/perforce/kdevperforcepart.rc new file mode 100644 index 00000000..27b5fe08 --- /dev/null +++ b/vcs/perforce/kdevperforcepart.rc @@ -0,0 +1,23 @@ + + + + + + &Version Control + + + &Perforce + + + + + + + + + + + + + + diff --git a/vcs/perforce/perforcepart.cpp b/vcs/perforce/perforcepart.cpp index 72672b1e..f92666b6 100644 --- a/vcs/perforce/perforcepart.cpp +++ b/vcs/perforce/perforcepart.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -25,21 +25,21 @@ #include #include -#include "tdevpartcontroller.h" -#include "tdevcore.h" -#include "tdevmakefrontend.h" -#include "tdevdifffrontend.h" -#include "tdevplugininfo.h" +#include "kdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevmakefrontend.h" +#include "kdevdifffrontend.h" +#include "kdevplugininfo.h" #include "commitdlg.h" #include "execcommand.h" -static const TDevPluginInfo data("tdevperforce"); +static const KDevPluginInfo data("kdevperforce"); -typedef TDevGenericFactory PerforceFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevperforce, PerforceFactory( data ) ) +typedef KDevGenericFactory PerforceFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevperforce, PerforceFactory( data ) ) PerforcePart::PerforcePart( TQObject *parent, const char *name, const TQStringList & ) - : TDevVersionControl( &data, parent, name ? name : "PerforcePart" ) + : KDevVersionControl( &data, parent, name ? name : "PerforcePart" ) { setInstance(PerforceFactory::instance()); setupActions(); @@ -140,7 +140,7 @@ void PerforcePart::execCommand( const TQString& cmd, const TQString& filename ) command += " && p4 " + cmd + " "; command += name; - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); } @@ -183,7 +183,7 @@ void PerforcePart::commit( const TQString& filename ) TQString command("echo " + message); command += " | p4 submit -i"; - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand("", command); } @@ -208,7 +208,7 @@ void PerforcePart::update( const TQString& filename ) command += " && p4 sync "; command += name; - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); } @@ -277,7 +277,7 @@ void PerforcePart::slotDiffFinished( const TQString& diff, const TQString& err ) TQString strippedDiff = diff; strippedDiff.replace( rx, "--- \\2\n+++ \\2\n" ); - if (TDevDiffFrontend *diffFrontend = extension("TDevelop/DiffFrontend")) + if (KDevDiffFrontend *diffFrontend = extension("TDevelop/DiffFrontend")) diffFrontend->showDiff( strippedDiff ); } diff --git a/vcs/perforce/perforcepart.h b/vcs/perforce/perforcepart.h index 2af8ff5f..7c034424 100644 --- a/vcs/perforce/perforcepart.h +++ b/vcs/perforce/perforcepart.h @@ -13,14 +13,14 @@ #ifndef _PERFORCEPART_H_ #define _PERFORCEPART_H_ -#include +#include #include class Context; class TQPopupMenu; class TDEAction; -class PerforcePart : public TDevVersionControl +class PerforcePart : public KDevVersionControl { Q_OBJECT @@ -34,7 +34,7 @@ public: virtual void createNewProject(const TQString& /* dir */) {} virtual bool fetchFromRepository() { return true; } - virtual TDevVCSFileInfoProvider *fileInfoProvider() const { return 0; } + virtual KDevVCSFileInfoProvider *fileInfoProvider() const { return 0; } virtual bool isValidDirectory(const TQString& /* dirPath*/) const { return true; } diff --git a/vcs/perforce/tdevperforce.desktop b/vcs/perforce/tdevperforce.desktop deleted file mode 100644 index 4f73f5e9..00000000 --- a/vcs/perforce/tdevperforce.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Integrates Perforce, a software configuration management system. http://www.perforce.com/ -Comment[ca]=Integra Perforce, un sistema de gestió de la configuració del programari. http://www.perforce.com/ -Comment[da]=Integrerer Perforce, et software-indstilling håndteringssystem. http://www.perforce.com/ -Comment[de]=Integration von Perforce, einem System zur Verwaltung von Software-Konfigurationen. http://www.perforce.com/ -Comment[el]=Ενσωματώνει το Perforce, ένα σύστημα διαχείρισης και ρύθμισης λογισμικού.http://www.perforce.com/ -Comment[es]=Integra Perforce, un sistema de adminsitración de la configuración del software. http://www.perforce.com/ -Comment[et]=Integreerib tarkvaraseadistuste haldamise süsteemi Perforce. http://www.perforce.com/ -Comment[eu]=Perforce integratzen du, software konfiguazio kudeaketa sistema bat. http://www.perforce.com/ -Comment[fa]=Perforce را مجتمع‌سازی می‌کند. یک سیستم مدیریت پیکربندی نرم‌افزار. http://www.perforce.com/ -Comment[fr]=Intègre « PerForce », un système de gestion de configuration de logiciels. http:/www.perforce.com/ -Comment[gl]=Integra Perforce, un sistema de xestións de configuracións. http://www.perforce.com/ -Comment[hi]=परफ़ोर्स को इंटीग्रेट करता है, जो कि सॉफ्टवेयर कॉन्फ़िगरेशन प्रबंधन तंत्र है. http://www.perforce.com/ -Comment[hu]=Integrációt biztosít a Perforce szoftverkonfigurációs rendszerrel - http://www.perforce.com/ -Comment[it]=Integra Perforce, un sistema per la configurazione software. http://www.perforce.com/ -Comment[ja]=ソフトウェア設定管理システム Perforce を統合します。 -Comment[ms]=Menggabungkan Perforce, sebuah sistem pengurusan tetapan perisian. http://www.perforce.com/ -Comment[nds]=Integreren vun Perforce, en Systeem för't Plegen vun Programminstellen. http://www.perforce.com/ -Comment[ne]=परफोर्स एकिकरण गर्दछ, सफ्टवेयर कन्फिगरेसन व्यवस्थापन प्रणाली http://www.perforce.com/ -Comment[nl]=Integreert Perforce, een systeem voor softwareconfiguratie. Zie http://www.perforce.com/ -Comment[pl]=Integracja z Perforce, systemem zarządzania konfiguracją oprogramowania. http://www.perforce.com/ -Comment[pt]=Integra o Perforce, um sistema de gestão de configurações de 'software'. http://www.perforce.com/ -Comment[pt_BR]=Integra o Perforce, um software de configuração e gerenciamento do sistema. http://www.perforce.com/ -Comment[ru]=Интегрирует Perforce, систему управления конфигурациями программного обеспечения. http://www.perforce.com/ -Comment[sk]=Integrácia Perforce, konfiguračný projektový manažment. http://www.perforce.com/ -Comment[sl]=Integrira Perforce, upravljalni sistem programja. http://www.perforce.com/ -Comment[sr]=Интегрише Perforce, систем за управљање подешавањем софтвера. http://www.perforce.com/ -Comment[sr@Latn]=Integriše Perforce, sistem za upravljanje podešavanjem softvera. http://www.perforce.com/ -Comment[sv]=Integrerar Perforce, ett konfigurationshanteringsverktyg för programvara. http://www.perforce.com/ -Comment[ta]=ஒருங்கிணைக்கும் Perforce, ஒரு மென்பொருள் மேலாளர் அமைப்பு. http://www.perforce.com/ -Comment[tg]=Интеграл намудани Perforce, барномаи идоракунандаро шарҳи барномаҳои таъмин нигоҳ медорад.http://www.perforce.com/ -Comment[tr]=Bir yazılım ayar yönetimi sistemi olan Perforce'u bütünleştirir. http://www.perforce.com/ -Comment[zh_CN]=集成 Perforce,系统配置管理软件 http://www.perforce.com/ -Comment[zh_TW]=整合 Perforce,一套軟體設定管理系統。http://www.perforce.com/ -Name=KDevPerforce -Name[da]=TDevelop Perforce -Name[de]=Unterstützung für Perforce (TDevelop) -Name[hi]=के-डेव-परफ़ोर्स -Name[nds]=Perforce-Ünnerstütten för TDevelop -Name[sk]=KDev Perforce -Name[sv]=TDevelop Perforce -Name[ta]=Kdev Perforce -Name[zh_TW]=TDevelop Perforce -GenericName=Perforce Integration -GenericName[ca]=Integració amb Perforce -GenericName[da]=Perforce integration -GenericName[de]=Perforce-Integration -GenericName[el]=Ενσωμάτωση Perforce -GenericName[es]=Integración de Perforce -GenericName[et]=Perforce'i põimimine -GenericName[eu]=Perforce integrazioa -GenericName[fa]=مجتمع‌سازی Perforce -GenericName[fr]=Intégration de « Perforce » -GenericName[ga]=Comhtháthú Perforce -GenericName[gl]=Integración de Perforce -GenericName[hi]=परफ़ोर्स इंटीग्रेशन -GenericName[hu]=Perforce-integráció -GenericName[it]=Integrazione di Perforce -GenericName[ms]=Intergrasi Perforce -GenericName[nds]=Perforce-Integreren -GenericName[ne]=परफोर्स इन्टिग्रेसन -GenericName[nl]=Perforce-integratie -GenericName[pl]=Integracja z Perforce -GenericName[pt]=Integração com o Perforce -GenericName[pt_BR]=Integração com o Perforce -GenericName[ru]=Интеграция Perforce -GenericName[sk]=Perforce integrácia -GenericName[sl]=Integracija Perforce -GenericName[sr]=Интеграција perforce-а -GenericName[sr@Latn]=Integracija perforce-a -GenericName[sv]=Integrering av Perforce -GenericName[ta]=Perforce ஒருங்கிணைப்பு -GenericName[tg]=Интегратсия Perforce -GenericName[tr]=Perforce Bütünleştirmesi -GenericName[zh_CN]=Perforce 集成 -GenericName[zh_TW]=Perforce 整合 -ServiceTypes=TDevelop/VersionControl -X-TDE-Library=libtdevperforce -X-TDevelop-Version=5 -X-TDevelop-Properties=VCS,PerforceVCS diff --git a/vcs/perforce/tdevperforcepart.rc b/vcs/perforce/tdevperforcepart.rc deleted file mode 100644 index 27b5fe08..00000000 --- a/vcs/perforce/tdevperforcepart.rc +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - &Version Control - - - &Perforce - - - - - - - - - - - - - - diff --git a/vcs/subversion/CMakeLists.txt b/vcs/subversion/CMakeLists.txt index 63ffad4b..fb51fe3d 100644 --- a/vcs/subversion/CMakeLists.txt +++ b/vcs/subversion/CMakeLists.txt @@ -31,19 +31,19 @@ link_directories( ##### other data ################################ install( FILES - tdevsubversion.desktop tdevsvn+file.protocol - tdevsvn+http.protocol tdevsvn+https.protocol - tdevsvn+ssh.protocol tdevsvn+svn.protocol + kdevsubversion.desktop kdevsvn+file.protocol + kdevsvn+http.protocol kdevsvn+https.protocol + kdevsvn+ssh.protocol kdevsvn+svn.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) install( FILES - tdevsvnd.desktop + kdevsvnd.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded ) -##### libtdevsubversion (module) ################ +##### libkdevsubversion (module) ################ -tde_add_kpart( libtdevsubversion AUTOMOC +tde_add_kpart( libkdevsubversion AUTOMOC SOURCES subversion_core.cpp subversion_fileinfo.cpp subversion_fileinfo.skel subversion_part.cpp @@ -54,14 +54,14 @@ tde_add_kpart( libtdevsubversion AUTOMOC svn_logviewoptiondlgbase.ui svn_logviewwidget.cpp svn_mergeoptiondlgbase.ui svn_mergewidget.cpp svn_switchdlgbase.ui svn_switchwidget.cpp - LINK tdevextensions-static tdevelop-shared + LINK kdevextensions-static tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) -##### tdeio_tdevsvn (module) ###################### +##### tdeio_kdevsvn (module) ###################### -tde_add_kpart( tdeio_tdevsvn AUTOMOC +tde_add_kpart( tdeio_kdevsvn AUTOMOC SOURCES svn_tdeio.cpp LINK tdeio-shared ${SVN_LIBRARIES} ${APR_LIBRARIES} @@ -69,12 +69,12 @@ tde_add_kpart( tdeio_tdevsvn AUTOMOC ) -##### kded_tdevsvnd (module) #################### +##### kded_kdevsvnd (module) #################### -tde_add_kpart( kded_tdevsvnd AUTOMOC +tde_add_kpart( kded_kdevsvnd AUTOMOC SOURCES - commitdlg.cpp commitdlgbase.ui tdevsvnd.cpp tdevsvnd.skel - tdevsvnd_widgets.cpp svnssltrustpromptbase.ui + commitdlg.cpp commitdlgbase.ui kdevsvnd.cpp kdevsvnd.skel + kdevsvnd_widgets.cpp svnssltrustpromptbase.ui LINK tdeio-shared tdeinit_kded-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/subversion/Makefile.am b/vcs/subversion/Makefile.am index 2f650195..a66b80dd 100644 --- a/vcs/subversion/Makefile.am +++ b/vcs/subversion/Makefile.am @@ -2,37 +2,37 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util -I$(top_srcdi METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevsubversion.la tdeio_tdevsvn.la kded_tdevsvnd.la +kde_module_LTLIBRARIES = libkdevsubversion.la tdeio_kdevsvn.la kded_kdevsvnd.la -libtdevsubversion_la_SOURCES = subversion_core.cpp subversion_fileinfo.cpp \ +libkdevsubversion_la_SOURCES = subversion_core.cpp subversion_fileinfo.cpp \ subversion_fileinfo.skel subversion_part.cpp subversion_widget.cpp subversiondiff.ui \ subversionprojectwidget.ui svn_blamewidget.cpp svn_co.ui svn_commitdlgbase.ui svn_copydlgwidget.ui \ svn_copywidget.cpp svn_fileselectdlg_commit.cpp svn_logviewoptiondlgbase.ui \ svn_logviewwidget.cpp svn_mergeoptiondlgbase.ui svn_mergewidget.cpp svn_switchdlgbase.ui \ svn_switchwidget.cpp -libtdevsubversion_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la -libtdevsubversion_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevsubversion_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la +libkdevsubversion_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -tdeio_tdevsvn_la_SOURCES = svn_tdeio.cpp -tdeio_tdevsvn_la_LIBADD = $(LIB_TDEIO) -tdeio_tdevsvn_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) $(SVN_LIB) +tdeio_kdevsvn_la_SOURCES = svn_tdeio.cpp +tdeio_kdevsvn_la_LIBADD = $(LIB_TDEIO) +tdeio_kdevsvn_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) $(SVN_LIB) -kded_tdevsvnd_la_SOURCES = commitdlg.cpp commitdlgbase.ui tdevsvnd.cpp \ - tdevsvnd.skel tdevsvnd_widgets.cpp svnssltrustpromptbase.ui -kded_tdevsvnd_la_LIBADD = $(LIB_TDEIO) -ltdeinit_kded -kded_tdevsvnd_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +kded_kdevsvnd_la_SOURCES = commitdlg.cpp commitdlgbase.ui kdevsvnd.cpp \ + kdevsvnd.skel kdevsvnd_widgets.cpp svnssltrustpromptbase.ui +kded_kdevsvnd_la_LIBADD = $(LIB_TDEIO) -ltdeinit_kded +kded_kdevsvnd_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) kdeddir = $(kde_servicesdir)/kded -kded_DATA = tdevsvnd.desktop +kded_DATA = kdevsvnd.desktop servicedir = $(kde_servicesdir) -service_DATA = tdevsubversion.desktop +service_DATA = kdevsubversion.desktop protocoldir = $(kde_servicesdir) -protocol_DATA = tdevsvn+file.protocol tdevsvn+http.protocol tdevsvn+https.protocol tdevsvn+ssh.protocol tdevsvn+svn.protocol +protocol_DATA = kdevsvn+file.protocol kdevsvn+http.protocol kdevsvn+https.protocol kdevsvn+ssh.protocol kdevsvn+svn.protocol SUBDIRS = integrator -noinst_HEADERS = commitdlg.h tdevsvnd.h svn_blamewidget.h svn_copywidget.h \ +noinst_HEADERS = commitdlg.h kdevsvnd.h svn_blamewidget.h svn_copywidget.h \ svn_fileselectdlg_commit.h svn_logviewwidget.h svn_mergewidget.h svn_switchwidget.h diff --git a/vcs/subversion/integrator/CMakeLists.txt b/vcs/subversion/integrator/CMakeLists.txt index 3d6c7ad3..2256b8e3 100644 --- a/vcs/subversion/integrator/CMakeLists.txt +++ b/vcs/subversion/integrator/CMakeLists.txt @@ -26,7 +26,7 @@ link_directories( ##### other data ################################ -install( FILES tdevsubversionintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevsubversionintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) ##### libsubversionintegrator (module) ########## @@ -35,6 +35,6 @@ tde_add_kpart( libsubversionintegrator AUTOMOC SOURCES subversionintegrator.cpp svnintegratordlgbase.ui svnintegratordlg.cpp - LINK tdevextras-shared tdevelop-shared + LINK kdevextras-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/subversion/integrator/Makefile.am b/vcs/subversion/integrator/Makefile.am index aded8465..231dc3c7 100644 --- a/vcs/subversion/integrator/Makefile.am +++ b/vcs/subversion/integrator/Makefile.am @@ -6,9 +6,9 @@ METASOURCES = AUTO kde_module_LTLIBRARIES = libsubversionintegrator.la libsubversionintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries) libsubversionintegrator_la_LIBADD =\ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la\ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la\ $(top_builddir)/lib/libtdevelop.la -kde_services_DATA = tdevsubversionintegrator.desktop +kde_services_DATA = kdevsubversionintegrator.desktop noinst_HEADERS = subversionintegrator.h svnintegratordlg.h libsubversionintegrator_la_SOURCES = subversionintegrator.cpp \ svnintegratordlgbase.ui svnintegratordlg.cpp diff --git a/vcs/subversion/integrator/kdevsubversionintegrator.desktop b/vcs/subversion/integrator/kdevsubversionintegrator.desktop new file mode 100644 index 00000000..6e666667 --- /dev/null +++ b/vcs/subversion/integrator/kdevsubversionintegrator.desktop @@ -0,0 +1,45 @@ +[Desktop Entry] +Type=Service +Name=KDevSubversionIntegrator +Name[da]=TDevelop Subversion-integration +Name[nds]=TDevelop-Subversion-Integreren +Name[sk]=KDev Subversion integrácia +Name[sv]=TDevelop Subversion-integration +Name[zh_TW]=TDevelop Subversion 整合器 +Comment=Subversion Project Integration Facility +Comment[ca]=Facilitat per a la integració amb Subversion +Comment[da]=Subversion projektintegration +Comment[de]=Subversion-Projektintegration +Comment[el]=Λειτουργία ενσωμάτωσης Subversion στο έργο +Comment[es]=Facilidad para integración con proyectos que utilicen Subversion +Comment[et]=Subversion projekti põimimisvahend +Comment[eu]=Subversion proiektuen integrazio-tesna +Comment[fa]=تسهیلات مجتمع‌سازی پروژۀ زیرنسخه +Comment[fr]=Fonction d'intégration pour un projet utilisant Subversion +Comment[gl]=Utilidade para a integración de proxectos Subversión +Comment[hu]=Projektintegrálást tesz lehetővé a Subversion-nel +Comment[it]=Funzione di integrazione del progetto Subversion +Comment[ja]=Subversion プロジェクト統合ツール +Comment[ms]=Kemudahan Integrasi Projek Subversion +Comment[nds]=Subversion-Projektintegreren +Comment[ne]=सबभर्सन परियोजना एकिकरण सुविधा +Comment[nl]=Subversion project-integratie +Comment[pl]=Integracja z Subversion +Comment[pt]=Integração com Projectos Subversion +Comment[pt_BR]=Facilidade de Integração ao Projeto de Subversão +Comment[ru]=Интеграция Subversion +Comment[sk]=Subversion projektová integrácia +Comment[sr]=Интеграција Subversion-а у пројекат +Comment[sr@Latn]=Integracija Subversion-a u projekat +Comment[sv]=Funktion för integrering av Subversion i projekt +Comment[tr]=Subversion Proje Bütünleştirme Aracı +Comment[zh_CN]=Subversion 工程集成功能 +Comment[zh_TW]=Subversion 專案整合工具 +Icon=misc +Exec=blubb +ServiceTypes=TDevelop/VCSIntegrator +X-TDE-Library=libsubversionintegrator +X-TDevelop-Default=false +X-TDevelop-VCS=Subversion +X-TDevelop-VCSPlugin=kdevsubversion +X-TDevelop-Version=5 diff --git a/vcs/subversion/integrator/subversionintegrator.cpp b/vcs/subversion/integrator/subversionintegrator.cpp index da8fed8c..32d28d27 100644 --- a/vcs/subversion/integrator/subversionintegrator.cpp +++ b/vcs/subversion/integrator/subversionintegrator.cpp @@ -19,19 +19,19 @@ ***************************************************************************/ #include "subversionintegrator.h" -#include -#include +#include +#include #include "svnintegratordlg.h" -static const TDevPluginInfo data("tdevsubversionintegrator"); -typedef TDevGenericFactory SubversionIntegratorFactory; +static const KDevPluginInfo data("kdevsubversionintegrator"); +typedef KDevGenericFactory SubversionIntegratorFactory; K_EXPORT_COMPONENT_FACTORY( libsubversionintegrator, SubversionIntegratorFactory(data) ) SubversionIntegrator::SubversionIntegrator(TQObject* parent, const char* name, const TQStringList // args ) - :TDevVCSIntegrator(parent, name) + :KDevVCSIntegrator(parent, name) { } diff --git a/vcs/subversion/integrator/subversionintegrator.h b/vcs/subversion/integrator/subversionintegrator.h index 6c7d16ac..01c43516 100644 --- a/vcs/subversion/integrator/subversionintegrator.h +++ b/vcs/subversion/integrator/subversionintegrator.h @@ -20,11 +20,11 @@ #ifndef SUBVERSIONINTEGRATOR_H #define SUBVERSIONINTEGRATOR_H -#include +#include #include -class SubversionIntegrator : public TDevVCSIntegrator +class SubversionIntegrator : public KDevVCSIntegrator { Q_OBJECT diff --git a/vcs/subversion/integrator/svnintegratordlg.cpp b/vcs/subversion/integrator/svnintegratordlg.cpp index 35e4216b..87ccf488 100644 --- a/vcs/subversion/integrator/svnintegratordlg.cpp +++ b/vcs/subversion/integrator/svnintegratordlg.cpp @@ -47,7 +47,7 @@ SvnIntegratorDlg::SvnIntegratorDlg( TQWidget *parent, const char *name ) void SvnIntegratorDlg::accept() { // to let ioslave know which protocol it should start. - KURL protocolUrl = KURL("tdevsvn+svn://blah/"); + KURL protocolUrl = KURL("kdevsvn+svn://blah/"); KURL servURL( repos1->url() ); if ( servURL.isEmpty() ) return; diff --git a/vcs/subversion/integrator/svnintegratordlg.h b/vcs/subversion/integrator/svnintegratordlg.h index bc8e8407..ccf1686f 100644 --- a/vcs/subversion/integrator/svnintegratordlg.h +++ b/vcs/subversion/integrator/svnintegratordlg.h @@ -21,7 +21,7 @@ #define SVNINTEGRATORDLG_H #include "svnintegratordlgbase.h" -#include +#include class SvnIntegratorDlg: public SvnIntegratorDlgBase, public VCSDialog { Q_OBJECT diff --git a/vcs/subversion/integrator/tdevsubversionintegrator.desktop b/vcs/subversion/integrator/tdevsubversionintegrator.desktop deleted file mode 100644 index 6e666667..00000000 --- a/vcs/subversion/integrator/tdevsubversionintegrator.desktop +++ /dev/null @@ -1,45 +0,0 @@ -[Desktop Entry] -Type=Service -Name=KDevSubversionIntegrator -Name[da]=TDevelop Subversion-integration -Name[nds]=TDevelop-Subversion-Integreren -Name[sk]=KDev Subversion integrácia -Name[sv]=TDevelop Subversion-integration -Name[zh_TW]=TDevelop Subversion 整合器 -Comment=Subversion Project Integration Facility -Comment[ca]=Facilitat per a la integració amb Subversion -Comment[da]=Subversion projektintegration -Comment[de]=Subversion-Projektintegration -Comment[el]=Λειτουργία ενσωμάτωσης Subversion στο έργο -Comment[es]=Facilidad para integración con proyectos que utilicen Subversion -Comment[et]=Subversion projekti põimimisvahend -Comment[eu]=Subversion proiektuen integrazio-tesna -Comment[fa]=تسهیلات مجتمع‌سازی پروژۀ زیرنسخه -Comment[fr]=Fonction d'intégration pour un projet utilisant Subversion -Comment[gl]=Utilidade para a integración de proxectos Subversión -Comment[hu]=Projektintegrálást tesz lehetővé a Subversion-nel -Comment[it]=Funzione di integrazione del progetto Subversion -Comment[ja]=Subversion プロジェクト統合ツール -Comment[ms]=Kemudahan Integrasi Projek Subversion -Comment[nds]=Subversion-Projektintegreren -Comment[ne]=सबभर्सन परियोजना एकिकरण सुविधा -Comment[nl]=Subversion project-integratie -Comment[pl]=Integracja z Subversion -Comment[pt]=Integração com Projectos Subversion -Comment[pt_BR]=Facilidade de Integração ao Projeto de Subversão -Comment[ru]=Интеграция Subversion -Comment[sk]=Subversion projektová integrácia -Comment[sr]=Интеграција Subversion-а у пројекат -Comment[sr@Latn]=Integracija Subversion-a u projekat -Comment[sv]=Funktion för integrering av Subversion i projekt -Comment[tr]=Subversion Proje Bütünleştirme Aracı -Comment[zh_CN]=Subversion 工程集成功能 -Comment[zh_TW]=Subversion 專案整合工具 -Icon=misc -Exec=blubb -ServiceTypes=TDevelop/VCSIntegrator -X-TDE-Library=libsubversionintegrator -X-TDevelop-Default=false -X-TDevelop-VCS=Subversion -X-TDevelop-VCSPlugin=kdevsubversion -X-TDevelop-Version=5 diff --git a/vcs/subversion/kdevpart_subversion.rc b/vcs/subversion/kdevpart_subversion.rc new file mode 100644 index 00000000..ad957e99 --- /dev/null +++ b/vcs/subversion/kdevpart_subversion.rc @@ -0,0 +1,31 @@ + + + + &Tools + &Version Control + + + &Subversion + + + + + + + + + + + + + + + + + + + + + diff --git a/vcs/subversion/kdevsubversion.desktop b/vcs/subversion/kdevsubversion.desktop new file mode 100644 index 00000000..bf52db8c --- /dev/null +++ b/vcs/subversion/kdevsubversion.desktop @@ -0,0 +1,34 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Subversion +Comment[fa]=زیرنسخه +Comment[hi]=सबवर्सन +Comment[ne]=सबभर्सन +Comment[pt_BR]=Subversão +Comment[ru]=Интеграция Subversion +Comment[ta]=உப பதிப்பு +Comment[tg]=Интегратсия Subversion +Name=KDevsubversion +Name[da]=TDevelop Subversion +Name[de]=Unterstützung für Subversion (TDevelop) +Name[hi]=के-डेव-सबवर्सन +Name[nds]=Subversion-Ünnerstütten för TDevelop +Name[sk]=KDev Subversion +Name[sv]=TDevelop Subversion +Name[ta]=kdev உப பதிப்பு +Name[tg]=KDevзер-ривоят +Name[zh_TW]=TDevelop Subversion +GenericName=Subversion +GenericName[fa]=زیرنسخه +GenericName[hi]=सबवर्सन +GenericName[ne]=सबभर्सन +GenericName[pt_BR]=Subversão +GenericName[ru]=Интеграция Subversion +GenericName[ta]=துணை பதிப்பு +GenericName[tg]=Зер-ривоят +Icon=misc +ServiceTypes=TDevelop/VersionControl +X-TDE-Library=libkdevsubversion +X-TDevelop-Version=5 +X-TDevelop-Properties=VCS,SubversionVCS diff --git a/vcs/subversion/kdevsvn+file.protocol b/vcs/subversion/kdevsvn+file.protocol new file mode 100644 index 00000000..412c3800 --- /dev/null +++ b/vcs/subversion/kdevsvn+file.protocol @@ -0,0 +1,39 @@ +[Protocol] +exec=tdeio_kdevsvn +protocol=kdevsvn+file +input=none +output=filesystem +reading=true +writing=true +deleting=true +makedir=true +linking=false +moving=true +deleteRecursive=true +listing=Name,Size,Date,Owner +defaultMimetype=application/octet-stream +Icon=remote +Description=Subversion ioslave for TDevelop +Description[ca]=L'esclau io (ioslave) Subversion per a TDevelop +Description[de]=Ein-/Ausgabemodul für Subversion (TDevelop) +Description[el]=Subversion ioslave για το TDevelop +Description[es]=El ioslave de Subversion para TDevelop +Description[et]=TDevelopi Subversioni IO-moodul +Description[fr]=Esclave d'E/S (ioslave) Subversion pour TDevelop +Description[hu]=Subversion KDE-protokoll a TDevelophoz +Description[it]=ioslave di subversion per TDevelop +Description[ja]=TDevelop のための Subversion ioslave +Description[ms]=IOslave Subversion untuk TDevelop +Description[nds]=TDevelop-In-/Utgaavmoduul för Subversion +Description[nl]=Subversion-ioslave voor TDevelop +Description[pl]=Wtyczka protokołu Subversion dla TDevelopa +Description[pt]='Ioslave' do Subversion para o TDevelop +Description[pt_BR]='Ioslave' do Subversion para o TDevelop +Description[ru]=Поддержка протокола Subversion для TDevelop +Description[sk]=Subversion ioslave pre TDevelop +Description[sr]=KIOSlave Subversion-а за TDevelop +Description[sr@Latn]=KIOSlave Subversion-a za TDevelop +Description[sv]=Subversion I/O-slav för TDevelop +Description[zh_TW]=TDevelop 的 Subversion ioslave +maxInstances=5 +class=:internet diff --git a/vcs/subversion/kdevsvn+http.protocol b/vcs/subversion/kdevsvn+http.protocol new file mode 100644 index 00000000..5a063b85 --- /dev/null +++ b/vcs/subversion/kdevsvn+http.protocol @@ -0,0 +1,39 @@ +[Protocol] +exec=tdeio_kdevsvn +protocol=kdevsvn+http +input=none +output=filesystem +reading=true +writing=true +deleting=true +makedir=true +linking=false +moving=true +deleteRecursive=true +listing=Name,Size,Date,Owner +defaultMimetype=application/octet-stream +Icon=remote +Description=Subversion ioslave for TDevelop +Description[ca]=L'esclau io (ioslave) Subversion per a TDevelop +Description[de]=Ein-/Ausgabemodul für Subversion (TDevelop) +Description[el]=Subversion ioslave για το TDevelop +Description[es]=El ioslave de Subversion para TDevelop +Description[et]=TDevelopi Subversioni IO-moodul +Description[fr]=Esclave d'E/S (ioslave) Subversion pour TDevelop +Description[hu]=Subversion KDE-protokoll a TDevelophoz +Description[it]=ioslave di subversion per TDevelop +Description[ja]=TDevelop のための Subversion ioslave +Description[ms]=IOslave Subversion untuk TDevelop +Description[nds]=TDevelop-In-/Utgaavmoduul för Subversion +Description[nl]=Subversion-ioslave voor TDevelop +Description[pl]=Wtyczka protokołu Subversion dla TDevelopa +Description[pt]='Ioslave' do Subversion para o TDevelop +Description[pt_BR]='Ioslave' do Subversion para o TDevelop +Description[ru]=Поддержка протокола Subversion для TDevelop +Description[sk]=Subversion ioslave pre TDevelop +Description[sr]=KIOSlave Subversion-а за TDevelop +Description[sr@Latn]=KIOSlave Subversion-a za TDevelop +Description[sv]=Subversion I/O-slav för TDevelop +Description[zh_TW]=TDevelop 的 Subversion ioslave +maxInstances=5 +class=:internet diff --git a/vcs/subversion/kdevsvn+https.protocol b/vcs/subversion/kdevsvn+https.protocol new file mode 100644 index 00000000..d064e575 --- /dev/null +++ b/vcs/subversion/kdevsvn+https.protocol @@ -0,0 +1,39 @@ +[Protocol] +exec=tdeio_kdevsvn +protocol=kdevsvn+https +input=none +output=filesystem +reading=true +writing=true +deleting=true +makedir=true +linking=false +moving=true +deleteRecursive=true +listing=Name,Size,Date,Owner +defaultMimetype=application/octet-stream +Icon=remote +Description=Subversion ioslave for TDevelop +Description[ca]=L'esclau io (ioslave) Subversion per a TDevelop +Description[de]=Ein-/Ausgabemodul für Subversion (TDevelop) +Description[el]=Subversion ioslave για το TDevelop +Description[es]=El ioslave de Subversion para TDevelop +Description[et]=TDevelopi Subversioni IO-moodul +Description[fr]=Esclave d'E/S (ioslave) Subversion pour TDevelop +Description[hu]=Subversion KDE-protokoll a TDevelophoz +Description[it]=ioslave di subversion per TDevelop +Description[ja]=TDevelop のための Subversion ioslave +Description[ms]=IOslave Subversion untuk TDevelop +Description[nds]=TDevelop-In-/Utgaavmoduul för Subversion +Description[nl]=Subversion-ioslave voor TDevelop +Description[pl]=Wtyczka protokołu Subversion dla TDevelopa +Description[pt]='Ioslave' do Subversion para o TDevelop +Description[pt_BR]='Ioslave' do Subversion para o TDevelop +Description[ru]=Поддержка протокола Subversion для TDevelop +Description[sk]=Subversion ioslave pre TDevelop +Description[sr]=KIOSlave Subversion-а за TDevelop +Description[sr@Latn]=KIOSlave Subversion-a za TDevelop +Description[sv]=Subversion I/O-slav för TDevelop +Description[zh_TW]=TDevelop 的 Subversion ioslave +maxInstances=5 +class=:internet diff --git a/vcs/subversion/kdevsvn+ssh.protocol b/vcs/subversion/kdevsvn+ssh.protocol new file mode 100644 index 00000000..512b4a90 --- /dev/null +++ b/vcs/subversion/kdevsvn+ssh.protocol @@ -0,0 +1,39 @@ +[Protocol] +exec=tdeio_kdevsvn +protocol=kdevsvn+ssh +input=none +output=filesystem +reading=true +writing=true +deleting=true +makedir=true +linking=false +moving=true +deleteRecursive=true +listing=Name,Size,Date,Owner +defaultMimetype=application/octet-stream +Icon=remote +Description=Subversion ioslave for TDevelop +Description[ca]=L'esclau io (ioslave) Subversion per a TDevelop +Description[de]=Ein-/Ausgabemodul für Subversion (TDevelop) +Description[el]=Subversion ioslave για το TDevelop +Description[es]=El ioslave de Subversion para TDevelop +Description[et]=TDevelopi Subversioni IO-moodul +Description[fr]=Esclave d'E/S (ioslave) Subversion pour TDevelop +Description[hu]=Subversion KDE-protokoll a TDevelophoz +Description[it]=ioslave di subversion per TDevelop +Description[ja]=TDevelop のための Subversion ioslave +Description[ms]=IOslave Subversion untuk TDevelop +Description[nds]=TDevelop-In-/Utgaavmoduul för Subversion +Description[nl]=Subversion-ioslave voor TDevelop +Description[pl]=Wtyczka protokołu Subversion dla TDevelopa +Description[pt]='Ioslave' do Subversion para o TDevelop +Description[pt_BR]='Ioslave' do Subversion para o TDevelop +Description[ru]=Поддержка протокола Subversion для TDevelop +Description[sk]=Subversion ioslave pre TDevelop +Description[sr]=KIOSlave Subversion-а за TDevelop +Description[sr@Latn]=KIOSlave Subversion-a za TDevelop +Description[sv]=Subversion I/O-slav för TDevelop +Description[zh_TW]=TDevelop 的 Subversion ioslave +maxInstances=5 +class=:internet diff --git a/vcs/subversion/kdevsvn+svn.protocol b/vcs/subversion/kdevsvn+svn.protocol new file mode 100644 index 00000000..8f496854 --- /dev/null +++ b/vcs/subversion/kdevsvn+svn.protocol @@ -0,0 +1,39 @@ +[Protocol] +exec=tdeio_kdevsvn +protocol=kdevsvn+svn +input=none +output=filesystem +reading=true +writing=true +deleting=true +makedir=true +linking=false +moving=true +deleteRecursive=true +listing=Name,Size,Date,Owner +defaultMimetype=application/octet-stream +Icon=remote +Description=Subversion ioslave for TDevelop +Description[ca]=L'esclau io (ioslave) Subversion per a TDevelop +Description[de]=Ein-/Ausgabemodul für Subversion (TDevelop) +Description[el]=Subversion ioslave για το TDevelop +Description[es]=El ioslave de Subversion para TDevelop +Description[et]=TDevelopi Subversioni IO-moodul +Description[fr]=Esclave d'E/S (ioslave) Subversion pour TDevelop +Description[hu]=Subversion KDE-protokoll a TDevelophoz +Description[it]=ioslave di subversion per TDevelop +Description[ja]=TDevelop のための Subversion ioslave +Description[ms]=IOslave Subversion untuk TDevelop +Description[nds]=TDevelop-In-/Utgaavmoduul för Subversion +Description[nl]=Subversion-ioslave voor TDevelop +Description[pl]=Wtyczka protokołu Subversion dla TDevelopa +Description[pt]='Ioslave' do Subversion para o TDevelop +Description[pt_BR]='Ioslave' do Subversion para o TDevelop +Description[ru]=Поддержка протокола Subversion для TDevelop +Description[sk]=Subversion ioslave pre TDevelop +Description[sr]=KIOSlave Subversion-а за TDevelop +Description[sr@Latn]=KIOSlave Subversion-a za TDevelop +Description[sv]=Subversion I/O-slav för TDevelop +Description[zh_TW]=TDevelop 的 Subversion ioslave +maxInstances=5 +class=:internet diff --git a/vcs/subversion/kdevsvnd.cpp b/vcs/subversion/kdevsvnd.cpp new file mode 100644 index 00000000..c1faf65e --- /dev/null +++ b/vcs/subversion/kdevsvnd.cpp @@ -0,0 +1,394 @@ +/* + This file is part of the KDE Project + + Copyright (C) 2003, 2004 Mickael Marchand + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + This software 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 library; see the file COPYING. 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 "config.h" + +#include "kdevsvnd.h" + +#include "kdevsvnd_widgets.h" +#include "commitdlg.h" + +extern "C" { + KDE_EXPORT KDEDModule *create_kdevsvnd(const TQCString &name) { + return new KDevSvnd(name); + } +} + +KDevSvnd::KDevSvnd(const TQCString &name) + : KDEDModule(name) { +} +KDevSvnd::~KDevSvnd() +{} + +TQString KDevSvnd::commitDialog(TQString modifiedFiles) { + CommitDlg commitDlg; + commitDlg.setCaption(i18n("Enter Commit Log Message:")); + commitDlg.listMessage->setText( modifiedFiles ); + int result = commitDlg.exec(); + if ( result == TQDialog::Accepted ) { + return commitDlg.textMessage->text(); + } else + return TQString(); +} +int KDevSvnd::sslServerTrustPrompt( TQString errmsg, TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ) +{ + SvnSSLTrustPrompt dlg; + dlg.setupCertInfo( hostname, fingerPrint, validfrom, validuntil, issuerName, ascii_cert ); + dlg.setupFailedReasonMsg( errmsg ); + int result = dlg.exec(); + if ( result == TQDialog::Accepted ){ + return dlg.code(); + } else{ + return -1; + } +} +TQString KDevSvnd::sslCertFile() +{ + TQString fileName = KFileDialog::getOpenFileName(TQString(),TQString(),0, i18n("Open SSL certificate file")); + return fileName; +} +TQCString KDevSvnd::sslPasswdDlg(TQString promptMsg) +{ + TQCString passwd; + int ret = KPasswordDialog::getPassword( passwd,promptMsg ); + if( ret == KPasswordDialog::Accepted ){ + TQCString retstr; + retstr.setNum(1); + return retstr + passwd; + } else{ + TQCString nullstr; + nullstr.setNum(-1); + return nullstr; + } +} + + +// void KDevSvnd::registerMe(const TQCString &app) +// { +// insert(app, "test", new TestObject(app)); +// // When 'app' unregisters with DCOP, the TestObject will get deleted. +// } + +// bool KSvnd::AreAnyFilesInSvn( const KURL::List& wclist ) { +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; +// TQDir bdir ( ( *it ).path() ); +// if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { +// return true; +// } else if ( !bdir.exists() ) { +// if ( isFileInSvnEntries( ( *it ).fileName(), ( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) +// return true; +// } +// } +// return false; +// } +// +// bool KSvnd::AreAnyFilesNotInSvn( const KURL::List& wclist ) { +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; +// TQDir bdir ( ( *it ).path() ); +// if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { +// return true; +// } else if ( !bdir.exists() ) { +// if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) +// return true; +// } +// } +// return false; +// } +// +// bool KSvnd::AreAllFilesInSvn( const KURL::List& wclist ) { +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; +// TQDir bdir ( ( *it ).path() ); +// if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { +// return false; +// } else if ( !bdir.exists() ) { +// if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) +// return false; +// } +// } +// return true; +// } +// +// bool KSvnd::AreAllFilesNotInSvn( const KURL::List& wclist ) { +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; +// TQDir bdir ( ( *it ).path() ); +// if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { +// return false; +// } else if ( !bdir.exists() ) { +// if ( isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) +// return false; +// } +// } +// return true; +// } +// +// bool KSvnd::isFileInSvnEntries ( const TQString filename, const TQString entfile ) { +// TQFile file( entfile ); +// if ( file.open( IO_ReadOnly ) ) { +// TQTextStream stream( &file ); +// TQString line; +// while ( !stream.atEnd() ) { +// line = stream.readLine().simplifyWhiteSpace(); +// if ( line == "name=\""+ filename + "\"" ) { +// file.close(); +// return true; +// } +// } +// file.close(); +// } +// return false; +// } +// +// bool KSvnd::isFileInExternals ( const TQString filename, const TQString propfile ) { +// TQFile file( propfile ); +// if ( file.open( IO_ReadOnly ) ) { +// TQTextStream stream( &file ); +// TQStringList line; +// while ( !stream.atEnd() ) +// line << stream.readLine().simplifyWhiteSpace(); +// for ( uint i = 0 ; i < line.count(); i++ ) { +// if ( line[ i ] == "K 13" && line[ i+1 ] == "svn:externals" ) { //Key 13 : svn:externals +// //next line should be "V xx" +// if ( line [ i+2 ].startsWith( "V " ) ) { +// //ok browse the values now +// i+=2; +// while ( i < line.count() ) { +// if ( line[ i ].startsWith( filename+" " ) ) { //found it ! +// file.close( ); +// return true; +// } else if ( line[ i ].isEmpty() ) { +// file.close( ); +// return false; //we are out of svn:externals now... +// } +// i++; +// } +// } +// } +// } +// file.close(); +// } +// return false; +// } +// +// bool KSvnd::anyNotValidWorkingCopy( const KURL::List& wclist ) { +// bool result = true; //one negative match is enough +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// //exception for .svn dirs +// if ( ( *it ).path(-1).endsWith( "/.svn" ) ) +// return true; +// //if is a directory check whether it contains a .svn/entries file +// TQDir dir( ( *it ).path() ); +// if ( dir.exists() ) { //it's a dir +// if ( !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) +// result = false; +// } +// +// //else check if ./.svn/entries exists +// if ( !TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) +// result = false; +// } +// return result; +// } +// +// bool KSvnd::anyValidWorkingCopy( const KURL::List& wclist ) { +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// //skip .svn dirs +// if ( ( *it ).path(-1).endsWith( "/.svn" ) ) +// continue; +// //if is a directory check whether it contains a .svn/entries file +// TQDir dir( ( *it ).path() ); +// if ( dir.exists() ) { //it's a dir +// if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) +// return true; +// } +// +// //else check if ./.svn/entries exists +// if ( TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) +// return true; +// } +// return false; +// } +// +// int KSvnd::getStatus( const KURL::List& list ) { +// int result = 0; +// uint files = 0, folders = 0, parentsentries = 0, parentshavesvn = 0, subdirhavesvn = 0, external = 0; +// for ( TQValueListConstIterator it = list.begin(); it != list.end() ; ++it ) { +// if ( isFolder ( ( *it ) ) ) { +// folders++; +// } else { +// files++; +// } +// if ( isFileInSvnEntries ( (*it).filename(),( *it ).directory() + "/.svn/entries" ) ) { // normal subdir known in the working copy +// parentsentries++; +// } else if ( isFolder( *it ) ) { // other subfolders (either another module checkouted or an external, or something not known at all) +// if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) +// subdirhavesvn++; +// if ( isFileInExternals( (*it).filename(), ( *it ).directory() + "/.svn/dir-props" ) ) { +// external++; +// } +// } +// if ( ( isFolder( ( *it ) ) && TQFile::exists( ( *it ).directory() + "../.svn/entries" ) ) || TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) //parent has a .svn ? +// parentshavesvn++; +// } +// if ( files > 0 ) +// result |= SomeAreFiles; +// if ( folders == list.count() ) { +// result |= AllAreFolders; +// result |= SomeAreFolders; +// } +// if ( folders > 0 ) +// result |= SomeAreFolders; +// if ( parentsentries == list.count() ) { +// result |= AllAreInParentsEntries; +// result |= SomeAreInParentsEntries; +// } else if ( parentsentries != 0 ) +// result |= SomeAreInParentsEntries; +// if ( parentshavesvn == list.count() ) { +// result |= AllParentsHaveSvn; +// result |= SomeParentsHaveSvn; +// } else if ( parentshavesvn > 0 ) +// result |= SomeParentsHaveSvn; +// if ( subdirhavesvn == list.count() ) { +// result |= AllHaveSvn; +// result |= SomeHaveSvn; +// } else if ( subdirhavesvn > 0 ) +// result |= SomeHaveSvn; +// if ( external == list.count() ) { +// result |= AllAreExternalToParent; +// result |= SomeAreExternalToParent; +// } else if ( external > 0 ) +// result |= SomeAreExternalToParent; +// +// return result; +// } +// +// bool KSvnd::isFolder( const KURL& url ) { +// TQDir d( url.path() ); +// return d.exists(); +// } +// +// TQStringList KSvnd::getActionMenu ( const KURL::List &list ) { +// TQStringList result; +// int listStatus = getStatus( list ); +// +// if ( !(listStatus & SomeAreInParentsEntries) && +// !(listStatus & SomeAreExternalToParent) && +// !(listStatus & SomeHaveSvn)) { +// if( list.size() == 1 && listStatus & SomeAreFolders) { +// result << "Checkout"; +// result << "Export"; +// // result << "CreateRepository"; +// result << "Import"; +// } +// } else if ( (listStatus & AllAreInParentsEntries) ) { +// result << "Diff"; +// //In SVN +// // result << "ShowLog"; +// // result << "CheckForModifications"; +// // result << "RevisionGraph"; +// // result << "_SEPARATOR_"; +// // result << "Update to revision..." +// result << "Rename"; +// result << "Delete"; +// if( listStatus & SomeAreFolders && !(listStatus & SomeAreFiles)) { +// result << "Revert"; +// // result << "Cleanup"; +// } +// result << "_SEPARATOR_"; +// // result << "BranchTag"; +// result << "Switch"; +// result << "Merge"; +// if( listStatus & SomeAreFolders && !(listStatus & SomeAreFiles)) { +// // result << "Export"; +// // result << "Relocate"; +// result << "_SEPARATOR_"; +// result << "Add"; +// } +// result << "_SEPARATOR_"; +// if( listStatus & SomeAreFiles && !(listStatus & SomeAreFolders)) { +// result << "Blame"; +// } +// result << "CreatePatch"; +// +// if( list.size() == 1 && listStatus & SomeAreFolders) { +// // result << "ApplyPatchToFolder"; +// } +// } +// return result; +// } +// +// TQStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) { +// TQStringList result; +// int listStatus = getStatus( list ); +// +// +// if ( ( listStatus & AllParentsHaveSvn && +// ( ( listStatus & SomeAreExternalToParent ) || ( listStatus & SomeAreInParentsEntries ) ) +// || ( listStatus & SomeHaveSvn ) ) +// ) { +// result << "Update"; +// result << "Commit"; +// } +// +// return result; +// } +// +// #if 0 +// void KSvnd::notify(const TQString& path, int action, int kind, const TQString& mime_type, int content_state, int prop_state, long int revision, const TQString& userstring) { +// kdDebug(9036) << "KDED/Subversion : notify " << path << " action : " << action << " mime_type : " << mime_type << " content_state : " << content_state << " prop_state : " << prop_state << " revision : " << revision << " userstring : " << userstring << endl; +// TQByteArray params; +// +// TQDataStream stream(params, IO_WriteOnly); +// stream << path << action << kind << mime_type << content_state << prop_state << revision << userstring; +// +// emitDCOPSignal( "subversionNotify(TQString,int,int,TQString,int,int,long int,TQString)", params ); +// } +// +// void KSvnd::status(const TQString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status, long int rev ) { +// kdDebug(9036) << "KDED/Subversion : status " << path << " " << text_status << " " << prop_status << " " +// << repos_text_status << " " << repos_prop_status << " " << rev << endl; +// TQByteArray params; +// +// TQDataStream stream(params, IO_WriteOnly); +// stream << path << text_status << prop_status << repos_text_status << repos_prop_status << rev; +// +// emitDCOPSignal( "subversionStatus(TQString,int,int,int,int,long int)", params ); +// } +// +// void KSvnd::popupMessage( const TQString& message ) { +// kdDebug(9036) << "KDED/Subversion : popupMessage" << message << endl; +// KMessageBox::information(0, message, i18n( "Subversion" ) ); +// } +// #endif + +#include "kdevsvnd.moc" diff --git a/vcs/subversion/kdevsvnd.desktop b/vcs/subversion/kdevsvnd.desktop new file mode 100644 index 00000000..9ba3e877 --- /dev/null +++ b/vcs/subversion/kdevsvnd.desktop @@ -0,0 +1,32 @@ +[Desktop Entry] +Type=Service +Name=TDevelop Subversion Module +Name[ca]=Mòdul de Subversion per a TDevelop +Name[da]=TDevelop Subversion-Modul +Name[de]=Subversion-Komponente (TDevelop) +Name[el]=Άρθρωμα subversion του TDevelop +Name[es]=Módulo de Subversion de TDevelop +Name[et]=TDevelopi Subversioni Moodul +Name[fr]=Module Subversion pour TDevelop +Name[hu]=TDevelop-Modul a Subversion kezeléséhez +Name[it]=Modulo Subversion di TDevelop +Name[ja]=TDevelop Subversion モジュール +Name[ms]=Modul Subversion TDevelop +Name[nds]=TDevelop-Moduul för Subversion +Name[nl]=TDevelop Subversion-Module +Name[pl]=Modul Subversion dla TDevelopa +Name[pt]=Módulo de Subversion do TDevelop +Name[pt_BR]=Módulo de Subversion do TDevelop +Name[ru]=Модуль Subversion для TDevelop +Name[sk]=TDevelop Subversion Modul +Name[sr]=TDevelop-ов модул за Subversion +Name[sr@Latn]=TDevelop-ov Modul za Subversion +Name[sv]=TDevelop Subversion-Modul +Name[zh_TW]=TDevelop Subversion 模組 +Comment=Provides subversion client services with TDevelop +ServiceTypes=KDEDModule +X-TDE-ModuleType=Library +X-TDE-Library=kdevsvnd +X-TDE-FactoryName=kdevsvnd +X-TDE-Kded-autoload=true +X-TDE-Kded-load-on-demand=true diff --git a/vcs/subversion/kdevsvnd.h b/vcs/subversion/kdevsvnd.h new file mode 100644 index 00000000..438520e1 --- /dev/null +++ b/vcs/subversion/kdevsvnd.h @@ -0,0 +1,51 @@ +/* + This file is part of the KDE Project + + Copyright (C) 2003-2005 Mickael Marchand + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + This software 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 library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KSVND_H +#define KSVND_H + +#include +#include +#include +#include + +class KDevSvnd : public KDEDModule +{ +Q_OBJECT +// + +K_DCOP + + //note: InSVN means parent is added. InRepos means itself is added + enum { SomeAreFiles = 1, SomeAreFolders = 2, SomeAreInParentsEntries = 4, SomeParentsHaveSvn = 8, SomeHaveSvn = 16, SomeAreExternalToParent = 32, AllAreInParentsEntries = 64, AllParentsHaveSvn = 128, AllHaveSvn = 256, AllAreExternalToParent = 512, AllAreFolders = 1024 }; +public: + KDevSvnd(const TQCString &); + ~KDevSvnd(); + +k_dcop: +// void addAuthInfo(TDEIO::AuthInfo, long); + TQString commitDialog(TQString); + int sslServerTrustPrompt(TQString certFailMsg, TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ); + TQString sslCertFile(); + TQCString sslPasswdDlg(TQString promptMsg); + +}; + +#endif diff --git a/vcs/subversion/kdevsvnd_widgets.cpp b/vcs/subversion/kdevsvnd_widgets.cpp new file mode 100644 index 00000000..0fd2c20b --- /dev/null +++ b/vcs/subversion/kdevsvnd_widgets.cpp @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2007 Dukju Ahn (dukjuahn@gmail.com) + * + * This program 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 program 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. + */ + +#include "kdevsvnd_widgets.h" +#include +#include +#include +#include + +SvnSSLTrustPrompt::SvnSSLTrustPrompt( TQWidget* parent, const char* name, bool modal, WFlags f ) + :SvnSSLTrustPromptBase( parent, name, modal, f ) + , m_code(-1) +{ + listView1->setColumnText( 0, "Items" ); + listView1->setColumnText( 1, "Values" ); + btnPermanent->setText(i18n("Accept Permanently")); + btnTemporary->setText(i18n("Accept Temporarily")); + btnReject->setText(i18n("Reject")); + connect( btnPermanent, TQT_SIGNAL(clicked()), this, TQT_SLOT(setPermanent()) ); + connect( btnTemporary, TQT_SIGNAL(clicked()), this, TQT_SLOT(setTemporary()) ); + connect( btnReject, TQT_SIGNAL(clicked()), this, TQT_SLOT(setRejected ()) ); +} +SvnSSLTrustPrompt::~SvnSSLTrustPrompt() +{} + +void SvnSSLTrustPrompt::setupCertInfo( TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ) +{ + // setup texts + TQListViewItem *host= new TQListViewItem(listView1, i18n("Hostname"), hostname ); + TQListViewItem *finger = new TQListViewItem(listView1, i18n("FingerPrint"), fingerPrint ); + TQListViewItem *validFrom = new TQListViewItem(listView1, i18n("Valid From"), validfrom ); + TQListViewItem *validUntil = new TQListViewItem(listView1, i18n("Valid Until"), validuntil ); + TQListViewItem *issName = new TQListViewItem(listView1, i18n("Issuer"), issuerName ); + TQListViewItem *cert = new TQListViewItem(listView1, i18n("Cert"), ascii_cert ); +} +void SvnSSLTrustPrompt::setupFailedReasonMsg( TQString msg ) +{ + errMsgLabel->setText( msg ); +} +int SvnSSLTrustPrompt::code() +{ + return m_code; +} + +void SvnSSLTrustPrompt::setPermanent() +{ + m_code = 1; +} + +void SvnSSLTrustPrompt::setTemporary() +{ + m_code = 0; +} + +void SvnSSLTrustPrompt::setRejected() +{ + m_code = -1; +} +#include "kdevsvnd_widgets.moc" diff --git a/vcs/subversion/kdevsvnd_widgets.h b/vcs/subversion/kdevsvnd_widgets.h new file mode 100644 index 00000000..3967cb35 --- /dev/null +++ b/vcs/subversion/kdevsvnd_widgets.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2007 Dukju Ahn (dukjuahn@gmail.com) + * + * This program 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 program 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. + */ + +#ifndef KDEVSVND_WIDGETS_H +#define KDEVSVND_WIDGETS_H + +#include "svnssltrustpromptbase.h" + +class SvnSSLTrustPrompt : public SvnSSLTrustPromptBase{ +Q_OBJECT + +public: + SvnSSLTrustPrompt( TQWidget* parent=0, const char* name=0, bool modal=true, WFlags f=0 ); + ~SvnSSLTrustPrompt(); + void setupCertInfo( TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ); + void setupFailedReasonMsg( TQString msg ); + int code(); + +public slots: + void setPermanent(); + void setTemporary(); + void setRejected(); + +protected: + // -1 for reject + // 0 for accept temporarily + // 1 for accept permanently + int m_code; +}; + +#endif diff --git a/vcs/subversion/subversion_core.cpp b/vcs/subversion/subversion_core.cpp index 108bf298..e9c89ece 100644 --- a/vcs/subversion/subversion_core.cpp +++ b/vcs/subversion/subversion_core.cpp @@ -18,15 +18,15 @@ */ #include -#include -#include +#include +#include #include "subversion_part.h" #include "subversion_core.h" #include "subversion_widget.h" #include "svn_blamewidget.h" #include "svn_logviewwidget.h" #include "subversiondiff.h" -#include +#include #include "svn_co.h" #include #include @@ -82,7 +82,7 @@ subversionCore::~subversionCore() { //FIXME delete m_fileInfoProvider here? } -TDevVCSFileInfoProvider *subversionCore::fileInfoProvider() const { +KDevVCSFileInfoProvider *subversionCore::fileInfoProvider() const { return m_fileInfoProvider; } @@ -114,8 +114,8 @@ subversionWidget *subversionCore::processWidget() const { void subversionCore::resolve( const KURL::List& list ) { KURL servURL = m_part->baseURL(); if ( servURL.isEmpty() ) servURL="kdevsvn+svn://blah/"; - if ( ! servURL.protocol().startsWith( "tdevsvn+" ) ) { - servURL.setProtocol( "tdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" + if ( ! servURL.protocol().startsWith( "kdevsvn+" ) ) { + servURL.setProtocol( "kdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" } kdDebug(9036) << "servURL : " << servURL.prettyURL() << endl; for ( TQValueListConstIterator it = list.begin(); it != list.end() ; ++it ) { @@ -248,8 +248,8 @@ void subversionCore::diffAsync( const KURL &pathOrUrl1, const KURL &pathOrUrl2, void subversionCore::commit( const KURL::List& list, bool recurse, bool keeplocks ) { KURL servURL = m_part->baseURL(); if ( servURL.isEmpty() ) servURL="kdevsvn+svn://blah/"; - if ( ! servURL.protocol().startsWith( "tdevsvn+" ) ) { - servURL.setProtocol( "tdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" + if ( ! servURL.protocol().startsWith( "kdevsvn+" ) ) { + servURL.setProtocol( "kdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" } kdDebug(9036) << "servURL : " << servURL.prettyURL() << endl; TQByteArray parms; @@ -277,8 +277,8 @@ void subversionCore::svnLog( const KURL::List& list, clientInfo( KURL(m_part->project()->projectDirectory()), false, m_part->m_prjInfoMap ); KURL servURL = m_part->baseURL(); if ( servURL.isEmpty() ) servURL="kdevsvn+svn://blah/"; - if ( ! servURL.protocol().startsWith( "tdevsvn+" ) ) { - servURL.setProtocol( "tdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" + if ( ! servURL.protocol().startsWith( "kdevsvn+" ) ) { + servURL.setProtocol( "kdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" } kdDebug(9036) << "servURL : " << servURL.prettyURL() << endl; TQByteArray parms; @@ -304,8 +304,8 @@ void subversionCore::blame( const KURL &url, UrlMode mode, int revstart, TQStrin { KURL servURL = m_part->baseURL(); if ( servURL.isEmpty() ) servURL="kdevsvn+svn://blah/"; - if ( ! servURL.protocol().startsWith( "tdevsvn+" ) ) { - servURL.setProtocol( "tdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" + if ( ! servURL.protocol().startsWith( "kdevsvn+" ) ) { + servURL.setProtocol( "kdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" } kdDebug(9036) << "servURL : " << servURL.prettyURL() << endl; TQByteArray parms; @@ -374,7 +374,7 @@ void subversionCore::checkout() { int cmd = 1; int rev = -1; s << cmd << servURL << KURL( wcPath ) << rev << TQString( "HEAD" ); - servURL.setProtocol( "tdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" + servURL.setProtocol( "kdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" SimpleJob * job = TDEIO::special(servURL,parms, true); job->setWindow( m_part->mainWindow()->main() ); connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), this, TQT_SLOT( slotEndCheckout( TDEIO::Job * ) ) ); diff --git a/vcs/subversion/subversion_core.h b/vcs/subversion/subversion_core.h index 60cd8cfc..f2f3f6da 100644 --- a/vcs/subversion/subversion_core.h +++ b/vcs/subversion/subversion_core.h @@ -29,7 +29,7 @@ #include "subversion_fileinfo.h" #include "subversion_global.h" -class TDevProject; +class KDevProject; class subversionPart; class subversionWidget; class TDEApplication; @@ -76,7 +76,7 @@ public: // Return true on success. Otherwise return false. bool clientInfo( KURL path_or_url, bool recurse, TQMap< KURL, SvnGlobal::SvnInfoHolder> &holderMap ); void createNewProject( const TQString& dirName, const KURL& importURL, bool init ); - TDevVCSFileInfoProvider *fileInfoProvider() const; + KDevVCSFileInfoProvider *fileInfoProvider() const; void initProcessDlg( TDEIO::Job *job, const TQString &src, const TQString &dest ); // k_dcop: diff --git a/vcs/subversion/subversion_fileinfo.cpp b/vcs/subversion/subversion_fileinfo.cpp index c41ff9ef..45d44d1e 100644 --- a/vcs/subversion/subversion_fileinfo.cpp +++ b/vcs/subversion/subversion_fileinfo.cpp @@ -22,10 +22,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include @@ -33,7 +33,7 @@ #include SVNFileInfoProvider::SVNFileInfoProvider(subversionPart *parent, const char *name) - : TDevVCSFileInfoProvider( parent, "svnfileinfoprovider" ), + : KDevVCSFileInfoProvider( parent, "svnfileinfoprovider" ), m_cachedDirEntries( 0 ), m_recursiveDirEntries(0) { Q_UNUSED(name); m_part = parent; diff --git a/vcs/subversion/subversion_fileinfo.h b/vcs/subversion/subversion_fileinfo.h index 1d144270..9b322463 100644 --- a/vcs/subversion/subversion_fileinfo.h +++ b/vcs/subversion/subversion_fileinfo.h @@ -23,7 +23,7 @@ #include -#include +#include #include #include #include @@ -34,7 +34,7 @@ Provider for SVN file information @author Mickael Marchand */ -class SVNFileInfoProvider : public TDevVCSFileInfoProvider, public DCOPObject/*, virtual public DCOPClient*/ +class SVNFileInfoProvider : public KDevVCSFileInfoProvider, public DCOPObject/*, virtual public DCOPClient*/ { Q_OBJECT // diff --git a/vcs/subversion/subversion_part.cpp b/vcs/subversion/subversion_part.cpp index 3df326d9..f3f43cd9 100644 --- a/vcs/subversion/subversion_part.cpp +++ b/vcs/subversion/subversion_part.cpp @@ -21,18 +21,18 @@ #include #include #include -#include +#include #include #include -#include "tdevcore.h" -#include "tdevmainwindow.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" #include "subversion_core.h" #include "subversion_widget.h" #include "subversionprojectwidget.h" #include "subversion_fileinfo.h" #include "subversion_global.h" -#include "tdevversioncontrol.h" +#include "kdevversioncontrol.h" #include "svn_fileselectdlg_commit.h" #include "svn_logviewwidget.h" #include "svn_switchwidget.h" @@ -43,28 +43,28 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include -#include +#include #include using namespace SvnGlobal; -static const TDevPluginInfo data("tdevsubversion"); +static const KDevPluginInfo data("kdevsubversion"); -typedef TDevGenericFactory subversionFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevsubversion, subversionFactory( data ) ) +typedef KDevGenericFactory subversionFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevsubversion, subversionFactory( data ) ) //bool g_projectWasJustCreated = false; subversionPart::subversionPart(TQObject *parent, const char *name, const TQStringList& ) - : TDevVersionControl(&data, parent, name ? name : "Subversion" ) { + : KDevVersionControl(&data, parent, name ? name : "Subversion" ) { setInstance(subversionFactory::instance()); m_projWidget = 0; @@ -79,7 +79,7 @@ subversionPart::subversionPart(TQObject *parent, const char *name, const TQStrin // Context menu connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), this, TQT_SLOT(slotStopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) ); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(slotProjectClosed()) ); @@ -177,7 +177,7 @@ bool subversionPart::fetchFromRepository() { return true; } -TDevVCSFileInfoProvider * subversionPart::fileInfoProvider() const { +KDevVCSFileInfoProvider * subversionPart::fileInfoProvider() const { return m_impl->fileInfoProvider(); } diff --git a/vcs/subversion/subversion_part.h b/vcs/subversion/subversion_part.h index 9296152a..1847567d 100644 --- a/vcs/subversion/subversion_part.h +++ b/vcs/subversion/subversion_part.h @@ -16,16 +16,16 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __TDEVPART_SUBVERSION_H__ -#define __TDEVPART_SUBVERSION_H__ +#ifndef __KDEVPART_SUBVERSION_H__ +#define __KDEVPART_SUBVERSION_H__ #include -#include +#include #include #include #include -#include "tdevversioncontrol.h" +#include "kdevversioncontrol.h" class subversionCore; class subversionOptionsWidget; @@ -36,7 +36,7 @@ namespace SvnGlobal class SvnInfoHolder; }; -class subversionPart : public TDevVersionControl +class subversionPart : public KDevVersionControl { Q_OBJECT @@ -49,7 +49,7 @@ public: TQWidget* newProjectWidget( TQWidget* parent ); void createNewProject( const TQString& dirname ); bool fetchFromRepository(); - TDevVCSFileInfoProvider * fileInfoProvider() const; + KDevVCSFileInfoProvider * fileInfoProvider() const; bool urlFocusedDocument( KURL &url ); void restorePartialProjectSession(const TQDomElement* ); void savePartialProjectSession(TQDomElement* ); diff --git a/vcs/subversion/subversion_widget.cpp b/vcs/subversion/subversion_widget.cpp index 9b29e1fa..95b31f6b 100644 --- a/vcs/subversion/subversion_widget.cpp +++ b/vcs/subversion/subversion_widget.cpp @@ -18,7 +18,7 @@ */ #include -#include +#include #include #include diff --git a/vcs/subversion/svn_fileselectdlg_commit.cpp b/vcs/subversion/svn_fileselectdlg_commit.cpp index 9c210a37..e042df84 100644 --- a/vcs/subversion/svn_fileselectdlg_commit.cpp +++ b/vcs/subversion/svn_fileselectdlg_commit.cpp @@ -29,10 +29,10 @@ #include #include #include -#include "tdevmainwindow.h" +#include "kdevmainwindow.h" #include -#include +#include SVNFileSelectDlgCommit::SVNFileSelectDlgCommit( KURL::List &urls, subversionPart *part, TQWidget* parent) :SvnCommitDlgBase( parent, "svnfileselectcommitdlg", true ) diff --git a/vcs/subversion/svn_logviewwidget.cpp b/vcs/subversion/svn_logviewwidget.cpp index e872a586..10e55a9f 100644 --- a/vcs/subversion/svn_logviewwidget.cpp +++ b/vcs/subversion/svn_logviewwidget.cpp @@ -22,7 +22,7 @@ #include "svn_blamewidget.h" #include "subversion_core.h" #include "subversion_global.h" -#include +#include #include #include #include diff --git a/vcs/subversion/svn_tdeio.cpp b/vcs/subversion/svn_tdeio.cpp index 0abac2b8..23f1d2ff 100644 --- a/vcs/subversion/svn_tdeio.cpp +++ b/vcs/subversion/svn_tdeio.cpp @@ -124,7 +124,7 @@ tdeio_svnProtocol::tdeio_svnProtocol(const TQCString &pool_socket, const TQCStri apr_initialize(); // Make sure to properly initialize svn client, besides other things, this sets up // NLS support for environments that don't use UTF-8 - svn_cmdline_init("tdevsvnd",NULL); + svn_cmdline_init("kdevsvnd",NULL); // CleanUP ctx preventing crash in svn_client_update and other memset(&ctx, 0, sizeof(ctx)); pool = svn_pool_create (NULL); @@ -1861,7 +1861,7 @@ svn_error_t *tdeio_svnProtocol::commitLogPrompt( const char **log_msg, const cha kdDebug(9036) << " __TIME__ " << __TIME__ << endl; if ( !p->dcopClient()->call( "kded","kdevsvnd","commitDialog(TQString)", params, replyType, reply ) ) { - kdWarning() << "Communication with KDED:TDevSvnd failed" << endl; + kdWarning() << "Communication with KDED:KDevSvnd failed" << endl; svn_error_t *err = svn_error_create( SVN_ERR_EXTERNAL_PROGRAM, NULL, apr_pstrdup( pool, "Fail to call kded_kdevsvnd via DCOP. If this is your first problem, try to restart KDE" ) ); return err; diff --git a/vcs/subversion/tdevpart_subversion.rc b/vcs/subversion/tdevpart_subversion.rc deleted file mode 100644 index ad957e99..00000000 --- a/vcs/subversion/tdevpart_subversion.rc +++ /dev/null @@ -1,31 +0,0 @@ - - - - &Tools - &Version Control - - - &Subversion - - - - - - - - - - - - - - - - - - - - - diff --git a/vcs/subversion/tdevsubversion.desktop b/vcs/subversion/tdevsubversion.desktop deleted file mode 100644 index 7643c755..00000000 --- a/vcs/subversion/tdevsubversion.desktop +++ /dev/null @@ -1,34 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Subversion -Comment[fa]=زیرنسخه -Comment[hi]=सबवर्सन -Comment[ne]=सबभर्सन -Comment[pt_BR]=Subversão -Comment[ru]=Интеграция Subversion -Comment[ta]=உப பதிப்பு -Comment[tg]=Интегратсия Subversion -Name=KDevsubversion -Name[da]=TDevelop Subversion -Name[de]=Unterstützung für Subversion (TDevelop) -Name[hi]=के-डेव-सबवर्सन -Name[nds]=Subversion-Ünnerstütten för TDevelop -Name[sk]=KDev Subversion -Name[sv]=TDevelop Subversion -Name[ta]=kdev உப பதிப்பு -Name[tg]=KDevзер-ривоят -Name[zh_TW]=TDevelop Subversion -GenericName=Subversion -GenericName[fa]=زیرنسخه -GenericName[hi]=सबवर्सन -GenericName[ne]=सबभर्सन -GenericName[pt_BR]=Subversão -GenericName[ru]=Интеграция Subversion -GenericName[ta]=துணை பதிப்பு -GenericName[tg]=Зер-ривоят -Icon=misc -ServiceTypes=TDevelop/VersionControl -X-TDE-Library=libtdevsubversion -X-TDevelop-Version=5 -X-TDevelop-Properties=VCS,SubversionVCS diff --git a/vcs/subversion/tdevsvn+file.protocol b/vcs/subversion/tdevsvn+file.protocol deleted file mode 100644 index 412c3800..00000000 --- a/vcs/subversion/tdevsvn+file.protocol +++ /dev/null @@ -1,39 +0,0 @@ -[Protocol] -exec=tdeio_kdevsvn -protocol=kdevsvn+file -input=none -output=filesystem -reading=true -writing=true -deleting=true -makedir=true -linking=false -moving=true -deleteRecursive=true -listing=Name,Size,Date,Owner -defaultMimetype=application/octet-stream -Icon=remote -Description=Subversion ioslave for TDevelop -Description[ca]=L'esclau io (ioslave) Subversion per a TDevelop -Description[de]=Ein-/Ausgabemodul für Subversion (TDevelop) -Description[el]=Subversion ioslave για το TDevelop -Description[es]=El ioslave de Subversion para TDevelop -Description[et]=TDevelopi Subversioni IO-moodul -Description[fr]=Esclave d'E/S (ioslave) Subversion pour TDevelop -Description[hu]=Subversion KDE-protokoll a TDevelophoz -Description[it]=ioslave di subversion per TDevelop -Description[ja]=TDevelop のための Subversion ioslave -Description[ms]=IOslave Subversion untuk TDevelop -Description[nds]=TDevelop-In-/Utgaavmoduul för Subversion -Description[nl]=Subversion-ioslave voor TDevelop -Description[pl]=Wtyczka protokołu Subversion dla TDevelopa -Description[pt]='Ioslave' do Subversion para o TDevelop -Description[pt_BR]='Ioslave' do Subversion para o TDevelop -Description[ru]=Поддержка протокола Subversion для TDevelop -Description[sk]=Subversion ioslave pre TDevelop -Description[sr]=KIOSlave Subversion-а за TDevelop -Description[sr@Latn]=KIOSlave Subversion-a za TDevelop -Description[sv]=Subversion I/O-slav för TDevelop -Description[zh_TW]=TDevelop 的 Subversion ioslave -maxInstances=5 -class=:internet diff --git a/vcs/subversion/tdevsvn+http.protocol b/vcs/subversion/tdevsvn+http.protocol deleted file mode 100644 index 5a063b85..00000000 --- a/vcs/subversion/tdevsvn+http.protocol +++ /dev/null @@ -1,39 +0,0 @@ -[Protocol] -exec=tdeio_kdevsvn -protocol=kdevsvn+http -input=none -output=filesystem -reading=true -writing=true -deleting=true -makedir=true -linking=false -moving=true -deleteRecursive=true -listing=Name,Size,Date,Owner -defaultMimetype=application/octet-stream -Icon=remote -Description=Subversion ioslave for TDevelop -Description[ca]=L'esclau io (ioslave) Subversion per a TDevelop -Description[de]=Ein-/Ausgabemodul für Subversion (TDevelop) -Description[el]=Subversion ioslave για το TDevelop -Description[es]=El ioslave de Subversion para TDevelop -Description[et]=TDevelopi Subversioni IO-moodul -Description[fr]=Esclave d'E/S (ioslave) Subversion pour TDevelop -Description[hu]=Subversion KDE-protokoll a TDevelophoz -Description[it]=ioslave di subversion per TDevelop -Description[ja]=TDevelop のための Subversion ioslave -Description[ms]=IOslave Subversion untuk TDevelop -Description[nds]=TDevelop-In-/Utgaavmoduul för Subversion -Description[nl]=Subversion-ioslave voor TDevelop -Description[pl]=Wtyczka protokołu Subversion dla TDevelopa -Description[pt]='Ioslave' do Subversion para o TDevelop -Description[pt_BR]='Ioslave' do Subversion para o TDevelop -Description[ru]=Поддержка протокола Subversion для TDevelop -Description[sk]=Subversion ioslave pre TDevelop -Description[sr]=KIOSlave Subversion-а за TDevelop -Description[sr@Latn]=KIOSlave Subversion-a za TDevelop -Description[sv]=Subversion I/O-slav för TDevelop -Description[zh_TW]=TDevelop 的 Subversion ioslave -maxInstances=5 -class=:internet diff --git a/vcs/subversion/tdevsvn+https.protocol b/vcs/subversion/tdevsvn+https.protocol deleted file mode 100644 index d064e575..00000000 --- a/vcs/subversion/tdevsvn+https.protocol +++ /dev/null @@ -1,39 +0,0 @@ -[Protocol] -exec=tdeio_kdevsvn -protocol=kdevsvn+https -input=none -output=filesystem -reading=true -writing=true -deleting=true -makedir=true -linking=false -moving=true -deleteRecursive=true -listing=Name,Size,Date,Owner -defaultMimetype=application/octet-stream -Icon=remote -Description=Subversion ioslave for TDevelop -Description[ca]=L'esclau io (ioslave) Subversion per a TDevelop -Description[de]=Ein-/Ausgabemodul für Subversion (TDevelop) -Description[el]=Subversion ioslave για το TDevelop -Description[es]=El ioslave de Subversion para TDevelop -Description[et]=TDevelopi Subversioni IO-moodul -Description[fr]=Esclave d'E/S (ioslave) Subversion pour TDevelop -Description[hu]=Subversion KDE-protokoll a TDevelophoz -Description[it]=ioslave di subversion per TDevelop -Description[ja]=TDevelop のための Subversion ioslave -Description[ms]=IOslave Subversion untuk TDevelop -Description[nds]=TDevelop-In-/Utgaavmoduul för Subversion -Description[nl]=Subversion-ioslave voor TDevelop -Description[pl]=Wtyczka protokołu Subversion dla TDevelopa -Description[pt]='Ioslave' do Subversion para o TDevelop -Description[pt_BR]='Ioslave' do Subversion para o TDevelop -Description[ru]=Поддержка протокола Subversion для TDevelop -Description[sk]=Subversion ioslave pre TDevelop -Description[sr]=KIOSlave Subversion-а за TDevelop -Description[sr@Latn]=KIOSlave Subversion-a za TDevelop -Description[sv]=Subversion I/O-slav för TDevelop -Description[zh_TW]=TDevelop 的 Subversion ioslave -maxInstances=5 -class=:internet diff --git a/vcs/subversion/tdevsvn+ssh.protocol b/vcs/subversion/tdevsvn+ssh.protocol deleted file mode 100644 index 512b4a90..00000000 --- a/vcs/subversion/tdevsvn+ssh.protocol +++ /dev/null @@ -1,39 +0,0 @@ -[Protocol] -exec=tdeio_kdevsvn -protocol=kdevsvn+ssh -input=none -output=filesystem -reading=true -writing=true -deleting=true -makedir=true -linking=false -moving=true -deleteRecursive=true -listing=Name,Size,Date,Owner -defaultMimetype=application/octet-stream -Icon=remote -Description=Subversion ioslave for TDevelop -Description[ca]=L'esclau io (ioslave) Subversion per a TDevelop -Description[de]=Ein-/Ausgabemodul für Subversion (TDevelop) -Description[el]=Subversion ioslave για το TDevelop -Description[es]=El ioslave de Subversion para TDevelop -Description[et]=TDevelopi Subversioni IO-moodul -Description[fr]=Esclave d'E/S (ioslave) Subversion pour TDevelop -Description[hu]=Subversion KDE-protokoll a TDevelophoz -Description[it]=ioslave di subversion per TDevelop -Description[ja]=TDevelop のための Subversion ioslave -Description[ms]=IOslave Subversion untuk TDevelop -Description[nds]=TDevelop-In-/Utgaavmoduul för Subversion -Description[nl]=Subversion-ioslave voor TDevelop -Description[pl]=Wtyczka protokołu Subversion dla TDevelopa -Description[pt]='Ioslave' do Subversion para o TDevelop -Description[pt_BR]='Ioslave' do Subversion para o TDevelop -Description[ru]=Поддержка протокола Subversion для TDevelop -Description[sk]=Subversion ioslave pre TDevelop -Description[sr]=KIOSlave Subversion-а за TDevelop -Description[sr@Latn]=KIOSlave Subversion-a za TDevelop -Description[sv]=Subversion I/O-slav för TDevelop -Description[zh_TW]=TDevelop 的 Subversion ioslave -maxInstances=5 -class=:internet diff --git a/vcs/subversion/tdevsvn+svn.protocol b/vcs/subversion/tdevsvn+svn.protocol deleted file mode 100644 index 8f496854..00000000 --- a/vcs/subversion/tdevsvn+svn.protocol +++ /dev/null @@ -1,39 +0,0 @@ -[Protocol] -exec=tdeio_kdevsvn -protocol=kdevsvn+svn -input=none -output=filesystem -reading=true -writing=true -deleting=true -makedir=true -linking=false -moving=true -deleteRecursive=true -listing=Name,Size,Date,Owner -defaultMimetype=application/octet-stream -Icon=remote -Description=Subversion ioslave for TDevelop -Description[ca]=L'esclau io (ioslave) Subversion per a TDevelop -Description[de]=Ein-/Ausgabemodul für Subversion (TDevelop) -Description[el]=Subversion ioslave για το TDevelop -Description[es]=El ioslave de Subversion para TDevelop -Description[et]=TDevelopi Subversioni IO-moodul -Description[fr]=Esclave d'E/S (ioslave) Subversion pour TDevelop -Description[hu]=Subversion KDE-protokoll a TDevelophoz -Description[it]=ioslave di subversion per TDevelop -Description[ja]=TDevelop のための Subversion ioslave -Description[ms]=IOslave Subversion untuk TDevelop -Description[nds]=TDevelop-In-/Utgaavmoduul för Subversion -Description[nl]=Subversion-ioslave voor TDevelop -Description[pl]=Wtyczka protokołu Subversion dla TDevelopa -Description[pt]='Ioslave' do Subversion para o TDevelop -Description[pt_BR]='Ioslave' do Subversion para o TDevelop -Description[ru]=Поддержка протокола Subversion для TDevelop -Description[sk]=Subversion ioslave pre TDevelop -Description[sr]=KIOSlave Subversion-а за TDevelop -Description[sr@Latn]=KIOSlave Subversion-a za TDevelop -Description[sv]=Subversion I/O-slav för TDevelop -Description[zh_TW]=TDevelop 的 Subversion ioslave -maxInstances=5 -class=:internet diff --git a/vcs/subversion/tdevsvnd.cpp b/vcs/subversion/tdevsvnd.cpp deleted file mode 100644 index ea42667b..00000000 --- a/vcs/subversion/tdevsvnd.cpp +++ /dev/null @@ -1,394 +0,0 @@ -/* - This file is part of the KDE Project - - Copyright (C) 2003, 2004 Mickael Marchand - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as published by the Free Software Foundation. - - This software 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 library; see the file COPYING. 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 "config.h" - -#include "tdevsvnd.h" - -#include "tdevsvnd_widgets.h" -#include "commitdlg.h" - -extern "C" { - KDE_EXPORT KDEDModule *create_kdevsvnd(const TQCString &name) { - return new TDevSvnd(name); - } -} - -TDevSvnd::TDevSvnd(const TQCString &name) - : KDEDModule(name) { -} -TDevSvnd::~TDevSvnd() -{} - -TQString TDevSvnd::commitDialog(TQString modifiedFiles) { - CommitDlg commitDlg; - commitDlg.setCaption(i18n("Enter Commit Log Message:")); - commitDlg.listMessage->setText( modifiedFiles ); - int result = commitDlg.exec(); - if ( result == TQDialog::Accepted ) { - return commitDlg.textMessage->text(); - } else - return TQString(); -} -int TDevSvnd::sslServerTrustPrompt( TQString errmsg, TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ) -{ - SvnSSLTrustPrompt dlg; - dlg.setupCertInfo( hostname, fingerPrint, validfrom, validuntil, issuerName, ascii_cert ); - dlg.setupFailedReasonMsg( errmsg ); - int result = dlg.exec(); - if ( result == TQDialog::Accepted ){ - return dlg.code(); - } else{ - return -1; - } -} -TQString TDevSvnd::sslCertFile() -{ - TQString fileName = KFileDialog::getOpenFileName(TQString(),TQString(),0, i18n("Open SSL certificate file")); - return fileName; -} -TQCString TDevSvnd::sslPasswdDlg(TQString promptMsg) -{ - TQCString passwd; - int ret = KPasswordDialog::getPassword( passwd,promptMsg ); - if( ret == KPasswordDialog::Accepted ){ - TQCString retstr; - retstr.setNum(1); - return retstr + passwd; - } else{ - TQCString nullstr; - nullstr.setNum(-1); - return nullstr; - } -} - - -// void TDevSvnd::registerMe(const TQCString &app) -// { -// insert(app, "test", new TestObject(app)); -// // When 'app' unregisters with DCOP, the TestObject will get deleted. -// } - -// bool KSvnd::AreAnyFilesInSvn( const KURL::List& wclist ) { -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; -// TQDir bdir ( ( *it ).path() ); -// if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { -// return true; -// } else if ( !bdir.exists() ) { -// if ( isFileInSvnEntries( ( *it ).fileName(), ( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) -// return true; -// } -// } -// return false; -// } -// -// bool KSvnd::AreAnyFilesNotInSvn( const KURL::List& wclist ) { -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; -// TQDir bdir ( ( *it ).path() ); -// if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { -// return true; -// } else if ( !bdir.exists() ) { -// if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) -// return true; -// } -// } -// return false; -// } -// -// bool KSvnd::AreAllFilesInSvn( const KURL::List& wclist ) { -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; -// TQDir bdir ( ( *it ).path() ); -// if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { -// return false; -// } else if ( !bdir.exists() ) { -// if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) -// return false; -// } -// } -// return true; -// } -// -// bool KSvnd::AreAllFilesNotInSvn( const KURL::List& wclist ) { -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; -// TQDir bdir ( ( *it ).path() ); -// if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { -// return false; -// } else if ( !bdir.exists() ) { -// if ( isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) -// return false; -// } -// } -// return true; -// } -// -// bool KSvnd::isFileInSvnEntries ( const TQString filename, const TQString entfile ) { -// TQFile file( entfile ); -// if ( file.open( IO_ReadOnly ) ) { -// TQTextStream stream( &file ); -// TQString line; -// while ( !stream.atEnd() ) { -// line = stream.readLine().simplifyWhiteSpace(); -// if ( line == "name=\""+ filename + "\"" ) { -// file.close(); -// return true; -// } -// } -// file.close(); -// } -// return false; -// } -// -// bool KSvnd::isFileInExternals ( const TQString filename, const TQString propfile ) { -// TQFile file( propfile ); -// if ( file.open( IO_ReadOnly ) ) { -// TQTextStream stream( &file ); -// TQStringList line; -// while ( !stream.atEnd() ) -// line << stream.readLine().simplifyWhiteSpace(); -// for ( uint i = 0 ; i < line.count(); i++ ) { -// if ( line[ i ] == "K 13" && line[ i+1 ] == "svn:externals" ) { //Key 13 : svn:externals -// //next line should be "V xx" -// if ( line [ i+2 ].startsWith( "V " ) ) { -// //ok browse the values now -// i+=2; -// while ( i < line.count() ) { -// if ( line[ i ].startsWith( filename+" " ) ) { //found it ! -// file.close( ); -// return true; -// } else if ( line[ i ].isEmpty() ) { -// file.close( ); -// return false; //we are out of svn:externals now... -// } -// i++; -// } -// } -// } -// } -// file.close(); -// } -// return false; -// } -// -// bool KSvnd::anyNotValidWorkingCopy( const KURL::List& wclist ) { -// bool result = true; //one negative match is enough -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// //exception for .svn dirs -// if ( ( *it ).path(-1).endsWith( "/.svn" ) ) -// return true; -// //if is a directory check whether it contains a .svn/entries file -// TQDir dir( ( *it ).path() ); -// if ( dir.exists() ) { //it's a dir -// if ( !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) -// result = false; -// } -// -// //else check if ./.svn/entries exists -// if ( !TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) -// result = false; -// } -// return result; -// } -// -// bool KSvnd::anyValidWorkingCopy( const KURL::List& wclist ) { -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// //skip .svn dirs -// if ( ( *it ).path(-1).endsWith( "/.svn" ) ) -// continue; -// //if is a directory check whether it contains a .svn/entries file -// TQDir dir( ( *it ).path() ); -// if ( dir.exists() ) { //it's a dir -// if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) -// return true; -// } -// -// //else check if ./.svn/entries exists -// if ( TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) -// return true; -// } -// return false; -// } -// -// int KSvnd::getStatus( const KURL::List& list ) { -// int result = 0; -// uint files = 0, folders = 0, parentsentries = 0, parentshavesvn = 0, subdirhavesvn = 0, external = 0; -// for ( TQValueListConstIterator it = list.begin(); it != list.end() ; ++it ) { -// if ( isFolder ( ( *it ) ) ) { -// folders++; -// } else { -// files++; -// } -// if ( isFileInSvnEntries ( (*it).filename(),( *it ).directory() + "/.svn/entries" ) ) { // normal subdir known in the working copy -// parentsentries++; -// } else if ( isFolder( *it ) ) { // other subfolders (either another module checkouted or an external, or something not known at all) -// if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) -// subdirhavesvn++; -// if ( isFileInExternals( (*it).filename(), ( *it ).directory() + "/.svn/dir-props" ) ) { -// external++; -// } -// } -// if ( ( isFolder( ( *it ) ) && TQFile::exists( ( *it ).directory() + "../.svn/entries" ) ) || TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) //parent has a .svn ? -// parentshavesvn++; -// } -// if ( files > 0 ) -// result |= SomeAreFiles; -// if ( folders == list.count() ) { -// result |= AllAreFolders; -// result |= SomeAreFolders; -// } -// if ( folders > 0 ) -// result |= SomeAreFolders; -// if ( parentsentries == list.count() ) { -// result |= AllAreInParentsEntries; -// result |= SomeAreInParentsEntries; -// } else if ( parentsentries != 0 ) -// result |= SomeAreInParentsEntries; -// if ( parentshavesvn == list.count() ) { -// result |= AllParentsHaveSvn; -// result |= SomeParentsHaveSvn; -// } else if ( parentshavesvn > 0 ) -// result |= SomeParentsHaveSvn; -// if ( subdirhavesvn == list.count() ) { -// result |= AllHaveSvn; -// result |= SomeHaveSvn; -// } else if ( subdirhavesvn > 0 ) -// result |= SomeHaveSvn; -// if ( external == list.count() ) { -// result |= AllAreExternalToParent; -// result |= SomeAreExternalToParent; -// } else if ( external > 0 ) -// result |= SomeAreExternalToParent; -// -// return result; -// } -// -// bool KSvnd::isFolder( const KURL& url ) { -// TQDir d( url.path() ); -// return d.exists(); -// } -// -// TQStringList KSvnd::getActionMenu ( const KURL::List &list ) { -// TQStringList result; -// int listStatus = getStatus( list ); -// -// if ( !(listStatus & SomeAreInParentsEntries) && -// !(listStatus & SomeAreExternalToParent) && -// !(listStatus & SomeHaveSvn)) { -// if( list.size() == 1 && listStatus & SomeAreFolders) { -// result << "Checkout"; -// result << "Export"; -// // result << "CreateRepository"; -// result << "Import"; -// } -// } else if ( (listStatus & AllAreInParentsEntries) ) { -// result << "Diff"; -// //In SVN -// // result << "ShowLog"; -// // result << "CheckForModifications"; -// // result << "RevisionGraph"; -// // result << "_SEPARATOR_"; -// // result << "Update to revision..." -// result << "Rename"; -// result << "Delete"; -// if( listStatus & SomeAreFolders && !(listStatus & SomeAreFiles)) { -// result << "Revert"; -// // result << "Cleanup"; -// } -// result << "_SEPARATOR_"; -// // result << "BranchTag"; -// result << "Switch"; -// result << "Merge"; -// if( listStatus & SomeAreFolders && !(listStatus & SomeAreFiles)) { -// // result << "Export"; -// // result << "Relocate"; -// result << "_SEPARATOR_"; -// result << "Add"; -// } -// result << "_SEPARATOR_"; -// if( listStatus & SomeAreFiles && !(listStatus & SomeAreFolders)) { -// result << "Blame"; -// } -// result << "CreatePatch"; -// -// if( list.size() == 1 && listStatus & SomeAreFolders) { -// // result << "ApplyPatchToFolder"; -// } -// } -// return result; -// } -// -// TQStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) { -// TQStringList result; -// int listStatus = getStatus( list ); -// -// -// if ( ( listStatus & AllParentsHaveSvn && -// ( ( listStatus & SomeAreExternalToParent ) || ( listStatus & SomeAreInParentsEntries ) ) -// || ( listStatus & SomeHaveSvn ) ) -// ) { -// result << "Update"; -// result << "Commit"; -// } -// -// return result; -// } -// -// #if 0 -// void KSvnd::notify(const TQString& path, int action, int kind, const TQString& mime_type, int content_state, int prop_state, long int revision, const TQString& userstring) { -// kdDebug(9036) << "KDED/Subversion : notify " << path << " action : " << action << " mime_type : " << mime_type << " content_state : " << content_state << " prop_state : " << prop_state << " revision : " << revision << " userstring : " << userstring << endl; -// TQByteArray params; -// -// TQDataStream stream(params, IO_WriteOnly); -// stream << path << action << kind << mime_type << content_state << prop_state << revision << userstring; -// -// emitDCOPSignal( "subversionNotify(TQString,int,int,TQString,int,int,long int,TQString)", params ); -// } -// -// void KSvnd::status(const TQString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status, long int rev ) { -// kdDebug(9036) << "KDED/Subversion : status " << path << " " << text_status << " " << prop_status << " " -// << repos_text_status << " " << repos_prop_status << " " << rev << endl; -// TQByteArray params; -// -// TQDataStream stream(params, IO_WriteOnly); -// stream << path << text_status << prop_status << repos_text_status << repos_prop_status << rev; -// -// emitDCOPSignal( "subversionStatus(TQString,int,int,int,int,long int)", params ); -// } -// -// void KSvnd::popupMessage( const TQString& message ) { -// kdDebug(9036) << "KDED/Subversion : popupMessage" << message << endl; -// KMessageBox::information(0, message, i18n( "Subversion" ) ); -// } -// #endif - -#include "tdevsvnd.moc" diff --git a/vcs/subversion/tdevsvnd.desktop b/vcs/subversion/tdevsvnd.desktop deleted file mode 100644 index 9ba3e877..00000000 --- a/vcs/subversion/tdevsvnd.desktop +++ /dev/null @@ -1,32 +0,0 @@ -[Desktop Entry] -Type=Service -Name=TDevelop Subversion Module -Name[ca]=Mòdul de Subversion per a TDevelop -Name[da]=TDevelop Subversion-Modul -Name[de]=Subversion-Komponente (TDevelop) -Name[el]=Άρθρωμα subversion του TDevelop -Name[es]=Módulo de Subversion de TDevelop -Name[et]=TDevelopi Subversioni Moodul -Name[fr]=Module Subversion pour TDevelop -Name[hu]=TDevelop-Modul a Subversion kezeléséhez -Name[it]=Modulo Subversion di TDevelop -Name[ja]=TDevelop Subversion モジュール -Name[ms]=Modul Subversion TDevelop -Name[nds]=TDevelop-Moduul för Subversion -Name[nl]=TDevelop Subversion-Module -Name[pl]=Modul Subversion dla TDevelopa -Name[pt]=Módulo de Subversion do TDevelop -Name[pt_BR]=Módulo de Subversion do TDevelop -Name[ru]=Модуль Subversion для TDevelop -Name[sk]=TDevelop Subversion Modul -Name[sr]=TDevelop-ов модул за Subversion -Name[sr@Latn]=TDevelop-ov Modul za Subversion -Name[sv]=TDevelop Subversion-Modul -Name[zh_TW]=TDevelop Subversion 模組 -Comment=Provides subversion client services with TDevelop -ServiceTypes=KDEDModule -X-TDE-ModuleType=Library -X-TDE-Library=kdevsvnd -X-TDE-FactoryName=kdevsvnd -X-TDE-Kded-autoload=true -X-TDE-Kded-load-on-demand=true diff --git a/vcs/subversion/tdevsvnd.h b/vcs/subversion/tdevsvnd.h deleted file mode 100644 index 4bec5ae7..00000000 --- a/vcs/subversion/tdevsvnd.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - This file is part of the KDE Project - - Copyright (C) 2003-2005 Mickael Marchand - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as published by the Free Software Foundation. - - This software 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 library; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KSVND_H -#define KSVND_H - -#include -#include -#include -#include - -class TDevSvnd : public KDEDModule -{ -Q_OBJECT -// - -K_DCOP - - //note: InSVN means parent is added. InRepos means itself is added - enum { SomeAreFiles = 1, SomeAreFolders = 2, SomeAreInParentsEntries = 4, SomeParentsHaveSvn = 8, SomeHaveSvn = 16, SomeAreExternalToParent = 32, AllAreInParentsEntries = 64, AllParentsHaveSvn = 128, AllHaveSvn = 256, AllAreExternalToParent = 512, AllAreFolders = 1024 }; -public: - TDevSvnd(const TQCString &); - ~TDevSvnd(); - -k_dcop: -// void addAuthInfo(TDEIO::AuthInfo, long); - TQString commitDialog(TQString); - int sslServerTrustPrompt(TQString certFailMsg, TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ); - TQString sslCertFile(); - TQCString sslPasswdDlg(TQString promptMsg); - -}; - -#endif diff --git a/vcs/subversion/tdevsvnd_widgets.cpp b/vcs/subversion/tdevsvnd_widgets.cpp deleted file mode 100644 index ba688423..00000000 --- a/vcs/subversion/tdevsvnd_widgets.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2007 Dukju Ahn (dukjuahn@gmail.com) - * - * This program 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 program 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. - */ - -#include "tdevsvnd_widgets.h" -#include -#include -#include -#include - -SvnSSLTrustPrompt::SvnSSLTrustPrompt( TQWidget* parent, const char* name, bool modal, WFlags f ) - :SvnSSLTrustPromptBase( parent, name, modal, f ) - , m_code(-1) -{ - listView1->setColumnText( 0, "Items" ); - listView1->setColumnText( 1, "Values" ); - btnPermanent->setText(i18n("Accept Permanently")); - btnTemporary->setText(i18n("Accept Temporarily")); - btnReject->setText(i18n("Reject")); - connect( btnPermanent, TQT_SIGNAL(clicked()), this, TQT_SLOT(setPermanent()) ); - connect( btnTemporary, TQT_SIGNAL(clicked()), this, TQT_SLOT(setTemporary()) ); - connect( btnReject, TQT_SIGNAL(clicked()), this, TQT_SLOT(setRejected ()) ); -} -SvnSSLTrustPrompt::~SvnSSLTrustPrompt() -{} - -void SvnSSLTrustPrompt::setupCertInfo( TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ) -{ - // setup texts - TQListViewItem *host= new TQListViewItem(listView1, i18n("Hostname"), hostname ); - TQListViewItem *finger = new TQListViewItem(listView1, i18n("FingerPrint"), fingerPrint ); - TQListViewItem *validFrom = new TQListViewItem(listView1, i18n("Valid From"), validfrom ); - TQListViewItem *validUntil = new TQListViewItem(listView1, i18n("Valid Until"), validuntil ); - TQListViewItem *issName = new TQListViewItem(listView1, i18n("Issuer"), issuerName ); - TQListViewItem *cert = new TQListViewItem(listView1, i18n("Cert"), ascii_cert ); -} -void SvnSSLTrustPrompt::setupFailedReasonMsg( TQString msg ) -{ - errMsgLabel->setText( msg ); -} -int SvnSSLTrustPrompt::code() -{ - return m_code; -} - -void SvnSSLTrustPrompt::setPermanent() -{ - m_code = 1; -} - -void SvnSSLTrustPrompt::setTemporary() -{ - m_code = 0; -} - -void SvnSSLTrustPrompt::setRejected() -{ - m_code = -1; -} -#include "tdevsvnd_widgets.moc" diff --git a/vcs/subversion/tdevsvnd_widgets.h b/vcs/subversion/tdevsvnd_widgets.h deleted file mode 100644 index da7942b2..00000000 --- a/vcs/subversion/tdevsvnd_widgets.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2007 Dukju Ahn (dukjuahn@gmail.com) - * - * This program 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 program 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. - */ - -#ifndef TDEVSVND_WIDGETS_H -#define TDEVSVND_WIDGETS_H - -#include "svnssltrustpromptbase.h" - -class SvnSSLTrustPrompt : public SvnSSLTrustPromptBase{ -Q_OBJECT - -public: - SvnSSLTrustPrompt( TQWidget* parent=0, const char* name=0, bool modal=true, WFlags f=0 ); - ~SvnSSLTrustPrompt(); - void setupCertInfo( TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ); - void setupFailedReasonMsg( TQString msg ); - int code(); - -public slots: - void setPermanent(); - void setTemporary(); - void setRejected(); - -protected: - // -1 for reject - // 0 for accept temporarily - // 1 for accept permanently - int m_code; -}; - -#endif -- cgit v1.2.1